![]() |
liar,can you do a video? ;) hope you are not what your username is..
|
Re: ApkEnv support module development
Quote:
|
Re: ApkEnv support module development
I've sent in a pull request. i hope there isn't much i need to change before it goes in :)
|
Re: ApkEnv support module development
EDIT:
i have managed to launch dalvikvm on my nokia n9 using a few hacks here and there, but most importantly: i can do this without openmode (i am running inception, but it should be possible in a standard installation too) i am able to execute basic jar files now, and i've managed to initialize some internal stuff, like preloading classes: ...preloaded 2297 classes in 5637ms. i still cannot launch activities though because i am lacking the knowledge on how to use some of the internal android classes. what i can do so far is: load the dalvikvm initialize native methods (located in libandroid_runtime.so) and redirect then to harmattan native calls (all functions which apkenv supports until now and a few more) preload some android classes > until here everything is going the way it's supposed to be but thats it i've tried manually loading activities from an apk file using dalvik.system.PathClassLoader and it works, i can call methods, but most of them fail (java exceptions) because this is not the way activities are supposed to be loaded if somebody knows how it works please let me know i am currently experimenting with ActivityThread |
Re: ApkEnv support module development
I wrote this command :
Code:
apkenv --install /home/user/MyDocs/Apkenv/wogoo.apk |
Re: ApkEnv support module development
Liar, can you please share further information about how to get Plants vs. Zombies work?
It uses an external data folder on Android. Where should we copy it? Do we need anything else to launch the game? Also, which version of the game are you able to execute? (Or is the Humble Bundle version of PvZ completely different from other versions?) Please give us, users some hint about it :) |
Re: ApkEnv support module development
Quote:
i've used version 1.3.16 iirc |
Re: ApkEnv support module development
Thanky.
I tried various versions however, all of them skipping marmalade.apkenv.so and using the generic module instead. I have - marmalade.apkenv.so in /opt/apkenv/modules - "files" folder in /home/user/.apkenv/pvz-test.apk - pvz-test.apk (version 1.3.16, and others) in /MyDocs/Apkenv and launching with code: apkenv /home/user/MyDocs/Apkenv/pvz-test.apk All I get is a "screenshot" of the last launched page (the terminal), and the log in terminal, claiming marmalade.apkenv.so (2) is loaded, but generic.apkenv.so (2) is being used. Do you have any idea what am I doing wrong? (I also have the openframeworks.apkenv.so for Super Hexagon in /modules folder, if that counts.) EDIT: If I remove generic.apkenv.so, it loads marmalade and gives the following info: late-intializing errorcheck mutex (x3) Segmentation fault |
Re: ApkEnv support module development
that probably means you're missing the data files
if pvz-test.apk is your apkfilename then they have to be in: /home/user/.apkenv/pvz-test.apk/ (don't forget the dot) |
Re: ApkEnv support module development
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..
|
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 :) |
Re: ApkEnv support module development
Quote:
you might need to unpack PvZ.dz |
Re: ApkEnv support module development
Quote:
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? |
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 :) |
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.
|
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 |
Re: ApkEnv support module development
Quote:
|
Re: ApkEnv support module development
Quote:
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 |
Re: ApkEnv support module development
Quote:
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. |
Re: ApkEnv support module development
Quote:
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 |
Re: ApkEnv support module development
i've managed to get all the ipc stuff going, services like netd, installd, servicemanager work fine, i couldn't test my patched surfaceflinger yet, but there are many cases where it could fail. Zygote starts up fine, SystemManager initializes all the services until ConnectivityService which segfaults somewhere during initialisation and i am unable to figure out why
EDIT: i know that the crash is inside libnativehelper at address 0x20e58 (function start is at 0x20e34) (nitdroid alpha 4) which is actually inside libcore (i suspect), but unfortunately there seem to be no symbol names so i don't know what function that is and where it is called from EDIT: found it, sockaddrToInetAddress EDIT: the reason was a difference between bionic and glibc's addinfo EDIT: so i got the main loop going, but rendering does not work yet |
Re: ApkEnv support module development
Just noticed that Plants Vs. Zombies only registers screen taps and as a result kinetic scrolling and drag&drop (for plants) does not work. This is something that should be fixed if possible. Liar, are you still interested in upgrading the marmalade, or you are now only focusing on this much bigger project with the Dalvik VM?
|
Re: ApkEnv support module development
Quote:
|
Re: ApkEnv support module development
Are you guys working on getting dalvik vm working to some extent:eek:
|
Re: ApkEnv support module development
Quote:
|
Re: ApkEnv support module development
Quote:
|
Re: ApkEnv support module development
surfaceflinger & egl mess (emulator strings are just because i used code from there)
http://pastebin.com/pxyuk9Jb |
Re: ApkEnv support module development
|
Re: ApkEnv support module development
Quote:
|
Re: ApkEnv support module development
i suppose it's a chroot, propably a similar approach as paralleldroid
|
Re: ApkEnv support module development
@liar youtube link to weibo.com/chomper
check it with translator :) (its chinesse, i suppose) |
Re: ApkEnv support module development
I have a question, and I'm sorry if it's off-topic, but I was wondering if it's possible to create a module for Netflix? And what do one need to get it to work?
|
Re: ApkEnv support module development
@bandora dalvik apps and system api not supported. only opengl and multimedia stuff.
|
Re: ApkEnv support module development
Quote:
btw in future do we have chances to see more? Someone is already testing dalvik though:) |
Re: ApkEnv support module development
I think there is no Vangas.
|
Re: ApkEnv support module development
i actually got it to render something, but currently it is limited to a 32x32 window size, because there is an issue with glTexImage2D
|
Re: ApkEnv support module development
Quote:
http://talk.maemo.org/showthread.php?p=1233116 http://www.opengl.org/wiki/Common_Mistakes#Texture_Unit |
Re: ApkEnv support module development
Quote:
Hope this helps It seems not yet release on WebOS edit: Found the release thread(Chinese) http://www.treo8.com/bbs/thread-264215-1-1.html possible download link, don't know fake or not: http://www.imsearchfile.com/info-abo.../515b934fh32i0 |
Re: ApkEnv support module development
for anybody who wants to experiment:
a simple way to use nitdroid binaries (kind of): * fetch a copy of nitdroid, unpack it on your n9 * setup an android build environment (preferably matching the nitdroid version) * cd into the folder where the android source code is of the binary you want to use * rename the "main" function to something else (eg. app_process_main) * setup a makefile to compile the project into a so library * then you can load that library using android_dlopen inside an harmattan application and load the renamed "main" function using android_dlsym, also change the android linker you're using to find the libraries inside your nitdroid environment, so that the project you're trying to use gets properly linked against it's dependencies EDIT: the reason you need to rename the main function is that gcc treats functions differently if they are named main. i hope this is helpful |
Re: ApkEnv support module development
i've been working on running android in a chroot similar to what chompers chroid does but i could use some help...
running android in a chroot on the n9: 1) you need a kernel which has these settings enabled: Code:
CONFIG_ANDROID=y the nitdroid dual boot kernel has all of this included and is probably the best starting point if you don't want to recompile a kernel or patch android stuff :) 2) download a copy of nitdroid, i used alpha4 3) extract it somewhere on your device 4) delete these files in the root directory of nitdroid Code:
cd /path/to/nitdroid Code:
cd /path/to/nitdroid/system/lib/hw Code:
chroot /path/to/nitdroid Code:
/init |
All times are GMT. The time now is 08:10. |
vBulletin® Version 3.8.8