Skip to content

Commit a6fa6d3

Browse files
authored
Skip invalidating previous mobiledevicepiar if previous is valid what… (#8)
1 parent 57491a2 commit a6fa6d3

File tree

5 files changed

+44
-34
lines changed

5 files changed

+44
-34
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Set up QEMU
16-
uses: docker/setup-qemu-action@v2
16+
uses: docker/setup-qemu-action@v3
1717
- name: Set up Docker Buildx
18-
uses: docker/setup-buildx-action@v2
18+
uses: docker/setup-buildx-action@v3
1919
- name: Login to GitHub Container Registry
20-
uses: docker/login-action@v2
20+
uses: docker/login-action@v3
2121
with:
2222
registry: ghcr.io
2323
username: ${{ github.actor }}
2424
password: ${{ secrets.GITHUB_TOKEN }}
2525
- name: Build and push
26-
uses: docker/build-push-action@v3
26+
uses: docker/build-push-action@v6
2727
with:
2828
push: true
2929
tags: |

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM debian:bookworm-slim
1+
FROM debian:trixie-slim
22

33
ENV ALTSERVER_ANISETTE_SERVER="https://ani.sidestore.io/"
44

5-
RUN apt-get update && apt-get install -y --no-install-recommends unzip ca-certificates usbmuxd libimobiledevice6 libimobiledevice-utils libavahi-compat-libdnssd-dev curl && \
5+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates usbmuxd libimobiledevice-1.0-6 libimobiledevice-utils curl && \
66
apt-get clean && \
77
rm -rf /var/lib/apt/lists/ && \
88
mkdir app

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sudo apt install -y usbmuxd
2222
curl -fsSL https://test.docker.com -o test-docker.sh
2323
sudo sh test-docker.sh
2424
sudo usermod -aG docker $USER
25-
docker run --rm -it -v ${PWD}/:/mnt/ -v /var/run/usbmuxd:/var/run/usbmuxd ghcr.io/sidestore/altcon
25+
docker run --rm -it -v ${PWD}/:/mnt/ -v /var/run/usbmuxd:/var/run/usbmuxd -v /var/lib/lockdown:/tmp/lockdown ghcr.io/sidestore/altcon
2626
```
2727

2828
## Credit

docker-entrypoint.sh

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,54 @@
11
#!/bin/bash
22

3-
printf "\nPlug in your idevice and enter your passcode.\n"
4-
printf "=============================================\n"
5-
while ! idevicepair pair; do
6-
sleep 1s
7-
done
3+
# Get udid
4+
if ! idevice_id; then
5+
echo "Plug the device in, then run the command!"
6+
exit
7+
fi
8+
9+
udid=$(idevice_id | awk '{print $1}')
10+
11+
# Check if we need to pair
12+
printf "\nVerify if current mobiledevicepairing file is valid.\n"
13+
printf "====================================================\n"
14+
if ! idevicepair validate -u "${udid}"; then
15+
printf "\nEnter your passcode.\n"
16+
printf "====================\n"
17+
while ! idevicepair pair; do
18+
sleep 1s
19+
done
20+
fi
21+
22+
# Ensure UDID key is present in mobiledevicepairing before we copy to host through mount
23+
printf "\nCopying mobiledevicepairing file for SideStore to current directory on host machine.\n"
24+
printf "====================================================================================\n"
25+
if ! grep -q "<key>UDID</key>" "/tmp/lockdown/${udid}.plist"; then
26+
sed -i "/<\/dict>/ i\\
27+
<key>UDID</key>\\
28+
<string>$udid</string>" "/tmp/lockdown/${udid}.plist"
29+
fi
30+
cp --verbose /tmp/lockdown/${udid}.plist /mnt/${udid}.mobiledevicepairing
831

932
# Get SideStore ipa
10-
printf "\nDownloading SideStore.ipa stable.\n"
11-
printf "=================================\n"
12-
curl --progress-bar -L -o SideStore.ipa $(curl -s https://api.github.com/repos/SideStore/SideStore/releases/latest | grep "browser_download_url.*SideStore.ipa*" | cut -d : -f 2,3 | tr -d \")
33+
printf "\nDownloading SideStore.ipa.\n"
34+
printf "==========================\n"
35+
curl --progress-bar -L -o SideStore.ipa https://github.com/SideStore/SideStore/releases/latest/download/SideStore.ipa
1336

1437
# Get SideStore-Nightly ipa
15-
printf "\nDownloading SideStore.ipa nightly.\n"
16-
printf "=================================\n"
38+
printf "\nDownloading SideStore-Nightly.ipa.\n"
39+
printf "==================================\n"
1740
curl --progress-bar -L -o SideStore-Nightly.ipa https://github.com/SideStore/SideStore/releases/download/nightly/SideStore.ipa
1841

19-
# Get udid
20-
udid=$(idevice_id | awk '{print $1}')
21-
22-
# Generate mobiledevicepairing file
23-
printf "\nGenerating mobiledevicepairing file for SideStore\n"
24-
printf "===============================================================\n"
25-
./jitterbugpair -c > /mnt/${udid}.mobiledevicepairing && echo "Check your home folder on your host/after your exit, and copy the ${udid}.mobiledevicepairing file to your iDevice."
26-
42+
# Explain how to install IPA and how to exit container
2743
echo -e "\nTo install an IPA, run the following command and change \033[0;31mmyemail\033[0m and \033[0;31mmyapplepass\033[0m. The \033[0;32mUDID\033[0m is already correct:"
2844
printf "=============================================================================================================\n"
2945
echo -e "./AltServer -u \033[0;32m${udid}\033[0m -a \033[0;[email protected]\033[0m -p \033[0;31mmyapplepass\033[0m SideStore.ipa\n"
3046
echo -e "\nDo note that if your password contains special characters like '@','$' '!'or a space."
3147
echo "It may not work and you need to put backslashes before it"
3248
echo "For example, if your password is 'azerty79!?', you need to write 'azerty79\!\?'"
33-
printf "=============================================================================================\n"
49+
printf "=====================================================================================\n"
3450
echo -e "\nOnce you're finished, type: \033[0;35mexit\033[0m."
3551
printf "=================================\n\n"
3652

53+
# Throw user into a shell
3754
/bin/bash

get-latest-files.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@
33
# Check if we're running 32-bit arm, x86 or else aarch64/x86_64
44
if [[ "$(uname -m)" = 'arm'* ]]; then
55
curl -L -o AltServer $(curl -s https://api.github.com/repos/NyaMisty/AltServer-Linux/releases/latest | grep "browser_download_url.*armv*" | cut -d : -f 2,3 | tr -d \")
6-
curl -L -o jitterbugpair.zip $(curl -s https://api.github.com/repos/Dadoum/Jitterbug-cross/releases/latest | grep "browser_download_url.*armv*" | cut -d : -f 2,3 | tr -d \")
7-
unzip jitterbugpair.zip
86
elif [[ "$(uname -m)" = 'i'* ]]; then
97
curl -L -o AltServer $(curl -s https://api.github.com/repos/NyaMisty/AltServer-Linux/releases/latest | grep "browser_download_url.*86" | grep -E '86\>' | cut -d : -f 2,3 | tr -d \")
10-
curl -L -o jitterbugpair.zip $(curl -s https://api.github.com/repos/Dadoum/Jitterbug-cross/releases/latest | grep "browser_download_url.*86" | grep -E '86\>' | cut -d : -f 2,3 | tr -d \")
11-
unzip jitterbugpair.zip
128
else
139
curl -L -o AltServer $(curl -s https://api.github.com/repos/NyaMisty/AltServer-Linux/releases/latest | grep "browser_download_url.*$(uname -m)*" | cut -d : -f 2,3 | tr -d \")
14-
curl -L -o jitterbugpair.zip $(curl -s https://api.github.com/repos/Dadoum/Jitterbug-cross/releases/latest | grep "browser_download_url.*$(uname -m)*" | cut -d : -f 2,3 | tr -d \")
15-
unzip jitterbugpair.zip
1610
fi
1711

18-
rm jitterbugpair.zip
19-
chmod +x AltServer jitterbugpair
12+
chmod +x AltServer

0 commit comments

Comments
 (0)