@@ -296,73 +296,6 @@ async function lock(path) {
296
296
297
297
}
298
298
299
- async function hardlock ( path ) {
300
-
301
- console . log ( "This will reset secure_debug and dm_verity. Make sure you are in stock state or use butter to reflash if not. Type 'yes' to confirm?" )
302
- return confirm ( )
303
- . then ( ( ) => {
304
- return identifyDevice ( path )
305
- /*.then(() => {
306
- console.log("sending flash command for first slot")
307
- return shell(`
308
- umount /proc/cmdline || true
309
- update_engine --update_package=/cache/ota.zip
310
- reboot`)
311
- })
312
- .then(() => {
313
- console.log("waiting 2 minutes (30 seconds spare on just flash v2 goggles) for the flash to complete")
314
- return sleep(120000)
315
- })
316
- .then(() => {
317
- port = new SerialPort({path: portPath, baudRate})
318
- })
319
- .then(() => {
320
- console.log("sending flash command for second slot")
321
- return shell(`
322
- umount /proc/cmdline || true
323
- update_engine --update_package=/cache/ota.zip
324
- reboot`)
325
- })
326
- .then(() => {
327
- console.log("waiting 2 minutes (30 seconds spare on just flash v2 goggles) for the flash to complete")
328
- return sleep(120000)
329
- })
330
- .then(() => {
331
- port = new SerialPort({path: portPath, baudRate})
332
- })*/
333
- . then ( patch )
334
- . then ( ( ) => {
335
- const config = configs [ device ] . debug
336
- config . data = Buffer . from ( "00000E00AF5C5F2800295F2FAF4849444A490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000880AEE0E01D4E85374710961DECE84176BF1F91800000000000000000000000000000000000000000000000000000000" , "hex" )
337
- /*
338
- if(result.data[6] === 0x0e) {
339
- offset = 1
340
- }
341
- //newer devices are et 5
342
- else if(result.data[5] === 0x0e) {
343
- offset = 0
344
- }
345
- */
346
- //config.data = Uint8Array.from(Buffer.from("00000E00AF5C5F2800295F2FAF4849444A490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000880AEE0E01D4E85374710961DECE84176BF1F91800000000000000000000000000000000000000000000000000000000", "hex"))
347
- return talk ( port , config , false )
348
- . then ( ( result ) => {
349
- console . log ( result )
350
- port . close ( )
351
- console . log ( "hardlock should be done, power cycle your device" )
352
- console . log ( "you can use 'shell reboot' and verify nothing happens" )
353
- console . log ( "you should get:" )
354
- console . log ( "harry, i'm sorry, you're not a wizard" )
355
- process . exit ( 0 )
356
- } )
357
- } )
358
- . catch ( ( error ) => {
359
- console . log ( error )
360
- process . exit ( 1 )
361
- } )
362
- } )
363
-
364
- }
365
-
366
299
367
300
function makeShellPayload ( script ) {
368
301
//console.log("executing", script)
0 commit comments