-
Notifications
You must be signed in to change notification settings - Fork 710
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
Does Android 8.0 support the getrandom
syscall?
#852
Comments
getrandom()
syscallgetrandom()
syscall?
getrandom()
syscall?getrandom
syscall?
TL;DR; We need to have a An Android app has two values that matter when talking about versions. For more info see this article.
This repo is a good example. Their The So we should determine what ring's |
There are definitely devices running Android O that do not support getrandom (e.g. Nexus Player). Strictly speaking, even devices with Q don't have to support getrandom via syscall being invoked directly: the thing that's tested is the libc getrandom wrapper, and an OEM could implement that themselves however they wished. There isn't even a requirement that you're running on top of Linux. In reality, though, I'd expect that the vast majority of devices running O have getrandom, and every device that officially supports P or newer has getrandom. |
Thanks for the info. Maybe at some point we should consider calling |
From the new README.md:
See commits d041b73, 1897790, and 904cad6. Thanks for your help! |
In ring 0.14 and earlier, Android always used
/dev/urandom
and never used thegetrandom
syscall. The current code in the ring master branch always uses thegetrandom
syscall. Is this new behavior too aggressive?In the absence of any reason to do otherwise, ring's minimum supported version of Android is the same as Google Play's minimum version of Android. From https://developer.android.com/distribute/best-practices/develop/target-sdk: Google Play requires that [...] app updates target Android 9.0 starting November 1, 2019. Until then, Android 8.0 is the minimum supported version.
I know that bionic libc only adds a
getrandom()
wrapper around the syscall starting in API level 28 according to https://android.googlesource.com/platform/bionic/+/android-9.0.0_r22/docs/status.md#libc.However, it is not clear whether the syscall available for use through
syscall(SYS_getrandom)
in Android 8.0. If not, we need to enable the fallback to/dev/urandom
. If so, then the current code is correct.@josephlr Can you find an authoritative answer to this question?
The text was updated successfully, but these errors were encountered: