No Clear Hijack

An Xposed module for Android that stops the Settings Clear storage button from being redirected into an app's own "manage space" screen.

What it fixes

Android lets an app declare android:manageSpaceActivity in its manifest. When it does, AOSP Settings still shows the Clear storage button on App info → Storage & cache, but tapping it launches the app's manageSpaceActivity instead of clearing data. The app then decides what (if anything) to delete, so the user cannot trust the button.

No Clear Hijack clears that redirection inside the Settings process, so the button always opens the normal clear-data confirmation and calls ActivityManager.clearApplicationUserData. It applies to every app that declares a manage-space activity.

It does not bypass device administrator or DISALLOW_APPS_CONTROL restrictions; those remain deliberate device-management controls.

Requirements

  • Android 8.0 (API 26) or newer.
  • A modern Xposed framework that supports the libxposed API 102, such as LSPosed or Vector.
  • Module scope: com.android.settings (declared in the APK).

Install

  1. Install the latest APK from Releases (or build it yourself; see Build below).
  2. Enable the module in the Xposed manager and confirm its scope contains com.android.settings.
  3. Force-stop Settings (or reboot) so the hook is injected.

Reinstalling a module (uninstall + install) resets the manager's enabled/scope state, so re-enable it and re-add the com.android.settings scope after a clean install. Published releases are signed with a permanent key, so later versions install over earlier ones normally.

Build

Requires an Android SDK (one platform plus build-tools) and a JDK 8 or newer:

export ANDROID_HOME=/path/to/android-sdk
export JAVA_HOME=/path/to/jdk
./build.sh

build.py compiles the Java sources against the compile-only API stubs in stubs/, packages the libxposed entry/metadata files, and signs the result. The first build creates a development keystore; keep it if you want later builds to install over earlier ones.

The module is built against libxposed API 102 and declares targetApiVersion=102. CI builds the public releases with python3 build.py --release, which requires an existing release keystore and the SIGNING_KEYSTORE, SIGNING_STORE_PASSWORD, SIGNING_KEY_PASSWORD, SIGNING_KEY_ALIAS, and SIGNING_CERT_SHA256 environment variables and refuses to generate a key.

Layout

  • src/ — module code.
  • stubs/ — compile-only libxposed API declarations; never packaged into the APK.
  • META-INF/xposed/ — entry list, module properties, and scope.
  • build.py / build.sh — direct SDK build.
  • tests/ — package metadata and release-signing guard checks.
  • .github/workflows/ — build, signed release, and LSPosed listing distribution.
  • SUMMARY — one-line LSPosed listing description.

Support

Report issues at the source repository with the device model, Android version, Settings package, module version, and reproduction steps. This project is not affiliated with Google, Motorola, or LSPosed.

Credits

The io.github.libxposed.api interface declarations in stubs/ mirror the Apache-2.0 libxposed/api 102 surface, and the runtime that loads the module comes from the user's Xposed framework.

Releases

1.0

Stable

10/16/2026, 5:09:31 PM

No Clear Hijack 1.0

  • Makes the Settings "Clear storage" button really clear app data instead
    of opening an app's own manage space screen.
  • Applies to every app; device administrator restrictions are unchanged.

Requirements: Android 8.0+ and an Xposed framework that supports the
libxposed API 102 (LSPosed or Vector). Scope the module to
com.android.settings. Tested on a Motorola XT2301-5, Android 16, with
Vector 2.2. Other Settings implementations are unverified.

The APK is signed with the permanent release key; its SHA-256 checksum
is included with this release.

Assets

2