In Android 5.0 and greater, app_process is now a symlink to app_process32 (on 32-bit devices, presumably this would be app_process64 on 64-bit). In the gdb target output we can see that pulling /system/bin/app_process fails, which is then followed by an attempt to pull /system/bin/app_process32. Unfortunately in this case `app_process` file path is the one written to gdb.env which results in a failure when executing gdb.
_Gdb target output:
XA master/ 1e7c3b859961
It looks like my initial description isn't entirely correct after further investigation on a couple different Android 5.0+ devices. I am able to `adb pull /system/bin/app_process` on everything but this samsung device.
does the samsung device pull the app_process32 ok?
I'm thinking of adding a check to see if app_process32 exists before writing that to the gdb.env file and if it doesn't then check for app_process. And then if neither exist log an error.
not sure that would be the correct order though, check 32 first or the other way around.
Yes in this case the device did pull the app_process32 file without issue. I was also then able to manually edit my gdb.env file to replace the 'app_process' string with 'app_process32' and continue debugging.
In the log I posted it shows the attempt to pull app_process is occurring _before_ app_process32, however I'm not sure if this consistent.
Executing: .../adb pull /system/bin/app_process /Users/petercollins/Downloads/Test/Test//gdb-symbols failed to copy '/system/bin/app_process' to '/Users/petercollins/Downloads/Test/Test//gdb-symbols/app_process': Permission denied
Executing: ../adb pull /system/bin/app_process32 /Users/petercollins/Downloads/Test/Test//gdb-symbols
595 KB/s (13588 bytes in 0.022s)
Fixed in monodroid/master/e6a53420