Set of user editable scripts to control android apps.
- Scripting with a simple JSON language
- Device agnostic, the script is separate from the view
- Logging, it prints what it's doing
- Editing, built in method to make or edit views
- Extensible, views are built upon other views
- Screen saver to stop burn-in
- Have the right phone/resolution
- Samsung S7 (1080P)
- More devices are possible, but I only have a limited # of phones. If I was provided screen shots for every needed screen, I could build another definition.
- Install Java 8
- http://www.oracle.com/technetwork/java/javase/downloads/index.html
- JRE is to only run the app
- SDK lets you develop your own code, or build from source
- Install a way to communicate with your Android device
- Android Tools (Basic) Use this just to connect
- https://developer.android.com/studio/releases/platform-tools.html
- Android Studio (Advanced) This lets you also deploy from src, the helper app
- https://developer.android.com/studio/index.html
- Get the helper app, and install it onto your device
- Released version
- https://github.com/mgatelabs/PhonePiperHelper/releases
- Build from source
- https://github.com/mgatelabs/PhonePiperHelper
- Get this app
- Release version
- https://github.com/mgatelabs/PhonePiper/releases
- Build from source (Use Intellij Community edition)
- Make sure ADB works
- Plug in your device
- Enable developer mode
- https://developer.android.com/studio/debug/dev-options.html
- Open a cmd window
- type "adb device-state", press enter and see what is returned. If it's working you should see "device"
- Run the app
- From Source with JetBrains IntelliJ
- you need to setup a Java 8 configuration to execute com.mgatelabs.piper.Runner
- Set the program argument to SERVER
- Set the VM argument to -Dserver.port=8090
- Change the working directory to the working folder included with the source
- From the zip release
- Run server.bat
- From Source with JetBrains IntelliJ
- Open your browser to http://localhost:8090/piper
- Install Java 8
- http://www.oracle.com/technetwork/java/javase/downloads/index.html
- JRE is to only run the app
- SDK lets you develop your own code, or build from source
- Download a released version
- Unzip the release
- Get the helper app, and install it onto Memu
- Released version
- https://github.com/mgatelabs/PhonePiperHelper/releases
- Build from source
- https://github.com/mgatelabs/PhonePiperHelper
- If you're running the latest version, open Settings > Network and change NAT to Bridge
- If your version does not have bridging as an option please see Memu notes in the bottom
- Run the helper app on Memu, minimize the app and open FFBE
- Open the extracted PhonePiper release and run server.bat
- Open your browser to http://localhost:8090/piper
- Click the create new configuration button
- Set the name to MEMU Farming
- The Device is either MEMU-1080 or MEmu7-1080.
- Use MEMU-1080 if you're on the default install.
- If it's android 7.0 or beyond use MEmu7-1080.
- If you choose the wrong one, the app may appear to lockup
- Set the View to 1080x1920
- Set the Script to farming
- If you have more scripts to load press the + button to choose another. Script order does matter.
- Set the IP
- NAT Mode: 127.0.0.1
- Bridge Mode: See helper app for IP address
- Set the ADB variable
- For me it was C:\Program Files\Microvirt\MEmu\adb
- Direct, leave this blank, unless you have multiple instances of MEmu running. It would typically be the IP:PORT of the instance or serial number.
- Connection
- NAT Mode: USB
- Bridge Mode: WIFI
- Throttle is used to slow down processing. Set it to 25 for a faster run, but it will work harder.
- Hit save config so you don't lose what you typed.
- All settings are saved to your local browser
- Tap Run Script
- If everything is good you should be on the Run tab
- Before you start anything visit the Variables tab and adjust a few things. Also always hit update after changing something.
- Set your Player Level for energy calculation purposes
- Disable Raid & Arena, you don't have scripts for those yet.
- Choose your Farm Party, the unit group that you TMR farm with.
- Goto the setting tab and see if Update Preview does anything. If you get a image back of the screen, you have a connection to the helper app.
- It's time to start, from the home screen navigate to the earth shrine menu. Later you won't need to do this.
- From the Run tab press Play/Pause. And it should start to TMR farm.
For running on an Raspberry PI
- git clone https://github.com/mgatelabs/PhonePiper.git
- cd PhonePiper
- mvn clean compile package
- cd working
- java -Dserver.port=8090 -jar ../target/phone-piper.jar server
For Bridge routing there is no additional configuration needed
For NAT routing you need to do the following.
- Make sure MEmu is closed
- Edit the file \MEmu install directory\MemuHyperv VMs\MEmu\MEmu.memu
- And these lines under Adapter[slot=0], NAT
<Forwarding name="ADB" proto="1" hostip="127.0.0.1" hostport="21503" guestip="10.0.2.15" guestport="5555"/>
<Forwarding name="PPH" proto="1" hostip="127.0.0.1" hostport="8080" guestip="10.0.2.15" guestport="8080"/>
This will include instructions for setting up Phone Piper to run on a Raspberry PI. You need to have working headless Raspberry PI before attempting to get Phone-Piper working.
First thing you need to do is insure everything is up to date
sudo apt-get update
Next you need to upgrade your system
sudo apt-get upgrade
Now reboot it for all changes to take effect
sudo reboot
sudo apt-get install wget git-core
sudo apt-get install -y android-tools-adb
sudo apt-get install oracle-java8-jdk
sudo apt-get install maven
Goto the root folder
cd ~
Create a folder for the scripts (Example for FFBE)
mkdir ffbe
Clone the latest scripts
git clone [email protected]:mgatelabs/PhonePiperFFBE.git ./ffbe
Goto the root folder
cd ~
Make a new folder Phone-Piper
mkdir Phone-Piper
Clone the latest source
git clone [email protected]:mgatelabs/PhonePiper.git ./Phone-Piper
Build from source
cd Phone-Piper
mvn clean compile package
You need to copy the file phone_piper to the /etc/init.d folder
sudo cp ~/Phone-Piper/extra/phone-piper /etc/init.d
Make the file runable
sudo chmod +x /etc/init.d/phone-piper
Install the script
sudo systemctl enable phone-piper
Copy the phone-piper-build script to the home directory
cp ~/Phone-Piper/extra/phone-piper-build ~/
Make the script runable
sudo chmod +x ~/phone-piper-build
Run the update script. The system will reboot after it's finished
cd ~
./phone-piper-build