当前位置:首页 » 安卓系统 » androidarch

androidarch

发布时间: 2022-09-25 01:56:23

⑴ 如何制定android交叉编译工具链

经常搞嵌入式开发的朋友对于交叉编译环境应该并不陌生,说白了,就是一组运行在x86 PC机的编译工具,可以让你在PC机上编译出目标平台(例如ARM)可识别的二进制文件。Android平台也提供了这样的交叉编译工具链,就放在Android的NDK开发包的toolchains目录下,因此,我们的Makefile文件中,只需给出相应的编译工具即可。
废话就先说到这,直接上例子,我们目标是把下面这个math.c文件编译成一个静态库文件:
#include <stdio.h>
int add( int a , int b ) {
return a+b;
}
你需要编写一个Makefile文件,这里假设你的Android ndk被安装在 /opt/android/ndk 目录下,当然,你可以根据自己的实际情况修改Makefile中相关路径的定义,Makefile文件示例如下:
# Makefile Written by ticktick
# Show how to cross-compile c/c++ code for android platform
.PHONY: clean
NDKROOT=/opt/android/ndk
PLATFORM=$(NDKROOT)/platforms/android-14/arch-arm
CROSS_COMPILE=$(NDKROOT)/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
CC=$(CROSS_COMPILE)gcc
AR=$(CROSS_COMPILE)ar
LD=$(CROSS_COMPILE)ld
CFLAGS = -I$(PWD) -I$(PLATFORM)/usr/include -Wall -O2 -fPIC -DANDROID -DHAVE_PTHREAD -mfpu=neon -mfloat-abi=softfp
LDFLAGS =
TARGET = libmath.a
SRCS = $(wildcard *.c)
OBJS = $(SRCS:.c=.o)
all: $(OBJS)
$(AR) -rc $(TARGET) $(OBJS)
clean:
rm -f *.o *.a *.so
这里不讲Makefile文件的基本原理,只说明一下针对Android环境的Makefile文件编写的注意事项。
(1) CROSS_COMPILE
必须正确给出Android NDK编译工具链的路径,当在目录中执行make命令的时候,编译系统会根据 CROSS_COMPILE 前缀寻找对应的编译命令。
(2) -I$(PLATFORM)/usr/include
由于Android平台没有使用传统的c语言库libc,而是自己编写了一套更加高效更适合嵌入式平台的c语言库,所以系统头文件目录不能再使用默认的路径,必须直到Android平台的头文件目录
(3) -Wall -O2 -fPIC -DANDROID -DHAVE_PTHREAD -mfpu=neon -mfloat-abi=softfp
这些参数的意义网上基本上都有介绍,我就不一一解释了,并不都是必须添加的,但比较常用。
编译方法:
写好makefile文件,并且保存之后,就可以直接在当前目录下执行make命令,编译完成后,当前目录下会生成 libmath.a ,即可直接拿到Android的jni工程中和使用了。

⑵ android kernel和标准linux kernel的区别

android kernel和标准linux kernel的区别
总的区别可以归纳如下:
ARCH -- 这是Android修改了arch/arm下面的一些文件:
arch/arm:
Chg: arch/arm/kernel/entry-armv.S
Chg: arch/arm/kernel/mole.c
Chg: arch/arm/kernel/process.c
Chg: arch/arm/kernel/ptrace.c
Chg: arch/arm/kernel/setup.c
Chg: arch/arm/kernel/signal.c
Chg: arch/arm/kernel/traps.c
Chg: arch/arm/mm/cache-v6.S
Chg: arch/arm/vfp/entry.S
Chg: arch/arm/vfp/vfp.h
Chg: arch/arm/vfp/vfphw.S
Chg: arch/arm/vfp/vfpmole.c
Goldfish -- 这是Android为了模拟器所开发的一个虚拟硬件平台。Goldfish执行arm926T指令(在2.6.29中,goldfish也支持ATMv7指令),但是在实际的设备中,该虚拟平台的文件不会被编译。
arch/arm/mach-goldfish:
New: arch/arm/mach-goldfish/audio.c
New: arch/arm/mach-goldfish/board-goldfish.c
New: arch/arm/mach-goldfish/pdev_bus.c
New: arch/arm/mach-goldfish/pm.c
New: arch/arm/mach-goldfish/switch.c
New: arch/arm/mach-goldfish/timer.c
YAFFS2 -- 和PC把文件存储在硬盘上不一样, 移动设备一般把Flash作为存储设备。尤其是NAND flash应用非常广泛(绝大多数手机用的都是NAND flash,三星的一些手机使用的是OneNAND)。NAND flash具有低成本和高密度的优点。
YAFFS2 是“Yet Another Flash File System, 2nd edition" 的简称。 它提供在Linux内核和NAND flash设备 之前高效率的接口。 YAFFS2并没有包含在标准的Linux内核中, Google把它添加到了Android的kernel
fs/yaffs2:
New: fs/yaffs2/devextras.h
New: fs/yaffs2/Kconfig
New: fs/yaffs2/Makefile
New: fs/yaffs2/moleconfig.h
New: fs/yaffs2/yaffs_checkptrw.c
New: fs/yaffs2/yaffs_checkptrw.h
New: fs/yaffs2/yaffs_ecc.c
New: fs/yaffs2/yaffs_ecc.h
New: fs/yaffs2/yaffs_fs.c
New: fs/yaffs2/yaffs_getblockinfo.h
New: fs/yaffs2/yaffs_guts.c
New: fs/yaffs2/yaffs_guts.h
New: fs/yaffs2/yaffsinterface.h
New: fs/yaffs2/yaffs_mtdif1.c
New: fs/yaffs2/yaffs_mtdif1.h
New: fs/yaffs2/yaffs_mtdif2.c
New: fs/yaffs2/yaffs_mtdif2.h
New: fs/yaffs2/yaffs_mtdif.c
New: fs/yaffs2/yaffs_mtdif.h
New: fs/yaffs2/yaffs_nand.c
New: fs/yaffs2/yaffs_nandemul2k.h
New: fs/yaffs2/yaffs_nand.h
New: fs/yaffs2/yaffs_packedtags1.c
New: fs/yaffs2/yaffs_packedtags1.h
New: fs/yaffs2/yaffs_packedtags2.c
New: fs/yaffs2/yaffs_packedtags2.h
New: fs/yaffs2/yaffs_qsort.c
New: fs/yaffs2/yaffs_qsort.h
New: fs/yaffs2/yaffs_tagscompat.c
New: fs/yaffs2/yaffs_tagscompat.h
New: fs/yaffs2/yaffs_tagsvalidity.c
New: fs/yaffs2/yaffs_tagsvalidity.h
New: fs/yaffs2/yportenv.h
Bluetooth -- Google为Bluetooth打上了patch,fix了一些Bluetooth的bug
drivers/bluetooth:
Chg: drivers/bluetooth/bfusb.c
Chg: drivers/bluetooth/bt3c_cs.c
Chg: drivers/bluetooth/btusb.c
Chg: drivers/bluetooth/hci_h4.c
Chg: drivers/bluetooth/hci_ll.c
Scheler -- 对于Scheler的改变非常小,我对它并没有去研究。
Chg: kernel/sched.c

New Android Functionality -- 除了fix一些bug以及其他一些小的更改,Android增加了一些新的功能,介绍如下:
IPC Binder -- The IPC Binder is an Inter-Process Communication (IPC) mechanism. It allows processes to provide services to other processes via a set of higher-level APIs than are available in standard Linux. An Internet search indicated that the Binder concept originated at Be, Inc., and then made its way into Palm's software, before Google wrote a new Binder for Android.
New: drivers/staging/android/binder.c
Low Memory Killer -- Android adds a low-memory killer that, each time it's called, scans the list of running Linux processes, and kills one. It was not clear in our cursory examination why Android adds a low-memory killer on top of the already existing one in the standard Linux kernel.
New: drivers/staging/android/lowmemorykiller.c
Ashmem -- Ashmem is an Anonymous SHared MEMory system that adds interfaces so processes can share named blocks of memory. As an example, the system could use Ashmem to store icons, which multiple processes could then access when drawing their UI. The advantage of Ashmem over traditional Linux shared memory is that it provides a means for the kernel to reclaim these shared memory blocks if they are not currently in use. If a process then tries to access a shared memory block the kernel has freed, it will receive an error, and will then need to reallocate the block and reload the data.
New: mm/ashmem.c
RAM Console and Log Device -- To aid in debugging, Android adds the ability to store kernel log messages to a RAM buffer. Additionally, Android adds a separate logging mole so that user processes can read and write user log messages.
New: drivers/staging/android/ram_console.c
Android Debug Bridge -- Debugging embedded devices can best be described as challenging. To make debugging easier, Google created the Android Debug Bridge (ADB), which is a protocol that runs over a USB link between a hardware device running Android and a developer writing applications on a desktop PC.
drivers/usb/gadget:
New: drivers/usb/gadget/android.c
Chg: drivers/usb/gadget/composite.c
Chg: drivers/usb/gadget/f_acm.c
New: drivers/usb/gadget/f_acm.h
New: drivers/usb/gadget/f_adb.c
New: drivers/usb/gadget/f_adb.h
New: drivers/usb/gadget/f_mass_storage.c
New: drivers/usb/gadget/f_mass_storage.h

Android also adds a new real-time clock, switch support, and timed GPIO support. We list the impacted files for these new moles at the end of this document.
Power Management -- Power management is one of the most difficult pieces to get right in mobile devices, so we split it out into a group separate from the other pieces. It's interesting to note that Google added a new power management system to Linux, rather than reuse what already existed. We list the impacted files at the end of this document.
kernel/power:
New: kernel/power/consoleearlysuspend.c
New: kernel/power/earlysuspend.c
New: kernel/power/fbearlysuspend.c
Chg: kernel/power/main.c
Chg: kernel/power/power.h
Chg: kernel/power/process.c
New: kernel/power/userwakelock.c
New: kernel/power/wakelock.c
Miscellaneous Changes -- In addition to the above, we found a number of changes that could best be described as, 'Miscellaneous.' Among other things, these changes include additional debugging support, keypad light controls, and management of TCP networking.
(freedom_asic)

⑶ 有人用64位的arch 配置Androidsdk吗

你没有配置java的环境变量。 在Windows机器上,右键单击我的电脑,选择属性->高级,点“环境变量”按钮,在出现的对话框中: 系统变量配置: 1、变量名:classpath 变量值:.;C:\Program Files\Java\jdk1.5.0_06\lib\tools.jar;C:\Program Files\Java\jdk1.5.0_06\bin 2、变量名:java_home 变量值:C:\Program Files\Java\jdk1.5.0_06 3、变量名:path 变量值:C:\Program Files\Java\jdk1.5.0_06\bin 用户变量: 1、变量名:Path 变量值:D:\android\android-sdk-windows-1.5_r2\tools (注:上面的路径替换成自己本机的路径)

⑷ 嵌入式linux和嵌入式android系统有什么区别和联系

嵌入式android源码架构:uboot+linux kernel+android(包含文件系统,虚拟机,UI)
嵌入式linux:这是大部分人认识的linux uboot+linux kernel+文件系统+QT(UI),
当然两者的linux 内核因为上层UI的不同会稍有差别,不过还是非常接近的,做过linux的人可以无缝切换到android底层开发,所以大家说的学习android系统,其实最重要的就是学习linux驱动,再加一下android下的专门的HAL,JNI,java等等,不过大公司android相关部分也是专门的人做的了。

甚至连QT都不用了,因为linux很多设备都是没有UI的,所以要来干啥?直接无界面,照样是嵌入式linux。

现在大家说的什么嵌入式debian,ubuntu,其实也是站在linux巨人的肩膀上,其实都不算是linux的分支,只算是linux的延伸,小变化而已。看到这里大家知道嵌入式linux的强大了吧,反正是比wince 强大N倍啊。

O(∩_∩)O~,所以啊,学习嵌入式android,其实底下就是学习uboot,linux内核啊,不会搞这些就像搞应用一样,所以大家以为android就是java,是非常片面的。

以前老的,说了一下区别,可以参考一下
ARCH -- 这是Android修改了arch/arm下面的一些文件:
arch/arm:
Chg: arch/arm/kernel/entry-armv.S
Chg: arch/arm/kernel/mole.c
Chg: arch/arm/kernel/process.c
Chg: arch/arm/kernel/ptrace.c
Chg: arch/arm/kernel/setup.c
Chg: arch/arm/kernel/signal.c
Chg: arch/arm/kernel/traps.c
Chg: arch/arm/mm/cache-v6.S
Chg: arch/arm/vfp/entry.S
Chg: arch/arm/vfp/vfp.h
Chg: arch/arm/vfp/vfphw.S
Chg: arch/arm/vfp/vfpmole.c
Goldfish -- 这是Android为了模拟器所开发的一个虚拟硬件平台。Goldfish执行arm926T指令(在2.6.29中,goldfish也支持ATMv7指令),但是在实际的设备中,该虚拟平台的文件不会被编译。
arch/arm/mach-goldfish:
New: arch/arm/mach-goldfish/audio.c
New: arch/arm/mach-goldfish/board-goldfish.c
New: arch/arm/mach-goldfish/pdev_bus.c
New: arch/arm/mach-goldfish/pm.c
New: arch/arm/mach-goldfish/switch.c
New: arch/arm/mach-goldfish/timer.c
YAFFS2 -- 和PC把文件存储在硬盘上不一样, 移动设备一般把Flash作为存储设备。尤其是NAND flash应用非常广泛(绝大多数手机用的都是NAND flash,三星的一些手机使用的是OneNAND)。NAND flash具有低成本和高密度的优点。
YAFFS2 是“Yet Another Flash File System, 2nd edition" 的简称。 它提供在Linux内核和NAND flash设备 之前高效率的接口。 YAFFS2并没有包含在标准的Linux内核中, Google把它添加到了Android的kernel
fs/yaffs2:
New: fs/yaffs2/devextras.h
New: fs/yaffs2/Kconfig
New: fs/yaffs2/Makefile
New: fs/yaffs2/moleconfig.h
New: fs/yaffs2/yaffs_checkptrw.c
New: fs/yaffs2/yaffs_checkptrw.h
New: fs/yaffs2/yaffs_ecc.c
New: fs/yaffs2/yaffs_ecc.h
New: fs/yaffs2/yaffs_fs.c
New: fs/yaffs2/yaffs_getblockinfo.h
New: fs/yaffs2/yaffs_guts.c
New: fs/yaffs2/yaffs_guts.h
New: fs/yaffs2/yaffsinterface.h
New: fs/yaffs2/yaffs_mtdif1.c
New: fs/yaffs2/yaffs_mtdif1.h
New: fs/yaffs2/yaffs_mtdif2.c
New: fs/yaffs2/yaffs_mtdif2.h
New: fs/yaffs2/yaffs_mtdif.c
New: fs/yaffs2/yaffs_mtdif.h
New: fs/yaffs2/yaffs_nand.c
New: fs/yaffs2/yaffs_nandemul2k.h
New: fs/yaffs2/yaffs_nand.h
New: fs/yaffs2/yaffs_packedtags1.c
New: fs/yaffs2/yaffs_packedtags1.h
New: fs/yaffs2/yaffs_packedtags2.c
New: fs/yaffs2/yaffs_packedtags2.h
New: fs/yaffs2/yaffs_qsort.c
New: fs/yaffs2/yaffs_qsort.h
New: fs/yaffs2/yaffs_tagscompat.c
New: fs/yaffs2/yaffs_tagscompat.h
New: fs/yaffs2/yaffs_tagsvalidity.c
New: fs/yaffs2/yaffs_tagsvalidity.h
New: fs/yaffs2/yportenv.h
Bluetooth -- Google为Bluetooth打上了patch,fix了一些Bluetooth的bug
drivers/bluetooth:
Chg: drivers/bluetooth/bfusb.c
Chg: drivers/bluetooth/bt3c_cs.c
Chg: drivers/bluetooth/btusb.c
Chg: drivers/bluetooth/hci_h4.c
Chg: drivers/bluetooth/hci_ll.c
Scheler -- 对于Scheler的改变非常小,我对它并没有去研究。
Chg: kernel/sched.c
New Android Functionality -- 除了fix一些bug以及其他一些小的更改,Android增加了一些新的功能,介绍如下:
IPC Binder -- The IPC Binder is an Inter-Process Communication (IPC) mechanism. It allows processes to provide services to other processes via a set of higher-level APIs than are available in standard Linux. An Internet search indicated that the Binder concept originated at Be, Inc., and then made its way into Palm's software, before Google wrote a new Binder for Android.
New: drivers/staging/android/binder.c
Low Memory Killer -- Android adds a low-memory killer that, each time it's called, scans the list of running Linux processes, and kills one. It was not clear in our cursory examination why Android adds a low-memory killer on top of the already existing one in the standard Linux kernel.
New: drivers/staging/android/lowmemorykiller.c
Ashmem -- Ashmem is an Anonymous SHared MEMory system that adds interfaces so processes can share named blocks of memory. As an example, the system could use Ashmem to store icons, which multiple processes could then access when drawing their UI. The advantage of Ashmem over traditional Linux shared memory is that it provides a means for the kernel to reclaim these shared memory blocks if they are not currently in use. If a process then tries to access a shared memory block the kernel has freed, it will receive an error, and will then need to reallocate the block and reload the data.
New: mm/ashmem.c
RAM Console and Log Device -- To aid in debugging, Android adds the ability to store kernel log messages to a RAM buffer. Additionally, Android adds a separate logging mole so that user processes can read and write user log messages.
New: drivers/staging/android/ram_console.c
Android Debug Bridge -- Debugging embedded devices can best be described as challenging. To make debugging easier, Google created the Android Debug Bridge (ADB), which is a protocol that runs over a USB link between a hardware device running Android and a developer writing applications on a desktop PC.
drivers/usb/gadget:
New: drivers/usb/gadget/android.c
Chg: drivers/usb/gadget/composite.c
Chg: drivers/usb/gadget/f_acm.c
New: drivers/usb/gadget/f_acm.h
New: drivers/usb/gadget/f_adb.c
New: drivers/usb/gadget/f_adb.h
New: drivers/usb/gadget/f_mass_storage.c
New: drivers/usb/gadget/f_mass_storage.h

Android also adds a new real-time clock, switch support, and timed GPIO support. We list the impacted files for these new moles at the end of this document.

Power Management -- Power management is one of the most difficult pieces to get right in mobile devices, so we split it out into a group separate from the other pieces. It's interesting to note that Google added a new power management system to Linux, rather than reuse what already existed. We list the impacted files at the end of this document.
kernel/power:
New: kernel/power/consoleearlysuspend.c
New: kernel/power/earlysuspend.c
New: kernel/power/fbearlysuspend.c
Chg: kernel/power/main.c
Chg: kernel/power/power.h
Chg: kernel/power/process.c
New: kernel/power/userwakelock.c
New: kernel/power/wakelock.c
Miscellaneous Changes -- In addition to the above, we found a number of changes that could best be described as, 'Miscellaneous.' Among other things, these changes include additional debugging support, keypad light controls, and management of TCP networking
http://www.linuxfordevices.com/c ... id-to-a-new-device/
http://hi..com/smallbigwang/item/95c99ebcb0e9544cba0e1281

⑸ android asmtypes 是什么意思

Google提供的Android包含了原始Android的目标机代码,主机编译工具、仿真环境,的代码包经过解压后(这里是Android2.2的源码包),源代码的第一层目录结构如下:
|-- Makefile
|-- bionic (bionic C库)
|-- bootable (启动引导相关代码)
|-- build (存放系统编译规则及generic等基础开发包配置)
|-- cts (Android兼容性测试套件标准)
|-- dalvik (dalvik JAVA虚拟机)
|-- development (应用程序开发相关)
|-- external (android使用的一些开源的模组)
|-- frameworks (核心框架——java及C++语言)
|-- hardware (主要保护硬解适配层HAL代码)
|-- libcore
|-- ndk
|-- device
|-- out (编译完成后的代码输出与此目录)
|-- packages (应用程序包)
|-- prebuilt (x86和arm架构下预编译的一些资源)
|-- sdk (sdk及模拟器)
|-- system (文件系统库、应用及组件——C语言)
`-- vendor (厂商定制代码)
bionic 目录
|-- libc (C库)
| |-- arch-arm (ARM架构,包含系统调用汇编实现)
| |-- arch-x86 (x86架构,包含系统调用汇编实现)
| |-- bionic (由C实现的功能,架构无关)
| |-- docs (文档)
| |-- include (头文件)
| |-- inet
| |-- kernel (Linux内核中的一些头文件)
| |-- netbsd (?netbsd系统相关,具体作用不明)
| |-- private (?一些私有的头文件)
| |-- stdio (stdio实现)
| |-- stdlib (stdlib实现)
| |-- string (string函数实现)
| |-- tools (几个工具)
| |-- tzcode (时区相关代码)
| |-- unistd (unistd实现)
| `-- zoneinfo (时区信息)
|-- libdl (libdl实现,dl是动态链接,提供访问动态链接库的功能)
|-- libm (libm数学库的实现,)
| |-- alpha (apaha架构)
| |-- amd64 (amd64架构)
| |-- arm (arm架构)
| |-- bsdsrc (?bsd的源码)
| |-- i386 (i386架构)
| |-- i387 (i387架构?)
| |-- ia64 (ia64架构)
| |-- include (头文件)
| |-- man (数学函数,后缀名为.3,一些为freeBSD的库文件)
| |-- powerpc (powerpc架构)
| |-- sparc64 (sparc64架构)
| `-- src (源代码)
|-- libstdc++ (libstdc++ C++实现库)
| |-- include (头文件)
| `-- src (源码)
|-- libthread_db (多线程程序的调试器库)
| `-- include (头文件)
`-- linker (动态链接器)
`-- arch (支持arm和x86两种架构)
bootable 目录
|-- bootloader (适合各种bootloader的通用代码)
| `-- legacy (估计不能直接使用,可以参考)
| |-- arch_armv6 (V6架构,几个简单的汇编文件)
| |-- arch_msm7k (高通7k处理器架构的几个基本驱动)
| |-- include (通用头文件和高通7k架构头文件)
| |-- libboot (启动库,都写得很简单)
| |-- libc (一些常用的c函数)
| |-- nandwrite (nandwirte函数实现)
| `-- usbloader (usbloader实现)
|-- diskinstaller (android镜像打包器,x86可生产iso)
`-- recovery (系统恢复相关)
|-- edify (升级脚本使用的edify脚本语言)
|-- etc (init.rc恢复脚本)
|-- minui (一个简单的UI)
|-- minzip (一个简单的压缩工具)
|-- mttils (mtd工具)
|-- res (资源)
| `-- images (一些图片)
|-- tools (工具)
| `-- ota (OTA Over The Air Updates升级工具)
`-- updater (升级器)
build目录
|-- core (核心编译规则)
|-- history (历史记录)
|-- libs
| `-- host (主机端库,有android “cp”功能替换)
|-- target (目标机编译对象)
| |-- board (开发)
| | |-- emulator (模拟器)
| | |-- generic (通用)
| | |-- idea6410 (自己添加的)
| | `-- sim (最简单)
| `-- proct (开发对应的编译规则)
| `-- security (密钥相关)
`-- tools (编译中主机使用的工具及脚本)
|-- acp (Android "acp" Command)
|-- apicheck (api检查工具)
|-- applypatch (补丁工具)
|-- apriori (预链接工具)
|-- atree (tree工具)
|-- bin2asm (bin转换为asm工具)
|-- check_prereq (检查编译时间戳工具)
|-- dexpreopt (模拟器相关工具,具体功能不明)
|-- droiddoc (?作用不明,java语言,网上有人说和JDK5有关)
|-- fs_config (This program takes a list of files and directories)
|-- fs_get_stats (获取文件系统状态)
|-- iself (判断是否ELF格式)
|-- isprelinked (判断是否prelinked)
|-- kcm (按键相关)
|-- lsd (List symbol dependencies)
|-- releasetools (生成镜像的工具及脚本)
|-- rgb2565 (rgb转换为565)
|-- signapk (apk签名工具)
|-- soslim (strip工具)
`-- zipalign (zip archive alignment tool)
dalvik目录 dalvik虚拟机
.
|-- dalvikvm (main.c的目录)
|-- dexmp (dex反汇编)
|-- dexlist (List all methods in all concrete classes in a DEX file.)
|-- dexopt (预验证与优化)
|-- docs (文档)
|-- dvz (和zygote相关的一个命令)
|-- dx (dx工具,将多个java转换为dex)
|-- hit (?java语言写成)
|-- libcore (核心库)
|-- libcore-disabled (?禁用的库)
|-- libdex (dex的库)
|-- libnativehelper (Support functions for Android's class libraries)
|-- tests (测试代码)
|-- tools (工具)
`-- vm (虚拟机实现)
development 目录 (开发者需要的一些例程及工具)
|-- apps (一些核心应用程序)
| |-- BluetoothDebug (蓝牙调试程序)
| |-- CustomLocale (自定义区域设置)
| |-- Development (开发)
| |-- Fallback (和语言相关的一个程序)
| |-- FontLab (字库)
| |-- GestureBuilder (手势动作)
| |-- NinePatchLab (?)
| |-- OBJViewer (OBJ查看器)
| |-- SdkSetup (SDK安装器)
| |-- SpareParts (高级设置)
| |-- Term (远程登录)
| `-- launchperf (?)
|-- build (编译脚本模板)
|-- cmds (有个monkey工具)
|-- data (配置数据)
|-- docs (文档)
|-- host (主机端USB驱动等)
|-- ide (集成开发环境)
|-- ndk (本地开发套件——c语言开发套件)
|-- pdk (Plug Development Kit)
|-- samples (演示程序)
| |-- AliasActivity ()
| |-- ApiDemos (API演示程序)
| |-- BluetoothChat (蓝牙聊天)
| |-- BrowserPlugin (浏览器插件)
| |-- BusinessCard (商业卡)
| |-- Compass (指南针)
| |-- ContactManager (联系人管理器)
| |-- CubeLiveWall** (动态壁纸的一个简单例程)
| |-- FixedGridLayout (像是布局)
| |-- GlobalTime (全球时间)
| |-- HelloActivity (Hello)
| |-- Home (Home)
| |-- JetBoy (jetBoy游戏)
| |-- LunarLander (貌似又是一个游戏)
| |-- MailSync (同步)
| |-- MultiResolution (多分辨率)
| |-- MySampleRss (RSS)
| |-- NotePad (记事本)
| |-- RSSReader (RSS阅读器)
| |-- SearchableDictionary (目录搜索)
| |-- **JNI (JNI例程)
| |-- SkeletonApp (空壳APP)
| |-- Snake (snake程序)
| |-- SoftKeyboard (软键盘)
| |-- Wiktionary (?维基)
| `-- Wiktionary**(?维基例程)
|-- scripts (脚本)
|-- sdk (sdk配置)
|-- simulator (?模拟器)
|-- testrunner (?测试用)
`-- tools (一些工具)

⑹ android kernel和标准linux kernel的区别

android kernel和标准linux kernel的区别
总的区别可以归纳如下:
ARCH -- 这是Android修改了arch/arm下面的一些文件:
arch/arm:
Chg: arch/arm/kernel/entry-armv.S
Chg: arch/arm/kernel/mole.c
Chg: arch/arm/kernel/process.c
Chg: arch/arm/kernel/ptrace.c
Chg: arch/arm/kernel/setup.c
Chg: arch/arm/kernel/signal.c
Chg: arch/arm/kernel/traps.c
Chg: arch/arm/mm/cache-v6.S
Chg: arch/arm/vfp/entry.S
Chg: arch/arm/vfp/vfp.h
Chg: arch/arm/vfp/vfphw.S
Chg: arch/arm/vfp/vfpmole.c
Goldfish -- 这是Android为了模拟器所开发的一个虚拟硬件平台。Goldfish执行arm926T指令(在2.6.29中,goldfish也支持ATMv7指令),但是在实际的设备中,该虚拟平台的文件不会被编译。
arch/arm/mach-goldfish:
New: arch/arm/mach-goldfish/audio.c
New: arch/arm/mach-goldfish/board-goldfish.c
New: arch/arm/mach-goldfish/pdev_bus.c
New: arch/arm/mach-goldfish/pm.c
New: arch/arm/mach-goldfish/switch.c
New: arch/arm/mach-goldfish/timer.c
YAFFS2 -- 和PC把文件存储在硬盘上不一样, 移动设备一般把Flash作为存储设备。尤其是NAND flash应用非常广泛(绝大多数手机用的都是NAND flash,三星的一些手机使用的是OneNAND)。NAND flash具有低成本和高密度的优点。
YAFFS2 是“Yet Another Flash File System, 2nd edition" 的简称。 它提供在Linux内核和NAND flash设备 之前高效率的接口。 YAFFS2并没有包含在标准的Linux内核中, Google把它添加到了Android的kernel
fs/yaffs2:
New: fs/yaffs2/devextras.h
New: fs/yaffs2/Kconfig
New: fs/yaffs2/Makefile
New: fs/yaffs2/moleconfig.h
New: fs/yaffs2/yaffs_checkptrw.c
New: fs/yaffs2/yaffs_checkptrw.h
New: fs/yaffs2/yaffs_ecc.c
New: fs/yaffs2/yaffs_ecc.h
New: fs/yaffs2/yaffs_fs.c
New: fs/yaffs2/yaffs_getblockinfo.h
New: fs/yaffs2/yaffs_guts.c
New: fs/yaffs2/yaffs_guts.h
New: fs/yaffs2/yaffsinterface.h
New: fs/yaffs2/yaffs_mtdif1.c
New: fs/yaffs2/yaffs_mtdif1.h
New: fs/yaffs2/yaffs_mtdif2.c
New: fs/yaffs2/yaffs_mtdif2.h
New: fs/yaffs2/yaffs_mtdif.c
New: fs/yaffs2/yaffs_mtdif.h
New: fs/yaffs2/yaffs_nand.c
New: fs/yaffs2/yaffs_nandemul2k.h
New: fs/yaffs2/yaffs_nand.h
New: fs/yaffs2/yaffs_packedtags1.c
New: fs/yaffs2/yaffs_packedtags1.h
New: fs/yaffs2/yaffs_packedtags2.c
New: fs/yaffs2/yaffs_packedtags2.h
New: fs/yaffs2/yaffs_qsort.c
New: fs/yaffs2/yaffs_qsort.h
New: fs/yaffs2/yaffs_tagscompat.c
New: fs/yaffs2/yaffs_tagscompat.h
New: fs/yaffs2/yaffs_tagsvalidity.c
New: fs/yaffs2/yaffs_tagsvalidity.h
New: fs/yaffs2/yportenv.h
Bluetooth -- Google为Bluetooth打上了patch,fix了一些Bluetooth的bug
drivers/bluetooth:
Chg: drivers/bluetooth/bfusb.c
Chg: drivers/bluetooth/bt3c_cs.c
Chg: drivers/bluetooth/btusb.c
Chg: drivers/bluetooth/hci_h4.c
Chg: drivers/bluetooth/hci_ll.c
Scheler -- 对于Scheler的改变非常小,我对它并没有去研究。
Chg: kernel/sched.c

New Android Functionality -- 除了fix一些bug以及其他一些小的更改,Android增加了一些新的功能,介绍如下:
IPC Binder -- The IPC Binder is an Inter-Process Communication (IPC) mechanism. It allows processes to provide services to other processes via a set of higher-level APIs than are available in standard Linux. An Internet search indicated that the Binder concept originated at Be, Inc., and then made its way into Palm's software, before Google wrote a new Binder for Android.
New: drivers/staging/android/binder.c
Low Memory Killer -- Android adds a low-memory killer that, each time it's called, scans the list of running Linux processes, and kills one. It was not clear in our cursory examination why Android adds a low-memory killer on top of the already existing one in the standard Linux kernel.
New: drivers/staging/android/lowmemorykiller.c
Ashmem -- Ashmem is an Anonymous SHared MEMory system that adds interfaces so processes can share named blocks of memory. As an example, the system could use Ashmem to store icons, which multiple processes could then access when drawing their UI. The advantage of Ashmem over traditional Linux shared memory is that it provides a means for the kernel to reclaim these shared memory blocks if they are not currently in use. If a process then tries to access a shared memory block the kernel has freed, it will receive an error, and will then need to reallocate the block and reload the data.
New: mm/ashmem.c
RAM Console and Log Device -- To aid in debugging, Android adds the ability to store kernel log messages to a RAM buffer. Additionally, Android adds a separate logging mole so that user processes can read and write user log messages.
New: drivers/staging/android/ram_console.c
Android Debug Bridge -- Debugging embedded devices can best be described as challenging. To make debugging easier, Google created the Android Debug Bridge (ADB), which is a protocol that runs over a USB link between a hardware device running Android and a developer writing applications on a desktop PC.
drivers/usb/gadget:
New: drivers/usb/gadget/android.c
Chg: drivers/usb/gadget/composite.c
Chg: drivers/usb/gadget/f_acm.c
New: drivers/usb/gadget/f_acm.h
New: drivers/usb/gadget/f_adb.c
New: drivers/usb/gadget/f_adb.h
New: drivers/usb/gadget/f_mass_storage.c
New: drivers/usb/gadget/f_mass_storage.h

Android also adds a new real-time clock, switch support, and timed GPIO support. We list the impacted files for these new moles at the end of this document.
Power Management -- Power management is one of the most difficult pieces to get right in mobile devices, so we split it out into a group separate from the other pieces. It's interesting to note that Google added a new power management system to Linux, rather than reuse what already existed. We list the impacted files at the end of this document.
kernel/power:
New: kernel/power/consoleearlysuspend.c
New: kernel/power/earlysuspend.c
New: kernel/power/fbearlysuspend.c
Chg: kernel/power/main.c
Chg: kernel/power/power.h
Chg: kernel/power/process.c
New: kernel/power/userwakelock.c
New: kernel/power/wakelock.c
Miscellaneous Changes -- In addition to the above, we found a number of changes that could best be described as, 'Miscellaneous.' Among other things, these changes include additional debugging support, keypad light controls, and management of TCP networking.
(freedom_asic)

⑺ 怎么重新编译android 下面的动态库

使用动态库来编译动态库

A项目的android.mk文件如下:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := testa
LOCAL_SRC_FILES := testa.c
include $(BUILD_SHARED_LIBRARY)

生成的libtesta.so加入到E:\workspace\android-ndk-r8e\platforms\android-8\arch-arm\usr\lib\下面

项目B的文件目录结构如下:
jni
jni/jni/
jni/prebuilt/
jni目录下的mk文件如下:
include $(all-subdir-makefiles)

jni/prebuilt目录下的mk文件如下:
LOCAL_PATH := $(call my-dir)

#include $(CLEAR_VARS)
LOCAL_MODULE := libtesta
LOCAL_SRC_FILES := libtesta.so
include $(PREBUILT_SHARED_LIBRARY)

同时把libtesta.so也放入该目录下.

jni/jni目录下的mk文件内容:
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_LDLIBS := -ltesta

LOCAL_MODULE := testb
LOCAL_SRC_FILES := testb.c

include $(BUILD_SHARED_LIBRARY)

这样生成libtestb.so文件, 同时eclipse在打包时会把libtesta.so, libtestb.so都加入到apk文件中,如果没有prebuilt那一步,那么在打包时会漏掉libtesta.so, 但编译会通过,因为编译读取的是编译系统的库文件目录(LOCAL_LDLIBS := -ltesta), 这点需要注意
java代码:
System.loadLibrary("testa");

System.loadLibrary("testb");

注意先后关系

⑻ 怎样制作Android的ARMv6版本根文件

您好!试下以下程序:
TARGET_ARCH_VERSION := armv6

RULES for ARMv6:

ifeq ($(TARGET_ARCH_VERSION),armv6)
$(warning ARMv6 support added)
ARCH_ARM_HAVE_THUMB_SUPPORT := true
ARCH_ARM_HAVE_THUMB_INTERWORKING := true
ARCH_ARM_HAVE_64BIT_DATA := true
ARCH_ARM_HAVE_HALFWORD_MULTIPLY := true
ARCH_ARM_HAVE_CLZ := true
ARCH_ARM_HAVE_FFS := true
arch_version_cflags := -march=armv5t -Wa,-march=armv6 -D__ARM_ARCH_6__

你可以修改 linux-arm.mk 把上面的加进去肯定可以用,望采纳,谢谢!

⑼ ndk arm 编译 显示android-19\arch-arm\usr\lib: Permission denied

首先创建一个标准的Android项目vPlayer
android create project -n vPlayer -t 8 -p vPlayer -k me.abitno.vplayer -a PlayerView

然后在vPlayer目录里
mkdir jni && cd jni
wget htt p:/ /ffmpe g.o rg/releases/ffmpeg-0.6.t ar.bz2
tar xf ffmpeg-0.6.tar.bz2 && mv ffmpeg-0.6 ffmpeg && cd ffmpeg

在ffmpeg下新建一个config.sh,内容如下,注意把PREBUILT和PLATFORM设置正确。另外里面有些参数你也可以自行调整,我主要是为了配置一个播放器而这样设置的。
#!/bin/bash

PREBUILT=/home/abitno/Android/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0
PLATFORM=/home/abitno/Android/android-ndk-r4/build/platforms/android-8/arch-arm

⑽ [Android]关于百度API SuggestionSarch的问题,谢谢解答

1、这个问题建议到技术论坛或者程序员联盟去问。
2、回答网络知道的人手里多数没有工具没办法调试。
3、可能有些jar包没有包括进去。
4、自己写的方法要注意引用全面或者参数传递。

热点内容
中国银行查询密码是什么 发布:2025-01-16 02:33:20 浏览:791
坚果pro录音文件夹 发布:2025-01-16 02:31:46 浏览:938
支付宝的登录密码忘记了如何改 发布:2025-01-16 02:30:30 浏览:221
解压作业泥 发布:2025-01-16 02:28:02 浏览:806
我的世界rpg服务器空岛 发布:2025-01-16 02:26:49 浏览:90
ps脚本函数 发布:2025-01-16 02:15:28 浏览:480
android显示行数据 发布:2025-01-16 02:07:40 浏览:963
压缩皇冠 发布:2025-01-16 01:51:27 浏览:274
全键盘编程键盘 发布:2025-01-16 01:38:59 浏览:422
尾货棉服直播间脚本 发布:2025-01-16 01:21:45 浏览:228