Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.cydiaexample;
- import java.lang.reflect.Method;
- import android.content.res.Resources;
- import android.util.Log;
- import com.saurik.substrate.MS;
- public class Main {
- static void initialize() {
- MS.hookClassLoad("android.content.res.Resources", new MS.ClassLoadHook() {
- public void classLoaded(Class<?> resources) {
- Method getColor; try {
- getColor = resources.getMethod("getColor", Integer.TYPE);
- } catch (NoSuchMethodException e) {
- getColor = null;
- }
- if (getColor != null) {
- MS.hookMethod(resources, getColor,
- new MS.MethodAlteration<Resources, Integer>() {
- public Integer invoked(Resources resources, Object... args)
- throws Throwable
- {
- return invoke(resources, args) & ~0x00ff6600;
- }
- });
- }
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement