[Sony Xperia P, U, Sola, Go] ajcrowley:
Xperia P

I have Xperia P and I've started to make a mount.sh to enable MSC mode. Problem is that the script runs without errors but no drive letter in Windows.

From adb commands I see the internal SD is 'mmcblk0p14' device so I modified the block part of the script.

The functions file is not in the 'class' folder, if the usb debugging mode selected the 'functions' file in devices/virtual folder changing.

I'm not pro in Linux but I understand the logic of the script but something is wrong because it's not working.

Can somebody help?

Here are the script and the adb commands' output:

mount.sh

busybox echo 0 > /sys/devices/virtual/android_usb/android0/enable
busybox echo "mass_storage,adb" > /sys/devices/virtual/android_usb/android0/functions
busybox echo "/dev/block/mmcblk0p14" > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
busybox echo 1 > /sys/devices/virtual/android_usb/android0/enable

------------------------------------------------------------------------

adb shell df

Filesystem Size Used Free Blksize
/dev 400.6M 68.0K 400.5M 4096
/mnt/asec 400.6M 0.0K 400.6M 4096
/mnt/obb 400.6M 0.0K 400.6M 4096
/dev/shm 400.6M 20.0K 400.6M 4096
/system 1007.9M 518.7M 489.2M 4096
/data 2.0G 945.0M 1.0G 4096
/cache 246.1M 4.1M 241.9M 4096
/modemfs 2.8M 1.1M 1.7M 1024
/data/idd 7.5M 1.0M 6.4M 1024
/mnt/sdcard 11.3G 9.4G 1.8G 32768
/mnt/secure/asec: Permission denied
/mnt/asec/com.bigfishgames.google.advchronfull-1 14.2M 12.8M
384
/mnt/asec/com.glu.ewarriors2-1 62.0M 59.3M 2.6M 16384
/mnt/asec/com.android.aldiko-2 17.3M 15.6M 1.7M 16384

-------------------------------------------------------------------------
adb shell cat /proc/partitions

major minor #blocks name

7 0 14585 loop0
7 1 63473 loop1
7 2 17703 loop2
179 0 15267840 mmcblk0
179 1 1023 mmcblk0p1
179 2 512 mmcblk0p2
179 3 128 mmcblk0p3
179 4 1 mmcblk0p4
179 5 8192 mmcblk0p5
179 6 3072 mmcblk0p6
179 7 5120 mmcblk0p7
179 8 8192 mmcblk0p8
179 9 16384 mmcblk0p9
179 10 1048576 mmcblk0p10
179 11 2097152 mmcblk0p11
179 12 256000 mmcblk0p12
179 13 16384 mmcblk0p13
179 14 11806720 mmcblk0p14
179 64 2048 mmcblk0boot1
179 32 2048 mmcblk0boot0
254 0 14584 dm-0
254 1 63472 dm-1
254 2 17703 dm-2

-------------------------------------------------------------------------------------------

adb shell mount

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
tmpfs /dev/shm tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mmcblk0p10 /system ext4 ro,relatime,user_xattr,acl,barrier=1,data=ord
ered 0 0
/dev/block/mmcblk0p11 /data ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrier=
1,data=ordered,noauto_da_alloc 0 0
/dev/block/mmcblk0p12 /cache ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrier
=1,data=ordered 0 0
/dev/block/mmcblk0p6 /modemfs ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrie
r=1,data=ordered 0 0
/dev/block/mmcblk0p8 /data/idd ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barri
er=0,data=ordered 0 0
/dev/block/vold/179:14 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,
uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharse
t=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:14 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.bigfishgames.google.advchronfull-1 vfat ro,dirsync
,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=i
so8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1 /mnt/asec/com.glu.ewarriors2-1 vfat ro,dirsync,nosuid,nodev,rela
time,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname
=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-2 /mnt/asec/com.android.aldiko-2 vfat ro,dirsync,nosuid,nodev,rela
time,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname
=mixed,utf8,errors=remount-ro 0 0

----------------------------------------------------------------------------------------------------------------------------------------