|
| 1 | +# ADB Tool for Windows |
| 2 | + |
| 3 | +A modern, user-friendly GUI application for Android Debug Bridge (ADB) operations on Windows, built with PyQt6. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +### Device Management |
| 8 | +- Auto-detect connected Android devices |
| 9 | +- View device information (model, manufacturer, Android version, etc.) |
| 10 | +- Auto-refresh device list every 5 seconds (silent mode to reduce log spam) |
| 11 | +- Device selection with automatic status updates |
| 12 | + |
| 13 | +### File Operations |
| 14 | +- Push files from PC to Android device |
| 15 | +- Pull files from Android device to PC |
| 16 | + |
| 17 | +### App Management |
| 18 | +- Install APK files (supports split APKs) |
| 19 | +- Uninstall applications (with fallback to user uninstall for system apps) |
| 20 | +- Reinstall apps for current user |
| 21 | +- List all installed apps with search functionality |
| 22 | +- Enable/disable apps |
| 23 | +- View app details and package information |
| 24 | +- Open APKs folder |
| 25 | + |
| 26 | +### Device Operations |
| 27 | +- Take screenshots (automatically saved to `screenshots/` folder with timestamps) |
| 28 | +- Reboot device (normal, recovery, bootloader) |
| 29 | + |
| 30 | +### Shell Commands |
| 31 | +- Multi-line textbox for entering complex commands |
| 32 | +- Execute ADB shell commands directly on your Android device |
| 33 | +- Supports Linux commands (not Windows commands) |
| 34 | +- Optional prefixes: You can include "adb shell" prefix, but it's not required (auto-stripped) |
| 35 | +- View output in real-time in the log window |
| 36 | + |
| 37 | +### Logcat |
| 38 | +- View real-time Android logcat output |
| 39 | +- Start/stop logcat streaming with improved error handling |
| 40 | +- Automatic process validation and error reporting |
| 41 | +- Clear log output |
| 42 | + |
| 43 | +### DeGoogle Functionality |
| 44 | +- **Simple Mode**: Remove all safe Google apps automatically |
| 45 | +- **Custom Mode**: Select individual apps to remove (safe, risky, and unsafe packages) |
| 46 | +- Categorized package lists: |
| 47 | + - Safe packages (won't break functionality) |
| 48 | + - Risky packages (might break some features) |
| 49 | + - Unsafe packages (can break device - use with caution) |
| 50 | +- Undo DeGoogle: Restore previously disabled/uninstalled packages |
| 51 | +- State persistence: All changes are saved to `degoogle_state.json` |
| 52 | + |
| 53 | +### UI Features |
| 54 | +- **Dark Mode**: Toggle between light and dark themes (persistent) |
| 55 | +- Modern, clean interface |
| 56 | +- Real-time status updates |
| 57 | +- Comprehensive logging with timestamps |
| 58 | +- Settings persistence (saved to `settings.json`) |
| 59 | + |
| 60 | +## Requirements |
| 61 | + |
| 62 | +1. **Python 3.8+** |
| 63 | +2. **PyQt6** (install via `pip install PyQt6`) |
| 64 | +3. **ADB (Android Debug Bridge)** |
| 65 | + - Download from: https://developer.android.com/studio/releases/platform-tools |
| 66 | + - Extract the `platform-tools` folder |
| 67 | +4. **Android Device** with USB debugging enabled |
| 68 | + |
| 69 | +## Installation |
| 70 | + |
| 71 | +1. Clone or download this repository |
| 72 | +2. Install Python 3.8 or higher |
| 73 | +3. Install PyQt6: |
| 74 | + ```bash |
| 75 | + pip install -r requirements.txt |
| 76 | + ``` |
| 77 | + Or directly: |
| 78 | + ```bash |
| 79 | + pip install PyQt6 |
| 80 | + ``` |
| 81 | +4. Download Android SDK Platform Tools: |
| 82 | + - Visit: https://developer.android.com/studio/releases/platform-tools |
| 83 | + - Extract the ZIP file to a location of your choice |
| 84 | + - You'll need the `platform-tools` folder |
| 85 | + |
| 86 | +## Usage |
| 87 | + |
| 88 | +1. **Enable USB debugging on your Android device:** |
| 89 | + - Go to Settings → About Phone |
| 90 | + - Tap "Build Number" 7 times to enable Developer Options |
| 91 | + - Go to Settings → Developer Options |
| 92 | + - Enable "USB Debugging" |
| 93 | + |
| 94 | +2. **Connect your Android device via USB** |
| 95 | + |
| 96 | +3. **Run the application:** |
| 97 | + ```bash |
| 98 | + python adb_gui.py |
| 99 | + ``` |
| 100 | + |
| 101 | +4. **First Launch - Select ADB Path:** |
| 102 | + - On first launch, you'll be prompted to select the `platform-tools` folder |
| 103 | + - Navigate to where you extracted the Android SDK Platform Tools |
| 104 | + - Select the `platform-tools` folder (the one containing `adb.exe`) |
| 105 | + - The path will be saved automatically for future use |
| 106 | + |
| 107 | +5. **Select your device** from the dropdown (devices auto-refresh every 5 seconds) |
| 108 | + |
| 109 | +6. **Use the various buttons** to perform ADB operations |
| 110 | + |
| 111 | +## How It Works |
| 112 | + |
| 113 | +### ADB Path Selection |
| 114 | +- On first launch, the application prompts you to select the `platform-tools` folder |
| 115 | +- The selected path is saved to `settings.json` for persistence |
| 116 | +- You can change the ADB path later using the "ADB Path" button in the UI |
| 117 | +- The application will also check system PATH as a fallback |
| 118 | + |
| 119 | +### Settings Persistence |
| 120 | +- **Settings** are saved to `settings.json`: |
| 121 | + - ADB path |
| 122 | + - Dark mode preference |
| 123 | +- **DeGoogle state** is saved to `degoogle_state.json`: |
| 124 | + - Disabled packages |
| 125 | + - Uninstalled packages |
| 126 | + - Timestamps and actions |
| 127 | + |
| 128 | +### Screenshots |
| 129 | +- Screenshots are automatically saved to the `screenshots/` folder in the project directory |
| 130 | +- Filenames include timestamps: `screenshot_YYYYMMDD_HHMMSS.png` |
| 131 | + |
| 132 | +### APKs Folder |
| 133 | +- Pulled APKs are saved to the `apks/` folder in the project directory |
| 134 | +- Useful for backing up apps before uninstalling |
| 135 | + |
| 136 | +## Features in Detail |
| 137 | + |
| 138 | +### Device Selection |
| 139 | +- Devices are automatically detected and listed |
| 140 | +- Device status (device, offline, unauthorized) is shown |
| 141 | +- Click "Info" to see detailed device information |
| 142 | +- Auto-refresh runs silently in the background (only logs when devices change) |
| 143 | + |
| 144 | +### File Transfer |
| 145 | +- **Push**: Select a file from your PC and specify destination path on device |
| 146 | +- **Pull**: Specify file path on device and choose where to save on PC |
| 147 | + |
| 148 | +### App Management |
| 149 | +- **Install APK**: Browse and install APK files (supports split APKs) |
| 150 | +- **Uninstall**: Select from installed apps list or enter package name |
| 151 | +- **List Apps**: View all installed packages with: |
| 152 | + - Search functionality (by app name or package) |
| 153 | + - Filter to show only disabled apps |
| 154 | + - Uninstall, reinstall, enable, disable actions |
| 155 | + - Double-click to view app details |
| 156 | +- **Reinstall for User**: Restore apps that were uninstalled for your user account |
| 157 | +- **Open APKs Folder**: Quickly access pulled APK files |
| 158 | + |
| 159 | +### Screenshots |
| 160 | +- Takes a screenshot and automatically saves to `screenshots/` folder |
| 161 | +- Filename includes timestamp for easy organization |
| 162 | + |
| 163 | +### Shell Commands |
| 164 | +- Enter any ADB shell command in the multi-line textbox |
| 165 | +- Commands run on your Android device (Linux), not on Windows |
| 166 | +- Use Linux commands: `grep` (not `findstr`), `ls` (not `dir`), `cat` (not `type`) |
| 167 | +- You can include "adb shell" prefix, but it's optional (will be auto-stripped) |
| 168 | +- Click "Run Command" to execute |
| 169 | +- Output appears in real-time in the log window |
| 170 | +- Examples: `ls /sdcard`, `pm list packages`, `dumpsys battery | grep level` |
| 171 | + |
| 172 | +### Logcat |
| 173 | +- Click "Start Logcat" to begin streaming Android logs |
| 174 | +- Improved error handling: Shows clear error messages if logcat fails to start |
| 175 | +- Process validation: Automatically checks if logcat process started successfully |
| 176 | +- Click "Stop Logcat" to stop streaming |
| 177 | +- Click "Clear" to clear the log output |
| 178 | +- Logs appear in real-time in the output window with "LOGCAT" tag |
| 179 | + |
| 180 | +### DeGoogle |
| 181 | +- **Simple Mode**: Quickly remove all safe Google apps |
| 182 | +- **Custom Mode**: Select individual apps from categorized lists: |
| 183 | + - Safe packages: Apps that can be safely removed |
| 184 | + - Risky packages: Apps that might break some functionality |
| 185 | + - Unsafe packages: Critical system components (use with extreme caution) |
| 186 | +- Choose to disable (can be re-enabled) or uninstall (can be restored) |
| 187 | +- **Undo DeGoogle**: Restore previously removed packages from saved state |
| 188 | + |
| 189 | +### Dark Mode |
| 190 | +- Toggle between light and dark themes using the button in the header |
| 191 | +- Preference is saved automatically |
| 192 | +- All UI elements update in real-time when toggled |
| 193 | + |
| 194 | +## Known Issues |
| 195 | + |
| 196 | +- **Logcat not working**: The logcat feature may not display output correctly. This is a known issue that may be related to device compatibility or ADB version. Workaround: Use shell commands to view logs manually (e.g., `logcat -d`). |
| 197 | + |
| 198 | +## Troubleshooting |
| 199 | + |
| 200 | +**No devices found:** |
| 201 | +- Ensure USB debugging is enabled on your device |
| 202 | +- Check USB cable connection |
| 203 | +- Try different USB port |
| 204 | +- On device, check for "Allow USB debugging?" prompt and accept it |
| 205 | +- Run `adb devices` in command prompt to verify ADB can see your device |
| 206 | + |
| 207 | +**ADB not found:** |
| 208 | +- On first launch, you'll be prompted to select the ADB folder |
| 209 | +- If you skipped it, use the "ADB Path" button to set it |
| 210 | +- Make sure you select the `platform-tools` folder (contains `adb.exe`) |
| 211 | +- The application will also check system PATH as a fallback |
| 212 | + |
| 213 | +**Permission denied errors:** |
| 214 | +- Some operations require root access on the device |
| 215 | +- Try enabling "Root access" in Developer Options (if available) |
| 216 | +- Some system apps can only be disabled/uninstalled for your user account |
| 217 | + |
| 218 | +**App list not showing:** |
| 219 | +- Make sure a device is selected |
| 220 | +- Check the log output for any error messages |
| 221 | +- Try refreshing the device list |
| 222 | + |
| 223 | +**Dark mode not applying to all elements:** |
| 224 | +- Try toggling dark mode off and on again |
| 225 | +- Restart the application if issues persist |
| 226 | + |
| 227 | +**Shell command errors (e.g., "findstr: inaccessible or not found"):** |
| 228 | +- Remember: Commands run on your Android device (Linux), not Windows |
| 229 | +- Use Linux commands: `grep` instead of `findstr`, `ls` instead of `dir`, `cat` instead of `type` |
| 230 | +- You can include "adb shell" prefix, but it's optional (auto-stripped) |
| 231 | +- Check the help text in the UI for examples |
| 232 | + |
| 233 | +**Logcat not showing output:** |
| 234 | +- Make sure a device is selected |
| 235 | +- Check the log output for error messages |
| 236 | +- Verify ADB connection: Try running a simple shell command first |
| 237 | +- Some devices may require root access for full logcat output |
| 238 | +- If logcat fails to start, check the error message in the log window |
| 239 | + |
| 240 | +## File Structure |
| 241 | + |
| 242 | +``` |
| 243 | +adb/ |
| 244 | +├── adb_gui.py # Main application file |
| 245 | +├── requirements.txt # Python dependencies |
| 246 | +├── settings.json # User settings (ADB path, dark mode) |
| 247 | +├── degoogle_state.json # DeGoogle operation history |
| 248 | +├── screenshots/ # Screenshot storage (auto-created) |
| 249 | +└── apks/ # Pulled APK storage (auto-created) |
| 250 | +``` |
| 251 | + |
| 252 | +## License |
| 253 | + |
| 254 | +This project is open source and available for personal and commercial use. |
| 255 | + |
| 256 | +## Contributing |
| 257 | + |
| 258 | +Feel free to submit issues, fork the repository, and create pull requests for any improvements. |
0 commit comments