[Resurrection Remix] [Unofficial] [2018-08-19] Treble [Discontinued moved to PIE]

egandt

Senior Member
Mar 25, 2008
400
132
43
LAST PERSONALLY Verified as working and "stable"*: GAPPS, 8/19 GAPPS


First and foremost, I'm simply compiling this for the OnePlus 6 and am making some small tweaks to include Opengapps and not only Go Apps in the builds.

The parent for this by phhusson can be found at [Resurrection Remix] [Unofficial] [2018-05-19] Phh-Treble

Next the most important information where to get the most current build of the ROM: Google Drive
For now I suggest the version ending in -go such as: 'rr_6_1_180616_system-arm64-ab-go.img.xz' as the '-gapp' is in development, I expect a number of builds over the next few days as I finally the build scripts and then the rate to tapper off to every two weeks or as there are changes that seem to warrant it, I'm not building nightly for no reason, as RR 6.1 is reasonable stable at this time.

Note: Attached (build.sh) is the build script currently being used, it is a work in progress. and will be updated in case you more regular builds. You will need 12GB of Ram Ubuntu 16.04+ (I'm using 18.04 now, but I started with 16.04) and at least 360GB (SSD recommended) to build, and upto 6 hours for the initial run and then 2 for ever additional run.

Many thanks to phhusson for allowing me to post this based off of his work.

Changes, when I have something to report. Not all build will:
  • The 7/7 build includes a number of patches recommended by DocRambone.
    • Overlay support to force Apps fullscreen, Under Display->Advanced
    • Some cleanups to the UI for the round corners
    • Better LED support
  • The 7/8 build is the same as 7/7, but includes July security patches, I built it in order to match the official release.
  • The 7/24 build is again to match the official release
  • The 8/19 build is again to match the official release, note regression in status bar height I'm looking into.

Second post: will have details on what is working and not
Third Post: will have full instructions on installation, backup restore based on my experiences

* Stable is relative, for me if I consider it usable from day to day it is stable.
 

Attachments

Last edited:

egandt

Senior Member
Mar 25, 2008
400
132
43
As of 8/11/2018
In the GAPPS version

Working:
  • Fingerprint
  • Camera (Front and Back) + Flash (Also got the OnePlus Camera working*)
  • Speaker
  • Wifi (Some cut outs seen, this is not unique to this ROM and is dependent on the access port some are worse than others, no clue why)
  • Bluetooth
  • GPS
  • Brightness
  • Slider for Notifications as of 6/18 build
  • Mobile Data/Voice (tested dual SIMM is working)
  • Google Apps
  • Root (using magisk 16.3), told but have not personally tested that 16.4 without changes works as well
  • Ambient (works serious effect on battery see next post)
  • Full Screen Aspect Ratio Display->Advanced 7/07/2018 build+
  • More fully functional LED Improved for at least mounting USB sticks in 7/7 build
  • USB Host - Fixed for at least mounting USB sticks in 7/24 build
  • Bluetooth Phone audio is on the local headset. - Fixed in 7/24 build
  • Seems working NFC working 5.1.11 Vendor and Boot, not working with previous to 5.1.9 Vendor and Boot I have nothing to connect to to fully test

Not Working:
  • The Notch hides content (need to wait for P)

Unknown:
  • Camera Quality: I do little with the camera and am no photographer, so I can say nothing about quality, only it installed and took pictures

volte kinda works you can receive messages and calls and can send messages but cant call "out"
Please let me know if anything is missing, or needs to be added
 
Last edited:

egandt

Senior Member
Mar 25, 2008
400
132
43
Instructions to flash, backup ...

WARNING: With 5.1.8 I had no WIFI, so I suggest sticking to 5.1.6 to 5.1.7 FOR THE MOMENT

Instructions to flash, backup ...
Total time required about 90 minutes


Pre-Reqs:

First and foremost:
Start with at least 5.1.6 (or greater, as of writing 5.1.7 was the lastest), there are Treble fixes in 5.1.6 we need.

Second
verify you have a good USB cable (the Red one shipped with the phone is best)

Three
download the oneplus drivers and abd
- USB Drivers: OnePlus 6 USB Drivers for Windows
- ADB/Fastboot: ADB/Fastboot latest mini
Install both to your local system

Four
Download the latest TWRP (get both the img and zip files)
TWRP for OnePlus 6

Five
Download the files(Treble OP6 Files 5.1.6) from:
GUIDE] How to flash Treble roms on OnePlus 6
Extract and keep: vbmeta.img (if you are on 5.1.X where is the boot version you can keep the boot.img as well, if not discard).

Six
Download the lastest Oxygen OS ZIP and bootloader from:
[OnePlus 6][ROM][OTA][Oxygen OS] Mirrors for official Oxygen OS ROMs and OTA updates
As of writing this is:
  • 5.1.6 full image: OnePlus6Oxygen_22_OTA_010_all_1806070151_ad8b19ed516e78.zip
  • 5.1.6 boot: OnePlus6Oxygen_22_OTA_010_all_1806070151_boot.img

Seven
Download Device ID:
Device+ID APK

Eight
Download Magisk for Treble:
Magisk modified for treble
Since as of 6/2018 the default magisk does not support Treble we need a special version I suggest: Magisk-v16.3-factory-faizauthar12-20180406.zip as teh latest I could find with support.

Nine
Recommended download fastboot installable 5.1.6 (or latest build):
[ROM][STOCK][FASTBOOT][OP6] Stock Fastboot ROMs for OnePlus 6

Ten
Include Overlay/Ambient Display.
Download APK at: [Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM

Eleven
OnePlus Camera:
OnePlus Camera APK's

Finally
Download RR 6.0 for Treble compiled after 7/08/2018:
Either download the gapps or go version (gapps is still a work in progress when I wrote this)
ROMs Google Drive


Getting Ready:
WARNING: you will loss all data on your phone, backup anything you want or need, first.
  • Make sure you can get to fastboot (enable "Advanced Reboot" in developers options and make sure that you can enter on a reboot by pressing volume-down and power at the same time)
  • Make sure you are on 5.1.6+ (5.1.6 was the latest firmware upon writing this)
  • Remove Any security you have set (just to be safe)


Reboot to fastboot (bootloader)
run:
Code:
fastboot oem unlock
"You will be greeted with a Unlock Bootloader Warning page, Hit the Vol button to select Yes and turn it Blue and Hit the Power Button to Execute the selection, allow your device to reboot"


Backup EFS
If you have not already I'd recommend backing up EFS (to do so you need to be rooted, or else use TWRP):
Preferred, if rooted simply open a terminal and run:
Code:
su
dd if=/dev/block/sdf2 of=/sdcard/modemst1.bin bs=2048
dd if=/dev/block/sdf3 of=/sdcard/modemst2.bin bs=2048
Copy these files someplace safe!
If not rooted reboot to fastboot (bootloader):
Ensure that the latest twrp is in the same directory as fastboot (C:\Program Files (x86)\Minimal ADB and Fastboot) and run (3.2.1 was the lastest as of writing this):
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
This will boot the phone into twrp
  1. Allow modification
  2. Select backup
  3. select only EFS and Modem
  4. enter a meaningful name
  5. swipe to backup
  6. click "Reboot System" -> "Do not Install" for TWRP if asked.
You can now locate the backup under /storage/TWRP/BACKUPS and move it to a safe location off the phone.


Backup the Phone
Recommended if you care: Backup your entire phone using TWRP as well:
Ensure that the latest twrp is in the same directory as fastboot (C:\Program Files (x86)\Minimal ADB and Fastboot) and run (3.2.1 was the lastest as of writing this):
- fastboot.exe boot twrp-3.2.1-0-enchilada.img
This will boot the phone into twrp
  1. Allow modification
  2. Select backup
  3. Select Everything except EFS and Modem
  4. enter a meaningful name
  5. swipe to backup
  6. click "Reboot System" -> "Do not Install" for TWRP if asked.
You can now locate the backup under /storage/TWRP/BACKUPS and move it to a safe location off the phone.


Installing RR:
Finally we are ready to install RR (or any other Treble ROM), on the OnePlus 6. You will need a build from 6/7/2018 or later to have the required Vender-Hal to be present.


You will need to locate and install the AB version for the OnePlus 6.
Note: I'm using RR from 6/13 as the base for the guide: system-arm64-ab-gapps.img
SEE FIRST POST FOR CURRENT DOWNLOAD LOCATION I compiled this using phhusson's (Orginial Build Scripts)
instructions and a bit of setup on Linux. However most Treble base ROM's should work so long as they are from after 6/7/2018 in a similar manor.

* Remember this will wipe your device and you will loss all data *


First
boot in to fastboot (bootloader):
We need to go back to TRWRP and wipe internal storage and data to be safe, as the -w option to do so when flashing is not working for me.
- fastboot.exe boot twrp-3.2.1-0-enchilada.img
This will boot the phone into twrp
  1. Allow modification
  2. Select Wipe
  3. Advanced Wipe
  4. Select Cache, Data and "Internal Storage"
  5. Swipe to Wipe
  6. Click back until you are at the main menu
  7. Click on Reboot
  8. Click on Bootloader -> "Do not Install" for TWRP if asked.


Second
Flash the new ROM:
Flash vbmeta.img to remove validation
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
To be safe flash a default boot image (5.1.6 in this case)
Code:
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
Next reboot into recovery (you need to do this with volume down +Power, or selecting from bootload):
In stock recovery select English
Select Wipe Data and Cache
  1. Reset system settings->yes->done
  2. Wipe Cache->Yes->done
  3. Erase everything->Thiscan not be undone, continue->done
  4. back
  5. Advanced
  6. Reboot to fastboot->Reboot to fastboot

Now flash a the new ROM:
- fastboot flash system_a system-arm64-ab-gapps.img
- fastboot flash system_b system-arm64-ab-gapps.img


Three
reboot:
Code:
fastboot reboot
You will see the "andorid" boot screen (this is different that the Oxygen one) and being the first boot it could take a while. If you see no boot screen or it does not boot (give 10 minutes), then you likely need to repeat these steps again. If you boot into RR then continue.
You may get a Vender image mistake error ignore it it only appewars on boot.
Skip the Setup by clicking all four corners top left->top right->bottom right->bottom left (it my take more than one try), at this point you have no networking, that is what we want.

Suggestion make backup here as you have a working OS! -- Instructions to follow


Four
Move over required files: You now have RR installed and working:
Enable developer mode and then enable Advanced Reboot
Then copy over gapps-nano, Device+ ID.apk, magisk-manager apk and magisk installer zip to the phone
To get the magisk manager you need to extract it from the zip as I cloud not get the normal one to install. Extract the zip: Magisk-v16.3-factory-faizauthar12-20180406.zip copy common\magisk.apk to the phone


Five
Deal with: "Play Services not Certified by Google":
Install Device+ID (APK downloaed above) and Open
Once done open the second line shows the GSF ID for this device
Android Register GSF
Login using a gmail account (I suggest the one you use for the playstore)
Enter the GSF in the field, now we wait about 5 to 10 minutes for it to propigate
Reboot the phone as we want paly services to start fresh
First add a wIFI network.
Critical do not let any apps update until you have registered playstore, so if you see a notification saying downloading, select and click pause. Doing so with the updated 6/17 paystore resulted in a black screen where you would enter your password, no know work around other than reset if this happens.
click on playstore it should now start
Now login to your account and you should be go (it may take more than one attempt no idea why).
Now enable the update if previously paused
Update all Apps from the playstore before continuing, this may take a while give it 10 minutes
Optional: If you want remove Device+ID now (but I leave it as it is an easy way to get information).
You now have a working Playstore, if you have hung downloads then you may need to clear the cache for play services and the playstore I assume the unregistered might be the cause of them getting messed up.


Five
Install magisk:
Ensure you copied magisk zip and also the magisk manager apk to your phone, do not open, but click Done
Install the magisk manager, by locating the file in filemanager and selecting it.Reboot into fastbboot (bootloader) mode
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
  1. Install
  2. Select the magisk zip from the filesystem and flash
  3. clear cache
  4. Reboot->System (If asked about installing TWRP swipe to install)
  5. Allow the phone to fully boot
  6. Suggested: Reboot the phone
  7. Suggested: disable checks for updates as 5.7 does not work with this build.
  8. Root is now setup.


Six
Installer th onPlus camera:
Many people want the one plus camera, copy the apk downloaed above to the phone.
Open and install via a file manager


Seven
resize Data (as it will be only 11GB), the partitioon will be larger, depending on your devide se we will use TWRP and resize2fs to grow it.
Reboot into fastbboot (bootloader) mode
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
Advanced->Terminal
Code:
resize2fs /dev/block/sda17
Reboot System



Eight
Recommended, make a backup of your hard work:
Reboot into fastbboot (bootloader) mode
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
  1. Select backup
  2. Select Everything except EFS and Modem (as I'm unsure exactly which you need)
  3. enter a meaningful name
  4. swipe to backup
  5. click "Reboot System" -> Swipe to reboot
  6. Once back in RR copy the backup off the phone


Eight
Start using your OnePlus 6 with RR 6.0, rooted and with GAPPS


Nine
Upgrading:
Upgrading is simply replacing the system partitions and only these paritions (tested going from 6/13->6/16->6/17 builds)
Boot into fastboot (advanced reboot options)
Now flash the new system files:
- fastboot flash system_a new_system-arm64-ab-gapps.img
- fastboot flash system_b new_system-arm64-ab-gapps.img
Load TWRP:
Code:
fastboot.exe boot twrp-3.2.1-0-enchilada.img
  1. Select Wipe
  2. Advanced Wipe
  3. Select Cache (and only Cache)
  4. Swipe to Wipe
  5. Reboot System


    Ten
    Restoring a Backup from TWRP
    *This is a work in progress I can not work out how to do so safely*
    Code:
    fastboot.exe boot twrp-3.2.1-0-enchilada.img
    1. Select Restore
    2. Select the backup
    3. Select Everything (other than EFS and Modem!)
    4. Got to the main menu
    5. Select Wipe
    6. Advanced Wipe
    7. Select Cache (and only Cache)
    8. Swipe to Wipe
    9. Reboot Fastboot

    Eleven
    Night Light, Ambient Display, requires Root:
    My suggestion is not to do this if you care abut battery as I've seen major drain (even with Ambient display disabled, testing this).
    Copy the apk downloaded framework-res__auto_generated_rro.apk to /vendor/overlays
    Code:
    mount -o rw,remount -t ext4 /vendor
    cp <location of file>  /vendor/overlay
    chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay;chcon u:object_r:vendor_overlay_file:s0 /vendor/overlay/framework-res__auto_generated_rro.apk
    Reboot

    Comments:
    1. TWRP does not boot if flashed onto RR (the TWRP logo appears but it will not boot), this is currently only go to protect you from using the OnePlus Recovery and messing up RR. Flashing TWRP does not affect booting into RR.
    2. TWRP DOES handle encryption without an issue, even a wrong first pin is not an issue
    3. TWRP making a backup of Treble ROM, backup everything for now: Data, Boot, System, System Image, Vendor, Vendor Image.
    4. If you have problems with hung downloads from the Playstore: Pending hung PlayStore
    5. Wifi can be flaky (appearently this is a more general issue as even stock had some issues, I fixed them by only using either 2.4 or 5Mhz wireless, if I had both active I had constant disconnects.


    Worst case, to recovery, back to Oxygen 5.1.6 if you end up in a boot loop stuck booting to rtecovery, etc:
    - flash-all.bat
    Reboot into recovery (you need to do this with volume down +Power, or selecting from bootload):
    In stock recovery select English
    Select Wipe Data and Cache
    1. Reset system settings->yes->done
    2. Wipe Cache->Yes->done
    3. Erase everything->This can not be undone, continue->done
    4. back
    5. Advanced
    6. Reboot to fastboot->Reboot
    Load TWRP:
    Code:
    fastboot.exe boot twrp-3.2.1-0-enchilada.img
    Copy the Oxygen full ROM back to the phone
    Code:
    adb push OnePlus6Oxygen_22_OTA_010_all_1806070151_ad8b19ed516e78.zip /sdcard
    In TWRP
    • Install
      Select OnePlus6Oxygen_22_OTA_010_all_1806070151_ad8b19ed516e78.zip
      Go back to the root and select Advanced Wipe
    • Select Wipe
    • Advanced Wipe
    • Select Cache, Data and "Internal Storage"
    • Click on Reboot->Recovery (select Do not Install)
    • English
    • Wipe Cach and Data
    • Wipe Everything
    • Reboot
    • The phone will reboot same as the day it was made

    If it does not then please refer to:
    Mega Unbrick Guide for A Hard Bricked OnePlus 6
    Note: Always boot fully at least once (I suggest twice and the first one is configuring android) before trying any steps above again.

    Best of Luck, see a typo let me know
    ERIC
 
Last edited:

Quaicheist

Senior Member
Jan 31, 2017
78
16
8
Great rom, I especially like the fact that I can choose to install without gapps (prefer fdroid). One thing that is missing is ambient display, hopefully it will be fixed sooner or later.
 

egandt

Senior Member
Mar 25, 2008
400
132
43
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:


Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
Never said anything about results, only that it could be installed and works, (takes pictures), personally I do little with the camera and am not photographer, but it can be installed (link above) and installed.

Updated the working to remove any confusion.
 
  • Like
Reactions: 954wrecker

BFMSAND

Senior Member
Oct 13, 2010
314
56
0
So seeing this not even a month after the release of the op6 makes me happy and hopeful that we get a fully working RR-OS for the OP6 in the near future !
 

Hecke92

Senior Member
Dec 27, 2011
309
99
48
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:


Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
because Oneplus doesnt release blobs for camera
 

Abaddon

Senior Member
Mar 17, 2011
4,086
1,015
253
House Avernus
Stock OOS Cam on RR. Isn't that huge news? Wow! :good:


Have you tried this yourself? Ignore the treble part of his comment, but why would stock cam on OOS vs stock cam on custom ROM give different results in terms of picture quality?
It will never be the same as OOS stock. Because aside from there is no device tree provided by OnePlus, they will never release the camera blobs due to licensing issues. Once we get a stable and proper gcam port. It'll be better than the stock OOS cam or close
 

unix2208

Senior Member
Jul 9, 2007
60
8
28
is a beautiful Rom, will there be an adaptation for twrp? I have to use the gapps, because at the go version Wear OS does not work. and in the gapp version would be nice if the smartbar was running. Unfortunately, the kill app does not work :eek:( I can not use xposed, then my bank app will not work anymore
 

egandt

Senior Member
Mar 25, 2008
400
132
43
is a beautiful Rom, will there be an adaptation for twrp? I have to use the gapps, because at the go version Wear OS does not work. and in the gapp version would be nice if the smartbar was running. Unfortunately, the kill app does not work :eek:( I can not use xposed, then my bank app will not work anymore
TWRP not for now as treble is build as an image, but you should be able to flash using twrp just switch to img (though I have not tested that).
The GApps version is posted the 6/18 is working great, see second post.
As for Banking I'm unsure if any Treble based ROM passed the checks, as with or without root, as they appear as unsigned.

As for smartbar, I'll give it a try when I get a chance, as I do not use it personally.

ERIC