android-usb-gadget icon indicating copy to clipboard operation
android-usb-gadget copied to clipboard

My Preferences rests after every Reboot

Open cipherswami opened this issue 3 years ago • 4 comments

I added hid.keyboard to g1, after I reboot it is gone. I even tried with my g2, which has hid.keyboard and hid.mouse, it also disappears after reboot.

cipherswami avatar May 16 '21 18:05 cipherswami

Yes - there is no persistence yet. It would be great to get some help on this feature :) Also it is not easy to implement it as you have to be careful not crashing your phone and so on....

tejado avatar May 17 '21 06:05 tejado

Found out why it is happening, boot IMG checks for tampering on every boot, And restores it to default system IMG if found any. The only way you can have persistence is to compile a custom kernel with hid patch enabled.
Anyways tejado you have done great work bro !!!
Trust me when I say, compiling kernel that to the stock kernel is not an easy task.

cipherswami avatar May 18 '21 09:05 cipherswami

No, this is not the only way :) I plan to implement an startup action into the app which sets the specified gadgets at device boot. Android is doing it the same with the initrc usb scripts.

tejado avatar May 18 '21 09:05 tejado

Oh Damn, that's awesome !!! A small suggestion, don't integrate it inside the app, give us a switch option whether to start on bootup or not. I particularly don't like app starting at bootup running in BG. XD

cipherswami avatar May 18 '21 10:05 cipherswami

Added over #40

tejado avatar Oct 29 '22 12:10 tejado