about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKreitinnSoftware <80591934+KreitinnSoftware@users.noreply.github.com>2023-10-02 13:26:20 -0300
committerGitHub <noreply@github.com>2023-10-02 18:26:20 +0200
commit57b762eb2976229a1297bd39a00976b3753de4d7 (patch)
treebd206d2c812c9e400d933e61486aa1d27cb3927c
parenta4eb0cbd74423b7bdbeb3189c12905340108ec50 (diff)
downloadbox64-57b762eb2976229a1297bd39a00976b3753de4d7.tar.gz
box64-57b762eb2976229a1297bd39a00976b3753de4d7.zip
Add __sF, __assert2 Symbol and set PThread Symbols on libc (#1004)
* Add __sF, __assert2 Symbol and set PThread Symbols on libc

* [ANDROID] Fix Most Library Names
-rw-r--r--src/library_list.h69
-rw-r--r--src/wrapped/wrappedcurl.c7
-rw-r--r--src/wrapped/wrappedflac.c7
-rw-r--r--src/wrapped/wrappedfontconfig.c7
-rw-r--r--src/wrapped/wrappedgstallocators.c7
-rw-r--r--src/wrapped/wrappedgstapp.c7
-rw-r--r--src/wrapped/wrappedgstaudio.c22
-rw-r--r--src/wrapped/wrappedgstbase.c37
-rw-r--r--src/wrapped/wrappedgstcheck.c7
-rw-r--r--src/wrapped/wrappedgstcontroller.c7
-rw-r--r--src/wrapped/wrappedgstfft.c7
-rw-r--r--src/wrapped/wrappedgstgl.c7
-rw-r--r--src/wrapped/wrappedgstnet.c7
-rw-r--r--src/wrapped/wrappedgstpbutils.c7
-rw-r--r--src/wrapped/wrappedgstreamer.c39
-rw-r--r--src/wrapped/wrappedgstrtp.c7
-rw-r--r--src/wrapped/wrappedgstrtsp.c7
-rw-r--r--src/wrapped/wrappedgstsdp.c7
-rw-r--r--src/wrapped/wrappedgsttag.c7
-rw-r--r--src/wrapped/wrappedgstvideo.c37
-rw-r--r--src/wrapped/wrappedgtk3.c7
-rw-r--r--src/wrapped/wrappedkrb5.c7
-rw-r--r--src/wrapped/wrappedlibc_private.h157
-rw-r--r--src/wrapped/wrappedlibsndfile.c7
-rw-r--r--src/wrapped/wrappedlibusb1.c7
-rw-r--r--src/wrapped/wrappedlibvorbis.c6
-rw-r--r--src/wrapped/wrappedlibx11.c7
-rw-r--r--src/wrapped/wrappedlibxau.c7
-rw-r--r--src/wrapped/wrappedlibxcb.c7
-rw-r--r--src/wrapped/wrappedlibxcbdri3.c7
-rw-r--r--src/wrapped/wrappedlibxcbglx.c7
-rw-r--r--src/wrapped/wrappedlibxcbicccm.c7
-rw-r--r--src/wrapped/wrappedlibxcbimage.c7
-rw-r--r--src/wrapped/wrappedlibxcbkeysyms.c7
-rw-r--r--src/wrapped/wrappedlibxcbpresent.c7
-rw-r--r--src/wrapped/wrappedlibxcbrandr.c7
-rw-r--r--src/wrapped/wrappedlibxcbrender.c7
-rw-r--r--src/wrapped/wrappedlibxcbrenderutil.c7
-rw-r--r--src/wrapped/wrappedlibxcbshape.c7
-rw-r--r--src/wrapped/wrappedlibxcbshm.c7
-rw-r--r--src/wrapped/wrappedlibxcbsync.c7
-rw-r--r--src/wrapped/wrappedlibxcbutil.c7
-rw-r--r--src/wrapped/wrappedlibxcbxfixes.c7
-rw-r--r--src/wrapped/wrappedlibxcbxinerama.c6
-rw-r--r--src/wrapped/wrappedlibxcbxkb.c7
-rw-r--r--src/wrapped/wrappedlibxcbxtest.c7
-rw-r--r--src/wrapped/wrappedlibxcomposite.c7
-rw-r--r--src/wrapped/wrappedlibxcursor.c7
-rw-r--r--src/wrapped/wrappedlibxdamage.c7
-rw-r--r--src/wrapped/wrappedlibxdmcp.c7
-rw-r--r--src/wrapped/wrappedlibxext.c34
-rw-r--r--src/wrapped/wrappedlibxfixes.c28
-rw-r--r--src/wrapped/wrappedlibxft.c28
-rw-r--r--src/wrapped/wrappedlibxi.c16
-rw-r--r--src/wrapped/wrappedlibxmu.c16
-rw-r--r--src/wrapped/wrappedlibxpm.c16
-rw-r--r--src/wrapped/wrappedlibxpresent.c7
-rw-r--r--src/wrapped/wrappedlibxrandr.c25
-rw-r--r--src/wrapped/wrappedlibxrender.c28
-rw-r--r--src/wrapped/wrappedlibxss.c16
-rw-r--r--src/wrapped/wrappedlibxt.c19
-rw-r--r--src/wrapped/wrappedlibxtst.c19
-rw-r--r--src/wrapped/wrappedlibxxf86vm.c17
-rw-r--r--src/wrapped/wrappedlibz.c7
-rw-r--r--src/wrapped/wrappedpulse.c7
-rw-r--r--src/wrapped/wrappedpulsesimple.c16
-rw-r--r--src/wrapped/wrappedvorbisfile.c7
-rw-r--r--src/wrapped/wrappedxinerama.c16
-rw-r--r--src/wrapped/wrappedxshmfence.c7
69 files changed, 814 insertions, 182 deletions
diff --git a/src/library_list.h b/src/library_list.h
index af88fd32..e9c73b1c 100644
--- a/src/library_list.h
+++ b/src/library_list.h
@@ -252,6 +252,75 @@ GO("libX11.so", libx11)
 GO("libXext.so", libxext)
 GO("libxcb.so", libxcb)
 GO("libXau.so", libxau)
+GO("libXxf86vm.so", libxxf86vm)
+GO("libXinerama.so", xinerama)
+GO("libXrandr.so", libxrandr)
+GO("libXext.so", libxext)
+GO("libXfixes.so", libxfixes)
+GO("libXcursor.so", libxcursor)
+GO("libXrender.so", libxrender)
+GO("libXft.so", libxft)
+GO("libXi.so", libxi)
+GO("libXss.so", libxss)
+GO("libXpm.so", libxpm)
+GO("libXau.so", libxau)
+GO("libXdmcp.so", libxdmcp)
+GO("libX11-xcb.so", libx11xcb)
+GO("libxcb.so", libxcb)
+GO("libxcb-xfixes.so", libxcbxfixes)
+GO("libxcb-shape.so", libxcbshape)
+GO("libxcb-shm.so", libxcbshm)
+GO("libxcb-randr.so", libxcbrandr)
+GO("libxcb-present.so", libxcbpresent)
+GO("libxcb-image.so", libxcbimage)
+GO("libxcb-keysyms.so", libxcbkeysyms)
+GO("libxcb-xtest.so", libxcbxtest)
+GO("libxcb-glx.so", libxcbglx)
+GO("libxcb-dri2.so", libxcbdri2)
+GO("libxcb-dri3.so", libxcbdri3)
+GO("libxcb-icccm.so", libxcbicccm)
+GO("libxcb-util.so", libxcbutil)
+GO("libxcb-render-util.so", libxcbrenderutil)
+GO("libxcb-render.so", libxcbrender)
+GO("libxcb-sync.so", libxcbsync)
+GO("libxcb-xinerama.so", libxcbxinerama)
+GO("libxcb-xkb.so", libxcbxkb)
+//GO("libxcb-present.so", libxcbpresent)
+GO("libXtst.so", libxtst)
+GO("libXt.so", libxt)
+GO("libXcomposite.so", libxcomposite)
+GO("libXdamage.so", libxdamage)
+GO("libXpresent.so", libxpresent)
+GO("libXmu.so", libxmu)
+GO("libxkbcommon.so", xkbcommon)
+GO("libxkbcommon-x11.so", xkbcommonx11)
+GO("libpulse-simple.so", pulsesimple)
+GO("libpulse.so", pulse)
+GO("libsndfile.so", libsndfile)
+GO("libgstallocators-1.0.so", gstallocators)
+GO("libgstapp-1.0.so", gstapp)
+GO("libgstaudio-1.0.so", gstaudio)
+GO("libgstbase-1.0.so", gstbase)
+GO("libgstcheck-1.0.so", gstcheck)
+GO("libgstcontroller-1.0.so", gstcontroller)
+GO("libgstfft-1.0.so", gstfft)
+GO("libgstgl-1.0.so", gstgl)
+GO("libgstnet-1.0.so", gstnet)
+GO("libgstpbutils-1.0.so", gstpbutils)
+GO("libgstreamer-1.0.so", gstreamer)
+GO("libgstriff-1.0.so", gstriff)
+GO("libgstrtp-1.0.so", gstrtp)
+GO("libgstrtsp-1.0.so", gstrtsp)
+GO("libgstsdp-1.0.so", gstsdp)
+GO("libgsttag-1.0.so", gsttag)
+GO("libgstvideo-1.0.so", gstvideo)
+GO("libxshmfence.so", xshmfence)
+GO("libusb-1.0.so", libusb1)
+GO("libvorbisfile.so", vorbisfile)
+GO("libvorbis.so", libvorbis)
+GO("libogg.so", libogg)
+GO("libFLAC.so", flac)
+GO("libz.so", libz)
 GO("libandroid-shmem.so", androidshmem)
 #else
 GO("libc.so.6", libc)
diff --git a/src/wrapped/wrappedcurl.c b/src/wrapped/wrappedcurl.c
index 490d7f8d..b7d588c0 100644
--- a/src/wrapped/wrappedcurl.c
+++ b/src/wrapped/wrappedcurl.c
@@ -16,7 +16,12 @@
 #include "emu/x64emu_private.h"
 #include "callback.h"
 
-const char* curlName = "libcurl.so.4";
+#ifdef ANDROID
+    const char* curlName = "libcurl.so";
+#else
+    const char* curlName = "libcurl.so.4";
+#endif
+
 #define ALTNAME "libcurl-gnutls.so.4"
 #define LIBNAME curl
 
diff --git a/src/wrapped/wrappedflac.c b/src/wrapped/wrappedflac.c
index bc1919ca..8f0f3760 100644
--- a/src/wrapped/wrappedflac.c
+++ b/src/wrapped/wrappedflac.c
@@ -18,7 +18,12 @@
 #include "myalign.h"
 #include "bridge.h"
 
-const char* flacName = "libFLAC.so.8";
+#ifdef ANDROID
+    const char* flacName = "libFLAC.so";
+#else
+    const char* flacName = "libFLAC.so.8";
+#endif
+
 #define LIBNAME flac
 
 typedef struct {
diff --git a/src/wrapped/wrappedfontconfig.c b/src/wrapped/wrappedfontconfig.c
index b56e41cd..ef6a19d2 100644
--- a/src/wrapped/wrappedfontconfig.c
+++ b/src/wrapped/wrappedfontconfig.c
@@ -18,7 +18,12 @@
 #include "emu/x64emu_private.h"
 #include "myalign.h"
 
-const char* fontconfigName = "libfontconfig.so.1";
+#ifdef ANDROID
+    const char* fontconfigName = "libfontconfig.so";
+#else
+    const char* fontconfigName = "libfontconfig.so.1";
+#endif
+
 #define LIBNAME fontconfig
 
 #define ADDED_FUNCTIONS()                   \
diff --git a/src/wrapped/wrappedgstallocators.c b/src/wrapped/wrappedgstallocators.c
index a698ce73..ebdcb0fa 100644
--- a/src/wrapped/wrappedgstallocators.c
+++ b/src/wrapped/wrappedgstallocators.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstallocatorsName = "libgstallocators-1.0.so.0";
+#ifdef ANDROID
+    const char* gstallocatorsName = "libgstallocators-1.0.so";
+#else
+    const char* gstallocatorsName = "libgstallocators-1.0.so.0";
+#endif
+
 #define LIBNAME gstallocators
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstapp.c b/src/wrapped/wrappedgstapp.c
index 92322f3b..bc712f7a 100644
--- a/src/wrapped/wrappedgstapp.c
+++ b/src/wrapped/wrappedgstapp.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstappName = "libgstapp-1.0.so.0";
+#ifdef ANDROID
+    const char* gstappName = "libgstapp-1.0.so";
+#else
+    const char* gstappName = "libgstapp-1.0.so.0";
+#endif
+
 #define LIBNAME gstapp
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstaudio.c b/src/wrapped/wrappedgstaudio.c
index f7faf217..cde06e01 100644
--- a/src/wrapped/wrappedgstaudio.c
+++ b/src/wrapped/wrappedgstaudio.c
@@ -20,7 +20,12 @@
 #include "gtkclass.h"
 #include "fileutils.h"
 
-const char* gstaudioName = "libgstaudio-1.0.so.0";
+#ifdef ANDROID
+    const char* gstaudioName = "libgstaudio-1.0.so";
+#else
+    const char* gstaudioName = "libgstaudio-1.0.so.0";
+#endif
+
 #define LIBNAME gstaudio
 
 typedef size_t  (*LFv_t)();
@@ -36,10 +41,17 @@ typedef size_t  (*LFv_t)();
     if(box64_nogtk) \
         return -1;
 
-#define CUSTOM_INIT \
-    getMy(lib);     \
-    SetGstAudioDecoderID(my->gst_audio_decoder_get_type());\
-    setNeededLibs(lib, 1, "libgstreamer-1.0.so.0");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstAudioDecoderID(my->gst_audio_decoder_get_type());\
+        setNeededLibs(lib, 1, "libgstreamer-1.0.so");
+#else
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstAudioDecoderID(my->gst_audio_decoder_get_type());\
+        setNeededLibs(lib, 1, "libgstreamer-1.0.so.0");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedgstbase.c b/src/wrapped/wrappedgstbase.c
index 47c8f8a3..495357dc 100644
--- a/src/wrapped/wrappedgstbase.c
+++ b/src/wrapped/wrappedgstbase.c
@@ -20,7 +20,12 @@
 #include "gtkclass.h"
 #include "fileutils.h"
 
-const char* gstbaseName = "libgstbase-1.0.so.0";
+#ifdef ANDROID
+    const char* gstbaseName = "libgstbase-1.0.so";
+#else
+    const char* gstbaseName = "libgstbase-1.0.so.0";
+#endif
+
 #define LIBNAME gstbase
 
 typedef size_t  (*LFv_t)();
@@ -224,15 +229,27 @@ EXPORT void my_gst_collect_pads_set_buffer_function(x64emu_t* emu, void* pads, v
     if(box64_nogtk) \
         return -1;
 
-#define CUSTOM_INIT \
-    getMy(lib);     \
-    SetGstBaseTransformID(my->gst_base_transform_get_type());\
-    SetGstBaseSinkID(my->gst_base_sink_get_type());\
-    SetGstAggregatorID(my->gst_aggregator_get_type());\
-    SetGstPushSrcID(my->gst_push_src_get_type());\
-    SetGstBaseSrcID(my->gst_base_src_get_type());\
-    SetGstAggregatorPadID(my->gst_aggregator_pad_get_type());\
-    setNeededLibs(lib, 1, "libgstreamer-1.0.so.0");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstBaseTransformID(my->gst_base_transform_get_type());\
+        SetGstBaseSinkID(my->gst_base_sink_get_type());\
+        SetGstAggregatorID(my->gst_aggregator_get_type());\
+        SetGstPushSrcID(my->gst_push_src_get_type());\
+        SetGstBaseSrcID(my->gst_base_src_get_type());\
+        SetGstAggregatorPadID(my->gst_aggregator_pad_get_type());\
+        setNeededLibs(lib, 1, "libgstreamer-1.0.so");
+#else
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstBaseTransformID(my->gst_base_transform_get_type());\
+        SetGstBaseSinkID(my->gst_base_sink_get_type());\
+        SetGstAggregatorID(my->gst_aggregator_get_type());\
+        SetGstPushSrcID(my->gst_push_src_get_type());\
+        SetGstBaseSrcID(my->gst_base_src_get_type());\
+        SetGstAggregatorPadID(my->gst_aggregator_pad_get_type());\
+        setNeededLibs(lib, 1, "libgstreamer-1.0.so.0");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedgstcheck.c b/src/wrapped/wrappedgstcheck.c
index e7fe36b8..e52bf0b8 100644
--- a/src/wrapped/wrappedgstcheck.c
+++ b/src/wrapped/wrappedgstcheck.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstcheckName = "libgstcheck-1.0.so.0";
+#ifdef ANDROID
+    const char* gstcheckName = "libgstcheck-1.0.so";
+#else
+    const char* gstcheckName = "libgstcheck-1.0.so.0";
+#endif
+
 #define LIBNAME gstcheck
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstcontroller.c b/src/wrapped/wrappedgstcontroller.c
index a6da1b3d..c2a7cfc5 100644
--- a/src/wrapped/wrappedgstcontroller.c
+++ b/src/wrapped/wrappedgstcontroller.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstcontrollerName = "libgstcontroller-1.0.so.0";
+#ifdef ANDROID
+    const char* gstcontrollerName = "libgstcontroller-1.0.so";
+#else
+    const char* gstcontrollerName = "libgstcontroller-1.0.so.0";
+#endif
+
 #define LIBNAME gstcontroller
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstfft.c b/src/wrapped/wrappedgstfft.c
index 27e07517..ee3a565e 100644
--- a/src/wrapped/wrappedgstfft.c
+++ b/src/wrapped/wrappedgstfft.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstfftName = "libgstfft-1.0.so.0";
+#ifdef ANDROID
+    const char* gstfftName = "libgstfft-1.0.so";
+#else
+    const char* gstfftName = "libgstfft-1.0.so.0";
+#endif
+
 #define LIBNAME gstfft
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstgl.c b/src/wrapped/wrappedgstgl.c
index 9e05326b..fd82eda9 100644
--- a/src/wrapped/wrappedgstgl.c
+++ b/src/wrapped/wrappedgstgl.c
@@ -21,7 +21,12 @@
 #include "fileutils.h"
 #include "gltools.h"
 
-const char* gstglName = "libgstgl-1.0.so.0";
+#ifdef ANDROID
+    const char* gstglName = "libgstgl-1.0.so";
+#else
+    const char* gstglName = "libgstgl-1.0.so.0";
+#endif
+
 #define LIBNAME gstgl
 
 typedef size_t  (*LFv_t)();
diff --git a/src/wrapped/wrappedgstnet.c b/src/wrapped/wrappedgstnet.c
index 68737bde..53c09dc1 100644
--- a/src/wrapped/wrappedgstnet.c
+++ b/src/wrapped/wrappedgstnet.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstnetName = "libgstnet-1.0.so.0";
+#ifdef ANDROID
+    const char* gstnetName = "libgstnet-1.0.so";
+#else
+    const char* gstnetName = "libgstnet-1.0.so.0";
+#endif
+
 #define LIBNAME gstnet
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstpbutils.c b/src/wrapped/wrappedgstpbutils.c
index d3694646..eaa2ee35 100644
--- a/src/wrapped/wrappedgstpbutils.c
+++ b/src/wrapped/wrappedgstpbutils.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstpbutilsName = "libgstpbutils-1.0.so.0";
+#ifdef ANDROID
+    const char* gstpbutilsName = "libgstpbutils-1.0.so";
+#else
+    const char* gstpbutilsName = "libgstpbutils-1.0.so.0";
+#endif
+
 #define LIBNAME gstpbutils
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstreamer.c b/src/wrapped/wrappedgstreamer.c
index cb51b192..9583143c 100644
--- a/src/wrapped/wrappedgstreamer.c
+++ b/src/wrapped/wrappedgstreamer.c
@@ -21,7 +21,11 @@
 #include "gtkclass.h"
 #include "fileutils.h"
 
-const char* gstreamerName = "libgstreamer-1.0.so.0";
+#ifdef ANDROID
+    const char* gstreamerName = "libgstreamer-1.0.so";
+#else
+    const char* gstreamerName = "libgstreamer-1.0.so.0";
+#endif
 #define LIBNAME gstreamer
 
 typedef void    (*vFv_t)();
@@ -1054,16 +1058,29 @@ EXPORT int my_gst_type_find_register(x64emu_t* emu, void* plugin, void* name, ui
     if(box64_nogtk) \
         return -1;
 
-#define CUSTOM_INIT \
-    getMy(lib);     \
-    SetGstObjectID(my->gst_object_get_type());                 \
-    SetGstAllocatorID(my->gst_allocator_get_type());           \
-    SetGstTaskPoolID(my->gst_task_pool_get_type());            \
-    SetGstElementID(my->gst_element_get_type());               \
-    SetGstBinID(my->gst_bin_get_type());                       \
-    SetGstPadID(my->gst_pad_get_type());                       \
-    SetGstURIHandlerID(my->gst_uri_handler_get_type());        \
-    setNeededLibs(lib, 1, "libgtk-3.so.0");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstObjectID(my->gst_object_get_type());                 \
+        SetGstAllocatorID(my->gst_allocator_get_type());           \
+        SetGstTaskPoolID(my->gst_task_pool_get_type());            \
+        SetGstElementID(my->gst_element_get_type());               \
+        SetGstBinID(my->gst_bin_get_type());                       \
+        SetGstPadID(my->gst_pad_get_type());                       \
+        SetGstURIHandlerID(my->gst_uri_handler_get_type());        \
+        setNeededLibs(lib, 1, "libgtk-3.so");
+#else
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstObjectID(my->gst_object_get_type());                 \
+        SetGstAllocatorID(my->gst_allocator_get_type());           \
+        SetGstTaskPoolID(my->gst_task_pool_get_type());            \
+        SetGstElementID(my->gst_element_get_type());               \
+        SetGstBinID(my->gst_bin_get_type());                       \
+        SetGstPadID(my->gst_pad_get_type());                       \
+        SetGstURIHandlerID(my->gst_uri_handler_get_type());        \
+        setNeededLibs(lib, 1, "libgtk-3.so.0");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedgstrtp.c b/src/wrapped/wrappedgstrtp.c
index 8a32f535..ef3fa6af 100644
--- a/src/wrapped/wrappedgstrtp.c
+++ b/src/wrapped/wrappedgstrtp.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstrtpName = "libgstrtp-1.0.so.0";
+#ifdef ANDROID
+    const char* gstrtpName = "libgstrtp-1.0.so";
+#else
+    const char* gstrtpName = "libgstrtp-1.0.so.0";
+#endif
+
 #define LIBNAME gstrtp
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstrtsp.c b/src/wrapped/wrappedgstrtsp.c
index c9afd743..57d45aca 100644
--- a/src/wrapped/wrappedgstrtsp.c
+++ b/src/wrapped/wrappedgstrtsp.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstrtspName = "libgstrtsp-1.0.so.0";
+#ifdef ANDROID
+    const char* gstrtspName = "libgstrtsp-1.0.so";
+#else
+    const char* gstrtspName = "libgstrtsp-1.0.so.0";
+#endif
+
 #define LIBNAME gstrtsp
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstsdp.c b/src/wrapped/wrappedgstsdp.c
index 833f4165..ddda7d1f 100644
--- a/src/wrapped/wrappedgstsdp.c
+++ b/src/wrapped/wrappedgstsdp.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gstsdpName = "libgstsdp-1.0.so.0";
+#ifdef ANDROID
+    const char* gstsdpName = "libgstsdp-1.0.so";
+#else
+    const char* gstsdpName = "libgstsdp-1.0.so.0";
+#endif
+
 #define LIBNAME gstsdp
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgsttag.c b/src/wrapped/wrappedgsttag.c
index a67f4051..f7aad56a 100644
--- a/src/wrapped/wrappedgsttag.c
+++ b/src/wrapped/wrappedgsttag.c
@@ -12,7 +12,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* gsttagName = "libgsttag-1.0.so.0";
+#ifdef ANDROID
+    const char* gsttagName = "libgsttag-1.0.so";
+#else
+    const char* gsttagName = "libgsttag-1.0.so.0";
+#endif
+
 #define LIBNAME gsttag
 
 #define PRE_INIT    \
diff --git a/src/wrapped/wrappedgstvideo.c b/src/wrapped/wrappedgstvideo.c
index eb9bbd16..ef63ce4c 100644
--- a/src/wrapped/wrappedgstvideo.c
+++ b/src/wrapped/wrappedgstvideo.c
@@ -20,7 +20,12 @@
 #include "gtkclass.h"
 #include "fileutils.h"
 
-const char* gstvideoName = "libgstvideo-1.0.so.0";
+#ifdef ANDROID
+    const char* gstvideoName = "libgstvideo-1.0.so";
+#else
+    const char* gstvideoName = "libgstvideo-1.0.so.0";
+#endif
+
 #define LIBNAME gstvideo
 
 typedef size_t  (*LFv_t)();
@@ -41,15 +46,27 @@ typedef size_t  (*LFv_t)();
     if(box64_nogtk) \
         return -1;
 
-#define CUSTOM_INIT \
-    getMy(lib);     \
-    SetGstVideoDecoderID(my->gst_video_decoder_get_type());\
-    SetGstVideoEncoderID(my->gst_video_encoder_get_type());\
-    SetGstVideoSinkID(my->gst_video_sink_get_type());\
-    SetGstVideoAggregatorID(my->gst_video_aggregator_get_type());\
-    SetGstVideoAggregatorPadID(my->gst_video_aggregator_pad_get_type());\
-    SetGstVideoFilterID(my->gst_video_filter_get_type());\
-    setNeededLibs(lib, 1, "libgstreamer-1.0.so.0");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstVideoDecoderID(my->gst_video_decoder_get_type());\
+        SetGstVideoEncoderID(my->gst_video_encoder_get_type());\
+        SetGstVideoSinkID(my->gst_video_sink_get_type());\
+        SetGstVideoAggregatorID(my->gst_video_aggregator_get_type());\
+        SetGstVideoAggregatorPadID(my->gst_video_aggregator_pad_get_type());\
+        SetGstVideoFilterID(my->gst_video_filter_get_type());\
+        setNeededLibs(lib, 1, "libgstreamer-1.0.so");
+#else
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        SetGstVideoDecoderID(my->gst_video_decoder_get_type());\
+        SetGstVideoEncoderID(my->gst_video_encoder_get_type());\
+        SetGstVideoSinkID(my->gst_video_sink_get_type());\
+        SetGstVideoAggregatorID(my->gst_video_aggregator_get_type());\
+        SetGstVideoAggregatorPadID(my->gst_video_aggregator_pad_get_type());\
+        SetGstVideoFilterID(my->gst_video_filter_get_type());\
+        setNeededLibs(lib, 1, "libgstreamer-1.0.so.0");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedgtk3.c b/src/wrapped/wrappedgtk3.c
index 87a7bd7a..cd55ce10 100644
--- a/src/wrapped/wrappedgtk3.c
+++ b/src/wrapped/wrappedgtk3.c
@@ -19,7 +19,12 @@
 #include "myalign.h"
 #include "gtkclass.h"
 
-const char* gtk3Name = "libgtk-3.so.0";
+#ifdef ANDROID
+    const char* gtk3Name = "libgtk-3.so";
+#else
+    const char* gtk3Name = "libgtk-3.so.0";
+#endif
+
 static char* libname = NULL;
 #define LIBNAME gtk3
 
diff --git a/src/wrapped/wrappedkrb5.c b/src/wrapped/wrappedkrb5.c
index abad8c5d..526d6aa5 100644
--- a/src/wrapped/wrappedkrb5.c
+++ b/src/wrapped/wrappedkrb5.c
@@ -16,7 +16,12 @@
 #include "librarian.h"
 #include "callback.h"
 
-const char* krb5Name = "libkrb5.so.3";
+#ifdef ANDROID
+    const char* krb5Name = "libkrb5.so";
+#else
+    const char* krb5Name = "libkrb5.so.3";
+#endif
+
 #define LIBNAME krb5
 
 #define ADDED_FUNCTIONS()           \
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index 0e0acc57..8845f14e 100644
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -1392,37 +1392,132 @@ DATA(__progname_full, sizeof(void))
 GOW(pselect, iFippppp)
 GO(psiginfo, vFpp)
 GO(psignal, vFip)
-//GO(pthread_attr_destroy, 
-//GO(pthread_attr_getdetachstate, 
-//GO(pthread_attr_getinheritsched, 
-//GO(pthread_attr_getschedparam, 
-//GO(pthread_attr_getschedpolicy, 
-//GO(pthread_attr_getscope, 
-//GO(pthread_attr_init, 
-//GO(pthread_attr_setdetachstate, 
-//GO(pthread_attr_setinheritsched, 
-//GO(pthread_attr_setschedparam, 
-//GO(pthread_attr_setschedpolicy, 
-//GO(pthread_attr_setscope, 
-//GO(pthread_condattr_destroy, 
-//GO(pthread_condattr_init, 
-//GO(pthread_cond_broadcast, 
-//GO(pthread_cond_destroy, 
-//GO(pthread_cond_init, 
-//GO(pthread_cond_signal, 
-//GO(pthread_cond_timedwait, 
-//GO(pthread_cond_wait, 
-//GO(pthread_equal, 
-//GO(pthread_exit, 
-//GO(pthread_getschedparam, 
-//GO(pthread_mutex_destroy, 
-//GO(pthread_mutex_init, 
-//GO(pthread_mutex_lock, 
-//GO(pthread_mutex_unlock, 
-//GO(pthread_self, 
-//GO(pthread_setcancelstate, 
-//GO(pthread_setcanceltype, 
-//GO(pthread_setschedparam, 
+GO(__sF, vFip)
+GO(__assert2, vFip)
+
+GOM(pthread_atfork, iFEppp)
+GOM(pthread_attr_destroy, iFEp)
+GOM(pthread_attr_getdetachstate, iFEpp)
+GOM(pthread_attr_getguardsize, iFEpp)
+GOM(pthread_attr_getinheritsched, iFEpp)
+GOM(pthread_attr_getschedparam, iFEpp)
+GOM(pthread_attr_getschedpolicy, iFEpp)
+GOM(pthread_attr_getscope, iFEpp)
+GOM(pthread_attr_getstack, iFEppp)
+GOM(pthread_attr_getstackaddr, iFEpp)
+GOM(pthread_attr_getstacksize, iFEpp)
+GOM(pthread_attr_init, iFEp)
+GOM(pthread_attr_setaffinity_np, iFEpLp)
+GOM(pthread_attr_setdetachstate, iFEpi)
+GOM(pthread_attr_setguardsize, iFEpL)
+GOM(pthread_attr_setinheritsched, iFEpi)
+GOM(pthread_attr_setschedparam, iFEpp)
+GOM(pthread_attr_setschedpolicy, iFEpi)
+GOM(pthread_attr_setscope, iFEpi)
+GOM(pthread_attr_setstackaddr, iFEpp)
+GOM(pthread_attr_setstack, iFEppL)
+GOM(pthread_attr_setstacksize, iFEpL)
+GOM(pthread_barrierattr_destroy, iFEp)
+GOM(pthread_barrierattr_getpshared, iFEpp)
+GOM(pthread_barrierattr_init, iFEp)
+GOM(pthread_barrierattr_setpshared, iFEpi)
+GO(pthread_barrier_destroy, iFp)
+GOM(pthread_barrier_init, iFEppu)
+GO(pthread_barrier_wait, iFp)
+GO(pthread_cancel, iFL)
+GOM(pthread_condattr_destroy, iFEp)
+GOM(pthread_condattr_getclock, iFEpp)
+GOM(pthread_condattr_getpshared, iFEpp)
+GOM(pthread_condattr_init, iFEp)
+GOM(pthread_condattr_setclock, iFEpi)
+GOM(pthread_condattr_setpshared, iFEpi)
+GOM(pthread_cond_broadcast, iFEp)
+GOM(pthread_cond_destroy, iFEp)
+GOM(pthread_cond_init, iFEpp)
+GO(pthread_cond_signal, iFp)
+GOM(pthread_cond_timedwait, iFEppp)
+GOM(pthread_cond_wait, iFEpp)
+GOM(pthread_create, iFEpppp)
+GOM(pthread_cond_clockwait, iFEppip)
+GO(pthread_detach, iFL)
+GO(pthread_equal, iFLL)
+GO(pthread_exit, vFp)
+GOM(pthread_getaffinity_np, iFEpLp)
+GOM(pthread_getattr_np, iFELp)
+GOM(pthread_getattr_default_np, iFEp)
+GOM(pthread_setattr_default_np, iFEp)
+GO(pthread_getcpuclockid, iFLp)
+GO(pthread_getschedparam, iFLpp)
+GO(pthread_getspecific, pFL)
+GO(pthread_getname_np, iFppL)
+GO(pthread_join, iFLp)
+GOM(pthread_key_create, iFEpp)
+GO(pthread_key_delete, iFL)
+GO2(pthread_kill@GLIBC_2.2.5, iFEpi, my_pthread_kill_old)
+GOM(pthread_kill, iFEpi)
+GO(pthread_kill_other_threads_np, vFv)
+GOM(pthread_mutexattr_destroy, iFEp)
+GOM(pthread_mutexattr_getkind_np, iFEpp)
+GOM(pthread_mutexattr_getprotocol, iFEpp)
+GOM(pthread_mutexattr_getrobust, iFEpp)
+GOM(pthread_mutexattr_gettype, iFEpp)
+GOM(pthread_mutexattr_init, iFEp)
+GOM(pthread_mutexattr_setkind_np, iFEpi)
+GOM(pthread_mutexattr_setprotocol, iFEpi)
+GOM(pthread_mutexattr_setpshared, iFEpi)
+GOM(pthread_mutexattr_setrobust, iFEpi)
+GOM(pthread_mutexattr_settype, iFEpi)
+GO(pthread_mutex_consistent, iFp)
+GO(pthread_mutex_destroy, iFp)
+// phtread_mutex_t is 40 bytes on x86_64, but 48bytes on ARM64
+GOM(pthread_mutex_init, iFpp)
+GO(pthread_mutex_lock, iFp)
+GO(pthread_mutex_timedlock, iFpp)
+GO(pthread_mutex_trylock, iFp)
+GO(pthread_mutex_unlock, iFp)
+GOM(pthread_once, iFEpp)
+GO(pthread_rwlockattr_destroy, vFp)
+GO(pthread_rwlockattr_getkind_np, iFpp)
+GO(pthread_rwlockattr_init, iFp)
+GO(pthread_rwlockattr_setkind_np, iFpi)
+GO(pthread_rwlock_destroy, iFp)
+GO(pthread_rwlock_init, iFpp)
+GO(pthread_rwlock_rdlock, iFp)
+GO(pthread_rwlock_tryrdlock, iFp)
+GO(pthread_rwlock_trywrlock, iFp)
+GO(pthread_rwlock_unlock, iFp)
+GO(pthread_rwlock_wrlock, iFp)
+GO(pthread_self, LFv)
+GOM(pthread_setaffinity_np, iFEpLp)
+GO(pthread_setcancelstate, iFip)
+GO(pthread_setcanceltype, iFip)
+GO(pthread_setconcurrency, iFi)
+GO(pthread_setname_np, iFpp)
+GO(pthread_setschedparam, iFLip)
+GO(pthread_setschedprio, iFpi)
+GO(pthread_setspecific, iFLp)
+GO(pthread_sigmask, iFipp)
+GO(pthread_spin_destroy, iFp)
+GO(pthread_spin_init, iFpi)
+GO(pthread_spin_lock, iFp)
+GO(pthread_spin_trylock, iFp)
+GO(pthread_spin_unlock, iFp)
+GO(pthread_testcancel, vFv)
+GO(pthread_timedjoin_np, iFppp)
+GO(pthread_tryjoin_np, iFpp)
+GO(pthread_yield, iFv)
+GO(sem_close, iFp)
+GO(sem_clockwait, iFppp)
+GO(sem_destroy, iFp)
+GO(sem_getvalue, iFpp)
+GO(sem_init, iFpiu)
+GO(sem_open, pFpOM)
+GO(sem_post, iFp)
+GO(sem_timedwait, iFpp)
+GO(sem_trywait, iFp)
+GO(sem_unlink, iFp)
+GO(sem_wait, iFp)
+
 GOM(ptrace, lFEuipp)
 GO(ptsname, pFi)
 GOW(ptsname_r, iFipL)
diff --git a/src/wrapped/wrappedlibsndfile.c b/src/wrapped/wrappedlibsndfile.c
index bbb11b56..af3bad5a 100644
--- a/src/wrapped/wrappedlibsndfile.c
+++ b/src/wrapped/wrappedlibsndfile.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libsndfileName = "libsndfile.so.1";
+#ifdef ANDROID
+    const char* libsndfileName = "libsndfile.so";
+#else
+    const char* libsndfileName = "libsndfile.so.1";
+#endif
+
 #define LIBNAME libsndfile
 
 #define ADDED_FUNCTIONS()           \
diff --git a/src/wrapped/wrappedlibusb1.c b/src/wrapped/wrappedlibusb1.c
index c5fea90b..38dd589f 100644
--- a/src/wrapped/wrappedlibusb1.c
+++ b/src/wrapped/wrappedlibusb1.c
@@ -18,7 +18,12 @@
 #include "emu/x64emu_private.h"
 #include "myalign.h"
 
-const char* libusb1Name = "libusb-1.0.so.0";
+#ifdef ANDROID
+    const char* libusb1Name = "libusb-1.0.so";
+#else
+    const char* libusb1Name = "libusb-1.0.so.0";
+#endif
+
 #define LIBNAME libusb1
 
 #define ADDED_FUNCTIONS()           \
diff --git a/src/wrapped/wrappedlibvorbis.c b/src/wrapped/wrappedlibvorbis.c
index 74495820..0807e5bf 100644
--- a/src/wrapped/wrappedlibvorbis.c
+++ b/src/wrapped/wrappedlibvorbis.c
@@ -17,8 +17,12 @@
 #include "librarian.h"
 #include "myalign.h"
 
+#ifdef ANDROID
+	const char* libvorbisName = "libvorbis.so";
+#else
+	const char* libvorbisName = "libvorbis.so.0";
+#endif
 
-const char* libvorbisName = "libvorbis.so.0";
 #define LIBNAME libvorbis
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibx11.c b/src/wrapped/wrappedlibx11.c
index 0ee5d083..70b8cb82 100644
--- a/src/wrapped/wrappedlibx11.c
+++ b/src/wrapped/wrappedlibx11.c
@@ -17,7 +17,12 @@
 #include "emu/x64emu_private.h"
 #include "myalign.h"
 
-const char* libx11Name = "libX11.so.6";
+#ifdef ANDROID
+    const char* libx11Name = "libX11.so";
+#else
+    const char* libx11Name = "libX11.so.6";
+#endif
+
 #define LIBNAME libx11
 
 typedef int (*XErrorHandler)(void *, void *);
diff --git a/src/wrapped/wrappedlibxau.c b/src/wrapped/wrappedlibxau.c
index 7537eb09..b03e75eb 100644
--- a/src/wrapped/wrappedlibxau.c
+++ b/src/wrapped/wrappedlibxau.c
@@ -11,7 +11,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxauName = "libXau.so.6";
+#ifdef ANDROID
+	const char* libxauName = "libXau.so";
+#else
+	const char* libxauName = "libXau.so.6";
+#endif
+
 #define LIBNAME libxau
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcb.c b/src/wrapped/wrappedlibxcb.c
index d3798d45..37db2eaa 100644
--- a/src/wrapped/wrappedlibxcb.c
+++ b/src/wrapped/wrappedlibxcb.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbName = "libxcb.so.1";
+#ifdef ANDROID
+	const char* libxcbName = "libxcb.so";
+#else
+	const char* libxcbName = "libxcb.so.1";
+#endif
+
 #define LIBNAME libxcb
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbdri3.c b/src/wrapped/wrappedlibxcbdri3.c
index a0a85426..b351dbef 100644
--- a/src/wrapped/wrappedlibxcbdri3.c
+++ b/src/wrapped/wrappedlibxcbdri3.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbdri3Name = "libxcb-dri3.so.0";
+#ifdef ANDROID
+	const char* libxcbdri3Name = "libxcb-dri3.so";
+#else
+	const char* libxcbdri3Name = "libxcb-dri3.so.0";
+#endif
+
 #define LIBNAME libxcbdri3
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbglx.c b/src/wrapped/wrappedlibxcbglx.c
index 50668261..806c58df 100644
--- a/src/wrapped/wrappedlibxcbglx.c
+++ b/src/wrapped/wrappedlibxcbglx.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbglxName = "libxcb-glx.so.0";
+#ifdef ANDROID
+	const char* libxcbglxName = "libxcb-glx.so";
+#else
+	const char* libxcbglxName = "libxcb-glx.so.0";
+#endif
+
 #define LIBNAME libxcbglx
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbicccm.c b/src/wrapped/wrappedlibxcbicccm.c
index 5ff0c459..29c9b55e 100644
--- a/src/wrapped/wrappedlibxcbicccm.c
+++ b/src/wrapped/wrappedlibxcbicccm.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbicccmName = "libxcb-icccm.so.4";
+#ifdef ANDROID
+	const char* libxcbicccmName = "libxcb-icccm.so";
+#else
+	const char* libxcbicccmName = "libxcb-icccm.so.4";
+#endif
+
 #define LIBNAME libxcbicccm
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbimage.c b/src/wrapped/wrappedlibxcbimage.c
index 906e5ebc..6ef51ed7 100644
--- a/src/wrapped/wrappedlibxcbimage.c
+++ b/src/wrapped/wrappedlibxcbimage.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbimageName = "libxcb-image.so.0";
+#ifdef ANDROID
+	const char* libxcbimageName = "libxcb-image.so";
+#else
+	const char* libxcbimageName = "libxcb-image.so.0";
+#endif
+
 #define LIBNAME libxcbimage
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbkeysyms.c b/src/wrapped/wrappedlibxcbkeysyms.c
index 909c9045..72c0022c 100644
--- a/src/wrapped/wrappedlibxcbkeysyms.c
+++ b/src/wrapped/wrappedlibxcbkeysyms.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbkeysymsName = "libxcb-keysyms.so.1";
+#ifdef ANDROID
+	const char* libxcbkeysymsName = "libxcb-keysyms.so";
+#else
+	const char* libxcbkeysymsName = "libxcb-keysyms.so.1";
+#endif
+
 #define LIBNAME libxcbkeysyms
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbpresent.c b/src/wrapped/wrappedlibxcbpresent.c
index f8293d5b..4f63285a 100644
--- a/src/wrapped/wrappedlibxcbpresent.c
+++ b/src/wrapped/wrappedlibxcbpresent.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbpresentName = "libxcb-present.so.0";
+#ifdef ANDROID
+	const char* libxcbpresentName = "libxcb-present.so";
+#else
+	const char* libxcbpresentName = "libxcb-present.so.0";
+#endif
+
 #define LIBNAME libxcbpresent
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbrandr.c b/src/wrapped/wrappedlibxcbrandr.c
index 0b4387ef..d4c8cbb8 100644
--- a/src/wrapped/wrappedlibxcbrandr.c
+++ b/src/wrapped/wrappedlibxcbrandr.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbrandrName = "libxcb-randr.so.0";
+#ifdef ANDROID
+	const char* libxcbrandrName = "libxcb-randr.so";
+#else
+	const char* libxcbrandrName = "libxcb-randr.so.0";
+#endif
+
 #define LIBNAME libxcbrandr
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbrender.c b/src/wrapped/wrappedlibxcbrender.c
index 545fbf43..5deeed1a 100644
--- a/src/wrapped/wrappedlibxcbrender.c
+++ b/src/wrapped/wrappedlibxcbrender.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbrenderName = "libxcb-render.so.0";
+#ifdef ANDROID
+	const char* libxcbrenderName = "libxcb-render.so";
+#else
+	const char* libxcbrenderName = "libxcb-render.so.0";
+#endif
+
 #define LIBNAME libxcbrender
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbrenderutil.c b/src/wrapped/wrappedlibxcbrenderutil.c
index a95801be..6a1f7d89 100644
--- a/src/wrapped/wrappedlibxcbrenderutil.c
+++ b/src/wrapped/wrappedlibxcbrenderutil.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbrenderutilName = "libxcb-render-util.so.0";
+#ifdef ANDROID
+	const char* libxcbrenderutilName = "libxcb-render-util.so";
+#else
+	const char* libxcbrenderutilName = "libxcb-render-util.so.0";
+#endif
+
 #define LIBNAME libxcbrenderutil
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbshape.c b/src/wrapped/wrappedlibxcbshape.c
index 3dc9c692..f1eb4e87 100644
--- a/src/wrapped/wrappedlibxcbshape.c
+++ b/src/wrapped/wrappedlibxcbshape.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbshapeName = "libxcb-shape.so.0";
+#ifdef ANDROID
+	const char* libxcbshapeName = "libxcb-shape.so";
+#else
+	const char* libxcbshapeName = "libxcb-shape.so.0";
+#endif
+
 #define LIBNAME libxcbshape
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbshm.c b/src/wrapped/wrappedlibxcbshm.c
index 218304c2..886d2aa1 100644
--- a/src/wrapped/wrappedlibxcbshm.c
+++ b/src/wrapped/wrappedlibxcbshm.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbshmName = "libxcb-shm.so.0";
+#ifdef ANDROID
+	const char* libxcbshmName = "libxcb-shm.so";
+#else
+	const char* libxcbshmName = "libxcb-shm.so.0";
+#endif
+
 #define LIBNAME libxcbshm
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbsync.c b/src/wrapped/wrappedlibxcbsync.c
index ee470e8a..81e46870 100644
--- a/src/wrapped/wrappedlibxcbsync.c
+++ b/src/wrapped/wrappedlibxcbsync.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbsyncName = "libxcb-sync.so.1";
+#ifdef ANDROID
+	const char* libxcbsyncName = "libxcb-sync.so";
+#else
+	const char* libxcbsyncName = "libxcb-sync.so.1";
+#endif
+
 #define LIBNAME libxcbsync
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbutil.c b/src/wrapped/wrappedlibxcbutil.c
index b2588589..943d8b95 100644
--- a/src/wrapped/wrappedlibxcbutil.c
+++ b/src/wrapped/wrappedlibxcbutil.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbutilName = "libxcb-util.so.1";
+#ifdef ANDROID
+	const char* libxcbutilName = "libxcb-util.so";
+#else
+	const char* libxcbutilName = "libxcb-util.so.1";
+#endif
+
 #define LIBNAME libxcbutil
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbxfixes.c b/src/wrapped/wrappedlibxcbxfixes.c
index e41c3b8b..ac950783 100644
--- a/src/wrapped/wrappedlibxcbxfixes.c
+++ b/src/wrapped/wrappedlibxcbxfixes.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbxfixesName = "libxcb-xfixes.so.0";
+#ifdef ANDROID
+	const char* libxcbxfixesName = "libxcb-xfixes.so";
+#else
+	const char* libxcbxfixesName = "libxcb-xfixes.so.0";
+#endif
+
 #define LIBNAME libxcbxfixes
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbxinerama.c b/src/wrapped/wrappedlibxcbxinerama.c
index c129e6b0..856d7e25 100644
--- a/src/wrapped/wrappedlibxcbxinerama.c
+++ b/src/wrapped/wrappedlibxcbxinerama.c
@@ -17,7 +17,11 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbxineramaName = "libxcb-xinerama.so.0";
+#ifdef ANDROID
+	const char* libxcbxineramaName = "libxcb-xinerama.so";
+#else
+	const char* libxcbxineramaName = "libxcb-xinerama.so.0";
+#endif
 #define LIBNAME libxcbxinerama
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbxkb.c b/src/wrapped/wrappedlibxcbxkb.c
index 0f0f9836..cc7672b0 100644
--- a/src/wrapped/wrappedlibxcbxkb.c
+++ b/src/wrapped/wrappedlibxcbxkb.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbxkbName = "libxcb-xkb.so.1";
+#ifdef ANDROID
+	const char* libxcbxkbName = "libxcb-xkb.so";
+#else
+	const char* libxcbxkbName = "libxcb-xkb.so.1";
+#endif
+
 #define LIBNAME libxcbxkb
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcbxtest.c b/src/wrapped/wrappedlibxcbxtest.c
index b08fb352..211efb4b 100644
--- a/src/wrapped/wrappedlibxcbxtest.c
+++ b/src/wrapped/wrappedlibxcbxtest.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxcbxtestName = "libxcb-xtest.so.0";
+#ifdef ANDROID
+	const char* libxcbxtestName = "libxcb-xtest.so";
+#else
+	const char* libxcbxtestName = "libxcb-xtest.so.0";
+#endif
+
 #define LIBNAME libxcbxtest
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcomposite.c b/src/wrapped/wrappedlibxcomposite.c
index bb0394ba..0521f933 100644
--- a/src/wrapped/wrappedlibxcomposite.c
+++ b/src/wrapped/wrappedlibxcomposite.c
@@ -12,7 +12,12 @@
 #include "x64emu.h"
 #include "debug.h"
 
-const char* libxcompositeName = "libXcomposite.so.1";
+#ifdef ANDROID
+	const char* libxcompositeName = "libXcomposite.so";
+#else
+	const char* libxcompositeName = "libXcomposite.so.1";
+#endif
+
 #define LIBNAME libxcomposite
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxcursor.c b/src/wrapped/wrappedlibxcursor.c
index 749d2a07..be87d56b 100644
--- a/src/wrapped/wrappedlibxcursor.c
+++ b/src/wrapped/wrappedlibxcursor.c
@@ -11,7 +11,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxcursorName = "libXcursor.so.1";
+#ifdef ANDROID
+	const char* libxcursorName = "libXcursor.so";
+#else
+	const char* libxcursorName = "libXcursor.so.1";
+#endif
+
 #define LIBNAME libxcursor
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxdamage.c b/src/wrapped/wrappedlibxdamage.c
index 6f10e7f0..8637f2a6 100644
--- a/src/wrapped/wrappedlibxdamage.c
+++ b/src/wrapped/wrappedlibxdamage.c
@@ -12,7 +12,12 @@
 #include "x64emu.h"
 #include "debug.h"
 
-const char* libxdamageName = "libXdamage.so.1";
+#ifdef ANDROID
+	const char* libxdamageName = "libXdamage.so";
+#else
+	const char* libxdamageName = "libXdamage.so.1";
+#endif
+
 #define LIBNAME libxdamage
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxdmcp.c b/src/wrapped/wrappedlibxdmcp.c
index c320caa3..39a47d0a 100644
--- a/src/wrapped/wrappedlibxdmcp.c
+++ b/src/wrapped/wrappedlibxdmcp.c
@@ -11,7 +11,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxdmcpName = "libXdmcp.so.6";
+#ifdef ANDROID
+	const char* libxdmcpName = "libXdmcp.so";
+#else
+	const char* libxdmcpName = "libXdmcp.so.6";
+#endif
+
 #define LIBNAME libxdmcp
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxext.c b/src/wrapped/wrappedlibxext.c
index 245b65ce..06088a83 100644
--- a/src/wrapped/wrappedlibxext.c
+++ b/src/wrapped/wrappedlibxext.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxextName = "libXext.so.6";
+#ifdef ANDROID
+    const char* libxextName = "libXext.so";
+#else
+    const char* libxextName = "libXext.so.6";
+#endif
+
 #define LIBNAME libxext
 
 typedef struct _XImage XImage;
@@ -385,14 +390,25 @@ EXPORT void* my_XextAddDisplay(x64emu_t* emu, void* extinfo, void* dpy, void* ex
     return ret;
 }
 
-#define CUSTOM_INIT                 \
-    getMy(lib);                     \
-    setNeededLibs(lib, 5,           \
-        "libX11.so.6",              \
-        "libxcb.so.1",              \
-        "libXau.so.6",              \
-        "libdl.so.2",               \
-        "libXdmcp.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT                 \
+        getMy(lib);                     \
+        setNeededLibs(lib, 5,           \
+            "libX11.so",              \
+            "libxcb.so",              \
+            "libXau.so",              \
+            "libdl.so",               \
+            "libXdmcp.so");
+#else
+    #define CUSTOM_INIT                 \
+        getMy(lib);                     \
+        setNeededLibs(lib, 5,           \
+            "libX11.so.6",              \
+            "libxcb.so.1",              \
+            "libXau.so.6",              \
+            "libdl.so.2",               \
+            "libXdmcp.so.6");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedlibxfixes.c b/src/wrapped/wrappedlibxfixes.c
index 6ee42f8d..90dbecc0 100644
--- a/src/wrapped/wrappedlibxfixes.c
+++ b/src/wrapped/wrappedlibxfixes.c
@@ -11,15 +11,29 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxfixesName = "libXfixes.so.3";
+#ifdef ANDROID
+    const char* libxfixesName = "libXfixes.so";
+#else
+    const char* libxfixesName = "libXfixes.so.3";
+#endif
+
 #define LIBNAME libxfixes
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 4,           \
-        "libX11.so.6",              \
-        "libxcb.so.1",              \
-        "libXau.so.6",              \
-        "libXdmcp.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 4,           \
+            "libX11.so",              \
+            "libxcb.so",              \
+            "libXau.so",              \
+            "libXdmcp.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 4,           \
+            "libX11.so.6",              \
+            "libxcb.so.1",              \
+            "libXau.so.6",              \
+            "libXdmcp.so.6");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibxft.c b/src/wrapped/wrappedlibxft.c
index b779f938..175b9872 100644
--- a/src/wrapped/wrappedlibxft.c
+++ b/src/wrapped/wrappedlibxft.c
@@ -11,15 +11,29 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxftName = "libXft.so.2";
+#ifdef ANDROID
+    const char* libxftName = "libXft.so";
+#else
+    const char* libxftName = "libXft.so.2";
+#endif
+
 #define LIBNAME libxft
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 4,           \
-        "libX11.so.6",              \
-        "libfontconfig.so.1",       \
-        "libXrender.so.1",          \
-        "libfreetype.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 4,           \
+            "libX11.so",              \
+            "libfontconfig.so",       \
+            "libXrender.so",          \
+            "libfreetype.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 4,           \
+            "libX11.so.6",              \
+            "libfontconfig.so.1",       \
+            "libXrender.so.1",          \
+            "libfreetype.so.6");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibxi.c b/src/wrapped/wrappedlibxi.c
index 0d2d0653..d2d69be8 100644
--- a/src/wrapped/wrappedlibxi.c
+++ b/src/wrapped/wrappedlibxi.c
@@ -11,11 +11,21 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxiName = "libXi.so.6";
+#ifdef ANDROID
+    const char* libxiName = "libXi.so";
+#else
+    const char* libxiName = "libXi.so.6";
+#endif
+
 #define LIBNAME libxi
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibxmu.c b/src/wrapped/wrappedlibxmu.c
index 225f682c..16617cbc 100644
--- a/src/wrapped/wrappedlibxmu.c
+++ b/src/wrapped/wrappedlibxmu.c
@@ -11,11 +11,21 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxmuName = "libXmu.so.6";
+#ifdef ANDROID
+    const char* libxmuName = "libXmu.so";
+#else
+    const char* libxmuName = "libXmu.so.6";
+#endif
+
 #define LIBNAME libxmu
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibxpm.c b/src/wrapped/wrappedlibxpm.c
index b978082c..c4abc7f0 100644
--- a/src/wrapped/wrappedlibxpm.c
+++ b/src/wrapped/wrappedlibxpm.c
@@ -11,10 +11,20 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxpmName = "libXpm.so.4";
+#ifdef ANDROID
+    const char* libxpmName = "libXpm.so";
+#else
+    const char* libxpmName = "libXpm.so.4";
+#endif
+
 #define LIBNAME libxpm
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #include "wrappedlib_init.h"
\ No newline at end of file
diff --git a/src/wrapped/wrappedlibxpresent.c b/src/wrapped/wrappedlibxpresent.c
index c5d13fd5..2a5ec87d 100644
--- a/src/wrapped/wrappedlibxpresent.c
+++ b/src/wrapped/wrappedlibxpresent.c
@@ -12,7 +12,12 @@
 #include "x64emu.h"
 #include "debug.h"
 
-const char* libxpresentName = "libXpresent.so.1";
+#ifdef ANDROID
+	const char* libxpresentName = "libXpresent.so";
+#else
+	const char* libxpresentName = "libXpresent.so.1";
+#endif
+
 #define LIBNAME libxpresent
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxrandr.c b/src/wrapped/wrappedlibxrandr.c
index b74cca04..9303775d 100644
--- a/src/wrapped/wrappedlibxrandr.c
+++ b/src/wrapped/wrappedlibxrandr.c
@@ -17,13 +17,26 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxrandrName = "libXrandr.so.2";
+#ifdef ANDROID
+    const char* libxrandrName = "libXrandr.so";
+#else
+    const char* libxrandrName = "libXrandr.so.2";
+#endif
+
 #define LIBNAME libxrandr
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 3,           \
-        "libX11.so.6",              \
-        "libXext.so.6",             \
-        "libXrender.so.1");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 3,           \
+            "libX11.so",              \
+            "libXext.so",             \
+            "libXrender.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 3,           \
+            "libX11.so.6",              \
+            "libXext.so.6",             \
+            "libXrender.so.1");
+#endif
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxrender.c b/src/wrapped/wrappedlibxrender.c
index ff2c218f..73fd2662 100644
--- a/src/wrapped/wrappedlibxrender.c
+++ b/src/wrapped/wrappedlibxrender.c
@@ -11,15 +11,29 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxrenderName = "libXrender.so.1";
+#ifdef ANDROID
+    const char* libxrenderName = "libXrender.so";
+#else
+    const char* libxrenderName = "libXrender.so.1";
+#endif
+
 #define LIBNAME libxrender
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 4,           \
-        "libX11.so.6",              \
-        "libxcb.so.1",              \
-        "libXau.so.6",              \
-        "libXdmcp.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 4,           \
+            "libX11.so",              \
+            "libxcb.so",              \
+            "libXau.so",              \
+            "libXdmcp.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 4,           \
+            "libX11.so.6",              \
+            "libxcb.so.1",              \
+            "libXau.so.6",              \
+            "libXdmcp.so.6");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedlibxss.c b/src/wrapped/wrappedlibxss.c
index 00c00b90..34c16828 100644
--- a/src/wrapped/wrappedlibxss.c
+++ b/src/wrapped/wrappedlibxss.c
@@ -11,10 +11,20 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* libxssName = "libXss.so.1";
+#ifdef ANDROID
+    const char* libxssName = "libXss.so";
+#else
+    const char* libxssName = "libXss.so.1";
+#endif
+
 #define LIBNAME libxss
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibxt.c b/src/wrapped/wrappedlibxt.c
index 6a7180fd..f221f2a0 100644
--- a/src/wrapped/wrappedlibxt.c
+++ b/src/wrapped/wrappedlibxt.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxtName = "libXt.so.6";
+#ifdef ANDROID
+    const char* libxtName = "libXt.so";
+#else
+    const char* libxtName = "libXt.so.6";
+#endif
+
 #define LIBNAME libxt
 
 #include "generated/wrappedlibxttypes.h"
@@ -122,9 +127,15 @@ EXPORT long my_XtAppAddInput(x64emu_t* emu, void* context, int source, void* con
     return my->XtAppAddInput(context, source, cond, findInputCallbackFct(proc), data);
 }
 
-#define CUSTOM_INIT \
-    getMy(lib);   \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        getMy(lib);   \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        getMy(lib);   \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedlibxtst.c b/src/wrapped/wrappedlibxtst.c
index 4ae3a68b..4977f938 100644
--- a/src/wrapped/wrappedlibxtst.c
+++ b/src/wrapped/wrappedlibxtst.c
@@ -17,7 +17,12 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxtstName = "libXtst.so.6";
+#ifdef ANDROID
+    const char* libxtstName = "libXtst.so";
+#else
+    const char* libxtstName = "libXtst.so.6";
+#endif
+
 #define LIBNAME libxtst
 
 #include "generated/wrappedlibxtsttypes.h"
@@ -66,9 +71,15 @@ EXPORT int my_XRecordEnableContext(x64emu_t* emu, void* display, void* context,
     return my->XRecordEnableContext(display, context, find_XRecordInterceptProc_Fct(cb), closure);
 }
 
-#define CUSTOM_INIT \
-    getMy(lib);     \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        getMy(lib);     \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #define CUSTOM_FINI \
     freeMy();
diff --git a/src/wrapped/wrappedlibxxf86vm.c b/src/wrapped/wrappedlibxxf86vm.c
index 3f24e95f..d6e7371e 100644
--- a/src/wrapped/wrappedlibxxf86vm.c
+++ b/src/wrapped/wrappedlibxxf86vm.c
@@ -17,11 +17,20 @@
 #include "box64context.h"
 #include "emu/x64emu_private.h"
 
-const char* libxxf86vmName = "libXxf86vm.so.1";
-#define LIBNAME libxxf86vm
+#ifdef ANDROID
+    const char* libxxf86vmName = "libXxf86vm.so";
+#else
+    const char* libxxf86vmName = "libXxf86vm.so.1";
+#endif
 
+#define LIBNAME libxxf86vm
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #include "wrappedlib_init.h"
diff --git a/src/wrapped/wrappedlibz.c b/src/wrapped/wrappedlibz.c
index 4613c47b..39468d47 100644
--- a/src/wrapped/wrappedlibz.c
+++ b/src/wrapped/wrappedlibz.c
@@ -15,7 +15,12 @@
 #include "emu/x64emu_private.h"
 #include "box64context.h"
 
-const char* libzName = "libz.so.1";
+#ifdef ANDROID
+    const char* libzName = "libz.so";
+#else
+    const char* libzName = "libz.so.1";
+#endif
+
 #define LIBNAME libz
 
 #include "generated/wrappedlibztypes.h"
diff --git a/src/wrapped/wrappedpulse.c b/src/wrapped/wrappedpulse.c
index f5ec5d43..cfeebecb 100644
--- a/src/wrapped/wrappedpulse.c
+++ b/src/wrapped/wrappedpulse.c
@@ -17,7 +17,12 @@
 #include "librarian.h"
 #include "myalign.h"
 
-const char* pulseName = "libpulse.so.0";
+#ifdef ANDROID
+    const char* pulseName = "libpulse.so";
+#else
+    const char* pulseName = "libpulse.so.0";
+#endif
+
 #define LIBNAME pulse
 
 // TODO: check my_pa_proplist_setf (not using generated/...)
diff --git a/src/wrapped/wrappedpulsesimple.c b/src/wrapped/wrappedpulsesimple.c
index 1fd5681b..c0685051 100644
--- a/src/wrapped/wrappedpulsesimple.c
+++ b/src/wrapped/wrappedpulsesimple.c
@@ -17,15 +17,25 @@
 #include "librarian.h"
 #include "myalign.h"
 
-const char* pulsesimpleName = "libpulse-simple.so.0";
+#ifdef ANDROID
+    const char* pulsesimpleName = "libpulse-simple.so";
+#else
+    const char* pulsesimpleName = "libpulse-simple.so.0";
+#endif
+
 #define LIBNAME pulsesimple
 
 #define PRE_INIT        \
     if(box64_nopulse)   \
         return -1;
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 1, "libpulse.so.0");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 1, "libpulse.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 1, "libpulse.so.0");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedvorbisfile.c b/src/wrapped/wrappedvorbisfile.c
index 411a3ee3..af912660 100644
--- a/src/wrapped/wrappedvorbisfile.c
+++ b/src/wrapped/wrappedvorbisfile.c
@@ -18,7 +18,12 @@
 #include "myalign.h"
 #include "bridge.h"
 
-const char* vorbisfileName = "libvorbisfile.so.3";
+#ifdef ANDROID
+    const char* vorbisfileName = "libvorbisfile.so";
+#else
+    const char* vorbisfileName = "libvorbisfile.so.3";
+#endif
+
 #define LIBNAME vorbisfile
 
 typedef struct {
diff --git a/src/wrapped/wrappedxinerama.c b/src/wrapped/wrappedxinerama.c
index fed2403d..eeebec45 100644
--- a/src/wrapped/wrappedxinerama.c
+++ b/src/wrapped/wrappedxinerama.c
@@ -11,11 +11,21 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* xineramaName = "libXinerama.so.1";
+#ifdef ANDROID
+    const char* xineramaName = "libXinerama.so";
+#else
+    const char* xineramaName = "libXinerama.so.1";
+#endif
+
 #define LIBNAME xinerama
 
-#define CUSTOM_INIT \
-    setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#ifdef ANDROID
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so", "libXext.so");
+#else
+    #define CUSTOM_INIT \
+        setNeededLibs(lib, 2, "libX11.so.6", "libXext.so.6");
+#endif
 
 #include "wrappedlib_init.h"
 
diff --git a/src/wrapped/wrappedxshmfence.c b/src/wrapped/wrappedxshmfence.c
index 64613bfe..e6f83b84 100644
--- a/src/wrapped/wrappedxshmfence.c
+++ b/src/wrapped/wrappedxshmfence.c
@@ -11,7 +11,12 @@
 #include "librarian/library_private.h"
 #include "x64emu.h"
 
-const char* xshmfenceName = "libxshmfence.so.1";
+#ifdef ANDROID
+	const char* xshmfenceName = "libxshmfence.so";
+#else
+	const char* xshmfenceName = "libxshmfence.so.1";
+#endif
+
 #define LIBNAME xshmfence
 
 #include "wrappedlib_init.h"