Skip to content

Instantly share code, notes, and snippets.

@dhinakg
Last active August 29, 2024 17:41
Show Gist options
  • Save dhinakg/44943435d0f60013427ae42e92172c00 to your computer and use it in GitHub Desktop.
Save dhinakg/44943435d0f60013427ae42e92172c00 to your computer and use it in GitHub Desktop.
Fix RCS on iOS 18 beta 2

Before you try this, try just toggling RCS off and on first. It may work. Otherwise, continue on.

Requirements

  • iOS 18 beta 2
  • T-Mobile US, Verizon, or AT&T
    • Most MVNOs are not compatible. If you do not already see the RCS switch in Settings > Apps > Messages, this will not work for you.

Steps

  1. Install mitmproxy
  2. Download redirect.py
  3. mitmweb -s redirect.py --listen-port 8888 --ssl-insecure --allow-hosts jibecloud.net
  4. Configure the proxy on your device to use the IP address of the machine running mitmproxy and port 8888
  5. Go to http://mitm.it on your device, download the certificate, go to Settings, and then install it.
  6. Go to General > About > Certificate Trust Settings and enable full trust for the mitmproxy certificate.
  7. Turn RCS off (if applicable) and then back on. Wait a few seconds, then check for RCS in Messages. (Additionally, if all went well, you should see "RCS flow complete!" in the mitmproxy console.)
  8. Remove the proxy settings from your device and optionally uninstall the certificate.

Here is an example of a successful activation.

image
import logging
from mitmproxy import http
from mitmproxy.log import ALERT
logger = logging.getLogger(__name__)
def request(flow: http.HTTPFlow) -> None:
if flow.request.pretty_host.endswith("jibecloud.net"):
logger.info(f"Request to {flow.request.pretty_url} received.")
flow.request.path = flow.request.path.replace("terminal_sw_version=iOS", "terminal_sw_version=fzw")
logger.info(f"New URL: {flow.request.pretty_url}")
def response(flow: http.HTTPFlow) -> None:
if flow.request.pretty_host.endswith("jibecloud.net"):
logger.info(f"Response to {flow.request.pretty_url} received.")
# print(f"Response: {flow.response.content}")
if "?otp" in flow.request.path:
if flow.response.status_code == 200:
logger.log(ALERT, "RCS flow complete!")
@DrJapan
Copy link

DrJapan commented Jun 25, 2024

Not working, for me. The RCS switch wasn't there before, and doesn't show up, after doing this.

EDIT: NVM. I just saw the part about it not working if it's not there already. Doh!

@ArmandAgopian
Copy link

ArmandAgopian commented Jun 25, 2024

@scratchyone What would I need to replace if I use an iPhone 13 Pro Max?

EDIT: The code for 13 Pro Max is iPhone14%2C3 and iPhone%2D14%2E3

@SemperEspi
Copy link

Is this for the device that we are using RCS or macOS?

@DrJapan
Copy link

DrJapan commented Jun 25, 2024

@scratchyone What would I need to replace if I use an iPhone 13 Pro Max?

EDIT: The code for 13 Pro Max is iPhone14%2C3 and iPhone%2D14%2E3

You would need to find the model identifier. 14,3 or whatever it is for your device and then replace the number after iPhone and then the one at the end.

@DrJapan
Copy link

DrJapan commented Jun 25, 2024

Is this for the device that we are using RCS or macOS?

You set the server up on Mac, and then proxy from your our phone, to the Mac.

@DrJapan
Copy link

DrJapan commented Jun 25, 2024

I’m pretty sure you need to be in the US and as the original post states, the switch needs to be there already, to get this to work.

I’m wondering if there is a way of setting your region as US, in the device settings, then use a VPN and location spoofer to activate RCS?

@bilalsattar24
Copy link

what does fzw signify?

@itsfelipeh
Copy link

The code for 13 Pro Max is iPhone16%2C3 and iPhoneXXXX?

@dhinakg
Copy link
Author

dhinakg commented Jun 25, 2024

Strangely, to get this working on iPhone 14 Pro I had to change the iPhone model in the request. With that tweak this works for me on iPhone 14 Pro on Verizon.

Interesting. This just broke registration for me. I would recommend trying it without changing the model first, and attempting this if that doesn't work.

I’m wondering if there is a way of setting your region as US, in the device settings, then use a VPN and location spoofer to activate RCS?

No, RCS support is defined by the carrier bundle as I explain here.

@computerman0
Copy link

I get this when trying to enable RCS after turning the toggle off. I turned off all my other profiles, but this keeps popping up:

Client TLS handshake failed. The client disconnected during the handshake. If this happens consistently for config.rcs.mnc480.mcc311.jibecloud.net, this may indicate that the client does not trust the proxy's certificate.

@itsnebulalol
Copy link

Client TLS handshake failed. The client disconnected during the handshake. If this happens consistently for config.rcs.mnc480.mcc311.jibecloud.net, this may indicate that the client does not trust the proxy's certificate.

Did you do step 5 and 6?

@jaminmc
Copy link

jaminmc commented Jun 25, 2024

There seems to be no need to change the phone model. I have an iPhone 12 Pro, and it works just fine... That is after I did the Step 6 of enabling full trust for the mitmproxy certificate. So if anyone only sees the response with 511, it means they must have skipped step 6 like I did.

EDIT: This seems to be obsolete now, as RCS seems to be enabled on the Server side now for iPhones.

@rkrueger11
Copy link

@dhinakg Any idea why RBM is not working on Beta 3 even though RCS is and RBM was working just fine on Beta 2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment