Open Espionage724 opened 1 year ago
with open('settings.xml', 'rt') as f:
xml = f.read()
for intag, outtag, out in (('Program', 'data', 'rawprogram'), ('Patch', 'patches', 'patch')):
for pr in xml.split(f'<{intag}')[1:]:
num, data = pr.split('>', 1)
lines = filter(lambda x: x, map(lambda x: x.strip(), data.split(f'</{intag}')[0].split('\n')))
with open(f'{out}{num}.xml', 'wt') as f:
print(f'<?xml version="1.0" ?>\n<{outtag}>', file=f)
for line in lines:
print(' ', line, file=f)
print(f'</{outtag}>', file=f)
and then
edl qfil rawprogram0.xml patch0.xml .
edl qfil rawprogram1.xml patch1.xml .
edl qfil rawprogram2.xml patch2.xml .
edl qfil rawprogram3.xml patch3.xml .
edl qfil rawprogram4.xml patch4.xml .
edl qfil rawprogram5.xml patch5.xml .
worked for me
(edit: fixed as mentioned below)
Hi @chayleaf, I had to modify line 8 from:
print('<?xml version="1.0" ?>\n<{outtag}>', file=f)
to
print(f'<?xml version="1.0" ?>\n<{outtag}>', file=f)
for it to work properly. Thank you for sharing the instructions, it was very helpful for me to unbrick my phone :)
The script provided by @chayleaf works great! I suggest it to be added to the project.
@chayleaf it worked but everytime i boot the device i get an invalid vip nvs error i don't know what that would mean but i was able to fix by going to the dialer and entering: *#268# and then going to nv parameters then backup dynamic nv/efs then restore nv/efs and then reboot the device and the error should be gone
also the device bootloader needs to be relocked manually if you want it to be locked again device i tried this on: oneplus 6t and i did flash the oneplus 6t firmware ofc
also sorry for mentioning an issue by accident
@chayleaf it worked but everytime i boot the device i get an invalid vip nvs error i don't know what that would mean but i was able to fix by going to the dialer and entering: *#268# and then going to nv parameters then backup dynamic nv/efs then restore nv/efs and then reboot the device and the error should be gone
also the device bootloader needs to be relocked manually if you want it to be locked again device i tried this on: oneplus 6t and i did flash the oneplus 6t firmware ofc
I encountered the same problem
but i was able to fix by going to the dialer and entering: *#268# and then going to nv parameters then backup dynamic nv/efs then restore nv/efs and then reboot the device and the error should be gone
I did a fresh restore of 10.3.8 and *#268#
doesn't seem to do anything from the default OOS phone app. I get the NVBackupUI error on 10.3.8.
*#268#
also didn't do anything from 11.1.2.2 but I don't get the NVBackupUI notification there after OTA'ing from 10.3.8. I recall some versions of OOS not working with certain dialer codes or something like the engineering mode not being available after a certain version. I'm downloading 5.1.11 now to try with that.
*#268#
works fine from 5.1.11!
Doing just RESTORE NV/EFS
and rebooting wasn't enough (still had the NVBackupUI error). After that reboot I went back to NVBackupUI, did BACKUP DYNAMIC NV/EFS
, then RESTORE NV/EFS
, disconnected the phone's USB from my computer, powered the OP6 off and back on, and now all looks good! (no NVBackupUI error).
9.0.9 does not allow *#268#
(OTA'd from 5.1.11/Android 8.1.0), so it seems like restoring with edl
ideally requires a 5.1.11 or older MSM package in order to do the NV backup/restore to fix NVBackupUI errors. The update process with that is 5.1.11 (MSM/edl) -> 9.0.9 (OTA) -> 11.1.2.2 (OTA)
I have a OP6 and would like to flash images from packages named similar to
enchilada_22_O.15_180810.ops
, making sure that all images from theops
are written to all the device's A and B partitions, or at least A with wiped B partitions.I've ran into a situation where I restored a 5.1.5 OOS packages via
MsmDownloadTool
and couldn't use wifi because it seems likeMsmDownloadTool
didn't flash what was needed to downgrade whatever controls wifi and it was left at a higher version than the Android version could use (couldn't scan for APs, wifi mac was 0s and wrong); OTAing to OOS 9 fixed wifi and presented my MAC. I want to avoid that and knowingly downgrade and flash every component of the restore package to be sure my phone is restored.I don't want to break EDL mode somehow or wipe IMEI/MAC/device-specific identifiers, and it'd be neat to back those up even if they're on a particular partition?
I've downloaded OnePlus_6_OxygenOS_10.3.8.zip and extracted these files:
I did opscrypto.py decrypt on
enchilada_22_J.50_210121.ops
and extracted these files:This is where I'm not sure the best way to proceed.
settings.xml
seems to describe where images go and it seems like I can manually flash the images one-by-one to A and B partitions, but I wonder if I could just telledl
to reference thesettings.xml
and do everything?