And even when there's no documentation, or when it isn't enough, you can just always dive into AOSP sources and figure out whatever needs to be figured out. They've recently made this more convenient too: https://cs.android.com
No such luck for iOS. Best you can do is poke at binaries with a disassembler.