diff --git a/app/src/main/assets/bin/arm/zstdcat b/app/src/main/assets/bin/arm/zstdcat new file mode 100755 index 00000000..98f7c592 Binary files /dev/null and b/app/src/main/assets/bin/arm/zstdcat differ diff --git a/app/src/main/assets/bin/arm_64/zstdcat b/app/src/main/assets/bin/arm_64/zstdcat new file mode 100755 index 00000000..af17a14d Binary files /dev/null and b/app/src/main/assets/bin/arm_64/zstdcat differ diff --git a/app/src/main/assets/bin/x86/zstdcat b/app/src/main/assets/bin/x86/zstdcat new file mode 100755 index 00000000..544244d8 Binary files /dev/null and b/app/src/main/assets/bin/x86/zstdcat differ diff --git a/app/src/main/assets/bin/x86_64/zstdcat b/app/src/main/assets/bin/x86_64/zstdcat new file mode 100755 index 00000000..6fc06694 Binary files /dev/null and b/app/src/main/assets/bin/x86_64/zstdcat differ diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 119b76dc..bb6258ec 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -303,7 +303,9 @@ precise trusty xenial - bionic + bionic + focal + jammy armel diff --git a/app/src/main/res/values/preferences.xml b/app/src/main/res/values/preferences.xml index 7a8778fa..90d47290 100644 --- a/app/src/main/res/values/preferences.xml +++ b/app/src/main/res/values/preferences.xml @@ -101,7 +101,7 @@ amd64 - bionic + jammy http://ports.ubuntu.com/ armhf diff --git a/contrib/README.md b/contrib/README.md index f90e384c..35429aa3 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -13,3 +13,4 @@ QEMU: https://packages.debian.org/stretch/qemu-user-static mke2fs (e2fsprogs): http://packages.debian.org/wheezy/e2fsprogs +zstdcat (zstd): https://github.com/facebook/zstd diff --git a/contrib/zstdcat/README.md b/contrib/zstdcat/README.md new file mode 100644 index 00000000..7969d28b --- /dev/null +++ b/contrib/zstdcat/README.md @@ -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``