Search code examples
androidsamsung-mobile

Hibernating Samsung S3 using commands


I'm working on an android app related to hibernation and I want to test it using adb commands. I tried searching but was unable to find how to hibernate/unhibernate Samsung Galaxy S3 using command line. Need help with it.


Solution

  • If by "hibernate", you mean lock/unlock, you should be able to simulate the power button(KEYCODE_POWER):

    adb shell input keyevent 26