[General Questions and Answers] geovido:
Hello,

I've gone through a lot of posts regarding editing the vold.fstab file in order to swap my internal storage with my sd card, however I am hitting a bit of a roadblock. My device is a Trimble T41 GPS unit running android 4.1.2 (AOSP). I have rooted it and can edit the vold.fstab file, but the internal storage portion is commented out with a note that it is being set in an init file. I'm not sure what I need to change in the init file in order to accomplish the same thing. Any ideas would be very helpful.

Thanks in advance.

Here are both for reference:

vold.fstab

# Internal SD card
# Handled by init.t41.rc now
# dev_mount emmc /mnt/emmc 2 /devices/platform/mmci-omap-hs.1/mmc_host/mmc1

# External SD card
dev_mount external_sdcard /storage/removable/external_sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0

dev_mount usbdrive0 /storage/removable/usbdrive0 auto /devices/platform/musb-omap2430/musb-hdrc.0/usb2/2-1

init.t41.rc

import init.t41.usb.rc

on early-init

export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/removable

# create mountpoints
mkdir /mnt 0775 system system

mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/removable
mkdir /storage/removable/external_sdcard 0000 system system
mkdir /storage/removable/usbdrive0 0000 system system

symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard0 /sdcard
symlink /storage/removable/external_sdcard /removeablesdcard

symlink /initlogo.rle.bak /initlogo.rle

mount debugfs dummy /sys/kernel/debug

on init

#for dsp use
insmod /system/ti-dsp/cmemk.ko "phys_start=0x84F00000 phys_end=0x85900000 allowOverlap=1 useHeapIfPoolUnavailable=1"
insmod /system/ti-dsp/dsplinkk.ko
insmod /system/ti-dsp/lpm_omap3530.ko
insmod /system/ti-dsp/sdmak.ko

#for ipv6 use
insmod /system/lib/modules/ipv6.ko
insmod /system/lib/modules/tunnel4.ko
insmod /system/lib/modules/sit.ko
insmod /system/lib/modules/xfrm6_mode_beet.ko
insmod /system/lib/modules/xfrm6_mode_tunnel.ko
insmod /system/lib/modules/xfrm6_mode_transport.ko

#Owners, Modes for Bluetooth
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 sys/class/rfkill/rfkill0/state
write /sys/class/rfkill/rfkill0/state 0

# ublox gps power setting
chown system system /sys/class/gpio/gpio160/value
chmod 0660 /sys/class/gpio/gpio160/value

# Enabling CPU Freq and CPU Idle
# set the governor to performace for 720P video decoding
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor performance
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

write /sys/kernel/debug/voltage/vdd_core/smartreflex/autocomp 1
write /sys/kernel/debug/voltage/vdd_mpu/smartreflex/autocomp 1
write /sys/kernel/debug/pm_debug/sleep_while_idle 0
write /sys/kernel/debug/pm_debug/enable_off_mode 1

# === Bluetooth UART ===
# Disable GPIO147 wakeenable bits (1<<14) to avoid abnormal wakeup
write /sys/devices/platform/omap/omap_uart.1/power/wakeup disabled
write /sys/devices/platform/omap/omap_uart.0/power/wakeup disabled
write /sys/devices/platform/omap/omap_uart.2/power/wakeup disabled
write /sys/devices/platform/omap/omap_uart.3/power/wakeup disabled

chown system system /sys/class/backlight/ortustech-dsi-panel/brightness
chmod 0600 /sys/class/backlight/ortustech-dsi-panel/brightness
chown system system /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0050/eeprom
chmod 0664 /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0050/eeprom
chown system system /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0051/eeprom
chmod 0664 /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0051/eeprom

# set permissions for flashlight/flash LED
chown media system /sys/class/leds/flashlight/brightness
chmod 664 /sys/class/leds/flashlight/brightness

# Change attribute and owner of Sensors sysfs for SensorService

# === Proximity Sensor ===
# prox0_raw_en: enable proximity and light sensor
# prox0_thresh_above_value: store and show proximity threshold
# prox0_reporting_mode: store and show for proximity continuous mode or single mode
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/prox0_raw_en
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/prox0_thresh_above_value
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/prox0_reporting_mode

# Adjust proximity threshold to trigger at about 5cm
write /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/prox0_thresh_above_value 480

# === Photometer Sensor ===
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_calibscale
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_calibscale_default
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_input_en
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_input
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_sensor_range
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_rate
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_rate_avail
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_thresh_above_value
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/lux0_thresh_below_value
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/power_state

# === Compass Sensor ===
# meas_conf: set measurement configuration for HMC5883L
# operating_mode: 0:continuous-mode / 1:single-mode / [2 or 3]:idle mode
# sampling_frequency: set_sampling_frequency (0.75/1.5/3/7.5/15/30/75) Hz
# magn_range: set range (0/1/2/3/4/5/6) (from +-0.88GA to +-5.6GA)
# samples_conf: set the number of samples per measurement (1/2/4/8)
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-001e/device0/meas_conf
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-001e/device0/operating_mode
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-001e/device0/sampling_frequency
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-001e/device0/poll_delay
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-001e/device0/magn_range
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-001e/device0/samples_conf

# === Acceleration Sensor ===
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/disable
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/calibrate
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/offsets
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/rate
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/poll_delay
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/autosleep
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/position

# disable accelerometer autosleep function to allow continuous readings
write /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0053/autosleep 0

# === LED Controls
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-000b/led_blink_ctrl
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-000b/led_blink_cfg

# External battery mode control
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-000b/ext_bat_mode

# === Echo Cancellation Controls ===
chmod 0664 /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0060/ec_mode
chown media system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0060/ec_mode

# === Modem controls ===
write /sys/class/gpio/export 41
write /sys/class/gpio/export 42
write /sys/class/gpio/gpio41/direction out
write /sys/class/gpio/gpio42/direction out
chown radio root /sys/class/gpio/gpio41/value
chown radio root /sys/class/gpio/gpio42/value

on fs

mount yaffs2 mtd@system /system
rm /vendor # remove the symlink created by AOSP's init.rc
mkdir /vendor 0771 system system
symlink /vendor /system/vendor

# create filesystems if necessary
exec /system/bin/setup_fs ext4:/dev/block/platform/mmci-omap-hs.1/by-num/p1
exec /system/bin/setup_fs ext4:/dev/block/platform/mmci-omap-hs.1/by-num/p2
exec /system/bin/setup_fs ext4:/dev/block/platform/mmci-omap-hs.1/by-num/p3

# mount /vendor
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-num/p2 /vendor wait nosuid nodev
chown system system /vendor
chown system system /vendor/app
exec /system/bin/chmod -R 755 /vendor/app
exec /system/bin/chmod -R 755 /vendor/bin

# mount /cache
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-num/p1 /cache wait nosuid nodev

# mount /data
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-num/p3 /data wait noatime nosuid nodev
chown system system /data

# run packout_init while /system is writable
exec /system/bin/packout_init

# make init.btaddr.sh executable
chmod 0554 /system/etc/init.btaddr.sh

mount yaffs2 mtd@system /system ro remount

on post-fs

# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount

on post-fs-data

mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp

mkdir /data/media
chown media_rw media_rw /data/media

setprop vold.post_fs_data_done 1
start sdcard

on branding
# set read-only branding properties
exec /system/bin/brandstr

on boot
# set fixed properties and hardware trigger information
exec "/system/xbin/baldr_init.sh"

service sdcard /system/bin/logwrapper /system/bin/sdcard /data/media 1023 1023
class late_start

service uevwatch /system/bin/uevwatch
class core
oneshot

on property:persist.service.bc2d.enable=1
start t41scand

on property:persist.service.bc2d.enable=0
stop t41scand

service t41scand /system/bin/t41scand -n
oneshot
disabled

service trigger_conf /system/bin/logwrapper /system/xbin/trigger_conf.sh
disabled
oneshot

service pvr /system/bin/sgx/rc.pvr start
class core
oneshot

service pppd_gprs /system/etc/ppp/init.gprs-pppd call gprs
user root
group system radio
disabled
oneshot

service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot

service iprenew_eth0 /system/bin/dhcpcd -n
class main
disabled
oneshot

# summit wifi

# create /system/etc/summit/bt_addr.conf
service driver-setup /system/bin/logwrapper /system/etc/init.btaddr.sh
class main
oneshot

service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot

service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
class main
disabled
oneshot

service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot

# summit bt
service hciattach /system/bin/brcm_patchram_plus --enable_lpm --enable_hci --baudrate 3000000 --patchram /system/etc/summit/BCM4329B1_002.002.023.0924.1032.hcd /dev/ttyO1
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot

service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot

service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot

# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugmailer.sh
class main
disabled
oneshot
keycodes 114 115 116

on property:persist.sys.led.enable=0
write /sys/class/i2c-dev/i2c-3/device/3-000b/led_mute_ctrl 1

on property:persist.sys.led.enable=1
write /sys/class/i2c-dev/i2c-3/device/3-000b/led_mute_ctrl 0

service rfidd /system/bin/logwrapper /system/xbin/rfidd_start.sh /dev/ttyO0
disabled
oneshot

on property:persist.service.rfid.enable=1
start rfidd
on property:persist.service.rfid.enable=0
stop rfidd