FORUMS
Remove All Ads from XDA

[TOOL][WIN/LINUX/MAC] Xiaomi Flashable Firmware Creator [FW/FW-less/NON-ARB]

2,631 posts
Thanks Meter: 5,871
 
Post Reply Email Thread
Announcement from yshalsager: The universal tool to create Xiaomi flashable firmware/non-arb/firmware-less zip files is here!
Do you want to create your own firmware files from MIUI ROMs without depending on Xiaomi Firmware Updater? Then you need the new script!
Xiaomi Flashable Firmware Creator

Part of Xiaomi Firmware Updater project

Logo
Code:
#include 
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Xiaomi Flashable Firmware Creator is a python 3 script which generates flashable firmware-update packages, extracted from official (or non official?) MIUI ROMS.
It supports creating untouched firmware, non-arb firmware, firmware + vendor flashable zip and firmware-less ROMs.

Usage:
You need python 3 installed on your device, or you can get the compiled executable from here.

- Creating normal (untouched) firmware:
Code:
python3 create_flashable_firmware.py -F [MIUI ZIP]
- Creating non-arb firmware (without anti-rollback):
Code:
python3 create_flashable_firmware.py -N [MIUI ZIP]
- Creating firmware-less ROM (stock untouched ROM with just firmware removed):
Code:
python3 create_flashable_firmware.py -L [MIUI ZIP]
- Using executable files:
On Linux:
Code:
./create_flashable_firmware -F [MIUI ZIP]
On Windows:
Code:
create_flashable_firmware.exe -F [MIUI ZIP]
Detailed Guide:
Check [Guide] How to edit Miui ROMs to flash without bootloader by @AL_IRAQI

Ready-made firmware files:
If you're lazy or looking for ready-made firmware files for whatever Xiaomi device, check my Xiaomi Firmware Updater project. It provides automatically generated Xiaomi firmware flashable zip files for every MIUI new update!

Support and Contact:
Having trouble with firmware files? You can open a new issue on Github repository or just write here in a reply, and I’ll help you sort it out.
Also If You want to add a new feature or fix any problem, feel free to push a PR.

Donations:
My works are free and open source, that cost money, time and many efforts.
If you want to make a donation, you can use:
- Paypal
- Pateron
- Payoneer account "[email protected]"


XDA:DevDB Information
Xiaomi Flashable Firmware Creator, Tool/Utility for the Android General

Contributors
yshalsager
Source Code: https://github.com/XiaomiFirmwareUpd...are-creator.py


Version Information
Status: Stable
Current Stable Version: 1
Stable Release Date: 2018-11-24

Created 2018-11-24
Last Updated 2019-04-01
The Following 15 Users Say Thank You to yshalsager For This Useful Post: [ View ]
 
 
27th November 2018, 10:52 AM |#2  
Junior Member
Thanks Meter: 1
 
More
in windows 10 give error after make new zip rename.
edit py file with text editor.
Find
Code:
def make_zip():
    rom, process = arg_parse()
    with open("out/META-INF/com/google/android/updater-script", 'r') as i:
        codename = str(i.readlines()[7].split('/', 3)[2]).split(':', 1)[0].replace('_', '-')
    print("Creating " + process + " zip from " + rom + " for " + codename)
    make_archive('firmware', 'zip', 'out/')
    if path.exists('firmware.zip'):
        if process == "firmware":
            rename('firmware.zip', 'fw_' + codename + "_" + rom)
        elif process == "nonarb":
            rename('firmware.zip', 'fw-non-arb_' + codename + "_" + rom)
        elif process == "firmwareless":
            rename('firmware.zip', 'fw-less_' + codename + "_" + rom)
        print("All done!")
        rmtree("tmp")
        rmtree('out')
    else:
        print("Failed!" + '\n' + "Check out folder!")
Replace this

Code:
def make_zip():
    rom, process = arg_parse()
    with open("out/META-INF/com/google/android/updater-script", 'r') as i:
        codename = "NEW"
    print("Creating " + process + " zip from " + rom + " for " + codename)
    make_archive('firmware', 'zip', 'out/')
    if path.exists('firmware.zip'):
        if process == "firmware":
            rename('firmware.zip', 'fw_' + codename + "_.zip")
        elif process == "nonarb":
            rename('firmware.zip', 'fw-non-arb_' + codename + "_.zip")
        elif process == "firmwareless":
            rename('firmware.zip', 'fw-less_' + codename + "_.zip")
        print("All done!")
        rmtree("tmp")
        rmtree('out')
    else:
        print("Failed!" + '\n' + "Check out folder!")
The Following User Says Thank You to robinex For This Useful Post: [ View ] Gift robinex Ad-Free
7th December 2018, 02:43 PM |#3  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 5,871
 
Donate to Me
More
V1.1 is here
I was reported that there's some firmware unmounting errors with some devices like mido.
Code:
unmount of /firmware failed; no such volume
mount: failed to mount /dev/block/bootdevice/by-name/sec at /firmware: Invalid argument
It was because of inaccurate grepping of lines with "firmware" in it.
Also, there's a missing line which caused temporary updater-script to be added in firmware zip.

These issues are fixed now. You can get the new update from here:
Py script: https://github.com/XiaomiFirmwareUpd...rmware-creator
Executable files: https://github.com/XiaomiFirmwareUpd...eases/tag/V1.1
2nd January 2019, 08:54 PM |#4  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 5,871
 
Donate to Me
More
A new update is here 02-01-2019!
I've added an option to create firmware + vendor flashable zip which is good for treble devices
https://github.com/XiaomiFirmwareUpd...are-creator.py
8th January 2019, 07:33 AM |#5  
Junior Member
Thanks Meter: 0
 
More
Link to executable files is down
Hi,
the link to the executable files is down.
Can you fix it, please.

Thanks...
8th January 2019, 05:24 PM |#6  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 5,871
 
Donate to Me
More
Quote:
Originally Posted by poas12

Hi,
the link to the executable files is down.
Can you fix it, please.

Thanks...

Here you are
https://github.com/XiaomiFirmwareUpd...eleases/latest
9th January 2019, 09:43 AM |#7  
Junior Member
Thanks Meter: 0
 
More
TWRP: Error 6
Hi,
thanks for your fast support but when i try to install firmware-less.zip I get an error 6 from twrp.

Can you help me, please?
9th January 2019, 10:44 AM |#8  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 5,871
 
Donate to Me
More
Quote:
Originally Posted by poas12

Hi,
thanks for your fast support but when i try to install firmware-less.zip I get an error 6 from twrp.

Can you help me, please?

Can you give some details?
What's the device? Which ROM did you use?
Also attach twrp log after flashing.
9th January 2019, 11:03 AM |#9  
Junior Member
Thanks Meter: 0
 
More
TWRP: Error 6
Here the informations:

Xiaomi redmi Note 5 Pro (whyred)
TWRP 3.2.1.3 or TWRP 3.2.3.2
original ROM: miui_HMNote5HMNote5ProGlobal_V10.2.1.0.OEIMIXM_519 1f339c3_8.1.zip
modified ROM: fw-less_whyred_miui_HMNote5HMNote5ProGlobal_V10.2.1.0 .OEIMIXM_5191f339c3_8.1.zip

Message from twrp:

Installing zip file '/data/media/0/fw-less_whyred_miui_HMNote5HMNote5ProGlobal_V10.2.1.0 .OEIMIXM_5191f339c3_8.1.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
Updater process ended with Error: 6
Error installing zip file '/data/media/0/fw-less_whyred_miui_HMNote5HMNote5ProGlobal_V10.2.1.0 .OEIMIXM_5191f339c3_8.1.zip'
9th January 2019, 02:38 PM |#10  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 5,871
 
Donate to Me
More
Quote:
Originally Posted by poas12

Here the informations:

Xiaomi redmi Note 5 Pro (whyred)
TWRP 3.2.1.3 or TWRP 3.2.3.2
original ROM: miui_HMNote5HMNote5ProGlobal_V10.2.1.0.OEIMIXM_519 1f339c3_8.1.zip
modified ROM: fw-less_whyred_miui_HMNote5HMNote5ProGlobal_V10.2.1.0 .OEIMIXM_5191f339c3_8.1.zip

Message from twrp:

Installing zip file '/data/media/0/fw-less_whyred_miui_HMNote5HMNote5ProGlobal_V10.2.1.0 .OEIMIXM_5191f339c3_8.1.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
Updater process ended with Error: 6
Error installing zip file '/data/media/0/fw-less_whyred_miui_HMNote5HMNote5ProGlobal_V10.2.1.0 .OEIMIXM_5191f339c3_8.1.zip'

In order to know what went wrong I need to check twrp log. Please attach it.
10th January 2019, 11:09 AM |#11  
Junior Member
Thanks Meter: 0
 
More
TWRP: Error 6
Here's the log:
https://paste.tinyw.in/index.php/view/33616024
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes