Update default payload and bundle Aurora dashboard
This commit is contained in:
@@ -11,6 +11,8 @@ namespace BadBuilder
|
||||
{
|
||||
List<DownloadItem> items = new()
|
||||
{
|
||||
("ABadAvatar", "https://cdn.niklascfw.de/files/ABadAvatar-publicbeta1.0.zip"),
|
||||
("Aurora Dashboard", "https://cdn.niklascfw.de/files/Aurora%200.7b.2%20-%20Release%20Package.rar"),
|
||||
("XeXmenu", "https://github.com/Pdawg-bytes/BadBuilder/releases/download/v0.10a/MenuData.7z"),
|
||||
("Rock Band Blitz", "https://github.com/Pdawg-bytes/BadBuilder/releases/download/v0.10a/GameData.zip"),
|
||||
("Simple 360 NAND Flasher", "https://github.com/Pdawg-bytes/BadBuilder/releases/download/v0.10a/Flasher.7z"),
|
||||
|
||||
@@ -13,8 +13,7 @@ namespace BadBuilder.Helpers
|
||||
List<string> repos =
|
||||
[
|
||||
"grimdoomer/Xbox360BadUpdate",
|
||||
"Byrom90/XeUnshackle",
|
||||
"FreeMyXe/FreeMyXe"
|
||||
"Byrom90/XeUnshackle"
|
||||
];
|
||||
|
||||
foreach (var repo in repos)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
global using ArchiveItem = (string name, string path);
|
||||
global using HomebrewApp = (string name, string folder, string entryPoint);
|
||||
|
||||
using System.Linq;
|
||||
using Spectre.Console;
|
||||
using BadBuilder.Models;
|
||||
using BadBuilder.Helpers;
|
||||
@@ -57,21 +58,92 @@ namespace BadBuilder
|
||||
ExtractFiles(downloadedFiles).Wait();
|
||||
|
||||
ClearConsole();
|
||||
string selectedDefaultApp = AnsiConsole.Prompt(
|
||||
new SelectionPrompt<string>()
|
||||
.Title("Which program should be launched by BadUpdate?")
|
||||
.HighlightStyle(GreenStyle)
|
||||
.AddChoices(
|
||||
"FreeMyXe",
|
||||
"XeUnshackle"
|
||||
)
|
||||
);
|
||||
string selectedDefaultApp = "XeUnshackle";
|
||||
AnsiConsole.MarkupLine("[#76B900]{0}[/] Default payload set to [bold]XeUnshackle[/].", Markup.Escape("[*]"));
|
||||
|
||||
AnsiConsole.MarkupLine("[#76B900]{0}[/] Copying requried files and folders.", Markup.Escape("[*]"));
|
||||
foreach (var folder in Directory.GetDirectories($@"{EXTRACTED_DIR}"))
|
||||
{
|
||||
switch (folder.Split("\\").Last())
|
||||
{
|
||||
case "ABadAvatar":
|
||||
string avatarPayloadPath = Path.Combine(folder, "BadUpdatePayload");
|
||||
if (Directory.Exists(avatarPayloadPath))
|
||||
{
|
||||
EnqueueMirrorDirectory(
|
||||
avatarPayloadPath,
|
||||
Path.Combine(TargetDriveLetter, "BadUpdatePayload"),
|
||||
5
|
||||
);
|
||||
}
|
||||
|
||||
string avatarContentPath = Path.Combine(folder, "Content");
|
||||
if (Directory.Exists(avatarContentPath))
|
||||
{
|
||||
EnqueueMirrorDirectory(
|
||||
avatarContentPath,
|
||||
Path.Combine(TargetDriveLetter, "Content"),
|
||||
5
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case "Aurora Dashboard":
|
||||
string auroraDestination = Path.Combine(TargetDriveLetter, "Apps", "Aurora");
|
||||
Directory.CreateDirectory(auroraDestination);
|
||||
|
||||
bool auroraRootHasXex = Directory.GetFiles(folder, "*.xex", SearchOption.TopDirectoryOnly).Any();
|
||||
if (auroraRootHasXex)
|
||||
{
|
||||
EnqueueMirrorDirectory(
|
||||
folder,
|
||||
auroraDestination,
|
||||
4
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
string[] auroraSubDirs = Directory.GetDirectories(folder);
|
||||
string[] auroraRootFiles = Directory.GetFiles(folder);
|
||||
|
||||
string? primaryAuroraDir = auroraSubDirs.FirstOrDefault(dir =>
|
||||
Directory.GetFiles(dir, "*.xex", SearchOption.TopDirectoryOnly).Any());
|
||||
|
||||
if (primaryAuroraDir == null)
|
||||
{
|
||||
EnqueueMirrorDirectory(
|
||||
folder,
|
||||
auroraDestination,
|
||||
4
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
EnqueueMirrorDirectory(
|
||||
primaryAuroraDir,
|
||||
auroraDestination,
|
||||
4
|
||||
);
|
||||
|
||||
foreach (string subDir in auroraSubDirs.Where(dir => dir != primaryAuroraDir))
|
||||
{
|
||||
EnqueueMirrorDirectory(
|
||||
subDir,
|
||||
Path.Combine(auroraDestination, Path.GetFileName(subDir)),
|
||||
4
|
||||
);
|
||||
}
|
||||
|
||||
foreach (string file in auroraRootFiles)
|
||||
{
|
||||
EnqueueFileCopy(
|
||||
file,
|
||||
Path.Combine(auroraDestination, Path.GetFileName(file)),
|
||||
4
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case "XeXmenu":
|
||||
EnqueueMirrorDirectory(
|
||||
Path.Combine(folder, $"{ContentFolder}C0DE9999"),
|
||||
@@ -80,17 +152,7 @@ namespace BadBuilder
|
||||
);
|
||||
break;
|
||||
|
||||
case "FreeMyXe":
|
||||
if (selectedDefaultApp != "FreeMyXe") break;
|
||||
EnqueueFileCopy(
|
||||
Path.Combine(folder, "FreeMyXe.xex"),
|
||||
Path.Combine(TargetDriveLetter, "BadUpdatePayload", "default.xex"),
|
||||
9
|
||||
);
|
||||
break;
|
||||
|
||||
case "XeUnshackle":
|
||||
if (selectedDefaultApp != "XeUnshackle") break;
|
||||
string subFolderPath = Directory.GetDirectories(folder).FirstOrDefault();
|
||||
File.Delete(Path.Combine(subFolderPath, "README - IMPORTANT.txt"));
|
||||
EnqueueMirrorDirectory(
|
||||
@@ -139,39 +201,43 @@ namespace BadBuilder
|
||||
}
|
||||
actionQueue.ExecuteActionsAsync().Wait();
|
||||
|
||||
string launchIniPath = Path.Combine(TargetDriveLetter, "launch.ini");
|
||||
if (File.Exists(launchIniPath))
|
||||
{
|
||||
List<string> launchIniLines = File.ReadAllLines(launchIniPath).ToList();
|
||||
|
||||
for (int i = 0; i < launchIniLines.Count; i++)
|
||||
{
|
||||
if (launchIniLines[i].TrimStart().StartsWith("Default =", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
launchIniLines[i] = @"Default = Usb:\Apps\Aurora\Aurora.xex";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const string commentText = "; Hallo von NiklasCFW :D";
|
||||
int autoContIndex = launchIniLines.FindIndex(line =>
|
||||
line.Trim().Equals("autocont = false", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
if (autoContIndex >= 0)
|
||||
{
|
||||
bool commentAlreadyPresent = autoContIndex > 0 &&
|
||||
launchIniLines[autoContIndex - 1].Trim().Equals(commentText, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
if (!commentAlreadyPresent)
|
||||
{
|
||||
launchIniLines.Insert(autoContIndex, commentText);
|
||||
}
|
||||
}
|
||||
|
||||
File.WriteAllLines(launchIniPath, launchIniLines);
|
||||
}
|
||||
|
||||
File.AppendAllText(Path.Combine(TargetDriveLetter, "info.txt"), $"- Disk formatted using {(targetDisk.TotalSize < 31 * GB ? "Windows \"format.com\"" : "BadBuilder Large FAT32 formatter")}\n");
|
||||
File.AppendAllText(Path.Combine(TargetDriveLetter, "info.txt"), $"- Disk total size: {targetDisk.TotalSize} bytes\n");
|
||||
|
||||
ClearConsole();
|
||||
if (!PromptAddHomebrew())
|
||||
{
|
||||
WriteHomebrewLog(1);
|
||||
AnsiConsole.MarkupLine("\n[#76B900]{0}[/] Your USB drive is ready to go.", Markup.Escape("[+]"));
|
||||
Console.Write("\nPress any key to exit...");
|
||||
Console.ReadKey();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
List<HomebrewApp> homebrewApps = ManageHomebrewApps();
|
||||
|
||||
AnsiConsole.Status()
|
||||
.SpinnerStyle(OrangeStyle)
|
||||
.StartAsync("Copying and patching homebrew apps.", async ctx =>
|
||||
{
|
||||
await Task.WhenAll(homebrewApps.Select(async item =>
|
||||
{
|
||||
await FileSystemHelper.MirrorDirectoryAsync(item.folder, Path.Combine(TargetDriveLetter, "Apps", item.name));
|
||||
await PatchHelper.PatchXexAsync(item.entryPoint, XexToolPath);
|
||||
}));
|
||||
}).Wait();
|
||||
|
||||
WriteHomebrewLog(homebrewApps.Count + 1);
|
||||
|
||||
string status = "[+]";
|
||||
AnsiConsole.MarkupLineInterpolated($"\n[#76B900]{status}[/] [bold]{homebrewApps.Count}[/] apps copied.");
|
||||
|
||||
AnsiConsole.MarkupLine("\n[#76B900]{0}[/] Your USB drive is ready to go.", Markup.Escape("[+]"));
|
||||
|
||||
Console.Write("\nPress any key to exit...");
|
||||
@@ -213,7 +279,7 @@ namespace BadBuilder
|
||||
|
||||
[#76B900]───────────────────────────────────────────────────────────────────────v0.31[/]
|
||||
───────────────────────Xbox 360 [#FF7200]BadUpdate[/] USB Builder───────────────────────
|
||||
[#848589]Created by Pdawg[/]
|
||||
[#848589]Created by Pdawg | Forked by NiklasCFW[/]
|
||||
[#76B900]────────────────────────────────────────────────────────────────────────────[/]
|
||||
|
||||
""");
|
||||
|
||||
52
README.md
52
README.md
@@ -19,29 +19,46 @@ BadBuilder is a tool for creating a BadUpdate USB drive for the Xbox 360. It aut
|
||||
### File Extraction & Copying
|
||||
- Extracts all necessary files automatically.
|
||||
- Prepares the USB drive for the BadUpdate exploit by copying all required files.
|
||||
### Homebrew Support
|
||||
- Allows adding homebrew applications by specifying their root folder.
|
||||
- Prompts for the path of the entry point if it could not be automatically determined.
|
||||
- Automatically searches for the entry point (`.xex`) file within the folder.
|
||||
- If multiple `.xex` files are found, BadBuilder will prompt you to select the correct one.
|
||||
- Copies all necessary files and patches the entry `.xex` using the downloaded XexTool.
|
||||
- Includes optional content packs such as **ABadAvatar** and the **Aurora Dashboard**.
|
||||
|
||||
## Build
|
||||
|
||||
Run these commands from the repository root:
|
||||
|
||||
```
|
||||
dotnet restore
|
||||
dotnet build BadBuilder.sln
|
||||
```
|
||||
|
||||
To publish a self-contained single-file release for 64-bit Windows:
|
||||
|
||||
```
|
||||
dotnet publish BadBuilder/BadBuilder.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
|
||||
```
|
||||
|
||||
If you want the runtime bundled but with trimming and compression enabled (smaller exe, may require extra testing):
|
||||
|
||||
```
|
||||
dotnet publish BadBuilder/BadBuilder.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=false
|
||||
```
|
||||
|
||||
To create framework-dependent single-file publishes (requires .NET 8 runtime on the target machine), omit `--self-contained true` and pick the architecture you need:
|
||||
|
||||
```
|
||||
dotnet publish BadBuilder/BadBuilder.csproj -c Release -r win-x64 -p:SelfContained=false -p:PublishSingleFile=true
|
||||
dotnet publish BadBuilder/BadBuilder.csproj -c Release -r win-x86 -p:SelfContained=false -p:PublishSingleFile=true
|
||||
dotnet publish BadBuilder/BadBuilder.csproj -c Release -r win-arm64 -p:SelfContained=false -p:PublishSingleFile=true
|
||||
```
|
||||
|
||||
## How to Use
|
||||
1. **Launch the executable**. It will open inside of a Terminal window.
|
||||
2. **Formatting (Windows Only):** BadBuilder will format your USB drive as FAT32, even if it’s larger than 32GB.
|
||||
> [!CAUTION]
|
||||
> Formatting a disk means that all data will be lost. Make sure you have selected the right drive before confirming the format. I am not responsible for any data loss.
|
||||
3. **Download Files:** BadBuilder will fetch the required exploit files or let you specify an existing location.
|
||||
3. **Download Files:** BadBuilder will fetch the required exploit files or let you specify an existing location. This includes the ABadAvatar payload, XeUnshackle, Aurora Dashboard, Rock Band Blitz, XeXMenu, and Simple 360 NAND Flasher.
|
||||
4. **Extract Files:** BadBuilder will automatically extract everything needed.
|
||||
5. **Select default program**: BadBuilder will prompt you to choose a program that BadUpdate will try and invoke, being either [FreeMyXe](https://github.com/FreeMyXe/FreeMyXe), or [XeUnshackle](https://github.com/Byrom90/XeUnshackle)
|
||||
6. **Copy Files:** BadBuilder will copy all of the extracted files to the correct locations.
|
||||
7. **Add Homebrew (Optional):**
|
||||
- Specify the root folder of your homebrew application (e.g., `D:\Aurora 0.7b.2 - Release Package`).
|
||||
- If no `.xex` files were located in the root folder, BadBuilder will prompt you for the path of the entry point.
|
||||
- BadBuilder will locate the `.xex` file inside.
|
||||
- If multiple `.xex` files exist, you’ll be prompted to choose the correct entry point.
|
||||
- First, all necessary files will be copied, then, the `.xex` file will be patched using **XexTool**.
|
||||
- This ensures that the original copy of the homebrew program will **not** be modified, as it is instead done in-place on the USB drive.
|
||||
5. **Configure Payload:** BadBuilder automatically configures [XeUnshackle](https://github.com/Byrom90/XeUnshackle) as the default payload for BadUpdate.
|
||||
6. **Copy Files:** BadBuilder will copy all of the extracted files to the correct locations, including deploying the Aurora Dashboard to `Apps\Aurora`.
|
||||
|
||||
## Example Homebrew Folder Structure
|
||||
If you want to add Aurora, you would select the **root folder**, like:
|
||||
@@ -73,7 +90,8 @@ If you encounter any problems, please create a new issue with details about your
|
||||
|
||||
### Credits
|
||||
- **Grimdoomer:** [BadUpdate](https://github.com/grimdoomer/Xbox360BadUpdate)
|
||||
- **InvoxiPlayGames:** [FreeMyXe](https://github.com/FreeMyXe/FreeMyXe)
|
||||
- **shutterbug2000:** [ABadAvatar](https://github.com/shutterbug2000/ABadAvatar)
|
||||
- **Phoenix:** [Aurora Dashboard](https://phoenix.xboxunity.net/#/news)
|
||||
- **Byrom90:** [XeUnshackle](https://github.com/Byrom90/XeUnshackle)
|
||||
- **Swizzy:** [Simple 360 NAND Flasher](https://github.com/Swizzy/XDK_Projects)
|
||||
- **Team XeDEV:** XeXMenu
|
||||
Reference in New Issue
Block a user