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!")
@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