Mastering ADB Input Commands¶
In this ASCII art¶
(500,0)
marks the top-right corner of the screen.(0,2300)
marks the bottom-left corner of the screen.(100,1150)
marks a location towards the left-middle of the screen.(250,1150)
marks a location at the middle of the screen.(1000,1000)
marks a location a bit lower but more towards the right side.
Origin (0, 0)
+----------------------------------+
| Status Bar (500,0) X |
|----------------------------------+
| |
| |
| |
| (100,1150) O |
| |
| |
| |
| |
| | ---- O (250,1150)
| |
| |
| |
| |
| || --- Power Button
| |
| |
| |
| |
| |
| |
| || ---- O (1000,1000)
| |
| |
| Antenna |
|(0,2300) X |
------------------------------------ ---- Y(2300)
100 300 500
New Tests after 2024-08-29¶
Power On -> Swipe Screen -> Unlock Lockscreen -> Unlocked
This is for unlocking the devivice as fast as possible without any sleep requirements
Added before 2024-08-29¶
To tap on the center of the screen¶
To tap on the Power button¶
To tap on the top-right corner of the screen¶
To tap on the bottom-left corner of the screen¶
To tap on the middle-left of the screen¶
To tap on the middle-right of the screen¶
To simulate a swipe from the middle of the screen to the top (useful for scrolling)¶
To simulate a swipe from the middle of the screen to the bottom (also for scrolling)¶
To simulate a long press at the middle of the screen (for context menus or similar functionality)¶
To simulate a pinch gesture (zoom out), we can use two swipe commands that start from different points and converge in the middle of the screen¶
To simulate a spread gesture (zoom in), we can use two swipe commands that start from the same point in the middle of the screen and move towards different ends¶
Tap on the top-left corner of the screen¶
Tap on the bottom-right corner of the screen¶
Simulate a swipe from the bottom to the top of the screen (reverse scrolling)¶
Simulate a swipe from top to the bottom of the screen (reverse scrolling)¶
Simulate a long press at the top-left of the screen¶
Simulate a long press at the bottom-right of the screen¶
Simulate a drag gesture from the middle of the screen to the top-right¶
To simulate a drag gesture from the middle of the screen to the bottom-left¶
To tap on a point in the upper-middle section of the screen¶
To tap on a point in the lower-middle section of the screen¶
To simulate a swipe diagonally from the top-left to the bottom-right of the screen¶
To simulate a swipe diagonally from the top-right to the bottom-left of the screen¶
To simulate a swipe diagonally from the bottom-left to the top-right of the screen¶
To simulate a swipe diagonally from the bottom-right to the top-left of the screen¶
To simulate a swipe from left to right across the screen (useful for going to the next item in a carousel)¶
To simulate a swipe from right to left across the screen (useful for going to the previous item in a carousel)¶
To simulate a tap on the "Back" button area (assuming it's at the bottom-left of the screen)¶
To simulate a tap on the "Home" button area (assuming it's at the bottom-middle of the screen)¶
To simulate a tap on the "Recent Apps" button area (assuming it's at the bottom-right of the screen)¶
To simulate a swipe from the "Recent Apps" button to the middle of the screen (useful for opening the recent apps view)¶
To simulate a swipe from the top to the middle of the screen (useful for pulling down the notification shade)¶
To simulate a swipe from the middle to the top of the screen (useful for pushing up the notification shade)¶
To simulate a long press on the "Home" button (useful for triggering Google Assistant or any other bound service)¶
To simulate a tap on the upper-middle-left of the screen (might be useful for some apps)¶
To simulate a tap on the upper-middle-right of the screen (might be useful for some apps)¶
To simulate a tap on the lower-middle-left of the screen (might be useful for some apps)¶
To simulate a tap on the lower-middle-right of the screen (might be useful for some apps)¶
To simulate a long press in the upper-middle-left of the screen¶
To simulate a long press in the upper-middle-right of the screen¶
To simulate a long press in the lower-middle-left of the screen¶
To simulate a long press in the lower-middle-right of the screen¶
To simulate a diagonal swipe from upper-middle-left to lower-middle-right of the screen¶
To simulate a diagonal swipe from upper-middle-right to lower-middle-left of the screen¶
To simulate a diagonal swipe from lower-middle-left to upper-middle-right of the screen¶
To simulate a diagonal swipe from lower-middle-right to upper-middle-left of the screen¶
To simulate a tap on the center of the status bar (useful for some quick settings)¶
To simulate a tap on the center of the antenna area (might be useful for some games or full-screen apps)¶
To simulate a swipe from the center of the antenna area to the center of the screen (useful for some games or full-screen apps)¶
To simulate a swipe from the center of the status bar to the center of the screen (useful for pulling down the notification shade)¶
To simulate a "zig-zag" swipe from the top-left to the bottom-right of the screen¶
To simulate a "zig-zag" swipe from the top-right to the bottom-left of the screen¶
To simulate a pinch gesture at the top of the screen¶
To simulate a spread gesture at the top of the screen¶
To simulate a pinch gesture at the bottom of the screen¶
To simulate a spread gesture at the bottom of the screen¶
To simulate a complex gesture (like drawing an "X" from corner to corner)¶
To simulate a swipe from left to right across the screen (useful for going to the next item in a carousel)¶
To simulate a swipe from right to left across the screen (useful for going to the previous item in a carousel)¶
To simulate a tap on the "Back" button area (assuming it's at the bottom-left of the screen)¶
To simulate a tap on the "Home" button area (assuming it's at the bottom-middle of the screen)¶
To simulate a tap on the "Recent Apps" button area (assuming it's at the bottom-right of the screen)¶
To simulate a swipe from the "Recent Apps" button to the middle of the screen (useful for opening the recent apps view)¶
To simulate a swipe from the top to the middle of the screen (useful for pulling down the notification shade)¶
To simulate a swipe from the middle to the top of the screen (useful for pushing up the notification shade)¶
To simulate a long press on the "Home" button (useful for triggering Google Assistant or any other bound service)¶
To simulate a tap on the upper-middle-left of the screen (might be useful for some apps)¶
To simulate a tap on the upper-middle-right of the screen (might be useful for some apps)¶
To simulate a tap on the lower-middle-left of the screen (might be useful for some apps)¶
To simulate a tap on the lower-middle-right of the screen (might be useful for some apps)¶
To simulate a long press in the upper-middle-left of the screen¶
To simulate a long press in the upper-middle-right of the screen¶
To simulate a long press in the lower-middle-left of the screen¶
To simulate a long press in the lower-middle-right of the screen¶
To simulate a diagonal swipe from upper-middle-left to lower-middle-right of the screen¶
To simulate a diagonal swipe from upper-middle-right to lower-middle-left of the screen¶
To simulate a diagonal swipe from lower-middle-left to upper-middle-right of the screen¶
To simulate a diagonal swipe from lower-middle-right to upper-middle-left of the screen¶
To simulate a tap on the center of the status bar (useful for some quick settings)¶
To simulate a tap on the center of the antenna area (might be useful for some games or full-screen apps)¶
To simulate a swipe from the center of the antenna area to the center of the screen (useful for some games or full-screen apps)¶
To simulate a swipe from the center of the status bar to the center of the screen (useful for pulling down the notification shade)¶
To simulate a "zig-zag" swipe from the top-left to the bottom-right of the screen¶
To simulate a "zig-zag" swipe from the top-right to the bottom-left of the screen¶
To simulate a pinch gesture at the top of the screen¶
To simulate a spread gesture at the top of the screen¶
To simulate a pinch gesture at the bottom of the screen¶
To simulate a spread gesture at the bottom of the screen¶
To simulate a complex gesture (like drawing an "X" from corner to corner)¶
To simulate a long press in the middle and then a swipe to the right (useful for triggering slide menus)¶
To simulate a long press in the middle and then a swipe to the left (useful for triggering slide menus)¶
To simulate a swipe from the center of the screen to the "Back" button (might be useful for some full-screen apps)¶
To simulate a swipe from the center of the screen to the "Home" button (might be useful for some full-screen apps)¶
To simulate a swipe from the center of the screen to the "Recent Apps" button (might be useful for some full-screen apps)¶
To simulate a long press on the top-middle of the screen (might be useful for some apps)¶
To simulate a long press on the bottom-middle of the screen (might be useful for some apps)¶
To simulate a pinch gesture in the left-half of the screen¶
To simulate a spread gesture in the left-half of the screen¶
To simulate a pinch gesture in the right-half of the screen¶
To simulate a spread gesture in the right-half of the screen¶
To simulate a swipe in the shape of a square (might be useful for some games or apps)¶
adb shell input swipe 125 875 375 875 & adb shell input swipe 375 875 375 1425 & adb shell input swipe 375 1425 125 1425 & adb shell input swipe 125 1425 125 875
To simulate a tap on the center of the screen with a delay (useful for timed inputs)¶
To simulate multiple taps on the center of the screen with a delay between each (useful for timed inputs)¶
adb shell input tap 250 1150; sleep 1; adb shell input tap 250 1150; sleep 1; adb shell input tap 250 1150
To simulate a swipe from the middle to the left of the screen (useful for some slide menus)¶
To simulate a swipe from the middle to the right of the screen (useful for some slide menus)¶
To simulate a swipe from the left to the middle of the screen (useful for some slide menus)¶
To simulate a swipe from the right to the middle of the screen (useful for some slide menus)¶
To simulate a swipe from the "Back" button to the "Home" button (useful for some full-screen apps)¶
To simulate a swipe from the "Home" button to the "Recent Apps" button (useful for some full-screen apps)¶
To simulate a swipe from the "Recent Apps" button to the "Home" button (useful for some full-screen apps)¶
To simulate a swipe from the "Home" button to the "Back" button (useful for some full-screen apps)¶
To simulate a long press on the "Recent Apps" button (useful for some services)¶
bash
adb shell input swipe 450 2250 450 2250 2000
bash