Solved Developer achieves AirPlay Mirroring on Kodi
#1
Ever since Kodi/XBMC had announced AirPlay support, millions of users-including me-have pined for AirPlay Mirroring support. Anyone who has ever got the opportunity to play Real Racing 2 mirrored to an Apple TV will know exactly why.

Well, I've got good news: A developer by the name of XinDawn has succeeded in near-flawless AirPlay Mirroring-yes, the real deal-on XBMC Gotham.

And I've got bad news as well: Instead of sharing his good work with the Kodi community and adding it to the source code for implementation in future versions, XinDawn has created his own build of XBMC Gotham-called "GBMC". And there are no credits or mentions of the XBMC Team across the program, plus he's removed the XBMC RSS ticker.

GBMC is currently available only for Android on Google Play Store as a free app: https://play.google.com/store/apps/detai...ebox&hl=en

As per the GBMC website (http://xindawn.com/index.php) XinDawn seems to have ported it to Windows, Mac and Raspberry Pi too but hasn't put it up for grabs yet, while the Linux version reads "come soon".

Anyways, I tried GBMC on two devices: the first-gen Motorola Moto E and a 1 GHz Android smartbox attached to my LCD TV. GBMC is the XBMC Gotham with an under-the-hood non accessible AirPlay Mirroring plugin. Here's a pic of my iPad 2 being rendered by GBMC on the TV: http://i.imgur.com/jXAFIwR.jpg (Imgur gallery embedding not working on the forums, dammit.....and I'm getting downvotes there as well considering it's not a meme)

The mirroring performance is the best I have ever seen from third-party apps. There is a little lag but frame rate is consistent, about 30 fps or so. And it doesn't seem to break with iOS updates-I just updated the iPad from 8.1 to 8.2 and it didn't whimper, so he's done a pretty good job on the coding side.

But I haven't written this post to advertise GBMC. I wanted to tell the Kodi community of the unfair source code use occuring here. I'm sending an email to XinDawn to try to convince him to contribute the mirroring source code to Kodi's GitHub repository, and I hope the Kodi community does the same, or atleast reverse engineers AirPlay mirroring if XinDawn refuses. Also, since the original Kodi/XBMC clients are not available on the Play Store, are modified clients such as GBMC permissible to be hosted there? And isn't he violating Kodi's GNU Public License by keeping it closed source and discrediting the XBMC team?

Let's see if he ever replies, I'll update this post then.
Reply
#2
Clear breach of GPL2 AFAICS.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Since he is clearly distributing the fork, he _must_ provide source under GPL terms.
Reply
#4
"XBMC-GameBox is a free software, It is video solution for apple device . It is based on some open source project , you can make a donation for open project."

http://xindawn.com/donate.php

He then links to raspmc and kodi.tv.

Some open source project. Hilarious.
Reply
#5
it might not be malicous. He might just not understand the requirements for the GPL, which can be very common with some programmers. I suspect that the AirPlay mirroring part isn't his, and isn't open source, but he tied the two together.
Reply
#6
(2015-04-06, 01:21)Ned Scott Wrote: it might not be malicous. He might just not understand the requirements for the GPL, which can be very common with some programmers. I suspect that the AirPlay mirroring part isn't his, and isn't open source, but he tied the two together.

If it isn't his code, then whose? Can we find that code?
Reply
#7
I would also be interested in whose code it is. Airserver provides a good commercial mirroring solution, but it is only for win and osx. I have been looking for an opensource or commercial solution for mirroring to openelec for a while. Would be great if someone can point me to a solution - be it paid or commercial.
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply
#8
I actually contacted this guy back in October a while back to remind him politely that if he'd worked out how to get AirPlay mirroring that code should end up going in to Kodi.

I also had a look at how he was achieving this in Raspbmc. It seems that it is completely built in to the Kodi binary (GPL) as there were no external services running. However from what I could tell he had at best implemented a web service, and was still using airtunesd to perform the decryption.

This project (I am surprised not many know of it), have been using the airtunesd binary from an Apple TV and a Python ARMv7 emulator: https://github.com/espes/Slave-in-the-Magic-Mirror/. The source that does this is open source itself but obviously you need the Apple proprietary binary. You will see some lag if you try it in VLC, but I think that is VLC's default behaviour of trying to set up a big buffer.

All AirPlay mirroring solutions: rPlay, XinDawn, etc all use this airtunesd binary (and a specific one) which is why there has not really been any code releases.
Reply
#9
(2015-04-06, 14:17)Sam.Nazarko Wrote: This project (I am surprised not many know of it), have been using the airtunesd binary from an Apple TV and a Python ARMv7 emulator: https://github.com/espes/Slave-in-the-Magic-Mirror/. The source that does this is open source itself but obviously you need the Apple proprietary binary. You will see some lag if you try it in VLC, but I think that is VLC's default behaviour of trying to set up a big buffer.

I don't think Slave in the Magic Mirror is being implemented, since it doesn't support audio streaming yet. XinDawn's airtunesd implementation has zero lag in the audio department, on the other hand.

What impresses me is that except for rPlay and Slave, most of the AirPlay mirrors-almost all of the working ones-have been developed by Chinese programmers with really poor English. Who knows, there might be some AirPlay reverse engineering docs in Mandarin somewhere? Tongue

And there's one way we can investigate what's under GBMC's hood-we can try to reverse engineer the APK, try to extract and convert those Dalvik classes to readable Java, maybe with the help of the good fellows at XDA Developers. That'll give us an idea of what sort of library or code tricks they might be using to run airtunesd so successfully, even if we don't get hold of usable source code. The XDA community is an expert in opening up even Google-coded programs and modifying them, and I feel they can give us an insight on this.
Reply
#10
I didn't say Slave in the Magic Mirror was being used but I do think it's Kodi's best way to pursue it. I think a runtime check for the binary can be used to allow the functionality to be used without redistribution.

Quote:What impresses me is that except for rPlay and Slave, most of the AirPlay mirrors-almost all of the working ones-have been developed by Chinese programmers

A lot of Chinese companies don't care for the GPL. I have spoken to both the rPlay and Xindawn developers personally. They've both been very apathetic towards complying with the GPL. I hate to name and shame -- but the rPlay developer is also a stakeholder in Lemaker. They produce the Bannana Pi which is based on the AllWinner A20. AllWinner violate the GPL and I suspect Huihong (rPlay dev) is happy to follow the same suit. He claims there are 100,000 lines of code in the project. He also claimed that he would give me access to the source if I got Raspbmc or OSMC running on a Bpi. After looking at the video acceleration APIs (or rather lack thereof), a Chinese datasheet and obvious GPL violations, I decided it wasn't a good idea.

I suspect there is likely a black market of closed source reverse engineered implementations and both Xindawn and rPlay have used them. I cannot quote the emails from them out of curteousy and legality but I can say that their excuses for a lack of source release have been weak.
Reply
#11
Anyways, lets find out the exact library he's using for mirroring. I'll post a thread on XDA soon.
Reply
#12
maygamer96 - the android APK of Kodi is mostly consisting of C++ code and not much Java to decompile, so I don't think messing around with the APK will reveal much
Reply
#13
From the Xindawn forum: http://www.xindawn.com/bbs/viewtopic.php...d390de32c3

"...some necessary libraries xbmc-gamebox depends on:"

libfribidi.so.0.3.1
libhal.so.1.0.0
libhal-storage.so.1.0.0
liblzo2.so.2.0.0
libmicrohttpd.so.10.15.0
libmysqlclient.so.18.0.0
libpcrecpp.so.0.0.0
libssh.so.4.2.2
libtag.so.1.12.0
libtinyxml.so.2.6.2
libyajl.so.2.0.4

And the build.sh creates symlinks in /usr/lib. Xindawn use NOOBS_v1_3_9 for XBMC-Gamebox.
Reply
#14
They implemented the Airplay functionality as part of libshairport, which is not under the GPL (https://github.com/amejia1/libshairport/...er/LICENSE).

The fairplay handshake functionality is linked into the same library along with the original functionality. It's obfuscated as in AirServer, Reflector, and the original airtunesd.
It seems like somewhere out there is a relinkable version for many different architectures. We definitely need to study some Mandarin.
Reply
#15
Hello people,

Is there any way to install GMBC on Raspberry PI 2?

On the official website there is only an image for RPI 1,
I would like to know if there is a way to convert / modify it so that it works on RPI 2.

Thanks in advance!
Reply

Logout Mark Read Team Forum Stats Members Help
Developer achieves AirPlay Mirroring on Kodi0
This forum uses Lukasz Tkacz MyBB addons.