Android File Transfer - Smartphone to PC Linux

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
User avatar
Duprate
Posts: 298
Joined: Sat Aug 22, 2020 8:14 pm
Location: Southern Brazil
Has thanked: 147 times
Been thanked: 102 times

Android File Transfer - Smartphone to PC Linux

Post by Duprate »

Hi! In the midst of my need, without being able to access my files on the smartphone through the PC via USB cable, I found this AppImage on github. I downloaded it, opened the AppImage, run the anti-virus to make sure everything was ok. It's simple to use: connect your smartphone to the PC with the USB cable; select data transfer; and click on the AppImage. Ready! You have access to the files on your phone. I thought it was cool and decided to share it with anyone who needs it.

Android File Transfer - Smartphone to PC Linux

Metadata license CC0-1.0, project_license LGPL-2.0+
Interactive MTP client with Qt4/Qt5 GUI
Simple Qt UI with progress dialogs. FUSE wrapper (If you'd prefer mounting your device),
supporting partial read/writes, allowing instant access to your files.
No file size limits. Automatically renames album cover to make it visible from media player.
No extra dependencies (e.g. libptp/libmtp). Available as static/shared library. Simple CLI tool.

homepage: https://whoozle.github.io/android-file-transfer-linux
contact: vladimir.menshakov@gmail.com

download here: https://drive.google.com/drive/folders/ ... sp=sharing
or look on the developer's homepage.

Clarity
Posts: 3308
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1361 times
Been thanked: 442 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Clarity »

For years, I have used SAMBA for all transfers to my FATDOGs. Nothing to do on FATDOG other than to start its subsystem. Works like a charm in exactly the same way my MS, Apple, and other Linux systems do for moving files to and from FATDOG, Its really, really simple.

Merely add a file-manager on your cell phones that has an SMB client feature, once. Connect to FATDOGs SAMBA share(s). Then transfer files safely over the local LAN...wirelessly. Its simple and amazingly fast.

Too easy.

Hope this helps others.

User avatar
p310don
Posts: 302
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 56 times
Been thanked: 92 times

Re: Android File Transfer - Smartphone to PC Linux

Post by p310don »

@Clarity how do you get a samba share working on Android? Some phones have it, others need rooting to do it.

I like to use FTP. Lots of FTP servers for Android, start one up, log in using gFTP (or whichever ftp program you like) and download anything from your phone, wirelessly and quickly.

Clarity
Posts: 3308
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1361 times
Been thanked: 442 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Clarity »

p310don wrote: Wed Mar 30, 2022 11:10 pm

@Clarity how do you get a samba share working on Android? Some phones have it, others need rooting to do it. ...

I've never rooted a phone for apps as I haven't needed to so thus far.

But in the play store on Androids-Apples are file managers that have built-in clients allowing connections to a SAMBA or Windows SMB server.

One easy one that many people (er, developers and videos watchers) have is VLC. It has a network feature allowing you to connect to FATDOG to move video/pics/music. And there are also several free file-managers I've also used over the years: If on Android try this one, "Cx File Manager" as well as VLC. And there are others I have used over the years, as weill.

Steps

  1. Insure your FATDOG and the phone are on the same home network (LAN)

  2. On FATDOG

    • FATDOG's server must be running (OR your NAS or your Window/MAC is actively serving)

  3. On Phone

    • Open VLC or a file-manager

    • Enter the IP address of FATDOG and userID+password

  4. Done. Fast, safe and secure within the home!

Hope that is useful. Phones are like PCs on our home LANs. They have the intelligence and merely need the app(s).

User avatar
p310don
Posts: 302
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 56 times
Been thanked: 92 times

Re: Android File Transfer - Smartphone to PC Linux

Post by p310don »

@Clarity - you've got me backwards. I hate doing anything from the phone when the PC is available (check out scrcpy newly added to Fatdog repo to use the phone from PC).

How do I make the phone the samba server?

User avatar
wiak
Posts: 3636
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 1001 times
Contact:

Re: Android File Transfer - Smartphone to PC Linux

Post by wiak »

For an automatic way of 'moving' files between different PCs and Phones, I think syncthing is probably the way to go. That's what I'm planning to use for partner's business anyway (currently also using rclone for syncing up to Google Drive).

Whilst you can get syncthing for Android from Google Play store, I prefer to use F-droid.org for anything also available there.

You might also be interested in syncthing-fork (claims to solve battery drain issues) and syncthing-lite.

https://search.f-droid.org/?q=syncthing&lang=en

syncthing-lite is a bit different and for some scenarios might be more useful (albeit not automatic):

f-droid wrote:

SyncThing-Lite:
This is a client-oriented implementation, designed to work online by downloading
and uploading files from an active device on the network (instead of
synchronizing a local copy of the entire repository). This is quite different
from the way the syncthing-android works, and its useful from those devices that
cannot or wish not to download the entire repository (for example, mobile
devices with limited storage available, wishing to access a syncthing share).

SyncThing has been discussed in the past on the old forum (primarily by Mike Walsh I think).

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

user1111

Re: Android File Transfer - Smartphone to PC Linux

Post by user1111 »

@p310don

p310don wrote: Thu Mar 31, 2022 10:19 am

I hate doing anything from the phone when the PC is available (check out scrcpy newly added to Fatdog repo to use the phone from PC).

Nice!

gslapt, updated the database and installed scrcpy. Which also requires adb - so I downloaded https://dl.google.com/android/repositor ... -linux.zip extracted that and dropped the adb into /usr/bin. Attached my android phone via usb cable and selected the data transfer choice (rather than charge choice), phone had already been previously set to USB debug mode, in a terminal ran scrcpy and it even works within my Xephyr/unshare/capabilities dropped/chroot container.

dt.png
dt.png (278.98 KiB) Viewed 1577 times

I have ctrl-space set in jwm to show the main menu, alt-space is set to show my bookmarks (as another root: menu coded within .jwmrc). My first entry is ytplayer script https://forum.puppylinux.com/viewtopic. ... 388#p11388 that works a treat. In chrome right context 'Copy link' of a youtube url to the clipboard, alt-space-enter and the video is played without any clutter or ads.

For me that's a couple of great utilities added within the space of a couple of weeks. Thanks.

Is a little heavy on cpu on my desktop presumably for the screen transfer, with Fatdog main session, OpenBSD in a kvm/qemu (server for http/ssh) and my container all running, that runs at around 2-4% cpu. With scrcpy running cpu rises considerably. But does calm down when the android screen saver kicks in.

For my phone it looks like the phone also charges whilst in usb cable attached data transfer mode with scrcpy running, so a laptop as a server with a android phone also attached is quite a nice server, with UPS (laptop battery should the mains fail) and relatively low power consumption (my laptop ac unit is rated at 45 watts). For me running
echo PNP0C0D:00 > /sys/bus/acpi/drivers/button/unbind
sets the laptop to continue running even when the lid is closed. Screen goes dark but the system still runs as normal - which I guess might halve that wattage. But with the lid closed you can't of course vnc in and run something like gucview to activate/see what the laptop camera is pointed at.

User avatar
p310don
Posts: 302
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 56 times
Been thanked: 92 times

Re: Android File Transfer - Smartphone to PC Linux

Post by p310don »

Another App I use to move files from PC to Phone or vice versa is SMBSync2. It is pretty powerful as a backup tool. Again, it works from the phone, not the PC.

User avatar
Duprate
Posts: 298
Joined: Sat Aug 22, 2020 8:14 pm
Location: Southern Brazil
Has thanked: 147 times
Been thanked: 102 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Duprate »

Well, puppy linux doesn't have an instruction manual explaining what each embedded app is for. I bought my first smartphone 14 days ago. Driven by the principle that "only simple things work", I found Vladimir's AppImage "Android File Transfer" on GitHub. Is there anything simpler than clicking an AppImage? :shock:

Clarity
Posts: 3308
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1361 times
Been thanked: 442 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Clarity »

@Duprate Enjoy the 21 Century technology you have in your hand, now. :welcome:

Think of your phone, NOT AS A PHONE, but a small PC. And like all PUPs on any PC, it has apps that you'll pull from its 'package manager' to let you do ALL the things you want to do. Its a touch-screen laptop, merely.

After the 1st week of using it with a PC, YEARS AGO, I have NEVER since "wired" my phone to a PC. There is NO reason to so...for me. Everything about the handhelds are accomplished wirelessly .... Everything!

In my case, I see it as a wireless touchscreen PC. :geek:

Feek
Posts: 396
Joined: Sun Oct 18, 2020 8:48 am
Location: cze
Has thanked: 48 times
Been thanked: 88 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Feek »

I have a classic (not smart) phone that handles multimedia.

In Fatdog I use bluetooth manager (already built-in) to transfer smaller files.
Just turn on bluetooth in my phone and have bluetooth service running in fatdog.
Then I open the bluetooth manager, pair both devices and the files can be sent.
Simple and functional.

User avatar
Duprate
Posts: 298
Joined: Sat Aug 22, 2020 8:14 pm
Location: Southern Brazil
Has thanked: 147 times
Been thanked: 102 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Duprate »

Yes, with bluetooth I knew how to do it....
I have personal restrictions on Android as much as I have with Chrome OS, because they are "the devil's work" (from Google) :evil: , I consider them the worst Linux in the world! So I use it very carefully and don't let it (the smartphone) think it's like a small PC. For me it's a sadistic pleasure to clip the wings of this "black bird", make the battery last 8 days and keep it in the cage, doing just what I want without Google "snooping" :twisted: .

user1111

Re: Android File Transfer - Smartphone to PC Linux

Post by user1111 »

Clarity wrote: Fri Apr 01, 2022 5:24 am

@Duprate Enjoy the 21 Century technology you have in your hand, now. :welcome:

Think of your phone, NOT AS A PHONE, but a small PC. And like all PUPs on any PC, it has apps that you'll pull from its 'package manager' to let you do ALL the things you want to do. Its a touch-screen laptop, merely.

After the 1st week of using it with a PC, YEARS AGO, I have NEVER since "wired" my phone to a PC. There is NO reason to so...for me. Everything about the handhelds are accomplished wirelessly .... Everything!

In my case, I see it as a wireless touchscreen PC. :geek:

vnc (remote desktop control) can also be used to transfer files. I don't know of any vnc servers for phones but vnc viewers are plentiful so vnc server would have to be run on the laptop/desktop, viewer on the phone.

I live 'down the road' from 90 year old mum and a always on laptop based server with vncserver at hers enables me to vnc into that from my laptop and do something like open chrome and browse to talky.io to set up a chat room that I can then use chrome on my laptop to browse into and see/hear/talk .. or rather basically make sure she's not on the floor. With mic and mic boost maxed that's pretty good at seeing/hearing across a good distance.

I've been meaning to get a bunch of web cams to add to that so that I could also look around other rooms where even a simple image that refreshed periodically would suffice. Wifi in that sense its so much better than having to run cam cables all over the place.

For me connecting my android phone via usb to my laptop serves as a phone charger. The phones quite a few years old now and the battery doesn't last anywhere near as long as it used to.

step
Posts: 511
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 181 times
Contact:

Re: Android File Transfer - Smartphone to PC Linux

Post by step »

If you don't mind connecting a USB cable, in Fatdog there's also MTP Browser in the File System section of the system menu.

User avatar
Duprate
Posts: 298
Joined: Sat Aug 22, 2020 8:14 pm
Location: Southern Brazil
Has thanked: 147 times
Been thanked: 102 times

Re: Android File Transfer - Smartphone to PC Linux

Post by Duprate »

step wrote: Sat Apr 02, 2022 6:10 am

If you don't mind connecting a USB cable, in Fatdog there's also MTP Browser in the File System section of the system menu.

Although I've been using FatDog for years, most of the programs included, I've never used it and don't even know what it's for. Thanks Step for pointing out the "MTP-browser". I tested it and it works very well. :thumbup2:

As I said earlier, puppies and their derivatives do not come with an instruction manual saying what the apps built into the system are for. In the repositories, it's a list of apps, where we get lost, 90% don't even know what they're for... :?:

So, as I always look for solutions to my problems, I created my own file of ROXapps that serve equally all systems installed on the PC, all overlayfs, (AUFS prohibited on my PC). From complete systems like FatDog to other "naked" systems that even need a GParted, Geany and mhwaveed. :ugeek:

Attachments
ROXapps.jpg
ROXapps.jpg (75.21 KiB) Viewed 1353 times
User avatar
666philb
Posts: 429
Joined: Thu Jul 09, 2020 3:18 pm
Location: wales uk
Has thanked: 111 times
Been thanked: 146 times

Re: Android File Transfer - Smartphone to PC Linux

Post by 666philb »

this works really fast. much quicker than MTP
thanks!

user1111

Re: Android File Transfer - Smartphone to PC Linux

Post by user1111 »

*nix and ssh pretty much go hand in hand

Install termux from playstore and that gives you a terminal on your android phone.

apt update
apt upgrade

and you're ready to install packages

apt install openssh

and ssh is ready to go. But before starting a sshd (ssh server) set the password
passwd .... and enter a password you'll remember
then run

sshd ... to start the sshd server (that listens to port 8022)
(pkill sshd ... kills it)

Ignores the userid so anything for that will do.

Run ifconfig to identify your local IP, maybe something like 192.168.1.15
From your desktop ssh -p 8022 anyuserid@192.168.1.15
and enter the password and you have a android terminal session

To avoid having to enter the password each time set up a key by running (on your desktop system)
ssh-copy-id -p 8022 anyuserid@192.168.1.15

Nice if you also install adb. If you don't run sshd on your desktop such that the default ssh port (22) is free then you might
adb forward tcp:22 tcp:8022
so the android becomes the sshd server and you can access that using
ssh abc@localhost ... to get a android terminal

scp somefile abc@localhost:/path/filename
to copy a file from the desktop to the android
scp abc@localhost:/path/filename somefile
to copy from the phone to the desktop

OR

mkdir mp
sshfs abc@localhost:/path/folder mp

to mount a android folder to folder mp on the desktop, and then use rox to drag/drop files between the two devices.

If you edit/create a .profile in the home folder of termux and add to that
sshd
then sshd will start each time you start termux

ssh is very widely used/available and whilst the configuation of ssh/sshd varies, once you have a core understanding of the general concepts/methods that knowledge/functionality is very portable.

=======

scrcpy works well at having a window of your android on your desktop that you can control with the mouse/keyboard, and along with ssh (and assuming you have xdotools installed on your desktop system) you can do tricks such as opening up the Tether screen on the phone from your desktop and have xdotools step between the options and make selections.

#!/bin/sh

xterm -e 'scrcpy' &
PID=$!
sleep 2

ssh -p 8022 abc@192.168.1.15 'am start -S com.android.settings/.TetherSettings'

sleep 2
xdotool key Down # Step to tether option
sleep 1
xdotool key Return # select it
sleep 1
xdotool key Tab # Confirmation requires tab tab Enter
sleep 1
xdotool key Tab
sleep 1
xdotool key Return

For me for instance starts scrcpy and opens up the config screen that includes tethering, steps down to the relevant choice and presses enter to toggle it, and the tab/tab/return steps through the next popup that asks for confirmation.

Post Reply

Return to “Software”