Skip to content
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

bundletool not properly aligning wrap.sh file #361

Open
agrieve opened this issue Apr 20, 2024 · 0 comments
Open

bundletool not properly aligning wrap.sh file #361

agrieve opened this issue Apr 20, 2024 · 0 comments

Comments

@agrieve
Copy link

agrieve commented Apr 20, 2024

I'm trying to enable ASAN in a bundle using these instructions.

When I add in the wrap.sh file as lib/x86/wrap.sh, install fails with these adb logs:

04-20 01:56:31.898   548   644 E NativeLibraryHelper: Library 'wrap.sh' is not page-aligned - will not be able to open it directly from apk.
04-20 01:56:31.898   548   644 W NativeHelper: Failure copying 32 bit native libraries; copyRet=-2
04-20 01:56:31.898   548   644 E PackageInstallerSession: Commit of session 1685206434 failed: Failed to extract native libraries, res=-2

My bundleconfig looks like:

   {
      'optimizations': {
          'splitsConfig': {
              'splitDimension': split_dimensions,
          },
          'uncompressNativeLibraries': {
              'enabled': True,
              'alignment': 'PAGE_ALIGNMENT_16K'
          },
          'uncompressDexFiles': {
              'enabled': True,  # Applies only for P+.
          }
      },
      'compression': {
          'uncompressedGlob': sorted(uncompressed_globs),
      },
  }

The built splits/base-master.apk has:

     377  Stored      377   0% 1981-01-01 01:01 c81df02f  lib/x86/wrap.sh

And within the .aab it looks like:

     377  Defl:N      295  22% 2010-01-01 00:00 c81df02f  base/lib/x86/wrap.sh

Perhaps bundletool is only aligning .so files and not all files within lib/?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant