Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnePlus 7 Series Firmware Issue Fun #167

Closed
TommyTran732 opened this issue Nov 13, 2022 · 27 comments
Closed

OnePlus 7 Series Firmware Issue Fun #167

TommyTran732 opened this issue Nov 13, 2022 · 27 comments
Labels
bug Something isn't working

Comments

@TommyTran732
Copy link

TommyTran732 commented Nov 13, 2022

I tried updating from the October build to the November build, and it failed to apply the update. I then proceeded to unlock the bootloader, adb sideloaded the November build, and relocked it. It's soft bricked and gave "The current image (boot/recovery) have been destroyed and cannot boot". Maybe it wasn't signed properly or the firmware changed?

It does boot just fine with an unlocked bootloader.

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Nov 13, 2022

The newer firmware for OP7 may no longer support locking like is known on OP8 and OP9: https://calyxos.org/news/2022/07/06/oneplus-android-12-relock-issue/

@SkewedZeppelin SkewedZeppelin added the bug Something isn't working label Nov 13, 2022
@redfoot0
Copy link

I also have the same update issue on guacamole.
If the firmware has the same issue as the op8 and 9 series, can the newer/broken firmware be left off?

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Nov 13, 2022

There are two issues here:

The first is being unable to install the update, I received a log for this:

11-13 18:31:11.601  1308  1308 I update_engine: [INFO:partition_writer_factory_android.cc(44)] Virtual AB Compression disabled, using Partition Writer for `LOGO`
11-13 18:31:11.604  1308  1308 I update_engine: [INFO:partition_writer.cc(295)] Opening /dev/block/bootdevice/by-name/LOGO_b partition without O_DSYNC
11-13 18:31:11.602  1308  1308 W update_engine: type=1400 audit(0.0:78550): avc: denied { read } for name="sde47" dev="tmpfs" ino=22012 scontext=u:r:update_engine:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
11-13 18:31:11.608  1308  1308 E update_engine: [ERROR:utils.cc(530)] Opening block device /dev/block/bootdevice/by-name/LOGO_b: Permission denied (13)
11-13 18:31:11.612  1308  1308 I update_engine: [INFO:partition_writer.cc(100)] Caching writes.
11-13 18:31:11.617  1308  1308 E update_engine: [ERROR:partition_writer.cc(104)] Unable to open file /dev/block/bootdevice/by-name/LOGO_b: Permission denied (13)
11-13 18:31:11.612  1308  1308 W update_engine: type=1400 audit(0.0:78551): avc: denied { read write } for name="sde47" dev="tmpfs" ino=22012 scontext=u:r:update_engine:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
11-13 18:31:11.621  1308  1308 E update_engine: [ERROR:partition_writer.cc(300)] Unable to open target partition LOGO on slot B, file /dev/block/bootdevice/by-name/LOGO_b

Which shouldn't happen: https://review.lineageos.org/c/LineageOS/android_hardware_oplus/+/340515

The second issue is that the new 12 firmware likely did remove relock support.
I can remove the firmware inclusion for OP7 series, but then users either end up:

  • on outdated/insecure 11 firmware with bugs, since userspace blobs are expecting 12
  • on latest 12 firmware, with no relock support

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Nov 13, 2022

unlock the bootloader, adb sideloaded

you can adb sideload while locked, you just can't fastboot update

@darhma
Copy link

darhma commented Nov 13, 2022

* on outdated/insecure 11 firmware with bugs, since userspace blobs are expecting 12

* on latest 12 firmware, with no relock support

Personally I think the second option is preferable

@TommyTran732
Copy link
Author

TommyTran732 commented Nov 13, 2022

Well, the Oneplus 7T is EOL anyways. The firmware will quickly become outdated/insecure as well.

So I guess the question is whether there are any serious vuln that has been fixed between March (which was previously included in the October build) and August.

@SkewedZeppelin
Copy link
Member

New 19.1 builds are up for OnePlus 7 series with firmware removed so users can choose.

Firmware is still included on OP8/9.

@TommyTran732
Copy link
Author

New 19.1 builds are up for OnePlus 7 series with firmware removed so users can choose.

Firmware is still included on OP8/9.

What about the 20 builds?

@SkewedZeppelin
Copy link
Member

I'll compile 20.0 with firmware removed another day.

@TommyTran732
Copy link
Author

I'll compile 20.0 with firmware removed another day.

Oh, and I wonder if you have the firmware for the OP7T posted somewhere or should I go ahead and extract it from the stock OS myself?

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Nov 16, 2022

I'm re-opening this. I just received a report of non-functional touch/screen on guacamole 19.1 with A11 firmware.

A12 firmware may actually be required.

I've added some warnings here: https://divestos.org/index.php?page=news#2022-11

11-15 14:35:59.687  1335  1335 E cdsprpcd: vendor/qcom/proprietary/adsprpc/src/cdsprpcd.c:47:cdsp daemon will restart after 100ms...
11-15 14:35:59.804  1335  1335 I cdsprpcd: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/rpcmem_android.c:158: rpcmem_init_internal: opened ION device fd 4, configured heap IDs: system (0x2000000), contig (0x400000), secure (0x200), secure flags (0x80080000)
11-15 14:35:59.804  1335  1335 I cdsprpcd: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2794: fastrpc_apps_user_init done
11-15 14:35:59.804  1335  1335 I cdsprpcd: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1203: remote_handle_open: Successfully opened handle 0x0 for '":;./\attachguestos on domain 3
11-15 14:35:59.804  1335  1335 E cdsprpcd: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2588: Error 0x200: apps_dev_init failed for domain 3, errno Transport endpoint is not connected
11-15 14:35:59.804  1335  1335 E cdsprpcd: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2686: Error 0x200: open_dev (-1) failed for domain 3 (errno Transport endpoint is not connected)
11-15 14:35:59.804  1335  1335 W cdsprpcd: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1441:Warning 0xe: remote_get_info failed to get attribute 257 for domain 3 (errno Success)

@SkewedZeppelin SkewedZeppelin changed the title Oneplus 7T November 12 Build cannot boot OnePlus 7 Series Firmware Issue Fun Nov 16, 2022
@SkewedZeppelin SkewedZeppelin pinned this issue Nov 16, 2022
@TommyTran732
Copy link
Author

Ah fun. Divest 20 runs just fine on my 7T with the Android 12 firmware.

@darhma
Copy link

darhma commented Nov 16, 2022

Ah fun. Divest 20 runs just fine on my 7T with the Android 12 firmware.

so with the bootloader unlocked?

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Nov 16, 2022

I've pulled all the OP7 series builds.

Any users who upgraded to yesterday's 19.1 builds with A11 firmware installed and have no touch screen should flash A12 firmware if they are unlocked.

Otherwise they can unlock, flash the previous build, and restore from backup.

Old builds are available here: https://divestos.org/builds/old/old.txt

I will fix the flashing issue and include A12 firmware back for the next builds.
Users that are locked will have to migrate regardless.

@theotheroracle
Copy link

so if i understand correctly, all op7 users have to unlock their bootloader ?

@TommyTran732
Copy link
Author

Yes

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Nov 16, 2022

New builds are uploading: https://divestos.org/index.php?page=news#XXXX-XX

ad5f2d7

@hbarthel
Copy link

hbarthel commented Nov 21, 2022

I didn't read the update instructions. My 7 pro is not locked. Touch is not working since the update last week Wednesday. I did wait until battery was empty and device shut down itself. Holding Power loooong time did not work. Shut down happened today :) Maybe there is another solution to power it off?
But I have no clue how to get into fastboot mode... Hold VolUp+VolDown+Power always starts DivestOS and have to wait until it switches off. What can I do or what should work? How can I manage it to get firmware installed? Seems like I updated at a point in time when the firmware was not included.
Cheers, Heiko

PS: adb devices -> unauthorized

@SkewedZeppelin
Copy link
Member

@hbarthel
you need to manually adb sideload the latest version, should get you back going without any loss since you're unlocked

fix your adb, to access fastboot use volume up + power, to access recovery use volume down + power

also to force most modern devices off can usually use volup+voldown+power, and next time don't wait a week before asking for help 😉

@hbarthel
Copy link

hbarthel commented Nov 21, 2022

Thanks a lot.
volup+voldown+power worked to power it off, stupid me (yes, could have asked or searched earlier, but had little time)
could get into fastboot afterwards (with loaded battery it worked) and updated firmware, that I extracted from latest build.
My phone works again. Thank you very much, I am so happy!

PS: they have the wrong keys: https://wiki.lineageos.org/devices/guacamole/#special-boot-modes

@SkewedZeppelin
Copy link
Member

@hbarthel
firmware is included to be clear, simply installing the update will ensure you're on the correct firmware

@SkewedZeppelin SkewedZeppelin unpinned this issue Dec 19, 2022
@bbczeuz
Copy link

bbczeuz commented Apr 27, 2023

Can we sum up this thread?

(I ran into the no-touchscreen issue with my OP7 Pro upgraded from Resurrection Remix (Android 10) to Divested 20, then Bricked it, got OOS11 running, with the locked-only bootloader, den MSM-Tool downgraded to OOS10 (Android 11) and unlocked the bootloader)

What is the current recommended way to install Divested 20 on Oneplus 7 pro?

  • I want to simply try Divested OS on my OP7 pro; 20 would be nice, 19 would be OK, but I didn't find any images.
  • Is it possible to sideload the new A12 firmware from OOS11 images (which files?) and then the Divested 20 image?

@SkewedZeppelin
Copy link
Member

@bbczeuz
Firmware is included in DivestOS, just follow the steps: https://divestos.org/pages/bootloader#fastboot

@bbczeuz
Copy link

bbczeuz commented Apr 27, 2023

@SkewedZeppelin Thanks. Works smoothly. (Had some issue with fastboot install getting stuck; switched USB ports and problem solved)

Procedure: Use MSM Tool to install OOS10 (A11), Unlock bootloader, flashboot Divestos, sideload Divestos, works
Thanks for your works!

@Tecol87
Copy link

Tecol87 commented Aug 1, 2023

My touchscreen did not work on slot a (but on slot b) after the first installation. I re-did the installation and re-formatted /data multiple times, after then it works now on both slots.

Is there an easy way to restore locking-support?
I consider a locked outdated-device more secure than an unlocked device. I don't mind building it myself.

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Aug 1, 2023

@Tecol87
locking is not supported, and I won't ship outdated firmware
please follow the correct steps to ensure both slots are synced:

You cannot simply just downgrade the firmware, you have to downgrade the kernel and the vendor blobs to match it which is non-trivial.

@Tecol87
Copy link

Tecol87 commented Aug 1, 2023

@SkewedZeppelin
Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

8 participants