Skip to content

Commit

Permalink
修改主题,并添加图标
Browse files Browse the repository at this point in the history
  • Loading branch information
firesunCN committed Apr 3, 2018
1 parent 3106709 commit aee3969
Show file tree
Hide file tree
Showing 24 changed files with 47 additions and 19 deletions.
10 changes: 9 additions & 1 deletion README.md
Expand Up @@ -3,7 +3,15 @@

目前支持抢红包,自动接收转账,消息防撤回,朋友圈防删除,朋友圈去广告

自适应方式采用微信巫师的自动搜索方式,理论支持微信全版本,微信升级后理论上可继续支持
自适应方式采用微信巫师的自动搜索方式,理论支持微信全版本,微信升级后理论上可继续支持(微信6.6.5测试通过)

# 效果预览
![screenshot1](./image/screenshot1.jpg)

![screenshot2](./image/screenshot2.jpg)

![screenshot3](./image/screenshot3.jpg)


# 致谢
本项目为以下三个项目的融合,使用Java重(chao)写(xi)了微信巫师的自动搜索hook类的功能,并应用在抢红包和自动接收转账上,使得以上功能都能自动适配微信,在此十分感谢veryyoung,Gh0u1L5,wuxiaosu
Expand Down
5 changes: 3 additions & 2 deletions app/build.gradle
Expand Up @@ -23,8 +23,8 @@ android {
applicationId "me.firesun.wechat.enhancement"
minSdkVersion 15
targetSdkVersion 23
versionCode 33
versionName "1.0.0"
versionCode 35
versionName "1.1.0"
}

buildTypes {
Expand All @@ -35,6 +35,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

}

dependencies {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Expand Up @@ -4,6 +4,7 @@

<application
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name="me.firesun.wechat.enhancement.SettingsActivity"
Expand Down
Binary file added app/src/main/ic_launcher-web.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion app/src/main/java/me/firesun/wechat/enhancement/Main.java
Expand Up @@ -40,7 +40,6 @@ private void initParams(LoadPackageParam lpparam) throws Throwable {
}

private void loadPlugins(LoadPackageParam lpparam) {

try {
ADBlock.getInstance().hook(lpparam);
AntiRevoke.getInstance().hook(lpparam);
Expand Down
Expand Up @@ -16,7 +16,6 @@ public class SettingsActivity extends AppCompatActivity {

private SettingsFragment mSettingsFragment;


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -28,19 +27,16 @@ protected void onCreate(Bundle savedInstanceState) {

}


@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void replaceFragment(int viewId, android.app.Fragment fragment) {
FragmentManager fragmentManager = getFragmentManager();
fragmentManager.beginTransaction().replace(viewId, fragment).commit();
}


/**
* A placeholder fragment containing a settings view.
*/
public static class SettingsFragment extends PreferenceFragment {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -58,7 +54,6 @@ public boolean onPreferenceClick(Preference pref) {
return true;
}
});

}
}
}
Expand Up @@ -7,6 +7,8 @@
import me.firesun.wechat.enhancement.PreferencesUtils;
import me.firesun.wechat.enhancement.util.HookClasses;

import static de.robv.android.xposed.XposedBridge.log;


public class ADBlock {
private static ADBlock instance = null;
Expand All @@ -31,6 +33,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
if (param.args[1].equals("ADInfo"))
param.setResult(null);
} catch (Error | Exception e) {
log("error:"+e);
}

}
Expand Down
Expand Up @@ -13,6 +13,8 @@
import me.firesun.wechat.enhancement.PreferencesUtils;
import me.firesun.wechat.enhancement.util.HookClasses;

import static de.robv.android.xposed.XposedBridge.log;


public class AntiRevoke {
private static AntiRevoke instance = null;
Expand Down Expand Up @@ -47,6 +49,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
}
}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -65,6 +68,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
}

} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -81,6 +85,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
if ((path.contains("/image2/") || path.contains("/voice2/") || path.contains("/video/")))
param.setResult(true);
} catch (Error | Exception e) {
log("error:"+e);
}

}
Expand All @@ -100,6 +105,7 @@ protected void afterHookedMethod(MethodHookParam param) {
long msgId = XposedHelpers.getLongField(msg, "field_msgId");
msgCacheMap.put(msgId, msg);
} catch (Error | Exception e) {
log("error:"+e);
}

}
Expand Down
Expand Up @@ -10,6 +10,7 @@
import me.firesun.wechat.enhancement.PreferencesUtils;
import me.firesun.wechat.enhancement.util.HookClasses;

import static de.robv.android.xposed.XposedBridge.log;
import static java.util.Arrays.copyOfRange;


Expand All @@ -36,7 +37,6 @@ protected void beforeHookedMethod(MethodHookParam param) {
return;
}


if (param.args[0].equals("SnsInfo")) {
ContentValues contentValues = ((ContentValues) param.args[1]);
int type = contentValues.getAsInteger("type");
Expand All @@ -45,6 +45,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
handleMomentDelete(contentValues);
}
}

if (param.args[0].equals("SnsComment")) {
ContentValues contentValues = ((ContentValues) param.args[1]);
int type = contentValues.getAsInteger("type");
Expand All @@ -54,6 +55,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
}
}
} catch (Error | Exception e) {
log("error:"+e);
}

}
Expand Down
Expand Up @@ -12,6 +12,8 @@
import de.robv.android.xposed.callbacks.XC_LoadPackage;
import me.firesun.wechat.enhancement.util.HookClasses;

import static de.robv.android.xposed.XposedBridge.log;


public class HideModule {
private static HideModule instance = null;
Expand Down Expand Up @@ -41,6 +43,7 @@ protected void afterHookedMethod(MethodHookParam param) {
}
param.setResult(resultApplicationList);
} catch (Error | Exception e) {
log("error:"+e);
}

}
Expand All @@ -61,7 +64,7 @@ protected void afterHookedMethod(MethodHookParam param) {
}
param.setResult(resultpackageInfoList);
} catch (Error | Exception e) {
e.printStackTrace();
log("error:"+e);
}
}
});
Expand All @@ -73,9 +76,9 @@ protected void beforeHookedMethod(MethodHookParam param) {
String packageName = (String) param.args[0];
if (packageName.contains("firesun") || packageName.contains("xposed")) {
param.args[0] = HookClasses.WECHAT_PACKAGE_NAME;

}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -89,6 +92,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
param.args[0] = HookClasses.WECHAT_PACKAGE_NAME;
}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -108,6 +112,7 @@ protected void afterHookedMethod(MethodHookParam param) {
}
param.setResult(resultList);
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -127,6 +132,7 @@ protected void afterHookedMethod(MethodHookParam param) {
}
param.setResult(resultList);
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -146,6 +152,7 @@ protected void afterHookedMethod(MethodHookParam param) {
}
param.setResult(resultList);
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand Down
Expand Up @@ -28,6 +28,7 @@

import static android.text.TextUtils.isEmpty;
import static android.widget.Toast.LENGTH_LONG;
import static de.robv.android.xposed.XposedBridge.log;
import static de.robv.android.xposed.XposedHelpers.callMethod;
import static de.robv.android.xposed.XposedHelpers.callStaticMethod;
import static de.robv.android.xposed.XposedHelpers.findFirstFieldByExactType;
Expand Down Expand Up @@ -68,6 +69,7 @@ protected void afterHookedMethod(MethodHookParam param) {
handleTransfer(contentValues, lpparam);
}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand Down Expand Up @@ -96,6 +98,7 @@ protected void beforeHookedMethod(MethodHookParam param) {
luckyMoneyMessages.remove(0);

} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -111,6 +114,7 @@ protected void afterHookedMethod(MethodHookParam param) {
}
}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -127,6 +131,7 @@ protected void afterHookedMethod(MethodHookParam param) {
Toast.makeText(activity, "微信ID:" + wechatId + "已复制到剪切板", LENGTH_LONG).show();
}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand All @@ -143,6 +148,7 @@ protected void afterHookedMethod(MethodHookParam param) {
Toast.makeText(activity, "微信ID:" + wechatId + "已复制到剪切板", LENGTH_LONG).show();
}
} catch (Error | Exception e) {
log("error:"+e);
}
}
});
Expand Down
Expand Up @@ -143,7 +143,6 @@ public static void init(XC_LoadPackage.LoadPackageParam lpparam, String versionN


LuckyMoneyRequestClass = ReflectionUtil.findClassesFromPackage(lpparam.classLoader, wxClasses, "com.tencent.mm.plugin.luckymoney", 1)

.filterByField("talker", "java.lang.String")
.filterByMethod(void.class, int.class, String.class, JSONObject.class)
.filterByMethod(int.class, "getType")
Expand Down
Binary file added app/src/main/res/mipmap-hdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions app/src/main/res/values/colors.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#4CAF50</color>
<color name="primary_dark">#388E3C</color>
<color name="primary_light">#C8E6C9</color>
<color name="accent">#009688</color>
<color name="accent">#009df1</color>
<color name="primary">#0079f1</color>
<color name="primary_dark">#0059b0</color>
<color name="primary_light">#238cf4</color>
<color name="white">#FFF</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">微信增强插件</string>
<string name="app_name">微信增强</string>
<string name="app_desc">抢红包,防撤回,去广告</string>
<string name="pref_open">抢红包</string>
<string name="pref_not_self">自己发的不抢</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/pref_setting.xml
Expand Up @@ -74,7 +74,7 @@

<PreferenceCategory android:title="@string/ADBlock_setting">
<SwitchPreference
android:defaultValue="true"
android:defaultValue="false"
android:key="is_adblock"
android:title="@string/pref_enable_adblock" />
</PreferenceCategory>
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Expand Up @@ -19,6 +19,7 @@ allprojects {
google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
Binary file added image/screenshot1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/screenshot2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/screenshot3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aee3969

Please sign in to comment.