I cannot answer the Windows part – but the Ubuntu part I can answer for sure, as I'm using that as well and mount my devices from my computer, sometimes with full r/w access. What I use needs ADB tools to be installed on your computer. If you didn't already install them, see e.g. Is there a minimal installation of ADB?
Prepare your Droid
First a basic requirement, applying to any OS which might run on your computer: To be able to get full access, the ADB daemon needs to be running in root-mode. This is not the case with stock ROMs, even if rooted, by default (though many custom ROMs have it enabled by default). So first check: If an "ordinary" adb shell
directly brings you to the root-prompt (#
) without invoking su
, you're fine. Otherwise, you will need a helper like adbd insecure: Run it, and enable the "patched insecure mode". Optionally check the box to have that accomplished automatically on every boot of your device.
Prepare for write access to read-only file systems
Second, again independent from the OS on your computer: to read and write to file systems, they need to be mounted in read/write mode. You can accomplish that via adb shell
anytime you need to write there (I don't recomment leaving those partitions in permanent read/write mode), e.g. issuing a mount -o remount,rw /system
for the /system
partition.
Mount your Droid
Now let's go for the specifics. I mount the Android file system via ADB, utilizing FUSE. The tool for that is adbfs-rootless. Compiling the code is easy given the instructions there; that done, copy the resulting adbfs
binary to a directory in your $PATH
. Then create a mount-point on your computer; in my example, I will use ~/droid
for that. Now here we go:
# Mount the Android FS:
adbfs ~/droid
# Unmount it again:
fusermount -u ~/droid
To ease the process, I've created two aliases:
alias mdroid="adbfs ~/droid"
alias udroid="fusermount -u ~/droid"
You surely already have guessed: mdroid
stands for "mount droid", udroid
for "unmount droid".
A different approach to manually mounting/unmounting is using Midnight Commander with a specific VFS: mc-extfs-adb is doing that. A version I've spefically adapted for Ubuntu is available in the download area at IzzyOnDroid, where you can simply pick it (installation instructions included).
Both variants have their pros and cons: mc-extfs-adb takes quite a while on first access (while it caches the entire file system structure) – but then is pretty fast browsing the file system (as it is cached), only slowing down when you copy/edit files remotely. Using adbfs directly starts up much faster, but then always "hesitates" for a second when switching directories (as it does not cache the entire structure, but only reads on demand). I usually prefer the latter, but YMMV – hence I've given you both options :)