MTP files transfer on LinuxMint / Ubuntu quick how to - Sony Xperia P, U, Sola, Go

Hi,
I always had problem with mtp and GB on linux. With the ICS update I couldn't even find my device listed by nautilus. I'm a little bit tired of using Airdroid, wich seems to be slower now and I never liked to download the pictures from it as a zip file.
for those who like to MTP transfer from xperia NXT series on Mint or Ubuntu:
add this repository Olci PPA launchpad.net/~olci/+archive/ppa1
it contains the new libmtp library, the new mtpfs and gmtp
with this command: sudo add-apt-repository ppalci/ppa1
then update & upgrade if already installed
or
update and install libmtp libmtpfs gmtp
from terminal launch gmtp
wait for a little bit (it takes a while)
once in gmtp go to preferences and set your directories for upload download
and there you go
finally can control and backup everything in your sd to your linux system

there is a smile on the command
sudo add-apt-repository ppalci/ppa1
how can I remove it?

Damn that's my ppa if anyone got questions or issues on that ppa
I can help
Sent from my haida

Thank you so much for the ppa and your job, a friend sms that to me today as we were searching for mtp on mint. I tried it worked and i wanted to share it.
Sent from my ST25a using xda app-developers app

Or you could use Airdroid for file transfers. It's what I use on my Linux laptop.

uao said:
there is a smile on the command
how can I remove it?
Click to expand...
Click to collapse
Code:
sudo add-apt-repository ppa:olci/ppa1
damn can't fix
Sent from my haida

@ The Alpha Gamer
As I wrote I already use airdroid and I'm tired of it. Still it's out topics.
This thread is about xperias, MTP and linux which are working thanks to that ppa
Sent from my ST25a using xda app-developers app

Related

Access Filesystem from Java application on PC

So, the MTP transfer on newer Android devices sucks and I hate not having an ETA/Speed display using adb push. Is there anyway to access the Android filesystem (doesn't need to be a root-owned directory; /mnt/sdcard would be fine) over USB? ie. open a FileOutputStream to a file/dir on my device from a java application on my pc?
I'm assuming the easiest answer is to set up a server for ftp/sftp/ssh on my device and connect that way but it would be nice just to access it as if it were mounted on my local PC as a local drive. Any ideas? Thanks!
sanosuke001 said:
So, the MTP transfer on newer Android devices sucks and I hate not having an ETA/Speed display using adb push. Is there anyway to access the Android filesystem (doesn't need to be a root-owned directory; /mnt/sdcard would be fine) over USB? ie. open a FileOutputStream to a file/dir on my device from a java application on my pc?
I'm assuming the easiest answer is to set up a server for ftp/sftp/ssh on my device and connect that way but it would be nice just to access it as if it were mounted on my local PC as a local drive. Any ideas? Thanks!
Click to expand...
Click to collapse
Windows or Ubuntu?
Sent from my Galaxy Nexus using xda premium
windows, preferably (main dekstop pc is windows) but linux might work.
sanosuke001 said:
windows, preferably (main dekstop pc is windows) but linux might work.
Click to expand...
Click to collapse
Ah OK. I have it working fine in Ubuntu after setting up mtp. I'm honestly not sure about windows. I never use it. I will look into it and get back to ya.
Sent from my Galaxy Nexus using xda premium
lithid-cm said:
Ah OK. I have it working fine in Ubuntu after setting up mtp. I'm honestly not sure about windows. I never use it. I will look into it and get back to ya.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Care to share the trick you used. I'm running Ubuntu 12.04. I had it working once, reinstalled Ubuntu and haven't been able to get it to work since -.-
Sent from my Maguro
hev88 said:
Care to share the trick you used. I'm running Ubuntu 12.04. I had it working once, reinstalled Ubuntu and haven't been able to get it to work since -.-
Sent from my Maguro
Click to expand...
Click to collapse
Replace Id vendor, and id product with yours. My example is with maguro (gnex gsm)
Code:
sudo apt-get install mtp-tools mtpfs
sudo echo "
SUBSYSTEM==\"usb\", ATTR{idVendor}==\"04e8\", ATTR{idProduct}==\"685c\", MODE=\"0666\"
" >> /etc/udev/rules.d/51-android.rules
sudo service udev restart
sudo mkdir /media/GNex
sudo chmod a+rwx /media/GNex
Replace "lithid" with your user
Code:
sudo adduser lithid fuse
Make sure to uncomment or add
Code:
user_allow_other
to /etc/fuser.conf
You could add this to your bashrc profile to help with aliases
Code:
echo “alias go-go-gadget-gnex=\”mtpfs -o allow_other /media/GNex\”" >> ~/.bashrc
echo “alias gadget-gnex-stop=\”fusermount -u /media/GNex\”" >> ~/.bashrc
source ~/.bashrc
sanosuke001 said:
So, the MTP transfer on newer Android devices sucks and I hate not having an ETA/Speed display using adb push. Is there anyway to access the Android filesystem (doesn't need to be a root-owned directory; /mnt/sdcard would be fine) over USB? ie. open a FileOutputStream to a file/dir on my device from a java application on my pc?
I'm assuming the easiest answer is to set up a server for ftp/sftp/ssh on my device and connect that way but it would be nice just to access it as if it were mounted on my local PC as a local drive. Any ideas? Thanks!
Click to expand...
Click to collapse
From reading about mtp in windows, its my understanding that it "just works" is this not the case?
MTP in Windows is bull****. First, it requests that you verify any files that it thinks might not be displayable on your device so you need to verify every transfer with a "Yes" or "No" and then, for large files like video, it tends to time out pretty regularly and won't complete a transfer. It's a pain in the ass and adb push is too god damned slow :/
With my Xoom I used to just pop out the memory card, stick it in a card reader, and copy from there without issue. However, the Galaxy Nexus card is behind my battery and the Nexus 7 doesn't have a sd card at all :/
sanosuke001 said:
MTP in Windows is bull****. First, it requests that you verify any files that it thinks might not be displayable on your device so you need to verify every transfer with a "Yes" or "No" and then, for large files like video, it tends to time out pretty regularly and won't complete a transfer. It's a pain in the ass and adb push is too god damned slow :/
With my Xoom I used to just pop out the memory card, stick it in a card reader, and copy from there without issue. However, the Galaxy Nexus card is behind my battery and the Nexus 7 doesn't have a sd card at all :/
Click to expand...
Click to collapse
:good:
sanosuke001 said:
MTP in Windows is bull****. First, it requests that you verify any files that it thinks might not be displayable on your device so you need to verify every transfer with a "Yes" or "No" and then, for large files like video, it tends to time out pretty regularly and won't complete a transfer. It's a pain in the ass and adb push is too god damned slow :/
With my Xoom I used to just pop out the memory card, stick it in a card reader, and copy from there without issue. However, the Galaxy Nexus card is behind my battery and the Nexus 7 doesn't have a sd card at all :/
Click to expand...
Click to collapse
Only thing I can suggest is using a better operating system. With the new iteration of windows even game developers have started getting opengl gaming to linux. Which to my understanding is a huge reason people still use windows (of course other software like video editing), but if you are not using that type of stuff, get with linux. It works better and hackability is endless when trying to get something to work right.
Cheers
lithid-cm said:
Only thing I can suggest is using a better operating system. With the new iteration of windows even game developers have started getting opengl gaming to linux. Which to my understanding is a huge reason people still use windows (of course other software like video editing), but if you are not using that type of stuff, get with linux. It works better and hackability is endless when trying to get something to work right.
Cheers
Click to expand...
Click to collapse
Yeah, I know. However, I do PC gaming and until Linux games don't require Wine (or work flawlessly in Wine) there's not much I can do about it and I refuse to dual boot; it's a pain in the ass.
sanosuke001 said:
Yeah, I know. However, I do PC gaming and until Linux games don't require Wine (or work flawlessly in Wine) there's not much I can do about it and I refuse to dual boot; it's a pain in the ass.
Click to expand...
Click to collapse
Sounds like either way its a pain in ass?
Sent from my Galaxy Nexus using xda premium

Mtp on ubuntu?

Can anyone have the solution for working mtp on ubuntu 12.04 ...
I already install mtp library and doesn't work...
I used jb aokp build 4 and dorimanx kernel 5.86b4..
Thank you for your help
Sent from my GT-I9100 using xda premium
arief347 said:
Can anyone have the solution for working mtp on ubuntu 12.04 ...
I already install mtp library and doesn't work...
I used jb aokp build 4 and dorimanx kernel 5.86b4..
Thank you for your help
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
I dunno whether it works on build 4, but if you have exTweaks, you can enable the mtp option from there. That works with 12.04
HAXTREME said:
I dunno whether it works on build 4, but if you have exTweaks, you can enable the mtp option from there. That works with 12.04
Click to expand...
Click to collapse
Thank you, gonna try soon
Sent from my GT-I9100 using xda premium
Still not work mtp on ubuntu...any other advice?
Sent from my GT-I9100 using xda premium
Easy solutions
arief347 said:
Still not work mtp on ubuntu...any other advice?
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
There are solutions available, that I am using on a daily basis:
1. first thing: ADB via Terminal
The Android SDK includes a few comandline tools. One of these is adb (Android Debug bridge) which has a few commands included,
Just to name a few: push (sent), pull (copy from device to pc/laptop), backup (user data with or without sdcard) and a few more like shell = remote terminal access to device.
Install it by: (without "")
"sudo apt-get install android-tools-adb"
then: "adb devices" and you should see your device as something like "09A48348HHHF1"
then sent (push) or copy (pull) files with "adb push /home/USER/downloads/1.avi /sdcard" or adb pull /sdcard/movie.avi /home/USER/downloads"
to see the files included in a folder type : "ls" or "ls- la"
2. Use ADB via Graphical frontend: e.g. the ADBfileexplorer by DareT0Be (THX a lot and all credits to you)
http://forum.xda-developers.com/showthread.php?t=1821601
It's written in JAVA and can be executed on every device running java theoretically (Ubuntu, Windows, MacOSx,....)
A little trick is written at the end of the first page to execute it. I wrote a script to run it easily:
#!/bin/bash
DIRECTORY=/home/USER/Downloads
$1 cd $DIRECTORY
$2 java -Xmx512m -jar adbfileexplorer.jar
echo $1
echo $2
Save it: Once again via terminal: "gedit SCRIPTNAME.sh" copy and paste it, change Directory to the directory of adbfileexplorer. save it.
Make it executable: sudo chmod 771 adbfileexplorer.sh
Create an alias at your desktop or where ever to easily open it.
3. USE google to find the MTP scripts and mounting solutions - Which I don't use.
If that helped YOU hit the thanks button.

Debian Linux for Xperia

Ok, here is my Debian Squeeze bootstrap for armel architecture and is tested on my Xperia Go. Port contain a lot of installed things like compilers, libraries, programers languages, desktop enviroment, tight vnc server, openssh server... so everything that can be used like in desktop computer...
Warning:
Only stock rom files is safe and nothing "custom" is safe! You doing everything on your own risk! So you can play with Debian on your own risk!
How to install:
first, you need to have rooted phone! You need "su" installed! Busybox is needed too! Terminal emulator too!
extract Xperia_Debian.rar to your external sd card. You need min 4gb free disk space on your external sd card!
using adb tool perform next steps:
adb remount
adb push bootdeb /system/bin/bootdeb
adb shell chmod 6755 /system/bin/bootdeb
How to boot debian:
open terminal emulator and type "su" and press enter. You must see "#"
type "bootdeb" and press enter
You can see log on terminal emulator and if all is ok you are now in Debian
Optional things:
You can start ssh server by command "/etc/init.d/ssh start" and you can install WinSCP + Putty on your computer to get remote acces to your Debian like: WinSCP for remotelly browsing/uploading/deleting...etc and Putty for remote secure shell (ssh) access.
Username for ssh access is: user: root, password: password. You can change password by command "passwd your_password_here"
You can install vnc client on your computer for remote desktop connection to Debian (just you need to start vncserver on Debian with proper screen size geometry for example "vncserver -geometry 1024x768")
You can install vnc on your android (android vnc viever) to get remote desktop connection from your android.
You can install Debian to for example usb stick, but you need to modify (path to external usb disk) bootdeb script!
Warning:
When you start terminal emulator and you start Debian than do not close terminal emulator!!! If you close terminal emulator than Debian partition is not unmounted so there is posibility for Debian image coruption + coruption on userdata partition! So allways before closing terminal emulator (after starting Debian) you must type "exit" so Debian partition will be safely unmounted and Debian stopped!
do not perform long operations like git clone big pproject...etc because ram memory is not enought and sometimes Debian freze... I created 300mb swap but still swap is allways free so I think maybe kernel have no enabled swap support? I can see zram support in ICS kernel but its about ~50mb so maybe someone can/need to increase zram size to get our Debian stable!
Download link:
Xperia_Debian.rar
munjeni said:
Anyone interested? Let me know!
Click to expand...
Click to collapse
What the hell is that???
N y is this in development section
Sent From Xperia Sola White (MT27i)
Rooted Stock ICS
Hit Thanks If I Helped!!
Me.....
Yes, yes, yes...
definitely YES. Maybe not only Debian ? Ubuntu? Firefox OS?
Thread moved to General section.
Firefox OS would be VERY nice!
Is it possible to run that native?
Sent from my LT22i using xda app-developers app
Debian ? sounds cool ? is it possible ?
It's already existing. Look for "Linux Installer" on the market. It's running from an image via loopback device and VNC. So you don't even need to flash anything, works on standard Image.
I had Debian (I think it was LXDE DE) running. Ubuntu also available.
Pretty nice to show to someone, but I would not work with it. I deleted the image cause it wasted several GB on flash memory.
Interested.
Sent from my LT26i using xda app-developers app
Of course all of us say YES
DeJe63 said:
It's already existing. Look for "Linux Installer" on the market. It's running from an image via loopback device and VNC. So you don't even need to flash anything, works on standard Image.
I had Debian (I think it was LXDE DE) running. Ubuntu also available.
Pretty nice to show to someone, but I would not work with it. I deleted the image cause it wasted several GB on flash memory.
Click to expand...
Click to collapse
Yes I use the same principe (it runing under android in loop) but I prepared/installed a lot of things like compilers... etc... its about 4gb ext2 image...
Ok I will share it and it will be in zip (installable trought recovery) ! Will try to include everything like VNC viewer...etc
I am interested.
What about the official Ubuntu for android project?
http://www.ubuntu.com/devices/android
My wet dreams are about that.
so much yesss please do
is it laggy??
i would love it but sadly with xpetia u i need a smaller image... 4gb are too many. anyway thanks for doing it
Sent from my ST25i using xda app-developers app
What about to be installable on USB Stick,just put USB on phone and run it.
Sent from my ST25i using xda app-developers app
I had old Debian Leny bootstraped, it was for HTC HD Mini, I got it runing on Xperia but it not worked good, so yesterday I created new debian.ext2 image (4gb), its bassed on latest stable Debian Squeeze, it contain installed: full desktop enviroment, a lot of compilers and libraries...etc. I tried to make an zip installer but zip could not accept larger files so it will be rar archive: debian.ext2 + bootscript, you need to install all that manually! Allso you need 4gb free space on your external sd card or maybe it will be runing from external usb disk (you need to modify bootdeb script)? Today I going to start uploading ...see first post!
Xperia_Debian.rar
Enjoy!

[SOLVED] Adb won't update to 1.0.31 from 1.0.26

I've tried on windows 7 and Ubuntu 12.10 and no matter what I do,no matter how many times I update the SDK or uninstall and reinstall the SDK,ADB version is still 1.0.29...tried killing server,restarting adb, etc.
Trying to ./extract files from cm10.1 for compiling CM but ADB must be updated to connect to JB devices...
Someone please help!!! I've googled for hours and tried everything..still getting nowhere.
Sent from my SAMSUNG-SGH-I727 using Tapatalk 2
:SOLVED FOR ME:
so what i did (and i dont know why all of a sudden its working) but,
i opened up the terminal and did the following
lsusb
This should kick out a list of plugged in devices. Most likely the last one is the phone. There were references to Samsung and Galaxy so it was pretty easy to figure out. On that same line, there is an ID number in this format...xxxx:xxxx. Write that number down for reference.
Now a few more commands:
cd
sudo gedit /etc/udev/rules.d/99-android.rules
When the rules open, copy/paste the following with the id "lsusb" gave you:
replace the ####:#### in the above string of text with the number you got from "lsusb"
Then save and exit.
sudo service udev restart
sudo adb devices
# XXXXXXXXXXXX offline
sudo ./extract-files.sh
GOT THE WINDOW POPUP ON MY PHONE
check always accept from this computer
then everything went smoothly....hope this somehow or another helps someone...if it does,please hit thanks.
in Ubuntu, once you update the SDK , copy the adb file in SDK/platform-tools to /usr/bin
reboot Ubuntu and try .
i don't use windows sorry
Sent from my GT-S5670 using xda premium
soham jambhekar said:
in Ubuntu, once you update the SDK , copy the adb file in SDK/platform-tools to /usr/bin
reboot Ubuntu and try .
i don't use windows sorry
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
just tried sudo cp ~/android-sdk-linux/platform-tools/adb /usr/bin
it seemed to have copied since the original adb there was like 577kb and the new one is 1.2mb but still same issue.. i dont care to get it working on windows anyways...just thought i was strange it wont work on either platform...any other suggestions??
just a mention if someone arrives due to google search and are having an issue updating adb version in windows..this thread only speaks of a fix in linux so here is what i found: somehow someway adb.exe along with a couple dll files found their way to my windows directory, even though i always had its installed path included in my systems environment variables!! first i simply renamed these 3 files and added the extension .old to them. immediately running adb version in a command prompt my version finally read properly as it should 1.0.31 and not 1.0.26. its self explanatory why. hope this helps someone!
sinner99 said:
just a mention if someone arrives due to google search and are having an issue updating adb version in windows..this thread only speaks of a fix in linux so here is what i found: somehow someway adb.exe along with a couple dll files found their way to my windows directory, even though i always had its installed path included in my systems environment variables!! first i simply renamed these 3 files and added the extension .old to them. immediately running adb version in a command prompt my version finally read properly as it should 1.0.31 and not 1.0.26. its self explanatory why. hope this helps someone!
Click to expand...
Click to collapse
I had to sign up for this forum just to tell you, THANK YOU!!!! For the life of me, it was ridiculous that I couldn't find just simple information on how to do stuff. This is my first time looking into this stuff, So I couldn't even figure out how to update individual tools like that, which is what I've been spending the last 2 hours or more trying to figure it out.
It really was those three files in the Windows directory this whole time. Now my device is online, and adb shows the right version. Amazing. It's absolutely pathetic that google has their program screw up the entire adb functionality by putting these broken versions of the tool in the Windows directory.
I had to add to the path variable the location folder of the appdata platoformtools abd.exe.

[Q] How to get the installed package from ubuntu

please anyone tell me how to get the installed applications from ubuntu
i mean how to get their installers from ubuntu to use them in another pc
for eg i installed vlc player from internet by apt-get command
and i need its installer ,from which directory i get it
reply me iam new to ubuntu but familar with windows
roshan77ss said:
please anyone tell me how to get the installed applications from ubuntu
i mean how to get their installers from ubuntu to use them in another pc
for eg i installed vlc player from internet by apt-get command
and i need its installer ,from which directory i get it
reply me iam new to ubuntu but familar with windows
Click to expand...
Click to collapse
Well, you can just use apt-get on the other PC?
Apt-get downloads .deb packages including all dependencies. Any system that can install .deb files should also support apt-get, or is there a reason you can't use that?
If you download and manually install a .deb file, you have to download and install all dependencies too.
Sent from my TF300T using Tapatalk
offline installer
f69m said:
Well, you can just use apt-get on the other PC?
Apt-get downloads .deb packages including all dependencies. Any system that can install .deb files should also support apt-get, or is there a reason you can't use that?
If you download and manually install a .deb file, you have to download and install all dependencies too.
Sent from my TF300T using Tapatalk
Click to expand...
Click to collapse
i need offline installer of applications,so that i will use it later on another freshly installed ubuntu
is there any way to get offline installer like in windows?
roshan77ss said:
i need offline installer of applications,so that i will use it later on another freshly installed ubuntu
is there any way to get offline installer like in windows?
Click to expand...
Click to collapse
No, there is not a single installer for most applications. Instead there are lots of separate .deb packages and installing one application typically requires installing several of those .deb packages.
That's where apt-get comes in: it figures out all the .deb packages needed for your application, checks what is already installed and then downloads and installs the rest. Doing this manually is far from easy, especially as the list of packages previously installed may differ from PC to PC.
That said, you can find the .deb packages recently downloaded in:
/var/cache/apt/archives/
Sent from my TF300T using Tapatalk
any way to bind
f69m said:
No, there is not a single installer for most applications. Instead there are lots of separate .deb packages and installing one application typically requires installing several of those .deb packages.
That's where apt-get comes in: it figures out all the .deb packages needed for your application, checks what is already installed and then downloads and installs the rest. Doing this manually is far from easy, especially as the list of packages previously installed may differ from PC to PC.
That said, you can find the .deb packages recently downloaded in:
/var/cache/apt/archives/
Sent from my TF300T using Tapatalk
Click to expand...
Click to collapse
thanks for reply but is there any way to pack those .deb packages in a single file
so that it works as installer
roshan77ss said:
thanks for reply but is there any way to pack those .deb packages in a single file
so that it works as installer
Click to expand...
Click to collapse
I guess you could ZIP them up and add a shell script that runs dpkg -i for each of them, but I don't recommend it. The other PC might need additional .debs or have some of them already installed.
Sent from my TF300T using Tapatalk
Thanks
f69m said:
I guess you could ZIP them up and add a shell script that runs dpkg -i for each of them, but I don't recommend it. The other PC might need additional .debs or have some of them already installed.
Sent from my TF300T using Tapatalk
Click to expand...
Click to collapse
okay i understand now it is difficult to run ubuntu without internet
thanks for reply it help me alot.
roshan77ss said:
okay i understand now it is difficult to run ubuntu without internet
thanks for reply it help me alot.
Click to expand...
Click to collapse
Well, it is hard to use without a package repository. You can burn one on DVD and use it with apt-get or use a mirror in your LAN. Internet is not really needed, but by far the easiest.
Sent from my TF300T using Tapatalk

Categories

Resources