环境
系统:Ubuntu20 LTS x64
源码地址: https://github.com/prife/adb
Step1: 源码编译boringssl
$ cd <this-project>
$ cd lib
$ git clone https://salsa.debian.org/android-tools-team/android-platform-external-boringssl.git boringssl
$ 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
adb-master/lib/boringssl/debian/out 下会生成 libssl.so.0 和 libcryto.so.0
Step2:修改 CMakelists.txt
adb-master\src\CMakeLists.txt 1、line 170
${CMAKE_SOURCE_DIR}/lib/boringssl/debian/out/libcrypto.so
${CMAKE_SOURCE_DIR}/lib/boringssl/debian/out/libssl.so
指定Step1中编译好的so库路径,原有的会出错
2、 line 176 改为:
`LINK_FLAGS "-Wl,-rpath=./"`
目的是 在adb和adbd运行时查找 libssl.so.0 和 libcryto.so.0 时先在同一路径下寻找
|