I had previously disabled all this long press stuff and key mapping.
I ran into problems before when I just deleted res/raw/keypad.json and res/raw/bt_keypad.json from /system/framework/framework-res.apk
The least intrusive way to disable access to these two files is to rename the filenames in the .zip (.apk) in the local header.
These numbers are from the Poke3 but other models will have stuff in approximately the same place.
Code:
C:\>findtext framework-res.apk keypad.json
00B2BCBD res/raw/bt_keypad.json // manifests
00B2BD91 res/raw/keypad.json
01539DDE res/raw/bt_keypad.json // zip local headers
0153A5A1 res/raw/keypad.json
016A3844 res/raw/bt_keypad.json // zip global headers
016A39E5 res/raw/keypad.json
C:\>modfile framework-res.apk 1539DDE 7a // k -> z
C:\>modfile framework-res.apk 153A5A1 7a // k -> z
(Your tools are probably named something else, but you get the idea.)
Then you'll need to put the modified file in a Magisk module.
You should probably make a module just for yourself that you can throw in odds and ends.
Making a module like this is easier than a packaged module for distribution.
Just make your own directory:
Code:
# cd /data/adb/modules
# mkdir -p MyModule/system/framework
Then you'll need to make the MyModule/module.prop file. It's nothing critical, just give your module some names. It's all documented here:
https://topjohnwu.github.io/Magisk/guides.html