[Solved] MT6572 CM12.1 Fixing storage - Android Q&A, Help & Troubleshooting

Hello guys, i need some help fixing internal storage issues, in general. -- solved it, but i'd stiil love an explanation lol --
I mean, i need to understand what needs to be edited, and what options do i have (i want to know the differences)?
Internal as main, external mounted, sd, emulated storage, fused storage and what not..
Note: Please notice i am not asking the "hows", i know how to de/compile boot.img and framework-res succesfully.
I want to understand why some roms use my SD as "main" and my phone doesn't succesfully recognise the amount of space it has available, hence resulting in insuficient storage issues and/or broken app2sd.. and i want to be able to fix this - avoiding bootloops.
I also need to understand a flashable fix i found, and how to succesfully edit it to make it "fix" storage working internal as main, and sd as sd.. and/or leave it as is, but make it so i'd could move apps to my sd and not to external..
Gona get a bit more technical here, here are the main files (the ones that matter I THINK):
From the original App2SD fix i found:
-fstab.mt6572
Code:
#APP TO SD AND STORAGE FIX BY ADITYA KUMAR
# 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 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.0/mmc_host auto vfat defaults voldmanaged=sdcard0:7,noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto
-init.fuse.rc
Code:
# MTK project .rc configure
#APP TO SD AND STORAGE FIX BY ADITYA KUMAR
on post-fs-data
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
on init
# Catalog
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /mnt/media_rw/usbdisk0 0700 media_rw media_rw
mkdir /storage/sdcard1 0700 root root
mkdir /storage/sdcard0 0700 root root
mkdir /storage/usbdisk0 0700 root root
# Path
export EXTERNAL_STORAGE /storage/sdcard1
export USBOTG_STORAGE /storage/usbdisk0
export SECONDARY_STORAGE /storage/sdcard0:/storage/usbdisk0
# Links
symlink /storage/sdcard1 /sdcard
symlink /storage/sdcard1 /mnt/sdcard
symlink /storage/sdcard0 /mnt/sdcard2
symlink /storage/usbdisk0 /usbdisk0
symlink /storage/usbdisk0 /mnt/usbdisk0
on post-fs
mount rootfs rootfs / shared rec
mount tmpfs tmpfs /mnt/secure private rec
on fs
setprop ro.crypto.fuse_sdcard true
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled
service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/usbdisk0 /storage/usbdisk0
class late_start
disabled
-init.mt6572.rc
Code:
import init.mt6572.usb.rc
import init.modem.rc
import init.fuse.rc
on init
mkdir /protect_f 0771 system system
mkdir /protect_s 0771 system system
#Create CIP mount point
mkdir /custom
chown system graphics /dev/ion
chmod 0644 /dev/ion
....
So, its pretty clear mt6572.rc is cleared of all or most the storage related lines, and thus import init.fuse.rc..
Now, as a result here the rom storage "fused" between internal [1.3gb] and external [1gb] (both the device's storages end up active and working like a charm), and as an extra storage = the microSD [4gb]. - this is kind of not what i wanted since i've a total of 2.3gb for apps and data..
I've tried temperimg this files, switching numbers and whatnot, trying to "fix" it, as in, i need my microSD as external...
All my attempts did nothing, or ended up in a stuck boot.
Am i missing something? - All the times i edited the storage.xml from framework res i also ended up in bootloops (might need to try to edit that alone first?)
Here's the original storage.xml from the custom CM12.1 ported rom:
Note: i left this untouched after all.
Code:
<?xml version="1.0" encoding="utf-8"?>
<StorageList
xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:mountPoint="/storage/sdcard0" android:storageDescription="@string/storage_sd_card" android:primary="true" android:removable="false" android:allowMassStorage="true" />
<storage android:mountPoint="/storage/sdcard1" android:storageDescription="@string/storage_internal" android:primary="false" android:removable="true" android:allowMassStorage="true" />
<storage android:mountPoint="/storage/usbotg" android:storageDescription="@string/storage_usb" android:removable="true" />
</StorageList>
Ok, lets get to the workaround:
Custom CM12.1 stock fstab.mt6572
Code:
# 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.0/mmc_host/mmc0/mmc0 auto auto defaults voldmanaged=sdcard1:[COLOR="red"]8,nonremovable[/COLOR],noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host/mmc1/mmc1 auto auto defaults voldmanaged=sdcard0:auto
/devices/platform/mt_usb auto auto defaults voldmanaged=usbotg:auto
Edited "fixed" fstab.mt6572
Code:
# 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 [COLOR="red"]ro[/COLOR] 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.0/mmc_host/mmc0/mmc0 auto [COLOR="red"]vfat[/COLOR] defaults voldmanaged=sdcard1:[COLOR="red"]7[/COLOR],noemulatedsd
/devices/platform/mtk-msdc.1/mmc_host/mmc1/mmc1 auto [COLOR="red"]vfat[/COLOR] defaults voldmanaged=sdcard0:auto
/devices/platform/mt_usb auto auto defaults voldmanaged=usbotg:auto
Custom CM12.1 stock init.mt6572.rc
Code:
import init.mt6572.usb.rc
import init.modem.rc
on init
mkdir /protect_f 0771 system system
mkdir /protect_s 0771 system system
#Create CIP mount point
mkdir /custom
export LD_PRELOAD /system/lib/libxlog.so
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage/sdcard0 0700 root root
mkdir /storage/sdcard1 0700 root root
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /mnt/sdcard2
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
[...]
on fs
write /proc/bootprof "INIT:eMMC:Mount_START"
mount_all /fstab.mt6572
[...]
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -l /data/media /storage/sdcard1
class late_start
service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk0 /storage/usbdisk0
class late_start
disabled
Edited "fixed" init.mt6572.rc
Code:
import init.mt6572.usb.rc
import init.modem.rc
on init
mkdir /protect_f 0771 system system
mkdir /protect_s 0771 system system
#Create CIP mount point
mkdir /custom
export LD_PRELOAD /system/lib/libxlog.so
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage/sdcard0 0700 root root
mkdir /storage/sdcard1 0700 root root
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /mnt/sdcard2
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
[...]
on fs
write /proc/bootprof "INIT:eMMC:Mount_START"
mount_all /fstab.mt6572
[COLOR="red"] setprop ro.crypto.fuse_sdcard true[/COLOR]
[...]
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -l /data/media /storage/sdcard1
class late_start
[COLOR="Red"]disabled[/COLOR]
service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk0 /storage/usbdisk0
class late_start
disabled
------------------------
I've noticed some custom roms give errors in the "labels" of the storages, resulting in weird symbolic names, showing "$%1 $%2 ..." instead of "Sd card".. i'd like to know why this happens.
------------------------
Here's the fix app2sd patch i've been working on: no its not mine ofc.. the original link is broken i'll give my up. (its ported for a y221 rom)
https://mega.nz/#!BVAF1RKD!4vInEgeSQ2MNE8uqoUymft6NoBCoJq2MdVcz39oPJyo
Here's the custom rom [cm12.1] i'm working on:
https://www.youtube.com/watch?v=T67oNdeW5Yc&lc
Here's MY fix:
https://mega.nz/#!Jd5TiA4T!gjz3w5Fo1d0P1re8XBFW5YfvhGb5tQpJs7N2R5tc1lw
I'm patient and willing to read.
Please point me to tutorials and whatnot. Altho keep in mind i've read some already. Like this one here.
Ty in advance.
Found some reading here:
https://source.android.com/devices/storage/config-example.html

It took me so much time to fix this without help. All but google and old guides. None of which explains how the parameters work.
And sincerely if anyone asks me how i fixed it, i wouldn't know!
I'm not a dev. Just workarounded it like a champ.
Funny, i once tried changing ONLY this parameter:
Code:
service sdcard /system/bin/sdcard -u 1023 -g 1023 -[COLOR="Red"]l[/COLOR] /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
YEA THAT "L", i swapped it for a -d like the one line that comes after it, and put that -l on that line.
As a result my SD storage swapped for the external.... who knows what i did? i dont.. lol
ANYWWAAAYYYYS I FIXED IT FYEAAAHH!

Rderasta said:
It took me so much time to fix this without help. All but google and old guides. None of which explains how the parameters work.
And sincerely if anyone asks me how i fixed it, i wouldn't know!
I'm not a dev. Just workarounded it like a champ.
Funny, i once tried changing ONLY this parameter:
Code:
service sdcard /system/bin/sdcard -u 1023 -g 1023 -[COLOR="Red"]l[/COLOR] /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
YEA THAT "L", i swapped it for a -d like the one line that comes after it, and put that -l on that line.
As a result my SD storage swapped for the external.... who knows what i did? i dont.. lol
ANYWWAAAYYYYS I FIXED IT FYEAAAHH!
Click to expand...
Click to collapse
wherw to find those line? I need to fix mine too

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] user-storage paths vary? (Android, TWRP, CWMR)

Cheers all,
I'm in the process of documenting some android file system stuff, and I noticed that Android, CWM, and TWRP are somewhat inconsistent when it comes to the paths of user-storage.
Comparing their mount stats leads me to believe that
1) the storage destination is a device-block mapped to a path-name, which occurs during boot.
2) the path-name is defined by the author of the firmware?
^^ are these assumptions anywhere near correct?
booted into android
internal & external user-storage are located at /storage/sdcard0 & /storage/sdcard1
Code:
mount
/dev/block/vold/179:9 /mnt/media_rw/sdcard1 fuseblk rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/259:3 /mnt/media_rw/sdcard0 fuseblk rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/block/vold/259:3 /mnt/secure/asec fuseblk rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
[email protected]:/ #
booted into CWMR
internal & external user-storage are located at /storage/sdcard0 & /storage/sdcard1
Code:
mount
/dev/block/vold/259:3 on /storage/sdcard0 type fuseblk (rw,dirsync,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/block/vold/179:9 on /storage/sdcard1 type fuseblk (rw,dirsync,nosuid,nodev,noexec,noatime,user_id=0,group_id=0,allow_other,blksize=4096)
~ #
booted into TWRP
internal & external user-storage are located at /emmc & /sdcard
Code:
mount
/dev/block/mmcblk0p11 on /emmc type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=131072,blksize=4096)
/dev/block/mmcblk0p11 on /and-sec type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=131072,blksize=4096)
/dev/block/mmcblk1p1 on /sdcard type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=131072,blksize=4096)

[Q] Can't write to /sdcard or /extSdCard

Hi,
For some reason none of my apps on my phone work because they can't write to /sdcard:
Code:
[email protected]:/ # cd /sdcard/
[email protected]:/sdcard # mkdir test
mkdir failed for test, Permission denied
Code:
[email protected]:/ # ls -l sdcard
lrwxrwxrwx root root 2015-01-02 17:53 sdcard -> /storage/sdcard0
/sdcard seems to be a symlink to /storage/sdcard0, which is not writable. However, when I go to /mnt/media_rw/sdcard0 I can write to the card:
Code:
[email protected]:/sdcard # cd /mnt/media_rw/sdcard0/
[email protected]:/mnt/media_rw/sdcard0 # mkdir test
[email protected]:/mnt/media_rw/sdcard0 #
Here are the permissions
Code:
[email protected]:/storage # ls -l
drwxrwx--x root sdcard_r 2015-01-02 21:32 sdcard0
drwxrwx--x root sdcard_r 2015-01-02 16:55 sdcard1
drwxrwx--- root root 2015-01-02 17:53 usbdisk0
Code:
root[email protected]:/mnt/media_rw # ls -l
drwxr-xr-x root root 2015-01-02 21:32 sdcard0
drwxr-xr-x root root 2015-01-02 16:55 sdcard1
drwx------ media_rw media_rw 2015-01-02 17:53 usbdisk0
[email protected]:/mnt/media_rw #
Is it normal that /storage/sdcard0 is not writable ?
Is there a way to maybe recreate the symlink to /mnt/media_rw/sdcard0 ?
Or are there any other ways I should solve this ?

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 ...

I want to mount mmcblkp02 instead of mtdblock3 as /data (low internal storage problem

So it's nothing new, but solutions like "Link2SD", "Folder Mount" seems to don't work.
When I install for example AcrobatReader, Link2SD tells me that about 100% is linked, but still internal storage was decreased about 20MB-30MB - so I think that doesn't work.
I make some tryings on my own, broke system on my phone, upload another, make another tryings and got some reboots etc...
I want to move whole data partition to SD. Maybe someone know ready to use ROM which have that? Maybe it's very bad idea, but why?
Here is some details about phone:
Xperia Neo V, cm-10-20131006-NIGHTLY-haida (but I'm not relevant to it), unlocked bootloader.
(I cant post pictures....)
mount
Code:
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
none /acct cgroup rw,relatime,cpuacct 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
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mtdblock0 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock3 /data yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mmcblk0p2 /data/sdext2 ext2 rw,relatime,errors=continue 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,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
/dev/block/vold/179:1 /mnt/secure/asec 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
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
df
Code:
Filesystem Size Used Free Blksize
/dev 179.4M 48K 179.4M 4096
/mnt/asec 179.4M 0K 179.4M 4096
/mnt/obb 179.4M 0K 179.4M 4096
/system 400M 360.6M 39.4M 4096
/data 420M 132.1M 287.9M 4096
/cache 101.5M 73.7M 27.8M 4096
/data/sdext2 1.4G 135.5M 1.3G 4096
/storage/sdcard0 377.2M 93.9M 283.3M 4096
/mnt/secure/asec 377.2M 93.9M 283.3M 4096
mtd
Code:
dev: size erasesize name
mtd0: 19000000 00020000 "system"
mtd1: 00600000 00020000 "appslog"
mtd2: 06580000 00020000 "cache"
mtd3: 1a400000 00020000 "userdata"
vold.fstab
Code:
## Vold 2.0 fstab for Mogami
#
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount sdcard /storage/sdcard0 auto /devices/platform/msm_sdcc.4/mmc_host/mmc1
init.rc
Code:
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.${ro.hardware}.rc
import /init.usb.rc
import /init.trace.rc
on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_adj -16
start ueventd
# create mountpoints
mkdir /mnt 0775 root system
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0771 system cache
mkdir /config 0500 root root
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/kernel/kptr_restrict 2
write /proc/sys/kernel/dmesg_restrict 1
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0660 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
write /dev/cpuctl/cpu.rt_runtime_us 950000
write /dev/cpuctl/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/apps
chown system system /dev/cpuctl/apps/tasks
chmod 0666 /dev/cpuctl/apps/tasks
write /dev/cpuctl/apps/cpu.shares 1024
write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
write /dev/cpuctl/apps/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/apps/bg_non_interactive
chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
chmod 0666 /dev/cpuctl/apps/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
# This is needed by any process that uses socket tagging.
chmod 0644 /dev/xt_qtaguid
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 [email protected] /system
mount yaffs2 [email protected] /system ro remount
mount yaffs2 [email protected] /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0771 /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create the lost+found directories, so as to enforce our permissions
mkdir /cache/lost+found 0770 root root
on post-fs-data
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/keychain 0771 system system
mkdir /data/misc/vpn 0770 system vpn
mkdir /data/misc/systemkeys 0700 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0751 root root
# For security reasons, /data/local/tmp should always be empty.
# Do not place files or directories in /data/local/tmp
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app-asec 0700 root root
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
mkdir /data/ssh 0750 root shell
mkdir /data/ssh/empty 0700 root root
mkdir /data/radio 0770 radio radio
# create dalvik-cache and double-check the perms, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create resource-cache and double-check the perms
mkdir /data/resource-cache 0771 system system
chown system system /data/resource-cache
chmod 0771 /data/resource-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770 root root
# create directory for DRM plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/drm 0770 drm drm
# If there is no fs-post-data action in the init.<device>.rc file, you
# must uncomment this line, otherwise encrypted filesystems
# won't work.
# Set indication (checked by vold) that we have finished this action
#setprop vold.post_fs_data_done 1
# Include extra init file
import /init.cm.rc
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
chown root system /sys/module/lowmemorykiller/parameters/adj
chmod 0664 /sys/module/lowmemorykiller/parameters/adj
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/power/state
chown system system /sys/power/wakeup_count
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
# Assume SMP uses shared cpufreq policy for all CPUs
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.lte 4096,87380,1220608,4096,16384,563200
setprop net.tcp.buffersize.umts 4096,87380,563200,4096,16384,110208
setprop net.tcp.buffersize.hspa 4096,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.hsupa 4096,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.hsdpa 4096,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.hspap 4096,87380,1220608,4096,16384,393216
setprop net.tcp.buffersize.edge 4096,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4096,8760,11680,4096,8760,11680
setprop net.tcp.buffersize.evdo 4096,87380,563200,4096,16384,262144
setprop net.tcp.buffersize.evdo_b 4096,87380,704512,4096,16384,262144
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0
# Run sysinit
exec /system/bin/sysinit
class_start core
class_start main
on nonencrypted
class_start late_start
on charger
class_start charger
on property:vold.decrypt=trigger_reset_main
class_reset main
on property:vold.decrypt=trigger_load_persist_props
load_persist_props
on property:vold.decrypt=trigger_post_fs_data
trigger post-fs-data
on property:vold.decrypt=trigger_restart_min_framework
class_start main
on property:vold.decrypt=trigger_restart_framework
class_start main
class_start late_start
on property:vold.decrypt=trigger_shutdown_framework
class_reset late_start
class_reset main
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
class core
critical
service console /system/bin/sh
class core
console
disabled
user shell
group log
on property:ro.debuggable=1
start console
# adbd is controlled via property triggers in init.<platform>.usb.rc
service adbd /sbin/adbd
class core
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
onrestart restart zygote
onrestart restart media
onrestart restart surfaceflinger
onrestart restart drm
service vold /system/bin/vold
class core
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
socket mdns stream 0660 root system
service debuggerd /system/bin/debuggerd
class main
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_r sdcard_rw qcom_oncrpc qcom_diag log
service surfaceflinger /system/bin/surfaceflinger
class main
user system
group graphics
onrestart restart zygote
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
class main
socket zygote stream 660 root system
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
service drm /system/bin/drmserver
class main
user drm
group drm system inet drmrpc sdcard_r
service media /system/bin/mediaserver
class main
user media
group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc qcom_diag
ioprio rt 4
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
class main
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
class main
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service installd /system/bin/installd
class main
socket installd stream 600 system system
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
# IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
class main
user keystore
group keystore drmrpc
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
class main
socket dumpstate stream 0660 shell log
disabled
oneshot
service sshd /system/bin/start-ssh
class main
disabled
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
When I mount mmcblkp02 as /data "overwriting" existing one, there was much more free space in "storage" and in built-in application manager (bar at bottom of the screen), but most of apps crashes, or moment after that phone reboots.
Code:
mount -t ext2 -o rw,nosuid,nodev /dev/block/mmcblk0p2 /data
Also when I cd /data I was only seeing data from sd, and there wasn't data from internal memory. I try to copy internal data to sd cp /data/* /cache/jarek [jarek=mmcblk0p2 mount point]. but it still doesn't work after manual mount.
I read some posts and it's appear that I must change init.rc, which is overwrite on every shutdown, so to do that I need unpack recovery (boot.img), edit and repack, then upload. But than what? Probably there will problem with app's data that was in internal storage... ?
Questions:
1. is there any ready for use ROM with this feature?
2. is someone do something like this? is this work?
3. maybe it can't work and I shouldn't lose few more days on it, so tell me why? (technically only, I know I can just go buy new phone)
4. maybe I can extend existing /data with mmcblk0p2 instead swap this?
Jarek

Categories

Resources