A Python Script that can be used to easily flash .img files to any Samsung phone.
gui.py
is the main file, and guiunstable.py
is an updated but unstable version.
See this Github Project Page for future goals.
Install requirements!
pip install -r requirements.txt
Install Heimdall (Example on Debian):
sudo apt install Heimdall
Download/save gui.py
(or guiunstable.py
) and run it.
- Install dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txt
- Install Heimdall (Example on Debian):
sudo apt install Heimdall
- Build executable:
pyinstaller --onefile --noconsole --add-binary "/bin/heimdall:." --add-data "$(pwd)/python-logo-only.svg:." gui.py
When I first made this, it only worked on Linux. I am now starting to add Windows 10/11 support as well. If you try running the program on Windows, it expects that you have extracted Heimdall
into Heimdall/
. You can follow heimdall/README.txt
for installing drivers. Here is a snippet:
Driver Installation Instructions:
-
Put your device into download mode and plug it in.
-
Run
zadig.exe
included in the Drivers subdirectory. -
From the menu choose Options -> List All Devices.
-
From the USB Device list pick "Samsung USB Composite Device".
-
Press "Install Driver", click "Yes" to the prompt, and if you receive a message about being unable to verify the publisher of the driver. Click "Install this driver software anyway".
-
Done
- Download & Extract Heimdall:
Invoke-WebRequest https://bitbucket.org/benjamin_dobell/heimdall/downloads/heimdall-suite-1.4.0-win32.zip -OutFile heimdall.zip
expand-archive -path heimdall.zip -DestinationPath heimdall
Move-Item -Path "heimdall/Heimdall Suite/" -Destination heimdall-tmp
rmdir -r heimdall
mv heimdall-tmp heimdall
rm heimdall/Qt*
- Install dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txt
- Build:
pyinstaller --add-data ./heimdall:heimdall --add-data "./devices.json:." --add-data "./python-logo-only.svg:." --onefile -w guiunstable.py
The following programs were used in the code:
Heimdall (Used to Flash Images)
Pyside6 (Used for the GUI)
Python (What it is coded in)
-
I wanted an easy way to flash
*IMG
's to Samsung devices -
The already-made Heimdall-Frontend is awesome, but was overcomplicated for me.
-
WHY NOT