yashsingh1/xdaforums huggingface dataset:
[General Questions and Answers] yanzi:
Cool. I have get the adb working and su working now. Need a small break in Thanksgiving and will be back digging more about dpi settings.

DPT is now a fully functional Android tablet, with ink screen!
[General Questions and Answers] silvertriclops:
How exactly did you mod the boot partition? I know how to dump it but I'm afraid of modifying it because if I do it wrong then my tablet is bricked.
[General Questions and Answers] yanzi:
I wrote a tool to do it: https://github.com/HappyZ/dpt-tools (verified under MacOS only)

Although there is a chance, as long as you have the diagnosis mode, you can fix the brick by dd the boot.img back to the right partition. You can check out my code to learn a bit more.

Boot.img is modified via mkbootimg. You can check out https://github.com/HappyZ/dpt-boot-img/tree/1.4.01.16100-mod to see what I have changed.

And if you want to modify the system.img, you need to change the header size to 32. I also included those a while ago in the github. I'm more interested into building a pkg so you can directly flash it, rather than dumping it to the system partition though. It would be fun to have, just like Android.
[General Questions and Answers] silvertriclops:
This tool is great! Not perfect and I had to do a few things manually though.

Anyway, I backed up my boot partition and flashed your modded one. Now I'm able to connect with adb shell, but the device itself never gets past the Welcome screen and pulls up the password prompt. Also su is not working, it just opens up another limited permission shell.
[General Questions and Answers] yanzi:
Thanks, what didn't work? I can fix it.

It shall boot without problems especially you are just flashing the boot partition. What's the password prompt? You mean the diagnosis mode?

I haven't tested the su part in the automated script but tried the steps manually. There might be some issues in the script. You can refer to the system approach in update-script from SuperUser.apk to do it manually.
[General Questions and Answers] silvertriclops:
The password prompt on the device itself, where it asks for the password for decryption before it finishes booting. And not sure what's up with su, I'm not very experienced with this stuff but it seems like the binary exists, just not doing what it's supposed to.

edit: just restored my original boot.img backup and it's still stuck on the welcome screen with the loading circle...
[General Questions and Answers] yanzi:
Oh the device encryption is enabled? I have never enabled it so I never tested that.. that could be it..

You shall restore your original boot.img, and disable encryption and try it.

And su didn't work might be because of it. There's a script to run daemonsu to allow su kicking in, and if it stucks at the decryption, it could be not running at all.

---------- Post added at 09:13 AM ---------- Previous post was at 09:09 AM ----------

Did you check the md5 of your backed up boot.img? Is it successfully copied? (match the md5 of your backup)

You shall be checking "adb logcat" to see what's wrong.
[General Questions and Answers] silvertriclops:
Restored my original boot.img and it still gets stuck at the welcome screen. How do you disable encryption on this? I thought it was enabled by default and nothing you can do to change it.

Or are you running this right after you run /usr/local/bin/factory_reset.sh?

edit just ran factory_reset and it definitely wipes data (I had everything backed up of course) but still gets stuck on the welcome screen
[General Questions and Answers] yanzi:
No I didn't do any reset. I thought it was encryption as I never saw password prompt before. I guess if you don't set password protections on device, there should be no prompt. I did check the modded boot.img before I made changes and the version on my device are matched. There may be something wrong with the su script that changes device behavior.

Can you validate in diagnosis mode the following file exists in /system parition?

first mount partition `/dev/mmcblk0p9` and assuming mount point is `/mnt/Lucifer/` then:

/mnt/Lucifer/bin/app_process

/mnt/Lucifer/bin/app_process32

/mnt/Lucifer/bin/app_process_init

And oh I did find a small bug in the script: you should `mv /mnt/Lucifer/bin/.ext/su /mnt/Lucifer/bin/.ext/.su`

I find where your problem could be. It shall miss file `/mnt/Lucifer/bin/app_process` and `/mnt/Lucifer/bin/app_process_init` due to some bugs I had in the script. Sorry about that. I'll write you a step-by-step guide to fix it.
[General Questions and Answers] hdwrp:
Could you please confirm DPT-RP1 with fully functional Android can connect to Bluetooth keyboard to type or to turn the PDF pages?

Thank you.
[General Questions and Answers] silvertriclops:
I remember when I checked, app_process did not exist. I'm assuming that's where the problem is as that's a pretty essential file.

I just copied the latest official FwUpdater.pkg to my device and ran it with start_eufwupdater.sh. It booted fine to the setup screen after that, so at least I know that as long as I can boot into diag I can recover it.

Another thing I have found is that if you're in diag and run /usr/local/bin/mass_storage, it'll mount as a mass storage device to your PC. Copying files that way is much faster than through serial. Then eject, ctrl-c,

mount /dev/mmcblk0p16 /mnt/sd
[General Questions and Answers] yanzi:
Download the following file:

View attachment 4648071

And do the following (in diagnosis mode):

```

mount /dev/mmcblk0p9 /mnt/Lucifer/

cd /mnt/Lucifer/bin

rm app_process

rm app_process32

rm app_process32_original

rm app_process_bak

rm app_process_init

ln -s /system/xbin/daemonsu /mnt/Lucifer/bin/app_process

ln -s /system/xbin/daemonsu /mnt/Lucifer/bin/app_process32

```

Then use the tool to upload file unzipped from above tar by:

```

push-file

> Local folder path: app_process_original

> DPT file path: /mnt/Lucifer/bin

```

Then:

```

cp /mnt/Lucifer/bin/app_process_original /mnt/Lucifer/bin/app_process_init

chown 0.2000 /mnt/Lucifer/bin/app_process_init

chmod 0755 /mnt/Lucifer/bin/app_process_init

```

This should solve the problem.
[General Questions and Answers] yanzi:
That's elegant. Well, I was just reinventing the wheel then. Good to know it works!

Good to hear, I wrote you a small recovery steps also.. I fixed the script (hopefully) so it wouldn't make the same mistake again.
[General Questions and Answers] Anti-paradox:
Hi, thanks for the all those involved, you guys are amazing!

Now I am also trying to install a-the ABD on my device, but it appears to be unauthorized,

So how do I fix it, do I just kill add server, and request for reboot?

Also, how would adbkey(provided) help in this process?

Thanks!
[General Questions and Answers] yanzi:
You just need to follow the key pairing process and provide the adbkey. I agree it is not a great approach but..

Backup your original adbkey from ~/.android/adbkey to ~/.android/adbkey_bak

And replace it with the provided one

After you got su you can replace /adb_keys with your own public key.

---------- Post added at 10:40 AM ---------- Previous post was at 10:25 AM ----------

Ok I have tested the su part of the script and it should fully work now. Plz let me know.
[General Questions and Answers] Anti-paradox:
Thanks!, but how would you push the existing adbkey to the device to replace the old one?

I tried add -push no success.

Any ideas on how to do that? (did it already)

still working on it...

Ok, so it is still not authorized,

I backup the adbkey, along with adbkey.pub, so here is what it looks like now:

adbkey	adbkey_bak	adbkey_bak.pub

where the adbkey is the given one

Now how can I fix this issue?
[General Questions and Answers] yanzi:
Assuming your adbkey is in `/magic/path/adbkey`

And the public key is in `/magic/path/adbkey.pub` (should not be needed but just in case, it's here)

Detailed steps in a terminal is:

```

adb kill-server

cd ~/.android/

mv adbkey adbkey_bak

mv adbkey.pub adbkey.pub_bak

cp /magic/path/adbkey adbkey

cp /magic/path/adbkey.pub adbkey.pub

adb devices

```

And I think this should work

And after you get su, replace the /adb_keys in device to your own adbkey.pub, and restore your own private and public keys.
[General Questions and Answers] Anti-paradox:
A lot of thanks, solved!

Turns out I rename the wrong file, silly mistake there.
[General Questions and Answers] silvertriclops:
I wasn't able to get that to work. But since it looks like you updated the script I might as well try that again. Going to take a break and bike a few miles then factory reset my DPT again so I can try your updated script with a clean slate (no pun intended)

Anyone want to set up a discord server? That would be easier than checking this thread every few minutes, and once a solution is found we could post it here.
[General Questions and Answers] Anti-paradox:
sudo access declined

I tried to ssh into the device and try some sudo commands, but it seems that I am not able to gain this su access.

This is what pops up when I type "get-su-bin"

[info] Mounting /system partition..

[error] name 'folder' is not defined

How would this be fixed?

Thanks Again!
[General Questions and Answers] silvertriclops:
Open python_api/libDPT.py

Find this line:

if not self.diagnosis_mkdir(folder):

Replace it with:

if not self.diagnosis_mkdir(mountpoint):
[General Questions and Answers] Anti-paradox:
Emm. the bug is somehow still there:

here's what I got:

[info] Mounting /system partition..

[info] /mnt/Lucifer already exist

[info] Mounted to

[error] Nothing happened..

I checked the InteractivePy file, it should be the problem with mount point(Although I have no idea about what this will do)

Could you check this issue again? Many Thanks!
[General Questions and Answers] yanzi:
Update the script and try again. The folder check was flipped.
[General Questions and Answers] Anti-paradox:
I think this could be the issues, in libDPT.py, line 166:

if self.diagnosis_isfolder('{}/xbin'.format(mountpoint)):

return mountpoint

and same file in line 120:

'''

check if file exists given file path

'''

cmd = "[[ -d {} ]] && echo 'YESS' || echo 'NONO'".format(folderp)

return 'YESS' in self.diagnosis_write(cmd)

where it is set to false, which is why the mount point is left empty, leading to failure.
[General Questions and Answers] yanzi:
Yea I just fixed it. Thanks for trying out. I don't have a clean device now so I can't fully test it. See if with the update you get it through.
[General Questions and Answers] Anti-paradox:
many thanks!

I just tested this version, issues completely solved!

Sudo access reclaimed successfully.
[General Questions and Answers] yanzi:
Can you go to `adb shell` and then `su` to test it? Just need confirmation as I did the script after I manually did everything.
[General Questions and Answers] Anti-paradox:
Yes it has been tested, rock solid.

The user appears as "root"

Also, where would be the best place to install Apks in order for them to show up on the home screen?

Thanks in advance

Here's what I found under system/apps:

ActionExecutor

ActionSenderService

AppLauncher

ApplicationGateway

BasicDreams

Bluetooth

Browser

Can we somehow evoke the built-in browser?
[General Questions and Answers] yanzi:
It won't show up on home screen unless you install a launcher. There are tons of places to download APKs.

But I want to warn you and anyone who gets su:

It will leave your system in vulnerable states. Try to avoid installing any suspicious APKs. It is now as weak as any other Android rooted devices.
[General Questions and Answers] p4s2wd:
How to enable ADB on dpt1

1. Launch the "Android setting" via a Launcher

2. Go to "System" and find "About phone"

3. Find "Build number", and click it in 7 times. The machines says you're the "Developer".

4. Back to "System", there is new Menu "Developer options" displayed.

5. Go to "Developer options", and find "USB debugging", enable it.

6. Connected the RP1 and PC via USB cable

7. On PC, run the adb devices, it will find the device.

8. With ADB, you can do anything you want ;)

---------- Post added at 05:06 AM ---------- Previous post was at 05:02 AM ----------

The home button is defined from /etc/dp_extensions, you could copycat the "NoteList" into "Browser" as following

Browser_extension.xml

Browser_strings-en.xml

Browser_strings-en.xml.bak

Browser_strings-ja.xml

Browser_strings-zh_CN.xml

ic_homemenu_browser.png

The URI for Browser is component=com.android.browser/.BrowserActivity
[General Questions and Answers] Anti-paradox:
Many thanks to this follow up, since I am also thinking about adding the default browser to my home screen.

Could you clarify on "copycat the "NoteList" into "Browser"?

Are these files you listed pre-existing files? And if so, where do I find them?

I am a bit confused about what this will actually do...

Thanks!
[General Questions and Answers] yanzi:
Interesting stuff! Taking notes now :D

---------- Post added at 01:24 PM ---------- Previous post was at 01:23 PM ----------

I only know Bluetooth works. I don't have a keyboard to test but I assume it works also. There's nothing preventing it working.

---------- Post added at 01:25 PM ---------- Previous post was at 01:24 PM ----------

He meant you can use adb shell to get into device, and add an extra file named Browser to folder /etc/dp_extensions and use the similar contents in NoteList.
[General Questions and Answers] p4s2wd:
1. Boot rp1 into DIAG mode, and mount SYSTEM into /mnt/system

2. mkdir /mnt/system

3. mount -t ext4 -o rw /dev/mmcblk0p9 /mnt/system

4. cd /mnt/system/etc/dp_extensions

5. cp -pir NoteList Browser

6. cd Browser, and renamed all files under this folder as following:

Browser_extension.xml

Browser_strings-en.xml

Browser_strings-ja.xml

Browser_strings-zh_CN.xml

ic_homemenu_browser.png

7. Modify Browser_extension.xml and change "NoteList" with "Browser", and also change the URI value with "intent:#Intent;component=com.android.browser/.BrowserActivity;end", order with 7

8. Modify Browser_strings-en.xml and change "NoteList" with "Browser".

9. Reboot

10. Once the machine booted, process "Home" button, you will see the miracle ;)
[General Questions and Answers] Anti-paradox:
Interesting, I see what you mean.

I suppose the first step, as you listed it, is to get rid of "read-only" state for the sys.

The question is, how would you Access RP1 and fix mount points?

Adb shell do not allow this in Diag mode, so I have to think of some of ways.

Any ideas?

Thanks
[General Questions and Answers] p4s2wd:
You can boot the rp1 into diag mode, you're the root in DIAG mode. You can mount the partition and change anything you want.
[General Questions and Answers] silvertriclops:
Any way whoever has the taobao rooted DPT can post their dp_extensions folder? No matter what changes I make to mine, AppLauncher crashes on boot. (In fact, now it's crashing even after undoing all changes so I have to wipe and start over again...)
[General Questions and Answers] ghostwheel:
Thank you! Can you explain what this is and how to use it?
[General Questions and Answers] sisyphose:
brick

hello, i do it follow your code, and I don't understand 6-9 how to use, then i reboot it, the restart remain"welcome" and could not login into the system, can you help me solve it? Thank u

---------- Post added at 12:09 PM ---------- Previous post was at 11:16 AM ----------

Hello，I use putty and did this step "ln -s /system/xbin/daemonsu /mnt/Lucifer/bin/app_process32", and I reboot the device, now the restart remain"welcome" and could not login into the system, can you help me solve it? Thank u

---------- Post added at 12:58 PM ---------- Previous post was at 12:09 PM ----------

I meeted the same problem， did you solve it already?
[General Questions and Answers] softtrain:
mount -t ext4 -o rw /dev/mmcblk0p9 /mnt/system

run ./usr/local/bin/factory_start.sh ./mnt/system/etc/FactoryReset.pkg

this could help to restore the system
[General Questions and Answers] silvertriclops:
This won't restore system, it just wipes data. If you're getting stuck on the welcome spinner, you need to reset system.

You need the official FwUpdater.pkg (should be inside this zip https://github.com/Antiparadox/Sony-Digital-Paper-Hack/tree/master/firmware 1.4.0.1) and the unzip keys (https://github.com/octavianx/Unpack-and-rebuild-the-DPT-RP1-upgrade-firmware?files=1).

Method one: If you use a Unix PC (or windows with WSL) follow the instructions in the 2nd github to unpack the FwUpdater.png. Pull out system.img and use extract_sparse_file to flash it to the appropriate mmcblk.

Method two: Put FwUprater.pkg and the out folder with the keys on the device itself, and use start_eufwupdater.sh to run the update on the device. Do note that it will update, but the next time you boot into diag it'll update it again. So after running it, reboot back into diag so it can run the update again before you make any changes.

None of these should wipe your data but you may have to anyway because of encryption stuff. For that you want to use factory_reset.sh in diag, or do it manually.

Sorry I can't get the exact commands right now. I'm on my phone. I'll write a better tutorial once I get back to my laptop.
[General Questions and Answers] eigenloss:
Hey all,

I have a DPT-S1 which unfortunately has a physically damaged/corrupted eMMC - doesn't boot and the CPU doesn't release a GOOD signal.

Is anyone able to share their boot image or a copy of the non-user partitions on their tablet? I may be able to figure out which testpoints on the board give access to the DAT0/CMD/CLK/VCC/VCCQ pins if any of you have readers.

Thanks so much!

---------- Post added at 05:46 AM ---------- Previous post was at 05:19 AM ----------

It will definitely be easier to dump an image over USB/root, but here is a pinout for the record. The resistors are labeled in the (blurry) image as described below.

1 - DAT0

2 - DAT1

3 - either CLK or CMD

4 - either CMD or CLK

5 - DAT3

6 - DAT2

Edit: this is the DPT-RP1 thread, isn't it.
[General Questions and Answers] Anti-paradox:
iWnn Ime keyboard crashes

Hi, does anyone encounter a keyboard crash after rooting this device?

I did not install any app on this devices, and hardly use any features after rooting (except the browser, changing the language to Jpn)

But this morning when I wake up, the built-in iWnn ice keyboard crashes, whenever I demand an input, this menages pops up:

"Unfortunately, the iWnn ime keyboard has stopped"

Any light on this?

Thanks
[General Questions and Answers] Anti-paradox:
Update: Got it;

Here's something that might be interesting to look at:

https://developer.android.com/reference/android/provider/Settings

if you change input_method and disable Iwnn, you should be fine!
[General Questions and Answers] p4s2wd:
Enabled the ADB and tried to run the following command

adb shell am start -a android.settings.LOCALE_SETTINGS

Once the UI display, select the English, and reboot the device again.
[General Questions and Answers] dimitrios.tziouris:
Has anybody been able to use the rooted DPTRP1 as an external monitor? A small guide would be great!
[General Questions and Answers] p4s2wd:
You can enable the input method with following command:

am start -a android.settings.INPUT_METHOD_SETTINGS
[General Questions and Answers] Anti-paradox:
Does any one has any idea how to launch app launcher in the terminal? I accidentally crash it after altering certain attributes

I tried am start -a android.intent.action.MAIN -n com.sony.apps.applauncher/.activities.MainActivity

but the name of the activity is not correct, so I cannot debug on that.

Any help? Thanks!
[General Questions and Answers] Anti-paradox:
Updates:

It seems that this app cannot be launched, as no luanchable activity is provided...
[General Questions and Answers] silvertriclops:
input keyevent KEYCODE_HOME

The default home screen is set as the main DP app (unless you install another launcher) but pushing the home button on this device (which that command does) pulls up the AppLauncher.

---------- Post added at 06:21 PM ---------- Previous post was at 06:11 PM ----------

Things I'm still trying to figure out - has anyone gotten these down besides ladyhack and the other taobao guys?

Adding stuff like the home screen, browser, etc in App Launcher. I tried to copy one of the dp extension folders and modified it exactly as [MENTION=9564264]p4s2wd[/MENTION] said here but it either doesn't show up, or App Launcher crashes on boot and can't be fixed without wiping /data.

DPI stuff. Doubling the DPI works great for most apps but then the DP app gets messed up. Anyone know of a way to mod the DP app or something so changing the DPI doesn't screw it up?

OneNote crashes as soon as I try to draw with the pen :( any other note apps that have been tested to work?

The DP app stores its PDFs in folders and files with random filenames. If I change those filenames will it still work? Trying to figure out if I can use a sync app so I can use the DP note app without having to sync with Sony's PC app and instead just use Google Drive.

Status bar (not that big of a deal) and nav bar (actually useful) seem to be not only disabled but completely missing from the system. I tried to enable the nav bar in build.prop and nothing happened. This means no back button. I did try installing a 3rd party nav bar but it doesn't auto hide in the DP app, the home button just opens the App Launcher and the recents screen also seems to be completely missing.
[General Questions and Answers] sartrism:
I updated the original post briefly summarize what you guys did. It's so awesome! I also changed the title because my question has been answered.

Sorry that I'm not familiar with XDA and I didn't follow all the conversations, so let me know if I need to add more. For example, I feel sorry that I don't know who should I give the credit.
[General Questions and Answers] jess91:
Thanks for sharing.

What exactly does this "root" allow out of the box? Does it unlock ability to hidden options in Sony's DP software itself, for example to allow opening of formats other than pdf using Sony's own software? Does it allow access to device storage as a regular USB drive without having to transfer books using Sony's software?

I understand apps can be sideloaded using apk files but to get full Android with features like Google Play Store requires the "taobao" firmware and this is not available. Is that right?
[General Questions and Answers] hdwrp:
Anybody able to install Google Play Store so we can download and use paid apps?
[General Questions and Answers] sartrism:
I didn't use any metaphor. Rooting is rooting. You can always sideload gapps or extract necessary components from them as usual. If you want 'taobao' firmware whatever that is, you can ask one of kind users here who already have that to get the image and flash it.

But why though? E-readers are different from android tablets by their purpose. It is a common wisdom among e-reader users to use minimal and optimized apps for those devices. (They are usually made by manufacturers and extracted from these kinds of rooted devices.) You can sideload a decent reader that supports many formats other than pdf and some dedicated bookstore apps including kindle. I don't see any reason why I have to shop in Play Store as I do in smartphones.
[General Questions and Answers] zambo91:
Hi guys

Im following the rooting since a year now

Will be possible to unlock the blutootg with the root?

Possibility to pair a page turner would be a "buy now" news for me:)

Or do you think will be possible in the near future?
[General Questions and Answers] jess91:
The Taobao firmware has been mentioned frequently in this and other threads and is about more than just Google Play. My main curiosity is whether there are features in the Sony software that could be unlocked with root. If, for example, root can be exploited to use epub files with Sony's software this would, for my needs, eliminate having to sideload a secondary ereader app like Moon+ Reader avoiding issues such as DPI which is one of several arguments to still opt for the Taobao, see: