Fixing eSIM Management on LineageOS: The “Proper” Way via GApps

If you’ve ever flashed LineageOS or any barebones AOSP-based ROM onto a device with eSIM support (like the Motorola Edge+ 2023), you’ve probably hit the infamous eSIM Management Wall.

You open Settings → Network & Internet → SIMs, hit “Add SIM”, and… crickets. Nothing happens. Or worse, third-party apps like OpenEUICC or EasyEUICC slap you in the face with ActivityNotFoundException, missing package signatures, or permission denial errors even after throwing every adb shell pm grant command known to mankind.

Here’s the story of how I spent hours down the rabbit hole of ADB grants, broken package names, and 0-byte downloads—and why simply flashing GApps turned out to be the ultimate, zero-headache cure.

Phase 1: The Dark Age of Shell Tweaks & Third-Party LPAs

Initially, the playbook seemed straightforward:

  1. Install an open-source LPA (Local Profile Assistant) like OpenEUICC or euicc-manager.
  2. Force-feed system-level permissions via ADB:
    adb shell pm grant im.angry.openeuicc android.permission.WRITE_SECURE_SETTINGS
    adb shell pm grant im.angry.openeuicc android.permission.MODIFY_PHONE_STATE
    adb shell settings put global euicc_provisioned 1
  3. Attempt to launch the main activity.

The Reality Check:

Error type 3
Error: Activity class {im.angry.openeuicc/...} does not exist.
Failure [package not found]

Even when ADB reported Success, unrooted vanilla LineageOS kept isolating non-priv-app packages from low-level telephony HALs. You can grant permissions all day, but if the OS lacks the privilege architecture for third-party LPAs, you’re just screaming into the void.

Phase 2: The Pitfalls of “Quick Fixes”

Along the path to salvation, a few hilarious (and frustrating) traps presented themselves:

  • Mirror Dead Ends: Trying to wget releases via third-party CDN proxies resulted in Firefox throwing Google Safe Browsing red flags.
  • GitLab Confusion: Navigating to GitLab source repos expecting compiled ZIPs, only to end up in empty Release tabs and Container Registries.
  • The “0-Byte ADB Sideload” Trap: Running adb sideload on a failed download outputting adb: failed to read command: Success instantly. (ADB’s classic way of telling you: “Hey, thanks for sending me a 0-byte file, I’m done!”).
  • The Root Terminal Path Trap: Running adb sideload /MindTheGapps.zip under root where / pointed to system root instead of /home/user/, triggering No such file or directory.

Phase 3: The Cure — Flashing MindTheGapps

Here is the fundamental truth: AOSP LineageOS lacks Google’s proprietary EuiccGoogle framework. Without this backend, the system doesn’t know how to interface with the eUICC chip.

By flashing MindTheGapps, you don’t just get the Play Store—you inject Google’s official privilege LPA binaries (com.google.android.euicc) directly into /system/priv-app.

Step-by-Step Guide

  1. Grab the Correct Package:
    Head over to the LineageOS Official Wiki GApps Page. Select ARM64 under your LineageOS version (e.g., LineageOS 21/22/23).

    Note: Expect a file size around 150MB to 500MB depending on the Android version. If it’s 0 bytes or a few KB, your download failed.

  2. Boot into LineageOS Recovery:
    Power off → Hold Volume Down + Power → Select Recovery Mode.
  3. Enable ADB Sideload:
    Navigate to Apply updateApply from ADB.
  4. Flash via Terminal:
    Make sure to pass the absolute file path (especially if you’re running as root):

    adb sideload /home/your_username/MindTheGapps.zip
  5. Reboot & Enjoy:
    If Recovery prompts Signature verification failed, tap Yes / Continue. Once finished, select Reboot system now.

The Verdict

Once booted back into LineageOS, head straight to Settings → Network & Internet → SIMs → Add SIM.

Boom! Google’s native eSIM QR code scanner pops up flawlessly. Profiles like Clubsim or giffgaff register immediately, switch seamlessly, and toggle without a single line of shell script.

Stop wrestling with permission grants on unrooted ROMs. Flashing GApps is clean, native, and just works.

 

admin AUTHOR

Exploring networks, custom ROMs, and Linux environments. Writing practical notes and tech experiments.

1 thought on “Fixing eSIM Management on LineageOS: The “Proper” Way via GApps”

Leave a Comment

Affman Lab
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.