Skip to content

moxiu6/GSI_Flasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GSI_Flasher - Android GSI CLI Tool

Note:

GSI_Flasher is still in Beta. While it is functional, you may experience bugs or issues. Please use at your own risk. It's strongly advised to back up your data before flashing.

Version Badge

GSI_Flasher.bat is a simple yet powerful CLI tool for flashing Generic System Images (GSIs) onto Android devices. It provides an easy-to-use interface for flashing GSI images using ADB and Fastboot commands and incorporates Python for advanced error handling and image verification.

Features

  • User-friendly CLI: Simple batch script prompts guide you through the flashing process.
  • Automatic GSI Image Selection: Easily select the .img file using a file dialog.
  • Device Detection: Automatically checks for ADB and Fastboot in your system and detects your connected Android device.
  • device verification: and device verification written in python incorprated with GSI_Flasher.bat

Requirements

  1. Windows OS: The script is designed to run on Windows systems.

  2. Python 3.x: Make sure Python 3 is installed on your system. You can download it from here.

  3. ADB and Fastboot: These tools should be installed and available in your system's PATH. Follow these links for installation:


Installation

  1. Download the GSI_Flasher.zip or GSI_Flasher.7z and save it to a folder on your computer.

  2. Install Python (if you don't have it already). You can download Python from here.

  3. Ensure ADB and Fastboot are installed and available in your system's PATH. You can verify this by opening a command prompt and running adb --version and fastboot --version.

  4. Place your GSI image (the .img file) in an gsis folder.


Usage

  1. Run the GSI_Flasher.bat file:

    • Open the Command Prompt (CMD) and navigate to the folder where GSI_Flasher.bat is located.
    • Run the script by typing:
      GSI_Flasher.bat
  2. Follow the prompts:

    • The script will ask you to select the GSI image file. Use the file dialog to select the .img file you want to flash.
    • The script will check if ADB and Fastboot are installed, and it will detect your connected Android device.
  3. Flashing Process:

    • Once completed, the device should will automatically reboot into the new system.

Example Output

Here’s what you’ll see when running the flasher:

Please select the GSI image file to flash (only .img files are supported)...
You selected: "C:\path\to\your\gsi_image.img"
SHA-256 hash of selected image: <hash_value>

Checking if ADB can detect your device...
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
<device_id>   device

Rebooting to fastboot mode...
Waiting for device to enter fastboot mode...
Checking fastboot devices...
<device_id>   fastboot

Flashing the system image...
Flashing complete and verification successful! Your device should reboot into the new system image.

Troubleshooting

  • Error: ADB not found in the environment variables:

    • Ensure that ADB is installed and added to your system's PATH. Restart the terminal after adding it.
  • Error: Fastboot not found:

    • Verify that Fastboot is installed and accessible via the PATH. Follow the installation guide linked above.
  • Device not detected:

    • Make sure USB Debugging is enabled on your Android device (Settings > Developer Options > USB Debugging).
    • Ensure that the device is connected and in fastboot mode.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Contributing

If you'd like to contribute, feel free to submit a pull request with improvements, bug fixes, or new features. If you encounter any issues, please create an issue on GitHub.


Contact

If you have any questions or need assistance, please feel free to open an issue or reach out to the author.

About

you need python! to run this flasher

Resources

License

Stars

Watchers

Forks

Packages

No packages published