GithubHelp home page GithubHelp logo

playmore00 / libadb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wiliamsouza/libadb

0.0 0.0 0.0 492 KB

Android Debug Bridge build system and Python ctypes wrapper to adb

License: Other

Python 75.70% C 24.30%

libadb's Introduction

Android Debug Bridge lib

ADB build system and Python ctypes wrapper to libadb.

Requirements

On ubuntu:

sudo apt-get install autoconf
sudo apt-get install libtool
sudo apt-get install zlib1g-dev
sudo apt-get install libssl-dev

Cloning

Just run:

git clone https://github.com/wiliamsouza/libadb.git

It uses a git submodule, you must run this two commands:

git submodule init
git submodule update

Build

Copy make files to android source code:

cp src/core_Makefile.am src/core/Makefile.am
cp src/adb_Makefile.am src/core/adb/Makefile.am
cp src/libcutils_Makefile.am src/core/libcutils/Makefile.am
cp src/libzipfile_Makefile.am src/core/libzipfile/Makefile.am

To build the lib run:

autoreconf -vif
./configure
make

The above command will generate an libadb.so at build directory.

Running

Enable debug information:

export ADB_TRACE=1

Python

Export environment variable pointing to your recent build library location:

$ export ADB_LIBRARY_PATH=`pwd`/src/libadb/.libs/libadb.so

Set Python path to local copy o adblib python:

$ export PYTHONPATH=`pwd`/python/:$PYTHONPATH

Now you can call the follow command from the project root directory:

$ python python/examples/adb.py

It's an adb clone written in python using 3 lines of code.

C

Export environment variable pointing to your recent build library location:

export LD_LIBRARY_PATH=../`pwd`/src/libadb/.libs/:$LD_LIBRARY_PATH
export LIBRARY_PATH=../`pwd`/src/libadb/.libs/:$LIBRARY_PATH

Compile:

cd examples/
gcc devices.c -I../include/ -ladb -L../src/libadb/.libs/ -o devices

Run:

./devices

libadb's People

Contributors

wiliamsouza 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.