this post was submitted on 08 Jan 2024
36 points (86.0% liked)

Linux

48017 readers
1014 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
all 28 comments
sorted by: hot top controversial new old
[–] [email protected] 35 points 10 months ago

This might be obvious but when you connect your phone to your PC have you enabled file transfers? Usually it defaults to charging only. It should show up in your notification bar.

[–] [email protected] 27 points 10 months ago* (last edited 10 months ago) (1 children)

Plug in cable to PC, go into android USB setting and switch it to file transfer instead of charging mode, it should show in your file manager as a connected USB drive. ( you can tell everyone is a linux or phone techy, everone gave the complicated merhods that didn't address the question asked, but @OP all the other methods work also )

[–] [email protected] 16 points 10 months ago (2 children)

TBF, KDE Connect is pretty convenient for this and other stuff

[–] [email protected] 7 points 10 months ago (1 children)

Of course, it's awesome; so is GSConnect on Gnome, and syncthing is awesome, and fx on android with samba shares is great. Croc on mobile to PC, etc. just the dude asks how to use USB cable and gets recompile your kernel suggestion ( I'm being hyberbolic)

[–] [email protected] 1 points 10 months ago

He can still use the Cable C to keep the battery on.

[–] [email protected] 1 points 10 months ago (1 children)

I have a Pixel 4a with GrapheneOS and I can never get it to find any other devices in KDE connect for some reason. Syncthing works fine though so I just use that instead.

[–] [email protected] 1 points 10 months ago (1 children)

If you're using a vpn it could be preventing it, I had to allow lan on mullvad's settings to make it work.

[–] [email protected] 2 points 10 months ago (1 children)

Yeah I do have Mullvad as well but it doesn't seem to be that. I tried split tunneling KDE connect and also just turning the VPN off altogether and it made no difference.

My current guess is either some hidden security thing in GrapheneOS that I haven't discovered yet, or maybe some router setting that's filtering it out? The investigation is ongoing!

[–] [email protected] 1 points 10 months ago (1 children)

I had to specifically run mullvad lan set allow in the terminal on pc and turn on "local network sharing" on the phone app specifically. If you're not on linux idk, but if you are and haven't tried that it could help. Though if it doesn't work with the mullvad disabled (and "always require vpn" off on both devices) then it probably isn't that. If it's a graphene setting it isn't one enabled by default, because I got a pixel 6 last week and it works fine through mullvad to use kde connect with my settings set to allow lan.

[–] [email protected] 2 points 10 months ago (1 children)

K I kind of solved it! Turns out there wasn't a setting within the Mullvad app for "always require VPN", but there was one in the Android system settings under VPN. If I turn that off and then split tunnel KDE connect only on the phone (not on my laptop for some unknown reason) then they can see each other.

One to file under "I don't know why that works but I'll take it" lol.

[–] [email protected] 1 points 10 months ago

Lol ayy alright! Glad you got it sorted!

[–] [email protected] 14 points 10 months ago (2 children)

I'd use Kdeconnect or syncthing

[–] [email protected] 3 points 10 months ago (1 children)

This is the way. MTP is horrible and adb is annoying.

[–] [email protected] 3 points 10 months ago

MTP sucks, it's even slower than good WiFi and half the time it locks up in the middle of a transfer.

[–] [email protected] 2 points 10 months ago

syncthing doesnt use usb sadly

[–] [email protected] 10 points 10 months ago

Plug it in, unlock it, tap the USB notification and change it to "transfer files". I like to keep my screen on but you shouldn't have to.

[–] [email protected] 8 points 10 months ago

Mtp is your friend, here is hiw I do it on my devices (samsung a23 and both opensuse and arch):

  • I connect my phone to my pc. Then select mtp in the phone notification.

  • Start my file manager (dolphine or whatever) and access my phone storage from there.

  • Make sure to allow the notification on the phone asking if you want to sahre your storage with the external device.

[–] [email protected] 6 points 10 months ago
[–] [email protected] 4 points 10 months ago* (last edited 10 months ago)

search usb in settings, set it to file transfer while its plugged into your pc. Alternatively you can install kde connect on both of the devices and transfer files wirelessly

[–] [email protected] 4 points 10 months ago (2 children)

For my LineageOS phone I use ADB: adb pull /sdcard/DCIM/Camera to get photos I've taken for example.

[–] [email protected] 1 points 10 months ago (1 children)

OP may need to install ADB and enable USB debugging. Here's a guide if they don't know how

https://www.tecmint.com/install-android-debug-bridge-linux/

[–] [email protected] 3 points 10 months ago

If OP installed GrapheneOS they likely already have adb and USB debugging configured.

That said, as recommended in the FAQ, one should use android-file-transfer, since enabling USB debugging (and using adb) is a security breach

[–] [email protected] 1 points 10 months ago

Actually, I always end up using ADB tools to get files or photos, you can get recursive files to get them all. I do it even with people that tries to get photos from their Windows machines, so I don't think it's a problem with Linux neither. This is the best way to get safely and correctly all your files.

[–] [email protected] 3 points 10 months ago

You need the package gvfs-mtp installed, if you want to do it via file manager. Or the adb tools for cli.

But really something you could have googled 3x in the time you asked this.

[–] [email protected] 2 points 10 months ago (1 children)

fun tip, if you have a samba share and your devices are in the same network, use a file manager that can connect to local network (like explorer by speed software), and transfer your files wirelessly. it seems to be equally fast too, i haven't used a cable for ages except for killing updaters and bloatware with adb.

[–] [email protected] 1 points 10 months ago

That's pretty neat. There's also an SMB client called CIFS Documents Provider (by Atsushi Wada) that's Free (MIT License) & open source.

[–] [email protected] 1 points 10 months ago* (last edited 10 months ago)

There is a package called android-transfer-file or something like that in the void repos but I'm not sure if its also in the mint repos, might be worth checking, its a gui app that makes it very straightforward to transfer files. Or in last resort you can always git clone the project and use 'make' to build manually the app