From: Twaik Yont <9674930+twaik@users.noreply.github.com> Update WINELOADER to match the current Wine layout. Also extend LD_LIBRARY_PATH to include libraries from the APK, since modern Android versions may load native libraries directly from the APK instead of extracting them to the filesystem. Support for loading shared libraries directly from an APK via dlopen("apk!/lib/...") is available since API level 23. See: https://android.googlesource.com/platform/bionic/+/master/android-changes-fo... This restores correct startup on recent Wine versions and Android devices. Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com> --- dlls/wineandroid.drv/WineActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wineandroid.drv/WineActivity.java b/dlls/wineandroid.drv/WineActivity.java index fd73ff009bf..0dc7df5ca53 100644 --- a/dlls/wineandroid.drv/WineActivity.java +++ b/dlls/wineandroid.drv/WineActivity.java @@ -116,7 +116,7 @@ private void loadWine( String cmdline ) File libdir = new File( getFilesDir(), wine_abi + "/lib" ); File dlldir = new File( libdir, "wine" ); File prefix = new File( getFilesDir(), "prefix" ); - File loader = new File( bindir, "wine" ); + File loader = new File( dlldir, get_so_dir(wine_abi) + "/wine" ); String locale = Locale.getDefault().getLanguage() + "_" + Locale.getDefault().getCountry() + ".UTF-8"; @@ -124,7 +124,7 @@ private void loadWine( String cmdline ) env.put( "WINELOADER", loader.toString() ); env.put( "WINEPREFIX", prefix.toString() ); env.put( "WINEDLLPATH", dlldir.toString() ); - env.put( "LD_LIBRARY_PATH", libdir.toString() + ":" + getApplicationInfo().nativeLibraryDir ); + env.put( "LD_LIBRARY_PATH", libdir.toString() + ":" + getPackageResourcePath() + "!/lib/" + wine_abi + ":" + getApplicationInfo().nativeLibraryDir ); env.put( "LC_ALL", locale ); env.put( "LANG", locale ); env.put( "PATH", bindir.toString() + ":" + System.getenv( "PATH" )); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10683