ADB NewPipe Exporter
A shell script that automates the export process in the NewPipe Android app using ADB (Android Debug Bridge). The script navigates through the NewPipe UI automatically to trigger data export, making it easy to backup your subscriptions and settings.
This tool was developed with assistance from aider.chat.
Features
- Automatically wakes up the device screen
- Optional PIN/password entry for locked devices
- Adaptive screen scaling - works across different Android device resolutions
- Step-by-step UI navigation to reach the export function
Prerequisites
- ADB (Android Debug Bridge) must be installed and accessible in your PATH
- USB Debugging enabled on your Android device
- NewPipe app installed on the device (
org.schabi.newpipe) - Device connected via USB with ADB authorized
Installation
- Clone or download the script
- Make it executable:
chmod +x adb_newpipe_exporter.sh
Usage
Basic usage (unlocked device):
./adb_newpipe_exporter.sh
With PIN/password entry:
./adb_newpipe_exporter.sh --pin YOUR_PIN_CODE
How It Works
The script performs these steps:
- Connection Check: Verifies ADB is connected and the device is responsive
- Screen Wake: Wakes up the device screen
- Unlock: If
--pinis provided, enters the PIN to unlock the device - Screen Detection: Detects the device's screen resolution
- UI Navigation: Performs a series of taps at calculated positions to:
- Open NewPipe
- Navigate to the settings menu
- Access the data export function
- Trigger the export
Screen Scaling
The tap coordinates are calculated as percentages of the screen dimensions, ensuring the script works across different device resolutions. Original coordinates were designed for approximately 1080x2400 screens, but the script automatically scales them to match your device's actual resolution.
Troubleshooting
- "ADB not connected or unresponsive": Ensure USB debugging is enabled and the device is properly connected
- Script runs but doesn't navigate correctly: The NewPipe UI may have changed. You may need to adjust the tap coordinates and timing
- PIN entry fails: Make sure the device is on the lock screen when using
--pin
Limitations
- The script relies on specific UI tap positions, which may break if NewPipe's interface changes significantly
- Timing delays (sleep commands) are hardcoded and may need adjustment for slower devices
- Only tested with specific NewPipe versions and Android configurations
License
See the LICENSE file in the repository.
Contributing
This script uses hardcoded UI navigation which can be fragile. Contributions to make it more robust (e.g., using UI Automator or detecting UI elements) are welcome.