Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShelterPro

Kotlin Android API 26+ License: MIT

Freeze any installed Android app in-place. No cloning. No work profile. Instant thaw.

Move your actual installed apps into a dead state with zero internet, zero permissions, and zero background activity. When you need one, thaw it in one tap and it picks up exactly where it left off, data intact.


Read this before you install

ShelterPro takes the Device Owner role on your phone. Device Owner is a privileged Android API normally reserved for enterprise MDM software. Running this app on your daily-driver phone has real consequences you should understand:

Warning: Device Owner is irreversible without a factory reset.

  • To set Device Owner, you must remove every Google and work account from the phone first. If any account is present, Android refuses, and partially-completed setups can leave the device in a state where the only fix is fastboot wipe / factory reset, which destroys all data on the phone.
  • Once Device Owner is granted, the only way to remove it is dpm remove-active-admin from the app itself, or a full factory reset.
  • Suspending or hiding the wrong system package (dialer, telephony provider, package installer, settings, system UI) can brick the phone for normal use until you boot into recovery and wipe data. ShelterPro guards a whitelist of critical packages, but on heavily-customised OEM ROMs (Motorola, OnePlus, Xiaomi, Samsung) the protected list may not be exhaustive.
  • Try this first on a spare device or an emulator. Do not test on a phone whose data you cannot afford to lose.

By installing ShelterPro you accept that you may have to factory-reset your phone if anything goes wrong. This software is provided as-is with no warranty.


What it does

You have apps you need occasionally but don't want running all the time: banking apps, social media, games, OEM bloatware. Your options today are:

  • Uninstall, reinstall later: tedious, slow, you lose app data.
  • Keep installed: drains battery, leaks data, uses background internet.

ShelterPro freezes them in-place. App data stays. Network, camera, microphone, location, and background activity are cut off. Thawing is instant.

What happens when an app is frozen

Resource State
Internet Blocked (processes killed; optional VPN layer drops packets locally)
Camera Force-denied via Device Owner API
Microphone Force-denied
Location Force-denied
Contacts / SMS / Call logs Force-denied
Background activity All processes killed via setPackagesSuspended()
Launcher icon Hidden via setApplicationHidden()
App data Fully preserved on disk
Thaw time Under 1 second

How it stacks up against the alternatives

Approach Needs root Loses app data Background isolation Where the app data lives
Uninstall + reinstall later No Yes N/A Cloud backup if you set it up
Work profile (Shelter, Island) No No (in profile) Partial A separate profile sandbox; clone of the app
App Cloner No Yes (new install) No A repacked APK with new package ID
pm disable-user via ADB No No Yes, but no UI Original install location
pm hide via Magisk module Yes No Yes Original install location
ShelterPro (this) No No Yes Original install location

The key win over Shelter/Island: you don't get a cloned copy of the app in a separate profile. The actual app on your launcher is what's frozen and what thaws. No two-copies-of-Instagram confusion, no app-data sync needed.

How it works

No root. No cloning. No work profile. The app is granted Device Owner via a single ADB command and then drives Android's DevicePolicyManager:

shelterApp(packageName):
  DPM.setPackagesSuspended(admin, [pkg], true)   // kill all processes
  DPM.setApplicationHidden(admin, pkg, true)     // remove from launcher
  DPM.setPermissionGrantState(DENIED) x 12       // block hardware access

unshelterApp(packageName):
  DPM.setPackagesSuspended(admin, [pkg], false)  // resume (instant)
  DPM.setApplicationHidden(admin, pkg, false)    // back in launcher

The same APIs power Google Workspace and other enterprise MDM systems on millions of corporate Android devices. They are stable, well-documented, and require no root.

Setup

Requires Android 8+ (API 26) on a phone you are willing to factory-reset.

Step 1. Install the APK on your device.

Step 2. Remove every Google account, every work account, and every owner from the phone:

  • Settings -> Passwords & accounts -> remove each
  • Settings -> Users -> Owner -> remove other users

Step 3. Enable USB debugging (Settings -> About phone -> tap Build number 7 times -> Settings -> Developer options -> USB debugging).

Step 4. Plug into a PC with adb installed and run:

adb shell dpm set-device-owner com.shelterpro/.admin.ShelterDeviceAdminReceiver

You should see Success: Device owner set to package ComponentInfo{...}. If you get an IllegalStateException: Not allowed to set the device owner because there are already several users on the device, accounts or users are still present.

Step 5. Open ShelterPro. It auto-detects Device Owner status. You are ready.

Features

Feature Implementation
Freeze any user app setPackagesSuspended + setApplicationHidden
Freeze system apps (bloatware) Same APIs, guarded whitelist
Force-deny 12 privacy permissions setPermissionGrantState(DENIED)
Instant thaw Reverse the above in one tap
Bulk operations Freeze All / Thaw All
Auto-freeze on screen lock Foreground service + ACTION_SCREEN_OFF
Quick Settings tile TileService for freeze/thaw without opening the app
Network isolation Local VPN service drops all packets from frozen apps
Preserve data App is hidden, never uninstalled

Key design decisions

Why Device Owner instead of a Work Profile? Work profile (the model Shelter and Island use) gives a fully sandboxed second user space. That works, but it clones the apps you want to isolate — you end up with two Instagrams on the device, each with its own data. ShelterPro freezes the actual primary-profile install, which means no data sync, no duplicate launcher icons, no parallel-space confusion. The cost is that Device Owner is single-user and irreversible without factory reset; Work Profile can be removed anytime.

Why a custom local VPN instead of relying on setPackagesSuspended to block internet? setPackagesSuspended kills processes, but a fully-killed app can't leak data. The VPN layer covers a small edge case: an OEM-managed system process or job scheduler that wakes a "suspended" app for a brief network call before Android catches it. In practice, on AOSP-based ROMs this is rarely needed; on aggressive OEM ROMs (e.g. Xiaomi) it closes the gap.

Why force-deny 12 permissions on freeze rather than just trusting the kill? Defense in depth. A frozen app shouldn't be able to access camera / mic / location even if Android resumes it for an autostart broadcast. Permission state is checked on every API call, independent of process lifecycle.

Why not Magisk + pm hide? Magisk requires unlocking the bootloader, which on most non-Pixel phones (a) trips RMA, (b) breaks safety-net-protected banking apps, and (c) requires a full data wipe. Device Owner achieves the same end state without root.

Known limitations

  • OEM ROMs are not all tested. The critical-system-package whitelist was built against AOSP package names. On Motorola, OnePlus, Xiaomi, and Samsung, some manufacturer system processes (e.g. com.motorola.systemui, com.miui.system) may not be in the whitelist. Suspending one of them can require a factory reset to recover.
  • Tested daily-driver: Motorola Edge 50 Fusion (Android 16). All other devices are theoretically supported but not personally verified.
  • No multi-user support. Device Owner is fundamentally single-user. If you create a secondary Android user, ShelterPro will only manage the primary profile's apps.
  • Boot-time freeze is best-effort. A freshly-booted device runs a window of system init where suspended apps can briefly be launched by package broadcasts before ShelterPro's foreground service binds. The hide/suspend state is re-applied within a few seconds, but a determined app could fire an autostart in that window.
  • No iOS counterpart. iOS does not expose any equivalent of Device Owner to third-party apps; this approach is Android-only.

Build

Requires Android Studio Hedgehog+ and Android SDK 35.

git clone https://github.com/dsremo/shelter-pro
cd shelter-pro
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk

Privacy

ShelterPro collects nothing. Every operation is a local Android system API call. The optional VPN layer drops packets in-process; no traffic is routed through any server, and no telemetry is sent.

License

MIT.

Disclaimer

This software interacts with privileged Android Device Owner APIs that can disable critical system functionality if misused. The author is not responsible for any data loss, bricked devices, or factory resets caused by use of this software. Test on a device you can afford to wipe.

About

Freeze any installed Android app in-place using the Device Owner API. No root, no cloning, no work profile. Instant thaw, data preserved.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages