{"id":20985148,"url":"https://github.com/dlenski/motoflash2sh","last_synced_at":"2025-04-06T13:12:20.269Z","repository":{"id":55644586,"uuid":"90223203","full_name":"dlenski/motoflash2sh","owner":"dlenski","description":"Convert Motorola flashfile.xml to fastboot shell script","archived":false,"fork":false,"pushed_at":"2024-12-16T15:09:33.000Z","size":13,"stargazers_count":88,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T12:08:59.792Z","etag":null,"topics":["android","fastboot","firmware-tools","motorola"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlenski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-04T04:57:54.000Z","updated_at":"2025-02-09T17:04:40.000Z","dependencies_parsed_at":"2024-11-19T05:57:25.612Z","dependency_job_id":"453e82bf-24bb-4fdd-a12d-5e568970d7e8","html_url":"https://github.com/dlenski/motoflash2sh","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlenski%2Fmotoflash2sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlenski%2Fmotoflash2sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlenski%2Fmotoflash2sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlenski%2Fmotoflash2sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlenski","download_url":"https://codeload.github.com/dlenski/motoflash2sh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485290,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","fastboot","firmware-tools","motorola"],"created_at":"2024-11-19T05:55:33.052Z","updated_at":"2025-04-06T13:12:20.242Z","avatar_url":"https://github.com/dlenski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motoflash2sh\n\nThis script converts Motorola's Android system images (containing a `flashfile.xml`) to a shell script.\n([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/))\n\n## Install\n\nUse Python 3 `pip` (usually named `pip3`):\n\n```sh\n$ pip3 install https://github.com/dlenski/motoflash2sh/archive/v0.4.zip     # tagged version\n$ pip3 install https://github.com/dlenski/motoflash2sh/archive/master.zip   # latest commit\n```\n\n## Use\n\n1. Unpack zip file containing Motorola system image\n2. Run `motoflash2sh` to convert the `flashfile.xml` to `flashfile.sh`\n3. Inspect and/or run the `flashfile.sh` to execute the equivalent fastboot commands.\n\n```sh\n$ unzip XT1607_HARPIA_RETUS_MPI24.241-2.35-1_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip -d /tmp/unpacked\n$ motoflash2sh /tmp/unpacked/flashfile.xml\nWrote shell script with 26 fastboot steps to /tmp/unpacked/flashfile.sh\n```\n\n## Example output\n\nThis is the output for the `flashfile.xml` in the\n`XT1607_HARPIA_RETUS_MPI24.241-2.35-1_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip` system image:\n\n```sh\n#!/bin/sh -x\n\ncd \"/tmp/unpacked\"\n\n# \u003cheader\u003e\n#     \u003cphone_model model=\"harpia\" /\u003e\n#     \u003csoftware_version version=\"harpia-user 6.0.1 MPI24.241-2.35-1 1 release-keysM8916_20250106.08.05.23R\" /\u003e\n#     \u003csubsidy_lock_config MD5=\"00b1a7c46832ca619f9090d3fc80ecce\" name=\"slcf_rev_b_default_v1.0.nvm\" /\u003e\n#     \u003cregulatory_config SHA1=\"da39a3ee5e6b4b0d3255bfef95601890afd80709\" name=\"regulatory_info_default.png\" /\u003e\n#     \u003csparsing enabled=\"true\" max-sparse-size=\"268435456\" /\u003e\n#     \u003cinterfaces\u003e\n#       \u003cinterface name=\"AP\" /\u003e\n#     \u003c/interfaces\u003e\n#   \u003c/header\u003e\n\nmd5sum --check \u003c\u003cEOF || exit 1\n61863ba7dac0c512d610ffa6406a50f8 *gpt.bin\n8bce118ce20d18f07b8074919a9c760c *bootloader.img\n3b273bca1e1206c05d50fbb136168586 *logo.bin\n89e6547bcfdca3ec4800d1fdc8220e17 *boot.img\n4f73a316fb3ca64f1f6d40840ddcd86c *recovery.img\necc4eab279c1b23c16a84715fcd986f0 *system.img_sparsechunk.0\n50fc3cb4fe688dc1092c1073bc42c6b7 *system.img_sparsechunk.1\nb411e841ff3ebf63b56026710121dbd4 *system.img_sparsechunk.2\n92901d92792a43a4dcd6f3eeee316d21 *system.img_sparsechunk.3\ncebd659e30514298a86d52d25fca6b02 *system.img_sparsechunk.4\n4b8342159bd24dc4551509c8b650520c *system.img_sparsechunk.5\nd9d2dca4e684b9a8360760751a117b23 *system.img_sparsechunk.6\n12fcdd4d23d5ad9d32996ddc6cf984b6 *system.img_sparsechunk.7\nc71717415dcce6012858af6af72b27b5 *oem.img\n2bb0babde39a5a6df952793c7925daa9 *NON-HLOS.bin\nd160f142b2985248f38a29dd77b5bd5a *fsg.mbn\nEOF\n\nfastboot getvar max-sparse-size || exit 1\nfastboot oem fb_mode_set || exit 1\nfastboot flash partition gpt.bin || exit 1\nfastboot flash bootloader bootloader.img || exit 1\nfastboot flash logo logo.bin || exit 1\nfastboot flash boot boot.img || exit 1\nfastboot flash recovery recovery.img || exit 1\nfastboot flash system system.img_sparsechunk.0 || exit 1\nfastboot flash system system.img_sparsechunk.1 || exit 1\nfastboot flash system system.img_sparsechunk.2 || exit 1\nfastboot flash system system.img_sparsechunk.3 || exit 1\nfastboot flash system system.img_sparsechunk.4 || exit 1\nfastboot flash system system.img_sparsechunk.5 || exit 1\nfastboot flash system system.img_sparsechunk.6 || exit 1\nfastboot flash system system.img_sparsechunk.7 || exit 1\nfastboot flash oem oem.img || exit 1\nfastboot flash modem NON-HLOS.bin || exit 1\nfastboot erase modemst1 || exit 1\nfastboot erase modemst2 || exit 1\nfastboot flash fsg fsg.mbn || exit 1\nfastboot erase cache || exit 1\nfastboot erase userdata || exit 1\nfastboot erase customize || exit 1\nfastboot erase clogo || exit 1\nfastboot erase DDR || exit 1\nfastboot oem fb_mode_clear || exit 1\n```\n\n## License\n\nGPLv3 or later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlenski%2Fmotoflash2sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlenski%2Fmotoflash2sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlenski%2Fmotoflash2sh/lists"}