View Single Post
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#76
Right, I'm getting all the sources together, just very busy with Uni work as of late

Originally Posted by marmistrz View Post
pablocrossa: did your try bring up the whole Android UI including the launcher? Or only a single app?
I had the entire Android subsystem running, hence the huge system load. The entire Android UI was running in a window on the desktop, similar to EasyDebian with Xephyr.

Originally Posted by marmistrz View Post
What if we simply managed to build only the Dalvik VM. Would it be enough to run the Android apps (maybe not all but some)? If not all, what else would be needed? Android experts' opinion appreciated
If the Dalvik VM is ported As-is (i.e. compiled against glibc) all Java-based apps will work, but no apps that use the NDK will work at all; for that some fancy symbol conversion like what libhybris does is needed. The problem is quite complex though, as all Android APIs are different to a standard Linux install:
  • Sound subsystem is entirely different
  • Graphics subsystem is entirely different, including windowing etc
  • HW interaction libraries are entirely different
  • etc etc
Basically all the HAL is different plus they use a different libc... it is a monumental piece of work to just port the thousands of lines of code of Dalvik VM (like what Alien Dalvik did).

As such it's probably easier to start porting the entire subsystem using the method I used (which wasn't much work TBH, just quite a bit of time and patience) and just start shimming everything little by little until Dalvik VM doesn't depend on the Android subsystem for anything important anymore; this allows you to test as you go along without blindly writing API shims and not seeing a result.

At this point it becomes easier to investigate libhybris and to adapt previous shims and compile the Dalvik VM using libhybris' cool shims (this will be a shim party...) and start replacing all functionality that ties it to the system (i.e. the way Zygote listens to an event to spawn a new VM instead of launching with command line parameters) and at that point you have a fully bespoke system working perfectly well, just like Alien Dalvik effectively, which only requires bug fixing.

All this is a colossal amount of work to get through, I will upload my code and let anyone interested in dealing with the low-RAM N900 to continue, I was going to develop this on a Desktop on my spare time but as of late I have enough projects, Uni and personal, to keep me from investing a proper amount of time into this.

Hope this essay is helpful for someone :P

EDIT: Also libhybris removes dependencies on the Android kernel drivers AFAIK (haven't really played around with it yet), which means that the final solution could be placed in extras as a deb without a special kernel or anything

Last edited by pablocrossa; 2014-11-11 at 19:04.
 

The Following 5 Users Say Thank You to pablocrossa For This Useful Post: