ChanSort icon indicating copy to clipboard operation
ChanSort copied to clipboard

Sony BRAVIA models 2024 support request

Open okin-88 opened this issue 1 year ago • 11 comments

sample file from a sony bravia 7 sdb_65xr70_20240615.zip

okin-88 avatar Jul 09 '24 04:07 okin-88

Thanks for the file. Have you tried editing the file manually and importing it back in the TV?

In the attached file I swapped Das Erste HD and ZDF HD so that they have numbers 2 and 1. Can you please try to import this list and let me know if it works as expected? sdb_65xr70_20240615-swapped.zip

PredatH0r avatar Jul 13 '24 14:07 PredatH0r

Thanks for the respond. There was no error while import, but the channel order remained unchanged.

I did another export with manual moved channels on tv and now a differences can be seen from line 4469 onwards: sdb_65xr70_20240714.zip

okin-88 avatar Jul 14 '24 11:07 okin-88

Looking at your new files, I noticed:

  • both new lists, the sdb.xml and sdb_edited.xml now contain "SERVICE_LIST_CABLE/4", while the original file 20240615 was ".../2". (I guess every time you run a scan, the number increases)
  • my manuals changes in the readable part of "...-swapped.xml" are identical to what your TV exported in the "..._edited.xml" file
  • comparing your sdb.xml and sdb_edited.xml, lines 4469 and later are part of a base64 encoded binary data block. I decoded the <scan>, <summary> and <service_database> XML elements to .bin files, which seem to be serialized Java object streams. Those can't be decoded without the Java .class files that are part of the TV's firmware. Also, inside the service_database data, there is data compressed with MediaTek's proprietary "cl_Zip" format, which is undocumented and can only be decompressed by MediaTek software (i.e. the TV's firmware)
  • the "summary" and "scan" parts are identical between the sdb.xml and sdb_edited.xml, but the "service_database" changed massively.

I have no idea why MediaTek is even bothering with exporting readable XML data, when the import only seems to cares about the binary, more or less encrypted data.

I'm afraid we hit a dead end here.

PredatH0r avatar Jul 17 '24 08:07 PredatH0r

Thanks for your time and looking into it!

No new scan was made, only the channel lists were imported/exported via USB. As a test I also imported the sdb.xml with increased “SERVICE_LIST_CABLE/5”, but channels remained unchanged again. And finally I tried an import without the “service_database” block, which ran into errors as expected.

Too bad, but then the only option is to edit it via the mobile app: https://www.sony.net/channeleditapp Sync from app to TV over Wifi - is it worth to sniff the network? If not, then I think we are done.

Finally, if it is not too much effort, we will probably only have the option to make the sdb.xml of new Sony models readable in ChanSort so that we can transfer them to other TVs.

okin-88 avatar Jul 18 '24 14:07 okin-88

Read-only support should be possible.

Also thanks for the link to the mobile app. I'll try to get some insights from how it works.

PredatH0r avatar Jul 18 '24 14:07 PredatH0r

Version 2024-10-01 now has support for reading/saving the MtkChannelList.xml file, so it can be used as a reference list. It doesn't yet sync changes between sdb.xml and MtkChannelList.xml. I might add this to the next version, but after the findings mentioned above, I don't have much hopes that the TV will apply the modified numbers.

EDIT: Version 2024-10-01 will only read the sdb.xml file if it is reanamed to MtkChannelList.xml. I'll update the next version so that it also reads the sdb.xml directly.

PredatH0r avatar Oct 01 '24 10:10 PredatH0r

Uploaded updated version to https://chansort.com/ChanSort_2024-10-01.zip just now (which is newer than the official release with the same date). It will open the sdb.xml directly and separate TV, Radio and Data channels in their own lists because they all seem to start with program number 1 in the case of Sony (unlike Philips where they have non-overlapping numbers to begin with)

PredatH0r avatar Oct 01 '24 11:10 PredatH0r

Perfect, thanks for your work!

You'll let me know, if I should send you some data from sniffing the network while doing the channel sort with the mobile app...

okin-88 avatar Oct 01 '24 12:10 okin-88

HI all, To me it looks like the current Sony TVs just orders the channels according to their position in the sdb.xml file instead of honoring the channel nummber specified in the xml. Is this what you observe too? I'm using latest ChanSort downloaded just now which is 2024-10-15. Tested on Bravia 8. Therefore currently Chansort is unusable for me.

pmittermayer avatar Nov 04 '24 13:11 pmittermayer

Unfortunately, it doesn't seem to be so simple. After reordering all the service_info elements in the XML according to their major_channel_number the import on the TV succeeds, but the channel list on the TV remains unchanged :(

pmittermayer avatar Nov 04 '24 17:11 pmittermayer

I think there is no way to reorder the new Sony lists. In the <internal> data block, there is a base64 encoded, serialized Java object, which in turn contains data compressed using MediaTek's proprietary, undocumented algorithm, which makes it more or less encrypted. This data is the actual service list used by the MediaTek firmware and tuner hardware.

The new Philips TVs also export the same kind of XML as Sony does now, only the file name is different (MtkChannelList.xml). With the exact same problem, that the TV ignores all attempts to reorder the list. Only upside for Philips users is that there is an additional Favorites.xml, which can be edited with ChanSort, so at least the favorites list can be edited.

I'm afraid more brands will have the same issue in the future. Some Panasonic models also use (a different) MediaTek hardware and can't be reordered due to their compression.

PredatH0r avatar Nov 04 '24 17:11 PredatH0r