Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ adb-1 Public
forked from prife/adb

Android's adb standalone build with cmake, support Linux(x86-64、arm64), Windows(32bit) and macOS!

License

Notifications You must be signed in to change notification settings

lineCode/adb-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adb

Android's adb standalone build with cmake, support Linux(x86-64、arm64)], Windows(32bit) and macOS!

It's recommend to develop adb with vscode which's remote development is so usefull!

build adb target for Linux(X64、arm64)

step1: install toolchain

Please prepare an linux environment.

for arm/arm64, please install toolchain, for example you can download from

git clone this project.

$ cd <this-project>
$ cd lib
$ git clone https://salsa.debian.org/android-tools-team/android-platform-external-boringssl.git boringssl

step2: build boringssl

Please choose a platform as following.

  1. on intel pc with ubuntu Linux, please follow X64(AMD64)
  2. on Raspberry Pi or RK3399 or RK3328 with ubuntu Linux, please follow ARM64(AARCH64)

X86-64(AMD64)

$ cd boringssl
$ rm -rf debian/out
$ make CFLAGS=-fPIC DEB_HOST_ARCH=amd64 -f debian/libcrypto.mk
$ make CXXFLAGS=-fPIC DEB_HOST_ARCH=amd64 -f debian/libssl.mk

ARM64(AARCH64)

$ cd boringssl
$ rm -rf debian/out
$ make CFLAGS=-fPIC CC=aarch64-linux-gnu-gcc DEB_HOST_ARCH=arm64 -f debian/libcrypto.mk
$ make CXXFLAGS=-fPIC CXX=aarch64-linux-gnu-g++ DEB_HOST_ARCH=arm64 -f debian/libssl.mk

build adb

build on command line

$ mkdir build && cd build
$ cmake ..
$ make -j8

build with vscode on windows

you need an remote linux pc, then config vscode with it's remote development feature, it is so easy!

build adb target for windows(only 32-bit supported!)

  1. install msys2

config repo with https://mirror.tuna.tsinghua.edu.cn/help/msys2/

$ pacman -S mingw-w64-i686-gcc
$ pacman -S mingw-w64-i686-cmake
$ pacman -S make
  1. download source
$ cd lib
$ git clone https://salsa.debian.org/android-tools-team/android-platform-external-boringssl.git boringssl
$ cd ..
  1. build boringssl

It's not necessary to build boringssl, because I've already prebuilt on prebuilt/windows/32/libcrypto.a

If you really want build by yourself. Please

$ cd lib/boringssl
$ cp ../prebuilt/CMakeLists_boringssl.txt CMakeLists.txt
$ mkdir build32 && cd build32
$ cmake -G"Unix Makefiles" ..
$ make -j8

If there is nothing wrong. the libcrypto.a will be built out.

cp it to n-adb/prebuilt/windows/32/

  1. build adb

switch to the n-adb source direcoty, and run following commands

$ mkdir build32
$ cd build32
$ cmake -G"Unix Makefiles" ..
$ make -j8

build adb target for macOS

  1. download source
$ cd lib
$ git clone https://salsa.debian.org/android-tools-team/android-platform-external-boringssl.git boringssl
$ cd ..
  1. build boringssl

It's not necessary to build boringssl, because I've already prebuilt on prebuilt/osx/libcrypto.a

If you really want build by yourself. Please

$ cd lib/boringssl
$ cp ../prebuilt/CMakeLists_boringssl.txt CMakeLists.txt
$ mkdir build32 && cd build32
$ cmake ..
$ make -j8

If there is nothing wrong. the libcrypto.a will be built out.

cp it to n-adb/prebuilt/osx/

  1. build adb
$ mkdir build && cd build
$ cmake ..
$ make -j8

Troubleshooting

About

Android's adb standalone build with cmake, support Linux(x86-64、arm64), Windows(32bit) and macOS!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 72.1%
  • C 19.8%
  • Python 3.4%
  • Assembly 2.5%
  • Java 1.1%
  • Shell 0.5%
  • Other 0.6%