-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c9d76f
commit 4dee138
Showing
2 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import * as path from 'path' | ||
import Listr from 'listr' | ||
|
||
import modifyManifest from './modify-manifest' | ||
import createNetworkSecurityConfig from './create-netsec-config' | ||
import disableCertificatePinning from './disable-certificate-pinning' | ||
|
||
export default function applyPatches(decodeDir: string) { | ||
return new Listr([ | ||
{ | ||
title: 'Modifying app manifest', | ||
task: async context => { | ||
const result = await modifyManifest( | ||
path.join(decodeDir, 'AndroidManifest.xml'), | ||
) | ||
|
||
context.usesAppBundle = result.usesAppBundle | ||
}, | ||
}, | ||
{ | ||
title: 'Replacing network security config', | ||
task: () => | ||
createNetworkSecurityConfig( | ||
path.join(decodeDir, `res/xml/nsc_mitm.xml`), | ||
), | ||
}, | ||
{ | ||
title: 'Disabling certificate pinning', | ||
task: (_, task) => disableCertificatePinning(decodeDir, task), | ||
}, | ||
]) | ||
} |