Fixed
Status Update
Comments
el...@gmail.com <el...@gmail.com> #2
See my answer here: http://stackoverflow.com/questions/26530675/ndk-debugging-ndk-gdb-fails-to-pull-app-process-who-and-when-creates-the-app-p/28200279#28200279
I've added recommended changes to the NDK here:http://pastebin.com/YfxNs06U .
The change is as follows:
# Get the app_server binary from the device
APP_PROCESS=$APP_OUT/app_process
if [ "$API_LEVEL" -lt "21" ] ; then
run adb_cmd pull /system/bin/app_process `native_path $APP_PROCESS`
log "Pulled app_process from device/emulator to $APP_PROCESS"
else
run adb_cmd pull /system/bin/app_process32 `native_path $APP_PROCESS`
log "Pulled app_process32 from device/emulator to $APP_PROCESS"
fi
This is perhaps a more elegant solution to the error-checking version from OP.
My reasoning for not keeping the app_process32 name when pulling to the development machine is so that a single debug config can be maintained in Eclipse for debugging api21 and <api21 devices.
I've added recommended changes to the NDK here:
The change is as follows:
# Get the app_server binary from the device
APP_PROCESS=$APP_OUT/app_process
if [ "$API_LEVEL" -lt "21" ] ; then
run adb_cmd pull /system/bin/app_process `native_path $APP_PROCESS`
log "Pulled app_process from device/emulator to $APP_PROCESS"
else
run adb_cmd pull /system/bin/app_process32 `native_path $APP_PROCESS`
log "Pulled app_process32 from device/emulator to $APP_PROCESS"
fi
This is perhaps a more elegant solution to the error-checking version from OP.
My reasoning for not keeping the app_process32 name when pulling to the development machine is so that a single debug config can be maintained in Eclipse for debugging api21 and <api21 devices.
el...@gmail.com <el...@gmail.com> #3
Alternatively: set the device binary name in a variable, changing based on API level.
# Get the app_server binary from the device
APP_PROCESS=$APP_OUT/app_process
APP_PROCESS_DEVICE=app_process32
if [ "$API_LEVEL" -lt "21" ] ; then
APP_PROCESS_DEVICE=app_process
fi
run adb_cmd pull /system/bin/$APP_PROCESS_DEVICE `native_path $APP_PROCESS`
log "Pulled $APP_PROCESS_DEVICE from device/emulator to $APP_PROCESS"
# Get the app_server binary from the device
APP_PROCESS=$APP_OUT/app_process
APP_PROCESS_DEVICE=app_process32
if [ "$API_LEVEL" -lt "21" ] ; then
APP_PROCESS_DEVICE=app_process
fi
run adb_cmd pull /system/bin/$APP_PROCESS_DEVICE `native_path $APP_PROCESS`
log "Pulled $APP_PROCESS_DEVICE from device/emulator to $APP_PROCESS"
an...@google.com <an...@google.com> #4
But at what point does it determine if it should use app_process64 instead?
ra...@gmail.com <ra...@gmail.com> #5
I guess that's up to the NDK team to determine what the binary will be
named for each api level. Hopefully this issue being raised means we can
expect a fix to encompass all future names of this binary, and that the
ndk-gdb script will work seamlessly for all api levels.
Jacob Kwitkoski
named for each api level. Hopefully this issue being raised means we can
expect a fix to encompass all future names of this binary, and that the
ndk-gdb script will work seamlessly for all api levels.
Jacob Kwitkoski
Description