Saturday, February 1, 2014

Enabling Java asserts on an Android device

To enable Java asserts on an Android device, we set debug.assert property to 1. The device does not have to be rooted.
adb shell setprop debug.assert 1
The setting will be lost after the device is rebooted.  We need to re-run the command again to enable Java asserts after the reboot.
To disable Java asserts, we set debug.assert property to 0:
adb shell setprop debug.assert 0

No comments:

Post a Comment