hyugogirubato/KeyDive

Cannot hook to the process even though all requirements are satisfied [Pixel 4a 5G]

Closed this issue · 3 comments

error_1

error_2

photo1717476247

I have downgraded from L1 to L3 using oemcryptodisabler but somehow it still cannot hook to the process. It seems like it can't even find the process(?)

Also attached here is my function.xml file
function.zip

Sometimes there is a phenomenon where the DRM module is not initialized until it has been loaded the first time by a video player. This is also why the procedure indicates that you must first play a DRM video for the first time THEN launch the script and reload the page (bitmovie DRM demo player for example).

The page must remain active so that the module remains visible to Frida.

Try again following this order and keep me informed. (and yes, it is very likely that you will have to use function.xml given the topology of your device).

I tried with the method mentioned above, somehow it still cannot hook to the process.

But, I've made some progress after inspecting via logcat for the name of the process to be hooked :

logcat

so I tried to rename the targeted process name in vendor.py as such :

hooks

which is a success, but weird because in DRM Info my SDK is 18.

And this brings me to another problem;

error 3

Edit:

I tried to find the function names to be hooked via Frida and I am not sure whether it is the correct one [kitajmgu] or just another obfuscation method.

hooked

Well I solved it thanks to the help of this comment: #13 (comment) and it successfully hooked to the right process name.

privkey

But I guess that Python has issues with my device name's whitespace which throws this error:

error_dir

which I am too lazy to find out and fix, so I just modified the code in cdm.py line 252 to just make one level directory.

path = Path() / 'device' / str(self.device.name) / 'private_keys' / str(drm_certificate.system_id) / str(key_id)[:10]

to

path

All in all, much thanks to the owner @hyugogirubato for this awesome code and for the support given.