Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

I Reverse Engineered Hikvision's APK to Fix Push Notifications on GrapheneOS And Submitted a PR to Fix It For Everyone

I've been dealing with Hikvision camera apps not getting push notifications on GrapheneOS for over a year. I reluctantly ran LineageOS just to keep things working. Then, two days ago, everything Google-services-related went completely haywire on my phone after the TSA had it. That was the breaking point. I revisited the issue out of pure frustration. The Problem Hikvision's apps check for the…

For over a year, the author has faced push notification issues with Hikvision camera apps on GrapheneOS. They were forced to revert to LineageOS to resolve the problem. However, upon experiencing further complications after a recent incident, the author decided to revisit the issue. Hikvision's apps check for the presence of com.google.android.gsf (Google Services Framework).

If this component is absent, the apps abort the process, even when Google's Play Services Core (GmsCore) and Firebase Cloud Messaging (FCM) are functional. Since GrapheneOS doesn't include GSF by default, the check always fails. The author reached out to both GrapheneOS and Hikvision but received no response from Hikvision. Confronted with the situation, the author decided to reverse engineer the APK, trace the push notification registration logic, identify the hard-coded GSF check, and create a MIT-licensed patcher to remove it.

This patcher can be run locally and works effectively with minimal effort. Additionally, the author submitted a PR to GrapheneOS that creates a minimal GSF package presence when GmsCore is verified. This solution is conditional and only activates when Play Services is installed and visible. If approved, this change will fix the problem for numerous apps that make the same incorrect GSF check.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Real Cost of a $200K Engineering Salary

Last month I walked away from a $200K salary at a FAANG company. My manager thought I was crazy. My parents thought I was having a breakdown. My friends thought I'd lost my mind. They were all wrong.

More from Friday 21 August →