In Android Studio, i want run my app in my device but i have an error message:
$ adb shell pm install -r "/data/local/tmp/my.model" /system/bin/sh: pm: can't execute: Permission denied
(It launch perfectly in emulator with 0 error.)
I have a Samsung S3 Mini rooted phone. My phone is visible with command adb devices
.
I have try: run Android Studio in administrator, add ADB
path on environment variable, Remove build folder and rebuild project, but i have always this error.
I guess that's why it does not start my Activity.
$ adb push C:\Users\me\AndroidStudioProjects\Model\app\build\outputs\apk\app-debug.apk /data/local/tmp/my.model
$ adb shell pm install -r "/data/local/tmp/my.model"
/system/bin/sh: pm: can't execute: Permission denied
$ adb shell am start -n "my.model/my.model.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "my.model/my.model.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=my.model/.MainActivity }
Error type 3
Error: Activity class {my.model/my.model.MainActivity} does not exist.
Error while Launching activity
Where is the issue? Thank you.