Malformed recovery.fstab line - Android Q&A, Help & Troubleshooting

I'm getting this error while doing mka -j8 bacon:
Code:
File "/home/tanujboy/android/cyanogenmod-12.1/build/tools/releasetools/common.py", line 259, in LoadRecoveryFSTab
raise ValueError("malformed recovery.fstab line: \"%s\"" % (line,))
ValueError: malformed recovery.fstab line: "/dev/block/mmcblk0p22 /system ext4"
build/core/Makefile:1498: recipe for target '/home/tanujboy/android/cyanogenmod-12.1/out/target/product/black/obj/PACKAGING/target_files_intermediates/cm_black-target_files-5fb2ce1c7f.zip' failed
make: *** [/home/tanujboy/android/cyanogenmod-12.1/out/target/product/black/obj/PACKAGING/target_files_intermediates/cm_black-target_files-5fb2ce1c7f.zip] Error 1
make: Leaving directory '/home/tanujboy/android/cyanogenmod-12.1'
Can someone help me out and tell me how to fix this?
This is my recovery.fstab BTW:
Code:
# Android fstab file.
# 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
/dev/block/mmcblk0p29 /data ext4
/dev/block/mmcblk0p23 /cache ext4
/dev/block/mmcblk0p24 /persist ext4
/dev/block/mmcblk0p20 /boot emmc
/dev/block/mmcblk0p21 /recovery emmc
/dev/block/mmcblk0p25 /misc emmc
/dev/block/mmcblk1p1 /dev/block/mmcblk1 /external_sd vfat flags=display="Micro SDcard";storage;wipeingui;removable
/dev/block/sda1 /dev/block/sda /usb-otg vfat flags=removable;storage;display=USB-OTG

See this: https://github.com/CyanogenMod/android_build/blob/cm-12.1/tools/releasetools/common.py#L222
Try this:
Code:
/dev/block/mmcblk0p22 /system ext4 ro,barrier=1

Related

[Q] Cyanogenmod 10.2 encryption and emmc

Hi, I was using cyanogenmod 10.1 with encryption. After I updated to 10.2 nigthly build, the camera app says that could not access storage, f-droid stopped to work and every other app had the same problem.
I read a lot of topics here and did this:
- Flashed new CMW,
- Flashed new rom (cm 10.1, android 4.2.1);
- Tried other sd card;
- In CMW tried to mount & format emmc (error)
It still doesn't recognize my internal sd. And now I don't know what to do... :crying:
Here's my fstab
Code:
[email protected]:/ # cat fstab.smdk4210
cat fstab.smdk4210
# 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
# data partition must be located at the bottom for supporting device encryption
/dev/block/mmcblk0p9 /system ext4 ro,noatime wait
/dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p1 /efs ext4 noatime,nosuid,nodev,journal_async_commit,errors=panic wait,check_spo
/dev/block/mmcblk0p10 /data ext4 noatime,nosuid,nodev,discard,noauto_da_alloc,journal_async_commit,errors=panic wait,check_spo,encryptable=/efs/metadata
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0 /storage/sdcard0 auto defaults voldmanaged=sdcard0:11,nonremovable
/devices/platform/s3c-sdhci.2/mmc_host/mmc1 /storage/sdcard1 auto defaults voldmanaged=sdcard1:auto
/devices/platform/s3c_otghcd/usb /storage/usbdisk0 auto defaults voldmanaged=usbdisk0:auto
# recovery
/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly
/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly
/dev/block/mmcblk0p11 /emmc auto defaults recoveryonly
/dev/block/mmcblk1p1 /sdcard auto defaults recoveryonly
Code:
[email protected]:/ # cat fstab.goldfish
cat fstab.goldfish
# 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/mtdblock0 /system ext4 ro,barrier=1 wait
/dev/block/mtdblock1 /data ext4 noatime,nosuid,nodev,barrier=1,nomblk_io_submit wait,check
/dev/block/mtdblock2 /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
/devices/platform/goldfish_mmc.0 /storage/sdcard vfat defaults voldmanaged=sdcard:auto
[email protected]:/ #
Code:
[email protected]:/ # df
df
Filesystem Size Used Free Blksize
/dev 395.3M 48.0K 395.2M 4096
/storage 395.3M 0.0K 395.3M 4096
/mnt/secure 395.3M 0.0K 395.3M 4096
/mnt/asec 395.3M 0.0K 395.3M 4096
/mnt/obb 395.3M 0.0K 395.3M 4096
/mnt/fuse 395.3M 0.0K 395.3M 4096
/system 503.9M 287.4M 216.5M 4096
/cache 98.4M 53.5M 44.9M 4096
/efs 19.7M 8.2M 11.5M 4096
/data 2.0G 41.6M 1.9G 4096
/preload 503.9M 8.4M 495.6M 4096
/storage/sdcard1 14.6G 1.2G 13.4G 8192

[Q] need help of building cwm

Starting recovery on Sat Mar 22 16:04:31 2014
framebuffer: fd 4 (720 x 1280)
CWM-based Recovery v6.0.3.7
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p16 (null) 0
2 /cache ext4 /dev/block/mmcblk0p18 (null) 0
3 /data ext4 /dev/block/mmcblk0p21 (null) -16384
4 /recovery emmc /dev/block/mmcblk0p13 (null) 0
5 /misc emmc /dev/block/mmcblk0p11 (null) 0
6 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 0
7 /system ext4 /dev/block/mmcblk0p17 (null) 0
8 /sys_boot vfat /dev/block/mmcblk0p3 (null) 0
9 /FOTA emmc /dev/block/mmcblk0p19 (null) 0
10 /sdcard vfat /dev/block/mmcblk0p20 (null) 0
11 /sdcard1 vfat /dev/block/mmcblk0p20 (null) 0
12 /persist ext4 /dev/block/mmcblk0p15 (null) 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
W:Unable to get recovery.fstab info for /external_sd during fstab generation!
I:Completed outputting fstab.
Irocessing arguments.
I:Checking arguments.
Warning: No file_contexts
Warning: No file_contexts
I:device_recovery_start()
Command: "/sbin/recovery"
abrove are some code . i do not know where to modify anybody can give me some adverse it might be great

Error Update Rom ZTE V955 HELP PLIS

Hi,
this is recovery.log
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
No files found.
No files found.
I:Can't partition unsafe device: /dev/block/mmcblk1p1
RenorainChile said:
Hi,
this is recovery.log
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
No files found.
No files found.
I:Can't partition unsafe device: /dev/block/mmcblk1p1
Click to expand...
Click to collapse
Other dat error's
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /qcsblhd_cfgdata emmc /dev/block/mmcblk0p1 (null) 0
2 /qcsbl emmc /dev/block/mmcblk0p2 (null) 0
3 /amss emmc /dev/block/mmcblk0p3 (null) 0
4 /oemsbl emmc /dev/block/mmcblk0p5 (null) 0
5 /emmcboot emmc /dev/block/mmcblk0p6 (null) 0
6 /ssd emmc /dev/block/mmcblk0p7 (null) 0
7 /boot emmc /dev/block/mmcblk0p8 (null) 0
8 /cefs1 emmc /dev/block/mmcblk0p10 (null) 0
9 /cefs2 emmc /dev/block/mmcblk0p11 (null) 0
10 /system ext4 /dev/block/mmcblk0p12 (null) 0
11 /data ext4 /dev/block/mmcblk0p13 (null) 0
12 /persist ext4 /dev/block/mmcblk0p14 (null) 0
13 /cache ext4 /dev/block/mmcblk0p15 (null) 0
14 /recovery emmc /dev/block/mmcblk0p16 (null) 0
15 /misc emmc /dev/block/mmcblk0p17 (null) 0
16 /FOTA emmc /dev/block/mmcblk0p18 (null) 0
17 /splash emmc /dev/block/mmcblk0p19 (null) 0
18 /sdcard2 vfat /dev/block/mmcblk0p20 (null) 0
19 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!

Stuck at boot logo

This is odd: switched phone on this morning and it was stuck at the boot logo. I did a bit of digging around and it looks like the internal memory is corrupt because it is refusing to mount /data or /system.
I am ok doing a kies or odin recovery but before i do it would be nice (not essential) to recover some data. I can get into download and recovery and have tried to mount them manually but it didn't work.
Before I go for the full reset, an ideas on mounting /data?
cheers
m
ps. "boot" not "boo"!
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/dev/block/mmcblk0p8 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,data=ordered)
ls /dev/block
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
mmcblk0
mmcblk0p1
mmcblk0p10
mmcblk0p11
mmcblk0p12
mmcblk0p2
mmcblk0p3
mmcblk0p4
mmcblk0p5
mmcblk0p6
mmcblk0p7
mmcblk0p8
mmcblk0p9
platform
ram0
ram1
ram10
ram11
ram12
ram13
ram14
ram15
ram2
ram3
ram4
ram5
ram6
ram7
ram8
ram9
cat fstab
/dev/block/mmcblk0p3 /efs ext4 rw
/dev/block/mmcblk0p8 /cache ext4 rw
/dev/block/mmcblk0p9 /system ext4 rw
/dev/block/mmcblk0p12 /data ext4 rw
/dev/block/mmcblk0p10 /preload ext4 rw
/external_sd vfat rw
/usb-otg vfat rw
mount -a
mount: mounting /dev/block/mmcblk0p3 on /efs failed: Invalid argument
mount: mounting /dev/block/mmcblk0p9 on /system failed: Invalid argument
mount: mounting /dev/block/mmcblk0p12 on /data failed: Invalid argument
mount: mounting /external_sd on vfat failed: No such file or directory
mount: mounting /usb-otg on vfat failed: No such file or directory
mount -o rw,remount /dev/block/mmcblk0p12 /data
mount: mounting /dev/block/mmcblk0p12 on /data failed: Invalid argument
mount -t ext4 -o rw,remount /dev/block/mmcblk0p12 /data
mount: mounting /dev/block/mmcblk0p12 on /data failed: Invalid argument
mount -t ext4 -o rw /dev/block/mmcblk0p12 /data
mount: mounting /dev/block/mmcblk0p12 on /data failed: Invalid argument
Try this: http://forum.xda-developers.com/showpost.php?p=30087735&postcount=6
Already have plenty of emergency firmwares as per OP - just wondering if it's possible to mount the partitions some other way. However, no worries: gave up and just reloaded one using odin. worked fine.

how to mount sdcard0 in /data/media to separate the system storage of storage of user

I have a Mlais M9 ( MT6592(M) )
The Max device space is 8GB, but 4GB is free to my uses...
the stock rom (4.4.2)shows 4GB of max space, free and empty. But in custom roms...
In Custom Roms,(CM 12.1 Port Unofficial) i have 1.97GB free to use.
That i do?
I see the diferences!
I installed here the stock rom to see differences between Stock rom mount store and custom rom mount store
the stock mounts
Stock:
Internal Storage: 1.97Gb
External Storage (SDCard): 8GB
Phone Storage: 4GB
Custom Rom:
Internal Storage: 1.97Gb
External Storage (SDCard): 8GB
see? the custom rom not mount the phone storage, only Internal Storage i able to manage.
that i do to mount the Phone Storage in custom rom?
the fstab stock and custom rom fstab in boot.img
It's my fstab file in stock rom:
# 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
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,encryptable=footer
/[email protected]_f /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check
/[email protected]_s /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check
/devices/platform/mtk-msdc.0/mmc_host auto vfat defaults voldmanaged=sdcard0:[email protected],noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
Click to expand...
Click to collapse
and fstab from custom rom:
# 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
/[email protected] /system ext4 ro,commit=1,noauto_da_alloc wait
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected] /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected]_f /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected]_s /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/devices/platform/mtk-msdc.1/mmc_host auto auto defaults voldmanaged=sdcard1:auto
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
Click to expand...
Click to collapse
I'm trying to mount: /devices/platform/mtk-msdc.0/mmc_host auto vfat defaults voldmanaged=sdcard0:[email protected],noemulatedsd in fstab of custom rom boot.img.
but isn't mounting... and now?
Understand the problem...
The android rom (stock) is 4.4.2 and my custom rom is (CM12) 5.1.1.
The "Device Configuration" page in AOSP i found this:
[...]
Android 4.3 and later:
For Android releases 4.3 and later, the various fstab files used by init, vold and recovery were unified in the /fstab.<device> file.
[...]
[...]
Android 5.x and earlier:
The device-specific storage_list.xml configuration file, typically provided through a frameworks/base overlay, defines the attributes and constraints of storage devices. The <StorageList> element contains one or more <storage> elements, exactly one of which should be marked primary.
[...]
Click to expand...
Click to collapse
So, i trying edit fstab in boot.img but i can't mount phone storage. I need edit /framework/framework-res.apk/res/xml/storage_list.xml too...
The problem is the my framework-res.apk. I picked storage.list from stock rom to storage.list of port framework-res.apk
the used method is open the winrar to open both framework-res.apk and extract the storage_list.xml and compress to custom framework-res.apk but the android not boot up...
i method is correct? i see anywhere do decompile and compile again...
I recompile the framework-res.apk/storage_list.xml but i can't boot the device.
Using logcat i got the fatal error:
[...]
--------- beginning of crash
E/AndroidRuntime( 612): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
E/AndroidRuntime( 612): java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.server.wm.WindowManagerService.showBootMessage(java.lang.CharSequence, boolean)' on a null object reference
E/AndroidRuntime( 612): at com.android.server.am.ActivityManagerService.showBootMessage(ActivityManagerService.java:6292)
E/AndroidRuntime( 612): at com.android.server.SystemServer.startOtherServices(SystemServer.java:617)
E/AndroidRuntime( 612): at com.android.server.SystemServer.run(SystemServer.java:285)
E/AndroidRuntime( 612): at com.android.server.SystemServer.main(SystemServer.java:186)
E/AndroidRuntime( 612): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 612): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 612): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime( 612): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
E/AndroidRuntime( 612): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:115)
E/installd( 168): eof
E/installd( 168): failed to read size
[...]
Click to expand...
Click to collapse
i only edit the storage_list.xml...
with WPRP recovery log...
with WPRP log i can see the storages, directory, and they sizes:
[...]
Partition Logs:
[...]
/data | /dev/block/mmcblk0p8 | Size: 2015MB Used: 34MB Free: 1980MB Backup Size: 34MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset Wipe_Available_in_GUI IsPresent Can_Encrypt_Backup Use_Userdata_Encryption
Primary_Block_Device: /dev/block/mmcblk0p8
Display_Name: Data
Storage_Name: Data
Backup_Path: /data
Backup_Name: data
Backup_Display_Name: Data
Storage_Path: /data
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
/emmc | /dev/block/mmcblk0p9 | Size: 4210MB Used: 0MB Free: 4210MB Backup Size: 0MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_Available_in_GUI IsPresent Has_Android_Secure Is_Storage Is_Settings_Storage
Symlink_Path: /emmc/.android_secure
Symlink_Mount_Point: /and-sec
Primary_Block_Device: /dev/block/mmcblk0p9
Display_Name: emmc
Storage_Name: emmc
Backup_Path: /and-sec
Backup_Name: and-sec
Backup_Display_Name: Android Secure
Storage_Path: /emmc
Current_File_System: vfat
Fstab_File_System: vfat
Backup_Method: files
/sdcard | /dev/block/mmcblk1p1 | Size: 7577MB Used: 2689MB Free: 4887MB Backup Size: 2689MB
Flags: Can_Be_Mounted Can_Be_Wiped Wipe_Available_in_GUI Removable IsPresent Is_Storage
Primary_Block_Device: /dev/block/mmcblk1p1
Alternate_Block_Device: /dev/block/mmcblk1
Display_Name: sdcard
Storage_Name: sdcard
Backup_Path: /sdcard
Backup_Name: sdcard
Backup_Display_Name: sdcard
Storage_Path: /sdcard
Current_File_System: vfat
Fstab_File_System: auto
Backup_Method: files
[...]
Click to expand...
Click to collapse
see this log i can discover the:
1.97GB System Storage -> /data | /dev/block/mmcblk0p8 | Size: 2015MB Used: 34MB Free: 1980MB Backup Size: 34MB
4.00GB Phone Storage -> /emmc | /dev/block/mmcblk0p9 | Size: 4210MB Used: 0MB Free: 4210MB Backup Size: 0MB
and now... how to mount /emmc as Phone Storage and set is default???
the fstab and emulated sdcard0
Is my fstab from stock:
# 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
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,encryptable=footer
/[email protected]_f /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check
/[email protected]_s /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check
/devices/platform/mtk-msdc.0/mmc_host auto ext4 noatime,nosuid,nodev,noauto_da_alloc voldmanaged=sdcard0:[email protected],noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
Click to expand...
Click to collapse
this [email protected] point to /emmc storage (4GB).
the: /devices/platform/mtk-msdc.0/mmc_host auto ext4 noatime,nosuid,nodev,noauto_da_alloc voldmanaged=sdcard0:[email protected],noemulatedsd isn't working...
the question now is:
how to make the above string working in other method??
my stock rom not have emulated storage, the sdcard internal is /mnt/media_rw/sdcard0
but in custom rom i have emulated storages, the sdcard internal is /mnt/shell
anyone can help to make [email protected] as default media storage??
Resolved!
I have suffering with configs, bricks and loops (with few support, here not, nothing) until i found the correct strings to finally workaround the problem.
I just added tiny changes in each of these files:
boot.img/fstab.hardware.rc:
before:
# 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
/[email protected] /system ext4 ro,commit=1,noauto_da_alloc wait
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected] /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected]_f /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected]_s /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
Click to expand...
Click to collapse
Now:
# 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
/[email protected] /system ext4 ro,commit=1,noauto_da_alloc wait
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected] /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected]_f /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected]_s /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/[email protected] /mnt/shell/emulated vfat defaults defaults
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
Click to expand...
Click to collapse
boot.img/init.hardware.rc:
before:
[...]
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class late_start
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled
service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
class late_start
disabled
Click to expand...
Click to collapse
Now:
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class late_start
disabled
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled
service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
class late_start
disabled
Click to expand...
Click to collapse
system/framework/framework-res.apk/res/xml/storage_list.xml
Before:
<?xml version="1.0" encoding="utf-8"?>
<StorageList
xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:storageDescription="@string/storage_internal" androidrimary="true" android:emulated="true" android:mtpReserve="400" />
<storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:removable="true" />
<storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
</StorageList>
Click to expand...
Click to collapse
Now:
<?xml version="1.0" encoding="utf-8"?>
<StorageList
xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:storageDescription="@string/storage_internal" android:emulated="true" android:mtpReserve="400" />
<storage android:mountPoint="/data/media" androidrimary="true" android:storageDescription="@string/storage_phone" android:removable="true" />
<storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_sd_card" android:removable="true" />
<storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
</StorageList>
Click to expand...
Click to collapse
and system/framework/framework-res.apk/res/values/strings.xml:
In this file, i just added this line above </resources>:
<resources>
[...]
<string name="storage_phone">Phone Storage</string>
</resources>
Click to expand...
Click to collapse
with these lines i can recompile the framework-res.apk that identificate the storage_phone as Phone Storage
good now it's all right. The sdcard0 is now mounted in "/data/media" and the internal memory on the computer is pointed at the sdcard0 (4GB) and the system will use /data (2GB) to apps,files, etc.
only regret the lack of support ...
I hope more cooperation the next time ...

Categories

Resources