Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/src/main/assets/bin/arm/zstdcat
Binary file not shown.
Binary file added app/src/main/assets/bin/arm_64/zstdcat
Binary file not shown.
Binary file added app/src/main/assets/bin/x86/zstdcat
Binary file not shown.
Binary file added app/src/main/assets/bin/x86_64/zstdcat
Binary file not shown.
4 changes: 3 additions & 1 deletion app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@
<item>precise</item>
<item>trusty</item>
<item>xenial</item>
<item>bionic</item>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<item>bionic</item>
<item>focal</item>
<item>jammy</item>
</string-array>
<string-array name="ubuntu_arch_values" translatable="false">
<item>armel</item> <!-- precise only -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<string name="x86_64_debian_arch" translatable="false">amd64</string>

<!-- Ubuntu -->
<string name="ubuntu_suite" translatable="false">bionic</string>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<string name="ubuntu_suite" translatable="false">jammy</string>
<!-- arm -->
<string name="arm_ubuntu_source_path" translatable="false">http://ports.ubuntu.com/</string>
<string name="arm_ubuntu_arch" translatable="false">armhf</string>
Expand Down
1 change: 1 addition & 0 deletions contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
84 changes: 84 additions & 0 deletions contrib/zstdcat/README.md
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``