bkerler / edl

Inofficial Qualcomm Firehose / Sahara / Streaming / Diag Tools :)
GNU General Public License v3.0
1.66k stars 386 forks source link

How factory reset Oneplus 6 #600

Open realroot2185 opened 1 week ago

realroot2185 commented 1 week ago

I downloaded the files from https://xdaforums.com/t/tool-msmdownloadtool-v4-0-international-oxygen-os-5-1-5.3798892/. I tried that in a windows virtual machine using usb redirection but I kept getting sahara error.

Can I use them with edl or somehow do a factory reset? Fastboot mode, called bootloader in the phone menu, does not work anymore.

Boot-OnePlus-6T-Bootloader-Mode

realroot2185 commented 1 week ago

To enter edl mode I can press volume up for more than 5 seconds and the connect the cable.

I did not try but it should be:

Download the image from https://service.oneplus.com/in/search/search-detail?id=2097031&articleIndex=1

Unpack and decrypt payload with https://github.com/ssut/payload-dumper-go (or similar tool): payload-dumper-go payload.bin

./edl w boot_a boot.img
./edl w boot_b boot.img

./edl w dtbo_a dtbo.img
./edl w dtbo_b dtbo.img

./edl w abl_a abl.img
./edl w abl_b abl.img

./edl w aop_a aop.img
./edl w aop_b aop.img

./edl w bluetooth_a bluetooth.img
./edl w bluetooth_b bluetooth.img

./edl w cmnlib_a cmnlib.img
./edl w cmnlib_b cmnlib.img

./edl w cmnlib64_a cmnlib64.img
./edl w cmnlib64_b cmnlib64.img

./edl w devcfg_a devcfg.img
./edl w devcfg_b devcfg.img

./edl w dsp_a dsp.img
./edl w dsp_b dsp.img

./edl w fw_4j1ed_a fw_4j1ed.img
./edl w fw_4j1ed_b fw_4j1ed.img

./edl w fw_4u1ea_a fw_4u1ea.img
./edl w fw_4u1ea_b fw_4u1ea.img

./edl w hyp_a hyp.img
./edl w hyp_b hyp.img

./edl w keymaster_a keymaster.img
./edl w keymaster_b keymaster.img

./edl w LOGO_a LOGO.img
./edl w LOGO_b LOGO.img

./edl w modem_a modem.img
./edl w modem_b modem.img

./edl w oem_stanvbk oem_stanvbk.img

./edl w qupfw_a qupfw.img
./edl w qupfw_b qupfw.img

./edl w storsec_a storsec.img
./edl w storsec_b storsec.img

./edl w system_a system.img
./edl w system_b system.img

./edl w tz_a tz.img
./edl w tz_b tz.img

./edl w vbmeta_a vbmeta.img
./edl w vbmeta_b vbmeta.img

./edl w vendor_a vendor.img
./edl w vendor_b vendor.img

./edl w xbl_a xbl.img
./edl w xbl_b xbl.img

./edl w xbl_config_a xbl_config.img
./edl w xbl_config_b xbl_config.img

./edl reset
realroot2185 commented 1 week ago

I tried edl and for some reason bootloader mode is still broken while the rest looks fine. Commands from https://wiki.postmarketos.org/wiki/User:Magdesign#Install_Stock_Android_9.0.8. I used OOS based on android 11.

Is there a way to fix bootloader mode and possibly without touching the rest?

Edit: I did it again twice and OOS is stuck with booting logo. As bootloader and recovery. I used files from OnePlus6Oxygen_22.J.62_OTA_0620_all_2111252336_287bcb1636d743d3 (updated OOS). So maybe I need to use old stock OS.

I extracted the files from .ops file in https://xdaforums.com/t/tool-msmdownloadtool-v4-0-international-oxygen-os-5-1-5.3798892/:

ls enchilada_22_O.09_180517/extract/
4j1ed.bin         gpt_backup0.bin    logo.bin               reserve2.bin
4u1ea.bin         gpt_backup1.bin    msadp.mbn              sec.dat
abl.elf           gpt_backup2.bin    NON-HLOS.bin           settings.xml
aop.mbn           gpt_backup3.bin    odm.img                static_nvbk.bin
apdp.mbn          gpt_backup4.bin    op1.img                storsec.mbn
boot_aging.img    gpt_backup5.bin    op2.img                system.img
boot.img          gpt_main0.bin      param.bin              tz.mbn
BTFM.bin          gpt_main1.bin      persist.img            userdata.img
cmnlib64.mbn      gpt_main2.bin      prog_firehose_ddr.elf  vbmeta.img
cmnlib.mbn        gpt_main3.bin      provision_hynix.xml    vendor.img
config.bin        gpt_main4.bin      provision_micron.xml   xbl_config.elf
devcfg.mbn        gpt_main5.bin      provision_samsung.xml  xbl.elf
dspso.bin         hyp.mbn            provision_toshiba.xml
dtbo.img          keymaster64.mbn    qupv3fw.elf
dynamic_nvbk.bin  logfs_ufs_8mb.bin  reserve1.bin

There are several xml files. Do you maybe know to how use it?

Can I do with edl something equivalent to fastboot erase dtbo_b?

realroot2185 commented 1 week ago

To make a backup with edl can I use one of these?

edl rl <directory
edl rl <directory --genxml
edl rf <filename>
edl -h
...
edl gpt <directory> [--memory=memtype] [--lun=lun] [--genxml] 
...
    printgpt                    # Print GPT Table information
    gpt                         # Save gpt table to given directory
    r                           # Read flash to filename
    rl                          # Read all partitions from flash to a directory
    rf                          # Read whole flash to file
...
--genxml                           Generate rawprogram[lun].xml

And then

    xml                         # Send firehose xml file
    rawxml                      # Send firehose xml raw string
    qfil                        # Write rawprogram xml files

?