How to replace the /adb_keys in device after obtain shell sudo access? #13

Closed
opened 2018-11-25 20:30:40 -08:00 by zenof · 2 comments
zenof commented 2018-11-25 20:30:40 -08:00 (Migrated from github.com)

Great works bro! Thanks for creating such a convenient tool!
It works like a charm when I use to unlock my DPT-RP1.

But I am confused about after obtain shell sudo access, how can I replace the adb_keys file in device to my own public key for security reasons?

I am not familiar with Android system, when I use su and replace the adb_keys file, it works and accept my public key. But every time I reboot the device it will recover to its original version.

Is there any other solution to do that except repack and flash the boot image? Thanks in advance!

Great works bro! Thanks for creating such a convenient tool! It works like a charm when I use to unlock my DPT-RP1. But I am confused about after obtain shell sudo access, how can I replace the adb_keys file in device to my own public key for security reasons? I am not familiar with Android system, when I use `su` and replace the adb_keys file, it works and accept my public key. But every time I reboot the device it will recover to its original version. Is there any other solution to do that except repack and flash the boot image? Thanks in advance!
HappyZ commented 2018-11-25 20:45:32 -08:00 (Migrated from github.com)

Good catch. I should put the master public key in /data/misc/adb/adb_keys and set it permission 0766. When I get a chance, I will change the boot.img and write the keys there instead.

But for now, you are right. For better security, you will have to repack and flash the boot image without /adb_keys (after you put yours to /data/misc/adb/adb_keys).

Good catch. I should put the master public key in `/data/misc/adb/adb_keys` and set it permission 0766. When I get a chance, I will change the `boot.img` and write the keys there instead. But for now, you are right. For better security, you will have to repack and flash the boot image without `/adb_keys` (after you put yours to `/data/misc/adb/adb_keys`).
HappyZ commented 2019-03-22 20:01:57 -07:00 (Migrated from github.com)

I have removed it. However, I did substitute with an insecure adbd for the purpose of another rescuing plan. In short term I plan to keep it as it is.

I have removed it. However, I did substitute with an insecure `adbd` for the purpose of another rescuing plan. In short term I plan to keep it as it is.
Sign in to join this conversation.
No description provided.