[RECOVERY][SHARED][surya]OrangeFox Recovery Project[R11.0_A] Xiaomi POCO X3 NFC

Search This thread

m0han

Senior Member
Apr 30, 2012
5,197
2,204
...if it's not working right, reboot to recovery and flash something lower.
i was lucky to get fw and kernel to flash without incident.
all good as of now. thanks for your tips.

Screenshot_2021-01-05-01-04-28.pngScreenshot_2021-01-05-01-06-07.pngScreenshot_2021-01-05-01-13-06.png
 

m0han

Senior Member
Apr 30, 2012
5,197
2,204
  • Like
Reactions: Slim K

Slim K

Senior Member
May 16, 2015
185
2
124
HTC One (M8)
Sony Xperia Z5
i'm given to understand that the fw file in Firmware Archive, which is 74.18 MB only, is enough to get the job done fine.
the files in MIUI Downloads are large files (2.4 GB). the files in Vendor Downloads are also large files (1.1 GB).
Sorry. Shared wrong screenshot, but my point still stands that you looked into the wrong section.
The main reason why i shared the MIUI package is because a vendor/system img mismatch is one of the reasons safetynet fails with basic integrity. You should know that most ROMs here do not have their own vendor included, they patch the pre-existing vendor (hence the MIUI version requirement before installing).
Now lets run a hypothetical situation, you have 12.0.8.0 stock MIUI installed. You flash 12.0.5.0 firmware, then flash a ROM based on that version, the ROM patches the vendor partition as if it was 12.0.5.0 but it is not!! If you boot the ROM everything works fine on the surface, but looking at the active system log, you will see multiple SELinux denials, causing increased CPU usage and draining the battery by not letting your phone go into deep sleep state.
So I do it like this (my own experience):
  1. Regardless of the pre-existing MIUI, i flash the required MIUI recovery version in ofox. And since it does not touch data partition, my apps and data are still safe.
  2. I flash the custom ROM of choice, but
  3. I don't reboot to system yet, else i risk a google play services crash (if i'm dirty flashing the same ROM), because GMS Core has been deleted, so i reboot directly to recovery instead.
  4. But then you ask, why haven't you flashed gapps directly without rebooting to recovery at all (in case of a clean flash) , but asking that question means lack of understanding of dynamic partitions. Since wiping system/vendor/product is now done in different manner than old phones, it is done basically through "resizing" those partitions inside super.img and in turn automatically wiping them, but direct Gapps installation will fail saying system partition is too small (ofox/twrp does not show the right partition size after resizing before a reboot due to partition table limitations).
  5. I format data (if clean flashing).

TL;DR flashing a MIUI recovery ROM yields the best results, you get the right basis and an encrypted vendor w/o the headache of forgetting something. If flashing fw does it for you, then they're available on that site.
 

Attachments

  • Screenshot_20210105-061404_Bromite.png
    Screenshot_20210105-061404_Bromite.png
    277.4 KB · Views: 103
Last edited:

jeryll

Senior Member
Dec 23, 2010
898
712
Lenovo P11
Realme GT
You mean you formatted data and were able to restore it to the same state as before? That's great if that works. Even better if it works with encrypted vendor.
that's the beauty of unencrypted fw/storage, that you don't need to format data and destroyed everything on your internal storage, all your media will be intact, all you need is to wipe cache, dalvik, data after you flash ROM and reboot, that is huge time saver if you don't need to restore all your photos, music, etc all over again after you play with the new ROM and decided to go back because it's actually worse than what you have before

CONTINUE HERE (LINK TO GUIDE), CONTENT BELOW IS OUTDATED!

WARNING: consider this guide as BETA, I don't recommend backup/restore procedures with Orange fox recovery Beta or TWRP 3.5.0_10-x for actual backups of your data (TRY THIS ONLY AT YOUR OWN RISK) ONLY FOR TESTING PURPOSES (we need more thorough tests through the time and through different scenarios)

Preliminary guide to backup/restore with
Orange fox recovery Beta

TWRP 3.5.0_10-x
(decrypted vendor and storage used)

Backup method A
:
- backup boot and data partition

Restore:
- wipe cache, dalvik, data
- flash ROM + GAPPS that you have installed when you created backup
- restore backup of boot and data partition
- remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !) but before reboot!

Reboot


Bugs found:
- if you remove your password/PIN/pattern protection directly before backup you can end up after restore with system where you can't change your password/PIN/pattern anymore

- if you forget to remove your password/PIN/pattern protection AFTER RESTORE you can end up after restore with system demanding to enter your password/PIN/pattern which MAY or MAY NOT BE ACCEPTED even if it is CORRECT and maybe INACCESSIBLE because of that

- Google Pay will never be restored properly (or anything depending on actual password in time of backup), because of the removed password, you will need to set up it again after restore

----------------------------------------------------------------------------------------------------------------

Backup method B:
- backup super, boot, dtbo and data partition

Restore:
- wipe cache, dalvik, data (optional)
- restore super, boot, dtbo and data partition

Reboot
(everything will be restored to the state in time of the backup) ¹)


- if needed remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !)
- in case you lost your Fox addons thanks to format data or using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password


Bugs found:
¹) your backups will be fully restored along with password/PIN/pattern and fingerprints - this will work until you'll format data, after that you'll loose ability to use your password to enter the system and depending on ROM features you can either skip password entering with fingerprints (RR) or reset your password so you can enter the ROM (CrDroid), in RR everything works, except you can't change your password etc, in CrDroid you need to re set up your password depending apps

this guide is (will be) continuously updated as I discover new facts or post new, updated steps or how-to's

ROM RR 8.6.6 or CrDroid 7.2 + stock fw 12.0.7 + encryption disabler v1
 
Last edited:

m0han

Senior Member
Apr 30, 2012
5,197
2,204
...a vendor/system img mismatch is one of the reasons safetynet fails with basic integrity. ....most ROMs ..patch the pre-existing vendor (hence the MIUI version requirement before installing).
....multiple SELinux denials, causing increased CPU usage and draining the battery by not letting your phone go into deep sleep state.
.....flashing a MIUI recovery ROM yields the best results, you get the right basis and an encrypted vendor w/o the headache of forgetting something. If flashing fw does it for you, then they're available on that site.
ah! Firmware Archive is where i should've looked. thanks for the info reg. flashing MIUI recovery ROM for best results.
 

jeryll

Senior Member
Dec 23, 2010
898
712
Lenovo P11
Realme GT
CONTINUE HERE (LINK TO GUIDE), CONTENT BELOW IS OUTDATED!

Guide to backup/restore with Orange fox recovery Beta
(encrypted vendor and storage used)


Backup
:
- backup boot and data partition

Restore:
If you are restoring a data backup of an encrypted device, there are precautions that you should take before starting the restore process (obviously, your backup must be on MicroSD or other external storage medium - NOT on the internal storage):
    • Format the data partition (NOTE: format - not just wipe)
    • Reboot OrangeFox
    • Flash the original zip of the ROM whose backup you are trying to restore
    • Wipe cache and dalvik
    • Reboot to system to ensure that the newly-flashed ROM actually boots, and that it re-encrypts the device with its own encryption
    • Reboot to OrangeFox
    • Tap on the Backup icon
    • Select the partition(s) that you wish to restore
    • Swipe to restore

  • If you do not follow all these steps, you can expect problems with restoring data

Reboot

Bugs found: TBD

Credits: OrangeFox devs as this guide is copied directly from OrangeFox wiki
 
Last edited:

m0han

Senior Member
Apr 30, 2012
5,197
2,204
...guide to backup/restore with Orange fox recovery Beta 4 (encrypted fw and storage used)
Backup:
- backup boot and data partition
Restore:
- flash ROM + GAPPS that you have installed when you created backup
- format data (yes)
- reboot system
- on setup screen don't continue, but reboot to recovery
- restore backup of boot and data partition.
Reboot....
is there any way one can restore data alone through recovery after trying another rom? i've read it is not advisable, but.... :D
 

jeryll

Senior Member
Dec 23, 2010
898
712
Lenovo P11
Realme GT
Thanks for trying that. Would you mind explaining this "bug" a bit more, please?
when you made a backup of your data partition protected by specific pin or password or pattern, I would expect after restoring that backup back to data partition, that will be again protected by that specific pin or password or pattern (which only you know and therefore your data will not be accessed by anyone else), but that is not the case...

Orange fox recovery use for encryption while preparing and formatting data partition only default password, and if you restore to that partition your data, that special password (that nobody knows only you) from your backup (is it even stored in backup? IDK) is not used for replacing the default one, data are restored, but not anymore protected by your special password... so anyone close to your phone can access your data without password if you didn't use also another level of protection (f. e. fingerprints) ...

Hopefully this explanation is understandable...

is there any way one can restore data alone through recovery after trying another rom? i've read it is not advisable, but.... :D
yes, just don't restore boot, only data
 
  • Like
Reactions: temporarium

jeryll

Senior Member
Dec 23, 2010
898
712
Lenovo P11
Realme GT
So the "danger"/problem is that the backed-up data isn't really protected. Is that what you're saying?
- to be honest, I don't know about backup itself, but restored data previously protected by special password after restoring aren't
- when you reboot your phone after restoring your data (previously protected by special password known only to you in that exact time when you created backup) Android will show you only lock screen that can be swiped away and start your launcher with direct access to your data, apps, photos, medias, documents, etc. (and we are talking here about encrypted storage that should protect your data before unwanted access)

The encryption password can be changed later by adding a pin or password protection, correct?
yes, but the time between the actual restore and when you actually recreate your special password is the real danger here, depending on sensitivity of your data, if you forget to recreate password/pin/pattern for whatever reason more important than that and leave you phone unattended, somebody with access to your phone at the time can access your precious data at will...
 
  • Like
Reactions: temporarium

temporarium

Senior Member
is there any way one can restore data alone through recovery after trying another rom? i've read it is not advisable, but.... :D
This is not recommend because each ROM stores its settings differently, etc., so you're likely to create a mess. Data partition backups should only be restored with the same ROM with which they were made.
Make app backups using Titanium or the like to try on another ROM with a fresh/clean data partition. Then you can come back to your original ROM and restore the data backup you made for it.
That would be the safest, I'd say.
 
  • Like
Reactions: m0han and jeryll

Porcupine1

Senior Member
Dec 14, 2017
158
44
@jeryll My poco will be unlock this week and i want to flash crdroid and just to make sure first I must extract zip and do this: (Your orangefox of course and Im on the latest stock)

fastboot flash recovery recovery.img
fastboot boot recovery.img

and here Im not sure first i must do factory reset and format data if im come from stock or first flash the rom and after all do factory reset and format? Thanks for any tips and so sorry for noob stuff. And I forgot about Disable_Dm-Verity_ForceEncrypt should I flash it too or with Orangefox its not needed. Once again Im so sorry and thank you.
 

jeryll

Senior Member
Dec 23, 2010
898
712
Lenovo P11
Realme GT
@jeryll My poco will be unlock this week and i want to flash crdroid and just to make sure first I must extract zip and do this: (Your orangefox of course and Im on the latest stock)

fastboot flash recovery recovery.img
fastboot boot recovery.img

and here Im not sure first i must do factory reset and format data if im come from stock or first flash the rom and after all do factory reset and format? Thanks for any tips and so sorry for noob stuff. And I forgot about Disable_Dm-Verity_ForceEncrypt should I flash it too or with Orangefox its not needed. Once again Im so sorry and thank you.
few things to mention:
- IIRC unlocking will trigger factory reset on your phone automatically, so before you do that backup everything
- using encrypted fw you'll using format data (confirmed by typing yes) AFTER you'll flash ROM + GAPPS (optional), magisk flash latest beta after first successful boot of the system (don't forget every format data means your internal memory gets erased, backup before you do so!)
- first flash extracted recovery.img from Ofox Beta 4 zip, boot to recovery and reflash Ofox Beta 4 zip again, so you wil have available also recovery addons (they're located on internal storage, so with every format data they'll get deleted, if you want them back, reflash Ofox Beta 4 zip again)
 

m0han

Senior Member
Apr 30, 2012
5,197
2,204
... format data (confirmed by typing yes) AFTER you'll flash ROM + GAPPS (optional), magisk flash latest beta after first successful boot of the system ....with every format data they'll get deleted, if you want them back, reflash Ofox Beta 4 zip again...
please comment about the other point mentioned in the post you were responding to. i was also meaning to ask this.

....about Disable_Dm-Verity_ForceEncrypt should I flash it too or with Orangefox its not needed....
 

jeryll

Senior Member
Dec 23, 2010
898
712
Lenovo P11
Realme GT
please comment about the other point mentioned in the post you were responding to. i was also meaning to ask this.
not sure why people are obsessed with flashing Disable_Dm-Verity_ForceEncrypt and such reliquaries, all you need to flash is ROM, GAPPS, magisk, anything else is applied on the fly or directly after flashing as required, read you screen FFS!
If you really need to have that - it's built-in and you can switch it ON if you know what you are doing (don't switch it on because you think it should be on, only if you know it must be on)

Screenshot_2021-01-10-06-51-05.png
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    new beta of 🍊 🦊 is here, enjoy!
    source: Telegram

    OrangeFox R11.0 - UNOFFICIAL | Beta
    Updated: 10/01/'21

    By @ManoloRey
    🔹 Donate

    Changelog:
    • Fix Vibration
    • Rework Fastbootd and Adb Sideload code
    • Use USB configs from MIUI
    • Remove predefined services

    Note:
    • Thanks to @MrYacha and @DarthJabba9 - Source Development

    Screenshot_2021-01-11-05-37-47.png
    17
    OrangeFox Recovery Project


    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 is FREE SOFTWARE

    Supports MIUI and Custom Roms

    Credits
    * OrangeFox Recovery Project Team
    * @LUNARIO, who did ALL the work, but sadly opened a thread violating the rules and the link to Recovery was deleted and the thread moved. Original here.

    FEATURES:
    * Touch Screen every single time
    * Decryption works
    * Fixed Error 7 while clean or dirty flashing (starting from version 6)
    * Migrate backup installation (starting from version 6)
    * OTG support
    * ROM Flashing works 100%
    * F2FS Support
    * Fastboot commands supported

    NOT WORKING FOR NOW:
    * Fastbootd
    * ADB Sideload
    * Backing up and restoring Image Flash (system-vendor-product)

    DOWNLOAD
    Version 6 - Google: https://drive.google.com/file/d/1eHM9ST9ni-55bbT3z-TGSZQsgE3KYr9s/view


    OLD VERSION DOWNLOAD
    Version 4 - Google: https://drive.google.com/file/d/1Qq6hqaEOstxajOC7Y6AGeRYajhMWjttL/view
    Version 0 - Sourceforge: https://sourceforge.net/projects/or...x-R11.0_0_Alpha-Unofficial-surya.img/download


    INSTALLATION
    1. Download the OrangeFoxRecovery IMG file to your PC.
    2. Restart your POCO X3 in Fastboot mode (Power+Vol Down)
    3. Use ADB and type in the following command:
    Code:
    fastboot flash recovery "OrangeFox-R11.0_6_Alpha-Unofficial-surya.img"
    4. After it is installed successfully, type in this command:
    Code:
    fastboot boot "OrangeFox-R11.0_6_Alpha-Unofficial-surya.img"
    5. The device will automatically reboot into OrangeFox Recovery after installation (allow this to happen)
    6. Enjoy!


    Version Information
    Status: Alpha
    Alpha Release Date: 2020-10-14
    14
    ... Orange recovery, not stable at all as I read here, will let me to flash MAGISK Canary ? Please let me know, I would like to start using my new phone...
    Hm, not stable at all, you say... Really? Then I must be incredible lucky, cos I'm flashing ROMs with A6 version for almost one month and nothing bad happened to me (or my phone :) )... Main thing is to know what you are doing, else bad things can and probably will happen...

    All I can say is you are incredible lucky too, because here is brand new Beta version of Ofox with a lot of fixes, bigger, shinier... found on *elegram and is up to you what will you do... I flashed it already and will test in a few days what works and what not...

    bugs:
    all reboot functions works only on second try (but it works)
    edit: this could be related to your currently flashed fw
    (on 12.0.3 reboot only works on second try, on 12.0.5 it started to work correctly, on the other hand now sorting files in ofox is not remembered anymore :rolleyes:)


    Orange Fox recovery download here
    13
    seems brigudav is on fire, so here's new version of OFOX, probably bugfix release, no changelog, but different md5, than yesterday, so redownload please, thanks, this time we also have flashable zip too, enjoy...

    md5 (img): 751933e8d51141f3faca61fecd8a756c
    md5 (zip): 38311773dc6fa006cefe5deae2872503
    12
    - new version of OFOX is here (finally!), many thanks to @brigudav
    - no official changelog yet, but first look tells this:
    -- files sorting is finally remembered between reboots
    -- naming of your external sdcard changed from sdcard1 to external_sd
    -- location name of your existing backups changed (was some numerical value, now is POCO_X3), so you need to relocate your backup files from old directory to POCO_X3 else they will not be visible in this version of OFOX
    - enjoy!

    redownload new version here