How to run dalvikvm

61 views
Skip to first unread message

silverbu...@gmail.com

unread,
Dec 1, 2008, 10:10:41 PM12/1/08
to android-platform
Hi,

I download and compile the source of Andriod.

My question is how can I run dalvikvm in a standalone? i.e. I would
like to run a simple 'hello world example and stepping thru the
dalvikvm source code to understand the inner-working.

Thank you.

freepine

unread,
Dec 2, 2008, 2:54:00 AM12/2/08
to android-...@googlegroups.com
Call JNI_CreateJavaVM(...) in your main function.

silverbu...@gmail.com

unread,
Dec 4, 2008, 9:54:30 PM12/4/08
to android-platform
Thanks. I am able to download and build andriod source code.

What i meant was,how can i start dalvik vm at the command line via a
debugger so that I can learn the inner workings of the dalvik vm?



On Dec 2, 1:54 am, freepine <freep...@gmail.com> wrote:
> Call JNI_CreateJavaVM(...) in your main function.
>
> On Tue, Dec 2, 2008 at 11:10 AM, silverburgh.me...@gmail.com <

fadden

unread,
Dec 8, 2008, 9:02:48 PM12/8/08
to android-platform
On Dec 4, 6:54 pm, "silverburgh.me...@gmail.com"
<silverburgh.me...@gmail.com> wrote:
> What i meant was,how can i start dalvik vm at the command line via a
> debugger so that I can learn the inner workings of the dalvik vm?

You can either do this on the device, with gdb/gdbserver, or run it on
your desktop. The latter requires a few steps, described in this
thread (10th entry, author "fadden"):

http://groups.google.com/group/android-porting/browse_thread/thread/ab553116dbc960da/29167c58b3b49051#29167c58b3b49051

silverbu...@gmail.com

unread,
Dec 11, 2008, 1:05:06 AM12/11/08
to android-platform
> http://groups.google.com/group/android-porting/browse_thread/thread/a...

Thanks, fadden.

I did do a 'make' at my android root:

/media/olddata/andriod> make
build/core/product_config.mk:229: WARNING: adding test OTA key
build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
============================================
TARGET_PRODUCT=generic
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================


And then i do a 'dalvikvm' in the directory, I get this error:

/media/olddata/andriod/out/target/product/generic/system/bin> ./
dalvikvm
bash: ./dalvikvm: cannot execute binary file

Can you please give me more pointers? I am trying to run a dalvikvm on
my linux desktop environment.

Thank you.

fadden

unread,
Dec 11, 2008, 5:57:18 PM12/11/08
to android-platform
On Dec 10, 10:05 pm, "silverburgh.me...@gmail.com"

<silverburgh.me...@gmail.com> wrote:
> ============================================
> TARGET_PRODUCT=generic
> TARGET_SIMULATOR=
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=arm
> TARGET_OS=linux
> HOST_ARCH=x86
> HOST_OS=linux
> HOST_BUILD_TYPE=release
> BUILD_ID=TC3
> ============================================

"lunch" may not be working; instead try "choosecombo" then 2/2/2
(Simulator, debug, sim).

When I do that, I see:

============================================
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug
TARGET_ARCH=x86


TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================

Note you're building for arm not x86.

silverbu...@gmail.com

unread,
Dec 11, 2008, 11:17:38 PM12/11/08
to android-platform
Thanks fadden.
But i don't understand what you meant by ""lunch" may not be working;
instead try "choosecombo" then 2/2/2
> (Simulator, debug, sim).
> "

Where can I find the 'lunch' or 'choosecombo' tool?

Can how can I compile for x86 (running on my linux desktop)?

I just follow the step here:

http://source.android.com/download

which said :

Building the code
To build the files, run make from within your working directory:
$ cd ~/mydroid
$ make

Thank you for any more pointer.

Reply all
Reply to author
Forward
0 new messages