Android porting thread.

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
mac_es
Posts: 145
Joined: Mon Oct 31, 2005 9:37 am

Post by mac_es »

Botje wrote:That somehow enables compression for everything, which is what we didn't want.
Passing in just 'zip' as an extension does the trick, I think.
As aapt's command help:

Code: Select all

  -0 specifies an additional extension for which such files will not be stored compressed in the .apk.  An empty string means to not compress any files at all.
So, an empty string is what you want...
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Post by Botje »

I just tried <nocompress extension='' />, which translates to an empty string.
Checking the resulting .apk indeed results in uncompressed assets/resources.
Can you try that, then?
klusark
Posts: 23
Joined: Tue Mar 27, 2012 11:12 pm

Post by klusark »

@mac_es

Which version of the SDK and NDK are you using? I have not seen any issues like you are describing with the latest versions of the toolchains.
mac_es
Posts: 145
Joined: Mon Oct 31, 2005 9:37 am

Post by mac_es »

Botje wrote:I just tried <nocompress extension='' />, which translates to an empty string.
Checking the resulting .apk indeed results in uncompressed assets/resources.
Can you try that, then?
Yes, indeed when I posted I have tried already...
klusark wrote:@mac_es

Which version of the SDK and NDK are you using? I have not seen any issues like you are describing with the latest versions of the toolchains.
Android SDK 22.3
Android SDK-Platform.Tools 19.0.1
Android SDK-Build-Tools 19.0.1

Android NDK r8b, with binutils updated to 2.22, as the 2.21 had issues:

/temp/residual_svn/build_android/android-toolchain/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld.exe: BFD (GNU Binutils) 2.21 assertion fail /usr/local/google/home/andrewhsieh/ndk-andrewhsieh/src/build/../binutils/binutils-2.21/bfd/elf32-arm.c:10180

I looked at NDK r9c but it changed a lot internally. In the first trial it broke scummvm build system and as I only needed an updated link utility I borrowed the toolchain only.
trev186
Posts: 32
Joined: Mon Oct 11, 2010 4:41 pm

Post by trev186 »

Link is dead :( please post new link
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Post by Botje »

Do you mean my "residualvm test.apk" ? My work got merged and is now kept up to date with master.

You can find the link in the beginning of this thread, or just here.
trev186
Posts: 32
Joined: Mon Oct 11, 2010 4:41 pm

Post by trev186 »

Botje wrote:Do you mean my "residualvm test.apk" ? My work got merged and is now kept up to date with master.

You can find the link in the beginning of this thread, or just here.
Thanks but this FC on me as soon as I open it...

I am using the octa core S4
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Post by Botje »

Please post the relevant bit of your adb logcat so I at least know where to look.

This APK works just fine on my nexus 7 (2013) and HTC One.
hooby3dfx
Posts: 16
Joined: Tue Dec 31, 2013 6:01 am

Post by hooby3dfx »

Also crashing on launch. I'll get logs soon.
HTC DNA stock 4.2
hooby3dfx
Posts: 16
Joined: Tue Dec 31, 2013 6:01 am

Post by hooby3dfx »

03-30 22:11:46.071: E/Trace(14177): error opening trace file: No such file or directory (2)
03-30 22:11:46.141: E/dalvikvm(14177): dlopen("libresidualvm.so") failed: Cannot load library: load_library(linker.cpp:750): library "libresidualvm.so" not found
03-30 22:11:46.141: W/dalvikvm(14177): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/residualvm/residualvm/ResidualVM;
03-30 22:11:46.141: E/ActivityThread(14177): Failed to find provider info for tv.ouya.controllerdata
03-30 22:11:46.141: E/ActivityThread(14177): Failed to find provider info for tv.ouya.controllerdata
03-30 22:11:46.141: E/ActivityThread(14177): Failed to find provider info for tv.ouya.controllerdata
03-30 22:11:46.141: E/ActivityThread(14177): Failed to find provider info for tv.ouya.controllerdata
03-30 22:11:46.151: W/dalvikvm(14177): threadid=1: thread exiting with uncaught exception (group=0x40d41ba0)
03-30 22:11:46.151: E/AndroidRuntime(14177): FATAL EXCEPTION: main
03-30 22:11:46.151: E/AndroidRuntime(14177): java.lang.ExceptionInInitializerError
03-30 22:11:46.151: E/AndroidRuntime(14177): at org.residualvm.residualvm.ResidualVMActivity.onCreate(ResidualVMActivity.java:205)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.Activity.performCreate(Activity.java:5165)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1103)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2419)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2520)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.ActivityThread.access$600(ActivityThread.java:162)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.os.Handler.dispatchMessage(Handler.java:99)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.os.Looper.loop(Looper.java:158)
03-30 22:11:46.151: E/AndroidRuntime(14177): at android.app.ActivityThread.main(ActivityThread.java:5751)
03-30 22:11:46.151: E/AndroidRuntime(14177): at java.lang.reflect.Method.invokeNative(Native Method)
03-30 22:11:46.151: E/AndroidRuntime(14177): at java.lang.reflect.Method.invoke(Method.java:511)
03-30 22:11:46.151: E/AndroidRuntime(14177): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
03-30 22:11:46.151: E/AndroidRuntime(14177): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
03-30 22:11:46.151: E/AndroidRuntime(14177): at dalvik.system.NativeStart.main(Native Method)
03-30 22:11:46.151: E/AndroidRuntime(14177): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: load_library(linker.cpp:750): library "libresidualvm.so" not found
03-30 22:11:46.151: E/AndroidRuntime(14177): at java.lang.Runtime.load(Runtime.java:340)
03-30 22:11:46.151: E/AndroidRuntime(14177): at java.lang.System.load(System.java:521)
03-30 22:11:46.151: E/AndroidRuntime(14177): at org.residualvm.residualvm.ResidualVM.<clinit>(ResidualVM.java:453)
03-30 22:11:46.151: E/AndroidRuntime(14177): ... 15 more
03-30 22:11:48.494: D/Process(14177): killProcess, pid=14177
03-30 22:11:48.494: D/Process(14177): dalvik.system.VMStack.getThreadStackTrace(Native Method)
03-30 22:11:48.494: D/Process(14177): java.lang.Thread.getStackTrace(Thread.java:599)
03-30 22:11:48.504: D/Process(14177): android.os.Process.killProcess(Process.java:1004)
03-30 22:11:48.504: D/Process(14177): com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:123)
03-30 22:11:48.504: D/Process(14177): java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
03-30 22:11:48.504: D/Process(14177): java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
03-30 22:11:48.504: D/Process(14177): dalvik.system.NativeStart.main(Native Method)
mac_es
Posts: 145
Joined: Mon Oct 31, 2005 9:37 am

Post by mac_es »

Hi,


FYI:


Samsung Galaxy S2 4.1.2 FC

Samsung Galaxy S4 (9505, quad) 4.4.2 Works perfectly
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Post by Botje »

These are the libraries required by residualvm:

Code: Select all

 0x00000001 (NEEDED)                     Shared library: [libz.so]
 0x00000001 (NEEDED)                     Shared library: [libGLESv2.so]
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libandroid.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libdl.so]
Is it possible these are not present? (if it crashes with the "cannot load library" error)
You should be able to find them in your phone under /system/lib.

Also, please keep in mind that we do not have the manpower to support every phone, let alone every custom rom.
mac_es
Posts: 145
Joined: Mon Oct 31, 2005 9:37 am

Post by mac_es »

Hello,

The tests were with Oficial Samsung ROMs.

I don't own the SGS2 so I can't verify it right now, but I can tell you that the crash was introduced in the time you remove the splash screen...

Before that it was working in SGS2 4.1.2


Botje wrote:These are the libraries required by residualvm:

Code: Select all

 0x00000001 (NEEDED)                     Shared library: [libz.so]
 0x00000001 (NEEDED)                     Shared library: [libGLESv2.so]
 0x00000001 (NEEDED)                     Shared library: [liblog.so]
 0x00000001 (NEEDED)                     Shared library: [libandroid.so]
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so]
 0x00000001 (NEEDED)                     Shared library: [libm.so]
 0x00000001 (NEEDED)                     Shared library: [libc.so]
 0x00000001 (NEEDED)                     Shared library: [libdl.so]
Is it possible these are not present? (if it crashes with the "cannot load library" error)
You should be able to find them in your phone under /system/lib.

Also, please keep in mind that we do not have the manpower to support every phone, let alone every custom rom.
hennymcc
Posts: 16
Joined: Sun Apr 01, 2012 10:23 pm

Post by hennymcc »

03-30 22:11:46.071: E/Trace(14177): error opening trace file: No such file or directory (2)
03-30 22:11:46.141: E/dalvikvm(14177): dlopen("libresidualvm.so") failed: Cannot load library: load_library(linker.cpp:750): library "libresidualvm.so" not found
Had the same problem with my Samsung Galaxy S plus.
The solution was to replace 'System.load("libresidualvm.so")' with 'System.loadLibrary("residualvm")'.

You can find a patch here:
https://github.com/tobigun/residualvm/c ... cbf1d8c10f

It also contains fixes you might not need for an SGS2. My SGS plus only supports Android 2.3.6, so I had to lower the required SDK version.

You can also directly try the APK that I built for the mouse mod (see mouse-mod thread) and check if it works with an SGS2.
Botje
Posts: 207
Joined: Thu Feb 28, 2013 5:48 pm

Post by Botje »

I pushed a small patch to use System.loadLibrary instead. Can't hurt, seeing as the Android documentation also recommends it.
Post Reply