mirror of
https://github.com/neoarz/Syntrel.git
synced 2025-12-25 03:40:11 +01:00
feat: Update mountddi, replace the pairing commands, switch to localdevvpn
* Update mountddi.py * Update pairing command description and embed content * Update crash.py * Update afc.py * Update VPN app reference in error message * Update footer text in embed message * feat: update mount ddi to be downloaded on the fly also fix some small errors and update errorcodes.json --------- Co-authored-by: neoarz <email@neoarz.dev>
This commit is contained in:
Binary file not shown.
@@ -328,5 +328,10 @@
|
||||
"name": "malformed_package_archive",
|
||||
"description": "malformed package archive",
|
||||
"code": -67
|
||||
},
|
||||
{
|
||||
"name": "developer_mode_not_enabled",
|
||||
"description": "Developer mode is not enabled",
|
||||
"code": -68
|
||||
}
|
||||
]
|
||||
@@ -1,7 +1,9 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
import os
|
||||
|
||||
import aiohttp
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
def mountddi_command():
|
||||
@commands.hybrid_command(name="mountddi", description="How to manually mount DDI")
|
||||
@@ -11,23 +13,27 @@ def mountddi_command():
|
||||
embed = discord.Embed(
|
||||
color=0xFA8C4A,
|
||||
description=(
|
||||
"# How to Manually Mount DDI\n\n---\n\n"
|
||||
"# How to Mount your DDI (Developer Disk Image):\n\n---\n\n"
|
||||
"1. Ensure you are connected to StikDebug's VPN and Wi-Fi.*\n"
|
||||
"2. Force close StikDebug from the app switcher, then repon it.\n"
|
||||
"## This should resolve your error! Remember, this must be done every time you restart your device.\n"
|
||||
"If it doesn't work after a couple tries or you live in a country where github.com is blocked, try the steps below to manually mount the DDI:*\n"
|
||||
"1. **Download the DDI.zip file attached above:**\n"
|
||||
" - Save it to your device and extract the contents\n\n"
|
||||
"2. **Replace the DDI folder in StikDebug:**\n"
|
||||
" - Navigate to the StikDebug default directory on your iPhone/iPad\n"
|
||||
" - Delete the existing DDI folder completely\n"
|
||||
" - Replace it with the DDI folder from the downloaded zip\n"
|
||||
" - Make sure it's in the StikDebug default directory\n\n"
|
||||
" - Replace it with the DDI folder from uncompressing the downloaded zip\n"
|
||||
" - Make sure it's in StikDebug's default directory\n\n"
|
||||
"3. **Restart and retry:**\n"
|
||||
" - Completely restart StikDebug\n"
|
||||
" - See if you get the same error again\n\n"
|
||||
" - If you still get the same error, ask the idevice server for more help\n\n"
|
||||
),
|
||||
)
|
||||
embed.set_author(
|
||||
name="idevice", icon_url="https://yes.nighty.works/raw/snLMuO.png"
|
||||
)
|
||||
embed.set_footer(text="Last Edited by neoarz")
|
||||
embed.set_footer(text="Last Edited by CelloSerenity")
|
||||
embed.timestamp = discord.utils.utcnow()
|
||||
|
||||
view = discord.ui.View()
|
||||
@@ -40,16 +46,43 @@ def mountddi_command():
|
||||
)
|
||||
)
|
||||
|
||||
ddi_file_path = os.path.join(os.path.dirname(__file__), "files/DDI.zip")
|
||||
file = (
|
||||
discord.File(ddi_file_path, filename="DDI.zip")
|
||||
if os.path.exists(ddi_file_path)
|
||||
else None
|
||||
)
|
||||
temp_dir = tempfile.mkdtemp()
|
||||
try:
|
||||
ddi_dir = os.path.join(temp_dir, "DDI")
|
||||
os.makedirs(ddi_dir)
|
||||
|
||||
if file:
|
||||
await context.send(embed=embed, view=view, file=file)
|
||||
base_url = "https://raw.githubusercontent.com/doronz88/DeveloperDiskImage/main/PersonalizedImages/Xcode_iOS_DDI_Personalized"
|
||||
files = ["BuildManifest.plist", "Image.dmg", "Image.dmg.trustcache"]
|
||||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
for filename in files:
|
||||
file_url = f"{base_url}/{filename}"
|
||||
async with session.get(file_url) as response:
|
||||
if response.status != 200:
|
||||
await context.send(f"Error: Failed to download {filename} (Status: {response.status})")
|
||||
return
|
||||
|
||||
file_path = os.path.join(ddi_dir, filename)
|
||||
with open(file_path, "wb") as f:
|
||||
while True:
|
||||
chunk = await response.content.read(8192)
|
||||
if not chunk:
|
||||
break
|
||||
f.write(chunk)
|
||||
|
||||
zip_base_name = os.path.join(temp_dir, "DDI")
|
||||
shutil.make_archive(zip_base_name, 'zip', root_dir=temp_dir, base_dir="DDI")
|
||||
|
||||
zip_file_path = zip_base_name + ".zip"
|
||||
|
||||
if os.path.exists(zip_file_path):
|
||||
await context.send(embed=embed, view=view, file=discord.File(zip_file_path, filename="DDI.zip"))
|
||||
else:
|
||||
await context.send(embed=embed, view=view)
|
||||
await context.send("Error: Failed to create zip file.", embed=embed, view=view)
|
||||
|
||||
except Exception as e:
|
||||
await context.send(f"An error occurred: {e}")
|
||||
finally:
|
||||
shutil.rmtree(temp_dir)
|
||||
|
||||
return mountddi
|
||||
|
||||
@@ -12,7 +12,7 @@ def afc_command():
|
||||
description=(
|
||||
"# AFC Connection Failure\n\n---\n\n"
|
||||
+ "1. Make sure Wi-Fi is connected to a stable network\n"
|
||||
+ "2. Make sure StosVPN is connected and updated\n"
|
||||
+ "2. Make sure LocalDevVPN is connected and updated\n"
|
||||
+ "3. If issue still persists, replace pairing file using `iloader`. See [Pairing File instructions](https://docs.sidestore.io/docs/advanced/pairing-file) for details"
|
||||
),
|
||||
)
|
||||
|
||||
@@ -12,12 +12,12 @@ def crash_command():
|
||||
description=(
|
||||
"# SideStore Crashing After Refresh\n\n---\n\n"
|
||||
+ "First, to try and save your data:\n"
|
||||
+ "1. DON'T DELETE SIDESTORE, reinstall with AltServer's `Sideload .ipa`.\n"
|
||||
+ "1. DON'T DELETE SIDESTORE, reinstall using iloader's Install `SideStore (Stable)` button.\n"
|
||||
+ "If that doesn't work:\n"
|
||||
+ "1. Delete your current SideStore. Reinstall with AltServer.\n"
|
||||
+ "1. Delete your current SideStore. Reinstall with iloader.\n"
|
||||
+ "2. Import your pairing file and sign into SideStore.\n"
|
||||
+ "3. Download the SideStore .ipa file, and save it to your Files app.\n"
|
||||
+ '4. Import the "Sidestore.ipa" file into SideStore, just like how you import any other IPA.\n\n'
|
||||
+ '4. Import the "SideStore.ipa" file into SideStore, just like how you import any other IPA.\n\n'
|
||||
+ "This process ensures SideStore is refreshed without issues."
|
||||
),
|
||||
)
|
||||
|
||||
@@ -3,28 +3,13 @@ from discord.ext import commands
|
||||
|
||||
|
||||
def pairing_command():
|
||||
@commands.hybrid_command(
|
||||
name="pairing", description="Help with pairing file issues"
|
||||
)
|
||||
@commands.hybrid_command(name="pairing", description="Link to the pairing guide")
|
||||
async def pairing(self, context):
|
||||
embed = discord.Embed(
|
||||
color=0x8E82F9,
|
||||
description=(
|
||||
"# Cannot Choose Pairing File\n\n---\n\n"
|
||||
+ "1. **Check File Extension:**\n"
|
||||
+ " Make sure your pairing file's extension ends with `.mobiledevicepairing` or `.plist`\n"
|
||||
+ " - If it doesn't, double-check to see if you had zipped your pairing file before sending it to your phone. Failing to do so may lead to the file being corrupted during transport\n\n"
|
||||
+ "2. **Move Pairing File:**\n"
|
||||
+ " If you are unable to select the pairing file from within the app:\n"
|
||||
+ " - Rename the file to `ALTPairingFile.mobiledevicepairing`\n"
|
||||
+ ' - Try moving the pairing file to the root directory of the SideStore folder in the Files app under "On My iPhone/iPad"\n\n'
|
||||
+ "3. **Certificate Signing:**\n"
|
||||
+ " When signing SideStore with certain certificates, you won't be able to select the pairing file from within the app\n"
|
||||
+ " - Try the fix mentioned above\n"
|
||||
+ " - If you do not see the SideStore folder in the Files app:\n"
|
||||
+ " • Connect your phone to your computer\n"
|
||||
+ " • Drag and drop the pairing file into the SideStore app's files section\n"
|
||||
+ " • Ensure the file is renamed to `ALTPairingFile.mobiledevicepairing`\n"
|
||||
"# How to obtain your pairing file:\n\n---\n\n"
|
||||
+ "[Click here](https://docs.sidestore.io/advanced/pairing-file) to read the SideStore documentation on replacing your pairing file.\n"
|
||||
),
|
||||
)
|
||||
embed.set_author(
|
||||
|
||||
@@ -12,7 +12,7 @@ def refresh_command():
|
||||
description=(
|
||||
"# Can't Refresh or Install Apps\n\n---\n\n"
|
||||
+ "1. Make sure your device is connected to a stable Wi-Fi network and not using cellular data.\n"
|
||||
+ "2. Verify VPN is connected in the StosVPN app.\n"
|
||||
+ "2. Verify VPN is connected in the LocalDevVPN app.\n"
|
||||
+ "3. **Replace your pairing file.**\n"
|
||||
+ " - If none of the above worked, it is very likely that the pairing file is corrupted. You can reference the documentation on how to replace your pairing file [here](https://docs.sidestore.io/docs/advanced/pairing-file).\n"
|
||||
),
|
||||
@@ -21,7 +21,7 @@ def refresh_command():
|
||||
name="SideStore",
|
||||
icon_url="https://github.com/SideStore/assets/blob/main/icons/classic/Default.png?raw=true",
|
||||
)
|
||||
embed.set_footer(text="Last Edited by neoarz")
|
||||
embed.set_footer(text="Last Edited by CelloSerenity")
|
||||
embed.timestamp = discord.utils.utcnow()
|
||||
|
||||
view = discord.ui.View()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# From https://github.com/neoarz/Velora/blob/main/Velora/ui/ascii.py
|
||||
|
||||
|
||||
|
||||
def gradient_text(text, start_color, end_color):
|
||||
def rgb_interp(start, end, t):
|
||||
return tuple(int(start[i] + (end[i] - start[i]) * t) for i in range(3))
|
||||
|
||||
Reference in New Issue
Block a user