[Oppo Find 5] LkyX:
Hi,

i changed the partition layout by switching sdcard <-> userdata and use reserve2 partition as metadata.

I also changed some stuff in partition configs/storage xml and init files to provide the same experience as nexus 4/7 with an emulate sdcard.

I used this patch: hydra.lky.cc/mirror/oppo/partition1.patch <- URL can't post right now :/

Build and booting works fine and the 2 GB "sdcard1" was mounted ok, but the emulation failed an there is no storage device.

root@android:/ # 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

/dev/block/mmcblk0p19 /system ext4 ro,noatime,noauto_da_alloc,data=ordered 0 0

/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,noatime,noauto_da_alloc,data=ordered 0 0

/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,noatime,noauto_da_alloc,data=ordered 0 0

debugfs /sys/kernel/debug debugfs rw,relatime 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/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,noatime,noauto_da_alloc,data=ordered 0 0

/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,noatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0

tmpfs /data/qcks tmpfs rw,relatime,size=20480k,mode=750,gid=1000 0 0

/dev/block/vold/179:29 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

Looks like this service won't start:

# virtual sdcard daemon running as media_rw (1023)

service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023

class late_start

If i run this command by hand after starting it shows:

service: Unknown command sdcard

But on my Nexus 7 this also don't work. But i can run sdcard /data/media /mnt/shell/emulated 1023 1023 by hand and this shows up in mount and df shows the right size:

/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

But i'm not able to use it. Can anyone help me on this?

old layout

Model: MMC 032G94 (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 8389kB 98.0MB 89.6MB fat16 modem
2 101MB 101MB 131kB sbl1
3 109MB 109MB 262kB sbl2
4 117MB 118MB 524kB sbl3
5 126MB 126MB 524kB rpm
6 134MB 135MB 524kB tz
7 143MB 143MB 1024B pad
8 151MB 154MB 3146kB modemst1
9 159MB 163MB 3146kB modemst2
10 168MB 171MB 3146kB oppodycnvbk
11 176MB 179MB 3146kB oppostanvbk
12 185MB 185MB 799kB m9kefs1
13 193MB 194MB 799kB m9kefs2
14 201MB 202MB 799kB m9kefs3
15 210MB 210MB 8192B DDR
16 218MB 218MB 1024B m9kefsc
17 226MB 228MB 1049kB aboot
18 235MB 245MB 10.5MB boot
19 252MB 1325MB 1074MB ext4 system
20 1325MB 3473MB 2147MB ext4 userdata
21 3473MB 3481MB 8389kB ext4 persist
22 3481MB 4018MB 537MB ext4 cache
23 4018MB 4019MB 1049kB misc
24 4027MB 4037MB 10.5MB recovery
25 4043MB 4077MB 33.6MB reserve1
26 4077MB 4085MB 8389kB reserve2
27 4085MB 4094MB 8389kB reserve3
28 4094MB 4127MB 33.6MB reserve4
29 4127MB 31.3GB 27.1GB fat32 sdcard

new layout

Model: MMC 032G94 (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 8389kB 98.0MB 89.6MB fat16 modem
2 101MB 101MB 131kB sbl1
3 109MB 109MB 262kB sbl2
4 117MB 118MB 524kB sbl3
5 126MB 126MB 524kB rpm
6 134MB 135MB 524kB tz
7 143MB 143MB 1024B pad
8 151MB 154MB 3146kB modemst1
9 159MB 163MB 3146kB modemst2
10 168MB 171MB 3146kB oppodycnvbk
11 176MB 179MB 3146kB oppostanvbk
12 185MB 185MB 799kB m9kefs1
13 193MB 194MB 799kB m9kefs2
14 201MB 202MB 799kB m9kefs3
15 210MB 210MB 8192B DDR
16 218MB 218MB 1024B m9kefsc
17 226MB 228MB 1049kB aboot
18 235MB 245MB 10.5MB boot
19 252MB 1325MB 1074MB ext4 system
29 1325MB 3473MB 2147MB fat32 sdcard
21 3473MB 3481MB 8389kB ext4 persist
22 3481MB 4018MB 537MB ext4 cache
23 4018MB 4019MB 1049kB misc
24 4027MB 4037MB 10.5MB recovery
25 4043MB 4077MB 33.6MB reserve1
26 4077MB 4085MB 8389kB ext4 metadata
27 4085MB 4094MB 8389kB reserve3
28 4094MB 4127MB 33.6MB reserve4
20 4127MB 31.3GB 27.1GB ext4 userdata