[Samsung Galaxy Nexus] magur0:
A little update on my topic: bootlooping with encrypted LOS13

with the pleasant help of [MENTION=6979267]nailyk[/MENTION] who builded a LOS13 boot.img for me with adb enabled from boot we were able to decrypt it via command line and adb from a linux host:

We booted the boot.img via fastboot till the decrypt prompt from LOS. Here it's time to open a terminal and connect to adb

Terminal:

adb shell
vdc

If everything is right the output should be:

Usage: vdc [--wait] <monitor>|<cmd> [arg1] [arg2...]

Now you can start a parallel terminal with logcat to monitor

adb logcat -c && adb logcat -C

And in the adb shell you can now decrypt with:

vdc cryptfs checkpw <pass>

If things go right you get the following output in the adb shell:

200 0 0

combined with lot's of green in the logcat :good:

08-08 17:15:16.913 133 168 I Cryptfs : cryptfs_check_passwd
08-08 17:15:16.913 133 168 I Ext4Crypt: ext4 crypto complete called on /data
08-08 17:15:16.913 133 168 I Ext4Crypt: No master key, so not ext4enc
08-08 17:15:16.906 168 168 W vold : type=1400 audit(0.0:28): avc: granted { read write } for name="mmcblk0p13" dev=tmpfs ino=4518 scontext=u:r:vold:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file
08-08 17:15:16.906 168 168 W vold : type=1400 audit(0.0:29): avc: granted { read write open } for name="mmcblk0p13" dev=tmpfs ino=4518 scontext=u:r:vold:s0 tcontext=u:objaect_r:block_device:s0 tclass=blk_file
08-08 17:15:16.906 168 168 W vold : type=1400 audit(0.0:30): avc: granted { getattr } for path="/dev/block/mmcblk0p13" dev=tmpfs ino=4518 scontext=u:r:vold:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file
08-08 17:15:16.914 133 168 D Cryptfs : crypt_ftr->fs_size = 28397534
08-08 17:15:16.914 133 168 I Cryptfs : Using scrypt with keymaster for cryptfs KDF
08-08 17:15:19.047 133 168 I Cryptfs : keymaster module name is Keymaster TEE HAL
08-08 17:15:19.047 133 168 I Cryptfs : keymaster version is 3
08-08 17:15:19.047 133 168 I Cryptfs : Found keymaster0 module, using keymaster0 API.
08-08 17:15:19.048 133 168 I TEEKeyMaster: C_GetInfo cryptokiVer=2.20 manufID=Trusted Logic flags=0 libDesc=PKCS#11 libVer=3.0
08-08 17:15:19.049 133 168 I Cryptfs : Signing safely-padded object
08-08 17:15:19.049 133 168 V TEEKeyMaster: tee_sign_data(0xb6a901c0, 0xb683b528, 36, 0xb683b1d8, 256, 0xb683b174, 0xb683b178)
08-08 17:15:19.050 133 168 V TEEKeyMaster: Opening subsession 0xb6abf440
08-08 17:15:19.055 133 168 V TEEKeyMaster: Found 1 object 0x60011 : class 0x2
08-08 17:15:19.057 133 168 V TEEKeyMaster: Found 1 object 0x60021 : class 0x3
08-08 17:15:19.057 133 168 V TEEKeyMaster: public handle = 0x60011, private handle = 0x60021
08-08 17:15:19.138 133 168 V TEEKeyMaster: tee_sign_data(0xb6a901c0, 0xb683b528, 36, 0xb683b1d8, 256, 0xb683b174, 0xb683b178) => 0xb6a54800 size 256
08-08 17:15:19.138 133 168 V TEEKeyMaster: Closing object handle 0x60021
08-08 17:15:19.138 133 168 V TEEKeyMaster: Closing object handle 0x60011
08-08 17:15:19.138 133 168 V TEEKeyMaster: Closing subsession 0xb6abf440: 0x0
08-08 17:15:21.242 133 168 I Cryptfs : Enabling support for allow_discards in dmcrypt.
08-08 17:15:21.242 133 168 I Cryptfs : target_type = crypt
08-08 17:15:21.242 133 168 I Cryptfs : real_blk_name = /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata, extra_params = 1 allow_discards
08-08 17:15:21.245 133 165 D vold : Disk at 253:0 changed
08-08 17:15:23.333 133 168 I Cryptfs : Password matches
08-08 17:15:23.334 133 168 D Cryptfs : test_mount_encrypted_fs(): Master key saved
08-08 17:15:23.334 133 168 I Cryptfs : keymaster module name is Keymaster TEE HAL
08-08 17:15:23.334 133 168 I Cryptfs : keymaster version is 3
08-08 17:15:23.334 133 168 I Cryptfs : Found keymaster0 module, using keymaster0 API.
08-08 17:15:23.335 133 168 I TEEKeyMaster: C_GetInfo cryptokiVer=2.20 manufID=Trusted Logic flags=0 libDesc=PKCS#11 libVer=3.0
08-08 17:15:23.336 133 168 I Ext4Crypt: ext4 crypto complete called on /data
08-08 17:15:23.336 133 168 I Ext4Crypt: No master key, so not ext4enc

best is also with a dmesg combined... we forgot :silly:

In the end we needed to manually mount /data

mkdir /storage/foo
mount /dev/block/dm-0 /storage/foo/

to be able to push the data of internal storage to the linux host (current folder)

adb pull /storage/foo/media

...before we are going to find the reason for bootloop :cowboy:

EDIT:

The reason for the bootloop was the build-in privacy-guard (combined to use with GPS an a tour-app which called somehow UnifiedNlp and the GSM Location Service)! I could disable it by move to /data/system (right now mounted under /storage/foo/system) an rename the appops.xml file like this

cd /storage/foo/system
mv appops.xml appops.xml.off

Now just do a restart in adb and get rid of the bootloop

restart

Little more here (same problem with CM12 and privacy-guard): https://android.stackexchange.com/q...en-privacy-guard-from-shell?noredirect=1&lq=1