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

Search This thread

rodagola

Senior Member
Nov 13, 2019
64
0
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.
I just flashed twrp and it said okay over the platform tool cmd. but when i power off and hit power
+ volup then release power upon seeing mi logo I'm booting to vanilla recovery xD what the heck, does this mean twrp wasnt installed or am I accessing it the wrong way?
 

rodagola

Senior Member
Nov 13, 2019
64
0
What u mean by LRTWRP?

Also on yt I saw the guy entered twrp advanced setting and then checked "close the boot verification avb2.0" instead of the vbmeta as you say, isnt this the same? what would be the difference?
 

kekesed97

Senior Member
What u mean by LRTWRP?

Also on yt I saw the guy entered twrp advanced setting and then checked "close the boot verification avb2.0" instead of the vbmeta as you say, isnt this the same? what would be the difference?
It's a twrp that compiled by LR team for this specific purpose in the past. I think they are the ones that successfully built twrp for this device for the first time, but I might be wrong.

And about vbmeta patching in twrp, it's more or less the same
 

rodagola

Senior Member
Nov 13, 2019
64
0
It's a twrp that compiled by LR team for this specific purpose in the past. I think they are the ones that successfully built twrp for this device for the first time, but I might be wrong.

And about vbmeta patching in twrp, it's more or less the same
Nevermind my last message! (I simply followed a different tutorial on yt and it worked). I now got twrp without errors and can turn off and boot into twrp again from button combination. This was the video that got me succesfully patching everything alongside the installation.

BUT this TWRP version is called "Begonia recovery project" ¿?¿? not sure if this is better or worse than "LRTWRP" or if they have different benefits. Probably the same.

Anyways. NOW I FINALLY want to try to flash the .img file I managed to store on my PC from the SP FLASH TOOL "readback" tab !!!!! Remember (?) Holy shhht.... it's been months.

I couldn't flash it before because I hadn't started not even the bootloader unlock process. Now I have TWRP. So how would you recommend I do it? I will reply to the older comment now so you have more context and clarity as to where we left off back in like september. also HUGE thanks to you dude, you've been a HERO KEKESED97
 

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".
:D Now I've saved for a while an .img that weighs 12GB so I know "readback" on SPFT actually extracted personal data, not sure if corrupted still, but worth giving a try to restore through flashing this experimental file back on the phone.

I finally got TWRP as I just told you, how exactly should this be done according to your god-level tips? It's a crossing fingers deal right now. Because supposedly the personal data partition could have been corrupted back when I extracted, it could very well not work as much as it could. So please guide me with your god-level tips and it might end on the positive side. Thanks a million (once again can't be more thankful tbh)
 

kekesed97

Senior Member
:D Now I've saved for a while an .img that weighs 12GB so I know "readback" on SPFT actually extracted personal data, not sure if corrupted still, but worth giving a try to restore through flashing this experimental file back on the phone.

I finally got TWRP as I just told you, how exactly should this be done according to your god-level tips? It's a crossing fingers deal right now. Because supposedly the personal data partition could have been corrupted back when I extracted, it could very well not work as much as it could. So please guide me with your god-level tips and it might end on the positive side. Thanks a million (once again can't be more thankful tbh)
Make a backup, full backup through TWRP, keep this backup elsewhere, just in case. I don't remember TWRP can flash userdata so use fastboot or SPFT. Make sure you are not logged in to any account and don't use any lockscreen method.
 

rodagola

Senior Member
Nov 13, 2019
64
0
Make a backup, full backup through TWRP, keep this backup elsewhere, just in case. I don't remember TWRP can flash userdata so use fastboot or SPFT. Make sure you are not logged in to any account and don't use any lockscreen method.
why would I make a backup through TWRP? Not sure if you remember but in this thread the purpose was to reinstall a clean OS and I did, so my OS has nothing. I only started the bootloader process so I can have fastboot access, etc. But for this it already wiped everything so what should I take a backup of? I think you got confused on this part. It already has a clean OS without any settings changed except usb debugging turned on, that's all, no mi account and no lockscreen other than the default swipe.

Anyway, on the fastboot menu, how do I flash userdata by just using a command? I named my .img as "spft readback"

Should I simply input a cmd command called "fastboot flash spft readback.img" while on the folder that contains this file? That simple?

If this fails, would it be more recommended to try SPFT instead? (Every time it fails I could just restore back to the clean OS by going to fastboot menu and flashing with mitool the fastboot rom I have saved of the same exact OS version - and I think this shouldn't delete TWRP or is that a problem?). But the goal is to make the img file with my readback userdata work somehow, just looking for your last guidance on this :D
 

kekesed97

Senior Member
why would I make a backup through TWRP? Not sure if you remember but in this thread the purpose was to reinstall a clean OS and I did, so my OS has nothing. I only started the bootloader process so I can have fastboot access, etc. But for this it already wiped everything so what should I take a backup of? I think you got confused on this part. It already has a clean OS without any settings changed except usb debugging turned on, that's all, no mi account and no lockscreen other than the default swipe.

Anyway, on the fastboot menu, how do I flash userdata by just using a command? I named my .img as "spft readback"

Should I simply input a cmd command called "fastboot flash spft readback.img" while on the folder that contains this file? That simple?

If this fails, would it be more recommended to try SPFT instead? (Every time it fails I could just restore back to the clean OS by going to fastboot menu and flashing with mitool the fastboot rom I have saved of the same exact OS version - and I think this shouldn't delete TWRP or is that a problem?). But the goal is to make the img file with my readback userdata work somehow, just looking for your last guidance on this :D
Well, always take backup from working system when experimenting with your phone. In case when something goes south, you won't have unnecessary headaches. Even in case of IMEI loss. Take backup, regardless of the purpose. But of course, the choice is yours.
I think the partition is "userdata" so the command will be "fastboot flash userdata yourimage.img". It's better to remove the spaces from your file.
Yes, if fastboot fails you need to try SPFT. And if it fails, here is where your backup comes in. You just need to restore the data partition, or wipe it via TWRP, this shouldn't affect any other partition so you don't have to back to square one.
 

rodagola

Senior Member
Nov 13, 2019
64
0
Well, always take backup from working system when experimenting with your phone. In case when something goes south, you won't have unnecessary headaches. Even in case of IMEI loss. Take backup, regardless of the purpose. But of course, the choice is yours.
I think the partition is "userdata" so the command will be "fastboot flash userdata yourimage.img". It's better to remove the spaces from your file.
Yes, if fastboot fails you need to try SPFT. And if it fails, here is where your backup comes in. You just need to restore the data partition, or wipe it via TWRP, this shouldn't affect any other partition so you don't have to back to square one.
Hi, so I attempted to flash my img file directly to the userdata partition using fastboot, it threw an issue on cmd saying the file size is too big and the max allowed to flash was 1.3million something which I belive is 1.3GB.

So this means I'd need to load up SPFT I guess. I do not know how to proceed accordingly with this tool. I still have it on my PC along with fastboot roms laying around. I recall I'd have to load a scatter file and depending on the partition I want to modify I need to lookup some values specifically or something. Please shed me light on this.

On the download tab on SPFT (for flashing), how exactly do I prepare this single file for flashing?
 

kekesed97

Senior Member
Hi, so I attempted to flash my img file directly to the userdata partition using fastboot, it threw an issue on cmd saying the file size is too big and the max allowed to flash was 1.3million something which I belive is 1.3GB.

So this means I'd need to load up SPFT I guess. I do not know how to proceed accordingly with this tool. I still have it on my PC along with fastboot roms laying around. I recall I'd have to load a scatter file and depending on the partition I want to modify I need to lookup some values specifically or something. Please shed me light on this.

On the download tab on SPFT (for flashing), how exactly do I prepare this single file for flashing?
A seperate folder that only contain scatter file and your backup image. Load it from there.
 

rodagola

Senior Member
Nov 13, 2019
64
0
A seperate folder that only contain scatter file and your backup image. Load it from there.
How to proceed now? Having the scatter on this separate folder it didn't show the loading process like it would while on the firmware folder. Not sure if that makes any difference

Should I check userdata box now and then how to load the backup image? should I select it on the download agent? or should download agent always be the path of the spft software itself?

See attached images and pls help me through these final steps as I'm still the noob, remember you're the pro
 

Attachments

  • IMG_20211130_223735.jpg
    IMG_20211130_223735.jpg
    5.5 MB · Views: 9
  • IMG_20211130_224010.jpg
    IMG_20211130_224010.jpg
    1.8 MB · Views: 9
Last edited:

kekesed97

Senior Member
How to proceed now? Having the scatter on this separate folder it didn't show the loading process like it would while on the firmware folder. Not sure if that makes any difference

Should I check userdata box now and then how to load the backup image? should I select it on the download agent? or should download agent always be the path of the spft software itself?

See attached images and pls help me through these final steps as I'm still the noob, remember you're the pro
It seems you need to name your backup file as the partition name. Try changing the filename to userdata.img and reload the scatter file.
 

rodagola

Senior Member
Nov 13, 2019
64
0
It seems you need to name your backup file as the partition name. Try changing the filename to userdata.img and reload the scatter file.
It now auto choosed userdata after naming the same, thanks! the thing is on "download only" mode, (I think this is the correct choice for this), authentication box empty (maybe that's okay?) Just need your last advice.

Also my phone will be recognized if plugged in while on fastboot, yeah? If I remember correctly, I need to hit download button first, then connect cable to the PHONE last.
 

kekesed97

Senior Member
It now auto choosed userdata after naming the same, thanks! the thing is on "download only" mode, (I think this is the correct choice for this), authentication box empty (maybe that's okay?) Just need your last advice.

Also my phone will be recognized if plugged in while on fastboot, yeah? If I remember correctly, I need to hit download button first, then connect cable to the PHONE last.
Empty auth is not okay. Do the deepflash unlock exploit sequence agan everytime you need to interact with SPFT. And yes, use download only.

Yes, that is the correct sequence to enter deepflash mode.
 

rodagola

Senior Member
Nov 13, 2019
64
0
Empty auth is not okay. Do the deepflash unlock exploit sequence agan everytime you need to interact with SPFT. And yes, use download only.

Yes, that is the correct sequence to enter deepflash mode.
okay, I would move the "auth_sv5.auth" file to the separate folder, probably doesn't matter where auth is located though
 

kekesed97

Senior Member
Also authentication box is empty. (There's an auth file i used while restoring the phone while it was hardbricked with the exploit method, not sure if I'm going to need it again for this different kind of flashing, probably now need to leave the auth box empty, but unsure)
You will need to do that method again everytime you interact with SPFT
 

rodagola

Senior Member
Nov 13, 2019
64
0
You will need to do that method again everytime you interact with SPFT
Okay I did, but I got a red bar,

I'm sorry for bothering you so much man,

Here I will attach my personal error as image and you tell me if there's any idea
 

Attachments

  • preloader.png
    preloader.png
    42.1 KB · Views: 9
Last edited: