Anrepack

Additional

Language
C#
Version
0.0.0.2-SNAPSHOT-f69998e4c7a26ce4f71b719b32b896eef403169d (May 23, 2019)
Created
May 16, 2019
Updated
May 23, 2019 (Retired)
Owner
Shuma Yoshioka (S64)
Contributor
Shuma Yoshioka (S64)
1
Activity
Badge
Generate
Download
Source code

Anrepack

A wrapper tool of Apktool for automating apk re-packaging operation, for Windows, macOS.

Installation

You can get the latest builds at Releases.
If you don't installed .NET Core Runtime, Please use *-selfcontained.zip version.

Usages

./anrepack --help
# Usage: anrepack [options] [command]
# 
# Options:
#   -?|-h|--help             Show help information
# 
# Commands:
#   generate-debug-keystore  Generate "debug.keystore" to default location.
#   install-android          Download Android SDK to default location.
#   install-apktool          Download Apktool to Anrepack's temporary location.
#   repack                   Execute repackage operation.
#   version                  Show version.
# 
# Run 'anrepack [command] --help' for more information about a command.
ls ../mywork
# operation.py original.apk

./anrepack repack --apk ../mywork/original.apk --script ../mywork/operation.py --output ../mywork/repacked.apk --my-script-arg=World
# ...
# Decode apk using apktool...
# ...
# Decoded.
# Run script...
# Hello World!
# Done.
# Re-Build apk using apktool...
# ...
# Built.
# Signing...
# ...
# Signed.
# Completed!

ls ../mywork
# operation.py original.apk repacked.apk
cat ../mywork/operation.py
-*- coding: utf-8 -*-

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('--my-script-arg', dest='myScriptArg', required=True)

def processDecodedApk(anrepackVersion, decodedPath):
    args = parser.parse_args()
    print('Hello %s!' % args.myScriptArg)