FARMER PHONE SETUP
==================

Dashboard: https://farmer.yavender.com

Prerequisites:
  - ADB installed (Android SDK Platform Tools)
  - Phones connected via USB
  - AutoTouchPro installed on each phone
  - Phones have WiFi internet connection
  - (Optional) facebook.apk in this folder for auto-install

Setup 1 phone:
  bash setup_phone.sh <serial>

Setup all connected phones:
  bash setup_all.sh

List connected phones:
  adb devices -l

What setup does:
  1. Checks AutoTouchPro installed
  2. Installs Facebook if not present (needs facebook.apk in folder)
  3. Reads device config (preserves deviceName, boxName, cronjobs)
  4. Configures AutoTouchPro to poll farmer.yavender.com
  5. Pushes farmer_poll.txt + updates startup.atp
  6. Enables Accessibility Service + permissions
  7. Enables ADB WiFi (for RemoteADBShell)
  8. Starts polling automatically via accessibility toggle

After setup:
  - Phone appears on https://farmer.yavender.com within 15 seconds
  - Add accounts to each device on the dashboard
  - Send tasks from the dashboard

Troubleshooting:
  - Phone not appearing: Check WiFi connection, try setup again
  - Script not running: Toggle Accessibility off/on in phone Settings
  - "No static.json": Open AutoTouchPro on phone first

Do NOT:
  - Force-stop AutoTouchPro (kills Accessibility Service)
  - Overwrite static.json (contains unique device config)
  - Press RUN button (use accessibility toggle instead)
