I stumble upon a nice game called Abyssrium yesterday. It allows you to raise all kinds of beautiful fishes and create your own aquarium in a deep ocean. The basic play style is repetitively tapping around and collecting the so called "vitality" to buy everything you need.
Well, if you occasionally program a little, then I guess you can understand the irritation I feel when there's something needs manually "repeating".
So I dug a little and implemented two ways of avoiding such repeating work. A kind notice though, these are cheats and I don't suggest you take it if you are really enjoying the game. Also I'm only working with the android version.
You asked for tapping, so tapping I give you, a lot. There are two ways of doing it.
These two babies catch and replay the low-level input on your device, and here by low-level input we mean taps. Open the terminal on your computer and connect your phone in debug mode. Then use the following command in the terminal.
$ adb shell geteventcode
add device 1: /dev/input/event5 name: "msm8974-taiko-mtp-snd-card Headset Jack" add device 2: /dev/input/event4 name: "msm8974-taiko-mtp-snd-card Button Jack" add device 3: /dev/input/event3 name: "hs_detect" add device 4: /dev/input/event1 name: "touch_dev" add device 5: /dev/input/event0 name: "qpnp_pon" add device 6: /dev/input/event2 name: "gpio-keys"
/dev/input/event1: 0003 0039 00000109 /dev/input/event1: 0003 0035 000002e7 /dev/input/event1: 0003 0036 00000530 /dev/input/event1: 0003 003a 0000003a /dev/input/event1: 0000 0000 00000000 /dev/input/event1: 0003 0039 ffffffff /dev/input/event1: 0000 0000 00000000
/dev/input/event1: 3 57 265 /dev/input/event1: 3 53 743 /dev/input/event1: 3 54 1328 /dev/input/event1: 3 58 58 /dev/input/event1: 0 0 0 /dev/input/event1: 3 57 4294967295 /dev/input/event1: 0 0 00000000
$ adb shell sendevent /dev/input/event1 3 57 265 $ adb shell sendevent /dev/input/event1 3 53 743 $ adb shell sendevent /dev/input/event1 3 54 1328 $ adb shell sendevent /dev/input/event1 3 58 58 $ adb shell sendevent /dev/input/event1 0 0 0 $ adb shell sendevent /dev/input/event1 3 57 4294967295 $ adb shell sendevent /dev/input/event1 0 0 00000000
And that's just one tap, write a simple loop script and you get as many as you want. Here we do tap 100 times as an example.
#!/bin/bash let i=0; while [ $i -le 100 ]; do adb shell sendevent /dev/input/event1 3 57 265 adb shell sendevent /dev/input/event1 3 53 743 adb shell sendevent /dev/input/event1 3 54 1328 adb shell sendevent /dev/input/event1 3 58 58 adb shell sendevent /dev/input/event1 0 0 0 adb shell sendevent /dev/input/event1 3 57 4294967295 adb shell sendevent /dev/input/event1 0 0 00000000 let i=$i+1; done
We can use the dd command to store a bunch of taps and replay them at once. To record, type in your terminal
$ adb shell dd if=/dev/input/event1 of=/sdcard/taps
#!/bin/bash let i=0; while [ $i -le 100 ]; do adb shell dd if=/sdcard/taps of=/dev/input/event1 let i=$i+1; done
After you stop playing the game, it still counts the time and generate vitality for you, and when you come back, the generated vitality at your absence is rewarded to you. However, the game has a bug that it only checks local date and time. So if you change your date/time to a point in the future, the game will directly give you the reward of the corresponding period. The longest period the game will rewards you seems to be only one day though, but it is still much more vitality than you can get by tapping.
The following script will do this job. First you need to disable the "Automatic date & time" option in your system settings. After you start the script, it will switch to the clock app to simulate the user's absence, change the time, switch back and claim the reward, change the time back, then repeat. This script needs your phone to be rooted.
#!/bin/bash adb root while :; do adb shell am start com.google.android.deskclock/com.android.deskclock.DeskClock adb shell date 102910002016.00 sleep 1 adb shell am start com.idleif.abyssrium/com.unity3d.player.UnityPlayerNativeActivity sleep 1 adb shell dd if=/sdcard/Download/record1 of=/dev/input/event1 adb shell date 092810002016.00 done
By Lynxiayel
yulinling.net
29 Sep 2016 29 Sep 2016