HappyZ / dpt-tools

dpt systems study and enhancement
MIT License
565 stars 130 forks source link

Fail to login - root password is not what is in the script #130

Closed TomOke closed 5 years ago

TomOke commented 5 years ago

Used the information in the wiki to build the diagnosis mode adapter and the rooting instructions to try to get into the device to enable adb and install software, but when I get to the point in dpt-tools that it would do the login (after entering diagnosis mode, getting the black square and replying to dpt-tools), I get "failed to login..".

Manually trying to login through the /dev/ttyACM0 that I have as a serial device I find that the password stated in libinteractive.py: "if not dpt.diagnosis_login(username='root', password='12345'):" does not achieve login to the root login prompt. I have had this with both the older 1.2.02.07211 and the latest 1.6.02 fiirmware.

The following is the result of trying to connect.

dpt-tools$ python3 dpt-tools.py --addr 10.0.1.205 --client-id ../5032544-2nd/deviceid.dat --key ../5032544-2nd/privatekey.dat

DPT Tools

Thanks for using DPT Tools. Type help to show this message. Supported commands: fw -- update firmware diagnosis -- enter diagnosis mode (to gain adb, su, etc.) exit/quit -- leave the tool

diagnosis [info] Steps to enter diagnosis mode: [info] 1. Turn off DPT [info] 2. Hold HOME button [info] 3. Press POWER button once. Then light blinks yellow [info] 4. Release HOME button, a black square will show up [info] 5. Connect to computer [info] 6. (Windows) After step 5 you can use device manager to find which COM port DPT is connected to. E.g. COM5 [info] Notice that if your DPT is in diagnosis mode, you can exit it by pressing the reset button. [info] If this program exits, and your DPT is still in diagnosis mode, [info] you get here again by starting with parameter --diagnosis [info] It is also possible to interact with diagnosis mode with a serial terminal, such as putty. Black square on the screen? [yes/no]: yes Enter the serial port [/dev/tty.usbmodem01]: /dev/ttyACM0 [error] failed to login.. [info] got out of diagnosis

Would I be right that the password is incorrect?

Suggestions are welcome.

HappyZ commented 5 years ago

no the password should be right

you should try to log in manually via screen /dev/ttyACM0. If it didn't work, that would be the reason the script fails.

normally the device path is /dev/tty.xxx on MacOS. Maybe try USB0 instead if it exists

TomOke commented 5 years ago

I am running on an Ubuntu so the ttyACM0 is what I get. I connect in through minicom and get:

Welcome to minicom 2.7

OPTIONS: I18n Compiled on Nov 15 2018, 20:18:47. Port /dev/ttyACM0, 16:38:49

Press CTRL-A Z for help on special keys

and nothing more until I enter a newline, then it returns:

FPX-1010 login:

At that point respond with root and then the password response is 12345:

FPX-1010 login: root Password:

Login incorrect FPX-1010 login:

Which is why I was presuming that the password is wrong. After this I get a:

Login timed out after 60 seconds.

FPX-1010 login:

Doing putty on a Windows 10 machine gets the same login incorrect response.

TomOke commented 5 years ago

I'll see about borrowing a Mac and see if it is any different, on the assumption that bogus characters are getting injected.

Is it possible that Sony has changed the password in a different region?

HappyZ commented 5 years ago

ah figured you were using linux.. i never tested that on linux so it may behave differently

ideally they should be the same as I was using cross-platform python package (pyserial).. I suspect it to do with how serial port file works differently on Mac and Linux.

do let me know

HappyZ commented 5 years ago

Is it possible that Sony has changed the password in a different region?

they may, but not in the present packages.

also, it would be weird that your password isn't replaced by the exploit package. when you flash through fw and got the diagnosis mode, what are the words saying about your root password replacement?

HappyZ commented 5 years ago

as a reference, the exploit on password: https://github.com/HappyZ/dpt-tools/blob/3b144d2997136531c71c5619bc0209701c94e550/fw_updater_packer_by_shankerzhiwu/pkg_example/hack_basics/FwUpdater/startprocess.sh#L46-L54

TomOke commented 5 years ago

I have found that pyserial on the linux box I used has worked for me before when I developed some code, so I think that that should be fine.

I went straight to diagnosis mode. I am away from the DPT and won't get to it for a few days, but will try the fw, then diagnosis and will get back to you. Thanks very much for your responses.

TomOke commented 5 years ago

Worked just perfectly today, when I used fw.pkg and then the updater. Was able to get root, adb and install the APKs I wanted.

Thank you very much.

I had been hesitant to do any firmware update, and though your documentation was first rate, I entirely missed the purpose of the steps was to get the fw conditioning, as opposed to just running the diagnosis. I mussed the forest for the tree.

yangcht commented 4 years ago

Hey. I tried to find the port serial on MacOS Mojave, but I can not find one... I tried searching for /dev/tty*, nothing is there related to the USB... Could you please help?