The android system uses encryption to encrypt user data. When a factory reset is performed, the secure element, the TEE, as well as the encryption headers are wiped. As destroying one of them prevents deriving the encryption key, and that secure element can reliably zero its slots, the data is effectively rendered wiped as it cannot be read without the encryption key which can no longer be derived.