yashsingh1/xdaforums huggingface dataset:
[Redmi Note 8 Questions & Answers] ictecnics:
How it's supposed I have to do partition backup? In TWRP? I did backups of partitions of PCs but never of an Android system. I looked inside "Backup" option in TWRP and it seems that's the way. But in the dialog of backup I see "Data (excl. storage)". This means that /sdcard (internal) will not be copied? I also have Boot, cache, dtbo, efs, modem,recovery, system and vendor partitions. And after the backup? What's suposed I've to do?

Thank you
[Redmi Note 8 Questions & Answers] alecxs:
you can backup from TWRP with adb pull

adb pull /dev/block/bootdevice/by-name/userdata
adb pull /dev/block/bootdevice/by-name/metadata

you can do nothing with that backup, but restore if you messed up with gesture.key or whatever.

the best option you have is dirty flash previous ROM and cross fingers the anti-rollback protection didn't upgrade encryption keys.
[Redmi Note 8 Questions & Answers] ictecnics:
I tried to flash previous ROM version at the beginning but system doesn't boot. I'll try again after doing a backup. In the other hand copied adb_keys from another Ubuntu system that I had before my new M2 disk to /data/misc/adb and the new Ubuntu and the old Ubuntu (Sata SSD) are both capable to connect with adb shell. It's normal?
[Redmi Note 8 Questions & Answers] alecxs:
you can get a logcat or dmesg to see why old ROM doesn't boot.
[Redmi Note 8 Questions & Answers] ictecnics:
Pulling boot image after downgrading and with init script?
[Redmi Note 8 Questions & Answers] alecxs:
yes. or simply run 'adb logcat' during boot.
[Redmi Note 8 Questions & Answers] ictecnics:
Tried to flash 3.6 and get error. I'm in 3.9 now. I think that's an error in the zip file or the USB Drive. Tomorrow I can try again with other copy of the file and another Pendrive. But.... there's a way to do a fschk or similar in Android?
[Redmi Note 8 Questions & Answers] alecxs:
fsck in TWRP only works if no metadata encryption present (or if at least the FDE part is decrypted)
[Redmi Note 8 Questions & Answers] ictecnics:
Tried to flash 3.6 zip, 3.5 zip but flash fails with error code 1. Rolling back to 3.5 or 3.6 after 3.9 doesn't work. I did it days ago, at the beginning of this thread, but with the same zip, now, fails. After failing with code 1, flashing again 3.9 ends correctly.
[Redmi Note 8 Questions & Answers] alecxs:
you can check recovery.log for reason why it failes, modify updater.script so it passes all tests and flash again.

or simply write partition image manually.
[Redmi Note 8 Questions & Answers] ictecnics:
Tried to flash 3.8 over existing 3.9

3.6 fails too.

I attach log.
[Redmi Note 8 Questions & Answers] alecxs:
Can you format system? the zip is executed but there is a write error on partition or the zip itself is corrupted.

Decompression failed with BLOCK_LENGTH_2
missing 3957123 bytes of new data
failed to execute command [new 2,71717,72741]
script aborted: E1001: Failed to update system image.

Installing zip file '/usb_otg/elixir/ProjectElixir_3.8_ginkgo-13.0-20230523-0347-OFFICIAL.zip'
Unmounting System...
I:Update binary zip
Verifying package compatibility...
Package doesn't contain compatibility.zip entry
I:Extracting updater binary 'META-INF/com/google/android/update-binary'
I:Zip does not contain SELinux file_contexts file in its root.
SELinux: Loaded file_contexts
Target: Xiaomi/ginkgo/ginkgo:13/TQ2A.230505.002.A1/0347:userdebug/release-keys
----------------------------------------------
____ _ _
| _ \ _ __ ___ (_) ___ ___| |_
| |_) | '__/ _ \| |/ _ \/ __| __|
| __/| | | (_) | | __/ (__| |_
|_| |_| \___// |\___|\___|\__|
|_| |_/

_____ _ _ _
| ____| (_)_ _(_)_ __
| _| | | \ \/ / | '__|
| |___| | |> <| | |
|_____|_|_/_/\_\_|_|

----------------------------------------------
Android Version: 13
Build ID: TQ2A.230505.002.A1
Build Time: 20230523-0347
Security Patch: 2023-05-05
Device: ginkgo
----------------------------------------------
Patching system image unconditionally...
performing update
Target: Xiaomi/ginkgo/ginkgo:13/TQ2A.230505.002.A1/0347:userdebug/release-keys---------------------------------------------- ____ _ _ | _ \ _ __ ___ (_) ___ ___| |_ | |_) | '__/ _ \| |/ _ \/ __| __| | __/| | | (_) | | __/ (__| |_ |_| |_| \___// |\___|\___|\__| |_| |_/ _____ _ _ _ | ____| (_)_ _(_)_ __ | _| | | \ \/ / | '__| | |___| | |> <| | | |_____|_|_/_/\_\_|_| ---------------------------------------------- Android Version: 13 Build ID: TQ2A.230505.002.A1 Build Time: 20230523-0347 Security Patch: 2023-05-05 Device: ginkgo----------------------------------------------Patching system image unconditionally...blockimg version is 4
maximum stash entries 0
creating stash /cache/recovery/2bdde8504898ccfcd2c59f20bb8c9c25f73bb524
360554496 bytes free on /cache (0 needed)
/cache/recovery/last_command doesn't exist.
erasing 223238 blocks
writing 1024 blocks of new data
writing 1024 blocks of new data
...
writing 1024 blocks of new data
Decompression failed with BLOCK_LENGTH_2
missing 3957123 bytes of new data
failed to execute command [new 2,71717,72741]
script aborted: E1001: Failed to update system image.
E1001: Failed to update system image.error: 1001
Updater process ended with ERROR: 1
I:Install took 8 second(s).
Error installing zip file '/usb_otg/elixir/ProjectElixir_3.8_ginkgo-13.0-20230523-0347-OFFICIAL.zip'
Updating partition details...
I:checking for twrp app
I:Data backup size is 13189MB, free: 10123MB.
...done

what you can do is, extract the zip, convert into system.img and flash from fastboot.

as mentioned earlier, the encryption keys may updated by anti-rollback protection. do not install newer version than 3.6 if you don't know for sure 6x6 pattern is supported.
[Redmi Note 8 Questions & Answers] ictecnics:
I guess if I format system the /data and /sdcard data are preserved. I can try it.

How to convert content of zip to img?
[Redmi Note 8 Questions & Answers] ictecnics:
After formatting system and applying 3.6 zip I have exit code 1 again (recovery log attached).

After that, flashed 3.9 without problem.
[Redmi Note 8 Questions & Answers] alecxs:
did you expect different result for doing the same? ;)

here is a python script to convert

https://xdaforums.com/t/dev-sdat2img-1-1-img2sdat-1-7-o-unpack-re-pack-android-dat-files.2978952
[Redmi Note 8 Questions & Answers] ictecnics:
What am I supposed to do if after formatting, flashing version 3.6 doesn't work? I re-apply 3.9 to have a bootable system.

I'll try the second option but I doubt it will work either, before I applied 3.9 I was able to apply 3.6 (before I got adb authorization) and the unlock pattern was still 3x3 instead of 6x6
[Redmi Note 8 Questions & Answers] ictecnics:
In the python scripts there are Android versions checks.:

sdat2img/sdat2img.py at master · xpirt/sdat2img

Convert sparse Android data image to filesystem ext4 image - xpirt/sdat2img

github.com

img2sdat/img2sdat.py at master · xpirt/img2sdat

Convert sparse EXT4 image to sparse Android data image - xpirt/img2sdat

github.com

Will this work with A13?
[Redmi Note 8 Questions & Answers] alecxs:
sdat2img.py is a python script to convert system.new.dat into system.img. you run this on PC, not on phone, therefore the android version doesn't matter. I don't know the purpuse of the version check.

which version was the ROM with working 6x6 pattern? it's your best option to restore the phone into previous state. another option is to wait for release with 6x6 support.
[Redmi Note 8 Questions & Answers] ictecnics:
I know I have to run on PC, but inside the script there's a part like this:

version, new_blocks, commands = parse_transfer_list_file(TRANSFER_LIST_FILE)

if version == 1:
print('Android Lollipop 5.0 detected!\n')
elif version == 2:
print('Android Lollipop 5.1 detected!\n')
elif version == 3:
print('Android Marshmallow 6.x detected!\n')
elif version == 4:
print('Android Nougat 7.x / Oreo 8.x detected!\n')
else:
print('Unknown Android version!\n')

And the higher version is 8.x in this script, and 8.1 on the other script

[EDITED] The latest version I flashed with 6x6 was 3.5 and did a OTA update to 3.6. After this version, the upgrade changed 6x6 to 3x3.

On the other hand, there's a possibility to flash wrong ROM on purpose with dirty flash to provoke crash of pattern screen?
[Redmi Note 8 Questions & Answers] alecxs:
I can only imagine there exist different file formats of system.new.dat, but I wouldn't care too much about that. probably all system.new.dat are version 4 nowadays. Anyway, you can double check the success by loop mounting the system.img on linux.

crash of lockscreen will result in data loss, as the pattern is required for decryption. if I got you right installing 3.5 will bring back your 6x6 pattern.
[Redmi Note 8 Questions & Answers] ictecnics:
Finally downloaded new 3.5 zip from Sourceforge and flashed with different USB Stick. Flashed with no errors but I have bootloop. Flashed 3.6 and had bootloop again. Flashed 3.9, booted normally.

There's someting else to try or I can proceed with format device and installation of new ROM (I will never use Project Elixir because the lack of support of developers and maintainers)?

Thank you
[Redmi Note 8 Questions & Answers] alecxs:
probably the encryption keys are already upgraded, so rollback doesn't work. to confirm this you could get dmesg log. still there is hope to decrypt your data, just wait for release with 6x6 pattern support. ask the lead developer @sourav24071999 he is very helpful, they are maybe just busy so be patient.
[Redmi Note 8 Questions & Answers] ictecnics:
I think on July 28th version 4.0 will be released. But I don't think the 6x6 pattern unlock will be available after the update (I'm skeptical). I saw somewhere that they said that this pattern issue is caused by Google's QPR update and so if that's the case it's also not directly dependent on the ROM developers. I will try to contact @sourav24071999 but I believe I already tried via Telegram and passed him a link to this thread. How I have to check dmesg log? When ROM boots? Or it's somewhere inside the device?
[Redmi Note 8 Questions & Answers] Jatin Verma x821:
I would love to see you being successful in decrypting your data. Alecxs is a hero for helping out so long with his knowledge. Wish you luck 🤞
[Redmi Note 8 Questions & Answers] alecxs:
I wish I could help, data loss is nightmare. Unfortunately I don't have any knowledge in ROM development.

you can capture a dmesg log from shell script during boot. same as logcat but less verbose. just execute it and redirect output to file. put this line in startup script:

/system/bin/toybox dmesg -w &> /cache/dmesg.log &

or just type adb logcat during boot.
[Redmi Note 8 Questions & Answers] ictecnics:
I had no time to try with dmesg now. Probably I'll try later.

Attached logcat.log
[Redmi Note 8 Questions & Answers] alecxs:
I just had a quick look, it was too much for my eyes so I forgot what to look for. I could see boot finished and SIM unlocking successful. no hints on rollback protection, sure this is logcat of v3.5?
[Redmi Note 8 Questions & Answers] ictecnics:
No, this is a logcat of 3.9. Only ROM that boots. 3.5 doesn't boot.

I can flash it and upload lpgcat again but system doesn't boot because flashing fails as I said some few posts before.
[Redmi Note 8 Questions & Answers] alecxs:
the point of getting a log was to figure out the reason for boot-loop. but don't waste your time I guess it's the rollback resistance of encryption keys.

https://source.android.com/docs/security/features/keystore/version-binding

flashing itself must not fail. if that is the cause, use another flashing method as suggested.
[Redmi Note 8 Questions & Answers] ictecnics:
I think I'm not the only with this problem: https://github.com/TeamWin/android_bootable_recovery/issues/316
[Redmi Note 8 Questions & Answers] alecxs:
unrelated to your problem.
[Redmi Note 8 Questions & Answers] ictecnics:
In my device, TWRP doesn't ask for a pattern, an also it's not decrypting data. It worked before. Could it be that I had enabled the 6x6 pattern with the Xposed Magisk module? In this case (can't remember if it was) it might be possible to modify the pattern screen to enable 6x6 somehow (https://appuals.com/increase-pattern-lock-size-android/)
[Redmi Note 8 Questions & Answers] alecxs:
in either way it's not a TWRP nor encryption issue - as you confirmed right now
[Redmi Note 8 Questions & Answers] ictecnics:
Good morning, I thought about doing the following procedure:

- Copy the data partition

adb pull /dev/block/bootdevice/by-name/userdata

adb pull /dev/block/bootdevice/by-name/metadata

- Format of the device

- Installation of version 3.6

- If it doesn't have a native unlock pattern (I can't remember), enable it with Magisk and Xposed by matching the same unlock pattern.

- Restore data partition

adb push ./userdata /dev/block/bootdevice/by-name/userdata

adb push ./metadata /dev/block/bootdevice/by-name/metadata

Will it work?
[Redmi Note 8 Questions & Answers] alecxs:
No. In the moment you boot another ROM, the keystore (in TEE) will drop your encryption keys. the backup becomes useless.
[Redmi Note 8 Questions & Answers] ictecnics:
And backing up and restoring "keystore"?

If not, I think that I must consider my data lost.
[Redmi Note 8 Questions & Answers] alecxs:
your data isn't lost. you need the patched ROM (or TWRP) that is able to decrypt with 6x6 pattern. Android is open source, anyone with good coding skills can do that. it's far more easier than your other approach.

hacking TEE is next to impossible, except you're senior cybersecurity penetration tester. the partitions you can see are in userspace - keystore is not.
[Redmi Note 8 Questions & Answers] ictecnics:
Maybe flashing another ROM with explicit 6x6 support?
[Redmi Note 8 Questions & Answers] alecxs:
yes, should work as long as VENDOR_PATCH_LEVEL BOOT_PATCH_LEVEL OS_PATCH_LEVEL and OS_VERSION are not lower than the current ROM. or wait for TWRP is ready to decrypt, it already comes with 6x6 support.
[Redmi Note 8 Questions & Answers] ictecnics:
Where can find these strings / parameters to check it before flashing?

TWRP already decrypted data before, but not after the update. Latest update of TWRP is from October 2022. When it's expected to have a new release or beta?
[Redmi Note 8 Questions & Answers] ictecnics:
Tried to flash EvolutionX from TWRP (confirmed 6x6 support). No errors. Boot Fails and returning to TWRP. Tried with CherishOS and ArrowOS zip from TWRP (All of three with July Security Patch). No errors. Tried to clear cache and shows an error (I think related to the boot after flash):

Android Rescue Party Trigger! ...

The reported problem is:

'--reason=enablefilecrypto_failed'

Flashed Elixir 3.9 (May Security Patch). No errors. System doesn't boot. Returning to TWRP.

Stuck at this point now.
[Redmi Note 8 Questions & Answers] alecxs:
Did you restore backup on each attempt? What says logcat?
[Redmi Note 8 Questions & Answers] ictecnics:
Data backup? I only wiped system before flashing. Data and metadata are not wiped.

Logcat not checked. I'm going to check it
[Redmi Note 8 Questions & Answers] ictecnics:
Logcat from TWRP attached. I think seems a problem with keystore but not sure. I can't do adb logcat during boot, adb logcat only works once TWRP booted, if I try when booting adb locat only shows "waiting for device"
[Redmi Note 8 Questions & Answers] alecxs:
each time you boot a ROM something is changed on userdata partition. some ROMs don't support dirty flashing. they may not see encryption and try to encrypt.
[Redmi Note 8 Questions & Answers] ictecnics:
So, I can try something? Restoring backup as you said with adb push?
[Redmi Note 8 Questions & Answers] alecxs:
adb push sometimes doesn't work as expected, but this should work.

adb shell "dd bs=1m of=/dev/block/bootdevice/by-name/userdata" < ./userdata
[Redmi Note 8 Questions & Answers] ictecnics:
dd: stdin: read error: Bad address
[Redmi Note 8 Questions & Answers] alecxs:
./userdata must be path to file on pc
[Redmi Note 8 Questions & Answers] ictecnics:
Yes, I'm on directory containing the backup before executing the command. Tried with complete path /home...., same error.
[Redmi Note 8 Questions & Answers] alecxs:
maybe weak connection? try with lower block size bs=524288 or 131072, 65536, ... 16384, 8192, 4096, ... that will slow down read process.
[Redmi Note 8 Questions & Answers] ictecnics:
Only working with 65536 or lower. I have an USB-C Cable connected to a USB 3.1 port. Maybe the cable?

But also with 65536 and lower not % shown. I don't know if it's doing something.
[Redmi Note 8 Questions & Answers] ictecnics:
I'm doing if with TWRP recovery, will work is fastboot\bootloader mode?
[Redmi Note 8 Questions & Answers] alecxs:
that's expected. it's possible to get dd progress by sending INFO/USR1 signal, but that goes too far here.

for fastboot try

fastboot flash userdata userdata
[Redmi Note 8 Questions & Answers] ictecnics:
Restored succesfully with 65536.

ROM seems to start boot and returned to TWRP. Tomorrow I'll probably try other options or maybe restoring again with logging on 1st boot.
[Redmi Note 8 Questions & Answers] ictecnics:
Tried with fastboot
[Redmi Note 8 Questions & Answers] ictecnics:
Tried various ROMs with this procedure:

- Format system

- Flash ROM zip

- Restore userdata

With this ROMs logo appears and device rebooted into TWRP:

- Evolution X

- Cherish OS

- Arrow OS

- crDroid Android

With Pixel Experience Plus ROM, logo appears and 1st boot takes a long time. After that, same scenario: rebooted to TWRP. At this point /sdcard and /data are blank (I don't know if data it's lost permanently when this occurs). Tried to restore userdata again and reboot to TWRP. /scard and /data are encrypted again. With 2nd boot of the ROM same thing, long boot and reboot. Restored userdata again.

Tried to restore userdata and system from a backup I made before flashing ROM zips. On the first try, system doesn't boot, but, doing restore again after 3.9 ZIP Flash system booted again. So I'm on the previous scenario before flashing other ROMs.

Maybe I will flash older ROM zips (all are with July Patch, Elixir 3.9 are with May Patch)?
[Redmi Note 8 Questions & Answers] alecxs:
I think your best approach is to get a TWRP dev involved to add encryption support for the encryption type (FBEv2?) Elixir 3.9 is running with.

That's good to hear so at least you know keystore in TEE isn't lost and encryption is still healthy.
[Redmi Note 8 Questions & Answers] ictecnics:
I sent a message to mantainer of TWRP's version of Redmi Note 8 trough XDA but, at the moment, I have no answer. I asked if there's beta version to try but, officially, the latest published version of TWRP version is from October 2022 and I think that it's not supporting FBE encryption.

I think I'll try with May Security Patch version of ROMs that support 6x6 pattern.

I would agree your support to solve my problem. Thanks!
[Redmi Note 8 Questions & Answers] ictecnics:
Mantainer of TWRP's version of ginkgo said that the solution is using 'number pattern'.
[Redmi Note 8 Questions & Answers] AA0_o:
Hello, did you manage to decrypt your device yet?

I'm on a similar situation, also with ginkgo.
[Redmi Note 8 Questions & Answers] ictecnics:
No solution for me at this moment. Have you tried any different method?
[Redmi Note 8 Questions & Answers] AA0_o:
Basically, I tried to pull folders from my device using ADB and decrypt using the command twrp decrypt from the shell, all without success.

For me, the system fails to boot and switches to recovery immediately.
[Redmi Note 8 Questions & Answers] ictecnics:
Have you tried to flash older rom? When I tried to do this, system not booted and recovery automatically starts after a reboot. Flashing correct version (latest you installed) allowed me to boot system.

But, with system booted up I still have 3x3 pattern and not 6x6.

I think maybe you have another situation than mine.
[Redmi Note 8 Questions & Answers] AA0_o:
The common issue may only be trying to manually decrypt the files.

I now have installed the 'correct' ROM version but I'm still in the boot loop

Thanks for the attention, regardless.
[Redmi Note 8 Questions & Answers] ictecnics:
I think that maybe new release of TWRP can solve decrypt of data to save a copy. But since October of 2022 there's no new version.
[Upgrading, Modifying and Unlocking] Eduardo Perez:
Hi Everybody!

Somebody Could Help Me, Because I Have A At&t Tilt But First I Need To Unblock For Use It On My Next Vacation Out Of Usa.

Thanks
[Upgrading, Modifying and Unlocking] beachboyde:
Hi Call ATT , I did today and they gave the code with in 5 minutes of me calling.
[Realme GT] sureshra:
I currently use the Realme GT as my daily driver and Im considering to purchase the newly launched Realme 11 Pro. I could not find any Forum Topics for the Realme 11 Pro so requesting the Moderators or Admins to create a dedicated section for the Realme 11 Pro asap. I do have some queries regarding the device and would love to know more about the product itself before purchasing it.

PS, If you have created a dedicated section for the Realme 11 Pro, you can close this thread and I will start communicating about the device and post queries there.
[Realme GT] BujangTan:
Im considering the Realme 11 Pro too. I wanted to know how the device handles in performance and any user that have a hands-on experience on the device yet?
[Realme GT] kepparealme:
Mod edit - translated by https://translate.google.com/. Oswald Boelcke, Senior Moderator.

Do you know how to flash this device, I want to install a ROM

*********************

Saben como realizar un flasheo a este equipo quiero instalar una ROM
[Realme GT] Oswald Boelcke:
Hello and good morning, @kepparealme Welcome to XDA! I hope you'll always get the support you require and have enjoyable times on our platform.

However, as a one-time courtesy for I've translated your above quoted post. With reference to rule no. 4 of the XDA Forum Rules, please post in English or add at least an English translation to your Spanish posts.

Spoiler content hidden.

Regards

Oswald Boelcke

Senior Moderator
[Realme GT] EngineerXman:
Yes, now I'm using Realme 11 pro 5G and there is nothing in the search about it!

Please anybody know where I can find a forms regarding my phone appreciated
[Fire TV Q&A, Help & Troubleshooting] piazzolla1954:
I wanted to know if the Swap no root app with swap on pendrive can remedy the low memory of the firestick, speeding it up and avoiding any blocks.

Thank you