Certificate pinning in Android 4.2
Sample code for the 'Certificate pinning in Android 4.2' article at
How to use:
N.B. The app needs system permissions so it needs to be installed on a rooted device or the emulator.
WARNING Using it incorrectly may mess up certificate validation on your device, making it impossible to connect to certain (or all) secure sites. Do take a full system backup before using and proceed with caution. Do read the associated article to make sure you understand what the app does.
- Import in Eclipse and build (requires API level 17 build target and a recent ADT version).
- Mount the
/systempartition of your test device
$ su # mount -o rw,remount /system
- Sign and export the app into this directory.
run.suto install and start on the device.