-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with Android 9 #25
Comments
Is there anything we can do? |
I tried that, didn't work. The reason is that when you select a screen lock pin/password/pattern on first boot of Android 9, it sets it for the encryption as well (or, if you select not to use it for encryption, it clears the encryption password.) |
As a workaround, you can do the following (on your own risk):
If something went wrong, sqlite into |
Does not work with Pixel Expirience on my Redmi Note 4X, but I found a much easier method:
|
for me this resets the encryption password and it is disabled |
Maybe it depends of firmware... Just tested again (Redmi Note 4X with Pixel Experience):
Rebooted to system with my password and unlocked screen with my PIN. |
@dartraiden exactly what I did, but then encryption was "disabled" (emtpy password) once I selected "no" on encrypted startup |
That's the behavior I see in the LineageOS 16.0 source code, I assume that came from AOSP. Maybe some manufacturers have changed it. |
I performed the following steps with my Galaxy S5 SM-G900T: What did I do wrong? Note that the phone is still encrypted. |
That's how LineageOS works. If you select NO to require pin or password on start LineageOS clears the password. |
Yes, some firmware (LineageOS) remove encryption, some (PE) leave it on |
I've added support for Android 9 on my fork and included an .apk for download, but in order for this to work, the app has to be systemized and privilege whitelisted (both of which can be done using the 'App Systemizer' module which can be downloaded directly through the Magisk Manager, though be sure to choose '/system/priv-app' when prompted for the install location) so it can be allowed the CRYPT_KEEPER permission in order for it to be able to access the StorageManager stuff and work its magic. |
I had no luck with your fork on LOS 16, the CRYPT_KEEPER permission doesn't exist.
|
Yeah I don't know why it complains about the permission with the It's also worth to check that there's a
|
I was able to install cryptfs-password-manager on LOS 16.0 as @thedroidgeek suggested. The privapp-permissions-org.nick.cryptfs.passwdmanager.xml is also were it should be. but when i try to change the password using the app, i just got an error "Password change error. Failed to change device encryption password." Any idea? |
I would need a logcat to find out what happened. |
|
Lol, I didn't even realize they also added reflection restrictions on Pie 😮 |
seems to work, thanks a lot... |
@thedroidgeek, it works, thank you! |
Worked for me as well! 👍 |
The latest version of the fork linked above does not seem to work on Pixel 3. Obtain "Password change error. Failed to change device encryption password"
Do not see any errors in logcat yet still does not work. |
Learn something new every day. Seems like it fundamentally means the device is insecure when bootloader is unlocked unless your lock screen is a very long password? |
@LevN0 Hopefully, someone more competent will chime in. |
@thedroidgeek Thanks for your fork, worked flawlessly for me! BTW: I didn't need this Magisk stuff, just installing as system app via
And uninstalling it afterwards with Edit: I'm on LineageOS 16.0 [unofficial build though] |
Looks like at least for LineageOS 16 they are putting the changepw functionality back in: |
@thedroidgeek |
@thedroidgeek 1.) My Problem: I am using a Fairphone 2 with LineageOS 16 , rooted via AddonSU (see https://download.lineageos.org/extras ). I presume for this case any Magisk-based solution to be not suitable to make the app privileged and systemized. Is there any idea, how I still can make use of it? I tried the workaround of innir (see #25 (comment) ), but this rendered LineageOS unbootable for me. (Hangs in the boot animation, then...) 2.) If the change mentioned by jfeise above ( #25 (comment) ) is now part of LineageOS, shouldn't the original app work again for any recent LineageOS version? I am wondering -- I tried (as far as i can remember: with lineage-16.0-20200120) but apparently failed: It states that my existing password -- which I believe to have entered correctly -- was wrong... |
Does this means that this app works again since last August? |
I could not verify that the issue is solved with the patch from https://review.lineageos.org/c/LineageOS/android_system_vold/+/254062 on my LineageOS version 16.0-20200627-microG-ktle.
and Cryptfs Password App says "Invalid password" when I try to change the disk encryption password with the correct current password and some test New password. |
@PaCaBa Thank you for checking For reference this is the change for lineage 17 I inspected the code and they seem to include the command Now that microg builds are running again I will update soon and if I remember to do it, I'll report back here |
Success! I don't think is documented anywhere the syntax but looking at the code I linked in my previous comment I was able to set a different password.
Where type of password can be:
I also had to deal with the issue of the phone not encrypting due to the partition size. Fixed following the instructions here: So basically the code of this app needs to be updated to reflect the changes made on android 9 and above either by calling vdc changepw or fdeChangePassword directly. |
Pull requests are always welcome. If the change only works on LineageOS or some other custom build/ROM, not sure if it makes sense to release on Play Store though. Could live on separate lineage-os branch or some such. |
@nelenkov Thanks. I just realized the syntax I described is on the readme file for CM13 and implemented in the code. Maybe what can be done is to run the changepw command directly and check for the output for when the current password is wrong. I'll leave the PR for someone with more knowledge about android. |
I tried the solution of rodrigoaguilera (vdc cryptfs changepw TYPEOFNEWPASSWORD OLDPASSWORD NEWPASSWORD) |
No idea, sorry |
Where did you find the code? (sorry it's all new for me...) |
https://review.lineageos.org/c/LineageOS/android_system_vold/+/258179 |
@rodrigoaguilera May I ask which device you have used? |
Both star2lte and jfltexx |
Hi this might be a stupid question... I installed termux and inside termux the tsu package for using it as root. But the command vdc does not exist... I have a Fairphone 2 with LineageOS for MicroG and Magisk installed. Thank you! Edit: I ran it with adb root and afterwards adb shell and got: vdc V 02-09 10:51:46 13601 13601 vdc.cpp:52] Waited 0ms for vold |
I used termux too but I don't remember installing any |
Thanks, vdc is available by running it with su. But I get the same error as I mentioned in my post above: vdc V 02-09 10:51:46 13601 13601 vdc.cpp:52] Waited 0ms for vold Thank you for your help! Edit: It worked with the cryptfs app as suggested here: |
I get this error. rodrigoaguilera, bniddl, do you use File Based Encryption or Full Disk Encryption? It can be determined as described here without root privileges. I use File Based Encryption since I installed LineageOS 17.1 from scratch. [Update. Since the |
I think I use Full disk encryption as TWRP is not able to even mount it. |
Yes, a Google search shows the source at the top: “File Based Encryption is required in Android 10”.
I heard that Android keeps Full Disk Encryption if it was used before Android was updated. I can't find the source.
You will know for sure by using the method described by the link I gave. It is just one command in |
beroal, you are right. My device uses File Based Encryption (FBE). bgcngm (maintainer of LOS 17.1 gts4lv) told me, that it is not possible to have a separate disk encryption password on a FBE-device. |
OK this sucks terribly, today I learned about FBE and I don't like it at all. Is there any way for a newer device on rooted Android 11 (specifically: beyond0lte with Lineage 18 + Magisk) which is FBE encrypted to have a boot password different from the screen unlock password? |
Unfortunatly this is not supported. Maybe a custom ROM could implement such a feature, but AOSP does not support it. However AOSP supports something else that protects against the same threats. This is hardware backed encryption key storage. If your device supports a Trusted Executrion Environment(TEE) or HSM (Hardware Security Module) your encryption key is saved there with extraction prevention and brute force protection, as the TEE/HSM only accepts password guesses every n second. |
Thank you @besendorf for the quick reply. Yes, I was reading in the meantime about hardware backed key storage, I have still to make up my mind about it. One thing I do not like is that it requires you to trust the hardware, i.e. the TPM, while with a strong FDE password, if your phone is powered off it's basically a brick. I understand your threat model may vary, but I personally don't like the idea that Android decided that somehow users do not need to manage their own security policy. Bah! |
These concerns are along the lines of achieving nation-state security, which is practicably impossible. The bigger concern is all the other criminals who are busy hacking into video surveillance systems so they can capture someone entering their phone's encryption password in broad daylight. (I would like to point out that not even Microsoft requires such a stupid policy - gives you an idea of what these "developers" think of your security.) For all of the devices I've owned, LineageOS does not allow me to enforce fingerprint attempt limit or password attempt limit. So anyone who is kind of close can attempt enough retries to have a realistic chance at succeeding, making the over-the-shoulder attack the most likely vector. My current choice is my phone is exclusively a selective email device and maybe some shopping/restaurant apps, audio books, etc. Nothing of consequence. The only secure option is nothing of value on the device. |
I just installed a LOS 19.1 and as a workaround I used multiple accounts. |
Unfortunately, this app doesn't work with Android 9. Google has taken away the ability to use raw
vdc cryptfs
commands.The text was updated successfully, but these errors were encountered: