Update: This is the easiest way to enable Mass storage mode on the Note 2. You don’t need to install any third party apps. It also works on Jellybean 4.1.2 and later, as this re-enables the officially withdrawn USB Storage mode support by reversing the process by which Google had disabled it.
So, maybe you’ve noticed that your sweet beast of a phone no longer supports USB Mass storage mode (you know how you used to be able to access the whole sdcard on your PC while your phone was connected via cable). It’s a change that Google has mandated for newer Android versions. On Windows, you now have the MTP mode where you get partial access to both internal and external sd cards, however it’s a far limited option than Mass storage mode. On Linux, the situation is awful. You dont have access to anything.
Fret not! It’s easy to switch back to USB Mass storage mode. It’s as easy as tapping on a widget on your home screen. You just need to prepare your phone first.
You need to be rooted. You can either run the script as a widget shortcut, or can run the script by typing its name in a Terminal emulator on the phone.
Create the following script on your PC and name it mtpstorage:
#!/system/bin/bash echo "" > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file vold setprop persist.sys.usb.config mtp,adb
Create another file and name it usbstorage:
#!/system/bin/bash setprop persist.sys.usb.config mass_storage,adb echo /dev/block/vold/179:17 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
When the second script (usbstorage) runs, it allows mounting your sdcard on your PC as a mass storage device. The first script reverses the change, and makes MTP mode active again.
Download the scripts:
adb push usbstorage /sdcard/ adb push mtpstorage /sdcard/ su mount -o rw,remount /system cp /sdcard/usbstorage /system/xbin/ cp /sdcard/mtpstorage /system/xbin/ chmod 755 /system/xbin/usbstorage /system/xbin/mtpstorage
To get the ease of using a widget, install SManager from the Market.
Now, transfer the two scripts to a location on your phone. I used /system/scripts.
Now in SManager, choose the two files, one at a time. Click on the Skull and Bones icon to select Root mode (su mode). Now, choose to “Save”.
Once done, you can now view the two scripts under the Menu>Scripts window.
You’re all set. You can now drop widgets onto the Home screen to do this easily. For this, just long press your Homescreen, Swipe to select widgets and Choose SM Widget:
Now, when you need USB Storage mode, simply tap on the “USB Storage” icon, and your sdcard will immediately show up in Windows Explorer or the Linux device notifier. When you’re done, tap the “MTP mode” shortcut.
Credits for technique:
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.