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

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

Related

Official twrp app and TWRP backup

TWRP official app when searching for device doesn't have my device listed and TWRP manager can't detect Twrp does anyone know why this might be?
Also I'm having trouble backing up using twrp it fails with the error code 255? I've tried to unmount data change the time but still fails.
TWRP is not officially released for Mate 9, it's unofficial build/s.
And that error just mean you're encrypted, like Mate 9 is by default.
To remove encryption you'll have to Format - Format Data (This wipes everything including internal sdcard), after this you will have to flash SuperSU 2.82 SR3+, Magisk v14 (14.3+ doesn't remove encryption flag so it won't work without modifying Magisk source) or modify your boot image manually.
And then download and flash Public + HW zip for your firmware from http://pro-teammt.ru/firmware-database/

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

Magski replacing patched recovery (a70)

finally.... I got Odin to behave - (sadly) no idea what I did it just started working!
What I've ended up with is a fully working magski capable of installing modules and a debloated stock rom - gosh what a horrible user experience Samsung make for there users!
I'd rather not have to rely on the chopped down official recovery though, feeling much more secure with the extra tools available with twrp.
if I dd twrp I'll loose magski, so my question is, can magski patch a twrp img file and will dd'ing this to the recovery partition work, ie will I have twrp while retaining magski
Is there a "better" way to do this (twrp + magski) ?
TIA
Typically Magisk gets installed via TWRP and not the other way around.
AFAIK Magisk creates a new magisk.img partition in phone’s root directory, it also places necessary files in /cache and /data partition, but it does NOT patch /recovery partition. It's TWRP what completely replaces / removes phone's stock /recovery. But I may err as always ...
jwoegerbauer said:
Typically Magisk gets installed via TWRP and not the other way around.
AFAIK Magisk creates a new magisk.img partition in phone’s root directory, it also places necessary files in /cache and /data partition, but it does NOT patch /recovery partition. It's TWRP what completely replaces / removes phone's stock /recovery. But I may err as always ...
Click to expand...
Click to collapse
Samsung user are somewhat force to flash Magisk on recovery partition hence they have to choose between having rooted via Magisk or installing TWRP
But can magski patch a twrp image, for both ?
codifies said:
But can magski patch a twrp image, for both ?
Click to expand...
Click to collapse
After further research it turns out magski's patching is rather sophisticated. Throw an odin tar or raw image at it and it just gets and does the job right.
If like me you didn't want to leave the recovery with a dangerously crippled stock "recovery" it is possible to patch a raw img of twrp, which you can then dd (but please don't guess and DO go by the by-name path !)
I honestly don't know if patching twrp and using it with odin right from the get go is possible I had a nightmare getting windows/drivers/odin talking so I was relieved just getting the patched stock firmware to flash....
Its also a relief to be finally rooted, debloated, degoogled with a proper recovery, of course if samsungs UX wasn't so horrible I might not have bothered (providing all bloat could actually be disabled)... still at least it feels like I own what I bought now....
@ineedroot69 never managed to get twrp to flash on its own with odin, with unlocked bootloader saying it would only install official software... A70 seems to have a few extra layers of security...

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?

Samsung devices (2) stuck in system boot splash

HI,
I have 2 Samsung devices with TWRP installed, and I can access the TWRP recovery menu. When I install the flash ROM and try to boot, devices are stuck in system boot forever.
Device 1: SM-T800, with LineageOS 14.1 previously. I opened an email and the device got hacked, so I did a factory reset (which failed), then re-flashed the latest TWRP and recovered rescue mode. Now when I flash the Lineage ROM (from TWRP) the device does not boot to system but keeps showing the splash screen. I think the hack might have placed immutable files under system. could I format this partition to zero it out via ADB? What other choices are there?
<EDITED>
Device 2: Galaxy S3 GT-I9300 - I solved this so i removed this section.
Thank you for any help.
Beeblebrox-BSD said:
HI,
I have 2 Samsung devices with TWRP installed, and I can access the TWRP recovery menu. When I install the flash ROM and try to boot, devices are stuck in system boot forever.
Device 1: SM-T800, with LineageOS 14.1 previously. I opened an email and the device got hacked, so I did a factory reset (which failed), then re-flashed the latest TWRP and recovered rescue mode. Now when I flash the Lineage ROM (from TWRP) the device does not boot to system but keeps showing the splash screen. I think the hack might have placed immutable files under system. could I format this partition to zero it out via ADB? What other choices are there?
Device 2: Galaxy S3 GT-I9300, with working TWRP. This device is giving a "Failed to mount /efs (Invalid argument)" error. The previous setup was shared storage with sdcard and encryption on both internal and sdcard. The sdcard got corrupted, hence the error. This post suggests running
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
but the device does not have identifiable boot device under /dev/block. I think this might work if I can identify the boot partition name?
Thank you for any help.
Click to expand...
Click to collapse
Flash a custom ROM for i9300 via TWRP. Download a custom ROM for i9300 and the appropriate Gapps to go with the ROM, store them on external sdcard. When you are in TWRP, before you flash your ROM, select the "Wipe" option, then select "advanced wipes", on the next menu, choose the system partition, data partition, cache partition and dalvik cache partition then swipe the slider to wipe. Then go back to home screen in TWRP and choose the "Install" option, then choose your ROM file and your Gapps file then swipe to flash. When the flash is finished, select the "Reboot system" option and see if it boots into system.
If that doesn't work, we will take some steps further back and try starting from the beginning.
Keep in mind that some of the custom ROMs for i9300 may have a different partition structure and partition sizes than the stock firmware for i9300 has and may require resizing certain partitions such as the system partition by flashing a custom PIT file like the Galaxy S2 had to do before it flashed certain custom ROMs.
Hi, thanks for the input.
* I had already solved the GT-I9300 issue before your post (I should have added to thread rather than edit the original post). I solved issue with that device by including system partition in the wipe.
* For the SM-T800, I used a LineageOS-14.1 that I had stored somewhere. That also did not work, until I only flashed Lineage and did not include any GApps. If I really need it, I can always flash later. I assume the latest GApps 7.1 build conflicts with older ROMs.
An unexpected problem was the lack of current ROMs for the 2 devices. SM-T800 has nothing other than last build Lineage-14-1-20190205. The I9300 has several unofficial ROMs floating around for newer Android versions, but they are all debug/dev builds with enabled options that drain the battery very quickly.
If anyone comes across a decent ROM for either of these devices please LMK. Thanks.

Categories

Resources