Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to use emulator image?

17 views
Skip to first unread message

wonkim

unread,
Oct 27, 2008, 11:57:44 AM10/27/08
to android-platform
Hi,
After successful build from Ubuntu. How can I use emulator image to
test my own build?

Thanks.

程琳

unread,
Oct 27, 2008, 1:32:25 PM10/27/08
to android-...@googlegroups.com

1,download emulator tools.

2,copy builded new image to toos/lib/images

3,start emulator

--
--~--~---------~--~----~------------~-------~--~----~
   此致


                                      程琳(fnxtdm)
--~--~---------~--~----~------------~-------~--~----~

Jeff Hamilton

unread,
Oct 27, 2008, 2:24:51 PM10/27/08
to android-...@googlegroups.com
If you've sourced build/envsetup.sh you can just type emulator at the
command line to start it up.

-Jeff

Mikael Bourges-Sevenier

unread,
Oct 27, 2008, 8:03:04 PM10/27/08
to android-...@googlegroups.com
> -----Original Message-----
> From: android-...@googlegroups.com [mailto:android-
> plat...@googlegroups.com] On Behalf Of Jeff Hamilton
> Sent: Monday, October 27, 2008 11:25
> To: android-...@googlegroups.com
> Subject: Re: How to use emulator image?
>
>
> If you've sourced build/envsetup.sh you can just type emulator at the
> command line to start it up.

[Mikael]
For me, this didn't work. Did it work for others?

On the other end, copying the images to tools/lib/images does work with the
emulator in Android SDK. But the Maps application "is not installed" and so
doesn't launch. Is there other things that need to be copied?

Thanks,

Mike

Leonid Batyuk

unread,
Oct 28, 2008, 3:20:23 AM10/28/08
to android-...@googlegroups.com
If you checked out the Android source tree with repo, make will build
the emulator for you and put it into .../out/host/linux-x86/bin/emulator
(or whatever architecture you use). Now, you will have to set the
environment variable ANDROID_PRODUCT_OUT to the path to you *.img files.
This is normally .../out/target/product/generic. So basically this looks
like this:

$ export \ ANDROID_PRODUCT_OUT=/path/to/mydroid/out/target/product/generic
$ /path/to/mydroid/out/host/linux-x86/bin/emulator

This will start the freshly built emulator.

I hope this helps.

-Leo

wonkim

unread,
Oct 28, 2008, 11:48:45 AM10/28/08
to android-platform
It works. Thanks.

Mikael Bourges-Sevenier

unread,
Oct 28, 2008, 1:14:07 PM10/28/08
to android-...@googlegroups.com
Well, the emulator starts indeed but many apps don't work:
- no Maps application
- no internet access

Is something missing in the code or is there some special settings to enable
internet access and Maps?

Mike

> -----Original Message-----
> From: android-...@googlegroups.com [mailto:android-
> plat...@googlegroups.com] On Behalf Of Leonid Batyuk
> Sent: Tuesday, October 28, 2008 0:20
> To: android-...@googlegroups.com
> Subject: Re: How to use emulator image?
>
>

freedom

unread,
Oct 29, 2008, 4:51:51 AM10/29/08
to android-platform
1. Map isn't in the source code tree.
2. I think your problem is no name resolving or say no DNS.
It seems that the libc.so in the system.img refuses to
provide DNS lookup. We replaced the libc.so with the one
came with binary SDK release then the problem is gone.
I didn't dig into the source yet.

On Oct 29, 1:14 am, "Mikael Bourges-Sevenier" <mikese...@gmail.com>
wrote:

hmt...@yahoo.com

unread,
Oct 29, 2008, 5:06:57 AM10/29/08
to android-platform
I have encountered the same problem "unknown host".
One question, what tool can I used to edit the system image.

many thanks!

freedom

unread,
Oct 29, 2008, 10:42:17 PM10/29/08
to android-platform

I don't know if there is any convenient tool that you can use to edit
YAFFS2 image.
What we did are:
1. get libc.so from
http://dl.google.com/android/android-sdk-linux_x86-1.0_r1.zip
(mksdcard sdcard.img; emulator -sdcard sdcard.img; adb shell;
cat /system/lib/libc.so > /sdcard/lib.cso;
mount -o loop sdcard.img somewherer; you got the libc.so)
2. rm out/target/product/generic/system.img
3. put the libc.so you got in step 1 into out/target/product/generic/
system/lib
4. type make than you have new out/target/product/generic/system.img
that will
resolve domain name

HueyMeng

unread,
Oct 29, 2008, 11:32:24 PM10/29/08
to android-platform
refer to following thread for more info about "host unknown":
http://groups.google.com.sg/group/android-platform/browse_thread/thread/4617e00aff1ea4e6

Muthu Ramadoss

unread,
Oct 30, 2008, 1:18:42 AM10/30/08
to android-platform
After sourcing 'build/envsetup.sh', I ran 'setpaths'..

Now checking my env variables:

ANDROID_PRODUCT_OUT=/opt/workspace/android.git.kernel.org/platform/out/
target/product/sooner
OUT=/opt/workspace/android.git.kernel.org/platform/out/target/product/
sooner

Notice the 'sooner' at the end. Its an error, and the path set by
envsetup.sh is wrong. The real path is '/opt/workspace/
android.git.kernel.org/platform/out/target/product/generic'

Where is this 'sooner' coming from? Anyone have similar issues?

On Oct 27, 11:24 pm, "Jeff Hamilton" <j...@android.com> wrote:
> If you've sourced build/envsetup.sh you can just type emulator at the
> command line to start it up.
>
> -Jeff
>

Muthu Ramadoss

unread,
Oct 30, 2008, 1:39:27 AM10/30/08
to android-platform
Looks like 'partner_setup' will setup the variables correctly.

Now I try to source it from bashrc.. and this is the error:

Usage: partner_setup <product-name>
Defaulting to product "generic"
Couldn't locate the top of the tree. Try setting TOP.
ANDROID_PRODUCT_OUT:
ANDROID_BUILD_TOP:

Anil Sasidharan

unread,
Oct 30, 2008, 1:44:32 AM10/30/08
to android-...@googlegroups.com
Hi,

This is due to a default setting in build/core/envsetup.mk
file for the variable "TARGET_PRODUCT". By default this is configured
to "sooner" and can be overridden either by modifying the
build/buildspec.mk or exporting the environment variable
"TARGET_PRODUCT" to your choice (ex: generic).

Another approach may be to use "partner_setup" command.

Warm Regards,
Anil

Muthu Ramadoss

unread,
Oct 30, 2008, 1:49:30 AM10/30/08
to android-platform
Anil,

Thanks. Got it.

And looks like you got to be in 'your.source.root.directory' to carry
out the commands.

In my case, after 'cd /opt/workspace/android.git.kernel.org/
platform'.. everything works fine.

Here's the correct output:

Usage: partner_setup <product-name>
Defaulting to product "generic"
ANDROID_PRODUCT_OUT: /opt/workspace/android.git.kernel.org/platform/
out/target/product/generic
ANDROID_BUILD_TOP: /opt/workspace/android.git.kernel.org/platform


On Oct 30, 10:44 am, "Anil Sasidharan" <anil...@gmail.com> wrote:
> Hi,
>
>            This is due to a default setting in build/core/envsetup.mk
> file for the variable "TARGET_PRODUCT". By default this is configured
> to "sooner" and can be overridden either by modifying the
> build/buildspec.mk or exporting the environment variable
> "TARGET_PRODUCT" to your choice (ex: generic).
>
>             Another approach may be to use "partner_setup" command.
>
> Warm Regards,
> Anil
>
> On Thu, Oct 30, 2008 at 10:48 AM, Muthu Ramadoss
>

freedom

unread,
Oct 30, 2008, 2:39:52 AM10/30/08
to android-platform
all right, two quick solutions without modifying source tree
1. 'make sdk' instead of simple 'make'
2. if you have done 'make' before,
'rm out/target/product/generic/obj/PACKAGING/
systemimage_unopt_intermediate/system.img',
'rm out/target/product/generic/system.img', 'make sdk', then you
got it

On Oct 30, 11:32 am, HueyMeng <hueymeng....@gmail.com> wrote:
> refer to following thread for more info about "host unknown":http://groups.google.com.sg/group/android-platform/browse_thread/thre...

Muthu Ramadoss

unread,
Oct 30, 2008, 2:54:54 AM10/30/08
to android-...@googlegroups.com
Freedom,

Thanks.

We honestly need a developers guide. Does it exist somewhere?
--
take care,
Muthu Ramadoss.

http://mobeegal.in - mobile search. redefined. +91 98403 48914

Anil Sasidharan

unread,
Oct 30, 2008, 3:03:05 AM10/30/08
to android-...@googlegroups.com
Hi,
Yes it does. Check development/pdk/docs (platform
development kit). However the info is slightly obsolete as most of the
paths mentioned in the documents are missing in source checkout.

Warm Regards,
Anil

Muthu Ramadoss

unread,
Oct 30, 2008, 3:28:48 AM10/30/08
to android-...@googlegroups.com
Ha, there it is! Thanks Anil.

Hopefully the docs gets updated often.
Reply all
Reply to author
Forward
0 new messages