Encryption & Decryption - Xiaomi Redmi 3s Questions & Answers

Hii all
This thread regarding getting knowledge about encryption in custom roms
1.Currently is there any Recoveries can able to force encrypt rom ( even though rom didn't have encryption support)
Or is there any other way ?
2.actually flashing an custom rom from an miui roms doesn't need an internal storage wipe
In all MM, N, O roms
But now many roms asking for a password to start Android or to decrypt
Which we can only do that by formatng the internal
3.So is there any way that i can use miui and pie roms side by side without loosing internal
Bia any special recovery like that? Is there any way
Or should i have to wait for devs give support for encryption for piee roms?
4.and I Don't know why official twrp. 3.2.3 asking a password to decrypt phone (means format internal)
To use official twrp
Which is not required till 3.2.1 Twrps
I'll be happy if any dev or anyone having knowledge about this can answer my questions
Note :
Some questions may dumb for u
Then U can give the correct info to me
Thanks

Related

Please help me with device encryption

Dear Experts,
as I have already complained in several topics, my N9005 didn't boot after encryption.
Now I'm on the way to try other ROMs. But now I'm starting to thing, how to even test it with other ROMs. I have a backup of the original ROM made with TWRP. BUT, if I encrypt the device and something goes wrong - then how will I restore ? Will TWRP be somehow able to read the encrypted device ? Please suggest on how to proceed ?
I'm afraid, that if I put a ROM and encrypt the phone with it, I'll be stuck with that ROM... Or if not - what to choose in TWRP in order to get rid of the encryption then ?
Many thanks in advance!
Did you use the phone with stock recovery to encrypt?
Duplicate.
Please follow your existing thread: http://forum.xda-developers.com/gal...encryption-t3478539/post69084515#post69084515
Closed

[Discussion] DualBootPatcher

I created this thread in order to get some discussion going with the possibility to use DualBootPatcher for our Device. The device is supported and so far i got roms to patch but no luck to get it booting.
I hope we can share some information here to get us some dual booting.
Device must be rooted and decrypted for starters.
Got now rr as primary rom and will try later on to flash some roms on the second space... Let you know if that works out.
Tried to dual RR and liquid rom ..No luck. Just reboots to twrp..
Skickat från min ONEPLUS A5010 via Tapatalk
superior8888 said:
Tried to dual RR and liquid rom ..No luck. Just reboots to twrp..
Skickat från min ONEPLUS A5010 via Tapatalk
Click to expand...
Click to collapse
I have also rr as primary but second rom install ended in error 1 in twrp. Maybe you can try to reset data of second rom with the dualboot patcher zip.
It might be helpful to read the Dual Boot Patcher thread for the OP5, as there may be some important info there that is relevant for getting it to work on the 5T.
I tried rr as primary, no problem. Tried adding 2nd rom as secondary, as data slot 1, and no dice. Even tried removing assert lines in the updater script as suggested in op5 with rr as 2nd rom but that didn't work either; either booted back to twrp or booted to a black screen. If anyone makes it work please document and share your work. I'm encrypted by the way, even though you're "supposed" to be decrypted I was able to switch between primary and the non-booting rom just fine.
Anyone having any luck with this?
matteosaeed said:
Anyone having any luck with this?
Click to expand...
Click to collapse
Nope primary install goes good with a oos rom not stock. But when you try to install a second rom it gives error 1 in twrp and rom don't boot up.
That's great! Old MultiROM user here!
Ok, so I was able to successfully patch and boot into LOS and RR. LOS as primary and as slot 1 ROM, and RR as slot 2 ROM while encrypted. This wouldn't allow me to access any files in the phone via file managers for either slot ROMs, only in primary, so you must be decrypted if you're wanting to use/see the data in your internal memory on secondary ROMs. By the way I was only able to boot Nougat ROMs, dualpatcher doesn't work for Oreo ROMs yet. I'll do a small write up tomorrow, it's 1 am here ?
superior888 said:
I created this thread in order to get some discussion going with the possibility to use DualBootPatcher for our Device. The device is supported and so far i got roms to patch but no luck to get it booting.
I hope we can share some information here to get us some dual booting.
Device must be rooted and decrypted for starters.
Click to expand...
Click to collapse
Here is what I did:
IF YOU DON'T KNOW HOW TO DECRYPT, BACK UP YOUR STUFF, FLASH, ROOT, ETC, STOP READING NOW, THIS IS SOME HEAVY STUFF GETTING READY TO HAPPEN ?
If you want functional internal storage and have access to it on all secondary ROMs you must be decrypted. This guide assumes you have all required files on phone and/or computer
1. Flash bluspark recovery (wouldn't work on codeworkx for me)
2. Back up all your data, including internal storage somewhere safe
3. Wipe system, cache, and data (not internal)
4. Coming from Phoenix, so I flashed the Nougat firmware and then LOS 14.1 and booted it
5. Flash magisk 14.0, then install dualbootpatcher app
6. After granting root permission to dualbootpatcher go ahead and go to ROMs and set kernel now
7. Now you must patch another Nougat ROM as data-slot, ID 1 or 2 or 3, whatever you want. You can use the same LOS 14.1 as a test, or the RR Nougat version
8. Transfer the patched ROM to your PC or laptop and without unzipping/extracting the zip go to META-INF/com/google/android and open updater-script with notepad++. Delete the first two lines that's start with the word "assert" and save
9. It should now ask you if you want to update the zip, hit yes. Then transfer the updated patched ROM back to your phone
(you can do this from your phone too using winrar and your favorite file manager; it s a tad easier on your computer as you don't have to extract anything)
10. Now reboot into recovery and flash the patched ROM (do not flash from within the app)
11. Now flash the dualboot utilities in recovery and it should take you to an Aroma menu where you can see both primary and and data slot ROM. Tap the data slot ROM and choose "switch to". If you did everything right it should say "succeeded" and now you can reboot your phone and should boot into the secondary ROM.
12. To root data slot ROMs you must patch the magisk zip for that data slot ROM and then flash it in recovery, the same goes for gapps. Make sure whatever you patch does not have the "assert" lines in the updater script after patching it, else you must delete these lines.
Try it and report back. I can hardly debug my own device so I can't provide much support for you. The above is what I did while encrypted, so again, if you want functional internal storage for the additional ROMs must be decrypted before you try this.
cubandanger05 said:
Ok, so I was able to successfully patch and boot into LOS and RR. LOS as primary and as slot 1 ROM, and RR as slot 2 ROM while encrypted. This wouldn't allow me to access any files in the phone via file managers for either slot ROMs, only in primary, so you must be decrypted if you're wanting to use/see the data in your internal memory on secondary ROMs. By the way I was only able to boot Nougat ROMs, dualpatcher doesn't work for Oreo ROMs yet. I'll do a small write up tomorrow, it's 1 am here ?
Click to expand...
Click to collapse
Thanks for updating us, I'm an old multirom user as well and I'm going to keep my eye on this.
cubandanger05 said:
Here is what I did:
IF YOU DON'T KNOW HOW TO DECRYPT, BACK UP YOUR STUFF, FLASH, ROOT, ETC, STOP READING NOW, THIS IS SOME HEAVY STUFF GETTING READY TO HAPPEN
If you want functional internal storage and have access to it on all secondary ROMs you must be decrypted. This guide assumes you have all required files on phone and/or computer
1. Flash bluspark recovery (wouldn't work on codeworkx for me)
2. Back up all your data, including internal storage somewhere safe
3. Wipe system, cache, and data (not internal)
4. Coming from Phoenix, so I flashed the Nougat firmware and then LOS 14.1 and booted it
5. Flash magisk 14.0, then install dualbootpatcher app
6. After granting root permission to dualbootpatcher go ahead and go to ROMs and set kernel now
7. Now you must patch another Nougat ROM as data-slot, ID 1 or 2 or 3, whatever you want. You can use the same LOS 14.1 as a test, or the RR Nougat version
8. Transfer the patched ROM to your PC or laptop and without unzipping/extracting the zip go to META-INF/com/google/android and open updater-script with notepad++. Delete the first two lines that's start with the word "assert" and save
9. It should now ask you if you want to update the zip, hit yes. Then transfer the updated patched ROM back to your phone
(you can do this from your phone too using winrar and your favorite file manager; it s a tad easier on your computer as you don't have to extract anything)
10. Now reboot into recovery and flash the patched ROM (do not flash from within the app)
11. Now flash the dualboot utilities in recovery and it should take you to an Aroma menu where you can see both primary and and data slot ROM. Tap the data slot ROM and choose "switch to". If you did everything right it should say "succeeded" and now you can reboot your phone and should boot into the secondary ROM.
12. To root data slot ROMs you must patch the magisk zip for that data slot ROM and then flash it in recovery, the same goes for gapps. Make sure whatever you patch does not have the "assert" lines in the updater script after patching it, else you must delete these lines.
Try it and report back. I can hardly debug my own device so I can't provide much support for you. The above is what I did while encrypted, so again, if you want functional internal storage for the additional ROMs must be decrypted before you try this.
Click to expand...
Click to collapse
Thanks! I'll try this next days.
Thanks. Nothing works with Oreo as of yet i suppose :/
superior888 said:
Thanks. Nothing works with Oreo as of yet i suppose :/
Click to expand...
Click to collapse
It may be possible to have oreo as primary and flash Nougat as data slot roms. I tried with Phoenix as primary and I could boot into rr Nougat in data slot but Phoenix wouldnt boot. If someone can try rr oreo as primary and report back. I'm tempted to try with otg and see if I can install secondary roms using extsd option
*Quick update*
I was able to keep latest Phoenix oreo ROM as primary and install and boot Nougat RR as data-slot and as secondary using the latest dualbootpatcher app which may have fixed the "failed to update mbtool" error I was getting on Phoenix ROM. Also I used Magisk 14.0 for root as the latest version 16.0 kept booting back to recovery on non primary ROMs.
I'm still unable to flash Oreo ROMs as data-slot or secondary. At least we're able to keep Oreo as primary and test Nougat ROMs until dualbootpatcher app is compatible with Oreo or until some other fix is released.
Internal storage/data is still encrypted and unreadable on all non-primary ROMs; you must be decrypted prior to installing additional ROMs to have access to it, which I haven't tested yet.
See screenshots
Thanks for keeping up with this. I'm really interested but traveling without my PC so don't want to get stuck without a backup plan. Hopefully it's sorted by the time I get back home or I'll help test some more too.
es0tericcha0s said:
Thanks for keeping up with this. I'm really interested but traveling without my PC so don't want to get stuck without a backup plan. Hopefully it's sorted by the time I get back home or I'll help test some more too.
Click to expand...
Click to collapse
It's been relatively "safe" all the testing that I've done, not many scares, but you can never be too careful.
Edit: Now that it's working almost as intended we should make an official "how to" thread
cubandanger05 said:
It's been relatively "safe" all the testing that I've done, not many scares, but you can never be too careful.
Click to expand...
Click to collapse
If I wasn't out of the country, it'd probably be different. I've customized 100s of phones, 1000s of times but sometimes it's better safe than sorry. I'm great at fixing stuff because I've broken about everything I can (sometimes on purpose, sometimes not lol) but I need navigation and translation more than another custom rom I suppose.
es0tericcha0s said:
If I wasn't out of the country, it'd probably be different. I've customized 100s of phones, 1000s of times but sometimes it's better safe than sorry. I'm great at fixing stuff because I've broken about everything I can (sometimes on purpose, sometimes not lol) but I need navigation and translation more than another custom rom I suppose.
Click to expand...
Click to collapse
? understandable

stuck in unlock phone screen

succesfully unlock the bootloader,flashed the twrp but when i flashed the supersu then it get stuck in the unlock warning screen..and after fewsecond it relaaunched the twrp recovery...guyz anyone plss help..i get worried about my phone..thanks in advance
ahadabdul said:
succesfully unlock the bootloader,flashed the twrp but when i flashed the supersu then it get stuck in the unlock warning screen..and after fewsecond it relaaunched the twrp recovery...guyz anyone plss help..i get worried about my phone..thanks in advance
Click to expand...
Click to collapse
You need to flash ElementalX kernel prior to flash SuperSu or magisk if you want to root stock nougat or marshmallow rom.
Instructions are here if you need details: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918
strongst said:
You need to flash ElementalX kernel prior to flash SuperSu or magisk if you want to root stock nougat or marshmallow rom.
Instructions are here if you need details: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918
Click to expand...
Click to collapse
i am in soak test when i unlock bootloader and rooted it..when i wiped data it shows os not installed....what does it mean?
ahadabdul said:
i am in soak test when i unlock bootloader and rotted it..when i wiped data it shows os not installed....what does it means?
Click to expand...
Click to collapse
Even in soak test it you need to install exkernel as mentioned.
Maybe you wiped the system partition too?! Then you can here's no os at all... Can you remember what partitions you exactly wiped?
I would recommend to clean flash the last available stock nougat rom in terms of security https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 if you don't want to install the soak test again and you're willing to upgrade
strongst said:
Even in soak test it you need to install exkernel as mentioned.
Maybe you wiped the system partition too?! Then you can here's no os at all... Can you remember what partitions you exactly wiped?
I would recommend to clean flash the last available stock nougat rom in terms of security https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 if you don't want to install the soak test again and you're willing to upgrade
Click to expand...
Click to collapse
now please tell me what should i do...did i flash a rr rom or do what..please advice me..i am new to this community and know very less about it...plss help me brother..i dont want to root but to fflash a rom..should i do it?
ahadabdul said:
now please tell me what should i do...did i flash a rr rom or do what..please advice me..i am new to this community and know very less about it...plss help me brother..i dont want to root but to fflash a rom..should i do it?
Click to expand...
Click to collapse
Welcome here and have a great time on this great device :laugh:
You don't want to root? Why you have flashed supersu mentioned in your first post? I'm a little bit confused now
please take some time to hold on and think about what you want and what's your intention with your device. I don't know what you want and can't recommend anything unless I know what you want.
You should tell
After that we will see what suits you best:good:
ahadabdul said:
now please tell me what should i do...did i flash a rr rom or do what..please advice me..i am new to this community and know very less about it...plss help me brother..i dont want to root but to fflash a rom..should i do it?
Click to expand...
Click to collapse
As strongst has mentioned, please clarify what you're trying to accomplish with your device - what you want may elicit a different set of suggestions from us.
However, if you're trying to flash a custom ROM, you do not require root at all for our device. You simply require TWRP on your device, then you flash the custom ROM through TWRP. Be aware that many of the latest custom ROM builds are 64 bit in nature and as such require a 64 bit TWRP flashed. The instructions in the relevant custom ROM thread should have the link.
Also, you may wish to clarify what state your device is in at the moment: as far as I can see, it's still in the stock ROM, with TWRP, no system loaded and failing to boot from flashing SuperSU onto the stock ROM kernel, is that correct?
strongst said:
Welcome here and have a great time on this great device :laugh:
You don't want to root? Why you have flashed supersu mentioned in your first post? I'm a little bit confused now
please take some time to hold on and think about what you want and what's your intention with your device. I don't know what you want and can't recommend anything unless I know what you want.
You should tell
After that we will see what suits you best:good:
Click to expand...
Click to collapse
what i actually want is to need a new custom rom to atleast run my device ...which is my primaary device ..please tell me should i flash a rr rom ...i flash twrp 3.2.0.0....please tell me?...first i want a rooted phone with new custom rom but now i have to run this phone which is dead now..anyhow...please tell me the way i can..
echo92 said:
As strongst has mentioned, please clarify what you're trying to accomplish with your device - what you want may elicit a different set of suggestions from us.
However, if you're trying to flash a custom ROM, you do not require root at all for our device. You simply require TWRP on your device, then you flash the custom ROM through TWRP. Be aware that many of the latest custom ROM builds are 64 bit in nature and as such require a 64 bit TWRP flashed. The instructions in the relevant custom ROM thread should have the link.
Also, you may wish to clarify what state your device is in at the moment: as far as I can see, it's still in the stock ROM, with TWRP, no system loaded and failing to boot from flashing SuperSU onto the stock ROM kernel, is that correct?
Click to expand...
Click to collapse
i was in the soak test version.i unlocked bootloader,flash recovery and flash supersu..but phone does not on..it stuck in the unlock screen..and ..and i think i accidentally did thw wipe data ...what should i do
ahadabdul said:
what i actually want is to need a new custom rom to atleast run my device ...which is my primaary device ..please tell me should i flash a rr rom ...i flash twrp 3.2.0.0....please tell me?...first i want a rooted phone with new custom rom but now i have to run this phone which is dead now..anyhow...please tell me the way i can..
Click to expand...
Click to collapse
1)Again, you do not need root to install custom ROMs, only TWRP is required.
1a)Which TWRP have you flashed, is this the 32 bit or 64 bit version? If this is the official TWRP 3.2, I think that may be the 32 bit version. In which case, you'll want Resurrection Remix 5.8.5 https://forum.xda-developers.com/moto-g4-plus/development/rom-resurrection-remix-n-5-8-0-t3507275
As you cannot boot properly, the easiest way to flash would be to boot your device to TWRP recovery, then connect your device to your computer. Your device's internal storage should be visible then, you may wish to back up your files at this point. Copy the RR custom ROM zip and the GApps package of your choice to your device and flash in TWRP as per the instructions. As usual with flashing custom ROMs, you will have to wipe /system, /data, cache and Dalvik in TWRP before flashing. Up to you if you choose to wipe internal storage as well (but usually a good idea switching between stock and custom ROMs).
Once you've booted into RR, you should have root as it already comes with magisk.
If you want to flash the RR 6.0 custom ROM, you must have the 64 bit TWRP recovery flashed before you attempt to flash the 6.0 custom ROM or any Oreo custom ROMs at the time of writing.
2)Alternatively, as strongst has suggested, if you simply want your device to be working again, you'll have to flash the latest stock ROM again, since you've likely tripped the anti-rooting measures in the stock kernel.
---------- Post added at 06:53 PM ---------- Previous post was at 06:49 PM ----------
ahadabdul said:
i was in the soak test version.i unlocked bootloader,flash recovery and flash supersu..but phone does not on..it stuck in the unlock screen..and ..and i think i accidentally did thw wipe data ...what should i do
Click to expand...
Click to collapse
Which soak test, NPJ25.75-2? If so, that's a really old soak test, and as such I would recommend you flash the latest stock ROM available for your device, else you may run into issues with the newest custom ROMs, particularly if you have a G4 Plus. Can you mention what device and what region you're in, so we can guide you to the correct stock ROM to flash?
Yeah, that phone not turning on is because of SuperSU flashed onto the stock Nougat kernel, which you cannot do for our device - you need a custom kernel. The main ways to get around it are as I described above - flash a custom ROM or re-flash the correct stock ROM for your device.

Question: How to switch from 32-bit N ROM to 64-bit O ROM

Currently running crDroid 3.8.8 (32-bit Android N) with encryption activated. Looking to jump to 64-bit Android O with encryption activated while maintaining the option to revert to my current setup should the need arise.
Here's how I currently understand the process, please correct/clarify where necessary:
1. Create a backup via current TWRP.
2. Save backup from step 1 to another media (i.e. desktop/cloud/etc.)
3. Update to 64-bit TWRP supporting encryption. Only working variant is GtrCraft twrp-3.2.1-1-potter_crypto.img: https://forum.xda-developers.com/showpost.php?p=75306024&postcount=76
4. Copy ROM and gapps zip to device
5. Wipe cache, system, & data
6. Flash ROM/gapps
7. Encrypt device
Questions:
1. Is the above accurate? If so, does this also apply to selinux enforcing ROMs?
2. Does the 64-bit TWRP change the partitioning of the device? If not, do I need to do step 2 above?
3. Does switching to a Treble variant change the answers to Questions 1-3?
Thanks for the help.
I'd advise you to stay on nougat roms for now, as oreo roms create problems when returning to fastboot stock, and make the switchafter Official Oreo comes out. If you really want to, backup your efs in twrp, and persist as a .img file by following this post.
1. Yes and yes
2.No. Save the backup somewhere else to be safe.
3. No, but I don't think encryption will work.
Appreciate the feedback.

Help with twrp

Hello guys! I installed twrp but it doesnt allow me to decrypt data so i cant flash anything. Any solutions??
Thanks in advance!!!
ionakos said:
Hello guys! I installed twrp but it doesnt allow me to decrypt data so i cant flash anything. Any solutions??
Thanks in advance!!!
Click to expand...
Click to collapse
What is your ROM and which TWRP do you use?
Use the official TWRP.me twrp-3.6.0_9-0-davinci.img and it will work with up to MIUI 12.5, A11, supporting Data encryption
For A12, there is no TWRP yet supporting its Data encryption. You could use OTG stick - e.g., put the zip file you want to flash to OTG
zgfg said:
What is your ROM and which TWRP do you use?
Use the official TWRP.me twrp-3.6.0_9-0-davinci.img and it will work with up to MIUI 12.5, A11, supporting Data encryption
For A12, there is no TWRP yet supporting its Data encryption. You could use OTG stick - e.g., put the zip file you want to flash to OTG
Click to expand...
Click to collapse
Iam using 3.6.0 and iam on miui 12.1.4 global and it doesn't even ask for pin to decrypt data. I even tried previous versions of twrp
ionakos said:
Iam using 3.6.0 and iam on miui 12.1.4 global and it doesn't even ask for pin to decrypt data. I even tried previous versions of twrp
Click to expand...
Click to collapse
Try changing unlock from pin to pattern, or disable screen unlock
For me, on EEA it worked fine
zgfg said:
Try changing unlock from pin to pattern, or disable screen unlock
For me, on EEA it worked fine
Click to expand...
Click to collapse
I've tried all these things and it still doesn't ask me for encryption password
ionakos said:
I've tried all these things and it still doesn't ask me for encryption password
Click to expand...
Click to collapse
I'm on Xiaomi.eu Stable 12.5.2, it's better ROM:
MIUI 12.0 - MIUI 12.0/12.1/12.2/12.5 STABLE RELEASE
STABLE RELEASE RULES WHEN POSTING 1. If a ROM is not published DONT ASK ABOUT ITS ETA 2. If a ROM is not published DONT ASK why! 3. If a ROM is available, download it and use it 4. If a ROM has bugs, post the bug to the bug section if the BUG is not already listed 5. If you use any form of...
xiaomi.eu
zgfg said:
What is your ROM and which TWRP do you use?
Use the official TWRP.me twrp-3.6.0_9-0-davinci.img and it will work with up to MIUI 12.5, A11, supporting Data encryption
For A12, there is no TWRP yet supporting its Data encryption. You could use OTG stick - e.g., put the zip file you want to flash to OTG
Click to expand...
Click to collapse
Hi, need some more info about the OTG to flash, I was on LOS 18.1, upgraded to LOS 19.0, only realized now no TWRP to decrypt A12, you mean we still can flash the system update or zip (magisk) via TWRP with OTG even though it does not decrypt internal data? flash system update or magisk zip via TWRP will goes through? I thought encryption would be whole phone?
gl7 said:
Hi, need some more info about the OTG to flash, I was on LOS 18.1, upgraded to LOS 19.0, only realized now no TWRP to decrypt A12, you mean we still can flash the system update or zip (magisk) via TWRP with OTG even though it does not decrypt internal data? flash system update or magisk zip via TWRP will goes through? I thought encryption would be whole phone?
Click to expand...
Click to collapse
It will read from OTG and flash to System or Boot, hence Data and Internal storage are not needed
Nevertheless, I would suggest for Magisk to Patch the boot.img and to flash from Fastboot

Categories

Resources