FORUMS

[ROM][11.0][OnePlus 5] AOSP for OnePlus 5 [25 NOV 2020][Locked bootloader]

1,399 posts
Thanks Meter: 738
 
By robertogl, Senior Member on 29th October 2020, 11:26 PM
Post Reply Email Thread
AOSP for OnePlus 5
Code:
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! 
 */
This ROM boots also with a locked bootloader.
See second post to get more information.
Introduction

This projects aims to create an upgradable AOSP build system for the Oneplus 5 (Cheeseburger).
No repository from AOSP is changed: no commit over AOSP is at the moment present on the sources for this ROM.

All the changes are provided in separate repositories (HALs, kernel): this allows to upgrade Android with minimal effort, potentially also for future major versions.

Most of the added repositories is provided by LineageOS or CAF, so thanks to them for those repos.

Screenshots are attached.
Known issues

See Third post.

Changelog

See third post.

Download

ROM: click here

Installation

Backup everything and remove PIN protection before installing this ROM.
The provided zip can be installed using the TWRP recovery: clear data while doing that.

The ROM expects the firmware from OOS 10.0.1: different firmwares are not tested.

GApps can be found here:
https://forum.xda-developers.com/and...droid-t4020917
Tested version: FlameGApps-11.0-basic-arm64-20201024-ALPHA-10.zip

The provided recovery allows only flashing signed images: use TWRP if you need to flash GApps or different packages.
If you want to keep the TWRP flashed, flash the persist_twrp.zip provided here:
https://sourceforge.net/projects/aos...us/files/Misc/
And flash the TWRP image you prefer (if you have a locked bootloader, follow the steps in the second post).
Sources and instructions

Manifest on github: https://github.com/robertoglxda/local_manifests
Kernel on github: https://github.com/robertoglxda/kernel_oneplus_msm8998

Telegram discussion group here!

XDA:DevDB Information
AOSP for OnePlus 5, ROM for the OnePlus 5

Contributors
robertogl
Source Code: https://github.com/robertoglxda/local_manifests

ROM OS Version: Android 11
ROM Kernel: Linux 4.x

Version Information
Status: Stable

Created 2020-10-29
Last Updated 2020-11-21
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	1366
Size:	110.3 KB
ID:	5131917   Click image for larger version

Name:	2.png
Views:	1360
Size:	156.1 KB
ID:	5131919   Click image for larger version

Name:	3.png
Views:	1362
Size:	147.7 KB
ID:	5131923  
The Following 8 Users Say Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
29th October 2020, 11:27 PM |#2  
robertogl's Avatar
OP Senior Member
Flag Arzignano, Italy
Thanks Meter: 738
 
Donate to Me
More
Boot with locked bootloader
Following the next points, you will be able to boot this ROM with the locked bootloader on OnePlus 5. This will grant the security of your own data, as no one will be able to flash any new image without first deleting everything from the data partition: this is because unlocking the bootloader again requires to format the data partition.
If the data are encrypted (if you are using a PIN or the fingerprint to unlock your device), your data are safe.
Also, no more wait time or 'you have unlocked the bootloader' screen at boot
Be aware that in this 'beta' version, I'm still using AOSP keys, that are actually publicly available.

ATTENTION: ALL THE DATA ON THE DEVICE WILL BE LOST FOLLOWING THIS PROCEDURE
The following link contains different useful files:
https://sourceforge.net/projects/aos...us/files/Misc/
  • a signed twrp image: signed_twrp.zip Thanks @codeworkx for the actual TWRP recovery!
  • a signed boot image with Magisk preinstalled: signed_magisk_boot_[date].img
  • a 'persist twrp' recovery zip: persist_twrp.zip
  1. Download the signed TWRP image signed_twrp.zip
  2. Enter in fastboot mode. There are two ways, select the one you prefer:
    1. from adb, run the command 'adb reboot bootloader'
    2. or power on the device pressing the power up button and the power button at the same time
  3. Run the following command to flash the signed recovery:
    1. fastboot flash recovery signed_twrp.img
  4. Using the volume buttons, select 'RECOVERY' and using the power button boot into recovery.
  5. This TWRP version does not support decrypting data if a numeric PIN is used, but this is not an issue. If asked for a PIN, just 'cancel' the dialog to get into the TWRP main screen.
  6. From adb, push the OTA file and the GAPPS file:
    1. adb push aosp_cheeseburger-ota-user-20201121.zip /data/update.zip
    2. adb push FlameGApps-11.0-basic-arm64-20201024-ALPHA-10.zip /data/gapps.zip
      (any gapps package should work, but I've only tested this)
    3. adb push signed_magisk_boot_[date].img /data/magisk.img (only if you need Magisk)
    4. adb push persist_twrp.zip /data/persist_twrp.zip (only if you want to persist the TWRP recovery after boot)
  7. From the TWRP interface, select 'Install' and flash first the 'update.zip' file and secondly the 'gapps.zip' file.
  8. If you want to persist the TWRP recovery, flash also the 'persist_twrp.zip' file.
  9. If you need magisk, from the TWRP interface select 'Install Image' and install also the magisk.img file in the boot partition.
  10. From the TWRP interface, reboot into fastboot (bootloader) mode again.
  11. Run the command (ATTENTION: ALL THE DATA ON THE DEVICE WILL BE DELETED):
    1. fastboot oem lock
  12. Confirm the lock operation on the device's screen.
  13. After the reboot, the device will probably boot again into the TWRP recovery: in this case, clear all the data from /data and restart the device (Wipe -> Format Data). Android will boot with the locked bootloader.
Important note: the device will now boot only signed image. DO NOT change boot.img without first check if it is signed. The images provided in this thread all are signed using AOSP keys.
If you are using Magisk, DO NOT UPDATE MAGISK after this installation. You can only update the Magisk Manager. At first boot, open the Magisk Manager and follow the instructions on screen.

If you don't flash the persist_twrp.zip archive, Android will replace the recovery at every boot with the stock signed recovery. This stock recovery only flashes signed images (the OTAs from this thread are all signed), so if you need the TWRP, you have to use ADB sideload to flash the signed TWRP.
I've uploaded here a signed zip that can flash the signed TWRP while using the locked bootloader:
https://sourceforge.net/projects/aos...us/files/Misc/
(signed_twrp.zip)
  1. enter into recovery (with the physical buttons or with 'adb reboot recovery')
  2. Press and hold the Power button. While holding the Power button press the Volume Up button then release the Volume Up button then the Power button to get into the Recovery UI
  3. select 'apply update from ADB'
  4. connect the phone and the pc, and from the pc run:
    1. adb sideload twrp_signed.zip
  5. reboot the phone selecting the 'reboot system now' from the recovery. Immediately after confirming the reboot, press the volume up button and keep it pressed until the boot mode is requested: select 'Recovery mode' and the phone will boot into the signed TWRP recovery. If the phone does not reboot, press the power button and after one second press the volume button keeping both buttons pressed until the device boots again.
Remember that, if you boot Android, you will lose the TWRP again.

How to update via TWRP

TWRP cannot decrypt the data partition using this ROM if you are using a PIN (it works fine using a pattern, for example).
To update the ROM:
- enter into TWRP recovery
- push the .zip update via adb:
$ adb push update.zip /data/
- from the TWRP recovery, select 'Install' e select the zip as /data/update.zip

If you need the TWRP recovery to be persisted, flash also the persis_twrp.zip archive again.
If you have a locked bootloader and you are using Magisk, flash the boot image with Magisk preinstalled again.
The Following 6 Users Say Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
29th October 2020, 11:28 PM |#3  
robertogl's Avatar
OP Senior Member
Flag Arzignano, Italy
Thanks Meter: 738
 
Donate to Me
More
Future plans

- Bug fixing. Known problems reported by users:
  • volte/vowifi icon missing in status bar
  • no way to hide battery icon in status bar
  • Double tap to wake is not working with Always On Display mode enabled
  • I could not set up my work profile for my office application (Intune Company Portal Microsoft)
  • No bluetooth battery level icon on status bar
- New features to add:
  • advanced power menu
  • wifi bridge
  • Face unlock
  • Different ringtones for the two sims
  • Call recording

Already fixed issues/added features
  • USB Preferences are greyed out when launched from notification bar, but works for developer options Fixed with OS release 20201125
  • The menu on the display color gamut selection in the Settings Extra app overlaps with the menu title Fixed with OS release 20201125
  • This must be a Gapps issue, but could not restore my old backup from cloud Fixed with OS release 20201125
  • nfc tile is greyed out Fixed with OS release 20201125
  • Android auto is not working Fixed with gapps 'NikGapps-basic-arm64-11-20201122-signed.zip'
  • Cannot sign in chrome by default. First you need to go to settings and give it all the permissions it needs. Same for few other apps. Solved using different Gapps, for example the Nick Gapps (Thanks @SunitTalwar)
  • system navigation option in both accessibility and system/gestures Google decided this way
  • Update blobs from OOS 10.0.1 Done with OS release 20201121
  • no option to swap recents and back buttons Added with OS release 20201121
  • I couldn't find a way to hide that horrible google search bar Not possible without changing the Launcher code. Third party launchers (like Nova Launcher) do not have this issue.
  • backlight on hardware buttons not working Fixed with OS release 20201106
  • play store not certified Fixed with OS release 20201108
  • google pay not working Fixed with OS release 20201108
  • Dash charge is not tested Confirmed working with OS release 20201108
  • backlight on hardware buttons not consistent in case of quick multiple touches Fixed with OS release 20201109
  • Missing Android 10 theme customization on developer options Fixed with OS release 20201114
  • Always On Display Added with OS release 20201109

Changelog
[25/11/2020] aosp_cheeseburger-ota-user-20201125.zip
  • USB preferences now works when launched from notification panel
  • Add working NFC tile
  • Fix overlapping of display color gamut menu on Settings Extra app
  • Add AOSP messaging app - Fix first boot backup restoring
Changelog of previous releases

[21/11/2020] aosp_cheeseburger-ota-user-20201121.zip
  • Update OnePlus blobs from OOS 10.0.1 (Added Camera EIS): you have to flash the correct firmware or the latest official OOS release before flashing this ROM! Firmwares can be found in the LineageOS 18 thread (first post)
  • Double tap to wake is now working (not in Always On Display mode)
  • Double tap to wake is disabled by default - enable it from Settings -> Display -> Tap to wake
  • Added Settings Extra app:
    • Allow to swap back and recent capacitive buttons
    • Allow to enable display DC dimming
    • Allow to change display color gamut (DCI-P3 or sRGB)
  • Following the steps in the second post, it is now possible to boot this ROM with a locked bootloader
[14/11/2020] aosp_cheeseburger-ota-user-20201114.zip
  • Dark mode is now really dark on the Android Settings (and not grey)
  • Enable AOSP theming options on Settings -> display -> Styles & wallpapers
  • Enable AOSP Night Light filter options (low blue light) on Settings -> display -> Night Light
[09/11/2020] aosp_cheeseburger-ota-user-20201109.zip
  • Show the correct Android Security Patch version on the Android Settings UI
  • Improve reliability of the capacitive buttons backlight
  • Add Always On Display - Enable from Settings -> Display -> Lock Screen -> 'Always show time and info'
[08/11/2020] aosp_cheeseburger-ota-user-20201108.zip
  • SafetyNull fully passes*
  • Google Play Store is now certified
* This is tested with this ROM and GApps installed - no Magisk Works also with Magisk installed
* To pass SafetyNet, the 'Android Security Update' on the Android Settings is reporting 'April 5, 2020': this is only reported as old Security Patches, the ROM has actually the latest secutiry patches available from Google. Fixed with OS release 20201109

[07/11/2020] aosp_cheeseburger-ota-user-20201107.zip
  • Allow thirdy party apps to access the fingerprint sensor
  • Fix an issue causing a 'Device lock by admin' warning when unlocking the device

[06/11/2020] aosp_cheeseburger-ota-user-20201106.zip
  • Enable backlight for capacitive hardware buttons

[04/11/2020] aosp_cheeseburger-ota-user-20201104.zip
  • November 2020 Security Patch
  • Sync with AOSP android-11.0.0_r17 tag

[29/10/2020] aosp_cheeseburger-ota-user-20201029.zip
  • First release
The Following 4 Users Say Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
30th October 2020, 08:47 AM |#4  
shadowstep's Avatar
Forum Moderator
Flag Ambala Cantt
Thanks Meter: 8,542
 
Donate to Me
More
Added to the OnePlus 5 Index Thread here.
The Following User Says Thank You to shadowstep For This Useful Post: [ View ] Gift shadowstep Ad-Free
30th October 2020, 09:48 PM |#5  
robertogl's Avatar
OP Senior Member
Flag Arzignano, Italy
Thanks Meter: 738
 
Donate to Me
More
Quote:
Originally Posted by shadowstep

Added to the OnePlus 5 Index Thread here.

Thank you
1st November 2020, 12:58 AM |#6  
robertogl's Avatar
OP Senior Member
Flag Arzignano, Italy
Thanks Meter: 738
 
Donate to Me
More
I've tested phone calls and 3g/4g connectivity on both sim slots and they are working correctly
The Following User Says Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
1st November 2020, 12:30 PM |#7  
Member
Thanks Meter: 12
 
More
What's the correct way to downgrade to stable 10 in case something goes wrong?
1st November 2020, 12:39 PM |#8  
robertogl's Avatar
OP Senior Member
Flag Arzignano, Italy
Thanks Meter: 738
 
Donate to Me
More
Quote:
Originally Posted by petrea_86

What's the correct way to downgrade to stable 10 in case something goes wrong?

It works as other ROMs: go into TWRP recovery, clear data/cache, install stable OOS from zip, reboot
The Following User Says Thank You to robertogl For This Useful Post: [ View ] Gift robertogl Ad-Free
1st November 2020, 06:22 PM |#9  
Member
Thanks Meter: 12
 
More
Quote:
Originally Posted by robertogl

It works as other ROMs: go into TWRP recovery, clear data/cache, install stable OOS from zip, reboot

Figured out myself 🙂, plus I had to lock the bootloader back but thanks a lot anyway. Cheers.
1st November 2020, 06:25 PM |#10  
robertogl's Avatar
OP Senior Member
Flag Arzignano, Italy
Thanks Meter: 738
 
Donate to Me
More
Quote:
Originally Posted by petrea_86

Figured out myself 🙂, plus I had to lock the bootloader back but thanks a lot anyway. Cheers.

Did you try the rom? Do you have any feedback?
1st November 2020, 06:35 PM |#11  
Member
Thanks Meter: 12
 
More
Quote:
Originally Posted by robertogl

Did you try the rom? Do you have any feedback?

No, I haven't yet. I tried yaap 11.0 before I found this thread. I'd like to try it but I think I will encouter the same issues. Will google pay work on it? If not, is there any way to make it work?
Post Reply Subscribe to Thread

Tags
android11

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes