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

Implement switch to keep extractNativeLibs manifest option #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

basilgello
Copy link

Introduce the CLI option to preserve android:extractNativeLibraries to allow re-packing apps that initially ship with this setting (and some code relies on it!)

To repack such an application with apktool successfully, one needs to:

  • put shared library extension (so) to doNotCompress section of apktool.yml in the decompiled app directory:

    doNotCompress:
    - so
    
  • build APK back using apktool b

  • zipalign using the zipalign tool from latest Android SDK:

    zipalign -p -f 4 app-rebuilt.apk                                                                                  
    
  • sign APK by apksigner or uber-apk-signer skipping its own zipalign step:

    java -jar uber-apk-signer --skipZipAlign
    

Some apps are not happy with this switch removed. By default
it is set to 'false' preserving the current behavior.

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
@REAndroid
Copy link
Owner

REAndroid commented Feb 12, 2024

Sorry not convinced the purpose of keeping extractNativeLibs. AFIK extractNativeLibs is for when the library is archived in compressed format and needs to tell lib loader to extract first before loading.
During merging all native libs kept uncompressed.

I appreciate if you drop here sample apk that proves your point.

Thank you

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

Successfully merging this pull request may close these issues.

2 participants