You could remapping keys via the macOS embedded command line tool hidutil.
Key IDs Table
| Usage | Usage ID (hex) | Usage | Usage ID (hex) | Usage | Usage ID (hex) | Usage | Usage ID (hex) |
|---|
| cd ~/Library/Android/sdk/platform-tools/ | |
| # Get the hash of the mitmproxy-ca certificate. | |
| openssl x509 -inform PEM -subject_hash_old -in ~/.mitmproxy/mitmproxy-ca.pem | head -1 | |
| # We will use this hash value, append '.0' (dot zero) and use this as the filename for the resulting Android certificate | |
| cat ~/.mitmproxy/mitmproxy-ca.pem > c8750f0d.0 | |
| openssl x509 -inform PEM -text -in ~/.mitmproxy/mitmproxy-ca.pem -out /dev/null >> c8750f0d.0 | |
| # In an other terminal, we will start the emulator with writable /system volume |
| EAP Method: TTLE | |
| Phase 2 authentication: None | |
| CA certificate: Unspecified | |
| User certificate: Unspecified | |
| Identify: <NETID>@tudelft.nl | |
| Anonymous identity: [email protected] | |
| Password: <NETID PASSWORD> |