forked from ndrancs/Linuxdeploy-Pro
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add zstdcat to assets/bin, built with NDK
Built zstdcat against the Android NDK for arm, arm_64, x86 and x86_64. This binary is needed by debootstrap for newer versions of Ubuntu and not present before Android 12. Included build instructions used to build binaries. Signed-off-by: Niel Fourie <[email protected]>
- Loading branch information
1 parent
ec0e7ac
commit 1a8c6a9
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
zstdcat Build Guide | ||
=================== | ||
|
||
Zstandard file compression utility. This is required for newer version of Ubuntu, and not included before Android 12. | ||
|
||
## Build instructions | ||
|
||
In a work directory of your choice... | ||
|
||
### Download/Install Android SDK: | ||
|
||
``` | ||
$ mkdir sdk/ | ||
$ cd sdk/ | ||
$ mkdir cmdline-tools/ | ||
$ cd cmdline-tools/ | ||
``` | ||
|
||
Go to https://developer.android.com/studio/ | ||
Download after agreeing to EULA: `commandlinetools-linux-xxx_latest.zip` into above path. | ||
(In my case it was `commandlinetools-linux-8512546_latest.zip`.) | ||
|
||
``` | ||
$ unzip commandlinetools-linux-8512546_latest.zip | ||
``` | ||
|
||
Now install CMake and the NDK, I used the version below: | ||
|
||
``` | ||
$ cmdline-tools/bin/sdkmanager --install "cmake;3.10.2.4988404" | ||
$ cmdline-tools/bin/sdkmanager --install "ndk;24.0.8215888" | ||
$ cd ../.. | ||
``` | ||
|
||
### Clone and build zstdcat | ||
|
||
Preparation: | ||
|
||
``` | ||
$ git clone https://github.com/facebook/zstd.git | ||
$ cd zstd/build/cmake/ | ||
$ mkdir builddir/ | ||
$ cd builddir/ | ||
$ export ANDROID_SDK=../../../../sdk | ||
``` | ||
|
||
#### Build for armeabi | ||
|
||
``` | ||
$ $ANDROID_SDK/cmake/3.10.2.4988404/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_SDK/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a .. | ||
$ make -j 8 | ||
``` | ||
|
||
Copy out (and rename) from zstd ``programs/zstd`` to linuxdeploy as ``app/src/main/assets/bin/arm/zstdcat`` | ||
|
||
#### Build for arm64-v8a | ||
|
||
``` | ||
$ rm -rf * | ||
$ $ANDROID_SDK/cmake/3.10.2.4988404/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_SDK/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a .. | ||
$ make -j 8 | ||
``` | ||
|
||
Copy out (and rename) from zstd ``programs/zstd`` to linuxdeploy as ``app/src/main/assets/bin/arm_64/zstdcat`` | ||
|
||
#### Build for x86 | ||
|
||
``` | ||
$ rm -rf * | ||
$ $ANDROID_SDK/cmake/3.10.2.4988404/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_SDK/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86 .. | ||
$ make -j 8 | ||
``` | ||
|
||
Copy out (and rename) from zstd ``programs/zstd`` to linuxdeploy as ``app/src/main/assets/bin/x86/zstdcat`` | ||
|
||
#### Build for x86_64 | ||
|
||
``` | ||
$ rm -rf * | ||
$ $ANDROID_SDK/cmake/3.10.2.4988404/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_SDK/ndk/24.0.8215888/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 .. | ||
$ make -j 8 | ||
``` | ||
|
||
Copy out (and rename) from zstd ``programs/zstd`` to linuxdeploy as ``app/src/main/assets/bin/x86_64/zstdcat`` |