Android "adb install" does nothing - android

I'm having trouble installing a simple .apk file using adb. Here's what I entered and got back:
adb install test.apk
4445 KB/s (1921193 bytes in 0.422s)
In an attempt to debug I added the trace flag and got back:
adb install test.apk ADB_TRACE=1
4445 KB/s (1921193 bytes in 0.422s)
Aborted
Also, the adb devices command does list my device and when I manually copy the .apk to my device it installs/runs fine.
Help :(

Try below
adb install -r test.apk
or you need to enable to insatll unknown source app in android settings.

Not really sure what was going on, but after a system update it now works just fine.

Related

ADB - failure of installing apk on android device that has 0.00b internal storage while it has free space?

I have changed my I9070 firmware and the Internal Storage 0.00B and can't install apps and save files.
In order to fix the problem I have tried to install busy box but not succeeded.
c:\adb>adb devices
List of devices attached
C074114C31720D21CD73F6306E34174 device
c:\adb>adb shell
$ su
# su
# exit
# exit
$ exit
c:\adb>adb install busybox.apk
3264 KB/s (2679743 bytes in 0.801s)
pkg: /data/local/tmp/busybox.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
rm failed for -f, No such file or directory
Is there any help regarding this or other option?
As the error states it didnot have enough memory for installation either increase memory or delete some data and then try.
Thank you
You cannot install any app with 0B.
Now to your issue im not sure why the internal memory is 0B. either you format your device and see,or restart and check if it changes
Fix From Another Post
I found a solution, hopefully this can help someone in the future
The problem was i installed busybox using an installer which causing some file discrepancies.
To fix it :
1. Install Android Terminal Emulator, this app can be installed even if storage shows full. If you cant install the terminal use Uniflashv2 (open uniflashv2 and connect your device with the debug usb on, go to rom modding, then file manager)
copy /system/xbin/busybox to /system/bin, if busybox is installed the code is "busybox cp /system/xbin/busybox to /system/bin"
power off then power on (reboot)
When I did the above, all my previous apps and setting came back to normal
Source

Cannot install package on rooted device : INSTALL_FAILED_INVALID_URI

This is what I see when I try to install my app on my device (I'm using Android Studio 0.8.2):
Waiting for device.
Target device: samsung-gt_s7500-cf994b04
Uploading file
local path: C:\Users\Administrator\AndroidStudioProjects\Testaqua\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.example.administrator.testaqua
Installing com.example.administrator.testaqua
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.administrator.testaqua"
pkg: /data/local/tmp/com.example.administrator.testaqua
Failure [INSTALL_FAILED_INVALID_URI]
What in the seven hells does this error mean?
[Edited] I installed my app on another rooted device, and it worked; it seems the problem is my device, android studio is running fine.
I get similar error message, I fixed it by passing the absolute path instead of filename, e.g. inside adb shell, this command will shows:
shell#example:/sdcard $ pm install -r -d app-release.apk
pkg: app-release.apk
Failure [INSTALL_FAILED_INVALID_URI]
Change it to absolute path fixed that error message, e.g.:
pm install -r -d /sdcard/app-release.apk
[Second reason]
Another reason is the file not exist. It happen when I interrupt adb push <apk> /sdcard/ by Ctrl+C recently. Re-push apk twice required.
[Third reason]
This error occurred if the apk reside /mnt/runtime/default/<thumb_drive_mounted_directory>, I have to move the apk to /sdcard/ first to install.
From this blog try this :
Change permission of /data/local to rwxrwxrwx (normally it must be rwxrwxrw-)
i.e. grant execution privileges to all users.
symptoms: `
$ adb install xyz.apk
[100%] /data/local/tmp/xyz.apk
pkg: cat
ver: /data/local/tmp/xyz.apk
Failure [INSTALL_FAILED_INVALID_URI]
solution:
check if u have allow installation from unknown sources enabled :)
Finally, I found the reason is dir and file permission.
Android seems to use another user to access the dir and file.
chmod 775 /data/local/tmp/somedir ==> rwxrwx<b>r-x</b><br>
chmod 774 /data/local/tmp/somedir/a.apk ==> rwxrwx<b>r</b>--<br>
The above setting will be OK!
It happened with my Flutter app once. Removing apk file from your-project-name\build\app\outputs\apk\debug and running the app again solved the issue. Before this issue happened, I closed running Flutter app manually from the phone while it was still attached to terminal and running.

Android installing apk to device gives [SEGMENTATION FAULT]

i have a problem. When i am trying to deploy (Debug or Run) my App with the AndroidStudio, i get the following error in the RunLog
Waiting for device.
Target device: samsung-galaxy_nexus-WOVCBUF6BAGENRTO
Uploading file
local path: C:\Users\Abracadabra\Desktop\......\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/xxx.xxx.app
Installing xxx.xxx.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/xxx.xxx.app"
Segmentation fault
It works fine when i try to deploy it to the genymotion VM. It just does not work on my real device. It did work before, but i have cleaned up some folders there with the rootExplorer, for example i deleted a folder called ".Idea". Maybe this was a big mistake?
Is this the reason why it does not work anymore?
By the way, logcat is working fine for the rest of the phone.
Thanks for any help!
P.S. I also installed a fresh android with the CWM recovery tool and wiped all user and cache data -> did not help.
P.P.S I found out, that the apk is in /data/local/tmp on the phone. I can install it manually with the rootExplorer. but debugging is also not possible :/
P.P.P.S: I also have tried "adb install", also gives me segmentation fault.
It seems that copy is possible, but installation not.
Found out the reason. (a quite stupid one)
I forgot to enable "Security Settings -> Unknown Sources"
I encountered the same problem.
Waiting for device.
Target device: samsung-gt_n7100-4df180b77e139fdd
Uploading file
local path: C:\Users\Harshal\AndroidStudioProjects\MyFirstApp\CurrentAffairs\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.softcode.anupreet.currentaffairs
Installing com.softcode.anupreet.currentaffairs
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.softcode.anupreet.currentaffairs"
Segmentation fault
I downloaded the 'Terminal Emulator' app on my device and ran the below two commands, it was a success.
su -o pm install -r "/data/local/tmp/com.softcode.anupreet.currentaffairs"

adb install command is not working

I am trying to install apk via usb is not installing.
Device is detected perfectly .but apk is not installing.
Even i tried with the following command.
D:\Softwares\adt-bundle-windows-x86-20131030\sdk\platform-tools>adb install f:Fi
lth\Sample\bin\Sample.apk
4669 KB/s (277327 bytes in 0.058s)
D:\Softwares\adt-bundle-windows-x86-20131030\sdk\platform-tools>
First, check whether your device is connected or not. If connected, check there is only one device running i.e. mobile or emulator.
Copy your apk file and paste inside the platform-tools folder
D:\Softwares\adt-bundle-windows-x86-20131030\sdk\platform-tools>
now shift+right click on the platform-tools folder -> Open command window here
Then check whether your adb is running successfully or not.Try these command to restart adb
adb kill-server
adb start-server
now you got the message "daemon started successfully"
now just use
adb install Sample.apk
Check out the image if you still have any problem.

Running the app in AVD without opening the Eclipse

I hav created Calcy app in Eclipse. It is running in Emulator properly.
But i want to run it using AVD manager .
the command for installing the app is "adb install Calcy.apk"
but it is giving the message that
C:\Android\android-sdk\platform-tools>adb install Calcy.apk
252 KB/s (39547 bytes in 0.153s)
pkg: /data/local/tmp/Calcy.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
How to resolve this...
If you do not want to uninstall first using adb uninstall your.package.name, then try adb install -r Calcy.apk
Please first remove this app from Emulator then run "adb install Calcy.apk"
Failure [INSTALL_FAILED_ALREADY_EXISTS]
this means the app already installed in the emulator. You can go into Application manager tool and uninstall app from emulator. then again run this command and you will be able to install it.
You need to uninstall the already installed app. then this command will work
you can also remove app with below command
adb uninstall package_name

Categories

Resources