[ZTE Axon 7 ROMs, Kernels, Recoveries, & Other Deve] Oki:
HOW TO KEEP ALL YOUR DATA WHEN UPGRADING TO A TREBLE ROM

WARNING, !!! Whatever you do, it is at your own risk !!!

​

You can always dirty flash AEX or Havoc by taking a backup of your data and restoring it afterwards. it works and the procedure is easy, all you need is an SD card with enough free space. An empty external SD card of the same size as the internal storage will ensure this requirement. After completing these steps, you will be able to flash back and forth from Treble and non-treble versions of the ROM the same way you have been doing before, and with the usual risks of any other dirty flash. You can bypass the data partition backup/restore if you only want to keep your internal storage.

To dirty flash the Treble ROM package provided by NFound you need a Windows PC, Windows 10 is highly recommended. Do this:

Ensure you have any Oreo bootloader (B12, universal or my integrated package). If you don't have it, then install it before anything else.

In your computer, Download the EDL ZIP file for repartition your phone to create a vendor partition.

Unzip the package to a folder, ensuring there are no errors.

Install MiFlash in your PC. It includes the Qualcomm Snapdragon SoC drivers, nonetheless you can always install the latest drivers.

Download the AEX ZIP file, The new TWRP 3.2.1-8 Treble image, OpenGAPPS(ARM64, 8.1, micro) and Magisk 16.7 to your external SD card.

Boot to your your current TWRP recovery and flash TWRP 3.2.1-8 Treble image file into recovery partition.

Boot Recovery again and go to Backup, press select_storage button, select your Micro SD card. select your data partition (Optionally you can also select system and Boot in case something goes wrong). This will create a backup of your apps and their protected app data among other files. Do not reboot yet.

To backup all your pictures, music, videos, and the rest of the non protected app data in your internal storage, go to the main menu > Advanced > Terminal, at the command prompt type:

tar zcpv sdcard | split -b1024m - /external_sd/sdcard.tgz

You need to know the format of your current data filesystem. If you are not sure, go to Wipe > Advanced Wipe, select vendor partition and tap on Repair_or_Change_File_System button. At the top you will see the File system as EXT4 or F2FS. remember this information and go back to the main menu.

Press Reboot > EDL to enter into flashing mode. The screen will be off.

If you haven't done yet, it's time to connect your phone to your computer.

Back in your computer, Open MiFlash.

Click Browse button and select the folder you created with the EDL firmware files in step (2).

Click Refresh button and your device will appear listed as virtual COM port.

Click Flash button and wait for a few minutes until it finishes. Note the bottom options are not applicable.

Once it had finished, press VolUp+Power until the phone vibrates to enter into recovery

To ensure everything is clean you should format the DATA partition, including internal storage and the new VENDOR partition. Go to settings and ensure "Use rm -rf instead of formatting" option is not selected. Then go to Wipe > Advanced Wipe, select vendor partition and tap on Repair_or_Change_File_System button and then on Change_File_System button. Select EXT4 and confirm. Repeat the format procedure on Data but this time using EXT4 or F2FS depending on what you got in step (8). Do not reboot yet.

Return to the main menu and install the treble ROM, OpenGAPPS and Magisk. Clear dalvik/cache, and do not reboot yet.

Now go to RESTORE, select your external storage and select the last backup you did. restore ONLY your data partition. Do not reboot yet.

To restore all your pictures, music, videos, and the rest of the non protected app data to your internal storage, go to the main menu > Advanced > Terminal, at the command prompt type:

cat /external_sd/sdcard.tgz* | tar zxpv

You are all set. Reboot to system.

At this point you can dirty flash back and forth from Treble and non-treble versions of AEX with the usual risks of any other dirty flash.

Enjoy!