[RECOVERY][OFFICIAL]TWRP 3.3.1-0 Touch Recovery [begonia]

theimpulson

Forum Mod - Recognized Dev - 20 minutes over
Staff member
Sep 22, 2014
1,315
3,129
153
22
Bhilai, India
Instructions on how you can flash stock ROMs again from official TWRP as some users were having issues while flashing. The process is pretty simple.

- First of all, grab the proper recovery firmware from Xiaomi's site. You can get it here or here. Make sure to download the proper variant as per your device and needs.

- Once downloaded, open it using an archive manager and delete the compability.zip archive in it. This archive enforces version checks and is supposed to stop the flashing process if there is a mismatch of specified firmware requirements by OEM. Read more on it here.

- Now go navigate into META-INF directory or its sub-directories and locate updater-script which pass instructions on which partitions are supposed to be flashed. This script contains various assert which need to be removed. Find lines such as:
Code:
assert(set_emmc_writable("/sys/block/mmcblk0boot1/force_ro"),
       package_extract_file("preloader.img", "/dev/block/mmcblk0boot1"));
and
Code:
assert(set_emmc_writable("/sys/block/mmcblk0boot0/force_ro"),
       package_extract_file("preloader.img", "/dev/block/mmcblk0boot0"));
Remove all such lines.

Save the changes and now flash the build. It should flash successfully without any issues. Remember to disable AVB as it will render your device unbootable if you wish to flashback TWRP again.
 

CommonNonsense

New member
Feb 13, 2020
1
0
0
Seems image is corrupted

twrp-3.3.1-0-begonia.img image size is ~29Mb, but it should be normally ~65Mb. Just check any other twrp image size.
I am surprised for the TeamWin not checking what is put in their official archive.
 

heygretel

New member
Dec 13, 2015
3
0
0
Actually this image got me out of bootloop caused by the one I downloaded from teamwin site. It helped me to flash the global rom (11.0.6) on a Chinese unit. I guess I'll go without root for few more days and hope everything will works out fine by the time I flash magisk with it.
Thanks for your hard work.
 

rizd

Member
Apr 29, 2014
8
1
0
Please fix the the brightness issue. The twrp recovery starts with a blank screen. My phone is a cn set with global rom v11.0.2 PGGMIXM installed.
 
Last edited:

zx0

New member
Feb 10, 2020
3
0
0
I may say something stupid here, but I dont exactly see how TWRP brightness bug, in recovery then, could affect Fastboot screen brightness (which is a completely different boot from what I understand) if you directly boot into Fastboot (vol- + power).

If anyone can enlighten me, I would really appreciate.

Thanks.
I don't understand either, I could not get to fastboot at all! Holding up or down both go to blank screens.
 

KIIIPro

Member
Jul 25, 2018
12
0
0
Is there a special reason why TW_DEFAULT_BRIGHTNESS is set to zero?
I've followed the instructions on the Megathread (flashed preloader, disabled avb, etc.).
With my global device and this official TWRP version I also suffer this brightness issue. I Just have a blackscreen while being in TWRP.

Is there a way to set the TWRP brightness through adb?
P.S.: besides the brightness I believe everything works

Thanks in advance.
 

crazyboy87

Senior Member
Jun 6, 2008
68
13
0
Instructions on how you can flash stock ROMs again from official TWRP as some users were having issues while flashing. The process is pretty simple.

- First of all, grab the proper recovery firmware from Xiaomi's site. You can get it here or here. Make sure to download the proper variant as per your device and needs.

- Once downloaded, open it using an archive manager and delete the compability.zip archive in it. This archive enforces version checks and is supposed to stop the flashing process if there is a mismatch of specified firmware requirements by OEM. Read more on it here.

- Now go navigate into META-INF directory or its sub-directories and locate updater-script which pass instructions on which partitions are supposed to be flashed. This script contains various assert which need to be removed. Find lines such as:
Code:
assert(set_emmc_writable("/sys/block/mmcblk0boot1/force_ro"),
       package_extract_file("preloader.img", "/dev/block/mmcblk0boot1"));
and
Code:
assert(set_emmc_writable("/sys/block/mmcblk0boot0/force_ro"),
       package_extract_file("preloader.img", "/dev/block/mmcblk0boot0"));
Remove all such lines.

Save the changes and now flash the build. It should flash successfully without any issues. Remember to disable AVB as it will render your device unbootable if you wish to flashback TWRP again.
with which tool should we flash this edited rom?
 

theimpulson

Forum Mod - Recognized Dev - 20 minutes over
Staff member
Sep 22, 2014
1,315
3,129
153
22
Bhilai, India
Instructions on how you can flash stock ROMs again from official TWRP as some users were having issues while flashing. The process is pretty simple.

- First of all, grab the proper recovery firmware from Xiaomi's site. You can get it here or here. Make sure to download the proper variant as per your device and needs.

- Once downloaded, open it using an archive manager and delete the compability.zip archive in it. This archive enforces version checks and is supposed to stop the flashing process if there is a mismatch of specified firmware requirements by OEM. Read more on it here.

- Now go navigate into META-INF directory or its sub-directories and locate updater-script which pass instructions on which partitions are supposed to be flashed. This script contains various assert which need to be removed. Find lines such as:

and


with which tool should we flash this edited rom?
TWRP
 
  • Like
Reactions: polfrank and izabn

jackeagle

Forum Moderator- Rec Dev - Dev Relations.
Staff member
Apr 11, 2013
3,365
8,884
263
XDA
Mod Edit

Thread cleaned.

Kindly do not share links from other sources in this thread. Developers work hard towards stability of recovery and its time consuming process. It is not like first build and all works as expected. Kindly have patience so that developer can respond and work towards any issues that encounter.
Giving links from other sources just discourages his hard work and time spent on project.
I hope this won't be repeated in future.

jackeagle
Forum Moderator
 

lordjubblydave

Senior Member
Aug 28, 2010
90
5
0
Can anyone help me with this.
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

I get an error regarding --disable verity not being a valid command ??