Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Support #142

Open
mokurin000 opened this issue Feb 6, 2024 · 0 comments
Open

Android Support #142

mokurin000 opened this issue Feb 6, 2024 · 0 comments

Comments

@mokurin000
Copy link

mokurin000 commented Feb 6, 2024

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 method12. by one line of java3,

getContext().getApplicationInfo().nativeLibraryDir;

First, in AndroidManifest.xml:

android:extractNativeLibs = "true"

(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 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 reason4

By the way, the test files should be placed under KDiskMark app home, as the internal storage may not support the O_DIRECT flag

Footnotes

  1. https://stackoverflow.com/a/62730836

  2. https://stackoverflow.com/a/58748468

  3. https://stackoverflow.com/a/16806802

  4. https://www.phoronix.com/news/Google-Restricting-IO_uring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant