[ROM][STOCK][FASTBOOT][OP6] Stock Fastboot ROMs for OnePlus 6

Search This thread

mauronofrio

Recognized Developer
Jun 29, 2012
4,359
13,624
24
Castellana Grotte
toolaio.tk
Things are changing with the advent of project treble and seamless updates. OnePlus will no longer release ROMs flashable via stock recovery (with twrp is possible but not recommended). 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
Download the zip;
Unpack the zip in a folder;
Reboot the OnePlus 6 in fastboot mode (Power and volume-);
Connect the OnePlus 6 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=271877
All roms on Sourceforge: https://sourceforge.net/projects/fastbootroms/files/OnePlus 6/

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

DONATE LINK

If you want to support this and others my projects please consider making a donation, thanks.

 
Last edited:

mauronofrio

Recognized Developer
Jun 29, 2012
4,359
13,624
24
Castellana Grotte
toolaio.tk
So how do we install the OTA update when we have twrp installed?..
Always through fastboot?...

No, with Update Engine. With project treble the updates are installed from an Android app called Update Engine in the slot that you are not using, when you reboot the device after the update, the slot will be changed and you will have the update. The stock recovery is there only to wipe your memory if needed and there is no longer the recovery partition but the recovery is included in the boot partition.


will this erase internal storage?

Yes, i added it on first post



If you get some errors write it here and i will help you to solve it
 

Bradl79

Senior Member
May 25, 2008
3,357
4,583
J'Ville
No, with Update Engine. With project treble the updates are installed from an Android app called Update Engine in the slot that you are not using, when you reboot the device after the update, the slot will be changed and you will have the update. The stock recovery is there only to wipe your memory if needed and there is no longer the recovery partition but the recovery is included in the boot partition.




Yes, i added it on first post

so it pretty much puts it back to factory settings. So even with us being rooted and having a custom recovery, will we be able to get OTA's or will we have to wipe our phones on every update?
 

mikex8593

Senior Member
Nov 28, 2016
305
98
will this erase internal storage?

---------- Post added at 07:17 PM ---------- Previous post was at 07:15 PM ----------



did this work for u?

I restored it via the unofficial twrp by flashing the stock zip in recovery, but it was a pain because the new modded version didn't support mtp and the original was extremely slow and didn't load with anything on the internal storage. It was a painful process with repeated failures and if I had this method, would've saved a lot of frustration. I will definitely try next time I brick, which I do a lot....

---------- Post added at 07:24 PM ---------- Previous post was at 07:23 PM ----------

Maybe I'll just take one for the team and intentionally brick to try for sure :cool:
 

Bradl79

Senior Member
May 25, 2008
3,357
4,583
J'Ville
I restored it via the unofficial twrp by flashing the stock zip in recovery, but it was a pain because the new modded version didn't support mtp and the original was extremely slow and didn't load with anything on the internal storage. It was a painful process with repeated failures and if I had this method, would've saved a lot of frustration. I will definitely try next time I brick, which I do a lot....

---------- Post added at 07:24 PM ---------- Previous post was at 07:23 PM ----------

Maybe I'll just take one for the team and intentionally brick to try for sure :cool:

have for u to brick but that would be great to know if this works, b/c i don't think there has been any tests on it, would u be able to make a video of it too?
 

mikex8593

Senior Member
Nov 28, 2016
305
98
have for u to brick but that would be great to know if this works, b/c i don't think there has been any tests on it, would u be able to make a video of it too?

Maybe in a week or so because I have a cold at the moment. I could probably do a video on my PC with no audio.
 

cultofluna

Senior Member
Nov 25, 2015
3,860
1,925
Google Pixel 4 XL
Google Pixel 5
So we can just take the OTA when it drops like stock users?..
And how about root?
After any update we flash root through twrp?..
Sory for so.many questions but im on OP3T now and im planning to upgrade to OP6...
This A/B think is totally new for me..
Trying to clear things out...
 

mauronofrio

Recognized Developer
Jun 29, 2012
4,359
13,624
24
Castellana Grotte
toolaio.tk
so it pretty much puts it back to factory settings. So even with us being rooted and having a custom recovery, will we be able to get OTA's or will we have to wipe our phones on every update?

If you make an update you will lose root and twrp, but if you run magisk manager before reboot after the update you can keep the root.

I forget to say that the latest TWRP have the support for Update Engine
 

uragan1987

Member
Jan 14, 2015
17
2
did unlock and flash twrp, did a try to install a clear system, now system wont boot and twrp crash at start after some second
looks like a bug at twrp, cause no system on phone
 

Flying Fox

Senior Member
Dec 21, 2010
594
778
Vienna
OnePlus 9 Pro
flash-all.bat dont works for me,
unzip, fastboot, start flash-all.bat > result: show me current folder and exit, after 1sec

Sure that you have entered the correct path into cmd? If so and it still doesn't work, maybe follow the instructions of this post: https://forum.xda-developers.com/showpost.php?p=76632484&postcount=82, at least type the shown commands into cmd. These are, what the bat file includes, but now "manually".
If it still doesn't work you maybe have to install another adb version (like shown in the linked post).

But before, try it once more with @mauronofrio method and make sure that
- your phone is in fastboot mode
- the zip is unzipped to one new folder, which only includes the unzipped files
- and that you entered the correct path via cmd (if you are on windows).
- and wait... some files flashing need a while
- while that, don´t touch the display of the op6 (even not, when it is shown lock.... unlock bootloader - just wait)
 
Last edited:

uragan1987

Member
Jan 14, 2015
17
2
thx Flying Fox, you push me to right way

this is inside bat:

flash-all.bat
Code:
@echo off
title Mauronofrio flashall :P
for %%f in (""CurrentDIR.bat"") DO @SET currDir_=%%~df%%~pf
echo.
echo Current Directory = %currDir_%
SET ANDROID_PRODUCT_OUT=%currDir_%
pause

cant see commands here for fastboot
at this script is only setup for ANDROID_PRODUCT_OUT
will be nice, to update script and include this code too:
https://forum.xda-developers.com/showpost.php?p=76632484&postcount=82
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Will u make a 10.3.11 fastboot zip? Thanks in advance, it helped me a lot
    here you go:

    keep in mind that I simply compressed like the other one I made but didn't try it yet.
    so I'll take no responsability for any issue you may have with it.
  • 223
    Things are changing with the advent of project treble and seamless updates. OnePlus will no longer release ROMs flashable via stock recovery (with twrp is possible but not recommended). 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
    Download the zip;
    Unpack the zip in a folder;
    Reboot the OnePlus 6 in fastboot mode (Power and volume-);
    Connect the OnePlus 6 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=271877
    All roms on Sourceforge: https://sourceforge.net/projects/fastbootroms/files/OnePlus 6/

    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

    DONATE LINK

    If you want to support this and others my projects please consider making a donation, thanks.

    16
    Does using this method restores stock recovery??
    12
    This would've saved me 6 hours of my life trying to unbrick my 6 this morning. You are a savior. Reserved.
    12
    I've uploaded latest 5.1.11
    7

    cmd window said it had failed due to not having a partition to write to, my phone seems to be in a boot loop ATM
    I did backup a partial working (still bootable) backup and saved it on my pc but I cannot seem to transfer it back to the phone after using your BAT file. The phone will not boot at all

    ---------- Post added at 02:53 PM ---------- Previous post was at 02:36 PM ----------


    After the first failed attempt, when I try to reflash using the runall.bat, it just says phone is already unlocked and does nothing else. Phone is still partially bricked (no bootable rom at all, cannot install oxygen os through TWRP and also wont let me transfer files from PC to internal storage)

    ---------- Post added at 03:15 PM ---------- Previous post was at 02:53 PM ----------

    Tried sideloading stock OxygenOS, it fails to install zip "updater process ended with ERROR: 255.
    Nothing at all seems to be able to fix my phone lol

    ---------- Post added at 03:23 PM ---------- Previous post was at 03:15 PM ----------

    target reported max download size of 536870912 bytes
    Invalid sparse file format at header magic
    wiping userdata
    erase successful but not automatically formatting
    cant determine partition type
    FAILED command write failed no error

    ---------- Post added at 03:33 PM ---------- Previous post was at 03:23 PM ----------


    I believe I have fixed my issue with your BAT not working,
    I needed to mark the EXE files as large address aware, to be compatible with my 64bit OS.

    Done here if anyone else has same issue:
    https://www.techpowerup.com/forums/threads/large-address-aware.112556/

    My phone has just booted! Much thanks to the OP, you have just saved my device