New posts should go to Koush's CM6 thread. Mods, please close.

Status
Not open for further replies.

acidbath5546

Senior Member
Feb 17, 2009
1,193
38
0
@jermaine151
I know you are still relatively new to the community, but I think you showed that someone new can come into the community, make a great contribution and probably learn a ton along the way.
You really did a great job centralizing all CM6 ROM based info and I appreciated it.
Thanks very much.
It is great to see how people (noob or whatever) can make a solid contribution to the community without having to go the other route (rr or jdckipse or whatever his name is today).

So thanks and look forward to seeing you around!
Cheers.
 

jermaine151

Senior Member
Jun 19, 2010
4,237
3,690
0
Columbus, Ohio
@jermaine151
I know you are still relatively new to the community, but I think you showed that someone new can come into the community, make a great contribution and probably learn a ton along the way.
You really did a great job centralizing all CM6 ROM based info and I appreciated it.
Thanks very much.
It is great to see how people (noob or whatever) can make a solid contribution to the community without having to go the other route (rr or jdckipse or whatever his name is today).

So thanks and look forward to seeing you around!
Cheers.
AcidBath, you made my day! :) It was awesome being able to do something to help out others and learn in the process. I look forward to seeing you around too.
 
Last edited:

kmalyala

New member
Jun 25, 2007
3
0
0
Mount interal storage better

Sorry it's been a while, I've been fairly busy... However, thanks to the help of some several people on the forum including invisiblek (for discovering EMMC wasn't mounting) and vbhines (for discovering how to force a USB mount of SD) I got the internal storage working mostly... still some work to do on it, but it works thanks to them.

So... We know how to get EMMC to mount, but to have it mount automatically on boot we have to change a file. All we are doing is appending invisiblek's code to the "/system/bin/sysinit" file, which Koush kindly added an exec command for in his init.rc, this is nice because we don't have to unpack the boot.img and repack it to make this minor change....

SO!
1. boot into recovery and mount /system so we can make the change
2. run the following commands

Code:
adb shell
# echo "" >> /system/bin/sysinit
# echo mount /dev/block/mmcblk0p3 /emmc >> /system/bin/sysinit
reboot the phone, and done, emmc will automount on boot.

NOTE: make sure you use >> and not just > otherwise you will overwrite the sysinit file instead of adding to it.

now, you can mount the internal memory as a USB drive by using the following script with a program such as "gscript". You can download it free from the market, with it you can add the following lines to a new script, and make a shortcut on your desktop, this script will mount the internal memory card as a USB drive, run it again to unmount as a USB drive (safely remove from the computer first).

Code:
#!/system/bin/sh
#
####
## Mount & Dismount EMMC memory to USB Script
#
## -CaptainTaco
####

# Create a variable for testing whether drive is mounted or not
ismounted=`cat /sys/devices/platform/usb_mass_storage/lun0/file`

# Test ismounted for Null value, if null mount drive EMMC
# If not Null overwrite to Null (unmount EMMC)
if test -z $ismounted 
	then
		echo /dev/block/mmcblk0p3 > /sys/devices/platform/usb_mass_storage/lun0/file
	else
		echo "" > /sys/devices/platform/usb_mass_storage/lun0/file
fi
You do not need to type anything with a # before it.


Working on improving the methods if someone doesn't beat me to it. Enjoy...!

EDIT!: Sorry, I wrote this quickly and missed a work in the changing sysinit portion. The line should read

echo mount /dev/block/mmcblk0p3 /emmc >> /system/bin/sysinit

My apologies. I have updated the line in the post above.

--------------------------------------
I love the script but if change lun0 to lun1 then you will see both internal and external USB Mounted on your Computer

Code:
#!/system/bin/sh
#
####
## Mount & Dismount EMMC memory to USB Script
#
## -CaptainTaco
####

# Create a variable for testing whether drive is mounted or not
ismounted=`cat /sys/devices/platform/usb_mass_storage/lun0/file`

# Test ismounted for Null value, if null mount drive EMMC
# If not Null overwrite to Null (unmount EMMC)
if test -z $ismounted 
	then
		echo /dev/block/mmcblk0p3 > /sys/devices/platform/usb_mass_storage/lun1/file
	else
		echo "" > /sys/devices/platform/usb_mass_storage/lun1/file
fi
It shows up a F: - SDcard and G: - internal memory

Now how do I mount the System to read write?
 
Status
Not open for further replies.