Android Build For ARM Emulator & Simulator

1,541 views
Skip to first unread message

Chetan Patil

unread,
Nov 16, 2013, 7:48:32 PM11/16/13
to android-...@googlegroups.com
Hi,

I'm trying to understand the process of building Android image & Kernel using sources. I want to run them on emulator (QEMU) and simulator (gem5). May anyone guide me on the process to get an image using sources ?

I have completed following steps : 


Looking forward to reply.

Thanks

Chetan Patil

raja

unread,
Nov 17, 2013, 12:14:23 AM11/17/13
to android-...@googlegroups.com
If it is kitkat source , you have to do the following steps
 
source build/envsetup.h
lunch
make -j4
 
this will provide you system.img which is the system image for emulator.
you can test this on emulator by using the command ./emulator -system <path to you system.img>
You need to understand the basics of android sdk and emulator for this.

Magnus Bäck

unread,
Nov 18, 2013, 9:00:26 AM11/18/13
to android-...@googlegroups.com
On Saturday, November 16, 2013 at 19:48 EST,
Chetan Patil <chtp...@gmail.com> wrote:

> I'm trying to understand the process of building Android image &
> Kernel using sources. I want to run them on emulator (QEMU) and
> simulator (gem5). May anyone guide me on the process to get an image
> using sources ?
>
> I have completed following steps :
>
> 1) Initializing a Build Environment<http://source.android.com/source/initializing.html>
> 2) Downloading the sources<http://source.android.com/source/downloading.html>

Did you look at the next page on that site, 'Building and Running'?
It covers the emulator but not gem5. I suggest you consult the gem5
documentation for more information.

http://source.android.com/source/building-running.html

--
Magnus Bäck
ba...@google.com

Chetan Patil

unread,
Nov 19, 2013, 12:06:02 PM11/19/13
to android-...@googlegroups.com
Thanks Raja & Magnus,

I have compiled sources to get image for Android Jelly Bean and the emulator is able to pick this up using following command :

out/host/linux-x86/bin/emulator -sysdir out/target/product/generic/ -system out/target/product/generic/system.img -ramdisk out/target/product/generic/ramdisk.img -data out/target/product/generic/userdata.img -kernel prebuilts/qemu-kernel/arm/3.4/kernel-qemu-armv7 -skindir sdk/emulator/skins -skin HVGA -scale 0.7 -memory 512 -partition-size 1024

May anyone please answer following questions :

1) -skin HVGA doesn't show the three touch options the way Nexus 4 has at the bottom of screen. How can I get that ?

2) I get following images :
    a) system.img
    b) ramdisk.img
    c) userdata.img

What's the difference (I understand, but still would like to get proper inputs on these) and is there a way to get a single *.img file containing everything needed to get Android up ?

Also, -sysdir flag is necessary ?

3) I'm making use of prebuilt kernel. If I clone goldfish and build kernel, does it differ in any manner ?

4) I tried running these images using QEMU (I know android emulator is it self an extension of QEMU) with following arguments :

qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -m 1024 -initrd ramdisk.img -kernel kernel-qemu-armv7 -nographic -sd system.img

It troughs core dump error. Is there a way to understand what flags I need to pass ?

Looking forward to reply

Thanks
Chetan Patil

Chetan Patil

unread,
Nov 24, 2013, 3:02:44 PM11/24/13
to android-building
Hi,

I've built Android Jelly Bean image and disabled the screen lock by returing immediately from doKeyguardLocked(). However, post booting it still shows the locked screen at start. 

May anyone point me where I may be going wrong ?

--
Thank You
 
Chetan Patil
 

saideep tiku

unread,
Mar 20, 2015, 10:35:02 AM3/20/15
to android-...@googlegroups.com, chtp...@gmail.com
Hi Chetan,

Im trying to do the same as you are. Im trying to run the same kernel and android platform on both gem5 and android emulator. I used this to build my kernel and system images for gem5. I cannot run the same files for android. Did you find the solution ?

Sneha Ved

unread,
Mar 2, 2017, 11:31:54 AM3/2/17
to Android Building, chtp...@gmail.com
Hi Chetan,

If you were able to build Kitkat for GEM5, can you please share the kernel and the image files with me. I am facing issues trying to build them.

Thank you.
Reply all
Reply to author
Forward
0 new messages