revanced-manager
revanced-manager copied to clipboard
bug: can't install after successful patching
Type
Error while running the manager
Bug description
After successful patching, Manager is trying to install "YouTube", not "YouTube reVanced" and fails. I've exported .apk to save time and not to repatch it over and over. I pick that .apk to install and get error described below.
Steps to reproduce
- select installed YT app
- select some patches
- install
- fail
Android version
Android 9, MIUI 12.0.2
Manager version
0.0.36
Target package name
com.google.android.youtube
Target package version.
v17.42.34
Installation type
Non-root
Patches selected.

Device logs (exported using Manager settings).
Initializing installer
Creating working directory
Copying original apk
Unpacking input apk
Reading dex files
Decoding AndroidManifest.xml only, because resources are not needed
Merging integrations
Deleting existing resource cache directory
Decoding resources
Executing all patches
Executing 'resource-mapping' of type: resource
Executing 'integrations' of type: bytecode
Skipping 'integrations' because it has already been applied
Executing 'locale-config-fix' of type: resource
Skipping 'resource-mapping' because it has already been applied
Executing 'settings-resource-patch' of type: resource
Executing 'settings' of type: bytecode
Skipping 'locale-config-fix' because it has already been applied
Executing 'general-resource-ads' of type: resource
Executing 'general-ads' of type: bytecode
[success] general-ads
Skipping 'integrations' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'video-ads' of type: bytecode
[success] video-ads
Skipping 'locale-config-fix' because it has already been applied
Executing 'bottom-controls-resource-patch' of type: resource
Skipping 'locale-config-fix' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'downloads-resource-patch' of type: resource
Skipping 'resource-mapping' because it has already been applied
Executing 'player-controls-bytecode-patch' of type: bytecode
Skipping 'integrations' because it has already been applied
Executing 'video-id-hook' of type: bytecode
Executing 'downloads' of type: bytecode
[success] downloads
Skipping 'integrations' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'seekbar-tapping' of type: bytecode
[success] seekbar-tapping
Skipping 'integrations' because it has already been applied
Skipping 'resource-mapping' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'hide-create-button' of type: bytecode
[success] hide-create-button
Skipping 'integrations' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'hide-shorts-button' of type: bytecode
[success] hide-shorts-button
Skipping 'integrations' because it has already been applied
Skipping 'video-id-hook' because it has already been applied
Skipping 'locale-config-fix' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'return-youtube-dislike-resource-patch' of type: resource
Executing 'return-youtube-dislike' of type: bytecode
[success] return-youtube-dislike
Skipping 'player-controls-bytecode-patch' because it has already been applied
Skipping 'integrations' because it has already been applied
Skipping 'locale-config-fix' because it has already been applied
Skipping 'settings' because it has already been applied
Skipping 'resource-mapping' because it has already been applied
Executing 'sponsorblock-resource-patch' of type: resource
Skipping 'video-id-hook' because it has already been applied
Executing 'sponsorblock' of type: bytecode
[success] sponsorblock
Skipping 'integrations' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'disable-startup-shorts-player' of type: bytecode
[success] disable-startup-shorts-player
Skipping 'locale-config-fix' because it has already been applied
Skipping 'settings-resource-patch' because it has already been applied
Executing 'microg-resource-patch' of type: resource
Skipping 'integrations' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'hide-cast-button' of type: bytecode
Executing 'client-spoof' of type: bytecode
Executing 'microg-support' of type: bytecode
[success] microg-support
Skipping 'integrations' because it has already been applied
Skipping 'settings' because it has already been applied
Executing 'minimized-playback' of type: bytecode
[success] minimized-playback
Skipping 'settings' because it has already been applied
[success] settings
Repacking patched apk
Compiling resources
Creating new dex file
Writing modified dex files
Finished!
Installer logs (exported using Installer menu option) [unneeded if issue is not during patching].
No response
Screenshots or videos
- After successful patching, it tries to install "YouTube", not "YouTube reVanced":

- Play Protect kicks in, "install anyway":

- "Application has not been installed" error:

Solution
No response
Additional context
No response
Acknowledgements
- [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
- [X] I have written a short but informative title.
- [X] I filled out all of the requested information in this issue properly.
- [X] The issue is related solely to the ReVanced Manager
Do you already have a YouTube ReVanced installed?
No, only Vanced (and bundled original YT, which I have normally blocked and hidden, only unblocked it and upgraded for the purpose of installing reVanced).
I wonder why there is no just .apk of reVanced prepared for download and install, just like in case of Vanced but that's a separate discussion.
You said you saved the patched APK on your phone right? can you try installing it with SAI and expanding the error and taking a screenshot?
Because SAI gives the actual reason it failed installing (like ADB)
I have never heard the name SAI, will Google that tomorrow and report back. Thanks for helping so far.
Ok, so SAI reported INSTALL_FAILED_INTERNAL_ERROR: Permission Denied but also upon first run warned me about MIUI which might block installation. I recall I had some issues with installing Vanced for the same reason but no problems when installing via ADB. Will try that tomorrow and let you know here.
Turn off MIUI optimization in Developer Options and let me know if that sorts it
Turning it off is a big nope. I did it once, it completly wiped out the settings, made the phone works weird and did all sorts of other bad things. Took me weeks to bring back proper behavior. Not gonna do this again. Will try with ADB, it worked for Vanced.
holy shit lmaoo xiaomi come on
Turning it off is a big nope. I did it once, it completly wiped out the settings, made the phone works weird and did all sorts of other bad things. Took me weeks to bring back proper behavior. Not gonna do this again. Will try with ADB, it worked for Vanced.
That's why you're not meant to turn it off. MIUI Optimization is necessary for a lot of system apps to work correctly. Also turning it back on should fix all behavior, only permissions get reset.
Though it stopped bothering APK installations on newer versions of MIUI (at least that's the case for me)
Try using ADB for installation since MIUI doesn't block that and it should output the actual reason.
Update:
- while installing with ADB I got different error:
>adb install youtube-revanced_v17.42.34.apk
Performing Streamed Install
adb: failed to install youtube-revanced.apk: Failure [INSTALL_FAILED_VERIFICATION_FAILURE]
- I've disabled verification of the APK during USB install
Performing Streamed Install
Success
- New application showed in the drawer but it's named "YouTube" and has YouTube icon (not sure if that's ok - I expected "YouTube reVanced", maybe wrongly)
- Info about new app looks like this:

- App fails to start, log:
java.lang.RuntimeException: Unable to start activity ComponentInfo{app.revanced.android.youtube/com.google.android.apps.youtube.app.application.Shell_HomeActivity}: android.content.res.Resources$NotFoundException: Drawable app.revanced.android.youtube:drawable/quantum_launchscreen_youtube with resource ID #0x7f08090d
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6810)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: android.content.res.Resources$NotFoundException: Drawable app.revanced.android.youtube:drawable/quantum_launchscreen_youtube with resource ID #0x7f08090d
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/quantum_launchscreen_youtube.xml from drawable resource ID #0x7f08090d
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:854)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:634)
at android.content.res.MiuiResourcesImpl.loadDrawable(MiuiResourcesImpl.java:307)
at android.content.res.Resources.getDrawableForDensity(Resources.java:902)
at android.content.res.Resources.getDrawable(Resources.java:841)
at android.content.Context.getDrawable(Context.java:635)
at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2635)
at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2685)
at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2076)
at android.app.ActivityTransitionState.setEnterActivityOptions(ActivityTransitionState.java:160)
at android.app.Activity.performCreate(Activity.java:7237)
at android.app.Activity.performCreate(Activity.java:7213)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6810)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #6: <bitmap> requires a valid 'src' attribute
at android.graphics.drawable.BitmapDrawable.verifyRequiredAttributes(BitmapDrawable.java:788)
at android.graphics.drawable.BitmapDrawable.inflate(BitmapDrawable.java:771)
at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1332)
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1321)
at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:279)
at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:194)
at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:142)
at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1332)
at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1291)
at android.content.res.ResourcesImpl.createFromXmlForDensity(ResourcesImpl.java:1506)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:838)
... 24 more
So.. any hints on that error I'm having? Thanks in advance:
java.lang.RuntimeException: Unable to start activity ComponentInfo{app.revanced.android.youtube/com.google.android.apps.youtube.app.application.Shell_HomeActivity}: android.content.res.Resources$NotFoundException: Drawable app.revanced.android.youtube:drawable/quantum_launchscreen_youtube with resource ID #0x7f08090d
I have same the problem. Youtube version 17.43.36
Is this issue still present for OP or any others?
Is this issue still present for OP or any others?
I'll try to retest it this week. As installation is much much more cumbersome comparing to Vanced, it will take some time. I have to enable YT app, upgrade it, download reVanced installation and do patching. Currently still using Vanced. Will update you here (not sure why ticket has been closed without confirming it's working?)
Why are you enabling and updating stock YouTube app for this?
Were you patching using the updated YouTube play store version this whole time?
not sure why ticket has been closed without confirming it's working
The original issue (unable to install) is a MIUI problem, your new issue (ReVanced YouTube crashing) is unrelated to that
Why are you enabling and updating stock YouTube app for this?
Because that is what is required by reVanced to be installed? It's patching original YT app, yes? And with my current setup (Vanced) I have original YT app blocked/disabled/hidden as it can't be uninstalled (no root, preinstalled on the phone) and I didn't want it to interfere with any YT actions like opening the links or hijacking notifications etc. Just wanted to have one YT app (Vanced at the moment, reVanced in the future).
Were you patching using the updated YouTube play store version this whole time?
As far as I remember, yes. It was a few months ago. Will try again and will report back.
No, what you're saying is wrong. You're never required to install the recommended version. You only have to download the full apk file of the recommended version and use the storage option at the bottom right in the manager to select that downloaded apk file and then apply the patches.
These steps are clearly mentioned in all the user based guides if you've ever took the time to look into it before starting the entire process.
There are no official guides yet
There are no official guides yet
Clarified that those are user based guides. Thanks!
These steps are clearly mentioned in all the user based guides
Ok, probably not the best place to discuss it here but installation of reVanced couldn't be more confusing. On the main page https://github.com/revanced there are no clues how to perform it. Just a list of unspecified subprojects. Should one use cli? patcher? manager? No clue at all. I was unable to find any "user based guides" there.
So yes, I took the time to look into it but nothing here is clear at all, sorry. And I consider myself a technical guy (programmer for over 20 yeas) so no idea how not-technical people find themselves in this maze.
The steps are a bit confusing at the start, but once you're used to it everything will be fine. Glad I could assist you in solving this issue.
Thanks for your patience so far!
I took below steps:
- download
zulu19.32.13-ca-jdk19.0.2-win_x64from https://www.azul.com/downloads/?package=jdk#download-openjdk - download
revanced-cli-2.20.0-all.jarfrom https://github.com/revanced/revanced-cli/releases - download
revanced-patches-2.162.0-dev.2.jarfrom https://github.com/revanced/revanced-patches/releases - download
YouTube 18.03.36 apkfrom https://www.apkmirror.com/apk/google-inc/youtube/youtube-18-03-36-release/ - run
java -jar revanced-cli.jar -a youtube.apk -c -o unpatched-output.apk -b revanced-patches.jar - got few screens of errors (--> should I create new issue for it?)
- few new files have been created, with
unpatched-output.apklooking as the most important but fromunpatchedin filename I'm unsure this is the expected result? (I know this is the name in-ooption, just curious whyunpatchedwhen what we want is patched?)
Suggestion to put those steps (in a generalized form) in https://github.com/revanced/.github/blob/main/profile/README.md ?
You forgot to merge the integrations. These steps do not belong on the profile README.
- Not sure where those steps belong but would be nice to have such clear instructions on the main page to know where to go and what to do - currently there is absolutely no info for newcomers and "just click everywhere and figure this out by yourself" is far from smooth process.
- How to merge the integrations then? Here are only 3rd step that should create output apk? 4th one requires rooted phone so of course fails for me.