Fix Hikvision and Annke push notifications on GrapheneOS

· Reflash Lab ·

3 min read Original article ↗

Guides

Fix Hikvision and Annke camera apps that stop sending push notifications after a fresh GrapheneOS install by patching the GSF check.

Hikvision and Annke camera apps failing to send push notifications on GrapheneOS

The problem

I run Annke cameras (Hikvision). On a Pixel 6a with GrapheneOS, push notifications worked fine for years. However, after I moved to a Pixel 9a on a fresh GrapheneOS install, Guarding Vision stopped notifying me.

Other apps that use Firebase Cloud Messaging (FCM) were fine. I tried Hik-Connect, HiLook, and Annke Vision and none of them worked. These camera apps just never enabled FCM.

The cause

The apps don’t actually check whether FCM works. Instead, they check whether the legacy package com.google.android.gsf is installed.

On a fresh GrapheneOS Android 15+ install with sandboxed Google Play, that package isn’t there, and GrapheneOS blocks installing anything under that name. Play Services is present; the apps are just probing the wrong package. When the check fails, they fall back to a long-lived MQTT-style link that dies when the OS freezes the process, breaking push notifications entirely.

I wrote a forum post with GrapheneOS and raised it with Annke / Guarding Vision / Hikvision (asking them to stop treating GSF presence as “FCM works”). None of the app developers replied and GrapheneOS moved my thread to third-party app discussion and locked it.

The workaround

I wrote a small, MIT-licensed patcher that works on APKs you supply (it does not redistribute Hikvision binaries):

Alex9001/hikvision-grapheneos-fcm-patch

It patches the GSF check, skips the resign hash gate, and signs the result locally.

  • Requirements: Python 3.11+ and Java 17+ for signing.
  • Note: Sideloaded builds won’t update cleanly from the Play Store, so you’ll need to patch new versions manually.

The “Super Easy” Way: Enable USB debugging, plug your phone in with the app installed, and tell an AI coding agent (like Cursor or Freebuff) to: “Use https://github.com/Alex9001/hikvision-grapheneos-fcm-patch to make Guarding Vision show notifications on my phone.”

The Hopeful Solution:

After publishing the original workaround I thought I’d give it a shot and fix the issue at platform level by contributing to the GrapheneOS project and thus submitted this pull request which adds a minimal synthetic GSF package presence when verified GmsCore is visible to the caller. The shim is gated: it only engages when the app can actually see Play Services, meaning FCM is genuinely viable. It rejects lookalikes by verifying the Google signing key. It doesn’t spoof signatures, version data, or allow real GSF installation.

If it is to be accepted future GrapheneOS builds could make the Hikvision patch unnecessary as well as fix every other app that makes the same incorrect GSF presence check.

Sources

  1. Hikvision GrapheneOS FCM Patch — Alex9001