[Galaxy S II General] ftr:
Thanks for your help i just tried your build from my patch suggestion but it not enough. It skips again sdcard0 encrypt. It seems to be more complicated than fstab edit. :(

If it can help :

Log after encrypt failed:

logcat | grep sdcard0
D/Vold ( 1832): Volume sdcard0 state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 1832): Volume sdcard0 state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 1832): Volume sdcard0 state changing 2 (Pending) -> 1 (Idle-Unmounted)
D/MountService( 2189): got storage path: /storage/sdcard0 description: Internal storage primary: true removable: fa
se emulated: false mtpReserve: 0 allowMassStorage: true maxFileSize: 0
D/MountService( 2189): addVolumeLocked() StorageVolume [mStorageId=0 mPath=/storage/sdcard0 mDescriptionId=17040770
mPrimary=true mRemovable=false mEmulated=false mMtpReserveSpace=0 mAllowMassStorage=true mMaxFileSize=0 mOwner=null

D/MountService( 2189): volume state changed for /storage/sdcard0 (null -> unmounted)
D/MountService( 2822): got storage path: /storage/sdcard0 description: M├®moire de stockage interne primary: true r
movable: false emulated: false mtpReserve: 0 allowMassStorage: true maxFileSize: 0
D/MountService( 2822): addVolumeLocked() StorageVolume [mStorageId=0 mPath=/storage/sdcard0 mDescriptionId=17040770
mPrimary=true mRemovable=false mEmulated=false mMtpReserveSpace=0 mAllowMassStorage=true mMaxFileSize=0 mOwner=null

D/MountService( 2822): volume state changed for /storage/sdcard0 (null -> unmounted)
I/Vold ( 1832): /dev/block/vold/259:3 being considered for volume sdcard0
D/Vold ( 1832): Volume sdcard0 state changing 1 (Idle-Unmounted) -> 3 (Checking)
D/MountService( 2822): volume state changed for /storage/sdcard0 (unmounted -> checking)
D/MountService( 2822): sendStorageIntent Intent { act=android.intent.action.MEDIA_CHECKING dat=file:///storage/sdca
d0 (has extras) } to UserHandle{-1}
I/Vold ( 1832): Device /dev/block/vold/259:3, target /storage/sdcard0 mounted @ /mnt/secure/staging
D/Vold ( 1832): Volume sdcard0 state changing 3 (Checking) -> 4 (Mounted)
D/MountService( 2822): volume state changed for /storage/sdcard0 (checking -> mounted)
D/MountService( 2822): sendStorageIntent Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///storage/sdcar
0 (has extras) } to UserHandle{-1}
E/VoldConnector( 2822): NDC Command {3 volume mount /storage/sdcard0} took too long (1040ms)
D/MediaScannerReceiver( 3079): action: android.intent.action.MEDIA_MOUNTED path: /storage/sdcard0
W/MediaScanner( 3079): Error opening directory '/storage/sdcard0/.android_secure/', skipping: Permission denied.
W/MediaScanner( 3079): Error opening directory '/storage/sdcard0/.android_secure/', skipping: Permission denied.
D/MtpService( 3079): addStorageLocked 65537 /storage/sdcard0
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Android) returned 0
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Podcasts) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/DCIM) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Ringtones) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Movies) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Alarms) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Music) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Notifications) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Pictures) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Download) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/LOST.DIR) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/clockworkmod) returned 16384
I/DefContainer-JNI( 4360): error opening: /storage/sdcard0/.android_secure: Permission denied
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/.android_secure) returned 0
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/log) returned 180224
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Android) returned 0
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Podcasts) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/DCIM) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Ringtones) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Movies) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Alarms) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Music) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Notifications) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Pictures) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/Download) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/LOST.DIR) returned 8192
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/clockworkmod) returned 16384
I/DefContainer-JNI( 4360): error opening: /storage/sdcard0/.android_secure: Permission denied
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/.android_secure) returned 0
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0/log) returned 180224
D/StorageMeasurement( 4220): getDirectorySize(/storage/sdcard0) returned 331776
D/MtpService( 3079): addStorageLocked 65537 /storage/sdcard0
D/MtpService( 3079): addStorageLocked 65537 /storage/sdcard0

mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,seclabel,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,seclabel,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p9 /system ext4 ro,seclabel,noatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_co
mmit,data=ordered 0 0
/dev/block/mmcblk0p1 /efs ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_comm
it,data=ordered 0 0
/dev/block/mmcblk0p12 /preload ext4 rw,seclabel,nosuid,nodev,noatime,user_xattr,barrier=1,journal_async_commit,data=
ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/dm-0 /data ext4 rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,d
ata=ordered,noauto_da_alloc,discard 0 0
/dev/block/vold/259:3 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dma
sk=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/259:3 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dma
sk=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,seclabel,relatime,size=0k,mode=000 0 0

---------- Post added at 09:48 AM ---------- Previous post was at 09:41 AM ----------

I add also a success encrypt but cm 10.1

mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /storage tmpfs rw,relatime,mode=050,gid=1028 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p9 /system ext4 ro,noatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data
=ordered 0 0
/dev/block/mmcblk0p1 /efs ext4 rw,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=o
rdered 0 0
/dev/block/mmcblk0p12 /preload ext4 ro,nosuid,nodev,noatime,user_xattr,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/dm-0 /data ext4 rw,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=order
ed,noauto_da_alloc,discard 0 0
/dev/block/vold/254:1 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dma
sk=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/254:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dma
sk=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0