Hacker News new | past | comments | ask | show | jobs | submit login
Adbfs-rootless – Mount Android phones on Linux with adb. No root required (github.com/spion)
245 points by peter_d_sherman 53 days ago | hide | past | favorite | 26 comments



Hello, maintainer here. Happy to see this little project on the front page of HN. Unfortunately it hasn't received the appropriate attention from me lately, mainly because of the difficulties of running tests (and the android emulator) on GH action runners. Attempt to add some basic tests can be found here https://github.com/spion/adbfs-rootless/pull/62

This submission motivated me to check out the latest state of virtualization in GHA and it looks like GH shipped it for all linux runners https://github.com/actions/runner-images/discussions/7191#di... - so it might be possible to get that PR working now.


Thank you for writing this. I use it routinely to back up my phone by mounting it and then simply running rsync.


Are you rooted? Have you ever tried restoring a backup in this way?

Backup on android (without Google Services' online) is awful, SeedVault exists but has issues.


Am I missing something? Your phone isn’t using encrypted storage?


Encrypted storage is an implementation detail of the filesystem. Once you're at the point of connecting an unlocked phone to a computer running ADB, you can just transfer files and not care about whether or not the underlying data is encrypted at rest.


Hi there do you think adbfs could work with adb over TCP (wifi)?


Answer - yes it can.

Pair over TCP like normal, connect to it, then follow the README.

``` adb pair xxx:xxx

adb connect yyy:yyy

adb devices

mkdir -p testhere

./adbfs testhere

ls testhere ```


Hi maintainer, can you please outline the differences in functionality between using this on a rooted vs non-rooted device? Thank you


I've never used it with a rooted device! :)

I don't think there should be any significant difference in funcitonality, other than perhaps the set of directories accessible. In general, you should be able to access anything that you can view / access using `adb shell ls`, `adb pull` and `adb push`


Understood, thanks. I thought there was some exploit or something in play.


Nothing that exciting, I'm afraid.


Can't you somehow run adb on real Linux?


If you use KDE Connect, which is cross-platform and not just for KDE, you can mount your phone's storage remotely without touching adb. I believe it uses sshfs in the background.

It's all automated so you don't have to think about how it works.


KDE Connect is the bee's knees :-)

I use it every day to interact between my phones and computers (browse files across devices, transfer them, use the phone screen as computer trackpad, control media playing on another device, run remote commands safely... and I know I'm not using even half of the features).


Seriously handy. I wish accessing the main app from the tray indicator icon only required one click tho, I keep forgetting that part of it exists!


Thanks, I had no idea this existed.

For those that just want to cick a link: https://kdeconnect.kde.org/


Unfortunately KDE Connect prevents one of my devices from ever sleeping (IIRC it was my Tab S6 Lite w/LineargeOS), resulting in only a few hours of battery life, so I had to stop using it.


It's also possible to run sshd in Termux (https://wiki.termux.com/wiki/Remote_Access), and mount a regular sshfs on the Linux side. Though this may not allow modifying files in external storage. The Linux side being:

    sshfs -o follow_symlinks,IdentityFile=/your/termux/id_rsa -p 8022 Linux@$PHONE_IP:/ /path/to/where/to/mount


ADB is such a crummy experience for file transfers, and Android File Transfer is somehow even worse. This sounds great!


Imagine how worse experience is if you are iOS user or developer - i Have to manually in xcode in gui download app container and unpack it change some mesh assets, pack again and switch containers in xcode again.


Bit of derailing, but I don't understand how apple's DX is still so bad everywhere.


barrier of entry = security ?


Sweet! Have been using rsync daemon with Termux over USB for file transfer till now as MTP is too buggy. I should try this :)



I wonder how this stacks up to using something like mtpfs[0] which I have found pretty flaky in the past. Cool project!

[0] https://www.adebenham.com/mtpfs/


MacDroid on MacOS is a shareware utility providing similar functionality of using ADB Shell level FS access inside a directory in Finder using the new File Provider API




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: