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
50 changes: 39 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,17 @@ You decide which apps are affected: only the apps you tick in LSPosed see spoofe

## Features

- **Spoof 18 identifiers** across four groups: device, device model, Wi-Fi & Bluetooth, SIM & mobile.
- **Spoof 29 identifiers** across eight groups: device, device model, Wi-Fi & Bluetooth, SIM & mobile, timezone/region/GPS, keyboard, system privacy, and proxy & accounts.
- **Edit or randomise** each value individually, or **randomise everything with one tap**.
- **Realistic random values**: IMEI and ICCID carry valid Luhn check digits; MAC addresses are valid unicast addresses; SIM values (operator code, name, country, IMSI prefix, phone country code) always belong to the same real operator; brand, manufacturer and model always match a real phone.
- **New identity on every app start** (optional): each launch of a target app gets fresh random values.
- **Named profiles**: keep several identities and switch between them; create, rename and delete.
- **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.
- **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.
- **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 @@ -56,6 +63,14 @@ You decide which apps are affected: only the apps you tick in LSPosed see spoofe
| | Operator (MCC+MNC) | `getSimOperator`, `getNetworkOperator` |
| | Operator name | `getSimOperatorName`, `getNetworkOperatorName`, carrier-ID names, `SubscriptionInfo.getCarrierName` |
| | SIM country | `getSimCountryIso`, `getNetworkCountryIso`, `SubscriptionInfo.getCountryIso` |
| Timezone, region & GPS | Timezone | `TimeZone.getDefault` |
| | Region / country | `Locale.getDefault` (country only; the device language is kept) |
| | 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` |
| Proxy & accounts | Virtual Gmail accounts | `AccountManager.getAccounts`, `getAccountsByType` |
| | Proxy host, port, type | `ProxySelector.getDefault` |

Leave a field empty and the app sees the real value.

Expand Down Expand Up @@ -161,26 +176,39 @@ app/src/main/java/com/hidemydevice/app/

These are good places to start contributing:

- **Device profile isn't fully consistent.** Brand, manufacturer and model are spoofed, but `Build.FINGERPRINT`, `DEVICE` and `PRODUCT` are not. The IMEI's TAC (model prefix) is random rather than matching the chosen model.
- **"New values per launch" is per process.** Apps with several processes may see different values in each one.
- **The "active" banner** shows that LSPosed recognises the module, not that a given target app is in scope.
- **Only `wlan0`** is covered for MAC addresses; Wi-Fi **scan results** are not hooked.
- **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.
- **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.
- **"New values per launch" is per process.** Apps with several processes may see different values in
each one, and an app that sees a new IMEI on every start can tell something is spoofing it.
- **The "active" banner** shows that LSPosed recognises the module, not that a given target app is in
scope.
- **Only `wlan0`** is covered for MAC addresses. Wi-Fi scan results are hidden (an empty list), not
replaced with plausible ones.
- **Dual-SIM**: every slot gets the same IMEI; MEID isn't spoofed.
- **Advertising ID** is only spoofed if the app ships Google's unobfuscated `AdvertisingIdClient`.
- **VPN hiding** removes tunnel interfaces and clears the VPN transport, but an app that inspects
routing tables directly may still notice.
- **Native code** (JNI, direct syscalls, reading `/sys` or `/proc` files) bypasses Java hooks.

## Roadmap

Ideas we'd love help with:

- [ ] Named **profiles** with quick switching
- [ ] **Consistent device profiles** (fingerprint, device, product and IMEI TAC matching the model)
- [ ] **Hide apps from direct lookups** (`getPackageInfo`, `getApplicationInfo`, `queryIntentActivities`)
- [ ] **Consistent device profiles** (fingerprint, device, product, `ro.product.*` and IMEI TAC matching the model)
- [ ] **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
- [ ] Spoof Wi-Fi / Bluetooth **scan results** and block **LAN scanning**
- [ ] Spoof Wi-Fi / Bluetooth **scan results** with plausible networks rather than hiding them
- [ ] **WebView fingerprint** (user agent, canvas, navigator)
- [ ] **Timezone, region and GPS** spoofing
- [ ] In-app **hook log** viewer
- [ ] In-app **verification screen** showing what a scoped app actually sees
- [ ] Unit tests for `Randomizer` and validation
- [ ] Translations

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 = 1
versionName = '1.0.0'
versionCode = 2
versionName = '1.1.0'
}

// Release signing comes from environment variables (set by the GitHub workflow from repository
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/com/hidemydevice/app/Category.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ enum Category {
DEVICE(R.string.cat_device, R.drawable.ic_device),
MODEL(R.string.cat_model, R.drawable.ic_model),
NETWORK(R.string.cat_network, R.drawable.ic_network),
SIM(R.string.cat_sim, R.drawable.ic_sim);
SIM(R.string.cat_sim, R.drawable.ic_sim),
LOCATION_GEO(R.string.cat_location_geo, R.drawable.ic_network),
KEYBOARD_APP(R.string.cat_keyboard_app, R.drawable.ic_code),
SYSTEM_PRIVACY(R.string.cat_system_privacy, R.drawable.ic_shield_on),
PROXIES_ACCOUNTS(R.string.cat_proxies_accounts, R.drawable.ic_person);

final int titleRes;
final int iconRes;
Expand Down
74 changes: 72 additions & 2 deletions app/src/main/java/com/hidemydevice/app/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import android.text.InputType;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.TimeZone;
import java.util.regex.Pattern;

/** Every id the module can spoof. An empty stored value means "leave the real value alone". */
Expand All @@ -27,28 +31,94 @@ enum Field {
MOBILE_NO(Category.SIM, "mobile_no", "Mobile Number", "6-15 digits, optional leading +", "\\+?\\d{6,15}", InputType.TYPE_CLASS_PHONE),
SIM_OPERATOR(Category.SIM, "sim_operator", "SIM Operator (MCC+MNC)", "5-6 digits", "\\d{5,6}", InputType.TYPE_CLASS_NUMBER),
SIM_OPERATOR_NAME(Category.SIM, "sim_operator_name", "SIM Operator Name", "Up to 32 characters", ".{1,32}", Field.TEXT),
SIM_COUNTRY(Category.SIM, "sim_country", "SIM Country", "2-letter ISO code, e.g. us", "[a-z]{2}", Field.TEXT);
SIM_COUNTRY(Category.SIM, "sim_country", "SIM Country", "2-letter ISO code, e.g. us", "[a-z]{2}", Field.TEXT),

TIMEZONE(Category.LOCATION_GEO, Prefs.SPOOF_TIMEZONE, "Timezone", "A zone id, e.g. America/New_York", "[A-Za-z0-9_+/-]{3,40}", Field.TEXT),
REGION(Category.LOCATION_GEO, Prefs.SPOOF_REGION, "Region / Country", "2-letter ISO code, e.g. US", "[A-Za-z]{2}", Field.TEXT),
LATITUDE(Category.LOCATION_GEO, Prefs.SPOOF_LATITUDE, "GPS Latitude", "-90 to 90, e.g. 40.7128", "-?\\d{1,3}(\\.\\d{1,8})?", Field.COORDINATE),
LONGITUDE(Category.LOCATION_GEO, Prefs.SPOOF_LONGITUDE, "GPS Longitude", "-180 to 180, e.g. -74.0060", "-?\\d{1,3}(\\.\\d{1,8})?", Field.COORDINATE),

// Everything below is configuration rather than an identifier: "Random all" and
// "new values every launch" leave it alone, so a proxy or a hide list keeps working.
DEFAULT_KEYBOARD_ID(Category.KEYBOARD_APP, Prefs.DEFAULT_KEYBOARD_ID, "Virtual Default Keyboard ID",
"e.g. com.google.android.inputmethod.latin/.LatinIME", ".{3,100}", Field.TEXT, Field.CONFIG),
HIDDEN_KEYBOARDS(Category.KEYBOARD_APP, Prefs.HIDDEN_KEYBOARDS, "Hide Suspicious Keyboards",
"Comma-separated package names", ".*", Field.TEXT, Field.CONFIG),

HIDDEN_APPS(Category.SYSTEM_PRIVACY, Prefs.HIDDEN_APPS, "Hide Installed Apps",
"Comma-separated package names", ".*", Field.TEXT, Field.CONFIG),

VIRTUAL_GMAIL(Category.PROXIES_ACCOUNTS, Prefs.VIRTUAL_GMAIL_ACCOUNTS, "Virtual Gmail Accounts",
"Comma-separated email addresses", ".*", Field.TEXT, Field.CONFIG),
PROXY_HOST(Category.PROXIES_ACCOUNTS, Prefs.PROXY_HOST, "Proxy Host / IP",
"e.g. 192.168.1.100", "[A-Za-z0-9.:_-]{3,100}", Field.TEXT, Field.CONFIG),
PROXY_PORT(Category.PROXIES_ACCOUNTS, Prefs.PROXY_PORT, "Proxy Port",
"1-65535", "\\d{1,5}", InputType.TYPE_CLASS_NUMBER, Field.CONFIG),
PROXY_TYPE(Category.PROXIES_ACCOUNTS, Prefs.PROXY_TYPE, "Proxy Type",
"HTTP or SOCKS", "(?i)(http|socks)", Field.TEXT, Field.CONFIG);

private static final int TEXT = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
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 boolean CONFIG = false;

final Category category;
final String key;
final String title;
final String hint;
final int inputType;
/** Whether bulk randomising ("Random all", "new values every launch") may touch this field. */
final boolean randomizable;
private final Pattern pattern;

Field(Category category, String key, String title, String hint, String regex, int inputType) {
this(category, key, title, hint, regex, inputType, true);
}

Field(Category category, String key, String title, String hint, String regex, int inputType,
boolean randomizable) {
this.category = category;
this.key = key;
this.title = title;
this.hint = hint;
this.inputType = inputType;
this.randomizable = randomizable;
this.pattern = Pattern.compile(regex);
}

boolean isValid(String value) {
return pattern.matcher(value).matches();
if (!pattern.matcher(value).matches()) {
return false;
}
switch (this) {
// A regex cannot tell "America/New_York" from "Atlantis/Nowhere", and an unknown zone
// id silently resolves to GMT, so check it against the ones the platform knows.
case TIMEZONE:
return Zones.IDS.contains(value);
case LATITUDE:
return inRange(value, 90);
case LONGITUDE:
return inRange(value, 180);
case PROXY_PORT:
int port = Integer.parseInt(value);
return port >= 1 && port <= 65535;
default:
return true;
}
}

private static boolean inRange(String value, double limit) {
try {
double degrees = Double.parseDouble(value);
return !Double.isNaN(degrees) && Math.abs(degrees) <= limit;
} catch (NumberFormatException e) {
return false;
}
}

/** Built on first use - {@link TimeZone#getAvailableIDs()} allocates several hundred strings. */
private static final class Zones {
static final Set<String> IDS = new HashSet<>(Arrays.asList(TimeZone.getAvailableIDs()));
}
}
Loading
Loading