Automatic Method
The tool https://github.com/shroudedcode/apk-mitm will automatically make the necessary changes to the application to start capturing the requests and will also disable certificate pinning (if any).
Manual Method
First we decompile the app: apktool d *file-name*.apk
![[Image: ghSPlZv.png]](https://i.imgur.com/ghSPlZv.png)
Then we go into the Manifest.xml file & scroll down to the <\application android> tag & we are going to add the following line if it isn't already there:
Before adding:
![[Image: CWjcOtz.png]](https://i.imgur.com/CWjcOtz.png)
After adding:
![[Image: EGiiM4A.png]](https://i.imgur.com/EGiiM4A.png)
Now go into the res/xml folder & create/modify a file named network_security_config.xml with the following contents:
![[Image: gNeh0UE.png]](https://i.imgur.com/gNeh0UE.png)
Then save the file & back out of all the directories & rebuild the apk with the following command:
![[Image: oDlwcwd.png]](https://i.imgur.com/oDlwcwd.png)
Now, you need to sign the new application.
The tool https://github.com/shroudedcode/apk-mitm will automatically make the necessary changes to the application to start capturing the requests and will also disable certificate pinning (if any).
Manual Method
First we decompile the app: apktool d *file-name*.apk
![[Image: ghSPlZv.png]](https://i.imgur.com/ghSPlZv.png)
Then we go into the Manifest.xml file & scroll down to the <\application android> tag & we are going to add the following line if it isn't already there:
Code
android:networkSecurityConfig="@xml/network_security_configBefore adding:
![[Image: CWjcOtz.png]](https://i.imgur.com/CWjcOtz.png)
After adding:
![[Image: EGiiM4A.png]](https://i.imgur.com/EGiiM4A.png)
Now go into the res/xml folder & create/modify a file named network_security_config.xml with the following contents:
![[Image: gNeh0UE.png]](https://i.imgur.com/gNeh0UE.png)
Then save the file & back out of all the directories & rebuild the apk with the following command:
Code
apktool b *folder-name/* -o *output-file.apk*![[Image: oDlwcwd.png]](https://i.imgur.com/oDlwcwd.png)
Now, you need to sign the new application.


