gnirehtet icon indicating copy to clipboard operation
gnirehtet copied to clipboard

Is there a way to make gnirehtet appear on opened apps?

Open ezekiel093 opened this issue 3 years ago • 1 comments

Is there a way to make it appear on opened apps so I can lock gnirehtet so it won't get closed when I'm clearing RAM on my phone?

ezekiel093 avatar Jan 05 '23 01:01 ezekiel093

Workaround 1: Use gnirehtet run (foreground process) If you're launching gnirehtet via adb, use:

gnirehtet run This keeps the process alive and restarts it if it crashes, instead of using gnirehtet autorun.

But it still won’t show up in the recent apps — it just helps keep the service alive.

Workaround 2: Use a persistent notification (advanced) You'd need to modify the gnirehtet Android APK source to:

Make it run as a foreground service

Add a persistent notification (so Android gives it higher priority)

This involves:

Cloning the gnirehtet GitHub repo

Editing the RelayVpnService.java to start the service in the foreground:

startForeground(NOTIFICATION_ID, notification); Building the .apk and reinstalling it on your device

This is not beginner-level, but it’s the most reliable way to prevent Android from killing gnirehtet during memory cleanup.

Workaround 3: Lock the process manually in your phone's settings Many phones (e.g., Xiaomi, Realme, Oppo, OnePlus) have built-in process protection:

Open Recent Apps

Long press or swipe down on gnirehtet (if visible) → Lock/Pin App

Or go to Battery Settings → App Management → find gnirehtet and set it to "Don't optimize" or "Allow background activity"

But since gnirehtet usually doesn’t show up there, this might not be available.

Workaround 4: Use an alternative (e.g., VPN with GUI) If GUI presence is critical, consider:

NetGuard — open-source firewall/VPN with GUI and persistent notification

[WireGuard] with tunnel config

Or build a small wrapper app that keeps gnirehtet running and shows a foreground notification

VaradGupta23 avatar Jul 10 '25 04:07 VaradGupta23