1
0
forked from firka/firka

android: support uncompressed libs

This commit is contained in:
2025-08-11 19:58:04 +02:00
parent 91f84a49b3
commit 4e0acd2147

View File

@@ -25,6 +25,8 @@ class AppMain : Application() {
override fun onCreate() {
super.onCreate()
var useUncompressedLibs = false
val abi = Build.SUPPORTED_ABIS[0]
val apks = File(applicationInfo.nativeLibraryDir, "../..").absoluteFile
@@ -42,15 +44,24 @@ class AppMain : Application() {
while (entries.hasMoreElements()) {
val entry = entries.nextElement()
entry.name.endsWith("$abi/index.so")
zip.close()
nativesApkN = ZipFile(apk)
break
if (entry.name.endsWith("$abi/index.so")) {
zip.close()
nativesApkN = ZipFile(apk)
break
}
if (entry.name.endsWith("$abi/libflutter.so")) {
useUncompressedLibs = true
break
}
}
zip.close()
}
if (useUncompressedLibs) {
return;
}
if (nativesApkN == null) {
throw Exception("Can't find native libraries")
}