diff --git a/.gitignore b/.gitignore index 353c5f8..dc93b12 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/ tmp/ -dist/ +dist/ \ No newline at end of file diff --git a/src/exploit.js b/src/exploit.js index 2031c52..01fc6a8 100644 --- a/src/exploit.js +++ b/src/exploit.js @@ -296,73 +296,6 @@ async function lock(path) { } -async function hardlock(path) { - - 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?") - return confirm() - .then(() => { - return identifyDevice(path) - /*.then(() => { - console.log("sending flash command for first slot") - return shell(` - umount /proc/cmdline || true - update_engine --update_package=/cache/ota.zip - reboot`) - }) - .then(() => { - console.log("waiting 2 minutes (30 seconds spare on just flash v2 goggles) for the flash to complete") - return sleep(120000) - }) - .then(() => { - port = new SerialPort({path: portPath, baudRate}) - }) - .then(() => { - console.log("sending flash command for second slot") - return shell(` - umount /proc/cmdline || true - update_engine --update_package=/cache/ota.zip - reboot`) - }) - .then(() => { - console.log("waiting 2 minutes (30 seconds spare on just flash v2 goggles) for the flash to complete") - return sleep(120000) - }) - .then(() => { - port = new SerialPort({path: portPath, baudRate}) - })*/ - .then(patch) - .then(()=> { - const config = configs[device].debug - config.data = Buffer.from("00000E00AF5C5F2800295F2FAF4849444A490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000880AEE0E01D4E85374710961DECE84176BF1F91800000000000000000000000000000000000000000000000000000000", "hex") - /* - if(result.data[6] === 0x0e) { - offset = 1 - } - //newer devices are et 5 - else if(result.data[5] === 0x0e) { - offset = 0 - } - */ - //config.data = Uint8Array.from(Buffer.from("00000E00AF5C5F2800295F2FAF4849444A490000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FF0000000000000000000000880AEE0E01D4E85374710961DECE84176BF1F91800000000000000000000000000000000000000000000000000000000", "hex")) - return talk(port, config, false) - .then((result) => { - console.log(result) - port.close() - console.log("hardlock should be done, power cycle your device") - console.log("you can use 'shell reboot' and verify nothing happens") - console.log("you should get:") - console.log("harry, i'm sorry, you're not a wizard") - process.exit(0) - }) - }) - .catch((error)=> { - console.log(error) - process.exit(1) - }) - }) - -} - function makeShellPayload(script) { //console.log("executing", script)