SOLVED: Custom MythTV Menus on Shield TV frontend

For discussion of topics specific to MythTV on Android devices
Post Reply
loddonlily
Junior
Posts: 40
Joined: Sun Mar 31, 2019 10:03 am
Great Britain

SOLVED: Custom MythTV Menus on Shield TV frontend

Post by loddonlily »

So I've been using MythTV for many, many years on a homebrew Linux HTPC ... which is now getting a bit old and is struggling to keep up.

I've just got myself a shiny new TV Shield Pro and am having a lot of fun setting up a new world of consuming TV, including a MythTV frontend connected to my old backend (both v31). Thanks to the wiki, it now mostly works.

My current problem is the menus: on my own HTPC I have a set of custom menu XML files which deliver the experience I want, and I'd really like to replicate that on the Shield.

Can anyone point me towards the easiest way of making this happen? I guess I need to transfer the XML files somewhere ...

[I have already enabled Developer Mode on the Shield, and installed adb on a Linux box - this was how I installed the .apk]
Last edited by loddonlily on Sat Sep 26, 2020 10:00 pm, edited 1 time in total.
cbovy
Newcomer
Posts: 5
Joined: Wed Sep 09, 2020 6:54 pm
Netherlands

Re: Custom MythTV Menus on Shield TV frontend

Post by cbovy »

In Android Studio there is function to open a file manager (Device File Explorer). You can inspect the files on your Shield, but also upload files.
For example, I have been updating the Mythbuntu theme on the shield by updating the XML, so I expect you can update other XML files as well.
It is probably not the straight-forward option to change/upload files, but it works.

Regards, Charles
loddonlily
Junior
Posts: 40
Joined: Sun Mar 31, 2019 10:03 am
Great Britain

Re: Custom MythTV Menus on Shield TV frontend

Post by loddonlily »

When you say not the most straightforward - you're not kidding! But I can't get it to work - is it necessary for the Shield to be rooted?

Downloading Android Studio to my Windows laptop was easy enough ... odd to find that it won't connect by LAN, only USB (there are LAN connection plugins but you have to do a USB connection first to enable them, it seems). Then I had to get hold of a USB A to A cable. Then I had to unload the USB memory stick I'd plugged into USB Port 1 (lucky that Mythfrontend wasn't installed on there). Finally I'm connected... after a little searching I find the Device File Explorer ... and a little later I find the Mythbuntu files (under /data/data/org.mythtv...).

As it stands I still have two problems.

First is that although I can download a couple of Mythbuntu xml files and apply a couple of tweaks, I can't find a way to upload the amended versions.

Second problem is that what I really want to edit is mainmenu.xml, which isn't a Mythbuntu file ... and I can't find it. It might, I suppose, be under /data/app/org.mythtv... but I can't read that.

Any suggestions?

I'd really rather not root this device and void its warranty so soon after buying it!
cbovy
Newcomer
Posts: 5
Joined: Wed Sep 09, 2020 6:54 pm
Netherlands

Re: Custom MythTV Menus on Shield TV frontend

Post by cbovy »

No, there is no need to root the Shield.
I've downloaded a file of the Mythbuntu theme, did a local modification and uploaded the file again in that folder
(this is the change I made to the Mythbuntu theme on Shield: https://github.com/MythTV-Themes/Mythbu ... 3eea85e512)
With Right-Click, you can select Upload.

Not sure about the mainmenu.xml location. Maybe you check the mythfront.apk and find the location where it is stored?
loddonlily
Junior
Posts: 40
Joined: Sun Mar 31, 2019 10:03 am
Great Britain

Re: Custom MythTV Menus on Shield TV frontend

Post by loddonlily »

Thanks for the response but I'm still not getting this to work. In Android Studio, with the Device File Explorer panel open, I can navigate to the Mythbuntu files at /data/data/org.myth.mythfrontend/files/themes/Mythbuntu ... if I right click any of the files there then (this is on Windows) I get the context menu options of

Open
Save As
Delete
Synchronize
Copy Path

No sign of an "upload".

"Open" gives me a copy of the file but no apparent means to write it back (Save all files doesn't do it).
Synchronize doesn't seem to do anything.

Are you using Android Studio on a platform other than Windows, perhaps? Or am I misunderstanding the context of the Right Click?
cbovy
Newcomer
Posts: 5
Joined: Wed Sep 09, 2020 6:54 pm
Netherlands

Re: Custom MythTV Menus on Shield TV frontend

Post by cbovy »

Yes, I'm using Android Studio (4.0.1) on Ubuntu. I do have the Upload functions on right-click.
loddonlily
Junior
Posts: 40
Joined: Sun Mar 31, 2019 10:03 am
Great Britain

Re: SOLVED: Custom MythTV Menus on Shield TV frontend

Post by loddonlily »

Well, after much experimenting, I have a solution of sorts ...

I downloaded APK Editor Studio from https://qwertycube.com/apk-editor-studio/download/ ... use it to open the Mythfront end APK, swap in your desired xml files, save and install. This handy app takes care of signing, too.

The only glitch was that the APK signature had obviously changed, so the Shield refused to install the revised version - but that was easily fixed by deleting the first version and then installing the new one.

I haven't yet mastered altering the Mythbuntu files but I will see if using a Ubuntu host does the job for me (not convenient, sadly).

But the main thing is that I have my desired main menu, which is great. Of course, it would be even better if the APK coould be constructed with the menu XML files placed somewhere editable.
Post Reply