r/learnprogramming • u/Butterlover06 • 25d ago
Is it possible to "mod" the YouTube app the same way you could mod a program on your PC?
Hi! I'm just learning to code (first couple months learning Python) and have been looking for opportunities to code stuff outside of my programing class.
I've just had the brilliant idea to tinker around with the horribly inconvenient YouTube app to make it stop showing shorts at all. I've seen it done in web extensions, but web YouTube is much slower than the app, and downloads don't work.
I was wondering if there was a way to look into/change the code for an app? And what language would I use/where could I go to learn this.
I'm using an Android and have YouTube premium of that helps :D
TLDR; can I change the code of the YouTube app
15
u/czerilla 25d ago
Check out morphe.software for that. (see also: r/MorpheApp)
It's the spiritual successor of ReVanced, a project to patch Android apps, like YouTube, to add, modify or disable functionalities.
Presumably there are many changes you're thinking of that already have patches available. But if not, you could contribute your own. It's all open source and available on GitHub, so you can peruse it at your leisure. 😉
6
u/Tomasan7 25d ago •
Yes you can. However it is VERY difficult for a beginner. Look into projects like ReVanced or Morphe. They do exactly that.
Anyway, native Android apps like YouTube are made in Kotlin. Kotlin gets compiled to JVM bytecode and that gets compiled to Dalvik bytecode. Dalvik bytecode can be read as smali. Once you learn smali, you can read YouTube (or any native) android app's code and even modify it. The process of understanding the code is called reverse engineering.
However you have no chance starting with YouTube app. You would first have to learn to make android apps, thank make one yourself, then compile it and then try to modify to compiled APK as learning.
Modifying YouTube or any other webpage through browser extensions is MUCH easier.
1
u/betarage 25d ago
Yeah but it's quite hard I think 3rd party YouTube apps just connect to the YouTube servers and load videos in their custom player or just embed videos. but they don't modify the official apps it's very difficult to reverse engineer an app and there is an easier way I just described. But it's still difficult because they keep changing things in an attempt to block the unofficial apps and you could get in legal trouble if it gets too popular.
while it's possible to make this in python it's not ideal for making andriod apps because you need to deal with a very complex build process. kotlin ,or dart with the flutter framework are the easiest ways to make Android apps . you can also make it browser based with JavaScript so it will work on multiple platforms and you don't have to worry about some of the annoying things andriod does .
1
u/SigridFischer42 25d ago
You can't just mod the official YouTube app because it's closed-source and protected, but you can look into open-source alternatives like NewPipe for Android. Modding APKs directly is risky and can break with every app update.
1
u/Icemourne_ 25d ago
It's possible like some people have pointed to ReVanced but google really hates then people mess with their android app on desktop it's easy with extensions but android is different story
1
u/Dazzling_Music_2411 24d ago
It will be MUCH easier to make your own private video-viewing app, than trying to tinker with proprietary code that the big companies rely on to make $money$, and which they change every ten minutes as the mood takes them. Even then it will be tricky, but there already exist apps that download videos, you can learn from them (some of them are even in Python, so you could start right away 😄 ). But you'll still have a job keeping on top of it, Google and YT etc, don't like it if you download their stuff outside of their control and like to throw a spanner in the works every now and then.
1
u/az987654 24d ago
Kind of, but you're not changing the code of the actual YouTube app, you'd be working with a clone of a cloned app like morphe
1
u/Any_Direction_1004 22d ago
I would like to improve the search function. Is that possible? It never shows me the results that our in there just the same 10.
0
u/recursion_is_love 25d ago edited 25d ago
The app in the phone: No
Website youtube.com via typical browser : Yes via browser extensions.
If you know how to program, why not made your own app that can connect to youtube service? Your app will have to be private for your own use because google will not allow you to compete with their official youtube app.
0
u/desrtfx 25d ago
Yes, and no. The apps you have (no matter on PC, MAC, Mobile) are generally compiled binaries. They are not source code, like your Python programs. So, you cannot directly look into their code. Yet, it is quite often possible to decompile them with more or less losses (in clarity, not in functionality) - that's the way e.g. Minecraft became moddable - people decompiled the code.
Android typically uses Kotlin nowadays or Java before. There also could be JavaScript with frameworks like React Native, or others.
Sorry to tell you, but such endeavors are far away from your skills right now. You will need to gain a lot more experience in programming (not only in programming languages) as what you want is far from trivial.