$ sudo apt install git-lfs
- Go to https://developer.android.com/ndk/downloads and download r25c NDK
- Set
ANDROID_NDK_HOME
on your system such that${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake
is valid - Install adb
sudo apt install adb
$ cmake --preset default
$ cmake --build --preset default
Make sure LFS files are downloaded
$ ./build/default/bin/libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p rggb -o rggb.png
$ ./build/default/bin/libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p bggr -o bggr.png
$ ./build/default/bin/libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p gbrg -o gbrg.png
$ ./build/default/bin/libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p grbg -o grbg.png
Those generated images are in output/x86
.
$ cmake --preset default
$ cmake --build --preset default
- Connect to an android device using adb
adb shell
- Push resources to the device
$ adb push build/android/libraw_stripes /data/local/tmp
$ adb push rggb.raw /data/local/tmp/libraw
$ adb push ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so /data/local/tmp/libraw
- Connect to the device and run
$ adb shell
$ cd /data/local/tmp
$ LD_LIBRARY_PATH=. ./libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p rggb -o rggb.png
$ LD_LIBRARY_PATH=. ./libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p bggr -o bggr.png
$ LD_LIBRARY_PATH=. ./libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p gbrg -o gbrg.png
$ LD_LIBRARY_PATH=. ./libraw_stripes -i rggb.raw --log debug -d 10 -b 64 -p grbg -o grbg.png
Those generated images are in output/arm64
.