[Asus ROG Phone 6 / 6 Pro] AnonymousJoker365:
Here are scripts to Backup and Restore important partitions of ROG Phones, this was used for ROG Phone 5s to backup the 10 important partitions but might work with 6 as well (can somone test and confirm who has unlocked bootloader?). It is useful if you have a backup of your partitions (assuming you backed them up before flashing other firmware) and want to restore them if you accidentally wiped or lost imei, fingerprint, etc during EDL flash. It works with rooted phone, but since we cant unlock bootloader we have to wait for asus to (hopefully one day) let us do it again. Make sure to backup your partitions before flashing to avoid any problems related to missing partitions and also avoid bricking your phone, like being stuck in EDL 9000E, etc. This can help restore imei, fingerprint, etc but only if you have a back up of your OWN important partitions of your device. You can also use this to convert CN to WW. If somone can test this who has unlocked bootloader and report back with the results as it would help to also update the information and guide and make sure this is safe to use on ROG 6. This worked very well in ROG5/5S so i had to post it here since the partitions of ROG 6, 5/5S are similar, as always use at your own risk as i have not tested it fully yet on ROG 6 models and for those who tested the scripts on ROG 6, let me know how it goes.

Unlock Bootloader (Alternate Method):

Unlocking the bootloader and rooting

DISCLAIMER: I WAS NEVER, HAVE NEVER BEEN, AND WILL NEVER BE RESPONSIBLE OF ANY DAMAGES AGAINST YOUR DEVICES BY YOUR OWN MIS-OPERATIONS Note: I suggest first of all patching the boot.img using magisk, you can extract the update here, payload.bin...

xdaforums.com

Instuctions(to flash and run script in ENG firmware, SKIP THIS!!! tested, not working!):

1. Install proper ASUS usb drivers and qualcomm EDL Drivers.

2. Put your phone in EDL Mode, Flash repair to bootloader package, then flash ENG RAW (Flash ENG at your own risk!!!) in bootloader mode. DONT FLASH ENG FIRMWARE AS EDL FIRMWARE OR YOU MAY LOSE IMPORTANT PARTITIONS!!!

3. Wait for EDL and RAW flash process to finish.

4. Once you have booted into the ENG firmware run script Backup.bat or Restore.bat depending on your situation.

Instructions(to run script on rooted phone):

1. Enable Developer options in settings.

2. In Developer options, enable USB Debugging.

3. Run script Backup.bat or Restore.bat depending on your situation.

Note: if you are unable to boot into any firmware and need to restore partitions, it might be possible to restore partitions just by entering recovery mode menu (not bootloader mode) with rooted phone that had USB debugging enabled and connect the phone to PC and let it stay in recovery mode menu (without choosing any option) while running the scripts on PC ADB will be able to detect the phone and restore partitions if the phone is rooted and USB debugging was enabled in firmware before crash.

NOT TESTED ON ROG 6 !!! Instructions(Convert CN to WW):

1. backup persist.img by using commands or Backup.bat script.

2. then use an hexeditor, find COUNTRY and change CN to WW inside persist.img.

3. Restore persist.img to phone, run Open-Cmd.bat. To restore, use these commands,

1st use adb push persist.img /sdcard/

2nd use dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist