[Q] Help mounting ext3 hard drive - Galaxy S 4 Q&A, Help & Troubleshooting

I'm trying to mount an ext3 formatted hard drive via OTG. Tried many different apps that are supposed to support ext3, but none of them work. Phone is rooted so that's not the problem.
I managed to mount the drive manually using Terminal and busybox mount command. I can now read and write to the drive using Terminal via the mount point /storage/UsbDriveA.
The problem is that, although I can access it from Terminal, it does not show up in file explorer "My Files", and is not visible from other apps. I tried using ES File Explorer, and although ES can see the mount point UsbDriveA, it shows up empty.
Also, in Settings->Storage, the drive appears not to be mounted.
How can I get the files to show up outside of Terminal?

Related

How can I create a symlink or bind for USB in the sdcard directory?

I have a rooted a500 and was able to bind the external SD card to a folder in the sdcard directory using "mount -o /mnt/external_sd /mnt/sdcard/external-sd". I was able to do the same with a fat32 USB thumb drive but it breaks as soon as I unplug the USB.
Is there any way to create a link or bind the USB on a more permanent basis? Essentially, I want to be able to quickly get to files on the drive in estrongs file manager without having to change to default directory from sdcard.
Thanks in advance for any assistance.
Sent from my A500 using Tapatalk
Of course, as soon as I posted this, inspiration struck and I simply changed the mount point.
If anyone else wants to do this, you need to edit /etc/vold.fstab to point the the new mount locations. I just changed the mount point to the new folders I created in sdcard and rebooted. Also did this for the external SD card so that I don't have to rebind it each time I reboot.
Sent from my A500 using Tapatalk

[Q] directory bind to play game with OTG usb drive

I am facing this issue with my Nexus 7 4.2.1 stock ROM rooted.
I am trying to move game data to a usb flash drive to save space, and then mount bind the directory using an OTG cable.
When I use StickMount I can see the usb drive at /sdcard/usbStorage/sda1 using ES File Explorer.
Then I use Terminal Emulator to mount bind the directory:
[email protected]:/ $ su
[email protected]:/ # mount -o bind /sdcard/usbStorage/sda1/test /sdcard/Android/data/test
These seems to work because if I navigate the directories using Terminal Emulator, I see how the test directory was linked and the data can be seen.
But if I use ES File Explorer to go to the same directory (/sdcard/Android/data/test), folder is empty, and if I try to run the game, it tries to download again because can't see the data in that directory.
So my question is if I can do the directory bind using other source like /data/media, /storage/sdcard0, or /mnt/sdcard instead of just /sdcard to make ES File Explorer and the game to see the data directory?
It is good to verify with Terminal Emulator that the directory bind worked but not good enough to make the game works saving internal storage space.
Thank you.
http://forum.xda-developers.com/showthread.php?p=35960052
Directory bind does not work on android 4.2.1!
The above thread has more details, hopefully the developer of directory bind app is looking for a solution!
Sent from my Nexus 7 using XDA Premium HD app
I don't need to use the app. I can do it just typing the unix/linux commands.
rabascal said:
I don't need to use the app. I can do it just typing the unix/linux commands.
Click to expand...
Click to collapse
The new file structure in android 4.2.1 is causing problems! The app i believe uses the bind command as well! So it is the bind command that doesn't work properly!
Have you tried using Sy links instead of binding the folder?
Use the following command to symlink
ln -s [source folder] [destination folder] where source and destination are path names
Thank you for the suggestion.
I tried several times on different directories but it didn't work.
I read somewhere that symlink does not work with FAT32. Is this my problem?
The USB flash drive that I am using where I copy the fifa 12 game directory is FAT32.
Do I need to have the usb storage formatted as ext2 or ext4? How can I do that? I am guessing I can't do it on Windows, right?
rabascal said:
Thank you for the suggestion.
I tried several times on different directories but it didn't work.
I read somewhere that symlink does not work with FAT32. Is this my problem?
The USB flash drive that I am using where I copy the fifa 12 game directory is FAT32.
Do I need to have the usb storage formatted as ext2 or ext4? How can I do that? I am guessing I can't do it on Windows, right?
Click to expand...
Click to collapse
Try formatting it to ext3..it will delete the data of course so take a backup.on windows use mini tool partition manager...its free and can format to any ext.

[Q] Mounting ext4 on Nexus 7 Tilapia

Hi there!
I have myself a rooted Tilapia Nexus 7 with me, and I'm trying to watch videos off of an ext4 partition from my external hdd. To mount, I use Stickmount to mount the drive, ES File Explorer to browse the drive for the video I wanna watch, and MX Player to watch the video. It works when I watch videos from its FAT32 partition, but ES File Explorer reports that my ext4 partition is empty.
Since the automated way wouldn't work, I checked out the directory in the terminal emulator and found out it was empty. When that failed, I tried out mounting manually via terminal emulator. I used
Code:
mount
to figure out where the FAT32 partition was being mounted, then I tried manually mounting with:
Code:
# mount -t ext4 /dev/block/sda2 /data/media/0/usbStorage/sda2
This worked in the terminal, and
Code:
ls -a
listed the files in the ext4 partition, but ES File Explorer still wouldn't see the files. I then tried
Code:
# chmod -R 777 /data/media/0/usbStorage/sda2
# chown media_rw /data/media/0/usbStorage/sda2
You'll notice the 'chown' doesn't use '-R', and that's because the native 'chown' on android doesn't support it (surprisingly). I used 'chown' on the folder (sda2) and one folder inside it to see if the problem was ownership. Apparently it wasn't, cause they still didn't appear.
When this didn't work, I made an account here, and posted this question, so here I am.
So, any suggestions?
UPDATE 1:
I recently installed busybox to see if that'd fix it. I used the 'normal' install setting. Long story short, it didn't, and note I have a whole bunch of what I perceive to be useless symlinks, which I suspect over wrote the original binaries. Luckily, not all the binaries were overwritten as some don't work as they should; chown, for example, doesn't work with the android groups and users. I can't uninstall it cause apparently something goes wrong.
UPDATE 2:
StickMount still won't mount my ext4 partition correctly and ES File Explorer still won't detect my files, so I use a terminal, get superuser permissions with
Code:
su
, mount the partition with the above command, and use
Code:
cp
to copy the videos I wanna watch into the 'Movies' folder. It takes some time, and I worry about wearing out the internal storage's sectors, but I suppose it's less costly on the battery life.

Is there a way to mount cifs file system?

Hi!
I have managed to browse cifs and browse/read/write files.
but I really want to actually mount cifs to be part of the file system. Best would be to mount cifs as an SD card so I could install large apps onto network drive directly.
Is there an APP which can do this?
Tried Mount manager but it never going to work. It needs 'cifs.ko' and 'slow-work.ko' and there is no such things for S5. I tried many of those files but none of them gets actually loaded.
I'm using phone as stock, rooted.

[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