AeThex-OS/flash_fastbootd.ps1
MrPiglr b3c308b2c8 Add functional marketplace modules, bottom nav bar, root terminal, arcade games
- ModuleManager: Central tracking for installed marketplace modules
- DataAnalyzerWidget: Real-time CPU/RAM/Battery/Storage widget (unlocked by Data Analyzer module)
- BottomNavBar: Navigation bar for Projects/Chat/Marketplace/Settings
- RootShell: Real root command execution utility
- TerminalActivity: Full root shell with neofetch, sysinfo, real Linux commands
- Terminal Pro module: Adds aliases (ll, la, h), command history
- ArcadeActivity + SnakeGame: Pixel Arcade module unlocks retro games
- fade_in/fade_out animations for smooth transitions
2026-02-18 22:03:50 -07:00

64 lines
2 KiB
PowerShell

# Flash via fastbootd (userspace fastboot) - different USB interface than bootloader fastboot
$FASTBOOT = "C:\Users\PCOEM\platform-tools\fastboot.exe"
$BOOT_IMG = "C:\Users\PCOEM\AeThexOS\magisk_patched_boot.img"
Write-Host "=== Flash via fastbootd (userspace fastboot) ===" -ForegroundColor Cyan
Write-Host ""
# Reboot to fastbootd (NOT bootloader)
Write-Host "Rebooting to fastbootd..." -ForegroundColor Yellow
adb reboot fastboot 2>&1 | Out-Null
Write-Host "Polling for fastboot device..." -ForegroundColor Yellow
$found = $false
$attempts = 0
while (-not $found -and $attempts -lt 60) {
$attempts++
$result = & $FASTBOOT devices 2>&1 | Out-String
if ($result -match "\S+\s+fastboot") {
$found = $true
Write-Host ""
Write-Host "DEVICE FOUND IN FASTBOOT!" -ForegroundColor Green
Write-Host $result.Trim()
} else {
if ($attempts % 5 -eq 0) {
Write-Host " Waiting... ($attempts`s)" -ForegroundColor DarkGray
}
Start-Sleep -Seconds 1
}
}
if (-not $found) {
Write-Host ""
Write-Host "Timeout. Trying 'fastboot getvar product'..." -ForegroundColor Yellow
& $FASTBOOT getvar product 2>&1
Write-Host ""
Write-Host "Trying 'fastboot getvar all'..." -ForegroundColor Yellow
& $FASTBOOT getvar all 2>&1
exit 1
}
# Flash!
Write-Host ""
Write-Host "Flashing boot_b with Magisk-patched image..." -ForegroundColor Cyan
& $FASTBOOT flash boot_b $BOOT_IMG 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host ""
Write-Host "SUCCESS!" -ForegroundColor Green
Write-Host "Rebooting..." -ForegroundColor Yellow
& $FASTBOOT reboot 2>&1
} else {
Write-Host ""
Write-Host "boot_b failed, trying boot..." -ForegroundColor Yellow
& $FASTBOOT flash boot $BOOT_IMG 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Host "SUCCESS with 'boot'!" -ForegroundColor Green
& $FASTBOOT reboot 2>&1
} else {
Write-Host "Failed. Listing partitions..." -ForegroundColor Red
& $FASTBOOT getvar all 2>&1
}
}