We discuss a proposal for a supersymmetric localization principle in M-theory, for M2-brane backgrounds relevant for AdS4/CFT3. Relative equivariant localization determines the classical supersymmetric action, while the 1-loop determinant is determined from an equivariant index of a proposed twisted Dolbeault complex. This leads to an M-theory derivation of Airy-function partition functions. For three-sphere partition functions, our results provide the first closed form expression of the Airy constant for generic squashing and mass deformations. We also find all-order closed form expressions for topologically twisted indices associated with AdS4 black holes.