Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android package not debuggable

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?

like image 682
Green Ho Avatar asked Nov 14 '12 19:11

Green Ho


People also ask

How do you access data data?

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.


3 Answers

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"

like image 111
Prudhvi Avatar answered Sep 18 '22 01:09

Prudhvi


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 image 25
Michael Chinen Avatar answered Sep 18 '22 01:09

Michael Chinen


Like @ prudhvi said, this an be solved by settings build variant to debug

enter image description here

like image 44
O-9 Avatar answered Sep 21 '22 01:09

O-9