debug version of an apk got blocked by play services - android

I'm trying to build my app for developing purpose, It worked before but when I'm trying to build it on a new computer Google Play Protect blocks my app.
My application is build on Ionic 4, on a new computer (I develop it on another computer).
I tried to build it with debug option but it didn't work.
I did a research and found some answers, this was the most logical: Debug app blocked by play protect
I tried to delete the debug key from the ~/.android/ directory and after it didn't work I tried to delete all cache data from the ~/android/ directory.
I also saw this question installation app blocked by play protect but he had problem with release apk and not with debug apk as I have.
How am I trying to build:
ionic cordova build android --prod --debug
After it didn't work I tried to clean my configuration:
cordova clean
didn't work either.
The error message that I get is that the app developer isn't recognize to google.
Expected result is: be able to install debug application for developing purpose.

Related

React Native app crashes after installed on real device

Just rebuilt React Native app as the previous version failed in building on Android emulator. The React Native is upgraded from 0.66 to 0.67 and a few other modules, such as React Native gesture handler, were upgraded as well.
The app works fine on Android 2021.1.1 Patch 2 emulator. However after downloading the release package from the distribution server, the app installed on Android 10 device quits as soon as launching without giving any error.
What is the problem with the release package? Here is the build steps:
./gradlew bundleRelease
bundletool build-apks to build mypackage.apks with signature.
unzip it into mypackage.apk
Connecting android device to dev Mac using USB cable, the app was launched successfully on the real device. And the app can be launched successfully late as well. I notice that the size of the app is 77MB which is about twice as big as the app installed from the universal apk.
If you need to check apk on real device, follow this build steps:
Release APK Generation.
Place your terminal directory to Android using:
cd android
Then run the following command:
For Windows:
gradlew assembleRelease
For Linux and Mac OSX:
./gradlew assembleRelease
As a result, the APK creation process is done. You can find the generated APK at android/app/build/outputs/apk/app-release.apk. This is the actual app, which you can send to your phone or upload to the Google Play Store. Congratulations, you’ve just generated a React Native Release Build APK for Android.
There are frequent errors that show up in this process sometimes, which is typical to a React Native app, given React Native is continuously evolving. We are laying out here the most frequent React Native build errors that we ran into, to save you time and headaches.

Share flutter app as APK which works on real devices

I want to build APK from the flutter project and share it to someone to review. I followed the docs, but the problem is when he tries to open the APK he gets
"there was a problem parsing the package"
I tried it on another device and gets
"App not installed"
I think the problem is in the APK file, So how I can build a correct APK that works on real devices?
I keep the name of the file "app.apk" does that matter?
from the Flutter docs, to build an APK from the command line:
Run flutter build apk
(The flutter build command defaults to --release.)
This command results in an APK file:
[project]/build/app/outputs/flutter-apk/app-release.apk
take note of the path and ask name(app-release.apk)
if you would like to debug why the apk not running on physical device, install this app https://fbflipper.com/ on your system, and connect your mobile device though a usb cable, now when you run the apk, on the flipper app you will receive crash report that will help you understand why your app is crashing!

How to debug an app upgrade in Android Studio on a USB connected device

I have the production release of my Google Play Store app on my phone and have an updated version of the app in Android Studio. I would like to test the upgrade process, but have run into a versioning problem, then a logging problem.
To get a "clean" install, I can go into my phone's settings Backup & reset > Automatic restore, turn that off, then de-install the app, and install it from the Play Store. Alternatively, I could download the production APK and install it from the adb command line (details below). The result is my device should be the same as a regular production user.
Not directly germane to the question, but to understand my motivation for watching the upgrade process is that the app has an SQLite database and I extend SQLiteOpenHelper, so onUpgrade() is called, and some database schema work is being done.
Update Incompatible
If I click the button to deploy the app, then select my connected device, it wants to uninstall before proceeding:
Installation failed with message Failed to finalize session : INSTALL_FAILED_UPDATE_INCOMPATIBLE
Obviously I could uninstall, but that would not test the upgrade process!
Generating Signed APK
I built a "release" APK, using Generate Signed APK..., which is the same process I use when generating a release for uploading to the Play Store. This gets around the versioning problem, but causes a logging visibility problem. The release configuration used in the past and now looks like this:
Installing APK to the device from Command Line
"C:\Program Files (x86)\HTC\HTC Sync Manager\HTC Sync\adb" install -r app-release.apk
The above did upgrade without uninstalling. The process I used was to open Terminal within Android Studio, change directory to where the generated APK was stored, then type the above command.
Logging / Debugging Problems
The adb command line triggered the upgrade process, but it did not start feeding the Logcat window immediately with debug information. I could connect to Logcat for all processes, but I could not get debug information for just my process, and did not have access to debugging tools.
Question
How can I start with a device that's running a signed production release then cause an updated version, contained in Android Studio, to run, without uninstalling, and with the ability to see the debugging output during the upgrade process? Or how can I modify a signed production release such that it allows an new version to update and allow debugging?
Because you're starting with an APK that is Debuggable=false, your work-around that includes building an update to the app using the same process as your production release process and getting a Logcat with all processes is probably the best you can do.
Rebuilding from Previous Source Control Version
One option would be to pull the specific version of the app out of your source control system and build it with Debuggable=true, and use that generated APK as your starting point instead of using the APK from the Play Store.
For the Future
Instead of making only one APK release version and uploading that to Play Store, make two versions. One version would be signed and uploaded as usual. And with the exact same source code, make another APK that has Debuggable=true. Rename each file with the version number. Then, later, if you ever want to try an upgrade from any version to any version, you can do that, and still have debugging capability.

Could Not Load App error APK Android React Native

So, I'm stuck with an error after generating APK with React-Native. I tried on multiple computers, 32-bit and 64-bit operating system and had no success.
How I got here
First, I created my app with
create-react-native-app suporteecontrole
Then I started developing my app, installing dependencies, and etc. After making sure that the APP was running without any errors, I ejected with the command line:
npm run eject
I've put my expo credentials and it worked without any errors too. I figured that it was going to work.
Generating APK's
To generate APK, i followed the instructions on this link:
React Native Build Signed APK
1 - I installed the JAVA 8 SDK, and all dependences too.
2 - I generated the Key by following the step one on the link.
3 - I changed all gradle files according to the link
4 - Then I runned this lines on cmd:
cd android
And
gradle assembleRelease
No errors popped up. I made it to the build successfully.
So, It generated some files: app-dev19-release.apk, app-dev-release.apk, app-devRemoteKernel-release.apk, app-prod-release.apk.
I installed app-prod-release.apk on my mobile, and returns an Expo error:
Could not load app
photo_2018-07-24_12-57-51
I searched Google for this, and found nothing.
Can anybody help me with this?
It is frustrating how the create-react-native does expo by default instead of normal react app. But you've already ejected from the expo app, and your code now wont be working on it.
Instead you'll see a new app on your phone with the name and icon you chose. Try to find the App and run it. And to assemble a release, you actually need to sign it too, so I hope you've done the signing right. Take a look at this https://facebook.github.io/react-native/docs/signed-apk-android.html for signing if you face that error.

Android Cordova App not Installed issue

we currently have an app that has been in usage for several years now. We are currently facing an issue with deployment where users are failing to install updates to the existing app.
this is the error they see when trying to install on an android device:
As far as I can tell the app is being correctly signed with the proper certificate. I even checked the previous release apk with the new release/update apk. both the certificate seem to match perfectly.
the only thing I can recall being changed is I have switched to a newer PC, my old PC is gone and now I am working with visual studio 2017 instead of the previous visual studio 2015 to build the release apk files from cordova still using the same keystore file to sign the release apk. would switching computers impact the signing of the apk even though the keystore file is still the same?

Categories

Resources