Hi,
I just want to debug my jni application. I found the script 'ndk-gdb' in the documentation, but when I start it, the following error occurs:
run-as: Package 'com.android.mypackage' is unknown
The path is correct, the app is installed, it runs correctly, compiled with debug, and I have no other problem but starting the debugger.
$ adb shell cat /data/system/packages.list
/system/bin/sh: cat: /data/system/packages.list: Permission denied
$ adb shell ls -l /data/system/packages.list
-rw-rw---- system package_info 33709 2014-09-16 08:14 packages.list
I found this problem in the forums: there is an access right problem about the file '/data/system/packages.list': it is set to 660 instead of 664. But it was long time ago in 4.2.2 and it has not been resolved yet in 4.4.2.
If 'run-as' does not work, I cannot start gdbserver because it has no rights to access my application.
Some solutions suggest to root the device but it is risky and I do not want to do it. I just want to debug my application. Currently, all possible solutions lead me to the 'run-as' problem. Is it possible anyway?
I have Samsung Galaxy S4
Thanx in advance
Gyorgy Kovesdi