How to rotate camera on android?

HI
Just trying to portate game on android from PC version but my PC ver camera doesnt work on android
And no scripts in google for android, just found some, but they really bad
Could u help?^)

I got this one but when i little swiped camera goes at floor or etc

public Camera cam;          //Main camera for rotate in y-axis
 void Update()               //Updated every frame;
 {
     this.LookRotation(transform, cam.transform);    //Call LookRotation() to change the x-rotation of the gameobject and the y-rotation of camera
 }
 public void LookRotation(Transform character, Transform camera)     //Change the x-rotation of the gameobject and the y-rotation of camera
 {
     float yRot = Input.GetAxis("Mouse X") * 2f;     //get x and y of mouse in screen
     float xRot = Input.GetAxis("Mouse Y") * 2f;
     character.localRotation *= Quaternion.Euler(0f, yRot, 0f);      //To change character's rotation around y-axis
     camera.localRotation *= Quaternion.Euler(-xRot, 0f, 0f);        //To change camera's rotation around x-axis
     camera.localRotation = ClampRotationAroundXAxis(camera.localRotation);  //Clamp camera's rotation
 }                                                                   //The key point is use localRotation,not rotation or Quaternion.Rotate.
 Quaternion ClampRotationAroundXAxis(Quaternion q)       //The method of clamp rotation,I can't understand it;use it carefully.
 {
     q.x /= q.w;
     q.y /= q.w;
     q.z /= q.w;
     q.w = 1.0f;
     float angleX = 2.0f * Mathf.Rad2Deg * Mathf.Atan(q.x);
     angleX = Mathf.Clamp(angleX, -90f, 90f);
     q.x = Mathf.Tan(0.5f * Mathf.Deg2Rad * angleX);
     return q;
 }