[MODULE] Inject YouTube

Search This thread

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
Inject YouTube

What is iYT?
A project I started a few years ago to replace the regular (stock) version of YouTube during boot.
This is done using a boot script to overlay the modified version over of the installed regular (stock) version.
Using the mount command to mount (overlay) a file/directory over the other.
During boot, the modified version will be loaded instead of the regular (stock) version.​

Note:
This project originally started with "Vanced" modified version(s).
Since the Vanced team was forced to stop...
This project now includes modified version(s) created by patching the stock version using ReVanced.​

Requirement(s):
The regular (stock) version installed as a normal user app.
The regular (stock) version must be the same version as the one included in the module.
The regular (stock) version must be a full apk install not, a split-apk install.​

How to install
YouTube
  • Install regular (stock) YouTube.
  • Copy the iYT module zip file to the device.
  • Open Magisk Manager, select Modules and then Install from storage.
  • Select the zip file and install.
  • Reboot device.

YouTube Music
  • Install regular (stock) YouTube Music.
  • Copy the iYTMusic module zip file to the device.
  • Open Magisk Manager, select Modules and then Install from storage.
  • Select the zip file and install.
  • Reboot device.

Project Links
Inject YouTube - GitHub
Inject YouTube Music - GitHub

ReVanced - GitHub.


Cheers all. :cowboy:
 
Last edited:

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
Module Downloads

Inject YouTube
Releases - [GitHub] - Link
PatchDescription
client-spoofSpoofs a patched client to allow playback.
disable-shorts-on-startupDisables playing YouTube Shorts when launching YouTube.
disable-auto-captionsDisable forced captions from being automatically enabled.
hide-adsRemoves general ads.
hide-endscreen-cardsHides the suggested video cards at the end of a video in fullscreen.
hide-info-cardsHides info cards in videos.
hide-watermarkHides creator's watermarks on videos.
minimized-playbackEnables minimized and background playback.
remember-video-qualityAdds the ability to remember the video quality you chose in the video quality flyout.
return-youtube-dislikeShows the dislike count of videos using the Return YouTube Dislike API.
sponsorblockIntegrates SponsorBlock which allows skipping video segments such as sponsored content.
video-adsRemoves ads in the video player.
disable-player-popup-panelsDisables panels from appearing automatically when going into fullscreen (playlist or live chat).
disable-fullscreen-panelsDisables video description and comments panel in fullscreen view.
hide-layout-componentsHides general layout components.

Inject YouTube Music
Releases - [GitHub] - Link
PatchDescription
background-playEnables playing music in the background.
bitrate-default-valueSet the audio quality to 'Always High' when you first install the app.
certificate-spoofSpoofs the YouTube Music certificate for Android Auto.
disable-auto-captionsDisable forced captions from automatically enabling in video player.
enable-black-navbarSets the navigation bar color to black.
enable-force-minimized-playerPermanently keep player minimized even if another track is played.
enable-color-match-playerMatches the fullscreen player color with the minimized one.
enable-compact-dialogEnable compact dialog on phone.
enable-landscape-modeEnables entry into landscape mode by screen rotation on the phone.
enable-opus-codecEnable opus codec when playing audio.
exclusive-audio-playbackEnables the option to play music without video.
hide-button-shelfHides the button shelf from homepage and explorer.
hide-carousel-shelfHides the carousel shelf from homepage and explorer.
hide-category-barHides the music category bar at the top of the homepage.
hide-get-premiumRemoves all "Get Premium" evidences from the avatar menu.
hide-music-adsRemoves ads in the music player.
hide-music-cast-buttonHides the cast button in the video player and header.
hide-new-playlist-buttonHide the New Playlist button in the Library tab.
hide-playlist-cardHides the playlist card from homepage.
hide-taste-builderRemoves the "Tell us which artists you like" card from the home screen.
hide-upgrade-buttonRemove upgrade tab from pivot bar, hide upgrade banner from homepage.
minimized-playback-musicEnables minimized playback on Kids music.
remember-video-qualitySave the video quality value whenever you change the video quality.
settingsAdds settings for ReVanced to YouTube Music.

Note:
Some patches will be enabled and preset by defualt.
You can configure, enable and disable the patches under the settings menu.​
 
Last edited:

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
Regular (stock) Downloads

The regular (stock) version can be downloaded from a safe source such as APKMirror.
APKMirror - [WebSite] - Link

YouTube
Current stock version required for this module:
- v18.23.35 - [ apkmirror ] - Link
YouTube:
v17.36.37 - [ apkmirror ] - Link
v17.41.37 - [ apkmirror ] - Link
v17.43.36 - [ apkmirror ] - Link
v17.45.36 - [ apkmirror ] - Link
v17.49.37 - [ apkmirror ] - Link
v18.03.36 - [ apkmirror ] - Link
v18.05.40 - [ apkmirror ] - Link
v18.15.40 - [ apkmirror ] - Link
v18.16.37 - [ apkmirror ] - Link
v18.19.35 - [ apkmirror ] - Link
v18.23.35 - [ apkmirror ] - Link

YouTube Music (arm v7a)
Current stock version required for this module:
- v6.10.51 - [ apkmirror ] - Link
YouTube Music (arm v7a):
v5.23.50 - [ apkmirror ] - Link
v5.29.52 - [ apkmirror ] - Link
v5.31.50 - [ apkmirror ] - Link
v5.34.51 - [ apkmirror ] - Link
v5.36.51 - [ apkmirror ] - Link
v5.39.52 - [ apkmirror ] - Link
v5.55.53 - [ apkmirror ] - Link
v6.08.50 - [ apkmirror ] - Link
v6.10.51 - [ apkmirror ] - Link

YouTube Music (arm64 v8a)
Current stock version required for this module:
- v6.10.51 - [ apkmirror ] - Link
YouTube Music (arm64 v8a):
v5.23.50 - [ apkmirror ] - Link
v5.29.52 - [ apkmirror ] - Link
v5.31.50 - [ apkmirror ] - Link
v5.34.51 - [ apkmirror ] - Link
v5.36.51 - [ apkmirror ] - Link
v5.39.52 - [ apkmirror ] - Link
v5.55.53 - [ apkmirror ] - Link
v6.08.50 - [ apkmirror ] - Link
v6.10.51 - [ apkmirror ] - Link

Note:
These are the stock apk files I use in the patching of the module.​
 
Last edited:

lemon567

Senior Member
Dec 28, 2013
90
35
Nexus 9
Huawei P20 Lite
Tested it and it works
...the linked stock apk complains when trying to install it-- error app could not be installed -- but app is installed anyway and runs as well as the module-- thanks 👍

what's the difference between the black/dark package?

on a side note and I probably get flamed for that but I thought it might be relevant after installing the module Momo detects magisk and zygote injection which it did not before installing the module
 
Last edited:
  • Like
Reactions: galaxys and ipdev

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
Tested it and it works
...the linked stock apk complains when trying to install it-- error app could not be installed -- but app is installed anyway and runs as well as the module-- thanks 👍

what's the difference between the black/dark package?

on a side note and I probably get flamed for that but I thought it might be relevant after installing the module Momo detects magisk and zygote injection which it did not before installing the module
Hi. 🙂

I normally use adb to intall the stock version(s) and have not received any errors so, I am not sure what the errors you received where about.
Maybe Device/Rom related restrictions (warnings) on installing apk files?

---

A while back, YouTube did not have a dark theme.
The Vanced team created a dark theme version and then a true black theme version.

Since then, YouTube added a dark theme option.
The dark package now is just the normal YouTube light/dark theme.
- No theme patch included. -

The Black package is themed to be black/black.
- Includes ReVanced theme patch. -

I just kept the naming the same for now.
Will add a note about. ;)

---

Not sure about Momo.
I never get too excited by what it returns.
I think quite a few in the Magisk support thread(s) share the same opinion. 🙃

I will see if I can tweek the module to keep Momo more happy. ;)

Cheers. :cowboy:

PS.
I did a quick check and I get the same result with Momo.
Without the module.
- Found Zygisk.
- Zygote is injected.

With the module.
- Found Magisk.
- Found Zygisk.
- Zygote is injected.
 

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
Looks like a great work!!!
What's are the difference to the ReVanced versions and yours?
Hi. 🙂

I never looked too close at the official ReVanced.io module.
It did not exist when I started updating this module project. ;)

Quick look..

Different mechanics in the boot scripts to mount the modified version during boot.
- Expected.

---

ReVanced includes all the patches in their module.
ReVanced - [GitHub] - revanced-patches (YouTube) - Link

They also include stock YT in the module zip so, the matching stock version is installed during the module install.
The modified (patched) version is smaller than the stock version though.. :unsure:

I try to stay a little closer to the stock look and feel of YouTube.
Include the patches for ad blocking, background playback along with a few others.

That is about it.

I am not sure if there is a ReVanced Music module or if one is planned. :unsure:

A little background of this module.
Loosely quoting myself from another thread.
I am still working on updating a Magisk module project that I started a few years ago but, never announced.
Vanced asked that no one release an unofficial module once they created an official module.
Since the official module was dead, I asked for permission to release a new module.

Long story short..
A few years ago, due to changes in Android.
I was looking for an easier way to use the root 'Vanced' version of YouTube on my device(s).
Instead of manually replacing and setting permissions, I tested an idea (on a lot of devices and Android versions) to overlay the modified version over the stock installed version.
The Vanced team adopted the idea into their Manager root install. 🙂
- ReVanced does the same.

Once I finish cleaning up iYT, I will start a Magisk Module thread for it. 🙃
Archived original iYTv. - [GitHub] - Link

iYT - [GitHub] - Link
iYTm - [GitHub] - Link



Cheers. :cowboy:
 
Last edited:
  • Like
Reactions: galaxys and xerel89

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
How to update to last version ?
Hi. 🙂

Updating is mostly the same as the initial install.
- Install regular (stock) YouTube.
- Install the module.

Example:
To update YouTube from v17.41.37 to v17.43.36
  • Download regular (stock) YouTube v17.43.36 and install it.
    Download links are in the third post, Regular (stock) Downloads.​
  • Download the iYT-v174336 module from GitHub and install it.
    or use the Update option in the Modules list to update the module.​
  • Reboot.
Screenshot_20221102-181432_Magisk.pngScreenshot_20221102-181439_Magisk.png


It does not matter how or in what order you install/update them.
The module and regular (stock) YouTube just need to be the same version before you reboot. 🙃

Cheers. :cowboy:

Edit:
Nothing bad will happen if there is a version mismatch on boot.
During boot, this module checks for YouTube and what version is installed.
If YouTube is not installed or the versionCode does not match the one included in the module.
The modified version will not be loaded.​
You will just have to correct the mismatch in versions and then reboot again. 🙃

PS.
I originally added these failsafe(s) to keep bad things from happening. 🙂
 
Last edited:
  • Like
Reactions: xerel89 and galaxys

more_than_hater

Senior Member
May 3, 2016
336
103
Odessa
there's something i can't understand.
why would you want to inject modified app on boot stage if you can simply uninstall stock youtube app and install modified one?
 
Last edited:

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
wow amazing work. Finally a clean youtube after few months.
Just one question, i have enabled youtube dislike but won't see video dislike counts. Do i need to download something?
Try toggling the setting off and back on.
Then close YouTube and open it again.

Cheers. :cowboy:

Edit:
Attached screenshots from a random video.
First showing just likes, second showing the dislikes also.
 

Attachments

  • Screenshot_20221208-163242_YouTube.png
    Screenshot_20221208-163242_YouTube.png
    1.2 MB · Views: 101
  • Screenshot_20221208-163317_YouTube.png
    Screenshot_20221208-163317_YouTube.png
    1,000.1 KB · Views: 101
  • Like
Reactions: Sugarfreee

ipdev

Recognized Contributor
Feb 14, 2016
2,529
1
5,106
Google Nexus 10
Nexus 7 (2013)
there's something i can't understand.
why would you want to inject modified app on boot stage if you can simply uninstall stock youtube app and install modified one?
One of these days I will update the first few posts and include a bit more background and why.
The last few years I have explained it in a few different threads and discussions. ;)

---

A few years ago, due to updates in Android security, modified versions of apk files would fail verification on boot.
You could adjust the permissions, owner/group, security, .. but, no guarantee it would survive verification.
What works on one device might fail on another.
The only sure way was to compromise device security by disabling the verification.

Instead, we can use the mount command to overlay the modified version.
Work around the security instead of disabling it.

This allows the stock version to be found and verified on boot.
Once verified, we can then overlay the modified version.

Since the mount overlay will not survive a reboot, the boot script(s) run the mount overlay on boot.
Otherwise you would have to mount the patched version over the stock version manually after every boot.
Magisk's Overlay does not extent out to user data. That is why we use the mount command to overlay the modified apk.​

Hope it helps more than confuse. 🙃

Cheers. :cowboy:

PS.
Parts from one of my posts about from the old Vanced thread.


The overlay script was original created as part of a magisk module.

It is not necessary to disable signature verification using the module.

Note:
I wrote the overlay script to use it on devices that I had issues with the manual install method.
I do not disable signature verification so, when the new method was announced I gave it a go..
Plus I missed the ease of flashing a Magisk module. ;)
 
  • Like
Reactions: Stillhard

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Inject YouTube

    What is iYT?
    A project I started a few years ago to replace the regular (stock) version of YouTube during boot.
    This is done using a boot script to overlay the modified version over of the installed regular (stock) version.
    Using the mount command to mount (overlay) a file/directory over the other.
    During boot, the modified version will be loaded instead of the regular (stock) version.​

    Note:
    This project originally started with "Vanced" modified version(s).
    Since the Vanced team was forced to stop...
    This project now includes modified version(s) created by patching the stock version using ReVanced.​

    Requirement(s):
    The regular (stock) version installed as a normal user app.
    The regular (stock) version must be the same version as the one included in the module.
    The regular (stock) version must be a full apk install not, a split-apk install.​

    How to install
    YouTube
    • Install regular (stock) YouTube.
    • Copy the iYT module zip file to the device.
    • Open Magisk Manager, select Modules and then Install from storage.
    • Select the zip file and install.
    • Reboot device.

    YouTube Music
    • Install regular (stock) YouTube Music.
    • Copy the iYTMusic module zip file to the device.
    • Open Magisk Manager, select Modules and then Install from storage.
    • Select the zip file and install.
    • Reboot device.

    Project Links
    Inject YouTube - GitHub
    Inject YouTube Music - GitHub

    ReVanced - GitHub.


    Cheers all. :cowboy:
    5
    Module Downloads

    Inject YouTube
    Releases - [GitHub] - Link
    PatchDescription
    client-spoofSpoofs a patched client to allow playback.
    disable-shorts-on-startupDisables playing YouTube Shorts when launching YouTube.
    disable-auto-captionsDisable forced captions from being automatically enabled.
    hide-adsRemoves general ads.
    hide-endscreen-cardsHides the suggested video cards at the end of a video in fullscreen.
    hide-info-cardsHides info cards in videos.
    hide-watermarkHides creator's watermarks on videos.
    minimized-playbackEnables minimized and background playback.
    remember-video-qualityAdds the ability to remember the video quality you chose in the video quality flyout.
    return-youtube-dislikeShows the dislike count of videos using the Return YouTube Dislike API.
    sponsorblockIntegrates SponsorBlock which allows skipping video segments such as sponsored content.
    video-adsRemoves ads in the video player.
    disable-player-popup-panelsDisables panels from appearing automatically when going into fullscreen (playlist or live chat).
    disable-fullscreen-panelsDisables video description and comments panel in fullscreen view.
    hide-layout-componentsHides general layout components.

    Inject YouTube Music
    Releases - [GitHub] - Link
    PatchDescription
    background-playEnables playing music in the background.
    bitrate-default-valueSet the audio quality to 'Always High' when you first install the app.
    certificate-spoofSpoofs the YouTube Music certificate for Android Auto.
    disable-auto-captionsDisable forced captions from automatically enabling in video player.
    enable-black-navbarSets the navigation bar color to black.
    enable-force-minimized-playerPermanently keep player minimized even if another track is played.
    enable-color-match-playerMatches the fullscreen player color with the minimized one.
    enable-compact-dialogEnable compact dialog on phone.
    enable-landscape-modeEnables entry into landscape mode by screen rotation on the phone.
    enable-opus-codecEnable opus codec when playing audio.
    exclusive-audio-playbackEnables the option to play music without video.
    hide-button-shelfHides the button shelf from homepage and explorer.
    hide-carousel-shelfHides the carousel shelf from homepage and explorer.
    hide-category-barHides the music category bar at the top of the homepage.
    hide-get-premiumRemoves all "Get Premium" evidences from the avatar menu.
    hide-music-adsRemoves ads in the music player.
    hide-music-cast-buttonHides the cast button in the video player and header.
    hide-new-playlist-buttonHide the New Playlist button in the Library tab.
    hide-playlist-cardHides the playlist card from homepage.
    hide-taste-builderRemoves the "Tell us which artists you like" card from the home screen.
    hide-upgrade-buttonRemove upgrade tab from pivot bar, hide upgrade banner from homepage.
    minimized-playback-musicEnables minimized playback on Kids music.
    remember-video-qualitySave the video quality value whenever you change the video quality.
    settingsAdds settings for ReVanced to YouTube Music.

    Note:
    Some patches will be enabled and preset by defualt.
    You can configure, enable and disable the patches under the settings menu.​
    5
    Regular (stock) Downloads

    The regular (stock) version can be downloaded from a safe source such as APKMirror.
    APKMirror - [WebSite] - Link

    YouTube
    Current stock version required for this module:
    - v18.23.35 - [ apkmirror ] - Link
    YouTube:
    v17.36.37 - [ apkmirror ] - Link
    v17.41.37 - [ apkmirror ] - Link
    v17.43.36 - [ apkmirror ] - Link
    v17.45.36 - [ apkmirror ] - Link
    v17.49.37 - [ apkmirror ] - Link
    v18.03.36 - [ apkmirror ] - Link
    v18.05.40 - [ apkmirror ] - Link
    v18.15.40 - [ apkmirror ] - Link
    v18.16.37 - [ apkmirror ] - Link
    v18.19.35 - [ apkmirror ] - Link
    v18.23.35 - [ apkmirror ] - Link

    YouTube Music (arm v7a)
    Current stock version required for this module:
    - v6.10.51 - [ apkmirror ] - Link
    YouTube Music (arm v7a):
    v5.23.50 - [ apkmirror ] - Link
    v5.29.52 - [ apkmirror ] - Link
    v5.31.50 - [ apkmirror ] - Link
    v5.34.51 - [ apkmirror ] - Link
    v5.36.51 - [ apkmirror ] - Link
    v5.39.52 - [ apkmirror ] - Link
    v5.55.53 - [ apkmirror ] - Link
    v6.08.50 - [ apkmirror ] - Link
    v6.10.51 - [ apkmirror ] - Link

    YouTube Music (arm64 v8a)
    Current stock version required for this module:
    - v6.10.51 - [ apkmirror ] - Link
    YouTube Music (arm64 v8a):
    v5.23.50 - [ apkmirror ] - Link
    v5.29.52 - [ apkmirror ] - Link
    v5.31.50 - [ apkmirror ] - Link
    v5.34.51 - [ apkmirror ] - Link
    v5.36.51 - [ apkmirror ] - Link
    v5.39.52 - [ apkmirror ] - Link
    v5.55.53 - [ apkmirror ] - Link
    v6.08.50 - [ apkmirror ] - Link
    v6.10.51 - [ apkmirror ] - Link

    Note:
    These are the stock apk files I use in the patching of the module.​
    4
    Hi all. 🙂

    Quick update.

    Inject YouTube using the official ReVanced patches.
    - YouTube v18.23.35

    Inject YouTube Music using inotia00's patches.
    - YouTube Music v6.10.51

    Updated Module Downloads with the current patches included in the module(s).
    Updated Regular (stock) Downloads with current required stock YouTube and YouTube Music.

    Cheers all. :cowboy:
    3