• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

General [Tool] Flash Custom ROMs through Fastboot [mojito / sunny]

Search This thread

syntheticdingo

Senior Member
Apr 3, 2021
64
15
Unlike for Windows, the instructions don't mention the need to install drivers in Ubuntu, I would like to confirm that it is indeed the case. Can anyone confirm?
I just got my RN10 and I am waiting to get the bootloader unlocked, so I havent been able to test the tool yet.
 

MPK99

Senior Member
Jun 25, 2017
487
302
Mexico
gitlab.com
Redmi Note 10
Unlike for Windows, the instructions don't mention the need to install drivers in Ubuntu, I would like to confirm that it is indeed the case. Can anyone confirm?
I just got my RN10 and I am waiting to get the bootloader unlocked, so I havent been able to test the tool yet.
Linux doesn't need as android-tools take care everything.
 
  • Like
Reactions: syntheticdingo

pauloecs

Member
Jul 25, 2015
28
2
www.mi.com
I started with a RN10 ( stock MIUI 12.0.10 )

I installed crDroid using this tool, ended up in Recovery, formated Data, rebooted (current slot A) > Bootloop

What else to do ? Now all reboots ends up in Fastboot screen (even pressing Vol Up + On/off)
(I flashed using Linux version)
 

MPK99

Senior Member
Jun 25, 2017
487
302
Mexico
gitlab.com
Redmi Note 10
I started with a RN10 ( stock MIUI 12.0.10 )

I installed crDroid using this tool, ended up in Recovery, formated Data, rebooted (current slot A) > Bootloop

What else to do ? Now all reboots ends up in Fastboot screen (even pressing Vol Up + On/off)
(I flashed using Linux version)
Try redownloading fastboot OTA as I reuploaded it couple days ago with some shell script fixes...
 

MPK99

Senior Member
Jun 25, 2017
487
302
Mexico
gitlab.com
Redmi Note 10
This procedure is for fastboot rom and as of know there is not fastboot rom for miui 12.5
The tool is strictly for recovery roms. Why would I include fastboot script when fastboot roms already come with their own scripts?
Also explain the bootloop. Did you wait for 10 minutes on MIUI logo ?
And you need to post the terminal outputs here, so that I can help you with the tool.
 

muneeb rizwan

Senior Member
Mar 19, 2019
73
10
Redmi Note 10
The tool is strictly for recovery roms. Why would I include fastboot script when fastboot roms already come with their own scripts?
Also explain the bootloop. Did you wait for 10 minutes on MIUI logo ?
And you need to post the terminal outputs here, so that I can help you with the tool.
Sorry I accidently wrote fastboot instead of recovery
after i install it it goes to the miui logo and after some seconds it just restarts
 

StaryMuz

Senior Member
Dec 27, 2012
348
101
I seem to have run into a problem with the script.

1) files are not extracted to the images folder and the final deletion does not work
2) stock boot.img is uploaded only to one of the slots and if the appropriate slot is not active, it does not switch to recovery from tools, but to the existing recovery (it would be appropriate to "flash boot_a and flash boot_b")
 

MPK99

Senior Member
Jun 25, 2017
487
302
Mexico
gitlab.com
Redmi Note 10
I seem to have run into a problem with the script.

1) files are not extracted to the images folder and the final deletion does not work
2) stock boot.img is uploaded only to one of the slots and if the appropriate slot is not active, it does not switch to recovery from tools, but to the existing recovery (it would be appropriate to "flash boot_a and flash boot_b")
1. I don't use Images folder from aug 2nd script update, everything will get extracted to root folder
2. No interaction exists with stock boot image, & OTA script already has twrp boot image that has working fastbootD. Flashing boot image done in the active slot & also booted into active slot only. Inactive slot is never utilized in any case.
 

StaryMuz

Senior Member
Dec 27, 2012
348
101
After the initial run, the script wanted to delete the image folder it didn't find at the end. On subsequent runs this was no longer a problem. Why this happened I did not find out.

After running the script, the ROM was unpacked and the boot.img was loaded.
Rebooted into PixelExp. recovery, instead of TWRP.
Then came the errors of the next flash.
When I modified the script for flash boot_a/b, it worked correctly.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Didn't use latest update because on changelog it's talking about Ubuntu, Linux and mac. so Skipped it since I'm on windows.

    The roms size is below 4.5 . Anyway I will try your trick next time and will see.

    Thanks 😊
    Haha, It's just a changelog for linux script.
    And ya, apologize for not including that changelog. Hope you can work out the script without issues.
  • 4
    Are you struggling to install custom roms on this device?
    Lots of recovery errors?
    Can't boot to any rom?
    Don't worry. Fastboot is a good way to avoid such nonsense...
    ota-update-using-adb-fastboot_proc.jpg

    Install any custom rom & miui recovery rom through fastboot

    Steps:
    1. Extract Fastboot OTA Tool. Put the ROM zip in it's root.
    2. Run the flash script.
    3. Wait till the script asks for device.
    4. Boot device to fastboot & connect.

    After Installation, it'll be headed to recovery:
    You can format to start fresh (or)
    Just boot up, for dirty flash way

    Windows users:
    Make sure you have usb drivers installed. This is done only once.
    Refer this on how to install them... Download USB Drivers from here.

    Linux users: Must have latest python & pip

    For Ubuntu distros:
    sudo apt install python python-pip
    And have an alias into ~/.bashrc or ~/.bash_aliases file:
    alias python=python3

    For Arch based distros:
    sudo pacman -S python python-pip

    For Fedora:
    sudo dnf install snapd python3.9 python3-pip

    For Mac users, make sure you allow img2simg tool from Privacy & Security to work. Or Disable Gatekeeper temperorily.

    Thanks to @LoV432 for his auto extraction idea.
    & @lyoko_xana to bringup Mac issues.
    If you have any trouble using this tool, please feel free to reply here...

    Happy flashing
    3
    According to the script, it is used exclusively for pure flash.
    Can you please make an option for upgrade (dirty flash) as well?
    It does dirty flash bydefault (caz it doesn't affect data partition). It'll be clean flash only when you wipe from recovery at post install... 🙂
    I've edited post & clarified this...
    2
    Update: 18/08/21

    Changelog:
    • Switched to 12.5.2 stock fastbootd
    • Fixed fastboot issues on ubuntu
    • Separate scripts for linux & mac from now
    2
    !! Fastboot OTA Tool Update !!

    Fastboot_OTA_20210802.zip
    Usage instructions in the main post.
    There is an error in the script (probably by copying).

    echo Flashing boot partitions...
    tools\fastboot %* reboot bootloader
    tools\fastboot %* flash boot_a boot.img
    tools\fastboot %* flash boot_b boot.img
    tools\fastboot %* flash vendor_boot_b vendor_boot.img
    tools\fastboot %* flash vendor_boot_b vendor_boot.img
    1
    this tool doesn't seem to work with xiaomi eu roms
    Currently, it's only for OTA based roms, that have payload.bin in it.
    I'll update the script for eu roms too when I get time.