https://github.com/dlenski/motoflash2sh
Convert Motorola flashfile.xml to fastboot shell script
https://github.com/dlenski/motoflash2sh
android fastboot firmware-tools motorola
Last synced: 20 days ago
JSON representation
Convert Motorola flashfile.xml to fastboot shell script
- Host: GitHub
- URL: https://github.com/dlenski/motoflash2sh
- Owner: dlenski
- Created: 2017-05-04T04:57:54.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-12-16T15:09:33.000Z (4 months ago)
- Last Synced: 2025-03-30T12:08:59.792Z (27 days ago)
- Topics: android, fastboot, firmware-tools, motorola
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 88
- Watchers: 4
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# motoflash2sh
This script converts Motorola's Android system images (containing a `flashfile.xml`) to a shell script.
([Jeroen Bart's blog has a nice step-by-step explanation of these files.](http://www.forceflow.be/2016/06/29/flashing-system-images-on-moto-x-play/))## Install
Use Python 3 `pip` (usually named `pip3`):
```sh
$ pip3 install https://github.com/dlenski/motoflash2sh/archive/v0.4.zip # tagged version
$ pip3 install https://github.com/dlenski/motoflash2sh/archive/master.zip # latest commit
```## Use
1. Unpack zip file containing Motorola system image
2. Run `motoflash2sh` to convert the `flashfile.xml` to `flashfile.sh`
3. Inspect and/or run the `flashfile.sh` to execute the equivalent fastboot commands.```sh
$ unzip XT1607_HARPIA_RETUS_MPI24.241-2.35-1_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip -d /tmp/unpacked
$ motoflash2sh /tmp/unpacked/flashfile.xml
Wrote shell script with 26 fastboot steps to /tmp/unpacked/flashfile.sh
```## Example output
This is the output for the `flashfile.xml` in the
`XT1607_HARPIA_RETUS_MPI24.241-2.35-1_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip` system image:```sh
#!/bin/sh -xcd "/tmp/unpacked"
#
#
#
#
#
#
#
#
#
#md5sum --check <