[GUIDE] Backup / Restore function in Poco X3 recoveries [OrangeFOX / TWRP]

Search This thread

temporarium

Senior Member
May 16, 2012
837
438
I guess this is as good a place as any to ask: what is the advantage of decrypting data?

I don't think running encrypted slows things down (not like it used to in the past when devices weren't as powerful), and there is the huge benefit of having your data secure. Any lost/stolen phone will soon send up in the hands of someone (on either side of the law) who knows adb/fastboot, so just having a password isn't going to protect your data if it's not encrypted.

It's possible to do backups of encrypted data, just the same as unencrypted.

Formatting vs wiping: ends up doing the same - all the data is gone and has to be restored. So that's a non-issue.

So, why should one prefer to decrypt?
@jeryll , any thoughts? I think you're a proponent of running decrypted. Why? What are the pros/cons in your opinion?
 

jeryll

Senior Member
  • Dec 23, 2010
    842
    664
    Xiaomi Poco X3 NFC
    Redmi Note 10 Pro
    @jeryll , any thoughts? I think you're a proponent of running decrypted. Why? What are the pros/cons in your opinion?
    I personally just don't like if something is forced on me (at all), which POCO/XIAOMI does with that default enabled encryption ... why? Lets leave it off and if somebody want that, it can be turn on, no? What precious data do you have on your phone, that it needs be encrypted all the time? How often do you loose your phone to prove that encryption is useful to be default on? And seriously do you trust POCO/XIAOMI that they protect your data with "this" encryption?

    If I wanted a secure phone the only option is Samsung (with Knox at least) - IT guys in my work only allows Samsung phones - if you want to use your phone in company network... - or some specialized phones available on the market, but surely not POCO/XIAOMI ...

    Encryption turned on by default is not a problem, if you're a MIUI user, who update MIUI 10-20 times in the phone life cycle? For MIUI you only format data maybe once if you're upgrading also Android version ...

    But for a custom ROM user, who likes to test new ROMs available and most of the time also likes to go back, because most of the new ROMs sucks anyway :(

    Not to mention that if you have a lot of photos, music, medias on your internal storage - god forbid that you forget to backup those in cloud or copy to external sdcard... before you format data...

    And what about backup restore? I want perfect nandroid backup as I was used to do on A9, and I want to restore it also perfect - you can forget about this with encrypted storage...

    Personally I don't give a sh*t if my internal storage is encrypted or not - give me the tools for a backup and restore and ROM installation without format data and I'm a happy camper...
     

    temporarium

    Senior Member
    May 16, 2012
    837
    438
    Personally I don't give a sh*t if my internal storage is encrypted or not - give me the tools for a backup and restore and ROM installation without format data and I'm a happy camper...
    Thank you for you frank comments 👍🏻
    I guess everyone had their usage scenario and "threat" level...

    But, I agree, backup and restore are key.
     
    • Like
    Reactions: jeryll

    cskarlata

    Member
    Mar 9, 2015
    12
    0
    Could someone tell me if I did the backup correctly?
    Screenshot_2021-04-28-13-51-34.png
    Screenshot_2021-04-28-13-56-15.png
     

    Master One

    Senior Member
    Jan 31, 2011
    742
    254
    Europe
    @jeryll, the upgrade from ArrowOS 11 nightly 20210503 to the latest 20210510 with OSS vendor requires a clean flash.

    Any idea if backup/restore of the data partition with OrangeFox can be used in that case to restore the phone with all apps & settings?

    I'm not sure why the upgrade of the same custom ROM, with the only drastic change being the move from original vendor to OSS vendor, requires a clean flash.

    I've put a lot of time to setup a total of six POCO X3 NFC and of course I don't want to start all over again with installing and configuring just because of going forward with the new OSS vendor.
     

    SkaboXD

    Senior Member
    Jan 18, 2017
    1,040
    359
    Ganja
    Xiaomi Poco X3 NFC
    @jeryll, the upgrade from ArrowOS 11 nightly 20210503 to the latest 20210510 with OSS vendor requires a clean flash.

    Any idea if backup/restore of the data partition with OrangeFox can be used in that case to restore the phone with all apps & settings?

    I'm not sure why the upgrade of the same custom ROM, with the only drastic change being the move from original vendor to OSS vendor, requires a clean flash.

    I've put a lot of time to setup a total of six POCO X3 NFC and of course I don't want to start all over again with installing and configuring just because of going forward with the new OSS vendor.

    That's because whole vendor is changed itself. Simple. It contains absolutely different files compared to stock vendor and by dirty flashing you would get bootloop. Also take in mind that firmware is also updated to A11 12.0.7, so that's another reason why dirty flash doesn't work. Clean flash is advised to avoid any bugs. That's why I always do clean flash.
     

    Master One

    Senior Member
    Jan 31, 2011
    742
    254
    Europe
    That's because whole vendor is changed itself. Simple. It contains absolutely different files compared to stock vendor and by dirty flashing you would get bootloop. Also take in mind that firmware is also updated to A11 12.0.7, so that's another reason why dirty flash doesn't work. Clean flash is advised to avoid any bugs. That's why I always do clean flash.
    So by installing the new A11 FW and latest ArrowOS 11 with OSS vendor followed by formating data, what would be the proper way to restore all apps + app data + settings to get back to the previous state?

    I'm totally lost with this right now. I know about backup/restore of the data partition using recovery, I have OAndBackupX (but never performed a full app + app data backup yet), but I don't have or use Titanium Backup.

    There surely must be a way to upgrade by clean flashing AND restoring everything so that the phone is in the same state of installation/configuration as before, because starting all over again on a total of six POCO X3 NFC (for the whole family) would be a total nightmare.
     

    temporarium

    Senior Member
    May 16, 2012
    837
    438
    So by installing the new A11 FW and latest ArrowOS 11 with OSS vendor followed by formating data, what would be the proper way to restore all apps + app data + settings to get back to the previous state?

    I'm totally lost with this right now. I know about backup/restore of the data partition using recovery, I have OAndBackupX (but never performed a full app + app data backup yet), but I don't have or use Titanium Backup.

    There surely must be a way to upgrade by clean flashing AND restoring everything so that the phone is in the same state of installation/configuration as before, because starting all over again on a total of six POCO X3 NFC (for the whole family) would be a total ornightmare.
    Titanium and OAndBackupX will backup and restore your apps, but don't rely on them for system settings and configurations, or contacts/calendars, etc.

    Having 6 devices, here is your chance to experiment 😁

    Just kidding.

    Anyway, you could try a full OF backup (including Internal Storage) onto an SD Card and do a dirty flash to see what happens. Don't wipe/or format data, just boot into system once before installing Magisk. Make sure you remove any password/pin protection before you even begin.

    If you can't get past this, you could flash the original ROM and restore your backup (as indicated in the OP).

    All this is experimental and may/may not work, so your decision 😉 You may very well have to start from scratch, but you would have to anyways if you decided to use the newer ROM.
     

    Master One

    Senior Member
    Jan 31, 2011
    742
    254
    Europe
    @temporarium, it has already been confirmed that there is no way around a clean flash with A11+OSS vendor, so trying to dirty flash the A11+OSS upgrade is out of question.

    Not sure on how to proceed. Starting from scratch with at least user app + app data backup using OAndBackupX is an option, but that's going to be extremely cumbersome for six phones.

    And then there is the issue that according to @evolez in his reply concerning the ArrowOS 11 update, there is no custom recovery supporting A11+OSS device decryption yet, so if this is true, I will have to wait for an update to OrangeFox or TWRP anyway, because there is no way I'm going to forego device encryption.
     

    jeryll

    Senior Member
  • Dec 23, 2010
    842
    664
    Xiaomi Poco X3 NFC
    Redmi Note 10 Pro
    @temporarium, it has already been confirmed that there is no way around a clean flash with A11+OSS vendor, so trying to dirty flash the A11+OSS upgrade is out of question.

    Not sure on how to proceed. Starting from scratch with at least user app + app data backup using OAndBackupX is an option, but that's going to be extremely cumbersome for six phones.

    And then there is the issue that according to @evolez in his reply concerning the ArrowOS 11 update, there is no custom recovery supporting A11+OSS device decryption yet, so if this is true, I will have to wait for an update to OrangeFox or TWRP anyway, because there is no way I'm going to forego device encryption.
    - unless OOS vendor has fixed NFC bug (Gpay payments not working) I would avoid to install any ROM using it if you need that functionality ... If you must - use Swift backup (or Migrate) to backup your apps + data, do a clean flash of ArrowOS(OSS) - or with something that you are familiar with ... and restore ...
    - you can try on one of your phones to backup /data partition, do a clean flash of ArrowOS(OSS) and restore /data after - maybe it'll work, that need to be tested anyway by someone ...
    - if possible use latest brigudavs TWRP to do backup and restore (it "should" work with A11 encryption - not tested) - not sure when will be Ofox for surya updated to work properly with A11 encryption, but that depends entirely on Ofox devs, they may wait when A11 TWRP branch/source will be marked as stable and that may take time (1 - 6 months)
    - in a few hours (waiting for unlock (last hour - YAY!)) I am switching to my new phone (sweet - Redmi Note 10 Pro) where only latest TWRP is able properly decrypt A11 encryption, and devs compiling Ofox for "sweet" says they cant do nothing about it unless ofox devs update sources from TWRP and that may take time (1 - 6 months)
     

    Master One

    Senior Member
    Jan 31, 2011
    742
    254
    Europe
    @jeryll, not using Gpay, so not concerned about a NFC bug.

    Hopefully more info will become available soon and others do some testing and confirming, because our six POCO X3 NFC are in daily use and can not be used for experimenting around with this.
     

    pnin

    Senior Member
    Aug 26, 2010
    466
    189
    LG G Pad 8.3
    ZTE Axon 7
    - in a few hours (waiting for unlock (last hour - YAY!)) I am switching to my new phone (sweet - Redmi Note 10 Pro)

    So, are you jumping PX3 ship? At least the forums here will be a lot poorer when you do... 😟

    Hopefully more info will become available soon and others do some testing and confirming, because our six POCO X3 NFC are in daily use and can not be used for experimenting around with this.

    This is has been my main gripe with this device: I don't mind a bit of hacking to get my way, but I have other things to worry about and have no will to become an hardcore flasher.

    Lack of stable basic functionalities like nandroid backups is very discouraging.
     
    Last edited:

    jeryll

    Senior Member
  • Dec 23, 2010
    842
    664
    Xiaomi Poco X3 NFC
    Redmi Note 10 Pro
    So, are you jumping PX3 ship? At least the forums here will be a lot poorer when you do... 😟
    - yep, but "sweet" is basically PX3 with amoled display and slightly better camera (also it has working MIUI 12 where all my Android apps actually works - shame on you POCO SW engineers!) and way better signal reception ... I can only recommend it ...
    - I'm giving my PX3 to someone who may or may not accept it, so if it will stick with me, I will use it for far more testing as until now ... we will see ...
     

    pnin

    Senior Member
    Aug 26, 2010
    466
    189
    LG G Pad 8.3
    ZTE Axon 7
    I feel the same -- I have a Redmi Note 8 on the back burner, but was just eager to see the PX3 live up to its specs.

    While I'm usually a very patient guy, this is the most effort I have invested on any device I ever owned -- from the original Samsung Galaxy up.
     

    jeryll

    Senior Member
  • Dec 23, 2010
    842
    664
    Xiaomi Poco X3 NFC
    Redmi Note 10 Pro
    - yep, but "sweet" is basically PX3 with amoled display and slightly better camera (also it has working MIUI 12 where all my Android apps actually works - shame on you POCO SW engineers!) and way better signal reception ... I can only recommend it ...
    - I'm giving my PX3 to someone who may or may not accept it, so if it will stick with me, I will use it for far more testing as until now ... we will see ...
    /OT
    well, call me blind, but only after unlock and flash and first boot of TWRP on my new "sweet" phone I realized they send me 128GB version instead of 64GB - first I thought there is a bug in TWRP showing wrong free space of internal memory, but then I checked box and it is indeed 128GB version of sweet - double sweet! for the same money! AliExpress rulez!
    OT/
     
    • Love
    Reactions: pnin

    Top Liked Posts

    • There are no posts matching your filters.
    • 14
      Preliminary guide to BACKUP / RESTORE with
      OrangeFox recovery by ManoloRey

      LINK
      or
      TWRP recovery 3.5.X_10-x by brigudav

      LINK

      ! ! ! USE ONLY LINKED VERSIONS OF RECOVERIES ! ! !

      Consider this guide for (decrypted vendor (or encryption disabler) + decrypted storage used) as BETA, I don't recommend backup/restore procedures with OrangeFox 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 / EDUCATIONAL PURPOSES !

      Do not ask for help if your data have been lost because they can't be restored, or suddenly your backup - successfully restored several times before - now can't be! This is still buggy and sometimes for unknown reasons restore of your data can fail ! Restore process always worked 100 % for me, but results sometimes differ !


      YOU HAVE BEEN WARNED!

      (decrypted vendor (or encryption disabler) + decrypted storage used)
      - 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!
      - in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
      Reboot

      Comment(s):

      - 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 boot 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 super, boot, dtbo and data partition (metadata partition is optional)

      Restore:
      - wipe cache, dalvik, data (optional)
      - restore super, boot, dtbo and data partition (metadata partition is optional)
      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 OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password

      Comment(s):
      ¹) your backups will be fully restored along with password/PIN/pattern and fingerprints - this will work until you'll format data (or for something else that needs to be discovered yet), after that you'll loose the ability to use your password to enter the system and depending on ROM features you can either skip password entering with fingerprints (RRemix) or reset your password so you can enter the system (CrDroid), in RRemix everything works, except you can't change your password etc, in CrDroid you need to re-setup your password depending apps

      - if you remove your password Google Pay will never be restored properly (or anything depending on actual password in time of backup), you will need to set up it again after restore
      x x x​
      (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 / TWRP
      • 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 / TWRP
      • 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

      Comment(s):
      TBA

      Credits: OrangeFox devs as this guide (for encrypted vendor and storage used) is copied directly from OrangeFox wiki slightly modified by me by adding "/ TWRP" to the text

      this guide will be updated if I discover new facts or post new, updated steps or how-to's
      4
      Thanks for your patience. I was under the impression that if you disable security locks then you had no encryption and the script would just ensure it would remain so. By your reaction I'm assuming I was wrong...

      Overall, I am just getting fed up with always having to format data and having to start from scratch.

      I not longer have OFox, I'm currently running brigudav's TWRP "v3.5.0_10-5-surya".
      As you said, that encryption_disabler.zip is a shell script, which makes the folder in /product/vendor_overlay/29/etc and copies fstab.qcom from vendor to it. Then edits every line using the shell command sed (aka stream editor) that includes the string fileencryption= with the string encryptable=.

      The above described process is usually done on the first boot of a newly installed ROM as is with every vendor_overlay entry in product (minus the edited strings ofc). Editing it after the ROM reads vendor fstab.qcom and encrypts the data partition is useless. However, formatting data (deleting keystore essentially) and flashing that .zip should also do the trick. Might as well update your base MIUI and ROM while you're at it :p
      3
      @jeryll , any thoughts? I think you're a proponent of running decrypted. Why? What are the pros/cons in your opinion?
      I personally just don't like if something is forced on me (at all), which POCO/XIAOMI does with that default enabled encryption ... why? Lets leave it off and if somebody want that, it can be turn on, no? What precious data do you have on your phone, that it needs be encrypted all the time? How often do you loose your phone to prove that encryption is useful to be default on? And seriously do you trust POCO/XIAOMI that they protect your data with "this" encryption?

      If I wanted a secure phone the only option is Samsung (with Knox at least) - IT guys in my work only allows Samsung phones - if you want to use your phone in company network... - or some specialized phones available on the market, but surely not POCO/XIAOMI ...

      Encryption turned on by default is not a problem, if you're a MIUI user, who update MIUI 10-20 times in the phone life cycle? For MIUI you only format data maybe once if you're upgrading also Android version ...

      But for a custom ROM user, who likes to test new ROMs available and most of the time also likes to go back, because most of the new ROMs sucks anyway :(

      Not to mention that if you have a lot of photos, music, medias on your internal storage - god forbid that you forget to backup those in cloud or copy to external sdcard... before you format data...

      And what about backup restore? I want perfect nandroid backup as I was used to do on A9, and I want to restore it also perfect - you can forget about this with encrypted storage...

      Personally I don't give a sh*t if my internal storage is encrypted or not - give me the tools for a backup and restore and ROM installation without format data and I'm a happy camper...
      2
      @temporarium, it has already been confirmed that there is no way around a clean flash with A11+OSS vendor, so trying to dirty flash the A11+OSS upgrade is out of question.

      Not sure on how to proceed. Starting from scratch with at least user app + app data backup using OAndBackupX is an option, but that's going to be extremely cumbersome for six phones.

      And then there is the issue that according to @evolez in his reply concerning the ArrowOS 11 update, there is no custom recovery supporting A11+OSS device decryption yet, so if this is true, I will have to wait for an update to OrangeFox or TWRP anyway, because there is no way I'm going to forego device encryption.
      - unless OOS vendor has fixed NFC bug (Gpay payments not working) I would avoid to install any ROM using it if you need that functionality ... If you must - use Swift backup (or Migrate) to backup your apps + data, do a clean flash of ArrowOS(OSS) - or with something that you are familiar with ... and restore ...
      - you can try on one of your phones to backup /data partition, do a clean flash of ArrowOS(OSS) and restore /data after - maybe it'll work, that need to be tested anyway by someone ...
      - if possible use latest brigudavs TWRP to do backup and restore (it "should" work with A11 encryption - not tested) - not sure when will be Ofox for surya updated to work properly with A11 encryption, but that depends entirely on Ofox devs, they may wait when A11 TWRP branch/source will be marked as stable and that may take time (1 - 6 months)
      - in a few hours (waiting for unlock (last hour - YAY!)) I am switching to my new phone (sweet - Redmi Note 10 Pro) where only latest TWRP is able properly decrypt A11 encryption, and devs compiling Ofox for "sweet" says they cant do nothing about it unless ofox devs update sources from TWRP and that may take time (1 - 6 months)
      2
      So, are you jumping PX3 ship? At least the forums here will be a lot poorer when you do... 😟
      - yep, but "sweet" is basically PX3 with amoled display and slightly better camera (also it has working MIUI 12 where all my Android apps actually works - shame on you POCO SW engineers!) and way better signal reception ... I can only recommend it ...
      - I'm giving my PX3 to someone who may or may not accept it, so if it will stick with me, I will use it for far more testing as until now ... we will see ...