Android Studio doesn't have the permission to install apk copied on /data/local/tmp

回眸只為那壹抹淺笑 提交于 2019-12-25 08:44:38

问题


While running my android application on my device Android Studio shows the device with its name properly and while selecting the device to run it gives the error:-

Installing com.example.android.borderlessbuttons DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.android.borderlessbuttons" pkg: /data/local/tmp/com.example.android.borderlessbuttons Failure [INSTALL_FAILED_INVALID_APK]

and now the device name changed to ??????? implying permission denied or not identified. Again after doing,

adb kill-server sudo adb start-server adb devices

the device is listed again now.

I believe the problem is in my custom ROM. My custom ROM for some reason changed the permission for the directory /data/local/tmp. The apk is copied but not able to run/install on device.

So does anybody knows the default permission for this directory to copy and install/run applications from Android Studio??

Thanks in advance.


回答1:


This did the magic. The problem was of course the permission for /data/local/tmp directory.



来源:https://stackoverflow.com/questions/28722650/android-studio-doesnt-have-the-permission-to-install-apk-copied-on-data-local

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!