I'm trying to debug a Huawei Honor phone, running Android 6.0.1, with USB debug enabled.
Trying to ndk-gdb on any Android device will always give me:
Error: unable to connect to device.
Remote connection closed
A little before this I also see:
warning: Selected architecture aarch64 is not compatible with reported target architecture arm
warning: Architecture rejected target-supplied description
Note that I had to use sudo
like this:
sudo ndk-gdb --force --verbose --launch
otherwise under gdb I would get
Unable to find Mach task port for process-id 44415: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
Then under gdb, running the executable with run
give me:
(gdb) run
Starting program: /path/to/my/ndk-project-root/obj/local/arm64-v8a/system/bin/app_process64
During startup program terminated with signal SIG113, Real-time event 113.
From this one: gdb on macOS Sierra 10.12.4
I gathered that gdb has issues with macOS Sierra. Am I hitting the same issue with ndk-gdb?