How to build Android adb for ARM
来源:互联网 发布:dynamic json 编辑:程序博客网 时间:2024/04/30 20:29
Thanks to Google I’ve just found searching in many Forum threads the way to build adb on ARM arch.
Just download sources with git (apt-get install git-core on debian-like system):
$ git clone git://android.git.kernel.org/platform/system/core.git system/coreor you can go into Android source code and find the directory /system/core/adb/
$ git clone git://android.git.kernel.org/platform/build.git build
$ git clone git://android.git.kernel.org/platform/external/zlib.git external/zlib
$ git clone git://android.git.kernel.org/platform/bionic.git bionic
Now edit build/core/main.mk and comment out the parts labelled
Also edit build/target/product/sdk.mk and comment out the “include” lines after
Save this Makefile as system/core/adb/Makefile : https://gist.github.com/958335
Then just run:
Then you can copy and use your adb binary.
That’s all! If you have any problems search your distro’s packages repository to install needed packages!
:-)
# Check for the correct version of javaand
# Check for the correct version of javacSince adb doesn’t need Java, these checks are unnecessary.
Also edit build/target/product/sdk.mk and comment out the “include” lines after
# include available languages for TTS in the system imageThis avoids having to download language files that aren’t needed for adb.
Save this Makefile as system/core/adb/Makefile : https://gist.github.com/958335
Then just run:
cd system/core/adb; make
Then you can copy and use your adb binary.
That’s all! If you have any problems search your distro’s packages repository to install needed packages!
:-)
Makefile:
SRCS+= utils.c
VPATH+= ../libcutils
SRCS+= abort_socket.c
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
SRCS+= socket_local_server.c
SRCS+= socket_loopback_client.c
SRCS+= socket_loopback_server.c
SRCS+= socket_network_client.c
VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
VPATH+= ../../../external/zlib
SRCS+= adler32.c
SRCS+= compress.c
SRCS+= crc32.c
SRCS+= deflate.c
SRCS+= infback.c
SRCS+= inffast.c
SRCS+= inflate.c
SRCS+= inftrees.c
SRCS+= trees.c
SRCS+= uncompr.c
SRCS+= zutil.c
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CPPFLAGS+= -I../../../external/zlib
CFLAGS+= -O2 -g -Wall -Wno-unused-parameter
LDFLAGS= -static
LIBS= -lrt -lpthread
TOOLCHAIN= arm-none-linux-gnueabi-
CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc
OBJS= $(SRCS:.c=.o)
all: adb
adb: $(OBJS)
$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
clean:
rm -rf $(OBJS)
VPATH+= ../libcutils
SRCS+= abort_socket.c
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
SRCS+= socket_local_server.c
SRCS+= socket_loopback_client.c
SRCS+= socket_loopback_server.c
SRCS+= socket_network_client.c
VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c
VPATH+= ../../../external/zlib
SRCS+= adler32.c
SRCS+= compress.c
SRCS+= crc32.c
SRCS+= deflate.c
SRCS+= infback.c
SRCS+= inffast.c
SRCS+= inflate.c
SRCS+= inftrees.c
SRCS+= trees.c
SRCS+= uncompr.c
SRCS+= zutil.c
CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CPPFLAGS+= -I../../../external/zlib
CFLAGS+= -O2 -g -Wall -Wno-unused-parameter
LDFLAGS= -static
LIBS= -lrt -lpthread
TOOLCHAIN= arm-none-linux-gnueabi-
CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc
OBJS= $(SRCS:.c=.o)
all: adb
adb: $(OBJS)
$(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
clean:
rm -rf $(OBJS)
URL:
http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html
http://stackoverflow.com/questions/5904765/build-android-adb-for-arm-processor 5 mesi fa
http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html
http://stackoverflow.com/questions/5904765/build-android-adb-for-arm-processor 5 mesi fa
- How to build Android adb for ARM
- How to build Android adb for ARM .
- How to Build FFmpeg for Android
- How to Build FFmpeg for Android
- How to Build FFmpeg for Android
- How to Build FFmpeg for Android
- How To Build CyanogenMod Android for smartphone
- (转)How to build adb, the Android debugger
- How to build android
- How to Build and Use libnetfilter_queue for Android
- How to build OpenOCD for windows
- how to build DLIB for iOS
- How to Build and Run Android L 64-bit ARM in QEMU
- How to cross-compile OpenSSL for ARM
- How to cross-compile Chromium for ARM
- 编译自己的Windows Android SDK(how to build Android SDK for Windows)
- 编译自己的Windows Android SDK(how to build Android SDK for Windows)
- How To Build GCC 4.8.2 ARM Cross-Compiler
- 冒泡法
- Linux设备驱动模型 sysfs
- linux-Vi使用方法(备查)
- C# 在系统通知区域中显示图标
- Linux下更改vim编码
- How to build Android adb for ARM
- 安装vs2008 sp1后程序出错--VC2008中 “Debug\Ckeshe.pch”预编译头文件来自编译器的早期版本,或者预编译头为 C++ 而在 C 中使用它(或相反)
- NAT原理简介
- 在Linux下安装Oracle11g
- Java中static关键字
- Linux 驱动开发文章收录
- Android模拟器学framework和driver之传感器篇4(Android APP)
- Linux crontab定时执行任务 命令格式与详细例子
- 翻頁代碼