To call binary on TargetSdk >= 29, Android 10, we need call JNI to get our library path, then execute [lib_path]/libfio.so e.g.
This is a future-proof method^0. by one line of java^2,
fio for android can be build with either NDK-clang or musl
But this means we need to repackage KDiskMark when updates it's fio binary, and users may not update/select their fio executable. With TargetSdk set to 28 (like termux), everything will be easy and great
performance issues
Additionally, after SDCardFS deprecation, I/O performance on android is largely degraded.
FUSE Passthrough, which was introduced in Android 12, is yet experimental on 5.4+ android common kernel
KDiskMark should optionally requires root to avoid multilayer buffering
Lastly, neither posixaio, nor libaio or io_uring is avaliable on Android.
posixaio: not provided by bionic, musl implements this though, thread-pool based I/O is certainly behaves poor
libaio: no upstream android support, existing android ports are unmaintained
io_uring: disabled by Google for Security reason^3
By the way, the test files should be placed under KDiskMark app home, as the internal storage may not support the O_DIRECT flag
As far as I know, Qt supports Android natively
execute fio
To call binary on TargetSdk >= 29, Android 10, we need call JNI to get our library path, then execute
[lib_path]/libfio.so
e.g. This is a future-proof method^0. by one line of java^2,First, in AndroidManifest.xml:
(This is already set by Qt I think)
Then, in lib/ARCH/, we place
libfio.so
fio
for android can be build with either NDK-clang or muslBut this means we need to repackage KDiskMark when updates it's fio binary, and users may not update/select their fio executable. With TargetSdk set to 28 (like termux), everything will be easy and great
performance issues
Additionally, after SDCardFS deprecation, I/O performance on android is largely degraded. FUSE Passthrough, which was introduced in Android 12, is yet experimental on 5.4+ android common kernel KDiskMark should optionally requires root to avoid multilayer buffering
Lastly, neither
posixaio
, norlibaio
orio_uring
is avaliable on Android.posixaio
: not provided by bionic, musl implements this though, thread-pool based I/O is certainly behaves poorlibaio
: no upstream android support, existing android ports are unmaintainedio_uring
: disabled by Google for Security reason^3By the way, the test files should be placed under KDiskMark app home, as the internal storage may not support the
O_DIRECT
flag