5,601,223 Members 54,562 Now Online
XDA Developers Android and Mobile Development Forum

android 4.2.1 mass storage enable

Tip us?
 
picatrixgm
Old
#1  
Junior Member - OP
Thanks Meter 1
Posts: 15
Join Date: Oct 2012
Default android 4.2.1 mass storage enable

does anyone know of any mod or rom that support usb mass storage connection?
 
xcom923
Old
#2  
Senior Member
Thanks Meter 7
Posts: 215
Join Date: Jul 2007
Location: Raleigh
What do you mean? Android has natively supported that for a long while
Rom: DamageControl 3.2.2.1
Radio:-whatever the current one is-
Location: Raleigh, NC
 
berndblb
Old
#3  
berndblb's Avatar
Senior Member
Thanks Meter 612
Posts: 1,905
Join Date: Nov 2012
Location: Los Angeles, CA
Google dropped it with Jelly Bean. No rom on that framework will support it.
Better get used to the idea and find another way - there are multiple options:
Push/pull files in ADB
AirDroid to move files to/from PC
Superbeam to move files between Android devices
and the good old CC method: copy and carry on a SD card or memory stick
 
Graiden05
Old
(Last edited by Graiden05; 29th December 2013 at 07:50 PM.)
#4  
Senior Member
Thanks Meter 114
Posts: 169
Join Date: Sep 2012
Actually there is one way to bring it back to JB. At least in tf300 kernel sources this function just disabled. So if uncomment line 913 in file drivers/usb/gadget/android.c "&mass_storage_function," and compile kernel with this change it will be possible to mount some partition as mass storage through usb cable with following commands (/dev/block/mmcblk1p1 - external microSD):
Code:
echo 0 > /sys/class/android_usb/android0/enable
echo 0B05 > /sys/class/android_usb/android0/idVendor
echo 4D04 > /sys/class/android_usb/android0/idProduct
echo mass_storage > /sys/class/android_usb/android0/functions
echo "/dev/block/mmcblk1p1" > /sys/class/android_usb/f_mass_storage/lun/file
echo 1 > /sys/class/android_usb/android0/enable
It was discovered by sig11, link.
The Following 2 Users Say Thank You to Graiden05 For This Useful Post: [ Click to Expand ]
 
_that
Old
(Last edited by _that; 29th December 2013 at 10:17 PM.)
#5  
Recognized Contributor
Thanks Meter 2071
Posts: 3,048
Join Date: Oct 2012
Quote:
Originally Posted by Graiden05 View Post
Actually there is one way to bring it back to JB. At least in tf300 kernel sources this function just disabled. So if uncomment line 913 in file drivers/usb/gadget/android.c "&mass_storage_function," and compile kernel with this change it will be possible to mount some partition as mass storage through usb cable with following commands (/dev/block/mmcblk1p1 - external microSD)
Maybe it's important to note that mounting the same partition from Android and via USB at the same time *will* lead to severe data corruption. But it could be a nice feature for the recovery or the pre-init shell.

Edit: just mounted my /data partition on my PC from the pre-init shell in my kernel (-that8, unreleased) and made a backup of installed apps and data - works great, thanks @Graiden05 for finding out how to do it. So it works if Android is not running (I didn't try to write yet, but that should work too), and of course you need a Linux PC to mount an ext4 filesystem. And remember that this accesses the block device directly, so it is possible to corrupt the filesystem.
The Following User Says Thank You to _that For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes