tools: added unistd.h to brawchannel_unix.cc for gcc 4.7+
[barry.git] / android / README
blob52c917961bd5a4c11af22b00d24ee899aaf0c669
1 Building:
2 =========
4 To build for android, run make with the "android-binaries" target with
5 the "ndk-build" tool in the path. For example:
7     make android-binaries
9 The "ndk-build" tool is part of the Android NDK, which can be found at:
10 http://developer.android.com/sdk/ndk/index.html
13 Installing:
14 ===========
16 The easiest way to install Barry on an Android device is by using adb,
17 which is part of the Android SDK.
19 These instructions assume the Android device has been configured to
20 support the root user by default. For Android Open Source Project
21 (AOSP) devices this should be the case. Other device ROMs may have
22 different mechanism for attaining root access, e.g. Cyanogenmod based
23 ROMs make use of the "sudo" utility.
25 To install Barry to the system partition on a device run:
27     adb remount
28     for F in libs/armeabi/*.so ; do adb push $F /system/lib; done
29     for F in libs/armeabi/b* libs/armeabi/lsusb libs/armeabi/pppob libs/armeabi/upldif ; \
30         do adb push $F /system/bin; done
32 To install Barry to a single directory on a device run:
34     adb shell mkdir /data/Barry
35     for F in libs/armeabi/* ; do adb push $F /data/Barry; done
38 Running:
39 ========
41 Before running Barry tools it may be necessary to grant the 
42 user running Barry access to the USB bus devices. This can be achieved by
43 running the following:
45    adb shell "for B in /dev/bus/usb/* ; do for D in \$B/* ; do chmod 0666 \$D ; done; done"
47 Note: this grants access to the USB devices for all users and therefore is
48 not secure for a system running arbitary software. Alternate security
49 mechanisms should be employeed by such systems.
51 If Barry was installed to the system partition then the tools can be run
52 directly:
54     adb shell btool
56 However if Barry was installed to a single directory then the library
57 path will need to be specified:
59     adb shell "LD_LIBRARY_PATH=/data/Barry /data/Barry/btool"