Could not install apk in genymotion - android

I know that "Error while installing apk" it's a common error.I am using genymotion and I've created android 8.0 virtual device.My other apps are installing in this V.D except one app.It's using fb integration,youtube api etc..But when I'm trying to run it the error getting as
run:
10/23 13:08:38: Launching app $ adb push
/media/zinedroid/Zinedroid/Workspace/ATMADARSHANTV
01-10-18/ATMADARSHANTV/app/build/outputs/apk/debug/app-x86-debug.apk
/data/local/tmp/com.zinedroid.android.atmadarshantv $ adb shell pm
install -t -r "/data/local/tmp/com.zinedroid.android.atmadarshantv"
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native
libraries, res=-113] $ adb shell pm uninstall
com.zinedroid.android.atmadarshantv Unknown failure (at
android.os.Binder.execTransact(Binder.java:674)) Error while
Installing APK
it's working in other virtual devices in genymotion.

Related

Android Studio stuck at installing APK, the adb sometimes fails to install the APK, and somehow Android Studio interferes with adb's install command

Some time ago I had trouble with my Huawei P30 and ADB/Android Studio installing APKs. It turned out I was using outdated versions of the libraries/tools. Got it resolved and happily moved on.
Now that my phone has upgraded to Android 10, I'm facing an issue very similar to the one before, but I cannot seem to fix it the same way (by updating libraries). I've tried installing multiple version of each tool, doing a clean install of Android Studio and the Android related tools, but nothing seems to help.
Android Studio
The current behavior is that Android Studio generates the APK only to later get indefinitely stuck at the "installing" step. On some small percentage of tests it fails.
ADB
I've also tried installing the APK from the command line using adb, but I get mixed results.
$ adb version
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687
While Android Studio is running, installing the app either ends up failing, or hanging indefinitely just like in Android Studio:
$ cd .../platform-tools
$ adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
$ adb install C:\...\example.apk
Performing Streamed Install
adb: failed to install C:\...\example.apk
$ adb install C:\...\example.apk
Performing Streamed Install
^^^ Hangs there forever
Now, here is where things get interesting, if I close Android Studio, installing the APK results in successful installations about 50% of the time (the other half it fails and restarts the phone connection):
$ cd .../platform-tools
$ adb kill-server
$ adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
$ adb install C:\...\example.apk
Performing Streamed Install
adb: failed to install C:\...\example.apk
$ adb kill-server
$ adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
$ adb install C:\...\example.apk
Performing Streamed Install
Success
$ adb kill-server
$ adb install C:\...\example.apk
* daemon not running; starting now at tcp:5037
* daemon started successfully
Performing Streamed Install
Success
$ adb kill-server
$ adb install C:\...\example.apk
* daemon not running; starting now at tcp:5037
* daemon started successfully
Perform
adb: failed to install C:\...\example.apk
I have no trouble performing other actions, like pushing files into the phone or uninstalling apps. So far the issue is only related to installing APKs:
$ adb shell pm uninstall com.example
Success
$ adb push C:\...\app-debug.apk /sdcard/APKs
C:\Dropbox...\app-debug.apk: 1 file pushed, 0 skipped. 15.2 MB/s (31131771 bytes in 1.956s)
Why is it that installing an app fails or succeeds as if flipping a coin? Could this be a driver issue? How could Android Studio be interfering with the success rate of running the adb tool separately?
Try to install your application with ./gradlew installDebug . It will probably give the reason of the failure
You can also make use of Android's Studio UI:
For me it would get stuck at: Performing Streamed Install forever.
What fixed it was the old-age answer: unplugging and replugging my USB cable into my phone and then trying again.
You can start by uninstalling the package if it exist on the device:
Check if the package name of your App exist
$ adb shell dumpsys package com.package.name
if it exist:
$ adb shell pm uninstall --user 0 com.package.name
if the uninstall failed then maybe the application is device admin or device owner.
if it does not exist:
Try changing the install flag of Android studio:
Run > Edit configurations > Install Flags
pm install --user 0
Note: the command is pm install --user 0 without adb shell
Update:
Let's suppose that the App was never installed on the device.
First install
adb install myapp.apk
The command will succeed and the application will be installed.
Second install
adb install myapp.apk
The command will fail as you already installed a package com.package.name
For the second time you install, you should uninstall first:
adb uninstall com.package.name
adb install myapp.apk
or force to reinstall:
adb install -r myapp.apk
Try disabled USB debugging mode and enabling it again on your phone. Sometimes it gets bugged and acts as if its disabled, when its set as enabled
try update adb to latest version
can fix: adb install xxx.apk stuck at Performing Streamed Install`
More detail can refer: android - Error: ADB exited with exit code 1 Performing Streamed Install - Stack Overflow

Error when installing .apk on Linux beta in Chrome OS

I'm trying to install an apk file in the Linux terminal on my Chromebook, so I followed instructions from this website. So I installed the ADB and ran adb connect 100.115.92.2:5555, and after that I tried installing my apk by running adb install opinionrewards.apk but it returned this error:
error: more than one device/emulator
adb: error: failed to get feature set: more than one device/emulator
- waiting for device -
error: more than one device/emulator
Can someone please explain why this error occurred and how to fix it?
Okay, all I had to do was adb kill-server and then start it again, and just install it again.
Use this command:
adb -s emulator-5554 install filename.apk

Error installing (arcore-preview.apk) via USB/debugging mode on an Android Smartphone

I was following the instructions given on this https://developers.google.com/ar/develop/java/getting-started Google Developers Website but when I tried to install the APK file on my Android Device via Terminal (macOS)
Terminal gave me this error:
$ adb devices -l List of devices attached 93eafadd device usb:336592896X product:kenzo model:Redmi_Note_3 device:kenzo
$ adb install -r -d arcore-preview.apk Invalid APK file: arcore-preview.apk Sayans-iMac:~ sayan$
So I even transferred the APK to my Android device and tried to install it in the Android device it self manually, but I got this error: error parsing package!
I don't know why this is happening and I have also enabled USB debugging!
I had this same problem, but had not pointed adb to the right package:
adb install -r -d ~/Downloads/arcore-preview.apk
"Your download directory might vary."

Can't install apk on Android Things running on a Rasberry Pi 3B

I can install the apk and debug and everything works fine, but then (what seems randomly) it starts giving me the following error when I try to install/debug the app:
09/16 07:53:46: Launching app
$ adb push C:\Workspace\new-project-template-master\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.wolf.androidthings.autoherb
$ adb shell pm install -r "/data/local/tmp/com.wolf.androidthings.autoherb"
Error: android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
$ adb shell pm uninstall com.wolf.androidthings.autoherb
$ adb shell pm install -r "/data/local/tmp/com.wolf.androidthings.autoherb"
Error: android.os.ParcelableException: java.io.IOException: Requested internal only, but not enough space
$ adb shell pm uninstall com.wolf.androidthings.autoherb
Unknown failure (at android.os.Binder.execTransact(Binder.java:674))
Error while Installing APK
The only way I can fix this problem at the moment is flashing the Android Things image again, which is not ideal..
Any ideas on why this is happening?
PS. This is when doing a debug install via Android Studio
I've seen this on Android Things with Raspberry Pi. As you have noticed, uninstalling the app via adb doesn't work. I connected with the console via serial and noticed that I was out of space on the filesystem. I had some big log files associated with my app (not sure where, somewhere in /data/...). I removed those (as in rm -f ...) and then my app installed fine.

APK is not installing in docker emulator

I am trying to install an apk file on my virtual adb resides in a docker container. Whenever I try to install the apk getting the response
Aborted
The devices listed for the adb device command are
List of devices attached
emulator-5554 device
I endup getting same error for the command adb -s emulator-5554 install apk_path. The same is working for some other container and don't have the faintest idea why it is happening so.

Categories

Resources