[PATCH] Disable encryption for XIAOMI.EU ROM - Xiaomi Poco X3 NFC Guides, News, & Discussion

disable data encryption, MLC nand write cycle is limited and encryption is make it worst
how to :
- download and unzip xiaomi.eu_multi_POCOX3NFC_V12.0.4.0.QJGMIXM_v12-10.zip
- download and unzip vendor patch xiaomi.eu_multi_POCOX3NFC_V12.0.4.0.QJGMIXM_v12-10_VENDOR_NOENCRYPT
- replace 3 vendor files from xiaomi.eu_multi_POCOX3NFC_V12.0.2.0.QJGMIXM_v12-10.zip with my vendor patch
- repack/zip rom
- goto twrp and format data
- install repacked rom
- reboot
- done

This method need format data although MIUi Eu installed? So I can't dirty flash from stock Miui Eu?

@Alvian_P, sure because xiaomi.eu rom using encrypted data by default

inunxelex said:
@Alvian_P, sure because xiaomi.eu rom using encrypted data by default
Click to expand...
Click to collapse
After apply this patch can mount system to Read/Write?

Alvian_P said:
After apply this patch can mount system to Read/Write?
Click to expand...
Click to collapse
no, please read about system as root before asking

here is how to mount system as rw on my pc

inunxelex said:
no, please read about system as root before asking
Click to expand...
Click to collapse
Must update partition? Can you make guide for mount system? I want try camera port from Mi cc9

This is spesifically only for miui eu 04 ?

inunxelex said:
good night! friend, are you going to make a patch to decrypt the new update? thanks!
Click to expand...
Click to collapse

sorry, i not using xiaomi ue rom anymore

Will this work on official miui rom (not xiaomi.eu)? Also does it remain active after a custom ROM flash (I suppose yes)?
Can this be used inside a custom fastboot script to flash only vendor partition?

editheraven said:
Will this work on official miui rom (not xiaomi.eu)? Also does it remain active after a custom ROM flash (I suppose yes)?
Can this be used inside a custom fastboot script to flash only vendor partition?
Click to expand...
Click to collapse
you must convert to sparse image, just find on xda

inunxelex said:
you must convert to sparse image, just find on xda
Click to expand...
Click to collapse
I believe you still can't restore twrp backups or do a factory reset from twrp without formating data?

editheraven said:
I believe you still can't restore twrp backups or do a factory reset from twrp without formating data?
Click to expand...
Click to collapse
restoring data automatically overwriting data partititon

inunxelex said:
restoring data automatically overwriting data partititon
Click to expand...
Click to collapse
What I meant can you temper with data partition and be able to mount it afterwards? Everytime you're getting scrambled filenames and you have to format because of losing the encryption keys.

updated xiaomi.eu unencrypted vendor
- reboot to custom recovery
- format data
- flash xiaomi.eu_vendor_POCOX3NFC_V12.0.6.0.QJGMIXM_v12-10_UNENCRYPTED.zip
- reboot
- done

updated xiaomi.eu unencrypted vendor, reuploading fixed version
- reboot to custom recovery
- format data if your data is encrypted
- flash xiaomi.eu_vendor_POCOX3NFC_V12.0.7.0.QJGMIXM_v12-10_UNENCRYPTED.zip
- reboot
- done

inunxelex said:
updated xiaomi.eu unencrypted vendor, reuploading fixed version
- reboot to custom recovery
- format data if your data is encrypted
- flash xiaomi.eu_vendor_POCOX3NFC_V12.0.7.0.QJGMIXM_v12-10_UNENCRYPTED.zip
- reboot
- done
Click to expand...
Click to collapse
This unencrypted vendor also has Firmware right?

Joakin2k said:
This unencrypted vendor also has Firmware right?
Click to expand...
Click to collapse
no, only vendor, follow the first post if you want include firmware with same version

Dumb question: how do you test the un-encrypted status of the vendor partition afterwards?

Related

flashing basics

hii,
My device is currently running on miui 8.5.4.0 global stable,i want to flash los 14.1,and planned some steps in order to revert back to miui safely.please correct me if i am wrong.
1.boot into twrp recovery.
2.Take full backup of current working rom including system.
3.clear data/system/cache/dalvik.
4.flash firmware-los rom-gapps-reboot.
Steps to revert back:-
1.boot into twrp recovery.
2.clear data/system/cache/dalvik.
3.restore full miui backup including system.
4.flash lazy flasher zip to disable dm-verity and forced encryption.
5.reboot.
i have just learnt basics completely but i had some doubts so i posted the entire procedure i thought to do.
thanks.
After taking backup first go to Wipe menu and "Format Data" , type yes and reboot recovery, it will remove encryption - then you can wipe data/system/cache etc..
/system wipe is never necessary .. You can skip that
Hollow6 said:
/system wipe is never necessary .. You can skip that
Click to expand...
Click to collapse
doesn't it mess up with firmware flash of custom rom?does a custom rom contains a system partition of its own to be flashed?or it just replaces or moves required system files to system partition of stock rom? help me to clear my concept!
k3lcior said:
After taking backup first go to Wipe menu and "Format Data" , type yes and reboot recovery, it will remove encryption - then you can wipe data/system/cache etc..
Click to expand...
Click to collapse
what is the difference between format data and wipe data? isn't it same?i am asking so because i havnt seen such option in recovery before.
sorabhsolanki said:
doesn't it mess up with firmware flash of custom rom?does a custom rom contains a system partition of its own to be flashed?or it just replaces or moves required system files to system partition of stock rom? help me to clear my concept!
Click to expand...
Click to collapse
Every ROM does contains its own system ..
When you flash any ROM (a full fledged ROM not OTAs) , the previous system is replaced by the later one ..
---------- Post added at 05:54 AM ---------- Previous post was at 05:50 AM ----------
sorabhsolanki said:
what is the difference between format data and wipe data? isn't it same?i am asking so because i havnt seen such option in recovery before.
Click to expand...
Click to collapse
You'll have to understand what Format Exactly we are here talking about .. When you go to TWRP/wipe , you are provided with 2 options , Format and Advanced wipe .
The format option is set to "wipe" the partitions, /data /cache /dalvik , that is generally what we require in order to flash ROMs , the wipe Option is hence the same as format , but I think the guy above is talking about Full fledged Wipe that includes the "internal storage" as well which can be selected by twrp/wipe/advanced wipe
Hollow6 said:
Every ROM does contains its own system ..
When you flash any ROM (a full fledged ROM not OTAs) , the previous system is replaced by the later one ..
Click to expand...
Click to collapse
thanks.one more question.
why dont i need to disable dm-verity and forced encryption after flashing custom rom?why kernel doesn't trigger it,because in that case there is a modification in system partition and dm-verity feature of kernel should prevent the rom from booting.
The "kernel" itself also gets replaced by a modified kernel .. But then again , I'm not sure as to why DM verity doesn't kick in , better ask the Developers (Y)
sorabhsolanki said:
hii,
My device is currently running on miui 8.5.4.0 global stable,i want to flash los 14.1,and planned some steps in order to revert back to miui safely.please correct me if i am wrong.
1.boot into twrp recovery.
2.Take full backup of current working rom including system.
3.clear data/system/cache/dalvik.
4.flash firmware-los rom-gapps-reboot.
Steps to revert back:-
1.boot into twrp recovery.
2.clear data/system/cache/dalvik.
3.restore full miui backup including system.
4.flash lazy flasher zip to disable dm-verity and forced encryption.
5.reboot.
i have just learnt basics completely but i had some doubts so i posted the entire procedure i thought to do.
thanks.
Click to expand...
Click to collapse
when you want to revert back you dont need to wipe anything or flash disable dm verify, just restore your previous nandroid backup and thats all

Showing reset option while booting to system

I change my rom from RR treble to miui pro.
On the very first boot its showing RESET need.Its not booting to miui pro home screen but status bar is showing with miui icon.
I format the phone also form twrp but issue is not fixed.
Now i am using omni rom..
I noticed that whenever I am comming from oreo to naughat than this RESET error is showing..
Any one know how to fix this?
Naughty2911 said:
I change my rom from RR treble to miui pro.
On the very first boot its showing RESET need.Its not booting to miui pro home screen but status bar is showing with miui icon.
I format the phone also form twrp but issue is not fixed.
Now i am using omni rom..
I noticed that whenever I am comming from oreo to naughat than this RESET error is showing..
Any one know how to fix this?
Click to expand...
Click to collapse
Did you flash the lazyflasher after flashing TWRP?
DarthJabba9 said:
Did you flash the lazyflasher after flashing TWRP?
Click to expand...
Click to collapse
Yes
Naughty2911 said:
Yes
Click to expand...
Click to collapse
Did you format (- format - not just wipe) the data partition? (by the way, this will also erase your internal storage - so you first need to backup all the files in your internal storage).
DarthJabba9 said:
Did you format (- format - not just wipe) the data partition? (by the way, this will also erase your internal storage - so you first need to backup all the files in your internal storage).
Click to expand...
Click to collapse
Yes i did that also.
Naughty2911 said:
Yes i did that also.
Click to expand...
Click to collapse
Then I am out of ideas!

Do you use encryption with a custom ROM ?

I try official releases of lineage 15.1, Omnirom and when I run encryption from option (with password), android reboot without encryption of /data partition.
I have seen that unoffical release of lineage 16, Aosp 9 has issues in hardware encryption. No problem with official MIUI Rom also.
Are there any custom rom for mido that allow encryption ?
(My configuration, special MIDO TWRP treble support)
Thanks for your experience return.
I think it depend of the data partition if its F2FS or EXT4 , but i dont encrypt anymore , the one who would crack my phone would be left with unsatisfaction, at the end it would just prove that humans are never satisfied.
i am using lineage os 15.1 with encryption.
I didnt manually encrypted my phone but it got encrypted during installation of los 15.1
BK said:
I think it depend of the data partition if its F2FS or EXT4 , but i dont encrypt anymore , the one who would crack my phone would be left with unsatisfaction, at the end it would just prove that humans are never satisfied.
Click to expand...
Click to collapse
I use ext4 on another encryptedr mido with miui official.
Rohit338 said:
i am using lineage os 15.1 with encryption.
I didnt manually encrypted my phone but it got encrypted during installation of los 15.1
Click to expand...
Click to collapse
Are you sure ? because the assistant does not prompt for encryption but only for lock password.
I have tryed to reset with flashboot flash_all.sh but no difference after Los 15.1 install
What recovery do you use ? TWRP or REDWOLF ?
BK said:
I think it depend of the data partition if its F2FS or EXT4 , but i dont encrypt anymore , the one who would crack my phone would be left with unsatisfaction, at the end it would just prove that humans are never satisfied.
Click to expand...
Click to collapse
I can now answer, F2FS make no difference, same problem no encryption with custum rom
neo_mat said:
Are you sure ? because the assistant does not prompt for encryption but only for lock password.
I have tryed to reset with flashboot flash_all.sh but no difference after Los 15.1 install
What recovery do you use ? TWRP or REDWOLF ?
Click to expand...
Click to collapse
For installation i used twrp posted on 1st page.
but now i am using red wolf recovery.
yes it doesn't prompt for encryption but i think setting the lock pattern encrypted the phone as i have to draw the same pattern to access internal storage using red wolf and during booting.
Rohit338 said:
For installation i used twrp posted on 1st page.
but now i am using red wolf recovery.
yes it doesn't prompt for encryption but i think setting the lock pattern encrypted the phone as i have to draw the same pattern to access internal storage using red wolf and during booting.
Click to expand...
Click to collapse
Curious because, android need the password in order to decrypt…
Did your recovery prompt for password ? (recovery is OS independant) if not, your device is not encrypted.
neo_mat said:
Curious because, android need the password in order to decrypt…
Did your recovery prompt for password ? (recovery is OS independant) if not, your device is not encrypted.
Click to expand...
Click to collapse
yes recovery asks for password to decrypt internal storage by the way have you checked the screenshot i have attached.
thanks, yes i have seen sreenshot.
I really don't understand because it s do basic.
I use the same twrp,
I wipe all partitions
after that, the redmi note 4 is empty (no system, no data...)
I install los 15.1
run encryption with assistant
the redmi immediatly reboot without pass throught mi boot logo screen
and no encryption
I can loop that everytimes.
It's curious because the redmi immediatly reboot like a bad reboot. (like an error)
I don"t know if there is any log of that
steps that i followed
flashed twrp
wipe all
advance data format (entered YES to format)
and finally flashed los.
I found it !!!
This can save people.
I have to leave 4K block into userdata partition.
In fact, fastboot, and TWRP can break filesystem and resize filesystem to all partition size.
Encryption need 4K block in order to write encryption data about userdata patition.
I have resized my ext4 filesystem with resize2fs.
Now all is OK !!!!
After that, I also format from ext4 to f2fs.
Thanks
neo_mat said:
I found it !!!
This can save people.
I have to leave 4K block into userdata partition.
In fact, fastboot, and TWRP can break filesystem and resize filesystem to all partition size.
Encryption need 4K block in order to write encryption data about userdata patition.
I have resized my ext4 filesystem with resize2fs.
Now all is OK !!!!
After that, I also format from ext4 to f2fs.
Thanks
Click to expand...
Click to collapse
Great news! Does it mean you could encrypt your device on a Pie ROM?
Of course !
I can now encrypt my device.
neo_mat said:
Of course !
I can now encrypt my device.
Click to expand...
Click to collapse
That's great news. I am pretty used to flashing my beloved mido but I never used the tool you mentioned (resize2fs). Would be great if you could provide some kind of documentation how to do this?
neo_mat said:
I found it !!!
This can save people.
I have to leave 4K block into userdata partition.
In fact, fastboot, and TWRP can break filesystem and resize filesystem to all partition size.
Encryption need 4K block in order to write encryption data about userdata patition.
I have resized my ext4 filesystem with resize2fs.
Now all is OK !!!!
After that, I also format from ext4 to f2fs.
Thanks
Click to expand...
Click to collapse
how to do it, can you explain it please?
I'm trying to disable encryption because with pretty much every ROM I tried the phone ends up encrypted. Which is very annoying as it prevents dirty flashes (+ updates) and flashing things like Magisk after first boot

TWRP 3.4 and 3.5 for A20

@Topser99 has provided us with some newly modified recoveries.
They all have TWRP 3.4 and also now 3.5
⇨NewUpdate
-update kernel
By : @physwizz
Follow : @ULtimaTe_Pie2
Follow Galaxy_A20_official
System and System_root
Twrp-sm-a20 - Google Drive
drive.google.com
Choose .img you want and flash it from your current recovery onto the recovery slot.
Then reboot into recovery.
Or choose the .tar to flash from odin
You must be aware though that your previous backups will not restore .
You should read this next section carefully.
TWRP recovery Incompatability Issue
There are 2 types of recovery:
Type 1 backs up /system
Type2 backs up /system_root but labels it "system"
Both types work well but you can't backup on one type and restore on the other
To overcome this problem, I suggest that filenames of TWRPs should either contain SYSTEM or SYSTEM_ROOT
Also.
TWRP 3.4 is incompatible with TWRP 3.3 and @Topser had modded to produce TWRP 3.4 for us to use.
So now there are 4 types:
1. TWRP 3.3 SYSTEM
2. TWRP 3.3 SYSTEM_ROOT
3. TWRP 3.4 SYSTEM
4. TWRP 3.4 SYSTEM_ROOT
A backup made with one type will not restore with any of the other 3 types.
Post 2
I can confirm TWRP 3.4 SYSTEM version works correctly (including MTP at recovery level). Funnily enough, I just finished porting the A30 version for myself and came up with an almost identical result. I remove the fstab lines for product image, vendor image and system image just to make it cleaner
Thanks for doing this for all @Topser
Whats the difference between system_root and system ?
So this can be installed over 3.3 aswell ?
Jeremy_J7 said:
Whats the difference between system_root and system ?
So this can be installed over 3.3 aswell ?
Click to expand...
Click to collapse
both work as backups.
you can replace 3.3 with 3.4 but read the 1st post carefully
physwizz said:
both work as backups.
you can replace 3.3 with 3.4 but read the 1st post carefully
Click to expand...
Click to collapse
I see now, its labels it differently , thanks alot, will flash it later today . Thanks Bro ?
physwizz said:
both work as backups.
you can replace 3.3 with 3.4 but read the 1st post carefully
Click to expand...
Click to collapse
I just flashed the new recovery, I tested MTP and its working ? I noticed a new option in settings that allows to unmount system before installing a zip, it was enabled by default, I should disable it right ?
Jeremy_J7 said:
I just flashed the new recovery, I tested MTP and its working ? I noticed a new option in settings that allows to unmount system before installing a zip, it was enabled by default, I should disable it right ?
Click to expand...
Click to collapse
It's the default
Topser99 said:
It's the default
Click to expand...
Click to collapse
So you're saying that it's always been the default in TWRP but now we have the option of turning it on/off. And I should leave it enabled ?
Jeremy_J7 said:
So you're saying that it's always been the default in TWRP but now we have the option of turning it on/off. And I should leave it enabled ?
Click to expand...
Click to collapse
Should think of android 4.4 and supersu
Jeremy_J7 said:
So you're saying that it's always been the default in TWRP but now we have the option of turning it on/off. And I should leave it enabled ?
Click to expand...
Click to collapse
I'd leave it as it is.
Try that and then untick it and try that to see what happens
physwizz said:
I'd leave it as it is.
Try that and then untick it and try that to see what happens
Click to expand...
Click to collapse
Ain't got anything to flash at the moment thou ? Maybe will try when a new version of Edxposed comes up.
Jeremy_J7 said:
Ain't got anything to flash at the moment thou ? Maybe will try when a new version of Edxposed comes up.
Click to expand...
Click to collapse
In my understanding
Twrp_3.3 mount system before installing a zip for supersu =>> system/sbin,bin,xbin
Twrp_3.4 unmount system before installing a zip for magisk =>>/data/adb/magisk
@Topser has updated the files on post 1
You can now choose a TWRP to backup data and storage
Jeremy_J7 said:
I just flashed the new recovery, I tested MTP and its working I noticed a new option in settings that allows to unmount system before installing a zip, it was enabled by default, I should disable it right ?
Click to expand...
Click to collapse
It's disabled by default since most things using recovery work systemlessly. Most packages that use the system mount point will automatically mount system for reading and writing anyway. So there's no need to mess with the toggle.
can i flash this tar file on my a205f
A205FXXU8BTG3
shawal_islam said:
can i flash this tar file on my a205f
A205FXXU8BTG3
Click to expand...
Click to collapse
yes
K I back on the scene again and I have a Galaxy A20 I want to root with TWRP!
Heres what I need to know how to the program that installs TWRP and which 3.4 files do I need?
And how will do the install of TWRP I been off 2yrs I just coming back to the website today?
Sorry if this is hard to follow I will post now for ques and feedback. TIA!
techmanc said:
K I back on the scene again and I have a Galaxy A20 I want to root with TWRP!
Heres what I need to know how to the program that installs TWRP and which 3.4 files do I need?
And how will do the install of TWRP I been off 2yrs I just coming back to the website today?
Sorry if this is hard to follow I will post now for ques and feedback. TIA!
Click to expand...
Click to collapse
what do you want to know about Twrp3.4
Topser99 said:
what do you want to know about Twrp3.4
Click to expand...
Click to collapse
Which Odin and TWRP do I need to install my Galaxy A20 as per my sig!

Full Backup (incl. Data partition) via TWRP?

Hi, I'm looking for an overall guide how to do a full backup (from XZ1 #1) and restore (on XZ1 #2) of a currently running ROM which includes also all data.
My XZ1 has an unlocked bootloader and TWRP installed. But last time I tried, I was not able to create a backup of the data partition in TWRP!?
torben5247 said:
Thank you for this fine version of twrp.
I am getting this error when making a full backup (ticked all partitions)
"error backing up system image, cleaning up folder"
I am running stock 47.2.A. 10.45 and j4nn kernel. Ric is off (i can write in system) and twrp are flashed.
i press "cancel" when asking for a password.
Normally the twrp just backup everything without any issues, so i must do something wrong??
Kind regards torben5247
Click to expand...
Click to collapse
Did you find a solution?
SGH-i200 said:
Did you find a solution?
Click to expand...
Click to collapse
I can't remember.... sorry.
But I have used twrp with a password. So it works
torben5247 said:
I have used twrp with a password. So it works
Click to expand...
Click to collapse
That is good news! There is at least one TWRP version which is able to do a full backup including encrypted DATA partition, right? Or do I have to delete all fingerprints and locks before backupping?

Categories

Resources