The Ultimate Rooting Guide - HappyZ/dpt-tools GitHub Wiki

About this guide

This guide provides basic rooting procedure in details. If you are new, this is the right place to start.

If you already hacked the system, but want to upgrade, please use this guide.

Versions

It works on any DPT-RP1s or DPT-CP1s with version number 1.6.50.14130 or below as of 04/05/2020 (no diagnosis mode bug fix in this update).

NOTE: They may have already patched the diagnosis mode script bug for new devices manufactured after Sept. 2019 . (reported in this issue).

Requirements

Software

You need to install python 3.x. And then install the following in computer terminal:

pip install httpsig pyserial urllib3 requests

If you have Windows PC, make sure your PATH environment is correct so you can run python and pip properly.

Also, download dpt-tools from the git.

Hardware

  • You need your DPT device connected to Wifi
  • You also need the DPT to be charged at least 80% (just to be safe)
  • You need a PC in the same subnet as your DPT device (e.g., on the same Wifi network)

Steps

For the following steps, we assume your device boots up normally, and has connected to WiFi. We also assumed you installed the official DPA software, at default locations.

0x1 Validate Successful Connection

Simply run python dpt-tools.py in computer terminal and it should automatically find required information.

If success, you will see:

===========
 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

>>> 

If it didn't work, try python dpt-tools.py -ip <your device ip address>. For example, python dpt-tools.py -ip 192.168.2.100.

You can also specify your id and key files (referred from janten's dpt-rp1-py) by:

python dpt-tools.py -id <deviceid file path> -k <your key file path> -ip <ip address>

Then you will enter the interactive mode on your computer terminal. Read below first before proceeding.

0x2 Get Diagnosis Mode and Patch Updater Script

Download this PKG from here. It does three things: changing diagnosis password, enabling diagnosis mode without OTG cable, and patch the updater script.

In the interactive terminal, type fw and press Enter key.

It'll ask the file path of the PKG. Type the full file path, or drag the file into terminal.

Then it'll ask you to confirm. Type yes and press the Enter key. Your DPT will say preparing for the update... and then the DPT will restart. You can exit the tool safely by pressing Ctrl + D. Example below:

>>> fw
[info] Please make sure you have charged your battery before this action.
>>> Please enter the pkg file path: xxxx/FwUpdater.pkg
>>> Pleae confirm xxxx/FwUpdater.pkg is the pkg file to use [yes/no]: yes
[info] fw updating in progress.. do NOT press anything..
[info] Success!
>>> ^D
[info] Exiting... Thanks for using...

You will see multiple lines printing, starting with the LICENSE. For every step, it will print the files being changed and pause for 30s. You can press the HOME key to bypass the waiting. If you don't see it, but directly get rebooted, then likely the script does not work for your device.

After the device rebooted after those lines printed, a window pops up saying the update is failed. Don't worry, you are all good.

(Optional) To validate the success, in the interactive terminal, type diagnosis and follow the instruction to get into diagnosis mode. If you see 3 bars appearing on the top left while device booting up, you are done! To get out of diagnosis mode, you need to type reboot.

Note: In any case you find the printed message is weird, or errors happen that you see on the screen, you can press POWER key to roll back the original files and exit safely.

Note2: Absolute do NOT try to decompile the PKG on your computer via the unpack tool in the script.

0x3 Obtain Android ADB (Root) Access

The modification will change your Android boot partition. If you are not sure what ADB is, please read this xda page.

Download corresponding PKG for your system version:

  • 1.4.01.16100 (for RP1) download
  • 1.4.02.09061 (for CP1) download
  • 1.6.00.15110 (for both RP1 & CP1) download (official PKG has bugs, removed)
  • 1.6.02.06240 (for both RP1 & CP1) download 07/30/2019 released earlier than expected, ta-da!
  • 1.6.03.09261 (for both RP1 & CP1) download 11/23/2019
  • 1.6.50.14130 (for both RP1 & CP1) download 04/05/2020

If not found, request it in Issues and wait for your modifications out. Don't proceed with a different version.

Now, get back to the interactive terminal. If the terminal is not responding, likely it lost connection with your device, or if you already exited, just exit and rerun python dpt-tools.py.

Then type fw and press Enter key again. It'll ask the file path for the downloaded PKG . Enter the full file path (or drag the file into terminal) and press Enter key. Similar to before, confirm by saying yes. After the device restarts and updates, it will show an error message saying update failure, but it is actually flashed.

NOTE: If python dpt-tools.py doesn't work as Wifi isn't connected after your device reboots, you can use diagnosis mode via python dpt-tools.py --diagnosis and then use install-pkg to install the downloaded PKG.

To validate, in your computer, quit dpt-tool and in terminal run adb devices to see if your device appears. If it didn't show up:

  • Check your cable
  • Try adb kill-server && adb devices
  • If you are using MacOS, log off and log back in (or reboot)
  • If you are using Windows, you should use <path/to/adb>/adb.exe devices instead (you can download it according to this xda page)

0x4 Obtain Android Root Access (Optional, Subject to Change)

This does not depend on step 0x3.

Download FwUpdater.pkg from this example.

Boot into normal system, use fw in the tool.

0x5 AppLauncher Mod (Optional)

This depends on step 0x3.

Check this wiki page

⚠️ **GitHub.com Fallback** ⚠️