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

since 2 weeks i try to get root together with encryption (Settings > Security > encrypt Phone ) running.

But i allready get stuck at the encryption :(

While testing several CustomROMs (see below) , i was (somewhere in between) able to encrypt OmniROM. (I don't no why it worked neither why it doesnot works anymore.)

Recoverys it used * TWRP 2.8.7.0 from golden-guy

* TWRP 2.8.0.0 from Novafusion

* TWRP 2.8.7.3 from Android-andi

Custom ROMs I used * SlimKAT 4.4.4 from Android-Andi

* CM12.1 from Novafusion

* CM 11.0 from Novafusion

* RR1 5.1.1 from Novafusion

* OmniROM 5.1.1 from golden-guy

(erverything in the latest version. (Date today 21. May .2016)

ATM I am not able to encrypt any of the above ROMs :(

The last 2 days i followed the instructions from android-andis thread :

http://xdaforums.com/showthread.php?t=2548257

android-andis Instructions (date: 22 May 2016)

Backup all important stuff! We need to format the device!

Make sure using latest TWRP

Wipe -> Advanced Wipe:

Cache

Dalvic

System

Data

Wipe -> Format Data -> Type yes to confirm

This is the most important step! It will keep some space for the footer! Without that encryption is not possible!

Flash Rom

Reboot

Set a Pin for Lockscreen

Encrypt your device

Point by Point severaly times. (Just to make clear: Yes, I did "Format Data" and typed yes to perform it.)

It just didn't work.

----------------------------------------------------------------------------------------

Here are some Infos from the last try with the combination of:

TWRP 2.7.8.3 from android-andi &

SlimKAT 4.4.4 from android-andi April 2016 release

just in case someone needs it. The heimdall print of the PIT.

Heimdall v1.4.1

Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna

This software is provided free of charge. Copying and redistribution is

encouraged.

...

Entry Count: 25

Unknown 1: 1598902083

Unknown 2: 844251476

Unknown 3: 28519

Unknown 4: 25708

Unknown 5: 28261

Unknown 6: 0

Unknown 7: 0

Unknown 8: 0

--- Entry #0 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 1

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 0

Partition Block Count: 256

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: MBR,GPT

Flash Filename:

FOTA Filename:

--- Entry #1 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 2

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 256

Partition Block Count: 768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: MasterTOC

Flash Filename: STE_boot.bin

FOTA Filename:

--- Entry #2 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 70

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 1024

Partition Block Count: 2048

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: PIT

Flash Filename: goldenxx.pit

FOTA Filename:

--- Entry #3 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 71

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 6144

Partition Block Count: 2048

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: MD5HDR

Flash Filename: md5.img

FOTA Filename:

--- Entry #4 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 3

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 8192

Partition Block Count: 1024

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: STEboot1

Flash Filename: STE_boot1.img

FOTA Filename:

--- Entry #5 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 4

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 9216

Partition Block Count: 1024

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: STEboot2

Flash Filename: STE_boot2.img

FOTA Filename:

--- Entry #6 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 5

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 10240

Partition Block Count: 1024

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: Dnt

Flash Filename: dnt.ssw

FOTA Filename:

--- Entry #7 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 6

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 11264

Partition Block Count: 1024

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: reserved

Flash Filename:

FOTA Filename:

--- Entry #8 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 7

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 16384

Partition Block Count: 2048

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: CSPSAFS

Flash Filename: cspsa.img

FOTA Filename:

--- Entry #9 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 8

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 18432

Partition Block Count: 2048

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: CSPSAFS2

Flash Filename: cspsa2.img

FOTA Filename:

--- Entry #10 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 9

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 20480

Partition Block Count: 32768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: EFS

Flash Filename: EFS.img

FOTA Filename:

--- Entry #11 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 10

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 53248

Partition Block Count: 32768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: ModemFS

Flash Filename: modemfs.img

FOTA Filename:

--- Entry #12 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 11

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 86016

Partition Block Count: 32768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: ModemFS2

Flash Filename: modemfs2.img

FOTA Filename:

--- Entry #13 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 12

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 118784

Partition Block Count: 102400

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: Fota

Flash Filename: ssgtest.img

FOTA Filename:

--- Entry #14 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 13

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 380928

Partition Block Count: 128

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: IPL Modem

Flash Filename: ipl.bin

FOTA Filename:

--- Entry #15 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 14

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 385024

Partition Block Count: 28672

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: Modem

Flash Filename: modem.bin

FOTA Filename:

--- Entry #16 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 15

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 417792

Partition Block Count: 4096

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: Loke4

Flash Filename: normal.bin

FOTA Filename:

--- Entry #17 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 16

Attributes: 2 (STL Read-Only)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 421888

Partition Block Count: 4096

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: 2ndLoke4

Flash Filename: normal2.bin

FOTA Filename:

--- Entry #18 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 17

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 425984

Partition Block Count: 32768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: PARAM

Flash Filename: param.lfs

FOTA Filename:

--- Entry #19 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 18

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 458752

Partition Block Count: 32768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: Kernel

Flash Filename: boot.img

FOTA Filename:

--- Entry #20 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 19

Attributes: 5 (Read/Write)

Update Attributes: 1 (FOTA)

Partition Block Size/Offset: 491520

Partition Block Count: 32768

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: Kernel2

Flash Filename: recovery.img

FOTA Filename:

--- Entry #21 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 20

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 524288

Partition Block Count: 2457600

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: SYSTEM

Flash Filename: system.img

FOTA Filename:

--- Entry #22 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 21

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 2981888

Partition Block Count: 1720320

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: CACHEFS

Flash Filename: cache.img

FOTA Filename:

--- Entry #23 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 22

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 4702208

Partition Block Count: 655360

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: HIDDEN

Flash Filename: hidden.img

FOTA Filename:

--- Entry #24 ---

Binary Type: 0 (AP)

Device Type: 2 (MMC)

Identifier: 23

Attributes: 5 (Read/Write)

Update Attributes: 5 (FOTA)

Partition Block Size/Offset: 5357568

Partition Block Count: 0

File Offset (Obsolete): 0

File Size (Obsolete): 0

Partition Name: DATAFS

Flash Filename: userdata.img

FOTA Filename: remained

And also the output of fdisk /dev/block/mmcblk0 (taken while adb into recovery)

# fdisk -ul /dev/block/mmcblk0

Found valid GPT with protective MBR; using GPT

Disk /dev/block/mmcblk0: 15269888 sectors, 3360M

Logical sector size: 512

Disk identifier (GUID): 52444e41-494f-2044-4d4d-43204449534b

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 15269854

Number Start (sector) End (sector) Size Code Name

2 256 1023 384K 0700 MasterTOC

3 1024 3071 1024K 0700 PIT

4 6144 8191 1024K 0700 MD5HDR

5 8192 9215 512K 0700 STEboot1

6 9216 10239 512K 0700 STEboot2

7 10240 11263 512K 0700 Dnt

8 11264 12287 512K 0700 reserved

9 16384 18431 1024K 0700 CSPSAFS

10 18432 20479 1024K 0700 CSPSAFS2

11 20480 53247 16.0M 0700 EFS

12 53248 86015 16.0M 0700 ModemFS

13 86016 118783 16.0M 0700 ModemFS2

14 118784 221183 50.0M 0700 Fota

15 380928 381055 65536 0700 IPL Modem

16 385024 413695 14.0M 0700 Modem

17 417792 421887 2048K 0700 Loke4

18 421888 425983 2048K 0700 2ndLoke4

19 425984 458751 16.0M 0700 PARAM

20 458752 491519 16.0M 0700 Kernel

21 491520 524287 16.0M 0700 Kernel2

22 524288 2981887 1200M 0700 SYSTEM

23 2981888 4702207 840M 0700 CACHEFS

24 4702208 5357567 320M 0700 HIDDEN

25 5357568 15269854 4839M 0700 DATAFS

cat fstab.samsunggolden from recovery:

# Android fstab file.

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>

# The filesystem that contains the filesystem checker binary (typically /system) cannot

# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/mmcblk0p22 /system ext4 ro,noatime,errors=panic wait

/dev/block/mmcblk0p12 /modemfs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check

/dev/block/mmcblk0p23 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check

/dev/block/mmcblk0p23 /cache f2fs nodiratime,noatime,nosuid,nodev,discard,background_gc=off,inline_xattr,active_logs=2 wait

/dev/block/mmcblk0p11 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check

# data partition must be located at the bottom for supporting device encryption

/dev/block/mmcblk0p25 /data ext4 noatime,nosuid,nodev,discard,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer

/dev/block/mmcblk0p25 /data f2fs nodiratime,noatime,nosuid,nodev,discard,background_gc=off,inline_xattr,active_logs=2 wait,encryptable=footer

# Vold managed volumes (External SDCard)

/devices/sdi0/mmc_host/mmc1/mmc1*	auto vfat defaults wait,voldmanaged=sdcard1:auto,noemulatedsd

# Recovery

/dev/block/mmcblk0p20	/boot	emmc	defaults	recoveryonly

/dev/block/mmcblk0p21	/recovery	emmc	defaults	recoveryonly

Trying encryption (Settings > Security > encrypt Phone) the adb logcat presented:

E/Cryptfs ( 1687): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.

-----------------------------------------------------------------------------------------------------------------

Here are some Infos from the last try with the combination of:

TWRP 2.7.8.0 from golden-guy &

OmniROM 5.1.1 from golden-guy (20160505 release)

cat fstab.samsunggolden from recovery:

# Android fstab file.

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>

# The filesystem that contains the filesystem checker binary (typically /system) cannot

# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/mmcblk0p22 /system ext4 ro,noatime,errors=panic wait

/dev/block/mmcblk0p12 /modemfs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check

/dev/block/mmcblk0p23 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check

/dev/block/mmcblk0p11 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check

# data partition must be located at the bottom for supporting device encryption

/dev/block/mmcblk0p25 /data ext4 noatime,nosuid,nodev,discard,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer

# Vold managed volumes (External SDCard)

/devices/sdi0/mmc_host/mmc1/mmc1*	auto vfat defaults wait,voldmanaged=sdcard1:auto,noemulatedsd

# Recovery

/dev/block/mmcblk0p20	/boot	emmc	defaults	recoveryonly

/dev/block/mmcblk0p21	/recovery	emmc	defaults	recoveryonly

/dev/block/mmcblk0p22 /system	ext4	defaults	recoveryonly

/dev/block/mmcblk0p23 /cache	ext4	defaults	recoveryonly

/dev/block/mmcblk0p25 /data	ext4	defaults	recoveryonly

/dev/block/mmcblk0p11 /efs	ext4	defaults	recoveryonly

When trying encryption (Settings > Security > encrypt Phone) the adb logcat presented:

E/Cryptfs ( 1686): Bad magic for real block device /dev/block/mmcblk0p25

E/Cryptfs ( 1686): Orig filesystem overlaps crypto footer region. Cannot encrypt in place.

--------------------------------------------

I am willing to serve further Information if needed, or for example to:

* resize the /dev/block/mmcblk0p25 via adb or

* change the PIT via "PIT Magic" / "EFS Professional"

if someone is going to guide me.

If the adb solution needs the parted command, please direct me to a recovery which got it.

I couldn't find any :(

Just found some obscure Download-Links for parted to put it barehand into /system . But i an not willing to use this.

Any help is welcome.

Greeting