Way to detect DeviceOrientation.FaceDown / FaceUp ignoring orientation lock?

Is there a way to get the equivalent of DeviceOrientation.FaceDown / FaceUp irrespective of whether the device’s orientation lock is on or off?

Most users I find tend to have their orientation lock on, and while my game can be played in both landscape and portrait, there is a particular part where I want to show the object in a certain way if their device is facing up or down regardless of the orientation lock. I’ve found this is the case for iOS so far. Perhaps the same issue will happen on Android too.

I’m guessing there’s no default way with Unity’s API methods but perhaps someone knows of a trick using the raw data available from the device’s sensors?

TIA.

You can read the accelerometer using Input.acceleration.