I've got a problem when I complied android adb source code. I follow some tips on google:
$ git clone git://android.googlesource.com/platform/system/core.git
system/core
$ git clone git://android.googlesource.com/platform/build.git build
$ git clone git://android.googlesource.com/platform/external/zlib.git
external/zlib $ git clone git://android.googlesource.com/platform/bionic.git bionic
It goes well. And I do this: " edit build/core/main.mk and comment out the parts labelled
*# Check for the correct version of java*
and
*# Check for the correct version of javac*
Since 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 image*
This avoids having to download language files that aren’t needed for adb. " then it's the Makefile.Here I don't konw what I should do now, as the blog said,I should save the Makefile like this and then
cd system/core/adb;
make
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)
Then an error has occurred:
$ make arm-none-linux-gnueabi-gcc -O2 -g -Wall -Wno-unused-parameter -DADB_HOST=1 -DHAVE_FORKEXEC=1 -DHAVE_SYMLINKS -DHAVE_TERMIO_H -D_GNU_SOURCE -D_XOPEN_SOURCE -I. -I../include -I../../../external/zlib -c -o adb_client.o adb_client.c make: arm-none-linux-gnueabi-gcc:command not found make: * [adb_client.o] error 127
I think it‘s my OS is ubuntu but not Linux/ARM,but I don't know what I could do with this Makefile because of the lack of knowledge. help,please. Thank you!