[RECOVERY][UNOFFICIAL] OrangeFox Recovery Project [OnePlus 8t / 9r] [16-JAN-2023]

Search This thread

parag0n1986

Senior Member
May 3, 2015
365
94
36
LG V20
OnePlus 7 Pro
I've been using the 8T OOS 13 version of OF to backup /data. And today I tested restoring a backup.
And I'm very pleased to find that the restore process works exactly as on OOS 12 (described in the TWRP thread).

I did come across one bug, however. The digest verification of a backup fails:
Code:
Verifying Digest
Calculating restore details...
tw_get_context got selinux context: u:object_r:rootfs:s0, file: /system_root
I:split_filename: /data/media/0/Fox/BACKUPS/c90b9650/221120-052300_oos-13-F.13-mc/data.f2fs.win000
Digest failed to match on '/data/media/0/Fox/BACKUPS/c90b9650/221120-052300_oos-13-F.13-mc/data.f2fs.win000'.
Yet the sha256sum of the file is the same as that in the digest file:
Code:
 $ sha256sum *000
82ab75ec31eab35c80310fad9ed08ef33c8a6878590ac99484f6763bba482baf  data.f2fs.win000
 $ cat *000.sha2
82ab75ec31eab35c80310fad9ed08ef33c8a6878590ac99484f6763bba482baf  data.f2fs.win000
Which one is for OOS13?
 

BillGoss

Senior Member
Sep 2, 2010
5,490
4,853
Sydney
OnePlus 8T
Digest check still fails on restore on OOS 13 v14
Logs and screenshot attached.

PS: also .foxs file wasn't saved to /sdcard/Fox
 

Attachments

  • OF-oos13-v14.zip
    612.1 KB · Views: 12
Last edited:

Wishmasterflo

Senior Member
Nov 21, 2018
1,478
1,074
Stockholm
OnePlus 8T
It's there a limit to the number zipped copies of recovery logs that OF keeps in /sdcard/Fox/logs?
And is there a way to set this number?
No there is no way to limit that number.
I had set in the config that it should not keep the log history, so it would only keep the current log but it seems for some reason in the Orangefox "pre-release" Version some things does not work as they should.
Also that unified script which should set the correct device name is not being executed in the "pre-release" Version but I have not found out yet why that is the case.
 

BillGoss

Senior Member
Sep 2, 2010
5,490
4,853
Sydney
OnePlus 8T
Digest check still fails on restore on OOS 13 v14
Logs and screenshot attached.

PS: also .foxs file wasn't saved to /sdcard/Fox
A bit more information on the missing .foxs

It turns out that when the digest check fails, only then does the .foxs file disappear.
But, after trying to recreate it when the phone was booted, and failing, it turns out that there is a .foxs file, but with the wrong attributes:
Code:
# ls -lA /data/media/0/Fox
total 22
-rw-rw-r-- 1 root     root     3362 221127 11:43  .foxs
drwxrwsrwx 2 media_rw media_rw 3488 221120 05:27  .theme
drwxrwsrwx 3 media_rw media_rw 3488 221118 05:44  BACKUPS
-rw-rw-r-- 1 media_rw media_rw 3362 221127 10:44  foxs
drwxrwsrwx 2 media_rw media_rw 3488 221127 11:43  logs
drwxrwsr-x 2 media_rw media_rw 3488 221127 11:12  screenshots
 

Wishmasterflo

Senior Member
Nov 21, 2018
1,478
1,074
Stockholm
OnePlus 8T
A bit more information on the missing .foxs

It turns out that when the digest check fails, only then does the .foxs file disappear.
But, after trying to recreate it when the phone was booted, and failing, it turns out that there is a .foxs file, but with the wrong attributes:
Code:
# ls -lA /data/media/0/Fox
total 22
-rw-rw-r-- 1 root     root     3362 221127 11:43  .foxs
drwxrwsrwx 2 media_rw media_rw 3488 221120 05:27  .theme
drwxrwsrwx 3 media_rw media_rw 3488 221118 05:44  BACKUPS
-rw-rw-r-- 1 media_rw media_rw 3362 221127 10:44  foxs
drwxrwsrwx 2 media_rw media_rw 3488 221127 11:43  logs
drwxrwsr-x 2 media_rw media_rw 3488 221127 11:12  screenshots
I will check on that tomorrow. I guess I might have an idea what is causing this.
That is probably the same root cause why that unified script is not executed anymore on startup.
 
  • Like
Reactions: BillGoss

dahawthorne

Senior Member
Nov 15, 2014
2,102
1,905
Brighton
I'm pretty sure somebody will say "Duh... did you not read...", but I've done a search and found nothing - well, one reference, but it was for info, not a solution.
I have been on F.13 since 23rd November, and my last Fox backup has that date, so I reckon that this backup was the old A12 C.36 version.
I've tried backing up again with OrangeFox-R12.1-Unofficial-OPKONA-OOS13-V14.img and I'm getting the infamous Error 255 failure.
I'd be grateful for any suggestions.
Log file end:
I:addFile '/data/nandswap' including root: 1
==> set selinux context: u:eek:bject_r:nandswap_file:s0
failed to lookup fscrypt tar policy for '/data/nandswap' - 'cf2c3625a8465c76d6cadfc6d5d46a44'
I:Closing tar
Splitting thread ID 0 into archive 10
I:addFile '/data/nandswap/rk2trCAAAAAcWmPHCOfCSFOmshxqGSRO' including root: 1
==> set selinux context: u:eek:bject_r:nandswap_file:s0
I:Error adding file '/data/nandswap/rk2trCAAAAAcWmPHCOfCSFOmshxqGSRO' to '/data/media/0/Fox/BACKUPS/*********/2022-12-19--17-11-02/data.f2fs.win009'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/Fox/BACKUPS/*********/2022-12-19--17-11-02/data.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
 
Last edited:

Wishmasterflo

Senior Member
Nov 21, 2018
1,478
1,074
Stockholm
OnePlus 8T
I'm pretty sure somebody will say "Duh... did you not read...", but I've done a search and found nothing - well, one reference, but it was for info, not a solution.
I have been on F.13 since 23rd November, and my last Fox backup has that date, so I reckon that this backup was the old A12 C.36 version.
I've tried backing up again with OrangeFox-R12.1-Unofficial-OPKONA-OOS13-V14.img and I'm getting the infamous Error 255 failure.
I'd be grateful for any suggestions.
Log file end:
I:addFile '/data/nandswap' including root: 1
==> set selinux context: u:eek:bject_r:nandswap_file:s0
failed to lookup fscrypt tar policy for '/data/nandswap' - 'cf2c3625a8465c76d6cadfc6d5d46a44'
I:Closing tar
Splitting thread ID 0 into archive 10
I:addFile '/data/nandswap/rk2trCAAAAAcWmPHCOfCSFOmshxqGSRO' including root: 1
==> set selinux context: u:eek:bject_r:nandswap_file:s0
I:Error adding file '/data/nandswap/rk2trCAAAAAcWmPHCOfCSFOmshxqGSRO' to '/data/media/0/Fox/BACKUPS/*********/2022-12-19--17-11-02/data.f2fs.win009'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/data/media/0/Fox/BACKUPS/*********/2022-12-19--17-11-02/data.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
That error should be fixed in the updated V14 Version I updated yesterday so just redownload it from my Github.
 
  • Like
Reactions: dahawthorne

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Now we have a Magisk flashable file for Orangefox as well. :)
    5
    New Updated Version

    Changelog

    R12.1 V14 15-Jan-2023
    - Updated Version with OOS13 F19 OP9R Kernel
    - Synced with latest fox_12.1 changes
    - Fixed props settings for the different Kona devices

    Still known issues:
    - USB file transfer not working in the OOS132 based Orangefox
    - Fastbootd not working in the OOS13 based Orangefox
    - No EROFS OOS13 based Version yet (will build that later, want to fix the other issues first!)
    2
    Ahh yes I recognized that.
    Will fix it in the next update.

    Trying now to fix USB file transfer etc....
    If it's the same issue that everyone else is having. Add this to your kernel.

    2
    Flashed the updated version successfully but then tried to flash the zip in recovery and it failed with the following message:
    Ahh yes I recognized that.
    Will fix it in the next update.

    Trying now to fix USB file transfer etc....
    2
    FYI

    I have updated the V14 pre-release Version of Orangefox with OOS13 F15 Kernel.

    I let it still be as a pre-release due to some more issues/things which I need to fix.

    Known issues and things to know:
    - USB file Transfer and fasbootd not working on the OOS13 based Version
    - No EROFS Version yet for OOS13 base (will built that when I have fixed the other issues)
    - It seems that the unified-script which should set the phone properties does not execute by some reason so it will detect all phones as Oneplus 8T now. (it is working correctly in the V13 Version though!)
    - some other small things I need to fix before a final release!
  • 27
    OrangeFox Recovery Project

    logo.jpg

    Code:
    /*
    * Your warranty is now void.
    *
    * We're 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 recovery
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you.
    *
    */

    OrangeFox Recovery for the Oneplus 8t/9r
    Download (for Android 12.x, 13 ROMs) (OOS12/OOS13 Based)
    Download (for Android 11 and below) (OOS11 Based)


    Boot it with: fastboot boot OrangeFox-R12.1-Unofficial-OPKONA-V14.img
    or flash it with: fastboot flash recovery OrangeFox-R12.1-Unofficial-OPKONA-V14.img


    Orangefox R12.1 can only be flashed to the recovery partition if you have OOS12 Firmware, but you can still boot it with fastboot boot if you are on OOS11 Firmware and need to decrypt data on Android 12 or Android 13 ROMs.
    Some things like USB OTG etc are not working when using fox_12.1 on OOS11 Firmware!
    For Android 11 and lower ROMs please use Orangefox 11 from here.

    If the touchscreen is not working for you after booting/flashing Orangefox please Update your OOS/Firmware to a newer Version!

    Take a look at
    this Post from TWRP in regards of Backup and Restore or
    here from the Orangefox wiki.


    Keep in mind! Never flash a recovery file if you are not on the same OOS Firmware as the recovery is for, otherwise you will end up in Qualcomm Crashdump mode or just a black screen.
    Always just do a fastboot boot recovery.img until you are on the same OOS Firmware on your phone as the recovery is for, only then you can flash it with fastboot flash recovery as well!

    From OOS11 Firmware to OOS12/OOS13 Firmware ROM
    ---------------------------------------------------------------
    Check DDR RAM type (from Windows cmd)
    adb shell getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)

    or from Terminal on your phone
    getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)

    When you are on OOS12 or OOS13 use this from the Orangefox Terminal:
    cat /proc/devinfo/ddr_type

    Download latest Orangefox 12.1 img file from here
    Download OOS12 or OOS13 flashable Firmware for your phone from here or, Oneplus 8t, Oneplus 9r
    adb reboot bootloader
    fastboot boot OrangeFox_R12.1-xx.img
    adb sideload fw_Oneplus8T_EU_c36.zip
    adb rebooot bootloader
    fastboot flash recovery OrangeFox_R12.1-xx.img
    fastboot reboot recovery
    Apply Update - apply via ADB
    adb sideload ROM.zip
    Factory reset/Format Data
    Reboot System


    From OOS12/OOS13 Firmware to OOS11 Firmware ROM
    ---------------------------------------------------------------
    Please only use this right now when you have DDR4 RAM in your phone!

    Check DDR RAM type (from Windows cmd)
    adb shell getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)

    or from Terminal on your phone
    getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)

    When you are on OOS12 or OOS13 use this from the Orangefox Terminal:
    cat /proc/devinfo/ddr_type

    Download latest Orangefox 12.1 img file from here
    Download OOS11 flashable Firmware for your phone from here or, Oneplus 8t, Oneplus 9r
    Download Recovery_OOS11_FW_Android12_decryption.img from here
    adb reboot bootloader
    fastboot boot Orangefox R12.1 recovery
    flash OOS11.0.13.13 Firmware
    flash ROM.zip
    reboot to bootloader
    fastboot boot Recovery_OOS11_FW_Android12_decryption.img
    Factory reset/Format Data
    Reboot System

    ROM Flashing instructions:
    (take a look at the Spoiler above if you need to switch OOS Firmware Base for your ROM)
    -Flash ROM
    -Flash OrangeFox (only when your device is on the same OOS FW as the recovery)
    -Reboot to recovery (to switch slot)
    -Flash Gapps (if needed)
    -Flash Magisk (Magisk can be installed through Fox addons - Install Magisk as well)
    -Format data
    -Reboot to system

    If you get a Bootloop after flashing a ROM and having done a Format Data do the below:

    Boot to bootloader and:
    - fastboot devices
    - fastboot -w
    - fastboot reboot


    Orangefox OP8 series and 9r Unified
    XDA Thread
    Source Code: https://gitlab.com/OrangeFox
    Device Tree (A12):
    https://github.com/Wishmasterflo/device_oneplus_opkona/releases
    Device Tree Kebab (A11): https://github.com/Wishmasterflo/android_device_oneplus_kebab
    Wiki/FAQ: https://wiki.orangefox.tech/en/guides
    older Versions of OrangeFox R11.1:
    download


    OrangeFox Version: R12.1
    Version: V14 beta
    Last Updated: 16-Jan-2023

    Changelog
    R12.1 V14 16-Jan-2023
    - Updated Version with OOS13 F19 OP9R Kernel
    - Synced with latest fox_12.1 changes
    - Fixed props settings for the different Kona devices
    - Fixed file formatting from Windows to Linux which was causing file issues in the device tree
    - Added a Magisk flashable Module for Orangefox (thanks to MeHigh.G)

    R11.1 V14 07-Nov-2022
    - Adjusted some devive specific settings
    - Exclude /data/fonts from Backup to avoid errors during Backup
    - Changed splash screen background color to black

    old Changelogs


    Credits
    * ApexLegend007 for Android 12.1 device Tree
    * The-Incognito for Recovery Trees of Oneplus 8T
    * YumeMichi For Implementing Erofs and Other Misc
    * bigbiff for decryption
    * Pranav Talmale for decryption
    * Systemad for original tree
    * CaptainThrowback for original tree
    * mauronofrio for original tree
    * BillGoss for Backup and Restore
    * Qnorsten for OOS fix
    * TWRP team
    * OrangeFox team
    11
    Hi!

    I uploaded a new Version with the latest OrangeFox R11.1 changes

    R11.1 V9 01-June-2022
    - Synced with latest OrangeFox R11.1 changes

    FYI

    I see that the Orangefox Team is still working on the new Version R12.1 which will support Android 12 but that Version is not ready to build it yet as it still seems to have many bugs and issues.
    As soon they fully release it I will build it for our Oneplus 8t.

    Stay tuned!
    11
    Good news. 😊

    Orangefox R12.1 got released now.
    During the next week I can try to build it for the Oneplus 8t.
    9
    Hi all!

    I have updated the OP now with a Spoiler and flashing Instructions when switching from OOS11 Base Firmware to OOS12 Base Firmware or from OOS12 Base Firmware to OOS11 Base Firmware and download links for both Oneplus 8t and Oneplus 9r :)

    Keep in mind! Never flash a recovery file if you are not on the same OOS Firmware as the recovery is for, otherwise you will end up in Qualcomm Crashdump mode or just a black screen.
    Always just do a fastboot boot recovery.img until you are on the same OOS Firmware on your phone as the recovery is for, only then you can flash it with fastboot flash recovery as well!

    EDIT: It seems that the Firmware downgrade from OOS12 to OOS11 is not working on phones with DDR5 RAM, so please dont use the downgrade from OOS12 to OOS11 when you have DDR5 RAM !!!!!

    From OOS11 Firmware to OOS12 Firmware ROM
    --------------------------------------------------------
    Check DDR RAM type (from Windows cmd)
    adb shell getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)
    or from Terminal on your phone
    getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)
    When you are on OOS12 use this from the Orangefox Terminal:
    cat /proc/devinfo/ddr_type
    Download latest Orangefox 12.1 img file from here
    Download OOS12 flashable Firmware for your phone from here or, Oneplus 8t, Oneplus 9r
    adb reboot bootloader
    fastboot boot OrangeFox_R12.1-xx.img
    adb sideload fw_Oneplus8T_EU_cXX_DDR0.zip
    adb rebooot bootloader
    fastboot flash recovery OrangeFox_R12.1-xx.img
    fastboot reboot recovery
    Apply Update - apply via ADB
    adb sideload ROM_OOS12_Based.zip
    Factory reset/Format Data
    Reboot System


    From OOS12 Firmware to OOS11 Firmware ROM
    --------------------------------------------------------
    Please only use this right now when you have DDR4 RAM in your phone!
    (seems that phones with DDR5 RAM get issues after flashing the OOS11 Firmware)

    Check DDR RAM type (from Windows cmd)
    adb shell getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)
    or from Terminal on your phone
    getprop ro.boot.ddr_type
    0 - represents your device is LPDDR4X (use DDR0 Firmware file)
    1 - represents your device is LPDDR5 (use DDR1 Firmware file)
    When you are on OOS12 use this from the Orangefox Terminal:
    cat /proc/devinfo/ddr_type
    Download latest Orangefox 12.1 img file from here
    Download OOS11 flashable Firmware for your phone from here or, Oneplus 8t, Oneplus 9r
    Download Recovery_OOS11_FW_Android12_decryption.img from here
    adb reboot bootloader
    fastboot boot Orangefox R12.1 recovery
    flash OOS11.0.13.13 Firmware
    flash ROM_OOS11_Based.zip
    reboot to bootloader
    fastboot boot Recovery_OOS11_FW_Android12_decryption.img
    Factory reset/Format Data
    Reboot System
    8
    Hey, at least its one step closer to finally switching to the new firmware. :)
    Yes I am a step closer now, I have updated it now with OOS12 files but still no luck in getting the decryption of data working.
    Guess I have to add/update some more things to get that working.
    Seems to me now that it is not even trying to decrypt now since something is missing or not yet updated.
    Have to dive deeper into this to understand what more needs to be fixed /updated now.