Skip to content

Commit

Permalink
修复cookie类动态hook失败导致的8.7.86以上版本报错
Browse files Browse the repository at this point in the history
  • Loading branch information
nining377 committed Jul 10, 2022
1 parent 79d63d0 commit adc7471
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.raincat.dolby_beta"
minSdkVersion 21
targetSdkVersion 29
versionCode 353
versionName "3.5.3"
versionCode 354
versionName "3.5.4"

ndk {
abiFilters "arm64-v8a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ public static String getCookie(Context context) {
.filter(c -> c.getSuperclass() == Object.class)
.filter(c -> Stream.of(c.getDeclaredFields()).anyMatch(m -> m.getType() == ConcurrentHashMap.class))
.filter(c -> Stream.of(c.getDeclaredFields()).anyMatch(m -> m.getType() == SharedPreferences.class))
.filter(c -> Stream.of(c.getDeclaredFields()).anyMatch(m -> m.getType() == File.class))
.filter(c -> Stream.of(c.getDeclaredFields()).anyMatch(m -> m.getType() == long.class))
.findFirst()
.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public LoginFixHook(Context context) {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
super.beforeHookedMethod(param);
if (param.args[0].equals("/api/login/cellphone")) {
if (param.args[0].equals("/api/login/cellphone")
|| param.args[0].equals("/api/login")
|| param.args[0].equals("/api/login/sns")) {
if (((String) param.args[1]).contains("\"checkToken\":\"\"")) {
Class<?> watchmanClass = XposedHelpers.findClassIfExists("com.netease.mobsecurity.rjsb.watchman", context.getClassLoader());
if (watchmanClass == null)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
classpath "com.android.tools.build:gradle:4.0.2"
}
}

Expand Down

1 comment on commit adc7471

@CoelacanthusHex
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please release a new version including this bug fix. This bug makes NCM crash when startup and user can't change setting to workaround it.

Please sign in to comment.