On Jun 1, 5:38 pm, Ubuntu guy <
sam_...@yahoo.co.in> wrote:
> Could you let me know as to how to hit a process/thread with fatal
> signal?
% adb shell kill -6 <pid>
% adb shell kill -6 <pid>
That sends a pair of abort signals to your process of choice. "adb
shell ps -t" will show the process / thread IDs.
This assumes you can execute shell commands as root, or at least as
the same UID as the process you want to kill.
On relatively recent versions of Android, you can call
dalvik.system.VMDebug.crash():
/**
* Crashes the VM. Seriously. Dumps the interpreter stack trace
for
* the current thread and then aborts the VM so you can see the
native
* stack trace. Useful for figuring out how you got somewhere
when
* lots of native code is involved.
*
* @hide
*/
public static native void crash();
Note this isn't a public API in the SDK.