Dear Sir,
I got a problem after I copied system.img to /.android/avd/AVD_NAME/ and
renamed it to system-qemu.img.
After I pressed "start" button from AVD Manager to start the emulator the
error message "Missing initial system image path" is shown.
I tried to trace the code found that in main.c
(external/qemu/android/main.c)
if (rwImage != NULL) {
/* Use the read/write image file directly */
hw->disk_systemPartition_path = rwImage;
hw->disk_systemPartition_initPath = NULL;
D("Using direct system image: %s", rwImage);
} else if (initImage != NULL) {
hw->disk_systemPartition_path = NULL;
hw->disk_systemPartition_initPath = initImage;
D("Using initial system image: %s", initImage);
}
it initalizes the hw->disk_systemPartition_path and
hw->disk_systemPartition_initPath.
In vl-android.c (external/qemu)
/* Initialize system partition image */
{
char tmp[PATH_MAX+32];
const char* sysImage = android_hw->disk_systemPartition_path;
const char* initImage = android_hw->disk_systemPartition_initPath;
uint64_t sysBytes = android_hw->disk_systemPartition_size;
...
if (sysImage && *sysImage) {
if (filelock_create(sysImage) == NULL) {
fprintf(stderr,"WARNING: System image already in use,
changes will not persist!\n");
/* If there is no file= parameters, nand_add_dev will create
* a temporary file to back the partition image. */
} else {
pstrcat(tmp,sizeof(tmp),",file=");
pstrcat(tmp,sizeof(tmp),sysImage);
}
}
if (initImage && *initImage) {
if (!path_exists(initImage)) {
PANIC("Invalid initial system image path: %s", initImage);
}
pstrcat(tmp,sizeof(tmp),",initfile=");
pstrcat(tmp,sizeof(tmp),initImage);
} else {
PANIC("Missing initial system image path!");
}
nand_add_dev(tmp);
}
It will check system-qemu.img is exist or not then check system.img is
exist or not.
My question is why the initImage path is null then the emulator is died ?
Should this checking rule be modified to
if (sysImage && *sysImage) {
}
else if (initImage && *initImage) {
}
else {
}
Please kindly help me to solve this problem.
TKS & Regards,
MIKE
顯示省略的內容
尊敬的Android模擬器開發,
我有一個問題後,我複製的system.img到/ .android / AVD / / AVD_NAME的的,並改名為系統qemu.img的。
當我按下“開始”按鈕從AVD Manager啟動模擬器錯誤消息“缺少初始系統映像路徑”字樣。
我試圖跟踪代碼發現,在main.c中(外部/的qemu的/ Android / main.c中)
(rwImage!= NULL){
/ *使用讀/寫映像文件直接* /
HW-> disk_systemPartition_path = rwImage;
HW-> disk_systemPartition_initPath = NULL;
D(“直接使用系統映像:%S”,rwImage);
的} else if(initImage!= NULL){
HW-> disk_systemPartition_path = NULL;
HW-> disk_systemPartition_initPath = initImage;
D(“使用系統初始圖像:%S”,initImage);
}
initalizes HW-disk_systemPartition_path的和HW->
disk_systemPartition_initPath的。
VL-android.c的(外部/ QEMU)
/ *初始化系統分區映像* /
{
字符TMP [PATH_MAX +32];
為const char * sysimage下= android_hw - > disk_systemPartition_path;
為const char * initImage = android_hw - > disk_systemPartition_initPath;
uint64_t sysBytes = android_hw> disk_systemPartition_size;
...
(sysimage下&& * sysimage下){
(filelock_create(sysimage下)== NULL){
fprintf(stderr的,“警告:系統映像已經在使用中,變化不會堅持!\ N”);
/ *如果是沒有文件=參數,nand_add_dev的創建
*一個臨時文件,備份分區映像。 * /
} {
pstrcat(TMP,sizeof(TMP)的“文件”);
pstrcat(TMP,大小(TMP),sysimage下);
}
}
如果(* initImage && initImage){
如果(!path_exists(initImage)){
PANIC的(“無效初始系統映像路徑:%S”,initImage);
}
pstrcat(TMP,大小(TMP),“,initfile =”);
pstrcat(TMP,大小(TMP),initImage);
} {
恐慌(“缺少初始系統映像路徑!”);
}
nand_add_dev(TMP);
}
它會檢查系統qemu.img存在或不是那麼檢查的system.img存在與否。
我的問題是,為什麼的initImage路徑為null,則模擬器死了嗎?
如果這個檢查規則進行修改,以
(sysimage下&& * sysimage下){
}
否則 ,如果(* initImage && initImage){
}
其他{
}
請幫我解決這個問題。
蒂森克虜伯和問候,
MIKE
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.