Here is a script that automates opening Instagram and double-tapping the first post (liking it). #!/bin/bash # ADB Enable Automator - Instagram Liker PACKAGE="com.instagram.android" ACTIVITY="com.instagram.mainactivity.MainActivity"
adb shell settings put secure enabled_accessibility_services your.package.name/your.accessibility.service adb shell settings put secure accessibility_enabled 1 Let’s say you are using the popular uiautomator library with Python on a rooted/ADB-connected device. You need to enable the UiAutomator test service. adb enable automator
echo "Tapping the center of the screen to focus video..." adb shell input tap 540 1300 # Adjust coordinates based on your screen resolution Here is a script that automates opening Instagram
#!/bin/bash adb shell screenrecord /sdcard/bug_replay.mp4 --time-limit 10 & Clear previous logs adb logcat -c Perform automated actions adb shell input swipe 300 1000 300 300 # Swipe down sleep 2 adb shell input tap 540 500 # Tap a button sleep 1 adb shell input keyevent KEYCODE_BACK Stop recording and pull files sleep 12 adb pull /sdcard/bug_replay.mp4 adb logcat -d > bug_logs.txt echo "Tapping the center of the screen to focus video
adb shell dumpsys package | grep -i accessibility Android 11 restricts what apps can see. Your automator might not "see" other apps. Fix: Grant the QUERY_ALL_PACKAGES permission via ADB: