ReVanced / revanced-patches

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

bug(Messenger): Cannot install Facebook Messenger after patching #1063

Open Rafee-M opened 1 year ago

Rafee-M commented 1 year ago

Type

Error at runtime

Bug description

When trying to install Messenger after applying hide-inbox-ads installer shows App not installed

Steps to reproduce

  1. Patch Messenger version [ 406.0.0.13.115](406.0.0.13.115) nodpi armv8 with Revanced Manager
  2. Install

Relevant log output

Initializing installer
Creating working directory
Copying original apk
Unpacking input apk
Reading dex files
Decoding AndroidManifest.xml only, because resources are not needed
Merging integrations
Applied hide-inbox-ads
Repacking patched apk
Not compiling resources because resource patching is not required
Writing modified dex files
Finished!
Installing patched file using nonroot method
Installing patched file using nonroot method

Screenshots or videos

Screenshot_2023-04-30-02-11-06-25_3d73e98b1ad3bd2575f7a56513d89a0c

Solution

No response

Additional context

Device: OnePlus 9RT Android: 11 App version: 406.0.0.13.115

Acknowledgements

Domiiniik commented 1 year ago

Can confirm the issue

oSumAtrIX commented 1 year ago

Use adb to install the app, report back with the msg.

selfmusing commented 1 year ago

There are only two ways to install it after patching:

  1. Uninstall Facebook App or
  2. Edit these two permissions inside AndroidManifest.xml

com.facebook.permission.prod.FB_APP_COMMUNICATION -> app.facebook.permission.prod.FB_APP_COMMUNICATION

com.facebook.receiver.permission.ACCESS -> app.facebook.receiver.permission.ACCESS

[ These two permissions prevents the installation of Re-Messenger , if someone have Facebook app on their device ]

Rafee-M commented 1 year ago
  1. Uninstall Facebook App

This worked perfectly, thanks a lot!

Also, when selecting the Change Package Name patch it seems error out. Log: revanced-manager_patcher_20230430160240867879.log I assume it's not supported?

Rafee-M commented 1 year ago

Also, an error when trying to install Facebook Lite Screenshot_2023-04-30-16-34-45-69_da477480df70e1f8b6688bd2fd977143

Rafee-M commented 1 year ago

Use adb to install the app, report back with the msg.

Same error @oSumAtrIX image

Rafee-M commented 1 year ago

I ended up rooting my phone. When selecting install as root, it worked.

P.S This might be a dumb question, but installing as root doesn't involve giving messenger any extra privileges, right?

oSumAtrIX commented 1 year ago

No.

frywaffles commented 1 year ago

Use adb to install the app, report back with the msg.

Installing via adb Performing Streamed Install adb: failed to install ~/platform-tools/Messenger.apk: Failure [INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.facebook.orca attempting to redeclare permission com.facebook.permission.prod.FB_APP_COMMUNICATION already owned by com.facebook.katana]

Installing via package installer messenger

Steps to reproduce

  1. Patch uploaded Messenger 406.0.0.13.115 arm64-v8a 560-640dpi with ReVanced Builder v3.9.1.
  2. Install.

The following packages were uninstalled using uad com.facebook.appmanager com.facebook.katana com.facebook.services com.facebook.system

Android 12

badawoll commented 1 year ago

Which Facebook (Lite) app version do you have installed (or perhaps Facebook Messenger Lite)? I cannot reproduce the issue with Messenger 406.0.0.13.115 myself (with Facebook 409.0.0.27.106 installed).

Edit: I've been able to reproduce the issue - there is a conflict between patched Messenger and Facebook lite. Working on a fix.

quyleanh commented 1 year ago

One more thing I've notice, when I install successfully re-messenger. The main Facebook app will not be updated through Google Play until I uninstall re-messenger.

badawoll commented 1 year ago

Update: the required patch would have to modify the app manifest, which currently fails due to AAPT2 being unable to re-pack resources. I'll continue working on it when arsclib gets merged.

xmaitiendat commented 1 year ago

my device has not been given root permission. I get the error "INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.xxx.xxx signatures do not match the previously installed version; ignoring!." when doing it using adb .

Inovvia commented 1 year ago

There are only two ways to install it after patching:

1. Uninstall Facebook App
   or

2. Edit these two permissions inside AndroidManifest.xml

com.facebook.permission.prod.FB_APP_COMMUNICATION -> app.facebook.permission.prod.FB_APP_COMMUNICATION

com.facebook.receiver.permission.ACCESS -> app.facebook.receiver.permission.ACCESS

[ These two permissions prevents the installation of Re-Messenger , if someone have Facebook app on their device ]

Can you guide me in editing the permissions?

kazimmt commented 1 year ago

Can you guide me in editing the permissions?

datlmhg commented 1 month ago

There are only two ways to install it after patching:

  1. Uninstall Facebook App or
  2. Edit these two permissions inside AndroidManifest.xml

com.facebook.permission.prod.FB_APP_COMMUNICATION -> app.facebook.permission.prod.FB_APP_COMMUNICATION

com.facebook.receiver.permission.ACCESS -> app.facebook.receiver.permission.ACCESS

[ These two permissions prevents the installation of Re-Messenger , if someone have Facebook app on their device ]

how do i edit this file?

oSumAtrIX commented 1 month ago

For support move to one of the links on https://revanced.app

selfmusing commented 1 month ago

There are only two ways to install it after patching:

  1. Uninstall Facebook App or
  2. Edit these two permissions inside AndroidManifest.xml

com.facebook.permission.prod.FB_APP_COMMUNICATION -> app.facebook.permission.prod.FB_APP_COMMUNICATION com.facebook.receiver.permission.ACCESS -> app.facebook.receiver.permission.ACCESS [ These two permissions prevents the installation of Re-Messenger , if someone have Facebook app on their device ]

how do i edit this file?

You can use APKtool_M or MT Manager app.

Rafee-M commented 1 month ago

Just an update: At the moment, I'm just using the root installer. But for that the device needs root