建立ARM处理器的Andr​​oid ADB [英] build android adb for arm processor

查看:221
本文介绍了建立ARM处理器的Andr​​oid ADB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用ARM的Andr​​oid平台ADB工具。一位在构建脚本的命令是:

  ARM-EABI-G ++
-I编译/库/主机/有/主机
-I编译/库/主机/包括
-I编译/库/主机
-I出/主机/ Linux的臂/ OBJ / STATIC_LIBRARIES / libhost_intermediates
-I的Dalvik / libnativehelper /有/ nativehelper
-I系统/核心/包括
-I硬件/ libhardware /包括
-I硬件/ libhardware_legacy /包括
-I硬件/ RIL /包括
-I的Dalvik / libnativehelper /包括
-I框架/基/包括
-I框架/基/的OpenGL /包括
-I框架/基/本地/包括
-I外部/ Skia的/包括
-I工具/包括
-I出/主机/ Linux的臂/ OBJ /包括
-I prebuilt / NDK / Android的NDK-R5B /平台/ Android的9 /弓臂/ usr / include目录
-c -fno-例外-Wno-multichar -fPIC
-include系统/核心/有/弓/ Linux的臂/ AndroidConfig.h
-D_FORTIFY_SOURCE = 0
-DANDROID -fmessage长度= 0 -W -Wall -Wno-未使用-Winit自-Wpointer-ARITH -O2 -g -fno严格走样-DNDEBUG -UDEBUG
-DANDROID -fmessage长度= 0 -W -Wall -Wno-未使用-Winit自-Wpointer-ARITH -Wsign宣传-DNDEBUG -UDEBUG
-MD -o输出/主机/ Linux的臂/ OBJ / STATIC_LIBRARIES / libhost_intermediates / pseudolocalize.o
建立/库/主机/ pseudolocalize.cpp

我已经确定我有最新的NDK-R5B安装,这是为了解决STL问题。不过,我仍然得到以下错误:

1:

 在文件从生成/库/主机/ pseudolocalize.cpp包括:
建立/库/主机/有/主机/ pseudolocalize.h:4:18:错误:字符串:没有这样的文件或目录
1:在文件从生成/库/主机/ pseudolocalize.cpp包括:
建立/库/主机/有/主机/ pseudolocalize.h:6:错误:命名空间STD'串'没有指定类型
建立/库/主机/ pseudolocalize.cpp:在功能为const char * pseudolocalize_char(字符):
建立/库/主机/ pseudolocalize.cpp:61:错误:'NULL'在此范围未声明
建立/库/主机/ pseudolocalize.cpp:在全局范围内:
建立/库/主机/ pseudolocalize.cpp:71:错误:'串'没有指定类型

有谁知道如何解决这个问题? BTW亚行的Intel版本的大楼通过以下链接正常工作:

http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html


解决方案

不需要

pseudolocalize.cpp亚行。和NDK工具链的目的是建立与仿生(Android的libc中)。亚行要求的glibc(GNU libc中)来构建。

我创建了一个Makefile文件编译为Linux / ARM ADB。这使得Makefile文件的静态链接亚行可执行的二进制的Linux / ARM,因此,它适用于Android / ARM为好。

如何让


  1. G ++精简版的ARM 和GNU make。

  2. 下载 Android源$ C ​​$ C

  3. 保存的Makefile 为系统/核心/ ADB / Makefile文件。

  4. CD系统/核心/ ADB;令。

I want to use Android ADB tool on ARM platform. One of the commands in the build script is:

arm-eabi-g++
-I build/libs/host/include/host
-I build/libs/host/include
-I build/libs/host
-I out/host/linux-arm/obj/STATIC_LIBRARIES/libhost_intermediates 
-I dalvik/libnativehelper/include/nativehelper
-I system/core/include
-I hardware/libhardware/include
-I hardware/libhardware_legacy/include
-I hardware/ril/include
-I dalvik/libnativehelper/include
-I frameworks/base/include
-I frameworks/base/opengl/include
-I frameworks/base/native/include
-I external/skia/include
-I tools/include
-I out/host/linux-arm/obj/include
-I prebuilt/ndk/android-ndk-r5b/platforms/android-9/arch-arm/usr/include
-c -fno-exceptions -Wno-multichar -fPIC
-include system/core/include/arch/linux-arm/AndroidConfig.h
-D_FORTIFY_SOURCE=0
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wsign-promo -DNDEBUG -UDEBUG
-MD -o out/host/linux-arm/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o   
build/libs/host/pseudolocalize.cpp

I have made sure I have the latest ndk-r5b installed, which is supposed to resolve the STL problem. However, I am still getting the following error:

In file included from build/libs/host/pseudolocalize.cpp:1:
build/libs/host/include/host/pseudolocalize.h:4:18: error: string: No such file or directory
In file included from build/libs/host/pseudolocalize.cpp:1:
build/libs/host/include/host/pseudolocalize.h:6: error: 'string' in namespace 'std' does not name a type
build/libs/host/pseudolocalize.cpp: In function 'const char* pseudolocalize_char(char)':
build/libs/host/pseudolocalize.cpp:61: error: 'NULL' was not declared in this scope
build/libs/host/pseudolocalize.cpp: At global scope:
build/libs/host/pseudolocalize.cpp:71: error: 'string' does not name a type

Does anyone know how to fix this problem? BTW the building of the intel version of adb works fine by following this link:

http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html

解决方案

pseudolocalize.cpp is not needed for adb. And NDK toolchain is intended to build with bionic(Android libc). adb requires glibc(GNU libc) to build.

I created a Makefile to compile adb for Linux/ARM. This Makefile makes statically linked adb executable binary for Linux/ARM, thus it works on Android/ARM as well.

How to make.

  1. Install Sourcery G++ Lite for ARM and GNU Make.
  2. Download "Android source code".
  3. Save Makefile as system/core/adb/Makefile.
  4. cd system/core/adb; make.

这篇关于建立ARM处理器的Andr​​oid ADB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆