dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
21
share rss forum feed

unibroker
Premium
join:2010-11-12
Altadena, CA

1 edit
reply to Maxo

Re: adb umount problems

It returns: sudo umount /dev/
umount: /dev: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))


Don't I have to use a more specific path because there are other 'dev' mounted (hard drive)? I added /sdcard to what you suggested but that just returned 'not found'.

I've done a 'lsusb' and it returned Bus 001 Device 004: ID 18d1:2d03 Google Inc among others but this is my device. Not sure how to use this info to unmount.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
Sorry, the formatter took away my carrots.

unibroker
Premium
join:2010-11-12
Altadena, CA
According to Ubuntu 12.04 my device is not attached. Nautilus tells me it's not and the is sdcard and terminal tells that's not found. However, when I'm in adb shell it tells me the sdcard is busy. When I try to su mount sdcard it tells me I lack permission (umount is not recognized). The different scenarios in adb shell follow.

root@android:/ # su umount /sdcard/
Unknown id: umount
1|root@android:/ # su umount
Unknown id: umount
1|root@android:/ # su mount /sdcard/
sh: /sdcard/: Permission denied


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
Are you trying to unmount the sdcard in your Android phone from the Android OS?

unibroker
Premium
join:2010-11-12
Altadena, CA
I'm trying to unmount my device from my pc which is connected through adb. The push was to the sdcard in my device so I assume that is the connection I'm trying to properly break. Kind of strange that the device used to appear in nautilus and gparted for that matter under dev/sdg and dev/sdh but push never worked. To get around that I'd just drag the zip to the device in nautilus. Recently the device hasn't appeared in nautilus/gparted (does in terminal) but I am able to do a push as I see the file under Root Explorer of my device.

I have been dealing with this for the last week. I've thought about completely uninstalling the sdk and reinstalling it but that may be a time-consuming wasted effort. Thanks for the input by the way.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
When you run adb shell, you are then at the shell on your phone. All commands you type are then executed by your phone. /sdcard/ on your phone represents the sdcard on your phone. You need to run commands on your PC to unmount devices from it.

unibroker
Premium
join:2010-11-12
Altadena, CA
All of the activities described have been done from the pc. The only one that hasn't has been the observation of a successful push in the Root Explorer of my device/phone.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
reply to unibroker
said by unibroker:

root@android:/ # su umount /sdcard/
Unknown id: umount
1|root@android:/ # su umount
Unknown id: umount
1|root@android:/ # su mount /sdcard/
sh: /sdcard/: Permission denied

Every single one of those commands where executed on your phone, not your computer.
--
"Padre, nobody said war was fun now bowl!" - Sherman T Potter

»maxolasersquad.com/

»maxolasersquad.blogspot.com

»www.facebook.com/maxolasersquad

unibroker
Premium
join:2010-11-12
Altadena, CA

1 edit
I stand corrected. I was at my pc. Now I'm getting a clearer picture of what's going on.

I'm still stuck as to why I can't umount from my phone's sdcard.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
From the adb shell just type "exit" without the quotes to break the adb connection.
After that you should be able to cleanly unmount using Nautilus.


EUS
Kill cancer
Premium
join:2002-09-10
canada
Reviews:
·voip.ms
reply to unibroker
said by unibroker:

According to Ubuntu 12.04 my device is not attached. Nautilus tells me it's not and the is sdcard and terminal tells that's not found. However, when I'm in adb shell it tells me the sdcard is busy. When I try to su mount sdcard it tells me I lack permission (umount is not recognized). The different scenarios in adb shell follow.

root@android:/ # su umount /sdcard/
Unknown id: umount
1|root@android:/ # su umount
Unknown id: umount
1|root@android:/ # su mount /sdcard/
sh: /sdcard/: Permission denied

You're already root, and you're confusing the poor device by calling "su", hence the errors.
--
~ Project Hope ~

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to Maxo
The device never shows up in Nautilus. Before it did and that was how I "Safely Removed Device". How can the device be listed in a bash terminal but not in Nautilus.

This thing is maddening. Before when I could see the device in Nautilus and would push to the sdcard, I could never find the file I pushed. Now when I can see the file I pushed the device has disappeared from nautilus so I can't safely unmount! Obviously this is user-error. Maybe that's why Apple makes a locked bootloader for customers like me.

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to EUS
I initially started without su and with umount got that the device was busy.


EUS
Kill cancer
Premium
join:2002-09-10
canada
Reviews:
·voip.ms
How about starting over and posting the proper output from the proper device, so we can see what's happening, and give some good advice?
That was not meant to rhyme.
--
~ Project Hope ~


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
reply to unibroker
said by unibroker:

Maybe that's why Apple makes a locked bootloader for customers like me.

People like you are the best. Those who try, fail, learn, and then succeed are the best.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
reply to EUS
said by EUS:

How about starting over and posting the proper output from the proper device, so we can see what's happening, and give some good advice?

Agreed. Restart from "adb shell" and then copy everything you do into this thread.

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to EUS
This is the output from BASH of lsusb:

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 002: ID 03f0:110c Hewlett-Packard
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 009: ID 18d1:2d03 Google Inc


The device is the last one. Presently the device doesn't show in nautilus.

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to Maxo
okay

unibroker
Premium
join:2010-11-12
Altadena, CA

1 edit
adb devices
List of devices attached
2010720135452002 device


adb shell
root@android:/ #


adb shell
root@android:/ # umount /sdcard/
failed: Device or resource busy


I don't know why I am logged into the adb shell as root. I never login as root.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
If you want to transfer a file from your PC to your phone try this.

~ touch ~/foo
~ adb push ~/foo /sdcard/
~ adb shell
shell@android:/ $ cd /sdcard
shell@android:/sdcard $ ls -l foo
-rw-rw-r-- root sdcard_rw 0 2012-11-30 13:41 foo
shell@android:/sdcard $ exit
~

--
"Padre, nobody said war was fun now bowl!" - Sherman T Potter

»maxolasersquad.com/

»maxolasersquad.blogspot.com

»www.facebook.com/maxolasersquad


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
reply to unibroker
said by unibroker:

adb devices
List of devices attached
2010720135452002 device


adb shell
root@android:/ #


adb shell
root@android:/ # umount /sdcard/
failed: Device or resource busy

Those commands, if it actually worked, would unmount the sdcard that is inside your phone, from the Android OS.
--
"Padre, nobody said war was fun now bowl!" - Sherman T Potter

»maxolasersquad.com/

»maxolasersquad.blogspot.com

»www.facebook.com/maxolasersquad

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to Maxo
Is my particular filename in this? This looks more complicated than my single push command but if it'll allow me to transfer and to safely remove device I'm willing to give it a try.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
The foo in my example is just a placeholder. Replace it with the actual file on your PC.
When you transfer a file with adb push the filesystem on your phone is never mounted to your computer so no mounting or unmounting is needed. You can simply exit out of the adb shell and unplug your phone. adb push and adb pull are the best two commands for transferring files to and from your computer.

Edit: And you don't need to run the touch command. I just used that to create an empty file.

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to Maxo
So when I type "exit" from adb shell that umounts at the same time? I don't mount manually so this would make sense.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
said by unibroker:

So when I type "exit" from adb shell that umounts at the same time?

The device never got mounted in the first place, so there is no need to unmount it.
Mounting allows the filesystem of a device to exist in the tree of the PC. Instead, with adb, we are creating a connection similar to SSH or even telnet.

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to Maxo
# ls -l cm-10-20121129-UNOFFICIAL-encore.zip
----rwxr-x system sdcard_rw 157698499 2012-11-28 20:22 cm-10-20121129-UNOFFICIAL-encore.zip


Looks like I have no permissions and Group has them all! Even everyone else has more than me.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
said by unibroker:

# ls -l cm-10-20121129-UNOFFICIAL-encore.zip
----rwxr-x system sdcard_rw 157698499 2012-11-28 20:22 cm-10-20121129-UNOFFICIAL-encore.zip


Looks like I have no permissions and Group has them all! Even everyone else has more than me.

I think when you connect over adb you are automatically part of the sdcard_rw group.
If you are looking to flash to this cm rom, your custom bootloader should be able to do it.

unibroker
Premium
join:2010-11-12
Altadena, CA
I think you are correct because all of my files in the sdcard are listed the same way. I knew it was user error based on my history with everything having to do with tech. You kind sir are a gentleman and a scholar. Very much appreciated!

unibroker
Premium
join:2010-11-12
Altadena, CA
reply to Maxo
After our discussion I tried to flash what I had pushed. It failed. I restored my prior ROM and noticed in Root Explorer that the file I had pushed which had originally said 150MB now said 0. Again, I read yesterday that this happens when not properly unmounting.

So I flashed the ROM that I had previously used and when I hooked up adb the device shows up in nautilus. I also get a notice on my device "USB Storage In Use. Before turning off USB Storage make sure that you have unmounted (ejected) your Android SD Card from your computer." Note that this ROM is Gingerbread whereas the other ROM is Jellybean. The outputs under this scenario from BASH are below (note the device is now B&N Nookcolor). In nautilus I then drag and drop my cm file from my computer to the device and select Safely Remove Drive.

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 002 Device 002: ID 03f0:110c Hewlett-Packard
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 010: ID 2080:0002 Barnes & Noble NOOKcolor

adb devices
List of devices attached
2010720135452002 device

$ adb shell# cd sdcard
# ls -a
. ..
# umount /sdcard
umount: can't umount /sdcard: Invalid argument


Notice that the only contents of my "sdcard" are pointers to the existing directory and the parent. When I would push the file it would end up here but could not be found on the device's sdcard. To add to the comedy I've just successfully flashed the zip file!

Apparently Gingerbread operates as mass storage and Jellybean adb when the usb cable is attached between the device and pc. I need adb to work if I'm to do the tinkering I want.

Thanks for your time.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
I'm running CM10 on my Galaxy S3 and cannot get mass storage to work. Every time I select it it goes back to MTP but still doesn't show up in Nautilus. When using the device as a mass storage device it is trivial to move files to and from the sdcard using Nautilus.
I've used adb push and adb pull to move files back and forth with good success on Jellybean.