[Android Builders Collective] pritam dutta:
You can join My fb group and post questions :: FACEBOOK

Hi gyzz today i will tell you how to fix storage bugs

But first you have to know about this :: Read it care fully

There are two type of storage:confused:

1. One is emulated :angel:
2. Second is non-emulated storage :angel:

! First question is that :: How can i under stand which is emulated and which is non-emulated

Examples

EMULATED STORAGE

# MTK project .rc configure

on post-fs-data
#
# SHARED_SDCARD related directory & configuration (begin)
#

# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media

#
# SHARED_SDCARD related directory & configuration (end)
#

on init
# See storage config details at http://source.android.com/tech/storage/
# fix non-shell uid process can not access shared-sd
mkdir /mnt/shell 0700 shell shell
chmod 0750 /mnt/shell
chown shell sdcard_r /mnt/shell
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /mnt/shell/emulated/0 0700 shell shell
mkdir /storage/emulated 0555 root root

mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /storage/sdcard1 0700 root root

#Path
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated

mount tmpfs tmpfs /storage/emulated mode=0755,uid=1023,gid=1023

# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /mnt/shell/emulated/0 /storage/emulated/0
symlink /storage/sdcard1 /mnt/sdcard2

on fs
setprop ro.crypto.fuse_sdcard true

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

NON-EMULATED STORAGE

# MTK project .rc configure

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/sdcard0
export USBOTG_STORAGE /storage/usbdisk0
export SECONDARY_STORAGE /storage/sdcard1

# Links
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /mnt/sdcard2
symlink /storage/usbdisk0 /usbdisk0
symlink /storage/usbdisk0 /mnt/usbdisk0

on fs
mount_all /fstab.mt6582
setprop ro.crypto.fuse_sdcard true

service sdcard /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start

service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /data/media /storage/sdcard0
class late_start

service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /storage/sdcard0 /mnt/media_rw/sdcard0
class late_start

service fuse_usbdisk0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/usbdisk0 /storage/usbdisk0
class late_start

Now all type of problem solution

If internal or SD card not showing

Look at the build.prop and look for one line

ro.mtk_shared_sdcard=1

If not present then pest it and now reboot

COPY THOSE FILES FROM STOCK ROM

system/bin/vold
system/bin/sdcard
system/bin/pq
system/bin/ipod

And make a patch USING THIS PROCESS :: HERE

AND FLASH IR

DO NOT CHANGE THE

system/bin/vold

NOW THE PROCESS BEING TOUGH AND NEED SOME BRAIN AND LOT OF PATIENCE TO SOLVE

GO WITH ME STEP BY STEP

READ IT

1. IDENTIFY THE STORAGE TYPE EMULATED OR NON-EMULATED:fingers-crossed:

2. AFTER IDENTIFY THE STORAGE TYPE NOW TAKE SOME TIME AND COMPARE ALL THE LINES WITH THE EXAMPLE SCRIPT I GIVEN ABOVE

3.NOW COMPARE THE fastab.mt**** OF PORT BOOT.IMG WITH THE fastab.mt**** WITH THE STOCK BOOT.IMG

:rolleyes:IF YOU NEED MORE HELP YOU CAN POST IN MY FB GROUP OR COMMENT BELLOW:cool: