79680182

Date: 2025-06-26 08:55:40
Score: 0.5
Natty:
Report link

this is custom rom, so that there is not any android official api to change the feature.

serveral hours later, I got the solution :

  1. run adb shell settings list system, get all setting keys and values;

  2. change 'Enable true hibernation', and run the same command, compare values;

  3. get the feature key is 'systemsleep_open';

  4. then run code in app activity

    try {
        Runtime.getRuntime().exec("settings put system systemsleep_open 1")
    } catch (e: Exception) {
        e.printStackTrace()
    }
    
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: JoShin