Skip to content

Instantly share code, notes, and snippets.

@NightwindDev
Created November 25, 2023 03:56
Show Gist options
  • Save NightwindDev/1c05464475b597231e0c6855d959d144 to your computer and use it in GitHub Desktop.
Save NightwindDev/1c05464475b597231e0c6855d959d144 to your computer and use it in GitHub Desktop.
Use Allemand on macOS to convert tweaks to the new ABI and then convert to rootless

* Note that NOT ALL tweaks will work with the conversion process and some might only partially work.

Step 1 - Preparation:

  • Download Allemand. It will download as a .zip file. Extract it, and you'll have the binary file.
  • Move the binary to a safe place on your computer.
  • Open the Terminal app, navigate to the location where the binary is stored, and run the following command:
xattr -sc Allemand && chmod +x Allemand

This will make it an executable file.

  • If you want easy access to the file, you can add an alias to the file with the following series of commands:
echo $SHELL

If this says /bin/zsh, then you're running the zsh shell. If it says /bin/bash, then you're running the bash shell. If you're running zsh, then use the preinstalled nano text editor to add to the ~/.zshrc file by doing this:

nano ~/.zshrc

Then add the following to the file:

alias Allemand="<PATH_TO_YOUR_ALLEMAND_BINARY>"
  • Make sure you have dpkg-deb installed on your Mac. It comes with dpkg, so you can use Homebrew to install dpkg through Homebrew Formulae.
  • You may have to restart your Terminal after all of this in order for changes to apply.

Step 2 - Allemand Usage:

  • Get the .deb that you are trying to convert to the new ABI.
  • Make a folder for the .deb file (I personally just call it by the tweak's name) and put the .deb file there.
  • Navigate to the folder with the Terminal app.
  • To deconstruct the .deb into a folder, run the following command:
dpkg-deb -R <DRAG_DEB_FILE> temp

This will create a folder called temp with all of the contents of the tweak's .deb.

  • Find all the paths of the binaries in the temp folder, basically all files that have a terminal-esque icon. - Run the following command for each binary:
Allemand path/to/binary path/to/binary2
  • Now use Finder to open every single folder where a binary is found. Delete the original binary, find the renamed one (for instance binary2), and then rename that one to the name of the original.
  • Reconstruct the temp folder back into a .deb by running the following command:
dpkg-deb -b temp newabi_tweak.deb

Step 3 - Derootifying:

  • On your phone, ensure that you have Derootifier installed, along the following: dpkg-deb, file, odcctools, fakeroot, ldid from the Procursus Repo. Filza File Manager is also necessary: repo.
  • Transfer the newabi_tweak.deb file from your Mac to your phone.
  • Open Derootifier, press Select .deb file, then select the newabi_tweak.deb file.
  • Press Convert .deb to repack the tweak to the rootless architecture.
  • Go to /var/mobile/.Derootifier/ and find your desired .deb file; it'll likely be titled by the original bundle id followed by _iphoneos-arm64.deb.
@da-vinci-noob
Copy link

da-vinci-noob commented Nov 27, 2023

tried with ShyLabel, it doesn't work :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment