Skip to content

Instantly share code, notes, and snippets.

@Staubgeborener
Last active January 28, 2023 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Staubgeborener/11353af8b18d45da368ae47b703259ff to your computer and use it in GitHub Desktop.
Save Staubgeborener/11353af8b18d45da368ae47b703259ff to your computer and use it in GitHub Desktop.

How tun run AltServer on Linux with AltServer-Linux, AltServer-Linux-ShellScript and netmuxd

I created this guide mainly because I encountered quite a few errors on the way to get an AltServer running on a Linux system. During my research I found out that I'm not alone and now I want to collect my experiences here consudilated. This was tested on debian and arch based systems.

Step 1. Preparation

AltServer

First of all, it is important to find out what kind of system architecture AltServer should be installed on. Just open a terminal and type in uname -m

You don't need to built anything, just use the latest pre-built AltServer-Linux release. For example, if your system is a x86_64 architecture use AltServer-x86_64.

AltServer-Linux-ShellScript

Personally, AltServer Linux ShellScript is a wonderful solution as it guides you through the process to install the AltStore app correctly on the apple device. So this step is optional, if you decide against AltServer Linux ShellScript, then take a closer look at the AltServer syntax.

At first you need to install needed dependencies:

sudo apt-get install usbmuxd libimobiledevice6 libimobiledevice-utils wget curl libavahi-compat-libdnssd-dev (of course, if you are using for example pacman as a package manager, you should use sudo pacman -S [...] instead.

Let's go into the home directory:

cd ~

Clone the repository:

git clone https://github.com/powenn/AltServer-Linux-ShellScript

Now move the AltServer file which was previously downloaded into the new AltServer-Linux-ShellScript folder and rename it to AltServer. Lets assume, the file is called AltServer-x86_64:

mv /path/to/AltServer-x86_64 ./AltServer-Linux-ShellScript/AltServer

This is a good point to create a symlink so we can run AltServer by just typing the name AltServer in terminal:

ln -s ./AltServer-Linux-ShellScript/AltServer /bin/AltServer

netmuxd

netmuxd is needed later to enable communication between AltServer and AltStore wirelessly.

If not already, go into the home directory:

cd ~

Visit the latest releases of netmuxd. Again, choose the corret architecture (x86_64 or armv7) and download the correct one.

Personally, I keep everything close together, so let's move the netmuxd file to the AltServer-Linux-ShellScript folder and rename the file at the same time. Let's assume, you downloaded netmuxd-x86_64:

mv /path/to/netmuxd-x86_64 ./AltServer-Linux-ShellScript/netmuxd

Again, i would create a symlink to keep things simple:

ln -s ./AltServer-Linux-ShellScript/netmuxd /bin/netmuxd

Step 2. Pairing and Usage

usbmuxd

To pair the apple device with the linux system, you have to use an usb-cable. It will be the first and last time you have to use a cable, so don't worry. The rest will happen over your wireless network.

  1. Start usbmuxd: sudo systemctl start usbmuxd (just to be sure, check the status with sudo systemctl status usbmuxd)
  2. connect the apple device with the usb-cable to your linux system
  3. type idevicepair pair

3.1. When the device is not found disconnect the usb-cable, type sudo systemctl restart usbmuxd and try step 2 and 3 again

3.2. When you encounter again error message take a look in the /var/lib/lockdown/ folder. If there is already a UUID.plist file, delete it like sudo rm /var/lib/lockdown/UUID.plist

  1. check the opairing with ideviceinfo

  2. This one is important: Kill the usbmuxd process. Check the process id of usbmuxd with ps -a | grep usbmuxd and do sudo kill -9 'USBMUXD PID'. Stopping the deamon is not enough (in my case). If you do not want to pair any other apple device you can also disable the service sudo systemctl disable usbmuxd. If you don't kill the usbmuxd process you will get heartbeat error messages with netmuxd and the wireless connection will not work.

  3. When everything is done you should check ls /var/lib/lockdown/ as there should be a new created UUID.plist file, where UUIDis the ID of your paired apple device.

netmuxd

Setting up netmuxd is pretty simple, as with symlinked everything. So sudo netmuxd should be enough. You don't need to add any arguments to this command or use screen like it is explained here.

Step 3. Keep things smart (systemd and autostart)

Someday I'll finish this

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