The other major drawback to using keyevents is if the UI of the application is changed, the keyevents will no longer perform the correct function. AUDIOPHILESHELL.EXE The AudiophileShell is a launcher tool which makes handling in core mode much easier. (current solution: open MediaGallery, send keyevents, similar to above)ģ.Change the volume (current solution: send volume-up button keyevents)Ĥ.Change the display timeout (current solution: open sound & display settings, send keyevents)Īs before, these all require the screen to be on and unlocked. Current solution: adb shell am start -n /.MusicBrowserActivityĪdb shell input keyevent 56 & adb shell input keyevent 66 & adb shell input keyevent 67 & adb shell input keyevent 19Īdb shell input keyevent 23 & adb shell input keyevent 21Īdb shell input keyevent 19 & adb shell input keyevent 19 & adb shell input keyevent 19 & adb shell input keyevent 22 & adb shell input keyevent 22 & adb shell input keyevent 23 & adb shell input keyevent 23Ģ.Play a video. No matter if you where in GUI or core before, ServiceTool will automatically restore the right default shell for you. Just launch it again, select the shell replacement feature and select 'R' for 'Restore default shell'. Other things I'd like to do if possible:ġ.Play an mp3 and set it on repeat. See more details about this here -> Of course a shell replacement can also easily be reversed using the ServiceTool. Also, the tasks I want to do are much broader than this simple example. There are quite a few drawbacks to this method, primarily that the screen has to be on and unlocked. Currently, the best I can do is launch the Wireless & network settings menu and then use input keyevents to click Airplane mode: adb shell am start -a _MODE_SETTINGSĪdb shell input keyevent 19 & adb shell input keyevent 23 bat file) that will be capable of more than simply opening an application or sending an input keyevent (button press).įor instance, I want to toggle Airplane Mode on or off from the command line.
How do I use adb to perform some automated tasks on my android phone? I need to find commands that I can issue from the command line (ideally, using a.