Related
Guys, apologies if the question is silly / already asked somewhere i wasn't able to locate.
As per thread title, what is that all about? 1. It's an expected behaviour / feature of TWRP, or is it kind of a bug? 2. Is there any way to avoid / disable it?
It's quite annoying during these days of frequent flashing as development is speeding up fast for this little beast.
If you have a pin or pattern set up it will always ask you for it.
sting5566 said:
If you have a pin or pattern set up it will always ask you for it.
Click to expand...
Click to collapse
Well, thanks for pointing that out.
I've been outside of the flashing world for a while with my old phone (OP2), but i'm pretty sure to recall that i was using TWRP 3.X and the pin was setup (due to fingerprint usage for unlocking) and the recovery was not asking for any decryption pwd.
Maybe the OP2 was not encrypted and that's the point. So wondering if future development will change this (are custom ROMs usually decrypted?)
It's something completely outside of my knowledge, so i could just be trashtalking here.
ca110475 said:
Well, thanks for pointing that out.
I've been outside of the flashing world for a while with my old phone (OP2), but i'm pretty sure to recall that i was using TWRP 3.X and the pin was setup (due to fingerprint usage for unlocking) and the recovery was not asking for any decryption pwd.
Maybe the OP2 was not encrypted and that's the point. So wondering if future development will change this (are custom ROMs usually decrypted?)
It's something completely outside of my knowledge, so i could just be trashtalking here.
Click to expand...
Click to collapse
If you don't want to enter anything when twrp starts under security , screen lock change that to none and you shouldn't have to put anything in when twrp starts.
ca110475 said:
Guys, apologies if the question is silly / already asked somewhere i wasn't able to locate.
As per thread title, what is that all about? 1. It's an expected behaviour / feature of TWRP, or is it kind of a bug? 2. Is there any way to avoid / disable it?
It's quite annoying during these days of frequent flashing as development is speeding up fast for this little beast.
Click to expand...
Click to collapse
It is a security issue. If you need pass/pin/pattern to keep your phone secure then logically you should have it required in twrp to prevent unauthorized access to your phone through twrp. You can disable pass/pin/pattern from the twrp file manager
Sent from my OnePlus6 using XDA Labs
Just decrypt your phones storage. You want be asked for a pattern / pin anymore in twrp
matze19999 said:
Just decrypt your phones storage. You want be asked for a pattern / pin anymore in twrp
Click to expand...
Click to collapse
How?
mikex8593 said:
How?
Click to expand...
Click to collapse
I'm not so sure you can actually decrypt the phone's storage and the reason I believe this to be so is the day I received my phone I was going through all of the settings. If you go into security and lock screen and scroll to the bottom you will see that your phone is encrypted. My phone was like this from day one without entering any fingerprint or PIN code. I may be wrong about decrypting the storage however the OnePlus 6 does have an EFS (encrypted file system) which stores meid, imei, serial number, config, diag settings and radio settings, etc in an encrypted format at the file system level.
If you do manage to decrypt your storage your phone will most certainly be vulnerable
dgunn said:
I'm not so sure you can actually decrypt the phone's storage and the reason I believe this to be so is the day I received my phone I was going through all of the settings. If you go into security and lock screen and scroll to the bottom you will see that your phone is encrypted. My phone was like this from day one without entering any fingerprint or PIN code. I may be wrong about decrypting the storage however the OnePlus 6 does have an EFS (encrypted file system) which stores meid, imei, serial number, config, diag settings and radio settings, etc in an encrypted format at the file system level.
If you do manage to decrypt your storage your phone will most certainly be vulnerable
Click to expand...
Click to collapse
I've always been decrypt with previous phones. There is no decryption method with the 6 yet because of the a/b partitioning. You need to flash a modified boot img.
mikex8593 said:
I've always been decrypt with previous phones. There is no decryption method with the 6 yet because of the a/b partitioning. You need to flash a modified boot img.
Click to expand...
Click to collapse
If you were to decrypt your data (and you can through either adb or fastboot - but I,m not going into that here), you would wipe it at the same time.
There's no way around this.
carlos67 said:
If you were to decrypt your data (and you can through either adb or fastboot - but I,m not going into that here), you would wipe it at the same time.
There's no way around this.
Click to expand...
Click to collapse
With that, I am aware of the wipe, but it would be a prepared and willing wipe, but you are right, this is not the place for the discussion.
Hi guys!
I've come to a spot in the OP5 rooting guide which states For Users who want to Decrypt Data have to Format Data & Flash No Verity OP5 Zip. However I'm a bit at loss to why to do this or don't, what benefits does it bring and what is the relation between data encryption/decryption and DM-Verity. I googled a lot, but found no definitive answer
Any insight is welcomed (and please don't answer with questions like "Why do you want to root the phone", thanks )
Alright, so i have an OP5T and it is encrypted. I decided to disable one magisk module, op5t gcam dot issue patch, i think thats is what it was called, and then then i couldnt unlock the phone. It was running LOS for microg android 9, and the encryption from oxygenos to los passed no problem (just enter the same lock screen pattern) (also why i think this doesnt belong in some op5t forums because it shouldnt be op5t specific, judging by how i was able to use los with an encrypted phone no problem). Now i deleted something like /data/system/gatekeeper.{password,pattern}.key, and /data/system/lockssettings.db (moved it to a different folder). That kind of worked, but then my phone was stuck on 'starting phone'. Even when getting the files back, it was still stuck. Trying to decerypt it via twrp gave like a 2 second try when using the wrong pattern, and a 5-7 second try when using the correct pattern, although still failed.
When looking at the twrp logs trying to backup /data:
failed to lookup tar policy for '/data/misc_ce/0' - 'cba6a56b3cad5706'
I:Error adding file '/data/misc_ce/0' to '/usbstorage/TWRP/BACKUPS/ab5cbcf1/2020-09-06--05-12-48_lineage_dumpling-userdebug_9_PQ3A190801002/data.ext4.win000'
Error creating backup.
I:ERROR tarList for thread ID 0
Error creating backup.
I:InfoManager saving '/usbstorage/TWRP/BACKUPS/ab5cbcf1/2020-09-06--05-12-48_lineage_dumpling-userdebug_9_PQ3A190801002/data.info'
createTarFork() process ended with ERROR: 255
I also removed magisk via a zip, and reinstalled LOS for microg to no avail.
So, im now copying the internal storage stuff over mtp to my pc, and hoping there would be a way to decrypt them. I have the gatekeeper and lockscreensettings files and i know my pattern, so is there any way i could decrypt them on my pc?
Also, could it be done by wiping /data, booting up android and then setting up a lock screen pattern, enabling encryption, or just copying the files to /data/system/...?
Im typing this really rushed, sorry for any misunderstanding you may encounter.
Alright so another update, gatekeeper.password.key is empty, while gatekeeper.pattern contains some characters. I did use a pattern based lockscreen only, this normal for gatekeeper.password.key to be empty, right?
Ive reflashed the whole thing, now the only thing that could help me would be if i could somehow decrypt the files i have downloaded. I know my pattern and have the gatekeeper.pattern.key file, if that can help?
constatinus said:
Ive reflashed the whole thing, now the only thing that could help me would be if i could somehow decrypt the files i have downloaded. I know my pattern and have the gatekeeper.pattern.key file, if that can help?
Click to expand...
Click to collapse
if you didn't unencrypt the files before resetting the device. the files are now useless. no recovery options unless you know someone who works for the NSA (sarcasm) but true.
I know the feeling. i lost recovery keys for online storage for porn....all lost, but not forgotten.
Nope, you cant.
Sent from my BASIC using Tapatalk
Hello,
today it happened that I forgot a password to my phone. I've tried to restore it by logging in into my xiaomi account and my google account. Unfortunately it only offers to wipe my data, which I want to avoid at all costs.
I have Poco F2 Pro on MIUI 13
Is there known a bug which could in any way make me unable to log into my phone?
Please help me. I am really desperate. I beg you. If you need any information about this case and it's sensible to share it there, please ask.
people report similar on updates, but I don't think it's official known bug. however, there is gatekeeper in background which will deny correct password after too many attempts, timeout increases up to 1 trial per day. if something corrupted it might happen this deny is silent without notifying you.
so best what you can do for now is nothing, just wait for 24 hours and keep on charging.
perwell said:
Hello,
today it happened that I forgot a password to my phone. I've tried to restore it by logging in into my xiaomi account and my google account. Unfortunately it only offers to wipe my data, which I want to avoid at all costs.
I have Poco F2 Pro on MIUI 13
Is there known a bug which could in any way make me unable to log into my phone?
Please help me. I am really desperate. I beg you. If you need any information about this case and it's sensible to share it there, please ask.
Click to expand...
Click to collapse
if you're decrypted you can delete your lockscreen in twrp if you're encrypted you'll need to remember your password otherwise it's wipe data
@jons99 if OP would have the availability to access lockdettings it would be also possible to backup data, right?
aIecxs said:
people report similar on updates, but I don't think it's official known bug. however, there is gatekeeper in background which will deny correct password after too many attempts, timeout increases up to 1 trial per day. if something corrupted it might happen this deny is silent without notifying you.
so best what you can do for now is nothing, just wait for 24 hours and keep on charging.
Click to expand...
Click to collapse
It would be strange to ask again for password every 2 minutes and silently block out for the whole day. Actually it would rather bad for the actual users rather than unauthorized break in.
I've tried many times and I'm quite sure that I've typed the correct password at least once. Are there any options like blocking it through Xiaomi cloud and maybe it would ask to log into the account. I've tried changing the password but it still does not work (maybe it was made after too many attempts).
Does the password to phone change when it is changed to the Xiaomi account?
as stated above, it doesn't matter you typed the correct password
aIecxs said:
@jons99 if OP would have the availability to access lockdettings it would be also possible to backup data, right?
Click to expand...
Click to collapse
any one with working twrp can access the lockscreen file but if your device is encrypted you'll be locked out if you delete it
Poco F2 Pro on MIUI 13 /data/system/lockdettings.db is unencrypted despites /data partition is encrypted?
aIecxs said:
Poco F2 Pro on MIUI 13 /data/system/lockdettings.db is unencrypted despites /data partition is encrypted?
Click to expand...
Click to collapse
if his data partition is encrypted then it doesn't matter deleting locksettings won't help
except for most Xiaomi devices encrypted with default_password where lockdettings.db can be deleted safely (if you would have access to decrypted /data partition, which would also allow you to backup /data)
aIecxs said:
except for most Xiaomi devices encrypted with default_password where lockdettings.db can be deleted safely (if you would have access to decrypted /data partition, which would also allow you to backup /data)
Click to expand...
Click to collapse
To access files I need to enable file transfers. Besides I also wouldn't want to risk bricking the phone.
as your bootloader is locked there is nothing you can do anyway... this was just side note question to @jons99
it's true that file-based encryption is tied to lock screen credentials, but MIUI 13 is insecure and implemented metadata encryption in a wrong way so that TWRP is able to decrypt without password, like it was common on full-disk encryption.
full-disk encryption requires decrypted partition first in order to access files on it, so the suggestion to delete locksettings.db is pointless as goal (access /data) would already achieved before. but I am curious about file-based encryption and metadata encryption leaves /data/system unencrypted. while it for sure would break file-based encryption, I am not quite sure this applies to MIUI weak metadata encryption too, if we delete locksettings.db
aIecxs said:
as your bootloader is locked there is nothing you can do anyway... this was just side note question to @jons99
it's true that file-based encryption is tied to lock screen credentials, but MIUI 13 is insecure and implemented metadata encryption in a wrong way so that TWRP is able to decrypt without password, like it was common on full-disk encryption.
full-disk encryption requires decrypted partition first in order to access files on it, so the suggestion to delete locksettings.db is pointless as goal (access /data) would already achieved before. but I am curious about file-based encryption and metadata encryption leaves /data/system unencrypted. while it for sure would break file-based encryption, I am not quite sure this applies to MIUI weak metadata encryption too, if we delete locksettings.db
Click to expand...
Click to collapse
I'm pretty sure xiaomi is using file based encryption and without the locksettings you won't be able to decrypt your data I mean the system will load but you won't be able to use it as it will show phone is starting message forever cause it won't be able to decrypt your data on the other hand I don't know much about xiaomi so I guess anything is possible
nope, actually it's metadata encryption (but I have never seen personally as I don't got such device in hands)
Code:
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt,checkpoint_merge latemount,wait,formattable,fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
perwell said:
Hello,
today it happened that I forgot a password to my phone. I've tried to restore it by logging in into my xiaomi account and my google account. Unfortunately it only offers to wipe my data, which I want to avoid at all costs.
I have Poco F2 Pro on MIUI 13
Is there known a bug which could in any way make me unable to log into my phone?
Please help me. I am really desperate. I beg you. If you need any information about this case and it's sensible to share it there, please ask.
Click to expand...
Click to collapse
Hi my friend
Were you able to unlock your cell phone?
It just happened to me with a xiaomi redmi note 8 and every time I try, the device makes me wait 64 minutes.
SBUnlock said:
Hi my friend
Were you able to unlock your cell phone?
It just happened to me with a xiaomi redmi note 8 and every time I try, the device makes me wait 64 minutes.
Click to expand...
Click to collapse
Did you previously unlocked bootloader with Miflash Unlock Tool?
aIecxs said:
Did you previously unlocked bootloader with Miflash Unlock Tool?
Click to expand...
Click to collapse
Not yet
The truth is that I am new to this, when I investigated about Miflash Unlock Tool, I see that it is used to unlock bootloader, not to unlock cell phone security pattern.
I am right?
I need to unlock the security pattern of my cell phone
you can't unlock bootloader, it's too late. you are screwed. either give it back to the child for playing (hopefully one day it get unlocked) or factory reset phone. you can't break screen lock on locked bootloader no matter what encryption type used.
aIecxs said:
you can't unlock bootloader, it's too late. you are screwed. either give it back to the child for playing (hopefully one day it get unlocked) or factory reset phone. you can't break screen lock on locked bootloader no matter what encryption type used.
Click to expand...
Click to collapse
THANK YOU SO MUCH FRIEND,
Is there an android security option that after many failed attempts, blocks the correct pattern?
until now, theres still no solution to this bug
I was not sure where else to put this thread so I apologize if this forum is not appropriate. I am planning to desolder the flash chip from my old Samsung S6 and use either the ZX3 Easy-JTAG or the NuProg-E2 to read the contents of the chip. I just realized that the contents of the chips is probably encrypted, probably using the PIN to do so. Does anyone know if this is true? If so, what mechanism is used to encrypt it? I have no issue writing some software to decrypt it given the PIN if I knew how it was encrypted to begin with.
you don't need the pin it's just encrypted with default_password. But it's impossible to decrypt offline. either get mainboard back to life and boot into android, or just smash it with hammer and throw it into garbage.
aIecxs said:
you don't need the pin it's just encrypted with default_password. But it's impossible to decrypt offline. either get mainboard back to life and boot into android, or just smash it with hammer and throw it into garbage.
Click to expand...
Click to collapse
Thank you for your response, I do have a follow up question though. I read somewhere that since Android 10 the storage is encrypted. Doesnt that mean that it is encrypted via software, presumably from the Android software itself? Since Android is open source, wouldnt it be possible to decrypt it in the same manner as Android does when it loads it? I am hoping my reasoning is correct but I admit that there could always be something unbeknownst to me that makes this impossible, some as some firmware or onboard circuit in between the cpu and the storage. If it is possible, I am more open to buying those expensive flash chip readers I mentioned to recover the data.
android offers encryption since Android 5.0 Lollipop. you would have noticed that if you followed the link.
aIecxs said:
android offers encryption since Android 5.0 Lollipop. you would have noticed that if you followed the link.
Click to expand...
Click to collapse
Yea thats true but its not mandatory since Android 10.0, from what I read.
aIecxs said:
android offers encryption since Android 5.0 Lollipop. you would have noticed that if you followed the link.
Click to expand...
Click to collapse
Also, the link made it seem possible? Or am I missing something?
I also found this: https://source.android.com/docs/security/features/encryption/full-disk
```
Upon first boot, the device creates a randomly generated 128-bit master key and then hashes it with a default password and stored salt. The default password is: "default_password" However, the resultant hash is also signed through a TEE (such as TrustZone), which uses a hash of the signature to encrypt the master key.
```
I dont know what a TEE actually is, but I am guessing this is what makes it impossible? Unless the master key is stored somewhere other than the internal flash it seems that everything you need to decrypt is available to you, assuming you know the PIN.
(FDE) full-disk encryption is mandatory since Android 6.0.1 Marshmallow.
(FBE) file-based encryption is mandatory for devices shipped with Android 10.0 Quince Tart.
encryption keys are hardware-backed in TrustZone TEE yet another proprietary operating system not accessable from eMMC storage.
if the mainboard doesn't show any sign of life on lsusb just forget about it.
aIecxs said:
(FDE) full-disk encryption is mandatory since Android 6.0.1 Marshmallow.
(FBE) file-based encryption is mandatory for devices shipped with Android 10.0 Quince Tart.
encryption keys are hardware-backed in TrustZone TEE yet another proprietary operating system not accessable from eMMC storage.
if the mainboard doesn't show any sign of life on lsusb just forget about it.
Click to expand...
Click to collapse
Ok, thanks for clarifying. I originally based this project on this video:
Since I have an S6 myself I was hoping it would work for me but I have no idea if the storage was encrypted. I am hesitant to gamble a thousand dollars on a solution that may not work for me.
Also, theoretically, couldnt you get the encryption keys from the processor itself if you could somehow power it on in debug mode? Sorry if debug mode is not the correct term.
Thank you again for all your help.
theoretically... but SM-G920F is Exynos SoC
http://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html