I explicitly set my app debuggable to true in the AndroidManifest.xml
and deployed it to my device through eclipse
, but I still get the
run-as: Package 'com.mypackage' is not debuggable
when I run the command:
adb -d shell 'run-as com.mypackage cat /data/data/com.mypackage/databases/mydb.db > /sdcard/mydb.db'
What do I need to change to be able to debug my application?
Please go to Android system settings, find storage section, click it. From the storage page, find "Files" item, and click it. If there are multiple file managers to open it, please make sure to choose "Open with Files" to open it, which is the system file manager app.
Are you using release apk
or debug apk
for testing? If you use release version of the apk
you wouldn't get the access. I would suggest you to build the application directly from Android Studio (remember that your Build Variant must be debug
in Android Studio) and try using the command run-as "your.package.name"
If you are sure you built with and AndroidManifest.xml
with debuggable=true
, then uninstalling the package may work (caution: this will also wipe this apps' data).
adb uninstall your.package.name
It seems that AndroidManifest.xml is sticky, for reasons I don't fully understand. I would encounter this case when I had a non-debug APK as my initial install, and then sideload a debuggable APK later.
Like @ prudhvi said, this an be solved by settings build variant to debug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With