[MOD][KERNEL] Stock 4.2.1 + OTG

Search This thread

alias_neo

Senior Member
Jun 9, 2006
2,081
205
London
Hi all,

For the purists amongst you, like myself, I have attached a modified, repacked boot image that will mount (automatically) external storage devices to /storage/usbdisk and /storage.

You need to be rooted and unlocked.

Installation:
  • Backup your boot image with recovery of your choice
  • Reboot into bootloader
  • fastboot flash boot neostock421.img
  • reboot into android
  • rename vold.txt to vold.fstab (XDA wouldn't let me upload a vold.fstab)
  • copy and paste vold.fstab (attached) into /system/etc/
  • set permissions on vold.fstab to 755
  • reboot
  • plug in your drive and enjoy

Notes:
The storage device will not show up in settings/storage, that requires modification of the framework, I could do it (if there is a suitable apktool available) and package the lot as an update.zip but for the time being I won't.

Observations:
I have observed that in Root explorer, the device is mounted read-only initially (you can simply remount read-write), but if I open /storage/usbdisk in Estrongs and return to Root Explorer, it's now read-write. Either way, you should no trouble getting read-write.

Warnings:
Do the above at your own risk, I take no responsibility, bla bla, etc etc.
 

Attachments

  • neostock421.img
    4.5 MB · Views: 306
  • vold.txt
    71 bytes · Views: 528

alias_neo

Senior Member
Jun 9, 2006
2,081
205
London

It just auto mounts existing supported file systems, nothing more, nothing less.

I haven't tested it with anything other than a fat file system cause that's all I have on my pen drives.

Unfortunately the N10 doesn't appear to source enough power to power my 2.5" hdd, shame cause my XOOM used to power it just fine.

Sent from my GT-I9300 using Tapatalk 2
 

xtzz

Senior Member
Jan 3, 2011
134
16
Techn0.eu
I am using an external WD My Book Essential with external power supply. Is it suppposed to have a notification after it's plugged in? Cause it doesn't happen and it doesn't appear in Settings -> Storage.
 

alias_neo

Senior Member
Jun 9, 2006
2,081
205
London
I am using an external WD My Book Essential with external power supply. Is it suppposed to have a notification after it's plugged in? Cause it doesn't happen and it doesn't appear in Settings -> Storage.

Nope, no notification, and nothing in Settings->Storage (like I said in OP).

Just open your file browser and it's mounted and visible in 3 places;

/mnt/usbdisk
/storage/usbdisk
/usbdisk

Sent from my GT-I9300 using Tapatalk 2
 

xtzz

Senior Member
Jan 3, 2011
134
16
Techn0.eu
Had to wait for some time, I guess it needed it to index the files or whatever, finally it's working.
Thanks for your awesome work, I really missed only the USB OTG storage support from the stock jop40d :)
 

wptski

Senior Member
Dec 8, 2011
1,371
157
Warren, MI
How does this work with TWRP? Meaning, if a flash drive is selected as the destination, on a reboot of TWRP, is the setting retained?
 

craigacgomez

Senior Member
Jan 29, 2010
2,215
3,924
Tustin
+1
This works with any file system? Only FAT or NTFS, only read or write?

Only FAT... R/W

@alias_neo, hit me up on PM... I'd like to work with you to get this to a better state... aka, NTFS & settings storage support... I'm not running stock right now, so I need someone to send me some files and test it!!
 
Last edited:

cadiken

Senior Member
Mar 19, 2010
127
22

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Hi all,

    For the purists amongst you, like myself, I have attached a modified, repacked boot image that will mount (automatically) external storage devices to /storage/usbdisk and /storage.

    You need to be rooted and unlocked.

    Installation:
    • Backup your boot image with recovery of your choice
    • Reboot into bootloader
    • fastboot flash boot neostock421.img
    • reboot into android
    • rename vold.txt to vold.fstab (XDA wouldn't let me upload a vold.fstab)
    • copy and paste vold.fstab (attached) into /system/etc/
    • set permissions on vold.fstab to 755
    • reboot
    • plug in your drive and enjoy

    Notes:
    The storage device will not show up in settings/storage, that requires modification of the framework, I could do it (if there is a suitable apktool available) and package the lot as an update.zip but for the time being I won't.

    Observations:
    I have observed that in Root explorer, the device is mounted read-only initially (you can simply remount read-write), but if I open /storage/usbdisk in Estrongs and return to Root Explorer, it's now read-write. Either way, you should no trouble getting read-write.

    Warnings:
    Do the above at your own risk, I take no responsibility, bla bla, etc etc.
    1
    Hello! Thank you! I can flash this on stock ROM? OTG will work? :confused:

    Yep,

    That's the Idea :D Enjoy.
    1
    Do you think we can use this mod to mount a wireless hard drive like the Seagate GoFlex or the Kingston Wi-Drive if using this guide?

    http://reviewlagoon.com/nexus-7-tutorial-mount-network-share-as-a-drive/

    This thread is more suited for that purpose... http://xdaforums.com/showthread.php?t=2003836