I’m running into the all too common “Blocked by Play Protect” issue when I try install an APK directly on each of my local Android testing devices. I’ve been trying to fix this issue for over a week now and I’m still having no luck here.
Note: Just in case this is relevant, please note that I am building an Ionic 3 app, which requires
firstname.lastname@example.org. So I have implemented the
cordovaOverride.shsteps described the Appflow docs FAQ section.
One interesting and perplexing point with the
cordova build android command though:
- local build with no keystore file specified: install succeeds.
- local build with specifying a keystore file: install succeeds.
- Ionic Package build: install fails.
Checking each of these three APK files with
jarsigner -verify -certs -verbose, I see the following key points:
- local build with no keystore file specified: includes the internal default values for
- local build with specifying a keystore file: includes the relevant values for
Cas set for the relevant certificate in my keystore.
- Ionic Package build: includes the internal default values for
Looking at the Ionic Package build log pages, my iOS development builds show the “development” Security Profile in the right side bar (as I expect) but my Android development builds do not, despite having uploaded my Android keystore file to my “development” Security Profile and setting the correct alias and password values.
If I download the Ionic Package binary and sign it using the
apksigner.cmd tool from the
build-tools included in my Android SDK folder, using the exact same alias and password as I specified in my configuration for the security profile for my app, then it installs without any issue on my local device.
So my biggest question right now is: why does Ionic Package not sign my debug APK using the details I’ve told it to use?
Note: I only have a “Starter” Appflow subscription, so I cannot use the CLI to request a build with a specific Security Profile, I have to do this through the web UI.