Phone-Piper (WIP)

What is Phone Piper?

Phone Piper is a series of utilities and tools to control your android device.  It has been customized to focus on FFBE, but it could be used for other apps if additional views and scripts are created.

Features

  • Control from a…
    • Raspberry PI
    • Windows
    • Linux
    • Mac OS X
  • Manage via a web page
  • Customization via scripting

Requires

  • Java 1.8
  • ADB
  • Developer Mode enabled on Device
  • Compatible device with a screen resolution of 1080×1920
    • Other resolutions are possible, but not ready

How do I get FFBExecute?

This is actually really complicated.

Android Device

  1. You need to install this project on your target device.
    1. You can build from source or download a pre-built APK.
      1. The Prebuilt APK is a bit out of date and source code would be a better choice when needing to edit views
  2. You need to set the screen resolution to 1080×1920

Windows (Hard)

  1. Install GIT
  2. Install the Java 1.8 JDK
  3. Install Android Command Line Tools
  4. Download maven, install info
  5. Clone Reposatory
    1. From a folder you have control of type the following
    2. git clone https://github.com/mgatelabs/FFBExecute.git
  6. Build Project
    1. open a terminal
    2. Navigate to the FFBExecute folder
    3. Run the command
      1. mvn install
      2. mvn compile package
  7. Run the server
    1. open a terminal
    2. Navigate to the FFBExecute/working folder
    3. Run the command
      1. java -jar ../target/android-control.jar server
    4. Open a browser to
      1. http://YOURMACHINEIP:8080/ffbe or http://localhost:8080/ffbe/

Windows (Easier)

  1. Install GIT
  2. Install the Java 1.8 JDK
  3. Install Android Command Line Tools
  4. Install IntelliJ IDEA Community
  5. Run IntelliJ Idea
    1. From the startup screen choose Check out from Version Control > Git
    2. in the URL area type: https://github.com/mgatelabs/FFBExecute.git
    3. Click Test and it should say Connection successful
    4. Click Clone
    5. Press Yes when asked to create a IntelliJ Idea project from the source
    6. Choose Import project from external model, choose Maven and Next
    7. Click Next
    8. Click Next
    9. Make sure you have Java 1.8 in the SDK list, if not hit the + icon and choose it’s home directory.  Should be located at Program Files / Java
    10. Click Next
    11. Click Finish
  6. In the top of IntelliJ IDEA press Add Configuration
    1. Click the + icon
    2. Choose Application
    3. Set the name to: SERVER
    4. For the Main Class enter: com.mgatelabs.ffbe.Runner
    5. For Program Arguments enter: server
    6. For Working Directory click the […] button and choose the working folder under FFBExecute
    7. Click OK
  7. Press the Run button or press SHIFT + F10
  8. In a few second open your web browser to http://localhost:8080/ffbe/ to manage

Raspberry PI

Mac OS X

Management Flow

Once your able to access the management web-page you need to do the following

  1. From the Config Tab select
    1. Device: Samsung-S7-1080
    2. Primary View: 1080×1920
    3. Primary Script:
      1. At the moment the only fully functional scripts are
        1. farm-attack-with-raid
        2. fuse
    4. Extra Script:
      1. This will be blank in most cases, the only special case is the script olive-nuke, which changes the raid fight to one shot the boss, but you have to have a Olive equipped right for her KO blast to finish the job.
    5. Click Run Script
    6. Switch to the Device Tab
      1.  Put your Player Level in the Appropriate Field, then press Update
        1. We need this in order to calculate available energy
      2. Make sure your Phone’s IP address is in Device I.P.
        1. After you type the value press Update
      3. If your device isn’t in remote debugging mode connect it to your computer and accept all prompts
      4. Press the Remote button, it should print a messege and you may be prompted again
      5. Disconnect your phone and plug it into a external power source
      6. Press Connect
      7. Press Devices and make sure your device is in the list
      8. Press Restart
    7. Make sure the Helper app is running on your device
    8. Open FFBE and navigate to the Appropriate Screen for the Script
    9. Switch to the Run tab
      1. Choose the state you would like to run from, for most “Main” is correct
      2. Click Play/Pause
    10. You can look at the Console tab for debug information
    11. You can use the Variables tab to control how the program acts, but you cannot edit it while it’s running

Fusing Tutorial

  1. Open the App’s Webpage
  2. Select your Device, Primary View and the Primary Script “fuse”
  3. Click Run Script
  4. Do whatever you need to on the Device Tab, if you have to Connect, make sure to press Restart
  5. Run the Helper App
  6. Run FFBE
    1. Navigate to Units > Enhance Units
    2. Click Filter
      1. Sort
        1. LVL Ascending
      2. Filter
        1. Stars: 3 or 4 (Choose one, not both)
        2. Unit Lvl: Non-Max
        3. Unit Type: Enhance
      3. Click Confirm
    3. Click your first XP unit
    4. Click on the Tap spot
    5. Click Sort Filter
      1. Sort
        1. LVL Decending
      2. Filter
        1. Stars: 3 or 4 (The same as before)
        2. Unit Lvl: Non-Max
        3. Unit Type: Enhance
      3. Click Confirm
    6. Choose the first XP unit
    7. Click OK
    8. Click Fuse, need to make sure everything is setup
    9. Once the fusion is finished, click Back to return to the Select Base screen
    10. Back in the App’s Webpage switch to the Run tab and press Play/Pause
    11. If you watch the screen, it should start to automatically fuse your units
      1. It will stop once it’s down to 1 or 2 units.

Tips

  • Dim your screen to save battery life
  • To run Phone-Piper on a Raspberry Pi
    • Copy the script to /etc/init.d
    • Run the command
      • sudo systemctl enable phone-piper

Questions

  • What about other screen resolutions?
    • Possible if the required views have been created.  This is a time consuming task.