How would I implement tilt controlling on Android?

I am looking for a way of implementing tilt control as it is used in games. The type of control I look for is the same as in the games Subway Surf or Bike Race. What fascinates me about these games is, that they MUST not be implemented with TYPE_ROTATION_VECTOR or the MAGNETIC_FIELD sensor types, since they DONT deliver Roll, Pitch and Yaw according to device orientation (North, South, East, West). They must somehow only have used Gyroscopes and Accelerometer/Gravity sensors, but I could not find any example in the internet showing how to implement this. I want to find out the tilting angles in relation to the ground and not the magnetic field of the earth.

I have a feeling that the methods getRotationMatrix, getRotationMatrixFromVector and getOrientation all deliver their data based on the earths magnetic field.

Is there any way I could implement Bike Race or Subway Surf like control?