maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   ApkEnv support module development (https://talk.maemo.org/showthread.php?t=88250)

Just486 2013-06-01 18:54

Re: ApkEnv support module development
 
Yes, my apk is pvz-test.apk
I tried the following pathes for data placement, none of them worked (all of them wrote "late-initializing errorcheck mutex" three times before "Segmentation fault")
/home/user/.apkenv/pvz-test.apk/com.popcap.pvz_na/files/
/home/user/.apkenv/pvz-test.apk/com.popcap.pvz/files/
/home/user/.apkenv/pvz-test.apk/files/
/home/user/.apkenv/pvz-test.apk/

after the last / all the folders contained:
music, userdata, video, AssetInfo.indicate, Downloaded.indicate, Downloaded2.indicate, PvZ.dz.

Am I doing something wrong?


EDIT: We can just dump the whole thing if I got too annoying :)

liar 2013-06-01 20:32

Re: ApkEnv support module development
 
Quote:

Originally Posted by Just486 (Post 1348713)
Yes, my apk is pvz-test.apk
I tried the following pathes for data placement, none of them worked (all of them wrote "late-initializing errorcheck mutex" three times before "Segmentation fault")
/home/user/.apkenv/pvz-test.apk/com.popcap.pvz_na/files/
/home/user/.apkenv/pvz-test.apk/com.popcap.pvz/files/
/home/user/.apkenv/pvz-test.apk/files/
/home/user/.apkenv/pvz-test.apk/

after the last / all the folders contained:
music, userdata, video, AssetInfo.indicate, Downloaded.indicate, Downloaded2.indicate, PvZ.dz.

Am I doing something wrong?


EDIT: We can just dump the whole thing if I got too annoying :)

i am not sure right now whats missing i haven't played it in a while
you might need to unpack PvZ.dz

liar 2013-06-01 20:59

Re: ApkEnv support module development
 
Quote:

Originally Posted by bandora (Post 1348705)
liar I suggeat PMing thp and collaborate with him.. He's the one to ask about this stuff.. Also this is exciting news.. Very exciting news!!! I am willing to donate some money for this to succeed.. I'm sure a lot of other people would do the same too! Best of luck..


you can always donate on my N64 thread, but i cannot guarantee that this'll ever be usable...
i've made some progress though, i've hooked a few methods in the dalvikvm to be more flexible, i've even been able to use the android package parser to get information out of an apk file, and i've been able initiate the launch process of an activity (ActivityThread, performActivityLaunch...) the next thing i need to fiddle with is surfaceflinger to get a window which the activity can render into

EDIT: binder is very annoying, don't know what i should do with that. i found some android sources: https://android.googlesource.com/ker...taging/android

EDIT: does anyone know where i can find the exact sources nitroid alpha 4 for n9 is based on?

liar 2013-06-05 23:11

Re: ApkEnv support module development
 
this just happened (java code trying to load a library):

Trying to load lib /home/user/apkenv/libdstfree.so 0x3b99b718
linker/linker.c:716| WARNING: `/home/user/apkenv/libdstfree.so` is not a prelinked library
0 mapped library 'libdstfree.so' to 40d15000 via kernel allocator.
Added shared lib /home/user/apkenv/libdstfree.so 0x3b99b718

but it's still crashing shortly afterwards ;), but there is at least a little bit of hope :)

Hariainm 2013-06-05 23:54

Re: ApkEnv support module development
 
liar, NITDroid is based on patched-AOSP sources i think. Maybe you may ask e-yes aka drunkdebugger here, in NITDroid forums or via twitter for tecnical information.

liar 2013-06-06 21:58

Re: ApkEnv support module development
 
i fear for now there is no way around binder. so either we have to stick with openmode or inception to get this going until we have some sort of userspace replacement for binder.

i've been able to "insmod" an adapted version of binder and it seems like it might work but i am still experimenting

thp 2013-06-07 15:26

Re: ApkEnv support module development
 
Quote:

Originally Posted by liar (Post 1350102)
i fear for now there is no way around binder. so either we have to stick with openmode or inception to get this going until we have some sort of userspace replacement for binder.

i've been able to "insmod" an adapted version of binder and it seems like it might work but i am still experimenting

What about using the Nitdroid PR1.3 kernel (I guess you have tried that already)? It does have all the Android features like /dev/binder and /dev/ashmem that are also accessible from Harmattan.

liar 2013-06-07 15:53

Re: ApkEnv support module development
 
Quote:

Originally Posted by thp (Post 1350287)
What about using the Nitdroid PR1.3 kernel (I guess you have tried that already)? It does have all the Android features like /dev/binder and /dev/ashmem that are also accessible from Harmattan.

oh i wasn't aware of that, i'm still gonna try with the stock kernel a little bit but...
with that it should be possible to launch zygote & system server and ultimatively launch activities without too much effort i think

EDIT: the kernel module seems to be working fine. but i couldn't figure out why system-server is crashing

thp 2013-06-08 10:47

Re: ApkEnv support module development
 
Quote:

Originally Posted by liar (Post 1350298)
oh i wasn't aware of that, i'm still gonna try with the stock kernel a little bit but...
with that it should be possible to launch zygote & system server and ultimatively launch activities without too much effort i think

EDIT: the kernel module seems to be working fine. but i couldn't figure out why system-server is crashing

The way I'd approach this is to first install Nitdroid in parallel with Harmattan, then after making sure that Nitdroid runs on its own, boot into Harmattan (where at that point you already have a working Android kernel, as it's needed for Nitdroid) and chroot into the Nitdroid directory and get it running (see this old blog post on how to run a simple "hello world").

The only other problem I see is that Android accesses /dev/fbX directly (similar for input events, etc..), whereas if we run it inside Harmattan, we probably want to redirect everything into a window. There's some work in this direction in the ParallelDroid project, maybe some things can be re-used from there.

liar 2013-06-08 13:24

Re: ApkEnv support module development
 
Quote:

Originally Posted by thp (Post 1350486)
The way I'd approach this is to first install Nitdroid in parallel with Harmattan, then after making sure that Nitdroid runs on its own, boot into Harmattan (where at that point you already have a working Android kernel, as it's needed for Nitdroid) and chroot into the Nitdroid directory and get it running (see this old blog post on how to run a simple "hello world").

The only other problem I see is that Android accesses /dev/fbX directly (similar for input events, etc..), whereas if we run it inside Harmattan, we probably want to redirect everything into a window. There's some work in this direction in the ParallelDroid project, maybe some things can be re-used from there.

with a modified apkenv i've been able to initialize zygote and system server process to the point where SurfaceFlinger is started and tries to initialize the graphics hardware. i thought it might be possible to hook up the surfaceflinger functions and simulate them (the same for other android services)

http://pastebin.com/y3v3cwkP
http://pastebin.com/UjAa6jF1
http://pastebin.com/8hDzTJFL

EDIT: i've been able to patch up surfaceflinger such that instead of accessing the hardware a X11 window is created and it uses that together with egl to draw to the screen
but the binder module fails, so i'm probably gonna try the nitdroid kernel next


All times are GMT. The time now is 16:15.

vBulletin® Version 3.8.8