Comments (5)
from xamarin-android.
from xamarin-android.
So I think I know what is causing the issue
This is the contents of the apks file which google will generate for a specific device.
This is with negate set to false
extracting: foo/toc.pb
extracting: foo/asset-slices/assetpack1-astc.apk
extracting: foo/asset-slices/assetpack1-dxt1.apk
extracting: foo/asset-slices/assetpack1-etc1_rgb8.apk
extracting: foo/asset-slices/assetpack1-master.apk
extracting: foo/asset-slices/assetpack1-paletted.apk
extracting: foo/splits/base-arm64_v8a.apk
extracting: foo/splits/base-arm64_v8a_2.apk
extracting: foo/splits/base-armeabi_v7a.apk
extracting: foo/splits/base-armeabi_v7a_2.apk
extracting: foo/splits/base-master.apk
extracting: foo/splits/base-master_2.apk
extracting: foo/splits/base-master_3.apk
extracting: foo/splits/base-x86.apk
extracting: foo/splits/base-x86_2.apk
extracting: foo/splits/base-x86_64.apk
extracting: foo/splits/base-x86_64_2.apk
This is with it set to true
extracting: foo/toc.pb
extracting: foo/asset-slices/assetpack1-astc.apk
extracting: foo/asset-slices/assetpack1-dxt1.apk
extracting: foo/asset-slices/assetpack1-etc1_rgb8.apk
extracting: foo/asset-slices/assetpack1-master.apk
extracting: foo/asset-slices/assetpack1-paletted.apk
extracting: foo/splits/base-master.apk
extracting: foo/splits/base-master_2.apk
extracting: foo/splits/base-master_3.apk
If we look at the contents of "base-master.apk" in the latter, we see that it contains ALL .so files for all abis not just the resources. On the former , those .so files are split into a seperate base-XXX.apk .
from xamarin-android.
So I tried this patch https://gist.github.com/dellis1972/2a3f62c4b7728dd33c621d823640fba7
This adds an additional fallback to
if (Util::ends_with (apk, SharedConstants::split_config_abi_apk_name)) {
if (Util::ends_with (apk, SharedConstants::split_config_abi_apk_name) || Util::ends_with (apk, SharedConstants::base_apk_name)) {
Now I get an error
Abort message: '/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/src/native/monodroid/embedded-assemblies.hh:180 (ensure_valid_assembly_stores): Invalid or incomplete assembly store data
So something about the assembly stores gets messed up by this.
from xamarin-android.
The problem is here https://github.com/xamarin/xamarin-android/blob/main/src/native/runtime-base/android-system.cc#L740-L747
Previously, whenever split configs were present, the shared libraries always lived in a file named split_config.ARCH.apk
(with ARCH
replaced by e.g. arm64
) and so, for performance reasons, we skip scanning anything that's not a file named like that if we detect that split_config.*
files exist.
In this case the split files do exist, but shared libraries are all in base.apk
and the architecture-specific split config doesn't exist at all:
$ adb shell run-as com.xamarin.runapplicationwithassetpacktextureformats ls -l /data/app/~~SiaOe7UQLju6w_cxUf4LsA==/com.xamarin.runapplicationwithassetpacktextureformats-Z7cymJN9yrWULwTPJncm_Q==/
total 28479
-rw-r--r-- 1 system system 29080982 2024-05-24 18:07 base.apk
drwxr-xr-x 3 system system 3452 2024-05-24 18:07 lib
-rw-r--r-- 1 system system 8478 2024-05-24 18:07 split_assetpack1.apk
-rw-r--r-- 1 system system 8559 2024-05-24 18:07 split_assetpack1.config.astc.apk
-rw-r--r-- 1 system system 16808 2024-05-24 18:07 split_config.xxxhdpi.apk
I need to think about it a bit, so that we don't hurt startup performance with the fix.
from xamarin-android.
Related Issues (20)
- UsbConstants class const value missing HOT 2
- UsbConstants class const value missing
- [.net9-preview][android] Multiple AppResources Crash - failed to load bundled assembly pt-PT/ HOT 10
- Dynamically loading an assembly results in BadImageFormatException HOT 2
- Data binding options HOT 2
- java.lang.UnsatisfiedLinkError: No implementation found for void crc64953c68cad4e91ae3.GlmApp.n_OnAppForegrounded() - is the library loaded, e.g. System.loadLibrary? HOT 2
- Debugger gives up waiting for assemblies to load. HOT 6
- MAUI android app build fails on a .net docker image HOT 5
- `_GeneratePackageManagerJava` runs on every incremental build HOT 1
- [Xamarin.Android.Build.Tasks] Replace Newtonsoft.Json usage with System.Text.Json
- [build performance] check if we can use `jaotc` or GraalVM to "AOT compile" r8.jar HOT 1
- Performance differences between Android 14 X.A. build and net8-android build HOT 8
- Android `Resource` class triggers IDE002 HOT 2
- "Cannot access a disposed object" when reading large JSON from Web HOT 3
- I want to build Classic XA 13.2.2.0 locally using macOS, but it keeps failing HOT 2
- Android Binding didnt work on Maui HOT 4
- Build fails of `$(AndroidManifest)` is an absolute path HOT 1
- Different behavior between net8.0-android34.0 and net8.0-windows10.0 during TSL handshake HOT 3
- Build task GetJavaPlatformJar occasionally fails to set JavaPlatformJarPath, causing later tasks to fail HOT 6
- Can't get GC info from Monp HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xamarin-android.