Update firmware on custom ROM - OnePlus 7 Pro Questions & Answers

I am currently on LineageOS 17.1 on both slots, which I flashed over OOS 10.0.4. As I am coming from a OnePlus One, I am still unfamiliar with the A/B slots and I didn't found detailed instructions. Now I want to update the vendor image to 10.0.5 and stay with LineageOS. Is the following procedure correct if I want to keep my data (<- important)?
1. Download 10.0.5 from here: https://forum.xda-developers.com/on...ygen-os-10-0-5-live-oxygen-os-10-0-5-t4080943 (full: https://otafsg1.h2os.com/patch/amaz....25_OTA_025_all_2003270113_4588ebe57af551.zip)
2. Deactivate Magisk modules
3. Open sideload in LineageOS recovery
4. Flash 10.0.5 via adb sideload
5. Flash TWRP via adb sideload (https://sourceforge.net/projects/ma...le-unified-installer-mauronofrio.zip/download)
6. Reboot to TWRP
7. Open sideload in TWRP
8. Flash 10.0.5 via adb sideload
9. Flash TWRP via adb sideload
10. Reboot to TWRP
11. Repeat Steps 3 to 9 , but with newest LineageOS nightly
12. Reboot to LineageOS, reactivate Magisk modules
Is this correct? Am I missing something? I would be happy about improvements.

Bump

I think you will break your data partition if you do this. You can try it, but I think it won't work.
I would backup the phone phone (apps + internal storage) and do the procedure, most likely it will fail.
BTW, its illegal on the internet to pretend to be another (real) person
Just use another username and profile picture (I think you don't have the copyright?)

Thanks for your answer! Hmmm... I don't wanna break my data partition. If I understand you correctly, there's no way to avoid this? Or is there a way and my approach is wrong?
Right about the picture, I'm deleting that.
Edit: New profile picture

my usual update round
- reboot into recovery (assume TWRP already flashed)
- data backup and get current slot
twrp -> settings -> timezone (for nicer local datestamp)
twrp -> backup data (compress) -> /sdcard/TWRP/BACKUPS/
twrp -> enter reboot menu -> show current slot
- upload archives to virtual sdcard
host # adb shell mkdir /sdcard/TWRP/image/
host # adb push oos/OB12-OnePlus7ProOxygen_13.W.31_OTA_031_all_2004111755_397ef15c84.zip /sdcard/TWRP/image/
host # adb push los/lineage-17.1-20200420-nightly-guacamole-signed.zip /sdcard/TWRP/image/
host # adb push twrp/twrp-3.3.1-79-guacamole-unified-installer-mauronofrio.zip /sdcard/TWRP/image/
host # adb push magisk/Magisk-v20.4.zip /sdcard/TWRP/image/
- install/sideload archives via TWRP (every install will usually go into inactive slot)
twrp -> install OOS zip (for vendor/baseband firmware update)
twrp -> install LOS zip (for fun)
twrp -> install TWRP zip (for override LOS recovery) [will patch both slots - against A/B logic]
- switch slot
twrp -> reboot menu -> select other slot
twrp -> reboot into recovery
- rebooted into recovery (verify TWRP version, current slot, correct /data decryption)
twrp -> install Magisk (for LOS17 with SU/root support) [will install into current slot - against A/B logic]
- reboot into new flashed system (verify current slot, LOS version, baseband version)

Related

How to fix Error install January security patch

1- download this Firmware NB1-488B-0-00WW-B04.qlz Via this link https://bit.ly/2CZS4Z2
2- Flash via NOST https://github.com/StollD/NOST/releases
3- download and flash thes ota update via adb sideload https://bit.ly/2Rs4y0Y
Now you can install January security patch Without any problems
iyadengle said:
1- download this Firmware NB1-488B-0-00WW-B04.qlz Via this link https://bit.ly/2CZS4Z2
2- Flash via NOST https://github.com/StollD/NOST/releases
3- download and flash thes ota update via adb sideload https://bit.ly/2Rs4y0Y
Now you can install January security patch Without any problems
Click to expand...
Click to collapse
Thumbs up for this(!), but you might want to suggest that the user just flashes the 5110 qlz since thats the official Pie build (December update).
Alternatively you can only sideload the OTA update zip that was linked, it is a full OTA and updates to Pie-December from any other build as long as you have stock recovery.
THMSP said:
Thumbs up for this(!), but you might want to suggest that the user just flashes the 5110 qlz since thats the official Pie build (December update).
Alternatively you can only sideload the OTA update zip that was linked, it is a full OTA and updates to Pie-December from any other build as long as you have stock recovery.
Click to expand...
Click to collapse
I did the sideload OTA thing (Slot B = Pie Dec., magisk patched boot image, Slot A = Oreo May (or Juin?)) stock image.
It failed for the Slot B (i think) with message timestamp of update 1543458509 is older than current image 1545911676.
Slot A was patched successfully.
After reboot magisk is gone. Total desaster
Can please someone explain how to root with magisk a pie december? or how to use the prepatched boot images?
I'd like to have a rooted system able to do the monthly OTAs (with the magisk "restore, do OTA, patch inactive slot" thing.
What I did, similar to https://forum.xda-developers.com/showpost.php?p=78171178&postcount=95, but I did not see this post before I figured it out by myself, but I think this won't work anyway, as booting the modified boot image simply does not work for me, only booting to the modified twrp boot image via "boot to recovery".
So I did:
prepare:
- backup internal "sdcard", backup apps/settings with titaniumbackup
- reset to factory default (while flashing stock pie with NOST, option erase user data)
a)
- flash the 5110 qlz pie full stock rom with NOST tool as linked and described here https://forum.xda-developers.com/showpost.php?p=78804078&postcount=2
- boot new system -> current slot is slot a with pie 01.12. (the same on both slots?)
- OTA to slot b and reboot
-> result: slot a = 1.12., slot b = 1.1., slot b is active
b)
- reboot to bootloader
- verify that current slot is b: fastboot getvar current-slot
- change to a: fastboot --set-active=a
- flash twrp boot rom to boot_a: fastboot flash boot_a "twrp... .img" from "repository" linked here https://forum.xda-developers.com/no...le-nokia-8-t3867037/post78802351#post78802351 (https://bit.ly/nokia-nb1)
- reboot to recovery
-> twrp recovery should start
- install magisk zip (copy to sd card before rebooting to bootloader)
- reboot, system boots to slot a / pie 01.12.
- install magisk via magisk manager app to the inactive slot
- reboot bootloader
- flash stock image on slot a from "repository" above
- change active slot back to b, if not active anyway (should be active already because of the "install to inactive slot"
- reboot again
-> should boot to slot b with pie 01.01.2019, and should be rooted.

Help! How do i install a custom ROM the proper way and Root the device aftwerwards?

Hi, I am new to custom ROM's and Rooting my device. And i hope you can help me with my Problem. I have a OnePlus A6003
What i tried so far:
Before i tried installing CustomROM's my device was on OOS 10.3.0
Then i needed to use the "twrp-3.3.1-16-enchilada-Q-mauronofrio.img" to get into TWRP
in TWRP i followed the Instructions from the LinageOS site:
Now tap Wipe.
Now tap Format Data and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.
Return to the previous menu and tap Advanced Wipe, then select the System partition and then Swipe to Wipe.
Sideload the LineageOS .zip package:
On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
On the host machine, sideload the package using: adb sideload filename.zip
(Optionally): If you want to install any additional add-ons, run adb reboot sideload, then adb sideload filename.zip those packages in sequence.
info_outline
Note: If you want Google Apps on your device, you must follow this step before booting into LineageOS for the first time!
(Optional): Root your device by installing LineageOS’ AddonSU, (use the arm64 package) or by using any other method you prefer.
Once you have installed everything successfully, run ‘adb reboot’.
Click to expand...
Click to collapse
I was sure this wasn't the right way cause after i rebooted the device i couldn't get to LinageOS.
After that i could get the "twrp-installer-3.3.1-2-enchilada.zip" (The official version from the TWRP site to work)
Flashed LinageOS the proper way (that's what i thought, lol) through install in TWRP
after that i had the same problem i could boot one time into LinageOS and that was it.
Current State of the Phone:
Bootloader unlocked (check)
Recovery Mode starts LinageOS Recovery
Fastboot is working fine
TWRP is not installed
What i am basically trying to do is:
Install a Privacy Focused ROM (open for Suggestions but i think LinageOS is good)
Root with Magisk
Flash NanoDroid Packages
Flash AFWall+
Flash AdAway
Some questions that i have
Do i need the customized TWRP because my phone did originally run OOS 10.3.0?
Whats the proper way to install a ROM on this device and Root it afterwards with Magisk?

[RECOVERY] LineageOS 17.1 Recovery [X3][2020/08/24]

Introduction
This is a LineageOS Recovery compiled from the source tree of LineageOS 17.1 for Realme X3/X3 Superzoom.
Instructions (Installing Recovery):
1. Download recovery.img & vbmeta.img
2. Reboot to bootloader
Code:
adb reboot bootloader
3. Flash vbmeta
Code:
fastboot --disable-verification --disable-verity flash vbmeta vbmeta.img
4. Flash recovery
Code:
fastboot flash recovery recovery.img
5. Run
Code:
fastboot reboot recovery
to enter LineageOS Recovery
Instructions (Installing Magisk):
You have to use the official Magisk, version 20.4 or later. Installing an older Magisk may make the system unbootable.
1. Download Magisk >= 20.4, put onto computer
2. Reboot to LineageOS recovery, select `Mount /system` (you may see some errors, but they can be safely ignored)
3. Select `Apply update from ADB`
4. Run
Code:
adb sideload Magisk-xxx.zip
5. You will see a signature verification error, select `Yes` to bypass the check
6. Reboot to system to enjoy your Magisk installation.
Notes:
- Since it's not TWRP, you cannot decrypt your /data in recovery for now, which means no data backup or recovery, and you cannot install on-device flashable zips through this recovery.
- Since it's not TWRP, it cannot prevent your OS from overwriting recovery automatically. If you use official ROM, you may need to manually re-flash the recovery every time. I'm not sure whether this can be bypassed with some Magisk module.
- You need to always click "Mount /system" before flashing any mods into the system (i.e. Magisk, OpenGapps, etc., ROMs themselves are not affected), otherwise they will fail to install. (Clicking the option does not actually mount /system; it just sets up necessary mappings from the super partition to each of the dynamic partitions so that the installation scripts will work)
Download:
https://sourceforge.net/projects/siddharthbharadwaj-s-builds/files/Realme X3/LOS Recovery/
Source Code:
Kernel: Used stock prebuilt one.
Thank you! This is now my preferred method to root Lineage that I haven't seen anywhere else.

How to flash TWRP onto both Slot A and Slot B? - Can't find a straight answer.

Hello, my goal is to flash TWRP onto both Slot A and Slot B.
I've flashed TWRP into Slot A, while Slot B is flashed with LineageOS recovery, currently.
I'm pretty sure I then flashed the OS/ROM with TWRP into Slot A but afterward I had a warning that read, "No OS Installed" - I thought it was a fluke, I rebooted System and it went back to TWRP with Slot A active.
I manually switched to Slot B and rebooted System and LineageOS loaded. Rebooted into recovery and discovered Slot B is still using LineageOS recovery.
From there, in the recovery interface, there's no option to manually change back to Slot A. Rebooted into fastboot and connected phone to PC and ran command:
fastboot set_active other
This switched back to Slot A
I rebooted the device which loaded TWRP on Slot A.
At this point what do I need to do to install TWRP onto Slot B and flash LineageOS onto Slot A and Slot B?
I assume through TWRP on Slot A - I can flash TWRP onto Slot B. Then manually change to Slot B - reboot into recovery and verify TWRP is installed on Slot B?
Doing this of course, will break (assumption again) the LineageOS installation and will have to re-install LineageOS.
Once verified, flash LineageOS onto both Slot A and Slot B.
I feel like I missed something but honestly I'm using multiple guides and I feel I'm going to end up breaking something since not all guides align well.
I know this is a noob question, so I apologize, but I am trying to follow guides, none of which are instructing from A-Z the processes to achieve this goal. I have no issues following instructions, if I did, I'd have broken linux boxes, including a linux server.
I'm willing to start from scratch if I have to, I just want to get it right once and for all.
This should be posted in the Q/A section.
Anyways, you can simply flash the twrp img to both slots using:
Code:
fastboot flash recovery_a name_of_twrp.img
fastboot flash recovery_b name_of_twrp.img
Then, once TWRP is flashed, just flash the installer zip after flashing a rom to keep twrp flashed to both slots.
azoller1 said:
This should be posted in the Q/A section.
Anyways, you can simply flash the twrp img to both slots using:
Code:
fastboot flash recovery_a name_of_twrp.img
fastboot flash recovery_b name_of_twrp.img
Then, once TWRP is flashed, just flash the installer zip after flashing a rom to keep twrp flashed to both slots.
Click to expand...
Click to collapse
This is in Slot A
Completed commands without error. Instead of installer zip, I have the twrp.img
Advanced > Install Recovery Ramdisk > select twrp.img
Swipe to install
Then instead of reboot, the instructions I'm following says to go Back into Advanced and then select Fix Recovery Bootloop then Swipe to confirm.
Here I receive an error related to magisk (Error 1) - Error patching kernel
The error message is: cd /tmp/repackorig/ && /system/bin/magiskboot hexpatch kernel ...
If I reboot system - I'm thrown back into TWRP recovery interface.
This indicates that I need to install the boot.img
Install > Tap Install Image > Select boot.img > select Boot partition > Swipe ton confirm
[IMAGE FLASH COMPLETE]
Reboot System is selected and LineageOS loads.
Open Magisk > Install > Patch boot.img
However, when I first installed LineageOS and set it up with Magisk and TWRP - I had already patched the boot.img - literally this happened yesterday.
Would I need to do it again? I would assume not.
So I go back into TWRP > Install > Image > select the Magisk patched boot.img > check the box to install on both Slots A and B > Swipe to confirm
LineageOS loads.
Now back to TWRP to complete the process of permanently installing TWRP Recovery:
Advanced > Install Recovery Ramdisk > select twrp.img
Tap Back into Advanced > Fix Recovery Bootloop > Swipe to confirm
This time no error - SUCCESS!
Reboot System, but boots into TWRP. No access to LineageOS.
In TWRP I go to Reboot > Select System Partition with Slot A active and it once again reboots into TWRP.
I repeat the process this time selecting Slot B and again reboots into TWRP.
I go back into TWRP, Install > Image > Magisk patched Boot.img > Reboot
LineageOS loads.
Is this the correct process? If so, I imagine that after flashing TWRP onto both Slot A and Slot B, I need to repeat this process on Slot B now?
Also another assumption - is the magisk patched boot.img an actual nandroid backup? Because it flashed the exact image (apps/settings etc..) that I had patched with magisk.
However, if it is, for whatever reason a good portion of my apps are broken. When I open them - they crash. I have to uninstall the app and then re-install it from Aurora Store.
It's not a big deal but I would love for the image to be 100% complete without the apps or even settings being broken/different. But maybe I'm getting ahead of myself here.
Fumetsu_Guritto said:
This is in Slot A
Completed commands without error. Instead of installer zip, I have the twrp.img
Advanced > Install Recovery Ramdisk > select twrp.img
Swipe to install
Then instead of reboot, the instructions I'm following says to go Back into Advanced and then select Fix Recovery Bootloop then Swipe to confirm.
Here I receive an error related to magisk (Error 1) - Error patching kernel
The error message is: cd /tmp/repackorig/ && /system/bin/magiskboot hexpatch kernel ...
If I reboot system - I'm thrown back into TWRP recovery interface.
This indicates that I need to install the boot.img
Install > Tap Install Image > Select boot.img > select Boot partition > Swipe ton confirm
[IMAGE FLASH COMPLETE]
Reboot System is selected and LineageOS loads.
Open Magisk > Install > Patch boot.img
However, when I first installed LineageOS and set it up with Magisk and TWRP - I had already patched the boot.img - literally this happened yesterday.
Would I need to do it again? I would assume not.
So I go back into TWRP > Install > Image > select the Magisk patched boot.img > check the box to install on both Slots A and B > Swipe to confirm
LineageOS loads.
Now back to TWRP to complete the process of permanently installing TWRP Recovery:
Advanced > Install Recovery Ramdisk > select twrp.img
Tap Back into Advanced > Fix Recovery Bootloop > Swipe to confirm
This time no error - SUCCESS!
Reboot System, but boots into TWRP. No access to LineageOS.
In TWRP I go to Reboot > Select System Partition with Slot A active and it once again reboots into TWRP.
I repeat the process this time selecting Slot B and again reboots into TWRP.
I go back into TWRP, Install > Image > Magisk patched Boot.img > Reboot
LineageOS loads.
Is this the correct process? If so, I imagine that after flashing TWRP onto both Slot A and Slot B, I need to repeat this process on Slot B now?
Click to expand...
Click to collapse
I am not sure where you are seeing Advanced > Install recovery ramdisk in twrp. You should never have to used the advanced menu in twrp, unless for very specific reasons.
Ok, lets assume you are running the latest stock OOS.
1. First, you unlock the bootloader and can now use fastboot.
2. Reboot to bootloader
3. At this point you flash the twrp.img file to both recovery slots like i mentioned in my other post.
4. At this point you have twrp forever until something else overwrites the recovery partitions (flashing rom, flashing other custom recovery, etc).
5. Now, you need to factory reset, go to reboot then switch to the inactive slot, dont reboot, go back to install, then flash the rom zip file.
6. After flashing the rom zip file, flash the twrp installer zip file to overwrite the rom recovery.img so you can retain twrp.
7. Then you can reboot system and you will boot to the other slot where the rom was just flashed and everything should be ok.
Since twrp for the 8T is still not fully stable, but works very well, I dont think its good to flash .imgs directly in twrp, im sure it works but I usually just flash compatible zip files in twrp and use fastboot manually to flash a specific img if desired.
For magisk, the dev states in the instructions that flashing in twrp is not recommended (for the 8t in this case) and is better to boot the patched img from fastboot then go into magisk and direct install. Flashing using fastboot should work 100% of the time without issues. I have always just flashed the patched boot.img directly in fastboot and reboot with no issues.
However, if you prefer to flash in twrp, you must reboot back into recovery (reboot then press recovery) after flashing the rom and the twrp installer, so your device is updated to the other slot where the rom was flashed. Now you can flash magisk and it will flash to the correct boot.img slot.
Fumetsu_Guritto said:
Also another assumption - is the magisk patched boot.img an actual nandroid backup? Because it flashed the exact image (apps/settings etc..) that I had patched with magisk.
However, if it is, for whatever reason a good portion of my apps are broken. When I open them - they crash. I have to uninstall the app and then re-install it from Aurora Store.
It's not a big deal but I would love for the image to be 100% complete without the apps or even settings being broken/different. But maybe I'm getting ahead of myself here.
Click to expand...
Click to collapse
A magisk patched img is a boot.img unpacked and magisk is then injected and repacked. The size is 96mb.

OP7Pro not recognized by Windows in FastBoot mode

Phone OS: OxygenOS 11 EU
PC OS: Windows 11 x64
I'm trying to unlock the bootloader so that I could debloat my phone, install some magisk modules, and GCam.
While ADB normally sees my phone without issues, it's not recognized in Fastboot mode. In the Devices Manager window, the phone is shown as a generic Android device with the yellow warning sign (only during Fastboot, correctly detected as OP7Pro otherwise).
I tried installing ADB from multiple sources, and even used mauronofrio's Tool All In One to no avail. The guides to unlock bootloader don't make any mentions of this issue, and online I've only managed to find very old unsolved threads for other phones.
So, your system doesn't recognize the phone in fastboot mode ?
Did you tried to uninstall the device in the device manager, then plug it back ?
draentor said:
So, your system doesn't recognize the phone in fastboot mode ?
Did you tried to uninstall the device in the device manager, then plug it back ?
Click to expand...
Click to collapse
Good news, not sure why but today it was recognized, and installing TWRP and Magisk seemed to go smoothly.
I now have another question: this post (from 2019) mentions that I should've not installed Magisk the way I did.
I did the following:
1. unlock bootloader via Tool All In One
2. update OxygenOS via the notification I received, then reboot
3. install TWRP via Tool All In One
4. install Magisk via the TWRP menu and app (using the recommended choice)
What instead the guide says is: after TWRP and Magisk installed, update without rebooting, then install TWRP A/B Retention Script, then install Magisk to Inactive Slot and not the recommended Direct Install.
Could I have issues of any kinds, maybe update related, with these premises? If yes, what can I do to fix them?
Nevermind, phone's dead now. I will open another thread about it.
I think this guide is outdated.
That's what worked for me (Read everything before beginning) :
Unlock the bootloader
Update to the last OxygenOS version
Use Oxygen Updater app to be really up-to-date
Install TWRP
To do so, get the latest TWRP .img file here : https://twrp.me/oneplus/oneplus7pro.html
Get the latest twrp-installer.zip file too
It's ready for Android 11, maybe Android 12, I didn't tried
Don't forget to check "Developer options" in system settings
With your phone plugged in your computer, use adb commands and reboot to fastboot with "adb reboot bootloader"
Then, load TWRP with "fastboot boot twrp.img". Of course, you need to put the latest TWRP image file previously downloaded in the same folder and rename it "twrp.img"
In TWRP, go to Advanced then press "Flash Current TWRP"
Done !
Then, follow those instructions :
Wipe -> Factory Reset + : Wipe Data, System, Cache and Dalvik Cache
Install -> Flash ROM : Use the install function and install the ROM
Install -> Flash TWRP Installer : Don't reboot, go back and install as the previous step
Reboot -> Recovery : Reboot TWRP and it automatically load the other slot
Wipe -> Format Data : Click and type yes
Reboot -> System : Just reboot and it should load the installed ROM
Reboot to recovery
Install -> Magisk
Reboot -> System
Install -> Whathever you want
Reboot -> System
draentor said:
I think this guide is outdated.
That's what worked for me (Read everything before beginning) :
Unlock the bootloader
Update to the last OxygenOS version
Use Oxygen Updater app to be really up-to-date
Install TWRP
To do so, get the latest TWRP .img file here : https://twrp.me/oneplus/oneplus7pro.html
Get the latest twrp-installer.zip file too
It's ready for Android 11, maybe Android 12, I didn't tried
Don't forget to check "Developer options" in system settings
With your phone plugged in your computer, use adb commands and reboot to fastboot with "adb reboot bootloader"
Then, load TWRP with "fastboot boot twrp.img". Of course, you need to put the latest TWRP image file previously downloaded in the same folder and rename it "twrp.img"
In TWRP, go to Advanced then press "Flash Current TWRP"
Done !
Then, follow those instructions :
Wipe -> Factory Reset + : Wipe Data, System, Cache and Dalvik Cache
Install -> Flash ROM : Use the install function and install the ROM
Install -> Flash TWRP Installer : Don't reboot, go back and install as the previous step
Reboot -> Recovery : Reboot TWRP and it automatically load the other slot
Wipe -> Format Data : Click and type yes
Reboot -> System : Just reboot and it should load the installed ROM
Reboot to recovery
Install -> Magisk
Reboot -> System
Install -> Whathever you want
Reboot -> System
Click to expand...
Click to collapse
Thanks, I'll save it for next time. Unfortunately the phone's dead and I'm not sure how I got there, nor how or if I can recover it. I made a thread here https://forum.xda-developers.com/t/op7pro-dead-black-screen-wont-turn-on.4387537/

Categories

Resources