Actually you can get CocoonJS work with Emulator. I had some mailings with Ludei before to track down a JNI bug, here are come excerpts about how to start a compatible emulator. This was a few months ago, and also the version from 2013.07.26 with apk md5sum 55aa7f226b04d698382a604299357094, version 1.3 (although it is advertised to be 1.4).
The key part is the -gpu on
switch, and optionally switching off JNI checks (for emulators / certain rooted devices):
- Updated SDK Tools to r21, Platform-tools to r16
- tools$ ./android create avd -n A15 -t android-15 #(can also make higher platform level emulator)
- tools$ ./emulator -avd A15 -gpu on
- platform-tools$ wget http://storage.cocoonjsservice.ludei.com/CocoonJSLauncher.apk
- (Optional) Remove previous version ./adb uninstall com.ideateca.cocoonjslauncher
- ./adb install CocoonJSLauncher.apk
- ./adb logcat
- Start app on emulator, observe logs
Optionally disable JNI checks to workaround CocoonJS bugs (if starting CocoonJS fails with JNI exception, something like "JNI WARNING: 0x412c40a8 is not a valid JNI reference"):
adb shell stop
adb shell setprop dalvik.vm.checkjni false
adb shell start
(then emulator/device restarts, after restart JNI checks are not made, source: http://developer.android.com/training/articles/perf-jni.html)
By the way, setting checkjni
to true
using the above method on a real non-rooted device also causes the problem, if you want to check.
Box2D, Sprite demo, Fonts demo works, didn't check others.