GithubHelp home page GithubHelp logo

adbncfs's Introduction

README.md {#README}

[TOC]

Android Debug Bridge via Netcat File System (adbncfs) {#section1}

Abstract {#abstract}

This is a FUSE based file system client to mount the file system of your android device on your linux host.

The idea of adbncfs was taken from ADBFS file system.

ADBFS uses adb shell commands to communicate with the device. This involves creation of an adb process for every command to execute on the device and that's why it is very very slow, especially if using a file manager.

To overcome this limitation I use NETCAT instead of adb shell to communicate with the device.

At startup a NETCAT process is started on both the android device and on the local host. Additional a adb port forwarding is setup. Now the shell commands are sent to the local NETCAT, then via port forwarding to the NETCAT on the android device which forwards the shell command to the bash shell. The output is sent the reverse way back.

ADB shell is still used to set up port forwarding and to start and kill the NETCAT process on the android device. ADB push and pull are used to move files to and from the device.

Features of this implementation are:

  • Based on FUSE (the best userspace file system framework for linux ;-)
  • Multithreading: more than one request can be on it's way to the device
  • Caching of file attributes and resolved links
  • well-behaved filesystem, allowing tools like find(1) df(1) and rsync(1) to work as expected

How to mount a android file system {#howtomount}

Once adbncfs is installed (see @ref installing) running it is very simple:

Make sure that

To mount the file system:

Create a mount point if needed (e.g. in your home directory)

> mkdir ~/mountpoint

For regular use, simply specifying a mountpoint will have the first available android device mounted under it.

> adbncfs mountpoint

Note, that it's recommended to run it as user, not as root.

To unmount the filesystem:

> fusermount -u mountpoint

Requirements {#requirements}

  • libfuse-dev
    • on debian execute sudo apt-get install libfuse-dev
  • pkg-config
    • on debian execute sudo apt-get install pkg-config
  • An install of gcc that supports the C++11 standard.
  • ADB
    • on debian execute sudo apt-get install android-tools-adb
  • BUSYBOX installed on your android device
  • optional
    • cppunit
      • on debian execute sudo apt-get install libcppunit-1.13-0 libcppunit-dev
    • cppcheck
      • on debian execute sudo apt-get install cppcheck
    • doxygen
      • on debian execute sudo apt-get install doxygen graphviz

Installing {#installing}

First you need to DOWNLOAD the repository and unzip it.

Compile adbncfs the usual way:

>  make
>  make install (as root)

And you are ready to go.

Known bugs {#knownbugs}

  • problems with files with ? in filenames (adb bug?)

Not yet implemented {#notyetimplemented}

The following FUSE callback functions are not yet implemented:

  • fgetattr
  • symlink
  • link
  • chmod
  • chown
  • ftruncate
  • fsyncdir
  • lock
  • bmap
  • setxattr
  • getxattr
  • listxattr
  • ioctl
  • poll

adbncfs's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.