0
Cant flash oxygen

  1. nirmoyal10
    Gingerbread Nov 14, 2018

    nirmoyal10 , Nov 14, 2018 :
    Hello,
    When i try to flash zip of oxygen i get an error.
    Got OP5, rooted with oxygen 5.1.1.
    I prefer not to ota , may lossing root and custom recovery.

    i will glad go get a fix.


    Thanks
     

    Attached Files:


    #1
  2. Multiplatform Gamer
    Ice Cream Sandwich Nov 14, 2018


    #2
  3. Multiplatform Gamer
    Ice Cream Sandwich Nov 14, 2018


    #3
    nirmoyal10 likes this.
  4. nirmoyal10
    Gingerbread Nov 14, 2018

    nirmoyal10 , Nov 14, 2018 :
    how to unroot? i tried to find any flashable zip for Magisk...
     

    #4
  5. Multiplatform Gamer
    Ice Cream Sandwich Nov 14, 2018


    #5
  6. Multiplatform Gamer
    Ice Cream Sandwich Nov 14, 2018


    #6
  7. nirmoyal10
    Gingerbread Nov 14, 2018


    #7
  8. nirmoyal10
    Gingerbread Nov 15, 2018

    nirmoyal10 , Nov 15, 2018 :
    I got error after uninstalled.
    Should i flash it as ota and after flash twrp?
     

    #8
  9. Multiplatform Gamer
    Ice Cream Sandwich Nov 15, 2018

    Multiplatform Gamer , Nov 15, 2018 :
    i don't know. i don't play with root anymore. i use stock OOS
     

    #9
  10. AlexandreP
    Honeycomb Nov 17, 2018

    AlexandreP , Nov 17, 2018 :
    Hello!

    You say you're on 5.1.1 at the moment, right? A throwback look at OOS 5.1.5 and 5.1.6 release notes' threads (see here and here) put emphasis on first making sure to upgrade to 5.1.4 before flashing 5.1.5, and then being on 5.1.5 before flashing 5.1.6/5.1.7. Those releases prepared your device to be Treble-enabled, and then enabled Treble. Jumping directly from 5.1.1 to latest 5.1.7 without having your device prepared to Treble is probably why you get the error 7 in TWRP -- it would be my best guess.

    As you're several updates behind, here's what I would do if I where in your situation:
    1. Download the full signed zips for OOS 5.1.4, 5.1.5 and 5.1.7 from Titokhan's thread and put them on your internal storage.
    2. Reboot to TWRP, and un-root by following previous instructions from Gabriel's post.
    3. While still in TWRP, flash OOS 5.1.4, then reboot to system. (After you reboot, you will have lost TWRP. That's okay.)
    4. Reboot to recovery (it will be OnePlus' recovery), and flash OOS 5.1.5, then reboot to system.
    5. Reboot to recovery, and flash OOS 5.1.7, then reboot to system.
    6. Finally, follow the steps from Funk Wizard's tutorial to TWRP and root.


    In normal circumstances, it should be okay to flash a full OTA update above a rooted device. Never flash partial, incremental OTA on a rooted device -- always stick to full, complete OTAs.

    Once you're updated to latest release and re-rooted, try to install future updates regularly. Funk Wizard maintains a thread on XDA with guides for rooted devices every time a new release comes out.

    If you have TWRP, do not use the system updater from within OxygenOS. Always flash updates from TWRP.

    If you flash a full signed ZIP (again, never flash partial OTA on a rooted device) from TWRP and forget to re-root before rebooting to system, then TWRP will be overwritten by OnePlus' default recovery. But if you immediately flash Magisk after you upgrade and before you reboot to system, TWRP will stick.
     

    #10
    anupritaisno1 and nirmoyal10 like this.
  11. nirmoyal10
    Gingerbread Nov 18, 2018

    nirmoyal10 , Nov 18, 2018 :
    Hi,
    Ty very much!
    I'll give it a try for sure.
     

    #11
  12. nirmoyal10
    Gingerbread Nov 20, 2018

    nirmoyal10 , Nov 20, 2018 :
    He
    Almost done with this, got a problem with twrp , when I flash it , it can't be saved. When I reboot it gets lost and returns to stock recovery.
    What can I do?
     

    #12
  13. anupritaisno1
    KitKat Nov 20, 2018

    anupritaisno1 , Nov 20, 2018 :
    @Multiplatform Gamer I doubt you even know what you're talking about

    TWRP error codes are useless. You didn't read the error message and simply pulled up a solution that won't work

    Read the error message and don't help unless you understand

    Now, let's get on to this one:
    What you've said is 100% correct. The message above the error is what helps in diagnosing the issue so let's take a look at it
    IMG_20181121_031102_999.jpg

    Do you see what it says? Vendor partition is not existed, exit OTA!! right above the error 7? It's not the error code but the message above the error that helps

    5.1.4 probably adds a vendor partition
    5.1.5 sets up treble

    Other update packages do not contain the code to add support for these

    That is why you can't skip these updates
     

    #13
  14. anupritaisno1
    KitKat Nov 20, 2018


    #14
  15. anupritaisno1
    KitKat Nov 20, 2018

    anupritaisno1 , Nov 20, 2018 :
    Now to the recovery part

    Ever installed magisk and wondered what this option does?
    IMG_20181121_034401_660.jpg

    That's the trick to installing incremental OTAs on a rooted device
    If you tick that option then you won't be able to mount system or vendor but you will be able to do incremental OTAs

    Flashing incremental OTAs on rooted devices:
    First in TWRP, click on the mount button
    Tick mount system partition read-only
    Reflash ROM
    Go to backups, now select boot and backup boot
    Flash magisk with that option enabled
    Now verify that AVB/dm-verity is enabled

    Flashing incremental OTAs
    Go to backups and restore the boot backup
    Flash incremental update
    Reinstall magisk

    Incremental OTAs verify the system before flashing so the risk of a bad flash is very low

    Flashing without that option:
    Backup these: system image and vendor image. Restore before installing an incremental OTA and then backup the new images, root again

    There is absolutely no difference between flashing an incremental OTA vs flashing a full OTA

    There is a script in your system partition. It's at /system/bin/install-recovery.sh

    It has a binary patch that when applied to the boot image yields the recovery image

    It's similar to an incremental OTA. For now I'll define source and target
    For an incremental OTA, source is your current system image. Target is what the incremental OTA will upgrade to

    For install-recovery.sh, source is your boot partition. The partition containing your boot image or kernel is the boot partition and the target is the recovery partition. The binary diff is at /system/recovery-from-boot.p and this might have a .bak appended to the end of the file name because that is how twrp stops install-recovery.sh from replacing the recovery

    If you modify the kernel, the incremental patch creation with boot as source fails because magisk modifies the boot image and now the recovery image can no longer be derived from boot so twrp sticks when you flash magisk

    I can simplify my explanation by explaining it as a reversible thermodynamics reaction but only if you have a good hold on the chemistry required for it
     

    #15
  16. nirmoyal10
    Gingerbread Nov 21, 2018

    nirmoyal10 , Nov 21, 2018 :
    Hey, ty for answering.
    Got other issue, TWRP cant access storage.
    It always asks me if I want that twrp will ''read only'' when rebooting to recovery.
    I was able to install magisk through tool box( couldnt through commending window install twrp) when I rebooted it returned to stock recovery.
    How can I fix that twrp issue?

    Thanks
     

    #16
  17. anupritaisno1
    KitKat Nov 21, 2018

    anupritaisno1 , Nov 21, 2018 :
    Try a twrp by blu.spark or eng.stk instead of the official twrp
     

    #17
    nirmoyal10 likes this.
  18. nirmoyal10
    Gingerbread Nov 21, 2018

    nirmoyal10 , Nov 21, 2018 :
    I will give it a try.

    Thanks!
     

    #18
  19. nirmoyal10
    Gingerbread Nov 21, 2018

    nirmoyal10 , Nov 21, 2018 :
    hey,
    system is unmoutiftied , it was wrriten, something like that, even after flashed blu spark
     

    #19
  20. anupritaisno1
    KitKat Nov 21, 2018

    anupritaisno1 , Nov 21, 2018 :
    I'll explain just a sec

    IMG_20181121_143457_700.jpg
    Twrp shows that warning because it is necessary. Unless you flash magisk or use a custom kernel you will not be able to boot if you swipe to allow modifications

    Just select keep read only. You can still mount data so don't worry

    Tick never show this screen at boot again to hide the warning forever
     

    #20