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

Search This thread

temporarium

Senior Member
May 16, 2012
808
424
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
798
620
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
808
424
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

Top Liked Posts

  • There are no posts matching your filters.
  • 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...
    1
    Are there further instructions for first install? I did google but failed to find anything reliable...
    not that I know of, just flash it as last thing before you reboot (either recovery or to system), but you need to format data (yes) to remove encryption
    1
    not sure what do you want to achieve by flashing of encryption disabler without actually disabling encryption by formatting your data partition...
    so what do you want to verify?
    if you start OFOX, on the initial screen you can see the state of your data partition (encrypted/decrypted)
    1
    Thanks for the detailed explanation, Slim K. Sadly there's no escaping formatting data, which I'll do next...

    Might as well update your base MIUI and ROM while you're at it :p

    I had done so already, hence my reluctance to do it again.
  • 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...
    1
    there is 2 checkboxes for super with the same size in OF. one says (Product, Vendor, System).
    which one to select or both?
    Only one, backup of super from either is identical
    1
    I pretty much subscribe to every single aspect jeryll wrote down... (y)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone