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
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??
0lddirtypaki said:
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??
Click to expand...
Click to collapse
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.
Wow, talk about reading before posting.
Sent from my Transformer TF101 using XDA Premium App
only on linux mint--
does it work on ubuntu?
Yes, this works perfectly on ubuntu
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
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
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?
3DSammy said:
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
Click to expand...
Click to collapse
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)
Tortel1210 said:
Probably a bad download
Click to expand...
Click to collapse
I installed the "p7zip" deb, re-downloaded a few times with Firefox and even tried wget. Each time I get the same error result. I was more interested in examining the bash file as I do not have a TF yet. Oh well not a big deal.
3DSammy said:
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
Click to expand...
Click to collapse
Had the same issue with Archive manager - Xarchiver worked, however.
ubuntu & Asus transformer
If anyone having a problem with mtpfs on ubuntu especially version 10.4 ( segfault problem which prevents from mounting the TF), use newer version of mtpfs in the link below.
http://pkgs.org/download/debian-wheezy/debian-main-i386/mtpfs_0.9-3_i386.deb.html.
1. install the package
ubuntu> sudo dpkg -i mtpfs_0.9-3_i386.deb
2. Then run rootblock script if you did not do it.
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
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.
ari197 said:
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
Click to expand...
Click to collapse
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.
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.
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.
"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 Any idea what I should do (in layman's terms)?
All help appreciated!
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
Hello Everyone;
Quick intro: I just found this group while looking for tcsh to load on my Samsung Galaxy 10.1 tablet. First post.
I've been running Linux since 1995, Slackware 1.2 kernel, downloaded the source code over a 1200 Baud MODEM, Gen'd kernels, etc.
I just rooted the tablet and am loading Linux utilities on it.
--
I downloaded and installed the tcsh I found on here - written by corinna.
Two things:
1. Question: where is tcsh looking for the .tcshrc file? I made /root my home but I have to source the .tcshrc file (works fine).
I use <.logout> to copy my <history> to a logfile. I find this to be a great idea - because if something gets messed-up, I can backtrace the commands. Every year I copy it to history.[year] and can look up everything I've ever done to the system.
2. The anomaly: If I do "history >> logfile" on the command line, it works as expected - but if I put that command in a shell file, the history does nothing.
Sample shellfile
#!/bin/tcsh -f
echo `date` >> /root/Log/history.log
history >> /root/Log/history.log
history -c
cp /dev/null /root/.history
--
The dates appear in the file, but no data from the history.
I am THRILLED that corinna ported tcsh to Android - because it is my favorite shell.
regards,
TOMOTH
Fixed One Problem
Solved the "source .tcshrc" problem: had to put the .tcshrc file in the / directory.
regards,
TOMOTH
Hello all,
I got the following issue:
I dirtyflashed a custom Marshmallow ROM and now I am stuck with UI issue (theme conflict). Unable to access to home or parameters.
I don't care about all my stuff in it, except SMS/MMS.
I made a nandroid backup of all my FS and reinstall a clean rom (but it is another story).
So, I search how to extract my sms from this nandroid backup.
I found this thread fyi (and many other ways..)
http://forum.xda-developers.com/showthread.php?t=1585957
It is about to convert DB which host SMS/MMS (mmssms.db) to xml.
BUT, mmssms.db is depracted on Android 5+
Anyway, I found all my sms/mms into bugle_db file. Database from Google Messenger app, not OS DB (/data/data/com.google.apps.messaging/databases)
And I tried many restore options (using Titanium and nandroid extract, etc..)
Messenger reload DB from OS. (maybe security conflict too, well..)
Conclusion, I got many way to resolv this issue:
- Find the new DB used (into /system I guess), to restore it
If you know that, I will be glad to know I found nothing about.
- Find or dev a tool to convert sms app store file to xml
i.e. bugle_db file for Google Messenger app to xml for SMS&backup (same as yaffs extractor)
Maybe someone can easiley adapt yaffs extractor to bugle_db structure.
- Go forget about all my sms
hope someone can help me on it
I have a similar issue and this is what I found, I hope it will help you if you still need it or at least someone else that is searching for an answer.
Tim O'Brien has created a tool in python call smstools and here is the git. (github.com/t413/SMS-Tools)
p1ne has added the support for bugle_db to this tool and can be downloaded here (github.com/p1ne/SMS-Tools/archive/master.zip)
I have never used python so I needed to figure things out.
I have Windows 10
First it did not work with python 3.6.1
I did get it working with python 2.7.13,
download and install python 2.7.13 "Windows x86-64 MSI installer" (seemed like the best option)
I set up the PATH for less typing but its not needed, here is a link for how to (howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/)
downloaded the above zip from p1ne github and extracted to c:\tsms (doesn't matter the location i just wanted it short)
copied my saved bugle_db file to the same directory c:\tsms
opened cmd or powershell and navigated directory C:\tsms\SMS-Tools-master\
installed smstools by typing
C:\Python27\python.exe setup.py install
I then typed
python C:\tsms\SMS-Tools-master\bin\smstools C:\tsms\bugle_db C:\tsms\out.xml
Since this defaults to an android xml backup I did not add any flags to the end but you could convert the output to several outputs with --type flag. You will need to read the git to see the supported outputs.
If you didn't set your PATH you would type
C:\Python27\python.exe C:\tsms\SMS-Tools-master\bin\smstools C:\tsms\bugle_db C:\tsms\out.xml
Hopefully all went well and you get a message like this.
6708 messages read in 0 seconds from bugle_db using parser smstools.bugle.Bugle
latest text: 2017-04-23 07:36:50 PM US Time Zone to +**************:
Parts arrived
sorting all 6708 texts by date
You should have a new file called out.xml in the C:\tsms directory
Copy this to your android phone and restore with SMS Backup & Restore
Hope this all works out for anyone in need.
o1hitman1o said:
I have a similar issue and this is what I found, I hope it will help you if you still need it or at least someone else that is searching for an answer.
Tim O'Brien has created a tool in python call smstools and here is the git. (github.com/t413/SMS-Tools)
p1ne has added the support for bugle_db to this tool and can be downloaded here (github.com/p1ne/SMS-Tools/archive/master.zip)
I have never used python so I needed to figure things out.
I have Windows 10
First it did not work with python 3.6.1
I did get it working with python 2.7.13,
download and install python 2.7.13 "Windows x86-64 MSI installer" (seemed like the best option)
I set up the PATH for less typing but its not needed, here is a link for how to (howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/)
downloaded the above zip from p1ne github and extracted to c:\tsms (doesn't matter the location i just wanted it short)
copied my saved bugle_db file to the same directory c:\tsms
opened cmd or powershell and navigated directory C:\tsms\SMS-Tools-master\
installed smstools by typing
C:\Python27\python.exe setup.py install
I then typed
python C:\tsms\SMS-Tools-master\bin\smstools C:\tsms\bugle_db C:\tsms\out.xml
Since this defaults to an android xml backup I did not add any flags to the end but you could convert the output to several outputs with --type flag. You will need to read the git to see the supported outputs.
If you didn't set your PATH you would type
C:\Python27\python.exe C:\tsms\SMS-Tools-master\bin\smstools C:\tsms\bugle_db C:\tsms\out.xml
Hopefully all went well and you get a message like this.
6708 messages read in 0 seconds from bugle_db using parser smstools.bugle.Bugle
latest text: 2017-04-23 07:36:50 PM US Time Zone to +**************:
Parts arrived
sorting all 6708 texts by date
You should have a new file called out.xml in the C:\tsms directory
Copy this to your android phone and restore with SMS Backup & Restore
Hope this all works out for anyone in need.
Click to expand...
Click to collapse
Thanks! I am a python newer too. It works fine for me.
Btw, I found it needs another module 'unicodecsv', I taken this project 'python-unicodecsv' (github.com/jdunck/python-unicodecsv),and can be downloaded here(https://codeload.github.com/jdunck/python-unicodecsv/zip/master)
Hope it will help someone else.
Thanks
jiangchuanso said:
Thanks! I am a python newer too. It works fine for me.
Btw, I found it needs another module 'unicodecsv', I taken this project 'python-unicodecsv' (github.com/jdunck/python-unicodecsv),and can be downloaded here(https://codeload.github.com/jdunck/python-unicodecsv/zip/master)
Hope it will help someone else.
Click to expand...
Click to collapse
Thanks you just saved my day
I'm reviving this post to say it worked but not at 100%. But when I restore my messages, only recieved messages are saved and restored with bugle_db :/
It worked 100% for me but im using google messenger.
beware that write-ahead logging is enabled, so you need three files. make sure you work on copy because the files disappear/change on access.
Code:
bugle_db
bugle_db-wal
bugle_db-shm
here is how to use it on linux. I have tested on clean Xubuntu 20.04 LTS (from pendrive) so all dependencies should be fulfilled.
Code:
sudo apt update
sudo apt install wget git python2
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
git clone https://github.com/jdunck/python-unicodecsv
git clone https://github.com/Batambatam/SMS-Tools
sudo python2 get-pip.py
sudo python2 -m pip install ./python-unicodecsv blessings
cd SMS-Tools
sudo python2 setup.py install
cp -v com.google.android.apps.messaging/databases/bugle_db* .
smstools bugle_db messaging.xml
Let me start off with saying I'm sorry if this is the wrong place for this tread. I'm not entirely sure where a question like this would fit. Due to my low post count I can't post on any of the development sub forums.
On to the question:
I'm working on attempting to reverse engineer the ms zune's ( how many people remember what that is ) boot loader. I've having an issue extracting the boot loader files from it's windows ce container.
I've been following the link (due to my low post count it seems I can't post outside links ) which shows how to extract the other containers.
The zune calls it's boot loader zboot.bin and when I follow the instructions I get an error message from cvrtbin.exe stating "missing address option". The thing is I am including the address but because the image starts at 0x0 the program either ignores that line or decides that that address is invalid.
Before I reverse cvrtbin to force it to accept a 0x0 address, I want to ask 1) is there a reason why the program believes that 0x0 is somehow an invalid start address and 2) is there a program that will extract a windows ce container that doesn't check to see for os files? I was able to find another program osnbtool that also error-ed out but also stated it found no os files.
Thank you!
Edit Since I can't post outside links here is the text version of the instructions
Open a command prompt and cd to the directory containing your firmware image files. Do not use PowerShell - doing so will result in unexplained spurious corruption of the dumped files (e.g. incorrect executable headers).
Run \path\to\viewbin <imagename>.bin to display header information from the image.
Run \path\to\cvrtbin -r -a <start> -w 32 -l <length> <imagename>.bin using the start and length values produced by viewbin.exe, as shown in the screenshot below. These values are different for each firmware image, and will differ from the example here.
Create a directory to house the dumped files
Run \path\to\dumprom -d <dir> -v -5 <imagename>.nb0 to dump the contents of the firmware image
The directory you created should now contain all the files from the image you just dumped, suitable for analysis with anything that supports Windows CE ARM binaries (dumpbin, IDA, etc.).
Hi, I'm Almrond.
I have an interesting scenario: I have a PC with no wifi adapter and no hardliner internet. I have cables, offline storage, and a phone that can't tether anything because of carrier restrictions (Pixel 2 XL). I would really like to put Retroarch on this PC. How do I take a Linux machine that has no access to the internet whatsoever and put software on it using the internet connection my phone can't share?
The answer is Python and patience.
Anyone that has tried to install software manually on Linux know how much of a nightmare dependencies can be. Installing every .deb in the right order is tedious at best and destructive at worst. A cursory search brought me to
Code:
apt-offline
an incredibly useful tool, written in Python. Great, my PC has python,
Code:
./apt-offline set ./foobar.sig --install-packages baz bat
Now I have a file, foobar.sig.
Great, what even is this file?
This file is generated off of the list apt generates to install the packages baz and bat in the command issued earlier, it contains the dependencies and file MD5 checksums to fulfill and fully install the arbitrary baz and bat. Apt-offline can then be used again to download the packages on an internet connected PC to transfer back to the airgapped one for install.
Neato, but my internet connected "PC" is an Android phone, what now?
Python runs on everything nowadays, Android is no exception. The free option I use here is Qpython 3L. With the apt-offline folder in the /qpython/projects3 folder of the phone you can rename the ./apt-offline to "apt-offline.py". Opening this file and running it produces the help message and exits cleanly as no argument was given, when enter is pressed it brings us back to the editor.
How do we pass an argument to this program? I ended up placing double quotes in the main() function, making it
Code:
main("")
This errors the script but doesn't write the change to disk, allowing us to spawn the built-in shell that allows us to call an arbitrary python script as long as it has .py as the extension. My command looked like
Code:
/data/user/0/org.qpython.qpy3/files/bin/qpython3-android5.sh /storage/emulated/0/qpython/projects3/apt-offline-master/apt-offline.py get /storage/emulated/0/foobar.sig -d /storage/emulated/0/qpython
This downloads and dumps all of the .deb files to the /qpython/ folder at the root of the phone storage.
Yay! Packages!
Now I just need to copy the .deb files from my phone to the PC and run
Code:
./apt-offline install /usr/batman/packagesFromPhone/
followed by
Code:
apt install baz bat
to finish installing the packages baz and bat.
Thanks for reading my little adventure in playing a video game the other day, I hope someone finds it useful.
Almrond