Skip to content

Commit

Permalink
Beta: try fixing join smali path
Browse files Browse the repository at this point in the history
  • Loading branch information
Veha0001 committed Jan 26, 2025
1 parent ad0b888 commit 605d66e
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,17 +617,6 @@ def main():
dex_folder_exists = check_for_dex_folder(apk_dir)
decoded_dir = apk_dir

if not apk_dir.endswith(".apk"):
android_manifest = os.path.join(apk_dir, "AndroidManifest.xml")
resources_folder = os.path.join(apk_dir, "resources")
if dex_folder_exists:
smali_folder = os.path.join(apk_dir, "smali")
value_strings = os.path.join(resources_folder, "package_1/res/values/strings.xml")

package_orig_name, package_orig_path = extract_package_info(android_manifest)
else:
package_orig_name, package_orig_path = None, None

for item in config.get("DemodAPK", []):
if item.get("package") == package_orig_name or apk_dir.endswith(".apk"):
update_config = item.get("update", {})
Expand All @@ -646,8 +635,8 @@ def main():

# Decode APK if input is an APK file and command is present
if "command" in item and apk_dir.endswith(".apk"):

decode_apk(editor_jar, apk_dir, decoded_dir, dex=dex_option)
if not os.path.exists(decoded_dir):
decode_apk(editor_jar, apk_dir, decoded_dir, dex=dex_option)
apk_dir = decoded_dir


Expand Down Expand Up @@ -688,7 +677,7 @@ def main():
if "command" in item:
output_apk = os.path.basename(apk_dir.rstrip('/'))
build_apk(editor_jar, apk_dir, os.path.join(apk_dir, output_apk + ".apk"))

# Run end commands if present
if "command" in item:
end_commands = item.get("command", {}).get("end", [])
Expand Down

0 comments on commit 605d66e

Please sign in to comment.