Automatical keystrokes to exploit
I know it is kind of an over engineering. But what about an automation of this "manual labor" to execute the exploit?
https://github.com/PaulJenkin/PS4RaspberryPi.git is offering this possibility. Unfortunately the approach is not open source.
How can one do this automatically? What is required?
Do you have an idea?
We can use USB HID gadget to emulate a keyboard. Need to enable it as a module first. https://github.com/torvalds/linux/blob/88808fbbead481aedb46640a5ace69c58287f56a/drivers/usb/gadget/legacy/Kconfig#L453
Documentation with example: https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_hid.rst
Or this https://github.com/torvalds/linux/blob/master/Documentation/usb/gadget_configfs.rst
Example: https://github.com/qlyoung/keyboard-gadget
After trial and error, I managed to get it working. I'm using configfs as it is easier to setup. g_hid module is way too complicated to setup; platform driver, platform code, hid descriptor, etc 😩
I will write a keystroke helper based on g_hid documentation.
You're fast!
Maybe you can push your progress to a new branch or to the dev branch so I can test it too.
But no pressure. I can look into it earliest on the weekend.
Just a heads-up, I have a flight tomorrow and I'm not bringing my PS4 with me.
Will commit my findings on sunday.
Pushed to dev branch