diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e3d9e5aa..15969e48 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -19,14 +19,11 @@ jobs: with: java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle run: chmod +x gradlew &&./gradlew assembleDebug - name: Upload APK - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: - name: app + name: app-debug path: app/build/outputs/apk/debug/debug.apk diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bdf71e3e..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Build CI - -on: - - push - - pull_request - -env: - WARN_ON_PR: "artifact upload is disabled due to the workflow is trigged by pull request." - -jobs: - build: - name: Gradle CI - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - name: Clone repository - - - name: Prepare Java 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - java-package: jdk+fx - - - name: Cache Gradle packages - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ hashFiles('**/*gradle*') }} - restore-keys: ${{ runner.os }} - - - name: Build project - env: - DEBUG_KEY_PASSWORD: android - DEBUG_STORE_PASSWORD: android - DEBUG_KEY_ALIAS: androiddebugkey - run: | - if ${{ !!github.head_ref }}; then echo "::warning:: Gradle $WARN_ON_PR"; fi - gradle wrapper - bash gradlew assembleDebug - - - name: Upload articact - uses: actions/upload-artifact@v2 - if: ${{ !github.head_ref }} - with: - path: app/build/outputs/apk - name: binary diff --git a/hotxposed/build.gradle b/hotxposed/build.gradle index 45cf36e5..f899a067 100644 --- a/hotxposed/build.gradle +++ b/hotxposed/build.gradle @@ -6,9 +6,6 @@ android { defaultConfig { minSdkVersion 14 targetSdkVersion 29 - versionCode 1 - versionName "1.0" - } buildTypes { diff --git a/hotxposed/src/main/java/net/androidwing/hotxposed/HotXposed.java b/hotxposed/src/main/java/net/androidwing/hotxposed/HotXposed.java index 2a2ba8f4..927a926b 100644 --- a/hotxposed/src/main/java/net/androidwing/hotxposed/HotXposed.java +++ b/hotxposed/src/main/java/net/androidwing/hotxposed/HotXposed.java @@ -17,7 +17,7 @@ * Created on 2018/3/30. */ public class HotXposed { - public static void hook(Class clazz, XC_LoadPackage.LoadPackageParam lpparam) + public static void hook(Class clazz, XC_LoadPackage.LoadPackageParam lpparam) throws Exception { String packageName = clazz.getName().replace("." + clazz.getSimpleName(), ""); File apkFile = getApkFile(packageName, lpparam); @@ -30,7 +30,7 @@ public static void hook(Class clazz, XC_LoadPackage.LoadPackageParam lpparam) filterNotify(lpparam); PathClassLoader classLoader = new PathClassLoader(apkFile.getAbsolutePath(), lpparam.getClass().getClassLoader()); - Class cls = classLoader.loadClass(clazz.getName()); + Class cls = classLoader.loadClass(clazz.getName()); if (cls != null) { Method method = cls.getDeclaredMethod("dispatch", XC_LoadPackage.LoadPackageParam.class); method.setAccessible(true); @@ -44,7 +44,7 @@ private static void filterNotify(XC_LoadPackage.LoadPackageParam lpparam) XposedHelpers.findAndHookMethod(lpparam.classLoader.loadClass("de.robv.android.xposed.installer.util.NotificationUtil"), "showModulesUpdatedNotification", new XC_MethodHook() { @Override - protected void beforeHookedMethod(MethodHookParam param) throws Throwable { + protected void beforeHookedMethod(MethodHookParam param) { param.setResult(new Object()); }