[Galaxy S III Mini Q&A, Help & Troubleshooting] NowWired:
Hello Everybody !

I managed to encrypt from Settings :D :victory:

I "just" resized (shrinked) the /data partition a little bit.

To Perform this i used the TWRP 2.8.7.3 version from Android-Andi

because it was the one which got all the commands i needed for it.

@ android-andi (would it make sense to change the TWRP setup, so that his tweak is done automatically ?)

at least some people semmed to have similar Problems like me.

I did a adb root / adb shell into the Recovery and followed a Tipp from over Here:

http://android.stackexchange.com/questions/117405/how-do-you-encrypt-your-device-running-cyanogenmod-12-1

Just because the www is sometimes full of dead ends i post the Instructions here, as I used them on MY device.

So i changed them a little bit from the originalpost.

If you wanna try something similar you should NOT just copy & paste the Commands.

Make shure which "/dev/block/..." is your /data partition

In Linux i did: (don't know what do to in Windows, sorry)

$ adb root

$ adb shell

within the adb Shell YOU should

~ # mount | grep data

to find the actual block device of the data partition.

For ME it is /dev/block/mmcblk0p25

so i did the following:

~ # umount /data

& i had also to do

~ # umount /sdcard

~ # e2fsck -f /dev/block/mmcblk0p25

everything was fine otherwise i could do e2fsck -f -p /dev/block/mmcblk0p25 to repair the stuff

~ # tune2fs -l /dev/block/mmcblk0p25 to obtain the "Block count" from the output.

~ # tune2fs -l /dev/block/mmcblk0p25

tune2fs 1.42.9 (28-Dec-2013)

Filesystem volume name: <none>

Last mounted on: /data

Filesystem UUID: 57f8f4bc-abf4-655f-bf67-946fc0f9f25b

Filesystem magic number: 0xEF53

Filesystem revision #: 1 (dynamic)

Filesystem features: has_journal ext_attr resize_inode filetype extent sparse_super large_file uninit_bg

Filesystem flags: unsigned_directory_hash

Default mount options: (none)

Filesystem state: clean

Errors behavior: Remount read-only

Filesystem OS type: Linux

Inode count: 310080

Block count: 1239035

Reserved block count: 0

Free blocks: 1174719

Free inodes: 309535

First block: 0

Block size: 4096

Fragment size: 4096

Reserved GDT blocks: 303

Blocks per group: 32768

Fragments per group: 32768

Inodes per group: 8160

Inode blocks per group: 510

__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!

__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!

__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!

Last mount time: Tue Jan 3 14:00:32 2012

Last write time: Tue Jan 3 14:05:19 2012

Mount count: 0

Maximum mount count: -1

Last checked: Tue Jan 3 14:05:19 2012

Check interval: 0 (<none>)

Lifetime writes: 213 MB

Reserved blocks uid: 0 (user root)

Reserved blocks gid: 0 (group root)

First inode: 11

Inode size:	256

Required extra isize: 28

Desired extra isize: 28

Journal inode: 8

Default directory hash: tea

Journal backup: inode blocks

For me it was : 1239035

~ # resize2fs /dev/block/mmcblk0p25 1239015 , i.e. substract a sufficient amount like 20 from the original block count. As far as i read 8 should be the exact amonunt. But I am not fighting for the last Byte.

~ # resize2fs /dev/block/mmcblk0p25 1239015

resize2fs 1.42.9 (28-Dec-2013)

Resizing the filesystem on /dev/block/mmcblk0p25 to 1239015 (4k) blocks.

The filesystem on /dev/block/mmcblk0p25 is now 1239015 blocks long.

to check if everything is okay:

~ # e2fsck -f -p /dev/block/mmcblk0p25 found a minor problem which got fixed :)

~ # e2fsck -f -p /dev/block/mmcblk0p25

/dev/block/mmcblk0p25: Inode 7, i_size is 1270947840, should be 1275146240. FIXED.

/dev/block/mmcblk0p25: 545/310080 files (8.3% non-contiguous), 64316/1239015 blocks

After that i just did a reboot into recovery.

I Just wiped dalvic, system, cache & DATA ( NO FORMAT TO MESS THINGS UP AGAIN !!!)

Then I flashed SlimKAT 4.4.4. from Android-Andi April 2016 build.

Rebooted into System.

In System in Settings > Interface > Lockscreen i set up PIN

Than in Settings > Security > encrypt Phone EVERYTHING went fine. Finally after a couple of weeks !!

adb Logcat "tells" now:

D/Cryptfs ( 1686): Just asked init to shut down class main

D/Cryptfs ( 1686): unmounting /mnt/shell/emulated succeeded

D/Cryptfs ( 1686): unmounting /data/data succeeded

D/Cryptfs ( 1686): unmounting /data succeeded

D/Cryptfs ( 1686): Just triggered post_fs_data

D/Cryptfs ( 1686): post_fs_data done

D/Cryptfs ( 1686): Just triggered restart_min_framework

E/Cryptfs ( 1686): Crypt_ftr version doesn't support persistent data

I/Cryptfs ( 1686): Enabling support for allow_discards in dmcrypt.

E/Cryptfs ( 1686): Encrypting filesystem in place...

After first root app installation (root browser) the system did a crash.

Since thea i installed 3 more root apps. so far (about since an hour) the system is running stable.

Greetings

P.S.

I Suppose this trick should at least work with any KiTKat ROM.....

I gonna try Lollipop , but not tonight ....