APKEditor icon indicating copy to clipboard operation
APKEditor copied to clipboard

Implement switch to keep extractNativeLibs manifest option

Open basilgello opened this issue 1 year ago • 1 comments

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
    

basilgello avatar Oct 15 '23 11:10 basilgello