__system_property_get should be fine for serial numbers. The new APIs exist to work around the fact that __system_property_get could only read values up to a fixed size (and it wasn't particularly large), but that's very unlikely to be a problem for a serial number. On the off chance it is, you can safely assume that they won't be until those APIs are available, so you can always dlsym __system_property_read_callback, use it if it's available, fallback if it isn't.
That's only part of the question though. Newer versions of Android (O? N? I don't remember) restrict access to various system properties with selinux, and it seems the serial number is one of them (it is PII, after all). I think you need an app permission to access it from the Java side too.
The way my test runner handles getting serial numbers for attached devices is just with `adb devices`. That works for me because the device side of the tests doesn't need the information, it's just for orchestration on the host side. Not sure if that's any help for your use case.