[G4 Android Development] steadfasterX:
IMPORTANT: DO NOT RELY ON THE EFS BACKUP IN TWRP!

Background:

I found out due to my unofficial unlocking attempts that the current EFS backup

may

not work as expected.

We all believed from the beginning on that the EFS is related to modemst1 and modemst2 but thats not the (whole) truth!

Those partitions contain statistic information which at the end can be erased without loosing anything (if u wanna try: do it on your own risk and making a backup before though).

E.g. when you have baseband "unknown" you can use fastboot erase modemst1 / modemst2 and you should see the correct baseband again.

I was able to recover my IMEI from 0 to the real one by flashing the

fsg

partition plus erasing modemst1 and 2! I cannot say for sure that this is 100% the way to do but that was it for me.

Doing one without the other wasn't working but those together brought it back to me.

For the moment please use

http://tinyurl.com/dlbackup

- at least Option B) to ensure that you have 100% saved your IMEI !

I will update TWRP when i have more information on this stuff.

Btw the mentioned linked new backup solution can backup really every partition on your device - that means more then TWRP will ever do for you ;) (e.g.

saving your current lock/unlock state

(correcting myself: just added to TWRP ;) ), userdata/internal storage etc)

UPDATE-1:

you may be able to restore your IMEI nevertheless regarding to this: https://xdaforums.com/g4/help/help-imei-0-t3660318/post73489308#post73489308

UPDATE-2:

if someone is willing to test this for me (it will actually do NOTHING but just print out what it WOULD do):

boot into TWRP

adb shell

Then execute this:

DDPATH='/dev/block/bootdevice/by-name/*'
for part in $(find $DDPATH | egrep -v "(/cache|/userdata|/system|/recovery|/boot|/grow)");do name=${part/*\/}; echo "dd if=$part bs=512 status=progress | gzip -vc > /external_sd/fulldump/${name}.gz";done
dd if=/tmp/recovery.log bs=512 | gzip -vc > /tmp/dummy.gz
dd if=/tmp/recovery.log bs=512 status=progress | gzip -vc > /tmp/dummy.gz

I do

not

need the dummy.gz but the whole console output of the above.

UPDATE-3:

if someone is willing to test this for me:

boot into TWRP

use this TWRP image: View attachment 4250434 (extract and flash as Image to recovery partition or use: fastboot boot twrp.img)

go to Backup and select:

EFS

"BL unlock state"

"BL stack test"

-> and start the backup

adb pull /tmp/recovery.log

Attach the recovery.log in your answer

UPDATE-4:

if someone is willing to test this for me:

boot into TWRP

use this TWRP image: BETA-5 (flash as Image to recovery partition or use: fastboot boot twrp.img)

go to Backup and select:

EFS

"BL unlock state"

"BL stack test"

-> and start the backup

adb pull /tmp/recovery.log

Also do this (AFTER the backup is important):

adb shell sha256sum /data/media/0/TWRP/BACKUPS/*/*/rmisc.emmc.win
adb shell sha256sum /data/media/0/TWRP/BACKUPS/*/*/drm.emmc.win
adb shell sha256sum /data/media/0/TWRP/BACKUPS/*/*/persistent.emmc.win
adb shell sha256sum /data/media/0/TWRP/BACKUPS/*/*/bl*.emmc.win
adb shell sha256sum /dev/block/mmcblk0p35
adb shell sha256sum /dev/block/mmcblk0p22
adb shell sha256sum /dev/block/mmcblk0p40
adb shell sha256sum /dev/block/mmcblk0p8
adb shell sha256sum /dev/block/mmcblk0p7
adb shell sha256sum /dev/block/mmcblk0p2
adb shell sha256sum /dev/block/mmcblk0p5
adb shell sha256sum /dev/block/mmcblk0p37
adb shell sha256sum /dev/block/mmcblk0p4
adb shell sha256sum /dev/block/mmcblk0p6
adb shell sha256sum /dev/block/mmcblk0p3

Attach the recovery.log and the console output of the sha256sum commands in your answer

UPDATE-5:

thx to [MENTION=5461026]kessaras[/MENTION] and [MENTION=7321996]crysknife4life[/MENTION] I have now the logs needed to identify the current working state.

Will crawl through and let you know when I can tell more.

Stay tuned I will update asap...

UPDATE-6:

UPDATE-7:

UPDATE-8:

thx to [MENTION=5461026]kessaras[/MENTION] , [MENTION=7321996]crysknife4life[/MENTION] and [MENTION=6219132]ufocus[/MENTION] we made TWRP for our device a lot better one more time

the backup of the bootloader stack (brand new feature) and the fix for the EFS backup seems to work fine - at least for the backup part.

I need testers for an uncomplicated and easy time test:

https://xdaforums.com/showpost.php?p=73593672&postcount=539

... and I need also brave testers to try the restore...

The test would be as follows:

Install latest BETA (sfx-

12

or higher)

Backup your device with DLM Backup ( https://tinyurl.com/dlbackup ) - option B

Backup your device with TWRP and ensure you tick

every

box except for System_Image (just the regular system is enough)

Pull the revovery.log (FAQ #4 A) , compress it and upload it to e.g. http://filedropper.com or your google drive or whatever fits best for you

Flash the bootloader stack of another Android version (e.g. now you have MM then flash the one of LL) by e.g. a KDZ/TOT - you may have to check anti rollback first!

Flash the latest TWRP beta (sfx-

12

or higher) again

Restore the TWRP backup including Firmware , Bootloader ,EFS and BL unlock state

Pull the revovery.log (FAQ #4 A) , compress it and upload it to e.g. http://filedropper.com or your google drive or whatever fits best for you

See if it boots your restored system ..

I'm still waiting for my device to get it back from repair so I still need ur help here ...

.