Backup of encrypted partitions on pie - Honor View 10 Questions & Answers

Does anyone know any possible way to take unencrypted raw dump of data partition on Android 9?
I have all the key files and key blob
Running rooted honor view 10 with magisk canary build and emui 9

Related

Huawei Y7 Prime 2018 (LDN-L21) stock rom TWRP backup

I made TWRP backup of the most possible partitions if someone need it.
Backup of Stock ROM LDN-L21C432B139 (8.0.0.139)
Also made partition images of stock via DD command via ADB, or FF-ddumper app.
Since /data is encrypted, can not be backed up in current TWRP.
Data EMMC image (with internal sd) can be backed up via TWRP via DD/TWRP to SD/PC/USB-OTG with filesize about 25 GB.
TWRP with all partitions (no FBE nor MTP): https://www.androidfilehost.com/?fid=1395089523397910855
Stock ramdisk: https://www.androidfilehost.com/?fid=11410963190603879149
Stock recovery_ramdisk: https://mega.nz/#!9gAnjCoR!oaC3sCYdgbiia6RK6BemO0MxydhEAaJjSnkWLCS5kII
TWRP backup folder: https://mega.nz/#F!ApJjiSjC!yzX_aAgKdyHI91sXQmn-jg
Images backup folder: http://https://mega.nz/#F!lgYATKIY!dOXy5bmwoBzIGT9qjko96A
Backup of Stock ROM LDN-L21C432B142 (8.0.0.142)
Before any changes, please backup your /system, /vendor, /kernel, /ramdisk, /recovery_ramdisk for just in case in twrp.
For /data backup online copying of files or Migrate app or Titanium BackUp or something else method.
Extracted from update.app: https://www.androidfilehost.com/?w=files&flid=291939
Changes from original: Permissive /Kernel by @EzzUsesAndroid (repacked to 142), Magisk-patched /Ramdisk, Custom recovery, Removed DM-Verify + FileEncryption from /Vendor, Replaced bootanimation to walking fingers in /Product.
After restore, reboot to RECOVERY, not to system, and Data have to be formated! <--- This will remove encryption and set partition to encryptable=footer, so in the future you can backup and /Data (without internal storage). Since it is encryptable, Magisk Manager will shows turned on "Forced encryption" but it is not. You can encrypt it later (but I don't know how).
TWRP backup folder of main partitions: https://mega.nz/#F!ZgQxlSDD!s4eAEun2bC4MrIRL3mcgRA
If you want to keep encryption, flash this, after restore, (before reboot to twrp), but DO NOT format /data, just wipe.
If you just want to remove encryption for any rom, flash this, after restore, before reboot to twrp and format /data.
If you wipe/format data to remove encryption or use custom rom, flash /data/hm_init backup via TWRP: mega.nz
SE Linux permissive kernel by Ezz, needed for custom roms: this post
I have a question, when I want to go back to stock rom (currently running AOSP 9.0 GSI), do I only need to restore the two system.ext4 in the TWRP backup folder?
Proseph said:
I have a question, when I want to go back to stock rom (currently running AOSP 9.0 GSI), do I only need to restore the two system.ext4 in the TWRP backup folder?
Click to expand...
Click to collapse
Yes - you had to restore system.ext4 (splitted in 2 files), but also to format /Data and /Cache and restore backed apps/data later, after stock system successful boot.
If you had already remove "verity" and "fileencryption..." flags from /vendor/etc/fstab.qcom and recovery.fstab, I guess you only need to wipe /Data and /Cache, after restoring /System.
And you need to match stock rom versions in /system as in /kernel as in /version.
I made TWRP backup of stock 8.0.0.142 (feb-2019) with no verify, no forced encryption, with permissive kernel. You can use that or extract images from update.app.
stock rom in 3 files.
Update 1:
I saw that there is newer version 8.0.0.143 (march-2019) for LDN-L21B model, eu firmware C432. No need to restore /data/hw_init folder, just flash
update_data_full_public.zip and update_full_LDN-L21B_hw_eu.zip, ignore error 7 etc, works fine.
STOCK RECOVERY FOR HUAWEI Y7 Prime LDN-L21C185CUSTC185D1
I had flashed stock recovery of ldn-l21 c432 to my phone (LDN-L21 C185CUSTC185D1) now it is not working it is unable to reset my phone and install update from huawei Plz Provide ma stock recovery of Huawei LDN-L21 C185CUSTC185D1 (8.0.0.159)
lineage os
Could by any chances one assist on getting the lineage os for huawei y7 prime 2018
Arsam javed said:
I had flashed stock recovery of ldn-l21 c432 to my phone (LDN-L21 C185CUSTC185D1) now it is not working it is unable to reset my phone and install update from huawei Plz Provide ma stock recovery of Huawei LDN-L21 C185CUSTC185D1 (8.0.0.159)
Click to expand...
Click to collapse
Sorry for year late reply! Latest stock rom is 8.0.0.166.
Code:
http://update.dbankcdn.com/TDS/data/files/p3/s15/G3004/g1650/v373698/f1/full/update.zip
http://update.dbankcdn.com/TDS/data/files/p3/s15/G3004/g1650/v373698/f1/full/public/update_data_full_public.zip
http://update.dbankcdn.com/TDS/data/files/p3/s15/G3004/g1650/v373698/f1/full/LDN-L21B_hw_meafnaf/update_full_LDN-L21B_hw_meafnaf.zip
In update.zip, there is update.app, in update.app is named recovery.img.
There are kernel, ramdisk, recovery_ramdisk, recovery_vendor, eRecovery (all 3 files) @ mega.nz
Jack6617 said:
Could by any chances one assist on getting the lineage os for huawei y7 prime 2018
Click to expand...
Click to collapse
Hello. For Lineage 15/16/17, see this post. In short - you need to flash SE Linux permissive kernel to /kernel, wipe /system, /data and /cache and flash GSI image of custom rom to /system.
Backup of Stock ROM LDN-L21C432B151 (8.0.0.151) with few additions
WARNING: Do not flash any partition if you do not know what are you doing!
Spoiler: Changes from stock
Removed system apps
Google Duo, GMail2, Google Maps, Google Music, Google Search, Google Videos, SwiftKey (2 apps), M$ Exchange.
Updated/added system apps
Google Chrome, some keyboards, airplane mode apps and audio DSP app.
Removed user apps
TouchType configs, AsphaltNitro, AssassinCreed, Booking, DisneyMagicKingdom, DragonMania, eBay, Editor office apps, Facebook (2 apps), Instagram, Netflix (2 apps), PuzzlePets, SpiderManUltimatePower
Updated apps and moved to /data/hw_init (need to flash hwinit.zip) as can not fit to /cust
HiMovie (Huawei Video Player), Themes, HiCare, Smart Diagnosys, Files, Cloud, HMS, AppGallery
System partitions
ramdisk is magisk patched ..... (if prefer stock, flash RAMDISK.img)
kernel is updated to 3.18.140 and permissive ..... (if prefer stock, flash KERNEL.img)
recovery is custom (TWRP 3.1.1.0 with internal storage) ..... (if prefer stock, flash RECOVERY_RAMDISK.img)
vendor has removed dm-verity and removed forced encryption and updated OpenGL and Vulkan drivers!
product has custom bootanimation (walking fingers) ..... (if prefer stock, rename /product/etc/media/bootanimatiorigin.zip to bootanimation.zip)
LDN-L21B @ mega.nz

Any way to encrypt /data/data and /sdcard on Xiaomi EU ROM?

Hello,
Xiaomi EU ROM is running decrypted, that's a security breach...
Is there a way to use Xiaomi EU ROM, based on Miui 10, in a encrypted phone?
Thanks
I tried but no success. The only method to enable encryption is miflash official rom. For me it works perfectly in Los. Apparently xiaomi Eu removed encryption from vendor.
And there is no way to add the files to the vendor partition?
I am using the EU ROM for months encrypted (FBE).
It's a little complicated to get there (and to stay), but it can be done.
1. You need to come from an encrypted MIUI Rom
2. Enter TWRP, enter your decryption code.
Important note: NEVER format in TWRP, otherwise you'll have to start from MIUI again (which means flashing with MiFlash).
4. Dirty flash EU Rom. Do NOT reboot.
5. After flashing the ROM, go to the main menu in TWRP and mount the Vendor partition.
6. Install the attached Zip file with TWRP (copy to phone before starting the whole procedure steps)
7. Reboot
As I said I followed this procedure for the last months, running EU and still encrypted.
You have to do ALL the steps 2-7) again EVERYTIME you flash a new EU Rom.
Hello,
Thanks for the answer. I will try it, but...
1) After flash this, I can wipe device (not format) from TWRP?
2) Is also /sdcard encrypted or only /data/data?
3) I can't install Global MIUI from TWRP if I will return to Global?
4) I assume that I can install Magisk after 6 and before 7
Thanks
hoehm72 said:
I am using the EU ROM for months encrypted (FBE).
It's a little complicated to get there (and to stay), but it can be done.
1. You need to come from an encrypted MIUI Rom
2. Enter TWRP, enter your decryption code.
Important note: NEVER format in TWRP, otherwise you'll have to start from MIUI again (which means flashing with MiFlash).
4. Dirty flash EU Rom. Do NOT reboot.
5. After flashing the ROM, go to the main menu in TWRP and mount the Vendor partition.
6. Install the attached Zip file with TWRP (copy to phone before starting the whole procedure steps)
7. Reboot
As I said I followed this procedure for the last months, running EU and still encrypted.
You have to do ALL the steps 2-7) again EVERYTIME you flash a new EU Rom.
Click to expand...
Click to collapse
I reply my questions:
After flash EU ROM and the ZIP that @hoehm72 in the previous posts, the EU ROM is working fine.
You can wipe the device from TWRP and also return to Global version (you need to backup your /cust partition before flash EU for first time and restore /cust before flash Global ROM).
Also, /sdcard and /data/data remains encrypted in EU, like in Global.
Thanks mate!
EDIT: If you forgot to flash the zip file after flash EU ROM the phone will enter in a bootloop. No problem, you only need to enter TWRP then:
* mount vendor
* edit /vendor/etc/fstab.qcomm
then update "encryptable" by "fileencryption" then reboot...
Thank you, it worked for me too!
Hello how can I know if my rom is encrypted ?
If your device is rooted...
enter TWRP and, when TWRP asks for password click on cancel button.
Next, click on advanced -> file manager then navigate to /sdcard
If when you are on /sdcard (and also on /data/data) the file manager displays correctly the filenames you aren't encrypted and any can access to the files if has access to your device.
Bradco said:
Hello how can I know if my rom is encrypted ?
Click to expand...
Click to collapse
Bradco said:
Hello how can I know if my rom is encrypted ?
Click to expand...
Click to collapse
You can find it in settings-passwords&security- data privacy(or data security, I don't know in english) -encryption
The most secure mode to check it is to check over twrp, like I've explained.
Some roms, like eu, says encrypted but really aren't
Seosam said:
You can find it in settings-passwords&security- data privacy(or data security, I don't know in english) -encryption
Click to expand...
Click to collapse
This is what i posted some thime ago in xiaomi.eu forum.
I downloaded miui_MIMIX2SGlobal_V10.3.2.0.PDGMIXM_7e27e6e0d5_9.0.zip and xiaomi.eu_multi_MIMix2S_V10.3.1.0.PDGCNXM_v10-9.zip
than i extracted these folder and three files from global rom:
firmware-update
vendor.transfer.list
vendor.new.dat.br
vendor.patch.dat
than i deleted those three files and folder from xiaomi.eu rom
than i repacked xiaomi.eu rom with three vendor files from global rom (i used winrar, just drag and drop )
than i installed .zip on my phone
I managed to encrypt the latest (9.7.11) version too. You need to use vendor files from china beta (9.7.11). If you use older files your wifi wont work.
A less painful solution is to extract missing files from china rom
The file lists that should be added/replaced from china miui rom (about 3 MB, tested on Mi6 10.4.2.0, eu/cn):
Ps., some of below files are not necessary, but I am not sure which one did the trick.
/system/vendor/etc/gps.conf
/system/vendor/etc/mixer_paths_overlay_dynamic.xml
/system/vendor/etc/init/hw/init.qcom.rc
/system/vendor/etc/izat.conf
/system/vendor/etc/wifi/WCNSS_qcom_cfg.ini
/system/vendor/etc/fstab.qcom
/system/vendor/app/TrustZoneAccessService/TrustZoneAccessService.apk
/system/vendor/app/TrustZoneAccessService/oat/arm64/TrustZoneAccessService.odex
/system/vendor/app/TrustZoneAccessService/oat/arm64/TrustZoneAccessService.vdex
/system/vendor/app/ConnectionSecurityService/oat/arm64/ConnectionSecurityService.odex
/system/vendor/app/ConnectionSecurityService/oat/arm64/ConnectionSecurityService.vdex
/system/vendor/app/PowerOffAlarm/oat/arm64/PowerOffAlarm.vdex
/system/vendor/app/PowerOffAlarm/oat/arm64/PowerOffAlarm.odex
/system/vendor/app/PowerOffAlarm/PowerOffAlarm.apk
/system/vendor/app/SSGTelemetryService/oat/arm64/SSGTelemetryService.odex
/system/vendor/app/SSGTelemetryService/oat/arm64/SSGTelemetryService.vdex
/system/vendor/app/TimeService/oat/arm64/TimeService.odex
/system/vendor/app/TimeService/oat/arm64/TimeService.vdex
/system/vendor/app/TimeService/TimeService.apk
/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so
/system/vendor/lib/mediadrm/libwvdrmengine.so
/system/vendor/lib/libmmcamera_imx386_semco.so
Obviously, in android 9 based miui 10, xiaomi.eu has removed encryption files from vendor, not just modified "fstab.qcomm".
On Mi6 10.4.2.0, I successfully encrypted /sdcard/ with above files.
In fact, you only need to replace fstab.qcomm at vendor/etc from the one included at eu miui from the one at stock rom.
This file as a size if 2KB
watert said:
Sorry, but I will add the file lists that should be added/replaced from china miui rom in hours later (about 3 MB).
Click to expand...
Click to collapse
Modification of "vendor/etc/fstab.qcomm" worked on android 8 based xiaomi.eu's miui, but not for android 9 based xiaomi.eu's miui -- at least for MI6.
If you only modify fstab.qcomm, but do not copy files which actually did the encryption job, encryption is fake (although it showed encrypted on "setting"). Check this by : goto twrp, click 'cancel' when it asks for gesture, then you would find you can still access files on /sdcard/ (without encryption).
bartito said:
In fact, you only need to replace fstab.qcomm at vendor/etc from the one included at eu miui from the one at stock rom.
This file as a size if 2KB
Click to expand...
Click to collapse
I have only modified fstab file and my device is encrypted (see screenshot).
The only that you need to do it not to do a format data under twrp after install EU ROM.
This is due the phone encryption will be done in global ROM. EU is not capable to do it even with the modified fstab, 9nly that can do is to manage a previously encrypted partition.
watert said:
Modification of "vendor/etc/fstab.qcomm" worked on android 8 based xiaomi.eu's miui, but not for android 9 based xiaomi.eu's miui.
If you only modify fstab.qcomm, but do not copy files which actually did the encryption job, encryption is fake (although it showed encrypted on "setting"). Check this by : goto twrp, click 'cancel' when it asks for gesture, then you would find you can still access files on /sdcard/ (without encryption).
Click to expand...
Click to collapse
Yes, that is one way. but I'd like to format/wipe everything in twrp before flashing.
If data partition was formated, I think ~3 MB files from china rom are necessary for encryption.
bartito said:
I have only modified fstab file and my device is encrypted (see screenshot).
The only that you need to do it not to do a format data under twrp after install EU ROM.
This is due the phone encryption will be done in global ROM. EU is not capable to do it even with the modified fstab, 9nly that can do is to manage a previously encrypted partition.
Click to expand...
Click to collapse
Please, post the files when possible. I will check. Thanks
watert said:
Yes, that is one way. but I'd like to format/wipe everything in twrp before flashing.
If data partition was formated, I think ~3 MB files from china rom are necessary for encryption.
Click to expand...
Click to collapse
hoehm72 said:
I am using the EU ROM for months encrypted (FBE).
It's a little complicated to get there (and to stay), but it can be done.
1. You need to come from an encrypted MIUI Rom
2. Enter TWRP, enter your decryption code.
Important note: NEVER format in TWRP, otherwise you'll have to start from MIUI again (which means flashing with MiFlash).
4. Dirty flash EU Rom. Do NOT reboot.
5. After flashing the ROM, go to the main menu in TWRP and mount the Vendor partition.
6. Install the attached Zip file with TWRP (copy to phone before starting the whole procedure steps)
7. Reboot
As I said I followed this procedure for the last months, running EU and still encrypted.
You have to do ALL the steps 2-7) again EVERYTIME you flash a new EU Rom.
Click to expand...
Click to collapse
For me this works with actual miui eu.
I checked it in TWRP too.
But maybe you need these 3MB when you do a clean start, without official miui first.
Seosam said:
For me this works with actual miui eu.
I checked it in TWRP too.
But maybe you need these 3MB when you do a clean start, without official miui first.
Click to expand...
Click to collapse
absolutely agree

How to reinstall Magisk/root after updating to MIUI 12.5.2?

I should have expected this but after updating to MIUI 12.5.2, Magisk/root is no longer installed and the Magisk App only offers the option to "Select and Patch a File" , which I understand requires a full wipe and I don't want to do that.
Orangefox is also corrupted. I can still boot to it but it doesn't prompt me for my encryption code, so it can't access the data partition. Maybe I can just reflash that but can I flash Magisk from there after that to restore root without having to wipe the phone?
So it appears that the problem is MIUI 12.5 (or any MIUI ROMS based on Android 11), prevent decryption working in recovery mode. https://wiki.orangefox.tech/en/guides/encryption
I tried flashing TWRP and that doesn't decrypt the storage and just shows gibberish filenames too.
So, if we can't decrypt in recovery mode, we can't make backups and we can't install Magisk to restore root to make backups with apps like Titanium, what are we supposed to do?

Can the coloros 12.1 system decrypt data now

I want to modify the hosts file and take effect in real time. Can the coloros 12.1 system decrypt data now?

Is there any way to unlock the system partition on Android 11 (g900tm)

I have successfully rooted my g900tm, but I can't unlock the system partition on Android 11, so I can't delete the system application. Is there any way to unlock the system partition on Android 11? The guidelines on the network are not applicable to g900tm

Categories

Resources