Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put the layout into /vendor instead of /system #3

Closed
DemianDo opened this issue Jan 25, 2024 · 4 comments
Closed

Put the layout into /vendor instead of /system #3

DemianDo opened this issue Jan 25, 2024 · 4 comments

Comments

@DemianDo
Copy link

DemianDo commented Jan 25, 2024

Hello @Jefferderp,
Thanks for this wonderful plugin. I spent 2 days searching over the internet trying to find a way to edit /vendor/usr/keylayout/Generic.kl on my TV Box with Android TV 10 and Magisk installed and now thanks to you I'm almost there!
I've tried to unzip your plugin and rename "system" folder to "vendor", but unfortunately I still have the original /vendor/usr/keylayout/Generic.kl file after installation.

Installing modified Generic.kl into /system/usr/keylayout/ was successful, but the buttons on my remote are still working as before, so nothings changed.

I would be extremely grateful if you can modify your plugin in a way to make the folder /vendor/usr/keylayout/ as a destination.

@Jefferderp
Copy link
Owner

Hey there! I'm glad you got some use out of this module. I threw this together in an afternoon, just wanting to remap some keys, and I figured Magisk was a better idea than directly modifying system files.

Here's a modified zip with the change you were asking for:

Magisk-KeyboardRemaps-v1.0-DemianDo .zip

Just for your info, all I did was open it with 7-Zip and rename the system directory to vendor, No manual extraction required, 7-Zip (at least the GUI version on Windows) will rebuild the archive for you.

I'm not familiar with Android TV, I only customized this module for my phone. Your device may use a different keycode layout, especially considering that you're using a TV remote instead of a standard keyboard. Identify which file on your device is responsible for the keymap to your remote, modify it, and add it to the Magisk module (while recreating its directory structure).

Best of luck!

@DemianDo
Copy link
Author

Thank you for such a quick reply. Unfortunately, it didn’t work. It is working for "system", but renaming the folder "system" to "vendor" doesn't change anything on Android TV. I thought maybe some paths should be edited in the installation scripts, but I'm not a very tech guy, so already spent a few hours randomly changing some parameters.
But anyway I very much appreciate you for the try!

@DemianDo
Copy link
Author

Finally I was able to solve this task after reading carefully this article: https://topjohnwu.github.io/Magisk/guides.html#moduleprop

I've just put my layout files into system/vendor/usr/keylayout/ in your plugin and after installation and reboot the layout was merged to vendor/usr/keylayout/ folder.

Many thanks for leaving the links to all the resources you've used for creating the plugin!

Bless you and take care!

@Jefferderp
Copy link
Owner

Ah, good to know! I didn't check the root directory structure, I just took your word for it :).

I'm glad you found a fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants