yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Master_T:
iYTBP - injected YouTube Background Playback

What is this?

This is a modded version of the original YouTube app that:

enables background / screen-off playback

removes ads

adds advanced features like per-network quality defaults

...and much much more!

F.A.Q.

Q: Who made this?

A: I ( [MENTION=4085448]Master_T[/MENTION] ) initially created this mod by basing it on the source code of the "Youtube Background Playback" xPosed module. All credits for the original implementation go the the authors of that module. I merely "injected" the modifications from the module into the original YouTube APK.

A lot of water has passed under the bridge since then, and the mod is now maintained and updated by awesome volunteers, who added a ton of new features to the original implementation. In particular, a big shout out goes to:

[MENTION=3279788]ZaneZam[/MENTION] - (ad)vanced version, current magisk module

[MENTION=5331708]laura almeida[/MENTION] - rootless edition

[MENTION=4714254]Razerman[/MENTION] - new features and mods implementation

[MENTION=8043063]Anova's Origin[/MENTION] - original magisk module

[MENTION=4898097]arter97[/MENTION] - original adblock solution

Q: Why does this exist?

A: Originally, I made this mod because there was no xPosed for Android Nougat. Now the mod has developed into (possibly) the most feature-rich YT mod out there!

Q: Does this require root?

A: the normal / vanced edition does, but if you don't have root check out the rootless version from by [MENTION=5331708]laura almeida[/MENTION]

Q: Can I donate to the project?

A: WE DO NOT ACCEPT DONATIONS - we appreciate your support, but please don't send money to us. This is a non-profit project, and sending us money will just mean we have to waste time issuing refunds.

CURRENT VERSIONS / EDITIONS

The iYTBP project is discontinued! But fear not: the project continues under the "YouTube Vanced" name. You'll find all the latest builds and infos here: https://xdaforums.com/android/apps-games/app-iytbp-injected-youtube-background-t3560900

Obsolete infos/links:

"Vanced" version - by [MENTION=3279788]ZaneZam[/MENTION]

My personal recomendation (if you have root) and current "official" version, if such a thing exists. Also comes in Magisk form, if you prefer that - see post #2

Vanced rootless version - by [MENTION=5331708]laura almeida[/MENTION]

Same as the vanced version, but doesn't require root (but requires special steps if you want to use it with a google account, read instructions in the post) - see post #3

Alternative Magisk Module versions - by [MENTION=8043063]Anova's Origin[/MENTION]

Alternative Magisk version - see post #4
[Android Apps and Games] Anova's Origin:
Magisk Modules for iYTBP

Magisk Modules for [MENTION=3279788]ZaneZam[/MENTION]'s iYTBP:

https://drive.google.com/open?id=0B8lY7pYQ4GSza200ajZNYkdWOVE

Current Versions:

arm: 12.49.55v

arm64: 12.49.55v

x86: 12.32.60v

x86_64: 12.32.60v

All Magisk modules are using the minAPI21 nodpi variant of [MENTION=3279788]ZaneZam[/MENTION]'s iYTBP unless otherwise stated.

Instruction for the Magisk Module:

1) Delete any prior updates you have installed for YouTube

-Navigate to Settings -> Apps -> YouTube and disable the app, this will uninstall all updates

-Once disabled, re-enable YouTube

2) Flash the module zip in either Magisk Manager or a custom recovery

The module will survive dirty ROM flashes. To upgrade to a newer version of iTBP using the Magisk modules, simply flash the new module over the old one.

Note: If you are using Substratum to theme YouTube (especially if using Substratum's legacy mode), you may have to remove overlay first prior to updating. Otherwise, YouTube will crash immediately when opening. If you experience this, you can try any of the following to fix it:

-Uninstall and reinstall the overlay on YouTube

-Flash Substratum-rescue(legacy).zip from Substratum's folder, then re-apply all your themes

-Dirty flash your current ROM, reapply Substratum theme
[Android Apps and Games] Master_T:
They should work,this is based on the original YouTube app. But if you have xposed, know that this does the same thing as the "YouTube background playback" module.
[Android Apps and Games] kos25k:
thanks dude.personally I dont live without xposed ? I just want to tell some guys who dont have xposed,to know!
[Android Apps and Games] SilverZero:
This is great, very nice work. I will watch to see if anybody steps up to develop a version of this with ad blocking (even though the OP has preemptively said he won't do it) as that's more important, but I sure wish I could have both.
[Android Apps and Games] koohyar:
Tested on victara (32-bit) and it's working so far.

Great work OP, Thanks.
[Android Apps and Games] Kim Lu:
Worked on HTC 10 running on 2.41.709.3! Thanks!
[Android Apps and Games] Master_T:
Thanks for the feedback guys.

Can anyone point me to a guide or an example of how to build a flashable zip from this?

Particularly how to find and remove the old YT apk, installing the new one seems relatively straightforward
[Android Apps and Games] الفلسطيني:
Looks Interesting I'm still downloading it

Would you like to try the link for Flashable Zip!

https://xdaforums.com/chef-central/android/guide-how-to-make-flashable-zips-apps-t3255159
[Android Apps and Games] Ishtaar:
Would this work if you do the same process but using an Ad-Free patched apk like the ones on this thread ?

Thanks for doing this :)
[Android Apps and Games] Master_T:
It should... I might try it this weekend, will let you know. Tho I see the apks are almost double the size of the original ones... hope they don't contain any "hidden surprises"...
[Android Apps and Games] shamsud:
Thanks for the effort but lucky patcher can do this with custom patch
[Android Apps and Games] fabjazz:
Thanks, it works well on HTC 10 Nougat ?
[Android Apps and Games] sjamie:
Using LP, are you also able to kill the YouTube ads? If so, how?
[Android Apps and Games] amskhan1:
Didn't work for me
[Android Apps and Games] savvymatthew:
Working great!!!!

I just used a root browser, Created a folder and placed the apk in it instead of using adb. No problems yet.

I keep having to select the resolution for the video everytime though if I want HD keeps resetting ?
[Android Apps and Games] sjamie:
I just used this method which is SO much easier than using ADB!

I can confirm this app works perfectly... thanks [MENTION=4085448]Master_T[/MENTION]!

It certainly would be nice to be able to set the default playback resolution.
[Android Apps and Games] Jsilver73:
Does anyone have a mirror to a trusted file host like afh or similar - I am not so keen on signing up to a paid file share even for a trial........
[Android Apps and Games] Indranuj Kar:
Awesome. This was the only reason that prevented me from updating to Nougat. Just a suggestion please add that new feature something which is called double tap to seek by 10secs. Thats really handy!
[Android Apps and Games] massalim:
That feature is included in this version.
[Android Apps and Games] android_smater:
it work gr8 it one time 2 time i open app it give fc then again i need to clean data of app the same 1st time open 2nd tipe stop do some every time plz fix it

in arm64 cpu plz check
[Android Apps and Games] massalim:
I just found a fix for history issue, AdAway was blocking it. You have to add s.youtube.com to white list. Thread from official github: https://github.com/AdAway/AdAway/issues/665
[Android Apps and Games] Pensionaru:
Did anyone found a way to stop showing notifications from Youtube app of updating, from Google Play? Unfortunately I've tried Signing the app with ZipSigner and install it, but it didnt work, somehow, Google Services doesnt let system instlaled Test-key apps working properly. Any ideas?
[Android Apps and Games] sjamie:
Yes! Here's the solution - https://xdaforums.com/android/software-hacking/mod-detach-market-links-theme-ready-apps-t3447494
[Android Apps and Games] realista87:
isn't easier to use titaniun and the "detach from market" option? it's very easy and intuitive.

from the OP:

Download the APK for your cpu architecture

Use a file manager to place the APK in an empty folder, so it contains only the APK

Use a file manager that can write to /system (i.e: has root support) to copy the folder that contains the APK to /system/app

Reboot

Enjoy!

did i miss the part where i have to click on the apk and INSTALL it??............... am i stupid to ask you this? and ok to create a folder that's empty, but is its name important or not?
[Android Apps and Games] sjamie:
Using TiBu to detach an app works temporarily until you reboot or some time passes then the app is automatically reattached to the Play Store.

No, you don't click on the apk. It won't run/install that way. The name of the folder you create is not important. Place the apk in a folder in root\system\app and when you reboot, the app will be in your app drawer waiting for you.
[Android Apps and Games] realista87:
thank u for the fast reply! last question... have i to uninstall the official yt app or could they both coexist?
[Android Apps and Games] sjamie:
You must uninstall the official app first before installing this one.
[Android Apps and Games] loveaddicated:
i downloaded apk but its corpted ..plz give the link for oneplus 3 .. i want add free youtube with background playback
[Android Apps and Games] cyan pac:
Somehow ads are getting through now. Google knows to much
[Android Apps and Games] aouni_tahech:
Wow, such a great work. At some point I was willing to downgrade to marshmallow just for the sake of getting xposed + youtube adaway/background play!

You made my day. Magisk module worked like a charm!

/ HTC 10
[Android Apps and Games] Zer0w:
Thanks for the magisk module, now I have no more ads and the playback works just fine, this was the only problem for me with Nougat but now I can enjoy YouTube again.
[Android Apps and Games] OT-Xtreme:
tnx will try it
[Android Apps and Games] DBlake1:
Do you have a theme ready version? That would be the icing on the cake for me!
[Android Apps and Games] ranaxda200:
Use Titanium Backup and Detach YT from Market. It's the most easiest option imo

---------- Post added at 08:23 PM ---------- Previous post was at 08:22 PM ----------

Substratum themes working good.
[Android Apps and Games] sjamie:
That seems to be a temporary solution which usually only lasts a few hours or days or until reboot. Inevitably app upgrade notifications return.
[Android Apps and Games] realista87:
all done. work perfectly so far,

background works. and i tested some videos ...no ads showed

. i will update thread within 2/3 days to say if ad blocking is REALLY working on all videos...

best part is that ALSO THE SUBSTRATUM swift black theme perfectly modded the app!
[Android Apps and Games] PokemonTotalWar:
Can someone make a Magisk ZIP for the ARM adblock version?
[Android Apps and Games] laura almeida:
?

https://www.androidfilehost.com/?w=files&flid=193602
[Android Apps and Games] RealNovgorod:
Sorry if this was answered on the previous 200 pages, but is it right that I can't use my google account to login? I'm using the non-root version with microG. When I try to login, I'm prompted to add an account and if I try to add my google account, it gives me an error that "this account already exists on your device" - but I can't add it in the modded youtube app (there are no accounts in the account list, just the "add account" button).
[Android Apps and Games] medo159:
Same here :( couldn't find the answer though
[Android Apps and Games] DEVILOPS 007:
[MENTION=3279788]ZaneZam[/MENTION] is there a way you could possibly edit the youtube app to make the default resolution the max resolution the device can do? I'm not sure if it is possible but it would be great if possible. Thanks!
[Android Apps and Games] netjinda:
youtube version redblack for arm64 ?
[Android Apps and Games] laura almeida:
Show me screenshots of app info of both YouTube and microG.
[Android Apps and Games] laura almeida:
Which phone ?

Which rom ?

Can you try latest version of microG from AFH ?
[Android Apps and Games] RealNovgorod:
Thanks for the reply! Turns out, I derped here, my bad...

I had OGyoutube installed, which has its own version of microG. When I installed microG for iYTBP, I assumed it would have a different app name, but that's not the case. But for some reason it didn't replace the microG for OGYT, even though it showed installation successful. When I looked for the app info, it still showed "microG for OGYT". I uninstalled everything, then reinstalled microG for iYTBP, then the modded youtube app - and the login works!

Problem solved, just be cautios which version of microG is installed.
[Android Apps and Games] Nazariyhuhalo:
Is it possible to mod a Android tv YouTube app v1.3.11

And install it without root

any help will be very appreciated
[Android Apps and Games] ZaneZam:
isn't that dynamically and depending on your current quality of internet connection?

it might be possible but that might produce stucking videos or never ending loading of videos (i guess)

1.) well it might be possible and if it is installable w/o root access depends on your tv OS.

2.) beside of that doing this might be a huge workload as u have to find out from scratch if the ads are done

the same way or different in that tv app. unlikely that it's the same as with the phone app

3.) back to point one, u need to be able to install it manually and u have to have a compatible device, this is essential for doing anything ;)

5.) i'm not even trying it :)
[Android Apps and Games] DEVILOPS 007:
Maybe but I don't know. If you ever decide to try it though I'd be more than happy to beta test it but that's up to you. Thanks anyway:)
[Android Apps and Games] Motawa88:
Videos Play in slowmo
[Android Apps and Games] T3RM1NATOR:
Hi [MENTION=5331708]laura almeida[/MENTION] your modded black version of youtube is awesome. But in its share option copy link button is not visible because of the black layout.

Plz try to fix this in the next version.

Thanks :)
[Android Apps and Games] Xellotath:
Along with ad-block not working after a few days (or not at all) this is another issue I've seen, though it can be temp resolved by changing quality setting
[Android Apps and Games] Ragnar Eldur:
Isn't this issue about adblock not working for some of you because the app was updated by Google Play Store without you knowing? Try disabling the app and see if the system asks to restore to the factory default version, if so, the app had indeed been updated to the normal version. It happened to me the other day because I forgot to disable the auto update for the app and ads started to show and the background playback was gone. After I disabled the app so it was restored to the original modded version, enabled it again, wiped it's data and enabled all it's permissions, everything worked fine again.

So check that out and see if that solves the problem! ?

P.S. DO NOT FORGET TO DISABLE THE AUTO UPDATE FOR THE APP!

I use ZaneZam's modded version found on www.androidfilehost.com and used his modded recovery mode installer that was originally made by Arter 97 (the creator of ArkTube, the greatest YouTube Downloader of all time) to flash the app as a system app. I have never had any issues with ads suddenly appearing unless it was updated by Google Play Store.
[Android Apps and Games] RcK17:
Just FYI, I got an unskippable 30 sec ad for the first time since I started using the mod a couple of months ago - clearing data for the app seems to have fixed that.
[Android Apps and Games] DomingoPl:
Ads started showing up. App reinstalled same thing. Autoupdate off android 7.0 on xiaomi mi5
[Android Apps and Games] jatdipasand:
My youtube app keeps crashing "Unfortunately, Youtube has stopped"

Phone: Moto X Style

Android Version: 6.0

Not Rooted

The Microg and youtube versions I have tried installing are :

MicroG for iYTBP v0.2.4.apk

YouTube_v12.23.60(nodpi)(Grey_Black_v1.1).apk

YouTube_v12.23.60(nodpi)(Red_Black_v1.1).apk

YouTube_v12.23.60(nodpi).apk

Issue: The YouTube app works fine as long as I don't login but it crashes as soon as I login.

I click on the three dots, Add Account, + takes me through the login process through google login, I put in username/password. gives me screen to accept conditions and tries login, I see the YouTube page for a flash first time and it crashes saying " Unfortunately, Youtube has stopped". And every time I open it since, it keeps crashing immediately.

I have tried installing all the version listed above, clear app data, cache, restarting but nothing has worked.

Any help would be appreciated!!

Thanks
[Android Apps and Games] Razerman:
Unskippable video ads doesn't come because of that. And if Google play update were the case, all ads would show up.

---------- Post added at 02:32 PM ---------- Previous post was at 02:27 PM ----------

Install this for now, until fix for Motorola roms.

https://xdaforums.com/showpost.php?p=72869030&postcount=1973
[Android Apps and Games] pathum1:
Weird, didn't work for me. I'm on AquariOS (nougat) - nexus6p.... Using magix for root.uninstalled the default YouTube app using System app safe remover. I copied the file into a folder then copied the entire thing into system/apps and set permissions for folder (755 something) and file separately (644 something).... rebooted..

No background playing of YouTube videos :(
[Android Apps and Games] jatdipasand:
Thank you for your prompt reply

I installed that one and it gives me an error too saying "The account already exists on your device" and would let me go past the email screen?
[Android Apps and Games] Razerman:
Have you tried uninstalling the microG and installing the kamicartier.microg.apk instead? If not, could you test if that works?
[Android Apps and Games] 2free:
Thank you

Can you add root_transparent theme?
[Android Apps and Games] Nazariyhuhalo:
Where would one find themed YouTube apks
[Android Apps and Games] TomiLynch:
Second post. Third for magisk modules
[Android Apps and Games] esun:
Update: The root d version seems to be ad-free now while the non-root still has ads under videos.
[Android Apps and Games] dynospectrum:
There are limitations to non-root version, this is normal.
[Android Apps and Games] Razerman:
What limitations :confused:

And those ads are already removed in the non-root version as well but as far as I know, it's not released yet. Possibly working on some other fixes too or something.
[Android Apps and Games] ZaneZam:
yes removed with latest "refresh" ;)
[Android Apps and Games] saabsaviorlee:
Hello, Pixel XL, rooted, pure Nexus, running arter97, og iYTBP, and Zane's 12.23.60 all give me either unskippable ads or the ad on homepage and skippable ads. Is this an isolated issue on my end or are other folks experiencing anything like this?

Edit: background play still works, just ads are getting through
[Android Apps and Games] jsbthree:
Youtube App is always getting updated with playstore.

Phone is rooted, playstore link is removed with titanium backup and automatic updates are switched off.

What can you do to prevent the updates?
[Android Apps and Games] Xellotath:
I got 3-4 full days without video ads last week then suddenly started getting them on sunday morning (yesterday). I remember something similar happening the previous week - sunday morning. Could there be some element of time involved in when the ads are leaking through ? Today (Monday) I am again not getting any video ads. Will see if the same happens again this week. Not sure if this is helpful in devising a fix though.
[Android Apps and Games] jatdipasand:
Thank you. That worked. :laugh:
[Android Apps and Games] Timmmmaaahh!:
Don't use Titanium, it just temporarily detaches and reconnects it again (probably re-enabling updates in the process). Just switch off Play Store updates here, it should stick. If not, clear Play Store's data, set it up and disable YT updates again.
[Android Apps and Games] MCFADONNA:
I'm getting maybe 2 videos with no ads after that the ads come back . Only thing working is the background play
[Android Apps and Games] Xickle:
Hello! I have a rooted Samsung Galaxy S8, and have installed iYTB. There are absolutely no ads, which I love! However while listening to music on youtube, I have noticed that the videos stop a few(around 10) minutes after the screen has been turned off. When I turn the screen back on, the video is in buffering mode for a short while, even though the 4G symbol is always there, and then it starts playing again.

I am not sure what is happening but I assume there is a hidden battery saving feature that does this. Is there a way I can fix this?
[Android Apps and Games] zelendel:
This is android doze feature. The easiest way is to go into battery options and set youtube to not be battery optimized.
[Android Apps and Games] Xickle:
Hey, thanks for the reply!

I've checked the battery monitor settings multiple times, but Youtube isn't even there. I suspect it might be because I have it installed as a system app. Or maybe I'm missing something.. It's not under monitored or ignored apps.
[Android Apps and Games] zelendel:
If it is not showing under Battery/battery optimization then there is a bigger issue there.
[Android Apps and Games] miroslav.bk:
Yes! This is a f**king GREAT JOB! :cool:

Thanks :good:
[Android Apps and Games] Xickle:
Yeah definitely isn't there.. I installed it by copying the .apk into /system/app/youtube/ (I created the youtube folder). Have I screwed up there?
[Android Apps and Games] cmglng:
[MENTION=3279788]ZaneZam[/MENTION] Working great on my device (v12.23.60) Question though is there a white/default theme version? Cant seem to find it on the afh folder. Is there any chance you can include it, my device is not AMOLED so I dont benefit from the blacks. Would be great if there's a default theme option.
[Android Apps and Games] ZaneZam:
ehm the once without any theme name like "red" or "grey" are the default white ones. beside of that all of the themed ones are in separate folders, sooo try again :)
[Android Apps and Games] cmglng:
Lol. Found it. I thought the files below the folders are from the "Popular Files" section.
[Android Apps and Games] jsbthree:
Thx. I allready turned auto updates off.

But YouTube updates will always shown in playstore. And when other apps would get an update, YouTube will be updated to with the "update all" button.

I thought there is a possibility to hide YouTube in playstore...
[Android Apps and Games] Timmmmaaahh!:
This isn't true. After tapping the "Update all" button you should get a notification that there's an app (YT) that has auto update disabled. In that notification, you can select 'Skip' at the bottom to proceed with updating all your apps without updating YT. On another note, contributions here are so amazing that, when keeping up with them, you rarely get update notices :p
[Android Apps and Games] MArtyChubbs:
Detach will do that.
[Android Apps and Games] :
Huge thanks to the dev for the app, exactly what I needed after upgrading to nougat. The background playback is working great, however the ads don't seem to be getting blocked. Not sure if this is a recent thing as some other people mentioned it, but I want to see if it's not just me.

This is on an S8+ running the newest magisk version (because the root and non-root versions kept getting updated or would stop working despite auto update being off).
[Android Apps and Games] Borfas:
hello, what version is for galaxy s8 (i use magiks)
[Android Apps and Games] :
Magisk modules are uploaded in the fourth post.
[Android Apps and Games] jsbthree:
Unfortunately not [emoji22]

It always update all apps when I hit "update all".

YouTube will update to.

I tried to delete YouTube folder with root explorer too and install the "youtube_12.23.60-1223602440_minAPI16(arm64-v8a)(480dpi)(grey-black-v1.1)-adaway-backgroundplayback.apk" with "MOD-arter97-youtube-installer".

Does not work either [emoji20]
[Android Apps and Games] JoKeR_Roxx:
Save offline feature is not working for me... I don't know why, is it only me ?
[Android Apps and Games] nirogu325:
Search works. Please use it.