|
@@ -39,9 +39,13 @@ public class BaseHook {
|
|
|
static final String PROP_IMEI = "imei";
|
|
static final String PROP_IMEI = "imei";
|
|
|
static final String PROP_NUMBER = "number";
|
|
static final String PROP_NUMBER = "number";
|
|
|
static final String PROP_COUNTRY = "country";
|
|
static final String PROP_COUNTRY = "country";
|
|
|
- static final String PROP_CARRIER_ID = "carrier_id";
|
|
|
|
|
- static final String PROP_CARRIER_NAME = "carrier_name";
|
|
|
|
|
|
|
+ static final String PROP_CARRIER_ID = "carrierId";
|
|
|
|
|
+ static final String PROP_CARRIER_NAME = "carrierName";
|
|
|
static final String PROP_UPI_POLICY = "upi_policy";
|
|
static final String PROP_UPI_POLICY = "upi_policy";
|
|
|
|
|
+ static final String PROP_MAC = "mac";
|
|
|
|
|
+ static final String PROP_BSSID = "bssid";
|
|
|
|
|
+ static final String PROP_SERIAL = "serialNo";
|
|
|
|
|
+ static final String PROP_ANDROID_ID = "androidId";
|
|
|
|
|
|
|
|
static final String TAG = "Modifier";
|
|
static final String TAG = "Modifier";
|
|
|
|
|
|
|
@@ -92,12 +96,19 @@ public class BaseHook {
|
|
|
String value = defaultValue;
|
|
String value = defaultValue;
|
|
|
try {
|
|
try {
|
|
|
Context context = getContext();
|
|
Context context = getContext();
|
|
|
- File configFile = new File(context.getExternalFilesDir("config"), "config.json");
|
|
|
|
|
|
|
+ String packageName = context.getPackageName();
|
|
|
|
|
+ File configFile;
|
|
|
|
|
+ if (packageName.equals("android")) {
|
|
|
|
|
+ configFile = new File("/data/system/config.json");
|
|
|
|
|
+ } else if (packageName.equals("com.android.phone")) {
|
|
|
|
|
+ configFile = new File(context.getExternalFilesDir("config"), "config.json");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return defaultValue;
|
|
|
|
|
+ }
|
|
|
if (configFile.exists()) {
|
|
if (configFile.exists()) {
|
|
|
-
|
|
|
|
|
- String jsonBase64 = FileUtils.readFileToString(configFile, StandardCharsets.UTF_8);
|
|
|
|
|
- if (!TextUtils.isEmpty(jsonBase64)) {
|
|
|
|
|
- JSONObject jsonObject = new JSONObject(new String(Base64.decode(jsonBase64, Base64.DEFAULT)));
|
|
|
|
|
|
|
+ String json = FileUtils.readFileToString(configFile, StandardCharsets.UTF_8);
|
|
|
|
|
+ if (!TextUtils.isEmpty(json)) {
|
|
|
|
|
+ JSONObject jsonObject = new JSONObject(json);
|
|
|
if (jsonObject.has(key)) {
|
|
if (jsonObject.has(key)) {
|
|
|
value = jsonObject.getString(key);
|
|
value = jsonObject.getString(key);
|
|
|
}
|
|
}
|