- 22 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
Include App Shielding native libraries
- Mis à jour le 22 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
The integration process copies the App Shielding native libraries to the appropriate locations inside the APK’s lib folder. By default, all architectures supported by the app will be included, but each architecture can be disabled individually to save space by using a command line argument, if necessary.
The App Shielding native library is given a name derived from the package name, excluding common words like "com", "mobile", etc. This helps hide App Shielding as an app library and not a App Shielding-specific library. If a reasonable name cannot be created (i.e., the package name uses all common words, or a library with that name already exists), a randomly generated name like libnnnnbahhmhll.so is used instead.
By default, if the package name is com.example.app, the following files are added to the APK:
lib/armeabi-v7a/libexample.so
lib/x86/libexample.so
lib/arm64-v8a/libexample.so
lib/x86_64/libexample.so
Android contains some logic for determining whether or not the application needs to be run in 32-bit mode, or if it can run in native mode (64-bit). An application will be run in 64-bit mode if all of its 64-bit native libraries are present in the lib/ folder. The application is run in 32-bit mode only if it contains 32-bit native libraries for one of the supported architectures in the lib/ directory, but not the relevant 64-bit version.
If only 32-bit mode should be supported, any files in the following directories should be removed:
lib/arm64-v8a/
lib/x86_64/
The following directories also should not be present in the APK:
lib/armeabi/
lib/mips/
lib/mips64/
The mentioned directories are meant for storing libraries for architectures that are now deprecated and not supported by Google any more. It is impossible to compile libraries for these unsupported architectures with the modern versions of Android NDK. Practically it should not be a problem, as according to our research:
Google Play Store only supports devices that run Android 4.1 and above.
All ARM devices that run Android 4.1 or above and support armeabi, also support armeabi-v7a. Even very old devices from 2010.
Android MIPS market share is tiny or non-existing already. There are no Android MIPS phones whatsoever. The last Android MIPS tablet was released in 2012 and only for selected markets, like India and China.