Finding device Azimuth when device is not flat - Please help

//edit
thanks for no help.

You could try using this to calculate the rotation in portrait mode:

var yRotation = Mathf.Atan2(Input.acceleration.x, Input.acceleration.y);