How to use iMovie Theater instead of the Trailers app

Ran this

openssl req -new -nodes -newkey rsa:2048 -out ~/Desktop/trailers.pem -keyout ~/Desktop/trailers.key -x509 -days 7300 -subj "/C=US/CN=www.icloud.com"

Followed by this

openssl x509 -in ~/Desktop/trailers.pem -outform der -out ~/Desktop/trailers.cer && cat ~/Desktop/trailers.key >> ~/Desktop/trailers.pem
 

then installed certs on atv3 using apple config on my mac mini

copied files over to my windows box running plex and plexconnect

modified my settings.cfg to intercept www.icloud.com

I see plexconnect working when I open other apps on atv as I see the forwarders in the log

If you don't mind, please provide the contents of your setting.cfg file for us to view. Thanks!

Ran this

openssl req -new -nodes -newkey rsa:2048 -out ~/Desktop/trailers.pem -keyout ~/Desktop/trailers.key -x509 -days 7300 -subj "/C=US/CN=www.icloud.com"

Followed by this

openssl x509 -in ~/Desktop/trailers.pem -outform der -out ~/Desktop/trailers.cer && cat ~/Desktop/trailers.key >> ~/Desktop/trailers.pem
 

then installed certs on atv3 using apple config on my mac mini

copied files over to my windows box running plex and plexconnect

modified my settings.cfg to intercept www.icloud.com

I see plexconnect working when I open other apps on atv as I see the forwarders in the log

Yep, had to restore the ATV, once I did that and installed the cert it was good, stupid false positives from the Apple Configurator Tool.  Thanks guys.  

So a bit more testing, even though I am getting a green check the cert isn't being pushed to the ATV, I can tell because i only have the one iMovie cert in there but it still works when I change plexconnect to use the trailers cert.  So ATV is not overriding it correctly.

Best course of action is a fresh start then and see if the trouble replicates.

Did you delete the original profile from the ATV before adding the new one?

Did you delete the original profile from the ATV before adding the new one?

Foob, I didn't, I didn't know you were supposed to do that, I just assumed it would overwrite the existing info.  I'll keep that in mind.

Exactly how does one go about editing "settings.cfg"?  I am stumped here.  Thanks

Exactly how does one go about editing "settings.cfg"?  I am stumped here.  Thanks

I have to admit that stumped me at first too. I am on a Windows based OS, so your mileage may vary:
 

1) open your PlexConnect-master folder

2) double click on your Setting.cfg file and if your PC doesn't know what a .cfg file is, open it with Notepad

3) look within the content for hosttointercept = trailers.apple.com, delete and replace with hosttointercept = www.icloud.com

4) save and close

There you go, you just edited your Settings.cfg file

Foob, I didn't, I didn't know you were supposed to do that, I just assumed it would overwrite the existing info.  I'll keep that in mind.

Did f00b4r mean: Did you delete the cert file for iMovie that wasn't working before trying again? I still have the Trailers app cert file on my AppleTV but since the setting.cfg intercept was changed it doesn't apply.

I see from the above notes that you are back on track, and I am happy to hear that. 

Did f00b4r mean: Did you delete the cert file for iMovie that wasn't working before trying again? I still have the Trailers app cert file on my AppleTV but since the setting.cfg intercept was changed it doesn't apply.

I see from the above notes that you are back on track, and I am happy to hear that. 

I was trying to install the new iMovie cert on my ATV using Apple Configuration Tool on my mac, after installing I was getting a "Green Check Box", thinking that meant it was installed, however it wasn't, I tried removing profiles and everything on the ATV but it didn't seem to work.  It was as if the ATV was stuck, so I merely reset the ATV to defaults and started from scratch, and it now works.  

Did f00b4r mean: Did you delete the cert file for iMovie that wasn't working before trying again? I still have the Trailers app cert file on my AppleTV but since the setting.cfg intercept was changed it doesn't apply.
 
I see from the above notes that you are back on track, and I am happy to hear that.


Doh it is true the are for different domains.
It is still something that does seem to cause issues if people reinstall the certs fir the same domain though - good to know you can have the 3 different app certs on at once though.

Keep both the Trailer cert profile and the iCloud cert profile on the ATV at the same time. Then you can move back and forth.

How can we make that? If both certs have the same filename?

Or we can rename from trailers.cer to imovies.cer ?

Yeah, you should somehow keep them separate - otherwise you won't be able to switch back and forth.

aTV might be alright though, as it shows (and probably stores) the profiles based on the server name.

Yeah, you should somehow keep them separate - otherwise you won't be able to switch back and forth.

aTV might be alright though, as it shows (and probably stores) the profiles based on the server name.

Exactly:

PlexConnect

|_Certificate Files

   |_iMovies App

      |_certificates

         trailers.pem

   |_Trailers App

      |_certificates

         trailers.pem

Then just replace whichever you want to use in your assets folder

Hm.

Why not using

_certificates

 |_imovie.pem

 |_trailers.pem

 |_...

and just change the name in settings.cfg?

Hm.

Why not using

_certificates

 |_imovie.pem

 |_trailers.pem

 |_...

and just change the name in settings.cfg?

I hadn't thought of that. Nice. 

This is what I have done several weeks ago, and it's working. All these steps were executed on a Win7 computer:

  1. Generate the trailers.cer, trailers.key and trailers.pem files (for trailers.apple.com)
  2. Generate the iMovie.cer, iMovie.key and iMovie.pem files (for www.icloud.com)
  3. Install trailers.cer and iMovie.cer in the certificates repository
  4. Create a single profile with the above two certificates (using iPhone Configuration Utility)
  5. Load that profile in the ATV3 (using iPhone Configuration Utility and a micro USB cable)

Note 1: before all above 5 steps I have deleted all the profiles from the ATV3

Now I can "hijack" trailers or iMovies changing two parameteres in the Settings.cfg file (hosttoIntercept and certfile), but to make this change effective I have to restart PlexConnect and reboot the ATV3.

Note 2: As I'm running PlexConnect on a Synology NAS I had to copy the 6 files created in steps 1&2 above to the Syno using the instructions published by bwynants (replacing the 3 files included in his Synology installer).

Update: I went ahead upgrading to the latest IOS and this iMovies setup works.

Also as bonus there are some LiveTV apps from Apple :)

I have aTV3 with IOS 5.3 (6105) so there is no iMovies app. So I tried with WSJ but it gives "... not available" ... message

Should I update to the latest IOS in order to use this feature?

does anyone know how to adapt this (the certificate locations) for imovie theater, WSJ and other apps ?:

Install the certificate to your AppleTV
 
Go to the AppleTV settings menu.
Select “General” then scroll the cursor down to highlight “Send Data To Apple” and set to "No".
With "Send Data To Apple" highlighted, press “Play” (not the normal “Select” button) and you will be prompted to add a profile.
Enter (without the quotes): "http://trailers.apple.com/trailers.cer"

does anyone know how to adapt this (the certificate locations) for imovie theater, WSJ and other apps ?:


You just change the trailers.cer to whatever you named the cert for the other app to eg foo.cer

Hi guys,

works fine for hijacking WSJ app, but I failed to hijack iMovie Theatre. I got this failure messages:

00:59:55 PlexConnect: started: 00:59:55

00:59:55 PlexConnect: Version: 0.4+
00:59:55 PlexConnect: Python: 2.7.6 (default, Jul 24 2014, 12:53:09) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
00:59:55 PlexConnect: Host OS: darwin
00:59:55 PlexConnect: IP_self: 192.168.178.52
00:59:55 DNSServer: started: 00:59:55
00:59:55 DNSServer: ***
00:59:55 DNSServer: DNSServer: Serving DNS on 192.168.178.52 port 53.
00:59:55 DNSServer: ***
00:59:55 WebServer: started: 00:59:55
00:59:55 WebServer: ***
00:59:55 WebServer: WebServer: Serving HTTP on 192.168.178.52 port 80.
00:59:55 WebServer: ***
00:59:55 WebServer: started: 00:59:55
00:59:55 WebServer: ***
00:59:55 WebServer: WebServer: Serving HTTPS on 192.168.178.52 port 443.
00:59:55 WebServer: ***
01:00:15 XMLConverter: XML_ExpandNode - Error in cmd CUT, line 
        
Traceback (most recent call last):
  File "/Applications/PlexConnect/XMLConverter.py", line 581, in XML_ExpandNode
    res = getattr(CommandCollection, 'TREE_'+cmd)(elem, child, src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 878, in TREE_CUT
    key, leftover, dfltd = self.getKey(src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 738, in getKey
    res = g_ATVSettings.getSetting(self.ATV_udid, attrib[1:])
AttributeError: 'NoneType' object has no attribute 'getSetting'
 
01:00:15 XMLConverter: XML_ExpandLine - Error in {{URL(:/js/utils.js)}}
Traceback (most recent call last):
  File "/Applications/PlexConnect/XMLConverter.py", line 653, in XML_ExpandLine
    res = getattr(CommandCollection, 'ATTRIB_'+cmd)(src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 1072, in ATTRIB_URL
    res = g_param['baseURL']  # base address to PlexConnect
KeyError: 'baseURL'
 
01:00:15 XMLConverter: XML_ExpandLine - Error in {{URL(:/PMS(owned)/library/sections)}}
Traceback (most recent call last):
  File "/Applications/PlexConnect/XMLConverter.py", line 653, in XML_ExpandLine
    res = getattr(CommandCollection, 'ATTRIB_'+cmd)(src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 1072, in ATTRIB_URL
    res = g_param['baseURL']  # base address to PlexConnect
KeyError: 'baseURL'
 
01:00:15 XMLConverter: XML_ExpandLine - Error in {{URL(:/PMS(owned)/channels/all)}}
Traceback (most recent call last):
  File "/Applications/PlexConnect/XMLConverter.py", line 653, in XML_ExpandLine
    res = getattr(CommandCollection, 'ATTRIB_'+cmd)(src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 1072, in ATTRIB_URL
    res = g_param['baseURL']  # base address to PlexConnect
KeyError: 'baseURL'
 
01:00:15 XMLConverter: XML_ExpandLine - Error in {{URL(:/PMS(shared)/library/sections)}}
Traceback (most recent call last):
  File "/Applications/PlexConnect/XMLConverter.py", line 653, in XML_ExpandLine
    res = getattr(CommandCollection, 'ATTRIB_'+cmd)(src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 1072, in ATTRIB_URL
    res = g_param['baseURL']  # base address to PlexConnect
KeyError: 'baseURL'
 
01:00:15 XMLConverter: XML_ExpandLine - Error in {{URL(:/&PlexConnect=Settings)}}
Traceback (most recent call last):
  File "/Applications/PlexConnect/XMLConverter.py", line 653, in XML_ExpandLine
    res = getattr(CommandCollection, 'ATTRIB_'+cmd)(src, srcXML, param)
  File "/Applications/PlexConnect/XMLConverter.py", line 1072, in ATTRIB_URL
    res = g_param['baseURL']  # base address to PlexConnect
KeyError: 'baseURL'
 
Any ideas what is wrong?