I have downloaded the Android Sources using the repo tool.
Built the image. Now I have the following files in the folder
"/myandroid/out/target/product/generic/"
1) ramdisk.img
2) userdata.img
3) system.img
4) userdata-qemu.img.
Where & How to launch the emulator using these binaries?
Please tell me how to use goldfish.
> I have downloaded the Android Sources using the repo tool.
> Built the image. Now I have the following files in the folder
> "/myandroid/out/target/product/generic/"
> 1) ramdisk.img
> 2) userdata.img
> 3) system.img
> 4) userdata-qemu.img.
> Where & How to launch the emulator using these binaries?
> Please tell me how to use goldfish.
> 1) "makesdk" and you will get your ownSDK.
> 2) DownloadSDKand replace img files with your build.
> Cheers,
> On 12月23日, 午後11:47, rams <plram2...@gmail.com> wrote:
> > Hi All,
> > I have downloaded the Android Sources using the repo tool.
> > Built the image. Now I have the following files in the folder
> > "/myandroid/out/target/product/generic/"
> > 1) ramdisk.img
> > 2) userdata.img
> > 3) system.img
> > 4) userdata-qemu.img.
> > Where & How to launch the emulator using these binaries?
> > Please tell me how to use goldfish.
Acctually, after you build the Android source with "make", the emulator is built out at ./android/out/host/linux-x86/bin, if has setup the PATH of three *.img and kernel path, the emulator can work well.
发件人: Andriod Developer <andrd.dv...@gmail.com>
主题: [android-porting] Re: How to launch emulator from the built source?
收件人: "android-porting" <android-porting@googlegroups.com>
日期: 2008,1230,周二,6:42上午
I tried "make sdk" it fails. Did anybody try this?
On Dec 23, 4:25 pm, Android Zaurus <androidzau...@yahoo.co.jp> wrote:
> 1) "makesdk" and you will get your ownSDK.
> 2) DownloadSDKand replace img files with your build.
> Cheers,
> On 12月23日, 午後11:47, rams <plram2...@gmail.com> wrote:
> > Hi All,
> > I have downloaded the Android Sources using the repo tool.
> > Built the image. Now I have the following files in the folder
> > "/myandroid/out/target/product/generic/"
> > 1) ramdisk.img
> > 2) userdata.img
> > 3) system.img
> > 4) userdata-qemu.img.
> > Where & How to launch the emulator using these binaries?
> > Please tell me how to use goldfish.
I've tried the emulator I built under "./android/out/host/linux-x86/
bin", the mobile GUI pops out but keeps black screen, without
"android_" appearing on the screen.
I downloaded android SDK before. So I also tried to copy the three
*.img to "android-sdk-linux_x86-1.0_r1/tools/lib/images" and use the
emulator from the SDK, the same problem happened. But if I use the
original 3 images in the SDK, everything is OK.
So it seems the 3 images I built can not work with the emulator.
I built the image with the following config:
TARGET_SIMULATOR: false
TARGET_BUILD_TYPE: release
TARGET_PRODUCT: generic ---- (I did not choose "emulator, is
this the root cause?)
Shall I choose "emulator" as the target product?
Thanks a lot!
But when I choose " TARGET_PRODUCT: emulator"
and make, the building fails with the error:
build/core/product_config.mk:161: *** No matches for product
"emulator". Stop.
1) . build/envsetup.sh
2) choosecombo [1, 1, 2, then default option]
3) make
You should see the following when make is going on:
====================
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
====================
> But when I choose " TARGET_PRODUCT: emulator"
> and make, the building fails with the error:
> build/core/product_config.mk:161: *** No matches for product
> "emulator". Stop.
I made the same choices of "choosecombo" as you suggested.
And I found why the emulator "does not" work previously:
I did not wait for enough time! It seems it takes the emulator longer
for the 1st boot up when using a new image.
When I left for ten minutes and came back to my computer, I found it
boots up successfully.
I was happy too early. The emulator built from source still can not
work : the mobile screen keeps black and "adb shell" said "error:
device not found".
Here is my configuration for make:
=====================================
TARGET_PRODUCT=generic
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
======================================
And there is a strange thing for me:
I modified the video player in the api demo, then ran "make". Under
out/target/product/generic, I saw both "system.img" and
"userdata.img"
are updated. Then I run the emulator from the downloaded SDK, which
can bootup successfully. I did not copy the 3 images I built to SDK
"tools/lib/images". I found
1. it uses the "userdata.img" I built
because my changes to the api demo make effect. I also use "adb
shell" to check the "data/app" and "data/dalvik-cache" of the device,
I saw both "ApiDemos.apk" and "data@a...@ApiDemos.apk@classes.dex"
are updated.
2. but does not use the "system.img" I built, but still use the one
with the SDK.
I check "system/lib" on the device and saw some shared libraries'
name are for the emulator (libpv*.so), not as the one under "/system/
lib" built from the source (libopencore*.so).
I wonder Is there any difference between the emulator from the SDK and
that built from source? So the system image are not switchable?
I saw there is a file "kernel-qemu" from the SDK, but no such a file
built out from the source.
Is it enough only type "emulator" to run the emulator built from
source?
Please do one thing buddy. Try the above settings as I have mentioned.
You need not copy the images to your SDK. Keep your SDK
separate. Its not at all needed. You rename your SDK
emulator binary to emulator_1 to avoid confusion and also for
checking whether your built emulator works. First try making
the clean sources work perfectly and add changes one by one.
> I was happy too early. The emulator built from source still can not
> work : the mobile screen keeps black and "adb shell" said "error:
> device not found".
> Here is my configuration for make:
> =====================================
> TARGET_PRODUCT=generic
> TARGET_SIMULATOR=false
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_OS=linux
> HOST_ARCH=x86
> HOST_OS=linux
> HOST_BUILD_TYPE=release
> BUILD_ID=TC3
> ======================================
> And there is a strange thing for me:
> I modified the video player in the api demo, then ran "make". Under
> out/target/product/generic, I saw both "system.img" and
> "userdata.img"
> are updated. Then I run the emulator from the downloaded SDK, which
> can bootup successfully. I did not copy the 3 images I built to SDK
> "tools/lib/images". I found
> 1. it uses the "userdata.img" I built
> because my changes to the api demo make effect. I also use "adb
> shell" to check the "data/app" and "data/dalvik-cache" of the device,
> I saw both "ApiDemos.apk" and "data@a...@ApiDemos.apk@classes.dex"
> are updated.
> 2. but does not use the "system.img" I built, but still use the one
> with the SDK.
> I check "system/lib" on the device and saw some shared libraries'
> name are for the emulator (libpv*.so), not as the one under "/system/
> lib" built from the source (libopencore*.so).
> I wonder Is there any difference between the emulator from the SDK and
> that built from source? So the system image are not switchable?
> I saw there is a file "kernel-qemu" from the SDK, but no such a file
> built out from the source.
> Is it enough only type "emulator" to run the emulator built from
> source?
It seems the problem is that the emulator can not use the "system.img"
I built.
And it's the "system.img" that cause the trouble.
I modified "linux-arm.mk" before I ran "make". I changed the arm arch
version from "armv5te" to "armv6j". I think that's why my code can run
on the target board but the emulator can not suppport it.
If I remember correctly the current emulator does not emulate all
ARMv6 instructions. I might be wrong.
JBQ
On 1/5/09, jasperr <mengdong_...@hotmail.com> wrote:
> It seems the problem is that the emulator can not use the "system.img"
> I built.
> And it's the "system.img" that cause the trouble.
> I modified "linux-arm.mk" before I ran "make". I changed the arm arch
> version from "armv5te" to "armv6j". I think that's why my code can run
> on the target board but the emulator can not suppport it.
> Thanks
> Jasperr
-- Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.
> If I remember correctly the current emulator does not emulate all
> ARMv6 instructions. I might be wrong.
> JBQ
> On 1/5/09, jasperr <mengdong_...@hotmail.com> wrote:
> > It seems the problem is that the emulator can not use the "system.img"
> > I built.
> > And it's the "system.img" that cause the trouble.
> > I modified "linux-arm.mk" before I ran "make". I changed the arm arch
> > version from "armv5te" to "armv6j". I think that's why my code can run
> > on the target board but the emulator can not suppport it.