Compare commits

..

4 Commits

Author SHA1 Message Date
3e4cf14c37 v0.32 2026-08-31 00:48:14 +02:00
5aa0c24164 Download BadUpdate and Tools from CDN instead of GitHub. 2026-08-08 02:19:47 +02:00
35c6ccfee8 Added shell script for compiling 2026-08-08 02:19:47 +02:00
4345cf2cf7 Updated gitignore 2026-08-08 02:19:47 +02:00
7 changed files with 62 additions and 91 deletions

24
.gitignore vendored
View File

@@ -396,3 +396,27 @@ FodyWeavers.xsd
# JetBrains Rider # JetBrains Rider
*.sln.iml *.sln.iml
# macOS
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
__MACOSX/
*.icloud
# Build output
/output/

View File

@@ -14,8 +14,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Octokit" Version="14.0.0" /> <PackageReference Include="SharpCompress" Version="1.0.0" />
<PackageReference Include="SharpCompress" Version="0.39.0" />
<PackageReference Include="Spectre.Console" Version="0.49.1" /> <PackageReference Include="Spectre.Console" Version="0.49.1" />
<PackageReference Include="System.Management" Version="9.0.3" /> <PackageReference Include="System.Management" Version="9.0.3" />
</ItemGroup> </ItemGroup>

View File

@@ -28,14 +28,13 @@ namespace BadBuilder
List<DownloadItem> items = new() List<DownloadItem> items = new()
{ {
("ABadAvatar", "https://cdn.niklascfw.de/xbox360/ABadAvatar-publicbeta1.0.zip"), ("ABadAvatar", "https://cdn.niklascfw.de/xbox360/ABadAvatar_v1.3-beta.zip"),
("Aurora Dashboard", "https://cdn.niklascfw.de/xbox360/Aurora%200.7b.2%20-%20Release%20Package.rar"), ("Aurora Dashboard", "https://cdn.niklascfw.de/xbox360/Aurora%200.7b.2%20-%20Release%20Package.rar"),
("XeXmenu", "https://cdn.niklascfw.de/xbox360/MenuData.7z"), ("XeXmenu", "https://cdn.niklascfw.de/xbox360/MenuData.7z"),
("Rock Band Blitz", "https://cdn.niklascfw.de/xbox360/GameData.zip"), ("Rock Band Blitz", "https://cdn.niklascfw.de/xbox360/GameData.zip"),
("Simple 360 NAND Flasher", "https://cdn.niklascfw.de/xbox360/Flasher.7z"), ("Simple 360 NAND Flasher", "https://cdn.niklascfw.de/xbox360/Flasher.7z"),
("XeUnshackle", "https://cdn.niklascfw.de/xbox360/XeUnshackle-BETA-v1_03.zip"), ("XeUnshackle", "https://cdn.niklascfw.de/xbox360/XeUnshackle-BETA-v1_03.zip"),
}; };
await DownloadHelper.GetGitHubAssets(items);
List<DownloadItem> existingFiles = items.Where(item => List<DownloadItem> existingFiles = items.Where(item =>
File.Exists(Path.Combine(DOWNLOAD_DIR, item.url.Split('/').Last()))).ToList(); File.Exists(Path.Combine(DOWNLOAD_DIR, item.url.Split('/').Last()))).ToList();

View File

@@ -1,5 +1,4 @@
using Octokit; using Spectre.Console;
using Spectre.Console;
using static BadBuilder.Utilities.Constants; using static BadBuilder.Utilities.Constants;
@@ -7,34 +6,6 @@ namespace BadBuilder.Helpers
{ {
internal static class DownloadHelper internal static class DownloadHelper
{ {
internal static async Task GetGitHubAssets(List<DownloadItem> items)
{
GitHubClient gitClient = new(new ProductHeaderValue("BadBuilder-Downloader"));
List<string> repos =
[
"grimdoomer/Xbox360BadUpdate"
];
foreach (var repo in repos)
{
string[] splitRepo = repo.Split('/');
var latestRelease = await gitClient.Repository.Release.GetLatest(splitRepo[0], splitRepo[1]);
foreach (var asset in latestRelease.Assets)
{
string friendlyName = asset.Name switch
{
var name when name.Contains("Free", StringComparison.OrdinalIgnoreCase) => "FreeMyXe",
var name when name.Contains("Tools", StringComparison.OrdinalIgnoreCase) => "BadUpdate Tools",
var name when name.Contains("BadUpdate", StringComparison.OrdinalIgnoreCase) => "BadUpdate",
_ => asset.Name.Substring(0, asset.Name.Length - 4)
};
items.Add(new(friendlyName, asset.BrowserDownloadUrl));
}
}
}
internal static async Task DownloadFileAsync(HttpClient client, ProgressTask task, string url) internal static async Task DownloadFileAsync(HttpClient client, ProgressTask task, string url)
{ {
try try

View File

@@ -1,34 +0,0 @@
using Spectre.Console;
using System.Diagnostics;
namespace BadBuilder.Helpers
{
internal static class PatchHelper
{
internal static async Task PatchXexAsync(string xexPath, string xexToolPath)
{
Process process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = xexToolPath,
Arguments = $"-m r -r a \"{xexPath}\"",
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true
}
};
process.Start();
await process.WaitForExitAsync();
if (process.ExitCode != 0)
{
string status = "[-]";
AnsiConsole.MarkupLineInterpolated($"\n[#FF7200]{status}[/] Das Programm {Path.GetFileNameWithoutExtension(xexPath)} konnte nicht gepatcht werden. XexTool-Ausgabe:");
Console.WriteLine(process.StandardError.ReadToEnd());
}
}
}
}

View File

@@ -21,7 +21,6 @@ namespace BadBuilder
static readonly Style GreenStyle = new(new Color(118, 185, 0)); static readonly Style GreenStyle = new(new Color(118, 185, 0));
static readonly Style GrayStyle = new(new Color(132, 133, 137)); static readonly Style GrayStyle = new(new Color(132, 133, 137));
static string XexToolPath = string.Empty;
static string TargetDriveLetter = string.Empty; static string TargetDriveLetter = string.Empty;
static bool RequiresDashboardUpdate = false; static bool RequiresDashboardUpdate = false;
@@ -59,7 +58,6 @@ namespace BadBuilder
ExtractFiles(downloadedFiles).Wait(); ExtractFiles(downloadedFiles).Wait();
ClearConsole(); ClearConsole();
string selectedDefaultApp = "XeUnshackle";
AnsiConsole.MarkupLine("[#76B900]{0}[/] Standard-Payload auf [bold]XeUnshackle[/] gesetzt.", Markup.Escape("[*]")); AnsiConsole.MarkupLine("[#76B900]{0}[/] Standard-Payload auf [bold]XeUnshackle[/] gesetzt.", Markup.Escape("[*]"));
AnsiConsole.MarkupLine("[#76B900]{0}[/] Kopiere erforderliche Dateien und Ordner.", Markup.Escape("[*]")); AnsiConsole.MarkupLine("[#76B900]{0}[/] Kopiere erforderliche Dateien und Ordner.", Markup.Escape("[*]"));
@@ -204,24 +202,6 @@ namespace BadBuilder
} }
break; break;
case "BadUpdate":
actionQueue.EnqueueAction(async () =>
{
using (StreamWriter writer = new(Path.Combine(TargetDriveLetter, "name.txt")))
writer.WriteLine("USB-Speichergerät");
using (StreamWriter writer = new(Path.Combine(TargetDriveLetter, "info.txt")))
writer.WriteLine($"Dieses Laufwerk wurde mit BadBuilder von Pdawg erstellt.\nWeitere Informationen: https://github.com/Pdawg-bytes/BadBuilder\nKonfiguration: \n- BadUpdate-Ziel-Binary: {selectedDefaultApp}");
Directory.CreateDirectory(Path.Combine(TargetDriveLetter, "Apps"));
await FileSystemHelper.MirrorDirectoryAsync(Path.Combine(folder, "Rock Band Blitz"), TargetDriveLetter);
}, 10);
break;
case "BadUpdate Tools":
XexToolPath = Path.Combine(folder, "XePatcher", "XexTool.exe");
break;
case "Rock Band Blitz": case "Rock Band Blitz":
EnqueueMirrorDirectory( EnqueueMirrorDirectory(
Path.Combine(folder, $"{ContentFolder}5841122D\\000D0000"), Path.Combine(folder, $"{ContentFolder}5841122D\\000D0000"),
@@ -233,7 +213,6 @@ namespace BadBuilder
case "Simple 360 NAND Flasher": case "Simple 360 NAND Flasher":
actionQueue.EnqueueAction(async () => actionQueue.EnqueueAction(async () =>
{ {
await PatchHelper.PatchXexAsync(Path.Combine(folder, "Simple 360 NAND Flasher", "Default.xex"), XexToolPath);
await FileSystemHelper.MirrorDirectoryAsync(Path.Combine(folder, "Simple 360 NAND Flasher"), Path.Combine(TargetDriveLetter, "Apps", "Simple 360 NAND Flasher")); await FileSystemHelper.MirrorDirectoryAsync(Path.Combine(folder, "Simple 360 NAND Flasher"), Path.Combine(TargetDriveLetter, "Apps", "Simple 360 NAND Flasher"));
}, 6); }, 6);
break; break;
@@ -328,7 +307,7 @@ namespace BadBuilder
[#CCE388] [/] [#CCE388] [/]
[#CCE388] [/] [#CCE388] [/]
[#76B900]v0.31[/] [#76B900]v0.32[/]
Xbox 360 [#FF7200]BadUpdate[/] USB Builder Xbox 360 [#FF7200]BadUpdate[/] USB Builder
[#848589]Created by Pdawg | Forked by NiklasCFW[/] [#848589]Created by Pdawg | Forked by NiklasCFW[/]
[#76B900][/] [#76B900][/]

33
build.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
OUTPUT_DIR="$ROOT/output"
PROJECT="$ROOT/BadBuilder/BadBuilder.csproj"
mkdir -p "$OUTPUT_DIR"
publish() {
local rid="$1"
local name="$2"
echo "Publishing $name ($rid)..."
dotnet publish "$PROJECT" \
-c Release \
-r "$rid" \
-p:SelfContained=false \
-p:PublishSingleFile=true \
-o "$OUTPUT_DIR/tmp-$rid"
mv "$OUTPUT_DIR/tmp-$rid/BadBuilder.exe" "$OUTPUT_DIR/$name"
rm -rf "$OUTPUT_DIR/tmp-$rid"
echo " -> $OUTPUT_DIR/$name"
}
publish "win-x64" "BadBuilder-AMD64.exe"
publish "win-x86" "BadBuilder-x86.exe"
publish "win-arm64" "BadBuilder-ARM64.exe"
echo
echo "Done. Binaries in $OUTPUT_DIR:"
ls -lh "$OUTPUT_DIR"/BadBuilder-*.exe