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!
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 boringsslPlease choose a platform as following.
- on intel pc with ubuntu Linux, please follow
X64(AMD64) - 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.mkARM64(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.mkbuild on command line
$ mkdir build && cd build
$ cmake ..
$ make -j8build with vscode on windows
you need an remote linux pc, then config vscode with it's remote development feature, it is so easy!
- 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
- download source
$ cd lib
$ git clone https://salsa.debian.org/android-tools-team/android-platform-external-boringssl.git boringssl
$ cd ..
- 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/
- build adb
switch to the n-adb source direcoty, and run following commands
$ mkdir build32
$ cd build32
$ cmake -G"Unix Makefiles" ..
$ make -j8
- download source
$ cd lib
$ git clone https://salsa.debian.org/android-tools-team/android-platform-external-boringssl.git boringssl
$ cd ..
- 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/
- build adb
$ mkdir build && cd build
$ cmake ..
$ make -j8