6

I have a Samsung Galaxy S2 running rooted Jelly Bean 4.1.2. My computer is running Ubuntu 12.10.

Before, in Android 4.0, I simply plugged the USB in, and a notification would pop up, and I was offered a button to Turn on USB storage, and then my 12GB internal SD card and 16GB external SD card were both mounted as external drives. Nice and easy.

Now, to get the same thing, to connect my Android as a mass storage device, before I connect the USB cable, I have to go to Settings -> More Settings -> USB utilities and press Connect storage to PC, then plug in the cable, then press Turn on USB storage. It's a hassle and a half.

If I don't do it this way, when I connect the USB, it tries to connect with MTP. Which causes this error:

Unable to mount SAMSUNG_Android
Error initializing camera: -60: Could not lock the device

If I switch the connection mode to PTP, I get two devices, both called SAMSUNG_Android, only one of which (12GB internal) actually ever displays the contents. The other hangs.

In either case, MTP or PTP, if I have Banshee running when I connect my Android, it causes Banshee to crash. I use Banshee to sync my music collection.

The short story being that currently, connecting my Android to my computer is either complicated or doesn't work very well.

I've been told that USB mass storage is being deprecated, and MTP is the standard going forward. At the end of the day, I don't care if it's MTP, PTP, or mass storage that's used to connect my device. All I care is that it's as easy as it used to be. Plug it in, press a button, both drives are mounted and usable like any other drive.

How do I get this ease of function when connecting my Android to my USB.

5
  • 3
    As for MTP, you will need some special packages on your Ubuntu workstation (suggest to go AskUbuntu for that part). To switch USB mode automatically, you might want to take a look at Tasker (7 day trial on homepage) plus SecureSettings. Not sure if that specific setting is available, which is why I post this as comment ;)
    – Izzy
    Nov 27, 2012 at 7:39
  • @Izzy: Thank you for the suggestion. However, it seems that Tasker and SecureSettings have USB tether options, but no USB connection options.
    – Questioner
    Nov 28, 2012 at 0:13
  • That's a pity! I didn't see them mentioned explicitly (so I was already afraid of that), but thought there might be hope... As there are plenty of Tasker/Locale addons around: Maybe there's another one that can do? There's a list of apps supporting Tasker (plus other material on this) at this AndroidPIT thread (German), to make it easier to isolate/find them on the playstore...
    – Izzy
    Nov 28, 2012 at 0:21
  • 1
    Make sure to let us know when you've found an answer, Dave! I just got an Ace 2 last week, and now I'm sitting with the very same problem: It always connects via MTP as soon as the cable is put in. To make it using UMS, I have to go to settings->wireless & networks->usb, select UMS, and then plug in the cable. Each time! No way to make it default... :(
    – Izzy
    Feb 10, 2013 at 2:21

3 Answers 3

1

With the problems I had with different devices and versions of Android, I found that the most effective and the easiest way to access files on my device is to use AirDroid. Although this will not mount the Android device as a file system, but will allow an easy file transfer. All you need is a wireless connection of your phone to your local network. Once AirDroid is started, you get a web interface that you can access from your desktop computer's browser, using the port 8888. AirDroid is a free application on the Play Store and received great scores so far from everyone.

3
  • 1
    By the way: Your device does not need to be rooted, as far as I know.
    – jfmessier
    Nov 27, 2012 at 19:40
  • Thanks for this tip, but if I connect by Airdroid, can I also sync my music files in Banshee? I'm looking to have all the functionality I had with USB mass storage previous to upgrading to 4.1.2.
    – Questioner
    Nov 28, 2012 at 0:01
  • AirDroid is a web-based management system for Android devices. There is no sync function as per se, but you certainly can transfer files as you see fit. And if your device is rooted, you have access to all directories and files.
    – jfmessier
    Nov 29, 2012 at 3:43
1

A developer on the XDA forums provided a script that changes the default behaviour so that connecting by USB mass storage is the default behaviour:

#!/system/bin/sh
setprop persist.sys.usb.config mass_storage,adb

I had to use a file manager app that gave me access to the root directory, I placed the script in /system/etc/init.d/, changed the script's permissions to rwxr-xr-x, and then rebooted the phone.

Now I have the full functionality and ease of use I hoped for. I'll probably eventually have to use to something like MTP or whatever, but hopefully in the meantime while proper support is developed by all relevant parties, I won't have to suffer.

1
  • 1
    New to android - do I have to root the device prior to editing a file in /system.. Shady isn't seeing the root file system.
    – a coder
    Feb 19, 2013 at 22:57
0

For users who were out of luck with mtpfs, jmtpfs, go-mtpfs or any other libraries which depend on libmtp; try android-file-transfer.

It does not depend on libmtp and thus free from inherent bugs, is the most up-to-date mtp library I have seen on github (as of May 2018), and also can be used with FUSE, although I personally recommend to use its own Qt based GUI to avoid possible FUSE back-front interaction bugs.

Just make sure you DO NOT open your MTP device using any default mechanisms provided by your linux distro, e.g. clicking on Open when the device-connected notification pops up!

github: https://github.com/whoozle/android-file-transfer-linux

PPA: https://launchpad.net/~samoilov-lex/+archive/ubuntu/aftl-stable

Read about MTP on linux: https://wiki.archlinux.org/index.php/MTP

P.S.: I'm only a user of the this application.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .