APKEditor icon indicating copy to clipboard operation
APKEditor copied to clipboard

added user-friendly shell wrapper

Open Zetsu4i opened this issue 8 months ago • 3 comments

Here’s a Windows batch script that wraps the APKEditor.jar tool, allowing you to run all its commands easily from the command line. It also provides color-coded output for better readability.


Steps to Set Up:

  1. Download APKEditor.jar and place it in a folder (e.g., C:\APKEditor\).
  2. Save the script as apkeditor.bat in the same folder.
  3. Add the folder to the system PATH:
    • Open System PropertiesAdvancedEnvironment Variables.
    • Under System variables, find Path, edit it, and add C:\APKEditor\.
  4. Use it from any terminal by typing apkeditor followed by the desired command.

Usage Examples

Now you can use the tool anywhere in Command Prompt or PowerShell:

  • Decompile an APK
    apkeditor d -i myapp.apk
    
  • Build APK from decompiled JSON/XML
    apkeditor b -i decompiled-folder
    
  • Merge multiple APK files
    apkeditor m -i apks-folder
    
  • Refactor obfuscated resources
    apkeditor x -i myapp.apk
    
  • Protect APK resources
    apkeditor p -i myapp.apk
    
  • Get APK information
    apkeditor info -v -resources -i myapp.apk
    

Notes

  • Colored output is supported on Windows 10+ with ANSI escape codes.
  • If color codes don’t work in cmd, use Windows Terminal or Git Bash.
  • You can modify the set "JAR_PATH=..." line if you place APKEditor.jar elsewhere.

Now, you have a user-friendly shell wrapper for APKEditor.jar! 🚀

Zetsu4i avatar Mar 29 '25 15:03 Zetsu4i

Thank you ! I am seeing two major works here:

  1. Wrapper script I think it is better to consider other platforms also (linux, windows, ...). Maybe it is good idea to adopt proven scripts from Apktool or gradle wrapper scripts
  2. Terminal formatting (ANSI color) There are cases where end users do not want this feature, like running in wrapped systems where the std output strings is parsed and processed literary. Thus this should consider user preferences and terminal detection. Check NO_COLOR

For easy tracking, it is best if you can split this PR based on the above two points

REAndroid avatar Mar 31 '25 16:03 REAndroid

I see I appreciate ur feedback 🙏🏻 I will try to improve it At first i just made this just for me and thought it would be handy for others that's y its only for windows

Zetsu4i avatar Mar 31 '25 17:03 Zetsu4i

Nice idea.

Similar with menu added to registry in Windows 10. APKEditor

VisionR1 avatar Jul 28 '25 17:07 VisionR1