Mount Transformer to Linux Mint - automated.

Search This thread

rootblock

Senior Member
Jun 30, 2010
50
13
Hey TF owners,

For anyone looking for a way to mount their Transformer to Linux Mint, I wrote a script to automate the process of configuring your machine to allow you to browse/modify files on the tablet's SSD. This will probably also work on Ubuntu, but I have only so far tested it on Linux Mint.

Download the attached file, and run it.

Edit: Connect your Transformer to your PC before running.
Edit 2: You only need to run this script once - not every time you connect the tablet to your PC.

Hit the thanks button/comment if this worked for you. If not, also comment and I/someone will probably help you out. Also, if anyone tests it on Ubuntu successfully, be sure to comment and let people know.

Note: All configuration files are backed up in the script before changes are made. You can always revert safely.

I'll throw in the ever so popular "use at your own risk" for safe measure.

Cheers.

June 29: Updated script uploaded.
-Cleaner
-Removes an unnecessary comment pushed into fstab in the previous script
-Already executable. Just run it. [Thanks MagnusRagnarok for the idea]
-Packed in 7z from Linux Mint this time as opposed to in zip format from the TF, for [hopefully] universal accessibility.
-md5sum 615f2bfa820ee9ac8ea2c967149a2f03 TransformerMount2.7z
 

Attachments

  • TransformerMount2.7z
    1 KB · Views: 4,297
Last edited:

0lddirtypaki

Member
Apr 6, 2010
12
0
ok so maybe a stupid question, but does my tf need to be rooted to try this? also if you can create an automated script to install a linux distro you think it would be possible for you to create a script to root?? btw any idea on what actually works? can the tegra 2 run with compiz??
 

Budadank

Senior Member
Jul 5, 2006
172
12
ok so maybe a stupid question, but does my tf need to be rooted to try this? also if you can create an automated script to install a linux distro you think it would be possible for you to create a script to root?? btw any idea on what actually works? can the tegra 2 run with compiz??

I thin you've misunderstood the intention of the OP.

It was to be able to mount your Transformer under Linux and be able to read/write the files stored on the Transformer's internal storage. Not to actually install a full blown Linux Distro on your Transformer.
 
  • Like
Reactions: I-IoLLoW

3DSammy

Senior Member
May 5, 2011
1,252
617
Toronto
I have a problem extracting the zip file with Ubuntu 10.10
Do I need an alternate unzip program? If so please specify. I do not run MS products.

Error:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: /tmp/TransformerMount.zip

Extracting TransformerMount.bash Unsupported Method

Sub items Errors: 1
 

rootblock

Senior Member
Jun 30, 2010
50
13
I can extract it with 7zip on Windows on the work computer, and with both Explorer and AndroZip on the TF without issue.

Sent from my Milestone using XDA App
 

ku4tp

Member
Nov 24, 2009
11
2
Acer Mod of the script

I'm trying to edit the file for use with an Acer Iconia. So far everything works but the modifying of the android.rules file. You see, it doesn't exist on my laptop (mint 11) in the directory the script looks at nor is there an android.rules file in lib/udev/rules.d. While I could probably write a rules file and make it work, I'd like to know where it comes from and maybe discover why it does not exist on my system. Anyone have any ideas? Also - rootblock - if I can get this to work would you object to my posting it in the Iconia forum? Thanks!

UPDATE:
Creating the file worked fine. Any reason to edit the script to check if the file exists and create it if it doe not or am I the exception to the rule? i.e. Would most users have it there in the first place?
 
Last edited:

Tortel1210

Retired Recognized Developer
Dec 3, 2010
189
392
I have a problem extracting the zip file with Ubuntu 10.10
Do I need an alternate unzip program? If so please specify. I do not run MS products.

Error:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: /tmp/TransformerMount.zip

Extracting TransformerMount.bash Unsupported Method

Sub items Errors: 1

Probably a bad download. And you could also try file-roller to open it (I think its installed by default, it is on Debian/Gentoo)
 

roebeet

Senior Member
Jul 15, 2010
3,487
1,405
Pennsylvania
I have a problem extracting the zip file with Ubuntu 10.10
Do I need an alternate unzip program? If so please specify. I do not run MS products.

Error:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: /tmp/TransformerMount.zip

Extracting TransformerMount.bash Unsupported Method

Sub items Errors: 1

Had the same issue with Archive manager - Xarchiver worked, however.
 
  • Like
Reactions: 3DSammy

azizmulhim

Senior Member
Oct 18, 2010
88
5
Last edited:
  • Like
Reactions: turfreijer

ari197

Senior Member
Jul 16, 2009
317
10
Jakarta
just wondering, would this have any effect for the adb connections ? My ubuntu cannot find the transformer from adb but could mount it just find
 

MagnusRagnarok

Retired Recognized Developer
Dec 31, 2009
1,745
632
CYBERTRON
Try This....

anyone having issues try one of the following extensions.. tar.gz would be my first suggestion for those using ubuntu like myself. i also took the liberty of changing the perms to exe on the script before i compressed all these so now all you need to do is

1.download the extension pack i upped
(find the one that works for you)
2.open file
3.execute

*i also tossed the edited script in the pack for anyone who cannot get it to open.

fyi; ark also worked for me to access the file from the op, while my 7z kept erroring out.
 

Attachments

  • TF_sh.ExtensionPack.zip
    6.2 KB · Views: 167

rootblock

Senior Member
Jun 30, 2010
50
13
just wondering, would this have any effect for the adb connections ? My ubuntu cannot find the transformer from adb but could mount it just find

I can access the TF with adb just fine. Just cd to the android-sdk-linux_x86/platform-tools folder containing adb and run:

Code:
./adb devices
or
Code:
./adb shell

if that folder isn't already configured into your path. Works for me anyway.
 

foh1981

Senior Member
Aug 20, 2008
55
8
Örebro
I've been looking at this and trying to do it with udev instead, since I want the dynamic creation of the folder in /media. Mounting works great, but removing doesn't. So anyone with knowledge of udev rules is more than welcome to give me some hints. Here's the rules so far:
Code:
See below...

The command run when removing works if I enter it as root in a terminal, so it seems to me that it's either not run when removing or it's failing somehow when run from udev. Edit: I've figured out that it's not run at all. Looking into it...

Also, hint for those who follow the manual instructions you could also get the necessary permissions through Users and Groups instead of editing the groups file. You still have to edit /etc/fuse.conf to allow other though.
 
Last edited:

foh1981

Senior Member
Aug 20, 2008
55
8
Örebro
These are instructions for automatically mounting and unmounting your pad (not keyboard!). This will create (when plugged in and detected) and remove (when unplugged) the Transformer directory under /media, so that the experience is more in line with other USB devices.

For those of you who already have run the script in the first post, you need to do some cleanup. Edit /etc/fstab and /etc/udev/rules.d/51-android.rules and remove the lines which the script created. Which lines in fstab should be straight forward, and in 51-android.rules look for rows that either have no idVendor set or has it set to 0b05. If unsure, post here FIRST before making changes!

This is the content of /etc/udev/rules.d/51-android.rules:
Code:
ACTION=="add", SUBSYSTEM=="usb", ENV{ID_MODEL}=="MTP", ENV{ID_MODEL_ID}=="4e0f", MODE="0666", RUN+="/bin/bash -c 'mkdir -p /media/Transformer && mtpfs /media/Transformer -o allow_other'"
ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_MODEL}=="MTP", ENV{ID_MODEL_ID}=="4e0f", RUN+="/bin/bash -c 'fusermount -u /media/Transformer && rmdir /media/Transformer'"

If you have other Android devices you may or may not have other lines here too. If so, just add these two lines to the end of the file. My Transformer is bought in Sweden so if things don't work for you, maybe there's another idProduct/ID_MODEL_ID out there? Check with lsusb when your pad is plugged in, the vendor (xxxx) and product (yyyy) ID is [xxxx:yyyy] on the line that says ASUSTek Computer Inc. For my pad, the productID/ID_MODEL_ID is 4e0f.

You need to uncomment allow_other in /etc/fuse.conf and add your user to the fuse group (preferably via Users and Groups) apart from adding the above two lines to your 51-android.rules:

  • Start Users and Groups, choose your user and press Advanced settings. Under the tab User Privileges you should mark Mount user-space filesystems (FUSE).
  • Open and edit /etc/fuse.conf (see below on how to use nano). Uncomment user_allow_other in the end (remove the # at the beginning of the line).

After this you should reboot your computer. This will have two effects: The udev rules will be reloaded so the changes apply, and your user will have the necessary privileges granted.

Now you can try to plug in your pad and see if it shows up under /media. Give it some time, it takes a while. (Approx. 30 seconds for me.)

A note on editing files from the terminal window
When editing files from the terminal I always use nano. The command is (if opening a file that requires super user rights):
sudo nano [path-to-file]
The editing is straightforward, works just like any other text editor. When you're finished, press Ctrl+X (Exit) and answer the question with Y (if your system is in english that is) if you want to overwrite the earlier file.

Problems?
If you have ADB activated you could try rmbell's udev rules. This removes the match ID_MODEL == MTP and changes the productID to 4e1f. The productID changes depending on what functions are activated, as discussed in this post by ritterkeks. If you want the pad to be mounted with and without ADB activated, you can add all four rules.

If the udev rules doesn't work, run this command in the terminal and see what happens when you plug the pad in:
udevadm monitor --property --udev
Exit with Ctrl+C. Are the values the same as in the udev rules you're using? If not, change accordingly or deactivate some function which has made the productID change.
 
Last edited:
  • Like
Reactions: confiq and rmbell

reisa

Senior Member
Aug 9, 2010
174
9
"unable to mount location" error

I'm getting an error that reads "Unable to mount location"

Then:
fusermount: failed to open /etc/fuse.conf: Permission denied
fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf

I'm a monkey in a spaceship when it comes to some of this stuff :D Any idea what I should do (in layman's terms)?

All help appreciated!
 

foh1981

Senior Member
Aug 20, 2008
55
8
Örebro
I'm not sure if your problem is from the script in the first post or my instructions. But as the message says you need to edit fuse.conf. Also, you need to be a member of the FUSE group.

Open and edit fuse.conf with this command in a terminal:
sudo nano /etc/fuse.conf
Uncomment (remove the #) user_allow_other in the end, exit with Ctrl+X and save with Y.

Start Users and Groups, choose your user and press Advanced settings. Under the tab User Privileges you should mark Mount user-space filesystems (FUSE). I believe that you need to reboot after this change, otherwise the necessary privileges hasn't kicked in.

Try it and let me know :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Hey TF owners,

    For anyone looking for a way to mount their Transformer to Linux Mint, I wrote a script to automate the process of configuring your machine to allow you to browse/modify files on the tablet's SSD. This will probably also work on Ubuntu, but I have only so far tested it on Linux Mint.

    Download the attached file, and run it.

    Edit: Connect your Transformer to your PC before running.
    Edit 2: You only need to run this script once - not every time you connect the tablet to your PC.

    Hit the thanks button/comment if this worked for you. If not, also comment and I/someone will probably help you out. Also, if anyone tests it on Ubuntu successfully, be sure to comment and let people know.

    Note: All configuration files are backed up in the script before changes are made. You can always revert safely.

    I'll throw in the ever so popular "use at your own risk" for safe measure.

    Cheers.

    June 29: Updated script uploaded.
    -Cleaner
    -Removes an unnecessary comment pushed into fstab in the previous script
    -Already executable. Just run it. [Thanks MagnusRagnarok for the idea]
    -Packed in 7z from Linux Mint this time as opposed to in zip format from the TF, for [hopefully] universal accessibility.
    -md5sum 615f2bfa820ee9ac8ea2c967149a2f03 TransformerMount2.7z
    2
    Try This....

    anyone having issues try one of the following extensions.. tar.gz would be my first suggestion for those using ubuntu like myself. i also took the liberty of changing the perms to exe on the script before i compressed all these so now all you need to do is

    1.download the extension pack i upped
    (find the one that works for you)
    2.open file
    3.execute

    *i also tossed the edited script in the pack for anyone who cannot get it to open.

    fyi; ark also worked for me to access the file from the op, while my 7z kept erroring out.
    2
    These are instructions for automatically mounting and unmounting your pad (not keyboard!). This will create (when plugged in and detected) and remove (when unplugged) the Transformer directory under /media, so that the experience is more in line with other USB devices.

    For those of you who already have run the script in the first post, you need to do some cleanup. Edit /etc/fstab and /etc/udev/rules.d/51-android.rules and remove the lines which the script created. Which lines in fstab should be straight forward, and in 51-android.rules look for rows that either have no idVendor set or has it set to 0b05. If unsure, post here FIRST before making changes!

    This is the content of /etc/udev/rules.d/51-android.rules:
    Code:
    ACTION=="add", SUBSYSTEM=="usb", ENV{ID_MODEL}=="MTP", ENV{ID_MODEL_ID}=="4e0f", MODE="0666", RUN+="/bin/bash -c 'mkdir -p /media/Transformer && mtpfs /media/Transformer -o allow_other'"
    ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_MODEL}=="MTP", ENV{ID_MODEL_ID}=="4e0f", RUN+="/bin/bash -c 'fusermount -u /media/Transformer && rmdir /media/Transformer'"

    If you have other Android devices you may or may not have other lines here too. If so, just add these two lines to the end of the file. My Transformer is bought in Sweden so if things don't work for you, maybe there's another idProduct/ID_MODEL_ID out there? Check with lsusb when your pad is plugged in, the vendor (xxxx) and product (yyyy) ID is [xxxx:yyyy] on the line that says ASUSTek Computer Inc. For my pad, the productID/ID_MODEL_ID is 4e0f.

    You need to uncomment allow_other in /etc/fuse.conf and add your user to the fuse group (preferably via Users and Groups) apart from adding the above two lines to your 51-android.rules:

    • Start Users and Groups, choose your user and press Advanced settings. Under the tab User Privileges you should mark Mount user-space filesystems (FUSE).
    • Open and edit /etc/fuse.conf (see below on how to use nano). Uncomment user_allow_other in the end (remove the # at the beginning of the line).

    After this you should reboot your computer. This will have two effects: The udev rules will be reloaded so the changes apply, and your user will have the necessary privileges granted.

    Now you can try to plug in your pad and see if it shows up under /media. Give it some time, it takes a while. (Approx. 30 seconds for me.)

    A note on editing files from the terminal window
    When editing files from the terminal I always use nano. The command is (if opening a file that requires super user rights):
    sudo nano [path-to-file]
    The editing is straightforward, works just like any other text editor. When you're finished, press Ctrl+X (Exit) and answer the question with Y (if your system is in english that is) if you want to overwrite the earlier file.

    Problems?
    If you have ADB activated you could try rmbell's udev rules. This removes the match ID_MODEL == MTP and changes the productID to 4e1f. The productID changes depending on what functions are activated, as discussed in this post by ritterkeks. If you want the pad to be mounted with and without ADB activated, you can add all four rules.

    If the udev rules doesn't work, run this command in the terminal and see what happens when you plug the pad in:
    udevadm monitor --property --udev
    Exit with Ctrl+C. Are the values the same as in the udev rules you're using? If not, change accordingly or deactivate some function which has made the productID change.
    1
    ok so maybe a stupid question, but does my tf need to be rooted to try this? also if you can create an automated script to install a linux distro you think it would be possible for you to create a script to root?? btw any idea on what actually works? can the tegra 2 run with compiz??

    I thin you've misunderstood the intention of the OP.

    It was to be able to mount your Transformer under Linux and be able to read/write the files stored on the Transformer's internal storage. Not to actually install a full blown Linux Distro on your Transformer.
    1
    I have a problem extracting the zip file with Ubuntu 10.10
    Do I need an alternate unzip program? If so please specify. I do not run MS products.

    Error:
    7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
    p7zip Version 9.04 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

    Processing archive: /tmp/TransformerMount.zip

    Extracting TransformerMount.bash Unsupported Method

    Sub items Errors: 1

    Had the same issue with Archive manager - Xarchiver worked, however.