macOS is the most widely used UNIX on the planet.
You can draw a continuous—if very torturous—line between Bell Labs’ UNIX original codebase and modern macOS/iOS.
In rooted devices everything goes, on random Android device you application might get killed for trying to access private APIs, meaning anything that isn't documented as official NDK API.