An open API service indexing awesome lists of open source software.

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

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 -x

cd "/tmp/unpacked"

#
#
#
#
#
#
#
#
#
#

md5sum --check <