Using the adb shell I can input text on the phone. But that does not work, if the phone's display is off. I have to press the home button first and unlock the screen for this to work. How can I automate this with the adb shell without adding additional code on the device?
adb shell input keyevent KEYCODE_HOME
Unfortunately, that does not work at all.