Skip to content

Commit

Permalink
Beta: new arg -f
Browse files Browse the repository at this point in the history
  • Loading branch information
Veha0001 committed Jan 28, 2025
1 parent c1144d6 commit 2e1bd26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This is a `config.json` example file:
{
"DemodAPK": [
{
"log": 1,
"log": true,
"dex": true,
"package": "com.coconut.bottle",
"command": {
Expand Down
9 changes: 9 additions & 0 deletions autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ def parse_arguments():
default="config.json",
help="Path to the JSON configuration file.",
)
parser.add_argument(
"-f",
"--force",
action="store_true",
help="Force overwrite the decoded APK directory.",
)
parser.add_argument(
"-mv",
"--move-rename-smali",
Expand Down Expand Up @@ -662,6 +668,9 @@ def main():
if log_level == True and dex_folder_exists:
msg.warning("Dex folder found. Some functions will be disabled.", bold=True, underline=True)

if "command" in item and args.force:
shutil.rmtree(decoded_dir, ignore_errors=True)

# Decode APK if input is an APK file and command is present
if "command" in item and apk_dir.endswith(".apk"):
if not os.path.exists(decoded_dir):
Expand Down

0 comments on commit 2e1bd26

Please sign in to comment.