Git Product home page Git Product logo

Comments (10)

nelenkov avatar nelenkov commented on June 9, 2024

It works on debug builds, but production builds block the reply from vold, so there is no way of knowing whether the command executed successfully or not. Also passwords are now passed as hex-encoded strings, so make sure you encode properly if doing this manually, otherwise you will be locked out of your device.

I actually have the code for 5.0 support, but as I said, it only works if you disable SELinux. There are other ways to do this, but none of them is ideal.

from cryptfs-password-manager.

xmikos avatar xmikos commented on June 9, 2024

Do I need to disable SELinux or is it only needed for use from app (not adb shell)? How should I proceed without disabling SELinux, is it somehow doable? Is there some documentation about it? I couldn't fond anything on Google. Thank you very much!

from cryptfs-password-manager.

nelenkov avatar nelenkov commented on June 9, 2024

It works exactly the same way from an app and from the shell. If you have root, there is no need to disable SELinux, but you won't get any output from the cryptfs command. It is doable, but you have to be sure you entered the right password. For example this will set the decryption PIN to '1234':

# vdc cryptfs changepw pin 31323334

from cryptfs-password-manager.

xmikos avatar xmikos commented on June 9, 2024

Thank you, I have tried it (fingers crossed ;-)) on my rooted Nexus 4 with long passphrase and it works like a charm! I have used simple Python 3 script to get the hexadecimal password:

python -c 'import binascii; print(binascii.hexlify(input("Password: ").strip().encode("ascii")))'

from cryptfs-password-manager.

martinml avatar martinml commented on June 9, 2024

Thanks @nelenkov and @xmikos for the information.

Does this method still work when using a PIN for unlocking but a passphrase for encrypting?

I'm asking because until Android 4.4 you got a full keyboard regardless of the type of security, but now apparently you get a numeric keyboard when setting a PIN. I'm guessing that the parameter default|password|pin|pattern enables one or another, but I don't want to find out that I can't type letters after setting a passphrase, so I prefer asking now :)

from cryptfs-password-manager.

nelenkov avatar nelenkov commented on June 9, 2024

Yes, the parameter sets the type of the unlock/decrypt method. Android 5.0 will try to pass the string you enter to the lockscreen, but it should not be a problem if the unlock type doesn't match. As usual, use at your own risk.

from cryptfs-password-manager.

nelenkov avatar nelenkov commented on June 9, 2024

I've committed experimental Lollipop support, only works if SuperSU is installed. Try it out if interested.

from cryptfs-password-manager.

nelenkov avatar nelenkov commented on June 9, 2024

You can use the following command to enable vdc output when testing via the shell:

supolicy --live 'allow vdc devpts chr_file {read write getattr ioctl}'

from cryptfs-password-manager.

martinml avatar martinml commented on June 9, 2024

Sorry for continuing the off-topic: vdc cryptfs changepw password <passphrase in hex> worked beautifully. I use a PIN for normal phone unlocking but a long passphrase for booting, and full keyboard is showing now when booting.

Also, if it were to be useful, I tried the supolicy command to enable the output and it was 200 0 0.

from cryptfs-password-manager.

nelenkov avatar nelenkov commented on June 9, 2024

Great, glad it works for you. I've just pushed the updated app to the Play Store, so closing this. Please open new issues if you have problems with the app.

from cryptfs-password-manager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.