How to disable SIGABRT when debugging Android app?

-1

I'm trying to debug my app's UI misbehaving, but for some god awful reason the app gets killed after ~15 seconds of me shifting trough the breakpoints, how do I get rid of this behaviour it's making me insane.

A/libc: Fatal signal 6 (SIGABRT) at 0x00000274 (code=0), thread 25754 (getapp.debug)

I'm using LineageOS 11 on LG D605 and Android Studio 3.2 Canary 6, I'm totally willing to recompile whole Android system if I get rid of this absolutely infuriating behaviour when debugging.

android
debugging
sigabrt
asked on Stack Overflow Mar 19, 2018 by Avamander

2 Answers

1

You can select debug app in Developer Option.
Alternatively, You can increase KEY_DISPATCHING_TIMEOUT or INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT in ActivityManagerService.java

// How long we allow a receiver to run before giving up on it.
static final int BROADCAST_FG_TIMEOUT = 10*1000;
static final int BROADCAST_BG_TIMEOUT = 60*1000;
// How long we wait until we timeout on key dispatching.
static final int KEY_DISPATCHING_TIMEOUT = 5*1000;
// How long we wait until we timeout on key dispatching during instrumentation.
static final int INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT = 60*1000;

To build and push service module:

make services
adb push $ANDROID_PRODUCT_OUT/system/framework/services.jar system/framework/
adb push $ANDROID_PRODUCT_OUT/system/framework/oat/arm/services.odex system/framework/oat/arm/
[you need reboot] adb reboot or manually reboot
answered on Stack Overflow May 29, 2018 by You Kim
0

From Android Studio's debugger window one can select "View breakpoints" (Ctrl+Shift+8) and from there set "Suspend [X]: [O] All" (threads), Android now allows a reasonable amount of time to be spent using the debugger, instead of the previous ~15sec.

answered on Stack Overflow Mar 20, 2018 by Avamander • edited Mar 20, 2018 by Developer Guy

User contributions licensed under CC BY-SA 3.0