Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Connection via USB between Debian and Android smartphone
Connection via USB between Debian and Android smartphone
Hi,
I think should be a very simple operation i.e. connecting my smartphone via usb cable with PC running Debian, but it seems it is not. Simply in order to transfer general files such pdf documents or any exstension files.
I tried KDE connect: the devices simply don't see each other.
Then in some forums someone suggested to pay attention to the firewall. I did not install any firewall so I wonder if there is one default installed: it seems to be, but the default setting foresees all ports open.
I would like to transfer general files (not only .jpg or images that are managed by Gnview(?) or something like that).
Anyone can suggest me the proper tool to succeed in doing this?
I also tried ftp tools but also in this case no possibility to see the devices.
Thanks in advance
I think should be a very simple operation i.e. connecting my smartphone via usb cable with PC running Debian, but it seems it is not. Simply in order to transfer general files such pdf documents or any exstension files.
I tried KDE connect: the devices simply don't see each other.
Then in some forums someone suggested to pay attention to the firewall. I did not install any firewall so I wonder if there is one default installed: it seems to be, but the default setting foresees all ports open.
I would like to transfer general files (not only .jpg or images that are managed by Gnview(?) or something like that).
Anyone can suggest me the proper tool to succeed in doing this?
I also tried ftp tools but also in this case no possibility to see the devices.
Thanks in advance
Re: Connection via USB between Debian and Android smartphone
In KDE, you simply need kio-mtp & libmtp9.
Normally, udev should detect your smartphone. if correctly configured to MTP protocol (and not usb).
libmtp9: Media Transfer Protocol (MTP) library
Normally, udev should detect your smartphone. if correctly configured to MTP protocol (and not usb).
libmtp9: Media Transfer Protocol (MTP) library
Re: Connection via USB between Debian and Android smartphone
^ well technically they do connect via USB, but then use the mtp protocol (instead of some filesystem).
does the phone start to charge when you plug it in? does it show any sort of icon that indicates a connection?
you can verify your satement by enteringthen plug in your device.
if you see new output, it means debian 'sees' the device.
if you're unsure, you can post the output here.
this would suggest a more primitive problem, like a broken cable etc.de_se_77 wrote:the devices simply don't see each other.
does the phone start to charge when you plug it in? does it show any sort of icon that indicates a connection?
you can verify your satement by entering
Code: Select all
dmesg -w
if you see new output, it means debian 'sees' the device.
if you're unsure, you can post the output here.
Re: Connection via USB between Debian and Android smartphone
Hi
I assume you need to install:
along with the applications mentioned by: L_V
Then either those applications or the default file manager of KDE can auto detect. It seems you are using KDE.
I assume you need to install:
Code: Select all
mtp-tools
Then either those applications or the default file manager of KDE can auto detect. It seems you are using KDE.
ThinkPad E14: Arch, Debian Stable
GUI: Xfce
For new: Try MX Linux, Linux Mint; later join Debian Stable
GUI: Xfce
For new: Try MX Linux, Linux Mint; later join Debian Stable
Re: Connection via USB between Debian and Android smartphone
No / not for KDE.makh wrote:I assume you need to install mtp-tools
The key poiints are:
1 - to be detected, the smartphone should not be configured to "charge only", but to MTP (or file transfer / depending on the UI)
2 - the smartphone should be correctly detected by running:
Code: Select all
udevadm monitor --environment --udev
Re: Connection via USB between Debian and Android smartphone
Thank you for the suggestion L_V. I tried to install those libraries kio-mtp & libmtp9 (actually they were not present on the system) but the situation is the same as before.L_V wrote:In KDE, you simply need kio-mtp & libmtp9.
Normally, udev should detect your smartphone. if correctly configured to MTP protocol (and not usb).
libmtp9: Media Transfer Protocol (MTP) library
The files browser sees the smartphone (main memory and SD one added, i.e. 2 memory devices) but when I try to paste some files on smartphone memories, the paste commend is in grey color i.e. the action is not allowed.
I forgot: still Kde connect (both smartphon and PC side) doesn't see anything. The files browser sees but cannot perform any paste action on phone.
Re: Connection via USB between Debian and Android smartphone
Ok thanks. If I understood well, this seems to be a NON KDE tool: anyway I tried but nothing changed.makh wrote:Hi
I assume you need to install:along with the applications mentioned by: L_VCode: Select all
mtp-tools
Then either those applications or the default file manager of KDE can auto detect. It seems you are using KDE.
I'm using KDE
Re: Connection via USB between Debian and Android smartphone
Thanks debiman. I was not precise: as just replied to other users, the files browser can see the smartphone, but cannot perform any paste action on its memories. So I suppose there is a problem on the Android side and I have to find out what needs to be set on the phone in order to allow the paste action.debiman wrote:^ well technically they do connect via USB, but then use the mtp protocol (instead of some filesystem).
this would suggest a more primitive problem, like a broken cable etc.de_se_77 wrote:the devices simply don't see each other.
does the phone start to charge when you plug it in? does it show any sort of icon that indicates a connection?
you can verify your satement by enteringthen plug in your device.Code: Select all
dmesg -w
if you see new output, it means debian 'sees' the device.
if you're unsure, you can post the output here.
My phone is a Samsung Galaxy S2 Plus (GT-I9105P).
Last edited by de_se_77 on 2017-12-03 19:37, edited 1 time in total.
Re: Connection via USB between Debian and Android smartphone
Thanks again L_V.L_V wrote:No / not for KDE.makh wrote:I assume you need to install mtp-tools
The key poiints are:
1 - to be detected, the smartphone should not be configured to "charge only", but to MTP (or file transfer / depending on the UI)
2 - the smartphone should be correctly detected by running:If not, a specific udev rule should be created ( in case of completely unknown brand).Code: Select all
udevadm monitor --environment --udev
On Android side of the phone (Samsung Galaxy S2 Plus, GT-I9105P), I can select two options:
1. multimedia device ...
2. camera (PTP): it allows file transfer on PC of pictures and any other file type not supporting MTP
Tried both: the paste action on phone via PC browser is not allowed.
Re: Connection via USB between Debian and Android smartphone
Can you at least read ?de_se_77 wrote:Tried both: the paste action on phone via PC browser is not allowed.
If you cannot write, it's a right problem (likely sdcard protection).
Internal/external memories/sdcards do not have the same permissions.
Re: Connection via USB between Debian and Android smartphone
Yes, I' ve just tried: I can copy files from phone and past on PC.L_V wrote:Can you at least read ?de_se_77 wrote:Tried both: the paste action on phone via PC browser is not allowed.
If you cannot write, it's a right problem (likely sdcard protection).
Internal/external memories/sdcards do not have the same permissions.
Maybe there is a level protection that doesn't allow you to do normal and simple actions. I should try to become SU and see if something change. But I think it can only be done through line command.
Ok SOLVED.
I (tried) to change user becoming SU (root and password): the system told me I could not log in as root (why?) and so I logged with the normal user. Then I opened the shell becoming SU; then typed:
lsblk
lsusb
After that I pasted some files, using normal files browser, on phone memory without any problem.
I think the above commands were irrelevant (the experts can say that.. and maybe what's important is logging in having the phone plugged on usb port: somehow the system recognize it from the beginning and let you do what you want.
Last edited by de_se_77 on 2017-12-04 21:59, edited 1 time in total.
Re: Connection via USB between Debian and Android smartphone
It's the smartphone policy which can prevent the copy in MTP mode.
I use LineageOS and not android / cannot tell you more for your specific smartphone which is even not pure android.
I use LineageOS and not android / cannot tell you more for your specific smartphone which is even not pure android.
Re: Connection via USB between Debian and Android smartphone
Thanks ones more L_V.L_V wrote:It's the smartphone policy which can prevent the copy in MTP mode.
I use LineageOS and not android / cannot tell you more for your specific smartphone which is even not pure android.
I'll try if can work for my phone: actually I was searching for something like that
Re: Connection via USB between Debian and Android smartphone
Because it would be highly insecure to run an X session (session with graphical desktop environment) as root.de_se_77 wrote:I (tried) to change user becoming SU (root and password): the system told me I could not log in as root (why?)
It sounds to me like you could get around this issue by temporarily enabling USB debugging before connecting to the machine.
https://www.kingoapp.com/root-tutorials ... ndroid.htm
Be sure to heed the warning:
USB Debugging should only be enabled when you need it. Leaving it enabled all the time is kind of a security risk for that this mode grants you high-level access to your device. Say if you connect your Android phone to a USB charging port in a public location, the port could use the USB access to your phone to access data on your phone or install malware. This could happen when and only when USB debugging mode is enabled.
- None1975
- df -h | participant
- Posts: 1404
- Joined: 2015-11-29 18:23
- Location: Russia, Kaliningrad
- Has thanked: 46 times
- Been thanked: 70 times
Re: Connection via USB between Debian and Android smartphone
For me, connection via usb between Debian (i use Debian 9.2+Ratpoison) and Android smartphone (i use Samsung Galaxy S7, Android version 7.0), works like a charm. After minimal installation via network installer, after installing xorg packages, i installed PCmanFM file manager. Apt installed all required dependencies. No additional configuration required.
OS: Debian 12.4 Bookworm / DE: Enlightenment
Debian Wiki | DontBreakDebian, My config files on github
Debian Wiki | DontBreakDebian, My config files on github
Re: Connection via USB between Debian and Android smartphone
To me is more comfortable and effective and definitly works better using the AirDroid web extension. I desintall Android apps from AirDroid interface, and move files in both directions.
See--> https://s18.postimg.org/th1aczgvt/Escritorio_1_022.png
Ive been using it for some years, and Im very glad with Airdroid
https://www.airdroid.com/es-es/get.html
See--> https://s18.postimg.org/th1aczgvt/Escritorio_1_022.png
Ive been using it for some years, and Im very glad with Airdroid
https://www.airdroid.com/es-es/get.html
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...
Re: Connection via USB between Debian and Android smartphone
I have never used pure android (I too, use LineageOS' version of Android) so this may not be the case for google's Android:
When you plug the usb into the computer, default mechanism is charging. It won't show up in the file manager on the computer while set to this..
If you swipe down to notifications, there should be a notification saying 'charging, click to change' or some similar verbiage to that.
If you click it, a pop up will appear with numerous options -> select MTP and you should now see the phone mounted in nautilus (if you're using gnome, for example)
Clicking on the phone name in the file manager will lead you to the android file system and SD card.
When you plug the usb into the computer, default mechanism is charging. It won't show up in the file manager on the computer while set to this..
If you swipe down to notifications, there should be a notification saying 'charging, click to change' or some similar verbiage to that.
If you click it, a pop up will appear with numerous options -> select MTP and you should now see the phone mounted in nautilus (if you're using gnome, for example)
Clicking on the phone name in the file manager will lead you to the android file system and SD card.