Reputation: 86105
When I run my project with apportable debug
on Android Emulator, it spits this error and doesn't work.
Attaching to pid 1405
Attached; pid = 1405
Can't open socket: Permission denied.
Detaching process(es): 1405
1003 KB/s (9592 bytes in 0.009s)
GNU gdb (GDB) 7.5.1.20130212-cvs
Apportable Edition
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin11.4.2 --target=arm-elf-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
/Users/Eonil/.apportable/SDK/Build/android-armeabi-debug/EonilGraphicsRunningTester/gdb/gdb.setup:5: Error in sourced command file:
Remote connection closed
(gdb)
I think I need some permission. What should I do to get debugging?
Upvotes: 1
Views: 1137
Reputation: 371
Using the emulator is supported but not suggested. To do this use the following environment modifiers; RUN_AS=no apportable debug
This can also apply for certain devices that have root shell by default.
The major issue with using the emulator is that the OpenGL performance/behavior is not indicative of normal devices. Additionally we have found discrepancies with lifecycle behavior as well that it is just easier to use a real device.
Upvotes: 1
Reputation: 86105
This is because simply Android Emulator doesn't support any simple direct debugging. Because we cannot put a USB device on emulator. The only solution was buying a physical device.
Upvotes: 0
Reputation: 64477
Make sure USB Debugging is enabled under Developer Options on your Android device.
Note that this setting may be in a different location depending on the device. Or even hidden, as is the case with Google Nexus.
Upvotes: 0