Spaces:
Running
Running

A phone flashing tool made to run of USB like a dongle with a adb terminal fastboot apktool prewrote bat. files with commands like and reboot bootloader , adb devices , oem fastboot reboot - Initial Deployment
ec29682
verified
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>USB Phone Flasher Tool</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
<style> | |
@keyframes pulse { | |
0% { opacity: 0.6; } | |
50% { opacity: 1; } | |
100% { opacity: 0.6; } | |
} | |
.pulse { | |
animation: pulse 2s infinite; | |
} | |
.terminal { | |
font-family: 'Courier New', monospace; | |
background-color: #1e1e1e; | |
color: #f0f0f0; | |
} | |
.scrollbar-hide::-webkit-scrollbar { | |
display: none; | |
} | |
.command-history { | |
height: calc(100% - 60px); | |
} | |
.typewriter { | |
overflow: hidden; | |
border-right: .15em solid #4ade80; | |
white-space: nowrap; | |
letter-spacing: .15em; | |
animation: | |
typing 3.5s steps(40, end), | |
blink-caret .75s step-end infinite; | |
} | |
@keyframes typing { | |
from { width: 0 } | |
to { width: 100% } | |
} | |
@keyframes blink-caret { | |
from, to { border-color: transparent } | |
50% { border-color: #4ade80; } | |
} | |
</style> | |
</head> | |
<body class="bg-gray-900 text-white min-h-screen"> | |
<div class="container mx-auto px-4 py-8"> | |
<!-- Header --> | |
<header class="flex flex-col md:flex-row justify-between items-center mb-8"> | |
<div class="flex items-center mb-4 md:mb-0"> | |
<div class="bg-blue-600 p-3 rounded-full mr-4"> | |
<i class="fas fa-mobile-alt text-2xl"></i> | |
</div> | |
<div> | |
<h1 class="text-2xl md:text-3xl font-bold">USB Phone Flasher Tool</h1> | |
<p class="text-gray-400">ADB • Fastboot • APKTool • Batch Commands</p> | |
</div> | |
</div> | |
<div class="flex items-center space-x-4"> | |
<div class="flex items-center"> | |
<div class="w-3 h-3 rounded-full bg-green-500 mr-2 pulse"></div> | |
<span class="text-sm">USB Connected</span> | |
</div> | |
<button class="bg-red-600 hover:bg-red-700 px-4 py-2 rounded-lg flex items-center"> | |
<i class="fas fa-power-off mr-2"></i> | |
<span>Eject</span> | |
</button> | |
</div> | |
</header> | |
<!-- Main Content --> | |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> | |
<!-- Left Panel - Quick Commands --> | |
<div class="bg-gray-800 rounded-xl p-6 lg:col-span-1"> | |
<h2 class="text-xl font-bold mb-4 flex items-center"> | |
<i class="fas fa-bolt mr-2 text-yellow-400"></i> | |
Quick Commands | |
</h2> | |
<div class="space-y-3"> | |
<button onclick="runCommand('adb devices')" class="w-full bg-gray-700 hover:bg-gray-600 px-4 py-3 rounded-lg flex items-center justify-between transition"> | |
<span>List Devices</span> | |
<span class="text-xs bg-gray-600 px-2 py-1 rounded">adb devices</span> | |
</button> | |
<button onclick="runCommand('adb reboot bootloader')" class="w-full bg-gray-700 hover:bg-gray-600 px-4 py-3 rounded-lg flex items-center justify-between transition"> | |
<span>Reboot to Bootloader</span> | |
<span class="text-xs bg-gray-600 px-2 py-1 rounded">adb reboot bootloader</span> | |
</button> | |
<button onclick="runCommand('fastboot devices')" class="w-full bg-gray-700 hover:bg-gray-600 px-4 py-3 rounded-lg flex items-center justify-between transition"> | |
<span>Fastboot Devices</span> | |
<span class="text-xs bg-gray-600 px-2 py-1 rounded">fastboot devices</span> | |
</button> | |
<button onclick="runCommand('fastboot oem unlock')" class="w-full bg-gray-700 hover:bg-gray-600 px-4 py-3 rounded-lg flex items-center justify-between transition"> | |
<span>OEM Unlock</span> | |
<span class="text-xs bg-gray-600 px-2 py-1 rounded">fastboot oem unlock</span> | |
</button> | |
<button onclick="runCommand('fastboot reboot')" class="w-full bg-gray-700 hover:bg-gray-600 px-4 py-3 rounded-lg flex items-center justify-between transition"> | |
<span>Reboot Device</span> | |
<span class="text-xs bg-gray-600 px-2 py-1 rounded">fastboot reboot</span> | |
</button> | |
</div> | |
<h2 class="text-xl font-bold mt-8 mb-4 flex items-center"> | |
<i class="fas fa-file-alt mr-2 text-blue-400"></i> | |
Batch Scripts | |
</h2> | |
<div class="space-y-3"> | |
<button onclick="runBatchScript('unlock_bootloader')" class="w-full bg-blue-600 hover:bg-blue-700 px-4 py-3 rounded-lg flex items-center transition"> | |
<i class="fas fa-unlock mr-3"></i> | |
<span>Unlock Bootloader</span> | |
</button> | |
<button onclick="runBatchScript('flash_recovery')" class="w-full bg-purple-600 hover:bg-purple-700 px-4 py-3 rounded-lg flex items-center transition"> | |
<i class="fas fa-download mr-3"></i> | |
<span>Flash Recovery</span> | |
</button> | |
<button onclick="runBatchScript('root_device')" class="w-full bg-green-600 hover:bg-green-700 px-4 py-3 rounded-lg flex items-center transition"> | |
<i class="fas fa-shield-alt mr-3"></i> | |
<span>Root Device</span> | |
</button> | |
</div> | |
</div> | |
<!-- Right Panel - Terminal --> | |
<div class="bg-gray-800 rounded-xl p-0 overflow-hidden lg:col-span-2"> | |
<div class="bg-gray-900 px-4 py-3 flex items-center justify-between border-b border-gray-700"> | |
<div class="flex items-center space-x-2"> | |
<div class="w-3 h-3 rounded-full bg-red-500"></div> | |
<div class="w-3 h-3 rounded-full bg-yellow-500"></div> | |
<div class="w-3 h-3 rounded-full bg-green-500"></div> | |
</div> | |
<div class="text-sm text-gray-400"> | |
ADB/Fastboot Terminal | |
</div> | |
<div class="flex items-center space-x-3"> | |
<button onclick="clearTerminal()" class="text-gray-400 hover:text-white"> | |
<i class="fas fa-trash-alt"></i> | |
</button> | |
<button onclick="copyTerminalContent()" class="text-gray-400 hover:text-white"> | |
<i class="fas fa-copy"></i> | |
</button> | |
</div> | |
</div> | |
<div class="terminal p-4 h-96 overflow-y-auto scrollbar-hide command-history" id="terminal"> | |
<div class="text-green-400 mb-2">USB Phone Flasher Tool v1.2.0</div> | |
<div class="text-gray-400 mb-4">Type "help" for available commands</div> | |
<div class="mb-4"> | |
<div class="text-green-400">user@flasher:~$ <span class="typewriter">adb devices</span></div> | |
<div class="mt-1 ml-8">List of devices attached</div> | |
<div class="mt-1 ml-8 text-yellow-300">0123456789ABCDEF device</div> | |
</div> | |
</div> | |
<div class="bg-gray-900 px-4 py-3 border-t border-gray-700 flex items-center"> | |
<span class="text-green-400 mr-2">user@flasher:~$</span> | |
<input type="text" id="commandInput" class="bg-transparent flex-1 outline-none text-white" placeholder="Enter command..." onkeypress="handleCommandInput(event)"> | |
<button onclick="sendCommand()" class="ml-2 bg-green-600 hover:bg-green-700 px-3 py-1 rounded"> | |
<i class="fas fa-paper-plane"></i> | |
</button> | |
</div> | |
</div> | |
</div> | |
<!-- Status Bar --> | |
<div class="mt-6 bg-gray-800 rounded-xl p-4 flex flex-wrap items-center justify-between"> | |
<div class="flex items-center space-x-4"> | |
<div class="flex items-center"> | |
<i class="fas fa-microchip text-blue-400 mr-2"></i> | |
<span>ADB: <span class="text-green-400">Active</span></span> | |
</div> | |
<div class="flex items-center"> | |
<i class="fas fa-bolt text-yellow-400 mr-2"></i> | |
<span>Fastboot: <span class="text-green-400">Ready</span></span> | |
</div> | |
<div class="flex items-center"> | |
<i class="fas fa-box-open text-purple-400 mr-2"></i> | |
<span>APKTool: <span class="text-green-400">v2.8.1</span></span> | |
</div> | |
</div> | |
<div class="flex items-center mt-2 md:mt-0"> | |
<i class="fas fa-hdd text-gray-400 mr-2"></i> | |
<span>Storage: <span class="text-green-400">15.2GB free</span></span> | |
</div> | |
</div> | |
</div> | |
<script> | |
// Sample command responses | |
const commandResponses = { | |
'adb devices': 'List of devices attached\n0123456789ABCDEF device', | |
'adb reboot bootloader': 'Rebooting into bootloader...', | |
'fastboot devices': '0123456789ABCDEF fastboot', | |
'fastboot oem unlock': '...\nOKAY [ 0.012s]\nFinished. Total time: 0.012s', | |
'fastboot reboot': 'Rebooting...\nFinished. Total time: 0.002s', | |
'help': 'Available commands:\n- adb devices\n- adb reboot bootloader\n- fastboot devices\n- fastboot oem unlock\n- fastboot reboot\n- clear\n- help', | |
'clear': '' | |
}; | |
// Batch script responses | |
const batchScripts = { | |
'unlock_bootloader': [ | |
'Starting bootloader unlock process...', | |
'adb reboot bootloader', | |
'Waiting for device in fastboot mode...', | |
'fastboot oem unlock', | |
'Device unlocked successfully!', | |
'fastboot reboot' | |
], | |
'flash_recovery': [ | |
'Starting recovery flash process...', | |
'adb reboot bootloader', | |
'Waiting for device in fastboot mode...', | |
'fastboot flash recovery twrp-3.7.0.img', | |
'Recovery flashed successfully!', | |
'fastboot reboot' | |
], | |
'root_device': [ | |
'Starting device rooting process...', | |
'adb reboot bootloader', | |
'Waiting for device in fastboot mode...', | |
'fastboot flash boot magisk_patched.img', | |
'Device rooted successfully!', | |
'fastboot reboot' | |
] | |
}; | |
function runCommand(command) { | |
const terminal = document.getElementById('terminal'); | |
const commandLine = document.createElement('div'); | |
commandLine.className = 'text-green-400 mb-1'; | |
commandLine.textContent = `user@flasher:~$ ${command}`; | |
terminal.appendChild(commandLine); | |
const response = commandResponses[command] || `Command not found: ${command}`; | |
if (command === 'clear') { | |
terminal.innerHTML = ''; | |
return; | |
} | |
if (response) { | |
const responseLines = response.split('\n'); | |
responseLines.forEach(line => { | |
const responseElement = document.createElement('div'); | |
responseElement.className = 'ml-8'; | |
responseElement.textContent = line; | |
terminal.appendChild(responseElement); | |
}); | |
} | |
terminal.scrollTop = terminal.scrollHeight; | |
} | |
function runBatchScript(scriptName) { | |
const terminal = document.getElementById('terminal'); | |
const script = batchScripts[scriptName]; | |
if (!script) { | |
const errorLine = document.createElement('div'); | |
errorLine.className = 'text-red-400 mb-1'; | |
errorLine.textContent = `Script not found: ${scriptName}`; | |
terminal.appendChild(errorLine); | |
terminal.scrollTop = terminal.scrollHeight; | |
return; | |
} | |
// Clear terminal for batch script | |
terminal.innerHTML = ''; | |
const scriptHeader = document.createElement('div'); | |
scriptHeader.className = 'text-purple-400 mb-2'; | |
scriptHeader.textContent = `=== Running batch script: ${scriptName.replace(/_/g, ' ')} ===`; | |
terminal.appendChild(scriptHeader); | |
// Simulate script execution with delay | |
script.forEach((line, index) => { | |
setTimeout(() => { | |
const isCommand = line.includes('adb') || line.includes('fastboot'); | |
const lineElement = document.createElement('div'); | |
lineElement.className = isCommand ? 'text-green-400 mb-1' : 'mb-1'; | |
if (isCommand) { | |
lineElement.textContent = `user@flasher:~$ ${line}`; | |
} else { | |
lineElement.textContent = line; | |
} | |
terminal.appendChild(lineElement); | |
terminal.scrollTop = terminal.scrollHeight; | |
}, index * 800); | |
}); | |
} | |
function handleCommandInput(e) { | |
if (e.key === 'Enter') { | |
sendCommand(); | |
} | |
} | |
function sendCommand() { | |
const input = document.getElementById('commandInput'); | |
const command = input.value.trim(); | |
if (command) { | |
runCommand(command); | |
input.value = ''; | |
} | |
} | |
function clearTerminal() { | |
document.getElementById('terminal').innerHTML = ''; | |
} | |
function copyTerminalContent() { | |
const terminal = document.getElementById('terminal'); | |
const range = document.createRange(); | |
range.selectNode(terminal); | |
window.getSelection().removeAllRanges(); | |
window.getSelection().addRange(range); | |
document.execCommand('copy'); | |
window.getSelection().removeAllRanges(); | |
// Show copied notification | |
const notification = document.createElement('div'); | |
notification.className = 'absolute top-4 right-4 bg-gray-800 text-white px-4 py-2 rounded-lg shadow-lg'; | |
notification.textContent = 'Terminal content copied!'; | |
document.body.appendChild(notification); | |
setTimeout(() => { | |
notification.remove(); | |
}, 2000); | |
} | |
// Initialize with help command | |
window.onload = function() { | |
setTimeout(() => { | |
runCommand('help'); | |
}, 1500); | |
}; | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Karmastudios/plashwizard" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |