• 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

MPK99

Senior Member
Jun 25, 2017
492
304
Mexico
gitlab.com
Redmi Note 10
I can't install gapps with all available recoveries, it keeps giving me the not enough space error
1. Know if the ROM you flash is vanilla.
2. Read the ROM threads & posts.
3. If it's vanilla, it's dev must be recommending what GApps to flash.
Not all gapps are compatible with all ROMs. It depends on how the dev builds the ROM.
4. Must follow the exact installation procedure recommended in the post.
 

sahbimath

Member
Oct 11, 2015
22
3
1. Know if the ROM you flash is vanilla.
2. Read the ROM threads & posts.
3. If it's vanilla, it's dev must be recommending what GApps to flash.
Not all gapps are compatible with all ROMs. It depends on how the dev builds the ROM.
4. Must follow the exact installation procedure recommended in the post.
I've tried multiple gapps, multiple recoveries they always end up with the same error, not enough space in the system partition, I cannot even install the rom with twrp 3.5.2 so I switched to the latest pe recovery but I still cannot install gapps
 

MPK99

Senior Member
Jun 25, 2017
492
304
Mexico
gitlab.com
Redmi Note 10
I've tried multiple gapps, multiple recoveries they always end up with the same error, not enough space in the system partition, I cannot even install the rom with twrp 3.5.2 so I switched to the latest pe recovery but I still cannot install gapps
I'm sorry we can't assist you as you lack knowledge of custom roms.
Pixel Experience is not Vanilla. It includes gapps, & you're trying gapps on top of it.
I hope someone can guide u in the future or you can research lil bit.

Thank you.
 

sahbimath

Member
Oct 11, 2015
22
3
I'm sorry we can't assist you as you lack knowledge of custom roms.
Pixel Experience is not Vanilla. It includes gapps, & you're trying gapps on top of it.
I hope someone can guide u in the future or you can research lil bit.

Thank you.
lol bro, I didn't say which rom I was installing and I was clearly referencing the PE recovery.
I've installed crdroid 7.8 through the fastboot tool that you've provided in this thread yet it cannot allow me to install gapps, the system partition is somehow locked to the original size and nothing can be installed on top of it.
Flame gapps are what I'm trying to install.
Thanks for your understanding.
 

MPK99

Senior Member
Jun 25, 2017
492
304
Mexico
gitlab.com
Redmi Note 10
lol bro, I didn't say which rom I was installing and I was clearly referencing the PE recovery.
I've installed crdroid 7.8 through the fastboot tool that you've provided in this thread yet it cannot allow me to install gapps, the system partition is somehow locked to the original size and nothing can be installed on top of it.
Thanks for your understanding.
Read crdroid main post to know the details of gapps installation.
 

nierewa

Senior Member
Jan 22, 2018
81
1
7
Hi,

I try to flash LineageOS with your script.

All seems good but it gets stuck to "waiting for device"
Phone is in Fastboot mode and connect to PC
 

Zirila

Senior Member
Jul 31, 2015
167
62
Hi,

I try to flash LineageOS with your script.

All seems good but it gets stuck to "waiting for device"
Phone is in Fastboot mode and connect to PC
this means you don't have the correct drivers installed to make the device work in fastboot mode.

you could download MiFlash and there in the menu choose install drivers. then you get the ones that work with fastboot.
 

nierewa

Senior Member
Jan 22, 2018
81
1
7
this means you don't have the correct drivers installed to make the device work in fastboot mode.

you could download MiFlash and there in the menu choose install drivers. then you get the ones that work with fastboot.
Thanks for your fast answer. You are really great.
I found it (y)

Edit:
Too fast. Now it gets stuck again.
In device manager it says driver needed for device: mojito
Where can I get this drivers? MiFlash doesn't included it.
 

Zirila

Senior Member
Jul 31, 2015
167
62
it's there in the MiFlash Tool menu bar. just install the drivers, ignore chinese error message.
if it's installed but it doesn't work (it should), you might try the general android ADB drivers (google it)

or you could install official Xiaomi Mi PC Suite software it has drivers too.
 

Attachments

  • 2021-07-20_10-40-12.png
    2021-07-20_10-40-12.png
    15.6 KB · Views: 15

MPK99

Senior Member
Jun 25, 2017
492
304
Mexico
gitlab.com
Redmi Note 10
It is possible that I did not understand all the processes correctly, but your tool did not work as it should for me with PE+.
Everything that preceded it:
- In a functional old version of PE+, I did an OTA update.
- After a reboot, the system should have updated, but it was left hanging in the system loading (even for tens of minutes).
- So I made a dirty flash using your tool. Without a factory reset, I booted the system, but it still hung in startup. During the flash process, it seemed to me that something was flash only to the A slot, and something to both A and B. This led me to the idea of editing the flash slots manually.
- So I had system, system_ext, product and vendor flashed into both slots. This resulted in the system booting without factory settings. However, the system started as new, without data and settings.
- I then experimented a bit and uploaded using flash to A, then flash to B, different systems. If I ran the last flash A system, it worked. Then I changed the active slot to the first flash B slot and also the second system started. But the other system started updating and performed some action. It kept working. I rebooted into the active A slot again, but the previous A system no longer started.

There must be a bug somewhere in the current use of updates and flash custom ROMs.
As far as the tool goes, I tried to implement installation on inactive slot, but seems like space is not enough to create. So I had to install the images on the active slot & leave it like that...
 

StaryMuz

Senior Member
Dec 27, 2012
354
102
!! 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
 

MPK99

Senior Member
Jun 25, 2017
492
304
Mexico
gitlab.com
Redmi Note 10
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
Ah, tnx for that, reuploaded
 
Last edited:

pauloecs

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

Is this script/tool enough to install crDroid 7.8 ?

There are some delete/recreate partitions in this script. Can I reflash MIUI in the future?
 

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.