2

I want to edit some files on my phone, but I can not access the root folder on my phone.

I'm using a rooted Google Nexus 5 running Android 5.0. I can read/write to my /, and /system by using the "ES File Explorer" Android app, but not Windows software.

How can I mount the Android system file in Windows, so I can read/write to the same places from there? If that's not possible on Windows: I'm also using Ubuntu. So, can I mount my phone under Ubuntu?

0

4 Answers 4

2

There's a second way, which should work with multiple operating systems on the computer's end: Taking a look at my list of file Android server apps, you can find some Android file-server apps using WebDAV or Samba, and SSH Clients & Server has some for SSH. Check those with "root capabilities", as you want to access the entire file system read/write.

Preparing your device for read/write access is done the same way as specified in my other answer. Then start the "server-app" you've selected, and you should be ready – not even a cable needed, as this works via WiFi:

  • Linux supports SSHFS, i.e. mounting the file system via SSH. There are also helpers to achieve this on Windows (listed there)
  • Samba is supported as "Samba" on Linux, and should be natively supported on Windows as "Windows Share"
  • WebDAV should also be supported by both systems

So with any of the three categories, you should be able to mount your Android's file system under Linux as well as Windows. Only possible "drawbacks" here are that you need an additional app on the Android device, and it might be a bit slower due to WiFi (the latter must not necessarily be the case, though).

3

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 :)

6
  • I've followed what you said, when I implement the command "adbfs ~/droid" my pc show "droid has been connected", the terminal show "--*-- exec_command: adb shell ls" but when I click on the device symbol, It show "Unhandled error message: Error when getting information for file '/home/peter/droid': Transport endpoint is not connected". What must I do now? Commented Dec 2, 2014 at 16:02
  • The first part (what the terminal shows) is normal and expected behavior. As clicking in the shell doesn't do anything, I don't know what "device symbol" you mean; you should rather cd to that folder, or (using your file explorer) navigate to /home/peter/droid (the "local" directory) instead of some device. For file operations, I'm not the "graphical guy" ;)
    – Izzy
    Commented Dec 2, 2014 at 16:48
  • This is what the terminal show peter@peter-N56VV:~/adbfs-rootless$ ./adbfs /droid --*-- exec_command: adb shell ls peter@peter-N56VV:~/adbfs-rootless$ /home/peter/droid bash: /home/peter/droid: Transport endpoint is not connected Commented Dec 2, 2014 at 16:59
  • Do you have the device connected, and USB debugging enabled? What does adb devices show? I've never seen that error message, but somehow "Transport endpoint is not connected" seems to indicate there's nothing on the "other end" that could be used.
    – Izzy
    Commented Dec 2, 2014 at 17:19
  • adb devices: List of devices attached 04b713228291c6d0 device The USB debugging mode is enabled. Commented Dec 2, 2014 at 17:21
0

Install FX File Explorer from the Play Store, give it root access, and change it through the filesystem.

0
0

Windows File Explorer by default doesn't let you access the Android root files. You'll need to download a different application (to your PC) for that. Many places (like this guidingtech.com tutorial recommend Android Commander. Another recommended file explorer program is Droid Explorer.

3
  • If you need a specific application to interact with the Android device's file system, that's not answering the question. Mounting a file system makes it available system-wide, for any application. If the question would be "how to copy files", there are many fine applications for that – Ryan's Droid Explorer definitely being one of them (the dev is active here as well ;)
    – Izzy
    Commented Dec 2, 2014 at 16:50
  • It is answering the question as in how you see and read/write the android system's root files on the pc.
    – Trish Ling
    Commented Dec 2, 2014 at 16:52
  • Yupp, it answers that part of the question, you're right. Maybe I take it a little to literal, as the title says mount android file system. It's definitely a useful hint – which the OP might wish to follow, lacking alternatives on Windows :) So thanks for bringing this in!
    – Izzy
    Commented Dec 2, 2014 at 17:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .