[GUIDE][HOW TO] Flashing with care & Surviving soft bricks with fastboot [CMD] [TIPS] - OnePlus 6T Guides, News, & Discussion

[GUIDE][HOW TO] Flashing with care & Surviving soft bricks with fastboot [CMD] [TIPS]
Hello guys, some of us are new to the A/B partitions. Flashing on wrong partition may end up in soft bricks. This is not a rooting guide, here I'm explaining how to handle flashing A/B partitions properly and survive soft bricks using fastboot . Always backup your data before flashing anything.
Those who still don't know about the A/B partitions, please take a look at this thread https://forum.xda-developers.com/oneplus-6/how-to/guide-noobs-guide-to-b-partitions-op6-t3816123
Prerequisites:
OnePlus 6T with unlocked or locked bootloader
A computer for running fastboot commands
You :laugh:
Rebooting
Rebooting your device via adb and fastboot
Code:
adb reboot //normal reboot
adb reboot recovery //reboot to recovery
adb reboot bootloader //reboot to fastboot (bootloader)
Code:
fastboot reboot //normal reboot
fastboot reboot bootloader //reboot to fastboot (bootloader)
Unlocking the Bootloader
Bootloader can be unlocked via fastboot
Code:
fastboot oem unlock
WARNING THIS WILL WIPE YOUR DATA
Working with A/B Partitions
There are two boot partitions on this device, named boot_a and boot_b respectively, they are not the “traditional” boot partitions. Both of these partitions contain a kernel and ramdisk like you are probably used to. The difference is that there is no recovery partition and the boot partition is new recovery partition. The A/B partitioning scheme can be quite confusing to users. There are actually two copies of many of the partitions. There is only one data (userdata) partition.
Slots
The concept of ‘slots’ comes into play to determine whether you are booting ‘slot A’ or ‘slot B’. We can determine which slot is ‘active’ or marked for booting via adb and fastboot:
Code:
adb shell getprop ro.boot.slot_suffix
Code:
fastboot getvar current-slot
Switching Slots
We can switch between slots via fastboot:
Code:
fastboot set_active other //switch to inactive slot
Code:
fastboot set_active (a or b) //switch to specified slot
Flashing/Booting
We can flash/boot (temporary flash) recovery/kernel via fastboot. To boot (what we call temporary flash) a kernel/recovery there is no need to switch/select any slot. Keep in mind that when we run the flash command instead of boot, it will wipe the specified partiton (you may lose your root & custom kernel)
Code:
fastboot boot boot.img or twrp_recovery.img
To flash permanently, first switch/select any slot you want or it will automatically flashed to the active slot. This may cause boot loop, always proceed with caution.
Code:
fastboot flash boot boot.img or twrp_recovery.img
Code:
fastboot flash recovery twrp_recovery.img
If your testing something, always use the inactive slot. Eg: if you want to test a custom rom, first back up your data then switch to the inactive slot and flash the custom rom, this will save your time (no need restore full backup only data).
Surviving Soft Bricks
Some possible simple solution we can try rather than using MSMTool or flashing the full rom.
When causing boot loops, try these:
Flash Magisk via recovery
Switch to the other slot via fastboot
Wipe data partiton via fastboot -w
When causing Bootloader crash, try these:
Turn off the phone by holding the power button (release after power off)
Hold both volume buttons
Now press power button
Phone will boot to fastboot
Now switch the other slot via fastboot
To be continued....

Just in case

This is my first A/B device so forgive my ignorance, I was wondering if its possible to flash two different roms on to different slots...like oxygen on one partition and lineage on other?
Also why twrp has two buttons 'slot a' and 'slot b' in reboot section?
The phone doesn't have recovery partition, so what happens on typing 'Fastboot flash recovery' command?

Thanks again for this tutorials. That's really helpful in understanding of the new Android features.
What'd be your advice on instructions to get stock kernel back? I couldn't find an appropriate command on how to do it

patelparth120595 said:
This is my first A/B device so forgive my ignorance, I was wondering if its possible to flash two different roms on to different slots...like oxygen on one partition and lineage on other?
Also why twrp has two buttons 'slot a' and 'slot b' in reboot section?
The phone doesn't have recovery partition, so what happens on typing 'Fastboot flash recovery' command?
Click to expand...
Click to collapse
You can install any rom on both slot, there is no problem. There is only one userdata partiton. The two buttons are for switching between slots, if you press slot a button, the recovery will mark slot a as bootable or active partition. On next boot or reboot rom from slot a will boot, this same thing is applied for slot b too. There is no dedicated partition for recovery , files for recovery are stored in system_root.

geminium said:
Thanks again for this tutorials. That's really helpful in understanding of the new Android features.
What'd be your advice on instructions to get stock kernel back? I couldn't find an appropriate command on how to do it
Click to expand...
Click to collapse
Get stock boot.img file and flash using fastboot
Code:
fastboot flash boot boot.img

AnoopKumar said:
You can install any rom on both slot, there is no problem. There is only one userdata partiton. The two buttons are for switching between slots, if you press slot a button, the recovery will mark slot a as bootable or active partition. On next boot or reboot rom from slot a will boot, this same thing is applied for slot b too. There is no dedicated partition for recovery , files for recovery are stored in system_root.
Click to expand...
Click to collapse
Thanks for the reply. Cleared all my doubts.

So could we have two ROMs and switch back and forth between on one device in this case?

geminium said:
So could we have two ROMs and switch back and forth between on one device in this case?
Click to expand...
Click to collapse
Because of one userdata partition, there will be some issues. If wipe data when switching roms, no issues then.

Man i could use some help patched the file moved it to harddrive tried fastboot flash boot boot.img (the patched one) and all i get is
C:\Users\seang\OneDrive\Desktop\Moto G Stylus 2021>fastboot flash boot boot.img
error: cannot open 'boot.img' Could you please make a guide with some pics or at least a step by step cause nothing i have tried has gotten root yet. Thanks!

Thanks to the OP.

Related

Flashing Issues/Permission Issues

A few days ago I got my Atrix HD and immediately rooted and subsequently unlocked the bootloader. Later I successfully flashed EcHoFiiVe's paranoidAndroid port... I didn't really like it because of the aspect ratio (too tiny) so I tried to flash back to a stock ROM. I lost and later accidentally deleted the backup I had made of the stock ROM that came on the device so that is now out of the question but for some reason, no matter what I do, I can't make changes to /system from the recovery or from the bootloader using fastboot commands. I've tried inputing
Code:
fastboot erase system -w
and it told me that I didn't have sufficient permissions and that the command failed. Therein lies my problem. Fortunately, I have a runnable backup (PA) I just really wish to try something different and the device is adamantly against the idea. According to the bootloader the device is unlocked with status code 3. Any help will be greatly appreciated!
read this
http://forum.xda-developers.com/showthread.php?t=2226527
frog1982 said:
read this
http://forum.xda-developers.com/showthread.php?t=2226527
Click to expand...
Click to collapse
I've read through that and I can now see a line that I missed that said that it was a common issue for that particular command to not work but I still don't know what to do about my inability to flash a different ROM. I have tried to mount /system before flashing and I've tried wiping /system using the recovery before flashing, all without avail. Do you have any advice on how to wipe the system partition?
you do not have to wipe it just fastboot flash Mex retail to overwrite it and you will be starting over.
frog1982 said:
you do not have to wipe it just fastboot flash Mex retail to overwrite it and you will be starting over.
Click to expand...
Click to collapse
to be clear, are you saying I can just do this:
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
Code:
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot flash system system.img
fastboot -w
fastboot reboot
sparkplugDev said:
to be clear, are you saying I can just do this:
Extract the zip
Open a terminal to the extracted zips directory
Reboot into fastboot
Type the following commands in this order
Code:
fastboot flash boot boot.img
fastboot flash devtree device_tree.bin
fastboot flash system system.img
fastboot -w
fastboot reboot
Click to expand...
Click to collapse
yes but make sure you also have the snap-fastboot files in the folder you are working in or in your path

[GUIDE] Unlock bootloader on 8.1

As you know, on 8.1 we still have ununlockable bootloader. But it's quite simple to fix, just flash 'old' bootloader
It's unofficial method
1) Go to fastboot bode (keep + button on reboot/boot your phone)
2) Use service firmware or download this https://vk.com/doc275347426_479517439 , open command promp (start.bat)
3) VERY IMPORTANT
you should know your platfotm. As I know, 2 GB (my phone) have 8917 processor, 3gb/32 have 8937. You can get your platform with this
Code:
fastboot getvar platform
4) I have 8917, so I type
Code:
fastboot flash aboot 8917_emmc_appsboot.mbn
fastboot flash abootbak 8917_emmc_appsboot.mbn
On 8937 type
Code:
fastboot flash aboot 8937_emmc_appsboot.mbn
fastboot flash abootbak 8937_emmc_appsboot.mbn
5) Reboot your phone, you should get 'device state unlocked' , if not, do like U did this on old bootloader from fastboot
6)Flash twrp as usual. In archive I already include this, you can flash it with
Code:
fastboot flash recovery twrp.img
And install magisk/SSu
Attention: if you wanna get full access for /data partition from twrp, you should flash patch with prevent autoencrypt. I did not do this, system access is enought for me.
But before you root your device, U have to erase data partition, coz root patch boot partition too, patched boot can not load stocky encrypted data. After data format you can flash magisk. When you boot phone, it will encrypt data partition and you get installed Magisk and ecrypted data
Original system/boot images, restore them with twrp https://mega.nz/#!ziJxCCqA!C0lG5hUcOGwl2ER0Mp342lfx5_DOIzalAi7RExR6nro
My phone is 8937 and device state remains locked after stage 5. And "if not, do like U did this on old bootloader from fastboot" means we should use some other adb codes? Such as?
Woohooo, the display has been turned upside down. How do I fix this?
---------- Post added at 03:24 PM ---------- Previous post was at 03:17 PM ----------
What the ??? Stock recovery is upside down, but fastboot is the right way. Is this supposed to happen?
---------- Post added at 03:45 PM ---------- Previous post was at 03:24 PM ----------
Hmmm, I think I'll pass on this method. I appreciate the effort, but too much weirdness happening with my phone.
igerup said:
My phone is 8937 and device state remains locked after stage 5. And "if not, do like U did this on old bootloader from fastboot" means we should use some other adb codes? Such as?
Woohooo, the display has been turned upside down. How do I fix this?
---------- Post added at 03:24 PM ---------- Previous post was at 03:17 PM ----------
What the ??? Stock recovery is upside down, but fastboot is the right way. Is this supposed to happen?
Click to expand...
Click to collapse
worked thanks
Display rotates only few seconds when it boot
Dreamject said:
Display rotates only few seconds when it boot
Click to expand...
Click to collapse
It doesn't bother me at all ? it worked perfectly, thanks for your work
Dreamject said:
As you know, on 8.1 we still have ununlockable bootloader. But it's quite simple to fix, just flash 'old' bootloader
It's unofficial method
1) Go to fastboot bode (keep + button on reboot/boot your phone)
2) Use service firmware or download this https://vk.com/doc275347426_479517439 , open command promp (start.bat)
3) VERY IMPORTANT
you should know your platfotm. As I know, 2 GB (my phone) have 8917 processor, 3gb/32 have 8937. You can get your platform with this
Code:
fastboot getvar platform
4) I have 8917, so I type
Code:
fastboot flash aboot 8917_emmc_appsboot.mbn
fastboot flash abootbak 8917_emmc_appsboot.mbn
On 8937 type
Code:
fastboot flash aboot 8937_emmc_appsboot.mbn
fastboot flash abootbak 8937_emmc_appsboot.mbn
5) Reboot your phone, you should get 'device state unlocked' , if not, do like U did this on old bootloader from fastboot
6)Flash twrp as usual. In archive I already include this, you can flash it with
Code:
fastboot flash recovery twrp.img
And install magisk/SSu
Attention: if you wanna get full access for /data partition from twrp, you should flash patch with prevent autoencrypt. I did not do this, system access is enought for me.
But before you root your device, U have to erase data partition, coz root patch boot partition too, patched boot can not load stocky encrypted data. After data format you can flash magisk. When you boot phone, it will encrypt data partition and you get installed Magisk and ecrypted data
Original system/boot images, restore them with twrp https://mega.nz/#!ziJxCCqA!C0lG5hUcOGwl2ER0Mp342lfx5_DOIzalAi7RExR6nro
Click to expand...
Click to collapse
dont work for me, than i do this:
1. do what you told
2. use unlock bootloader from asus website
3. repeat what you told
4. walaaa... my device unlocked, than i flash twrp and magisk
5. done, i have rooted device
:laugh::laugh::laugh:
thank you guys...
no no no ..... not work for me, and upside down the title!!!!!
I have no choice but to fix it with: xxx youtube................. /watch?v=s592QY56VjM
than restore back to oreo 8.1..........
tfstk said:
no no no ..... not work for me, and upside down the title!!!!!
I have no choice but to fix it with: xxx youtube................. /watch?v=s592QY56VjM
than restore back to oreo 8.1..........
Click to expand...
Click to collapse
if you screen rotated on thethe boot, it means you have old bl. You just needneed toto flashflash twrp, or unlock bl with fastboot
Dreamject said:
As you know, on 8.1 we still have ununlockable bootloader. But it's quite simple to fix, just flash 'old' bootloader
It's unofficial method
1) Go to fastboot bode (keep + button on reboot/boot your phone)
2) Use service firmware or download this https://vk.com/doc275347426_479517439 , open command promp (start.bat)
3) VERY IMPORTANT
you should know your platfotm. As I know, 2 GB (my phone) have 8917 processor, 3gb/32 have 8937. You can get your platform with this
Code:
fastboot getvar platform
4) I have 8917, so I type
Code:
fastboot flash aboot 8917_emmc_appsboot.mbn
fastboot flash abootbak 8917_emmc_appsboot.mbn
On 8937 type
Code:
fastboot flash aboot 8937_emmc_appsboot.mbn
fastboot flash abootbak 8937_emmc_appsboot.mbn
5) Reboot your phone, you should get 'device state unlocked' , if not, do like U did this on old bootloader from fastboot
6)Flash twrp as usual. In archive I already include this, you can flash it with
Code:
fastboot flash recovery twrp.img
And install magisk/SSu
Attention: if you wanna get full access for /data partition from twrp, you should flash patch with prevent autoencrypt. I did not do this, system access is enought for me.
But before you root your device, U have to erase data partition, coz root patch boot partition too, patched boot can not load stocky encrypted data. After data format you can flash magisk. When you boot phone, it will encrypt data partition and you get installed Magisk and ecrypted data
Original system/boot images, restore them with twrp https://mega.nz/#!ziJxCCqA!C0lG5hUcOGwl2ER0Mp342lfx5_DOIzalAi7RExR6nro
Click to expand...
Click to collapse
I've problem that if I mounted System partition in Any App,it will freeze my Systemui and can't do anything
Since 7.1.1 to 8.1 still have these problem
tony8077616 said:
I've problem that if I mounted System partition in Any App,it will freeze my Systemui and can't do anything
Since 7.1.1 to 8.1 still have these problem
Click to expand...
Click to collapse
DonT know.... Try magiskmagisk, system less stuff, change launcher, disable bloatware
Dreamject said:
As you know, on 8.1 we still have ununlockable bootloader. But it's quite simple to fix, just flash 'old' bootloader
It's unofficial method
1) Go to fastboot bode (keep + button on reboot/boot your phone)
2) Use service firmware or download this https://vk.com/doc275347426_479517439 , open command promp (start.bat)
3) VERY IMPORTANT
you should know your platfotm. As I know, 2 GB (my phone) have 8917 processor, 3gb/32 have 8937. You can get your platform with this
Code:
fastboot getvar platform
4) I have 8917, so I type
Code:
fastboot flash aboot 8917_emmc_appsboot.mbn
fastboot flash abootbak 8917_emmc_appsboot.mbn
On 8937 type
Code:
fastboot flash aboot 8937_emmc_appsboot.mbn
fastboot flash abootbak 8937_emmc_appsboot.mbn
5) Reboot your phone, you should get 'device state unlocked' , if not, do like U did this on old bootloader from fastboot
6)Flash twrp as usual. In archive I already include this, you can flash it with
Code:
fastboot flash recovery twrp.img
And install magisk/SSu
Attention: if you wanna get full access for /data partition from twrp, you should flash patch with prevent autoencrypt. I did not do this, system access is enought for me.
But before you root your device, U have to erase data partition, coz root patch boot partition too, patched boot can not load stocky encrypted data. After data format you can flash magisk. When you boot phone, it will encrypt data partition and you get installed Magisk and ecrypted data
Original system/boot images, restore them with twrp https://mega.nz/#!ziJxCCqA!C0lG5hUcOGwl2ER0Mp342lfx5_DOIzalAi7RExR6nro
Click to expand...
Click to collapse
Hi, thank to you I have unlocked my phone in 8.1.
But when I tried to downgrade to nougat, home and fingerprint botton won't work. I had tried relocking bootloader and lock again using nougat method, but still home button won't work.
Do you have any idea to fix home button so I can use nougat firmware in this device?
komtek said:
Hi, thank to you I have unlocked my phone in 8.1.
But when I tried to downgrade to nougat, home and fingerprint botton won't work. I had tried relocking bootloader and lock again using nougat method, but still home button won't work.
Do you have any idea to fix home button so I can use nougat firmware in this device?
Click to expand...
Click to collapse
You should flash service nougat
Dreamject said:
You should flash service nougat
Click to expand...
Click to collapse
I'm sorry, can you tell me what service nougat is? Did you mean play service, or other service?
komtek said:
I'm sorry, can you tell me what service nougat is? Did you mean play service, or other service?
Click to expand...
Click to collapse
you can find service fw at least on 4pda. Service fw contained more data than usual fw
Dreamject said:
you can find service fw at least on 4pda. Service fw contained more data than usual fw
Click to expand...
Click to collapse
Thanks to @Dreamject I have managed broken fingerprint sensor when I tried to downgrade to 7.1
Here is quick guide to fix broken fp sensor in 7.1:
(Prerequisites: adb driver installed on computer)
1. Download service firmware nougat v.232-AFT https://yadi.sk/d/IzR3ITht2IlHxw (source 4pda)
2. Extract firmware to root C://
3. Open flashall_AFT.bat
4. Go to fastboot mode and connect the phone to computer. (NOTE: YOU MUST ON 8.1 FIRMWARE UNLESS FP SENSOR WON'T FIXED)
5. Wait ~10 minutes until finished.
Mother Russia)
By the way, be careful, coz it contains as o remember service Oreo too.
If file name 14.2016 it's nougat, if 15.2016 it's Oreo
link is gone, pls fix the link
Bootloader ReLocked Problem same as WW-15.2016.1812.505,So contiue used these step
Dreamject said:
As you know, on 8.1 we still have ununlockable bootloader. But it's quite simple to fix, just flash 'old' bootloader
It's unofficial method
1) Go to fastboot bode (keep + button on reboot/boot your phone)
2) Use service firmware or download this https://vk.com/doc275347426_479517439 , open command promp (start.bat)
3) VERY IMPORTANT
you should know your platfotm. As I know, 2 GB (my phone) have 8917 processor, 3gb/32 have 8937. You can get your platform with this
Code:
fastboot getvar platform
4) I have 8917, so I type
Code:
fastboot flash aboot 8917_emmc_appsboot.mbn
fastboot flash abootbak 8917_emmc_appsboot.mbn
On 8937 type
Code:
fastboot flash aboot 8937_emmc_appsboot.mbn
fastboot flash abootbak 8937_emmc_appsboot.mbn
5) Reboot your phone, you should get 'device state unlocked' , if not, do like U did this on old bootloader from fastboot
6)Flash twrp as usual. In archive I already include this, you can flash it with
Code:
fastboot flash recovery twrp.img
And install magisk/SSu
Attention: if you wanna get full access for /data partition from twrp, you should flash patch with prevent autoencrypt. I did not do this, system access is enought for me.
But before you root your device, U have to erase data partition, coz root patch boot partition too, patched boot can not load stocky encrypted data. After data format you can flash magisk. When you boot phone, it will encrypt data partition and you get installed Magisk and ecrypted data
Original system/boot images, restore them with twrp https://mega.nz/#!ziJxCCqA!C0lG5hUcOGwl2ER0Mp342lfx5_DOIzalAi7RExR6nro
Click to expand...
Click to collapse
I've make a flashable which can used with ZF4 Max update ROM(script and binary based on WW-15.2016.1812.505,file is from OP post)
-Just flash it after stock ROM update

[ROM][STOCK][FASTBOOT][OP6T] Stock Fastboot ROMs for OnePlus 6T

Things are changing with the advent of project treble and seamless updates. OnePlus will no longer release ROMs flashable via recovery (either stock or twrp) because is no more needed. The updates will be done on the slot not used for example if you are using slot a the update will be installed on slot b and the slot b will be set as default. If you brick and you are in bootloop how you can restore the rom? You can't with Stock ROM you have, because the zip can be only installed via Update Engine, so what can you do? Flash a stock rom via fastboot. I have extracted all images from the stock zip and i have made a new zip with the Fastboot ROM with a flash-all.bat included. This will work only if your bootloader is unlocked. This will erase all your data and will wipe your internal storage.
HOW TO FLASH
This version is only for not branded devices
Download the zip;
Unpack the zip in a folder;
Reboot the OnePlus 6T in fastboot mode (Power and volume-);
Connect the OnePlus 6T to PC;
Run flash-all.bat flasher you need;
Wait until the process end;
The phone will automatically reboot.
FLASHER ADVANCED GUIDE
flash-all-partitions-fastboot.bat : this .bat will flash all possible partitions through fastboot (Except persist) , there are some criticals partitions that can't be flashed through fastboot;
flash-only-persist.bat : this .bat will flash only persist partition in fastboot mode (This is good for people that have problems with sensor);
flash-all-partitions-recovery-criticals.bat : this .bat will boot the twrp and will flash criticals partitions, use this carefully;
flash-system-boot-vendor.bat : this .bat is the same of older flash-all.bat and so it will flash only vendor, system and boot;
flash-all-partitions.bat : this .bat will run flash-all-partitions-fastboot.bat , then flash-only-persist.bat and then flash-all-partitions-recovery-criticals.bat .
Now usually the one needed is only the first "flash-all-partitions-fastboot.bat" but if you are badly bricked i recommend to use flash-all-partitions.bat .
DOWNLOAD
All roms on AFH: https://www.androidfilehost.com/?w=files&flid=284914
All roms on Sourceforge: https://sourceforge.net/projects/fastbootroms/files/OnePlus 6T
BRANDED PHONE
GUIDE: https://forum.xda-developers.com/on...-t-mobile-oneplus-6t-to-t3865966/post78131430
T-Mobile OnePlus 6T Internationa ROM: https://www.androidfilehost.com/?fid=11410963190603845445
MANUAL FLASH: Windows - OSX - Linux
If you want to manual flash these roms these are the commands (you need to extract images.zip before proceed)
Fastboot Partitions:
Code:
fastboot flash aop_a aop.img
fastboot flash aop_b aop.img
fastboot flash bluetooth_a bluetooth.img
fastboot flash bluetooth_b bluetooth.img
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash dsp_a dsp.img
fastboot flash dsp_b dsp.img
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash fw_4j1ed_a fw_4j1ed.img
fastboot flash fw_4j1ed_b fw_4j1ed.img
fastboot flash fw_4u1ea_a fw_4u1ea.img
fastboot flash fw_4u1ea_b fw_4u1ea.img
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot flash oem_stanvbk oem_stanvbk.img
fastboot flash qupfw_a qupfw.img
fastboot flash qupfw_b qupfw.img
fastboot flash storsec_a storsec.img
fastboot flash storsec_b storsec.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot flash vbmeta_a vbmeta.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_b vendor.img
fastboot flash LOGO_a LOGO.img
fastboot flash LOGO_b LOGO.img
If you need also persist partition, this is the command:
Code:
fastboot flash persist persist.img
Criticals Partitions, for these you need to boot the TWRP:
Code:
fastboot boot TWRP.img
When you are in TWRP you need to run these commands to push and flash all criticals partitions:
Code:
adb push abl.img /sdcard/abl.img
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_a
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_b
adb push cmnlib.img /sdcard/cmnlib.img
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_a
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_b
adb push cmnlib64.img /sdcard/cmnlib64.img
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_a
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_b
adb push devcfg.img /sdcard/devcfg.img
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_a
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_b
adb push hyp.img /sdcard/hyp.img
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_a
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_b
adb push keymaster.img /sdcard/keymaster.img
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_a
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_b
adb push xbl.img /sdcard/xbl.img
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_a
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_b
adb push xbl_config.img /sdcard/xbl_config.img
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_a
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_b
REMEMBER
"Invalid sparce file format at header magic" is not an error, you need to wait a bit when you see that string, just wait.
These ROMs can't be used to update or downgrade your phone but just to restore your phone, so don't use them to come back to oreo or to update from oreo to pie.
If you want to rebrand your phone from HydrogenOS to OxygenOS you can follow this guide: Rebrand Guide
If you want you can use also my tool to flash Factory Images, unlock bootloader, flash twrp or to understand if the device is recognized: https://toolaio.tk/
Thanks to @SaiBork for first time tested
If you got some problems like write error or no partition, check this: https://forum.xda-developers.com/showpost.php?p=76658555&postcount=34
Thanks to @Dark Nightmare for T-Mobile Rom Version
DONATE LINK
If you want to support this and others my projects please consider making a donation, thanks.
If you are unable to use pools or moneybox, you can also make a normal donation, all private donations will be added in the moneybox:
​
Thanks Mister :good:
Great work, thx
This is great work. Thanks!
If anyone has the T-Mobile firmware or OTA captured, please post it.
Would it be wise to extract the zip to the 6T prior to rooting just in case something goes wrong?
shizat63 said:
Would it be wise to extract the zip to the 6T prior to rooting just in case something goes wrong?
Click to expand...
Click to collapse
This fastboot rom are completely stock rom, not modified
mauronofrio said:
This fastboot rom are completely stock rom, not modified
Click to expand...
Click to collapse
Right.
So before rooting the device, would it be good to copy the images from this zip to a dir on the 6T in case something goes wrong with the rooting process? For example if Magisk or TWRP mess something up, and the 6T is in a bootloop.
Or are the images in the zip only for flashing from your PC to the 6T? So it would be of no use to have the images sitting on the 6T as a backup.
Hello. after flashing with flash-all.bat, my 6T just boots to the bootloader unlocked warning and stays there. I don't know what to do next.
EDIT: Nevermind, after trying again it worked.
shizat63 said:
Right.
So before rooting the device, would it be good to copy the images from this zip to a dir on the 6T in case something goes wrong with the rooting process? For example if Magisk or TWRP mess something up, and the 6T is in a bootloop.
Or are the images in the zip only for flashing from your PC to the 6T? So it would be of no use to have the images sitting on the 6T as a backup.
Click to expand...
Click to collapse
Actually there is not a twrp that support decryption so if you also have the images on the phone you can't flash it in twrp mode. At this moment these roms can be only flashed through fastboot with a pc
Seoyoon said:
Hello. after flashing with flash-all.bat, my 6T just boots to the bootloader unlocked warning and stays there. I don't know what to do next.
EDIT: Nevermind, after trying again it worked.
Click to expand...
Click to collapse
Perfect:good:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
nhshah7 said:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
Click to expand...
Click to collapse
Perfect:good:
If you want to support this and others my projects please consider making a donation, thanks.
After using flash-all.bat I'm getting the "Your device is corrupt" red error message on boot. I can skip by pressing power twice and phone boots normally.
I see people with 6 had to use MSM download tool to get rid of the error.
Is there any solution for 6T?
nhshah7 said:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
Click to expand...
Click to collapse
Just for the sake of your sanity in the future, if you can get to bootloader and device files are available, you can always get it up and running. I learned that very quickly way back in the day
iaTa said:
After using flash-all.bat I'm getting the "Your device is corrupt" red error message on boot. I can skip by pressing power twice and phone boots normally.
I see people with 6 had to use MSM download tool to get rid of the error.
Is there any solution for 6T?
Click to expand...
Click to collapse
Only msm tool i think
Well same situation here got boot loop trying to root then after install using flashall.bat now I can't get a VOLTE and now I complete lost signal but when I swap my sim card to sim slot 2 everything work...kinda weir but does anyone know how to fix it?
_BГ@ckθut said:
Well same situation here got boot loop trying to root then after install using flashall.bat now I can't get a VOLTE and now I complete lost signal but when I swap my sim card to sim slot 2 everything work...kinda weir but does anyone know how to fix it?
Click to expand...
Click to collapse
Did you have a branded version?
mauronofrio said:
Did you have a branded version?
Click to expand...
Click to collapse
Oh I has unlock one from on plus website and use it on Verizon...is that what u mean...sorry I'm new to OP device
Edit: I try to do fastboot flash modem A and B also factory reset but seem not work...
_BГ@ckθut said:
Oh I has unlock one from on plus website and use it on Verizon...is that what u mean...sorry I'm new to OP device
Click to expand...
Click to collapse
Branded version are different, they have a particoular partitions for volte, i think the only.method to solve your problem is to find another person with the same branded device and make a partitions backup that you can restore
mauronofrio said:
Branded version are different, they have a particoular partitions for volte, i think the only.method to solve your problem is to find another person with the same branded device and make a partitions backup that you can restore
Click to expand...
Click to collapse
So how do I make that? Do I need provide any information or anything?

Magisk and TWRP not working as aspected

H there,
TWRP and Magisk are not wot working as aspected.
First I tried to flash TWRP by
Code:
fastboot flash recovery recovery.img
but received
Code:
(bootloader) Invalid partition name recovery
So I had to just boot it
Code:
fastboot boot recovery.img
After that I "installed recory image" in TWRP itself. But when I try to boot into recovery it get stuck. So i had to do
Code:
fastboot boot recovery.img
again.
Any ideas what i did wrong or how to solve this?
Then I installed Magisk. To do that I had to drop an boot.img file, let the Magisk-App creates an pahteched version of it and than, back in bootloader
Code:
fastboot boot magisk_patched...img
Now i have root access. But when rebooting regularly the Magisk-App has no root and so all the other apps also not. So i had to boot that img again.
That CAN'T be the right way.
Thx in advance!
It's probably because you have A/B partitions on your device. To flash it successfully you'll need TWRP 3.5.0+. You can learn more about why is it so different from this XDA article.
You can check if your device supports A/B partitions through this app.
Follow this guide on how to flash it on A/B partitions, you can get TWRP from here (Beckham) or here (Addison).
Goodluck.

Question [SOLVED] ran "adb reboot fastboot" instead of "adb reboot bootloader", now I can't boot or reboot normally.

It's started when I mistakenly ran "adb reboot fastboot" instead of "adb reboot bootloader" (I want to flash magisk image), now I can't boot and reboot normally, whenever I boot I always get a blank screen and need to press power button and then hold the down button (to enter fastboot mode). On fastboot mode, I need to run "fastboot continue" in order to boot normally so I can use my phone right now. I also can't boot into recovery (I use PixelOS recovery). My device is Redmi 9T and my current ROM is Elixir ROM. Any clue to fix it ? Thanks.
PS : I'm feeling dumb right now and still able to use the phone.
there is probably command in cache partition that causes to boot into fastbootd. format cache from fastboot maybe it helps.
aIecxs said:
there is probably command in cache partition that causes to boot into fastbootd. format cache from fastboot maybe it helps.
Click to expand...
Click to collapse
Thanks I'll try it soon.
aIecxs said:
there is probably command in cache partition that causes to boot into fastbootd. format cache from fastboot maybe it helps.
Click to expand...
Click to collapse
I just tried this morning with "fastboot erase cache" command and still same, still boot to blankscreen and need to use "fastboot continue" to boot normally.
some devices get instructions from misc or fota partition. but do not erase partition! for some devices it contains important phone specific data, can't tell you.
Yeah, I read somewhere about that. Perhaps, I will try to reflash using fastboot ROM (since recovery / twrp can't be installed right now).
Solved, thanks, I just need to flash fox recovery.
Thanks for zerohime from telegram group for the advice, and alecxs too.

Categories

Resources