Skip to content

Embed some data files in libxamarin-app.so #9367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 60 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f3dfe90
Embed some data files in `libxamarin-app.so`
grendello Oct 3, 2024
58197ba
Use llvm-mc to embed the binary, this way we have full control
grendello Oct 7, 2024
d01e4e1
Runtime config binary blob is now fully embedded
grendello Oct 8, 2024
514a28a
Remove debug spam
grendello Oct 8, 2024
0081c36
New target to build embedded assembly store
grendello Oct 9, 2024
5d91471
New task to build embedded assembly store
grendello Oct 9, 2024
0c225e1
Move some of assembly packaging code to a helper class
grendello Oct 9, 2024
297097b
Move more assembly packaging code to the helper class
grendello Oct 9, 2024
45ad89a
Almost there, TBC
grendello Oct 9, 2024
2652e5e
Assembly store embedding works
grendello Oct 10, 2024
c188d66
Actually use the embedded assembly store
grendello Oct 10, 2024
12afaf7
A handful of bugfixes and performance tweaks
grendello Oct 10, 2024
15a5bf4
Fix DSO count when building
grendello Oct 11, 2024
9391224
Don't allocate memory for ZIP Central Directory data
grendello Oct 11, 2024
955da11
Experimenting with zip scanning performance
grendello Oct 11, 2024
dee133a
Post rebase fixups
grendello Oct 15, 2024
a27f435
More post rebase fixups
grendello Oct 15, 2024
963d760
seek and ye shall read
grendello Oct 15, 2024
460dc65
Details, details...
grendello Oct 16, 2024
001cfd8
Cleanup
grendello Oct 16, 2024
0907f4d
Teach assembly store explorer about embedded stores
grendello Oct 16, 2024
94d1a6a
Teach store v2 reader to look in `libxamarin-app.so`, too
grendello Oct 16, 2024
fd91482
Nicer
grendello Oct 16, 2024
7a063b3
The runtime configuration blob is now part of `libxamarin-app.so`
grendello Oct 17, 2024
f9f5556
Optionally produce "empty" embed.*.s files
grendello Oct 17, 2024
b04f22e
Don't embed assembly store when fastdev is used
grendello Oct 17, 2024
d53f711
Let's see if designer tests pass now
grendello Oct 17, 2024
1070f1c
Expect the unexpected, DTB doesn't specify any ABIs
grendello Oct 18, 2024
91f740f
[WIP] Builds but doesn't work
grendello Oct 18, 2024
525dd96
Let's see how it works now
grendello Oct 21, 2024
f95cc1f
Always generate embedded store sources in CreateEmbeddedAssemblyStore
grendello Oct 22, 2024
b3b644d
Let's see...
grendello Oct 22, 2024
23e2b2f
Don't assume assemblies exist
grendello Oct 23, 2024
85d9a16
better
grendello Oct 23, 2024
bdc737e
Update apkdesc files
grendello Oct 23, 2024
5acd749
Load embedded assembly store also in filesystem mode
grendello Oct 23, 2024
7ce1f65
Log it when an assembly is missing in ManifestDocument
grendello Oct 23, 2024
b1adce3
Don't throw
grendello Oct 23, 2024
9f85883
Always create the destination directory
grendello Oct 24, 2024
0cfed0e
Post-rebase fixups
grendello Oct 28, 2024
fe9d6cd
Let's see what's in the override dir listing
grendello Oct 28, 2024
d580269
Let's see
grendello Oct 28, 2024
76295b6
Cleanup
grendello Oct 29, 2024
1aebcf1
Address feedback
grendello Oct 31, 2024
0f868e9
Let's see what breaks
grendello Nov 4, 2024
98514e5
Revert "Let's see what breaks"
grendello Nov 5, 2024
1d9ad15
Restore [Require]
grendello Nov 6, 2024
3e5ca7d
Remove comment, no longer valid
grendello Nov 6, 2024
5fd11d3
Fix after rebase
grendello May 27, 2025
5a34466
Post-rebase fixes
grendello May 27, 2025
c73b422
A handful of NRT fixes + reuse shared code
grendello May 28, 2025
0af0848
MSBuild updates + cleanup
grendello May 28, 2025
f1b5ccc
Embed runtime config for MonoVM
grendello May 28, 2025
a32cd9f
Fix DSO counts
grendello May 28, 2025
6421670
Fix MonoVM diagnostic messages
grendello May 28, 2025
3714379
Add support for CoreCLR
grendello May 29, 2025
97751d6
It's gone
grendello May 29, 2025
67cf8be
Remove unnecessary app config field
grendello May 29, 2025
ac64906
Update apkdesc files
grendello May 29, 2025
9b79c81
Add a couple of tests
grendello May 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup
  • Loading branch information
grendello committed Jun 3, 2025
commit 76295b657db88bf002b43735735689dd40642e03
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Android.App {

partial class InstrumentationAttribute {

ICollection<string> specified;

public static IEnumerable<InstrumentationAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace Android.App {

partial class PermissionAttribute {

ICollection<string> specified;

public static IEnumerable<PermissionAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace Android.App {

partial class PermissionGroupAttribute {

ICollection<string> specified;

public static IEnumerable<PermissionGroupAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace Android.App {

partial class PermissionTreeAttribute {

ICollection<string> specified;

public static IEnumerable<PermissionTreeAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ public static IEnumerable<SupportsGLTextureAttribute> FromCustomAttributeProvide
SupportsGLTextureAttribute self = new SupportsGLTextureAttribute((string)attr.ConstructorArguments[0].Value);
self.specified = mapping.Load (self, attr, cache);
self.specified.Add("Name");
yield return self;
yield return self;
}
}
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static IEnumerable<UsesFeatureAttribute> FromCustomAttributeProvider (ICu

UsesFeatureAttribute self = new UsesFeatureAttribute ();

if (attr.HasProperties) {
if (attr.HasProperties) {
// handle the case where the user sets additional properties
self.specified = mapping.Load (self, attr, cache);
if (self.specified.Contains("GLESVersion") && self.GLESVersion==0) {
Expand All @@ -72,3 +72,4 @@ public static IEnumerable<UsesFeatureAttribute> FromCustomAttributeProvider (ICu
}
}
}

7 changes: 3 additions & 4 deletions tests/MSBuildDeviceIntegration/Tests/InstallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ public void InstallWithoutSharedRuntime ()
//Assert.AreEqual (0, RunAdbCommand ("shell pm list packages Mono.Android.DebugRuntime").Trim ().Length,
// "The Shared Runtime should not have been installed.");
var directorylist = GetContentFromAllOverrideDirectories (proj.PackageName, DeviceAbi);
Console.WriteLine ($"InstallWithoutSharedRuntime: directoryList == '{directorylist}'");
StringAssert.Contains ($"{proj.ProjectName}.dll", directorylist, $"{proj.ProjectName}.dll should exist in the .__override__/{DeviceAbi} directory.");
StringAssert.Contains ($"System.Private.CoreLib.dll", directorylist, $"System.Private.CoreLib.dll should exist in the .__override__/{DeviceAbi} directory.");
StringAssert.Contains ($"Mono.Android.dll", directorylist, $"Mono.Android.dll should exist in the .__override__/{DeviceAbi} directory.");
Expand Down Expand Up @@ -547,7 +546,7 @@ public void IncrementalFastDeployment (string packageFormat)
}

long lib1FirstBuildSize = new FileInfo (Path.Combine (rootPath, lib1.ProjectName, lib1.OutputPath, "Library1.dll")).Length;

using (var builder = CreateApkBuilder (Path.Combine (rootPath, app.ProjectName))) {
builder.Verbosity = LoggerVerbosity.Detailed;
builder.ThrowOnBuildFailure = false;
Expand Down Expand Up @@ -654,7 +653,7 @@ public void AppWithAndroidJavaSource ()
public class TestJavaClass2 {

public String test(){

return ""Java is called"";
}
}",
Expand All @@ -672,7 +671,7 @@ public String test(){
public class TestJavaClass {

public String test(){

return ""Java is called"";
}
}",
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy