Skip to content

Instantly share code, notes, and snippets.

@nopjia
Last active January 11, 2018 23:23
Show Gist options
  • Save nopjia/88a1257514dfee2e3ecf7bbb6a01896e to your computer and use it in GitHub Desktop.
Save nopjia/88a1257514dfee2e3ecf7bbb6a01896e to your computer and use it in GitHub Desktop.
ADB bash script for auto-clicking through the date settings exploit in Magikarp Jump
# Magikarp Jump
# Date Settings Exploit Automated Clicker
#
# Instructions:
#
# Connect Android USB Debugging and run in "adb shell".
# Open Android Settings to the Date page and have it be the most recent app.
# Adjust values marked "VARIABLE" accordingly.
# Adjust the number of repetitions as you like.
#
# It is best to be on Airplane Mode to prevent notifications.
XM=540
XL=316
XR=758
YM=960 # screen mid
YB=1765 # bottom
YD=1310 # dialog
YD2=1445 # dialog lower
function doClick() {
echo -e "click\t"$1","$2"\t"$3
input tap $1 $2
}
function repeatRoutine() {
local COUNTER=1
while [ $COUNTER -lt $1+1 ]; do
echo Iteration $COUNTER"/"$1...
let COUNTER=COUNTER+1
$2
done
}
function doDateSettings() {
input keyevent 187; sleep 0.5; input tap $XM $YM; sleep 1;
input tap 150 350 # disable auto date
input tap 150 800 # click "Set date"
input tap 620 1139 # click date VARIABLE
input tap 854 1650 # click OK
sleep 1
input keyevent 187; sleep 0.5; input tap $XM $YM; sleep 1;
sleep 2 # wait in-game
input keyevent 187; sleep 0.5; input tap $XM $YM; sleep 1;
input tap 150 350 # enable auto date
sleep 5 # wait a bit for setting to kick in
input keyevent 187; sleep 0.5; input tap $XM $YM; sleep 1;
}
function doDateRoutine() {
doDateSettings
# click the animals, VARIABLE!
doClick 1000 755 "Gardevoir"
doClick 1000 1255 "Rowlet"
doClick 65 755 "Meowth"
sleep 5
doClick $XM $YD "OK"
doClick $XM $YD "OK"
doClick $XM $YD "OK"
sleep 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment