ReVanced / revanced-patches

🧩 Patches for ReVanced
https://revanced.app
GNU General Public License v3.0
2.21k stars 260 forks source link

bug: (Twitter/X): Patch `Open links with app chooser` make Twitter/X can't display login page on fresh install #2846

Open cyberboh opened 6 months ago

cyberboh commented 6 months ago

Bug description

Open links with app chooser patch seems not working properly after applying. Even it applied successfully, but on fresh install Twitter/X can not display login page.

How to reproduce:

  1. Uninstall any Twitter/X ReVanced at first (if any).

  2. Download apk https://www.apkmirror.com/apk/x-corp/twitter/twitter-10-32-0-alpha-3-release/x-previously-twitter-10-32-0-alpha-3-2-android-apk-download/ Also tested on 10.30.0-release.0 https://www.apkmirror.com/apk/x-corp/twitter/twitter-10-30-0-release-0-release/x-previously-twitter-10-30-0-release-0-android-apk-download/

  3. Patch with CLI, make sure you included Open links with app chooser patch:

java -jar revanced-cli-4.4.1-dev.2-all.jar patch -p -o Install\X_(formerly_twitter)_10.32.0-alpha.3-all_ReVanced.apk --options options.json -b revanced-patches-4.4.0-dev.2.jar --alias=******** --keystore-password=******** --keystore-entry-password=******** --keystore=********.keystore -m revanced-integrations-1.5.0-dev.1.apk Apps\com.twitter.android-10.32.0-alpha.3-all.apk -i "Hide view count" -i "Open links with app chooser"
  1. Install patched Twitter/X ReVanced

  2. Open it, and see it can not display login page like this SS

Error logs

No response

Solution

No response

Additional context

The patched app should display login page like this:

SS

Acknowledgements

oSumAtrIX commented 6 months ago

I'm unable to reproduce:

Screenshot_20240306-191337

cyberboh commented 6 months ago

@oSumAtrIX Is this bug is device specific? I'm using Android 10, and i get this bug. I'm not included Open links with app chooser and Patched app works as expected.

oSumAtrIX commented 6 months ago

Unlikely

cyberboh commented 6 months ago

Unlikely

I tested recently (same patched apk for both): Android 13 (Redmi 13C), the patch works and login page is appear. While tested on my old Honor Phone (Honor20) with Android 10, login page doesn't appear.

The patch likely is Android dependant and needs to adapt to lower version of android.

oSumAtrIX commented 6 months ago

Try using ReVanced Manager v1.18.0: https://github.com/ReVanced/revanced-manager/releases/tag/v1.18.0

cyberboh commented 6 months ago

Try using ReVanced Manager v1.18.0: https://github.com/ReVanced/revanced-manager/releases/tag/v1.18.0

No luck, issue still persisting :( https://streamable.com/6f4qby

ArthurKun21 commented 6 months ago

Can confirm adding Open links with app chooser on fresh install and when opening the app also says No apps can perform this action and removing it makes me able to access the app normally.

Twitter version: 10.31.0-release.0 Android 10

cyberboh commented 6 months ago

Can confirm adding Open links with app chooser on fresh install and when opening the app also says No apps can perform this action and removing it makes me able to access the app normally.

Twitter version: 10.31.0-release.0 Android 10

Seems it broken in Android 10 and below. I yesterday tested on my old Tab Alcatel 3T running android 8.0 also got the same issue. :/

oSumAtrIX commented 6 months ago

Added logging when an intent is about to be opened with the chooser in the latest commit on the dev branch of ReVanced Integrations. Please use logcat and grep for debug logs with the tag "ReVanced" and the message prefix "Opening intent with chooser" and run the app to see which intents are being tried to be opened. The patch returns the method it hooks so that may also contribute to the issue.

cyberboh commented 6 months ago

logs.txt log.txt

I catch some logs, hope those helped

oSumAtrIX commented 6 months ago

The logs do not contain the log calls. Make sure you use the latest commit of ReVanced Integrations

cyberboh commented 6 months ago

The logs do not contain the log calls. Make sure you use the latest commit of ReVanced Integrations

I'm using this dev Integrations https://github.com/ReVanced/revanced-integrations/releases/tag/v1.5.0-dev.4 Because it's the latest dev version. Am I wrong?

oSumAtrIX commented 6 months ago

The commit did not trigger a release

cyberboh commented 6 months ago

@oSumAtrIX Recently patched X with new integrations, i get this log:

ReVanced: Opening intent with chooser: Intent { cmp=com.twitter.android/.onboarding.core.common.CtaSubtaskActivity (has extras) }

is that what you need? Full log : log.txt

cyberboh commented 4 months ago

@oSumAtrIX is there a progress in this bug? does a log I sent can help the fix?