You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like the "change package name" patch does not change the name of permissions, atleast for YouTube. This can lead to collisions with the original app.
Reproduction:
Have YouTube (original) installed on your phone
Patch a YouTube APK with "change package name" (choosing the default .revanced append is fine)
Try to install it
Expected: Installation works because the "change package name" prevents a collision with the original YouTube
Actual: Installation fails with a package collision error. There's not much information provided but trying to install the patched APK via ADB shows that it is about permissions (see error log).
Error logs
this happens if you try to install the patched APK using ADB:
$ adb install ytrevanced.apk
Performing Streamed Install
adb: failed to install ytrevanced.apk: Failure [INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.google.android.youtube.revanced attempting to redeclare permission com.google.android.youtube.permission.C2D_MESSAGE already owned by com.google.android.youtube]
Solution
I don't know a lot about android development or how the revanced patches work, but I assume a fix would be to also change permission names when the "change package name" patch is applied.
Additional context
The reason why this is a problem is that I ran into a problem after uninstalling a patched version of YouTube, and then tried to re-patch and re-install it. My phone has YouTube (original) preinstalled (I just disabled it), so it can only be uninstalled if the device is rooted. When trying to re-install, an error showed that there is a package collision with an existing app. I thought I could fix this problem by changing the package name of the patched APK, but as long as the permission collision exists, this patch is not a solution for my problem.
Acknowledgements
This issue is not a duplicate of an existing bug report.
I have chosen an appropriate title.
All requested information has been provided properly.
The text was updated successfully, but these errors were encountered:
oh wow, thank you so much! I wasted so much time today trying to fix this problem but never did it occur to me OR show up in any research that I need the GmsCore patch. Works now!
Still, I don't know (and frankly, I do not have the expertise to say) whether renaming certain permissions like com.google.android.youtube.permission.C2D_MESSAGE should be done by the "change package name" patch..?
The change package name patch is very simple and does not work for all situations.
There exists a half dozen different "app cloning" tools that correctly handle renaming manifest and resource names. They are better suited for many situations.
Bug description
It seems like the "change package name" patch does not change the name of permissions, atleast for YouTube. This can lead to collisions with the original app.
Reproduction:
.revanced
append is fine)Expected: Installation works because the "change package name" prevents a collision with the original YouTube
Actual: Installation fails with a package collision error. There's not much information provided but trying to install the patched APK via ADB shows that it is about permissions (see error log).
Error logs
this happens if you try to install the patched APK using ADB:
Solution
I don't know a lot about android development or how the revanced patches work, but I assume a fix would be to also change permission names when the "change package name" patch is applied.
Additional context
The reason why this is a problem is that I ran into a problem after uninstalling a patched version of YouTube, and then tried to re-patch and re-install it. My phone has YouTube (original) preinstalled (I just disabled it), so it can only be uninstalled if the device is rooted. When trying to re-install, an error showed that there is a package collision with an existing app. I thought I could fix this problem by changing the package name of the patched APK, but as long as the permission collision exists, this patch is not a solution for my problem.
Acknowledgements
The text was updated successfully, but these errors were encountered: