Memtool is a useful debug tool which can read/write some i.MX register. It is default supported in Linux while not supported in Android.
This article describse how to integrate memtool into i.MX8MM Android 12 platform, which is also similar in other i.MX new android platform.