├── .gitignore ├── .idea ├── caches │ └── build_file_checksums.ser ├── gradle.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── me │ │ └── wy │ │ └── fuckvivo │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── me │ │ │ └── wangyi │ │ │ └── fuckvivo │ │ │ ├── InstallHelperService.java │ │ │ ├── MainActivity.java │ │ │ └── PreferencesUtils.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── accessibility_config.xml │ └── test │ └── java │ └── me │ └── wy │ └── fuckvivo │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches/build_file_checksum.ser 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | .DS_Store 9 | /build 10 | /captures 11 | .externalNativeBuild 12 | -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangyiwy/FuckVivo/15ef957c771848d46294ef6db915f0d20dd551ad/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### APK下载 2 | [https://fir.im/fuckvivo](https://fir.im/fuckvivo) 3 | #### 使用 4 | 1. 安装apk到手机上 5 | 2. 设置vivo的安装密码 6 | 3. 在辅助功能中打开服务 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | .idea 3 | app/build/ 4 | /build 5 | /gradle 6 | *.iml -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 27 5 | defaultConfig { 6 | applicationId "me.wangyi.fuckvivo" 7 | minSdkVersion 21 8 | targetSdkVersion 27 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | 13 | resConfigs "zh" 14 | resConfigs "xxhdpi" 15 | } 16 | buildTypes { 17 | debug { 18 | minifyEnabled true 19 | shrinkResources true 20 | zipAlignEnabled true 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | } 25 | 26 | dependencies { 27 | implementation fileTree(dir: 'libs', include: ['*.jar']) 28 | implementation 'com.android.support:appcompat-v7:27.1.1' 29 | testImplementation 'junit:junit:4.12' 30 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 31 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 32 | } 33 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/me/wy/fuckvivo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | packageme.wangyi.fuckvivo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("me.wy.fuckvivo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/java/me/wangyi/fuckvivo/InstallHelperService.java: -------------------------------------------------------------------------------- 1 | package me.wangyi.fuckvivo; 2 | 3 | import android.accessibilityservice.AccessibilityService; 4 | import android.os.Bundle; 5 | import android.text.TextUtils; 6 | import android.view.accessibility.AccessibilityEvent; 7 | import android.view.accessibility.AccessibilityNodeInfo; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | public class InstallHelperService extends AccessibilityService { 13 | @Override 14 | public void onAccessibilityEvent(AccessibilityEvent event) { 15 | AccessibilityNodeInfo rootNode = getRootInActiveWindow(); 16 | if (rootNode == null) return; 17 | 18 | if (event.getPackageName().equals("com.vivo.secime.service")) { 19 | String password = PreferencesUtils.getString(getApplicationContext(), 20 | PreferencesUtils.KEY_PASSWORD, ""); 21 | if (!TextUtils.isEmpty(password)) { 22 | fillPassword(rootNode, password); 23 | } 24 | } else if (event.getPackageName().equals("com.android.packageinstaller")) { 25 | installConfirm(rootNode); 26 | } 27 | } 28 | 29 | private void fillPassword(AccessibilityNodeInfo rootNode, String password) { 30 | AccessibilityNodeInfo editText = rootNode.findFocus(AccessibilityNodeInfo.FOCUS_INPUT); 31 | if (editText == null) return; 32 | 33 | if (editText.getPackageName().equals("com.bbk.account") 34 | && editText.getClassName().equals("android.widget.EditText")) { 35 | Bundle arguments = new Bundle(); 36 | arguments.putCharSequence(AccessibilityNodeInfo 37 | .ACTION_ARGUMENT_SET_TEXT_CHARSEQUENCE, password); 38 | editText.performAction(AccessibilityNodeInfo.ACTION_SET_TEXT, arguments); 39 | } 40 | 41 | List nodeInfoList =rootNode.findAccessibilityNodeInfosByText("确定"); 42 | for (AccessibilityNodeInfo nodeInfo : nodeInfoList) { 43 | nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK); 44 | } 45 | } 46 | 47 | private void installConfirm(AccessibilityNodeInfo rootNode) { 48 | List nodeInfoList = new ArrayList<>(); 49 | nodeInfoList.addAll(rootNode.findAccessibilityNodeInfosByText("继续安装")); 50 | nodeInfoList.addAll(rootNode.findAccessibilityNodeInfosByText("安装")); 51 | nodeInfoList.addAll(rootNode.findAccessibilityNodeInfosByText("打开")); 52 | 53 | for (AccessibilityNodeInfo nodeInfo : nodeInfoList) { 54 | nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK); 55 | } 56 | } 57 | 58 | @Override 59 | public void onInterrupt() { 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/src/main/java/me/wangyi/fuckvivo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package me.wangyi.fuckvivo; 2 | 3 | import android.content.Intent; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.text.TextUtils; 7 | import android.view.View; 8 | import android.widget.EditText; 9 | import android.widget.Toast; 10 | 11 | public class MainActivity extends AppCompatActivity { 12 | private EditText mEditText; 13 | 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_main); 18 | mEditText = findViewById(R.id.et_password); 19 | startActivity(new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS)); 20 | } 21 | 22 | @Override 23 | protected void onResume() { 24 | super.onResume(); 25 | String password = PreferencesUtils.getString(getApplicationContext(), 26 | PreferencesUtils.KEY_PASSWORD, ""); 27 | if (!TextUtils.isEmpty(password)) { 28 | mEditText.setText(password); 29 | mEditText.setSelection(password.length()); 30 | } 31 | } 32 | 33 | public void savePassword(View view) { 34 | String password = mEditText.getText().toString().trim(); 35 | PreferencesUtils.saveString(this, PreferencesUtils.KEY_PASSWORD, password); 36 | Toast.makeText(this, R.string.toast_save_success, Toast.LENGTH_SHORT).show(); 37 | } 38 | 39 | public void openSettings(View view) { 40 | startActivity(new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS)); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/me/wangyi/fuckvivo/PreferencesUtils.java: -------------------------------------------------------------------------------- 1 | package me.wangyi.fuckvivo; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | 6 | public class PreferencesUtils { 7 | private static final String CONFIG_NAME = "system_config"; 8 | 9 | public static final String KEY_PASSWORD = "key_password"; 10 | 11 | public static void saveString(Context context, String key, String value) { 12 | SharedPreferences sp = context.getSharedPreferences(CONFIG_NAME, 13 | Context.MODE_PRIVATE); 14 | sp.edit().putString(key, value).apply(); 15 | } 16 | 17 | public static String getString(Context context, String key, String defValue) { 18 | SharedPreferences sp = context.getSharedPreferences(CONFIG_NAME, 19 | Context.MODE_PRIVATE); 20 | return sp.getString(key, defValue); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 17 | 18 |