diff --git a/README.md b/README.md index 9bc888e..f8df491 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,11 @@ _Before_ ![](images/daydream.jpg) _After_ ![](images/daydream_fixed.jpg) + +- Japan Post Bank +``` +USB debug mode bypass for Japan Post Bank app. +``` + +- Remove Lock Screen Album Art (Android 10 only) +![](images/album_art_removed.jpg) \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 9ab1027..5a93435 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,15 +1,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 29 + compileSdkVersion 30 buildToolsVersion "29.0.2" defaultConfig { applicationId "io.github.jeffshee.nekumorimod" minSdkVersion 16 - targetSdkVersion 29 - versionCode 1 - versionName "1.0" + targetSdkVersion 30 + versionCode 2 + versionName "1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -26,12 +26,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.appcompat:appcompat:1.2.0' compileOnly 'de.robv.android.xposed:api:82:sources' compileOnly 'de.robv.android.xposed:api:82' testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' }// created with XposedModuleTemplate by dvdandroid // http://github.com/dvdandroid/XposedModuleTemplate diff --git a/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java b/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java index ee05ba5..f8879b4 100644 --- a/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java +++ b/app/src/main/java/io/github/jeffshee/nekumorimod/XposedMod.java @@ -1,15 +1,17 @@ package io.github.jeffshee.nekumorimod; import android.content.ContentResolver; +import android.os.Build; import android.provider.Settings; import java.util.HashMap; import java.util.Map; -import de.robv.android.xposed.XC_MethodHook; -import de.robv.android.xposed.XposedHelpers; import de.robv.android.xposed.IXposedHookLoadPackage; +import de.robv.android.xposed.XC_MethodHook; +import de.robv.android.xposed.XC_MethodReplacement; import de.robv.android.xposed.XposedBridge; +import de.robv.android.xposed.XposedHelpers; import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam; public class XposedMod implements IXposedHookLoadPackage { @@ -17,6 +19,7 @@ public class XposedMod implements IXposedHookLoadPackage { private static final String RAKUTEN_EDY = "jp.edy.edyapp"; private static final String GOOGLE_DAYDREAM = "com.google.android.vr.home"; private static final String JAPAN_POST = "jp.japanpost.jp_bank.bankbookapp"; + private static final String SYSYEM_UI = "com.android.systemui"; private static final Map BUILD_NEXUS_6 = new HashMap() { { @@ -69,6 +72,15 @@ public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable { XposedBridge.log("(NekumoriMOD) " + lpparam.packageName); debugModeSpoofing(lpparam.classLoader); break; + case SYSYEM_UI: + /* + Disable lock screen album art (Android 10 only) + */ + if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.Q) { + XposedBridge.log("(NekumoriMOD) " + lpparam.packageName); + disableLockScreenAlbumArt(lpparam.classLoader); + } + break; } } @@ -119,4 +131,17 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { }); } + private void disableLockScreenAlbumArt(ClassLoader classLoader) { + /* + Since only updateMediaMetaData called getMediaMetadata, replacing this method to return null should be OK + */ + XposedHelpers.findAndHookMethod("com.android.systemui.statusbar.NotificationMediaManager", classLoader, "getMediaMetadata", new XC_MethodReplacement() { + @Override + protected Object replaceHookedMethod(MethodHookParam param) throws Throwable { + XposedBridge.log("(NekumoriMOD) " + "disableLockScreenAlbumArt"); + return null; + } + }); + } + } \ No newline at end of file diff --git a/build.gradle b/build.gradle index be0f7ca..02c5e01 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0' + classpath 'com.android.tools.build:gradle:4.0.2' // NOTE: Do not place your application dependencies here; they belong diff --git a/images/album_art_removed.jpg b/images/album_art_removed.jpg new file mode 100644 index 0000000..f7c8177 Binary files /dev/null and b/images/album_art_removed.jpg differ