edit: This is different from Endianness of Android NDK because that question asks how to find the endianness, not how many devices are big/little-endian. Mods, please don't mark this as a dupe.
Just curious, is it worthwhile to support both big/little-endian Android phones? I have some code in my app that's endian-sensitive, for those of you who are curious it involves serializing a long
to a byte stream. I think my phone is big-endian because ByteBuffer.getLong()
is reading in a big-endian fashion from the byte stream I've written to.
Is it worthwhile to support big/little-endian Android phones? I'm not sure how common big-endian is compared to little-endian. Is there data available that tells us the relative percentages of each?
Thanks.
Almost all of the supported architectures are little-endian, with one possible exception.
Android lists its supported ABIs (Application Binary Interfaces) here. There are essentially three categories:
So mips64 is the only question mark. It supports a bi-endian architecture. It seems the first mips64 smartphone chips came out in 2016. I couldn't find which (if any) phones actually use this, but it doesn't seem to be very common.
As to whether it's worthwhile to support both: that's a judgement call you'll have to make. Who knows what the future will bring?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With