• Stars
    star
    215
  • Rank 183,925 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 13 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android ADB file manager

aafm

Android ADB File Manager

A command line + GUI (GTK based) Android ADB-based file manager

Screenshot

Recent Android releases (Honeycomb / 3.0+) replace the older USB mount protocol with the use of MTP (Massive Transfer Protocol). Unfortunately this is still very buggy and doesn't work as it should in any machine I have tested (and heard of): system slowing down to a halt when transferring large number of files, files which are there but cannot be seen by the computer... etc.

So I decided to go ahead and build a little utility that would if not fix, at least alleviate the pain of using Honeycomb devices. aafm uses ADB (one of the command line tools provided with the official Android SDK) for communicating with the Android device. This is the same method that IDEs implement.

Installing

Requirements

Python with PyGTK bindings, GTK, git, and the Android SDK.

Getting these should be fairly straightforward if you're running any decent Linux distribution. If you're using Windows I believe there are next-next-next installers for everything. This leaves us with the third option which is Mac OS. Up until recently there wasn't an easy way to get any PyGTK software working in Mac OS, but turns out you can now download a binary build of PyGTK for Mac OS with which aafm works quite well!

It can be downloaded from http://afb.users.sourceforge.net/zero-install/PyGTK.pkg (more info). Simply run the installer once downloaded, and then follow the instructions below as if you were running a proper Linux system.

One note though: there are a few hiccups with the Mac version, but they are mostly cosmetic and won't prevent you from enjoying the software. Feel free to help correcting them if you have the know-how!

Clone repository

Clone this repository to a place you fancy. For example, your Applications folder.

git clone git://github.com/sole/aafm.git ~/Applications/aafm

Install the Android SDK

If it's not installed yet, download the SDK from its page and follow its instructions: http://developer.android.com/sdk/index.html

Basically (at least in Linux) just download a zip file and unpack it to a known location. In my case it's ~/Applications/android-sdk-linux_86. Once that is done, you need to make sure that the ADB tool is readily accessible from a shell (which is what aafm uses internally).

So to try that out, open a new terminal and type adb. If it works, you should get a long help message that starts with something like Android Debug Bridge version 1.0.26. If it doesn't work, you'll get something akin to adb: command not found.

In case it doesn't work, you need to add the path to ADB to the environment PATH variable. In Linux this is done by editing a file called .bashrc in your home folder (.bash_profile in Mac OS). Locate a line that looks like PATH=$PATH and make it look like this:

PATH=$PATH:~/Applications/android-sdk-linux_86/platform-tools

The line above appends ADB's path to whatever value $PATH held before. The path might be different, according to wherever you've installed the Android SDK.

For more information on ADB and a list of its features, read over here: http://developer.android.com/guide/developing/tools/adb.html

Also, I haven't tried it myself, but it seems that it's possible to download and build a reduced subset of the Android SDK only, including ADB and a few more tools. This doesn't require Java installed in the system. This page describes how: http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html

Close terminal and open it again

So the changes to the PATH get current. In Mac OS you might need to log in and out too.

Configure udev rules (if in Linux)

You need to let the system know that when you connect your USB device (i.e. the tablet) it should allow you, as a non-root user, to access it. If you don't do that, you'll get a "Insufficient permissions for device" error.

This is done by adding a new file that contains so called udev rules.

For example, in Ubuntu 10.10 you would add a file in /etc/udev/rules.d/51-android.rules with the following content:

# Samsung
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0777"

You can find out the "idVendor" value by running lsusb in a terminal. That will output a list of the currently connected USB devices, such as for example this:

Bus 004 Device 006: ID 05ac:8218 Apple, Inc. 
Bus 004 Device 003: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 004 Device 002: ID 05ac:0237 Apple, Inc. Internal Keyboard/Trackpad (ISO)
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 18d1:4e12 Google Inc. Nexus One Phone (Debug)
Bus 001 Device 002: ID 05ac:8507 Apple, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Since I'd like to add support for browsing my Nexus One phone (because aafm works with every Android device that adb can connect to), I just need to look at the device with id 18d1:4e12, and add the following line to the udev rules file:

SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"

Save it, and then change the file permissions:

chmod a+r /etc/udev/rules.d/51-android.rules

To make sure it worked, connect the device and try to run adb devices in a terminal. If it's working properly, you should see a list more or less like this:

List of devices attached 
4342354131444B534652	device

The numbers aren't important, the important bit is that you see device instead of ??????.

If it isn't, you might need to either disconnect the device and try again, or reload udev so that the rules are actually loaded. Try with this:

sudo /etc/init.d/udev restart

If everything else fails, try to log in and out again, or maybe even restart the system.

More information on udev rules and Android can be found on the official Android development guide: http://developer.android.com/guide/developing/device.html

Enable Debug mode in the device

Go to Settings β†’ Applications β†’ Development and make sure the USB debugging checkbox is ticked. You might get a scary warning saying debugging allows you to do nasty things--just ignore it.

Execute aafm

To execute it, cd to the place where it's been cloned:

cd ~/Applications/aafm/src/

And simply execute it:

./aafm-gui.py

If for some odd reason it has lost the executable permission, you can add it:

chmod +x ./aafm-gui.py

Or simply execute it using Python:

python ./aafm-gui.py

Once you're satisfied it's working, you can also make a launcher or add it to your Gnome menu, of course!

Using it

If everything works (and why shouldn't it?) you should get a window divided in two panels. The left side represents your host computer, and initially should show the files of the aafm directory, since you launched it from there. The right side represents your Android device's files --so it needs to be connected to the computer, and USB debugging must be enabled in the device. You can navigate just as you would do with your favourite file explorer. Files can be dragged from one to another panel, directories created, and files renamed (hint: right click and explore the options the contextual menu offers you!). You can also drag from Nautilus (in GNOME) into the device panel, to copy files to the device, or drag to Nautilus, for copying files from the device.

Be warned that currently the progress reporting is a bit hackish and with large files it will appear as if the window has got frozen. It hasn't--it's just waiting for the ADB transfer to finish. In the future this should be fixed, but I haven't come up with the best solution yet.

License

Copyright (C) 2011-2012 Soledad Penades (http://soledadpenades.com).

This software is licensed under a GPL V3 license. Please read the accompanying LICENSE.txt file for more details, but basically, if you modify this software and distribute it, you must make your changes public too, so that everyone can benefit from your work--just as you're doing with mine.

You can also make your changes public even if you don't plan on redistributing this application, okay? Sharing is good! :-)

Change log

2012 09 25 - r5

Several bug fixes and refactoring, plus a nice addition for those using desktop systems in Linux!

  • New .desktop file and icon allows users to launch aafm from GNOME/KDE/etc menus/shells/launchers (Huulivoide). Fixes #35.
  • New setup.py script for making aafm available system-wide (Huulivoide). Fixes #35.
  • Fix/refactor copying files between host and device (sole, xisberto). Fixes #33 and #37.
  • Gracefully handle unknown uids and gids (sole and muflone). Fixes #8 and #39.

2012 03 14 - r4

Many interesting bug fixes and new features thanks to the work of Norman Rasmussen and MichaΕ‚ Kowalczuk. Thanks!

  • Add BusyBox support (by sammael). Fixes #11.
  • Handle device drops when there's no row present (by normanr). Fixes #9.
  • Handle symlinks on the device correctly (by normanr). Fixes #12.
  • Quote/Unquote special characters in drag&drop messages (by normanr). Fixes #10.
  • Slightly improve the README. Clarify how to find out the device Id, add link to PyGTK binary for Mac users.
  • Move the TO DO list items that were on this README file over to the issue tracker in the project's page.

2011 11 06 - r3

  • Fix issue #4: use correct path separator in device when running under Windows
  • Fix issue #5: support for finding out ownership in Windows
  • Python 3 compatibility
  • Start using REVISION file
  • README.md revised

2011 09 30 - r2

  • Fix issue #3: ls -la fails in some devices

2011 07 18 - r1

  • First initial release; basic functionality is here!

Attributions

Hacking

I'm by no means a GTK/Python/ADB/Android expert. I'm just learning so this project will surely contain many things that can be improved or that are plain wrong, so feel free to clone the repository and submit pull requests :-)

In order to make your life a bit easier I'll roughly show what each file does:

  • Aafm.py - a class that communicates with an Android device, using ADB via shell commands. Takes care of copying and reading files, listing and parsing directories, etc.
  • aafm-gui.py - this is the GTK front-end. Takes care of building the window with the host and device panels, and issuing instructions to Aafm when the user requests something to be done.
  • TreeViewFile.py - a utility class that encapsulates a GTKTreeView and some more things in order to show file listings.
  • MultiDragTreeView.py - an awesome class developed by the guys of Quod Libet, that allows more than one element of a TreeView to be selected and dragged around.

As you can see, an aafm-cli.py GUI counterpart is missing. There was one at the beginning but I didn't redo it when I rewrote most of the code from scratch. Feel free to... you know what, if you're interested in having a CLI version.

This was initially developed in an Ubuntu Linux 10.10 system. I thought it wouldn't work on other systems, but it seems people are using it in a lot of places though. Some environments where it's known to work:

  • Ubuntu 10.10, 11.04, 11.10
  • Arch Linux
  • Windows (!!!)

TO DO

I'm now using Github's issue tracker to keep track of issues, bugs and wished-for features.

If you'd like to have a certain feature or think you've found a bug that is not in the list, please add it to the issue tracker at https://github.com/sole/aafm/issues

More Repositories

1

Animated_GIF

Javascript library for creating animated GIFs
JavaScript
225
star
2

gifwall

gif demo
JavaScript
53
star
3

node-zip-folder

zips a folder and calls your callback when it's done
JavaScript
44
star
4

audio-tags

audio tags
JavaScript
44
star
5

three.js-tutorials

the source code for my three.js tutorials
JavaScript
40
star
6

gumhelper

A module wrapping WebRTC's getUserMedia
JavaScript
35
star
7

rtcamera

A fun camera app to process images in real time, using Web technologies.
JavaScript
29
star
8

MIDIUtils

A series of methods to work with MIDI
JavaScript
28
star
9

demoscene

sole's demoscene projects
C++
28
star
10

phpMyID

A fork of phpMyID that works on php 5.4
PHP
27
star
11

sorollet.js

Monophonic additive synthesiser
JavaScript
27
star
12

howa

Hands On Web Audio slides
JavaScript
25
star
13

to_the_beat

to_the_beat // js
JavaScript
22
star
14

mvsd

minimally viable slide deck
JavaScript
21
star
15

sorollet

Monophonic additive synth written in C++. VSTi version + stand-alone player included.
C++
18
star
16

snippets

Code snippets. Miscellaneous purposes and languages.
HTML
18
star
17

npm_three_template

A template for using three.js with node.js modules and browserify and gulp and etc
JavaScript
13
star
18

munit.js

microunit testing for javascript
JavaScript
12
star
19

webcam-dithering

Realtime webcam dithering effect with WebGL
HTML
11
star
20

catserver

cats. cats everywhere.
JavaScript
11
star
21

node-dithering

various dithering algorithms written in JavaScript.
JavaScript
10
star
22

the-p2p-web

sole's researching stuff
10
star
23

dotvim

Sole's .vim directory
Vim Script
9
star
24

luisita

scriptable graphics environment Γ  la Processing, only it's based on Lua & C++
C
8
star
25

install-to-adb

Installing apps to Firefox OS devices connected via USB+ADB
JavaScript
8
star
26

WebComponentsMonkeyPatch

One monkey to patch them all.
JavaScript
7
star
27

kindle-clippings-parser

A node.js module to parse the clippings from a Kindle device.
JavaScript
7
star
28

theremin.js

SPOOKY
JavaScript
7
star
29

arewedubstepyet.com

tracking the status of the web audio editor in Firefox
JavaScript
6
star
30

webaudio-tutorials

web audio tutorials
JavaScript
5
star
31

test_cases

Attaching a good test case with your bug report is a godssend for QA and developers. If you want to learn how to write test cases, feel free to have a look at this repo.
JavaScript
5
star
32

fxos-guide

you guessed it right!
JavaScript
5
star
33

StringFormat.js

Simple Javascript library to format strings
JavaScript
5
star
34

AudioDetector.js

AudioDetector.js is a small Javascript library for detecting audio capabilities
JavaScript
5
star
35

brickpresso

A simple preso tool built with Mozilla Brick
JavaScript
4
star
36

instalooper

Technical Web Audio + MediaRecorder demo
JavaScript
4
star
37

renoise-node

the home for the node.js Renoise module
JavaScript
4
star
38

jranular

granular-synths-inspired javascript toy
4
star
39

cinnabarify

Cinnabarify left, right and centre
Shell
4
star
40

node-quneo

Making it easy to control a QuNeo controller with OSC messages
JavaScript
4
star
41

raining-rainbows

inspired by @harthur's avatar
JavaScript
4
star
42

perriscript

guau vaya sintaxis tela perri muy futuro
JavaScript
4
star
43

SyHi

Minimalistic Syntax Highlighter plug-in for WordPress which also makes sure code can still be copied and pasted into your favourite compiler!
PHP
4
star
44

webgl_vga

Homage to a VGA test
JavaScript
3
star
45

triangles

meshes
JavaScript
3
star
46

4x4JS

Four to the floor JavaScript - JSConf.EU 2013 talk
JavaScript
3
star
47

cascadiajs2013-slides

slides for cascadiajs 2013 talk
JavaScript
3
star
48

slides-introduction-webcomponents

An introduction to Web Components
JavaScript
3
star
49

kindle-clippings-html-formatter

A module to format the clippings from a Kindle device into HTML
JavaScript
3
star
50

push-app

Push an app to a client, uninstalling first if need be
JavaScript
3
star
51

lxjs2014

Slides for my talk at LXJS2014
JavaScript
3
star
52

mindblown.js

A framework for creating presentations in 3D, starting with HTML content
JavaScript
3
star
53

cmpsr

we'll see...
JavaScript
3
star
54

3400

"3400 miles below" source code
JavaScript
3
star
55

danger-dashboard

you've been messing with about:config but you don't remember it anymore-you need HELP!
JavaScript
3
star
56

reveal-minimal

A minimal setup for using Reveal.js with npm, Browserify, Jade, etc
JavaScript
3
star
57

mediarecorder-slides

Slides for presentation on MediaRecorder
HTML
3
star
58

disconnected-ensemble-src

JavaScript
2
star
59

raspberrysensor

JavaScript
2
star
60

sole.github.com

www
JavaScript
2
star
61

PageVisibility.js

Simple utility class for listening to page visibility changes
JavaScript
2
star
62

template

no more writing this skeleton from scratch each time!
JavaScript
2
star
63

x-livecode

A web component that uses x-editor for massive live coding.
2
star
64

metalsmith-blog-example

An example of using Metalsmith as static blog generator
JavaScript
2
star
65

WebComponentsSupport

a library for detecting current support for the usual features for building web components
JavaScript
2
star
66

kindle-clippings-beautify

A module to turn the clippings from a Kindle device into an HTML page that is 'beautiful' (for some particular definition of 'beautiful')
JavaScript
2
star
67

pommed-fork

My pommed fork :-)
C
2
star
68

sample-packaged-app

Sample packaged app that can be used to test installing Firefox OS apps
JavaScript
2
star
69

zero-to-hello

A minimal Vite + React + ESlint set up
JavaScript
2
star
70

x-editor

The most generic name ever for a code editor component.
JavaScript
2
star
71

our-projects-in-the-future

Presentation for work week
CSS
1
star
72

slides-devtools-may-2017

Slides for presentation on Firefox Developer Tools
HTML
1
star
73

ck-node-firefox

know your nodes and your firefoxes
JavaScript
1
star
74

glowingnemesis

jukebox
JavaScript
1
star
75

servo-gradient

JavaScript
1
star
76

supergear

For lack of a better name
JavaScript
1
star
77

advent-of-code-2021

Not sure this is a good idea, but hey
JavaScript
1
star
78

TinajaApp

Le hablas y te amplifica … con ecos y aplausos
JavaScript
1
star
79

multilingual-tts

Demonstration project for creating mp3 from a number of text files in different languages
Shell
1
star
80

MACCHINA_I

endless algorithmically built textures, right in your browser!
JavaScript
1
star
81

wp-reliably-heic

A WordPress plugin to reliably handle HEIC files
PHP
1
star
82

bitmapiser

SVG ⟢ Bitmap
JavaScript
1
star
83

p2p-chat

experimenting with a p2p chat using wifidirect on Firefox OS
JavaScript
1
star
84

networkInfo

shows network information
JavaScript
1
star
85

art-prompts

Random art prompts for a 365 day project
HTML
1
star
86

eyes

πŸ‘
HTML
1
star
87

deathlynemesis

An idea I just had right now and shouldn't be having because I have sh*tloads of work to do, but noting it down anyway so I can pick it in the nearby future. Yay!
1
star
88

publish-and-cron

a simple repository to test publishing to github and using travis cron as well
JavaScript
1
star
89

slides-ff2014

Slides for my talk at Full Frontal 2014
JavaScript
1
star
90

cjs14-embracing-failure

slides for my talk at CascadiaJS 2014
JavaScript
1
star
91

readimagetest

why is this broken, bryce? HALP
JavaScript
1
star
92

npm_app_template

a template for building an app using npm modules + browserify + gulp
JavaScript
1
star
93

firefox-os-developerify

Put your Firefox OS device into super developer mode
JavaScript
1
star
94

slides-dotjs2014

Slides for my talk at dotJS 2014
JavaScript
1
star
95

dotfiles

the little files that make us happy
1
star
96

you-know-what

shhht
JavaScript
1
star
97

4x4JS_vol2

Four to the floor JavaScript, vol 2
JavaScript
1
star
98

humacchina

project for mozfest science
JavaScript
1
star
99

querying-bugzilla

How to ask questions from Bugzilla (and hopefully get the answers you want)
1
star
100

generator-firefoxos

FirefoxOS yeoman generator
JavaScript
1
star