it sort of has a compass, but an electronic one, in the form of a 3-axis Hall effect magnetometer
This generates three signals that depend on the strength of the magnetic field, including the earth’s
however yes, it does absolutely get disrupted by all the metal in the phone, but since that doesn’t really change as the phone rotates, it rotates with the phone and the sensor, always reading the same, the phone can isolate only the part that moves and get a relatively accurate compass
Latest Answers