How To Guide Restore OnePlus 9 to Stock via Fastboot Commands

Search This thread

toyanucci

Senior Member
May 28, 2010
850
348
OnePlus 9
I’ll give it a shot, yeah it doesn’t do anything. Can’t see a display or anything on the screen.
That happened to me as well when I tried fastboot reboot fastboot. It used to work fine but recently I did it and ended up stuck in edl. Requested a reapir from OnePlus then found that thread and the Indian msm tool got me back up and running thank God as I didn't have a replacement phone to use while I sent this one back.
 

ilikepie___

Member
Apr 25, 2021
19
0
OnePlus 9 Pro
That happened to me as well when I tried fastboot reboot fastboot. It used to work fine but recently I did it and ended up stuck in edl. Requested a reapir from OnePlus then found that thread and the Indian msm tool got me back up and running thank God as I didn't have a replacement phone to use while I sent this one back.
Unfortunately this didn’t work out for me. I’m waiting to receive a shipping label from one plus to see if they can repair the issue, if not, I’ll just wait until the new pixel comes out and go there. It seems that one plus as a company is falling behind. Yes it’s nice to have the SD888, but if this new tensor chip is gonna be good, I’m gonna go with it I believe if the cost is astronomical for the repair.
 

toyanucci

Senior Member
May 28, 2010
850
348
OnePlus 9
Unfortunately this didn’t work out for me. I’m waiting to receive a shipping label from one plus to see if they can repair the issue, if not, I’ll just wait until the new pixel comes out and go there. It seems that one plus as a company is falling behind. Yes it’s nice to have the SD888, but if this new tensor chip is gonna be good, I’m gonna go with it I believe if the cost is astronomical for the repair.
It should be repaired for free I think.
 

toyanucci

Senior Member
May 28, 2010
850
348
OnePlus 9
We’ll see. I did disassemble the phone to the point to reseat the battery so I’m going to assume it’ll cost something. Who knows though.
Oh. I hadn't opened mine. Very sorry to hear about this though but I too almost panicked when mine seems to be completely unresponsive. Thankfully the thread I mentioned helped me to fix mine but either way I'm trading this in and getting the pixel 6 pro as soon as it's available. I'm bored with OnePlus
 

MURSHIG

Member
Mar 14, 2022
21
1
what to do if I executed fastboot erase boot erase cpucp erase dtbo erase modem erase oplusstanvbk erase oplus_sec erase shrm erase splash erase qweslicstore erase vbmeta_vendor erase vbmeta_system erase vendor_boot erase vm-bootsys?
After it I rebooted my phone and now it is not booting everything, even Fastboot
 
  • Like
Reactions: daveman1010220

daveman1010220

New member
Mar 19, 2022
3
1
This guide assumes you have the SDK Platform Tools installed and working, along with USB drivers for your device (if needed), and have your full update zip which you've already extracted the payload.bin from, and then dumped the images using payload dumper. If you haven't done any of these things yet, there are plenty of other guides out there on how to do them.

Steps:

1. Reboot your device to the bootloader (power off, then hold volume up + power) and connect it to USB.
2. The following command will wipe your device. I found this to be necessary to recover my OnePlus 9:
Code:
fastboot -w
3. Now flash the following files:
Code:
fastboot flash boot boot.img
fastboot flash cpucp cpucp.img
fastboot flash dtbo dtbo.img
fastboot flash modem modem.img
fastboot flash oplusstanvbk oplusstanvbk.img
fastboot flash oplus_sec oplus_sec.img
fastboot flash qweslicstore qweslicstore.img
fastboot flash shrm shrm.img
fastboot flash splash splash.img
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash vm-bootsys vm-bootsys.img
4. Now reboot into userspace fastboot, aka fastbootd. If you don't do this, the remaining files cannot be flashed:
Code:
fastboot reboot fastboot
5. Flash the remaining files:
Code:
fastboot flash abl abl.img
fastboot flash aop aop.img
fastboot flash bluetooth bluetooth.img
fastboot flash devcfg devcfg.img
fastboot flash dsp dsp.img
fastboot flash featenabler featenabler.img
fastboot flash hyp hyp.img
fastboot flash imagefv imagefv.img
fastboot flash keymaster keymaster.img
fastboot flash multiimgoem multiimgoem.img
fastboot flash qupfw qupfw.img
fastboot flash tz tz.img
fastboot flash uefisecapp uefisecapp.img
fastboot flash xbl xbl.img
fastboot flash xbl_config xbl_config.img
fastboot flash product product.img
fastboot flash system system.img
fastboot flash system_ext system_ext.img
fastboot flash vendor vendor.img
fastboot flash odm odm.img
6. Final reboot:
Code:
fastboot reboot
7. If everything worked your phone should now boot into OxygenOS.

Note:
The files will be flashed to your currently active boot slot. If any of them fail to flash, switch to the other slot and start over from the beginning. I wasn't able to flash odm, product, system, system_ext and vendor to slot a, and had to use slot b instead. To check current slot:
Code:
fastboot getvar current-slot
To switch slots:
Code:
fastboot --set-active=a
or
Code:
fastboot --set-active=b

Use this guide at your own risk. I take no responsibility if you brick your device, set it on fire, or otherwise mess it up as a result of any of the above steps. That being said, it worked for me using 11.2.2.2.LE25AA available from the official OnePlus support website.
Hey, wanted to let someone know, I got to step four above and it appears to have bricked my phone. Fastboot is "waiting for any device". My phone is just a black screen that does not respond to any button inputs, cable attachments, re-attachments. It's toast.
 

daveman1010220

New member
Mar 19, 2022
3
1
what to do if I executed fastboot erase boot erase cpucp erase dtbo erase modem erase oplusstanvbk erase oplus_sec erase shrm erase splash erase qweslicstore erase vbmeta_vendor erase vbmeta_system erase vendor_boot erase vm-bootsys?
After it I rebooted my phone and now it is not booting everything, even Fastboot
If you ever figure this out, please do share.
 

MURSHIG

Member
Mar 14, 2022
21
1
Msm for lemonade was not working, cause it i installed msm for lemonadep eu and
flashed it with lite firehose, my phone was automatically boot to EDL
AFTER FLASHING I:
passed first launch and turn on oem unlock, unlock bootloader, download lemonade stock rom.zip, extracted payload.bin and all from payload.bin to stock_firmware folder
cd to it and executed:
fastboot flash boot boot.img
fastboot flash cpucp cpucp.img
fastboot flash dtbo dtbo.img
fastboot flash modem modem.img
fastboot flash oplusstanvbk oplusstanvbk.img
fastboot flash oplus_sec oplus_sec.img
fastboot flash qweslicstore qweslicstore.img
fastboot flash shrm shrm.img
fastboot flash splash splash.img
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vendor_boot vendor_boot.img
fastboot flash vm-bootsys vm-bootsys.img

fastboot reboot fastboot

fastboot flash abl abl.img
fastboot flash aop aop.img
fastboot flash bluetooth bluetooth.img
fastboot flash devcfg devcfg.img
fastboot flash dsp dsp.img
fastboot flash featenabler featenabler.img
fastboot flash hyp hyp.img
fastboot flash imagefv imagefv.img
fastboot flash keymaster keymaster.img
fastboot flash multiimgoem multiimgoem.img
fastboot flash qupfw qupfw.img
fastboot flash tz tz.img
fastboot flash uefisecapp uefisecapp.img
fastboot flash xbl xbl.img
fastboot flash xbl_config xbl_config.img
fastboot flash product product.img
fastboot flash system system.img
fastboot flash system_ext system_ext.img
fastboot flash vendor vendor.img
fastboot flash odm odm.img

fastboot reboot
 

Unifire

Senior Member
Apr 15, 2015
68
5
i get error

fastboot: usage: unknown reboot target fastboot when i execute:

fastboot reboot fastboot
 

ratherpleasent

New member
Jul 5, 2022
2
0
ok i kind of bricked my phone using this and i need a little help PLEASE?

Ok i tried the fist 2 steps 1. fastboot -w than the first list of commands using cmd with admin rights it worked...i think but it did load everything without issues...now i go to do the "fastboot reboot fastboot"

and now my phone is stuck on a black screen with nothing and i just hear the chime windows makes when you disconnect and reconnect a device..... and in the Device manager this comes up for 10 seconds than goes away for 5 than comes back NON STOP

i cant adb i cant do anything please help !
Same exact issue. I do not even get the connection sound when I plug the cable in and out.

This is the exact commands I ran : https://pastebin.com/pF4QpzBf

I got fastboot from this link https://drive.google.com/file/d/1Ja-xMGbaPsq96nIfZMZ96GRMdglHjsun/view from the description of this video :

IDK what to do. I'm hoping I can get back to a state where I can connect my phone and do something with fastboot. Right now I can't turn it on at all, and when I plug the charger in there's no signal to show its charging.

Any suggestions? It appears as if my phone is off and is unresponsive.
 
Last edited:

ratherpleasent

New member
Jul 5, 2022
2
0
Same exact issue. I do not even get the connection sound when I plug the cable in and out.

This is the exact commands I ran : https://pastebin.com/pF4QpzBf

I got fastboot from this link https://drive.google.com/file/d/1Ja-xMGbaPsq96nIfZMZ96GRMdglHjsun/view from the description of this video :

IDK what to do. I'm hoping I can get back to a state where I can connect my phone and do something with fastboot. Right now I can't turn it on at all, and when I plug the charger in there's no signal to show its charging.

Any suggestions? It appears as if my phone is off and is unresponsive.
NVM was able to fix this via MSM method. I ended up following this guide + this thread :

Guide : https://www.getdroidtips.com/unbrick-oneplus-9-9-pro/
Thread (where I got the Driver) : https://forum.xda-developers.com/t/...5-msmdownloadtool-waiting-for-device.4373087/

Also even though I'm a Global OP9PRO the Global MSM didn't work for me, I had to use India for whatever reason. (Global gave me an image mismatch error).
 

badlucky

Member
Jul 2, 2022
22
1
OnePlus 9
Ok bro. Did you recommend fkm ? In a12 i want flash to global firmware oos c61 then root device and use sim solution &, custom kernel . Or still oss 11.2.10.10 & Arter kernel
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hey dear. Please tell me how i do it only need platform tools ? Or other files? Please send what need to i do it
    If you use fastboot, you will likely brick your phone. Just look up the MSM Tool and save yourself the frustration.
  • 5
    This guide assumes you have the SDK Platform Tools installed and working, along with USB drivers for your device (if needed), and have your full update zip which you've already extracted the payload.bin from, and then dumped the images using payload dumper. If you haven't done any of these things yet, there are plenty of other guides out there on how to do them.

    Steps:

    1. Reboot your device to the bootloader (power off, then hold volume up + power) and connect it to USB.
    2. The following command will wipe your device. I found this to be necessary to recover my OnePlus 9:
    Code:
    fastboot -w
    3. Now flash the following files:
    Code:
    fastboot flash boot boot.img
    fastboot flash cpucp cpucp.img
    fastboot flash dtbo dtbo.img
    fastboot flash modem modem.img
    fastboot flash oplusstanvbk oplusstanvbk.img
    fastboot flash oplus_sec oplus_sec.img
    fastboot flash qweslicstore qweslicstore.img
    fastboot flash shrm shrm.img
    fastboot flash splash splash.img
    fastboot flash vbmeta vbmeta.img
    fastboot flash vbmeta_vendor vbmeta_vendor.img
    fastboot flash vbmeta_system vbmeta_system.img
    fastboot flash vendor_boot vendor_boot.img
    fastboot flash vm-bootsys vm-bootsys.img
    4. Now reboot into userspace fastboot, aka fastbootd. If you don't do this, the remaining files cannot be flashed:
    Code:
    fastboot reboot fastboot
    5. Flash the remaining files:
    Code:
    fastboot flash abl abl.img
    fastboot flash aop aop.img
    fastboot flash bluetooth bluetooth.img
    fastboot flash devcfg devcfg.img
    fastboot flash dsp dsp.img
    fastboot flash featenabler featenabler.img
    fastboot flash hyp hyp.img
    fastboot flash imagefv imagefv.img
    fastboot flash keymaster keymaster.img
    fastboot flash multiimgoem multiimgoem.img
    fastboot flash qupfw qupfw.img
    fastboot flash tz tz.img
    fastboot flash uefisecapp uefisecapp.img
    fastboot flash xbl xbl.img
    fastboot flash xbl_config xbl_config.img
    fastboot flash product product.img
    fastboot flash system system.img
    fastboot flash system_ext system_ext.img
    fastboot flash vendor vendor.img
    fastboot flash odm odm.img
    6. Final reboot:
    Code:
    fastboot reboot
    7. If everything worked your phone should now boot into OxygenOS.

    Note:
    The files will be flashed to your currently active boot slot. If any of them fail to flash, switch to the other slot and start over from the beginning. I wasn't able to flash odm, product, system, system_ext and vendor to slot a, and had to use slot b instead. To check current slot:
    Code:
    fastboot getvar current-slot
    To switch slots:
    Code:
    fastboot --set-active=a
    or
    Code:
    fastboot --set-active=b

    Use this guide at your own risk. I take no responsibility if you brick your device, set it on fire, or otherwise mess it up as a result of any of the above steps. That being said, it worked for me using 11.2.2.2.LE25AA available from the official OnePlus support website.
    4
    If you want, you can do the flashing easily with powershell, rather than running each command one after the other. Here is what I did:

    1. Have fastboot.exe in your path, or in the same folder as all your extracted images. Open powershell and navigate to the folder with your boot images. Connect your phone to USB.
    2. This will wipe your device! Reboot to the bootloader and run:
    Code:
    fastboot -w
    3. Run:
    Code:
    gci -filter *.img | where {$_.Name.split('.')[0] -match 'boot|cpucp|dtbo|modem|oplusstanvbk|oplus_sec|qweslicstore|shrm|splash|vbmeta|vbmeta_vendor|vbmeta_system|vendor_boot|vm-bootsys'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
    4. Run:
    Code:
    fastboot reboot fastboot
    5. Run:
    Code:
    gci -filter *.img | where {$_.Name.split('.')[0] -match 'abl|aop|bluetooth|devcfg|dsp|featenabler|hyp|imagefv|keymaster|multiimgoem|qupfw|tz|uefisecapp|xbl|xbl_config|product|system|system_ext|vendor|odm'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
    6. Run:
    Code:
    fastboot reboot
    7. Proceed to boot normally.

    The commands in steps 3 and 5 get a list of all files in the current directory with the .img extension, filter them to the correct ones to flash, and then flash them one after another.

    If someone wants, I can probably throw together a script to run the whole process start to finish.

    Edit: script attached. I've (unfortunately) had the opportunity to test it and fix all the bugs. So it works. You will need to have fastboot.exe accessible in your system PATH to run it.
    1
    If you want, you can do the flashing easily with powershell, rather than running each command one after the other. Here is what I did:

    1. Have fastboot.exe in your path, or in the same folder as all your extracted images. Open powershell and navigate to the folder with your boot images. Connect your phone to USB.
    2. Reboot to the bootloader and run:
    Code:
    fastboot -w
    This will wipe your device!
    3. Run:
    Code:
    gci -filter *.img | where {$_.Name.split('.')[0] -match 'boot|cpucp|dtbo|modem|oplusstanvbk|oplus_sec|qweslicstore|shrm|splash|vbmeta|vbmeta_vendor|vbmeta_system|vendor_boot|vm-bootsys'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
    4. Run:
    Code:
    fastboot reboot fastboot
    5. Run:
    Code:
    gci -filter *.img | where {$_.Name.split('.')[0] -match 'abl|aop|bluetooth|devcfg|dsp|featenabler|hyp|imagefv|keymaster|multiimgoem|qupfw|tz|uefisecapp|xbl|xbl_config|product|system|system_ext|vendor|odm'} | foreach-object { fastboot.exe flash $($_.Name.split('.')[0]) $_.Name }
    6. Run:
    Code:
    fastboot reboot bootloader
    7. Proceed to boot normally.

    The commands in steps 3 and 5 get a list of all files in the current directory with the .img extension, filter them to the correct ones to flash, and then flash them one after another.

    If someone wants, I can probably throw together a script to run the whole process start to finish.
    That would be helpful indeed. Would this script run on mac as well?
    1
    @Slikkster2k: I tried your tutorial. At first it did not work...serveral errors occure during copying one file. On the second run I had to change the slot, than it runs through.

    But now I am in a boot loop, during starting the oxygen.

    While wiping I got this message:
    Code:
    fastboot: error: Cannot generate image for userdata

    Which version of the OS did you use?

    I tried to install the actual european rom (11.2.3.3) on my indian device from china ;) but this obviously did not work. Do you have any suggestions for me?
    I used 11.2.2.2.LE25AA as I said in the original post (this is the global variant, which matches my device). I am not sure if this works for cross-flashing, or if it's possible to cross-flash an Indian phone to EU. Have you tried restoring the Indian ROM? Does that work?

    You're getting an actual boot loop? The error I was getting (and the reason I had to restore) was the phone booting to the bootloader or fastbootd (depending on the slot I tried) instead of Oxygen, because it couldn't mount the user partition due to encryption. In fastbootd an error was reported (I forget the exact one) which made me suspect it was a partition mounting issue. At no point was my phone actually boot looping, even during partial/failed flashes.

    I've never encountered the error with fastboot -w, but I only did that on my phone once. From some searching online, it can be caused by an old version of the platform tools, so did you download the latest version?
    1
    @Slikkster2k: First of all, thank you for providing help :)

    In deed, what worked was the indian first version. This i could flash and from there on everything works. Up to OS and than installing the latest european os. Now everything ist fine...

    The error while whiping did not occure while using the indian version...so no clue why...

    But now it works for me, thank you!