I was wondering if anyone has had success moving the Android UI
classes off the emulator to run natively on the desktop? The easiest
way to do this would probably be to run natively on the JDK. It would
help speed development immensely, because launch time would be
reduced, and you would be able to use hot code replace (which Dalvik
doesn't support).
I think it would be an immense bunch of work, because most of the android features rely on native code :-(. Maybe, moving the native libs to the host could work, but I don't think it is worth, specially now that the new sdk is so close (with promises of several changes in the Eclipse plugin).
> I was wondering if anyone has had success moving the Android UI > classes off the emulator to run natively on the desktop? The easiest > way to do this would probably be to run natively on the JDK. It would > help speed development immensely, because launch time would be > reduced, and you would be able to use hot code replace (which Dalvik > doesn't support).
You do not need to restart emulator each time you make a change in
your code (I also did so in the 1st weeks of work) - you can just make
a change in the code, then press run the application and the updated
version would start in the emulator almost immediately. Just do not
close the emulator window.
On Jan 31, 5:51 pm, luke <luke.hu...@gmail.com> wrote:
> I was wondering if anyone has had success moving the Android UI
> classes off the emulator to run natively on the desktop? The easiest
> way to do this would probably be to run natively on the JDK. It would
> help speed development immensely, because launch time would be
> reduced, and you would be able to use hot code replace (which Dalvik
> doesn't support).
A bit off topic but: it would be cool to have a desktop Android
device. Similar to the emulator but not just for developers; ordinary
users could also have a desktop Android device that could be synced
with their mobile device. And the desktop Android device could have
real functionality including phone functionality. And: in this way
people could run Android applications even if they don't have a mobile
Android device.
The desktop Android device could be an ordinary program installable on
for example Windows, Mac OS X and Linux.
Anders wrote: > A bit off topic but: it would be cool to have a desktop Android > device. Similar to the emulator but not just for developers; ordinary > users could also have a desktop Android device that could be synced > with their mobile device. And the desktop Android device could have > real functionality including phone functionality. And: in this way > people could run Android applications even if they don't have a mobile > Android device.
> The desktop Android device could be an ordinary program installable on > for example Windows, Mac OS X and Linux.
> Anders wrote:
> > A bit off topic but: it would be cool to have a desktop Android
> > device. Similar to the emulator but not just for developers; ordinary
> > users could also have a desktop Android device that could be synced
> > with their mobile device. And the desktop Android device could have
> > real functionality including phone functionality. And: in this way
> > people could run Android applications even if they don't have a mobile
> > Android device.
> > The desktop Android device could be an ordinary program installable on
> > for example Windows, Mac OS X and Linux.
As I understand it, the Dalvik virtual machine is tightly dependent on
Linux for performance and other reasons, and that is beneficial when
running in mobile devices, but on today's desktop computers, Android
should be able to run using only Java. The apk files maybe contain
only Dalvik bytecode, and then that would have to be reconverted into
Java bytecode if that is possible.
allow me to remark that unless you have the sources, you will be unable to run ARM binaries on an x86 desktop.so emulation is the only viable route until then. and it's very unlikely that you'll be able to replace many of the system's native shared libraries with pure Java.
On Feb 1, 2008 12:11 AM, Anders <i...@blabline.com> wrote:
> As I understand it, the Dalvik virtual machine is tightly dependent on > Linux for performance and other reasons, and that is beneficial when > running in mobile devices, but on today's desktop computers, Android > should be able to run using only Java. The apk files maybe contain > only Dalvik bytecode, and then that would have to be reconverted into > Java bytecode if that is possible.
Digit wrote: > allow me to remark that unless you have the sources, you will be > unable to run ARM binaries on an x86 desktop. > so emulation is the only viable route until then. and it's very > unlikely that you'll be able to replace many of the system's native > shared libraries with pure Java.
From my point of view I don't see any reason it needs to be pure Java. When we do have the sources it will be possible to assess the situation.
I think most of the Android system can be implemented in pure Java
although some code may need to be native. But of course Android
applications contain Dalvik bytecode, and that could be more tricky to
reverse engineer. Maybe Google will release Dalvik for other OSes than
Linux. :-)
On Feb 1, 12:26 am, Digit <digit.andr...@gmail.com> wrote:
> allow me to remark that unless you have the sources, you will be unable to
> run ARM binaries on an x86 desktop.so emulation is the only viable route
> until then. and it's very unlikely that you'll be able to replace many of
> the system's native shared libraries with pure Java.
> On Feb 1, 2008 12:11 AM, Anders <i...@blabline.com> wrote:
> > As I understand it, the Dalvik virtual machine is tightly dependent on
> > Linux for performance and other reasons, and that is beneficial when
> > running in mobile devices, but on today's desktop computers, Android
> > should be able to run using only Java. The apk files maybe contain
> > only Dalvik bytecode, and then that would have to be reconverted into
> > Java bytecode if that is possible.
Yes, that saves time -- but you can't modify the code while it is
running without restarting the program inside the emulator, i.e. hot
code replace (that unravels the stack and program state, re-compiles,
adjusts everything to work with the newly-compiled code, and restarts
in exactly the same place) is not supported on Dalvik. It is
supported in a limited way on the regular JVM, which is cool because
you can tweak your code as it is running. For incremental tweaking-
type development, this speeds up development by one or two orders of
magnitude depending on what you're doing.
On Jan 31, 1:58 pm, fry <bender...@gmail.com> wrote:
> You do not need to restart emulator each time you make a change in
> your code (I also did so in the 1st weeks of work) - you can just make
> a change in the code, then press run the application and the updated
> version would start in the emulator almost immediately. Just do not
> close the emulator window.
> On Jan 31, 5:51 pm, luke <luke.hu...@gmail.com> wrote:
> > I was wondering if anyone has had success moving the Android UI
> > classes off the emulator to run natively on the desktop? The easiest
> > way to do this would probably be to run natively on the JDK. It would
> > help speed development immensely, because launch time would be
> > reduced, and you would be able to use hot code replace (which Dalvik
> > doesn't support).
There are two reasons I asked the original question:
(1) To reduce development round-trip time.
(2) To eventually be able to use Android as a platform to develop
"real" desktop applications. There is no reason that Android wouldn't
be *awesome* running on your primary desktop.
A lot of the stack is native code, yes -- but all that code compiles
fine on a standard Linux stack, so there's no reason it can't be
recompiled out of the emulator. All the Dalvik code was Java source
at some point, and then Java bytecode, so that should be trivial to
port. A simple port for now would just get the surface manager and a
few system services for event handling working, and then a lot of the
stack would run as-is, unless you were doing something tricky like
maps/sound/video.
Any updated idea of when this wonder-sdk will be released, and
especially source? Hopefully well before the end of the Android
Developer Challenge.
On Jan 31, 9:51 am, luke <luke.hu...@gmail.com> wrote:
> I was wondering if anyone has had success moving the Android UI
> classes off the emulator to run natively on the desktop? The easiest
> way to do this would probably be to run natively on the JDK. It would
> help speed development immensely, because launch time would be
> reduced, and you would be able to use hot code replace (which Dalvik
> doesn't support).