File size: 16,592 Bytes
ec29682
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<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>