Saturday, February 5, 2011

Re: [android-developers] Is /system/bin/dalvikvm reliable on all Android devices?

NO shell commands are part of the SDK.  Third party apps should not rely on being able to launch any shell commands.

Further -- anything you do here is going to end up relying on private APIs, because a VM created from the raw dalvik command does not have any association with the running framework, and will need to use private framework commands to get to it.

(If you are talking about the am command, that is also private details, not guaranteed to be there, no guarantee its command line options won't change.)

Oh and also it takes at least a second to bring up a whole new dalvik VM and load the classes need to talk with the framework.  That is a HUGE amount of overhead just to send an intent broadcast.

There are all kinds of things you can do within your process to have native code get back into the VM.  Absolute worse case, have a thread you make that listens for data from a pipe that your native code writes to.

On Sat, Feb 5, 2011 at 10:53 AM, Jin Chiu <live2dream95@gmail.com> wrote:
Can I rely on dalvikvm to be reliable on all Android devices? I would
like to use it to send an intent from a native component, which due to
legacy design, does not have access to a JNI context.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Dianne Hackborn
Android framework engineer
hackbod@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment