ftde0 / yt2009

2009 youtube frontend.
Apache License 2.0
147 stars 88 forks source link

Windows Mobile Support? #40

Open project-cafe opened 5 months ago

project-cafe commented 5 months ago

As of now there is only Android and web page support (at least as far as I can tell), so I was wondering if patching a Windows Mobile .xap or .appx would be possible? Windows Mobile YouTube apps are long dead, and I feel adding some kind of support for them would be interesting, as there is still a fairly big community around these phones.

ftde0 commented 5 months ago

i'm not associated with any windows mobile communities so i'm clueless on how patching a windows mobile app would even look. if you (or anyone) decompiles something and finds it uses gdata v2 api (/feeds/api/... urls), you're good to go to just swap the domain to a yt2009 instance as that's the api used by the android apps. if you find it using /m/appreq/mobilevideo (protobuf), you're most likely out of luck.

the earliest of android apps picked between the two in the background and you can change a variable inside of those to always use the gdata v2 api. could be something like that there?

project-cafe commented 5 months ago

I do believe it is fairly easy to decompile .xaps, as they are pretty much just zip files with .dlls in them if I recall correctly. I'll take a look when I've got time, and I'll come back here to tell you how it goes. Thanks for the help.

project-cafe commented 5 months ago

Good news! It seems to use the gdata api! Hopefully now it's just a matter of replacing the url and remaking the .xap!

project-cafe commented 5 months ago

I've tried and was unfortunately unsuccesful. While it does use the gdata api, I was simply unable to get it working. Perhaps maybe you could do it since well, you have more knowledge than me. I found urls and replaced them, putting the dlls back in the .xap but it simply didn't work. I used dnSpy, to recompile the dlls.

Below is the link to the .xap, can be unzipped using 7zip, just in case you want to try. As for me, I'm unable to do it.

https://drive.google.com/file/d/1s2A52ZYrK5cF6ReqVz8_VQG1YKlivaTm/view

ftde0 commented 5 months ago

i'll have a look later today. are there any windows mobile emulators you can recommend so i can test it out?

project-cafe commented 5 months ago

I'm not sure, I think there's a few YouTube videos on it. Although if not, Windows Phone 8.1 phones are very cheap nowadays.

Win-DVD commented 5 months ago

i'll have a look later today. are there any windows mobile emulators you can recommend so i can test it out?

There is the official Windows Phone 8.1 emulator but I am not certain it will run apps made for ARM. I don't know if this will work for the youtube app or not.

https://archive.org/details/windows-phone-8.1-emulator.-7z

project-cafe commented 5 months ago

I believe it does support ARM apps? Since it was included with Visual Studio 2012, for Windows Phone development.

Win-DVD commented 5 months ago

I believe it does support ARM apps? Since it was included with Visual Studio 2012, for Windows Phone development.

Well testing would be the best way to find out lol

ftde0 commented 5 months ago

hi! thanks for the emulator itself, i did find a VHD a bit back but it wasn't of much use without that. do you know by any chance how does one successfully install apps onto that?

i've tried the official xapdeploy as documented in various places, but all .xap files i could find (including the linked youtube app) throw up a barely documented error of "Class not registered". not sure whether its the apps themselves, the deploy app or the emulator.

upintheairsheep commented 2 months ago

i'm not associated with any windows mobile communities so i'm clueless on how patching a windows mobile app would even look. if you (or anyone) decompiles something and finds it uses gdata v2 api (/feeds/api/... urls), you're good to go to just swap the domain to a yt2009 instance as that's the api used by the android apps. if you find it using /m/appreq/mobilevideo (protobuf), you're most likely out of luck.

the earliest of android apps picked between the two in the background and you can change a variable inside of those to always use the gdata v2 api. could be something like that there?

I’m new, but how does /m/appreq/mobilevideo (protobuf) screw everything up, and make it unusable