INNER CODE UNIT · TypeScript

patchAppBundle

niklashigi/apk-mitm · src/patch-app-bundle.ts:22

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
          // the extracted files (which is sometimes not the case by default)
          await execa('chmod', ['-R', 'u+rw', bundleDir])
        }
      },

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…