8000 feat: Add `Hide app icon` patch by ILoveOpenSourceApplications · Pull Request #4977 · ReVanced/revanced-patches · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add Hide app icon patch #4977

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

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

ILoveOpenSourceApplications
Copy link
Contributor
@ILoveOpenSourceApplications ILoveOpenSourceApplications commented May 17, 2025

Hides the app icon from the launcher.

After patching, the app can only be opened in a few ways.

App links

The app supports opening web links in app, and the app info 'Opens supported links' and all supported web links are enabled. App is then opened using a web link, or opened using Android assistant app ("Hey Google, open app Whatever").
 

App is launched from another app

The app has a custom intent that other apps can launch from, such as MicroG that can be opened from ReVanced YouTube settings. Apps with deep integration in other apps may also support this (such as opening Facebook Messenger from Facebook, or opening Amazon Kindle from the Amazon shopping app).

Closes #3575.

@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue May 17, 2025 that may be closed by this pull request
3 tasks
@LisoUseInAIKyrios

This comment was marked as resolved.

@LisoUseInAIKyrios
Copy link
Contributor
LisoUseInAIKyrios commented May 22, 2025

Was this done using AI? The // ** text ** comments resemble ChatGPT or DeepSeek.

@LisoUseInAIKyrios
Copy link
Contributor

I spoke too soon. This still doesn't work with YouTube.

WARNING: No launcher activities or intent-filter modifications were made. App icon may still be visible.

@LisoUseInAIKyrios LisoUseInAIKyrios removed the request for review from oSumAtrIX May 22, 2025 16:16
@LisoUseInAIKyrios
Copy link
Contributor

If this can be finished, also verify this works with MicroG.

Most notably, verify the whitelist battery functionality still works (patched YouTube shows the 'disable background optimizations' dialog on first startup). And verify the MicroG settings opens correctly from YouTube Settings > ReVanced > Miscellaneous > GmsCore.

@ILoveOpenSourceApplications
Copy link
Contributor Author

@vippium, any idea why it's failing to hide the app icon?

@ILoveOpenSourceApplications
Copy link
Contributor Author

Was this done using AI? The // ** text ** comments resemble ChatGPT or DeepSeek.

Yes, actually.

@vippium
Copy link
vippium commented May 23, 2025

If this can be finished, also verify this works with MicroG.

Yupp...this works with microg.

But, intent-filters must be there in microg to make it optional. which'll help user whether he wants or not to hide the icon, using that option in microg settings.

@vippium, any idea why it's failing to hide the app icon?

But, in my case, it is working with every app. Even with YouTube. And, for cross-check, I also tried it with Lawnchair, Niagara and Smart too.

Device using - iQOO Z7 Pro (A15)

If I'm able to manage Damsung, I'll check on it too.
Working on it too. In every case, you've to change the launcher activity to make it work proper.

Or, correct me if I'm wrong in understanding your q's.

@LisoUseInAIKyrios
Copy link
Contributor

@vippium are you using the latest code that's here?

When I tried patching YT it failed during patching and did not make any changes.

Copy link
vippium commented May 23, 2025

@vippium are you using the latest code that's here?

When I tried patching YT it failed during patching and did not make any changes.

Ahh...It's very typical for me to use the CLI for checking the PR. Let me know if you can generate me an rvp file for it. So, that I can use it with manager and let you know the results. Or any other way.

@LisoUseInAIKyrios
Copy link
Contributor

@vippium There is talk of configuring pull requests to also generate an rvp file (way easier to quickly try out), but that hasn't happened yet.

For now, an RVP file can be generated by building locally.

But what's here does not work with YouTube. Possibly because of the hard coded "launcher" name it's looking for.

@oSumAtrIX
Copy link
Member

PR build artifacts are generated for a while now, see the workflow runs

@oSumAtrIX
Copy link
Member

@vippium
Copy link
vippium commented May 24, 2025

But what's here does not work with YouTube. Possibly because of the hard coded "launcher" name it's looking for.

After checking it with the patch, I can comfirm that it is not working. But how then it works if we change the launcher activity manually, with YT.

Let me check if it works same way with others or not.

Edit:
I've checked with other apps too. But the patch is not working with any of the app. I think the patch is not completed or some issue with it.

But what's here does not work with YouTube. Possibly because of the hard coded "launcher" name it's looking for.

And, regarding the YT, I don't think that icon or name are hard-coded. Bcoz, if they are hard-coded, then, it should also not work with manual changes in manifest file. If manually changing the values in manifest works, then, it's not hard-coded.

I think the patch needs to be reworked with the code.

@vippium
Copy link
vippium commented May 24, 2025

PR build artifacts are generated for a while now, see the workflow runs

Well, thnx oSumAtrIX for this.

@vippium
Copy link
vippium commented May 24, 2025

No launcher activities or intent-filter modifications were made.

Then, how it's gonna be work without the modifications. As of I know, for hiding the icon, this needs to be done.

@LisoUseInAIKyrios
Copy link
Contributor

No launcher activities or intent-filter modifications were made.

Then, how it's gonna be work without the modifications. As of I know, for hiding the icon, this needs to be done.

That is a warning, and is only displayed if the patch fails to find the manifest entries it's expecting. It's showing that because the patch is broken and it's not making any changes.

@vippium
Copy link
vippium commented May 25, 2025

That is a warning, and is only displayed if the patch fails to find the manifest entries it's expecting. It's showing that because the patch is broken and it's not making any changes.

Ohh... I thought something else.

@vippium
Copy link
vippium commented May 26, 2025

Finally...it is working. Even with YT and YTM. I just checked the compatibility with them.

Here is a point. It only works with change package name option. If user is rooted, then might work without it.

But, when I used revanced package change option, it doesn't install in any way. So, I tried with rvx package change patch, and it worked without issues.

Give a check with rv option at your end too.

@LisoUseInAIKyrios
Copy link
Contributor

Patch now works.

Change package name is not needed.

I patched Twitch (with only this patch), and icon is hidden. App can only be opened using assistant app ("open Twitch"), or the app is opened using a web link that redirects to the app (and only after 'supported web addresses' is manually enabled)

@LisoUseInAIKyrios
Copy link
Contributor

Now just waiting for the "I use ALL the patches" users to report the app is missing after patching.

@ILoveOpenSourceApplications
Copy link
Contributor Author

@LisoUseInAIKyrios, what about opening the app from Settings > Apps > (AppPatchedWithHideAppIcon) > Open. Does that work as well?

@LisoUseInAIKyrios
Copy link
Contributor

My device does not show the open action in the app info.

@ILoveOpenSourceApplications
Copy link
Contributor Author

Oh, okay. Then @vippium, can you check this?

what about opening the app from Settings > Apps > (AppPatchedWithHideAppIcon) > Open. Does that work as well?

@vippium
Copy link
vippium commented May 26, 2025

My device does not show the open action in the app info.

It won't show that option. It only shows for those apps which have the launcher activity.

If user is patching the app with this patch, I think user knows what he's doing.

@ILoveOpenSourceApplications
Copy link
Contributor Author

Should the patch be modified to show Open in settings page by adding a new fake “alias” activity with the MAIN + LAUNCHER intent and then immediately disable that alias via android:enabled="false"?

@vippium
Copy link
vippium commented May 26, 2025

Should the patch be modified to show Open in settings page by adding a new fake “alias” activity with the MAIN + LAUNCHER intent and then immediately disable that alias via android:enabled="false"?

You can go with it if you prefer this.

Instead of that, you can go with Open settings in App option in settings. And if you're going with both, then mark them as optional. As if user have alternate ways to access the app (like via qs), then he can directly skip that option. And if not, he can go with the option.

@LisoUseInAIKyrios
Copy link
Contributor

The latest change has broke the patch. It now shows up again in the launcher.

@vippium
Copy link
vippium commented May 26, 2025

The latest change has broke the patch. It now shows up again in the launcher.

Great... I think it is not possible to show open button in hidden app. Rather than this, just add that option in settings. It'll work same as the open button. Just like a bypass to open button.

…HideAppIconPatch.kt

Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
…de-app-icon

# Conflicts:
#	patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt
Copy link
Member
@Nuckyz Nuckyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me besides the small change I mentioned

var changed = false

val intentFilters = document.getElementsByTagName("intent-filter")
for (i in 0 until intentFilters.length) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like node.childElementsSequence() this should use intentFilters.asSequence()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(Universal): Add Hide app in launcher patch
6 participants
0