当前位置:首页 » 编程软件 » android源码编译模拟器

android源码编译模拟器

发布时间: 2022-06-29 22:22:47

1. android 导进来的工程修改源码后怎么编译

1、Android的文件系统结构是怎样的,我们安装的程序放在那里?
编译Android源码之后,在out/target/proct/generic一些文件:
ramdisk.img、system.img、userdata.img、 system、 data、root
其中, system.img是由 system打包压缩得到的, userdata.img是由 data打包压缩得到的。

ramdisk.img是模拟器的文件系统,把ramdisk.img解压出来可知道,ramdisk.img里的文件跟root文件夹的文件基本一样。模拟器装载ramdisk.img并解压到内存,接着分别把system.img和userdata.img挂载到 ramdisk下的system和data目录。我们编译出来的应用程序就是放在system/app下的。用户安装的程序则是放在data/app下。

2、Android SDK和android源码能为我们提供什么工具?
AndroidSDK提供有很多工具,如adb,ddms,emulator,aapt等,并提供kernel-qemu、ramdisk.img、system.img、userdata.img。因此,只要有android SDK,我们就可以在模拟器上把android跑起来。
Android源码可以编译出android SDK、adb等工具、android文件系统,以及ADT插件,也就是说,我们可以从android源码编译出所有android相关的东西。

3、 把Android源 码”make”之后会生成许多工具和android文件系统(system.img等),我们又可以使用“makesdk”来生成android SDK,android
SDK也包括有工具和android文件系统(system.img等),而原来安装的时候我们也安装了androidSDK,那么我们在开发时应该使用那些工具和android文件系统呢?

2. 安卓源码编译后 模拟器启动不起来

直接用逍遥安卓试试

3. 如何根据Android源代码编译出可以在模拟器

网页链接可以参考下这个教程

模拟器的代码

4. 如何在模拟器上运行自己编译的android

Eclipse中对项目右键 Run As-->Android Application-->选择对应模拟器

5. android编译出来的源码能直接运行模拟器吗

这很容易理解,你这程序编译时是没有问题的,但运行时 TextView textView = (TextView)findViewById(R.id.textView1); 这行变量的定义调用了方法。 而以上Andriod模拟是面向事件驱动的,你定义在类的变量中,在运行时没有一个事件触发其执行,如果你想在类初始化是开始时执行这一语句,你可以将其放在类的构造方法中。

6. 如何编译android x86模拟器

首先你需要设置一下emulator工具的目录之类的
要在.bashrc中新增环境变量,如下
ANDROID_PRODUCT_OUT=~/android/out/target/proct/generic
ANDROID_PRODUCT_OUT_bin=~/android/out/host/linux-x86/bin
这里是设置你的输出文件的位置和bin工具目录
然后在命令行输入:
export path=${path}:${ANDROID_PRODUCT_OUT_bin}:${ANDROID_PRODUCT_OUT};
上面是导入了相关的配置,然后使之生效。
source ~/.bashrc
接着切换到输出的system文件夹
cd ~/android/out/target/proct/generic
然后来创建模拟器
emulator -system system.img -data userdata.img -ramdisk ramdisk.img
如果你运气够好的话,也许现在已经在运行了,不过我运气明显不够好。
提示一:
emulator: ERROR: You did not specify a virtual device name, and the system
directory could not be found.
If you are an Android sdk user, please use ‘@<name>’ or ‘-avd <name>’
to start a given virtual device (see -help-avd for details).
Otherwise, follow the instructions in -help-disk-images to start the emulator

既然人家提示了,那就按照步骤走吧,输入命令:
emulator -help-avd
接着提示如下:
use ‘-avd <name>’ to start the emulator program with a given Android
Virtual Device (a.k.a. AVD), where <name> must correspond to the name
of one of the existing AVDs available on your host machine.
See -help-virtual-device to learn how to create/list/manage AVDs.
As a special convenience, using ‘@<name>’ is equivalent to using
‘-avd <name>’.
跟着提示继续走,输入命令:
emulator -help-virtual-device
又是提示了:
An Android Virtual Device (AVD) models a single virtual
device running the Android platform that has, at least, its own
kernel, system image and data partition.
Only one emulator process can run a given AVD at a time, but
you can create several AVDs and run them concurrently.
You can invoke a given AVD at startup using either ‘-avd <name>’
or ‘@<name>’, both forms being equivalent. For example, to launch
the AVD named ‘foo’, type:
emulator @foo
The ‘android’ helper tool can be used to manage virtual devices.
For example:
android create avd -n <name> -t 1 # creates a new virtual device.
android list avd # list all virtual devices available.
Try ‘android –help’ for more commands.
Each AVD really corresponds to a content directory which stores
persistent and writable disk images as well as configuration files.
Each AVD must be created against an existing sdk platform or add-on.
For more information on this topic, see -help-sdk-images.

延伸1):
Android x86模拟器Intel Atom x86 System Image配置与使用方法

大家现在开发使用的Android 模拟器模拟的是 arm 的体系结构(arm-eabi),因此模拟器并不是运行在x86上而是模拟的arm,所以我们调试程序的时候经常感觉到非常慢,大部分开发者应该都深有体会。
针对这种情况,前段时间intel推出了支持x86的Android模拟器,这将大大提高启动速度和程序的运行速度,这将允许Android模拟器能够以原始速度(真机运行速度)运行在使用intel x86处理器的电脑中,各位开发者有福了,下面将为大家展示使用方法。

一、首先下载intel提供的 intel® Hardware Accelerated Execution Manager 1.0.1(R2)

requirement:
1. requires the Android* SDK to be installed (version 17 or higher). SDK17或者以上
2.intel® processor with support for VT-x, EM64T, and Execute Disable (XD) bit functionality intel的cpu:并支持VT-X(虚拟化技术)、可扩展64位、Execute Disable bit。(均需要保证在bios中开启Enable)
3. At least 1 gb of available ram 1G以上内存,否则安装不了

满足硬件和软件要求之后,就可以开始安装了,一直下一步至安装成功。途中有个地方选择分配给HAXM内存大小,一般默认就好,分太多会拖慢整机速度。

安装成功后命令行输入sc query intelhaxm,查看运行状态: state is: “4 RUNNING” ,即代表安装成功。需要更改分配内存,重新运行一下安装程序选择change即可修改。
还可以使用以下指令手动开启和关闭:
Stop: sc stop intelhaxm

Start:
sc start intelhaxm

满足软硬件条件,若提示如下Error:but intel Execute Disable bit (XD) is not turned on......
(需要开启系统数据执行保护功能dep,下午纠结了好久才查到。官网原文:Windows* hosts may need to enable dep (Data Execution Prevention) in addition to intel XD)
命令行使用指令:bcdedit.exe /set nx optin 打开即可,需要重启电脑

二、下载Intel Atom x86 System Image
1. 从SDK Manager下载:打开SDK Manager,展开至Android2.3.3(API10)(注意:目前只有2.3.3和4.0.3(Ice Cream Sandwich)有x86的Image),需要和2.3.3的SDK Platform配合使用。

2.使用avd Manager创建一个新的avd: Hardware Property里面选择gpu emulation yes 还有 Keyboard support yes

3.开始使用飞速的模拟器吧,各种爽歪歪
好的工具可以更有效率的开发APP,让我们从此告别那龟速的模拟器吧

7. 请问:用android源码编译出来的模拟器怎样添加SD卡不是eclipse。

在eclipse中创建android模拟器,然后再eclipse中的view中可以打开模拟器的SD卡,不知道符合你的意思没

8. Android 4.0 framework源码修改编译,模拟器运行不起来,求助

依赖签名匹配失败.
如此看来只有两种解决办法:
1.用make
snod命令重新编译system.img,这样编译出来的system中的架包之间没有依赖
2.修改DexPrepare.cpp中的验证代码,直接跳过签名验证

9. 如何预编译 Android 模拟器专用内核

Android源码编译之后生成的是ramdisk.img、system.img和userdata.img。而内核源码编译完成之后生成的是ZImage。在一般情况下Android源码是不带有内核源码的,但是带有一个镜像,这样在编译完Android源码之后就可以模拟器启动了,如果要更换系统的内核,此时将高版本的内核源码进行编译生成ZImage然后替换Android系统的的镜像。这样使用模拟器启动之后就可以查看内核是否已经被刷新。

10. 编译安卓源码模拟器emulator中怎么操作

这是一个模拟器,可以将程序放在模拟器里面,如下内容:Android中提供了一个模拟器来模拟ARM核的
移动设备

Android的
模拟器是基于QEMU开发的,QEMU是一个有名的开源
虚拟机
项目(详见),它可以提供一个虚拟的ARM移动设备。
Android模拟器
被命名为goldfish,用来模拟包括下面一些功能的ARMSoC:

热点内容
linux命令全称 发布:2024-05-17 12:07:54 浏览:109
ftpnas区别 发布:2024-05-17 12:06:18 浏览:948
512g存储芯片价格 发布:2024-05-17 12:04:48 浏览:962
脚本运行周期 发布:2024-05-17 11:39:09 浏览:808
阿里云服务器怎么配置发信功能 发布:2024-05-17 11:37:24 浏览:312
编程中的变量 发布:2024-05-17 11:33:06 浏览:777
加密视频怎么解密 发布:2024-05-17 11:02:52 浏览:571
柳工挖机密码多少合适 发布:2024-05-17 11:00:40 浏览:188
android工程叹号 发布:2024-05-17 10:56:21 浏览:481
在苹果手机应用怎么比安卓贵 发布:2024-05-17 10:56:20 浏览:548