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

Anybody is pro/has much experience with Fastboot/Mi Flash Tool/Stock Recovery?

Search This thread

rodagola

Senior Member
Nov 13, 2019
64
0
Yes, don't do that. Hardbrick behave the same as your phone now. So it's pointless.
Also brother, I just tried to hit readback button while on bootloop, I also loaded mi auth bypass stuff normally, only steps that required volup press I skipped, but this gave NO results (it didn't pull any .img file or anything at all, so I had to click stop button)

So I'd have to find a way to have the download method available to me in the first place and I'm worried even the removing battery idea won't allow me to do that

ANOTHER THING TO NOTICE is that after looking inside the scatter file for miui "12.0.5.0" , I found my userdata string on the same position as you did and with the exact same values.... Then I looked for the same lines within a "12.5.1.0" one, guess what, still had the same values of:

"physical_start_addr: 0x1d2800000" & "partition_size: 0x300000000"

Maybe these lines are the same for all begonia. However, even if I manage to pull an .img file as you said, we don't even know how to make it readable or accesible, or better yet, restorable again to a begonia. You gave me that tutorial because you actually pulled an .img file right? And you assume it has all your data encrypted in some way
 

kekesed97

Senior Member
Also brother, I just tried to hit readback button while on bootloop, I also loaded mi auth bypass stuff normally, only steps that required volup press I skipped, but this gave NO results (it didn't pull any .img file or anything at all, so I had to click stop button)

So I'd have to find a way to have the download method available to me in the first place and I'm worried even the removing battery idea won't allow me to do that

ANOTHER THING TO NOTICE is that after looking inside the scatter file for miui "12.0.5.0" , I found my userdata string on the same position as you did and with the exact same values.... Then I looked for the same lines within a "12.5.1.0" one, guess what, still had the same values of:

"physical_start_addr: 0x1d2800000" & "partition_size: 0x300000000"

Maybe these lines are the same for all begonia. However, even if I manage to pull an .img file as you said, we don't even know how to make it readable or accesible, or better yet, restorable again to a begonia. You gave me that tutorial because you actually pulled an .img file right? And you assume it has all your data encrypted in some way
Yep that's the problem. I once pulled out NVDATA partition that way. The only way to restore it is to flash it back either via custom recovery, or fastboot, or SPFT (that download tab). If your data partition is problematic (as my suspicion), restoring it back would yield the same problem, so you'd better off.
 

rodagola

Senior Member
Nov 13, 2019
64
0
Yep that's the problem. I once pulled out NVDATA partition that way. The only way to restore it is to flash it back either via custom recovery, or fastboot, or SPFT (that download tab). If your data partition is problematic (as my suspicion), restoring it back would yield the same problem, so you'd better off.
I havent tried flashing v12.5.1 yet through miflashpro recovery, you told me this would have different encryption system for data compared to my current 12.0.5. It's likely going to stay bootlooped on MI logo/before lockscreen, this already happened when I flashed 12.0.5 from 12.0.4, it stayed the same. Not sure if going up to 12.5.1 would be any different because the different data treatment.

Besides, your method of pulling and restoring is a little smart. Even if it would yield corruption again, I at least could try. The thing is I have no clue what would it yield as of now.

Since 12.5.1 is more sensitive, I'm unsure if I should try upgrading to it through miflashpro first, and then if that doesn't work, keep on with the SPFT readback method. However, I think there might be a new difference on the readback method if I'm on miui 12.5.1 compared to 12.0.5, can't confirm though, so this is also scary

I guess I can use one of those hair dryes/heaters to open the back cover now, but then I have no experience at disconnecting/reconnecting batteries, do you know if RN8P's is particularily hard to mess with? or link to any videos that show much detail
 

rodagola

Senior Member
Nov 13, 2019
64
0
Custom recovery can have full access to mtp and adb. But that is out of your reach now.

What about that readback feature on SPFT? It can read back raw data from your emmc regardless of your phone status. But the problem is reading that data. The format is linux ext. Using something that can mount ext images is the solution. I have tried some programs but I can't manage to open it. Trying it won't hurt you anyway.

It requires mi auth bypass so the process is quite the same except instead of flash, go to readback tab.

View attachment 5388369
Figure 6: SPFT Readback Interface

Locate the scatterfile and open it. Find "userdata" string.

View attachment 5388371
Figure 7: Scatter File

Note this two lines :
Code:
    physical_start_addr: 0x1d2800000
    partition_size: 0x300000000

Back to readback window. Click on Add. It will show a new line in the table. Double click on it.

View attachment 5388375
Figure 8: A new line is added.

After double clicking on it, new window shall appear that ask you where to put the output file. Name it to any name with .img extension. Hit save.

View attachment 5388377
Figure 9: Filesave prompt window

Now input the values following the scatter file. As per "Region", select "USER". Then hit OK.

View attachment 5388381
Figure 10: Input parameters

After that, hit "Readback".

View attachment 5388387
Figure 11: Ready to execute the readback command.

Your redback data will be saved as "yourfile.img".
Hi! It's been a while. But I finally managed to do the readback data straight from the emmc!!! I had to let my phone dry of battery for days to manage it without having to remove battery

Now I have the .img file on my PC and can test it whenever I want, that's one relief.

Then I proceeded to flash and wipe all data in order for the phone to finally boot normally. Now I'm finally at system after setting it up "for the first time" again.

NOW I NEED TWRP to flash the .img file I got from the drawback process, am I right? Or is there any other way to get this readback data back on the phone?

Please read this too, a little observation of mine:

I'm sitting on MIUI 12.0.5 right now. And I installed it from SPFT.

...the readback process only worked after loading up the scatter file. Which makes me THINK my device will only accept reading the userdata I had before (through custom recovery flashing) only while I'm on this version.

If this flashing will bring my data corrupted again, MY THEORY is that then I will need to try with the previous version I had before 12.0.5. This is because the data I had when I bricked it was on an older version, and maybe I need to set the device as close as it was right at the time of my brick.

That older version I'm talking about is 11.0.3. If you know if there's a difference in how these handle data.,or if the differences are only after 12.0.6, please tell me. So I have a better clue on that.

.......
Lastly, Getting TWRP means I need to unlock the bootloader ASAP. Do you know a way to do this for begonia device without waiting many days on the official server method?
 

kekesed97

Senior Member
It's been a while. Glad that you have fixed the phone part.

There is few method to flash that .img file:
1. TWRP (select flash and then select flash image)
2. Fastboot (just run "fastboot flash userdata yourimage.img" command)
3. SPFT (only provide scatter file and userdata.img file in a folder)

Scatter file is just flash file mapping. It doesn't govern versioning, your firmware does. So the chance is quite high for a succesful restore. About data readability, that one is another story.

About data compatibility. From my experience, there are almost no problem in userdata from flashing miui back and forth (upgrade and downgrade) so the same theory might be applicable in this situation. The difference starts with 12.0.7, 12.0.8, and 12.5.x. Downgrading from those versions resulting bootloop (fixable with just flashing the correct version of miui)

And about unlocking bootloader... Unfortunately, no. There aren't any workaround for that. I would highly recommend to unlock your bootloader this time around while you have your phone up and running. Do it before you doing something else, just in case.
 

rodagola

Senior Member
Nov 13, 2019
64
0
It's been a while. Glad that you have fixed the phone part.

There is few method to flash that .img file:
1. TWRP (select flash and then select flash image)
2. Fastboot (just run "fastboot flash userdata yourimage.img" command)
3. SPFT (only provide scatter file and userdata.img file in a folder)

Scatter file is just flash file mapping. It doesn't govern versioning, your firmware does. So the chance is quite high for a succesful restore. About data readability, that one is another story.

About data compatibility. From my experience, there are almost no problem in userdata from flashing miui back and forth (upgrade and downgrade) so the same theory might be applicable in this situation. The difference starts with 12.0.7, 12.0.8, and 12.5.x. Downgrading from those versions resulting bootloop (fixable with just flashing the correct version of miui)

And about unlocking bootloader... Unfortunately, no. There aren't any workaround for that. I would highly recommend to unlock your bootloader this time around while you have your phone up and running. Do it before you doing something else, just in case.
okay, to use fastboot OR TWRP I need bootloader unlocked anyways, maybe not the SPFT method.

can you link me to an easy and (readable) video tutorial on the bootloader unlocking process for begonia, like... an effective video that goes straight to the point?
 

kekesed97

Senior Member
okay, to use fastboot OR TWRP I need bootloader unlocked anyways, maybe not the SPFT method.

can you link me to an easy and (readable) video tutorial on the bootloader unlocking process for begonia, like... an effective video that goes straight to the point?

If you search any xiaomi bootloader unlocking video, that will work (they use the same, unified process for that). But here is the text guide:
Prerequisites:
1. Miui account. Login to that account on your device
2. SMS ability. You will need to use the same sim card during the unlocking process
3. Internet connection
4. I will recommend to turn the find device on for this occation
5. Patience

How-to:
1. Head to https://en.miui.com/unlock/
2. Download the Mi Unlock tools
3. Follow the onscreen instructions

If nothing interfering, your request will be approved by next week. Don't check the timer repeatedly in a week span. I think once in a while is fine, but many user got their permission approval prolonged by such an action.
 

rodagola

Senior Member
Nov 13, 2019
64
0
If you search any xiaomi bootloader unlocking video, that will work (they use the same, unified process for that). But here is the text guide:
Prerequisites:
1. Miui account. Login to that account on your device
2. SMS ability. You will need to use the same sim card during the unlocking process
3. Internet connection
4. I will recommend to turn the find device on for this occation
5. Patience

How-to:
1. Head to https://en.miui.com/unlock/
2. Download the Mi Unlock tools
3. Follow the onscreen instructions

If nothing interfering, your request will be approved by next week. Don't check the timer repeatedly in a week span. I think once in a while is fine, but many user got their permission approval prolonged by such an action.
Hi, it's been a while. But I had to travel. Now I managed to unlock bootloader on my RN8P...

but I tried flashing twrp after that and it soft bricked the phone instead of a succesful instalation.

Which tutorial do you recommend? I've been reading around and says something about A/B partition thing but IDK any of this. Really haven't have the time as I've been really away and now I'm afraid this is taking an eternity for me to reach my end goal. Only you have saved me before, so I'm sorry to bother and bet my hopes on you sir, thanks a lot for all your tips.

Well, I downloaded the corresponding latest begonia image for twrp. Loaded it up correctly for my id'd device on "xiaomi toolv2 by francesco". selected flash this specific file and boom... didn't work. Then now on bootloop, I can launch with voldown+power the fastboot menu. So I then tried to reflash over what already has been flashed the same twrp image. Should I try with a zip file instead of an .img? Isn't this the same. Anyways, after entering the command "fastboot flash recovery twrp.img" on my PC and it showing on the fastboot menu as loading correctly, it goes back again and bootloops again. Tried a different twrp version and it's the same. What should I do now to fix this...?
 

kekesed97

Senior Member
Which firmware version are you currently at? Different firmware version needs different approach. And as for miui 12.5.x, they have no root solution without clean install at this moment, or rather, it may not have as Xiaomi has declared EOL for this device. You will want to abandon MIUI of you want the latest version of Android with root previlege. It still doable with data wipe tho, but I haven't done it myself so I have no confidence to tell you that it is yay or nay.
But you have just unlocked your bootloader, which means you will not have to worry about any data since it got wiped away when you unlock the bootloader. So this is your chance before you have to make another sacrifice. Choose wisely. It heavily depends on your end goal.

Oh yeah, about A/B recovery, Xiaomi doesn't implement it. From what I know, A/B recovery works the same way as how little kernel works. B acts as a backup when A recovery fails. So in that case, you will need to flash both partition in order to get things done. I might be wrong, I never handled such phones before.
 

Kirasu2080

Senior Member
Aug 10, 2021
139
31
Redmi Note 8 Pro
[/QUOTE]
Hi, it's been a while. But I had to travel. Now I managed to unlock bootloader on my RN8P...

but I tried flashing twrp after that and it soft bricked the phone instead of a succesful instalation.

Which tutorial do you recommend? I've been reading around and says something about A/B partition thing but IDK any of this. Really haven't have the time as I've been really away and now I'm afraid this is taking an eternity for me to reach my end goal. Only you have saved me before, so I'm sorry to bother and bet my hopes on you sir, thanks a lot for all your tips.

Well, I downloaded the corresponding latest begonia image for twrp. Loaded it up correctly for my id'd device on "xiaomi toolv2 by francesco". selected flash this specific file and boom... didn't work. Then now on bootloop, I can launch with voldown+power the fastboot menu. So I then tried to reflash over what already has been flashed the same twrp image. Should I try with a zip file instead of an .img? Isn't this the same. Anyways, after entering the command "fastboot flash recovery twrp.img" on my PC and it showing on the fastboot menu as loading correctly, it goes back again and bootloops again. Tried a different twrp version and it's the same. What should I do now to fix this...?
Bootloop because you flash wrong twrp. Official one only support A9 i think. You can go around Rom/kernel topic and some recovery you can use their. Or you can join Telegram group with notes, update roms/twrp and someone else help. Or just Youtube and search, not that hard.
 
Last edited:

rodagola

Senior Member
Nov 13, 2019
64
0
Which firmware version are you currently at? Different firmware version needs different approach. And as for miui 12.5.x, they have no root solution without clean install at this moment, or rather, it may not have as Xiaomi has declared EOL for this device. You will want to abandon MIUI of you want the latest version of Android with root previlege. It still doable with data wipe tho, but I haven't done it myself so I have no confidence to tell you that it is yay or nay.
But you have just unlocked your bootloader, which means you will not have to worry about any data since it got wiped away when you unlock the bootloader. So this is your chance before you have to make another sacrifice. Choose wisely. It heavily depends on your end goal.

Oh yeah, about A/B recovery, Xiaomi doesn't implement it. From what I know, A/B recovery works the same way as how little kernel works. B acts as a backup when A recovery fails. So in that case, you will need to flash both partition in order to get things done. I might be wrong, I never handled such phones before.
It was running MIUI 12.0.5 based on A10. Some guy said twrp only supports A9 and below for this device? Is this why I got bootloop?

I only want twrp, so how does one install twrp correctly on begonia? If the correct way is from A9 or below, I should just downgrade using mi tool to like MIUI 11 I guess?
 

kekesed97

Senior Member
It was running MIUI 12.0.5 based on A10. Some guy said twrp only supports A9 and below for this device? Is this why I got bootloop?

I only want twrp, so how does one install twrp correctly on begonia? If the correct way is from A9 or below, I should just downgrade using mi tool to like MIUI 11 I guess?
Unnecessarily wrong. A10 have TWRP. Even A11 have working one, just not on vanilla MIUI.
I think it's there somewhere in this forum, just look for TWRP A10 or Orangefox A10, both are perfectly working. But personally I prefer Orangefox over TWRP because it have startup lock. Oh don't forget to patch vbmeta by command
Code:
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
If you don't do this you you will have an eternal bootloop.
Use the latest platform-tools for this command to work, and grab the vbmeta.img from your firmware package.
 

rodagola

Senior Member
Nov 13, 2019
64
0
Unnecessarily wrong. A10 have TWRP. Even A11 have working one, just not on vanilla MIUI.
I think it's there somewhere in this forum, just look for TWRP A10 or Orangefox A10, both are perfectly working. But personally I prefer Orangefox over TWRP because it have startup lock. Oh don't forget to patch vbmeta by command
Code:
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
If you don't do this you you will have an eternal bootloop.
Use the latest platform-tools for this command to work, and grab the vbmeta.img from your firmware package.
Okay sir. the vbmeta is found on a fastboot rom or where? and should I place this file on the adb platform folder before running such command?
 

rodagola

Senior Member
Nov 13, 2019
64
0
It's available on both fastboot rom and firmware package (the 67 mb ones).
Just put the vbmeta image in the fastboot folder and run a command prompt from there
this vbmeta flashing should be done right (before) flashing twrp, correct?
Also, what is this Orangefox feature about? What is startup lock useful for?

another thing to note is that nobody ive seen in tutorials is flashing any vbmeta before twrp on a10 begonia, and it's still doing the job
 
Last edited:

kekesed97

Senior Member
this vbmeta flashing should be done right (before) flashing twrp, correct?
Also, what is this Orangefox feature about? What is startup lock useful for?

another thing to note is that nobody ive seen in tutorials is flashing any vbmeta before twrp on a10 begonia, and it's still doing the job
Closing vbmeta is done after flashing the recovery.
Well, as its name suggest, it ask your password/pin for accessing your recovery. It is a nice countermeasure against unathorized access, isn't it? In case your phone goes missing, since custom recovery allows you to enter adb and MTP.

Maybe they are not using MIUI? It's a given when android's chain of trust is broken AVB will tripped, leading to bootloop.
 

rodagola

Senior Member
Nov 13, 2019
64
0
Closing vbmeta is done after flashing the recovery.
Well, as its name suggest, it ask your password/pin for accessing your recovery. It is a nice countermeasure against unathorized access, isn't it? In case your phone goes missing, since custom recovery allows you to enter adb and MTP.

Maybe they are not using MIUI? It's a given when android's chain of trust is broken AVB will tripped, leading to bootloop.
i just found a supposedly working twrp for a10 on yt, i'm about to flash it w command through fastboot, but doesnt it immediatly goes back to attempt to boot into system after this? how would I have enough time to input the vbmeta command right after then?
 

kekesed97

Senior Member
i just found a supposedly working twrp for a10 on yt, i'm about to flash it w command through fastboot, but doesnt it immediatly goes back to attempt to boot into system after this? how would I have enough time to input the vbmeta command right after then?
Fastboot flash isn't supposed to have an automatic restart. If you enter fastboot reboot it will boot your device to system.
Hold volume down if you are unsure when a command will reboot to system or not.