Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ You decide which apps are affected: only the apps you tick in LSPosed see spoofe
- **New identity on every app start** (optional): each launch of a target app gets fresh random
identifiers. Configuration (hide lists, keyboard id, proxy) is never re-rolled.
- **Coherent identities**: the SIM operator decides the timezone, region and GPS position too, so a
randomised device does not claim a German carrier while sitting in Tokyo.
randomised device does not claim a German carrier while sitting in Tokyo. The device model brings
its real codename, board, SoC and build fingerprint with it, so nothing contradicts the model.
- **Hidden apps stay hidden** from direct lookups, not just from package listings: a hidden package
reports itself as not installed to `getPackageInfo` and friends, which is what detection actually
asks. The module conceals its own package the same way.
- **Privacy switches**: hide an active VPN, hide developer options and ADB, report Google Play as the
installer, block private LAN scans, hide nearby Wi-Fi scan results, add realistic sensor noise.
- **Per-profile proxy**: route app traffic through an HTTP or SOCKS proxy, leaving loopback and LAN direct.
- **Update notifications** (optional): tells you when a newer release is published.
- **Master switch** to turn spoofing off without losing your values.
- **Export / import** your values as a JSON file.
- **Long-press a value to copy it.**
Expand All @@ -53,6 +58,10 @@ You decide which apps are affected: only the apps you tick in LSPosed see spoofe
| | Advertising ID | `AdvertisingIdClient.Info.getId` (Google Play services library) |
| | MediaDrm ID | `MediaDrm.getPropertyByteArray("deviceUniqueId")` |
| Device model | Brand, manufacturer, model | `Build.BRAND`, `Build.MANUFACTURER`, `Build.MODEL` |
| | Codename, product, board, hardware | `Build.DEVICE`, `PRODUCT`, `BOARD`, `HARDWARE`, and the matching `ro.product.*` / `ro.board.platform` / `ro.hardware` properties |
| | Bootloader, build id, incremental | `Build.BOOTLOADER`, `Build.ID`, `Build.VERSION.INCREMENTAL` and their `ro.*` properties |
| | Security patch | `Build.VERSION.SECURITY_PATCH`, `ro.build.version.security_patch` |
| | Build fingerprint | `Build.FINGERPRINT` and every `ro.*.build.fingerprint` |
| Wi-Fi & Bluetooth | MAC address | `WifiInfo.getMacAddress`, `NetworkInterface.getHardwareAddress` (`wlan0`) |
| | BSSID | `WifiInfo.getBSSID` |
| | SSID | `WifiInfo.getSSID` |
Expand All @@ -68,7 +77,7 @@ You decide which apps are affected: only the apps you tick in LSPosed see spoofe
| | Latitude, longitude | `Location.getLatitude`, `getLongitude`, `LocationManager.getLastKnownLocation` |
| Keyboard & IME | Default keyboard | `Settings.Secure` `default_input_method` |
| | Hidden keyboards | `InputMethodManager.getInputMethodList`, `getEnabledInputMethodList` |
| System privacy | Hidden apps | `PackageManager.getInstalledPackages`, `getInstalledApplications` |
| System privacy | Hidden apps | `PackageManager.getInstalledPackages`, `getInstalledApplications`, `getPackageInfo`, `getApplicationInfo`, `getPackageUid`, `getPackageGids`, `getLaunchIntentForPackage`, `queryIntent*`, `resolve*`, `getPackagesForUid` |
| Proxy & accounts | Virtual Gmail accounts | `AccountManager.getAccounts`, `getAccountsByType` |
| | Proxy host, port, type | `ProxySelector.getDefault` |

Expand Down Expand Up @@ -172,16 +181,20 @@ app/src/main/java/com/hidemydevice/app/
3. For every identifier that has a value, `Hook` replaces the matching framework methods so they return that value. Identifiers without a value get no hook at all.
4. The app detects that it's active by asking LSPosed for a world-readable preference file (and by a self-hook on `MainActivity.isModuleActive`).

## Network access

The app asks GitHub once a day whether a newer release exists, and that is the only network request
the project makes. It sends no query, no body and no identifying header, and the hooks themselves
never touch the network. Turn off **Check for new versions** and nothing is sent at all.

## Known limitations

These are good places to start contributing:

- **Hiding an app only filters lists.** `getInstalledPackages` and `getInstalledApplications` are
filtered, but a direct `getPackageInfo("com.example")` still answers truthfully, and most detectors
ask by name rather than enumerating.
- **Device profile isn't fully consistent.** Brand, manufacturer and model are spoofed, but
`Build.FINGERPRINT`, `DEVICE`, `PRODUCT` and the `ro.product.*` properties are not, which
contradicts them. The IMEI's TAC (model prefix) is random rather than matching the chosen model.
- **The IMEI's TAC** (the model prefix) is random rather than matching the chosen device.
- **The OS version is not spoofed.** `Build.VERSION.RELEASE` and `SDK_INT` stay real, and the build
fingerprint is composed around them, so a spoofed build id can still imply a different release
than the one actually running.
- **Region is only spoofed for `Locale.getDefault`.** An app reading
`getResources().getConfiguration().getLocales()` still sees the real country.
- **Every scoped app sees the same identity**, so apps can still correlate with each other.
Expand All @@ -201,8 +214,7 @@ These are good places to start contributing:

Ideas we'd love help with:

- [ ] **Hide apps from direct lookups** (`getPackageInfo`, `getApplicationInfo`, `queryIntentActivities`)
- [ ] **Consistent device profiles** (fingerprint, device, product, `ro.product.*` and IMEI TAC matching the model)
- [ ] **IMEI TAC matching the chosen model** (the rest of the device profile is now consistent)
- [ ] **Stable per-app randomisation** (seeded per app, consistent across processes)
- [ ] **Spoof region for `Configuration.getLocales()`**, not just `Locale.getDefault`
- [ ] **Pin a value** so "Random all" leaves it alone
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
minSdk = 27
// 34 keeps the classic (non edge-to-edge) window layout
targetSdk = 34
versionCode = 2
versionName = '1.1.0'
versionCode = 3
versionName = '1.2.0'
}

// Release signing comes from environment variables (set by the GitHub workflow from repository
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- The update check in UpdateChecker is the only network access in the project, and it only
ever contacts this project's own GitHub releases endpoint. It can be switched off. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/java/com/hidemydevice/app/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public class AboutActivity extends AppCompatActivity {
static final String LINKEDIN_URL = "https://www.linkedin.com/in/kamaran/";
static final String GITHUB_URL = "https://github.com/imkamaran/";
static final String SOURCE_URL = "https://github.com/imkamaran/HideMyDevice";
static final String APPGUARD_URL = "https://github.com/imkamaran/AppGuard";
static final String ADB_CONTROLLER_URL = "https://github.com/imkamaran/AdbController";
static final String AVD_KERNELSU_URL =
"https://github.com/imkamaran/avd-kernelsu-x86_64-MultiSU";

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand All @@ -33,6 +37,11 @@ protected void onCreate(Bundle savedInstanceState) {
findViewById(R.id.github).setOnClickListener(v -> open(GITHUB_URL));
findViewById(R.id.source).setOnClickListener(v -> open(SOURCE_URL));
findViewById(R.id.issues).setOnClickListener(v -> open(SOURCE_URL + "/issues"));

findViewById(R.id.app_appguard).setOnClickListener(v -> open(APPGUARD_URL));
findViewById(R.id.app_adb_controller).setOnClickListener(v -> open(ADB_CONTROLLER_URL));
findViewById(R.id.app_avd_kernelsu).setOnClickListener(v -> open(AVD_KERNELSU_URL));
findViewById(R.id.all_projects).setOnClickListener(v -> open(GITHUB_URL + "?tab=repositories"));
}

private String versionName() {
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/hidemydevice/app/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ enum Field {
BRAND(Category.MODEL, "brand", "Device Brand", "Up to 32 characters", ".{1,32}", Field.TEXT),
MANUFACTURER(Category.MODEL, "manufacturer", "Device Manufacturer", "Up to 32 characters", ".{1,32}", Field.TEXT),
MODEL(Category.MODEL, "model", "Device Model", "Up to 32 characters", ".{1,32}", Field.TEXT),
// A spoofed model that leaves these at the real values contradicts itself: anything comparing
// MODEL against FINGERPRINT or ro.product.* sees an emulator wearing a phone's name.
DEVICE(Category.MODEL, "device", "Device Codename", "e.g. panther", Field.BUILD_TOKEN, Field.TEXT),
PRODUCT(Category.MODEL, "product", "Product Name", "e.g. panther", Field.BUILD_TOKEN, Field.TEXT),
BOARD(Category.MODEL, "board", "Board", "e.g. panther", Field.BUILD_TOKEN, Field.TEXT),
HARDWARE(Category.MODEL, "hardware", "Hardware", "e.g. panther or qcom", Field.BUILD_TOKEN, Field.TEXT),
BOOTLOADER(Category.MODEL, "bootloader", "Bootloader", "Up to 32 characters", "[A-Za-z0-9_.:+-]{1,32}", Field.TEXT),
BUILD_ID(Category.MODEL, "build_id", "Build ID", "e.g. AP2A.240905.003", "[A-Za-z0-9._-]{1,32}", Field.TEXT),
BUILD_INCREMENTAL(Category.MODEL, "build_incremental", "Build Incremental", "e.g. 12231197", "[A-Za-z0-9._-]{1,48}", Field.TEXT),
SECURITY_PATCH(Category.MODEL, "security_patch", "Security Patch", "YYYY-MM-DD", "\\d{4}-\\d{2}-\\d{2}", Field.TEXT),
FINGERPRINT(Category.MODEL, "fingerprint", "Build Fingerprint", "brand/product/device:release/id/incremental:type/tags",
"[A-Za-z0-9._/:+-]{10,160}", Field.TEXT),

WIFI_MAC(Category.NETWORK, "wifi_mac", "MAC Address", "aa:bb:cc:dd:ee:ff", Field.MAC, Field.TEXT),
BSSID(Category.NETWORK, "bssid", "MAC BSSID", "aa:bb:cc:dd:ee:ff", Field.MAC, Field.TEXT),
Expand Down Expand Up @@ -61,6 +73,7 @@ enum Field {
private static final int COORDINATE = InputType.TYPE_CLASS_NUMBER
| InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED;
private static final String MAC = "([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}";
private static final String BUILD_TOKEN = "[A-Za-z0-9_+.-]{1,32}";
private static final boolean CONFIG = false;

final Category category;
Expand Down
Loading
Loading