问题
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