final bug fix for su! tried it and works!

This commit is contained in:
HappyZ 2018-11-20 20:39:47 -06:00
parent 866be37c2f
commit e9abab83d8
2 changed files with 13 additions and 4 deletions

View File

@ -8,6 +8,7 @@ Greatly thank
* [shankerzhiwu and his/her friend at XDA](https://forum.xda-developers.com/general/help/idea-to-root-sonys-e-reader-dpt-rp1-t3654725/post78153143) who made the USB hack possible
* [octavianx](https://github.com/octavianx/Unpack-and-rebuild-the-DPT-RP1-upgrade-firmware) who sheds light on the hack
* [janten](https://github.com/janten/dpt-rp1-py) who initiates the commandline tool for web APIs
* `silvertriclops` who points out bugs in `get-su-bin` and "forces" me to test it :D
# 0x2 What does DPT stand for?
@ -63,11 +64,13 @@ After the upload, it will tell you the MD5 of that file in case of corruption. P
It will ask you to confirm if you want to continue, type `yes` after you verify the MD5.
### Obtain shell sudo access (not fully tested)
### Obtain shell sudo access
Thanks `silvertriclops` and I should have fixed my script. If not message me. If the following process fails, it should be recoverable. If you are not comfortable trying blackbox, just follow the `update-binary` in the SuperSU zip. Or you can choose to wait for a flashable pkg coming up. Even without su, you can still install APKs.
If the following process fails, it should be recoverable. Message me.
After success, type `get-su-bin` to enable sudo access in shell.
If you are not comfortable trying blackbox, just follow the `update-binary` in the SuperSU zip. Or you can choose to wait for a flashable pkg coming up. Even without su, you can still install APKs.
After success of `restore-bootimg`, type `get-su-bin` to enable sudo access in shell.
Finally, type `reboot &` and close the tool by pressing `Ctrl +C` or type `exit` or `quit`.

View File

@ -157,7 +157,7 @@ class DPT():
mount system partition to mountpoint
'''
mountpoint = '/mnt/Lucifer'
if not self.diagnosis_mkdir(folder):
if not self.diagnosis_mkdir(mountpoint):
return ""
# umount first just in case
self.diagnosis_write('umount {}'.format(mountpoint))
@ -210,6 +210,12 @@ class DPT():
resp += tmpresp.decode("utf-8").replace("\r\r\n", '')
# change back the original timeout
self.serial.timeout = self.serialReadTimeout
except KeyboardInterrupt:
self.err_print("KeyboardInterrupt happened! Attempting to stop..")
self.serial.write(b'\x03')
while not '@FPX-' in resp:
tmpresp = self.serial.read_until(b'# ')
resp += tmpresp.decode("utf-8").replace("\r\r\n", '')
except serial.SerialTimeoutException as e:
self.err_print('Timeout: {}'.format(e))
self.err_print("Do NOT panic. Command may be still running.")