I want connect my android phone to pixhawk . how to use phone sensors instead of pixhawk sensors for flight

I want to read android phone sensors and send it with usb-ttl to pixhawk and arducopter use this sensors instead of pixhawk sensors for flying . can any one help me?

Sounds like using a wii remote, then maybe making it more dedicated and calling it multiwii, then maybe making better more dedicated hardware with arduinos and similar…
Excuse me if I sound sarcastic, but it sounds like a few steps backwards to me.
Trying to get that data over USB and have it processed into something useful, versus the dedicated chips and internal highspeed busses and program loops - seems pointless.
Even an old Pixhawk 1 has multiple IMUs.

There’s actually apps out there to use you phone as a flight controller. Cant say that I’d trust it.