New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: When patching fails you're stuck with a broken YT app on every reboot even when reinstalling stock and/or uninstalling manager #425
Comments
This is the same thing happened to me but the solution you have mentioned is not working at all. Clearing those folders has no effect. Reinstalling youtube not working too. I have installed the app using root method maybe that's why your solution didn't work for me. Clearly this is a bug. |
You probably missed it but I also use the root method. Perhaps there is a third script in your case or you did not remove the proper files. |
In my case I patched YouTube successfully but after some days YouTube app is renamed to "Apply" and can't start the app |
I fixed this by a clunky method, basically the revanced manager installs a broken YT app at system startup (in my case Twitter and Reddit too) so instead of updating or uninstalling it, I disabled signature verification in the package manager (Lucky patcher method with Xposed settings), then install on top of the modded one the official one and that fixed both Twitter and Reddit, for YouTube I only update in Google play and starts working again. Good luck trying my method PD: Manager should have an option to undo that startup script I hope OP reads this it's annoying to deal with this every startup. |
A little history.. A few years ago, due to updates in Android security, modified versions of apk files would fail verification on boot. Instead, we can use the This allows the stock version to be found and verified on boot. This is what the boot script(s) are for. When you use the patcher app to install the root version. The permissions of the modified apk file needs to be set correctly. Note: In my testing, I found I have to include the Client Spoof patch for YouTube. Cheers. 🤠 PS: |
I understand perfectly why the scripts are there, although I don't actually need that method as I'm patching android for other reasons. The problem here though is that the Manager does not cleanup. Neither the tmp directory or the scripts on uninstall. There's also an issue with overwriting the files in the tmp directory that along with inability to clean, leaves you completely stuck with a broken app if you can't figure out how it's implemented in order to manually clean it. And the vast majority of users fall into that category. |
Due to the issues I have documented in #519, I have to "fix" a broken so frequently. I've found the only way to guarantee proper startup is to clear the app data and "uninstall updates" for YouTube in the Play Store. After that, I'm back to a completely stock YouTube with all settings reverted to their original values as if you first opened YouTube. From there, I'm able to upgrade YouTube to my preferred version and then use ReVanced Manager to patch it. This will work until my device is rebooted again, then I have to do the above all over again. I have not needed to go into /data/ and manually delete anything. Maybe it'll work for you as well. Good luck! |
@bassmadrigal it's exactly because you have not manually deleted anything coupled with the issue reported here that you have to redo everything after reboot. This IS the actual issue reported which you have not understood. A broken patched version is being copied from Manually deleting the broken version from |
@Nodens- This happened on two different devices months apart from each other with the exact same symptoms. I've only had my Pixel 7 for a month and ReVanced was a brand new install on a freshly rooted device (ie, those folders and files would've been empty/non-existent). The issue also existed previously with my Pixel 6 with both revanced-cli (which I used before the Manager was released) and ReVanced Manager. And if this is the problem, why isn't ReVanced Manager clearing those folders/files as well and replacing them with non-broken versions? BTW, looking into those folders, my Either way, this is looking like a ReVanced bug and shouldn't require manually deleting anything. |
There are at least 2 different interrelated issues. First is that Revanced Manager doesn't clean either the scripts and the patched files from tmp on uninstall or the patched files from tmp on the delete temp files option. And the second is that something is preventing the Manager from writing properly in the tmp directory so the files there are broken and the scripts keep overwriting your youtube even if you uninstall Revanced Manager. Could be SELinux related, I didn't investigate further. But yes it is a bug. If you want as a workaround to stop redoing patches at reboot, do this: EDIT: Forgot to mention but if you missed it, read ipdev99's comment above regarding why the scripts and the copy on boot implementation is there to begin with. |
This did not work (edit, or I we misunderstood each other and what I wanted to happen after a reboot). This reverted YouTube back to the stock version on reboot. There was a benefit to this method in that the stock version that shows up on reboot (which I wanted to be ReVanced) did not crash when trying to open it up. And when reinstalling ReVanced Manager and repatching YouTube, all my custom settings were retained. This doesn't surprise me knowing the basics behind how systemless changes work to retain SafetyNet approval, which I get into below.
How would ReVanced survive a reboot if you're removing the scripts that overwrite the stock YouTube after initial checks occur during boot? This is what they wrote:
Removing those scripts would then prevent the ReVanced version from overlaying the stock version on bootup. |
The problems seems to be the prevoius files are not being replaced by the new version(s). To overcome this you need to remove (delete) the current boot scripts and patched version before you patch and install again using the Manager. This should give your device a clean slate and the new scripts will be written and the patched apk file place properly. Example YouTube: Remove the ReVanced YouTube mount directory. Then use ReVanced Manager to patch and install as root again. 😉 Hope it helps more than confuse. 🙃 🤠 |
I had already done that and that's what reverted YouTube to the stock version after a reboot instead of the patched ReVanced version I had just installed. To give you the rundown, to prep, I deleted the boot scripts, the Then I rebooted, installed ReVanced Manager, patched YouTube, then removed the boot scripts, the Reinstalled ReVanced Manager, patched again, rebooted without deleting those newly generated scripts and apks, and YouTube crashes on opening and I have to uninstall updates and clear data to allow me to open YouTube again (which I then need to patch and reset all my settings). There is one good thing I've found through this testing and that's to delete the scripts and folder before rebooting, because then I just need to repatch to get ReVanced back but my YouTube settings (both stock and ReVanced) stay untouched. It sucks needing to reset them every time you reboot your phone. |
Yeah this is why I said that this needs to be a magisk module. The current method is rather messy and it seems like something prevents proper writes causing all this. I didn't pursue debugging this as I have moved to using wanam's lsposed module which just works for what want it to do. |
This should be fixed as the installation process is now separated from the patching process |
Type
Other
Bug description
I tried a few patches on the latest supported version on my device (rooted method without microg). I eventually found a combination that worked. After a restore to stock and trying a different patch combination it started crashing and my original patch combination was also not working anymore. After reboot Youtube app kept crashing even when restored to stock prior to reboot, to my surprise. I kept uninstalling and reinstalling a clean version and always on reboot it would be replaced with a non-working version.
I went ahead and cleaned the tmp directory from within the app. No effect.
Then I uninstalled the manager and again no effect. Always on reboot the working version would be replaced with a non working one.
I finally started digging around to debug and I figured out what was happening. There are some scripts installed that run on boot and replace the installed version with the patched version. I assume this is done in order to workaround auto app upgrade. BUT, there are several issues at play here.
I believe #237 is also related in part to this.
Steps to reproduce
Not sure if this is 100% reproducible (the write/delete tmp directory part) or something that triggers intermittently.
In my case it was always impossible to delete the tmp directory from the manager and uninstalling always left the script in both locations and the tmp directory in place.
Android version
12
Manager version
0.0.36
Target package name
Youtube
Target package version.
17.36.37
Installation type
Root
Patches selected.
I tried several patch combinations. I got it to work with just background and the 2 ad patches but it was after trying different combination of patches (that I can't remember right now) and getting a crashing youtube app, that I couldn't get the original 3 patch combo to work either and ending with an always broken version replacement on reboot.
Device logs (exported using Manager settings).
Installer logs (exported using Installer menu option) [unneeded if issue is not during patching].
No response
Screenshots or videos
No response
Solution
Manually delete revanced files in
/data/local/tmp
, in/data/adb/service.d
and in/data/adb/post-fs-data.d
to recover.Additional context
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: