Giter Site home page Giter Site logo

pyzule's Introduction

pyzule

an azule "clone" written in python3. pyzule aims to be faster, have more features, have better support for manually modified dylibs, and overall have less issues than azule. officially supports linux, macos, and wsl. tested on arch linux and macos mojave w/ intel cpu.

features

not many right now, but will probably add some in the future if i need them.

open an issue for any feature requests!

  • generate and use shareable .pyzule files to configure IPAs!
  • inject deb, dylib, framework, bundle, and appex files and automatically fix dependencies when possible
  • automatically fix dependencies on CydiaSubstrate, Cephei*, Orion, librocketbootstrap, libmryipc, and libhdev
  • copy any unknown file/folder types to app root
  • use a custom compression level
  • change app name, version, and bundle id
  • add custom url schemes
  • change app icon
  • enable documents support
  • customize MinimumOSVersion
  • remove UISupportedDevices
  • remove watch app
  • remove all app extensions (or only encrypted ones)
  • fakesign the output ipa/app
  • use custom entitlements for the app
  • merge a plist into the app's existing Info.plist
  • inject into @executable_path instead of @rpath
  • use substitute (open source) instead of CydiaSubstrate

usage

you can get usage info with pyzule -h.

$ pyzule -h
usage: pyzule [-h] [-i input] [-o output] [-z .pyzule] [-n name] [-v version] [-b bundle id] [-m minimum]
              [-c [level]] [-k icon] [-x entitlements] [-l plist] [-r url [url ...]] [-f files [files ...]]
              [-u] [-w] [-d] [-s] [-e] [-g] [-p] [-t] [-q] [--update]

an azule "clone" written in python3.

options:
  -h, --help            show this help message and exit
  -i input              the .ipa/.app to patch
  -o output             the name of the patched .ipa/.app that will be created
  -z .pyzule            the .pyzule file to get info from
  -n name               modify the app's name
  -v version            modify the app's version
  -b bundle id          modify the app's bundle id
  -m minimum            change MinimumOSVersion
  -c [level]            the compression level of the output ipa (default is 6, 0-9)
  -k icon               an image file to use as the app icon
  -x entitlements       a file containing entitlements to sign the app with
  -l plist              a plist to merge with the existing Info.plist
  -r url [url ...]      url schemes to add
  -f files [files ...]  tweak files to inject into the ipa
  -u                    remove UISupportedDevices
  -w                    remove watch app
  -d                    enable files access
  -s                    fakesigns the ipa (for use with appsync)
  -e                    remove app extensions
  -g                    remove encrypted extensions
  -p                    inject into @executable_path
  -t                    use substitute instead of substrate
  -q                    thin all binaries to arm64
  --update              check for updates

installation

macOS instructions
  1. open Terminal. this is where you'll be running every command.
  2. install Xcode from the app store (if not already installed)
  3. Install the Xcode cli tools (if not already installed or if pyzule suddenly stopped working) by running:
    • xcode-select --install
    • sudo xcodebuild -license
  4. install pyzule:
    bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
linux/wsl instructions
  1. on debian-based systems (like ubuntu), run the following:
    sudo apt update ; sudo apt install unzip curl python3 python3-venv
    on arch based systems, use:
    sudo pacman -Syu unzip curl python
  2. install pyzule:
    bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
jailbroken iOS instructions (rootless only)
  1. iirc you only need some packages like python, ldid, and odcctools and probably not anything else but please open an issue if u need help
  2. install pyzule:
    bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"

contributing

if you'd like to improve pyzule, then fork this repo and open a PR to the dev branch. thank you!

credits

pyzule wouldn't be possible if it wasn't for the work of some marvelous people. HUGE thanks to:

formerly used:

pyzule's People

Contributors

arm64x avatar asdfzxcvbn avatar deepsource-autofix[bot] avatar level3tjg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pyzule's Issues

Add feature to fetch tweaks directly from repos

I remember azule had something like this and it was pretty useful for automating scripts without having to update the debs manually everytime they got an update. Idk if you would be interested in this since its quite a unique feature to ask for and many people may not use it.

add flag to update pyzule

I think this is a must-have feature since there is no reason to be on an older version. I rarely check the repo for new commits and find myself always being behind on new features/fixes. If there is a reason to be on an older version, maybe adding a flag to not update it can be a solution. Thanks!

again not an issue but question

how do I seperate the app extensions to a .dylib or whatever file type they use instead of removing them? Like for example Safari extensions

Error when extracting debs on ios

Am getting the following error everytime I run pyzule on ios
[*] extracting ipa.. [*] extracted ipa tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors Traceback (most recent call last): File "/var/jb/usr/local/bin/pyzule", line 337, in <module> run(f"tar -xf '{deb}' -C {output}", shell=True, executable="bash", check=True) File "/private/preboot/8CB08699AA0AEB1B91C6E222622B396D262FF60AE1201E5196D305F6B442FCEA205F713530DEB7A210AA70736460105B/dopamine-2sYsjh/procursus/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'tar -xf 'tweak.deb' -C .pyzule-1711402197.604955/0' returned non-zero exit status 2.

broken with swift apps

python3 pyzule.py -i 5.ipa -o 1.ipa -f 1.deb
[] extracting ipa..
[
] extracted ipa
[] extracted 1.deb
[
] fixed dependency in tweak.dylib: /Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate -> @rpath/CydiaSubstrate.framework/CydiaSubstrate
Traceback (most recent call last):
File "/Users/user/Downloads/pyzule-main/pyzule.py", line 379, in
copytree(os.path.join(USER_DIR, real_dep_name), os.path.join(APP_PATH, inject_path, real_dep_name))
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 558, in copytree
with os.scandir(src) as itr:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/user/zxcvbn/CydiaSubstrate.framework'
[*] deleting temporary directory..

Ellekit Support?

I did some research and it seems like adding ellekit is as simple as:

  1. Adding a argument for it
  2. Pretty much copying all of the Substitute Code but making it use libellekit.dylib instead of libsubstitute.dylib
  3. Done (???)

I'll eventually get a pr made

Need to fix Linux installation

Brother, there is an issue while installing it on my server (Ubuntu)...

Keep giving syntax error, started from here:

if (system := system()) == "Windows":
print("windows is not currently supported. install wsl and use pyzule there.")
sys.exit(1)

I deleted it & passed, then got another one in here:

if not (args.o.endswith(".app") or args.o.endswith(".ipa")):
print("[?] file extension not specified, creating ipa")
args.o += ".ipa"
if os.path.exists(args.o):
overwrite = input(f"[<] {args.o} already exists. overwrite? [Y/n] ").lower().strip()
if overwrite in ("y", "yes", ""):
del overwrite
else:
print("[>] quitting.")
sys.exit()
EXTRACT_DIR = f".pyzule-{time()}"
os.makedirs((REAL_EXTRACT_DIR := os.path.join(os.getcwd(), EXTRACT_DIR)))

for this one exactly:

os.makedirs((REAL_EXTRACT_DIR := os.path.join(os.getcwd(), EXTRACT_DIR)))

All are giving errors, I'm having a totally new clean & installed setup on my server and ur pyzule is the 1st thing to install :D

Have a warning after installing pyzule

Hi, I have a warning after installing pyzule

pyzule -h
/Users/am1ncmd/.config/pyzule/venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
image

I'm a bit confure following the github issue

Proprietary tools

Hello, I noticed that there are two seemingly proprietary tools being used for pyzule. Is the source code for install_name_tool and otool available somewhere?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.