Test environment: MPU6050 module,i.MX8MP,Android11_2.4.0
This solution ported the MPU6050 module on Android to realize auto rotation of screen.