1

I use ADB tool and I want to install apk on my emulator. So I use this command

adb install /home/jody/myexample.apk

and I got this error

2841 KB/s (242867 bytes in 0.083s)
pkg: apk
ver: /data/local/tmp/concolicexample.apk
Failure [INSTALL_FAILED_INVALID_URI]

I search this error and from https://mobiledevstories.wordpress.com/2013/06/03/android-adb-install_failed_invalid_uri/ I found out I should The solution is to change permissions to directory but the problem is I don't know where is /data/local/tmp and where should I change permissions? I should mention that I use genymotion emulator on Linux. please help me. Sorry if this problem is really primitive. I just begin to use adb.

jody abbot
  • 303
  • 2
  • 15

1 Answers1

2

There are more people with your problem here: Cannot install package on rooted device : INSTALL_FAILED_INVALID_URI

I think that your device needs to be rooted for this to work, or you won't have sufficient rights. I don't have a rooted device here so don't remember if all steps are necessary:

So the /data/local/ directory is on the Android device, so using adb you need to access the device.

1) adb remount (This might not be necessary, this gives you more access rights to the device) 2) adb shell <- opens a shell on the device instead of your computer. 3) chmod 777 /data/local/ 4) chmod 777 /data/local/tmp/

Hopefully it works for you!

Community
  • 1
  • 1
  • Thanks for your answer but I use genymotion emulator. Wher I can find this folder in genymotion emulator? – jody abbot Apr 30 '16 at 16:41
  • Ah, yes, apologies I missed that you said emulator. My experience with Genymotion is very limited. So from my knowledge you got two options: Genymotion comes with the adb tools, you need to find where these are. or: https://docs.genymotion.com/Content/02_Application/Configuring_Genymotion/ADB.htm and you tell Genymotion to use the adb tools that you are already using. This might help: http://stackoverflow.com/questions/25739957/how-to-reboot-android-device-emulator-in-genymotion – Henrik Gyllensvärd Apr 30 '16 at 16:46