diff --git a/app/build.gradle b/app/build.gradle index f6b43a0..71f7b62 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { applicationId "io.virtualapp.sandvxposed" minSdkVersion 19 targetSdkVersion 28 - versionCode 76 - versionName "1.2.5.1.3.1.5.7" + versionCode 77 + versionName "1.2.5.1.3.1.6.0" multiDexEnabled true android { defaultConfig { diff --git a/app/src/main/java/io/virtualapp/VApp.java b/app/src/main/java/io/virtualapp/VApp.java index af44abc..c6e8fb9 100644 --- a/app/src/main/java/io/virtualapp/VApp.java +++ b/app/src/main/java/io/virtualapp/VApp.java @@ -6,6 +6,7 @@ import com.lody.virtual.client.core.VirtualCore; import com.lody.virtual.client.stub.VASettings; +import com.lody.virtual.helper.utils.VLog; import com.lody.virtual.sandxposed.SandXposed; // import com.trend.lazyinject.buildmap.Auto_ComponentBuildMap; // import com.trend.lazyinject.lib.LazyInject; @@ -32,6 +33,7 @@ public static VApp getApp() { protected void attachBaseContext(Context base) { super.attachBaseContext(base); SandXposed.init(); + VLog.OPEN_LOG = BuildConfig.DEBUG; mPreferences = base.getSharedPreferences("va", Context.MODE_MULTI_PROCESS); VASettings.ENABLE_IO_REDIRECT = true; VASettings.ENABLE_INNER_SHORTCUT = false; diff --git a/app/src/main/java/io/virtualapp/home/models/safePackage.java b/app/src/main/java/io/virtualapp/home/models/safePackage.java index 57c58f8..be5e4de 100644 --- a/app/src/main/java/io/virtualapp/home/models/safePackage.java +++ b/app/src/main/java/io/virtualapp/home/models/safePackage.java @@ -6,6 +6,7 @@ public class safePackage { static public String safe_Package[] = { + "com.tencent.tim", // TIM OfficeQQ "com.qiyi.video",//爱奇艺 "com.changba",//唱吧 "com.dianping.v1",//大众点评 diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4435e50..422fac0 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -111,7 +111,7 @@ 默认会更新所有克隆的应用(会被更新到与本机安装版本相同),如果需要取消更新,请点击列表里面的项目。点击以后可以取消该应用的更新同步。 删除数据 应用数据管理 - 更新日志:修复部分BUG,加入新桌面。 + 更新日志:修复安卓10下的BUG 应用唤醒设置 启用或者禁用程序唤醒(切断唤醒) 分享到SVXP内部的应用 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index dd59794..e75eb88 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -111,7 +111,7 @@ 默认会更新所有克隆的应用(会被更新到与本机安装版本相同),如果需要取消更新,请点击列表里面的项目。点击以后可以取消该应用的更新同步。 删除数据 应用数据管理 - 更新日志:修复部分BUG,加入新桌面。 + 更新日志:修复安卓10下的BUG 应用唤醒设置 启用或者禁用程序唤醒(切断唤醒) 分享到SVXP内部的应用 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3d3362a..5e8be5f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -169,7 +169,7 @@ All applications were added to list when page was loaded. You can click item in list for cancel item form syncing. Application Data Manager Delete Data - Update Logs: Fix bugs. Add new desktop. + Update Logs: Fix bugs within Android Q Application Wake Up Enable or disable application wake up Shared to SVXP\'s applications. diff --git a/lib/build.gradle b/lib/build.gradle index 790b018..3ab9dd2 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -53,7 +53,8 @@ gradle.startParameter.getTaskNames().each { task -> dependencies { api fileTree(include: ['*.jar'], dir: 'libs') - api 'com.swift.sandhook:hooklib:4.1.6' + implementation 'com.swift.sandhook:hooklib:4.2.0' + implementation 'com.swift.sandhook:nativehook:4.2.0' // api 'com.swift.sandhook:xposedcompat:4.1.0' api 'com.trend.lazyinject:lib:3.4.0-beta' implementation "me.weishu:free_reflection:2.1.0" diff --git a/lib/src/main/java/com/lody/virtual/client/hook/proxies/atm/MethodProxies.java b/lib/src/main/java/com/lody/virtual/client/hook/proxies/atm/MethodProxies.java index 92c962a..867b5ea 100644 --- a/lib/src/main/java/com/lody/virtual/client/hook/proxies/atm/MethodProxies.java +++ b/lib/src/main/java/com/lody/virtual/client/hook/proxies/atm/MethodProxies.java @@ -110,10 +110,11 @@ public String getMethodName() { @Override public Object call(Object who, Method method, Object... args) throws Throwable { - Log.d("Q_M", "---->StartActivity 类"); + VLog.d("Q_M", "---->StartActivity 类"); int intentIndex = ArrayUtils.indexOfObject(args, Intent.class, 1); if (intentIndex < 0) { + VLog.d("Q_M", "---->intentIndex < 0"); return ActivityManagerCompat.START_INTENT_NOT_RESOLVED; } int resultToIndex = ArrayUtils.indexOfObject(args, IBinder.class, 2); @@ -124,19 +125,21 @@ public Object call(Object who, Method method, Object... args) throws Throwable { int userId = VUserHandle.myUserId(); if (ComponentUtils.isStubComponent(intent)) { + VLog.d("Q_M", "---->ComponentUtils.isStubComponent"); return method.invoke(who, args); } if (Intent.ACTION_INSTALL_PACKAGE.equals(intent.getAction()) || (Intent.ACTION_VIEW.equals(intent.getAction()) && "application/vnd.android.package-archive".equals(intent.getType()))) { + VLog.d("Q_M", "---->application/vnd.android.package-archive"); if (handleInstallRequest(intent)) { return 0; } } else if ((Intent.ACTION_UNINSTALL_PACKAGE.equals(intent.getAction()) || Intent.ACTION_DELETE.equals(intent.getAction())) && "package".equals(intent.getScheme())) { - + VLog.d("Q_M", "---->package"); if (handleUninstallRequest(intent)) { return 0; } @@ -172,9 +175,9 @@ public Object call(Object who, Method method, Object... args) throws Throwable { if (activityInfo == null) { VLog.e("VActivityManager", "Unable to resolve activityInfo : " + intent); - Log.d("Q_M", "---->StartActivity who=" + who); - Log.d("Q_M", "---->StartActivity intent=" + intent); - Log.d("Q_M", "---->StartActivity resultTo=" + resultTo); + VLog.d("Q_M", "---->StartActivity who=" + who); + VLog.d("Q_M", "---->StartActivity intent=" + intent); + VLog.d("Q_M", "---->StartActivity resultTo=" + resultTo); if (intent.getPackage() != null && isAppPkg(intent.getPackage())) { return ActivityManagerCompat.START_INTENT_NOT_RESOLVED; @@ -191,6 +194,8 @@ public Object call(Object who, Method method, Object... args) throws Throwable { } int res = VActivityManager.get().startActivity(intent, activityInfo, resultTo, options, resultWho, requestCode, VUserHandle.myUserId()); if (res != 0 && resultTo != null && requestCode > 0) { + VLog.d("Q_M", "---->sendActivityResult to=" + resultTo+ " who "+resultWho + +" code "+requestCode); VActivityManager.get().sendActivityResult(resultTo, resultWho, requestCode); } if (resultTo != null) { @@ -200,6 +205,8 @@ public Object call(Object who, Method method, Object... args) throws Throwable { TypedValue out = new TypedValue(); Resources.Theme theme = r.activity.getResources().newTheme(); theme.applyStyle(activityInfo.getThemeResource(), true); + + VLog.d("Q_M", "---->StartActivity Anim=" + activityInfo.getThemeResource()); if (theme.resolveAttribute(android.R.attr.windowAnimationStyle, out, true)) { TypedArray array = theme.obtainStyledAttributes(out.data, diff --git a/lib/src/main/java/com/lody/virtual/client/ipc/VPackageManager.java b/lib/src/main/java/com/lody/virtual/client/ipc/VPackageManager.java index 237f3f0..ae9e9f6 100644 --- a/lib/src/main/java/com/lody/virtual/client/ipc/VPackageManager.java +++ b/lib/src/main/java/com/lody/virtual/client/ipc/VPackageManager.java @@ -14,6 +14,7 @@ import android.os.RemoteException; import com.lody.virtual.client.env.VirtualRuntime; +import com.lody.virtual.helper.compat.BuildCompat; import com.lody.virtual.helper.ipcbus.IPCSingleton; import com.lody.virtual.server.IPackageInstaller; import com.lody.virtual.server.interfaces.IPackageManager; @@ -171,20 +172,36 @@ public ApplicationInfo getApplicationInfo(String packageName, int flags, int use if (info == null) { return null; } - final int P = 28; - final String APACHE_LEGACY = "/system/framework/org.apache.http.legacy.boot.jar"; - if (android.os.Build.VERSION.SDK_INT >= P && info.targetSdkVersion < P) { + if(BuildCompat.isQ()) + { + final String HTTP_LIB_Q = "/system/framework/org.apache.http.legacy.jar"; String[] newSharedLibraryFiles; if (info.sharedLibraryFiles == null) { - newSharedLibraryFiles = new String[]{APACHE_LEGACY}; + newSharedLibraryFiles = new String[]{HTTP_LIB_Q}; } else { int newLength = info.sharedLibraryFiles.length + 1; newSharedLibraryFiles = new String[newLength]; System.arraycopy(info.sharedLibraryFiles, 0, newSharedLibraryFiles, 0, newLength - 1); - newSharedLibraryFiles[newLength - 1] = APACHE_LEGACY; + newSharedLibraryFiles[newLength - 1] = HTTP_LIB_Q; } info.sharedLibraryFiles = newSharedLibraryFiles; } + else + { + final String APACHE_LEGACY = "/system/framework/org.apache.http.legacy.boot.jar"; + if (BuildCompat.isP()) { + String[] newSharedLibraryFiles; + if (info.sharedLibraryFiles == null) { + newSharedLibraryFiles = new String[]{APACHE_LEGACY}; + } else { + int newLength = info.sharedLibraryFiles.length + 1; + newSharedLibraryFiles = new String[newLength]; + System.arraycopy(info.sharedLibraryFiles, 0, newSharedLibraryFiles, 0, newLength - 1); + newSharedLibraryFiles[newLength - 1] = APACHE_LEGACY; + } + info.sharedLibraryFiles = newSharedLibraryFiles; + } + } return info; } catch (RemoteException e) { return VirtualRuntime.crash(e); diff --git a/lib/src/main/java/com/lody/virtual/helper/compat/BuildCompat.java b/lib/src/main/java/com/lody/virtual/helper/compat/BuildCompat.java index bbe2ffe..d277e37 100644 --- a/lib/src/main/java/com/lody/virtual/helper/compat/BuildCompat.java +++ b/lib/src/main/java/com/lody/virtual/helper/compat/BuildCompat.java @@ -30,4 +30,9 @@ public static boolean isQ() { final int Q = 29; return SDK == Q - 1 && getPreviewSDKInt() > 0 || Build.VERSION.SDK_INT >= Q; } + + public static boolean isP() + { + return Build.VERSION_CODES.P<=Build.VERSION.SDK_INT; + } } \ No newline at end of file diff --git a/lib/src/main/java/com/lody/virtual/sandxposed/SandXposed.java b/lib/src/main/java/com/lody/virtual/sandxposed/SandXposed.java index f9fc62a..537ea6b 100644 --- a/lib/src/main/java/com/lody/virtual/sandxposed/SandXposed.java +++ b/lib/src/main/java/com/lody/virtual/sandxposed/SandXposed.java @@ -33,7 +33,7 @@ public static void init() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { ReflectionUtils.passApiCheck(); } - /* + try{ if (PendingHookHandler.canWork()) { VLog.i("SandHook", "Pending Hook Mode!"); @@ -42,7 +42,6 @@ public static void init() { { e.printStackTrace(); } - */ } public static void injectXposedModule(Context context, String packageName, String processName) { diff --git a/lib/src/main/jniLibs/arm64-v8a/libsandhook-native.so b/lib/src/main/jniLibs/arm64-v8a/libsandhook-native.so deleted file mode 100644 index eb0b70c..0000000 Binary files a/lib/src/main/jniLibs/arm64-v8a/libsandhook-native.so and /dev/null differ diff --git a/lib/src/main/jniLibs/armeabi-v7a/libsandhook-native.so b/lib/src/main/jniLibs/armeabi-v7a/libsandhook-native.so deleted file mode 100644 index 0746d7d..0000000 Binary files a/lib/src/main/jniLibs/armeabi-v7a/libsandhook-native.so and /dev/null differ