mercredi 19 mars 2014

[Q] Mounting internal memory in recovery topic




I successfully ported TWRP for my OT-6012X with almost all functions working but i have one problem. TWRP need /emmc (internal memory to store settings, etc) but I am unable to find method to mount internal memory because my device have no dedicated partition for internal memory but uses folder on of mmcblk0p8 (/data/media/) instead.

My NAND is EMMC and here are device emulators from android:

dev_mount sdcard /storage/sdcard0 emmc@fat /devices/platform/goldfish_mmc.0 /devices/platform/mtk-msdc.0/mmc_host
dev_mount sdcard2 /storage/sdcard1 auto /devices/platform/goldfish_mmc.1 /devices/platform/mtk-msdc.1/mmc_host

But in recovery all I could mount is here, you will spot there is no any emulated drives :(


Code:


drwxr-xr-x    3 root    root          280 Mar 19 19:40 .
drwxr-xr-x    4 root    root            80 Mar 19 19:40 ..
drwxr-xr-x    2 root    root          200 Mar 19 19:40 by-num
lrwxrwxrwx    1 root    root            18 Mar 19 19:40 mmcblk0 -> /dev/block/mmcblk0
lrwxrwxrwx    1 root    root            23 Mar 19 19:40 mmcblk0boot0 -> /dev/block/mmcblk0boot0
lrwxrwxrwx    1 root    root            23 Mar 19 19:40 mmcblk0boot1 -> /dev/block/mmcblk0boot1
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p1 -> /dev/block/mmcblk0p1
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p2 -> /dev/block/mmcblk0p2
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p3 -> /dev/block/mmcblk0p3
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p4 -> /dev/block/mmcblk0p4
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p5 -> /dev/block/mmcblk0p5
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p6 -> /dev/block/mmcblk0p6
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p7 -> /dev/block/mmcblk0p7
lrwxrwxrwx    1 root    root            20 Mar 19 19:40 mmcblk0p8 -> /dev/block/mmcblk0p8


Here is an idea: How about to create some script which will mount /data and create symlink /emmc -> /data/media/ just to get rid of error messages from TWRP which appears each time TWRP start (while trying to load/save config, etc...)

Question: How can i create script which will start automatic as TWRP load to mount and create that symbolic link? Is there any trick like init.d or so? Can i put my code in init.rc? Any suggestions?





Aucun commentaire:

Enregistrer un commentaire