當前位置:首頁 » 編程軟體 » 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:

熱點內容
eve腳本破解 發布:2025-02-12 20:07:48 瀏覽:636
python腳本編程基礎 發布:2025-02-12 20:03:40 瀏覽:486
我的世界伺服器里刷怪 發布:2025-02-12 19:57:04 瀏覽:389
瘋狂java視頻 發布:2025-02-12 19:38:17 瀏覽:150
flash免費上傳網站 發布:2025-02-12 19:14:03 瀏覽:191
買腳本一般都在哪裡 發布:2025-02-12 19:08:07 瀏覽:824
戀舞刷分腳本se下載 發布:2025-02-12 18:56:53 瀏覽:8
c語言大小寫轉換程序 發布:2025-02-12 18:55:23 瀏覽:524
三星耳機壞了怎麼配置 發布:2025-02-12 18:54:46 瀏覽:975
簡易編程語言 發布:2025-02-12 18:48:07 瀏覽:523