Why does Android Play Protect security scan block a generic Ionic app from installing? - android

Last week I created a new Ionic4 project and wound up having to rip out everything but Android Studio to exorcise version incompatibilities in the build tools. That seemed to fix everything. However, after sending a client a third or fourth debug-signed APK, he reported he couldn't install it. ADB installed it on my tablet just fine, but it couldn't be installed from a webpage or the file system. Since then, some releases have installed, some not.
Investigating with an APK extractor turned up nothing unexpected.
Then I generated a new Ionic project from the sidemenu template, changed the widget ID to a unique name, and changed the homepage a bit. Nothing that should cause an install fail. And it failed!
LogCat showed an install error -22, but nothing more helpful. Turning off the Security Scan option within Play Protect does allow the app to install. If you turn the scan option back on and force a scan, it oddly doesn't complain about the "unsafe" app. Searching Google hasn't turned up any explanation.
Anyone else run into this? Telling clients to turn off security doesn't look great.

Related

Cant open Flutter app after build to release

So I just spend the whole night messing up and reinstalling android studio and vscode and flutter cause I was trying to build an apk for my app that's ready enough to pass out to some friends for testing. when my phone is connected to my computer I can debug my app no problem so I thought no big deal lets push out an apk and show off my work. What a nightmare this has been and still is.
I followed this step by step guide to building an android app... https://docs.flutter.dev/deployment/android
So once I finally got all the mystery errors out enough for it to build an apk I copied the file over to my phone and installed it. Well soon as it installed and still on the pop up I see 2 buttons, Close and Open, only open is greyed out. I cant open my app up.
I tried changing the targetSdkVersion down to my phones android version.I tried building out every possible version and appbundle and apk for all the processors and I just cant seem to get a variant to open. I have the key.properties file all linked up, I used the keytool like in the guide.
Has anyone else build out flutter app but cant open it? I'm stumped... The first few attempts I was getting extra popups for googles play protect so I went and turned off that feature. Ive had my phone in developer mode for years now so I know unknown sources are allowed.
It installs fine, but doesnt create an icon anywhere to be used. Once i exit out of the original install popup the only way Id know it was on my device is to go into settings/apps and find it there, and in there the only options are uninstall and force stop which is also greyed out. So the app is unuseable

Getting "App Not Installed" message after attempting to install new version of Android app

I have an app that I developed wow like 8 to 10 years ago, but I have been updating it constantly at least once a year or so.
I'm actually in the process of completely redoing the app from scratch, and it's working great when I run it on my Android from my computer, but when I build it with a signing key on PhoneGap Build, I get the error message "App Not Installed." when I try to install the apk.
I've read through several other posts on the topic and I can attest:
I have plenty of storage space on the phone.
The new version number is larger than the old version number.
The signing key is the same as the original version.
I do not have any version of the app currently installed on my phone.
Any other ideas on what may be causing this?
I've removed all my plugins to take that out of the equation, but I still get the same error.
The original app was build with OnsenUI and Cordova.
The new app is build in Ionic 5.4.16, Cordova 9.0.0, and Android 8.1.0.
Something else I have noticed is that if I change the app id (com.company.appname) to anything else (i.e. com.company.appnamedev), it installs. I feel like this is very indicative of the issue, but I don't know what to do with it.
Very much appreciate any guidance to finding the problem.
Unfortunately this isn't going to be the answer many of you solution seekers are hoping for, but I got it to work. Based on Mike N.'s suggestion, I attempted to sign it locally and push it to my device with adb. In doing that, I was having trouble with remnants of two older plugins (onesignal and admob) that I had already removed from my config.xml file.
I'm really not sure why, but after I got rid of those old pieces in my package.json, I attempt to push it to phonegap build again and it was able to install. So, I guess the solution would be to make sure you have fully removed any plugins that may be causing problems.
Now the big trick - adding these pieces of functionality back in. But, the app compiles on PhoneGap Build and the signed file installs on my device now.
UPDATE: So, it turns out this is directly related to the one signal plugin I'm using. Still figuring out why, but when I added it back in, it works great locally, but when I attempt to build with PhoneGap Build and load it to my phone, I get the error "App Not Installed." At least I know what's causing it now.
I finally figured out the root of all my issues. As it turns out, I had another half baked app I started and had on my phone under a different name and app identifier, but I had temporarily dropped the same google-services.json and GoogleService-Info.plist files into that other app that I use for the one in question here.
After employing Mike N's suggestion, I got the error:
adb: failed to install mynewapp.apk: Failure [INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.company.new attempting to redeclare permission com.company.new.permission.RECEIVE_ADM_MESSAGE already owned by com.company.old]
I uninstalled the old app that should not have had those files to begin with and everything installs and works great now. Hopefully this helps someone else out who encounters the same bizarre situation.
You can use My APK application and installing an apk using My APK Installer (MAI).
If there is an error, it will show the detail (like duplicate permission, provider, mismatch signature,...)

Android Studio generating old version APK

I looked at other solutions for the above problem, but none of them seem to resolve my issue.
I am running AS 3.5.2, under Help/About/Check for new versions everything is showing as fully updated.
I am using Windows. When I plug my phone into my computer, it runs the latest updated version.
When I Build APK(s) under Build menu, and then install that version onto my phone, it is an old version.
Up until about 2 weeks ago it was building APKs fine, and today after making a few code changes (been 2 weeks about since I last made changes), it now has this issue.
What I've tried:
1. build.grade (app) - changed the version code and name to 2 from 1
2. Build menu - clean & rebuild project
3. Checked for updates and updated as needed
4. Run/Debug configurations - confirmed Gradle-aware Make is present (even removed then re-added)
So to add some more information. It turns out the Android Studio IS making the correct version. However, my phone just isn't loading it from the APK. This is what I have done:
I created a new version, 1.07, and with my phone plugged into my computer, it correctly runs this version on my phone, even when I unplug the phone and restart the newly installed app on the phone. I then navigated to the APK stored on our intranet (previously saved there as described earlier in this post), downloaded it and installed it on my phone. It has now reverted to v1.06 strangely. So on a different phone that had an older v1.04, I also downloaded the app from the intranet and installed it, and it showed v1.07. This shows that the APK WAS indeed correctly created. Then on a 3rd phone where the app was never previously installed, I installed it from the app, and it was v1.07. Again, correct version.
I then went to my 1st phone again, went into settings, went to the apps, and deleted the cache and data, then uninstalled it from my phone. I then went to downloads and APK's and deleted all previously downloads. So theoretically no trace should be left on my phone.
I then again downloaded the APK, and it is again v1.06!!!
I plug my phone into the PC (to use as the emulator) and it then correctly installs the correct v1.07 onto my phone.
What is happening...!!!? It is almost like it reverts to the previous v1.06 when I do a manually download and install of a v1.07 APK, but where is the v1.06 even coming from? Does the phone keep a history of the app versions?
Please help me make sense, and how to get it working. This app is for about 300 people in our company, hence me distributing the app over the intranet as a link.
Although this method is a bit vague and old fashioned, but it still works.
Step One: Run your android device as a virtual emulator.
Step Two: Run main.dart in your android device. This will install the app in your device.
Step Three: Go to Play Store and install this app called APK Extractor.
Step Four: Extract your APK from the app.
The APKs created through this are smaller and more efficient as compared to the ones created using Android Studio and work pretty well.

Cordova signed apk installs on device but only produces a blank screen

I built an android application and signed the apk following all the steps on this tutorial. Even though the APK builds successfully after installing it on a mobile device it fails to load. I only get a white blank screen. I've searched for solutions and tried most of the suggestions but with no luck.
I then decided to start the project from scratch and guess what? the problem still persists. What could I have possible done wrong? I don't really know where to look because I don't even get an error message.
Please help???
I would try debugging that with a tool like GapDebug (https://www.genuitec.com/products/gapdebug/). I would:
Download and install GapDebug.
Attach your device to your PC/Mac via a USB cable.
Deploy your APK to the device and run it.
In GapDebug, choose your app as the app you want to debug.
At this point you may already see one or more errors showing up in the GapDebug console. If not,
On the device, restart the app.
Check the GapDebug console for errors.

Reinstalling Test app on Titanium

I'm trying to test my application on my phone. I have successfully done it before but for some reason it seems to not be updating with the latest version. I uninstall my app from my phone, I build my application in Titanium for Android. I go to install now and it appears to install it on the device. I open the application and it is in the same state I left it in and has not appeared to have been updated. Driving me nuts!!!!!!
It sounds like your app's identity has changed, so when adb goes to install the app, the phone rejects your new version. This could happen if you installed a signed version of the app, and then went back in to development of it.
Try uninstalling the app from your phone, and then deploying it again. With a fresh slate, you should be able to get it working again!
Hope this helps; let me know if it doesn't and we can explore some other solutions! -Dawson

Categories

Resources