INNER CODE UNIT · TypeScript
patchApksBundle
niklashigi/apk-mitm · src/patch-app-bundle.ts:18
export function patchApksBundle(options: TaskOptions) {
return patchAppBundle(options, { isXapk: false })
}
function patchAppBundle(options: TaskOptions, { isXapk }: { isXapk: boolean }) {
const { inputPath, outputPath, tmpDir, uberApkSigner } = options
const bundleDir = path.join(tmpDir, 'bundle')
let baseApkPath = path.join(bundleDir, 'base.apk')
return new Listr([
{
title: 'Extracting APKs',
task: async () => {
await unzip(inputPath, bundleDir)
if (os.type() !== 'Windows_NT') {
// Under Unix: Make sure the user has read and write permissions to