To enable Java asserts on an Android device, we set debug.assert property to 1. The device does not have to be rooted.
To disable Java asserts, we set debug.assert property to 0:
adb shell setprop debug.assert 1The 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