External USB storage working with XBMC - Fire TV General

Here is a full guide I wrote for those who need it, but the quick version is to mount your external storage using StickMount and then navigate to "External Storage -> USBStorage -> sda1" from within XBMC. Files show up and play smoothly.

fireTVnews.com said:
Here is a full guide I wrote for those who need it, but the quick version is to mount your external storage using StickMount and then navigate to "External Storage -> USBStorage -> sda1" from within XBMC. Files show up and play smoothly.
Click to expand...
Click to collapse
I have used stickmount in the past (actually purchased it) and this is what I was waiting for. As long as storgae can be mounted, it will be selectable in not only XBMC, but emulators, etc. Now I can buy the FireTV Thanks for confirming!

Is there automount? When plugging in a usb to my nexus 7 with stickmount installed it automounts the usb drive.

154
garvani said:
Is there automount? When plugging in a usb to my nexus 7 with stickmount installed it automounts the usb drive.
Click to expand...
Click to collapse
No, it does not automount. You have to manually mount the drive from within StickMount.

fireTVnews.com said:
No, it does not automount. You have to manually mount the drive from within StickMount.
Click to expand...
Click to collapse
I gathered that from your instructions.
The question was more as to why there isn't automount. Will have to investigate that as it seems backwards that my 2 year old copy of stickmount will automount whereas this one doesn't, having to perform all those steps is a bit annoying every time you plug in a usb drive..
Thanks for the write up though.

garvani said:
I gathered that from your instructions.
The question was more as to why there isn't automount. Will have to investigate that as it seems backwards that my 2 year old copy of stickmount will automount whereas this one doesn't, having to perform all those steps is a bit annoying every time you plug in a usb drive..
Thanks for the write up though.
Click to expand...
Click to collapse
I don't think it's an issue with SickMount not having the feature. I've tried 2 other USB mounting apps, both explicitly advertise auto mounting. While they both were able to mount the USB drive, neither of them auto mounted.
As for manual mounting being annoying, all you really need to do is load StickMount and click "Mount". The drive gets mounted to the same place, so all your apps (including XBMC) only need to be setup once.

fireTVnews.com said:
I don't think it's an issue with SickMount not having the feature. I've tried 2 other USB mounting apps, both explicitly advertise auto mounting. While they both were able to mount the USB drive, neither of them auto mounted.
Click to expand...
Click to collapse
All that is needed is a script to run in the background and look for the event. The firetv already detects the drive correctly on connection, look in dmesg and you will see something like below when I plugged in a usb hard drive.
Code:
sb 4-1: new high-speed USB device number 3 using msm_hsusb_host
usb 4-1: New USB device found, idVendor=14cd, idProduct=6116
usb 4-1: New USB device strings: Mfr=1, Product=3, SerialNumber=2
usb 4-1: Product: USB Mass Storage Device
usb 4-1: Manufacturer: Generic
usb 4-1: SerialNumber: 116AC2101219
scsi0 : usb-storage 4-1:1.0
scsi 0:0:0:0: Direct-Access Mass Storage Device PQ: 0 ANSI: 0
sd 0:0:0:0: [sda] 156301486 512-byte logical blocks: (80.0 GB/74.5 GiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI disk

Empty folder
All I get with stickmount on my external drive is an empty folder, which I assume has something to do with it having EXT3? I tried a usb-stick with ntfs, and it worked. Or am I missing something?

treqie said:
All I get with stickmount on my external drive is an empty folder, which I assume has something to do with it having EXT3? I tried a usb-stick with ntfs, and it worked. Or am I missing something?
Click to expand...
Click to collapse
Also, I mounted this manually, which works. So I thought I could put this into vold.fstab and ditch stickmount, but when saving, it says the system is read only?

treqie said:
Also, I mounted this manually, which works. So I thought I could put this into vold.fstab and ditch stickmount, but when saving, it says the system is read only?
Click to expand...
Click to collapse
Yes you need to remount the system with write access...
Code:
su
mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
Check if it was mounted in read-write mode (rw):
Code:
mount | grep system
Should return
Code:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,relatime,data=ordered 0 0
Now go make your changes then once done remount it as read-only again:
Code:
mount -o ro,remount /dev/block/stl12 /system

roligov said:
Yes you need to remount the system with write access...
Code:
su
mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system
Check if it was mounted in read-write mode (rw):
Code:
mount | grep system
Should return
Code:
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,relatime,data=ordered 0 0
Now go make your changes then once done remount it as read-only again:
Code:
mount -o ro,remount /dev/block/stl12 /system
Click to expand...
Click to collapse
Yes, I just figured that out. But I'm stuck with how it should be in vold.fstab.
Code:
dev_mount usbdisk /storage/usbdisk auto /devices/platform/msm_hsusb_host.0
That's what I found when googling, but that doesn't work. Not sure if there's anything specific to firetv, that should be changed.

Works for me - no changes
Strange - Stickmount(free ver) auto-mounts on my FTV with notification.
Using autopilot to start SPMC.

[email protected] said:
Strange - Stickmount(free ver) auto-mounts on my FTV with notification.
Using autopilot to start SPMC.
Click to expand...
Click to collapse
Also using ext3?

treqie said:
Also using ext3?
Click to expand...
Click to collapse
NO -
It's a 32GB Transcend with fat32.
It auto-mounts on boot-up, but not when plugged in.

[email protected] said:
NO -
It's a 32GB Transcend with fat32.
It auto-mounts on boot-up, but not when plugged in.
Click to expand...
Click to collapse
I guess it must have a problem with ext3 then.

Has anybody had success with downloading apps and games directly to the usb mount? Is it possible yet to substitute the usb slot for the main storage on the box?
Sent from my iPhone using Tapatalk

Where to download stickmiount
Where do I get it the apk safe and free?

Esso1001 said:
Has anybody had success with downloading apps and games directly to the usb mount? Is it possible yet to substitute the usb slot for the main storage on the box?
Click to expand...
Click to collapse
I'm wondering this as well .

TriOptimum said:
I'm wondering this as well .
Click to expand...
Click to collapse
Pretty sure that will require a custom kernel, i know on my phone i had to use a kernel that had extsd swap support to swap my sd card with internal storage.
Sent from my SCH-I605 using XDA Premium 4 mobile app

Hemorrdroid said:
Pretty sure that will require a custom kernel, i know on my phone i had to use a kernel that had extsd swap support to swap my sd card with internal storage.
Sent from my SCH-I605 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Wouldn't it be possible to use the android equivalent of a symlink to do this? I thought I recalled doing this on phones that didn't support installing apps to external storage awhile back.

Related

External card as ext2?

Can I have external card mounted as ext2? I have files names not supported by fat and sync'ed with dropbox
Yes, you can but afaik there is no easy way to do this.
I formatted my sdcard to ext2 (because I wanted to put large file (image for wikipedia offline) on my sdcard).
I formatted the beginning (~30MB) of my sdcard to fat32 so that the Nook detect the sdcard and does not trigger an error and the remaining part to ext2.
Then I used a script that mount manually the ext2 partition to /sdcard on boot.
This generally works but I have sometimes a few bug in some applications, especially when I connect and disconnect my Nook to my computer...
The best solution would be to find a way so that Android can automount a ext2 partition by itself but I don't know how to do it.
Instead of using the whole card I partitioned the first 4gb as fat16 (msdos) and then set the rest to ext3. When the fat16 space runs out I'll look into making some sort of script to try to mount the second partition. At the moment with the card acts like a normal 4gb card.
is it possible to repartition the nook to be able to use the space that b&n reserves for its contents? I heard that the space for our files is just 250 mb.
user4242 said:
is it possible to repartition the nook to be able to use the space that b&n reserves for its contents? I heard that the space for our files is just 250 mb.
Click to expand...
Click to collapse
yes of course. If you're used to linux repartitioning and the dd command then it's a breeze. If you're a Windows user who've never done partitioning or disk imaging then you can easily mess up.
I'll assume the former.
It's just a case of:
boot with a noogie.img that you've written to a sdcard (root of card, not partition 1)
then plug it in
now you can see all the nook partitions like it's an external USB drive and fdisk, cfdisk, partitionmagic or whatever you want
Obviously you're gonna want to backup first because if you mess up the only way to restore would be asking one of us off this forum to break the distribution laws and send you a 2gb (or whatever it is) image.
All the details on this forum
Has someone tried editing /system/etc/vold.conf to get a ext-formated SD-Card mounted?
mali100 said:
Has someone tried editing /system/etc/vold.conf to get a ext-formated SD-Card mounted?
Click to expand...
Click to collapse
I checked, I had modified it adding a line "partition 2" in the section "volume_sdcard2" so that Android does not show the message "SD card blank or has unsupported filesystem".
But I couldn't make it mount a ext2 sdcard itself. (if you know how to do it without using another script, I'm interested)
Time to resurrect this thread.
FAT is ugly. File timestamps are in local time (whatever that means, summer? winter?).
The Nook vfat implementation has problems with caching in and out directory info on vfat
and intermittently changes all the modify timestamps by 1, 4 or 5 hours.
This can play havoc if you are trying to keep things synchronized by filetime.
I've decided to have my SD card be ext3
Our volume demon, /system/bin/vold (which is ancient) uses /system/etc/vold.conf to configure automounting.
It presumes that all volumes are vfat.
It seems from a brief look inside that it does handle ext2 and ext3 somehow.
There is also the question of getting it to automount USB drives.
The easiest solution to ext3 on the SD card is to make it non-removable.
First, delete the second section out of vold.conf that relates to the SD card.
Then edit init.rc:
Code:
mkdir /sdcard 0777 system system
...
mount ext3 /dev/block/mmcblk1p1 /sdcard nosuid nodev noatime nodiratime uid=1000,gid=1015,fmask=117,dmask=007
chown system sdcard_rw /sdcard
chmod 0770 /sdcard
If you feel like having 12 partitions on your SD card you can.
That leaves vold only handling the mounting of /media
This exists so that you can serve /media as USB Mass Storage.
You could have /media be a fixed mount by doing what you just did to the SD card.
The only hiccup there would be the Adobe Digital Editions wants to see /media as UMS.
Note: To edit init.rc, download bootutil from the signature, extract, edit and replace init.rc in uRamdisk.
Make sure that you have a backup and a recovery!
Note: All of the above changes to init.rc are wrong.
I can get it to mount in a shell, but not in init.rc
Whoops.
Oops, this thread has been forgotten.
Yes, auto-mounting ext3 SDcards has been solved.
See: http://forum.xda-developers.com/showthread.php?t=2184495

Ext4 / NTFS MicroSd & Usb Mounting -v2.3 (fat32 UMS) MTP/UMS Switching/ CM9/10 info

Ext4 / NTFS MicroSd & Usb Mounting -v2.3 (fat32 UMS) MTP/UMS Switching/ CM9/10 info
Hi,
i have developed an App, EzyMount - that pretty much takes care of mounting & utilising ext4 / ntfs storage properly. So no need to be limited to 4gb file size restrictions anymore !!
Updated info for CM9 / CM10 builds
****************************************************************
It seems that CM9 /CM10 changes the default mount point for external sdcards
For ntfs partition only sdcard
Change the default mount point to: /storage/sdcard1
Then try mounting here it should work ok and be picked up automatically by other Apps as well.
If you have two partitions:
1st Partition would be vfat then this should get auto mounted to /storage/sdcard1
2nd Partition (ntfs) : change the mount point to: /storage/sdcard0/extStorages1
Then try mounting here it should be ok
*****************************************************************
Version 2.3 Update
Universal Mass Storage Mode support for 7.7 tabs also most other devices.
Auto MTP/UMS Switching
When you select either MTP Mode or UMS Mode, the App will automatically switch your device into these respective USB transfer method.
It is also possible to use UMS mode for any external MicroSd card, fat32, Ext4 or NTFS formatted.
For ext4 / ntfs this is taken care of by the App
For fat32 external sd cards (these are mounted automatically by Android)
Create a new Mount Point which is the folder location of your external MicroSd card.
For example, on Galaxy 7.7 devices - this will be /mnt/sdcard/extStorages/SdCard.
For Galaxy S3 devices - this will be /mnt/extSdCard
For other devices this is typically, /mnt/sdcard/external_sd
In the partition setting put: /dev/block/mmcblk1p1
Once you have created this mount point, just select "UMS Mode".
After you have finished copying files to or from your PC, it is important to "safely eject your usb device from your PC".
Important too - Finally, disable "UMS Mode" by it pressing again.
You can switch back to MTP by selcting "MTP Mode".
(If MTP does not become active straight away (Android being slow too pick up the change)- you may need to Go to : Settings > Storage > USB PC connection & toggle between Media Device (MTP) & Camera PTP. So Android re-starts MTP. However, it should work without this step)
*****************************************************************
Version 2.1 update
1) New Sliding UI.
2) Ability to mount up to 10 devices / partitions.
Just create a new Mount Point for each device / partition you need to mount.
To create a new Mount Point:
Just slide the UI to the "mount another drive or partition". Then just use select a mount option as per usual to create a new mount point and mount at the same time. Or you can press the "microsd info" "usb drive info" to create a new Mount Point.
3) Works with ICS update
Just ignore "ICS warning messages" - when it comes to ntfs usb devices.
*****************************************************************
Version 1.7 update
1) Quite a few new features added:
NTFS / Ext4 MTP Modes - this allows you to easily switch between "normal mode" and MTP mode.
MTP mode is used for transferring files to PC.
Usage Example:
Personally, I have a 32 gb sd card
the First partion on it is an exFat 4 gb partition. This is picked up the tab and mounted as normal to the location of /mnt/sdcard/extStorages/SdCard
I can use this for my cwm backups etc, other files etc - system running as normal.
This 4gb partition will show up in windows via MTP.
The problem:
I also have a 28GB Ext4 second partition on the Card , this could be an NTFS partition too.
I want this too show up in windows so I can transfer (br rips etc) but it wont as the my first fat32 partiion is shown up instead.
By using NTFS MTP Mode or Ext4 MTP Mode - the App will automatically "switch" the partitions so the larger NTFS or EXT4 mode shows up in windows.
Once done then you can disable NTFS / EXT4 MTP MODE and the device will go back to normal as it were.
(the MTP folder location is set to work already for 7.7 devices and similiar. For other devices this needs to be adjusted. It is normally the default folder loaction of where the external SD card is mounted by the phone.)
UMS Mode - universal mass storage mode.
Although the 7.7 does not have ums mode (MTP is being standardised on ics devices and above) but there a lot of devices than can only use ums mode for transferring file to PC.
I have added a ums mode. Which basically makes your micro sd partitions available on pc. (suitable for non MTP devices)
You do not need to "turn on usb mass storage mode" just select "ums mode" from the APP and it will do it for you.
Also - in windows ext4 partitions are not recognised but ntfs one are off course. In linux both should be available. (one of the benefits of MTP)
Comaptibility Mode
Is for those users whose mounting of micro sd cards might fail for some reason. This mode tries a bit more thorough to mount your micro sd drives.
Better Error Messages
I have added a lot of better error messages that the de facto "error mounting " message
It should provide the reason why things might not be mounting.
I hope this helps some with issues and pm if you have any other issues or things you think might be useful to add.
( I will get round to updating the website with the added features soon)
*****************************************************************
version update 1.6
1) Fixed slight issue with Auto Ext4 permission handling.
2) Also changed the default mount folders of NTFS or Ext4 microsd card to the /sdcard/extStorages/SdCard
This should mean now MTP will see the card in windows properly and you can access them as you would normally. (I think this has caused some confusion - i had left this generic for other users on different devices)
(This means for other devices you should specify the folder in the "location" settings which is normally seen by windows MTP - i.e when you use a fat32 microsd)
I hope this has resolved some issues people might have been having.
version update 1.5
1) Modified labelling on some settings to make it clearer.
2) Mounting usb devices has been slightly tweaked to care of multiple partitions.
version update 1.4
Following on from your recommendations.
1) Mounting MicroSd Ext4 or Ntfs now automatically takes care of you partitions so you do not need to specify them.
This should make it much simpler to mount your microsd cards.
2) Usb Mounting widget should be compatible for all home screen launchers. (touchwiz, adwlauncher etc.)
************************************************************************************************************************************************************************************************************
please remember to unmount usb / microsd devices before ejecting - For usb devices you use the 1-click usb mount/umnount home screen widget for this or from within the App
************************************************************************************************************************************************************************************************************
There have been a few issues regarding using external Usb formatted Ntfs or Ntfs microsd drives. Also I wanted to use an internal micro sd Ext4 partition for large movies (1080p hi-def/bluray etc) or just keep them on an external Ext4 usb disk. Having looked at other solutions, there didn't seem like one that just "worked" or the way I wanted it to do so.
Using Ext4 over Ntfs is native to linux/android and it consumes less cpu than using ntfs. But you cant simply mount an ext4 device and start using it like a regular file system as the file permission are not properly created by Android. I also still needed to have Ntfs read/write support on occassions.
You can use any cheap otg usb cable found on ebay etc. (The same cables as used for 10" galaxy tab devices for example).
As I used the 7.7 as one of my development device so it is pretty suited for our tabs & similiar tablets i.e 7.0+ etc, but is more than generic enough to work on other devices.
The App provides all the necessary features and customization options so you don't need to worry about file formats, file size limitations or file permissions again !!
There are more tips on how to best use the app on my website. If you have any comments good or bad please let me know so I can improve the App.
Cheers.
Need help in mounting microSD as Mass Storage
I don't understand Settings Guide on your website. I downloaded your app but it isn't working for me and I get Partition error every time I try to mount. What should be my partition and what should be the location? I simply want to mount my NTFS microSD card as mass storage which is usually at /extstorages/SDcard/. I did root my device last night and I also installed busybox v1.19 few minutes ago. What am I doing wrong?
Same here, says "Check your partitions". Why do *I* have to worry about partitions? Can't it just work?
Using rooted Tab 7.7.
Asad_Khan said:
I don't understand Settings Guide on your website. I downloaded your app but it isn't working for me and I get Partition error every time I try to mount. What should be my partition and what should be the location? I simply want to mount my NTFS microSD card as mass storage which is usually at /extstorages/SDcard/. I did root my device last night and I also installed busybox v1.19 few minutes ago. What am I doing wrong?
Click to expand...
Click to collapse
belyj said:
Same here, says "Check your partitions". Why do *I* have to worry about partitions? Can't it just work?
Using rooted Tab 7.7.
Click to expand...
Click to collapse
Hi guys,
The default partition of your microsd card is typically:
/dev/block/mmcblk1p1
1) If you have only one partition - so you will put the following in the partition setting:
So for example an NTFS only formated microsd card :
/dev/block/mmcblk1p1
And the same would go for an Ext4 formatted only card:
/dev/block/mmcblk1p1
2) If you have two partitions then typically you will have:
/dev/block/mmcblk1p1
/dev/block/mmcblk1p2
And so on ..
(you can always check for these from a terminal/adb shell)
As these partitions are same for your microsd, you can set them once and forget them about afterwards. I don't try automatically choose these partitions for you and this depends on your partitioning scheme more than anything.
For Usb devices the App will automatically try mounting your usb partitions as these are likely to change more often then not.
Typically, I would recommend the following:
If you have a large 32gb / 64 gb microsd card
Create The first partition as fat32 - maybe 4gb.
This partition will be /dev/block/mmcblk1p1
The tab will automatically mount this first partition & you can use things like cwm recovery for backup as normal.
(Also you wont see an unsupported file system icon in your status bar.)
Then create a second large partition (ext4 or ntfs) :
This partition will be /dev/block/mmcblk1p2
So set this as your Ntfs partition or ext4 partition.
Once you can mount you microsd ok - then you can set it to automount boot.
So need to mess with the settings after that.
Hope this helps and please let me know.
Cheers.
Still MTP connection
Thank you for your explanation. I've can now mount/unmount SD card but when I connect it computer it starts MTP connection and still shows under my computer as a portable device rather than a Mass Storage. Also if I connect it to my computer first it would still ask me to restart the MTP connect when I click mount SDcard and again it shows as a portable device. Changing debugging settings won't help either.
Partition /dev/block/mmcblk1p1
Location /mnt/sdcard/extStorages/SdCard
Asad_Khan said:
Thank you for your explanation. I've can now mount/unmount SD card but when I connect it computer it starts MTP connection and still shows under my computer as a portable device rather than a Mass Storage. Also if I connect it to my computer first it would still ask me to restart the MTP connect when I click mount SDcard and again it shows as a portable device. Changing debugging settings won't help either.
Partition /dev/block/mmcblk1p1
Location /mnt/sdcard/extStorages/SdCard
Click to expand...
Click to collapse
I just tried this. If you click on the "portable device" in windows it shows up as tablet. You can copy files to where you mounted the sd card.
It should work fine.
For me I leave set pretty much as default. As I have the first partition on my sdcard as an exfat / fat32. Then I have an ext4 or Ntfs Partition. This way you tab will behave exactly as normal. But The App should be fine regardless of whatever partitions you have.
Please try this and let me know.
(Also I will look to be adding an auto mounting microsd feature in the next few updates if there is some demand for this. Plus any other features people might suggest in the meanwhile )
Cheers.
To those who have installed EzyMount,
I have updated the microsd mounting feature so it should automatically mount the correct partition for you.
You dont have to manually change the partition settings anymore.
Having said that if there is a particular partition on your microsd you want to mount, then put that in the settings. The app will first try to mount that partition, then try to mount the other partitions if the first mount was not successful.
Also i would suggest setting the mount point folder (location option in settings) to /sdcard/SOME_FOLDER
& not /ext/extStorages/SdCard. which is where the tab mount would mount the microsd card.
Let me know how it goes with the update.
Hope this helps.
cheers.
Hi buddy.
I am totally confused as to how this works.
I went through the info at your website, but I still cannot get this to work.
I have tried only USB flash memory with an OTG USB adapter, both EXT4 and NTFS. I just get an error that says: Error Mounting USB Drive. I can tell that it seems to try, because the activity LED on the drive will flash when I click Mount.
I am using a Samsung Note (i717), so I am not sure if that is the problem. I am only rooted, but the kernel and software is stock 2.3. The phone has both internal memory (called USB Storage by the system) and an sd card; could the app be confused by the various memory locations?
I don't have a spare microsd to format as NTFS, otherwise I would try that.
Any ideas on what I should try? I am a little confused by the settings... they seem to be in many locations, so I am not sure what things to change.
Thanks!
G8351427 said:
Hi buddy.
I am totally confused as to how this works.
I went through the info at your website, but I still cannot get this to work.
I have tried only USB flash memory with an OTG USB adapter, both EXT4 and NTFS. I just get an error that says: Error Mounting USB Drive. I can tell that it seems to try, because the activity LED on the drive will flash when I click Mount.
I am using a Samsung Note (i717), so I am not sure if that is the problem. I am only rooted, but the kernel and software is stock 2.3. The phone has both internal memory (called USB Storage by the system) and an sd card; could the app be confused by the various memory locations?
I don't have a spare microsd to format as NTFS, otherwise I would try that.
Any ideas on what I should try? I am a little confused by the settings... they seem to be in many locations, so I am not sure what things to change.
Thanks!
Click to expand...
Click to collapse
Hi,
I have slightly updated the labelling in the App so should a bit less confusing
You shouldn't really need to change anything.
Partition - refers to the actual "physical" location of your drive as sen by the Androis OS / kernel but this is taken care of automatically so you dont need to specify this. Although you can still specify a partition and that will be mounted.
(You can see the list of your partitions by doing ls /dev/block/* for a command prompt for example)
Location - is where your microsd or usb device will be mounted. Basically the folder loaction on your device where you can see its files / folder contents etc.
The other option refer to the various features - such as auto mounting at boot, auto fixing ext4 permissions, auto usb mounting. If you dont need them you can disable them.
So hopefully we can narrow down the issue.
Do you have busybox,superuser installed ok?
I am not sure what the actual "Usb Storage" on the note is. Maybe there is a variation in the labelling but it should be resolvable.
If you can get me the output from your device from an adb shell or connectbot for example of the following commands:
# mount
and
# df -h
These should help me figure out what might be going on.
(i'll see If i can get my hands on a galaxy note - or have a look at some of the dev stuff in the meanwhile)
Cheers.
Hi. I also heve this problem with Galaxy Note (unable to mount USB drive with one NTFS partition).
Please describe how can i help you to figure out the issue step by step.
Thenks.
-=galex=- said:
Hi. I also heve this problem with Galaxy Note (unable to mount USB drive with one NTFS partition).
Please describe how can i help you to figure out the issue step by step.
Thenks.
Click to expand...
Click to collapse
No problems - been busy with some other work.
So far the App has been installed on the note more tham any other device so seems to be working for some.
A lot of problems are being caused by some users not unmounting the usb device after mounting it for the first time. Which confuses things. I will be releasing an update that takes care of this and possibly a self diagnostics checker that should help in identifying some potential problems.
Also android / linux can be somewhat particular about ntfs so best run a drive check in windows first. Or even better can you try another newly formatted ntfs usb device and see if that works.
I will pm you once i get the chance.
Thanks.
-=galex=- said:
Hi. I also heve this problem with Galaxy Note (unable to mount USB drive with one NTFS partition).
Please describe how can i help you to figure out the issue step by step.
Thenks.
Click to expand...
Click to collapse
I have sent you a pm. Also i have been looking at some of the note dev threads so should have a solution for you I think.
Cheers.
Hi All,
Updated the App to version 1.7.
Check the first post.
Cheers.
This is working great for my 64GB microsd as NTFS. The main problem i have (rather an annoyance) is there is now a constant notification about a "Blank SD card" in the notifications shade.
Does anyone know how to supress this, as it is very annoying to keep seeing it.
rEVOLVE said:
This is working great for my 64GB microsd as NTFS. The main problem i have (rather an annoyance) is there is now a constant notification about a "Blank SD card" in the notifications shade.
Does anyone know how to supress this, as it is very annoying to keep seeing it.
Click to expand...
Click to collapse
You could use the solution ezynow mentions in the first post. Create a small fat32 partition at the start of the SD card, this will also be accessible by things like recovery. Then use the rest of the card as NTFS.
I should apologize for not seeing that tip in the OP. I'll have to wait till i've got some time to repartition the card - any suggestions of what size to make the small one?
Only other problem I see is that the "mount at boot" option doesn't seem to work and I still have to go to the app to enable this.
Trouble with Ext4 MTP
I'm using a 32GB external sd card with a very small 8MB fat32 partition followed by an ext4 partition using the remainder of sdcard. Using Ezymount 1.9, I have been able to mount/bootmount my ext4 partition nicely. Where I'm still struggling is to get the ext4 partition to be accessible when the phone is USB attached to my Linux pc. When the USB cable is attached, I see the phone's internal sd and fat32 partition. When the EXT4 MTP option is enabled, still the fat32 partition is mounted on my pc. I've experimented with UMS and Compatibility modes, but the behavior remains the same.
On my SGS2, the default mount location for the fat32 partition is /mnt/sdcard/external_sd. I created /mnt/sdcard/external_sd_ext4. My external sdcard appears as /dev/block/cyasblkdevblk0, with the fat32 partition as p1 and ext4 as p2. I've configured Ezymount for ext4 with /dev/block/cyasblkdevblk0p2 with a location of /mnt/sdcard/external_sd_ext4. I've tried a number of points for the MTP location, but the resulting behavior remains the same.
Can you help me to get the ext4 partition accessible from my pc when attached via USB?
Thanks
GalaxyQuest99 said:
I'm using a 32GB external sd card with a very small 8MB fat32 partition followed by an ext4 partition using the remainder of sdcard. Using Ezymount 1.9, I have been able to mount/bootmount my ext4 partition nicely. Where I'm still struggling is to get the ext4 partition to be accessible when the phone is USB attached to my Linux pc. When the USB cable is attached, I see the phone's internal sd and fat32 partition. When the EXT4 MTP option is enabled, still the fat32 partition is mounted on my pc. I've experimented with UMS and Compatibility modes, but the behavior remains the same.
On my SGS2, the default mount location for the fat32 partition is /mnt/sdcard/external_sd. I created /mnt/sdcard/external_sd_ext4. My external sdcard appears as /dev/block/cyasblkdevblk0, with the fat32 partition as p1 and ext4 as p2. I've configured Ezymount for ext4 with /dev/block/cyasblkdevblk0p2 with a location of /mnt/sdcard/external_sd_ext4. I've tried a number of points for the MTP location, but the resulting behavior remains the same.
Can you help me to get the ext4 partition accessible from my pc when attached via USB?
J
Thanks
Click to expand...
Click to collapse
Hi GalaxyQuest99,
Could you please run the diagnostics report and send it to me. Hopefully, it is a configuration issue.
What phone/tablet are you using & Also what linux os are you running so i can repoduce the issue.
I am also working on some major new features - so version 2.0 is in the works
Thanks.
Diagnostic?
ezynow said:
Hi GalaxyQuest99,
Could you please run the diagnostics report and send it to me. Hopefully, it is a configuration issue.
What phone/tablet are you using & Also what linux os are you running so i can repoduce the issue.
I am also working on some major new features - so version 2.0 is in the works
Thanks.
Click to expand...
Click to collapse
I have a Samsung Galaxy S2. I use Ubuntu 12.04 LTS. I ran the diagnostics, but don't where to find the report.
Thanks
GalaxyQuest99 said:
I have a Samsung Galaxy S2. I use Ubuntu 12.04 LTS. I ran the diagnostics, but don't where to find the report.
Thanks
Click to expand...
Click to collapse
Hi,
There should be a report generated under /sdcard/ezymount_test.txt.
Could you email it to [email protected].
If there isnt a report then email me at this address too so i can you send you an updated version of the app if needed.
Will setup ubuntu and test this also.
Cheers.

[Q] [PA 3.99] Enable USB mass storage instead of MTP?

Hello,
Is there a way to enable USB Mass Storage on Paranoid Android 3.99? I know it will supposedly prevent the phone from accessing the virtual sdcard partition while plugged to a computer, but this would be a minor annoyance in comparison to the complete pain in the ass that is MTP:
1. Transfers are slow and unreliable (stopping unexpectedly...)
2. It can only perform one task at a time (can't browse folders while copying files for example)
3. Poor implementation on Windows (Explorer keeps asking stupid questions like "are you sure this type of file will be recognized by your device?")
4. Computers with restricted user rights prevent MTP devices from installing.
and so on...
I've tried the following trick:
Code:
su
setprop persist.sys.usb.config mass_storage
reboot
But it didn't work.
Please help. I know it may require a lot of effort but I don't care: MTP is really too much of an annoyance.
No you cannot mount the sdcard as usb mass storage
In order to do that the sdcard has to be it's own fat partition.
On the nexus 4 it is part of the data partition and the folder is fused to the sdcard mount point.
Basically meaning that you can't mount /sdcard because it's not able to be mounted as it's not actually a partition.
And secondly the format is ext4 so even if you could mount it, it would not be readable by Windows
Sent from my Nexus 4 using xda app-developers app
Alex240188 said:
No you cannot mount the sdcard as usb mass storage
In order to do that the sdcard has to be it's own fat partition.
On the nexus 4 it is part of the data partition and the folder is fused to the sdcard mount point.
Basically meaning that you can't mount /sdcard because it's not able to be mounted as it's not actually a partition.
And secondly the format is ext4 so even if you could mount it, it would not be readable by Windows
Click to expand...
Click to collapse
How would Android react if /sdcard was actually a separate FAT32 partition mounted in its usual location?
CutterX said:
How would Android react if /sdcard was actually a separate FAT32 partition mounted in its usual location?
Click to expand...
Click to collapse
According to this article that should work.
http://www.engadget.com/2011/11/21/ice-cream-sandwich-supports-usb-mass-storage-after-all-galaxy-n/
Swyped from my Nexus 4 using Tapatalk 4
CutterX said:
How would Android react if /sdcard was actually a separate FAT32 partition mounted in its usual location?
Click to expand...
Click to collapse
It would work. However doing that is not an easy task.
It would require;
1. Changing the partition table on the phone.
2. Rewriting the bootloader (not 100% sure on this one, but it would be needed to flash any rom from the bootloader (stock)).
3. Rewriting a recovery to support the new partition.
4. Finally making the changes to the rom to support ums mounting.
Sent from my Nexus 4 using xda app-developers app
It looks like this would be something in relatively high demand. So I've been trying to get Android/vold to mount and recognize a vfat image as an sdcard but haven't had any success. It might be easier to work with if I killed off the fuse mount to start, but I'm not really looking to do that right now. Manually mounting the image isn't a problem (busybox mount or using losetup first to establish the loop) but without Android recognizing it, there's no chance of being able to use usb mass storage.
Of course the inherent issue will then be "lost" space with regards to the internal storage, since it'd be dedicated to the "sdcard". It seems most users would be fine with this, setting aside a gig or two.

Link2SD on Amazon Fire TV

Problem statement
The Amazon Fire TV has a limited memory sotrage of less than 5GB.
FolderMount allows for moving App data/obb to a USB device. Remaining components of the App, which sometimes are the larger part of the app, can't be transfered using
These remaining components can be 100s of MB and even above 1GB (Sine Mora is 292MB, Walking Dead is 1.14GB)
Solution
Link2SD allows for moving these components to an external SD card in the phone world. Below I'll describe how to do this on the Amazon Fire TV with a USB device.
This post heavily relies on tweaking a post by sashavasko. Major kudos to him. Up to finding his post I was not successful in mounting in a way that Link2SD could see the mount. This was due to a change in Android 4.2+ where one App's mounting isn't seen by others.
Below is a step by step guide for running this. I've posted a script for automating this here : http://forum.xda-developers.com/showpost.php?p=54601505&postcount=33
Requirements: Root, Mouse, Terminal Application
Step 0 - Preparations : Format a USB device to the Ext4 File system and install Link2SD
Ext4
Link2SD refers to parititoning your SDcard to both Ext4 and FAT, this is not required on our USB device. All we need is an Ext4 partiton we can mount for Link2SD.
I had a high end USB device I used for FolderMount. For testing, I got a 16GB Lexar Jump Drive, which got decent reviews. $8 at Staples ( even less with the right coupon. Other sizes are also cheap). Both went into my Powered USB hub.
You can also partition a single FAT32 USB device to two partitons - FAT32 and Ext4. I have verified both options. Please note that for this second option, if you already have files on your FAT32 USB device, you'd have to first copy them to a backup, as the partitioning trashes your data. You will then need to restore the backed up files to the FAT partition.
Format/Partition your USB device to Ext4 using free MiniTool Partition Wizard Home Edition on your Desktop/Laptop. Below is a nice post on this (Refer only to step 1), you can find others. Please note that this refers to an SDCard. We will be doing this on a USB device.
http://forum.xda-developers.com/showpost.php?p=37405779&postcount=1
In partitioning, please verify the partitions are created as Primary. Also, not sure is this is required, but I didn't name my partitions.
There are also linux commands to do this - I didn't investigate these.
Stick the Ext4 partitoned USB device into your Amazon Fire TV and power it up. We will need the device in for Step 2.
Link2SD
Download Link2SD from the Google Play store, or sideload it
Make the directory Link2SD requires
Code:
su
mkdir /data/sdext2
exit
Step 1 - Fix adb localhost
Follow step 1 in sashavasko's post
http://forum.xda-developers.com/showpost.php?p=45102645&postcount=1
Note1:
You will need a terminal app for this
Note2:
This step should only be run once. Running multiple times can mess the /data/misc/adb/adb_keys file as the key values will concatenate with sashavasko's method. This will cause mounting at boot not to work. If you did this or not sure if you've done this, just erase the duplicate keys from the /data/misc/adb/adb_keys file (the end of a single key is "[email protected] ). Or, better yet, if you aren't seeing any other different keys there - simply su and copy /sdcard/.android/adbkey.pub onto this file.
Step 2 - Install scripts
Follow step 2 in sashavasko's post
http://forum.xda-developers.com/showpost.php?p=45102645&postcount=1
Note 1
Look for your Ext4 partitoned device after running:
Code:
adb shell cat /proc/partitions
You should find the Ext4 device under /device/block starting with sd.
For example: My first USB device is sda1, the Ext4 partitoned one was sdb1 (sdb2 when the Lexar drive was partitoned to FAT32 and Ext4).
You should be able to recognize the devices according to their partition sizes.
Note 2
The msd2.sh file should be changed to be:
Code:
#!/system/bin/sh
mount -t ext4 [COLOR="Purple"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR][COLOR="purple"] /data/sdext2 [/COLOR]&& sleep 5 && /system/bin/vold
where the sdb1 device should be replaced by the device you located in Note 1.
Step 3 - Test the script and grant su permissions
Run this (no su command required, no path to the sd.sh file is required)
Code:
sd.sh
Verify you aren't seeing any errors. You will be granting SU permissions.
Run Link2SD. Go to the menu at the top right. Select "Storage Info" - Verify Link2SD recognizes the Ext4 partiton in the third line (under SD Card 2nd Part. ).
Step 4 - Auto Mount at initialization
For this I'm using the /system/etc/install-recovery.sh script which you should already have. This script loads at boot and calls /system/etc/install-recovery-2.sh (a non existent file).
Create a file at /sdcard/install-recovery-2.sh which contains
Code:
#!/system/bin/sh
/system/xbin/sd.sh
Now move the file to its place:
Code:
su
mount -o rw,remount /system
cp /sdcard/install-recovery-2.sh /system/etc/
chmod 755 /system/etc/install-recovery-2.sh
mount -o ro,remount /system
exit
Now Reboot (Long press remote Select + Play)
Step 5 - Link2SD ready to go
Open Link2SD to verify (as you verified before) that after boot Link2SD sees the Ext4 partiton.
Start moving files using Link2SD :
Select an App
Go to "Create Link" - You will be asked which file types to move. Check them all (not the paid option if you haven't paid).
Link2SD will show "Creating Link...", then an advert (in the non payed version) and then: Application files linked and moved to SD card
Note the expected storage change in the Amazon Fire TV's "About" menu option will be seen after Rebooting.
"Remove Link" works properly
"Move to SD card" is not relevant
Final Words
Don't use this to move system apps, or system-like apps
Responsibly for running this is solely on you. I am only describing what works for me.
Works great thanks
I'd love to see a standalone app for installing this.
Sent from my SM-N900V using XDA Premium 4 mobile app
The msd2.sh file mentioned in Step2/Note2 is used to create a fake external SD Ext4 partition for Link2SD.
You can also use it to create a fake external SD FAT partition at /storage/sdcard1 for FolderMount.
FolderMount automatically recognizes this partition and suggests this as the initial path for its destination path suggestion.
In my case - sda1 is the FAT partition (For me - a USB stick fully formatted to FAT32), and sdb1 is the ext4 formatted USB stick. The same should work with a single partitioned USB stick (but different sd* device names - see original post).
The updated msd2.sh file looks like:
Code:
#!/system/bin/sh
[COLOR="DarkGreen"]mount -t vfat /dev/block/[COLOR="Red"]sda1[/COLOR] /storage/sdcard1[/COLOR] && mount -t ext4 [COLOR="Magenta"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR] [COLOR="Magenta"]/data/sdext2[/COLOR] && sleep 5 && /system/bin/vold
SaltyCookie_OnLoan2FM_SVE said:
The msd2.sh file mentioned in Step2/Note2 is used to create a fake external SD Ext4 partition for Link2SD.
You can also use it to create a fake external SD FAT partition at /storage/sdcard1 for FolderMount.
FolderMount automatically recognizes this partition and suggests this as the initial path for its destination path suggestion.
In my case - sda1 is the FAT partition (For me - a USB stick fully formatted to FAT32), and sdb1 is the ext4 formatted USB stick. The same should work with a single partitioned USB stick (but different sd* device names - see original post).
The updated msd2.sh file looks like:
Code:
#!/system/bin/sh
[COLOR="DarkGreen"]mount -t vfat /dev/block/[COLOR="Red"]sda1[/COLOR] /storage/sdcard1[/COLOR] && mount -t ext4 [COLOR="Magenta"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR] [COLOR="Magenta"]/data/sdext2[/COLOR] && sleep 5 && /system/bin/vold
Click to expand...
Click to collapse
The one annoying thing about this is during boot it will read the entire partition. This in turn in my case makes booting the Fire TV really slow. Lets hope I dont have to reboot much because it now takes around 2-3 minutes to boot up.
MadFlava said:
I'd love to see a standalone app for installing this.
Sent from my SM-N900V using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I 2nd this. This is as close as we're gonna get to downloading Apps, ets., straight to an attached external drive but I know enough about this stuff to be somewhat intimidated by the initial instructions. Not that they're not clear, it just looks like I'd have too many avenues to brick my box.
Still...very good work OP. Thanks again.
MarkBP said:
I 2nd this. This is as close as we're gonna get to downloading Apps, ets., straight to an attached external drive but I know enough about this stuff to be somewhat intimidated by the initial instructions. Not that they're not clear, it just looks like I'd have too many avenues to brick my box.
Still...very good work OP. Thanks again.
Click to expand...
Click to collapse
Come on guys, this is XDA developers
OK, I have this brewing. Should post it by tomorrow.
awesome. how easy is it to reverse this entire process? I'd really like to know the risks before I take the plunge
I think the process can be greatly simplified. On my computer I created install-recovery-2.sh with the two lines below:
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Then I connected via adb to the fireTV from my computer.
Then an adb push of install-recovery-2.sh to /sdcard and then did an adb shell to the fireTV from my computer and su once there.
Copied from install-recovery-2.sh from /sdcard to /system/etc
Did a chmod 755 on the file to make it executable and then rebooted and all seems to be working well with partitions recognized.
tselling said:
I think the process can be greatly simplified. On my computer I created install-recovery-2.sh with the two lines below:
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Then I connected via adb to the fireTV from my computer.
Then an adb push of install-recovery-2.sh to /sdcard and then did an adb shell to the fireTV from my computer and su once there.
Copied from install-recovery-2.sh from /sdcard to /system/etc
Did a chmod 755 on the file to make it executable and then rebooted and all seems to be working well with partitions recognized.
Click to expand...
Click to collapse
Just tried this, didn't work for me (mount not detected).
- tselling, is Link2sd working with this ?
- If someone is working succesfully with Link2sd using tselling's method please report back. This is indeed a shorter route.
failed for me for tselling method
SaltyCookie_OnLoan2FM_SVE said:
Just tried this, didn't work for me (mount not detected).
- tselling, is Link2sd working with this ?
- If someone is working succesfully with Link2sd using tselling's method please report back. This is indeed a shorter route.
Click to expand...
Click to collapse
Link2sd found ok and I linked sevzero without problems. Should note that I use sda1 and sda2 for fat32 in first primary partition and ext4 on second primary pzrtition of same usb flash drive. Any other setup would need to have different script to match your drive setup.
Sent from my SAMSUNG-SGH-I497 using Tapatalk
why does this need more than 1 partition to work anyways? Is it just because the app requires it for some weird reason?
edit: also which partition needs to be the bigger one? do the sizes matter? and does stickmount need to be disabled for this to work?
desc
meadtj said:
why does this need more than 1 partition to work anyways? Is it just because the app requires it for some weird reason?
edit: also which partition needs to be the bigger one? do the sizes matter? and does stickmount need to be disabled for this to work?
Click to expand...
Click to collapse
why does this need more than 1 partition to work anyways? - Link2sd description in play store:
What you need for linking apps:
● root permission.
● a second partition on your SD card.
You should have two partitions on SD card and both should be primary.
The first FAT partition is your standard SD card storage. The second partition is used for application files and can be ext2, ext3, ext4, f2fs or FAT.
You need to use a non-FAT file system (ext2, ext3, ext4 or f2fs) on your second partition in order to link app's private data files. Because the FAT file system (FAT16, FAT32 or exFAT) does not support UNIX file ownership or permissions and will cause a security breakdown of app's private files.
Link2SD Plus can move app's private data files if you have a non-FAT partition
Click to expand...
Click to collapse
So we may be able to use FAT (haven't tried it) but we will lose some moving capabilities.
From my testing - FolderMount does work with the ext4 partiton, so I need two partitions (or 2 usb sticks).
also which partition needs to be the bigger one? - No restriction. Allocate as per your decision and experience with storage costs of apps.
do the sizes matter? - Don't believe her. It does.
Sorry. Uncalled for. Apologies. Not personal. I just had to.
and does stickmount need to be disabled for this to work? - No, it doesn't
983
tselling said:
Link2sd found ok and I linked sevzero without problems. Should note that I use sda1 and sda2 for fat32 in first primary partition and ext4 on second primary pzrtition of same usb flash drive. Any other setup would need to have different script to match your drive setup.
Click to expand...
Click to collapse
Ok, let's try and minimize this. Could it be due to tselling using a single partitioned USB drive, while I'm using two drives ?
I need a report back from someone with a single USB drive who tried tselling's simpler approach. If it failed - Maybe tselling added something along that he wasn't aware of. If it passed - Maybe that's a requirement for the simpler approach.
In other news, the script to automate this is take slightly more than I thought, due to unix-android differences (I come from a unix background). That, and the fact that we may have a simpler solution is delaying me. Oh, also had to stay late at work yesterday, Oooh and the dog ate my laptop.
What about Foldermount?
What about FolderMount for Data and OBB files? Can I still use it with Link2SD on same card?
SaltyCookie_OnLoan2FM_SVE said:
Ok, let's try and minimize this. Could it be due to tselling using a single partitioned USB drive, while I'm using two drives ?
I need a report back from someone with a single USB drive who tried tselling's simpler approach. If it failed - Maybe tselling added something along that he wasn't aware of. If it passed - Maybe that's a requirement for the simpler approach.
In other news, the script to automate this is take slightly more than I thought, due to unix-android differences (I come from a unix background). That, and the fact that we may have a simpler solution is delaying me. Oh, also had to stay late at work yesterday, Oooh and the dog ate my laptop.
Click to expand...
Click to collapse
I think it has to do with the mount points. I have the ext4 partition mounted to /data/ext2 where I think link2sd looks. I think that you could use an entire usb stick with one partition as ext4 mounted to /data/ext2 but your script would change
FROM
##############################################################################################
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
#############################################################################################
TO
###################################################
#!/system/bin/sh
mount -t ext4 /dev/block/sda1 /data/sdext2 && /system/bin/vold
###################################################
However, I have not tried this. I may try this later today since I have a second fireTV and usb stick arriving today.
also, I am planning to use foldermount with the first fat32 partition I created, but I haven't gotten that far as I want to use the Pro version but need the play store loaded first.
OOPS, I did forget one part "mkdir /data/sdext2" (otherwise the mount fails).
tselling said:
I think it has to do with the mount points. I have the ext4 partition mounted to /data/ext2 where I think link2sd looks. I think that you could use an entire usb stick with one partition as ext4 mounted to /data/ext2 but your script would change
FROM
##############################################################################################
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
#############################################################################################
TO
###################################################
#!/system/bin/sh
mount -t ext4 /dev/block/sda1 /data/sdext2 && /system/bin/vold
###################################################
However, I have not tried this. I may try this later today since I have a second fireTV and usb stick arriving today.
also, I am planning to use foldermount with the first fat32 partition I created, but I haven't gotten that far as I want to use the Pro version but need the play store loaded first.
Click to expand...
Click to collapse
tselling said:
OOPS, I did forget one part "mkdir /data/ext2" (otherwise the mount fails).
Click to expand...
Click to collapse
i did that too but still didnt work, maybe bc i have 3 partitions. Fat then Ext2 then NTFS
meadtj said:
i did that too but still didnt work, maybe bc i have 3 partitions. Fat then Ext2 then NTFS
Click to expand...
Click to collapse
Sorry, the directory is /data/sdext2
Your mount command is:
mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Also I am not 100% sure that ext2 filesystem works. ext4 works for sure.

[Scripts][Root][LP/MM] LG G3 Usb Mass Storage Enabler for SDcard(Ext)

After getting fed up with the slow and stupid MTP mode i started thinking that USB Mass Storage support should still be there underneath even if its not enabled because i dont think 'android' developers would use MTP themselves, even if its imposed on us(yes i know the benefits of MTP but we should still have the option someway)
So i did some research and found a way to mount my LG G3 D850s Ext SDcard as Usb Mass Storage!
DISCLAIMER: USE AT YOUR OWN RISK. i wont be responsible for any harm if any that comes to your device.
Read the whole post before asking questions.
Detailed Info at the end if you need to make any more changes to the script.
Troubleshooting/Requirments:
1) Root Required (select the skull with 'su' written underneath in script manager script window if you are using script manager or run 'su' before running script if you are using terminal emulator)
https://play.google.com/store/apps/details?id=os.tools.scriptmanager&hl=en
2) Busybox needed (available in playstore)
3) Selinux mode should be permissive (before running any other scripts run setpermissive script attached or run 'su' in terminal and then 'setenforce 0' in terminal emulator. Selinux in enforcing mode may give "insert disk error". There is a bit more detail at the end about this)
4) SD card should be portable storage in Marshmallow and not adoptable. (this is not for lollipop)
5) Dont store the scripts in sd card (store them in internal sd or /system or /data )
6) Select 'cancel' if it asks to allow computer to access sd card when connecting mobile to computer, dont select 'allow' (only marshmallow) (Edited)
Marshmallow Instructions:
I am using Fulmics rom (Stock based)
I updated to marshmallow( just a few weeks ago and did get the UMS working after some time(usb related stuff has changed in MM but finally got it working with a trick). The main problem i still havent solved is mounting the SD card back to the phone with the right permissions with just commands. Marshmallow has changed a lot with adoptable and portable storages in marshmallow and how it handles permissions to sd card. I have been trying to find a way but havent found anything on the internet. Maybe ill ask around in XDA to solve this to make everything automated.
Basically the automated MM script does unmount SD card card from phone and mounts it on the computer with UMS but it cant remount the sd card back on the phone. But there is a workaround for now, that is to go into settings->Usb and Storage and eject and remount sd card manually.
The script is automated and you only need to run just this after connecting usb.
make sure you have fulfilled all the requirements given at the start of the post!
The instructions for getting UMS to work on MM are
A) Download:
'[MM]USB Mass Storage Automatic' script here http://www.mediafire.com/download/x5rl47mv9m3zc2z/[MM]USB_Mass_Storage_Automatic.txt
B) Change the script if needed:
You probably wont need to change the script but still follow the next 2 steps
1) run 'mount' command in terminal emulator
2) Locate the line saying "/dev/block/vold/public:179,65 /mnt/media_rw/XXXX-XXXX" (the XXXX-XXXX are your sd card serial number, dont worry about it).
what you need is the "/dev/block/vold/public:179,65"
The line 8 of my script is
sdcarddev="/dev/block/vold/public:179,65"
If "/dev/block..." part is the same as what you got above, dont change the script.
If the path is different, change the script to whatever you got!
so if you got "/dev/block/vold/179:65" change line in script to "sdcarddev="/dev/block/vold/179:65""
Save the script!
If script doesnt work later on, look over the detailed info at the end for any changes or post a comment
C) Normal Use ( i dont think restart is needed) :
1) connect the phone (and select 'cancel' whenever it asks to allow computer to access sd card, dont select 'allow' )
2) run the '[MM]USB Mass Storage Automatic' script using script manager with 'su'
3) The sd card should show up on your computer
4) Unplug usb cable
5) Go to settings->Storage & USB in your phone and under portable storage your sd card should be shown. Click the triangle at the right to eject Sd card then Click Sd card 'name part' again to mount it again.
6) You should be back to normal and should be able to use sd card again as before.
If you want to go back to mtp mode just swipe down the notification area and change usb mode to mtp after connecting usb cable.
Lollipop Instructions:
Read detailed info at end to make changes to scripts.
Either enter the commands manually in terminal emulator or run the scripts with su(root) permissions with Script Managers like
https://play.google.com/store/apps/details?id=os.tools.scriptmanager&hl=en
There are four scripts attached
1) USB mass storage enabler and mount
2) USB mass storage enabler
3) Mount Ext-Sd card
4) MTP enabler
There are mainly two parts for making UMS to work, changing usb config property to UMS and mounting sd card on computer.
When you change the property 'persist.sys.usb.config' you will have to restart the phone(restart might not be necessary). but after restarting Ext-SDcard wont mount automatically when you plug in USB cable.(There will be an drive icon in 'My Computer' but it wont open unless you run mount command.)
So you can either run Script 1 before reboot and again after reboot. No harm.
Or run Script 2 before reboot and Script 3 after reboot.
Script 4 is to revert back to MTP mode. No restart needed but you will have to choose MTP in USB options and maybe enable USB debugging if needed.
Order for enabling USB mass Storage:
1) Run Script 1 or Script 2
2) Restart (might not be necessary)
3) Run Script 1 or Script 3
Plug in usb cable at any time. It should say 'connected as Installer' instead of 'connected as MTP'
Order for enabling MTP:
1) Run Script 4
2) Choose MTP in USB connect option.
command: setprop persist.sys.usb.config mtp,adb
Restart phone if needed.
Automated script for Lollipop:
hassan.siddiqi.14 said:
you could try my new script..i wrote it to automate the whole process.
run script with su when u connect the cable or it wont work...it checks if usb cable connected, then unmounts sd card from phone then mounts it to computer then waits for cable disconnection and then mounts the sd card back to the phone..
before running the script, run the mount command and compare the sd card mount properties with the ones in the script.. also at the end.. should be same i think...make sure u have busybox..if u face a problem with remount, do it from the settings manually...
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,utf8 /dev/block/vold/179:65 /mnt/media_rw/external_SD
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,utf8 /dev/block/vold/179:65 /mnt/secure/asec
Click to expand...
Click to collapse
run setpermissive script before this script if you have selinux in enforcing mode
Automatic script link
http://www.mediafire.com/?gjdfef0rdajigc5
Detailed Info:
This info is old and was mainly written in relation on lollipop, marshmallow has small changes
There are two parts to mounting as USB Mass Storage:
1) Changing USB config property to USB Mass Storage
command: setprop persist.sys.usb.config mass_storage
2) Mounting ext-SDcard
command: echo /dev/block/vold/179:65 > /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
You are going to need root for this.
I own a LG G3 D850 and running Lollipop CloudyG3 2.2 (Stock based ROM)
The scripts attached are according to my partition names(maybe others can confirm if its the same for them)
Instructions to edit scripts if needed:
Confirming ext-SDcard path:
Basically go to /dev/block/vold/ in root explorer and confirm the name of partition. It was 179:65 for me.
There were two files here 179:64 and 179:65. i confirmed my ext-SDcard was 179:65 using 'mount' command in terminal and locating the line /storage/external_SD.
If any changes are needed make them in the script 'USB mass storage enabler and mount.txt' accordingly.
Confirming mass_storage file path:
We are going to mount ext-SDcard to /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
confirm you have this file using root explorer. Although i think this is going to be same for all LG G3.
Or try these
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun0/file
/sys/devices/platform/msm_hsusb/gadget/lun0/file
If any changes are needed make them in the script 'USB mass storage enabler and mount.txt' accordingly.
Insert Disk Error in computer:
@ahorner mentioned that if you get "insert disk" it might be due to selinux being in enforcing mode.
you can check with command "getenforce" in terminal
you can change it to permissive mode with
"setenforce 0" command in terminal or run the setpermissive script in attachment.
If you want to change back to enforcing after you are done you can run the setenforce script.
hope that helps. thanks to @ahorner
Credits:
http://forum.xda-developers.com/showthread.php?p=29435666#post29435666 @aaki_rocker
http://forum.xda-developers.com/showpost.php?p=51040713&postcount=275 @MetaIIica
Please share your experiences.
I use script on G3 Beat (D722) lollipop, path same as G3 (D850)s. Ext SDcard mount on pc as CD_rom only
Any body get Mass storage working on Lollipop stock rom, pls share
SanjayG said:
I use script on G3 Beat (D722) lollipop, path same as G3 (D850)s. Ext SDcard mount on pc as CD_rom only
Any body get Mass storage working on Lollipop stock rom, pls share
Click to expand...
Click to collapse
did it show the folders of ur memory card?
try it on another computer, it might be a driver problem.
On ls990 stock rom, /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/ is a link to msm_dwc3 which I believe is a cd-rom device. I think phone has window drivers to install, maybe wrong. I use linux.
Code:
lrwxrwxrwx root root 2015-06-09 14:39 lun -> ../../../../msm_dwc3/f9200000.dwc3/gadget/lun0
/sys/devices/virtual/android_usb/android0/f_cdrom_storage should be for cdrom
open up the f_cdrom_storage/lun/file with text viewer...
it should be blank
f_mass_storage/lun/file should have /dev/block/179:65 f_mass_storage/lun/cdrom_usbmode should be 0
not sure about all this btw.
although i think it might be windows driver problem, thats why i asked him to try with a different pc to be sure.
Thanks for your respond. I try on another PC , find on Pic about the two mount drive on the PC
SanjayG said:
Thanks for your respond. I try on another PC , find on Pic about the two mount drive on the PC
Click to expand...
Click to collapse
the first pic is because sd card didnt mount.run the mount script.
the second pic is because sd card mounted but 'file system' was not compatible with windows. sd card should be fat or ntfs.
run 'su' then 'mount' command in terminal emulator.
you should get this
/dev/block/vold/179:65 /mnt/media_rw/external_SD vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:65 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
vfat is for 'fat' file system , if yours is ext4 it wont mount on windows. either format sd card in 'fat' or google ext4 mounter for windows..
hassan.siddiqi.14 said:
the first pic is because sd card didnt mount.run the mount script.
the second pic is because sd card mounted but 'file system' was not compatible with windows. sd card should be fat or ntfs.
run 'su' then 'mount' command in terminal emulator.
you should get this
/dev/block/vold/179:65 /mnt/media_rw/external_SD vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:65 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
vfat is for 'fat' file system , if yours is ext4 it wont mount on windows. either format sd card in 'fat' or google ext4 mounter for windows..
Click to expand...
Click to collapse
Hi Hassan
Thx for trying to help me. I have two partition on my Ext SD card, Fat32 and Ext4. I use Link2SD in the partition Ext4
I was able to mount my Ext SDcard as mass storage in kitkat ( http://forum.xda-developers.com/showthread.php?t=2740826 )
I loss this useful mean to sync some of apps with my PC when I upgrade to lollipop 5.0.2
I check the path /sys/devices/virtual/android_usb/android0/f_mass_storage/lun and it is link to cdrom_usbmode
Also check the path /sys/devices/virtual/android_usb/android0/f_cdrom_storage/lun and it is link to cdrom_usbmode
Pls see image, is it Ok or need to amend
SanjayG said:
Hi Hassan
Thx for trying to help me. I have two partition on my Ext SD card, Fat32 and Ext4. I use Link2SD in the partition Ext4
I was able to mount my Ext SDcard as mass storage in kitkat ( http://forum.xda-developers.com/showthread.php?t=2740826 )
I loss this useful mean to sync some of apps with my PC when I upgrade to lollipop 5.0.2
I check the path /sys/devices/virtual/android_usb/android0/f_mass_storage/lun and it is link to cdrom_usbmode
Also check the path /sys/devices/virtual/android_usb/android0/f_cdrom_storage/lun and it is link to cdrom_usbmode
Pls see image, is it Ok or need to amend
Click to expand...
Click to collapse
my pleasure..
you didnt understand me
go to /sys/devices/virtual/android_usb/android0/f_mass_storage/lun
and open the file 'file' with text viewer..it should have /dev/block/vold/179:65 written inside..
open the file 'cdrom_usbmode' it should have 0
ext4 partition might be causing problems..
sourceforge. net /projects/ext2fsd/files/Ext2fsd/0.62/Ext2Fsd-0.62.exe/download
go to this link and install it..remove spaces in link...
this is ext4 drivers tool for windows..try mounting after this... btw do u still use link2sd?
also send me your 'mount' command output...
Hi Hassan
I have done some check and mod as you advice
Replace my partition SD Card with another one, single partition and fat32
Re write all script as start of post
Delete /system/usbautorun.iso from f_cdrom_storage/lun/file (now blank)
Check f_mass_storage/lun/cdrom_usbmode should be 0 , Ok
Check /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file ---> Not ok, file blank
Write this /dev/block/vold/179:65 inside file and test see Pic
USB is enable drive mount but can't access "Empty Disk"
Check again /sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file ---> file blank
Thx, there is progress awaiting your advice to proceed
did you write yourself or run the script?
run the script and see..
also you did not send 'mount' command output..
and USB mass storage mode is working but the sd card wont mount on pc. thats why you are geting the error.
and it is connecting as removable disk and not as cd rom..like its supposed to be.
also go to settings->storage and unmount sd card and then run script.
Hello Hassan
I run script with SManager
See attached "Mount" output, unmount Card and run script same result
did you check the file 'file', is it still empty?
and go to device manager in your computer, if there are any yellow exclamations when you connect, uninstall those drivers and connect again.
did you try restarting the device and checking?
and use the attached script, and also enable usb debugging in developer options
one thing that i missed, are you using su when running script with script manager?
see attachment
Hi,
Thanks for the scripts! Unfortunately, I can't get USM to work...
First things first, I'm an IT specialist and am familiar with Linux and it's file system. I'm not a developer though.
My phone is the canadian LG G3 (LG-D852) running CM 12.1.
So, when I first used the "set mass storage and mount" script and rebooted, then ran it again after reboot, the computer saw the phone in the device manager as LG-D852, with the exclamation mark stating "no drivers installed". It didn't show up in the Computer. On the phone, it said "Connected as installation" (or something like that, my phone is in french so I don't know the exact english message).
I went back to MTP, and it worked normally. Now when I try to go back to USM, the computer doesn't even detect any new peripheral (Device manager doesn't refresh and no "new device" sound). The phone doesn't show any USB connection either, but the charging LED comes on. I tried different USB cables on different computers, to no avail. The problem resides in the phone. Going back to MTP always works fine.
The "mount" command as SU gives me the /dev/block/vold/179:65 as both /mnt/media_rw/sdcard1 and /mnt/secure/asec like it should, both in vfat, meaning they are the correct numbers and partition format.
I tried disabling and re-enabling USB debugging, running the different scripts with SManager, typing the commands in terminal with su (under root user), unmounting the SD card in the phone's settings.
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file has the proper content (/dev/block/vold/179:65).
The other possible files don't exist:
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun0/file
/sys/devices/platform/msm_hsusb/gadget/lun0/file
f_cdrom_storage/lun/file is empty.
f_mass_storage/lun/cdrom_usbmode has "0" in it.
f_mass_storage/lun/cdrom also has "0" in it.
f_mass_storage/lun/file has "/dev/block/vold/179:65"
I also tried "mass_storage" alone and "mass_storage,adb" in the setprop command.
Anything else I can try before giving up?
Magzime said:
Hi,
Thanks for the scripts! Unfortunately, I can't get USM to work...
First things first, I'm an IT specialist and am familiar with Linux and it's file system. I'm not a developer though.
My phone is the canadian LG G3 (LG-D852) running CM 12.1.
So, when I first used the "set mass storage and mount" script and rebooted, then ran it again after reboot, the computer saw the phone in the device manager as LG-D852, with the exclamation mark stating "no drivers installed". It didn't show up in the Computer. On the phone, it said "Connected as installation" (or something like that, my phone is in french so I don't know the exact english message).
I went back to MTP, and it worked normally. Now when I try to go back to USM, the computer doesn't even detect any new peripheral (Device manager doesn't refresh and no "new device" sound). The phone doesn't show any USB connection either, but the charging LED comes on. I tried different USB cables on different computers, to no avail. The problem resides in the phone. Going back to MTP always works fine.
The "mount" command as SU gives me the /dev/block/vold/179:65 as both /mnt/media_rw/sdcard1 and /mnt/secure/asec like it should, both in vfat, meaning they are the correct numbers and partition format.
I tried disabling and re-enabling USB debugging, running the different scripts with SManager, typing the commands in terminal with su (under root user), unmounting the SD card in the phone's settings.
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file has the proper content (/dev/block/vold/179:65).
The other possible files don't exist:
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun_ex/file
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun0/file
/sys/devices/platform/msm_hsusb/gadget/lun0/file
f_cdrom_storage/lun/file is empty.
f_mass_storage/lun/cdrom_usbmode has "0" in it.
f_mass_storage/lun/cdrom also has "0" in it.
f_mass_storage/lun/file has "/dev/block/vold/179:65"
I also tried "mass_storage" alone and "mass_storage,adb" in the setprop command.
Anything else I can try before giving up?
Click to expand...
Click to collapse
im assuming that you have already installed the right lg g3 drivers otherwise mtp wouldnt have worked..but try reinstalling from here after uninstalling previous ones..
i dont remember where i download from...
http://www.mylgphones.com/download-and-install-the-usb-drivers-for-lg-g3-on-windows-and-mac.html
have you tried to unhide hidden drivers in device manager and uninstalled the devices that installed when u first connect the lg g3 in UMS..there are probably still there in hidden mode... that sometimes causes problem..i have to uninstall mtp drivers when i switch back to mtp..
you could try that..
thirdly you could try my new script..i wrote it to automate the whole process.
run script with su when u connect the cable or it wont work...it checks if usb cable connected, then unmounts sd card from phone then mounts it to computer then waits for cable disconnection and then mounts the sd card back to the phone..
before running the script, run the mount command and compare the sd card mount properties with the ones in the script.. also at the end.. should be same i think...make sure u have busybox..if u face a problem with remount, do it from the settings manually...
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,utf8 /dev/block/vold/179:65 /mnt/media_rw/external_SD
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,utf8 /dev/block/vold/179:65 /mnt/secure/asec
Neither the phone nor the computer detect any device, none at all, only the LED comes on to indicate charging, as if the phone was in "Charge only" USB setting, so the driver is not my problem, at least not anymore... Maybe it was on the first try, but I can't manage to reproduce that state anymore.
Trying the new automated script right now...........
.............................
Weird, I get an unexpected "else" on line 39, but everything seems in order, I even opened the script in Notepad++ to make sure every "if" has its "fi". I run it with SManager and SU checked.
hassan.siddiqi.14 said:
im assuming that you have already installed the right lg g3 drivers otherwise mtp wouldnt have worked..but try reinstalling from here after uninstalling previous ones..
i dont remember where i download from...
have you tried to unhide hidden drivers in device manager and uninstalled the devices that installed when u first connect the lg g3 in UMS..there are probably still there in hidden mode... that sometimes causes problem..i have to uninstall mtp drivers when i switch back to mtp..
you could try that..
thirdly you could try my new script..i wrote it to automate the whole process.
run script with su when u connect the cable or it wont work...it checks if usb cable connected, then unmounts sd card from phone then mounts it to computer then waits for cable disconnection and then mounts the sd card back to the phone..
before running the script, run the mount command and compare the sd card mount properties with the ones in the script.. also at the end.. should be same i think...make sure u have busybox..if u face a problem with remount, do it from the settings manually...
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,utf8 /dev/block/vold/179:65 /mnt/media_rw/external_SD
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,utf8 /dev/block/vold/179:65 /mnt/secure/asec
Click to expand...
Click to collapse
Magzime said:
Neither the phone nor the computer detect any device, none at all, only the LED comes on to indicate charging, as if the phone was in "Charge only" USB setting, so the driver is not my problem, at least not anymore... Maybe it was on the first try, but I can't manage to reproduce that state anymore.
Trying the new automated script right now...........
.............................
Weird, I get an unexpected "else" on line 39, but everything seems in order, I even opened the script in Notepad++ to make sure every "if" has its "fi". I run it with SManager and SU checked.
Click to expand...
Click to collapse
firstly put the script in internal or system folders, because if its in the sd card you wont have access to the script after unmounting the sd card, might cause problems...
you are running the script after connecting the cable right?
go and check this using root explorer when u connect the cable and make sure its changed to 'configured'
/sys/class/android_usb/android0/state
also type getprop persist.sys.usb.config in terminal to check if it changes to mass storage,adb when you run the automated script or my previous UMS enabler script
try something connect the phone.
run the mtp enabler script attached
use the drop down menu to select mtp manually in choose usb mode or something
then run my automated script(not stored in sd card)
now it should say connected as installer
if not then im pretty sure its a driver problem or maybe aosp thing
did u reinstall drivers?
did u select "show hidden devices" in view in device manager and check if any preexisting devices are there..uninstall those...
hassan.siddiqi.14 said:
firstly put the script in internal or system folders, because if its in the sd card you wont have access to the script after unmounting the sd card, might cause problems...
you are running the script after connecting the cable right?
go and check this using root explorer when u connect the cable and make sure its changed to 'configured'
/sys/class/android_usb/android0/state
also type getprop persist.sys.usb.config in terminal to check if it changes to mass storage,adb when you run the automated script or my previous UMS enabler script
try something connect the phone.
run the mtp enabler script attached
use the drop down menu to select mtp manually in choose usb mode or something
then run my automated script(not stored in sd card)
now it should say connected as installer
if not then im pretty sure its a driver problem or maybe aosp thing
did u reinstall drivers?
did u select "show hidden devices" in view in device manager and check if any preexisting devices are there..uninstall those...
Click to expand...
Click to collapse
Found the problem with the "unexpected else" in the script: wrong CRLF from Windows, had to edit with Notepad++ and save as SH script, no the script runs without error. Had to edit it to change the mount point of the SD card to fit what "mount" reports.
I have always run the scripts from the internal memory.
Busybox 1.23.2 is installed.
So, starting from scratch, before running the script.
Plugged in as MTP, can browse both internal and SD from Computer, and I see the free space for each of them. The usual stuff.
mount returns the following:
/dev/block/vold/179:65 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:65 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0
Note the /mnt/media_rw/sdcard1 instead of /external_SD in your original script, that's what I changed to fit this mount.
With cable plugged, running the script as SU with SManager, script waits at "usb mass storage connected". Looking good, but meanwhile:
Dropdown says "Connected as MTP" and "USB debugging enabled".
getprop persist.sys.usb.config now returns "mass_storage,adb"
/sys/class/android_usb/android0/state contains CONFIGURED
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file contains /dev/block/vold/179:65
I can't see the SD card anymore in root explorer from the phone, but in my computer, I still see the same thing: MTP connected phone, internal memory and SD card can be browsed.
The two previous lines in "mount" have been replaced by the following:
/dev/block/platform/msm_sdcc.1/by-name/userdata /dev/SM_bin ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=1000,errors=continue,data=ordered 0 0
When unplugging the cable, the scripts resumes and ends, with everything back to normal.
Now, if I reboot the phone, it goes back to the state where neither the phone nor the computer detect a connection, so I run the MTP Enabler script, now the phone shows "Connected as installer", but nothing else shows in Computer. I see the LG-D852 in the devices, yellow exclamation mark "No drivers installed" (I get this status even in regular MTP mode). I can go to the settings from the dropdown and select MTP again to get everything working normally.
Still no UMS though... :crying:
Magzime said:
Found the problem with the "unexpected else" in the script: wrong CRLF from Windows, had to edit with Notepad++ and save as SH script, no the script runs without error. Had to edit it to change the mount point of the SD card to fit what "mount" reports.
I have always run the scripts from the internal memory.
Busybox 1.23.2 is installed.
So, starting from scratch, before running the script.
Plugged in as MTP, can browse both internal and SD from Computer, and I see the free space for each of them. The usual stuff.
mount returns the following:
/dev/block/vold/179:65 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:65 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0
Note the /mnt/media_rw/sdcard1 instead of /external_SD in your original script, that's what I changed to fit this mount.
With cable plugged, running the script as SU with SManager, script waits at "usb mass storage connected". Looking good, but meanwhile:
Dropdown says "Connected as MTP" and "USB debugging enabled".
getprop persist.sys.usb.config now returns "mass_storage,adb"
/sys/class/android_usb/android0/state contains CONFIGURED
/sys/devices/virtual/android_usb/android0/f_mass_storage/lun/file contains /dev/block/vold/179:65
I can't see the SD card anymore in root explorer from the phone, but in my computer, I still see the same thing: MTP connected phone, internal memory and SD card can be browsed.
The two previous lines in "mount" have been replaced by the following:
/dev/block/platform/msm_sdcc.1/by-name/userdata /dev/SM_bin ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=1000,errors=continue,data=ordered 0 0
When unplugging the cable, the scripts resumes and ends, with everything back to normal.
Now, if I reboot the phone, it goes back to the state where neither the phone nor the computer detect a connection, so I run the MTP Enabler script, now the phone shows "Connected as installer", but nothing else shows in Computer. I see the LG-D852 in the devices, yellow exclamation mark "No drivers installed" (I get this status even in regular MTP mode). I can go to the settings from the dropdown and select MTP again to get everything working normally.
Still no UMS though... :crying:
Click to expand...
Click to collapse
from what i can see your phones drunk!
its doing everything wrong!
but showing connected as installer is good,i mean if you edited the scripts with the right paths.
its the problem on your computer side, i keep telling you.. driver issue!
if we could set up a skype or teamviewer connection, i might be able to do something..
but check this out first...
http://forum.xda-developers.com/galaxy-note-3/general/note-3-usb-mass-storage-t3020854
and try disabling usb debugging, i read that android one devices with cm12 need to disable that for ums to work...
and fyi the 'mount' command lines didnt get replaced...they are mount points for userdata partition...the last two lines didnt show when you unmounted the sd card that belonged to the sd card...
and if there is someone for whom the scripts are working, please comment....for cloudy and cm12 based...

Categories

Resources