![]() |
ApkEnv support module development
2 Attachment(s)
Hello all devs (and non devs).
I started this ApkEnv support module development thread so that maybe we get more devs working on this. Original thread: http://talk.maemo.org/showthread.php?t=87496 Web page: http://thp.io/2012/apkenv/ This is what I have learned from studying ApkEnv sources, please correct me if I am wrong. First little about ApkEnv and these support modules, what are they and why are they needed. ApkEnv is not Java VM so it can't run programs that are made completely with Java JDK. Some programs however are made with NDK that allows programmers to develop programs with C language but even these programs need small java code that handles all Android related stuff for example OpenGL, touch screen, network and audio related code. ApkEnv can run this native C code but it can't run this small Java program what handles all important stuff. This is where support modules come into play. APKs are basically zip files and Java code that needs to be ported to these modules is inside classes.dex file. Here is pretty good info how to read this file: http://stackoverflow.com/questions/1...ava-sourcecode I have written modules for Angry Birds Space and Fruit Ninja (attached) I would like to remind people before they start spamming "[insert APK here] doesn't work" that if there is no support module for APK file it probably doesn't work. PS. If you want to find out if APK is made with NDK then check if it contains lib/armeabi folder. If folder exists then there is hope that it can be run under ApkEnv and proper module. Edit: Both Angry Birds and Fruit Ninja got sound support now! (attachments updated) Thanks to thp for support. From now on I upload my modules to https://github.com/Art-O/apkenv and make pull request to thp git when I think they are ready :) Next I start working on my favourite Android & desktop game World of Goo (that one seems much more challenging than AB or FN) :D Art-O |
Re: ApkEnv support module development
mmm... let me get this stright...
The modules work the same as the dead "iced-robot" project, on top of the jvm? Or the modules reimplement small Dalvik pices? Could you explain how this modules work? |
Re: ApkEnv support module development
Quote:
One thing that I should point out is that we don't have to implement every function inside classes.dex file. Only basic functions like Init, input, file access and OpenGL update methods. For example Angry Birds Space input function is declared inside classes.dex file: Code:
public native void nativeInput(int paramInt1, float paramFloat1, float paramFloat2, int paramInt2); Code:
typedef void (*angrybirds_input_t)(JNIEnv *env, jobject obj, jint paramInt1, jfloat paramFloat1, jfloat paramFloat2, jint paramInt2) SOFTFP; ApkEnv handles Harmattan/Fremantle screen input but it needs modules to pass this information correctly to native APK. Code in module: Code:
static void This is also why I need help to develop sound support for AB and Fruit Ninja. Art-O |
Re: ApkEnv support module development
Does that mean that apkenv isn't a compatibility layer, but a framework that doesn't completely obviate the need for porting, even if it does, like, 90% of it?
|
Re: ApkEnv support module development
Quote:
One thing I should add is that ApkEnv natively sets up OpenGL viewport(?) for modules and this means that we can only run OpenGL based games with ApkEnv. For this reason Android UI applications that don't use OpenGL cannot be run inside ApkEnv. I am not sure if it is possible to make fork of ApkEnv that would support UI elements. Art-O |
Re: ApkEnv support module development
thanks work as expected . but for newer version it say missing dependencies (same as original apkenv )
|
Re: ApkEnv support module development
Sorry Art-O but doesnt the wrapper-generator extract all the infomation required to build the modules? Sorry if I'm wrong or if I didnt understand the whole point of the thead.
|
Re: ApkEnv support module development
Quote:
Quote:
Android built in libraries (libc, gles, pthread etc. check apkenv source/compat directory) and it has nothing to do with modules. |
Re: ApkEnv support module development
angry birds 3.0 and angry birds seasons 3.1 and yes the new source version from git .
|
Re: ApkEnv support module development
Quote:
But suprisingly it seems to work with Amazing Alex (i don't remember version) |
All times are GMT. The time now is 21:44. |
vBulletin® Version 3.8.8