Skip to content

Commit

Permalink
Add Android11 Support & Bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lianglixin committed Sep 6, 2020
1 parent 2adbd85 commit 2e3d68d
Show file tree
Hide file tree
Showing 106 changed files with 2,770 additions and 3,032 deletions.
24 changes: 14 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'lazyinject'
// apply plugin: 'lazyinject'

/*
lazyinject {
//是否开启注入
enable true
Expand All @@ -9,16 +10,17 @@ lazyinject {
//包名数组,过滤需要注入的包,加快编译
includes "virtual"
}
*/

android {
compileSdkVersion 29
buildToolsVersion '29.0'
buildToolsVersion '29.0.2'
defaultConfig {
applicationId "io.virtualapp.sandvxposed"
minSdkVersion 19
targetSdkVersion 28
versionCode 79
versionName "1.2.5.1.3.1.6.2"
versionCode 82
versionName "1.2.5.1.3.1.7.0"
multiDexEnabled true
android {
defaultConfig {
Expand All @@ -43,10 +45,12 @@ android {

buildTypes {
debug {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

Expand All @@ -67,20 +71,20 @@ android {
}

dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
api fileTree(include: ['*.jar'], dir: 'libs')
api project(':lib')
// Update to AndroidX on 2019/06/07
//Android Lib
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.melnykov:floatingactionbutton:1.3.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
//Promise Support
implementation 'org.jdeferred:jdeferred-android-aar:1.2.4'
// ThirdParty
implementation 'com.jonathanfinerty.once:once:1.0.3'
implementation 'com.jonathanfinerty.once:once:1.3.0'
implementation 'com.flurry.android:analytics:6.9.2'
implementation 'com.kyleduo.switchbutton:library:1.4.6'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
Expand All @@ -99,7 +103,7 @@ dependencies {
// Alert View
implementation 'com.bigkoo:alertview:1.0.3'

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'

implementation 'com.gauravk.bubblenavigation:bubblenavigation:1.0.7'
}
Expand Down
1 change: 0 additions & 1 deletion app/debug/output.json

This file was deleted.

41 changes: 41 additions & 0 deletions app/dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
香港
记者
连任
吼啊
鸭嘴笔
董建华
张宝华
tooYoung
tooSimple
当然啦
上海交大
学习一个
身经百战
见得多了
谈笑风生
sometimesNaive
朱物华校长
张钟俊院长
你们还是要
有事找大哥
董先生连任
搞个大新闻
applyForProfessor
youMeanImADictator
美国的华莱士
识得唔识得啊
跑得比谁都快
你们呀Naive
苟利国家生死以
岂因祸福避趋之
不是我要钦点他
不知高到哪里去
一点人生的经验
闷声大发财
微电子工业的发展
他们这里洋文好的人多得很呐
西方的那一个国家我没有去过
你们毕竟还TooYoung明白这意思吗
能源与发展趋势的主要节能措施
搞来搞去还是图样图森破i上台拿衣服
将来如果在报道上有偏差i你们要负责
80 changes: 0 additions & 80 deletions app/proguard-rules.pro

This file was deleted.

16 changes: 14 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
android:excludeFromRecents="true"
android:launchMode="singleInstance"
android:theme="@style/ShowWallpaper">

<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down Expand Up @@ -124,13 +125,24 @@
<activity
android:name=".home.ShortcutAppActivity"
android:exported="true"
android:launchMode="singleInstance">
android:launchMode="singleInstance"
android:icon="@drawable/weixin"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="com.sk.vxpmain" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!--activity-alias
android:targetActivity=".home.ShortcutAppActivity"
android:name="微信"
android:label="微信"
android:icon="@drawable/weixin">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias-->
<activity
android:name=".home.adapters.AppChooseAct"
android:launchMode="singleInstance" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/virtualapp/VApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static VApp getApp() {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
SandXposed.init();
SandXposed.init(BuildConfig.DEBUG);
VLog.OPEN_LOG = BuildConfig.DEBUG;
mPreferences = base.getSharedPreferences("va", Context.MODE_MULTI_PROCESS);
VASettings.ENABLE_IO_REDIRECT = true;
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/java/io/virtualapp/home/LoadingActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
Expand Down Expand Up @@ -45,7 +44,6 @@
import io.virtualapp.abs.ui.VUiKit;
import io.virtualapp.home.models.PackageAppData;
import io.virtualapp.home.repo.PackageAppDataStorage;
import jonathanfinerty.once.Once;
import sk.vpkg.provider.BanNotificationProvider;

/**
Expand Down Expand Up @@ -111,7 +109,6 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
start = SystemClock.elapsedRealtime();

if(!(new msVerify().chkSign(getResources().getString(R.string.about_info))))
{finish();return;}
setContentView(R.layout.activity_loading);
Expand Down Expand Up @@ -261,6 +258,7 @@ private void checkAndLaunch(Intent intent, int userId) {

private void launchActivity(Intent intent, int userId) {
try {
//VLog.d("LoadingActivity","launchActivity uid "+userId);
VActivityManager.get().startActivity(intent, userId);
} catch (Throwable e) {
e.printStackTrace();
Expand Down
40 changes: 26 additions & 14 deletions app/src/main/java/io/virtualapp/home/ShortcutAppActivity.java
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
package io.virtualapp.home;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;

import io.virtualapp.R;
import io.virtualapp.home.repo.XAppDataInstalled;
import androidx.appcompat.app.AppCompatActivity;

import com.lody.virtual.client.core.VirtualCore;
import com.lody.virtual.client.ipc.VActivityManager;

public class ShortcutAppActivity extends AppCompatActivity
{
private static void launchActivity(String szPackageName, Integer nUserId)
{
try {
Intent intent = VirtualCore.get().getLaunchIntent(szPackageName, nUserId);
intent.setSelector(null);
VActivityManager.get().startActivity(intent, nUserId);
} catch (Throwable ignored) {
ignored.printStackTrace();
}
}

@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shortcut_app);
finish();
Bundle lpBundle = getIntent().getExtras();
while(lpBundle!=null)
if(lpBundle!=null)
{
try
{
// Fix android O shortcut by Saurik QQ 384550791
String pIntentInvoke = lpBundle.getString("pArgsToLaunch");
getIntent().removeExtra("pArgsToLaunch");
if (pIntentInvoke == null)
String szPackage = lpBundle.getString("pArgsToLaunch");
if (szPackage == null)
{
break;
throw new ClassNotFoundException("Can not found args");
}
int dwUserID = lpBundle.getInt("dwUserID");
XAppDataInstalled lpAppInfo = new XAppDataInstalled();
lpAppInfo.pkgName = pIntentInvoke;
LoadingActivity.launch(ShortcutAppActivity.this,pIntentInvoke,dwUserID);
//XAppDataInstalled lpAppInfo = new XAppDataInstalled();
//lpAppInfo.pkgName = pIntentInvoke;
// LoadingActivity.launch(ShortcutAppActivity.this,pIntentInvoke,dwUserID);
launchActivity(szPackage,dwUserID);
return;
}
catch(Throwable e)
{
e.printStackTrace();
}
break;
}
finish();
launchActivity("com.tencent.mm",0);
}
}
Binary file added app/src/main/res/drawable/weixin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/src/main/res/layout/activity_xposed_manager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

<include
layout="@layout/icon_preference_item" />
<include
layout="@layout/icon_sksign" />


<androidx.recyclerview.widget.RecyclerView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/icon_preference_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_toRightOf="@+id/icon"
android:layout_toEndOf="@+id/xposed_enable_icon"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:ellipsize="marquee"
android:gravity="center_vertical"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<string name="ensurerestart">真的要重启吗?请确保已经保存好数据。</string>
<string name="manualpath">手动选择路径安装</string>
<string name="appInstallTip">正在安装应用,稍后请下拉桌面以刷新应用列表。</string>
<string name="about_info">"特别感谢甘!##SandVXP是一个应用程序,可以让用户在非Root和非引导加载程序解锁设备上使用Xposed模块。##将应用程序和模块添加或克隆到这个应用程序中,然后在菜单的“Xposed管理器”中启用它,应用和模块就可以工作了。##QQ 384550791##邮箱: king@fou.ink##网址https://www.die.lu/ "</string>
<string name="about_info">"特别感谢甘!##SandVXP是一个应用程序,可以让用户在非Root和非引导加载程序解锁设备上使用Xposed模块。##将应用程序和模块添加或克隆到这个应用程序中,然后在菜单的“Xposed管理器”中启用它,应用和模块就可以工作了。##QQ 2737996094##邮箱: king@fou.ink##网址https://www.die.lu/ "</string>
<string name="launch_failed">抱歉,启动失败。</string>
<string name="sys_crash">应用程序发生异常,已被捕捉,请留意。</string>
<string name="rom_shortcut_tips">检测到您的机型必须手动允许快捷方式的创建,请到系统设置->应用->权限管理,找到本应用,开启快捷方式权限。</string>
Expand Down Expand Up @@ -111,7 +111,7 @@
<string name="sk_upgrade_localapp">默认会更新所有克隆的应用(会被更新到与本机安装版本相同),如果需要取消更新,请点击列表里面的项目。点击以后可以取消该应用的更新同步。</string>
<string name="clear_data">删除数据</string>
<string name="title_activity_app_data_manager">应用数据管理</string>
<string name="update_tips">更新日志:加入脱壳功能,修复部分问题。</string>
<string name="update_tips">更新日志:支持安卓11,修复部分问题。</string>
<string name="enable_wakeup">应用唤醒设置</string>
<string name="wake_up_setting">启用或者禁用程序唤醒(切断唤醒)</string>
<string name="shared_to_inner_app">分享到SVXP内部的应用</string>
Expand Down
Loading

0 comments on commit 2e3d68d

Please sign in to comment.