Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(Change package name): Change provider package names #3846

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

1fexd
Copy link
Contributor

@1fexd 1fexd commented Oct 31, 2024

The existing Change package name patch only renames the package attribute of the manifest. If encountered some problems while trying to use it to clone the Mega.nz app, due to its use of providers and the DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION permission, so I extended the patch to also update those.

Cloning Mega seems to work now, although I'm not entirely sure if there are any problems at runtime due to the renamed provider authorities

@LisoUseInAIKyrios

This comment was marked as resolved.

@1fexd

This comment was marked as resolved.

@LisoUseInAIKyrios

This comment was marked as resolved.

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Nov 1, 2024

https://github.com/ReVanced/revanced-patches/actions/runs/11615894825/job/32347874248?pr=3846#step:5:277

Looks like we will need a bit more memory for builds, hopefully not linear to the amount of extension projects.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat: Improve change package name feat(Change package name): Change provider package names Nov 1, 2024
@LisoUseInAIKyrios
Copy link
Contributor

Would this also fix issue #2545?

Just tested Facebook 449 but it doesn't even decode its resources:

INFO: Decoding resources 
java.lang.IllegalArgumentException: expected element name 'view' and not 'View'
	at org.xmlpull.renamed.MXSerializer.endTag(MXSerializer.java:708)

After trying the Facebook released Dec 2023 and it still failed, I noticed that issue does not affect Facebook itself but instead a patched app fails to install along side it's original if it has any any exported providers in the manifest.

Using this PR I could install that specific app twice using change package name, and without this PR it fails to install the second installation.

@oSumAtrIX
Copy link
Member

PS: Decoding is handled by Androlib by ApkTool. So this issue should be mentioned there.

@LisoUseInAIKyrios
Copy link
Contributor

@1fexd

It appears this change can break embedded usage of other apps, such as Facebook integration within an app.

This change should be a patch option that is default off. The option should explain that enabling it can fix installation issues if the patched app fails to install, but the option can break some in app features.

@1fexd
Copy link
Contributor Author

1fexd commented Nov 6, 2024

It appears this change can break embedded usage of other apps, such as Facebook integration within an app.

In which app have you observed this behavior? Maybe that's fixable

This change should be a patch option that is default off. The option should explain that enabling it can fix installation issues if the patched app fails to install, but the option can break some in app features.

Agreed

@1fexd 1fexd force-pushed the feat/improve-change-package-name branch 2 times, most recently from cdcfb69 to 15d8d41 Compare November 6, 2024 06:42
@LisoUseInAIKyrios
Copy link
Contributor

It appears this change can break embedded usage of other apps, such as Facebook integration within an app.

In which app have you observed this behavior? Maybe that's fixable

I have not confirmed, but with Facebook if the provider is renamed then I believe Facebook integration will be broken because the renamed package name is not a valid facebook id:

<provider android:name="com.facebook.FacebookContentProvider"
             android:exported="true"
             android:authorities="com.facebook.app.FacebookContentProvider*ID*" />

Both of the new options should explain that enabling the feature can fix installation errors but can break some in app features.

@1fexd 1fexd force-pushed the feat/improve-change-package-name branch from 15d8d41 to 3e02292 Compare November 7, 2024 16:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(Change package name): Changing package name causing collisions within it's own manifest
3 participants