();
+
+ private ThemeManager() {}
+
+ public static synchronized ThemeManager getInstance() {
+ if (instance == null) {
+ instance = new ThemeManager();
+ }
+ return instance;
+ }
+
+ public int getThemeColor() {
+ return themeColor;
+ }
+
+ public void setThemeColor(int color) {
+ if (themeColor != color) {
+ themeColor = color;
+ notifyListeners();
+ }
+ }
+
+ public void addListener(OnThemeColorChangeListener listener) {
+ if (!listeners.contains(listener)) {
+ listeners.add(listener);
+ }
+ }
+
+ public void removeListener(OnThemeColorChangeListener listener) {
+ listeners.remove(listener);
+ }
+
+ private void notifyListeners() {
+ for (OnThemeColorChangeListener l : listeners) {
+ if (l != null) {
+ l.onThemeColorChanged(themeColor);
+ }
+ }
+ }
+
+ public interface OnThemeColorChangeListener {
+ void onThemeColorChanged(int newColor);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/handler/CrashHandler.java b/app/src/main/java/com/bytecat/algui/handler/CrashHandler.java
new file mode 100644
index 0000000..3f76a14
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/handler/CrashHandler.java
@@ -0,0 +1,54 @@
+package com.bytecat.algui.handler;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Process;
+
+import com.bytecat.algui.CrashHandlerActivity;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class CrashHandler implements Thread.UncaughtExceptionHandler {
+
+ private final Context context;
+
+ private CrashHandler(Context context) {
+ this.context = context;
+ }
+
+ @SuppressLint("StaticFieldLeak")
+ private static volatile CrashHandler instance;
+
+ @Override
+ public void uncaughtException(Thread thread, Throwable throwable) {
+ final StringWriter stringWriter = new StringWriter();
+ final PrintWriter printWriter = new PrintWriter(stringWriter);
+ throwable.printStackTrace(printWriter);
+ final Intent intent = new Intent(context, CrashHandlerActivity.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.putExtra("stackTrace", stringWriter.toString());
+ try {
+ stringWriter.close();
+ printWriter.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ context.startActivity(intent);
+ Process.killProcess(Process.myPid());
+ }
+
+ public static void init(Context context) {
+ if (instance == null) {
+ synchronized (CrashHandler.class) {
+ if (instance == null) {
+ instance = new CrashHandler(context);
+ Thread.setDefaultUncaughtExceptionHandler(instance);
+ }
+ }
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/interpolator/FastOutSlowInInterpolator.java b/app/src/main/java/com/bytecat/algui/interpolator/FastOutSlowInInterpolator.java
new file mode 100644
index 0000000..e015e6c
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/interpolator/FastOutSlowInInterpolator.java
@@ -0,0 +1,54 @@
+package com.bytecat.algui.interpolator;
+
+/**
+ * Interpolator corresponding to {@link android.R.interpolator#fast_out_slow_in}.
+ *
+ * Uses a lookup table for the Bezier curve from (0,0) to (1,1) with control points:
+ * P0 (0, 0)
+ * P1 (0.4, 0)
+ * P2 (0.2, 1.0)
+ * P3 (1.0, 1.0)
+ */
+public class FastOutSlowInInterpolator extends LookupTableInterpolator {
+
+ /**
+ * Lookup table values sampled with x at regular intervals between 0 and 1 for a total of
+ * 201 points.
+ */
+ private static final float[] VALUES = new float[]{
+ 0.0000f, 0.0001f, 0.0002f, 0.0005f, 0.0009f, 0.0014f, 0.0020f,
+ 0.0027f, 0.0036f, 0.0046f, 0.0058f, 0.0071f, 0.0085f, 0.0101f,
+ 0.0118f, 0.0137f, 0.0158f, 0.0180f, 0.0205f, 0.0231f, 0.0259f,
+ 0.0289f, 0.0321f, 0.0355f, 0.0391f, 0.0430f, 0.0471f, 0.0514f,
+ 0.0560f, 0.0608f, 0.0660f, 0.0714f, 0.0771f, 0.0830f, 0.0893f,
+ 0.0959f, 0.1029f, 0.1101f, 0.1177f, 0.1257f, 0.1339f, 0.1426f,
+ 0.1516f, 0.1610f, 0.1707f, 0.1808f, 0.1913f, 0.2021f, 0.2133f,
+ 0.2248f, 0.2366f, 0.2487f, 0.2611f, 0.2738f, 0.2867f, 0.2998f,
+ 0.3131f, 0.3265f, 0.3400f, 0.3536f, 0.3673f, 0.3810f, 0.3946f,
+ 0.4082f, 0.4217f, 0.4352f, 0.4485f, 0.4616f, 0.4746f, 0.4874f,
+ 0.5000f, 0.5124f, 0.5246f, 0.5365f, 0.5482f, 0.5597f, 0.5710f,
+ 0.5820f, 0.5928f, 0.6033f, 0.6136f, 0.6237f, 0.6335f, 0.6431f,
+ 0.6525f, 0.6616f, 0.6706f, 0.6793f, 0.6878f, 0.6961f, 0.7043f,
+ 0.7122f, 0.7199f, 0.7275f, 0.7349f, 0.7421f, 0.7491f, 0.7559f,
+ 0.7626f, 0.7692f, 0.7756f, 0.7818f, 0.7879f, 0.7938f, 0.7996f,
+ 0.8053f, 0.8108f, 0.8162f, 0.8215f, 0.8266f, 0.8317f, 0.8366f,
+ 0.8414f, 0.8461f, 0.8507f, 0.8551f, 0.8595f, 0.8638f, 0.8679f,
+ 0.8720f, 0.8760f, 0.8798f, 0.8836f, 0.8873f, 0.8909f, 0.8945f,
+ 0.8979f, 0.9013f, 0.9046f, 0.9078f, 0.9109f, 0.9139f, 0.9169f,
+ 0.9198f, 0.9227f, 0.9254f, 0.9281f, 0.9307f, 0.9333f, 0.9358f,
+ 0.9382f, 0.9406f, 0.9429f, 0.9452f, 0.9474f, 0.9495f, 0.9516f,
+ 0.9536f, 0.9556f, 0.9575f, 0.9594f, 0.9612f, 0.9629f, 0.9646f,
+ 0.9663f, 0.9679f, 0.9695f, 0.9710f, 0.9725f, 0.9739f, 0.9753f,
+ 0.9766f, 0.9779f, 0.9791f, 0.9803f, 0.9815f, 0.9826f, 0.9837f,
+ 0.9848f, 0.9858f, 0.9867f, 0.9877f, 0.9885f, 0.9894f, 0.9902f,
+ 0.9910f, 0.9917f, 0.9924f, 0.9931f, 0.9937f, 0.9944f, 0.9949f,
+ 0.9955f, 0.9960f, 0.9964f, 0.9969f, 0.9973f, 0.9977f, 0.9980f,
+ 0.9984f, 0.9986f, 0.9989f, 0.9991f, 0.9993f, 0.9995f, 0.9997f,
+ 0.9998f, 0.9999f, 0.9999f, 1.0000f, 1.0000f
+ };
+
+ public FastOutSlowInInterpolator() {
+ super(VALUES);
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/interpolator/LookupTableInterpolator.java b/app/src/main/java/com/bytecat/algui/interpolator/LookupTableInterpolator.java
new file mode 100644
index 0000000..5889b5e
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/interpolator/LookupTableInterpolator.java
@@ -0,0 +1,41 @@
+package com.bytecat.algui.interpolator;
+
+import android.view.animation.Interpolator;
+
+/**
+ * An {@link Interpolator} that uses a lookup table to compute an interpolation based on a
+ * given input.
+ */
+abstract class LookupTableInterpolator implements Interpolator {
+
+ private final float[] mValues;
+ private final float mStepSize;
+
+ public LookupTableInterpolator(float[] values) {
+ mValues = values;
+ mStepSize = 1f / (mValues.length - 1);
+ }
+
+ @Override
+ public float getInterpolation(float input) {
+ if (input >= 1.0f) {
+ return 1.0f;
+ }
+ if (input <= 0f) {
+ return 0f;
+ }
+
+ // Calculate index - We use min with length - 2 to avoid IndexOutOfBoundsException when
+ // we lerp (linearly interpolate) in the return statement
+ int position = Math.min((int) (input * (mValues.length - 1)), mValues.length - 2);
+
+ // Calculate values to account for small offsets as the lookup table has discrete values
+ float quantized = position * mStepSize;
+ float diff = input - quantized;
+ float weight = diff / mStepSize;
+
+ // Linearly interpolate between the table values
+ return mValues[position] + weight * (mValues[position + 1] - mValues[position]);
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/layoutparams/BaseMarginLayoutParams.java b/app/src/main/java/com/bytecat/algui/layoutparams/BaseMarginLayoutParams.java
new file mode 100644
index 0000000..4fe156f
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/layoutparams/BaseMarginLayoutParams.java
@@ -0,0 +1,41 @@
+package com.bytecat.algui.layoutparams;
+
+import android.view.ViewGroup;
+
+import com.bytecat.algui.base.BaseHelper;
+
+public abstract class BaseMarginLayoutParams extends BaseParams {
+
+ public T setAllMargins(int margins) {
+ return setMargins(margins, margins, margins, margins);
+ }
+
+ public T setMargins(int left, int top, int right, int bottom) {
+ build().setMargins(left, top, right, bottom);
+ return (T) this;
+ }
+
+ public T setLeftMargin(int left) {
+ build().leftMargin = left;
+ return (T) this;
+ }
+
+ public T setTopMargin(int top) {
+ build().topMargin = top;
+ return (T) this;
+ }
+
+ public T setRightMargin(int right) {
+ build().rightMargin = right;
+ return (T) this;
+ }
+
+ public T setBottomMargin(int bottom) {
+ build().bottomMargin = bottom;
+ return (T) this;
+ }
+
+ @Override
+ public abstract ViewGroup.MarginLayoutParams build();
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/layoutparams/BaseParams.java b/app/src/main/java/com/bytecat/algui/layoutparams/BaseParams.java
new file mode 100644
index 0000000..d2ca76a
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/layoutparams/BaseParams.java
@@ -0,0 +1,21 @@
+package com.bytecat.algui.layoutparams;
+
+import android.view.ViewGroup;
+
+import com.bytecat.algui.base.BaseHelper;
+
+public abstract class BaseParams extends BaseHelper {
+
+ public T setWidth(int width) {
+ build().width = width;
+ return (T) this;
+ }
+
+ public T setHeight(int height) {
+ build().height = height;
+ return (T) this;
+ }
+
+ public abstract ViewGroup.LayoutParams build();
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/layoutparams/LinearParams.java b/app/src/main/java/com/bytecat/algui/layoutparams/LinearParams.java
new file mode 100644
index 0000000..7094e16
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/layoutparams/LinearParams.java
@@ -0,0 +1,29 @@
+package com.bytecat.algui.layoutparams;
+
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+
+public class LinearParams extends BaseMarginLayoutParams {
+
+ private final LinearLayout.LayoutParams layoutParams;
+
+ public LinearParams() {
+ layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+
+ public LinearParams setGravity(int gravity) {
+ layoutParams.gravity = gravity;
+ return this;
+ }
+
+ public LinearParams setWeight(float weight) {
+ layoutParams.weight = weight;
+ return this;
+ }
+
+ @Override
+ public LinearLayout.LayoutParams build() {
+ return layoutParams;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/layoutparams/RelativeParams.java b/app/src/main/java/com/bytecat/algui/layoutparams/RelativeParams.java
new file mode 100644
index 0000000..a015533
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/layoutparams/RelativeParams.java
@@ -0,0 +1,43 @@
+package com.bytecat.algui.layoutparams;
+
+import android.view.ViewGroup;
+import android.widget.RelativeLayout;
+
+public class RelativeParams extends BaseMarginLayoutParams {
+
+ private final RelativeLayout.LayoutParams layoutParams;
+
+ public RelativeParams() {
+ layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ }
+
+ public RelativeParams alignWithParent() {
+ return alignWithParent(true);
+ }
+
+ public RelativeParams alignWithParent(boolean enabled) {
+ build().alignWithParent = enabled;
+ return this;
+ }
+
+ public RelativeParams addRule(int verb) {
+ build().addRule(verb);
+ return this;
+ }
+
+ public RelativeParams addRule(int verb, int subject) {
+ build().addRule(verb, subject);
+ return this;
+ }
+
+ public RelativeParams removeRule(int verb) {
+ build().removeRule(verb);
+ return this;
+ }
+
+ @Override
+ public RelativeLayout.LayoutParams build() {
+ return layoutParams;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/layoutparams/StackParams.java b/app/src/main/java/com/bytecat/algui/layoutparams/StackParams.java
new file mode 100644
index 0000000..0c13680
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/layoutparams/StackParams.java
@@ -0,0 +1,24 @@
+package com.bytecat.algui.layoutparams;
+
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+
+public class StackParams extends BaseMarginLayoutParams {
+
+ private final FrameLayout.LayoutParams layoutParams;
+
+ public StackParams() {
+ layoutParams = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, WrapContent);
+ }
+
+ public StackParams setGravity(int gravity) {
+ layoutParams.gravity = gravity;
+ return this;
+ }
+
+ @Override
+ public ViewGroup.MarginLayoutParams build() {
+ return layoutParams;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/AlguiActivity.java b/app/src/main/java/com/bytecat/algui/ui/AlguiActivity.java
new file mode 100644
index 0000000..6a0730f
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/AlguiActivity.java
@@ -0,0 +1,39 @@
+package com.bytecat.algui.ui;
+
+import android.app.Activity;
+import android.content.Intent;
+import com.bytecat.algui.AlguiManager.AlguiLog;
+import com.bytecat.algui.AlguiTools.AlguiToolPermission;
+
+public class AlguiActivity {
+
+ private AlguiActivity() {
+ throw new UnsupportedOperationException("cannot be instantiated");
+ }
+
+ public static final String TAG = "AlguiActivity";
+ public static Activity MainActivity;
+
+ private static boolean isActivityWindow = false;
+
+ public static void start(final Activity c) {
+ if (c != null) {
+ MainActivity = c;
+ AlguiLog.init(c);
+ if (isActivityWindow) {
+ Main.start(MainActivity);
+ } else {
+ AlguiToolPermission.getWindow(c, new AlguiToolPermission.PermissionCallback() {
+ public void run(boolean b) {
+ if (b) {
+ MainActivity.startService(new Intent(MainActivity, AlguiService.class));
+ } else {
+ Main.start(MainActivity);
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/AlguiService.java b/app/src/main/java/com/bytecat/algui/ui/AlguiService.java
new file mode 100644
index 0000000..624619c
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/AlguiService.java
@@ -0,0 +1,111 @@
+package com.bytecat.algui.ui;
+
+import android.app.Service;
+import android.content.Intent;
+import android.graphics.Color;
+import android.graphics.PixelFormat;
+import android.graphics.Typeface;
+import android.os.IBinder;
+import android.view.Gravity;
+import android.view.WindowManager;
+import android.widget.TextView;
+import java.util.HashMap;
+import java.util.Map;
+
+public class AlguiService extends Service {
+
+ public static final String TAG = "AlguiService";
+ private WindowManager windowManager;
+ private Map screenTexts = new HashMap<>();
+ private static AlguiService instance;
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
+ instance = this;
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ clearAllScreenTexts();
+ instance = null;
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ public static AlguiService getInstance() {
+ return instance;
+ }
+
+ public void showScreenText(String text, String id, int x, int y, int textSize, float alpha) {
+ if (screenTexts.containsKey(id)) {
+ screenTexts.get(id).update(text, x, y, textSize, alpha);
+ } else {
+ TextView textView = new TextView(this);
+ textView.setText(text);
+ textView.setTextSize(textSize);
+ textView.setAlpha(alpha);
+ textView.setTextColor(Color.WHITE);
+ textView.setTypeface(Typeface.DEFAULT_BOLD);
+ textView.setGravity(Gravity.LEFT);
+ textView.setFocusable(false);
+ textView.setClickable(false);
+ textView.setLongClickable(false);
+
+ WindowManager.LayoutParams params = new WindowManager.LayoutParams(
+ WindowManager.LayoutParams.WRAP_CONTENT,
+ WindowManager.LayoutParams.WRAP_CONTENT,
+ WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
+ PixelFormat.TRANSLUCENT);
+ params.x = x;
+ params.y = y;
+ params.gravity = Gravity.TOP | Gravity.START;
+ windowManager.addView(textView, params);
+
+ ScreenText screenText = new ScreenText(textView, id);
+ screenTexts.put(id, screenText);
+ }
+ }
+
+ public void removeScreenText(String id) {
+ if (screenTexts.containsKey(id)) {
+ ScreenText screenText = screenTexts.get(id);
+ windowManager.removeView(screenText.textView);
+ screenTexts.remove(id);
+ }
+ }
+
+ public void clearAllScreenTexts() {
+ for (ScreenText screenText : screenTexts.values()) {
+ windowManager.removeView(screenText.textView);
+ }
+ screenTexts.clear();
+ }
+
+ private static class ScreenText {
+ private TextView textView;
+ private String id;
+
+ public ScreenText(TextView textView, String id) {
+ this.textView = textView;
+ this.id = id;
+ }
+
+ public void update(String text, int x, int y, int textSize, float alpha) {
+ textView.setText(text);
+ textView.setTextSize(textSize);
+ textView.setAlpha(alpha);
+ WindowManager.LayoutParams params = (WindowManager.LayoutParams) textView.getLayoutParams();
+ params.x = x;
+ params.y = y;
+ textView.setLayoutParams(params);
+ }
+ }
+ }
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/MIX.java b/app/src/main/java/com/bytecat/algui/ui/MIX.java
new file mode 100644
index 0000000..db44f2b
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/MIX.java
@@ -0,0 +1,119 @@
+package com.bytecat.algui.ui;
+
+import android.app.Activity;
+import android.os.Handler;
+import android.os.Looper;
+
+import com.bytecat.algui.core.MuCuteUIX;
+import com.bytecat.algui.effect.DynamicArrayList;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.button.FloatButton;
+import com.bytecat.algui.ace;
+import android.content.Context;
+
+import com.bytecat.algui.effect.ArrayListView;
+import com.bytecat.algui.effect.ModuleManager;
+
+/** @noinspection SpellCheckingInspection*/
+public final class MIX {
+
+ private MIX() {
+ }
+
+ public static boolean initialized;
+
+ public static DynamicArrayList arrayList;
+
+ public static ArrayListView arrayListView;
+
+ public static Notification notification;
+
+ public static FloatButton floatButton;
+
+ private static Context context;
+
+ public static void init() {
+ if (initialized) {
+ return;
+ }
+
+ loop();
+ loopThread();
+
+
+ arrayListView = new ArrayListView (MIX.getContext());
+
+ arrayList = DynamicArrayList.getInstance();
+
+
+
+
+
+
+ arrayList.show();
+
+
+
+ notification = Notification.getInstance();
+ notification.show();
+
+
+ floatButton = FloatButton.getInstance();
+ floatButton.show();
+
+ initialized = true;
+ }
+
+ private static void loop() {
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
+
+ /** @noinspection InfiniteLoopStatement*/
+ @Override
+ public void run() {
+ while (true) {
+ try {
+ Looper.loop();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ new Hint()
+ .setMessage("UI Loop Crash: " + e)
+ .show();
+ }
+ }
+ }
+
+ });
+ }
+
+ private static void loopThread() {
+ Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+ @Override
+ public void uncaughtException(Thread t, final Throwable e) {
+ new Handler(Looper.getMainLooper()).post(new Runnable() {
+ @Override
+ public void run() {
+ e.printStackTrace();
+ new Hint()
+ .setMessage("Thread Loop Crash: " + e)
+ .show();
+ }
+ });
+ }
+ });
+ }
+
+ public static void init(Activity activity) {
+ ace.init(activity);
+ context=activity;
+ MuCuteUIX.init(activity);
+ init();
+
+ }
+
+ public static Context getContext() {
+ return context;
+ }
+
+ }
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/Main.java b/app/src/main/java/com/bytecat/algui/ui/Main.java
new file mode 100644
index 0000000..44ae410
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/Main.java
@@ -0,0 +1,223 @@
+package com.bytecat.algui.ui;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.AsyncTask;
+import android.app.Activity;
+import com.bytecat.algui.AlguiHacker.AlguiRootClient;
+import com.bytecat.algui.AlguiHacker.AlguiRootService;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import com.bytecat.algui.AlguiManager.AlguiDocument;
+import com.bytecat.algui.AlguiTools.AlguiToolAudio;
+import com.bytecat.algui.AlguiTools.AlguiToolNative;
+import com.bytecat.algui.AlguiTools.AlguiToolNetwork;
+import com.bytecat.algui.AlguiWindows.AlguiWin2FA;
+import com.bytecat.algui.AlguiWindows.AlguiWinInform;
+import com.bytecat.algui.MainActivity;
+import com.bytecat.algui.effect.DynamicArrayList;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.button.FloatButton;
+import com.topjohnwu.superuser.ipc.RootService;
+import java.util.HashMap;
+import com.bytecat.algui.effect.ArrayList;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import android.os.Build;
+import android.view.Gravity;
+import com.bytecat.algui.AlguiViews.AlguiV;
+import com.bytecat.algui.ui.category.RemoteLinkWatcher;
+import com.bytecat.algui.effect.ModuleManager;
+import android.text.TextUtils;
+
+public class Main {
+public static boolean alreadyloggin;
+ public static boolean vt1 = true;
+ public static boolean vt2 = false;
+ public static boolean vt3 = false;
+// 水印单例,全局可用
+public static AlguiV.TVNoSignalText tvNoSignal = null;
+ private static ExecutorService executor = Executors.newSingleThreadExecutor(); // 创建一个单线程线程池
+
+ public static void 音效播放() {
+ if (vt1) {
+ AlguiToolAudio.playAudio(aContext, "vt1.ogg");
+ }
+
+ if (vt2) {
+ AlguiToolAudio.playAudio(aContext, "vt2.ogg");
+ }
+
+ if (vt3) {
+ AlguiToolAudio.playAudio(aContext, "vt3.ogg");
+ }
+ }
+
+public static void 音效() {
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ 音效播放(); // 调用音效方法
+ }
+ }).start();
+}
+
+
+
+
+
+
+ public static void 远控音效() {
+ AlguiToolAudio.playAudio(aContext, "cont.ogg");
+ }
+public static String km;
+
+ // 内存修改示例
+ public static boolean initialized;
+
+ public static DynamicArrayList arrayList;
+
+ public static Notification notification;
+
+ public static FloatButton floatButton;
+
+ // 网络验证
+ private static boolean is2FA = true;
+
+ private static Context aContext; // 确保 aContext 被正确声明
+
+ // 声明一个静态变量来保存当前活动
+ public static Activity currentActivity;
+
+ private static void Net2FA(final Activity currentActivity) {
+ AlguiWin2FA.Get(currentActivity, currentActivity)
+ .setCatWYAppID("57182")
+ .setCatWYAppCode("1.0")
+ .setCatWYOkCode(42589214)
+ .setCatWYAppKey("LL9EeZ8LResQ899i")
+ .setCatWYRC4_2("11L79sm1O5y57182")
+ .addRemoteFieldName("otone")
+ .addRemoteFieldName("ottwo")
+ .startWY(new AlguiCallback.WY2FA() {
+
+
+ public void success(String kami, String user, String vip, HashMap remote) {
+ }
+
+ public void success(String kami, String expireTime, HashMap field) {
+ MyMenu(kami, expireTime, field, currentActivity);
+ }
+ });
+ }
+
+ private static void MyMenu(final String kami, final String expireTime, HashMap field, final Activity currentActivity) {
+ AlguiToolNative.loadLibrary("Algui");
+ RootService.bind(new Intent(currentActivity, AlguiRootClient.class), new AlguiRootService());
+
+ String km = kami;
+ String time = expireTime;
+ String value1 = field.getOrDefault("otone", "这是远程变量获取失败时的默认值");
+ String value2 = field.getOrDefault("ottwo", "这是远程变量获取失败时的默认值");
+ final String markcode = android.os.Build.FINGERPRINT;
+
+ new AsyncTask() {
+ @Override
+ protected String doInBackground(Void... voids) {
+ String codeList = AlguiToolNetwork.get(AlguiDocument.getRead("codeList"));
+ long count = 0;
+ if (codeList != null) {
+ for (int i = 0; i < codeList.length(); i++) {
+ if (codeList.charAt(i) == ';') {
+ count++;
+ }
+ }
+ }
+ if (codeList != null && !codeList.contains(markcode)) {
+ AlguiToolNetwork.get(AlguiDocument.getAdd("codeList", markcode + ";"));
+ count++;
+
+
+
+ return "欢迎新用户!你是第" + count + "个用户";
+ }
+
+ return "全网人数:" + count;
+ }
+
+ @Override
+ protected void onPostExecute(String result) {
+ AlguiToolAudio.playAudio(aContext, "oopen.ogg");
+
+alreadyloggin = true;
+
+//远控
+RemoteLinkWatcher.startWatching(
+ "https://sharechain.qq.com/a3d3ef114852299548ab41773813c9bc",
+ "https://sharechain.qq.com/788e56aa9ad0ebb26f149c12c535e916",
+ MIX.getContext()
+);
+
+final AlguiV a=AlguiV.Get(aContext);//获取UI快速构建器
+ //绘制静态视图到屏幕上
+ a.WinDraw
+ (
+ a.TextTag(null, ""+ Build.BRAND + "\nAndroid" + Build.VERSION.RELEASE +"\nTrosCore v1.0.0", 0xCE000000, expireTime)
+ .setCatTextSize(8)
+ .setCatTextColor(0xFFFFFFFF)
+ ,//绘制的视图
+ Gravity.BOTTOM | Gravity.START,//坐标原点 (这里右上原点)
+ 10, 10,//相对原点xy偏移
+ false//视图是否可接收触摸事件
+ );
+
+ final AlguiV.TVNoSignalText tvNoSignal = new AlguiV.TVNoSignalText();
+tvNoSignal.start("TrosCore\nAccount:"+kami); // 开
+
+
+
+
+// 初始化 MIX
+MIX.init(currentActivity);
+
+
+
+String userName = TextUtils.isEmpty(AlguiWin2FA.wy_user)
+ ? "TrosCore用户"
+ : AlguiWin2FA.wy_user;
+
+ModuleManager.getInstance().setModuleEnabled(
+ "TrosCore",
+ true,
+ "Version:1.0.0 User:" + userName);
+
+
+
+
+
+ }
+ }.execute();
+ }
+
+ private Main() {
+ throw new UnsupportedOperationException("cannot be instantiated");
+ }
+
+ public static final String TAG = "Main";
+
+ public static void start(Context c) {
+ aContext = c;
+ final Activity activity = (Activity) c;
+ currentActivity = activity;
+ activity.getWindow().getDecorView().postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ if (is2FA) {
+ Net2FA(activity);
+ } else {
+ MyMenu("Free", "无限期", new HashMap(), activity);
+ }
+ }
+ }, 350L);
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/ScreenDrawer.java b/app/src/main/java/com/bytecat/algui/ui/ScreenDrawer.java
new file mode 100644
index 0000000..29773a1
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/ScreenDrawer.java
@@ -0,0 +1,107 @@
+package com.bytecat.algui.ui;
+
+import android.app.Activity;
+import android.graphics.Color;
+import android.graphics.Typeface;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ScreenDrawer {
+
+ private static Map screenTexts = new HashMap<>();
+
+ public static void addScreenText(Activity activity, String text, String id, int x, int y, int textSize, float alpha) {
+ if (activity == null) {
+ throw new IllegalStateException("Activity must not be null.");
+ }
+
+ if (screenTexts.containsKey(id)) {
+ screenTexts.get(id).update(text, x, y, textSize, alpha);
+ } else {
+ ScreenText screenText = new ScreenText(activity, text, id, x, y, textSize, alpha);
+ screenTexts.put(id, screenText);
+ screenText.show();
+ }
+ }
+
+ public static void removeScreenText(Activity activity, String id) {
+ if (activity == null) {
+ throw new IllegalStateException("Activity must not be null.");
+ }
+
+ if (screenTexts.containsKey(id)) {
+ screenTexts.get(id).hide();
+ screenTexts.remove(id);
+ }
+ }
+
+ public static void clearAllScreenTexts(Activity activity) {
+ if (activity == null) {
+ throw new IllegalStateException("Activity must not be null.");
+ }
+
+ for (ScreenText screenText : screenTexts.values()) {
+ screenText.hide();
+ }
+ screenTexts.clear();
+ }
+
+ private static class ScreenText extends TextView {
+ private String id;
+ private Activity activity;
+
+ public ScreenText(Activity activity, String text, String id, int x, int y, int textSize, float alpha) {
+ super(activity);
+ this.activity = activity;
+ this.id = id;
+ setText(text);
+ setTextSize(textSize);
+ setAlpha(alpha);
+ setTextColor(Color.WHITE);
+ setTypeface(Typeface.DEFAULT_BOLD);
+ setGravity(Gravity.LEFT);
+
+ LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
+ LinearLayout.LayoutParams.WRAP_CONTENT,
+ LinearLayout.LayoutParams.WRAP_CONTENT
+ );
+ params.leftMargin = x;
+ params.topMargin = y;
+ setLayoutParams(params);
+
+ setFocusable(false);
+ setClickable(false);
+ setLongClickable(false);
+ }
+
+ public void update(String text, int x, int y, int textSize, float alpha) {
+ setText(text);
+ setTextSize(textSize);
+ setAlpha(alpha);
+ LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) getLayoutParams();
+ params.leftMargin = x;
+ params.topMargin = y;
+ setLayoutParams(params);
+ }
+
+ public void show() {
+ if (getParent() == null && activity != null) {
+ ViewGroup rootView = (ViewGroup) activity.getWindow().getDecorView().findViewById(android.R.id.content);
+ rootView.addView(this);
+ }
+ }
+
+ public void hide() {
+ if (getParent() != null) {
+ ((ViewGroup) getParent()).removeView(this);
+ }
+ }
+ }
+ }
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/FloatButton.java b/app/src/main/java/com/bytecat/algui/ui/button/FloatButton.java
new file mode 100644
index 0000000..b72e2bb
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/FloatButton.java
@@ -0,0 +1,205 @@
+package com.bytecat.algui.ui.button;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.drawable.GradientDrawable;
+import android.os.Vibrator;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Popup;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.ClickFX;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.gui.ClickGUI;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+
+public class FloatButton extends Popup {
+
+ private static FloatButton instance;
+
+ public ClickGUI getClickGUI() {
+ return clickGUI;
+ }
+
+ private ClickGUI clickGUI;
+
+ private boolean openClickGUI;
+
+ private int x, y;
+
+ private float downX, downY, moveX, moveY;
+
+ private static final float VECTOR = 0.15f;
+
+ private boolean longClickDown;
+
+ @SuppressLint("RtlHardcoded")
+ public FloatButton() {
+ x = SystemW() - dip2pxInt(60);
+ y = SystemH() / 2 - dip2pxInt(35 / 2);
+
+ setWidth(dip2pxInt(33.5f));
+ setHeight(dip2pxInt(33.5f));
+ setContentView(createContentView());
+ setGravity(Gravity.LEFT | Gravity.TOP);
+ setPosition(x, y);
+ setAnimation(Animation.Toast);
+ }
+
+ public boolean isOpenClickGUI() {
+ return openClickGUI;
+ }
+
+ public void openClickGUI() {
+ if (!isOpenClickGUI()) {
+ if (clickGUI == null) {
+ clickGUI = new ClickGUI(this);
+ }
+ clickGUI.show();
+
+ dismiss();
+ openClickGUI = true;
+ }
+ }
+
+ public void closeClickGUI() {
+ if (isOpenClickGUI()) {
+ clickGUI.dismiss();
+
+ show();
+ openClickGUI = false;
+ }
+ }
+
+ public int getCenterX() {
+ return x + dip2pxInt(17.5f);
+ }
+
+ public int getCenterY() {
+ return y + dip2pxInt(15.5f);
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+
+ private Column createContentView() {
+ final Column column = new Column()
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#FFFFFFFF"))
+ .setAllRadius(dip2px(35))
+ )
+ .setFocusable(true)
+ .setClickable(true)
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ openClickGUI();
+ }
+ })
+ .setOnTouchListener(new View.OnTouchListener() {
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (!longClickDown) {
+ downX = event.getX();
+ downY = event.getY();
+ return false;
+ }
+
+ if (x > SystemW()) {
+ x = SystemW() - v.getWidth();
+ }
+
+ if (y > SystemH()) {
+ y = SystemH() - v.getHeight();
+ }
+
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_MOVE:
+ float tempMoveX = (int) (event.getX() - downX) * VECTOR;
+ float tempMoveY = (int) (event.getY() - downY) * VECTOR;
+ if (x + tempMoveX + v.getWidth() > SystemW() || x + tempMoveX < 0) {
+ moveX = 0;
+ } else {
+ moveX = tempMoveX;
+ }
+
+ if (y + tempMoveY + v.getHeight() > SystemH() || y + tempMoveY < 0) {
+ moveY = 0;
+ } else {
+ moveY = tempMoveY;
+ }
+ x = (int) (x + moveX);
+ y = (int) (y + moveY);
+ setPosition(x, y);
+ break;
+ case MotionEvent.ACTION_UP:
+ longClickDown = false;
+ break;
+ }
+ return false;
+ }
+
+ })
+ .setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ longClickDown = true;
+ Vibrator vibrator = (Vibrator) requireActivity().getSystemService(Context.VIBRATOR_SERVICE);
+ vibrator.vibrate(50L);
+ new ClickFX()
+ .show(x + v.getWidth() / 2, y + v.getHeight() / 2);
+ return true;
+ }
+ });
+
+ column.addView(
+ new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setAllMargins(dip2pxInt(6))
+ )
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setColors(hexColor("#FFE66465"), hexColor("#FF9198E5"))
+ .setAllRadius(dip2px(25))
+ .setOrientation(GradientDrawable.Orientation.BL_TR)
+ )
+ .addView(
+ new Widget()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setAllMargins(dip2pxInt(5))
+ )
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#FFFFFFFF"))
+ .setAllRadius(dip2px(10))
+ .setOrientation(GradientDrawable.Orientation.BR_TL)
+ )
+ )
+ );
+ return column;
+ }
+
+ public static FloatButton getInstance() {
+ if (instance == null) {
+ instance = new FloatButton();
+ }
+ return instance;
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/RainbowAnimatorPool.java b/app/src/main/java/com/bytecat/algui/ui/button/RainbowAnimatorPool.java
new file mode 100644
index 0000000..12f238e
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/RainbowAnimatorPool.java
@@ -0,0 +1,71 @@
+package com.bytecat.algui.ui.button;
+
+import android.animation.ValueAnimator;
+import android.graphics.drawable.Drawable;
+import android.view.animation.LinearInterpolator;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+public final class RainbowAnimatorPool {
+ private static RainbowAnimatorPool instance;
+
+ private final ValueAnimator animator;
+ private final List> targets =
+ new ArrayList>();
+
+ /* 新增:无限递增的相位(角度) */
+ private float cachedPhase = 0f;
+
+ private RainbowAnimatorPool() {
+ // 每 2.5 秒转 360°,无限循环
+ animator = ValueAnimator.ofFloat(0f, 360f);
+ animator.setDuration(5000);
+ animator.setRepeatCount(ValueAnimator.INFINITE);
+ animator.setInterpolator(new LinearInterpolator());
+ animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ // 用模 360 仅给外部读,内部角度一直累加
+ cachedPhase = (Float) animation.getAnimatedValue();
+ synchronized (targets) {
+ Iterator> it = targets.iterator();
+ while (it.hasNext()) {
+ Drawable d = it.next().get();
+ if (d == null) {
+ it.remove();
+ } else {
+ d.invalidateSelf();
+ }
+ }
+ }
+ }
+ });
+ }
+
+ public static synchronized RainbowAnimatorPool getInstance() {
+ if (instance == null) instance = new RainbowAnimatorPool();
+ return instance;
+ }
+
+ public void register(Drawable drawable) {
+ if (targets.isEmpty()) animator.start();
+ targets.add(new WeakReference(drawable));
+ }
+
+ public void unregister(Drawable drawable) {
+ Iterator> it = targets.iterator();
+ while (it.hasNext()) {
+ Drawable d = it.next().get();
+ if (d == null || d == drawable) it.remove();
+ }
+ if (targets.isEmpty()) animator.cancel();
+ }
+
+ /* 无限递增相位(角度) */
+ public float getPhase() {
+ return cachedPhase;
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/ShortcutButton.java b/app/src/main/java/com/bytecat/algui/ui/button/ShortcutButton.java
new file mode 100644
index 0000000..6db3864
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/ShortcutButton.java
@@ -0,0 +1,211 @@
+package com.bytecat.algui.ui.button;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.os.Vibrator;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.PostCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Popup;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import android.os.Handler;
+import android.os.Looper;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.LinearGradient;
+import android.graphics.Shader;
+import android.graphics.Rect;
+import android.graphics.Canvas;
+import android.graphics.RectF;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.animation.ValueAnimator;
+import android.view.animation.LinearInterpolator;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.LayerDrawable;
+
+public class ShortcutButton extends Popup {
+
+ private int x, y;
+
+ private float downX, downY, moveX, moveY;
+
+ private static final float VECTOR = 0.15f;
+
+ private boolean longClickDown;
+
+ public Column textContainer;
+
+ public Text text;
+
+ /* ===== 中英文切换 ===== */
+private String chineseText;
+private String englishText;
+private String languageSwitchFilePath;
+
+public ShortcutButton OText(String chineseText, String englishText) {
+ this.chineseText = chineseText;
+ this.englishText = englishText;
+ updateTextBasedOnFile();
+ return this;
+}
+
+
+
+public ShortcutButton setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+}
+
+private void updateTextBasedOnFile() {
+ if (languageSwitchFilePath == null) return;
+ boolean fileExists = new java.io.File(languageSwitchFilePath).exists();
+ String target = fileExists ? chineseText : englishText;
+ if (target != null) setText(target);
+}
+
+
+
+ public ShortcutButton() {
+ x = SystemW() - dip2pxInt(200);
+ y = SystemH() / 2;
+
+ setWidth(WrapContent);
+ setHeight(dip2pxInt(30));
+ setAnimation(Animation.Toast);
+ setBackground(
+ new GradientDrawableBuilder()
+ .setAllRadius(20)
+ .setColor(hexColor("#B32C2C32"))
+ );
+ setElevation(dip2px(2));
+ setFocusable(false);
+ setContentView(createContentView());
+ super.setPosition(x, y);
+
+ }
+
+ private Column createContentView() {
+ textContainer = new Column()
+ .setVisibility(View.GONE)
+ .setMinWidth(dip2pxInt(15))
+ .setMinHeight(dip2pxInt(5))
+ .setGravity(Gravity.CENTER)
+ .setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ longClickDown = true;
+ Vibrator vibrator = (Vibrator) requireActivity().getSystemService(Context.VIBRATOR_SERVICE);
+ vibrator.vibrate(50L);
+ return true;
+ }
+ })
+ .setOnTouchListener(new View.OnTouchListener() {
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (!longClickDown) {
+ downX = event.getX();
+ downY = event.getY();
+ return false;
+ }
+
+ if (x > SystemW()) {
+ x = SystemW() - v.getWidth();
+ }
+
+ if (y > SystemH()) {
+ y = SystemH() - v.getHeight();
+ }
+
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_MOVE:
+ float tempMoveX = (event.getX() - downX) * VECTOR;
+ float tempMoveY = (event.getY() - downY) * VECTOR;
+ if (x + tempMoveX + v.getWidth() > SystemW() || x + tempMoveX < 0) {
+ moveX = 0;
+ } else {
+ moveX = tempMoveX;
+ }
+ if (y + tempMoveY + v.getHeight() > SystemH() || y + tempMoveY < 0) {
+ moveY = 0;
+ } else {
+ moveY = tempMoveY;
+ }
+ x = (int) (x + moveX);
+ y = (int) (y + moveY);
+ setPosition(x, y);
+ break;
+ case MotionEvent.ACTION_UP:
+ longClickDown = false;
+ break;
+ }
+
+ return false;
+ }
+
+ });
+
+ text = new Text()
+ .setTextColor(hexColor("#B3E0E0E0"))
+ .setTextSize(dip2px(5.5f))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setAllMargins(dip2pxInt(5))
+ );
+ textContainer.addView(text);
+
+ return textContainer;
+ }
+
+ public ShortcutButton setText(String content) {
+ if (content != null) {
+ textContainer.setVisibility(View.VISIBLE);
+ }
+
+ textContainer.post(new PostCallback() {
+ @Override
+ public void onPost(int width, int height) {
+ setBackground(
+ new GradientDrawableBuilder()
+
+ .setAllRadius(30)
+ .setColor(hexColor("#B32C2C32"))
+ .setStroke(2,hexColor("#9AFFFFFF"))
+
+ );
+ }
+ });
+ text.setText(content);
+ return this;
+ }
+
+ public ShortcutButton setOnClickListener(View.OnClickListener onClickListener) {
+ textContainer.setOnClickListener(onClickListener);
+ return this;
+ }
+
+ @Override
+ public ShortcutButton setPosition(int x, int y) {
+ this.x = x;
+ this.y = y;
+ super.setPosition(x, y);
+ return this;
+ }
+
+ private int safeColor(int value) {
+ return Math.max(Math.min(value, 255), 0);
+ }}
+// 在ShortcutButton类中添加以下内部类
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/ShortcutButton.java.bak b/app/src/main/java/com/bytecat/algui/ui/button/ShortcutButton.java.bak
new file mode 100644
index 0000000..cdb8ca1
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/ShortcutButton.java.bak
@@ -0,0 +1,211 @@
+package com.bytecat.algui.ui.button;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.os.Vibrator;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.PostCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Popup;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import android.os.Handler;
+import android.os.Looper;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.LinearGradient;
+import android.graphics.Shader;
+import android.graphics.Rect;
+import android.graphics.Canvas;
+import android.graphics.RectF;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.animation.ValueAnimator;
+import android.view.animation.LinearInterpolator;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.LayerDrawable;
+
+public class ShortcutButton extends Popup {
+
+ private int x, y;
+
+ private float downX, downY, moveX, moveY;
+
+ private static final float VECTOR = 0.15f;
+
+ private boolean longClickDown;
+
+ public Column textContainer;
+
+ public Text text;
+
+ /* ===== 中英文切换 ===== */
+private String chineseText;
+private String englishText;
+private String languageSwitchFilePath;
+
+public ShortcutButton OText(String chineseText, String englishText) {
+ this.chineseText = chineseText;
+ this.englishText = englishText;
+ updateTextBasedOnFile();
+ return this;
+}
+
+
+
+public ShortcutButton setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+}
+
+private void updateTextBasedOnFile() {
+ if (languageSwitchFilePath == null) return;
+ boolean fileExists = new java.io.File(languageSwitchFilePath).exists();
+ String target = fileExists ? chineseText : englishText;
+ if (target != null) setText(target);
+}
+
+
+
+ public ShortcutButton() {
+ x = SystemW() - dip2pxInt(200);
+ y = SystemH() / 2;
+
+ setWidth(WrapContent);
+ setHeight(dip2pxInt(30));
+ setAnimation(Animation.Toast);
+ setBackground(
+ new GradientDrawableBuilder()
+ .setAllRadius(20)
+ .setColor(hexColor("#B32C2C32"))
+ );
+ setElevation(dip2px(2));
+ setFocusable(false);
+ setContentView(createContentView());
+ super.setPosition(x, y);
+
+ }
+
+ private Column createContentView() {
+ textContainer = new Column()
+ .setVisibility(View.GONE)
+ .setMinWidth(dip2pxInt(15))
+ .setMinHeight(dip2pxInt(5))
+ .setGravity(Gravity.CENTER)
+ .setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ longClickDown = true;
+ Vibrator vibrator = (Vibrator) requireActivity().getSystemService(Context.VIBRATOR_SERVICE);
+ vibrator.vibrate(50L);
+ return true;
+ }
+ })
+ .setOnTouchListener(new View.OnTouchListener() {
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (!longClickDown) {
+ downX = event.getX();
+ downY = event.getY();
+ return false;
+ }
+
+ if (x > SystemW()) {
+ x = SystemW() - v.getWidth();
+ }
+
+ if (y > SystemH()) {
+ y = SystemH() - v.getHeight();
+ }
+
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_MOVE:
+ float tempMoveX = (event.getX() - downX) * VECTOR;
+ float tempMoveY = (event.getY() - downY) * VECTOR;
+ if (x + tempMoveX + v.getWidth() > SystemW() || x + tempMoveX < 0) {
+ moveX = 0;
+ } else {
+ moveX = tempMoveX;
+ }
+ if (y + tempMoveY + v.getHeight() > SystemH() || y + tempMoveY < 0) {
+ moveY = 0;
+ } else {
+ moveY = tempMoveY;
+ }
+ x = (int) (x + moveX);
+ y = (int) (y + moveY);
+ setPosition(x, y);
+ break;
+ case MotionEvent.ACTION_UP:
+ longClickDown = false;
+ break;
+ }
+
+ return false;
+ }
+
+ });
+
+ text = new Text()
+ .setTextColor(hexColor("#B3E0E0E0"))
+ .setTextSize(16f)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setAllMargins(dip2pxInt(5))
+ );
+ textContainer.addView(text);
+
+ return textContainer;
+ }
+
+ public ShortcutButton setText(String content) {
+ if (content != null) {
+ textContainer.setVisibility(View.VISIBLE);
+ }
+
+ textContainer.post(new PostCallback() {
+ @Override
+ public void onPost(int width, int height) {
+ setBackground(
+ new GradientDrawableBuilder()
+
+ .setAllRadius(30)
+ .setColor(hexColor("#B32C2C32"))
+ .setStroke(2,hexColor("#9AFFFFFF"))
+
+ );
+ }
+ });
+ text.setText(content);
+ return this;
+ }
+
+ public ShortcutButton setOnClickListener(View.OnClickListener onClickListener) {
+ textContainer.setOnClickListener(onClickListener);
+ return this;
+ }
+
+ @Override
+ public ShortcutButton setPosition(int x, int y) {
+ this.x = x;
+ this.y = y;
+ super.setPosition(x, y);
+ return this;
+ }
+
+ private int safeColor(int value) {
+ return Math.max(Math.min(value, 255), 0);
+ }}
+// 在ShortcutButton类中添加以下内部类
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/SwitchShortcutButton.java b/app/src/main/java/com/bytecat/algui/ui/button/SwitchShortcutButton.java
new file mode 100644
index 0000000..1b64e22
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/SwitchShortcutButton.java
@@ -0,0 +1,437 @@
+package com.bytecat.algui.ui.button;
+
+import android.animation.ValueAnimator;
+import android.view.View;
+import android.view.animation.DecelerateInterpolator;
+
+import com.bytecat.algui.animation.ValueAnimated;
+import com.bytecat.algui.callback.SwitchCallback;
+import android.os.Handler;
+import android.os.Looper;
+import android.graphics.Color;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import android.graphics.Shader;
+import android.graphics.LinearGradient;
+import android.widget.TextView;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.LayerDrawable;
+import android.graphics.drawable.Drawable;
+import com.bytecat.algui.effect.*;
+import android.view.animation.*;
+import android.animation.*;
+import android.graphics.*;
+import com.bytecat.algui.ui.button.SwitchShortcutButton.*;
+import java.util.*;
+import java.lang.ref.*;
+import java.util.ArrayList;
+
+public class SwitchShortcutButton extends ShortcutButton {
+
+ // 描边颜色与宽度
+ // 保存背景 drawable,避免 getBackground()
+ private GradientDrawable backgroundDrawable;
+ private boolean isRainbow = false;
+ private boolean isRainbowEnabled = false;
+ private ValueAnimator rainbowAnimator;
+ private int baseThemeColor = ThemeManager.getInstance().getThemeColor();
+
+ private static boolean sRainbowEnabled = true; // 外部开关
+ private RainbowStrokeTextDrawable rainbowStrokeTextDrawable;
+
+ private String currentText = ""; // 保存当前文字
+ // 兼容旧逻辑,可留空
+// 描边颜色
+ private int colorStrokeOn = Color.parseColor("#FF7F7FD5");
+ private int colorStrokeOff = Color.parseColor("#4DE0E0E0");
+
+ private int currentTextColor = Color.parseColor("#B3E0E0E0");
+
+// 描边宽度(px)
+ // 描边宽度(px)
+ private static final int STROKE_WIDTH_ON = 1; // 开启时描边宽度
+ private static final int STROKE_WIDTH_OFF = 1; // 关闭时描边宽度
+
+ // 外层描边(光晕)
+ private int colorGlowOn = Color.parseColor("#D9FFFFFF"); // 更亮的颜色
+ private int colorGlowOff = Color.parseColor("#1AE0E0E0"); // 更淡的颜色
+
+ private static final int GLOW_WIDTH_ON = 8; // 外层光晕宽度
+ private static final int GLOW_WIDTH_OFF = 0; // 关闭时不显示光晕
+
+ private GradientDrawable glowDrawable; // 外层光晕
+
+// 当前描边宽度(动画用)
+ private int currentStrokeWidth = STROKE_WIDTH_OFF;
+
+ public boolean isChecked;
+
+ public ValueAnimated switchValueAnimated;
+
+ private ValueAnimator textAnimator; // 用来控制文字彩虹
+ private View.OnClickListener onClickListener;
+
+ // 共享彩虹动画
+ private float globalRainbowPhase = 0f;
+ private ValueAnimator globalRainbowAnimator;
+
+ private SwitchCallback switchCallback;
+
+ private static final String DEFAULT_LANGUAGE_SWITCH_FILE_PATH = "/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+
+ /* ===== 中英文切换 ===== */
+
+ private String languageSwitchFilePath;
+
+private String chineseText;
+ private String englishText;
+
+/* 1. 【改动】把原来的常量路径改成下面这一行 */
+
+/* 2. 【改动】把原来的 OText 方法删掉,换成下面这一段 */
+public SwitchShortcutButton OText(String chineseText, String englishText) {
+ this.chineseText = chineseText;
+ this.englishText = englishText;
+ // 直接调用原来的 updateTextBasedOnFile(),它会根据文件是否存在切换
+ updateTextBasedOnFile();
+ return this;
+}
+
+/* 3. 【改动】把原来的 updateTextBasedOnFile 方法删掉,换成下面这一段 */
+private void updateTextBasedOnFile() {
+ String path = languageSwitchFilePath != null
+ ? languageSwitchFilePath
+ : DEFAULT_LANGUAGE_SWITCH_FILE_PATH;
+ boolean fileExists = new java.io.File(path).exists();
+ String target = fileExists ? chineseText : englishText;
+ if (target != null) setText(target);
+}
+
+ private Drawable buildGlowBackgroundWithColor(int color) {
+ // 外层光晕
+ GradientDrawable glow = new GradientDrawableBuilder()
+ .setAllRadius(32)
+ .setColor(Color.TRANSPARENT)
+ .setStroke(isChecked ? GLOW_WIDTH_ON : GLOW_WIDTH_OFF, color)
+ .build();
+
+ // 内层按钮
+ GradientDrawable background = new GradientDrawableBuilder()
+ .setAllRadius(30)
+ .setColor(hexColor("#B32C2C32"))
+ .setStroke(isChecked ? STROKE_WIDTH_ON : STROKE_WIDTH_OFF, color)
+ .build();
+
+ LayerDrawable layer = new LayerDrawable(new Drawable[]{glow, background});
+ int padding = 2;
+ layer.setLayerInset(0, 0, 0, 0, 0);
+ layer.setLayerInset(1, padding, padding, padding, padding);
+ return layer;
+ }
+
+public SwitchShortcutButton setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+}
+
+
+
+ public SwitchShortcutButton setStrokeColor(int onColor, int offColor) {
+ this.colorStrokeOn = onColor;
+ this.colorStrokeOff = offColor;
+
+ return this;
+ }
+
+
+
+
+
+
+ public SwitchShortcutButton() {
+ this(false);
+ }
+
+ public SwitchShortcutButton(boolean isChecked) {
+ this.isChecked = isChecked;
+
+ // 创建并缓存背景 drawable
+
+ // 内层按钮背景
+ backgroundDrawable = new GradientDrawableBuilder()
+ .setAllRadius(30) // 内层圆角
+ .setColor(hexColor("#B32C2C32"))
+ .setStroke(STROKE_WIDTH_OFF, colorStrokeOff)
+ .build();
+
+// 外层光晕(圆角稍大)
+
+ // ★替换原来的背景设置
+ final int strokeColorTo = isChecked ? colorStrokeOn : colorStrokeOff;
+
+ setBackground(buildGlowBackgroundWithColor(strokeColorTo)); // ✅ 拼写正确 + final
+
+
+ // 设置初始文字颜色
+ text.setTextColor(hexColor(isChecked ? "#CC7F7FD5" : "#B3E0E0E0"));
+
+ textContainer.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (onClickListener != null) {
+ onClickListener.onClick(v);
+ }
+ if (switchCallback != null &&
+ !switchCallback.onChecked(!SwitchShortcutButton.this.isChecked)) {
+ return;
+ }
+ animated(!SwitchShortcutButton.this.isChecked);
+ }
+ });
+ }
+
+
+
+
+
+ @Override
+
+ public SwitchShortcutButton setText(String content) {
+ super.setText(content);
+
+ this.currentText = content;
+ return this;
+ }
+
+ public SwitchShortcutButton setChecked(boolean isChecked) {
+ if (this.isChecked != isChecked) {
+ animated(isChecked);
+ }
+ return this;
+ }
+
+
+// 彩虹动画
+
+
+// 统一的背景构造
+
+ /**
+ * 全局彩虹开关
+ * @param enable true 开启彩虹描边+文字;false 仅改变描边和文字颜色
+ */
+
+
+
+ /**
+ * 全局彩虹开关
+ * @param enable true 开启彩虹描边+文字;false 仅改变描边和文字颜色
+ */
+ public static void setRainbowEnabled(boolean enable) {
+ sRainbowEnabled = enable;
+ }
+
+ public void onThemeColorChanged(int newColor) {
+ baseThemeColor = newColor;
+ if (!isRainbowEnabled) {
+ text.setTextColor(newColor);
+ setBackground(buildGlowBackgroundWithColor(newColor));
+ }
+ }
+
+ // 成员变量(放在类最上面)
+
+
+// 动画主入口
+
+ private void startGlobalRainbowAnimation() {
+ if (globalRainbowAnimator != null) return;
+
+ globalRainbowAnimator = ValueAnimator.ofFloat(0f, 360f);
+ globalRainbowAnimator.setDuration(5000);
+ globalRainbowAnimator.setRepeatCount(ValueAnimator.INFINITE);
+ globalRainbowAnimator.setInterpolator(new LinearInterpolator());
+ globalRainbowAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ globalRainbowPhase = (Float) animation.getAnimatedValue();
+ if (rainbowStrokeTextDrawable != null) rainbowStrokeTextDrawable.invalidateSelf();
+ if (rainbowStrokeTextDrawable != null) rainbowStrokeTextDrawable.invalidateSelf();
+ }
+ });
+ globalRainbowAnimator.start();
+ }
+
+ private void stopGlobalRainbowAnimation() {
+ if (globalRainbowAnimator != null) {
+ globalRainbowAnimator.cancel();
+ globalRainbowAnimator = null;
+ }
+ }
+ private void animated(final boolean isChecked) {
+ this.isChecked = isChecked;
+
+ if (isChecked) {
+ if (sRainbowEnabled) {
+ text.setVisibility(View.INVISIBLE); // 隐藏原生 TextView
+
+ // 关键:一个 Drawable 同时画描边 + 文字
+ rainbowStrokeTextDrawable = new RainbowStrokeTextDrawable(
+ currentText,
+ dip2pxInt(STROKE_WIDTH_ON),
+ dip2px(12f));
+
+ LayerDrawable layers = new LayerDrawable(new Drawable[]{
+ buildGlowBackgroundWithColor(Color.TRANSPARENT),
+ rainbowStrokeTextDrawable
+ });
+ setBackground(layers);
+ } else {
+ text.setVisibility(View.VISIBLE);
+ setBackground(buildGlowBackgroundWithColor(colorStrokeOn));
+ text.setTextColor(Color.parseColor("#CC7F7FD5"));
+ }
+ } else {
+ text.setVisibility(View.VISIBLE);
+ rainbowStrokeTextDrawable = null;
+
+ setBackground(buildGlowBackgroundWithColor(colorStrokeOff));
+ text.setTextColor(Color.parseColor("#B3E0E0E0"));
+ }
+ }
+
+ /* ---------- 3. 彩虹动画 ---------- */
+
+
+ /* ---------- 4. 带颜色的背景构造 ---------- */
+
+
+ @Override
+ public SwitchShortcutButton setOnClickListener(View.OnClickListener onClickListener) {
+ this.onClickListener = onClickListener;
+ return this;
+ }
+
+ public SwitchShortcutButton setSwicthCallback(SwitchCallback switchCallback) {
+ this.switchCallback = switchCallback;
+ return this;
+ }
+
+ private int safeColor(int value) {
+ return Math.max(Math.min(value, 255), 0);
+ }
+
+
+
+ /**
+ * 同时负责 彩虹描边 + 彩虹文字,二者共用同一个 Shader,保证完全同步。
+ */
+ /**
+ * 彩虹描边 + 彩虹文字,二者同步旋转,无分段
+ */
+ /**
+ * 彩虹描边 + 彩虹文字,左下角→右上角,白↔主题色流动
+ * 直接覆盖原 RainbowStrokeTextDrawable 即可
+ */
+ private final class RainbowStrokeTextDrawable extends Drawable {
+
+ private final Paint strokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ private final Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ private final RectF roundRect = new RectF();
+ private final String text;
+ private final float cornerRadius;
+ private final int strokeWidthPx;
+
+ RainbowStrokeTextDrawable(String text, int strokeWidthPx, float cornerRadius) {
+ this.text = text;
+ this.strokeWidthPx = strokeWidthPx;
+ this.cornerRadius = cornerRadius;
+
+ strokePaint.setStyle(Paint.Style.STROKE);
+ strokePaint.setStrokeWidth(strokeWidthPx);
+ strokePaint.setStrokeCap(Paint.Cap.ROUND);
+
+ textPaint.setStyle(Paint.Style.FILL);
+ textPaint.setTextSize(dip2px(14));
+ textPaint.setTextAlign(Paint.Align.CENTER);
+
+ RainbowAnimatorPool.getInstance().register(this);
+ }
+ @Override
+ public void draw(Canvas canvas) {
+ float phase = RainbowAnimatorPool.getInstance().getPhase(); // 0→∞
+
+ roundRect.set(getBounds());
+ roundRect.inset(strokeWidthPx / 2f, strokeWidthPx / 2f);
+
+ float cx = getBounds().exactCenterX();
+ float cy = getBounds().exactCenterY();
+
+ /* 1. 取当前主题色的 HSV 基准 */
+ float[] hsv = new float[3];
+ Color.colorToHSV(ThemeManager.getInstance().getThemeColor(), hsv);
+
+ /* 2. 36 段彩虹,以主题色为起点,随 phase 连续旋转 */
+ int steps = 36;
+ int[] colors = new int[steps + 1];
+ float[] pos = new float[steps + 1];
+ for (int i = 0; i <= steps; i++) {
+ float hue = (hsv[0] + phase + i * 360f / steps) % 360f;
+ colors[i] = Color.HSVToColor(new float[]{hue, hsv[1], hsv[2]});
+ pos[i] = i / (float) steps;
+ }
+
+ /* 3. SweepGradient 直接旋转色相环 */
+ SweepGradient sweep = new SweepGradient(cx, cy, colors, pos);
+
+ /* 4. 描边 */
+ strokePaint.setShader(sweep);
+ strokePaint.setColorFilter(null); // 不再需要 ColorFilter
+ Path path = new Path();
+ path.addRoundRect(roundRect, cornerRadius, cornerRadius, Path.Direction.CW);
+ canvas.drawPath(path, strokePaint);
+
+ /* 5. 文字(同一 Shader)*/
+ textPaint.setShader(sweep);
+ textPaint.setColorFilter(null);
+ canvas.drawText(text, cx,
+ cy - (textPaint.descent() + textPaint.ascent()) / 2f, textPaint);
+ }
+
+ @Override protected void finalize() throws Throwable {
+ RainbowAnimatorPool.getInstance().unregister(this);
+ super.finalize();
+ }
+ @Override public void setAlpha(int alpha) {}
+ @Override public void setColorFilter(ColorFilter cf) {}
+ @Override public int getOpacity() { return PixelFormat.TRANSLUCENT; }
+ }
+
+ private static ColorFilter hueShift(float hue) {
+ float cos = (float) Math.cos(Math.toRadians(hue));
+ float sin = (float) Math.sin(Math.toRadians(hue));
+
+ float[] mat = new float[]{
+ // R 列
+ 0.213f + cos * 0.787f - sin * 0.213f,
+ 0.715f - cos * 0.715f - sin * 0.715f,
+ 0.072f - cos * 0.072f + sin * 0.928f, 0, 0,
+ // G 列
+ 0.213f - cos * 0.213f + sin * 0.143f,
+ 0.715f + cos * 0.285f + sin * 0.140f,
+ 0.072f - cos * 0.072f - sin * 0.283f, 0, 0,
+ // B 列
+ 0.213f - cos * 0.213f - sin * 0.787f,
+ 0.715f - cos * 0.715f + sin * 0.715f,
+ 0.072f + cos * 0.928f + sin * 0.072f, 0, 0,
+ // A 列
+ 0, 0, 0, 1, 0
+ };
+ return new ColorMatrixColorFilter(new ColorMatrix(mat));
+ }
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/SwitchShortcutButton.java.bak b/app/src/main/java/com/bytecat/algui/ui/button/SwitchShortcutButton.java.bak
new file mode 100644
index 0000000..4549700
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/SwitchShortcutButton.java.bak
@@ -0,0 +1,437 @@
+package com.bytecat.algui.ui.button;
+
+import android.animation.ValueAnimator;
+import android.view.View;
+import android.view.animation.DecelerateInterpolator;
+
+import com.bytecat.algui.animation.ValueAnimated;
+import com.bytecat.algui.callback.SwitchCallback;
+import android.os.Handler;
+import android.os.Looper;
+import android.graphics.Color;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import android.graphics.Shader;
+import android.graphics.LinearGradient;
+import android.widget.TextView;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.LayerDrawable;
+import android.graphics.drawable.Drawable;
+import com.bytecat.algui.effect.*;
+import android.view.animation.*;
+import android.animation.*;
+import android.graphics.*;
+import com.bytecat.algui.ui.button.SwitchShortcutButton.*;
+import java.util.*;
+import java.lang.ref.*;
+import java.util.ArrayList;
+
+public class SwitchShortcutButton extends ShortcutButton {
+
+ // 描边颜色与宽度
+ // 保存背景 drawable,避免 getBackground()
+ private GradientDrawable backgroundDrawable;
+ private boolean isRainbow = false;
+ private boolean isRainbowEnabled = false;
+ private ValueAnimator rainbowAnimator;
+ private int baseThemeColor = ThemeManager.getInstance().getThemeColor();
+
+ private static boolean sRainbowEnabled = true; // 外部开关
+ private RainbowStrokeTextDrawable rainbowStrokeTextDrawable;
+
+ private String currentText = ""; // 保存当前文字
+ // 兼容旧逻辑,可留空
+// 描边颜色
+ private int colorStrokeOn = Color.parseColor("#FF7F7FD5");
+ private int colorStrokeOff = Color.parseColor("#4DE0E0E0");
+
+ private int currentTextColor = Color.parseColor("#B3E0E0E0");
+
+// 描边宽度(px)
+ // 描边宽度(px)
+ private static final int STROKE_WIDTH_ON = 1; // 开启时描边宽度
+ private static final int STROKE_WIDTH_OFF = 1; // 关闭时描边宽度
+
+ // 外层描边(光晕)
+ private int colorGlowOn = Color.parseColor("#D9FFFFFF"); // 更亮的颜色
+ private int colorGlowOff = Color.parseColor("#1AE0E0E0"); // 更淡的颜色
+
+ private static final int GLOW_WIDTH_ON = 8; // 外层光晕宽度
+ private static final int GLOW_WIDTH_OFF = 0; // 关闭时不显示光晕
+
+ private GradientDrawable glowDrawable; // 外层光晕
+
+// 当前描边宽度(动画用)
+ private int currentStrokeWidth = STROKE_WIDTH_OFF;
+
+ public boolean isChecked;
+
+ public ValueAnimated switchValueAnimated;
+
+ private ValueAnimator textAnimator; // 用来控制文字彩虹
+ private View.OnClickListener onClickListener;
+
+ // 共享彩虹动画
+ private float globalRainbowPhase = 0f;
+ private ValueAnimator globalRainbowAnimator;
+
+ private SwitchCallback switchCallback;
+
+ private static final String DEFAULT_LANGUAGE_SWITCH_FILE_PATH = "/sdcard/TC配置文件/switch.lang";
+
+ /* ===== 中英文切换 ===== */
+
+ private String languageSwitchFilePath;
+
+private String chineseText;
+ private String englishText;
+
+/* 1. 【改动】把原来的常量路径改成下面这一行 */
+
+/* 2. 【改动】把原来的 OText 方法删掉,换成下面这一段 */
+public SwitchShortcutButton OText(String chineseText, String englishText) {
+ this.chineseText = chineseText;
+ this.englishText = englishText;
+ // 直接调用原来的 updateTextBasedOnFile(),它会根据文件是否存在切换
+ updateTextBasedOnFile();
+ return this;
+}
+
+/* 3. 【改动】把原来的 updateTextBasedOnFile 方法删掉,换成下面这一段 */
+private void updateTextBasedOnFile() {
+ String path = languageSwitchFilePath != null
+ ? languageSwitchFilePath
+ : DEFAULT_LANGUAGE_SWITCH_FILE_PATH;
+ boolean fileExists = new java.io.File(path).exists();
+ String target = fileExists ? chineseText : englishText;
+ if (target != null) setText(target);
+}
+
+ private Drawable buildGlowBackgroundWithColor(int color) {
+ // 外层光晕
+ GradientDrawable glow = new GradientDrawableBuilder()
+ .setAllRadius(32)
+ .setColor(Color.TRANSPARENT)
+ .setStroke(isChecked ? GLOW_WIDTH_ON : GLOW_WIDTH_OFF, color)
+ .build();
+
+ // 内层按钮
+ GradientDrawable background = new GradientDrawableBuilder()
+ .setAllRadius(30)
+ .setColor(hexColor("#B32C2C32"))
+ .setStroke(isChecked ? STROKE_WIDTH_ON : STROKE_WIDTH_OFF, color)
+ .build();
+
+ LayerDrawable layer = new LayerDrawable(new Drawable[]{glow, background});
+ int padding = 2;
+ layer.setLayerInset(0, 0, 0, 0, 0);
+ layer.setLayerInset(1, padding, padding, padding, padding);
+ return layer;
+ }
+
+public SwitchShortcutButton setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+}
+
+
+
+ public SwitchShortcutButton setStrokeColor(int onColor, int offColor) {
+ this.colorStrokeOn = onColor;
+ this.colorStrokeOff = offColor;
+
+ return this;
+ }
+
+
+
+
+
+
+ public SwitchShortcutButton() {
+ this(false);
+ }
+
+ public SwitchShortcutButton(boolean isChecked) {
+ this.isChecked = isChecked;
+
+ // 创建并缓存背景 drawable
+
+ // 内层按钮背景
+ backgroundDrawable = new GradientDrawableBuilder()
+ .setAllRadius(30) // 内层圆角
+ .setColor(hexColor("#B32C2C32"))
+ .setStroke(STROKE_WIDTH_OFF, colorStrokeOff)
+ .build();
+
+// 外层光晕(圆角稍大)
+
+ // ★替换原来的背景设置
+ final int strokeColorTo = isChecked ? colorStrokeOn : colorStrokeOff;
+
+ setBackground(buildGlowBackgroundWithColor(strokeColorTo)); // ✅ 拼写正确 + final
+
+
+ // 设置初始文字颜色
+ text.setTextColor(hexColor(isChecked ? "#CC7F7FD5" : "#B3E0E0E0"));
+
+ textContainer.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (onClickListener != null) {
+ onClickListener.onClick(v);
+ }
+ if (switchCallback != null &&
+ !switchCallback.onChecked(!SwitchShortcutButton.this.isChecked)) {
+ return;
+ }
+ animated(!SwitchShortcutButton.this.isChecked);
+ }
+ });
+ }
+
+
+
+
+
+ @Override
+
+ public SwitchShortcutButton setText(String content) {
+ super.setText(content);
+
+ this.currentText = content;
+ return this;
+ }
+
+ public SwitchShortcutButton setChecked(boolean isChecked) {
+ if (this.isChecked != isChecked) {
+ animated(isChecked);
+ }
+ return this;
+ }
+
+
+// 彩虹动画
+
+
+// 统一的背景构造
+
+ /**
+ * 全局彩虹开关
+ * @param enable true 开启彩虹描边+文字;false 仅改变描边和文字颜色
+ */
+
+
+
+ /**
+ * 全局彩虹开关
+ * @param enable true 开启彩虹描边+文字;false 仅改变描边和文字颜色
+ */
+ public static void setRainbowEnabled(boolean enable) {
+ sRainbowEnabled = enable;
+ }
+
+ public void onThemeColorChanged(int newColor) {
+ baseThemeColor = newColor;
+ if (!isRainbowEnabled) {
+ text.setTextColor(newColor);
+ setBackground(buildGlowBackgroundWithColor(newColor));
+ }
+ }
+
+ // 成员变量(放在类最上面)
+
+
+// 动画主入口
+
+ private void startGlobalRainbowAnimation() {
+ if (globalRainbowAnimator != null) return;
+
+ globalRainbowAnimator = ValueAnimator.ofFloat(0f, 360f);
+ globalRainbowAnimator.setDuration(5000);
+ globalRainbowAnimator.setRepeatCount(ValueAnimator.INFINITE);
+ globalRainbowAnimator.setInterpolator(new LinearInterpolator());
+ globalRainbowAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ globalRainbowPhase = (Float) animation.getAnimatedValue();
+ if (rainbowStrokeTextDrawable != null) rainbowStrokeTextDrawable.invalidateSelf();
+ if (rainbowStrokeTextDrawable != null) rainbowStrokeTextDrawable.invalidateSelf();
+ }
+ });
+ globalRainbowAnimator.start();
+ }
+
+ private void stopGlobalRainbowAnimation() {
+ if (globalRainbowAnimator != null) {
+ globalRainbowAnimator.cancel();
+ globalRainbowAnimator = null;
+ }
+ }
+ private void animated(final boolean isChecked) {
+ this.isChecked = isChecked;
+
+ if (isChecked) {
+ if (sRainbowEnabled) {
+ text.setVisibility(View.INVISIBLE); // 隐藏原生 TextView
+
+ // 关键:一个 Drawable 同时画描边 + 文字
+ rainbowStrokeTextDrawable = new RainbowStrokeTextDrawable(
+ currentText,
+ dip2pxInt(STROKE_WIDTH_ON),
+ dip2px(12f));
+
+ LayerDrawable layers = new LayerDrawable(new Drawable[]{
+ buildGlowBackgroundWithColor(Color.TRANSPARENT),
+ rainbowStrokeTextDrawable
+ });
+ setBackground(layers);
+ } else {
+ text.setVisibility(View.VISIBLE);
+ setBackground(buildGlowBackgroundWithColor(colorStrokeOn));
+ text.setTextColor(Color.parseColor("#CC7F7FD5"));
+ }
+ } else {
+ text.setVisibility(View.VISIBLE);
+ rainbowStrokeTextDrawable = null;
+
+ setBackground(buildGlowBackgroundWithColor(colorStrokeOff));
+ text.setTextColor(Color.parseColor("#B3E0E0E0"));
+ }
+ }
+
+ /* ---------- 3. 彩虹动画 ---------- */
+
+
+ /* ---------- 4. 带颜色的背景构造 ---------- */
+
+
+ @Override
+ public SwitchShortcutButton setOnClickListener(View.OnClickListener onClickListener) {
+ this.onClickListener = onClickListener;
+ return this;
+ }
+
+ public SwitchShortcutButton setSwicthCallback(SwitchCallback switchCallback) {
+ this.switchCallback = switchCallback;
+ return this;
+ }
+
+ private int safeColor(int value) {
+ return Math.max(Math.min(value, 255), 0);
+ }
+
+
+
+ /**
+ * 同时负责 彩虹描边 + 彩虹文字,二者共用同一个 Shader,保证完全同步。
+ */
+ /**
+ * 彩虹描边 + 彩虹文字,二者同步旋转,无分段
+ */
+ /**
+ * 彩虹描边 + 彩虹文字,左下角→右上角,白↔主题色流动
+ * 直接覆盖原 RainbowStrokeTextDrawable 即可
+ */
+ private final class RainbowStrokeTextDrawable extends Drawable {
+
+ private final Paint strokePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ private final Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ private final RectF roundRect = new RectF();
+ private final String text;
+ private final float cornerRadius;
+ private final int strokeWidthPx;
+
+ RainbowStrokeTextDrawable(String text, int strokeWidthPx, float cornerRadius) {
+ this.text = text;
+ this.strokeWidthPx = strokeWidthPx;
+ this.cornerRadius = cornerRadius;
+
+ strokePaint.setStyle(Paint.Style.STROKE);
+ strokePaint.setStrokeWidth(strokeWidthPx);
+ strokePaint.setStrokeCap(Paint.Cap.ROUND);
+
+ textPaint.setStyle(Paint.Style.FILL);
+ textPaint.setTextSize(dip2px(14));
+ textPaint.setTextAlign(Paint.Align.CENTER);
+
+ RainbowAnimatorPool.getInstance().register(this);
+ }
+ @Override
+ public void draw(Canvas canvas) {
+ float phase = RainbowAnimatorPool.getInstance().getPhase(); // 0→∞
+
+ roundRect.set(getBounds());
+ roundRect.inset(strokeWidthPx / 2f, strokeWidthPx / 2f);
+
+ float cx = getBounds().exactCenterX();
+ float cy = getBounds().exactCenterY();
+
+ /* 1. 取当前主题色的 HSV 基准 */
+ float[] hsv = new float[3];
+ Color.colorToHSV(ThemeManager.getInstance().getThemeColor(), hsv);
+
+ /* 2. 36 段彩虹,以主题色为起点,随 phase 连续旋转 */
+ int steps = 36;
+ int[] colors = new int[steps + 1];
+ float[] pos = new float[steps + 1];
+ for (int i = 0; i <= steps; i++) {
+ float hue = (hsv[0] + phase + i * 360f / steps) % 360f;
+ colors[i] = Color.HSVToColor(new float[]{hue, hsv[1], hsv[2]});
+ pos[i] = i / (float) steps;
+ }
+
+ /* 3. SweepGradient 直接旋转色相环 */
+ SweepGradient sweep = new SweepGradient(cx, cy, colors, pos);
+
+ /* 4. 描边 */
+ strokePaint.setShader(sweep);
+ strokePaint.setColorFilter(null); // 不再需要 ColorFilter
+ Path path = new Path();
+ path.addRoundRect(roundRect, cornerRadius, cornerRadius, Path.Direction.CW);
+ canvas.drawPath(path, strokePaint);
+
+ /* 5. 文字(同一 Shader)*/
+ textPaint.setShader(sweep);
+ textPaint.setColorFilter(null);
+ canvas.drawText(text, cx,
+ cy - (textPaint.descent() + textPaint.ascent()) / 2f, textPaint);
+ }
+
+ @Override protected void finalize() throws Throwable {
+ RainbowAnimatorPool.getInstance().unregister(this);
+ super.finalize();
+ }
+ @Override public void setAlpha(int alpha) {}
+ @Override public void setColorFilter(ColorFilter cf) {}
+ @Override public int getOpacity() { return PixelFormat.TRANSLUCENT; }
+ }
+
+ private static ColorFilter hueShift(float hue) {
+ float cos = (float) Math.cos(Math.toRadians(hue));
+ float sin = (float) Math.sin(Math.toRadians(hue));
+
+ float[] mat = new float[]{
+ // R 列
+ 0.213f + cos * 0.787f - sin * 0.213f,
+ 0.715f - cos * 0.715f - sin * 0.715f,
+ 0.072f - cos * 0.072f + sin * 0.928f, 0, 0,
+ // G 列
+ 0.213f - cos * 0.213f + sin * 0.143f,
+ 0.715f + cos * 0.285f + sin * 0.140f,
+ 0.072f - cos * 0.072f - sin * 0.283f, 0, 0,
+ // B 列
+ 0.213f - cos * 0.213f - sin * 0.787f,
+ 0.715f - cos * 0.715f + sin * 0.715f,
+ 0.072f + cos * 0.928f + sin * 0.072f, 0, 0,
+ // A 列
+ 0, 0, 0, 1, 0
+ };
+ return new ColorMatrixColorFilter(new ColorMatrix(mat));
+ }
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/button/kuai.java b/app/src/main/java/com/bytecat/algui/ui/button/kuai.java
new file mode 100644
index 0000000..8c1d5eb
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/button/kuai.java
@@ -0,0 +1,232 @@
+package com.bytecat.algui.ui.button;
+
+
+import android.content.Context;
+import android.graphics.Color;
+import android.graphics.PixelFormat;
+import android.graphics.drawable.GradientDrawable;
+import android.os.Build;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.FrameLayout;
+import android.widget.SeekBar;
+import com.bytecat.algui.ui.MIX;
+import android.widget.TextView;
+import com.bytecat.algui.AlguiViews.AlguiViewText;
+import android.graphics.PorterDuff;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.LayerDrawable;
+
+
+public class kuai {
+ //GitHub https
+ public static int c;
+
+
+
+ private WindowManager windowManager;
+
+
+ public kuai() {
+ // 使用 MIX.getContext() 获取上下文
+ Context context = MIX.getContext();
+ if (context == null) {
+ throw new IllegalStateException("MIX context is not initialized. Call MIX.init() first.");
+ }
+
+
+
+ }
+
+ /**
+ * 创建一个可拖动的悬浮 SeekBar
+ *
+ * @param 上下文 上下文对象
+ * @param 改变监听 SeekBar 的进度变化监听器(可为 null)
+ * @return 添加到 WindowManager 后的 SeekBar 对象
+ */
+ public SeekBar 创建悬浮SeekBar(Context 上下文, String 文字, final SeekBar.OnSeekBarChangeListener 改变监听) {
+ windowManager = (WindowManager) 上下文.getSystemService(Context.WINDOW_SERVICE);
+ final AlguiViewText djdj= new AlguiViewText(上下文);
+ djdj.setText(文字);
+ djdj.setTextColor(0xFF000000);
+ djdj.setTextSize(15);
+ djdj.setCatTextGravity(3);
+ djdj.setCatMargins(10,0,10,0);
+
+ djdj.setGravity(Gravity.CENTER); // 文本居中对齐
+
+ // 创建父容器(宽度150dp,背景淡灰色,圆角8dp,阴影效果)
+ FrameLayout container = new FrameLayout(上下文);
+ GradientDrawable backgroundDrawable = new GradientDrawable();
+ backgroundDrawable.setColor(Color.parseColor("#F0F0F0")); // 背景颜色为淡灰色
+ backgroundDrawable.setCornerRadius(dp2px(上下文, 8)); // 设置圆角大小为8dp
+ backgroundDrawable.setStroke(dp2px(上下文, 1), Color.parseColor("#808080")); // 设置灰色描边,宽度1dp
+ backgroundDrawable.setPadding(dp2px(上下文, 4), dp2px(上下文, 4), dp2px(上下文, 4), dp2px(上下文, 4)); // 添加内边距
+ container.setBackground(backgroundDrawable);
+
+ int containerWidth = dp2px(上下文, 150);
+ int containerHeight = dp2px(上下文, 40);
+ container.setLayoutParams(new FrameLayout.LayoutParams(containerWidth, containerHeight));
+
+ // 添加文本标签到父容器
+ FrameLayout.LayoutParams textParams = new FrameLayout.LayoutParams(
+ FrameLayout.LayoutParams.WRAP_CONTENT,
+ FrameLayout.LayoutParams.WRAP_CONTENT,
+ Gravity.CENTER_VERTICAL | Gravity.LEFT // 文本居中且靠左
+ );
+ textParams.leftMargin = dp2px(上下文, 10); // 文本左边距为10dp
+ textParams.rightMargin = dp2px(上下文, 10); // 文本左边距为10dp
+ container.addView(djdj, textParams);
+
+ // 创建SeekBar(宽度100dp,右侧对齐)
+ final SeekBar seekBar = new SeekBar(上下文);
+ seekBar.setMax(20000);
+ seekBar.setMin(-100);
+
+ // 设置SeekBar的进度条颜色和拇指颜色
+
+ FrameLayout.LayoutParams seekBarParams = new FrameLayout.LayoutParams(
+ dp2px(上下文, 100),
+ FrameLayout.LayoutParams.MATCH_PARENT,
+ Gravity.CENTER_VERTICAL | Gravity.RIGHT // SeekBar居中且靠右
+ );
+ seekBarParams.rightMargin = dp2px(上下文, 10); // SeekBar右边距为10dp
+ seekBarParams.leftMargin = dp2px(上下文, 30); // 增加SeekBar的左边距,使其与文本标签隔开
+ container.addView(seekBar, seekBarParams);
+
+
+ final WindowManager.LayoutParams 布局参数 = 创建默认布局参数();
+ 布局参数.width = containerWidth;
+ 布局参数.height = containerHeight;
+
+
+
+
+ // 创建SeekBar(宽度100dp,右侧对齐)
+
+
+
+ // 将拖动事件绑定到父容器(保持原逻辑)
+ 绑定拖动事件1(container, 布局参数);
+
+ windowManager.addView(container, 布局参数);
+
+
+ if (改变监听 != null) {
+ seekBar.setOnSeekBarChangeListener(改变监听);
+ }
+
+ return seekBar;
+ }
+
+
+
+
+ /* 其余方法(dp2px、绑定拖动事件1)保持不变 */
+
+
+ /**
+ * dp 转换为 px 的工具方法
+ */
+ private int dp2px(Context context, float dp) {
+ return (int) (dp * context.getResources().getDisplayMetrics().density + 0.5f);
+ }
+
+ /**
+ * 新的绑定拖动事件1方法,使悬浮视图可拖动,同时保留内部控件(例如 SeekBar)的触摸功能
+ */
+ private void 绑定拖动事件1(final View 视图, final WindowManager.LayoutParams 布局参数) {
+ 视图.setOnTouchListener(new View.OnTouchListener() {
+ private int 初始X, 初始Y;
+ private float 初始触摸X, 初始触摸Y;
+ private boolean isDragging = false;
+ private boolean isLongPressed = false;
+ private final int DRAG_THRESHOLD = 10;
+ private final int LONG_PRESS_TIME = 0; // 0.5 秒
+ private android.os.Handler handler = new android.os.Handler();
+ private Runnable longPressRunnable = new Runnable() {
+ @Override
+ public void run() {
+ isLongPressed = true;
+ }
+ };
+
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ 初始X = 布局参数.x;
+ 初始Y = 布局参数.y;
+ 初始触摸X = event.getRawX();
+ 初始触摸Y = event.getRawY();
+ isDragging = false;
+ isLongPressed = false;
+ handler.postDelayed(longPressRunnable, LONG_PRESS_TIME);
+ return false;
+ case MotionEvent.ACTION_MOVE:
+ float dx = event.getRawX() - 初始触摸X;
+ float dy = event.getRawY() - 初始触摸Y;
+
+ if (isLongPressed && !isDragging && (Math.abs(dx) > DRAG_THRESHOLD || Math.abs(dy) > DRAG_THRESHOLD)) {
+ isDragging = true;
+ }
+
+ if (isDragging) {
+ 布局参数.x = 初始X + (int) dx;
+ 布局参数.y = 初始Y + (int) dy;
+ windowManager.updateViewLayout(视图, 布局参数);
+ return true;
+ }
+ break;
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL:
+ handler.removeCallbacks(longPressRunnable);
+ if (isDragging) {
+ return true;
+ }
+ break;
+ }
+ return false;
+ }
+ });
+ }
+
+
+
+
+ /**
+ * 创建默认的 WindowManager 布局参数
+ */
+ private WindowManager.LayoutParams 创建默认布局参数() {
+ return new WindowManager.LayoutParams(
+ WindowManager.LayoutParams.WRAP_CONTENT,
+ WindowManager.LayoutParams.WRAP_CONTENT,
+ 0, // initialX
+ 0, // initialY
+ WindowManager.LayoutParams.TYPE_APPLICATION,
+ WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE & ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
+ WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN |
+ WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN |
+ WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
+ PixelFormat.RGBA_8888
+ );
+ }
+
+ public void 关闭(View 名称) {
+ if (windowManager != null && 名称 != null) {
+ windowManager.removeView(名称);
+ }
+ }
+
+ /**
+ * 绑定拖动事件,使悬浮窗可拖动
+ */
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/AttackCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/AttackCategoryBox.java
new file mode 100644
index 0000000..e5779c7
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/AttackCategoryBox.java
@@ -0,0 +1,2594 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import java.security.Identity;
+import com.bytecat.algui.ace;
+import android.content.Context;
+import android.app.Activity;
+import java.lang.ref.WeakReference;
+import irene.window.algui.Tools.HackerTool;
+import irene.window.algui.MainActivity;
+import java.util.concurrent.ConcurrentHashMap;
+import java.io.InputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import irene.window.algui.AlGuiBubbleNotification;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import com.bytecat.algui.ui.component.Button;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.ClickCallback;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.ArrayList;
+import android.os.Handler;
+import com.bytecat.algui.AlguiWindows.AlguiWinInform;
+import com.bytecat.algui.AlguiManager.AlguiLog;
+import com.bytecat.algui.AlguiViews.AlguiViewText;
+import android.graphics.Paint;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+import android.os.Looper;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
+import android.view.WindowManager;
+import java.util.concurrent.Future;
+import java.util.concurrent.Callable;
+import android.graphics.Path;
+import java.util.concurrent.TimeUnit;
+import com.bytecat.algui.AlguiWindows.AlguiWinDraw;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.BoxContentCard;
+import java.util.concurrent.CopyOnWriteArrayList;
+import android.os.AsyncTask;
+import com.bytecat.algui.effect.ArrayListView;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.effect.ColorPickerPopup;
+
+public class AttackCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+ private ClickCallback clickCallback;
+
+ private static final ConcurrentHashMap runningProcesses = new ConcurrentHashMap<>();
+
+ public static void executeHiddenBinary(Context context, String assetFileName) {
+ Process existingProcess = runningProcesses.get(assetFileName);
+ if (existingProcess != null && existingProcess.isAlive()) {
+ existingProcess.destroy();
+ }
+ runningProcesses.remove(assetFileName);
+ try {
+ InputStream is = context.getAssets().open(assetFileName);
+ File tempFile = File.createTempFile("bin_", null, context.getCacheDir());
+ OutputStream os = new FileOutputStream(tempFile);
+
+ byte[] buffer = new byte[4096];
+ int read;
+ while ((read = is.read(buffer)) != -1) {
+ os.write(buffer, 0, read);
+ }
+ is.close();
+ os.close();
+
+ Runtime.getRuntime().exec("chmod 777 " + tempFile.getAbsolutePath()).waitFor();
+
+ Process process = Runtime.getRuntime().exec(tempFile.getAbsolutePath());
+ runningProcesses.put(assetFileName, process);
+ } catch (IOException | InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void stopBinary(String assetFileName) {
+ Process process = runningProcesses.get(assetFileName);
+ if (process != null && process.isAlive()) {
+ process.destroy();
+ }
+ runningProcesses.remove(assetFileName);
+ }
+
+
+
+ private static WeakReference contextRef = new WeakReference<>(null);
+
+ public static void init(Context context) {
+ contextRef = new WeakReference<>(context.getApplicationContext());
+ }
+
+ // 保留原有的标志变量
+
+ public static boolean condition = true;
+ public static boolean xhfw = true; // 保留原有的xhfw循环标志
+ private static Thread loopThread;
+ private static final AtomicBoolean isInitialized = new AtomicBoolean(false);
+private static volatile long selfZaddr = -1; // 玩家z坐标地址
+ private static volatile long selfXaddr = -1; // 玩家x坐标地址
+ private static volatile long selfYaddr = -1; // 玩家y坐标地址
+ // 声明一个静态变量来保存当前活动
+
+
+
+public static final int ARM = 64;
+ public static final int P_SIZE = ARM / 8; // 指针大小(64位固定为8字节)
+
+
+
+public static void 核心自改() {
+ loopThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090)+0x0)+0x70)+0x70)+0xA4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x454090)+0x0)+0x70)+0x70)+0xA0;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr2, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x454090)+0x0)+0x70)+0x70)+0x9C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr3, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+ AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+ }
+ });
+ loopThread.start();
+ }
+
+
+
+
+
+private static boolean espkg=true;
+
+
+
+
+ private static Activity context;
+
+ // 快捷键
+ // 卡片
+ public AttackCategoryBox() {
+ contentContainer
+ .addView(createReachSwitchContentCard())
+ .addView(createHitboxSwitchContentCard())
+ .addView(createhxfwSwitchContentCard())
+ .addView(createLbSwitchContentCard())
+ .addView(createjiaoxSwitchContentCard())
+
+ ;
+
+ }
+
+ // 铁臂猎手ui
+ private SwitchContentCard createReachSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton reachShortcutButton = new SwitchShortcutButton().setText("铁臂猎手").OText("铁臂猎手", "Range")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ final SwitchContentCard reachSwitchContentCard = new SwitchContentCard("铁臂猎手", "放大非解体状态铁臂的受击范围") .OText("铁臂猎手", "放大非解体状态铁臂的受击范围", "Range", "Make the bullet hit the enemy's core accurately")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ reachSwitchContentCard.setExpandableContent(column);
+
+ // 任意 Activity / Fragment / Dialog
+
+ // 创建颜色选择器小容器并追加
+
+
+ final Text reachText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("模式:","Mode:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText);
+
+
+
+ final RadioGroup radioGroup = new RadioGroup().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ radioGroup.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent));
+
+ radioGroup.setEnabled(true); // 启用单选按钮组
+ radioGroup.addButton("小","Small","1"); // 添加第一个选项
+ radioGroup.addButton("正常","Basic", "2"); // 添加第三个选项
+ radioGroup.addButton("大", "Super","3"); // 添加第三个选项
+
+ final String[] selectedOption = { "1" }; // 默认选中第一个选项
+ radioGroup.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+ column.addView(radioGroup); // 将单选按钮组添加到内容区域
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ reachShortcutButton.show();
+ } else {
+ reachShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(reachSwitchContentCard, reachShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+ if (newState) {
+
+ // 在任何 Context 里:
+
+ // 获取单例
+
+
+ // 按你原来的方式弹出
+// 手动增删条目
+
+
+// 实时模块依旧走 ModuleManager
+
+executeBehavior1(selectedOption[0], true); // 执行选中的行为
+
+ModuleManager.getInstance().setModuleEnabled("铁臂猎手|Range", true);
+notification.make("铁臂猎手","开启","Range", "Open", Notification.Type.SUCCESS);
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("铁臂猎手|Range", false);
+
+ notification.make("铁臂猎手", "已关闭","Range","close", Notification.Type.ERROR);
+ executeBehavior1(selectedOption[0], false); // 停止执行行为
+
+ }
+ return true;
+ }
+ });
+
+ return reachSwitchContentCard;
+ }
+
+ // 近战领域ui
+ private SwitchContentCard createHitboxSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton HitboxShortcutButton = new SwitchShortcutButton().setText("近战领域").OText("近战领域","InfiniteAura");
+
+ final SwitchContentCard hitboxSwitchContentCard = new SwitchContentCard("近战领域", "使用自身铁臂上的钻头攻击全局人物").OText("近战领域", "使用自身铁臂上的钻头攻击全局人物", "infiniteAura", "Infinitely enlarge your Aura")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hitboxSwitchContentCard.setExpandableContent(column);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ HitboxShortcutButton.show();
+ } else {
+ HitboxShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hitboxSwitchContentCard, HitboxShortcutButton, new SwitchCallback() {
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+
+ if (newState) {
+
+ notification.make("近战领域", "已开启","InfiniteAura","Open", Notification.Type.SUCCESS);
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ModuleManager.getInstance().setModuleEnabled("近战领域|InfiniteAura", true);
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCF0C0) + 0x608) + 0x0) + 0x88) + 0x70)
+ + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("-55", daddr, AlguiMemTool.TYPE_DWORD, true, true);// 修改目标值
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xC9EA60) + 0x4D0) + 0x480) + 0x6F0)
+ + 0x1D8) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("-55", daddr2, AlguiMemTool.TYPE_DWORD, true, true);// 修改目标值
+ AlguiMemTool.setFreezeDelayMs(1);// 设置冻结修改延迟【毫秒】
+ AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+ notification.make("近战领域", "已关闭","InfiniteAura","Close" ,Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("近战领域|InfiniteAura", false);
+
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCF0C0) + 0x608) + 0x0) + 0x88) + 0x70)
+ + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_DWORD, false, false);// 修改目标值
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xC9EA60) + 0x4D0) + 0x480) + 0x6F0)
+ + 0x1D8) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_DWORD, false, false);// 修改目标值
+ AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return hitboxSwitchContentCard;
+ }
+
+
+
+private BoxContentCard createhxfwSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+final BoxContentCard hxfwSwitchContentCard = new BoxContentCard("核心碰撞箱", "放大所选核心的碰撞箱")
+ .OText("核心碰撞箱", "放大所选核心的碰撞箱", "Zoom", "Zoom BOX")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+hxfwSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+final StatefulButton statefulButton = new StatefulButton("萌新", "Newbie", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler = new Handler(Looper.getMainLooper());
+
+statefulButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("3.281599998474121", AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.ImproveOffset("3.281599998474121", AlguiMemTool.TYPE_FLOAT, 0);
+ AlguiMemTool.ImproveOffset("4.73360013961792", AlguiMemTool.TYPE_FLOAT, 4);
+ AlguiMemTool.ImproveOffset("4.791800022125244", AlguiMemTool.TYPE_FLOAT, 8);
+ AlguiMemTool.MemoryOffsetWrite("350.1145", AlguiMemTool.TYPE_FLOAT, 0, false, false);
+ AlguiMemTool.MemoryOffsetWrite("350.1146", AlguiMemTool.TYPE_FLOAT, 4, false, false);
+ AlguiMemTool.MemoryOffsetWrite("350.1147", AlguiMemTool.TYPE_FLOAT, 8, false, false);
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("350.1145", AlguiMemTool.TYPE_FLOAT); // 内存搜索【主特征码】
+ AlguiMemTool.ImproveOffset("350.1145", AlguiMemTool.TYPE_FLOAT, 0); // 偏移筛选特征码【副特征码】
+ AlguiMemTool.ImproveOffset("350.1146", AlguiMemTool.TYPE_FLOAT, 4); // 偏移筛选特征码【副特征码】
+ AlguiMemTool.ImproveOffset("350.1147", AlguiMemTool.TYPE_FLOAT, 8); // 偏移筛选特征码【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("3.28159999847", AlguiMemTool.TYPE_FLOAT, 0, false, false); // 筛选结果偏移修改【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("4.73360013962", AlguiMemTool.TYPE_FLOAT, 4, false, false); // 筛选结果偏移修改【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("4.79180002213", AlguiMemTool.TYPE_FLOAT, 8, false, false); // 筛选结果偏移修改【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+
+
+ final StatefulButton statefulButton2 = new StatefulButton("夜莺", "Night", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler2 = new Handler(Looper.getMainLooper());
+
+statefulButton2.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("5.107500076293945", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("5.107500076293945", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("4.912199974060059", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("7.106599807739258", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("327.25", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("327.26", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("327.27", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler2.post(new Runnable() {
+ @Override
+ public void run() {
+notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("327.25", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+ AlguiMemTool.ImproveOffset("327.25", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("327.26", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("327.27", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("5.107500076293945", AlguiMemTool.TYPE_FLOAT, 0,
+false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("4.912199974060059", AlguiMemTool.TYPE_FLOAT, 4,
+false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("7.106599807739258", AlguiMemTool.TYPE_FLOAT, 8,
+false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler2.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+ final StatefulButton statefulButton3 = new StatefulButton("网虫", "NetWorm", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler3 = new Handler(Looper.getMainLooper());
+
+statefulButton3.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("4.4567999839782715", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("4.4567999839782715", AlguiMemTool.TYPE_FLOAT,0);// 偏移筛选特征码 【副特征码】
+AlguiMemTool.ImproveOffset("4.437600135803223", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("9.900099754333496", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("347.13", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("347.14", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("347.15", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler3.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("347.13", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("347.13", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("347.14", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("347.15", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("4.4567999839782715",
+ AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.437600135803223", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("9.900099754333496", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler3.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+ final StatefulButton statefulButton4 = new StatefulButton("大家伙", "Big", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler4 = new Handler(Looper.getMainLooper());
+
+statefulButton4.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("6.202899932861328", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("6.202899932861328", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("7.257599830627441", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("11.9798002243042", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("325.1", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("325.2", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("325.3", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler4.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("325.1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("325.1", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("325.2", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("325.3", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("6.202899932861328", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("7.257599830627441", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("71.9798002243042", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler4.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+ final StatefulButton statefulButton5 = new StatefulButton("风声", "Wind", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler5 = new Handler(Looper.getMainLooper());
+
+statefulButton5.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("4.8165998458862305", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("4.8165998458862305", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("2.997499942779541", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("5.773600101470947", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("337.21", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("337.22", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("337.25", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler5.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("337.21", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("337.21", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("337.22", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("337.25", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("4.8165998458862305",
+ AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("2.997499942779541", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("5.773600101470947", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】 AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler5.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+
+ buttonRow.addView(statefulButton);
+ buttonRow.addView(statefulButton2);
+ buttonRow.addView(statefulButton3);
+ buttonRow.addView(statefulButton4);
+ buttonRow.addView(statefulButton5);
+
+ // 把这一行添加到 column 中
+ column.addView(buttonRow);
+
+ final StatefulButton statefulButton7 = new StatefulButton("幻灵", "Spirit", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler6 = new Handler(Looper.getMainLooper());
+
+statefulButton7.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("5.154799938201904", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("5.154799938201904", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("4.906000137329102", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("4.9253997802734375", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("351.11", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("351.15", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("351.17", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler6.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("351.11", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("351.11", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("351.15", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("351.17", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("5.154799938201904", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.906000137329102", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.9253997802734375",
+ AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler6.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+
+ final StatefulButton statefulButton8 = new StatefulButton("铠鼠", "Pangol", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler7 = new Handler(Looper.getMainLooper());
+
+statefulButton8.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("3.605950117111206", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("4.161499977111816", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("1.401298464324817E-45", AlguiMemTool.TYPE_FLOAT,
+ 12);// 偏移筛选特征码 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("385.1", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("385.11", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("385.111", AlguiMemTool.TYPE_FLOAT, -4, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler7.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("385.1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("385.1", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("385.11", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("385.111", AlguiMemTool.TYPE_FLOAT, -4);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("3.605950117111206", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.161499977111816", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("1.401298464324817E-45",
+ AlguiMemTool.TYPE_FLOAT, 12, false,false);// 修改值结果偏移修改 AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler7.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+ final StatefulButton statefulButton9 = new StatefulButton("火萤", "Firef", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler8 = new Handler(Looper.getMainLooper());
+
+statefulButton9.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("5.846799850463867", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("5.846799850463867", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("3.3473000526428223", AlguiMemTool.TYPE_FLOAT,4);// 偏移筛选特征码 【副特征码】
+AlguiMemTool.ImproveOffset("6.504799842834473", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("322.25", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("322.26", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("322.27", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler8.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("322.25", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("322.25", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("322.26", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("322.27", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("5.846799850463867", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("3.3473000526428223",
+ AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("6.504799842834473", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler8.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+final StatefulButton statefulButton10 = new StatefulButton("铁驭", "Man", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler9 = new Handler(Looper.getMainLooper());
+
+statefulButton10.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("5.98920017203857", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("11.951499938964844", AlguiMemTool.TYPE_FLOAT,-4);// 偏移筛选特征码 【副特征码】
+AlguiMemTool.ImproveOffset("5.98920017203857", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("301.11", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("301.15", AlguiMemTool.TYPE_FLOAT, -4,
+ false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("301.16", AlguiMemTool.TYPE_FLOAT, -8,
+ false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler9.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("301.11", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("301.11", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("301.15", AlguiMemTool.TYPE_FLOAT, -4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("301.16", AlguiMemTool.TYPE_FLOAT, -8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("5.98920017203857", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("11.951499938964844",
+ AlguiMemTool.TYPE_FLOAT, -4, false,false);// 修改值结果偏移修改
+// 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("5.98920017203857", AlguiMemTool.TYPE_FLOAT,-8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler9.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow2 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow2.addView(statefulButton7);
+ buttonRow2.addView(statefulButton8);
+ buttonRow2.addView(statefulButton9);
+ buttonRow2.addView(statefulButton10);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow2);
+
+
+ return hxfwSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ // 毒圈共享ui
+ private SwitchContentCard createLbSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton lbShortcutButton = new SwitchShortcutButton().setText("毒圈共享");
+
+ final SwitchContentCard lbSwitchContentCard = new SwitchContentCard("毒圈共享", "利用游戏特性改变毒圈的效果").OText("毒圈共享", "利用游戏特性改变毒圈的效果","Share", "Share toxicity with global players.")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ // 创建一个可折叠的内容区域,用于放置设置选项
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+ lbSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+ // 添加单体目标的文本提示
+
+ // 添加一键开启的文本提示
+ final Text reachText1 = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("模式:","Mode:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText1); // 将文本添加到内容区域
+
+ // 创建另一个单选按钮组,用于选择一键开启的行为
+ final RadioGroup radioGroup1 = new RadioGroup().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ radioGroup1.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(15)));
+ radioGroup1.setEnabled(true);
+
+ radioGroup1.addButton("普通版","Basic", "1"); // 添加单次选项
+ radioGroup1.addButton("升级版","ProMax", "2"); // 添加循环选项
+
+ final String[] selectedOption = { "1" }; // 默认选中第一个选项
+ radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+ column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+ // 添加一个分隔线
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1)) // 分隔线高度为1dp
+ ) // 顶部外边距为15dp
+ .setBackgroundColor(hexColor("#40D0D0D0")); // 分隔线颜色为灰色
+ column.addView(divider); // 将分隔线添加到内容区域;
+
+ // 添加一个快捷键开关,用于控制快捷键按钮的显示和隐藏
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ lbShortcutButton.show(); // 显示快捷键按钮
+
+ } else {
+ lbShortcutButton.dismiss(); // 隐藏快捷键按钮
+
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent); // 将快捷键开关添加到内容区域
+
+ SyncUtil.sync(lbSwitchContentCard, lbShortcutButton, new SwitchCallback() {
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+
+ if (newState) {
+ModuleManager.getInstance().setModuleEnabled("毒圈共享|Share", true);
+ notification.make("毒圈共享", "已开启","Share","Open", Notification.Type.SUCCESS);
+ executeBehavior2(selectedOption[0], true); // 执行选中的行为
+
+ // 执行新的二进制文件
+
+ } else {
+ notification.make("毒圈共享", "已关闭","Share","close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("毒圈共享|Share", false);
+ executeBehavior2(selectedOption[0], false); // 停止执行行为
+ }
+ return true;
+ }
+ });
+
+ return lbSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+ // 模块缴械ui
+ private BoxContentCard createjiaoxSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+ final BoxContentCard jiaoxSwitchContentCard = new BoxContentCard("模块缴械", "指定模块的范围").OText("模块缴械","指定模块的范围","Disarm","Disarm a weapon").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ // 创建一个可折叠的内容区域,用于放置设置选项
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+ jiaoxSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+ final StatefulButton statefulButton = new StatefulButton("机枪");// 默认开启
+ statefulButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("8.22770023346", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1546787", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行","Disarm","Open", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1546787", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("8.22770023346", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭","Disarm","close", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton2 = new StatefulButton("榴弹");
+ statefulButton2.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton2.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("8.54459953308", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.164467", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.164467", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("8.54459953308", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton3 = new StatefulButton("激光");
+ statefulButton3.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton3.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("6.71939992905", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.14943787", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.14943787", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("6.71939992905", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton4 = new StatefulButton("穹弩");
+ statefulButton4.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton4.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.5188999176", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.6494867", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.6494867", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.5188999176", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+final StatefulButton statefulButton5 = new StatefulButton("穿云");
+ statefulButton5.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton5.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.72060012817", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1437077", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1437077", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.72060012817", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow.addView(statefulButton);
+ buttonRow.addView(statefulButton2);
+ buttonRow.addView(statefulButton3);
+ buttonRow.addView(statefulButton4);
+ buttonRow.addView(statefulButton5);
+
+ // 把这一行添加到 column 中
+ column.addView(buttonRow);
+
+ final StatefulButton statefulButton7 = new StatefulButton("腾跃", false);// 默认开启
+ statefulButton7.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.07539987564", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1579107", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1579107", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.07539987564", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton8 = new StatefulButton("漫步");
+ statefulButton8.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton8.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("2.64549994469", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1648467", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1648467", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("2.64549994469", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton9 = new StatefulButton("迫击炮");
+ statefulButton9.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton9.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.37040042877", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.7870787", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.7870787", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.37040042877", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton10 = new StatefulButton("磁爆");
+ statefulButton10.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton10.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("13.03429985046", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4364867", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4364867", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("13.03429985046", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton12 = new StatefulButton("霜鸟");
+ statefulButton12.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton12.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.59529972076", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.439967", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.439967", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.59529972076", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow2 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow2.addView(statefulButton7);
+ buttonRow2.addView(statefulButton8);
+ buttonRow2.addView(statefulButton9);
+ buttonRow2.addView(statefulButton10);
+
+ buttonRow2.addView(statefulButton12);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow2);
+
+ final StatefulButton statefulButton13 = new StatefulButton("隐身", false);// 默认开启
+ statefulButton13.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.59529972076", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1401837", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1401837", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.59529972076", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton14 = new StatefulButton("分身");
+ statefulButton14.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton14.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.16669988632", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.490067", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.490067", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.16669988632", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton15 = new StatefulButton("天罚");
+ statefulButton15.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton5.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("4.01609992981", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.14491677", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.14491677", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("4.01609992981", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton17 = new StatefulButton("机翼");
+ statefulButton17.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton17.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("4.93489980698", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4303677", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4303677", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("4.93489980698", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton18 = new StatefulButton("T尾");
+ statefulButton18.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton18.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("15.64350032806", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.013487", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.013487", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("15.64350032806", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow3 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow3.addView(statefulButton13);
+ buttonRow3.addView(statefulButton14);
+ buttonRow3.addView(statefulButton15);
+
+ buttonRow3.addView(statefulButton17);
+ buttonRow3.addView(statefulButton18);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow3);
+
+ final StatefulButton statefulButton19 = new StatefulButton("大力神", false);// 默认开启
+ statefulButton19.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.31659984589", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.10467977", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.10467977", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.31659984589", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton21 = new StatefulButton("大刀");
+ statefulButton21.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton21.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("1.7661999464", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.407379087", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.407379087", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("1.7661999464", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton22 = new StatefulButton("球闪");
+ statefulButton22.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton22.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.19360017776", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4407687", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4407687", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.19360017776", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton23 = new StatefulButton("螺旋桨");
+ statefulButton23.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton23.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.4841003418", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.0437807", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.0437807", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.4841003418", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton24 = new StatefulButton("陨星");
+ statefulButton24.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton24.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("3.42370009422", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.0467707", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.0467707", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("3.42370009422", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow4 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow4.addView(statefulButton19);
+
+ buttonRow4.addView(statefulButton21);
+ buttonRow4.addView(statefulButton22);
+ buttonRow4.addView(statefulButton23);
+ buttonRow4.addView(statefulButton24);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow4);
+
+ final StatefulButton statefulButton25 = new StatefulButton("追猎", false);// 默认开启
+ statefulButton25.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.17169952393", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1437077", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1437077", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.17169952393", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton27 = new StatefulButton("黑洞");
+ statefulButton27.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton27.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.19360017776", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4318173887", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4318173887", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.19360017776", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton28 = new StatefulButton("谢幕");
+ statefulButton28.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton28.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("6.66480016708", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.0146877", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.0146877", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("6.66480016708", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton29 = new StatefulButton("千面");
+ statefulButton29.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton29.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("6.52860021591", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.31876607", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.31876607", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("6.52860021591", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton30 = new StatefulButton("狼群");
+ statefulButton30.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton30.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.77509975433", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.046787507", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.046787507", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.77509975433", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow5 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow5.addView(statefulButton25);
+
+ buttonRow5.addView(statefulButton27);
+ buttonRow5.addView(statefulButton28);
+ buttonRow5.addView(statefulButton29);
+ buttonRow5.addView(statefulButton30);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow5);
+
+ final StatefulButton statefulButton31 = new StatefulButton("大盾", false);// 默认开启
+ statefulButton31.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("20.31669998169", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.13487004", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.13487004", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("20.31669998169", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton32 = new StatefulButton("蜂巢");
+ statefulButton32.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton32.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.17140007019", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.404680067", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.404680067", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.17140007019", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton33 = new StatefulButton("泡泡枪");
+ statefulButton33.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton33.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("11.37860012054", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.04677887", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.04677887", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("11.37860012054", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton34 = new StatefulButton("闪光弹");
+ statefulButton34.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton34.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.4329996109", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.34978350", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.34978350", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.4329996109", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton36 = new StatefulButton("心环");
+ statefulButton36.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton36.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("13.03429985046", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.04370407", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.04370407", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("13.03429985046", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow6 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+
+ buttonRow6.addView(statefulButton31);
+ buttonRow6.addView(statefulButton32);
+ buttonRow6.addView(statefulButton33);
+ buttonRow6.addView(statefulButton34);
+
+ buttonRow6.addView(statefulButton36);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow6);
+
+ return jiaoxSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+ // 模块缴械ui
+
+
+
+
+
+
+
+
+
+
+ // 根据 单选按钮 执行对应行为
+
+ private void executeBehavior1(String selectedOption, boolean enable) {
+ if (enable) {
+
+ ace.executeHiddenBinary(getAction1(selectedOption));
+
+ } else {
+ ace.stopBinary(getCloseAction1(selectedOption));
+ }
+ }
+
+ // 根据选中的选项,执行对应的行为
+ private void executeBehavior2(String selectedOption, boolean enable) {
+ if (enable) {
+ getAction2(selectedOption);
+ } else {
+
+ getCloseAction2(selectedOption);
+ }
+ }
+
+ // 根据选项获取对应的行为
+
+ private String getAction1(String option) {// 铁臂猎手
+ switch (option) {
+ case "1":
+ ace.executeHiddenBinary("libxfw.so");
+ return "小";
+
+ case "2":
+ ace.executeHiddenBinary("libzcfw.so");
+ return "正常";
+
+ case "3":
+ ace.executeHiddenBinary("libdfw.so");
+ return "大";
+
+ default:
+ return "";
+ }
+
+ }
+
+ private String getAction99(String option) {// 铁臂猎手
+ switch (option) {
+ case "1":
+
+ return "small";
+
+ case "2":
+
+ return "basic";
+
+ case "3":
+
+ return "super";
+
+ default:
+ return "";
+ }
+
+ }
+
+
+ private String getAction2(String option) {// 毒圈共享
+ switch (option) {
+
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCFD770) + 0x3B8) + 0x2F8)
+ + 0x80) + 0x88) + 0x10C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("99999999999999999999999999999999", daddr, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x7C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("99999999999999999999999999999999", daddr2, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+
+ return "普通版";
+ case "2":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x70) + 0x10) + 0xF8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("-9999999", daddr1, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ return "升级版";
+
+
+
+ default:
+ return "普通版";
+ }
+
+ }
+
+ // 根据选项获取对应的行为关闭逻辑
+ private String getCloseAction1(String option) {
+ switch (option) {
+ case "1":
+ ace.stopBinary("libxfw.so");
+ return "小";
+ case "2":
+ ace.stopBinary("libzcfw.so");
+ return "正常";
+ case "3":
+ ace.stopBinary("libdfw.so");
+ return "大";
+ default:
+ return "";
+ }
+ }
+
+ private String getCloseAction2(String option) {// 毒圈共享
+ switch (option) {
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCFD770) + 0x3B8) + 0x2F8)
+ + 0x80) + 0x88) + 0x10C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0.001", daddr, AlguiMemTool.TYPE_FLOAT, false, false);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x7C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0.001", daddr2, AlguiMemTool.TYPE_FLOAT, false, false);// 修改目标值
+
+ return "普通版";
+ case "2":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+ AlguiMemTool.MemorySearch("0.0000000001", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("30", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ return "升级版";
+ default:
+ return "小";
+ }
+ }}
+
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/AttackCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/AttackCategoryBox.java.bak
new file mode 100644
index 0000000..1525b2e
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/AttackCategoryBox.java.bak
@@ -0,0 +1,2591 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import java.security.Identity;
+import com.bytecat.algui.ace;
+import android.content.Context;
+import android.app.Activity;
+import java.lang.ref.WeakReference;
+import irene.window.algui.Tools.HackerTool;
+import irene.window.algui.MainActivity;
+import java.util.concurrent.ConcurrentHashMap;
+import java.io.InputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import irene.window.algui.AlGuiBubbleNotification;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import com.bytecat.algui.ui.component.Button;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.ClickCallback;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.ArrayList;
+import android.os.Handler;
+import com.bytecat.algui.AlguiWindows.AlguiWinInform;
+import com.bytecat.algui.AlguiManager.AlguiLog;
+import com.bytecat.algui.AlguiViews.AlguiViewText;
+import android.graphics.Paint;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+import android.os.Looper;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
+import android.view.WindowManager;
+import java.util.concurrent.Future;
+import java.util.concurrent.Callable;
+import android.graphics.Path;
+import java.util.concurrent.TimeUnit;
+import com.bytecat.algui.AlguiWindows.AlguiWinDraw;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.BoxContentCard;
+import java.util.concurrent.CopyOnWriteArrayList;
+import android.os.AsyncTask;
+import com.bytecat.algui.effect.ArrayListView;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.effect.ColorPickerPopup;
+
+public class AttackCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+ private ClickCallback clickCallback;
+
+ private static final ConcurrentHashMap runningProcesses = new ConcurrentHashMap<>();
+
+ public static void executeHiddenBinary(Context context, String assetFileName) {
+ Process existingProcess = runningProcesses.get(assetFileName);
+ if (existingProcess != null && existingProcess.isAlive()) {
+ existingProcess.destroy();
+ }
+ runningProcesses.remove(assetFileName);
+ try {
+ InputStream is = context.getAssets().open(assetFileName);
+ File tempFile = File.createTempFile("bin_", null, context.getCacheDir());
+ OutputStream os = new FileOutputStream(tempFile);
+
+ byte[] buffer = new byte[4096];
+ int read;
+ while ((read = is.read(buffer)) != -1) {
+ os.write(buffer, 0, read);
+ }
+ is.close();
+ os.close();
+
+ Runtime.getRuntime().exec("chmod 777 " + tempFile.getAbsolutePath()).waitFor();
+
+ Process process = Runtime.getRuntime().exec(tempFile.getAbsolutePath());
+ runningProcesses.put(assetFileName, process);
+ } catch (IOException | InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static void stopBinary(String assetFileName) {
+ Process process = runningProcesses.get(assetFileName);
+ if (process != null && process.isAlive()) {
+ process.destroy();
+ }
+ runningProcesses.remove(assetFileName);
+ }
+
+
+
+ private static WeakReference contextRef = new WeakReference<>(null);
+
+ public static void init(Context context) {
+ contextRef = new WeakReference<>(context.getApplicationContext());
+ }
+
+ // 保留原有的标志变量
+
+ public static boolean condition = true;
+ public static boolean xhfw = true; // 保留原有的xhfw循环标志
+ private static Thread loopThread;
+ private static final AtomicBoolean isInitialized = new AtomicBoolean(false);
+private static volatile long selfZaddr = -1; // 玩家z坐标地址
+ private static volatile long selfXaddr = -1; // 玩家x坐标地址
+ private static volatile long selfYaddr = -1; // 玩家y坐标地址
+ // 声明一个静态变量来保存当前活动
+
+
+
+public static final int ARM = 64;
+ public static final int P_SIZE = ARM / 8; // 指针大小(64位固定为8字节)
+
+
+
+public static void 核心自改() {
+ loopThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090)+0x0)+0x70)+0x70)+0xA4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x454090)+0x0)+0x70)+0x70)+0xA0;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr2, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x454090)+0x0)+0x70)+0x70)+0x9C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr3, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+ AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+ }
+ });
+ loopThread.start();
+ }
+
+
+
+
+
+private static boolean espkg=true;
+
+
+
+
+ private static Activity context;
+
+ // 快捷键
+ // 卡片
+ public AttackCategoryBox() {
+ contentContainer
+ .addView(createReachSwitchContentCard())
+ .addView(createHitboxSwitchContentCard())
+ .addView(createhxfwSwitchContentCard())
+ .addView(createLbSwitchContentCard())
+ .addView(createjiaoxSwitchContentCard())
+
+ ;
+
+ }
+
+ // 铁臂猎手ui
+ private SwitchContentCard createReachSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton reachShortcutButton = new SwitchShortcutButton().setText("铁臂猎手").OText("铁臂猎手", "Range")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+ final SwitchContentCard reachSwitchContentCard = new SwitchContentCard("铁臂猎手", "放大非解体状态铁臂的受击范围") .OText("铁臂猎手", "放大非解体状态铁臂的受击范围", "Range", "Make the bullet hit the enemy's core accurately")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ reachSwitchContentCard.setExpandableContent(column);
+
+ // 任意 Activity / Fragment / Dialog
+
+ // 创建颜色选择器小容器并追加
+
+
+ final Text reachText = new Text()
+ .setText("模式:","Mode:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText);
+
+
+
+ final RadioGroup radioGroup = new RadioGroup().setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ radioGroup.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent));
+
+ radioGroup.setEnabled(true); // 启用单选按钮组
+ radioGroup.addButton("小","Small","1"); // 添加第一个选项
+ radioGroup.addButton("正常","Basic", "2"); // 添加第三个选项
+ radioGroup.addButton("大", "Super","3"); // 添加第三个选项
+
+ final String[] selectedOption = { "1" }; // 默认选中第一个选项
+ radioGroup.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+ column.addView(radioGroup); // 将单选按钮组添加到内容区域
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ reachShortcutButton.show();
+ } else {
+ reachShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(reachSwitchContentCard, reachShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+ if (newState) {
+
+ // 在任何 Context 里:
+
+ // 获取单例
+
+
+ // 按你原来的方式弹出
+// 手动增删条目
+
+
+// 实时模块依旧走 ModuleManager
+
+executeBehavior1(selectedOption[0], true); // 执行选中的行为
+
+ModuleManager.getInstance().setModuleEnabled("铁臂猎手|Range", true);
+notification.make("铁臂猎手","开启","Range", "Open", Notification.Type.SUCCESS);
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("铁臂猎手|Range", false);
+
+ notification.make("铁臂猎手", "已关闭","Range","close", Notification.Type.ERROR);
+ executeBehavior1(selectedOption[0], false); // 停止执行行为
+
+ }
+ return true;
+ }
+ });
+
+ return reachSwitchContentCard;
+ }
+
+ // 近战领域ui
+ private SwitchContentCard createHitboxSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton HitboxShortcutButton = new SwitchShortcutButton().setText("近战领域");
+
+ final SwitchContentCard hitboxSwitchContentCard = new SwitchContentCard("近战领域", "使用自身铁臂上的钻头攻击全局人物").OText("近战领域", "使用自身铁臂上的钻头攻击全局人物", "infiniteAura", "Infinitely enlarge your Aura")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hitboxSwitchContentCard.setExpandableContent(column);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ HitboxShortcutButton.show();
+ } else {
+ HitboxShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hitboxSwitchContentCard, HitboxShortcutButton, new SwitchCallback() {
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+
+ if (newState) {
+
+ notification.make("近战领域", "已开启","InfiniteAura","Open", Notification.Type.SUCCESS);
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ModuleManager.getInstance().setModuleEnabled("近战领域|InfiniteAura", true);
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCF0C0) + 0x608) + 0x0) + 0x88) + 0x70)
+ + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("-55", daddr, AlguiMemTool.TYPE_DWORD, true, true);// 修改目标值
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xC9EA60) + 0x4D0) + 0x480) + 0x6F0)
+ + 0x1D8) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("-55", daddr2, AlguiMemTool.TYPE_DWORD, true, true);// 修改目标值
+ AlguiMemTool.setFreezeDelayMs(1);// 设置冻结修改延迟【毫秒】
+ AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+ notification.make("近战领域", "已关闭","InfiniteAura","Close" ,Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("近战领域|InfiniteAura", false);
+
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCF0C0) + 0x608) + 0x0) + 0x88) + 0x70)
+ + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_DWORD, false, false);// 修改目标值
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xC9EA60) + 0x4D0) + 0x480) + 0x6F0)
+ + 0x1D8) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_DWORD, false, false);// 修改目标值
+ AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return hitboxSwitchContentCard;
+ }
+
+
+
+private BoxContentCard createhxfwSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+final BoxContentCard hxfwSwitchContentCard = new BoxContentCard("核心碰撞箱", "放大所选核心的碰撞箱")
+ .OText("核心碰撞箱", "放大所选核心的碰撞箱", "Zoom", "Zoom BOX")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+hxfwSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+final StatefulButton statefulButton = new StatefulButton("萌新", "Newbie", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler = new Handler(Looper.getMainLooper());
+
+statefulButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("3.281599998474121", AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.ImproveOffset("3.281599998474121", AlguiMemTool.TYPE_FLOAT, 0);
+ AlguiMemTool.ImproveOffset("4.73360013961792", AlguiMemTool.TYPE_FLOAT, 4);
+ AlguiMemTool.ImproveOffset("4.791800022125244", AlguiMemTool.TYPE_FLOAT, 8);
+ AlguiMemTool.MemoryOffsetWrite("350.1145", AlguiMemTool.TYPE_FLOAT, 0, false, false);
+ AlguiMemTool.MemoryOffsetWrite("350.1146", AlguiMemTool.TYPE_FLOAT, 4, false, false);
+ AlguiMemTool.MemoryOffsetWrite("350.1147", AlguiMemTool.TYPE_FLOAT, 8, false, false);
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("350.1145", AlguiMemTool.TYPE_FLOAT); // 内存搜索【主特征码】
+ AlguiMemTool.ImproveOffset("350.1145", AlguiMemTool.TYPE_FLOAT, 0); // 偏移筛选特征码【副特征码】
+ AlguiMemTool.ImproveOffset("350.1146", AlguiMemTool.TYPE_FLOAT, 4); // 偏移筛选特征码【副特征码】
+ AlguiMemTool.ImproveOffset("350.1147", AlguiMemTool.TYPE_FLOAT, 8); // 偏移筛选特征码【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("3.28159999847", AlguiMemTool.TYPE_FLOAT, 0, false, false); // 筛选结果偏移修改【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("4.73360013962", AlguiMemTool.TYPE_FLOAT, 4, false, false); // 筛选结果偏移修改【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("4.79180002213", AlguiMemTool.TYPE_FLOAT, 8, false, false); // 筛选结果偏移修改【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+
+
+ final StatefulButton statefulButton2 = new StatefulButton("夜莺", "Night", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler2 = new Handler(Looper.getMainLooper());
+
+statefulButton2.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("5.107500076293945", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("5.107500076293945", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("4.912199974060059", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("7.106599807739258", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("327.25", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("327.26", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("327.27", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler2.post(new Runnable() {
+ @Override
+ public void run() {
+notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("327.25", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+ AlguiMemTool.ImproveOffset("327.25", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("327.26", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("327.27", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("5.107500076293945", AlguiMemTool.TYPE_FLOAT, 0,
+false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("4.912199974060059", AlguiMemTool.TYPE_FLOAT, 4,
+false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("7.106599807739258", AlguiMemTool.TYPE_FLOAT, 8,
+false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler2.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+ final StatefulButton statefulButton3 = new StatefulButton("网虫", "NetWorm", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler3 = new Handler(Looper.getMainLooper());
+
+statefulButton3.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("4.4567999839782715", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("4.4567999839782715", AlguiMemTool.TYPE_FLOAT,0);// 偏移筛选特征码 【副特征码】
+AlguiMemTool.ImproveOffset("4.437600135803223", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("9.900099754333496", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("347.13", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("347.14", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("347.15", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler3.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("347.13", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("347.13", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("347.14", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("347.15", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("4.4567999839782715",
+ AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.437600135803223", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("9.900099754333496", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler3.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+ final StatefulButton statefulButton4 = new StatefulButton("大家伙", "Big", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler4 = new Handler(Looper.getMainLooper());
+
+statefulButton4.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("6.202899932861328", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("6.202899932861328", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("7.257599830627441", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("11.9798002243042", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("325.1", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("325.2", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("325.3", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler4.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("325.1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("325.1", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("325.2", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("325.3", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("6.202899932861328", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("7.257599830627441", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("71.9798002243042", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler4.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+ final StatefulButton statefulButton5 = new StatefulButton("风声", "Wind", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler5 = new Handler(Looper.getMainLooper());
+
+statefulButton5.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("4.8165998458862305", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("4.8165998458862305", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("2.997499942779541", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("5.773600101470947", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("337.21", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("337.22", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("337.25", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler5.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("337.21", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("337.21", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("337.22", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("337.25", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("4.8165998458862305",
+ AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("2.997499942779541", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("5.773600101470947", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】 AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler5.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+
+ buttonRow.addView(statefulButton);
+ buttonRow.addView(statefulButton2);
+ buttonRow.addView(statefulButton3);
+ buttonRow.addView(statefulButton4);
+ buttonRow.addView(statefulButton5);
+
+ // 把这一行添加到 column 中
+ column.addView(buttonRow);
+
+ final StatefulButton statefulButton7 = new StatefulButton("幻灵", "Spirit", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler6 = new Handler(Looper.getMainLooper());
+
+statefulButton7.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("5.154799938201904", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("5.154799938201904", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("4.906000137329102", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("4.9253997802734375", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("351.11", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("351.15", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("351.17", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler6.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("351.11", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("351.11", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("351.15", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("351.17", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("5.154799938201904", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.906000137329102", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.9253997802734375",
+ AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler6.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+
+ final StatefulButton statefulButton8 = new StatefulButton("铠鼠", "Pangol", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler7 = new Handler(Looper.getMainLooper());
+
+statefulButton8.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("3.605950117111206", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.ImproveOffset("4.161499977111816", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+ AlguiMemTool.ImproveOffset("1.401298464324817E-45", AlguiMemTool.TYPE_FLOAT,
+ 12);// 偏移筛选特征码 【副特征码】
+
+ AlguiMemTool.MemoryOffsetWrite("385.1", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("385.11", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.MemoryOffsetWrite("385.111", AlguiMemTool.TYPE_FLOAT, -4, false,false);// 修改值结果偏移修改
+
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler7.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("385.1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("385.1", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("385.11", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("385.111", AlguiMemTool.TYPE_FLOAT, -4);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("3.605950117111206", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("4.161499977111816", AlguiMemTool.TYPE_FLOAT,4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("1.401298464324817E-45",
+ AlguiMemTool.TYPE_FLOAT, 12, false,false);// 修改值结果偏移修改 AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler7.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+ final StatefulButton statefulButton9 = new StatefulButton("火萤", "Firef", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler8 = new Handler(Looper.getMainLooper());
+
+statefulButton9.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("5.846799850463867", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("5.846799850463867", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("3.3473000526428223", AlguiMemTool.TYPE_FLOAT,4);// 偏移筛选特征码 【副特征码】
+AlguiMemTool.ImproveOffset("6.504799842834473", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("322.25", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("322.26", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("322.27", AlguiMemTool.TYPE_FLOAT, 8, false,false);// 修改值结果偏移修改
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler8.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("322.25", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("322.25", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("322.26", AlguiMemTool.TYPE_FLOAT, 4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("322.27", AlguiMemTool.TYPE_FLOAT, 8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("5.846799850463867", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("3.3473000526428223",
+ AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("6.504799842834473", AlguiMemTool.TYPE_FLOAT,8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler8.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+final StatefulButton statefulButton10 = new StatefulButton("铁驭", "Man", false); // 默认开启
+
+// 在主线程中创建 Handler
+final Handler mainHandler9 = new Handler(Looper.getMainLooper());
+
+statefulButton10.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+ // 子线程执行耗时操作
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ if (newState) {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+ AlguiMemTool.MemorySearch("5.98920017203857", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+AlguiMemTool.ImproveOffset("11.951499938964844", AlguiMemTool.TYPE_FLOAT,-4);// 偏移筛选特征码 【副特征码】
+AlguiMemTool.ImproveOffset("5.98920017203857", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("301.11", AlguiMemTool.TYPE_FLOAT, 0, false,false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("301.15", AlguiMemTool.TYPE_FLOAT, -4,
+ false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("301.16", AlguiMemTool.TYPE_FLOAT, -8,
+ false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+ 核心自改();
+
+ // 回到主线程更新 UI
+ mainHandler9.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已开启","Zoom","Open", Notification.Type.SUCCESS);
+ }
+ });
+ } else {
+ AlguiMemTool.clearResultList();
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);
+AlguiMemTool.MemorySearch("301.11", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.ImproveOffset("301.11", AlguiMemTool.TYPE_FLOAT, 0);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("301.15", AlguiMemTool.TYPE_FLOAT, -4);// 偏移筛选特征码
+ // 【副特征码】
+AlguiMemTool.ImproveOffset("301.16", AlguiMemTool.TYPE_FLOAT, -8);// 偏移筛选特征码
+ // 【副特征码】
+
+AlguiMemTool.MemoryOffsetWrite("5.98920017203857", AlguiMemTool.TYPE_FLOAT,0, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("11.951499938964844",
+ AlguiMemTool.TYPE_FLOAT, -4, false,false);// 修改值结果偏移修改
+// 【如果需要冻结将false改为true】
+AlguiMemTool.MemoryOffsetWrite("5.98920017203857", AlguiMemTool.TYPE_FLOAT,-8, false,false);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList(); // 修改完成 则清空这次的搜索结果
+
+ // 回到主线程更新 UI
+ mainHandler9.post(new Runnable() {
+ @Override
+ public void run() {
+ notification.make("核心碰撞箱", "已关闭","Zoom","close", Notification.Type.ERROR);
+ }
+ });
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ // 如果需要在 UI 中显示错误,也可以在这里添加逻辑
+ }
+ }
+ }).start();
+
+ return true;
+ }
+});
+
+
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow2 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow2.addView(statefulButton7);
+ buttonRow2.addView(statefulButton8);
+ buttonRow2.addView(statefulButton9);
+ buttonRow2.addView(statefulButton10);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow2);
+
+
+ return hxfwSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ // 毒圈共享ui
+ private SwitchContentCard createLbSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton lbShortcutButton = new SwitchShortcutButton().setText("毒圈共享");
+
+ final SwitchContentCard lbSwitchContentCard = new SwitchContentCard("毒圈共享", "利用游戏特性改变毒圈的效果").OText("毒圈共享", "利用游戏特性改变毒圈的效果","Share", "Share toxicity with global players.")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+ // 创建一个可折叠的内容区域,用于放置设置选项
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+ lbSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+ // 添加单体目标的文本提示
+
+ // 添加一键开启的文本提示
+ final Text reachText1 = new Text()
+ .setText("模式:","Mode:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText1); // 将文本添加到内容区域
+
+ // 创建另一个单选按钮组,用于选择一键开启的行为
+ final RadioGroup radioGroup1 = new RadioGroup().setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ radioGroup1.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(15)));
+ radioGroup1.setEnabled(true);
+
+ radioGroup1.addButton("普通版","Basic", "1"); // 添加单次选项
+ radioGroup1.addButton("升级版","Super", "2"); // 添加循环选项
+ final String[] selectedOption = { "1" }; // 默认选中第一个选项
+ radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+ column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+ // 添加一个分隔线
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1)) // 分隔线高度为1dp
+ .setTopMargin(dip2pxInt(15))) // 顶部外边距为15dp
+ .setBackgroundColor(hexColor("#40D0D0D0")); // 分隔线颜色为灰色
+ column.addView(divider); // 将分隔线添加到内容区域;
+
+ // 添加一个快捷键开关,用于控制快捷键按钮的显示和隐藏
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ lbShortcutButton.show(); // 显示快捷键按钮
+
+ } else {
+ lbShortcutButton.dismiss(); // 隐藏快捷键按钮
+
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent); // 将快捷键开关添加到内容区域
+
+ SyncUtil.sync(lbSwitchContentCard, lbShortcutButton, new SwitchCallback() {
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+
+ if (newState) {
+ModuleManager.getInstance().setModuleEnabled("毒圈共享|Share", true);
+ notification.make("毒圈共享", "已开启","Share","Open", Notification.Type.SUCCESS);
+ executeBehavior2(selectedOption[0], true); // 执行选中的行为
+
+ // 执行新的二进制文件
+
+ } else {
+ notification.make("毒圈共享", "已关闭","Share","close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("毒圈共享|Share", false);
+ executeBehavior2(selectedOption[0], false); // 停止执行行为
+ }
+ return true;
+ }
+ });
+
+ return lbSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+ // 模块缴械ui
+ private BoxContentCard createjiaoxSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+ final BoxContentCard jiaoxSwitchContentCard = new BoxContentCard("模块缴械", "指定模块的范围").OText("模块缴械","指定模块的范围","Disarm","Disarm a weapon").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+ // 创建一个可折叠的内容区域,用于放置设置选项
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+ jiaoxSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+ final StatefulButton statefulButton = new StatefulButton("机枪");// 默认开启
+ statefulButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("8.22770023346", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1546787", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行","Disarm","Open", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1546787", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("8.22770023346", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭","Disarm","close", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton2 = new StatefulButton("榴弹");
+ statefulButton2.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton2.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("8.54459953308", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.164467", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.164467", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("8.54459953308", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton3 = new StatefulButton("激光");
+ statefulButton3.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton3.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("6.71939992905", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.14943787", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.14943787", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("6.71939992905", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton4 = new StatefulButton("穹弩");
+ statefulButton4.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton4.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.5188999176", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.6494867", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.6494867", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.5188999176", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+final StatefulButton statefulButton5 = new StatefulButton("穿云");
+ statefulButton5.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton5.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.72060012817", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1437077", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1437077", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.72060012817", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow.addView(statefulButton);
+ buttonRow.addView(statefulButton2);
+ buttonRow.addView(statefulButton3);
+ buttonRow.addView(statefulButton4);
+ buttonRow.addView(statefulButton5);
+
+ // 把这一行添加到 column 中
+ column.addView(buttonRow);
+
+ final StatefulButton statefulButton7 = new StatefulButton("腾跃", false);// 默认开启
+ statefulButton7.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.07539987564", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1579107", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1579107", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.07539987564", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton8 = new StatefulButton("漫步");
+ statefulButton8.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton8.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("2.64549994469", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1648467", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1648467", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("2.64549994469", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton9 = new StatefulButton("迫击炮");
+ statefulButton9.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton9.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.37040042877", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.7870787", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.7870787", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.37040042877", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton10 = new StatefulButton("磁爆");
+ statefulButton10.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton10.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("13.03429985046", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4364867", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4364867", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("13.03429985046", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton12 = new StatefulButton("霜鸟");
+ statefulButton12.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton12.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.59529972076", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.439967", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.439967", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.59529972076", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow2 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow2.addView(statefulButton7);
+ buttonRow2.addView(statefulButton8);
+ buttonRow2.addView(statefulButton9);
+ buttonRow2.addView(statefulButton10);
+
+ buttonRow2.addView(statefulButton12);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow2);
+
+ final StatefulButton statefulButton13 = new StatefulButton("隐身", false);// 默认开启
+ statefulButton13.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.59529972076", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1401837", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1401837", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.59529972076", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton14 = new StatefulButton("分身");
+ statefulButton14.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton14.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.16669988632", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.490067", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.490067", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.16669988632", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton15 = new StatefulButton("天罚");
+ statefulButton15.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton5.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("4.01609992981", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.14491677", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.14491677", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("4.01609992981", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton17 = new StatefulButton("机翼");
+ statefulButton17.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton17.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("4.93489980698", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4303677", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4303677", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("4.93489980698", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton18 = new StatefulButton("T尾");
+ statefulButton18.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(8))); // 添加左边距,产生间距效果
+ statefulButton18.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("15.64350032806", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.013487", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.013487", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("15.64350032806", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow3 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow3.addView(statefulButton13);
+ buttonRow3.addView(statefulButton14);
+ buttonRow3.addView(statefulButton15);
+
+ buttonRow3.addView(statefulButton17);
+ buttonRow3.addView(statefulButton18);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow3);
+
+ final StatefulButton statefulButton19 = new StatefulButton("大力神", false);// 默认开启
+ statefulButton19.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.31659984589", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.10467977", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.10467977", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.31659984589", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton21 = new StatefulButton("大刀");
+ statefulButton21.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton21.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("1.7661999464", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.407379087", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.407379087", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("1.7661999464", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton22 = new StatefulButton("球闪");
+ statefulButton22.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton22.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.19360017776", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4407687", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4407687", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.19360017776", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton23 = new StatefulButton("螺旋桨");
+ statefulButton23.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton23.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.4841003418", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.0437807", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.0437807", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.4841003418", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton24 = new StatefulButton("陨星");
+ statefulButton24.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton24.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("3.42370009422", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.0467707", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.0467707", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("3.42370009422", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow4 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow4.addView(statefulButton19);
+
+ buttonRow4.addView(statefulButton21);
+ buttonRow4.addView(statefulButton22);
+ buttonRow4.addView(statefulButton23);
+ buttonRow4.addView(statefulButton24);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow4);
+
+ final StatefulButton statefulButton25 = new StatefulButton("追猎", false);// 默认开启
+ statefulButton25.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.17169952393", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.1437077", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.1437077", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.17169952393", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton27 = new StatefulButton("黑洞");
+ statefulButton27.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton27.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("7.19360017776", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.4318173887", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.4318173887", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("7.19360017776", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton28 = new StatefulButton("谢幕");
+ statefulButton28.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton28.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("6.66480016708", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.0146877", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.0146877", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("6.66480016708", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton29 = new StatefulButton("千面");
+ statefulButton29.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton29.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("6.52860021591", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.31876607", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.31876607", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("6.52860021591", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton30 = new StatefulButton("狼群");
+ statefulButton30.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton30.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.77509975433", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.046787507", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.046787507", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.77509975433", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow5 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow5.addView(statefulButton25);
+
+ buttonRow5.addView(statefulButton27);
+ buttonRow5.addView(statefulButton28);
+ buttonRow5.addView(statefulButton29);
+ buttonRow5.addView(statefulButton30);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow5);
+
+ final StatefulButton statefulButton31 = new StatefulButton("大盾", false);// 默认开启
+ statefulButton31.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("20.31669998169", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.13487004", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.13487004", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("20.31669998169", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+
+ }
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton32 = new StatefulButton("蜂巢");
+ statefulButton32.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton32.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("10.17140007019", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.404680067", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.404680067", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("10.17140007019", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton33 = new StatefulButton("泡泡枪");
+ statefulButton33.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton33.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("11.37860012054", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.04677887", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.04677887", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("11.37860012054", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton34 = new StatefulButton("闪光弹");
+ statefulButton34.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton34.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("9.4329996109", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.34978350", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.34978350", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("9.4329996109", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+
+
+ final StatefulButton statefulButton36 = new StatefulButton("心环");
+ statefulButton36.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(5))); // 添加左边距,产生间距效果
+ statefulButton36.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (espkg) {
+
+ if (newState) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("13.03429985046", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("799.04370407", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已执行", Notification.Type.SUCCESS);
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_ALLOC);// 设置内存
+ AlguiMemTool.MemorySearch("799.04370407", AlguiMemTool.TYPE_FLOAT);// 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("13.03429985046", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ notification.make("模块缴械", "已关闭", Notification.Type.ERROR);
+ }
+ }
+ return true;
+ }
+ });
+
+ // 创建一个 Row 容器,把按钮放在同一行
+ Row buttonRow6 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+
+ buttonRow6.addView(statefulButton31);
+ buttonRow6.addView(statefulButton32);
+ buttonRow6.addView(statefulButton33);
+ buttonRow6.addView(statefulButton34);
+
+ buttonRow6.addView(statefulButton36);
+ // 把这一行添加到 column 中
+ column.addView(buttonRow6);
+
+ return jiaoxSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+ // 模块缴械ui
+
+
+
+
+
+
+
+
+
+
+ // 根据 单选按钮 执行对应行为
+
+ private void executeBehavior1(String selectedOption, boolean enable) {
+ if (enable) {
+
+ ace.executeHiddenBinary(getAction1(selectedOption));
+
+ } else {
+ ace.stopBinary(getCloseAction1(selectedOption));
+ }
+ }
+
+ // 根据选中的选项,执行对应的行为
+ private void executeBehavior2(String selectedOption, boolean enable) {
+ if (enable) {
+ getAction2(selectedOption);
+ } else {
+
+ getCloseAction2(selectedOption);
+ }
+ }
+
+ // 根据选项获取对应的行为
+
+ private String getAction1(String option) {// 铁臂猎手
+ switch (option) {
+ case "1":
+ ace.executeHiddenBinary("libxfw.so");
+ return "小";
+
+ case "2":
+ ace.executeHiddenBinary("libzcfw.so");
+ return "正常";
+
+ case "3":
+ ace.executeHiddenBinary("libdfw.so");
+ return "大";
+
+ default:
+ return "";
+ }
+
+ }
+
+ private String getAction99(String option) {// 铁臂猎手
+ switch (option) {
+ case "1":
+
+ return "small";
+
+ case "2":
+
+ return "basic";
+
+ case "3":
+
+ return "super";
+
+ default:
+ return "";
+ }
+
+ }
+
+
+ private String getAction2(String option) {// 毒圈共享
+ switch (option) {
+
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCFD770) + 0x3B8) + 0x2F8)
+ + 0x80) + 0x88) + 0x10C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("99999999999999999999999999999999", daddr, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x7C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("99999999999999999999999999999999", daddr2, AlguiMemTool.TYPE_FLOAT, true, true);// 修改目标值
+
+ return "普通版";
+ case "2":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x70) + 0x10) + 0xF8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("-9999999", daddr1, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ return "升级版";
+
+ default:
+ return "普通版";
+ }
+
+ }
+
+ // 根据选项获取对应的行为关闭逻辑
+ private String getCloseAction1(String option) {
+ switch (option) {
+ case "1":
+ ace.stopBinary("libxfw.so");
+ return "小";
+ case "2":
+ ace.stopBinary("libzcfw.so");
+ return "正常";
+ case "3":
+ ace.stopBinary("libdfw.so");
+ return "大";
+ default:
+ return "";
+ }
+ }
+
+ private String getCloseAction2(String option) {// 毒圈共享
+ switch (option) {
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCFD770) + 0x3B8) + 0x2F8)
+ + 0x80) + 0x88) + 0x10C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0.001", daddr, AlguiMemTool.TYPE_FLOAT, false, false);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x7C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0.001", daddr2, AlguiMemTool.TYPE_FLOAT, false, false);// 修改目标值
+
+ return "普通版";
+ case "2":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+ AlguiMemTool.MemorySearch("0.0000000001", AlguiMemTool.TYPE_FLOAT);// 内存搜索
+ // 【主特征码】
+ AlguiMemTool.MemoryOffsetWrite("30", AlguiMemTool.TYPE_FLOAT, 0, false, false);// 修改值结果偏移修改
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ return "升级版";
+ default:
+ return "小";
+ }
+ }}
+
+
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/ESPCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/ESPCategoryBox.java
new file mode 100644
index 0000000..8e309d2
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/ESPCategoryBox.java
@@ -0,0 +1,663 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import java.security.Identity;
+import com.bytecat.algui.ace;
+import android.content.Context;
+import android.app.Activity;
+import java.lang.ref.WeakReference;
+import irene.window.algui.Tools.HackerTool;
+import irene.window.algui.MainActivity;
+import java.util.concurrent.ConcurrentHashMap;
+import java.io.InputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import irene.window.algui.AlGuiBubbleNotification;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import com.bytecat.algui.ui.component.Button;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.ClickCallback;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.ArrayList;
+import android.os.Handler;
+import com.bytecat.algui.AlguiWindows.AlguiWinInform;
+import com.bytecat.algui.AlguiManager.AlguiLog;
+import com.bytecat.algui.AlguiViews.AlguiViewText;
+import android.graphics.Paint;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+import android.os.Looper;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
+import android.view.WindowManager;
+import java.util.concurrent.Future;
+import java.util.concurrent.Callable;
+import android.graphics.Path;
+import java.util.concurrent.TimeUnit;
+import com.bytecat.algui.AlguiWindows.AlguiWinDraw;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.BoxContentCard;
+import java.util.concurrent.CopyOnWriteArrayList;
+import android.os.AsyncTask;
+import com.bytecat.algui.effect.ArrayListView;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.effect.ColorPickerPopup;
+import java.io.FileInputStream;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.BufferedWriter;
+import android.graphics.PointF;
+import java.util.Timer;
+import java.util.TimerTask;
+
+
+
+
+
+
+public class ESPCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+ AlguiWinDraw draw = initDraw(MIX.getContext());
+
+ // 保留原有的标志变量
+
+
+ public static final long BASE_OFFSET = 0x454090;
+
+ private static long matrixsAddr;
+
+
+ private static float readFloatFromMemory(long address) throws NumberFormatException {
+ if (address <= 0) {
+ return 0;
+ }
+ String memData = AlguiMemTool.getMemoryAddrData(address, AlguiMemTool.TYPE_FLOAT);
+ return Float.parseFloat(memData);
+ }
+
+
+
+
+
+
+ private static Activity context;
+
+
+ public static float x;
+public static float y;
+public static float z;
+
+
+public static File dir = new File("/storage/emulated/0/TC配置文件/");
+public static File file = new File(dir, "coordinate1.txt");
+
+
+
+
+
+
+
+public static void 获取坐标() {
+// 1. 获取bss段基址
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long baseAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+// 2. 多级指针跳转计算坐标地址
+long pointerPath = baseAddr + BASE_OFFSET;
+long jumpAddr1 = AlguiMemTool.jump64(pointerPath);
+long jumpAddr2 = AlguiMemTool.jump64(jumpAddr1 + 0x0);
+long jumpAddr3 = AlguiMemTool.jump64(jumpAddr2 + 0x70);
+long jumpAddr4 = AlguiMemTool.jump64(jumpAddr3 + 0x10);
+long finalAddr = jumpAddr4 + 0xA0;
+// 3. 设置坐标地址
+long selfZaddr = finalAddr;
+long selfYaddr = selfZaddr + 0x4;
+long selfXaddr = selfZaddr + 0x8;
+// 4. 验证坐标值
+ z = readFloatFromMemory(selfXaddr);
+ x = readFloatFromMemory(selfZaddr);
+float y0 = readFloatFromMemory(selfYaddr);
+ y = y0+30; //高度高一点
+}
+
+public static void 检查() {
+File dir = new File("/storage/emulated/0/TC配置文件/");
+if (!dir.exists()) {
+ dir.mkdirs(); // 创建文件夹
+}
+}
+
+
+
+
+ public ESPCategoryBox() {
+ contentContainer
+
+
+.addView(createchushSwitchContentCard())
+.addView(createhzmbSwitchContentCard())
+.addView(createddhzSwitchContentCard())
+
+;
+ }
+
+
+
+private SwitchContentCard createchushSwitchContentCard() {
+ final SwitchContentCard chushSwitchContentCard = new SwitchContentCard("初始化", "初始化相关数据").OText("初始化", "初始化相关数据","Initialize","Initialize relevant data").setChecked(false);
+
+ chushSwitchContentCard.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+AlguiMemTool.setPackageName("com.vortex.celestial");
+ if (newState) {
+ notification.make("绘制", "已开启","ESP","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("绘制|ESP", true);
+ zhenespkg = true;
+// 启动
+draw = Fastesp.start(context);
+draw.startDraw();
+
+ } else {
+ notification.make("绘制", "已关闭","ESP","close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("绘制|ESP", false);
+zhenespkg = false;
+// 停止
+Fastesp.stop();
+
+ }
+ return true;
+ }
+ });
+
+ return chushSwitchContentCard;
+}
+
+
+
+
+
+
+private BoxContentCard createhzmbSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+final BoxContentCard hzmbSwitchContentCard = new BoxContentCard("目标", "选择绘制的目标")
+ .OText("目标", "选择绘制的目标", "The goal of drawing", "Select the target for drawing")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+hzmbSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+
+
+ final StatefulButton statefulButton = new StatefulButton("玩家","player", true);
+ statefulButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (zhenespkg)
+if (newState) {
+Fastesp.setDrawPlayers(true);
+}else{
+Fastesp.setDrawPlayers(false);
+}
+
+
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton2 = new StatefulButton("物品","Article", false);
+ statefulButton2.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (zhenespkg)
+if (newState) {
+Fastesp.setDrawItems(true);
+}else{
+Fastesp.setDrawItems(false);
+}
+ return true;
+ }
+ });
+
+
+ // 创建第一行按钮
+ Row buttonRow1 = new Row();
+ buttonRow1.setLayoutParams(new LinearParams().setWidth(BaseHelper.MatchParent).setHeight(BaseHelper.WrapContent));
+
+ buttonRow1.addView(statefulButton);
+ buttonRow1.addView(statefulButton2);
+ column.addView(buttonRow1);
+
+
+
+
+ return hzmbSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+
+
+
+
+
+
+private BoxContentCard createddhzSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+final BoxContentCard ddhzSwitchContentCard = new BoxContentCard("定点", "绘制一个可以保存的固定红点")
+ .OText("定点", "绘制一个可以保存的固定红点", "Fixed point", "Draw a fixed red dot that can be saved")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+ddhzSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+
+
+
+
+
+ final Text label1 = new Text()
+ .setText("x="+",y="+",z=")
+ .setTextSize(10f)
+ .setTextColor(0xFFC5C5C5)
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(label1);
+
+
+
+final StatefulButton statefulButton1 = new StatefulButton("创建", "Create", false);
+
+statefulButton1.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ File langFile = new File("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ boolean isChinese = langFile.exists();
+
+ if (newState) {
+ // 开启状态
+
+Fastesp.creatred(x,y,z,"id");
+ statefulButton1.text.setText(isChinese ? "删除" : "Delete");
+ } else {
+ // 关闭状态
+
+Fastesp.deletered("id");
+ statefulButton1.text.setText(isChinese ? "创建" : "Create");
+ }
+
+ return true; // 允许状态变化
+ }
+});
+
+final Text shu1 = new Text()
+ .setText("|")
+ .setTextSize(15f)
+ .setTextColor(0xFFC5C5C5)
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams().setHeight(BaseHelper.WrapContent)
+);
+
+final RadioGroup radioGroup1 = new RadioGroup()
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+radioGroup1.setLayoutParams(new LinearParams().setWidth(BaseHelper.MatchParent));
+radioGroup1.setEnabled(true);
+
+radioGroup1.addButton("获取", "Get", "1");
+radioGroup1.addButton("保存", "Save", "2");
+radioGroup1.addButton("读取", "Load", "3");
+radioGroup1.addButton("传送", "Teleport", "4");
+
+// ✅ 关键:取消默认选中
+for (StatefulButton btn : radioGroup1.map.values()) {
+ btn.setChecked(false);
+}
+
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ switch (id) {
+ case "1"://获取
+ 获取坐标();
+ label1.setText("x=" + x + ",y=" + y + ",z=" + z);
+ break;
+ case "2"://保存
+检查();
+
+if (!file.exists()) {
+ try {
+file.createNewFile(); // 创建文件
+} catch (IOException e) {e.printStackTrace();}
+ }
+
+try {
+
+ if (!dir.exists()) dir.mkdirs();
+
+ BufferedWriter bw = new BufferedWriter(new FileWriter(file));
+ bw.write("x=" + x);
+ bw.newLine();
+ bw.write("y=" + y);
+ bw.newLine();
+ bw.write("z=" + z);
+ bw.close();
+} catch (IOException e) {
+ e.printStackTrace();
+}
+ break;
+ case "3"://读取
+try {
+
+ if (file.exists()) {
+ BufferedReader br = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = br.readLine()) != null) {
+ if (line.startsWith("x=")) {
+ x = Float.parseFloat(line.substring(2).trim());
+ } else if (line.startsWith("y=")) {
+ y = Float.parseFloat(line.substring(2).trim());
+ } else if (line.startsWith("z=")) {
+ z = Float.parseFloat(line.substring(2).trim());
+ }
+ }
+ br.close();
+ }
+} catch (IOException e) {
+ e.printStackTrace();
+}
+label1.setText("x=" + x + ",y=" + y + ",z=" + z);
+break;
+
+ case "4"://传送
+//x
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList(); // 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB); // 获取模块基址
+long zuobiaox = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA8; // 跳转指针
+long zuobiaoy = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA4; // 跳转指针
+long zuobiaoz = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA0; // 跳转指针
+
+ AlguiMemTool.setMemoryAddrValue(""+y, zuobiaoy,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+z, zuobiaox,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+x, zuobiaoz,AlguiMemTool.TYPE_FLOAT, false ,true);
+AlguiMemTool.setMemoryAddrValue(""+y, zuobiaoy,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+z, zuobiaox,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+x, zuobiaoz,AlguiMemTool.TYPE_FLOAT, false ,true);
+ break;
+ }
+ }
+});
+
+
+Row buttonRow1 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow1.addView(statefulButton1);
+ buttonRow1.addView(shu1);
+ buttonRow1.addView(radioGroup1);
+
+
+
+ // 把这一行添加到 column 中
+ column.addView(buttonRow1);
+
+ return ddhzSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private enum Color {
+ RED(0xFFFF0000), // 红色
+ GREEN(0xFF00FF00), // 绿色
+ BLUE(0xFF0000FF), // 蓝色
+ YELLOW(0xFFFFFF00), // 黄色
+ WHITE(0xFFFFFFFF), // 白色
+ BLACK(0xFF000000), // 黑色
+ ORANGE(0xFFFFA500), // 橙色
+ PURPLE(0xFF800080), // 紫色
+ PINK(0xFFFFC0CB), // 粉色
+ CYAN(0xFF00FFFF), // 青色
+ MAGENTA(0xFFFF00FF), // 洋红色
+ GRAY(0xFF808080); // 灰色
+
+ private final int value; // 存储颜色值
+
+ // 私有构造函数
+ Color(int value) {
+ this.value = value;
+ }
+
+ // 获取颜色值的方法
+ public int getValue() {
+ return value;
+ }
+ }
+
+ private enum CollisionBodyType {
+ ENTITY, // 实体
+ PLAYER, // 角色
+ PICKUP // 拾取物
+ }
+
+ // 碰撞体对象
+ private static class CollisionBody {
+ long address; // 内存地址
+ CollisionBodyType type; // 类型
+ int feature1; // 特征值1
+ int feature2; // 特征值2
+ }
+
+ // 绘制对象
+ private static class DrawObject {
+ long address; // 内存地址
+ Color color; // 颜色
+ CollisionBodyType type; // 类型
+ int dis;
+ int x;
+ int y;
+ }
+
+ private static final int pSize = 8;
+ // 被选中对象内存地址
+ private static long selectedAddr = 0;
+
+ // 碰撞体数组地址
+ static long collAddr;
+
+ // 碰撞体数组起始地址
+ static long collAddrStart;
+
+ // 碰撞体列表
+ private static CopyOnWriteArrayList collList = new
+ CopyOnWriteArrayList<>();
+
+ // 绘制对象列表
+ private static ArrayList drawList = new ArrayList<>();
+
+ // 是否开启ESP(不是)
+ private static boolean espkg =true;
+ // 是否开启ESP("这个才是)
+ private static boolean zhenespkg =false;
+ // 是否绘制所有碰撞体
+ private static boolean isDrawALLColl = false;
+
+ // 是否绘制玩家
+ private static boolean isDrawPlayer = true;
+
+ // 是否绘制拾取物
+ private static boolean isDrawPickup = false;
+
+ // 是否绘制里准星最近目标
+ private static boolean isDrawCrosshair = false;
+
+ // 跳转指针简化方法
+ public static long jump(long addr) {
+ return AlguiMemTool.jump(addr, pSize);
+ }
+
+ // 获取数组地址
+ private static boolean getArrayAddr() {
+ if (collAddrStart != 0)
+ return true; // 如果已缓存地址,直接返回成功
+
+ // 设置游戏包名并获取进程ID
+ int pid = AlguiMemTool.setPackageName("com.vortex.celestial");
+ if (pid <= 0)
+ return false;
+
+ // 获取模块基地址
+ long module = AlguiMemTool.getModuleBaseAddr("libclient.so", AlguiMemTool.HEAD_CB);
+ if (module <= 0)
+ return false;
+
+ // 获取碰撞体数组地址
+ long collAddr = jump(module + 0xDCBC30) + 0x3C0;
+ if (collAddr <= 0)
+ return false;
+
+
+ collAddrStart = jump(collAddr); // 更新 collAddrStart 的值
+ return true; // 成功获取地址
+ }
+
+ // 数组更新方法
+ private static void updateArray() {
+ // 创建临时列表存储新数据
+ ArrayList newCollList = new ArrayList<>();
+
+ try {
+ int size = Integer.parseInt(AlguiMemTool.getMemoryAddrData(collAddr + 0x2C, AlguiMemTool.TYPE_DWORD));
+
+ // 遍历碰撞体数组并过滤
+ for (int i = 0; i < size; i++) {
+ CollisionBody p = new CollisionBody();
+ DrawObject d = new DrawObject();
+ p.address = jump(collAddrStart + i * pSize);
+
+ // 批量读取内存数据提高性能
+ p.feature1 = Integer
+ .parseInt(AlguiMemTool.getMemoryAddrData(p.address + 0xAC, AlguiMemTool.TYPE_DWORD));
+ p.feature2 = Integer.parseInt(AlguiMemTool.getMemoryAddrData(p.address + 0x8, AlguiMemTool.TYPE_DWORD));
+
+ // 特征值过滤逻辑优化
+ if (p.feature2 == 196614) {
+ if (isDrawPlayer && p.feature1 == 17039361) {
+ d.address = p.address;
+ d.color = Color.GREEN;
+ d.type = CollisionBodyType.PLAYER;
+ newCollList.add(d);
+ } else if (isDrawPickup && p.feature1 == 17039617) {
+ d.address = p.address;
+ d.color = Color.PURPLE;
+ d.type = CollisionBodyType.PICKUP;
+ newCollList.add(d);
+ }
+ } else if (isDrawALLColl) {
+ d.address = p.address;
+ d.color = Color.GRAY;
+ d.type = CollisionBodyType.ENTITY;
+ newCollList.add(d);
+ }
+ }
+ } catch (NumberFormatException e) {
+ return;
+ }
+
+ // 替换旧列表(原子操作)
+ drawList.clear();
+ drawList.addAll(newCollList);
+
+ }
+
+ // 定义一个单线程线程池,用于执行数组循环更新任务
+ private static final ExecutorService arrayUpdateExecutor = Executors.newSingleThreadExecutor();
+
+ // 循环更新数组方法
+ private static void updateArrayLoop() {
+ arrayUpdateExecutor.submit(new Runnable() {
+ @Override
+ public void run() {
+ while (zhenespkg) {
+ updateArray();
+ try {
+ Thread.sleep(50); // 线程休眠50毫秒
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ Thread.currentThread().interrupt();
+ break;
+ }
+ }
+ }
+ });
+ }
+
+ // 初始化绘制窗口方法
+private static AlguiWinDraw initDraw(Context context) {
+
+ return Fastesp.start(context);
+}
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/ESPCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/ESPCategoryBox.java.bak
new file mode 100644
index 0000000..85adb82
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/ESPCategoryBox.java.bak
@@ -0,0 +1,663 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import java.security.Identity;
+import com.bytecat.algui.ace;
+import android.content.Context;
+import android.app.Activity;
+import java.lang.ref.WeakReference;
+import irene.window.algui.Tools.HackerTool;
+import irene.window.algui.MainActivity;
+import java.util.concurrent.ConcurrentHashMap;
+import java.io.InputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import irene.window.algui.AlGuiBubbleNotification;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import com.bytecat.algui.ui.component.Button;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.ClickCallback;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.ArrayList;
+import android.os.Handler;
+import com.bytecat.algui.AlguiWindows.AlguiWinInform;
+import com.bytecat.algui.AlguiManager.AlguiLog;
+import com.bytecat.algui.AlguiViews.AlguiViewText;
+import android.graphics.Paint;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+import android.os.Looper;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
+import android.view.WindowManager;
+import java.util.concurrent.Future;
+import java.util.concurrent.Callable;
+import android.graphics.Path;
+import java.util.concurrent.TimeUnit;
+import com.bytecat.algui.AlguiWindows.AlguiWinDraw;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.BoxContentCard;
+import java.util.concurrent.CopyOnWriteArrayList;
+import android.os.AsyncTask;
+import com.bytecat.algui.effect.ArrayListView;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.effect.ColorPickerPopup;
+import java.io.FileInputStream;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.BufferedWriter;
+import android.graphics.PointF;
+import java.util.Timer;
+import java.util.TimerTask;
+
+
+
+
+
+
+public class ESPCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+ AlguiWinDraw draw = initDraw(MIX.getContext());
+
+ // 保留原有的标志变量
+
+
+ public static final long BASE_OFFSET = 0x454090;
+
+ private static long matrixsAddr;
+
+
+ private static float readFloatFromMemory(long address) throws NumberFormatException {
+ if (address <= 0) {
+ return 0;
+ }
+ String memData = AlguiMemTool.getMemoryAddrData(address, AlguiMemTool.TYPE_FLOAT);
+ return Float.parseFloat(memData);
+ }
+
+
+
+
+
+
+ private static Activity context;
+
+
+ public static float x;
+public static float y;
+public static float z;
+
+
+public static File dir = new File("/storage/emulated/0/TC配置文件/");
+public static File file = new File(dir, "coordinate1.txt");
+
+
+
+
+
+
+
+public static void 获取坐标() {
+// 1. 获取bss段基址
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long baseAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+// 2. 多级指针跳转计算坐标地址
+long pointerPath = baseAddr + BASE_OFFSET;
+long jumpAddr1 = AlguiMemTool.jump64(pointerPath);
+long jumpAddr2 = AlguiMemTool.jump64(jumpAddr1 + 0x0);
+long jumpAddr3 = AlguiMemTool.jump64(jumpAddr2 + 0x70);
+long jumpAddr4 = AlguiMemTool.jump64(jumpAddr3 + 0x10);
+long finalAddr = jumpAddr4 + 0xA0;
+// 3. 设置坐标地址
+long selfZaddr = finalAddr;
+long selfYaddr = selfZaddr + 0x4;
+long selfXaddr = selfZaddr + 0x8;
+// 4. 验证坐标值
+ z = readFloatFromMemory(selfXaddr);
+ x = readFloatFromMemory(selfZaddr);
+float y0 = readFloatFromMemory(selfYaddr);
+ y = y0+30; //高度高一点
+}
+
+public static void 检查() {
+File dir = new File("/storage/emulated/0/TC配置文件/");
+if (!dir.exists()) {
+ dir.mkdirs(); // 创建文件夹
+}
+}
+
+
+
+
+ public ESPCategoryBox() {
+ contentContainer
+
+
+.addView(createchushSwitchContentCard())
+.addView(createhzmbSwitchContentCard())
+.addView(createddhzSwitchContentCard())
+
+;
+ }
+
+
+
+private SwitchContentCard createchushSwitchContentCard() {
+ final SwitchContentCard chushSwitchContentCard = new SwitchContentCard("初始化", "初始化相关数据").OText("初始化", "初始化相关数据","Initialize","Initialize relevant data").setChecked(false);
+
+ chushSwitchContentCard.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+AlguiMemTool.setPackageName("com.vortex.celestial");
+ if (newState) {
+ notification.make("绘制", "已开启","ESP","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("绘制|ESP", true);
+ zhenespkg = true;
+// 启动
+draw = Fastesp.start(context);
+draw.startDraw();
+
+ } else {
+ notification.make("绘制", "已关闭","ESP","close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("绘制|ESP", false);
+zhenespkg = false;
+// 停止
+Fastesp.stop();
+
+ }
+ return true;
+ }
+ });
+
+ return chushSwitchContentCard;
+}
+
+
+
+
+
+
+private BoxContentCard createhzmbSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+final BoxContentCard hzmbSwitchContentCard = new BoxContentCard("目标", "选择绘制的目标")
+ .OText("目标", "选择绘制的目标", "The goal of drawing", "Select the target for drawing")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+hzmbSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+
+
+ final StatefulButton statefulButton = new StatefulButton("玩家","player", true);
+ statefulButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (zhenespkg)
+if (newState) {
+Fastesp.setDrawPlayers(true);
+}else{
+Fastesp.setDrawPlayers(false);
+}
+
+
+
+ return true;
+ }
+ });
+
+ final StatefulButton statefulButton2 = new StatefulButton("物品","Article", false);
+ statefulButton2.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (zhenespkg)
+if (newState) {
+Fastesp.setDrawItems(true);
+}else{
+Fastesp.setDrawItems(false);
+}
+ return true;
+ }
+ });
+
+
+ // 创建第一行按钮
+ Row buttonRow1 = new Row();
+ buttonRow1.setLayoutParams(new LinearParams().setWidth(BaseHelper.MatchParent).setHeight(BaseHelper.WrapContent)
+.setTopMargin(dip2pxInt(10)));
+ buttonRow1.addView(statefulButton);
+ buttonRow1.addView(statefulButton2);
+ column.addView(buttonRow1);
+
+
+
+
+ return hzmbSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+
+
+
+
+
+
+private BoxContentCard createddhzSwitchContentCard() {
+ // 创建一个可切换内容的卡片,用于显示和管理核心碰撞箱的设置
+final BoxContentCard ddhzSwitchContentCard = new BoxContentCard("定点", "绘制一个可以保存的固定红点")
+ .OText("定点", "绘制一个可以保存的固定红点", "Fixed point", "Draw a fixed red dot that can be saved")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+ .setHeight(BaseHelper.WrapContent) // 高度自适应内容
+ .setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+ddhzSwitchContentCard.setExpandableContent(column); // 将内容区域设置到卡片中
+
+
+
+
+
+
+ final Text label1 = new Text()
+ .setText("x="+",y="+",z=")
+ .setTextSize(10f)
+ .setTextColor(0xFFC5C5C5)
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(label1);
+
+
+
+final StatefulButton statefulButton1 = new StatefulButton("创建", "Create", false);
+
+statefulButton1.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ File langFile = new File("/sdcard/TC配置文件/switch.lang");
+ boolean isChinese = langFile.exists();
+
+ if (newState) {
+ // 开启状态
+
+Fastesp.creatred(x,y,z,"id");
+ statefulButton1.text.setText(isChinese ? "删除" : "Delete");
+ } else {
+ // 关闭状态
+
+Fastesp.deletered("id");
+ statefulButton1.text.setText(isChinese ? "创建" : "Create");
+ }
+
+ return true; // 允许状态变化
+ }
+});
+
+final Text shu1 = new Text()
+ .setText("|")
+ .setTextSize(15f)
+ .setTextColor(0xFFC5C5C5)
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams().setHeight(BaseHelper.WrapContent)
+);
+
+final RadioGroup radioGroup1 = new RadioGroup()
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+radioGroup1.setLayoutParams(new LinearParams().setWidth(BaseHelper.MatchParent));
+radioGroup1.setEnabled(true);
+
+radioGroup1.addButton("获取", "Get", "1");
+radioGroup1.addButton("保存", "Save", "2");
+radioGroup1.addButton("读取", "Load", "3");
+radioGroup1.addButton("传送", "Teleport", "4");
+
+// ✅ 关键:取消默认选中
+for (StatefulButton btn : radioGroup1.map.values()) {
+ btn.setChecked(false);
+}
+
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ switch (id) {
+ case "1"://获取
+ 获取坐标();
+ label1.setText("x=" + x + ",y=" + y + ",z=" + z);
+ break;
+ case "2"://保存
+检查();
+
+if (!file.exists()) {
+ try {
+file.createNewFile(); // 创建文件
+} catch (IOException e) {e.printStackTrace();}
+ }
+
+try {
+
+ if (!dir.exists()) dir.mkdirs();
+
+ BufferedWriter bw = new BufferedWriter(new FileWriter(file));
+ bw.write("x=" + x);
+ bw.newLine();
+ bw.write("y=" + y);
+ bw.newLine();
+ bw.write("z=" + z);
+ bw.close();
+} catch (IOException e) {
+ e.printStackTrace();
+}
+ break;
+ case "3"://读取
+try {
+
+ if (file.exists()) {
+ BufferedReader br = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = br.readLine()) != null) {
+ if (line.startsWith("x=")) {
+ x = Float.parseFloat(line.substring(2).trim());
+ } else if (line.startsWith("y=")) {
+ y = Float.parseFloat(line.substring(2).trim());
+ } else if (line.startsWith("z=")) {
+ z = Float.parseFloat(line.substring(2).trim());
+ }
+ }
+ br.close();
+ }
+} catch (IOException e) {
+ e.printStackTrace();
+}
+label1.setText("x=" + x + ",y=" + y + ",z=" + z);
+break;
+
+ case "4"://传送
+//x
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList(); // 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB); // 获取模块基址
+long zuobiaox = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA8; // 跳转指针
+long zuobiaoy = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA4; // 跳转指针
+long zuobiaoz = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA0; // 跳转指针
+
+ AlguiMemTool.setMemoryAddrValue(""+y, zuobiaoy,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+z, zuobiaox,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+x, zuobiaoz,AlguiMemTool.TYPE_FLOAT, false ,true);
+AlguiMemTool.setMemoryAddrValue(""+y, zuobiaoy,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+z, zuobiaox,AlguiMemTool.TYPE_FLOAT, false,true);
+AlguiMemTool.setMemoryAddrValue(""+x, zuobiaoz,AlguiMemTool.TYPE_FLOAT, false ,true);
+ break;
+ }
+ }
+});
+
+
+Row buttonRow1 = new Row()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+
+ buttonRow1.addView(statefulButton1);
+ buttonRow1.addView(shu1);
+ buttonRow1.addView(radioGroup1);
+
+
+
+ // 把这一行添加到 column 中
+ column.addView(buttonRow1);
+
+ return ddhzSwitchContentCard; // 返回创建的卡片
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private enum Color {
+ RED(0xFFFF0000), // 红色
+ GREEN(0xFF00FF00), // 绿色
+ BLUE(0xFF0000FF), // 蓝色
+ YELLOW(0xFFFFFF00), // 黄色
+ WHITE(0xFFFFFFFF), // 白色
+ BLACK(0xFF000000), // 黑色
+ ORANGE(0xFFFFA500), // 橙色
+ PURPLE(0xFF800080), // 紫色
+ PINK(0xFFFFC0CB), // 粉色
+ CYAN(0xFF00FFFF), // 青色
+ MAGENTA(0xFFFF00FF), // 洋红色
+ GRAY(0xFF808080); // 灰色
+
+ private final int value; // 存储颜色值
+
+ // 私有构造函数
+ Color(int value) {
+ this.value = value;
+ }
+
+ // 获取颜色值的方法
+ public int getValue() {
+ return value;
+ }
+ }
+
+ private enum CollisionBodyType {
+ ENTITY, // 实体
+ PLAYER, // 角色
+ PICKUP // 拾取物
+ }
+
+ // 碰撞体对象
+ private static class CollisionBody {
+ long address; // 内存地址
+ CollisionBodyType type; // 类型
+ int feature1; // 特征值1
+ int feature2; // 特征值2
+ }
+
+ // 绘制对象
+ private static class DrawObject {
+ long address; // 内存地址
+ Color color; // 颜色
+ CollisionBodyType type; // 类型
+ int dis;
+ int x;
+ int y;
+ }
+
+ private static final int pSize = 8;
+ // 被选中对象内存地址
+ private static long selectedAddr = 0;
+
+ // 碰撞体数组地址
+ static long collAddr;
+
+ // 碰撞体数组起始地址
+ static long collAddrStart;
+
+ // 碰撞体列表
+ private static CopyOnWriteArrayList collList = new
+ CopyOnWriteArrayList<>();
+
+ // 绘制对象列表
+ private static ArrayList drawList = new ArrayList<>();
+
+ // 是否开启ESP(不是)
+ private static boolean espkg =true;
+ // 是否开启ESP("这个才是)
+ private static boolean zhenespkg =false;
+ // 是否绘制所有碰撞体
+ private static boolean isDrawALLColl = false;
+
+ // 是否绘制玩家
+ private static boolean isDrawPlayer = true;
+
+ // 是否绘制拾取物
+ private static boolean isDrawPickup = false;
+
+ // 是否绘制里准星最近目标
+ private static boolean isDrawCrosshair = false;
+
+ // 跳转指针简化方法
+ public static long jump(long addr) {
+ return AlguiMemTool.jump(addr, pSize);
+ }
+
+ // 获取数组地址
+ private static boolean getArrayAddr() {
+ if (collAddrStart != 0)
+ return true; // 如果已缓存地址,直接返回成功
+
+ // 设置游戏包名并获取进程ID
+ int pid = AlguiMemTool.setPackageName("com.vortex.celestial");
+ if (pid <= 0)
+ return false;
+
+ // 获取模块基地址
+ long module = AlguiMemTool.getModuleBaseAddr("libclient.so", AlguiMemTool.HEAD_CB);
+ if (module <= 0)
+ return false;
+
+ // 获取碰撞体数组地址
+ long collAddr = jump(module + 0xDCBC30) + 0x3C0;
+ if (collAddr <= 0)
+ return false;
+
+
+ collAddrStart = jump(collAddr); // 更新 collAddrStart 的值
+ return true; // 成功获取地址
+ }
+
+ // 数组更新方法
+ private static void updateArray() {
+ // 创建临时列表存储新数据
+ ArrayList newCollList = new ArrayList<>();
+
+ try {
+ int size = Integer.parseInt(AlguiMemTool.getMemoryAddrData(collAddr + 0x2C, AlguiMemTool.TYPE_DWORD));
+
+ // 遍历碰撞体数组并过滤
+ for (int i = 0; i < size; i++) {
+ CollisionBody p = new CollisionBody();
+ DrawObject d = new DrawObject();
+ p.address = jump(collAddrStart + i * pSize);
+
+ // 批量读取内存数据提高性能
+ p.feature1 = Integer
+ .parseInt(AlguiMemTool.getMemoryAddrData(p.address + 0xAC, AlguiMemTool.TYPE_DWORD));
+ p.feature2 = Integer.parseInt(AlguiMemTool.getMemoryAddrData(p.address + 0x8, AlguiMemTool.TYPE_DWORD));
+
+ // 特征值过滤逻辑优化
+ if (p.feature2 == 196614) {
+ if (isDrawPlayer && p.feature1 == 17039361) {
+ d.address = p.address;
+ d.color = Color.GREEN;
+ d.type = CollisionBodyType.PLAYER;
+ newCollList.add(d);
+ } else if (isDrawPickup && p.feature1 == 17039617) {
+ d.address = p.address;
+ d.color = Color.PURPLE;
+ d.type = CollisionBodyType.PICKUP;
+ newCollList.add(d);
+ }
+ } else if (isDrawALLColl) {
+ d.address = p.address;
+ d.color = Color.GRAY;
+ d.type = CollisionBodyType.ENTITY;
+ newCollList.add(d);
+ }
+ }
+ } catch (NumberFormatException e) {
+ return;
+ }
+
+ // 替换旧列表(原子操作)
+ drawList.clear();
+ drawList.addAll(newCollList);
+
+ }
+
+ // 定义一个单线程线程池,用于执行数组循环更新任务
+ private static final ExecutorService arrayUpdateExecutor = Executors.newSingleThreadExecutor();
+
+ // 循环更新数组方法
+ private static void updateArrayLoop() {
+ arrayUpdateExecutor.submit(new Runnable() {
+ @Override
+ public void run() {
+ while (zhenespkg) {
+ updateArray();
+ try {
+ Thread.sleep(50); // 线程休眠50毫秒
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ Thread.currentThread().interrupt();
+ break;
+ }
+ }
+ }
+ });
+ }
+
+ // 初始化绘制窗口方法
+private static AlguiWinDraw initDraw(Context context) {
+
+ return Fastesp.start(context);
+}
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/EspDataCache.java b/app/src/main/java/com/bytecat/algui/ui/category/EspDataCache.java
new file mode 100644
index 0000000..185fed6
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/EspDataCache.java
@@ -0,0 +1,16 @@
+package com.bytecat.algui.ui.category;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+public final class EspDataCache {
+ public static final class Entity {
+ public float x, y, z;
+ public int typeFlag;
+ }
+
+ public static volatile CopyOnWriteArrayList list = new CopyOnWriteArrayList<>();
+
+ // 原来的 list 继续留着,但只用来遍历
+public static final ConcurrentHashMap map = new ConcurrentHashMap<>();
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/EspFetcherThread.java b/app/src/main/java/com/bytecat/algui/ui/category/EspFetcherThread.java
new file mode 100644
index 0000000..6e63b68
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/EspFetcherThread.java
@@ -0,0 +1,96 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+public final class EspFetcherThread extends Thread {
+ private volatile boolean running = true;
+
+ private long matrixAddr;
+ private long collAddr;
+ private long collStart;
+
+ public EspFetcherThread(long matrixAddr, long collAddr, long collStart) {
+ this.matrixAddr = matrixAddr;
+ this.collAddr = collAddr;
+ this.collStart = collStart;
+ setPriority(Thread.MIN_PRIORITY); // 降低调度压力
+ }
+
+ public void stopSafely() {
+ running = false;
+ interrupt();
+ }
+
+@Override
+public void run() {
+ final float[] matrix = new float[16];
+ while (running) {
+ try {
+ // 1. 读矩阵
+ for (int i = 0; i < 16; i++) {
+ matrix[i] = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(matrixAddr + i * 4, AlguiMemTool.TYPE_FLOAT));
+ }
+
+ // 2. 读实体数量
+ int count = Integer.parseInt(
+ AlguiMemTool.getMemoryAddrData(collAddr + 0x2C, AlguiMemTool.TYPE_DWORD));
+ if (count <= 0 || count > 2048) {
+ Thread.sleep(8);
+ continue;
+ }
+
+ // 3. 记录本帧存在的地址
+ Set aliveThisFrame = new HashSet();
+
+ for (int i = 0; i < count; i++) {
+ long addr = AlguiMemTool.jump64(collStart + i * 8);
+ if (addr == 0) continue;
+
+ int typeFlag = Integer.parseInt(
+ AlguiMemTool.getMemoryAddrData(addr + 0xAC, AlguiMemTool.TYPE_DWORD));
+ int flag2 = Integer.parseInt(
+ AlguiMemTool.getMemoryAddrData(addr + 0x8, AlguiMemTool.TYPE_DWORD));
+ if (flag2 != 196614) continue;
+
+ aliveThisFrame.add(addr);
+
+ // 如果 map 里没有就新建
+ EspDataCache.Entity e = EspDataCache.map.get(addr);
+ if (e == null) {
+ e = new EspDataCache.Entity();
+ EspDataCache.map.put(addr, e);
+ }
+
+ // 更新坐标
+ e.x = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(addr + 0xA0, AlguiMemTool.TYPE_FLOAT));
+ e.z = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(addr + 0xA4, AlguiMemTool.TYPE_FLOAT));
+ e.y = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(addr + 0xA8, AlguiMemTool.TYPE_FLOAT));
+ e.typeFlag = typeFlag;
+ }
+
+ // 4. 删除已消失的实体(传统迭代器写法)
+ Iterator it = EspDataCache.map.keySet().iterator();
+ while (it.hasNext()) {
+ long addr = it.next();
+ if (!aliveThisFrame.contains(addr)) {
+ it.remove();
+ }
+ }
+
+ // 5. 把 map 同步到 list(供绘制)
+ EspDataCache.list.clear();
+ EspDataCache.list.addAll(EspDataCache.map.values());
+
+ Thread.sleep(16);
+ } catch (Exception ignored) {}
+ }
+}
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/Fastesp.java b/app/src/main/java/com/bytecat/algui/ui/category/Fastesp.java
new file mode 100644
index 0000000..e3f4d82
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/Fastesp.java
@@ -0,0 +1,510 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.PointF;
+import android.graphics.PorterDuff;
+import android.graphics.Typeface;
+import android.view.MotionEvent;
+import android.view.SurfaceHolder;
+import android.view.View;
+import android.widget.FrameLayout;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import com.bytecat.algui.AlguiWindows.AlguiWinDraw;
+import com.bytecat.algui.ui.MIX;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+public class Fastesp {
+
+ // ... 其他代码保持不变 ...
+
+ private static AlguiWinDraw draw; // 声明静态变量 draw
+
+ private static EspFetcherThread fetcher;
+ public static long moduleBase, matrixAddr, collAddr, collStart;
+ public static final float[] matrix = new float[16];
+ private static int midX, midY;
+ public static int fii = 5;
+ private static volatile boolean running = false;
+
+ // 增加玩家和物品的开关控制
+ private static boolean drawPlayers = true;
+ private static boolean drawItems = false;
+
+ // 三维红点相关
+ private static final ConcurrentHashMap redPoints = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap redPointsWorldX = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap redPointsWorldY = new ConcurrentHashMap<>();
+ private static final ConcurrentHashMap redPointsWorldZ = new ConcurrentHashMap<>();
+
+ public static AlguiWinDraw start(Context ctx) {
+ if (ctx == null) ctx = MIX.getContext();
+ if (ctx == null)
+ throw new IllegalStateException("Context 为 null,请先初始化 MIX 或传入 Activity!");
+ running = true;
+ draw = buildDraw(ctx); // 初始化 draw
+ return draw;
+ }
+
+private static final int MODE_JOY = 0; // 摇杆模式
+private static final int MODE_MOVE = 1; // 移动模式
+private static int mode = MODE_JOY; // 当前模式
+private static long lastDownTime = 0; // 用于双击判断
+private static final int DOUBLE_TAP_TIMEOUT = 300; // ms
+// 摇杆当前输出向量 [-1,1]
+public static float joystickX;
+public static float joystickY;
+// 是否正在用摇杆
+public static boolean isJoystickMove;
+// ================== 摇杆控件 ==================
+private static class JoystickView extends View {
+ /* ==== 基本尺寸 ==== */
+ private float baseX, baseY; // 摇杆底座中心(可拖动)
+ private float bigR, smallR;
+ private float knobX, knobY; // 摇杆钮当前位置
+ private Paint bgPaint, knobPaint;
+
+ /* ==== 触摸状态 ==== */
+ private boolean draggingKnob = false; // 是否在拖拽摇杆钮
+ private boolean draggingBase = false; // 是否在拖动底座
+ private float lastTouchX, lastTouchY;
+
+ public JoystickView(Context c) {
+ super(c);
+ bgPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ bgPaint.setColor(Color.argb(120, 0, 0, 0));
+ knobPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ knobPaint.setColor(Color.argb(200, 0, 200, 255));
+
+ // 初始位置:左下角
+ bigR = dp(60);
+ smallR = dp(25);
+ baseX = bigR + dp(20);
+ baseY = getResources().getDisplayMetrics().heightPixels - bigR - dp(20);
+ knobX = baseX;
+ knobY = baseY;
+ }
+
+ private float dp(int px) {
+ return getResources().getDisplayMetrics().density * px;
+ }
+
+ /* ==== 绘制 ==== */
+ @Override protected void onDraw(Canvas canvas) {
+ canvas.drawCircle(baseX, baseY, bigR, bgPaint);
+ canvas.drawCircle(knobX, knobY, smallR, knobPaint);
+ }
+
+ /* ==== 触摸 ==== */
+ @SuppressLint("ClickableViewAccessibility")
+ @Override public boolean onTouchEvent(MotionEvent e) {
+ float x = e.getX();
+ float y = e.getY();
+
+ switch (e.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ // 双击检测
+ if (System.currentTimeMillis() - lastDownTime < DOUBLE_TAP_TIMEOUT) {
+ toggleMode();
+ lastDownTime = 0; // 防止三连击
+ return true;
+ }
+ lastDownTime = System.currentTimeMillis();
+
+ if (mode == MODE_MOVE) {
+ // 移动模式:只要按在底座内就可以拖动整个摇杆
+ if (dist(x, y, baseX, baseY) <= bigR) {
+ draggingBase = true;
+ lastTouchX = x;
+ lastTouchY = y;
+ }
+ } else {
+ // 摇杆模式:只有按在底座内才能拖动小钮
+ if (dist(x, y, baseX, baseY) <= bigR) {
+ draggingKnob = true;
+ moveKnob(x, y);
+ }
+ }
+ break;
+
+ case MotionEvent.ACTION_MOVE:
+ if (draggingBase) {
+ baseX += x - lastTouchX;
+ baseY += y - lastTouchY;
+ knobX = baseX;
+ knobY = baseY;
+ lastTouchX = x;
+ lastTouchY = y;
+ invalidate();
+ } else if (draggingKnob) {
+ moveKnob(x, y);
+ }
+ break;
+
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL:
+ draggingKnob = false;
+ draggingBase = false;
+ // 松手回中
+ knobX = baseX;
+ knobY = baseY;
+ invalidate();
+ break;
+ }
+ return true;
+ }
+
+ private void toggleMode() {
+ mode = (mode == MODE_JOY) ? MODE_MOVE : MODE_JOY;
+ invalidate();
+ }
+
+ private void moveKnob(float x, float y) {
+ float dx = x - baseX;
+ float dy = y - baseY;
+ float len = (float) Math.sqrt(dx * dx + dy * dy);
+ if (len > bigR) {
+ dx = dx / len * bigR;
+ dy = dy / len * bigR;
+ }
+ knobX = baseX + dx;
+ knobY = baseY + dy;
+ invalidate();
+// 在 JoystickView.moveKnob() 末尾加一行
+Fastesp.joystickX = dx / bigR; // 已归一化
+Fastesp.joystickY = -dy / bigR; // 屏幕坐标系转游戏坐标系
+Fastesp.isJoystickMove = draggingKnob;
+ /* TODO: 如果需要把摇杆向量输出出去,可以在这里回调
+ float vx = dx / bigR;
+ float vy = -dy / bigR;
+ */
+ }
+
+ private float dist(float x1, float y1, float x2, float y2) {
+ return (float) Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
+ }
+}
+
+
+
+
+
+/* 专门给路径记录用的红点,旁边固定写“路径点” */
+public static void createPathPoint(float x, float y, float z, String id) {
+ redPointsWorldX.put(id, x);
+ redPointsWorldY.put(id, y);
+ redPointsWorldZ.put(id, z);
+}
+// =============================================
+
+
+private static JoystickView joystick;
+
+private static Thread moveThread;
+private static volatile boolean moveRunning;
+
+public static void startMoveThread() {
+ if (moveThread != null) return;
+ moveRunning = true;
+moveThread = new Thread(new Runnable() {
+ @Override
+ public void run() {
+ /* ↓↓↓ 原来花括号里的代码全部原封不动搬进来 ↓↓↓ */
+ int pid = AlguiMemTool.getPID("com.vortex.celestial");
+ if (pid < 0) return;
+
+ long libClient = AlguiMemTool.getModuleBaseAddr("libclient.so", AlguiMemTool.HEAD_CB);
+ if (libClient == 0) return;
+
+ long matrixAddr = AlguiMemTool.jump64(
+ AlguiMemTool.jump64(
+ AlguiMemTool.jump64(
+ AlguiMemTool.jump64(libClient + 0x45A228) + 0x268) + 0xE0) + 0x40);
+
+ long oneselfBase = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(libClient + 0x454090) + 0x0) + 0x70) + 0x10; // 跳转指针
+
+ while (moveRunning) {
+ try {
+ if (!isJoystickMove) {
+ Thread.sleep(20);
+ continue;
+ }
+
+ float[] m = new float[16];
+ for (int i = 0; i < 16; i++) {
+ m[i] = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(matrixAddr + i * 4, AlguiMemTool.TYPE_FLOAT));
+ }
+
+ float x = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(oneselfBase + 0xA0, AlguiMemTool.TYPE_FLOAT));
+ float z = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(oneselfBase + 0xA4, AlguiMemTool.TYPE_FLOAT));
+ float y = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(oneselfBase + 0xA8, AlguiMemTool.TYPE_FLOAT));
+
+ float dirX = m[2];
+ float dirZ = m[6];
+ float dirY = m[10];
+ float len = (float) Math.sqrt(dirX * dirX + dirY * dirY + dirZ * dirZ);
+ dirX /= len;
+ dirZ /= len;
+ dirY /= len;
+
+ float moveScale = 5.0f;
+ x += dirX * joystickY * moveScale;
+ z += dirZ * joystickY * moveScale * 2;
+ y += dirY * joystickY * moveScale;
+
+ float rightX = m[0];
+ float rightZ = m[4];
+ float rightY = m[8];
+ len = (float) Math.sqrt(rightX * rightX + rightY * rightY + rightZ * rightZ);
+ rightX /= len;
+ rightZ /= len;
+ rightY /= len;
+
+ x += rightX * joystickX * moveScale;
+ z += rightZ * joystickX * moveScale * 2;
+ y += rightY * joystickX * moveScale;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(x), oneselfBase + 0xA0, AlguiMemTool.TYPE_FLOAT, false, true);
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(z), oneselfBase + 0xA4, AlguiMemTool.TYPE_FLOAT, false, true);
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(y), oneselfBase + 0xA8, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(20);
+ } catch (Exception ignore) { }
+ }
+ }
+});
+moveThread.start();
+
+}
+
+public static void stopMoveThread() {
+ moveRunning = false;
+ if (moveThread != null) {
+ moveThread.interrupt();
+ moveThread = null;
+ }
+}
+
+
+
+public static void showJoystick(Activity act) {
+ if (joystick != null) return;
+ FrameLayout root = act.findViewById(android.R.id.content);
+ joystick = new JoystickView(act);
+ FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
+ FrameLayout.LayoutParams.MATCH_PARENT,
+ FrameLayout.LayoutParams.MATCH_PARENT);
+ root.addView(joystick, lp);
+}
+
+public static void hideJoystick(Activity act) {
+ if (joystick == null) return;
+ FrameLayout root = act.findViewById(android.R.id.content);
+ root.removeView(joystick);
+ joystick = null;
+}
+
+public static void stop() {
+ running = false; // 1. 让下一次 Update() 直接 return
+
+ // 2. 立即清屏
+ if (draw != null) {
+ Canvas canvas = null;
+ try {
+ canvas = draw.getHolder().lockCanvas(); // 尝试锁定当前 Surface
+ if (canvas != null) {
+ canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR); // 清屏
+ }
+ } catch (Exception ignore) {
+ // 防止 Surface 已被销毁时崩溃
+ } finally {
+ if (canvas != null) {
+ draw.getHolder().unlockCanvasAndPost(canvas); // 确保解锁
+ }
+ draw.endRendering(); // 如果有额外释放动作
+ }
+ }
+
+ // 3. 清空数据
+ redPointsWorldX.clear();
+ redPointsWorldY.clear();
+ redPointsWorldZ.clear();
+if (fetcher != null) {
+ fetcher.stopSafely();
+ fetcher = null;
+}
+}
+
+
+ // 设置玩家绘制开关
+ public static void setDrawPlayers(boolean enable) {
+ drawPlayers = enable;
+ }
+
+ // 设置物品绘制开关
+ public static void setDrawItems(boolean enable) {
+ drawItems = enable;
+ }
+
+ // 创建一个三维红点
+ public static void creatred(float x, float y, float z, String id) {
+ redPointsWorldX.put(id, x);
+ redPointsWorldY.put(id, y);
+ redPointsWorldZ.put(id, z);
+ }
+
+ // 删除特定 ID 的三维红点
+ public static void deletered(String id) {
+ if ("allred".equals(id)) {
+ redPointsWorldX.clear();
+ redPointsWorldY.clear();
+ redPointsWorldZ.clear();
+ } else {
+ redPointsWorldX.remove(id);
+ redPointsWorldY.remove(id);
+ redPointsWorldZ.remove(id);
+ }
+ }
+
+ private static AlguiWinDraw buildDraw(Context ctx) {
+ final Paint paint = new Paint();
+ paint.setAntiAlias(true);
+ paint.setTextSize(18);
+ paint.setColor(Color.WHITE);
+ paint.setTextAlign(Paint.Align.CENTER);
+ paint.setTypeface(Typeface.DEFAULT_BOLD);
+ paint.setShadowLayer(4, 0, 0, Color.BLACK);
+
+ final Paint linePaint = new Paint();
+ linePaint.setAntiAlias(true);
+ linePaint.setStrokeWidth(2f);
+
+ final AlguiWinDraw draw = new AlguiWinDraw(ctx);
+ draw.setCatCallback(new AlguiCallback.Draw() {
+ long lastFrame = 0;
+ private long moduleBase = 0;
+ private long matrixAddr = 0;
+ private long collAddr = 0;
+ private long collStart = 0;
+ private final float[] matrix = new float[16];
+ private int screenW = 0, screenH = 0;
+ private int midX = 0;
+
+ private long jump(long addr) {
+ return AlguiMemTool.jump64(addr);
+ }
+
+ @Override
+ public boolean Start(Canvas canvas) {
+ if (moduleBase == 0) {
+ moduleBase = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+if (moduleBase == 0) return false;
+matrixAddr =AlguiMemTool.jump64(
+ AlguiMemTool.jump64(
+ AlguiMemTool.jump64(
+ AlguiMemTool.jump64(moduleBase + 0x45A228) + 0x268) + 0xE0) + 0x40);
+collAddr = jump(moduleBase + 0xDCBC30) + 0x3C0;
+collStart = jump(collAddr);
+ }
+
+fetcher = new EspFetcherThread(matrixAddr, collAddr, collStart);
+fetcher.start();
+ return matrixAddr > 0 && collStart > 0;
+ }
+@Override
+public boolean Update(Canvas canvas) {
+ long now = System.currentTimeMillis();
+ if (now - lastFrame < fii) return true;
+ lastFrame = now;
+
+ // 1. 重新读矩阵(仍放在主线程,极快)
+ for (int i = 0; i < matrix.length; i++) {
+ matrix[i] = Float.parseFloat(
+ AlguiMemTool.getMemoryAddrData(matrixAddr + i * 4, AlguiMemTool.TYPE_FLOAT));
+ }
+
+ // 2. 玩家数量(可选)
+ if (drawPlayers) {
+ int total = 0;
+ for (EspDataCache.Entity e : EspDataCache.list)
+ if (e.typeFlag == 17039361) total++;
+ paint.setColor(Color.GREEN);
+ canvas.drawText("玩家数量: " + total, 80, 40, paint);
+ }
+
+ // 3. 绘制实体(从缓存拿数据)
+ for (EspDataCache.Entity e : EspDataCache.list) {
+ if ((e.typeFlag == 17039361 && !drawPlayers) ||
+ (e.typeFlag != 17039361 && !drawItems)) continue;
+
+// 计算 cz(距离因子)
+float cz = matrix[3] * e.x + matrix[7] * e.z + matrix[11] * e.y + matrix[15];
+if (cz <= 0) continue; // 距离为负数或零 → 不绘制
+
+
+ float cx = midX + (matrix[0] * e.x + matrix[4] * e.z + matrix[8] * e.y + matrix[12]) / cz * midX;
+ float cy = midY - (matrix[1] * e.x + matrix[5] * e.z + matrix[9] * e.y + matrix[13]) / cz * midY;
+
+ int color = e.typeFlag == 17039361 ? 0xFF00FF00 : 0xFFFF00FF;
+ linePaint.setColor(color);
+ canvas.drawLine(midX, 0, cx, cy, linePaint);
+ paint.setColor(color);
+ canvas.drawText((e.typeFlag == 17039361 ? "玩家 " : "物品 ") + (int)(cz/60), (int)cx, (int)cy, paint);
+ }
+
+
+ // 绘制三维红点...(后续代码保持不变)
+ final Paint redPaint = new Paint();
+ redPaint.setColor(Color.RED);
+ redPaint.setStyle(Paint.Style.FILL);
+
+ for (String id : new ConcurrentHashMap<>(redPointsWorldX).keySet()) {
+ Float x = redPointsWorldX.get(id);
+ Float y = redPointsWorldY.get(id);
+ Float z = redPointsWorldZ.get(id);
+
+ if (x == null || y == null || z == null) continue;
+
+ float cz = matrix[3] * x + matrix[7] * y + matrix[11] * z + matrix[15];
+ if (cz <= 2) continue;
+
+ float cx = midX + (matrix[0] * x + matrix[4] * y + matrix[8] * z + matrix[12]) / cz * midX;
+ float cy = midY - (matrix[1] * x + matrix[5] * y + matrix[9] * z + matrix[13]) / cz * midY;
+
+ canvas.drawCircle(cx, cy, 12, redPaint);
+ canvas.drawText("坐标", cx + 20, cy, paint);
+ }
+
+ // 4. 红点/路径保持原样,无需改动
+ // ...(保留你原来代码)...
+ return true;
+}
+ @Override
+ public void End(SurfaceHolder holder) {}
+
+ @Override
+ public void UpdateCanvasSize(SurfaceHolder holder, int format, int width, int height) {
+ screenW = width;
+ screenH = height;
+ midX = width / 2;
+ midY = height / 2;
+ }
+ });
+ return draw;
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/FileUtilT.java b/app/src/main/java/com/bytecat/algui/ui/category/FileUtilT.java
new file mode 100644
index 0000000..82bbac7
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/FileUtilT.java
@@ -0,0 +1,48 @@
+package com.bytecat.algui.ui.category; // ← 换成你自己的包名
+
+import java.io.*;
+
+public final class FileUtilT {
+
+ /** 递归复制整个目录 */
+ public static void copyDir(File src, File dst) throws IOException {
+ if (src == null || !src.exists()) return;
+ if (src.isFile()) { // 如果传进来的 src 是单个文件
+ copyFile(src, dst);
+ return;
+ }
+ dst.mkdirs();
+ File[] list = src.listFiles();
+ if (list == null) return;
+ for (File f : list) {
+ File target = new File(dst, f.getName());
+ if (f.isDirectory()) {
+ copyDir(f, target);
+ } else {
+ copyFile(f, target);
+ }
+ }
+ }
+
+ /** 复制单个文件 */
+ private static void copyFile(File src, File dst) throws IOException {
+ try (FileInputStream in = new FileInputStream(src);
+ FileOutputStream out = new FileOutputStream(dst)) {
+ byte[] buf = new byte[8192];
+ int len;
+ while ((len = in.read(buf)) != -1) out.write(buf, 0, len);
+ }
+ }
+
+ /** 递归删除文件 / 文件夹 */
+ public static void deleteRecursive(File f) {
+ if (f == null || !f.exists()) return;
+ if (f.isDirectory()) {
+ File[] children = f.listFiles();
+ if (children != null) for (File c : children) deleteRecursive(c);
+ }
+ f.delete();
+ }
+
+ private FileUtilT() {} // 禁止实例化
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/MiscCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/MiscCategoryBox.java
new file mode 100644
index 0000000..527dd19
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/MiscCategoryBox.java
@@ -0,0 +1,682 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import android.graphics.Typeface;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.callback.SliderCallback;
+import android.annotation.SuppressLint;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.effect.Notification;
+import java.util.Locale;
+import com.bytecat.algui.effect.ModuleManager;
+
+
+public class MiscCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+
+
+//快捷键
+private SwitchShortcutButton zlxsShortcutButton;
+private SwitchShortcutButton whzlShortcutButton;
+private SwitchShortcutButton syzfShortcutButton;
+private SwitchShortcutButton sxjgdShortcutButton;
+private SwitchShortcutButton qzzlShortcutButton;
+private SwitchShortcutButton gzghShortcutButton;
+private SwitchShortcutButton wxhjShortcutButton;
+
+
+
+
+//卡片
+ public MiscCategoryBox() {
+ createShortcutButtons();
+ contentContainer
+
+.addView(createwhzlSwitchContentCard())
+.addView(createsyzfSwitchContentCard())
+.addView(createsxjgdSwitchContentCard())
+.addView(createqzzlSwitchContentCard())
+.addView(creategzghSwitchContentCard())
+.addView(createwxhjSwitchContentCard())
+
+
+
+
+
+ ;
+ }
+
+
+//快捷键文本
+ private void createShortcutButtons() {
+whzlShortcutButton = new SwitchShortcutButton()
+.OText("视角稳定器","Stabilizer");
+syzfShortcutButton = new SwitchShortcutButton().OText("视野","FOV");
+sxjgdShortcutButton = new SwitchShortcutButton().OText("摄像机","Camera");
+qzzlShortcutButton = new SwitchShortcutButton().OText("帧率","FPS");
+gzghShortcutButton = new SwitchShortcutButton().OText("改装光环","Halo");
+wxhjShortcutButton = new SwitchShortcutButton().OText("无序挥击","Disorder");
+
+
+ }
+
+
+
+
+private SwitchContentCard createwhzlSwitchContentCard() {
+ final SwitchContentCard whzlSwitchContentCard = new SwitchContentCard("视角稳定器", "减小后坐力对视角的影响").OText("视角稳定器","减小后坐力对视角的影响","Stabilizer","Reduce the impact of recoil on the view").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ whzlSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ whzlShortcutButton.show();
+ } else {
+ whzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(whzlSwitchContentCard, whzlShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("视角稳定器", "已开启", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("视角稳定器|Stabilizer", true);
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCDE218) + 0x78) + 0xE8) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_DOUBLE, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("视角稳定器", "已关闭", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("视角稳定器|Stabilizer", false);
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCDE218) + 0x78) + 0xE8) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("55", daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return whzlSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createsyzfSwitchContentCard() {
+ final SwitchContentCard syzfSwitchContentCard = new SwitchContentCard("视野修改", "修改视野大小").OText("视野大小","修改视野大小","FOV","Adjust the field of view").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ syzfSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("0.5")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(2, 0.1f, 0.5f)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcef50)+0xf8)+0x58)+0x1f0)+0x7a0)+0x178;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcef50)+0xf8)+0x58)+0x1f0)+0x7a0)+0x178;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ syzfShortcutButton.show();
+ } else {
+ syzfShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(syzfSwitchContentCard, syzfShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+
+
+
+
+ModuleManager.getInstance().setModuleEnabled("视野修改|Visual field", true);
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("视野修改|Visual field", false);
+ distanceText.setText("1.0");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcef50)+0xf8)+0x58)+0x1f0)+0x7a0)+0x178;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return syzfSwitchContentCard;
+ }
+
+
+
+
+
+private SwitchContentCard createsxjgdSwitchContentCard() {
+ final SwitchContentCard sxjgdSwitchContentCard = new SwitchContentCard("摄像机高度", "修改摄像机高度").OText("摄像机高度","修改摄像机高度","Camera high","Adjust the camera height").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ sxjgdSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(1, -2, 0)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCD0C10)+0x2B8)+0x110)+0x80)+0x58)+0x114;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCD0C10)+0x2B8)+0x110)+0x80)+0x58)+0x114;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ sxjgdShortcutButton.show();
+ } else {
+ sxjgdShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(sxjgdSwitchContentCard, sxjgdShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+
+ModuleManager.getInstance().setModuleEnabled("摄像机高度|Camera height", true);
+
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("摄像机高度|Camera height", false);
+ distanceText.setText("0");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCD0C10)+0x2B8)+0x110)+0x80)+0x58)+0x114;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-0.1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return sxjgdSwitchContentCard;
+ }
+
+
+
+
+
+ private SwitchContentCard createqzzlSwitchContentCard() {
+ final SwitchContentCard qzzlSwitchContentCard = new SwitchContentCard("强制帧率", "强制修改144帧率").OText("强制帧率","强制修改144帧率","FPS","Force modification of high frame rate").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ qzzlSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ qzzlShortcutButton.show();
+ } else {
+ qzzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(qzzlSwitchContentCard, qzzlShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+ notification.make("强制帧率", "已开启", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("强制帧率|Frame rate", true);
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0x600) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32
+// 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("144", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("强制帧率", "已关闭", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("强制帧率|Frame rate", false);
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0x600) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32
+// 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("60", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return qzzlSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard creategzghSwitchContentCard() {
+ final SwitchContentCard gzghSwitchContentCard = new SwitchContentCard("改装光环", "改装状态下携带光环移动").OText("改装光环","改装状态下携带光环移动","Halo","Carry Halo Mobile").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ gzghSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ gzghShortcutButton.show();
+ } else {
+ gzghShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(gzghSwitchContentCard, gzghShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("改装光环", "已开启", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("改装光环|Halo", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x800)+ 0x538) + 0x528) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("08521", daddr, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("改装光环", "切换画质以关闭功能", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("改装光环|Halo", false);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x800)+ 0x538) + 0x528) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("689273856", daddr, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return gzghSwitchContentCard;
+ }
+
+private SwitchContentCard createwxhjSwitchContentCard() {
+ final SwitchContentCard wxhjSwitchContentCard = new SwitchContentCard("无序挥击", "[仅自己可见]所有可旋转模块无序转动").OText("无序挥击","[仅自己可见]所有可旋转模块无序转动","Disorder","All rotatable modules rotate disorderly").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ wxhjSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ wxhjShortcutButton.show();
+ } else {
+ wxhjShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(wxhjSwitchContentCard, wxhjShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("无序挥击", "已开启", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("无序挥击|Disorder", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x7C0)+ 0x7B0) + 0x608) + 0x7E4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9999", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("无序挥击", "已关闭", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("无序挥击|Disorder", false);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x7C0)+ 0x7B0) + 0x608) + 0x7E4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-185", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return wxhjSwitchContentCard;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/MiscCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/MiscCategoryBox.java.bak
new file mode 100644
index 0000000..c657bba
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/MiscCategoryBox.java.bak
@@ -0,0 +1,682 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import android.graphics.Typeface;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.callback.SliderCallback;
+import android.annotation.SuppressLint;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.effect.Notification;
+import java.util.Locale;
+import com.bytecat.algui.effect.ModuleManager;
+
+
+public class MiscCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+
+
+//快捷键
+private SwitchShortcutButton zlxsShortcutButton;
+private SwitchShortcutButton whzlShortcutButton;
+private SwitchShortcutButton syzfShortcutButton;
+private SwitchShortcutButton sxjgdShortcutButton;
+private SwitchShortcutButton qzzlShortcutButton;
+private SwitchShortcutButton gzghShortcutButton;
+private SwitchShortcutButton wxhjShortcutButton;
+
+
+
+
+//卡片
+ public MiscCategoryBox() {
+ createShortcutButtons();
+ contentContainer
+
+.addView(createwhzlSwitchContentCard())
+.addView(createsyzfSwitchContentCard())
+.addView(createsxjgdSwitchContentCard())
+.addView(createqzzlSwitchContentCard())
+.addView(creategzghSwitchContentCard())
+.addView(createwxhjSwitchContentCard())
+
+
+
+
+
+ ;
+ }
+
+
+//快捷键文本
+ private void createShortcutButtons() {
+whzlShortcutButton = new SwitchShortcutButton()
+.OText("视角稳定器","Stabilizer");
+syzfShortcutButton = new SwitchShortcutButton().OText("视野","FOV");
+sxjgdShortcutButton = new SwitchShortcutButton().OText("摄像机","Camera");
+qzzlShortcutButton = new SwitchShortcutButton().OText("帧率","Frame rate");
+gzghShortcutButton = new SwitchShortcutButton().OText("改装光环","Halo");
+wxhjShortcutButton = new SwitchShortcutButton().OText("无序挥击","Disorder");
+
+
+ }
+
+
+
+
+private SwitchContentCard createwhzlSwitchContentCard() {
+ final SwitchContentCard whzlSwitchContentCard = new SwitchContentCard("视角稳定器", "减小后坐力对视角的影响").OText("视角稳定器","减小后坐力对视角的影响","Stabilizer","Reduce the impact of recoil on the view").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ whzlSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ whzlShortcutButton.show();
+ } else {
+ whzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(whzlSwitchContentCard, whzlShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("视角稳定器", "已开启", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("视角稳定器|Stabilizer", true);
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCDE218) + 0x78) + 0xE8) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_DOUBLE, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("视角稳定器", "已关闭", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("视角稳定器|Stabilizer", false);
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCDE218) + 0x78) + 0xE8) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("55", daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return whzlSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createsyzfSwitchContentCard() {
+ final SwitchContentCard syzfSwitchContentCard = new SwitchContentCard("视野修改", "修改视野大小").OText("视野大小","修改视野大小","FOV","Adjust the field of view").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ syzfSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("0.5")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(2, 0.1f, 0.5f)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcef50)+0xf8)+0x58)+0x1f0)+0x7a0)+0x178;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcef50)+0xf8)+0x58)+0x1f0)+0x7a0)+0x178;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ syzfShortcutButton.show();
+ } else {
+ syzfShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(syzfSwitchContentCard, syzfShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+
+
+
+
+ModuleManager.getInstance().setModuleEnabled("视野修改|Visual field", true);
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("视野修改|Visual field", false);
+ distanceText.setText("1.0");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcef50)+0xf8)+0x58)+0x1f0)+0x7a0)+0x178;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return syzfSwitchContentCard;
+ }
+
+
+
+
+
+private SwitchContentCard createsxjgdSwitchContentCard() {
+ final SwitchContentCard sxjgdSwitchContentCard = new SwitchContentCard("摄像机高度", "修改摄像机高度").OText("摄像机高度","修改摄像机高度","Camera high","Adjust the camera height").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ sxjgdSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(1, -2, 0)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCD0C10)+0x2B8)+0x110)+0x80)+0x58)+0x114;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCD0C10)+0x2B8)+0x110)+0x80)+0x58)+0x114;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ sxjgdShortcutButton.show();
+ } else {
+ sxjgdShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(sxjgdSwitchContentCard, sxjgdShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+
+ModuleManager.getInstance().setModuleEnabled("摄像机高度|Camera height", true);
+
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("摄像机高度|Camera height", false);
+ distanceText.setText("0");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCD0C10)+0x2B8)+0x110)+0x80)+0x58)+0x114;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-0.1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return sxjgdSwitchContentCard;
+ }
+
+
+
+
+
+ private SwitchContentCard createqzzlSwitchContentCard() {
+ final SwitchContentCard qzzlSwitchContentCard = new SwitchContentCard("强制帧率", "强制修改144帧率").OText("强制帧率","强制修改144帧率","Frame rate","Force modification of high frame rate").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ qzzlSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ qzzlShortcutButton.show();
+ } else {
+ qzzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(qzzlSwitchContentCard, qzzlShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+ notification.make("强制帧率", "已开启", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("强制帧率|Frame rate", true);
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0x600) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32
+// 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("144", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("强制帧率", "已关闭", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("强制帧率|Frame rate", false);
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0x600) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32
+// 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("60", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return qzzlSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard creategzghSwitchContentCard() {
+ final SwitchContentCard gzghSwitchContentCard = new SwitchContentCard("改装光环", "改装状态下携带光环移动").OText("改装光环","改装状态下携带光环移动","Halo","Carry Halo Mobile").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ gzghSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ gzghShortcutButton.show();
+ } else {
+ gzghShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(gzghSwitchContentCard, gzghShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("改装光环", "已开启", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("改装光环|Halo", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x800)+ 0x538) + 0x528) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("08521", daddr, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("改装光环", "切换画质以关闭功能", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("改装光环|Halo", false);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x800)+ 0x538) + 0x528) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("689273856", daddr, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return gzghSwitchContentCard;
+ }
+
+private SwitchContentCard createwxhjSwitchContentCard() {
+ final SwitchContentCard wxhjSwitchContentCard = new SwitchContentCard("无序挥击", "[仅自己可见]所有可旋转模块无序转动").OText("无序挥击","[仅自己可见]所有可旋转模块无序转动","Disorder","All rotatable modules rotate disorderly").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ wxhjSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ wxhjShortcutButton.show();
+ } else {
+ wxhjShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(wxhjSwitchContentCard, wxhjShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("无序挥击", "已开启", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("无序挥击|Disorder", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x7C0)+ 0x7B0) + 0x608) + 0x7E4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9999", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("无序挥击", "已关闭", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("无序挥击|Disorder", false);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x7C0)+ 0x7B0) + 0x608) + 0x7E4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-185", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return wxhjSwitchContentCard;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/PlayerCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/PlayerCategoryBox.java
new file mode 100644
index 0000000..1ab4a72
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/PlayerCategoryBox.java
@@ -0,0 +1,2768 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import android.graphics.Typeface;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.callback.SliderCallback;
+import android.annotation.SuppressLint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.File;
+import java.util.Locale;
+import java.util.concurrent.Delayed;
+import android.os.AsyncTask;
+import com.bytecat.algui.AlguiTools.AlguiToolAudio;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.time.Clock;
+import com.bytecat.algui.ui.component.ButtonContent;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.button.ShortcutButton;
+import android.view.View;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.AlguiHacker.AlguiNativeMemTool;
+
+public class PlayerCategoryBox extends CategoryBox {
+ private SwitchShortcutButton jsShortcutButton;
+ private SwitchShortcutButton gjShortcutButton;
+ private SwitchShortcutButton xzShortcutButton;
+ private SwitchShortcutButton hzlShortcutButton;
+ private SwitchShortcutButton tkShortcutButton;
+private SwitchShortcutButton tytkShortcutButton;
+private SwitchShortcutButton hzkxShortcutButton;
+private SwitchShortcutButton wjfsShortcutButton;
+private SwitchShortcutButton hwbdShortcutButton;
+private SwitchShortcutButton jxmcShortcutButton;
+private SwitchShortcutButton jjxtShortcutButton;
+private SwitchShortcutButton dlsjsShortcutButton;
+private SwitchShortcutButton sjzkShortcutButton;
+private SwitchShortcutButton kqzlShortcutButton;
+private SwitchShortcutButton zlxgShortcutButton;
+ private ShortcutButton shunShortcutButton;
+ private SwitchShortcutButton zzShortcutButton;
+ private SwitchShortcutButton zzzShortcutButton;
+ private SwitchShortcutButton xxShortcutButton;
+ private SwitchShortcutButton xxxShortcutButton;
+ private SwitchShortcutButton yyShortcutButton;
+ private SwitchShortcutButton yyyShortcutButton;
+ private SwitchShortcutButton yjShortcutButton;
+ private SwitchShortcutButton gdShortcutButton;
+ private SwitchShortcutButton djzzShortcutButton;
+
+
+
+ public PlayerCategoryBox() {
+ createShortcutButtons();
+ contentContainer
+
+ .addView(createsjSwitchContentCard())
+ .addView(createtkSwitchContentCard())
+ .addView(createtytkSwitchContentCard())
+ .addView(createsjzkSwitchContentCard())
+ .addView(createxzSwitchContentCard())
+ .addView(createhzlSwitchContentCard())
+ .addView(createhzkxSwitchContentCard())
+ .addView(createwjfsSwitchContentCard())
+ .addView(createhwbdSwitchContentCard())
+ .addView(createjxmcSwitchContentCard())
+ .addView(createjjxtSwitchContentCard())
+ .addView(createkqzlSwitchContentCard())
+ .addView(createzlxgSwitchContentCard())
+ .addView(createzzSwitchContentCard())
+ .addView(createSwitchContentCard())
+ .addView(createdlsjsSwitchContentCard())
+ ;
+
+ }
+ private void createShortcutButtons() {
+
+ gjShortcutButton = new SwitchShortcutButton()
+ .OText("阻力修改","Modifyresistan");
+ xzShortcutButton = new SwitchShortcutButton()
+ .OText("旋转","Rotate");
+ hzlShortcutButton = new SwitchShortcutButton()
+ .OText("后坐力","Recoil");
+hzkxShortcutButton = new SwitchShortcutButton()
+ .OText("后坐力抗性","Resist");
+wjfsShortcutButton = new SwitchShortcutButton()
+ .OText("无迹飞梭","Spacebounce");
+hwbdShortcutButton = new SwitchShortcutButton()
+ .OText("恒稳不倒","Notfall");
+jxmcShortcutButton = new SwitchShortcutButton()
+ .OText("减小摩擦","Friction");
+jjxtShortcutButton = new SwitchShortcutButton()
+ .OText("紧急固定","Emergencyfixation");
+ dlsjsShortcutButton = new SwitchShortcutButton()
+ .OText("推进加速","Acceleration");
+sjzkShortcutButton = new SwitchShortcutButton()
+ .OText("视角自控","Self-control");
+kqzlShortcutButton = new SwitchShortcutButton()
+ .OText("空气阻力","Airfriction");
+ tkShortcutButton = new SwitchShortcutButton()
+ .OText("核心踏空","Fly");
+ tytkShortcutButton = new SwitchShortcutButton()
+ .OText("腾跃踏空","Airjump");
+ zlxgShortcutButton = new SwitchShortcutButton()
+ .OText("重力调节","Gravity");
+
+ xxShortcutButton = new SwitchShortcutButton()
+ .OText("[纵]Y+","Y++");
+ xxxShortcutButton = new SwitchShortcutButton()
+ .OText("[纵]Y-","Y--");
+ yyShortcutButton = new SwitchShortcutButton()
+ .OText("[横]X+","X++");
+ yyyShortcutButton = new SwitchShortcutButton()
+ .OText("[横]X-","X--");
+ zzShortcutButton = new SwitchShortcutButton()
+ .setText("Z++");
+ zzzShortcutButton = new SwitchShortcutButton()
+ .setText("Z--");
+ yjShortcutButton = new SwitchShortcutButton()
+ .OText("坐标控制","TP");
+ gdShortcutButton = new SwitchShortcutButton()
+ .OText("冻结高度","freeze");
+ djzzShortcutButton = new SwitchShortcutButton()
+ .OText("锁定坐标","lock");
+
+ }
+
+ private SwitchContent shortcutSwitchContent;
+Notification notification = Notification.getInstance();
+
+private AsyncTask asyncTask;
+
+ private AsyncTask asyncTask1;
+ private AsyncTask asyncTask2;
+
+ private Thread thread1;
+ private Thread thread2;
+ private volatile boolean isRunning = true; // 添加一个标志变量,用于控制循环是否继续执行
+ private ExecutorService executorService;
+ private Thread task1Thread = null;
+ private Thread task2Thread = null;
+ private Thread task3Thread = null;
+ private Thread task4Thread = null;
+ private Thread task5Thread = null;
+ private Thread task6Thread = null;
+
+
+
+ /* ====== 控制线程 ====== */
+ private volatile Thread flyThread = null;
+ private volatile boolean running = false;
+
+ /* ====== 自控速度 ====== */
+ private float flySpeed; // 默认速度
+
+
+ private SwitchContentCard createsjSwitchContentCard() {
+ final SwitchContentCard reachSwitchContentCard = new SwitchContentCard("阻力修改", "改变游戏中对于玩家的综合阻力").OText("阻力修改","改变游戏中对于玩家的综合阻力","Modifyresistan","Modify and set resistance").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ reachSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ Text distanceTitleText = new Text()
+ .setText("数值: ","Value:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("9.55")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10, 0, 9)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText.setText(String.format(""+newProgress));
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x380868) + 0x400) + 0x55A;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format("%.2f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x380868) + 0x400) + 0x55A;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ gjShortcutButton.show();
+ } else {
+ gjShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(reachSwitchContentCard, gjShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("阻力修改|Modifyresistan", true);
+ // 创建线程并启动
+
+
+
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("阻力修改|Modifyresistan", false);
+ distanceText.setText("9.55");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x380868) + 0x400) + 0x55A;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9.5", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return reachSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createxzSwitchContentCard() {
+ final SwitchContentCard xzSwitchContentCard = new SwitchContentCard("车体旋转", "车体快速自转").OText("车体旋转","车体快速自转","Rotate","Rapid rotation").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ xzSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ xzShortcutButton.show();
+ } else {
+ xzShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(xzSwitchContentCard, xzShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+Main.音效();
+ if (newState) {
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xE4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("969.37", daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(20);
+ModuleManager.getInstance().setModuleEnabled("车体旋转|Rotate", true);
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("车体旋转|Rotate", false);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xE4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("969.37", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(20);
+ }
+ return true;
+ }
+ });
+
+ return xzSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createhzlSwitchContentCard() {
+ final SwitchContentCard hzlSwitchContentCard = new SwitchContentCard("后坐力", "修改并设置武器的后坐力").OText("后坐力","修改并设置武器的后坐力","Recoil","Change and set the recoil of the weapon").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hzlSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("反向: ","Reverse direction:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("-3.5")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10, -10, -3)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+ if (newProgress<0) {
+ distanceTitleText.setText("反向:","Reverse direction:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+
+
+
+ if (newProgress ==0) {
+ distanceTitleText.setText("暂不支持","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ }
+
+ if (newProgress>0) {
+ distanceTitleText.setText("正向:","Positive Direction:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+
+
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ if (newProgress!=0) {
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+
+}
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ hzlShortcutButton.show();
+ } else {
+ hzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hzlSwitchContentCard, hzlShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("后坐力|Recoil", true);
+
+
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("后坐力|Recoil", false);
+ distanceText.setText("无");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ return true;
+ }
+ });
+
+ return hzlSwitchContentCard;
+ }
+
+
+
+
+
+
+
+
+private SwitchContentCard createsjzkSwitchContentCard() {
+ final SwitchContentCard sjzkSwitchContentCard = new SwitchContentCard("视角自控", "向视角朝向飞行")
+ .OText("视角自控","向视角朝向飞行","Self-controlled flight","Towards the perspective towards flight");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ sjzkSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能")
+ .OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ sjzkShortcutButton.show();
+ } else {
+ sjzkShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+
+ SyncUtil.sync(sjzkSwitchContentCard, sjzkShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ notification.make("视角自控", "已开启", "Self-controlled flight", "Open", Notification.Type.SUCCESS);
+ ModuleManager.getInstance().setModuleEnabled("视角自控|Self-controlled flight", true);
+
+ace.executeHiddenBinary("libalguivv.so");
+
+ } else {
+ notification.make("视角自控", "已关闭", "Self-controlled flight", "Close", Notification.Type.ERROR);
+ ModuleManager.getInstance().setModuleEnabled("视角自控|Self-controlled flight", false);
+
+ace.stopBinary("libalguivv.so");
+ }
+ return true;
+ }
+ });
+
+ return sjzkSwitchContentCard;
+}
+
+
+
+ private SwitchContentCard createzzSwitchContentCard() {
+
+ final SwitchContentCard yjSwitchContentCard = new SwitchContentCard("坐标控制", "根据不同的需求进行坐标级平移").OText("坐标控制台","根据不同的数值进行坐标轴平移","Coordinates","Coordinate Control Console").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ yjSwitchContentCard.setExpandableContent(column);
+
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("X轴 [地图上横向]:","X:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr2, AlguiMemTool.TYPE_FLOAT, false, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+ Row distanceRow1 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow1);
+
+ final Text distanceTitleText1 = new Text()
+ .setText("Y轴 [地图上纵向]:","Y:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceTitleText1);
+
+ final Text distanceText1 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceText1);
+
+ final Slider slider1 = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+ }
+
+ });
+ column.addView(slider1);
+
+ Row distanceRow2 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow2);
+
+ final Text distanceTitleText2 = new Text()
+ .setText("Z轴 [人物高度]:","Z").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceTitleText2);
+
+ final Text distanceText2 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceText2);
+
+ final Slider slider2 = new Slider(10000, -1000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+ }
+
+ });
+ column.addView(slider2);
+
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+
+ xxShortcutButton.show();
+ xxxShortcutButton.show();
+ yyShortcutButton.show();
+ yyyShortcutButton.show();
+ gdShortcutButton.show();
+ djzzShortcutButton.show();
+ zzShortcutButton.show();
+ zzzShortcutButton.show();
+ } else {
+
+ xxShortcutButton.dismiss();
+ xxxShortcutButton.dismiss();
+ yyShortcutButton.dismiss();
+ yyyShortcutButton.dismiss();
+ gdShortcutButton.dismiss();
+ djzzShortcutButton.dismiss();
+ zzzShortcutButton.dismiss();
+ zzShortcutButton.dismiss();
+ stopTask2();
+ stopTask1();
+ stopTask3();
+ stopTask4();
+ gdShortcutButton.setChecked(false);
+ xxShortcutButton.setChecked(false);
+ xxxShortcutButton.setChecked(false);
+ yyShortcutButton.setChecked(false);
+ yyyShortcutButton.setChecked(false);
+ djzzShortcutButton.setChecked(false);
+ zzShortcutButton.setChecked(false);
+ zzzShortcutButton.setChecked(false);
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(yjSwitchContentCard, yjShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+ slider1.setEnabled(newState);
+ slider1.setEnabled1(newState);
+ slider2.setEnabled(newState);
+ slider2.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+ModuleManager.getInstance().setModuleEnabled("坐标控制|Coordinates", true);
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("坐标控制|Coordinates", false);
+
+ }
+ return true;
+ }
+ });
+
+ xxShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked) {
+ if (isChecked) {
+
+ startTask1();
+ } else {
+ stopTask1();
+ }
+ return true; // 允许状态切换
+ }
+ });
+ xxxShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked1) {
+ if (isChecked1) {
+ startTask3();
+
+ } else {
+ stopTask3();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ yyShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked2) {
+ if (isChecked2) {
+ startTask2();
+
+ } else {
+ stopTask2();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ yyyShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ startTask4();
+
+ } else {
+ stopTask4();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ zzShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked4) {
+ if (isChecked4) {
+ startTask5();
+
+ } else {
+ stopTask5();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ zzzShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ startTask6();
+
+ } else {
+ stopTask6();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ gdShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ djzzShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ String currentValue1 = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue1, daddr, AlguiMemTool.TYPE_FLOAT, true, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ String currentValue2 = AlguiMemTool.getMemoryAddrData(daddr2, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue2, daddr2, AlguiMemTool.TYPE_FLOAT, true, true);
+
+
+
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ String currentValue1 = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue1, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ String currentValue2 = AlguiMemTool.getMemoryAddrData(daddr2, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue2, daddr2, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ return yjSwitchContentCard;
+ }
+
+ private SwitchContentCard createtkSwitchContentCard() {
+ final SwitchContentCard tkSwitchContentCard = new SwitchContentCard("核心踏空", "使萌新核心可踏空行走").OText("核心踏空","使核心可以踏空行走","Fly","Make it possible to step on the air after disassembly");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ tkSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("数值: ","Value:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("1.0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(1024, 1, 512)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+// 设置包名
+
+
+//
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x288) + 0x0E8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x288) + 0x0E8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tkShortcutButton.show();
+ } else {
+ tkShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tkSwitchContentCard, tkShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("核心踏空|Fly", true);
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("核心踏空|Fly", false);
+
+ distanceText.setText("1.0");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x288) + 0x0E8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("0.85", daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return tkSwitchContentCard;
+ }
+
+private SwitchContentCard createtytkSwitchContentCard() {
+ final SwitchContentCard tytkSwitchContentCard = new SwitchContentCard("腾跃踏空", "使有腾跃模块的铁臂可踏空行走").OText("腾跃踏空","装上腾跃即可踏空而行","AirJump","Fly for me.");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ tytkSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ","Value:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("5.0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(500, 2, 5)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tytkShortcutButton.show();
+ } else {
+ tytkShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tytkSwitchContentCard, tytkShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+
+ModuleManager.getInstance().setModuleEnabled("腾越踏空|AirJump", true);
+
+ } else {
+
+ModuleManager.getInstance().setModuleEnabled("腾越踏空|AirJump", false);
+ distanceText.setText("0.85");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0.85", daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return tytkSwitchContentCard;
+ }
+
+
+
+
+
+
+private SwitchContentCard createhzkxSwitchContentCard() {
+ final SwitchContentCard hzkxSwitchContentCard = new SwitchContentCard("后坐力抗性", "减少后坐力对玩家的影响,但会导致行动会缓慢").OText("后坐力抗性","减少后坐力对玩家的影响,但会导致行动会缓慢","Resist","Reducing the impact of recoil on players");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hzkxSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ hzkxShortcutButton.show();
+ } else {
+ hzkxShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hzkxSwitchContentCard, hzkxShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+Main.音效();
+ if (newState) {
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x456E28)+0x150)+0x40)+0x88)+0x70)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("17", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x1A8)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("17", daddr21, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+ModuleManager.getInstance().setModuleEnabled("后坐力抗性|Resist", true);
+
+ } else {
+
+ModuleManager.getInstance().setModuleEnabled("后坐力抗性|Resist", false);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x456E28)+0x150)+0x40)+0x88)+0x70)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x1A8)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr21, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return hzkxSwitchContentCard;
+ }
+
+
+
+
+
+
+
+private SwitchContentCard createwjfsSwitchContentCard() {
+ final SwitchContentCard wjfsSwitchContentCard = new SwitchContentCard("无迹飞梭", "毫无轨迹的后坐力移动方式").OText("无迹飞梭","毫无轨迹的后坐力移动方式","Spacebounce","Flight mode without trajectory");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ wjfsSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ wjfsShortcutButton.show();
+ } else {
+ wjfsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(wjfsSwitchContentCard, wjfsShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+Main.音效();
+ if (newState) {
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x10)+0x750)+0x78)+0x430)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-869", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x70)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-869", daddr21, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+ModuleManager.getInstance().setModuleEnabled("无迹飞梭|Spacebounce", true);
+
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("无迹飞梭|Spacebounce", true);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x10)+0x750)+0x78)+0x430)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x70)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr21, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return wjfsSwitchContentCard;
+ }
+
+
+
+
+ private ButtonContentCard createSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("一键自杀", "传送到深渊", false)
+ .OText("一键自杀", "传送到深渊", "One-Click Suicide", "Teleport to Abyss")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+
+
+ zzbutton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ 自杀();
+ }
+ });
+
+
+
+ return zzbutton;
+}
+
+
+
+
+
+ private SwitchContentCard createhwbdSwitchContentCard() {
+ final SwitchContentCard hwbdSwitchContentCard = new SwitchContentCard("恒稳不倒", "玩家保持垂直于地面的稳定姿态,不会倒下").OText("恒稳不倒","玩家保持垂直于地面的稳定姿态,不会倒下","Nofall","Won't fall.");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hwbdSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ hwbdShortcutButton.show();
+ } else {
+ hwbdShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hwbdSwitchContentCard, hwbdShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("恒稳不倒", "已开启","Nofall","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("恒稳不倒|Nofall", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x4602C0) + 0xC0) + 0x60)
+ + 0x10) + 0x1A8) + 0xAC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x0;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x8;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0xD274F8) + 0x168) + 0x340)
+ + 0x80) + 0xA0)
+ + 0x98;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("恒稳不倒", "已关闭","Nofall","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("恒稳不倒|Nofall", false);
+
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x4602C0) + 0xC0) + 0x60)
+ + 0x10) + 0x1A8) + 0xAC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x0;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x8;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0xD274F8) + 0x168) + 0x340)
+ + 0x80) + 0xA0)
+ + 0x98;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return hwbdSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createjxmcSwitchContentCard() {
+ final SwitchContentCard jxmcSwitchContentCard = new SwitchContentCard("减小摩擦", "减小与地面的摩擦力").OText("减少摩擦","减小与地面的摩擦力","Friction","Reduce friction with the ground");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ jxmcSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ jxmcShortcutButton.show();
+ } else {
+ jxmcShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(jxmcSwitchContentCard, jxmcShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("减小摩擦", "已开启","Friction","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("减小摩擦|Friction", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名 AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0x88) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x380868) + 0x28) + 0x0)
+ + 0x88) + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x456E28) + 0x150) + 0x40)
+ + 0x88) + 0x40) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0x39F028) + 0x3D0) + 0x138)
+ + 0x88) + 0x88)
+ + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("减小摩擦", "已关闭","Friction","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("减小摩擦|Friction", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0x88) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x380868) + 0x28) + 0x0)
+ + 0x88) + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x456E28) + 0x150) + 0x40)
+ + 0x88) + 0x40) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0x39F028) + 0x3D0) + 0x138)
+ + 0x88) + 0x88)
+ + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return jxmcSwitchContentCard;
+ }
+
+
+private SwitchContentCard createjjxtSwitchContentCard() {
+ final SwitchContentCard jjxtSwitchContentCard = new SwitchContentCard("紧急固定", "紧急固定车体坐标").OText("紧急固定","紧急固定车体的坐标","Emergencyfixation","Emergency fixed coordinate");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ jjxtSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ jjxtShortcutButton.show();
+ } else {
+ jjxtShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(jjxtSwitchContentCard, jjxtShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ if (newState) {
+ notification.make("紧急固定", "已开启","Emergencyfixation","Open", Notification.Type.SUCCESS);
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9399.08521", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+ModuleManager.getInstance().setModuleEnabled("紧急固定|Emergencyfixation", true);
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("紧急固定|Emergencyfixation", false);
+ notification.make("紧急固定", "已关闭","Emergencyfixation","Close", Notification.Type.ERROR);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return jjxtSwitchContentCard;
+ }
+
+ private SwitchContentCard createkqzlSwitchContentCard() {
+ final SwitchContentCard kqzlSwitchContentCard = new SwitchContentCard("空气阻力", "增加空气阻力").OText("空气阻力","增加空气阻力","Airfriction","Increase the resistance of the air");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ kqzlSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ kqzlShortcutButton.show();
+ } else {
+ kqzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(kqzlSwitchContentCard, kqzlShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("空气阻力", "已开启","Airfriction","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("空气阻力|Airfriction", true);
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCA3520)+0x50)+0x300)+0x1E8)+0x10)+0xF8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x388)+0x0)+0x88)+0x38)+0x68;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+
+
+ } else {
+notification.make("空气阻力", "已关闭","Airfriction","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("空气阻力|Airfriction", false);
+
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCA3520)+0x50)+0x300)+0x1E8)+0x10)+0xF8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x388)+0x0)+0x88)+0x38)+0x68;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return kqzlSwitchContentCard;
+ }
+
+
+private SwitchContentCard createzlxgSwitchContentCard() {
+ final SwitchContentCard zlxgSwitchContentCard = new SwitchContentCard("重力调节", "修改人物重力").OText("重力调节","修改人物重力","Gravity","Change one's own gravity");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ zlxgSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("数值: ","Value:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(3, -3, 0)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcbc30)+0x3f8)+0x420)+0x28)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xdcbc30)+0x358)+0x440)+0x10)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcbc30)+0x3f8)+0x420)+0x28)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xdcbc30)+0x358)+0x440)+0x10)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ zlxgShortcutButton.show();
+ } else {
+ zlxgShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(zlxgSwitchContentCard, zlxgShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("重力调节|Gravity", true);
+
+ notification.make("重力调节", "已开启","Gravity","Open", Notification.Type.SUCCESS);
+
+
+
+ } else {
+
+ModuleManager.getInstance().setModuleEnabled("重力调节|Gravity", false);
+ notification.make("重力调节", "已关闭","Gravity","Close", Notification.Type.ERROR);
+ distanceText.setText("0");
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcbc30)+0x3f8)+0x420)+0x28)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xdcbc30)+0x358)+0x440)+0x10)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr1, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return zlxgSwitchContentCard;
+ }
+
+
+
+
+private SwitchContentCard createdlsjsSwitchContentCard() {
+ final SwitchContentCard dlsjsSwitchContentCard = new SwitchContentCard("推进加速","增加大力神速度").OText("推进加速","增加大力神速度","Propeller acceleration","Speed up the accelerator");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ dlsjsSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ","Value:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("1.875")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(9, 2, 2)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+
+
+
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ dlsjsShortcutButton.show();
+ } else {
+ dlsjsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(dlsjsSwitchContentCard, dlsjsShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+
+ if (newState) {
+ notification.make("推进加速", "已开启","Propeller acceleration","Open", Notification.Type.SUCCESS);
+
+
+
+ModuleManager.getInstance().setModuleEnabled("推进加速|Propeller acceleration", true);
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("推进加速|Propeller acceleration", false);
+ notification.make("推进加速", "已关闭","Propeller acceleration","Close", Notification.Type.ERROR);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1.875", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return dlsjsSwitchContentCard;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+private void 自杀() {
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCBC30) + 0x380) + 0x1C0)+ 0x88) + 0x38) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-114000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x380) + 0x1C0)+ 0x88) + 0x38) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-114000", daddr1, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+notification.make("一键自杀", "执行", Notification.Type.SUCCESS);
+
+}
+
+
+
+
+
+
+
+
+
+ private void executeBehavior(String selectedOption, boolean enable) {
+ if (enable) {
+ ace.executeHiddenBinary(getAction(selectedOption)); // 添加行为到数组
+ } else {
+ ace.executeHiddenBinary(getCloseAction(selectedOption));
+ }
+ }
+
+ private String getAction(String option) {
+ switch (option) {
+
+ case"1":
+
+ return "1";
+ case"3":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("9", daddr, AlguiMemTool.TYPE_DOUBLE, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ return "3";
+ case"4":
+ return "4";
+
+
+ default:
+ return "ONE";
+ }}
+ private String getCloseAction(String option) {
+ switch (option) {
+ case "1":
+ return "1";
+ case "option2":
+ return "行为2关闭";
+ case "option3":
+ return "行为3关闭";
+ default:
+ return "行为1关闭";
+ }}
+
+
+
+
+
+
+
+
+
+
+ // 创建一个固定大小的线程池,这里使用 2 个线程
+
+
+ private Runnable task1Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue + 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ // 封装任务2的逻辑
+ private Runnable task2Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue + 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private Runnable task3Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue - 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private Runnable task4Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue - 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+
+ private Runnable task5Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue + 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private Runnable task6Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue - 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+
+
+
+ // 启动任务1
+ public void startTask1() {
+ if (task1Thread == null || !task1Thread.isAlive()) {
+ task1Thread = new Thread(task1Logic);
+ task1Thread.start();
+ }
+ }
+
+ // 启动任务2
+ public void startTask2() {
+ if (task2Thread == null || !task2Thread.isAlive()) {
+ task2Thread = new Thread(task2Logic);
+ task2Thread.start();
+ }
+ }
+
+ public void startTask3() {
+ if (task3Thread == null || !task3Thread.isAlive()) {
+ task3Thread = new Thread(task3Logic);
+ task3Thread.start();
+ }
+ }
+
+ public void startTask4() {
+ if (task4Thread == null || !task4Thread.isAlive()) {
+ task4Thread = new Thread(task4Logic);
+ task4Thread.start();
+ }
+ }
+
+ public void startTask5() {
+ if (task5Thread == null || !task5Thread.isAlive()) {
+ task5Thread = new Thread(task5Logic);
+ task5Thread.start();
+ }
+ }
+
+ public void startTask6() {
+ if (task6Thread == null || !task6Thread.isAlive()) {
+ task6Thread = new Thread(task6Logic);
+ task6Thread.start();
+ }
+ }
+
+ // 停止任务1
+ public void stopTask1() {
+ if (task1Thread != null && task1Thread.isAlive()) {
+ task1Thread.interrupt(); // 中断线程
+ }
+ }
+
+ // 停止任务2
+ public void stopTask2() {
+ if (task2Thread != null && task2Thread.isAlive()) {
+ task2Thread.interrupt(); // 中断线程
+ }
+ }
+
+ public void stopTask3() {
+ if (task3Thread != null && task3Thread.isAlive()) {
+ task3Thread.interrupt(); // 中断线程
+ }
+ }
+
+ public void stopTask4() {
+ if (task4Thread != null && task4Thread.isAlive()) {
+ task4Thread.interrupt(); // 中断线程
+ }
+ }
+
+
+ public void stopTask5() {
+ if (task5Thread != null && task5Thread.isAlive()) {
+ task5Thread.interrupt(); // 中断线程
+ }
+ }
+
+ public void stopTask6() {
+ if (task6Thread != null && task6Thread.isAlive()) {
+ task6Thread.interrupt(); // 中断线程
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/PlayerCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/PlayerCategoryBox.java.bak
new file mode 100644
index 0000000..ad525b8
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/PlayerCategoryBox.java.bak
@@ -0,0 +1,2766 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import android.graphics.Typeface;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.callback.SliderCallback;
+import android.annotation.SuppressLint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.File;
+import java.util.Locale;
+import java.util.concurrent.Delayed;
+import android.os.AsyncTask;
+import com.bytecat.algui.AlguiTools.AlguiToolAudio;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.time.Clock;
+import com.bytecat.algui.ui.component.ButtonContent;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.button.ShortcutButton;
+import android.view.View;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.AlguiHacker.AlguiNativeMemTool;
+
+public class PlayerCategoryBox extends CategoryBox {
+ private SwitchShortcutButton jsShortcutButton;
+ private SwitchShortcutButton gjShortcutButton;
+ private SwitchShortcutButton xzShortcutButton;
+ private SwitchShortcutButton hzlShortcutButton;
+ private SwitchShortcutButton tkShortcutButton;
+private SwitchShortcutButton tytkShortcutButton;
+private SwitchShortcutButton hzkxShortcutButton;
+private SwitchShortcutButton wjfsShortcutButton;
+private SwitchShortcutButton hwbdShortcutButton;
+private SwitchShortcutButton jxmcShortcutButton;
+private SwitchShortcutButton jjxtShortcutButton;
+private SwitchShortcutButton dlsjsShortcutButton;
+private SwitchShortcutButton sjzkShortcutButton;
+private SwitchShortcutButton kqzlShortcutButton;
+private SwitchShortcutButton zlxgShortcutButton;
+ private ShortcutButton shunShortcutButton;
+ private SwitchShortcutButton zzShortcutButton;
+ private SwitchShortcutButton zzzShortcutButton;
+ private SwitchShortcutButton xxShortcutButton;
+ private SwitchShortcutButton xxxShortcutButton;
+ private SwitchShortcutButton yyShortcutButton;
+ private SwitchShortcutButton yyyShortcutButton;
+ private SwitchShortcutButton yjShortcutButton;
+ private SwitchShortcutButton gdShortcutButton;
+ private SwitchShortcutButton djzzShortcutButton;
+
+
+
+ public PlayerCategoryBox() {
+ createShortcutButtons();
+ contentContainer
+
+ .addView(createsjSwitchContentCard())
+ .addView(createtkSwitchContentCard())
+ .addView(createtytkSwitchContentCard())
+ .addView(createsjzkSwitchContentCard())
+ .addView(createxzSwitchContentCard())
+ .addView(createhzlSwitchContentCard())
+ .addView(createhzkxSwitchContentCard())
+ .addView(createwjfsSwitchContentCard())
+ .addView(createhwbdSwitchContentCard())
+ .addView(createjxmcSwitchContentCard())
+ .addView(createjjxtSwitchContentCard())
+ .addView(createkqzlSwitchContentCard())
+ .addView(createzlxgSwitchContentCard())
+ .addView(createzzSwitchContentCard())
+ .addView(createSwitchContentCard())
+ .addView(createdlsjsSwitchContentCard())
+ ;
+
+ }
+ private void createShortcutButtons() {
+
+ gjShortcutButton = new SwitchShortcutButton()
+ .OText("阻力修改","Modifyresistan");
+ xzShortcutButton = new SwitchShortcutButton()
+ .OText("旋转","Rotate");
+ hzlShortcutButton = new SwitchShortcutButton()
+ .OText("后坐力","Recoil");
+hzkxShortcutButton = new SwitchShortcutButton()
+ .OText("后坐力抗性","Resist");
+wjfsShortcutButton = new SwitchShortcutButton()
+ .OText("无迹飞梭","Spacebounce");
+hwbdShortcutButton = new SwitchShortcutButton()
+ .OText("恒稳不倒","Notfall");
+jxmcShortcutButton = new SwitchShortcutButton()
+ .OText("减小摩擦","Friction");
+jjxtShortcutButton = new SwitchShortcutButton()
+ .OText("紧急固定","Emergencyfixation");
+ dlsjsShortcutButton = new SwitchShortcutButton()
+ .OText("推进加速","Acceleration");
+sjzkShortcutButton = new SwitchShortcutButton()
+ .OText("视角自控","Self-control");
+kqzlShortcutButton = new SwitchShortcutButton()
+ .OText("空气阻力","Airfriction");
+ tkShortcutButton = new SwitchShortcutButton()
+ .OText("核心踏空","Fly");
+ tytkShortcutButton = new SwitchShortcutButton()
+ .OText("腾跃踏空","Airjump");
+ zlxgShortcutButton = new SwitchShortcutButton()
+ .OText("重力调节","Gravity");
+
+ xxShortcutButton = new SwitchShortcutButton()
+ .OText("[纵]Y+","Y++");
+ xxxShortcutButton = new SwitchShortcutButton()
+ .OText("[纵]Y-","Y--");
+ yyShortcutButton = new SwitchShortcutButton()
+ .OText("[横]X+","X++");
+ yyyShortcutButton = new SwitchShortcutButton()
+ .OText("[横]X-","X--");
+ zzShortcutButton = new SwitchShortcutButton()
+ .setText("Z++");
+ zzzShortcutButton = new SwitchShortcutButton()
+ .setText("Z--");
+ yjShortcutButton = new SwitchShortcutButton()
+ .OText("坐标控制","TP");
+ gdShortcutButton = new SwitchShortcutButton()
+ .OText("冻结高度","freeze");
+ djzzShortcutButton = new SwitchShortcutButton()
+ .OText("锁定坐标","lock");
+
+ }
+
+ private SwitchContent shortcutSwitchContent;
+Notification notification = Notification.getInstance();
+
+private AsyncTask asyncTask;
+
+ private AsyncTask asyncTask1;
+ private AsyncTask asyncTask2;
+
+ private Thread thread1;
+ private Thread thread2;
+ private volatile boolean isRunning = true; // 添加一个标志变量,用于控制循环是否继续执行
+ private ExecutorService executorService;
+ private Thread task1Thread = null;
+ private Thread task2Thread = null;
+ private Thread task3Thread = null;
+ private Thread task4Thread = null;
+ private Thread task5Thread = null;
+ private Thread task6Thread = null;
+
+
+
+ /* ====== 控制线程 ====== */
+ private volatile Thread flyThread = null;
+ private volatile boolean running = false;
+
+ /* ====== 自控速度 ====== */
+ private float flySpeed; // 默认速度
+
+
+ private SwitchContentCard createsjSwitchContentCard() {
+ final SwitchContentCard reachSwitchContentCard = new SwitchContentCard("阻力修改", "改变游戏中对于玩家的综合阻力").OText("阻力修改","改变游戏中对于玩家的综合阻力","Modifyresistan","Modify and set resistance").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ reachSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ Text distanceTitleText = new Text()
+ .setText("数值: ","Value:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("9.55")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10, 0, 9)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText.setText(String.format(""+newProgress));
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x380868) + 0x400) + 0x55A;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format("%.2f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x380868) + 0x400) + 0x55A;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ gjShortcutButton.show();
+ } else {
+ gjShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(reachSwitchContentCard, gjShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("阻力修改|Modifyresistan", true);
+ // 创建线程并启动
+
+
+
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("阻力修改|Modifyresistan", false);
+ distanceText.setText("9.55");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x380868) + 0x400) + 0x55A;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9.5", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return reachSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createxzSwitchContentCard() {
+ final SwitchContentCard xzSwitchContentCard = new SwitchContentCard("车体旋转", "车体快速自转").OText("车体旋转","车体快速自转","Rotate","Rapid rotation").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ xzSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ xzShortcutButton.show();
+ } else {
+ xzShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(xzSwitchContentCard, xzShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+Main.音效();
+ if (newState) {
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xE4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("969.37", daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(20);
+ModuleManager.getInstance().setModuleEnabled("车体旋转|Rotate", true);
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("车体旋转|Rotate", false);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0xE4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("969.37", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(20);
+ }
+ return true;
+ }
+ });
+
+ return xzSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createhzlSwitchContentCard() {
+ final SwitchContentCard hzlSwitchContentCard = new SwitchContentCard("后坐力", "修改并设置武器的后坐力").OText("后坐力","修改并设置武器的后坐力","Recoil","Change and set the recoil of the weapon").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hzlSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("反向: ","Reverse direction:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("-3.5")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10, -10, -3)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+ if (newProgress<0) {
+ distanceTitleText.setText("反向:","Reverse direction:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+
+
+
+ if (newProgress ==0) {
+ distanceTitleText.setText("暂不支持","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ }
+
+ if (newProgress>0) {
+ distanceTitleText.setText("正向:","Positive Direction:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+
+
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ if (newProgress!=0) {
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+
+}
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ hzlShortcutButton.show();
+ } else {
+ hzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hzlSwitchContentCard, hzlShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("后坐力|Recoil", true);
+
+
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("后坐力|Recoil", false);
+ distanceText.setText("无");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x70) + 0x10) + 0x10C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ return true;
+ }
+ });
+
+ return hzlSwitchContentCard;
+ }
+
+
+
+
+
+
+
+
+private SwitchContentCard createsjzkSwitchContentCard() {
+ final SwitchContentCard sjzkSwitchContentCard = new SwitchContentCard("视角自控", "向视角朝向飞行")
+ .OText("视角自控","向视角朝向飞行","Self-controlled flight","Towards the perspective towards flight");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ sjzkSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能")
+ .OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ sjzkShortcutButton.show();
+ } else {
+ sjzkShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+
+ SyncUtil.sync(sjzkSwitchContentCard, sjzkShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ notification.make("视角自控", "已开启", "Self-controlled flight", "Open", Notification.Type.SUCCESS);
+ ModuleManager.getInstance().setModuleEnabled("视角自控|Self-controlled flight", true);
+
+ace.executeHiddenBinary("libalguivv.so");
+
+ } else {
+ notification.make("视角自控", "已关闭", "Self-controlled flight", "Close", Notification.Type.ERROR);
+ ModuleManager.getInstance().setModuleEnabled("视角自控|Self-controlled flight", false);
+
+ace.stopBinary("libalguivv.so");
+ }
+ return true;
+ }
+ });
+
+ return sjzkSwitchContentCard;
+}
+
+
+
+ private SwitchContentCard createzzSwitchContentCard() {
+
+ final SwitchContentCard yjSwitchContentCard = new SwitchContentCard("坐标控制", "根据不同的需求进行坐标级平移").OText("坐标控制台","根据不同的数值进行坐标轴平移","Coordinates","Coordinate Control Console").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ yjSwitchContentCard.setExpandableContent(column);
+
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("X轴 [地图上横向]:","X:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr2, AlguiMemTool.TYPE_FLOAT, false, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+ Row distanceRow1 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow1);
+
+ final Text distanceTitleText1 = new Text()
+ .setText("Y轴 [地图上纵向]:","Y:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceTitleText1);
+
+ final Text distanceText1 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceText1);
+
+ final Slider slider1 = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+ }
+
+ });
+ column.addView(slider1);
+
+ Row distanceRow2 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow2);
+
+ final Text distanceTitleText2 = new Text()
+ .setText("Z轴 [人物高度]:","Z").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceTitleText2);
+
+ final Text distanceText2 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceText2);
+
+ final Slider slider2 = new Slider(10000, -1000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+ }
+
+ });
+ column.addView(slider2);
+
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+
+ xxShortcutButton.show();
+ xxxShortcutButton.show();
+ yyShortcutButton.show();
+ yyyShortcutButton.show();
+ gdShortcutButton.show();
+ djzzShortcutButton.show();
+ zzShortcutButton.show();
+ zzzShortcutButton.show();
+ } else {
+
+ xxShortcutButton.dismiss();
+ xxxShortcutButton.dismiss();
+ yyShortcutButton.dismiss();
+ yyyShortcutButton.dismiss();
+ gdShortcutButton.dismiss();
+ djzzShortcutButton.dismiss();
+ zzzShortcutButton.dismiss();
+ zzShortcutButton.dismiss();
+ stopTask2();
+ stopTask1();
+ stopTask3();
+ stopTask4();
+ gdShortcutButton.setChecked(false);
+ xxShortcutButton.setChecked(false);
+ xxxShortcutButton.setChecked(false);
+ yyShortcutButton.setChecked(false);
+ yyyShortcutButton.setChecked(false);
+ djzzShortcutButton.setChecked(false);
+ zzShortcutButton.setChecked(false);
+ zzzShortcutButton.setChecked(false);
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(yjSwitchContentCard, yjShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+ slider1.setEnabled(newState);
+ slider1.setEnabled1(newState);
+ slider2.setEnabled(newState);
+ slider2.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+ModuleManager.getInstance().setModuleEnabled("坐标控制|Coordinates", true);
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("坐标控制|Coordinates", false);
+
+ }
+ return true;
+ }
+ });
+
+ xxShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked) {
+ if (isChecked) {
+
+ startTask1();
+ } else {
+ stopTask1();
+ }
+ return true; // 允许状态切换
+ }
+ });
+ xxxShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked1) {
+ if (isChecked1) {
+ startTask3();
+
+ } else {
+ stopTask3();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ yyShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked2) {
+ if (isChecked2) {
+ startTask2();
+
+ } else {
+ stopTask2();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ yyyShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ startTask4();
+
+ } else {
+ stopTask4();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ zzShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked4) {
+ if (isChecked4) {
+ startTask5();
+
+ } else {
+ stopTask5();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ zzzShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ startTask6();
+
+ } else {
+ stopTask6();
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ gdShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ djzzShortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean isChecked3) {
+ if (isChecked3) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ String currentValue1 = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue1, daddr, AlguiMemTool.TYPE_FLOAT, true, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ String currentValue2 = AlguiMemTool.getMemoryAddrData(daddr2, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue2, daddr2, AlguiMemTool.TYPE_FLOAT, true, true);
+
+
+
+ } else {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ String currentValue1 = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue1, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ String currentValue2 = AlguiMemTool.getMemoryAddrData(daddr2, AlguiMemTool.TYPE_FLOAT);
+ AlguiMemTool.setMemoryAddrValue(""+currentValue2, daddr2, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+ return true; // 允许状态切换
+ }
+ });
+
+ return yjSwitchContentCard;
+ }
+
+ private SwitchContentCard createtkSwitchContentCard() {
+ final SwitchContentCard tkSwitchContentCard = new SwitchContentCard("核心踏空", "使萌新核心可踏空行走").OText("核心踏空","使核心可以踏空行走","Fly","Make it possible to step on the air after disassembly");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ tkSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("数值: ","Value:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("1.0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(1024, 1, 512)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+// 设置包名
+
+
+//
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x288) + 0x0E8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x288) + 0x0E8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tkShortcutButton.show();
+ } else {
+ tkShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tkSwitchContentCard, tkShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("核心踏空|Fly", true);
+
+ } else {
+
+ ModuleManager.getInstance().setModuleEnabled("核心踏空|Fly", false);
+
+ distanceText.setText("1.0");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x288) + 0x0E8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("0.85", daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return tkSwitchContentCard;
+ }
+
+private SwitchContentCard createtytkSwitchContentCard() {
+ final SwitchContentCard tytkSwitchContentCard = new SwitchContentCard("腾跃踏空", "使有腾跃模块的铁臂可踏空行走").OText("腾跃踏空","装上腾跃即可踏空而行","AirJump","Fly for me.");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ tytkSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ","Value:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("5.0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(500, 2, 5)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tytkShortcutButton.show();
+ } else {
+ tytkShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tytkSwitchContentCard, tytkShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+
+ModuleManager.getInstance().setModuleEnabled("腾越踏空|AirJump", true);
+
+ } else {
+
+ModuleManager.getInstance().setModuleEnabled("腾越踏空|AirJump", false);
+ distanceText.setText("0.85");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("0.85", daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ return true;
+ }
+ });
+
+ return tytkSwitchContentCard;
+ }
+
+
+
+
+
+
+private SwitchContentCard createhzkxSwitchContentCard() {
+ final SwitchContentCard hzkxSwitchContentCard = new SwitchContentCard("后坐力抗性", "减少后坐力对玩家的影响,但会导致行动会缓慢").OText("后坐力抗性","减少后坐力对玩家的影响,但会导致行动会缓慢","Resist","Reducing the impact of recoil on players");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hzkxSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ hzkxShortcutButton.show();
+ } else {
+ hzkxShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hzkxSwitchContentCard, hzkxShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+Main.音效();
+ if (newState) {
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x456E28)+0x150)+0x40)+0x88)+0x70)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("17", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x1A8)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("17", daddr21, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+ModuleManager.getInstance().setModuleEnabled("后坐力抗性|Resist", true);
+
+ } else {
+
+ModuleManager.getInstance().setModuleEnabled("后坐力抗性|Resist", false);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x456E28)+0x150)+0x40)+0x88)+0x70)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x1A8)+0xFC;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr21, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return hzkxSwitchContentCard;
+ }
+
+
+
+
+
+
+
+private SwitchContentCard createwjfsSwitchContentCard() {
+ final SwitchContentCard wjfsSwitchContentCard = new SwitchContentCard("无迹飞梭", "毫无轨迹的后坐力移动方式").OText("无迹飞梭","毫无轨迹的后坐力移动方式","Spacebounce","Flight mode without trajectory");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ wjfsSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ wjfsShortcutButton.show();
+ } else {
+ wjfsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(wjfsSwitchContentCard, wjfsShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+Main.音效();
+ if (newState) {
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x10)+0x750)+0x78)+0x430)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-869", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x70)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-869", daddr21, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+ModuleManager.getInstance().setModuleEnabled("无迹飞梭|Spacebounce", true);
+
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("无迹飞梭|Spacebounce", true);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x10)+0x750)+0x78)+0x430)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x70)+0xC8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr21, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return wjfsSwitchContentCard;
+ }
+
+
+
+
+ private ButtonContentCard createSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("一键自杀", "传送到深渊", false)
+ .OText("一键自杀", "传送到深渊", "One-Click Suicide", "Teleport to Abyss")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+
+
+ zzbutton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ 自杀();
+ }
+ });
+
+
+
+ return zzbutton;
+}
+
+
+
+
+
+ private SwitchContentCard createhwbdSwitchContentCard() {
+ final SwitchContentCard hwbdSwitchContentCard = new SwitchContentCard("恒稳不倒", "玩家保持垂直于地面的稳定姿态,不会倒下").OText("恒稳不倒","玩家保持垂直于地面的稳定姿态,不会倒下","Nofall","Won't fall.");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ hwbdSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ hwbdShortcutButton.show();
+ } else {
+ hwbdShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(hwbdSwitchContentCard, hwbdShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("恒稳不倒", "已开启","Nofall","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("恒稳不倒|Nofall", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x4602C0) + 0xC0) + 0x60)
+ + 0x10) + 0x1A8) + 0xAC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x0;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x8;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0xD274F8) + 0x168) + 0x340)
+ + 0x80) + 0xA0)
+ + 0x98;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("恒稳不倒", "已关闭","Nofall","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("恒稳不倒|Nofall", false);
+
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x4602C0) + 0xC0) + 0x60)
+ + 0x10) + 0x1A8) + 0xAC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x0;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0xDCBC30) + 0x390) + 0xC0)
+ + 0x88) + 0x38) + 0x8;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0xD274F8) + 0x168) + 0x340)
+ + 0x80) + 0xA0)
+ + 0x98;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return hwbdSwitchContentCard;
+ }
+
+
+
+private SwitchContentCard createjxmcSwitchContentCard() {
+ final SwitchContentCard jxmcSwitchContentCard = new SwitchContentCard("减小摩擦", "减小与地面的摩擦力").OText("减少摩擦","减小与地面的摩擦力","Friction","Reduce friction with the ground");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ jxmcSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ jxmcShortcutButton.show();
+ } else {
+ jxmcShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(jxmcSwitchContentCard, jxmcShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("减小摩擦", "已开启","Friction","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("减小摩擦|Friction", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名 AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0x88) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x380868) + 0x28) + 0x0)
+ + 0x88) + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x456E28) + 0x150) + 0x40)
+ + 0x88) + 0x40) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0x39F028) + 0x3D0) + 0x138)
+ + 0x88) + 0x88)
+ + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("减小摩擦", "已关闭","Friction","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("减小摩擦|Friction", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0x88) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0x380868) + 0x28) + 0x0)
+ + 0x88) + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr2, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x456E28) + 0x150) + 0x40)
+ + 0x88) + 0x40) + 0x15C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr3, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool
+ .jump64(AlguiMemTool.jump64(AlguiMemTool
+ .jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(sAddr21 + 0x39F028) + 0x3D0) + 0x138)
+ + 0x88) + 0x88)
+ + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return jxmcSwitchContentCard;
+ }
+
+
+private SwitchContentCard createjjxtSwitchContentCard() {
+ final SwitchContentCard jjxtSwitchContentCard = new SwitchContentCard("紧急固定", "紧急固定车体坐标").OText("紧急固定","紧急固定车体的坐标","Emergencyfixation","Emergency fixed coordinate");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ jjxtSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ jjxtShortcutButton.show();
+ } else {
+ jjxtShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(jjxtSwitchContentCard, jjxtShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ if (newState) {
+ notification.make("紧急固定", "已开启","Emergencyfixation","Open", Notification.Type.SUCCESS);
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9399.08521", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+ModuleManager.getInstance().setModuleEnabled("紧急固定|Emergencyfixation", true);
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("紧急固定|Emergencyfixation", false);
+ notification.make("紧急固定", "已关闭","Emergencyfixation","Close", Notification.Type.ERROR);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88)
+ + 0xA0) + 0x164;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return jjxtSwitchContentCard;
+ }
+
+ private SwitchContentCard createkqzlSwitchContentCard() {
+ final SwitchContentCard kqzlSwitchContentCard = new SwitchContentCard("空气阻力", "增加空气阻力").OText("空气阻力","增加空气阻力","Airfriction","Increase the resistance of the air");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ kqzlSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ kqzlShortcutButton.show();
+ } else {
+ kqzlShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(kqzlSwitchContentCard, kqzlShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("空气阻力", "已开启","Airfriction","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("空气阻力|Airfriction", true);
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCA3520)+0x50)+0x300)+0x1E8)+0x10)+0xF8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x388)+0x0)+0x88)+0x38)+0x68;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("3", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+
+
+ } else {
+notification.make("空气阻力", "已关闭","Airfriction","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("空气阻力|Airfriction", false);
+
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xCA3520)+0x50)+0x300)+0x1E8)+0x10)+0xF8;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30)+0x388)+0x0)+0x88)+0x38)+0x68;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return kqzlSwitchContentCard;
+ }
+
+
+private SwitchContentCard createzlxgSwitchContentCard() {
+ final SwitchContentCard zlxgSwitchContentCard = new SwitchContentCard("重力调节", "修改人物重力").OText("重力调节","修改人物重力","Gravity","Change one's own gravity");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ zlxgSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("数值: ","Value:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(3, -3, 0)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcbc30)+0x3f8)+0x420)+0x28)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xdcbc30)+0x358)+0x440)+0x10)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcbc30)+0x3f8)+0x420)+0x28)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xdcbc30)+0x358)+0x440)+0x10)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+
+
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ zlxgShortcutButton.show();
+ } else {
+ zlxgShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(zlxgSwitchContentCard, zlxgShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+
+
+ModuleManager.getInstance().setModuleEnabled("重力调节|Gravity", true);
+
+ notification.make("重力调节", "已开启","Gravity","Open", Notification.Type.SUCCESS);
+
+
+
+ } else {
+
+ModuleManager.getInstance().setModuleEnabled("重力调节|Gravity", false);
+ notification.make("重力调节", "已关闭","Gravity","Close", Notification.Type.ERROR);
+ distanceText.setText("0");
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xdcbc30)+0x3f8)+0x420)+0x28)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xdcbc30)+0x358)+0x440)+0x10)+0x80)+0xac;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr1, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return zlxgSwitchContentCard;
+ }
+
+
+
+
+private SwitchContentCard createdlsjsSwitchContentCard() {
+ final SwitchContentCard dlsjsSwitchContentCard = new SwitchContentCard("推进加速","增加大力神速度").OText("推进加速","增加大力神速度","Propeller acceleration","Speed up the accelerator");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ dlsjsSwitchContentCard.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text()
+ .setText("数值: ","Value:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("5.0")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(500, 2, 5)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+
+
+
+
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_DOUBLE, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";;
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+ new Hint()
+ .setMessage("Progress: " + progress)
+ .show();
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ }
+
+ });
+ column.addView(slider);
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ dlsjsShortcutButton.show();
+ } else {
+ dlsjsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(dlsjsSwitchContentCard, dlsjsShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+Main.音效();
+
+ if (newState) {
+ notification.make("推进加速", "已开启","Propeller acceleration","Open", Notification.Type.SUCCESS);
+
+
+
+ModuleManager.getInstance().setModuleEnabled("推进加速|Propeller acceleration", true);
+ } else {
+ ModuleManager.getInstance().setModuleEnabled("推进加速|Propeller acceleration", false);
+ notification.make("推进加速", "已关闭","Propeller acceleration","Close", Notification.Type.ERROR);
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0.85", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ }
+ return true;
+ }
+ });
+
+ return dlsjsSwitchContentCard;
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+private void 自杀() {
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCBC30) + 0x380) + 0x1C0)+ 0x88) + 0x38) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-114000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x380) + 0x1C0)+ 0x88) + 0x38) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-114000", daddr1, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+
+notification.make("一键自杀", "执行", Notification.Type.SUCCESS);
+
+}
+
+
+
+
+
+
+
+
+
+ private void executeBehavior(String selectedOption, boolean enable) {
+ if (enable) {
+ ace.executeHiddenBinary(getAction(selectedOption)); // 添加行为到数组
+ } else {
+ ace.executeHiddenBinary(getCloseAction(selectedOption));
+ }
+ }
+
+ private String getAction(String option) {
+ switch (option) {
+
+ case"1":
+
+ return "1";
+ case"3":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC86780) + 0x330) + 0x118;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("9", daddr, AlguiMemTool.TYPE_DOUBLE, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ return "3";
+ case"4":
+ return "4";
+
+
+ default:
+ return "ONE";
+ }}
+ private String getCloseAction(String option) {
+ switch (option) {
+ case "1":
+ return "1";
+ case "option2":
+ return "行为2关闭";
+ case "option3":
+ return "行为3关闭";
+ default:
+ return "行为1关闭";
+ }}
+
+
+
+
+
+
+
+
+
+
+ // 创建一个固定大小的线程池,这里使用 2 个线程
+
+
+ private Runnable task1Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue + 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ // 封装任务2的逻辑
+ private Runnable task2Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue + 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private Runnable task3Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA8;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue - 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private Runnable task4Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA0;
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+ AlguiMemTool.setMemoryAddrValue("2000", daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue - 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+
+ private Runnable task5Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue + 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+ private Runnable task6Logic = new Runnable() {
+ @Override
+ public void run() {
+ try {
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;
+
+
+
+ for (int i = 0; i < 10000; i++) {
+ if (Thread.currentThread().isInterrupted()) {
+ break; // 如果线程被中断,退出循环
+ }
+
+ String currentValue = AlguiMemTool.getMemoryAddrData(daddr1, AlguiMemTool.TYPE_FLOAT);
+ float currentFloatValue = Float.parseFloat(currentValue);
+
+ float newValue = currentFloatValue - 100;
+
+ AlguiMemTool.setMemoryAddrValue(String.valueOf(newValue), daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ Thread.sleep(50);
+ }
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ e.printStackTrace();
+ }
+ }
+ };
+
+
+
+
+ // 启动任务1
+ public void startTask1() {
+ if (task1Thread == null || !task1Thread.isAlive()) {
+ task1Thread = new Thread(task1Logic);
+ task1Thread.start();
+ }
+ }
+
+ // 启动任务2
+ public void startTask2() {
+ if (task2Thread == null || !task2Thread.isAlive()) {
+ task2Thread = new Thread(task2Logic);
+ task2Thread.start();
+ }
+ }
+
+ public void startTask3() {
+ if (task3Thread == null || !task3Thread.isAlive()) {
+ task3Thread = new Thread(task3Logic);
+ task3Thread.start();
+ }
+ }
+
+ public void startTask4() {
+ if (task4Thread == null || !task4Thread.isAlive()) {
+ task4Thread = new Thread(task4Logic);
+ task4Thread.start();
+ }
+ }
+
+ public void startTask5() {
+ if (task5Thread == null || !task5Thread.isAlive()) {
+ task5Thread = new Thread(task5Logic);
+ task5Thread.start();
+ }
+ }
+
+ public void startTask6() {
+ if (task6Thread == null || !task6Thread.isAlive()) {
+ task6Thread = new Thread(task6Logic);
+ task6Thread.start();
+ }
+ }
+
+ // 停止任务1
+ public void stopTask1() {
+ if (task1Thread != null && task1Thread.isAlive()) {
+ task1Thread.interrupt(); // 中断线程
+ }
+ }
+
+ // 停止任务2
+ public void stopTask2() {
+ if (task2Thread != null && task2Thread.isAlive()) {
+ task2Thread.interrupt(); // 中断线程
+ }
+ }
+
+ public void stopTask3() {
+ if (task3Thread != null && task3Thread.isAlive()) {
+ task3Thread.interrupt(); // 中断线程
+ }
+ }
+
+ public void stopTask4() {
+ if (task4Thread != null && task4Thread.isAlive()) {
+ task4Thread.interrupt(); // 中断线程
+ }
+ }
+
+
+ public void stopTask5() {
+ if (task5Thread != null && task5Thread.isAlive()) {
+ task5Thread.interrupt(); // 中断线程
+ }
+ }
+
+ public void stopTask6() {
+ if (task6Thread != null && task6Thread.isAlive()) {
+ task6Thread.interrupt(); // 中断线程
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/RemoteLinkWatcher.java b/app/src/main/java/com/bytecat/algui/ui/category/RemoteLinkWatcher.java
new file mode 100644
index 0000000..6966e7f
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/RemoteLinkWatcher.java
@@ -0,0 +1,373 @@
+package com.bytecat.algui.ui.category;
+
+import android.content.Context;
+import android.util.Log;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.AlguiViews.AlguiV;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.ace;
+import android.content.res.AssetFileDescriptor;
+import android.media.MediaPlayer;
+import com.bytecat.algui.ui.MIX;
+import android.os.*;
+
+public class RemoteLinkWatcher {
+
+ private static final String TAG = "RemoteLinkWatcher";
+ private static MediaPlayer sMediaPlayer; // 整个类共用
+ private static boolean sO泡Playing = false; // 防止重复播
+private static boolean lingbai = false;
+ private static boolean longtu = false;
+ private static boolean sub0Switch = false;
+ private static boolean subOn = false;
+ private static boolean nosubOn;
+ private static boolean nomasterSelfSwitch;
+ private static boolean allowSub = false;
+ private static boolean masterSelfSwitch = false; // 主控自己的远控开关
+ private static String nama = ""; // 用于标识当前执行指令的控制者
+private static String lastMainCmd = "";
+private static String lastSubCmd = "";
+// 水印实时修改用
+private static boolean waterMarkEnable = false; // 开关
+private static String waterMarkContent;
+
+ private static final Handler sMainHandler =
+ new Handler(Looper.getMainLooper());
+
+ public static void startWatching(final String sub0Url, final String subUrl, final Context context) {
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (true) {
+
+if (Main.alreadyloggin) {
+ try {
+// 主控检测
+String sub0Html = fetchContent(sub0Url);
+sub0Switch = sub0Html.contains("!开!");
+allowSub = sub0Html.contains("&开&");
+masterSelfSwitch = sub0Html.contains("?开?");
+nomasterSelfSwitch = sub0Html.contains("?关?");
+String sub0Cmd = extractCommand(sub0Html);
+
+
+
+
+// 主控
+ if (nomasterSelfSwitch && lingbai) {
+ lingbai = false;
+
+ sMainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ ModuleManager.getInstance().setModuleEnabled("远控者:凌白", false);
+ }
+ });
+
+
+} else if (sub0Switch && masterSelfSwitch && sub0Cmd != null) {
+ if (! lingbai) {
+ lastMainCmd = sub0Cmd;
+ Main.远控音效();
+ ModuleManager.getInstance().setModuleEnabled("远控者:凌白", true,
+ makeSubtitlePrefix(sub0Cmd) + sub0Cmd);
+ lingbai = true;
+ }
+ // 每次轮询刷新副标题
+ ModuleManager.getInstance().setModuleSubtitle(
+ "远控者:凌白",
+ makeSubtitlePrefix(sub0Cmd) + sub0Cmd);
+ handleCommand(sub0Cmd.trim(), context);
+}
+String subHtml = fetchContent(subUrl);
+subOn = subHtml.contains("!开!");
+nosubOn = subHtml.contains("!关!");
+String subCmd = extractCommand(subHtml);
+
+
+
+
+
+
+
+
+// 副控
+ if ((nosubOn || !allowSub) && longtu) {
+ longtu = false;
+
+ sMainHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ ModuleManager.getInstance().setModuleEnabled("远控者:龙图", false);
+ }
+ });
+
+} else if (sub0Switch && allowSub && subOn && subCmd != null) {
+
+if (! longtu) {
+lastSubCmd = subCmd;
+ Main.远控音效();
+ ModuleManager.getInstance().setModuleEnabled("远控者:龙图", true,
+ makeSubtitlePrefix(sub0Cmd) + subCmd);
+ longtu=true;
+}
+ModuleManager.getInstance().setModuleSubtitle(
+ "远控者:龙图",
+ makeSubtitlePrefix(subCmd) + subCmd);
+ handleCommand(subCmd.trim(), context);
+}
+
+
+ Thread.sleep(5000);
+ } catch (Exception e) {
+ Log.e(TAG, "轮询失败: " + e.getMessage());
+ }
+
+}
+ }
+ }
+ }).start();
+
+
+
+ }
+
+ private static String fetchContent(String urlString) throws Exception {
+ HttpURLConnection conn = null;
+ BufferedReader reader = null;
+ try {
+ URL url = new URL(urlString);
+ conn = (HttpURLConnection) url.openConnection();
+ conn.setRequestMethod("GET");
+ conn.setConnectTimeout(5000);
+ conn.setReadTimeout(5000);
+
+ reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ StringBuilder sb = new StringBuilder();
+ String line;
+ while ((line = reader.readLine()) != null) {
+ sb.append(line);
+ }
+ return sb.toString();
+ } finally {
+ if (reader != null) try { reader.close(); } catch (Exception ignored) {}
+ if (conn != null) try { conn.disconnect(); } catch (Exception ignored) {}
+ }
+ }
+
+ private static String extractCommand(String html) {
+ if (html == null) return null;
+
+ // 1. 清理富文本
+ String cleaned = html.replaceAll("<[^>]+>", " ")
+ .replace("&", "&")
+ .replace("lu003c", "<").replace("lu003e", ">")
+ .replace("lu0022", "\"").replace("lu0027", "'")
+ .replace('0','0').replace('1','1')
+ .replace('2','2').replace('3','3')
+ .replace('4','4').replace('5','5')
+ .replace('6','6').replace('7','7')
+ .replace('8','8').replace('9','9')
+ .replaceAll("\\s+", " ")
+ .trim();
+
+ // 2. 先抓第一对 ++...++(含脏尾)
+ Pattern pattern = Pattern.compile("\\+\\+([^+]+)\\+\\+");
+ Matcher matcher = pattern.matcher(cleaned);
+ if (!matcher.find()) return null;
+
+ String raw = matcher.group(1).trim();
+
+ // 3. 再砍脏尾巴:遇到 ", 或 "} 就截断
+ int cut1 = raw.indexOf("\",");
+ int cut2 = raw.indexOf("\"}");
+ int cut = (cut1 == -1) ? cut2 : Math.min(cut1, cut2 == -1 ? Integer.MAX_VALUE : cut2);
+ if (cut != -1) {
+ raw = raw.substring(0, cut).trim();
+ }
+
+ return raw.isEmpty() ? null : raw;
+}
+
+
+
+private static boolean handleCommand(String cmd, Context context) {
+if ("自杀".equals(cmd)) {
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDCBC30) + 0x380) + 0x1C0)+ 0x88) + 0x38) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-114000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x380) + 0x1C0)+ 0x88) + 0x38) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-114000", daddr1, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+return true;
+} else if ("关闭范围".equals(cmd)) {
+ace.stopBinary("libdfw.so");ace.stopBinary("libzcfw.so");ace.stopBinary("libxfw.so");
+return true;
+} else if ("30帧率".equals(cmd)) {
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0x600) + 0x14;// 跳转指针 跳到目标地址 【32位使用 jump32
+// 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("30", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+return true;
+} else if ("停止发包开".equals(cmd)) {
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xD3FB68)+0x350)+0x3D0)+0x3C0)+0x160)+0x1F4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9", daddr,AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+return true;
+} else if ("停止发包关".equals(cmd)) {
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xD3FB68)+0x350)+0x3D0)+0x3C0)+0x160)+0x1F4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0.00111516414", daddr,AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+return true;
+} else if ("O泡开".equals(cmd)) {
+ synchronized (RemoteLinkWatcher.class) {
+ if (!sO泡Playing) { // 第一次才播
+ try {
+ AssetFileDescriptor afd = MIX.getContext()
+ .getAssets()
+ .openFd("op.ogg");
+ sMediaPlayer = new MediaPlayer();
+ sMediaPlayer.setDataSource(
+ afd.getFileDescriptor(),
+ afd.getStartOffset(),
+ afd.getLength());
+ sMediaPlayer.setLooping(true);
+ sMediaPlayer.prepare();
+ sMediaPlayer.start();
+ sO泡Playing = true; // 标记已播
+ } catch (Exception e) {
+ Log.e(TAG, "O泡开失败", e);
+ }
+ }
+ }
+return true;
+} else if ("O泡关".equals(cmd)) {
+ synchronized (RemoteLinkWatcher.class) {
+ if (sMediaPlayer != null) {
+ if (sMediaPlayer.isPlaying()) {
+ sMediaPlayer.stop();
+ }
+ sMediaPlayer.release();
+ sMediaPlayer = null;
+ }
+ sO泡Playing = false; // 复位
+ }
+
+return true;
+} else if ("车体旋转开".equals(cmd)) { // 原逻辑...
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x70)+0xE4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-599", daddr1, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xCAF7F0)+0x500)+0x1E8)+0x100)+0x88)+0x54;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-599", daddr21, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(20);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+return true;
+} else if ("车体旋转关".equals(cmd)) { // 原逻辑...
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCF0C0)+0x608)+0x0)+0x88)+0x70)+0xE4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr1, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xCAF7F0)+0x500)+0x1E8)+0x100)+0x88)+0x54;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr21, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+return true;
+} else if ("万物偏移开".equals(cmd)) { // 原逻辑...
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+AlguiMemTool.MemorySearch("1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("0.65211695", AlguiMemTool.TYPE_FLOAT, 0,false,true);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+return true;
+} else if ("万物偏移关".equals(cmd)) { // 原逻辑...
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+AlguiMemTool.MemorySearch("0.65211695", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("1", AlguiMemTool.TYPE_FLOAT, 0,false,true);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+return true;
+} else if ("无序挥击开".equals(cmd)) { // 原逻辑...
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x7C0)+ 0x7B0) + 0x608) + 0x7E4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9999", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+return true;
+} else if ("无序挥击关".equals(cmd)) { // 原逻辑...
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x461420) + 0x6D8) + 0x7C0)+ 0x7B0) + 0x608) + 0x7E4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-185", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+return true;
+ } else {
+// 未知指令则未命中
+return false; // 未命中
+ }
+}
+
+/**
+ * 通过 handleCommand 是否能匹配来判断指令是否有效
+ */
+private static String makeSubtitlePrefix(String cmd) {
+ if (cmd == null || cmd.isEmpty()) return "说:";
+ boolean hit = handleCommand(cmd, null); // 只探测,不真执行
+ return hit ? "执行:" : "说:";
+}
+
+
+ // 获取当前执行者标识的 getter 方法
+ public static String getNama() {
+ return nama;
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/SOULCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/SOULCategoryBox.java
new file mode 100644
index 0000000..f6868e6
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/SOULCategoryBox.java
@@ -0,0 +1,485 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+import java.security.Identity;
+import com.bytecat.algui.ace;
+import android.content.Context;
+import android.app.Activity;
+import java.lang.ref.WeakReference;
+import irene.window.algui.Tools.HackerTool;
+import irene.window.algui.MainActivity;
+import java.util.concurrent.ConcurrentHashMap;
+import java.io.InputStream;
+import java.io.File;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import irene.window.algui.AlGuiBubbleNotification;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import com.bytecat.algui.ui.component.Button;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.ClickCallback;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.ArrayList;
+import android.os.Handler;
+import com.bytecat.algui.AlguiWindows.AlguiWinInform;
+import com.bytecat.algui.AlguiManager.AlguiLog;
+import com.bytecat.algui.AlguiViews.AlguiViewText;
+import android.graphics.Paint;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import android.graphics.Canvas;
+import android.view.SurfaceHolder;
+import android.os.Looper;
+import java.util.List;
+import java.util.Map;
+import java.util.Collections;
+import android.view.WindowManager;
+import java.util.concurrent.Future;
+import java.util.concurrent.Callable;
+import android.graphics.Path;
+import java.util.concurrent.TimeUnit;
+import com.bytecat.algui.AlguiWindows.AlguiWinDraw;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.BoxContentCard;
+import java.util.concurrent.CopyOnWriteArrayList;
+import android.os.AsyncTask;
+import com.bytecat.algui.effect.ArrayListView;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.effect.ColorPickerPopup;
+import java.io.FileInputStream;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.BufferedWriter;
+import android.graphics.PointF;
+import java.util.Timer;
+import java.util.TimerTask;
+import com.bytecat.algui.ui.button.ShortcutButton;
+import android.view.View;
+
+
+
+
+
+
+
+
+
+
+public class SOULCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+ public SOULCategoryBox() {
+ createShortcutButtons();
+ contentContainer
+
+.addView(createoneSwitchContentCard())
+.addView(createlhcqSwitchContentCard())
+.addView(createqjjsSwitchContentCard())
+.addView(createtwoSwitchContentCard())
+
+;
+ }
+
+
+private ShortcutButton oneShortcutButton;
+private SwitchShortcutButton lhcqShortcutButton;
+private SwitchShortcutButton qjjsShortcutButton;
+private ShortcutButton twoShortcutButton;
+
+
+
+
+
+private void createShortcutButtons() {
+oneShortcutButton = new ShortcutButton().setText("上天隐藏").OText("上天隐藏","Space").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+lhcqShortcutButton = new SwitchShortcutButton().setText("灵魂出窍").OText("灵魂出窍","Soul").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+qjjsShortcutButton = new SwitchShortcutButton().setText("全局加速").OText("全局加速","Velocity").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+twoShortcutButton = new ShortcutButton().setText("地面").OText("返回地面","Ground").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+
+
+}
+
+
+
+
+
+
+private ButtonContentCard createoneSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("上天隐藏", "休!的一声,飞到了极高空", false)
+ .OText("上天隐藏", "休!的一声飞到极高空", "Space Travel", "Transmitted to space")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ zzbutton.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ oneShortcutButton.show();
+ } else {
+ oneShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ zzbutton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+//极高空
+notification.make("上天隐藏", "已执行","Space Travel","Open", Notification.Type.SUCCESS);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("999999", daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ });
+
+oneShortcutButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+//极高空
+notification.make("上天隐藏", "已执行","Space Travel","Open", Notification.Type.SUCCESS);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x100) + 0x154;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("999999", daddr, AlguiMemTool.TYPE_FLOAT, true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setFreezeDelayMs(0);
+ }
+ });
+
+ return zzbutton;
+}
+
+
+
+private SwitchContentCard createlhcqSwitchContentCard() {
+ final SwitchContentCard lhcqSwitchContentCard = new SwitchContentCard("灵魂出窍", "使灵体脱离真身").OText("灵魂出窍", "使灵体脱离真身","Soul out of body","To detach the soul from the true body").setChecked(false);
+
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ lhcqSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ lhcqShortcutButton.show();
+ } else {
+ lhcqShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(lhcqSwitchContentCard, lhcqShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+ notification.make("灵魂出窍", "已开启","Soul","Open", Notification.Type.SUCCESS);
+ModuleManager.getInstance().setModuleEnabled("灵魂出窍|Soul", true,"贝利亚");
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long jaddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB) + 0x453CBC; //从模块基址偏移获取目标地址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ AlguiMemTool.setMemoryAddrValue("200", jaddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】
+
+//灵体开
+
+
+
+ } else {
+ notification.make("灵魂出窍", "已关闭","Soul","close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("灵魂出窍|Soul", false);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long jaddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB) + 0x453CBC; //从模块基址偏移获取目标地址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ AlguiMemTool.setMemoryAddrValue("30", jaddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】
+
+//灵体关
+
+
+ }
+ return true;
+ }
+ });
+ return lhcqSwitchContentCard;
+}
+
+
+private SwitchContentCard createqjjsSwitchContentCard() {
+ final SwitchContentCard qjjsSwitchContentCard = new SwitchContentCard("全局加速", "增加灵魂出窍稳定性").OText("全局加速", "增加灵魂出窍稳定性","Velocity","Enhance stability").setChecked(false);
+
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ qjjsSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ qjjsShortcutButton.show();
+ } else {
+ qjjsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(qjjsSwitchContentCard, qjjsShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+//如果还没开就正常执行,否则不执行
+if (!WorldCategoryBox.qjjs) {
+
+//这里写全局加速开启代码
+ ModuleManager.getInstance().setModuleEnabled("全局加速|Velocity", true);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x960) + 0x18) + 0x210) + 0x208;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("-9999999", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+//改变变量
+
+notification.make("全局加速", "已开启","Velocity","Open", Notification.Type.SUCCESS);
+//改变变量
+WorldCategoryBox.qjjs=true;
+}else{
+notification.make("全局加速", "您已在[世界]菜单中开启","Velocity","No No No", Notification.Type.ERROR);
+}
+
+ } else {
+
+ //如果还没关就正常执行,否则不执行
+if (WorldCategoryBox.qjjs) {
+ ModuleManager.getInstance().setModuleEnabled("全局加速|Velocity", false);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x960) + 0x18) + 0x210) + 0x208;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("500", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+//改变变量
+
+//这里写全局加速关闭代码
+
+notification.make("全局加速", "已关闭","Velocity","Close", Notification.Type.SUCCESS);
+//改变变量
+WorldCategoryBox.qjjs=false;
+}else{
+notification.make("全局加速", "您已在[世界]菜单中关闭","Velocity","No No No", Notification.Type.ERROR);
+}
+
+ }
+ return true;
+ }
+ });
+
+
+
+ return qjjsSwitchContentCard;
+}
+
+
+private ButtonContentCard createtwoSwitchContentCard() {
+ final ButtonContentCard zbutton = new ButtonContentCard("返回地面", "传送到地面", false)
+ .OText("返回地面", "传送到地面", "Return to the ground", "Transmit to the ground")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ zbutton.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ twoShortcutButton.show();
+ } else {
+ twoShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+
+
+ zbutton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+
+//回地面
+notification.make("返回地面", "已执行","Return to the ground","Open", Notification.Type.SUCCESS);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("3000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setMemoryAddrValue("3000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ });
+
+twoShortcutButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+//回地面
+notification.make("返回地面", "已执行","Return to the ground","Open", Notification.Type.SUCCESS);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x454090) + 0x0) + 0x88) + 0x40) + 0xA4;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("3000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ AlguiMemTool.setMemoryAddrValue("3000", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ }
+ });
+
+ return zbutton;
+}
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/SettingCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/SettingCategoryBox.java
new file mode 100644
index 0000000..c9cae03
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/SettingCategoryBox.java
@@ -0,0 +1,255 @@
+package com.bytecat.algui.ui.category;
+
+import android.graphics.Color;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.RadioGroup;
+import android.graphics.Typeface;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.effect.Hint;
+import java.io.File;
+import com.bytecat.algui.effect.ColorPickerPopup;
+
+public class SettingCategoryBox extends CategoryBox {
+
+ private Notification notification;
+
+ // 添加一个静态变量来保存点击背景关闭功能的状态
+ public static boolean enableClickBackgroundClose = true;
+
+
+
+ //快捷键
+ private SwitchShortcutButton ysjShortcutButton;
+
+
+
+
+ public SettingCategoryBox() {
+ notification = Notification.getInstance();
+ initUI();
+ createShortcutButtons();
+ contentContainer
+
+ .addView(createlaunSwitchContentCard())
+ .addView(createSwitchContentCard());
+ contentContainer.build().addView(picker)
+ ;
+ }
+
+
+
+private void createShortcutButtons() {
+ysjShortcutButton = new SwitchShortcutButton()
+.setText("功能列表").OText("功能列表","ArrayList");
+
+}
+
+ private void initUI() {
+ addSettingCards();
+ }
+
+ private void addSettingCards() {
+ // 点击背景关闭界面设置
+ StatefulButton clickBgCloseButton = new StatefulButton("点击背景关闭界面","Close Shortcut", enableClickBackgroundClose);
+ clickBgCloseButton.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(BaseHelper.dip2pxInt(15), BaseHelper.dip2pxInt(5), BaseHelper.dip2pxInt(15), BaseHelper.dip2pxInt(5)));
+ clickBgCloseButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ enableClickBackgroundClose = newState;
+ if (newState) {
+
+ notification.make("设置", "已开启", Notification.Type.SUCCESS);
+ } else {
+
+ notification.make("设置", "已关闭", Notification.Type.ERROR);
+ }
+ return true;
+ }
+ });
+ contentContainer.addView(clickBgCloseButton);
+
+}
+
+
+private ButtonContentCard createlaunSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("语言切换", "Language", false);
+ final String configDir = "/sdcard/Android/data/com.vortex.celestial/files/";
+ final String filePath = configDir + "/switch.lang";
+ zzbutton.OText("语言切换", "中/英文切换", "Language Switch", "Switch between Chinese and English")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ zzbutton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+File file = new File(filePath);
+try {
+// 确保目录存在
+File dir = new File(configDir);
+if (!dir.exists()) {
+dir.mkdirs();
+}
+
+
+if (!file.exists()) {//如果没有
+file.createNewFile();//就创建(中文)
+notification.make("已切换中文", "重启软件生效", Notification.Type.SUCCESS);
+}else{//如果有
+file.delete();//就删除(英文)
+notification.make("Already switched to English", "Restart the software to take effect", Notification.Type.SUCCESS);
+}
+
+
+
+
+
+} catch (Exception e) {
+e.printStackTrace();
+}
+
+
+
+ }
+ });
+
+
+ return zzbutton;
+}
+
+
+
+
+
+
+
+private ButtonContentCard createSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("切换音效", "切换使用功能时播放的音效").OText("切换音效","切换使用功能时播放的音效","effect","Switch sound effect").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+ zzbutton.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+final Text reachText = new Text()
+ .setText("切换:","Switch:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText);
+
+ final RadioGroup radioGroup = new RadioGroup();
+ radioGroup.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(15))); // 底部外边距为15dp
+ radioGroup.setEnabled(true); // 启用单选按钮组
+ radioGroup.addButton("音效1","one", "1"); // 添加第一个选项
+ radioGroup.addButton("音效2","two", "2"); // 添加第三个选项
+ radioGroup.addButton("音效3","three", "3"); // 添加第三个选项
+
+ final String[] selectedOption = {"1"}; // 默认选中第一个选项
+ radioGroup.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+ column.addView(radioGroup); // 将单选按钮组添加到内容区域
+
+
+ zzbutton.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+ executeBehavior1(selectedOption[0], true); // 执行选中的行为
+
+
+
+ }
+ });
+
+
+ return zzbutton;
+}
+
+
+
+
+
+ColorPickerPopup picker = new ColorPickerPopup(MIX.getContext());
+
+
+
+
+private void executeBehavior1(String selectedOption, boolean enable) {
+ if (enable) {
+ace.executeHiddenBinary(getAction1(selectedOption));
+ } else {
+ }
+ }
+
+
+
+
+
+private String getAction1(String option) {//音效
+ switch (option) {
+ case "1":
+Main.vt1=true;
+Main.vt2=false;
+Main.vt3=false;
+ return "音效1";
+
+ case "2":
+Main.vt1=false;
+Main.vt2=true;
+Main.vt3=false;
+ return "音效2";
+
+ case "3":
+Main.vt1=false;
+Main.vt2=false;
+Main.vt3=true;
+ return "音效3";
+
+ default:
+ return "音效1";
+ }
+
+ }
+
+ // 可以添加更多设置卡片...
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/SettingCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/SettingCategoryBox.java.bak
new file mode 100644
index 0000000..0d35c0d
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/SettingCategoryBox.java.bak
@@ -0,0 +1,255 @@
+package com.bytecat.algui.ui.category;
+
+import android.graphics.Color;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.StatefulButton;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.ui.component.RadioGroup;
+import android.graphics.Typeface;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.effect.Hint;
+import java.io.File;
+import com.bytecat.algui.effect.ColorPickerPopup;
+
+public class SettingCategoryBox extends CategoryBox {
+
+ private Notification notification;
+
+ // 添加一个静态变量来保存点击背景关闭功能的状态
+ public static boolean enableClickBackgroundClose = true;
+
+
+
+ //快捷键
+ private SwitchShortcutButton ysjShortcutButton;
+
+
+
+
+ public SettingCategoryBox() {
+ notification = Notification.getInstance();
+ initUI();
+ createShortcutButtons();
+ contentContainer
+
+ .addView(createlaunSwitchContentCard())
+ .addView(createSwitchContentCard());
+ contentContainer.build().addView(picker)
+ ;
+ }
+
+
+
+private void createShortcutButtons() {
+ysjShortcutButton = new SwitchShortcutButton()
+.setText("功能列表").OText("功能列表","ArrayList");
+
+}
+
+ private void initUI() {
+ addSettingCards();
+ }
+
+ private void addSettingCards() {
+ // 点击背景关闭界面设置
+ StatefulButton clickBgCloseButton = new StatefulButton("点击背景关闭界面","Close Shortcut", enableClickBackgroundClose);
+ clickBgCloseButton.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(BaseHelper.dip2pxInt(15), BaseHelper.dip2pxInt(5), BaseHelper.dip2pxInt(15), BaseHelper.dip2pxInt(5)));
+ clickBgCloseButton.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ enableClickBackgroundClose = newState;
+ if (newState) {
+
+ notification.make("设置", "已开启", Notification.Type.SUCCESS);
+ } else {
+
+ notification.make("设置", "已关闭", Notification.Type.ERROR);
+ }
+ return true;
+ }
+ });
+ contentContainer.addView(clickBgCloseButton);
+
+}
+
+
+private ButtonContentCard createlaunSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("语言切换", "Language", false);
+ final String configDir = "/sdcard/TC配置文件/";
+ final String filePath = configDir + "/switch.lang";
+ zzbutton.OText("语言切换", "中/英文切换", "Language Switch", "Switch between Chinese and English")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ zzbutton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+File file = new File(filePath);
+try {
+// 确保目录存在
+File dir = new File(configDir);
+if (!dir.exists()) {
+dir.mkdirs();
+}
+
+
+if (!file.exists()) {//如果没有
+file.createNewFile();//就创建(中文)
+notification.make("已切换中文", "重启软件生效", Notification.Type.SUCCESS);
+}else{//如果有
+file.delete();//就删除(英文)
+notification.make("Already switched to English", "Restart the software to take effect", Notification.Type.SUCCESS);
+}
+
+
+
+
+
+} catch (Exception e) {
+e.printStackTrace();
+}
+
+
+
+ }
+ });
+
+
+ return zzbutton;
+}
+
+
+
+
+
+
+
+private ButtonContentCard createSwitchContentCard() {
+ final ButtonContentCard zzbutton = new ButtonContentCard("切换音效", "切换使用功能时播放的音效").OText("切换音效","切换使用功能时播放的音效","effect","Switch sound effect").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10)));
+ zzbutton.setExpandableContent(column);
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+final Text reachText = new Text()
+ .setText("切换:","Switch:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText);
+
+ final RadioGroup radioGroup = new RadioGroup();
+ radioGroup.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(15))); // 底部外边距为15dp
+ radioGroup.setEnabled(true); // 启用单选按钮组
+ radioGroup.addButton("音效1","one", "1"); // 添加第一个选项
+ radioGroup.addButton("音效2","two", "2"); // 添加第三个选项
+ radioGroup.addButton("音效3","three", "3"); // 添加第三个选项
+
+ final String[] selectedOption = {"1"}; // 默认选中第一个选项
+ radioGroup.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+ column.addView(radioGroup); // 将单选按钮组添加到内容区域
+
+
+ zzbutton.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+ executeBehavior1(selectedOption[0], true); // 执行选中的行为
+
+
+
+ }
+ });
+
+
+ return zzbutton;
+}
+
+
+
+
+
+ColorPickerPopup picker = new ColorPickerPopup(MIX.getContext());
+
+
+
+
+private void executeBehavior1(String selectedOption, boolean enable) {
+ if (enable) {
+ace.executeHiddenBinary(getAction1(selectedOption));
+ } else {
+ }
+ }
+
+
+
+
+
+private String getAction1(String option) {//音效
+ switch (option) {
+ case "1":
+Main.vt1=true;
+Main.vt2=false;
+Main.vt3=false;
+ return "音效1";
+
+ case "2":
+Main.vt1=false;
+Main.vt2=true;
+Main.vt3=false;
+ return "音效2";
+
+ case "3":
+Main.vt1=false;
+Main.vt2=false;
+Main.vt3=true;
+ return "音效3";
+
+ default:
+ return "音效1";
+ }
+
+ }
+
+ // 可以添加更多设置卡片...
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/SpecialCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/SpecialCategoryBox.java
new file mode 100644
index 0000000..5955ee3
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/SpecialCategoryBox.java
@@ -0,0 +1,679 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import android.graphics.Typeface;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.callback.SliderCallback;
+import android.annotation.SuppressLint;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.effect.Notification;
+import java.util.Locale;
+import com.bytecat.algui.effect.ModuleManager;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import android.content.Context;
+import com.bytecat.algui.AlguiViews.AlguiV;
+import android.app.Activity;
+import android.os.AsyncTask;
+import android.os.Environment;
+import android.widget.Toast;
+import java.io.FileInputStream;
+import java.util.zip.ZipOutputStream;
+import java.util.zip.ZipEntry;
+import android.content.Intent;
+
+
+public class SpecialCategoryBox extends CategoryBox {
+// 放在 SpecialCategoryBox.java 最顶部
+
+
+
+
+ Notification notification = Notification.getInstance();
+
+/**
+ * 把 ini 文件里第一个匹配 key 的行改成指定值
+ * 文件固定:/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini
+ * 如文件不存在会自动创建
+ */
+
+
+
+private static final String INI_PATH =
+ "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+
+
+public static void configWrite(String key, String newValue) {
+ final String path = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+ File file = new File(path);
+ if (!file.getParentFile().exists()) file.getParentFile().mkdirs();
+
+ List lines = new ArrayList<>();
+ BufferedReader br = null;
+ BufferedWriter bw = null;
+ boolean found = false;
+
+ try {
+ // 1. 读
+ if (file.exists()) {
+ br = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = br.readLine()) != null) {
+ String trim = line.trim();
+ if (trim.startsWith(key + " = ") || trim.startsWith(key + " = ")) {
+ lines.add(key + " = " + newValue);
+ found = true;
+ } else {
+ lines.add(line);
+ }
+ }
+ }
+ // 2. 如果没找到,追加一行
+ if (!found) {
+ lines.add(key + " = " + newValue);
+ }
+ // 3. 写
+ bw = new BufferedWriter(new FileWriter(file));
+ for (String l : lines) {
+ bw.write(l);
+ bw.newLine();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try { if (br != null) br.close(); } catch (IOException ignore) {}
+ try { if (bw != null) bw.close(); } catch (IOException ignore) {}
+ }
+}
+
+
+
+
+
+/**
+ * 在 [graphic_setting] 节下 添加/删除 hdr = 1
+ * 文件固定:/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini
+ * @param enable true=添加 false=删除
+ */
+public static void configWriteHdr(boolean enable) {
+ final String path = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+ final String sectionStart = "[graphic_setting]";
+ final String targetLine = "hdr = 1";
+
+ File file = new File(path);
+ if (!file.getParentFile().exists()) file.getParentFile().mkdirs();
+
+ List lines = new ArrayList<>();
+ BufferedReader br = null;
+ BufferedWriter bw = null;
+ boolean inSection = false;
+ boolean foundHdr = false;
+
+ try {
+ if (file.exists()) {
+ br = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = br.readLine()) != null) {
+ String trim = line.trim();
+
+ // 进入/离开 [graphic_setting]
+ if (trim.equals(sectionStart)) {
+ inSection = true;
+ lines.add(line);
+ continue;
+ }
+ if (trim.startsWith("[") && !trim.equals(sectionStart)) {
+ inSection = false;
+ }
+
+ // 在目标节内处理 hdr
+ if (inSection && trim.equals(targetLine)) {
+ foundHdr = true;
+ if (!enable) continue; // 删除
+ }
+ lines.add(line);
+ }
+ br.close();
+ }
+
+ // 如果文件不存在,先补节
+ if (!lines.contains(sectionStart)) {
+ lines.add(sectionStart);
+ }
+
+ // 需要添加且没找到 hdr
+ if (enable && !foundHdr) {
+ // 找出最后一行索引再插入
+ int insertAt = lines.size();
+ for (int i = 0; i < lines.size(); i++) {
+ if (lines.get(i).trim().equals(sectionStart)) {
+ insertAt = i + 1;
+ while (insertAt < lines.size() && !lines.get(insertAt).trim().startsWith("[")) {
+ insertAt++;
+ }
+ break;
+ }
+ }
+ lines.add(insertAt, targetLine);
+ }
+
+ // 写回
+ bw = new BufferedWriter(new FileWriter(file));
+ for (String l : lines) bw.write(l + "\n");
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try { if (br != null) br.close(); } catch (IOException ignore) {}
+ try { if (bw != null) bw.close(); } catch (IOException ignore) {}
+ }
+}
+
+
+//波动消除检测
+private boolean isSfxLevelZero() {
+ File f = new File(INI_PATH);
+ if (!f.exists()) return false;
+
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(f));
+ String line;
+ while ((line = br.readLine()) != null) {
+ line = line.trim();
+ if (line.startsWith("sfx_level=") || line.startsWith("sfx_level =")) {
+ String val = line.split("=")[1].trim();
+ return "0".equals(val);
+ }
+ }
+ } catch (IOException ignore) {
+ } finally {
+ if (br != null) try { br.close(); } catch (IOException ignore) {}
+ }
+ return false;
+}
+
+//hdr检测
+private boolean isHdrOn() {
+ final String path = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+ final String sectionStart = "[graphic_setting]";
+ final String targetLine = "hdr = 1";
+
+ File file = new File(path);
+ if (!file.exists()) return false;
+
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(file));
+ String line;
+ boolean inSection = false;
+ while ((line = br.readLine()) != null) {
+ String trim = line.trim();
+ if (trim.equals(sectionStart)) {
+ inSection = true;
+ continue;
+ }
+ if (trim.startsWith("[") && !trim.equals(sectionStart)) {
+ inSection = false;
+ }
+ if (inSection && trim.equals(targetLine)) {
+ return true;
+ }
+ }
+ } catch (IOException ignore) {
+ } finally {
+ if (br != null) try { br.close(); } catch (IOException ignore) {}
+ }
+ return false;
+}
+
+//阴影检测
+private boolean isShadowOn() {
+ File f = new File(INI_PATH);
+ if (!f.exists()) return false;
+
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(f));
+ String line;
+ while ((line = br.readLine()) != null) {
+ line = line.trim();
+ if (line.startsWith("shadow_quality=") || line.startsWith("shadow_quality =")) {
+ String val = line.split("=")[1].trim();
+ return "1".equals(val);
+ }
+ }
+ } catch (IOException ignore) {
+ } finally {
+ if (br != null) try { br.close(); } catch (IOException ignore) {}
+ }
+ return false;
+}
+
+ public SpecialCategoryBox() {
+ contentContainer
+ .addView(createhzwdSwitchContentCard())
+ .addView(createhdrSwitchContentCard())
+ .addView(createyinSwitchContentCard())
+ .addView(createskySwitchContentCard())
+ .addView(createSwitchContentCard())
+
+ ;
+ }
+
+
+
+private SwitchContentCard createhzwdSwitchContentCard() {
+ boolean defaultOn = isSfxLevelZero(); // ← 读取 ini 决定默认状态
+ SwitchContentCard card = new SwitchContentCard("波动消除", "消除部分模块使用引起的空气波动", defaultOn);
+
+ // 中英双语切换(复用统一语言文件 /sdcard/Android/data/com.vortex.celestial/files/switch.lang)
+ card.OText("波动消除", "消除部分模块使用引起的空气波动", "Wobble Removal", "Fix screen wobble caused by the module");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+
+if (newState){
+configWrite("sfx_level", "0");
+}else{
+configWrite("sfx_level", "2");
+}
+
+notification.make("修改完成","请重启游戏","Modification completed", "Please restart the game", Notification.Type.SUCCESS);
+ return true;
+ }
+ });
+ return card;
+}
+
+
+private SwitchContentCard createhdrSwitchContentCard() {
+ boolean defaultOn = isHdrOn(); // ← 读取 hdr 状态决定默认
+ SwitchContentCard card = new SwitchContentCard("高清", "HDR 画质", defaultOn);
+
+ card.OText("高清", "[开启后绘制偏框]HDR 画质", "HDR Switch", "Toggle HDR rendering");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ configWriteHdr(newState); // 新增/删除 hdr = 1
+ notification.make("修改完成","请重启游戏","Modification completed", "Please restart the game", Notification.Type.SUCCESS);
+ return true;
+ }
+ });
+ return card;
+}
+
+private SwitchContentCard createyinSwitchContentCard() {
+ boolean defaultOn = isShadowOn(); // ← 状态决定默认
+ SwitchContentCard card = new SwitchContentCard("阴影", "任意画质下添加阴影", defaultOn);
+
+ card.OText("阴影", "任意画质下添加阴影", "Shadow Switch", "Add shadows at any quality level");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (newState){
+configWrite("shadow_quality", "1");
+}else{
+configWrite("shadow_quality", "2");
+}
+
+ notification.make("修改完成","请重启游戏","Modification completed", "Please restart the game", Notification.Type.SUCCESS);
+ return true;
+ }
+ });
+ return card;
+}
+
+
+
+private SwitchContentCard createskySwitchContentCard() {
+ final String TARGET_DIR = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/Documents/res";
+ final String TARGET_FILE = TARGET_DIR + "/levelsets.npk";
+ final String ASSET1 = "levelsets.npk";
+ final String ASSET2 = "levelsets2.npk";
+ final long SIZE1 = 18884L; // 118.84 MB
+
+ boolean defaultOn = new File(TARGET_FILE).exists() && new File(TARGET_FILE).length() == SIZE1;
+
+ SwitchContentCard card = new SwitchContentCard("天空盒修改", "一键替换天空盒资源", defaultOn);
+ card.OText("天空盒修改", "一键替换天空盒资源", "Skybox Switch", "Enable custom skybox");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+
+ new AsyncTask() {
+ @Override
+ protected Exception doInBackground(Void... voids) {
+ File dir = new File(TARGET_DIR);
+ if (!dir.exists()) dir.mkdirs();
+ File dst = new File(TARGET_FILE);
+
+ try {
+ if (newState) {
+ copyAsset(ASSET1, dst);
+ } else {
+ if (dst.exists()) dst.delete();
+ copyAsset(ASSET2, dst);
+ }
+ return null;
+ } catch (IOException e) {
+ return e;
+ }
+ }
+
+ @Override
+ protected void onPostExecute(Exception e) {
+
+
+ if (e == null) {
+ notification.make("修改完成", "请重启游戏",
+ "Modification completed", "Please restart the game",
+ Notification.Type.SUCCESS);
+ } else {
+ notification.make("失败", e.getMessage(),
+ "Failed", e.getMessage(),
+ Notification.Type.ERROR);
+ }
+ }
+ }.execute();
+
+ return true;
+ }
+
+ private void copyAsset(String assetName, File dst) throws IOException {
+ android.content.res.AssetManager am = MIX.getContext().getAssets();
+ java.io.InputStream in = am.open(assetName);
+ java.io.OutputStream out = new java.io.FileOutputStream(dst);
+ byte[] buf = new byte[8192];
+ int len;
+ while ((len = in.read(buf)) != -1) {
+ out.write(buf, 0, len);
+ }
+ in.close();
+ out.close();
+ }
+ });
+
+ return card;
+}
+
+
+
+
+private ButtonContentCard createSwitchContentCard() {
+final ButtonContentCard button03 = new ButtonContentCard("游客账号", "可以对游客账号数据进行操作").OText("游客账号", "可以对游客账号数据进行操作", "One-Click Suicide", "Teleport to Abyss");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button03.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("清除", "1"); // 添加单次选项
+radioGroup1.addButton("保存", "2"); // 添加循环选项
+radioGroup1.addButton("加载", "3"); // 添加循环选项
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+
+
+button03.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior1(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button03;
+}
+
+
+
+private void executeBehavior1(String selectedOption) {
+getAction1(selectedOption);
+ }
+private String getAction1(String option) {//账号
+Main.音效();
+notification.make("功能", "已执行完毕", Notification.Type.SUCCESS);
+ switch (option) {
+ case "1":
+clearSharedPrefs(MIX.getContext());
+File neteaseDir = new File(Environment.getExternalStorageDirectory(), "netease");
+deleteRecursive(neteaseDir);
+// 立即结束当前进程
+restartApp(MIX.getContext());
+ return "";
+ case "2":
+try {
+ exportAccountData(MIX.getContext()); // 在主线程外执行更好
+} catch (IOException e) {
+ e.printStackTrace();
+}
+ return "";
+ case "3":
+
+try {
+ restoreAccountData(MIX.getContext());
+} catch (IOException e) {
+ Toast.makeText(MIX.getContext(), "失败", Toast.LENGTH_LONG).show();
+}
+restartApp(MIX.getContext());
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+public static void deleteRecursive(File fileOrDirectory) {
+ if (fileOrDirectory.isDirectory()) {
+ File[] children = fileOrDirectory.listFiles();
+ if (children != null) {
+ for (File child : children) {
+ deleteRecursive(child);
+ }
+ }
+ }
+ fileOrDirectory.delete();
+}
+public static void clearSharedPrefs(Context context) {
+ File prefsDir = new File(context.getApplicationInfo().dataDir, "shared_prefs");
+ if (!prefsDir.exists() || !prefsDir.isDirectory()) {
+ return;
+ }
+
+ File[] files = prefsDir.listFiles();
+ if (files == null) return;
+
+ for (File f : files) {
+ // 只删 .xml 文件,防止误删
+ if (f.getName().endsWith(".xml")) {
+ boolean ok = f.delete();
+ }
+ }
+}
+
+// ================== 导出 ==================
+public static void exportAccountData(Context ctx) throws IOException {
+ File cacheDir = new File(ctx.getCacheDir(), "export");
+ FileUtilT.deleteRecursive(cacheDir);
+ cacheDir.mkdirs();
+
+ // 1. 复制 shared_prefs → Base64("1")
+ String dir1 = android.util.Base64.encodeToString("1".getBytes(), android.util.Base64.NO_WRAP);
+ File prefsSrc = new File(ctx.getApplicationInfo().dataDir, "shared_prefs");
+ File prefsDst = new File(cacheDir, dir1);
+ FileUtilT.copyDir(prefsSrc, prefsDst);
+
+ // 2. 复制 /sdcard/netease → Base64("2")
+ String dir2 = android.util.Base64.encodeToString("2".getBytes(), android.util.Base64.NO_WRAP);
+ File neteaseSrc = new File(Environment.getExternalStorageDirectory(), "netease");
+ File neteaseDst = new File(cacheDir, dir2);
+ FileUtilT.copyDir(neteaseSrc, neteaseDst);
+
+ // 3. 打包:Base64("backup") + ".dat"
+ String zipName = android.util.Base64.encodeToString("backup".getBytes(), android.util.Base64.NO_WRAP) + ".dat";
+ File outDir = new File(Environment.getExternalStorageDirectory(), "TC配置文件");
+ outDir.mkdirs();
+ File zipFile = new File(outDir, zipName);
+ ZipUtilT.zip(cacheDir, zipFile);
+}
+
+
+
+
+public final class FileUtil {
+ public void copyDir(File src, File dst) throws IOException {
+ if (src == null || !src.exists()) return;
+ dst.mkdirs();
+ File[] list = src.listFiles();
+ if (list == null) return;
+ for (File f : list) {
+ File target = new File(dst, f.getName());
+ if (f.isDirectory()) {
+ copyDir(f, target);
+ } else {
+ try (FileInputStream in = new FileInputStream(f);
+ FileOutputStream out = new FileOutputStream(target)) {
+ byte[] buf = new byte[8192];
+ int len;
+ while ((len = in.read(buf)) > 0) out.write(buf, 0, len);
+ }
+ }
+ }
+ }
+
+ public void deleteRecursive(File f) {
+ if (f == null || !f.exists()) return;
+ if (f.isDirectory()) {
+ File[] children = f.listFiles();
+ if (children != null) for (File c : children) deleteRecursive(c);
+ }
+ f.delete();
+ }
+}
+
+
+
+// ================== 导入 ==================
+public static void restoreAccountData(Context ctx) throws IOException {
+ // 1. 拼出 Base64 文件名
+ String zipName = android.util.Base64.encodeToString("backup".getBytes(), android.util.Base64.NO_WRAP) + ".dat";
+ File zipFile = new File(Environment.getExternalStorageDirectory(), "TC配置文件/" + zipName);
+
+ File tempDir = new File(ctx.getCacheDir(), "restore");
+ FileUtilT.deleteRecursive(tempDir);
+ tempDir.mkdirs();
+
+ // 2. 解压
+ ZipUtilT.unzip(zipFile, tempDir);
+
+ // 3. 覆盖 shared_prefs:Base64("1")
+ String dir1 = android.util.Base64.encodeToString("1".getBytes(), android.util.Base64.NO_WRAP);
+ File prefsDst = new File(ctx.getApplicationInfo().dataDir, "shared_prefs");
+ File prefsSrc = new File(tempDir, dir1);
+ FileUtilT.deleteRecursive(prefsDst);
+ FileUtilT.copyDir(prefsSrc, prefsDst);
+
+ // 4. 覆盖 /sdcard/netease:Base64("2")
+ String dir2 = android.util.Base64.encodeToString("2".getBytes(), android.util.Base64.NO_WRAP);
+ File neteaseDst = new File(Environment.getExternalStorageDirectory(), "netease");
+ File neteaseSrc = new File(tempDir, dir2);
+ FileUtilT.deleteRecursive(neteaseDst);
+ FileUtilT.copyDir(neteaseSrc, neteaseDst);
+
+
+
+
+}
+private void restartApp(Context ctx) {
+ Intent intent = ctx.getPackageManager()
+ .getLaunchIntentForPackage(ctx.getPackageName());
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ ((Activity) ctx).finish();
+ ctx.startActivity(intent);
+ Runtime.getRuntime().exit(0); // 立即结束旧进程
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/SpecialCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/SpecialCategoryBox.java.bak
new file mode 100644
index 0000000..11d11a1
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/SpecialCategoryBox.java.bak
@@ -0,0 +1,679 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import android.graphics.Typeface;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.callback.SliderCallback;
+import android.annotation.SuppressLint;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.ace;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.effect.Notification;
+import java.util.Locale;
+import com.bytecat.algui.effect.ModuleManager;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.FileOutputStream;
+import android.content.Context;
+import com.bytecat.algui.AlguiViews.AlguiV;
+import android.app.Activity;
+import android.os.AsyncTask;
+import android.os.Environment;
+import android.widget.Toast;
+import java.io.FileInputStream;
+import java.util.zip.ZipOutputStream;
+import java.util.zip.ZipEntry;
+import android.content.Intent;
+
+
+public class SpecialCategoryBox extends CategoryBox {
+// 放在 SpecialCategoryBox.java 最顶部
+
+
+
+
+ Notification notification = Notification.getInstance();
+
+/**
+ * 把 ini 文件里第一个匹配 key 的行改成指定值
+ * 文件固定:/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini
+ * 如文件不存在会自动创建
+ */
+
+
+
+private static final String INI_PATH =
+ "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+
+
+public static void configWrite(String key, String newValue) {
+ final String path = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+ File file = new File(path);
+ if (!file.getParentFile().exists()) file.getParentFile().mkdirs();
+
+ List lines = new ArrayList<>();
+ BufferedReader br = null;
+ BufferedWriter bw = null;
+ boolean found = false;
+
+ try {
+ // 1. 读
+ if (file.exists()) {
+ br = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = br.readLine()) != null) {
+ String trim = line.trim();
+ if (trim.startsWith(key + " = ") || trim.startsWith(key + " = ")) {
+ lines.add(key + " = " + newValue);
+ found = true;
+ } else {
+ lines.add(line);
+ }
+ }
+ }
+ // 2. 如果没找到,追加一行
+ if (!found) {
+ lines.add(key + " = " + newValue);
+ }
+ // 3. 写
+ bw = new BufferedWriter(new FileWriter(file));
+ for (String l : lines) {
+ bw.write(l);
+ bw.newLine();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try { if (br != null) br.close(); } catch (IOException ignore) {}
+ try { if (bw != null) bw.close(); } catch (IOException ignore) {}
+ }
+}
+
+
+
+
+
+/**
+ * 在 [graphic_setting] 节下 添加/删除 hdr = 1
+ * 文件固定:/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini
+ * @param enable true=添加 false=删除
+ */
+public static void configWriteHdr(boolean enable) {
+ final String path = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+ final String sectionStart = "[graphic_setting]";
+ final String targetLine = "hdr = 1";
+
+ File file = new File(path);
+ if (!file.getParentFile().exists()) file.getParentFile().mkdirs();
+
+ List lines = new ArrayList<>();
+ BufferedReader br = null;
+ BufferedWriter bw = null;
+ boolean inSection = false;
+ boolean foundHdr = false;
+
+ try {
+ if (file.exists()) {
+ br = new BufferedReader(new FileReader(file));
+ String line;
+ while ((line = br.readLine()) != null) {
+ String trim = line.trim();
+
+ // 进入/离开 [graphic_setting]
+ if (trim.equals(sectionStart)) {
+ inSection = true;
+ lines.add(line);
+ continue;
+ }
+ if (trim.startsWith("[") && !trim.equals(sectionStart)) {
+ inSection = false;
+ }
+
+ // 在目标节内处理 hdr
+ if (inSection && trim.equals(targetLine)) {
+ foundHdr = true;
+ if (!enable) continue; // 删除
+ }
+ lines.add(line);
+ }
+ br.close();
+ }
+
+ // 如果文件不存在,先补节
+ if (!lines.contains(sectionStart)) {
+ lines.add(sectionStart);
+ }
+
+ // 需要添加且没找到 hdr
+ if (enable && !foundHdr) {
+ // 找出最后一行索引再插入
+ int insertAt = lines.size();
+ for (int i = 0; i < lines.size(); i++) {
+ if (lines.get(i).trim().equals(sectionStart)) {
+ insertAt = i + 1;
+ while (insertAt < lines.size() && !lines.get(insertAt).trim().startsWith("[")) {
+ insertAt++;
+ }
+ break;
+ }
+ }
+ lines.add(insertAt, targetLine);
+ }
+
+ // 写回
+ bw = new BufferedWriter(new FileWriter(file));
+ for (String l : lines) bw.write(l + "\n");
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try { if (br != null) br.close(); } catch (IOException ignore) {}
+ try { if (bw != null) bw.close(); } catch (IOException ignore) {}
+ }
+}
+
+
+//波动消除检测
+private boolean isSfxLevelZero() {
+ File f = new File(INI_PATH);
+ if (!f.exists()) return false;
+
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(f));
+ String line;
+ while ((line = br.readLine()) != null) {
+ line = line.trim();
+ if (line.startsWith("sfx_level=") || line.startsWith("sfx_level =")) {
+ String val = line.split("=")[1].trim();
+ return "0".equals(val);
+ }
+ }
+ } catch (IOException ignore) {
+ } finally {
+ if (br != null) try { br.close(); } catch (IOException ignore) {}
+ }
+ return false;
+}
+
+//hdr检测
+private boolean isHdrOn() {
+ final String path = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/config.ini";
+ final String sectionStart = "[graphic_setting]";
+ final String targetLine = "hdr = 1";
+
+ File file = new File(path);
+ if (!file.exists()) return false;
+
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(file));
+ String line;
+ boolean inSection = false;
+ while ((line = br.readLine()) != null) {
+ String trim = line.trim();
+ if (trim.equals(sectionStart)) {
+ inSection = true;
+ continue;
+ }
+ if (trim.startsWith("[") && !trim.equals(sectionStart)) {
+ inSection = false;
+ }
+ if (inSection && trim.equals(targetLine)) {
+ return true;
+ }
+ }
+ } catch (IOException ignore) {
+ } finally {
+ if (br != null) try { br.close(); } catch (IOException ignore) {}
+ }
+ return false;
+}
+
+//阴影检测
+private boolean isShadowOn() {
+ File f = new File(INI_PATH);
+ if (!f.exists()) return false;
+
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new FileReader(f));
+ String line;
+ while ((line = br.readLine()) != null) {
+ line = line.trim();
+ if (line.startsWith("shadow_quality=") || line.startsWith("shadow_quality =")) {
+ String val = line.split("=")[1].trim();
+ return "1".equals(val);
+ }
+ }
+ } catch (IOException ignore) {
+ } finally {
+ if (br != null) try { br.close(); } catch (IOException ignore) {}
+ }
+ return false;
+}
+
+ public SpecialCategoryBox() {
+ contentContainer
+ .addView(createhzwdSwitchContentCard())
+ .addView(createhdrSwitchContentCard())
+ .addView(createyinSwitchContentCard())
+ .addView(createskySwitchContentCard())
+ .addView(createSwitchContentCard())
+
+ ;
+ }
+
+
+
+private SwitchContentCard createhzwdSwitchContentCard() {
+ boolean defaultOn = isSfxLevelZero(); // ← 读取 ini 决定默认状态
+ SwitchContentCard card = new SwitchContentCard("波动消除", "消除部分模块使用引起的空气波动", defaultOn);
+
+ // 中英双语切换(复用统一语言文件 /sdcard/TC配置文件/switch.lang)
+ card.OText("波动消除", "消除部分模块使用引起的空气波动", "Wobble Removal", "Fix screen wobble caused by the module");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+
+if (newState){
+configWrite("sfx_level", "0");
+}else{
+configWrite("sfx_level", "2");
+}
+
+notification.make("修改完成","请重启游戏","Modification completed", "Please restart the game", Notification.Type.SUCCESS);
+ return true;
+ }
+ });
+ return card;
+}
+
+
+private SwitchContentCard createhdrSwitchContentCard() {
+ boolean defaultOn = isHdrOn(); // ← 读取 hdr 状态决定默认
+ SwitchContentCard card = new SwitchContentCard("高清", "HDR 画质", defaultOn);
+
+ card.OText("高清", "[开启后绘制偏框]HDR 画质", "HDR Switch", "Toggle HDR rendering");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ configWriteHdr(newState); // 新增/删除 hdr = 1
+ notification.make("修改完成","请重启游戏","Modification completed", "Please restart the game", Notification.Type.SUCCESS);
+ return true;
+ }
+ });
+ return card;
+}
+
+private SwitchContentCard createyinSwitchContentCard() {
+ boolean defaultOn = isShadowOn(); // ← 状态决定默认
+ SwitchContentCard card = new SwitchContentCard("阴影", "任意画质下添加阴影", defaultOn);
+
+ card.OText("阴影", "任意画质下添加阴影", "Shadow Switch", "Add shadows at any quality level");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ Main.音效();
+ if (newState){
+configWrite("shadow_quality", "1");
+}else{
+configWrite("shadow_quality", "2");
+}
+
+ notification.make("修改完成","请重启游戏","Modification completed", "Please restart the game", Notification.Type.SUCCESS);
+ return true;
+ }
+ });
+ return card;
+}
+
+
+
+private SwitchContentCard createskySwitchContentCard() {
+ final String TARGET_DIR = "/storage/emulated/0/Android/data/com.vortex.celestial/files/Netease/wxzc/Documents/res";
+ final String TARGET_FILE = TARGET_DIR + "/levelsets.npk";
+ final String ASSET1 = "levelsets.npk";
+ final String ASSET2 = "levelsets2.npk";
+ final long SIZE1 = 18884L; // 118.84 MB
+
+ boolean defaultOn = new File(TARGET_FILE).exists() && new File(TARGET_FILE).length() == SIZE1;
+
+ SwitchContentCard card = new SwitchContentCard("天空盒修改", "一键替换天空盒资源", defaultOn);
+ card.OText("天空盒修改", "一键替换天空盒资源", "Skybox Switch", "Enable custom skybox");
+
+ card.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(final boolean newState) {
+ Main.音效();
+
+
+ new AsyncTask() {
+ @Override
+ protected Exception doInBackground(Void... voids) {
+ File dir = new File(TARGET_DIR);
+ if (!dir.exists()) dir.mkdirs();
+ File dst = new File(TARGET_FILE);
+
+ try {
+ if (newState) {
+ copyAsset(ASSET1, dst);
+ } else {
+ if (dst.exists()) dst.delete();
+ copyAsset(ASSET2, dst);
+ }
+ return null;
+ } catch (IOException e) {
+ return e;
+ }
+ }
+
+ @Override
+ protected void onPostExecute(Exception e) {
+
+
+ if (e == null) {
+ notification.make("修改完成", "请重启游戏",
+ "Modification completed", "Please restart the game",
+ Notification.Type.SUCCESS);
+ } else {
+ notification.make("失败", e.getMessage(),
+ "Failed", e.getMessage(),
+ Notification.Type.ERROR);
+ }
+ }
+ }.execute();
+
+ return true;
+ }
+
+ private void copyAsset(String assetName, File dst) throws IOException {
+ android.content.res.AssetManager am = MIX.getContext().getAssets();
+ java.io.InputStream in = am.open(assetName);
+ java.io.OutputStream out = new java.io.FileOutputStream(dst);
+ byte[] buf = new byte[8192];
+ int len;
+ while ((len = in.read(buf)) != -1) {
+ out.write(buf, 0, len);
+ }
+ in.close();
+ out.close();
+ }
+ });
+
+ return card;
+}
+
+
+
+
+private ButtonContentCard createSwitchContentCard() {
+final ButtonContentCard button03 = new ButtonContentCard("游客账号", "可以对游客账号数据进行操作").OText("游客账号", "可以对游客账号数据进行操作", "One-Click Suicide", "Teleport to Abyss");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button03.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("清除", "1"); // 添加单次选项
+radioGroup1.addButton("保存", "2"); // 添加循环选项
+radioGroup1.addButton("加载", "3"); // 添加循环选项
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+
+
+button03.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior1(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button03;
+}
+
+
+
+private void executeBehavior1(String selectedOption) {
+getAction1(selectedOption);
+ }
+private String getAction1(String option) {//账号
+Main.音效();
+notification.make("功能", "已执行完毕", Notification.Type.SUCCESS);
+ switch (option) {
+ case "1":
+clearSharedPrefs(MIX.getContext());
+File neteaseDir = new File(Environment.getExternalStorageDirectory(), "netease");
+deleteRecursive(neteaseDir);
+// 立即结束当前进程
+restartApp(MIX.getContext());
+ return "";
+ case "2":
+try {
+ exportAccountData(MIX.getContext()); // 在主线程外执行更好
+} catch (IOException e) {
+ e.printStackTrace();
+}
+ return "";
+ case "3":
+
+try {
+ restoreAccountData(MIX.getContext());
+} catch (IOException e) {
+ Toast.makeText(MIX.getContext(), "失败", Toast.LENGTH_LONG).show();
+}
+restartApp(MIX.getContext());
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+public static void deleteRecursive(File fileOrDirectory) {
+ if (fileOrDirectory.isDirectory()) {
+ File[] children = fileOrDirectory.listFiles();
+ if (children != null) {
+ for (File child : children) {
+ deleteRecursive(child);
+ }
+ }
+ }
+ fileOrDirectory.delete();
+}
+public static void clearSharedPrefs(Context context) {
+ File prefsDir = new File(context.getApplicationInfo().dataDir, "shared_prefs");
+ if (!prefsDir.exists() || !prefsDir.isDirectory()) {
+ return;
+ }
+
+ File[] files = prefsDir.listFiles();
+ if (files == null) return;
+
+ for (File f : files) {
+ // 只删 .xml 文件,防止误删
+ if (f.getName().endsWith(".xml")) {
+ boolean ok = f.delete();
+ }
+ }
+}
+
+// ================== 导出 ==================
+public static void exportAccountData(Context ctx) throws IOException {
+ File cacheDir = new File(ctx.getCacheDir(), "export");
+ FileUtilT.deleteRecursive(cacheDir);
+ cacheDir.mkdirs();
+
+ // 1. 复制 shared_prefs → Base64("1")
+ String dir1 = android.util.Base64.encodeToString("1".getBytes(), android.util.Base64.NO_WRAP);
+ File prefsSrc = new File(ctx.getApplicationInfo().dataDir, "shared_prefs");
+ File prefsDst = new File(cacheDir, dir1);
+ FileUtilT.copyDir(prefsSrc, prefsDst);
+
+ // 2. 复制 /sdcard/netease → Base64("2")
+ String dir2 = android.util.Base64.encodeToString("2".getBytes(), android.util.Base64.NO_WRAP);
+ File neteaseSrc = new File(Environment.getExternalStorageDirectory(), "netease");
+ File neteaseDst = new File(cacheDir, dir2);
+ FileUtilT.copyDir(neteaseSrc, neteaseDst);
+
+ // 3. 打包:Base64("backup") + ".dat"
+ String zipName = android.util.Base64.encodeToString("backup".getBytes(), android.util.Base64.NO_WRAP) + ".dat";
+ File outDir = new File(Environment.getExternalStorageDirectory(), "TC配置文件");
+ outDir.mkdirs();
+ File zipFile = new File(outDir, zipName);
+ ZipUtilT.zip(cacheDir, zipFile);
+}
+
+
+
+
+public final class FileUtil {
+ public void copyDir(File src, File dst) throws IOException {
+ if (src == null || !src.exists()) return;
+ dst.mkdirs();
+ File[] list = src.listFiles();
+ if (list == null) return;
+ for (File f : list) {
+ File target = new File(dst, f.getName());
+ if (f.isDirectory()) {
+ copyDir(f, target);
+ } else {
+ try (FileInputStream in = new FileInputStream(f);
+ FileOutputStream out = new FileOutputStream(target)) {
+ byte[] buf = new byte[8192];
+ int len;
+ while ((len = in.read(buf)) > 0) out.write(buf, 0, len);
+ }
+ }
+ }
+ }
+
+ public void deleteRecursive(File f) {
+ if (f == null || !f.exists()) return;
+ if (f.isDirectory()) {
+ File[] children = f.listFiles();
+ if (children != null) for (File c : children) deleteRecursive(c);
+ }
+ f.delete();
+ }
+}
+
+
+
+// ================== 导入 ==================
+public static void restoreAccountData(Context ctx) throws IOException {
+ // 1. 拼出 Base64 文件名
+ String zipName = android.util.Base64.encodeToString("backup".getBytes(), android.util.Base64.NO_WRAP) + ".dat";
+ File zipFile = new File(Environment.getExternalStorageDirectory(), "TC配置文件/" + zipName);
+
+ File tempDir = new File(ctx.getCacheDir(), "restore");
+ FileUtilT.deleteRecursive(tempDir);
+ tempDir.mkdirs();
+
+ // 2. 解压
+ ZipUtilT.unzip(zipFile, tempDir);
+
+ // 3. 覆盖 shared_prefs:Base64("1")
+ String dir1 = android.util.Base64.encodeToString("1".getBytes(), android.util.Base64.NO_WRAP);
+ File prefsDst = new File(ctx.getApplicationInfo().dataDir, "shared_prefs");
+ File prefsSrc = new File(tempDir, dir1);
+ FileUtilT.deleteRecursive(prefsDst);
+ FileUtilT.copyDir(prefsSrc, prefsDst);
+
+ // 4. 覆盖 /sdcard/netease:Base64("2")
+ String dir2 = android.util.Base64.encodeToString("2".getBytes(), android.util.Base64.NO_WRAP);
+ File neteaseDst = new File(Environment.getExternalStorageDirectory(), "netease");
+ File neteaseSrc = new File(tempDir, dir2);
+ FileUtilT.deleteRecursive(neteaseDst);
+ FileUtilT.copyDir(neteaseSrc, neteaseDst);
+
+
+
+
+}
+private void restartApp(Context ctx) {
+ Intent intent = ctx.getPackageManager()
+ .getLaunchIntentForPackage(ctx.getPackageName());
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ ((Activity) ctx).finish();
+ ctx.startActivity(intent);
+ Runtime.getRuntime().exit(0); // 立即结束旧进程
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/TPCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/TPCategoryBox.java
new file mode 100644
index 0000000..7fa5287
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/TPCategoryBox.java
@@ -0,0 +1,1011 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.component.ButtonContentCard;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.effect.Hint;
+
+public class TPCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+
+
+
+private static long daddr1x;
+private static long daddr1y;
+private static long daddr1z;
+
+private static boolean dongjiecs=false;
+private static boolean dongjiecs2=false;
+private static boolean dongjiecs3=false;
+private static boolean dongjiecs4=false;
+private static boolean dongjiecs5=false;
+
+
+
+
+//快捷键
+
+
+//卡片
+ public TPCategoryBox() {
+createShortcutButtons();
+ contentContainer
+.addView(createSwitchContentCard01())
+.addView(createSwitchContentCard02())
+.addView(createSwitchContentCard03())
+.addView(createSwitchContentCard04())
+.addView(createSwitchContentCard05())
+
+;
+ }
+
+//快捷键文本
+private void createShortcutButtons() {
+
+ }
+
+
+
+
+
+
+
+private void 初始化() {
+
+//x
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList(); // 清空之前的搜索结果
+long sAddr0x = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB); // 获取模块基址
+daddr1x = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr0x + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA8; // 跳转指针
+
+//y
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList(); // 清空之前的搜索结果
+long sAddr0y = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB); // 获取模块基址
+daddr1y = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr0y + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA4; // 跳转指针
+
+
+//z
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList(); // 清空之前的搜索结果
+long sAddr0z = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB); // 获取模块基址
+daddr1z = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr0z + 0x454090) + 0x0) + 0x70) + 0x10) + 0xA0; // 跳转指针
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+//冻结
+private void executeBehavior2(String selectedOption1) {
+getAction2(selectedOption1);
+ }
+private void executeBehavior7(String selectedOption1) {
+getAction7(selectedOption1);
+ }
+private void executeBehavior8(String selectedOption1) {
+getAction8(selectedOption1);
+ }
+private void executeBehavior9(String selectedOption1) {
+getAction9(selectedOption1);
+ }
+private void executeBehavior10(String selectedOption1) {
+getAction10(selectedOption1);
+ }
+
+
+
+//传送
+private void executeBehavior1(String selectedOption) {
+getAction1(selectedOption);
+ }
+private void executeBehavior3(String selectedOption) {
+getAction3(selectedOption);
+ }
+private void executeBehavior4(String selectedOption) {
+getAction4(selectedOption);
+ }
+private void executeBehavior5(String selectedOption) {
+getAction5(selectedOption);
+ }
+private void executeBehavior6(String selectedOption) {
+getAction6(selectedOption);
+ }
+
+
+
+private String getAction2(String option) {//冻结传送
+ switch (option) {
+ case "1":
+dongjiecs=false;
+ return "";
+ case "2":
+dongjiecs=true;
+ return "";
+ default:
+ return "";
+ }
+
+ }
+private String getAction7(String option) {//冻结传送
+ switch (option) {
+ case "1":
+dongjiecs2=false;
+ return "";
+ case "2":
+dongjiecs2=true;
+ return "";
+ default:
+ return "";
+ }
+
+ }
+private String getAction8(String option) {//冻结传送
+ switch (option) {
+ case "1":
+dongjiecs3=false;
+ return "";
+ case "2":
+dongjiecs3=true;
+ return "";
+ default:
+ return "";
+ }
+
+ }
+private String getAction9(String option) {//冻结传送
+ switch (option) {
+ case "1":
+dongjiecs4=false;
+ return "";
+ case "2":
+dongjiecs4=true;
+ return "";
+ default:
+ return "";
+ }
+
+ }
+private String getAction10(String option) {//冻结传送
+ switch (option) {
+ case "1":
+dongjiecs5=false;
+ return "";
+ case "2":
+dongjiecs5=true;
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+private String getAction1(String option) {//超级风暴
+Main.音效();
+notification.make("传送", "已执行完毕", Notification.Type.SUCCESS);
+初始化();
+ switch (option) {
+ case "1":
+AlguiMemTool.setMemoryAddrValue("730", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);
+AlguiMemTool.setMemoryAddrValue("500", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);
+AlguiMemTool.setMemoryAddrValue("-3517", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs ,true);
+ return "";
+ case "2":
+ AlguiMemTool.setMemoryAddrValue("1299", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-11745.0341796875", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("9276.235351", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ return "";
+ case "3":
+AlguiMemTool.setMemoryAddrValue("0", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-14571", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-4057", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ return "";
+ case "4":
+ AlguiMemTool.setMemoryAddrValue("-200", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-2028", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("9627", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "5":
+ AlguiMemTool.setMemoryAddrValue("1600", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("9825", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("11275", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "6":
+ AlguiMemTool.setMemoryAddrValue("-429", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-11405.460", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-1871.13", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "7":
+ AlguiMemTool.setMemoryAddrValue("410", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-5424", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-13166", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+ return "";
+ case "8":
+ AlguiMemTool.setMemoryAddrValue("3600", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("7046.460", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-10906", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "9":
+ AlguiMemTool.setMemoryAddrValue("500", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-25.4606", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-11460", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+ return "";
+ case "10":
+ AlguiMemTool.setMemoryAddrValue("-500", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-9261.46063232531", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("5181.1367187", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "11":
+ AlguiMemTool.setMemoryAddrValue("516.3", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-4983.46", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-6715", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+ return "";
+ case "12":
+
+ AlguiMemTool.setMemoryAddrValue("-228", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("11391.4", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("9863", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "13":
+
+
+ AlguiMemTool.setMemoryAddrValue("455", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-11707.4", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-10474", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ return "";
+ case "14":
+ AlguiMemTool.setMemoryAddrValue("-53", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-1830", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-710", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+ return "";
+ case "15":
+
+ AlguiMemTool.setMemoryAddrValue("170", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-4938.4606323253187", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-2341.13671875", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+ return "";
+ case "16":
+
+ AlguiMemTool.setMemoryAddrValue("-415", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-8118", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("5658", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+ return "";
+ case "17":
+
+ AlguiMemTool.setMemoryAddrValue("932", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-11249", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("8823", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+ return "";
+ case "18":
+ AlguiMemTool.setMemoryAddrValue("710", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("9252", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+ AlguiMemTool.setMemoryAddrValue("-1237", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs,true);//修改值
+
+
+
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+
+private String getAction3(String option) {//单人风暴
+Main.音效();
+notification.make("传送", "已执行完毕", Notification.Type.SUCCESS);
+初始化();
+ switch (option) {
+ case "1":
+ AlguiMemTool.setMemoryAddrValue("3031", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("999", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-297", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ return "";
+ case "2":
+ AlguiMemTool.setMemoryAddrValue("999", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-5324", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-1950", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ return "";
+ case "3":
+ AlguiMemTool.setMemoryAddrValue("1594", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-5739", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("2004", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ return "";
+ case "4":
+ AlguiMemTool.setMemoryAddrValue("50", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-5863", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("6712", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+
+ return "";
+ case "5":
+ AlguiMemTool.setMemoryAddrValue("50", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-6712", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+ AlguiMemTool.setMemoryAddrValue("-5863", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs2,true);
+
+
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+private String getAction4(String option) {//乱斗
+Main.音效();
+notification.make("传送", "已执行完毕", Notification.Type.SUCCESS);
+初始化();
+ switch (option) {
+ case "1":
+ AlguiMemTool.setMemoryAddrValue("799", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs3,true);
+ AlguiMemTool.setMemoryAddrValue("2932.19", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs3,true);
+ AlguiMemTool.setMemoryAddrValue("-4221", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs3,true);
+ return "";
+ case "2":
+ AlguiMemTool.setMemoryAddrValue("1500", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs3,true);
+ AlguiMemTool.setMemoryAddrValue("-5937.94", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs3,true);
+ AlguiMemTool.setMemoryAddrValue("3917", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs3,true);
+
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+private String getAction5(String option) {//占点
+Main.音效();
+notification.make("传送", "已执行完毕", Notification.Type.SUCCESS);
+初始化();
+ switch (option) {
+ case "1":
+ AlguiMemTool.setMemoryAddrValue("300", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-51.941", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-2015", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ return "";
+ case "2":
+ AlguiMemTool.setMemoryAddrValue("633", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-254", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-603", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ return "";
+ case "3":
+ AlguiMemTool.setMemoryAddrValue("509", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("0.751619", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-3474", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+
+ return "";
+ case "4":
+ AlguiMemTool.setMemoryAddrValue("300", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-1181.94", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-247", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+
+
+ return "";
+ case "5":
+ AlguiMemTool.setMemoryAddrValue("1394", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("218", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("3164", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+
+
+
+ return "";
+ case "6":
+ AlguiMemTool.setMemoryAddrValue("470", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("77.41", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-1738", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ return "";
+ case "7":
+ AlguiMemTool.setMemoryAddrValue("120", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("151.94", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-1193", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+
+ return "";
+ case "8":
+ AlguiMemTool.setMemoryAddrValue("390", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-235.9", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("-2510", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+
+
+
+ return "";
+ case "9":
+ AlguiMemTool.setMemoryAddrValue("1400", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("5651.46", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ AlguiMemTool.setMemoryAddrValue("204", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs4,true);
+ return "";
+ default:
+ return "";
+ }
+
+ }
+
+private String getAction6(String option) {//擂台
+Main.音效();
+notification.make("传送", "已执行完毕", Notification.Type.SUCCESS);
+初始化();
+ switch (option) {
+ case "1":
+ AlguiMemTool.setMemoryAddrValue("803", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("-2245", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("272", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ return "";
+ case "2":
+ AlguiMemTool.setMemoryAddrValue("803", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("1185", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("-1718", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+
+ return "";
+ case "3":
+ AlguiMemTool.setMemoryAddrValue("803", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("1169", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("2253", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ return "";
+ case "4":
+ AlguiMemTool.setMemoryAddrValue("-202", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("-1152", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("1185", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+
+ return "";
+ case "5":
+ AlguiMemTool.setMemoryAddrValue("10", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("547", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("-616", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+
+
+ return "";
+
+ case "6":
+ AlguiMemTool.setMemoryAddrValue("-90", daddr1y,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("1028", daddr1x,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+ AlguiMemTool.setMemoryAddrValue("789", daddr1z,AlguiMemTool.TYPE_FLOAT, dongjiecs5,true);
+
+
+ return "";
+
+ default:
+ return "";
+ }
+
+ }
+
+
+
+
+private ButtonContentCard createSwitchContentCard01() {
+final ButtonContentCard button01 = new ButtonContentCard("超级风暴", "莱兮城");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button01.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择地点:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("大业殿", "1"); // 添加单次选项
+radioGroup1.addButton("可汗石头", "2"); // 添加循环选项
+radioGroup1.addButton("玉皇宫", "3"); // 添加循环选项
+radioGroup1.addButton("菩提枫", "4"); // 添加单次选项
+radioGroup1.addButton("北岸高架", "5"); // 添加循环选项
+radioGroup1.addButton("长滩房子", "6"); // 添加循环选项
+radioGroup1.addButton("太平门", "7"); // 添加单次选项
+radioGroup1.addButton("大草原", "8"); // 添加循环选项
+radioGroup1.addButton("荷塘房子", "9"); // 添加循环选项
+radioGroup1.addButton("美食街车", "10"); // 添加单次选项
+radioGroup1.addButton("地龟山", "11"); // 添加循环选项
+radioGroup1.addButton("北岸木头", "12"); // 添加循环选项
+radioGroup1.addButton("可汗牙帐", "13"); // 添加单次选项
+radioGroup1.addButton("永昌地下", "14"); // 添加循环选项
+radioGroup1.addButton("永昌门", "15"); // 添加循环选项
+radioGroup1.addButton("食味街中", "16"); // 添加单次选项
+radioGroup1.addButton("玉皇宫房", "17"); // 添加循环选项
+radioGroup1.addButton("和顺门旁", "18"); // 添加循环选项
+
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+// 添加一键开启的文本提示
+final Text reachText2 = new Text()
+.setText("冻结传送:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText2); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup2 = new RadioGroup();
+radioGroup2.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup2.setEnabled(true);
+radioGroup2.addButton("关闭", "1"); // 添加单次选项
+radioGroup2.addButton("开启", "2"); // 添加循环选项
+
+final String[] selectedOption1 = {"1"}; // 默认选中第一个选项
+radioGroup2.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+public void onChecked(String id) {
+new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+selectedOption1[0] = id; // 更新选中的选项
+executeBehavior2(selectedOption1[0]); // 执行选中的行为
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ });
+column.addView(radioGroup2); // 将单选按钮组添加到内容区域
+
+
+button01.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior1(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button01;
+}
+
+
+
+
+
+ private ButtonContentCard createSwitchContentCard02() {
+final ButtonContentCard button02 = new ButtonContentCard("单人风暴", "落尘之地");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button02.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择地点:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("中心枢纽", "1"); // 添加单次选项
+radioGroup1.addButton("灰色工厂", "2"); // 添加循环选项
+radioGroup1.addButton("守望台", "3"); // 添加循环选项
+radioGroup1.addButton("零号仓库", "4"); // 添加单次选项
+radioGroup1.addButton("小试验场", "5"); // 添加循环选项
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+// 添加一键开启的文本提示
+final Text reachText2 = new Text()
+.setText("冻结传送:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText2); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup2 = new RadioGroup();
+radioGroup2.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup2.setEnabled(true);
+radioGroup2.addButton("关闭", "1"); // 添加单次选项
+radioGroup2.addButton("开启", "2"); // 添加循环选项
+
+final String[] selectedOption1 = {"1"}; // 默认选中第一个选项
+radioGroup2.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+public void onChecked(String id) {
+new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+selectedOption1[0] = id; // 更新选中的选项
+executeBehavior7(selectedOption1[0]); // 执行选中的行为
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ });
+column.addView(radioGroup2); // 将单选按钮组添加到内容区域
+
+
+button02.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior3(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button02;
+}
+
+
+private ButtonContentCard createSwitchContentCard03() {
+final ButtonContentCard button03 = new ButtonContentCard("乱斗模式", "马萨拉遗迹");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button03.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择地点:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("空投点 1", "1"); // 添加单次选项
+radioGroup1.addButton("空投点 2", "2"); // 添加循环选项
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+// 添加一键开启的文本提示
+final Text reachText2 = new Text()
+.setText("冻结传送:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText2); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup2 = new RadioGroup();
+radioGroup2.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup2.setEnabled(true);
+radioGroup2.addButton("关闭", "1"); // 添加单次选项
+radioGroup2.addButton("开启", "2"); // 添加循环选项
+
+final String[] selectedOption1 = {"1"}; // 默认选中第一个选项
+radioGroup2.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+public void onChecked(String id) {
+new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+selectedOption1[0] = id; // 更新选中的选项
+executeBehavior8(selectedOption1[0]); // 执行选中的行为
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ });
+column.addView(radioGroup2); // 将单选按钮组添加到内容区域
+
+
+button03.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior4(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button03;
+}
+
+
+
+ private ButtonContentCard createSwitchContentCard04() {
+final ButtonContentCard button04 = new ButtonContentCard("占点模式", "远征|红石|禅院");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button04.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择地点:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("远征进点", "1"); // 添加单次选项
+radioGroup1.addButton("远征高台1", "2"); // 添加循环选项
+radioGroup1.addButton("远征高台2", "3"); // 添加循环选项
+radioGroup1.addButton("红石进点", "4"); // 添加单次选项
+radioGroup1.addButton("红石高台1", "5"); // 添加循环选项
+radioGroup1.addButton("红石高台2", "6"); // 添加循环选项
+radioGroup1.addButton("禅院进点", "7"); // 添加循环选项
+radioGroup1.addButton("禅院高台1", "8"); // 添加单次选项
+radioGroup1.addButton("禅院高台2", "9"); // 添加循环选项
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+// 添加一键开启的文本提示
+final Text reachText2 = new Text()
+.setText("冻结传送:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText2); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup2 = new RadioGroup();
+radioGroup2.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup2.setEnabled(true);
+radioGroup2.addButton("关闭", "1"); // 添加单次选项
+radioGroup2.addButton("开启", "2"); // 添加循环选项
+
+final String[] selectedOption1 = {"1"}; // 默认选中第一个选项
+radioGroup2.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+public void onChecked(String id) {
+new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+selectedOption1[0] = id; // 更新选中的选项
+executeBehavior9(selectedOption1[0]); // 执行选中的行为
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ });
+column.addView(radioGroup2); // 将单选按钮组添加到内容区域
+
+
+button04.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior5(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button04;
+}
+
+
+ private ButtonContentCard createSwitchContentCard05() {
+final ButtonContentCard button05 = new ButtonContentCard("无限擂台", "");
+// 创建一个可折叠的内容区域,用于放置设置选项
+Column column = new Column()
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent) // 宽度填满父视图
+.setHeight(BaseHelper.WrapContent) // 高度自适应内容
+.setTopMargin(dip2pxInt(15))); // 顶部外边距为15dp
+button05.setExpandableContent(column); // 将内容区域设置到卡片中
+
+// 添加一键开启的文本提示
+final Text reachText1 = new Text()
+.setText("选择地点:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText1); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup1 = new RadioGroup();
+radioGroup1.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup1.setEnabled(true);
+radioGroup1.addButton("高台1", "1"); // 添加单次选项
+radioGroup1.addButton("高台2", "2"); // 添加循环选项
+radioGroup1.addButton("高台3", "3"); // 添加循环选项
+radioGroup1.addButton("地下空间", "4"); // 添加单次选项
+radioGroup1.addButton("中间柱子", "5"); // 添加循环选项
+radioGroup1.addButton("狭窄斜坡", "6"); // 添加循环选项
+final String[] selectedOption = {"1"}; // 默认选中第一个选项
+radioGroup1.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+ public void onChecked(String id) {
+ new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+ selectedOption[0] = id; // 更新选中的选项
+ }
+ });
+column.addView(radioGroup1); // 将单选按钮组添加到内容区域
+
+
+
+// 添加一键开启的文本提示
+final Text reachText2 = new Text()
+.setText("冻结传送:")
+.setTextSize(10f)
+.setTextColor(hexColor("#FFC5C5C5"))
+.setTypeface(Typeface.DEFAULT_BOLD)
+.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(5)));
+column.addView(reachText2); // 将文本添加到内容区域
+
+// 创建一个单选按钮组,用于选择一键开启的行为
+final RadioGroup radioGroup2 = new RadioGroup();
+radioGroup2.setLayoutParams(new LinearParams()
+.setWidth(BaseHelper.MatchParent)
+.setBottomMargin(dip2pxInt(15)));
+radioGroup2.setEnabled(true);
+radioGroup2.addButton("关闭", "1"); // 添加单次选项
+radioGroup2.addButton("开启", "2"); // 添加循环选项
+
+final String[] selectedOption1 = {"1"}; // 默认选中第一个选项
+radioGroup2.setRadioGroupCallback(new RadioGroupCallback() {
+@Override
+public void onChecked(String id) {
+new Hint().setMessage("Selected: " + id).show(); // 显示选中的选项
+selectedOption1[0] = id; // 更新选中的选项
+executeBehavior10(selectedOption1[0]); // 执行选中的行为
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ });
+column.addView(radioGroup2); // 将单选按钮组添加到内容区域
+
+
+button05.setClickCallback(new ClickCallback() {//这个是按钮
+ @Override
+ public void onClick() {
+
+executeBehavior6(selectedOption[0]); // 执行选中的行为
+ }
+ });
+
+ return button05;
+}
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/WorldCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/WorldCategoryBox.java
new file mode 100644
index 0000000..6b986c5
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/WorldCategoryBox.java
@@ -0,0 +1,1202 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.button.kuai;
+import android.widget.SeekBar;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.ace;
+import java.util.Locale;
+
+public class WorldCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+public static boolean qjjs = false;
+
+//快捷键
+private SwitchShortcutButton tbgdShortcutButton;
+private SwitchShortcutButton tzfbShortcutButton;
+private SwitchShortcutButton wwpyShortcutButton;
+private SwitchShortcutButton ycjzShortcutButton;
+private SwitchShortcutButton qjjsShortcutButton;
+private SwitchShortcutButton zdcqShortcutButton;
+private SwitchShortcutButton yichangShortcutButton;
+
+//卡片
+ public WorldCategoryBox() {
+createShortcutButtons();
+ contentContainer
+
+.addView(createtbgdSwitchContentCard())
+.addView(createtzfbSwitchContentCard())
+.addView(createwwpySwitchContentCard())
+.addView(createycjzSwitchContentCard())
+.addView(createqjjsSwitchContentCard())
+.addView(createzdcqSwitchContentCard())
+.addView(createyichangSwitchContentCard())
+.addView(createskyboxSwitchContentCard())
+
+;
+ }
+
+//快捷键文本
+private void createShortcutButtons() {
+
+tbgdShortcutButton = new SwitchShortcutButton().setText("铁臂固定").OText("铁臂固定","Nomove").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+tzfbShortcutButton = new SwitchShortcutButton().setText("停止发包").OText("停止发包","Contract").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+wwpyShortcutButton = new SwitchShortcutButton().setText("万物偏移").OText("万物偏移","Excursion").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ycjzShortcutButton = new SwitchShortcutButton().setText("移除建筑").OText("移除建筑","Dismantling").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+qjjsShortcutButton = new SwitchShortcutButton().setText("全局加速").OText("全局加速","Velocity").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+zdcqShortcutButton = new SwitchShortcutButton().setText("子弹穿墙").OText("子弹穿墙","Penetrate").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+yichangShortcutButton = new SwitchShortcutButton().setText("异常发包器").OText("异常发包器","Outsourcing").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private SwitchContentCard createtbgdSwitchContentCard() {
+ final SwitchContentCard tbgdSwitchContentCard = new SwitchContentCard("铁臂固定", "[仅自己可见]在玩家视角中固定全局铁臂位置").OText("铁臂固定","[仅自己可见]在玩家视角中固定全局铁臂位置","Nomove","Prohibit all players from moving in their own perspective.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10))
+ );
+
+
+
+ tbgdSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tbgdShortcutButton.show();
+ } else {
+ tbgdShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tbgdSwitchContentCard, tbgdShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("铁臂固定", "已开启","Nomove","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("铁臂固定|Nomove", true);
+
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDD20F8) + 0xF8) + 0x800)+ 0x658) + 0x6B0) + 0x4FC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("8.47695338e-20", daddr,AlguiMemTool.TYPE_FLOAT, false,false);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("铁臂固定", "已关闭","Nomove","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("铁臂固定|Nomove", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDD20F8) + 0xF8) + 0x800)+ 0x658) + 0x6B0) + 0x4FC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("8.47695338e-21", daddr,AlguiMemTool.TYPE_FLOAT, false,false);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return tbgdSwitchContentCard;
+ }
+
+
+ private SwitchContentCard createtzfbSwitchContentCard() {
+ final SwitchContentCard tzfbSwitchContentCard = new SwitchContentCard("停止发包", "停止向服务器发送数据包").OText("停止发包","停止向服务器发送数据包","Contact","Stop the receiving and contracting of the server.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ tzfbSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tzfbShortcutButton.show();
+ } else {
+ tzfbShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tzfbSwitchContentCard, tzfbShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("停止发包", "已开启","Contact","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("停止发包|Contact", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xD3FB68)+0x350)+0x3D0)+0x3C0)+0x160)+0x1F4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9", daddr,AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("停止发包", "已关闭","Contact","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("停止发包|Contact", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xD3FB68)+0x350)+0x3D0)+0x3C0)+0x160)+0x1F4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0.00111516414", daddr,AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+
+ }
+ return true;
+ }
+ });
+
+ return tzfbSwitchContentCard;
+ }
+
+
+
+ private SwitchContentCard createwwpySwitchContentCard() {
+ final SwitchContentCard wwpySwitchContentCard = new SwitchContentCard("万物偏移", "[仅自己可见]使万物方向偏移且大小改变").OText("万物偏移","[仅自己可见]使万物方向偏移且大小改变","Excursion","Transform the world into a form from one's own perspective").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ wwpySwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ wwpyShortcutButton.show();
+ } else {
+ wwpyShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(wwpySwitchContentCard, wwpyShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("万物偏移", "已开启","Excursion","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("万物偏移|Excursion", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+AlguiMemTool.MemorySearch("1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("0.65211695", AlguiMemTool.TYPE_FLOAT, 0,false,true);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("万物偏移", "已关闭","Excursion","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("万物偏移|Excursion", false);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+AlguiMemTool.MemorySearch("0.65211695", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("1", AlguiMemTool.TYPE_FLOAT, 0,false,true);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return wwpySwitchContentCard;
+ }
+
+
+
+ private SwitchContentCard createycjzSwitchContentCard() {
+ final SwitchContentCard ycjzSwitchContentCard = new SwitchContentCard("移除建筑", "移除所有建筑物,使玩家可穿过").OText("移除建筑","移除所有建筑物,您可穿过原来建筑物的位置","Dismantling","Remove all buildings.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ ycjzSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ ycjzShortcutButton.show();
+ } else {
+ ycjzShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(ycjzSwitchContentCard, ycjzShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("移除建筑", "已开启","Dismantling","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("移除建筑|Dismantling", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_CODE_APP);// 设置内存
+AlguiMemTool.MemorySearch("4.3572124460608017E27", AlguiMemTool.TYPE_FLOAT);// 内存搜索// 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("-1", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("移除建筑", "已关闭","Dismantling","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("移除建筑|Dismantling", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_CODE_APP);// 设置内存
+AlguiMemTool.MemorySearch("4.3572124460608017E27", AlguiMemTool.TYPE_FLOAT);// 内存搜索// 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("14428.5986328125", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return ycjzSwitchContentCard;
+ }
+
+ private SwitchContentCard createqjjsSwitchContentCard() {
+ final SwitchContentCard qjjsSwitchContentCard = new SwitchContentCard("全局加速", "[仅自己可见]加速烟雾消散、武器瞄准等").OText("全局加速","[仅自己可见]加速烟雾消散、武器瞄准等","Velocity","Accelerated special effects").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ qjjsSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ qjjsShortcutButton.show();
+ } else {
+ qjjsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(qjjsSwitchContentCard, qjjsShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+ Main.音效();
+
+ if (newState) {
+
+//如果还没开就正常执行,否则不执行
+ if (!qjjs) {
+
+//这里写全局加速开启代码
+
+ notification.make("全局加速", "已开启","Velocity","Open", Notification.Type.SUCCESS);
+ ModuleManager.getInstance().setModuleEnabled("全局加速|Velocity", true);
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x960) + 0x18) + 0x210) + 0x208;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("-9999999", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+//改变变量
+ qjjs=true;
+ }else{
+ notification.make("全局加速", "您已在[灵体]菜单中开启","Velocity","No No No", Notification.Type.ERROR);
+ }
+
+
+ } else {
+
+
+//如果还没关就正常执行,否则不执行
+ if (qjjs) {
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0x960) + 0x18) + 0x210) + 0x208;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("500", daddr, AlguiMemTool.TYPE_FLOAT, false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+//改变变量
+
+//这里写全局加速关闭代码
+
+ notification.make("全局加速", "已关闭","Velocity","Close", Notification.Type.SUCCESS);
+ ModuleManager.getInstance().setModuleEnabled("全局加速|Velocity", false);
+//改变变量
+ qjjs=false;
+ }else{
+ notification.make("全局加速", "您已在[灵体]菜单中关闭","Velocity","No No No", Notification.Type.ERROR);
+ }
+
+
+ }
+ return true;
+ }
+ });
+
+ return qjjsSwitchContentCard;
+ }
+
+
+private SwitchContentCard createzdcqSwitchContentCard() {
+ final SwitchContentCard zdcqSwitchContentCard = new SwitchContentCard("子弹穿墙", "使发射的子弹可以穿透部分墙体").OText("子弹穿墙","使发射的子弹可以穿透部分墙体","Penetrate","Bullets go through walls.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ zdcqSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ zdcqShortcutButton.show();
+ } else {
+ zdcqShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(zdcqSwitchContentCard, zdcqShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("子弹穿墙", "已开启","Penetrate","Open" ,Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("子弹穿墙|Penetrate", true);
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0xDCB5E8);//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("子弹穿墙", "已关闭", "Penetrate","Close",Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("子弹穿墙|Penetrate", false);
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0xDCB5E8);//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("10", daddr, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return zdcqSwitchContentCard;
+ }
+
+private SwitchContentCard createyichangSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton yichangShortcutButton = new SwitchShortcutButton().setText("异常发包器").OText("异常发包器", "Outsourcing")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ final SwitchContentCard yichangSwitchContentCard = new SwitchContentCard("异常发包器", "向服务器发出自身的异常坐标") .OText("异常发包器", "向服务器发出自身的异常坐标", "Outsourcing", "Send abnormal coordinates of itself to the server")
+ .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ yichangSwitchContentCard.setExpandableContent(column);
+
+ final Text reachText = new Text()
+ .setText("发包模式:","Outsourcing Mode:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText);
+
+ final RadioGroup radioGroup = new RadioGroup().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ radioGroup.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent));
+
+ radioGroup.setEnabled(true); // 启用单选按钮组
+ radioGroup.addButton("断开连接","kick","1"); // 添加第一个选项
+ radioGroup.addButton("全图起飞","Fly", "2"); // 添加第三个选项
+ radioGroup.addButton("超级起飞","FlyPro", "5"); // 添加第三个选项
+ radioGroup.addButton("传染数据","Share", "3"); // 添加第三个选项
+ radioGroup.addButton("灰屏共鸣","Pestile", "7"); // 添加第三个选项
+ radioGroup.addButton("数据同化","SharePro", "6"); // 添加第三个选项
+ radioGroup.addButton("隐蔽模型","Stealth", "4"); // 添加第三个选项
+ final String[] selectedOption = { "1" }; // 默认选中第一个选项
+ radioGroup.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+
+ }
+ });
+ column.addView(radioGroup); // 将单选按钮组添加到内容区域
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ yichangShortcutButton.show();
+ } else {
+ yichangShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(yichangSwitchContentCard, yichangShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+ if (newState) {
+
+ executeBehavior1(selectedOption[0], true); // 执行选中的行为
+
+ModuleManager.getInstance().setModuleEnabled("异常发包器|Outsourcing", true);
+ notification.make("异常发包器", "已开启","Outsourcing","Open", Notification.Type.SUCCESS);
+ } else {
+ notification.make("异常发包器", "已关闭","Outsourcing","Open", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("异常发包器|Outsourcing", false);
+ executeBehavior1(selectedOption[0], false); // 停止执行行为
+
+ }
+ return true;
+ }
+ });
+
+ return yichangSwitchContentCard;
+ }
+
+
+
+
+
+ private SwitchContentCard createskyboxSwitchContentCard() {
+
+ final SwitchContentCard skyboxSwitchContentCard = new SwitchContentCard("天空盒坐标", "对天空盒进行坐标级平移").OText("天空盒坐标", "对天空盒进行坐标级平移","Skybox coordinates","Modify skybox coordinates").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ skyboxSwitchContentCard.setExpandableContent(column);
+
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setText("X轴:","X:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xc62e90)+0x0)+0x540;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xc62e90)+0x0)+0x540;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+ Row distanceRow1 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow1);
+
+ final Text distanceTitleText1 = new Text()
+ .setText("Y轴:","Y:").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceTitleText1);
+
+ final Text distanceText1 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceText1);
+
+ final Slider slider1 = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc62e90)+0x0)+0x548;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x548;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ }
+
+ });
+ column.addView(slider1);
+
+ Row distanceRow2 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow2);
+
+ final Text distanceTitleText2 = new Text()
+ .setText("Z轴:","Z").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceTitleText2);
+
+ final Text distanceText2 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceText2);
+
+ final Slider slider2 = new Slider(10000, -1000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x544;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc62e90)+0x0)+0x544;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true, true);
+
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ }
+
+ });
+ column.addView(slider2);
+
+
+
+skyboxSwitchContentCard.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+ slider1.setEnabled(newState);
+ slider1.setEnabled1(newState);
+ slider2.setEnabled(newState);
+ slider2.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+ModuleManager.getInstance().setModuleEnabled("天空盒坐标|Skybox coordinates", true);
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("天空盒坐标|Skybox coordinates", false);
+
+
+AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+
+
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x540;
+ AlguiMemTool.setMemoryAddrValue("5", daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x544;
+ AlguiMemTool.setMemoryAddrValue("5", daddr2, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x548;
+ AlguiMemTool.setMemoryAddrValue("5", daddr3, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ }
+ return true;
+ }
+ });
+
+ return skyboxSwitchContentCard;
+}
+
+
+
+
+
+
+
+ private void executeBehavior1(String selectedOption, boolean enable) {
+ if (enable) {
+
+ ace.executeHiddenBinary(getAction1(selectedOption));
+
+
+ } else {
+
+
+ ace.stopBinary(getCloseAction1(selectedOption));
+ }
+ }
+
+
+
+
+
+ private String getAction1(String option) {// 铁臂猎手
+ switch (option) {
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x39E2E8) + 0x28) + 0x0)
+ + 0x70) + 0x68) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-25", daddr3, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x380) + 0x1C0)
+ + 0x88) + 0x38) + 0xDC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-25", daddr2, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+
+ return "离线";
+
+ case "2":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr31 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr31 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr31 + 0x39E2E8) + 0x28) + 0x0)
+ + 0x70) + 0x68) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-41", daddr31, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCBC30) + 0x380) + 0x1C0)
+ + 0x88) + 0x38) + 0xDC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-41", daddr21, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+
+
+ return "起飞";
+ case "3":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue("999", daddr, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+ return "共享";
+
+ case "4":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long p1 = AlguiMemTool.jump64( AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x390) + 0xC0) + 0x10 )+0x15C;
+ AlguiMemTool.setMemoryAddrValue("-114514", p1, AlguiMemTool.TYPE_DWORD,true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ long p2 = AlguiMemTool.jump64( AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x390) + 0xC0) + 0x10 )+0x164;
+ AlguiMemTool.setMemoryAddrValue("-114514", p2, AlguiMemTool.TYPE_DWORD,true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+ return "隐身";
+
+ case "5":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr1145 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr1145 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1145 + 0x454090) + 0x0) + 0x70) + 0x10) + 0x16C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("-1", daddr1145, AlguiMemTool.TYPE_DWORD,true,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ return "超飞";
+
+ case "6":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr12 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr12 = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr12 + 0xc69248)+0x328)+0x3c0)+0x180)+0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr12, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue("999", daddr12, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+
+ return "超共享";
+ case "7":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr13 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr13 = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr13 + 0xc69248)+0x328)+0x3c0)+0x180)+0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr13, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue("9999", daddr13, AlguiMemTool.TYPE_FLOAT, true,true);// 修改目标值
+
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ return "超享";
+
+ default:
+ return "";
+ }
+
+ }
+
+private String getCloseAction1(String option) {
+
+
+
+
+
+
+
+
+
+
+ switch (option) {
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x39E2E8) + 0x28) + 0x0)
+ + 0x70) + 0x68) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("9", daddr3, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+ return "离线";
+ case "2":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x380) + 0x1C0)
+ + 0x88) + 0x38) + 0xDC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("9", daddr2, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ return "起飞";
+ case "3":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc69248)+0x328)+0x3c0)+0x180)+0x44;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+ return "起飞";
+ case "4":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long p1 = AlguiMemTool.jump64( AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x390) + 0xC0) + 0x10 )+0x15C;
+ AlguiMemTool.setMemoryAddrValue("-114514", p1, AlguiMemTool.TYPE_DWORD,false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ long p2 = AlguiMemTool.jump64( AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xDCBC30) + 0x390) + 0xC0) + 0x10 )+0x164;
+ AlguiMemTool.setMemoryAddrValue("-114514", p2, AlguiMemTool.TYPE_DWORD,false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+ return "起飞";
+ case "5":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ long sAddr1145 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr1145 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1145 + 0x454090) + 0x0) + 0x70) + 0x10) + 0x16C;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+
+ //跳转指针如果不直观请使用下面这种方式
+ /*
+ long p1 = AlguiMemTool.jump64(sAddr + 0x88B8);
+ long p2 = AlguiMemTool.jump64(p1 + 0xA0);
+ long p3 = AlguiMemTool.jump64(p2 + 0x118);
+ long addr = p3 + 0x18;
+ */
+ AlguiMemTool.setMemoryAddrValue("0", daddr1145, AlguiMemTool.TYPE_DWORD,false,true);//修改目标值 【如果需要冻结将false改为true】 return "开启成功";
+
+ return "起飞";
+ case "6":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr12 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr12 = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr12 + 0xc69248)+0x328)+0x3c0)+0x180)+0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr12, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr12, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ return "超共享";
+
+ case "7":
+ AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ long sAddr13 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+ long daddr13 = AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr13 + 0xc69248)+0x328)+0x3c0)+0x180)+0x14;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr13, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+ AlguiMemTool.setMemoryAddrValue("1.875", daddr13, AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值
+
+ // 【如果需要冻结将false改为true】
+ AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+ AlguiMemTool.setFreezeDelayMs(0);
+ return "超共享";
+ default:
+ return "";
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/WorldCategoryBox.java.bak b/app/src/main/java/com/bytecat/algui/ui/category/WorldCategoryBox.java.bak
new file mode 100644
index 0000000..710d96b
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/WorldCategoryBox.java.bak
@@ -0,0 +1,1016 @@
+package com.bytecat.algui.ui.category;
+
+import android.annotation.SuppressLint;
+import android.graphics.Typeface;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SliderCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.Slider;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.util.SyncUtil;
+import com.bytecat.algui.ui.Main;
+import com.bytecat.algui.ui.MIX;
+import com.bytecat.algui.AlguiHacker.AlguiMemTool;
+import com.bytecat.algui.effect.Notification;
+import com.bytecat.algui.ui.button.kuai;
+import android.widget.SeekBar;
+import com.bytecat.algui.effect.Hint;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.effect.ModuleManager;
+import com.bytecat.algui.ui.component.RadioGroup;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.ace;
+import java.util.Locale;
+
+public class WorldCategoryBox extends CategoryBox {
+
+ Notification notification = Notification.getInstance();
+
+
+
+//快捷键
+private SwitchShortcutButton tbgdShortcutButton;
+private SwitchShortcutButton tzfbShortcutButton;
+private SwitchShortcutButton wwpyShortcutButton;
+private SwitchShortcutButton ycjzShortcutButton;
+private SwitchShortcutButton qjjsShortcutButton;
+private SwitchShortcutButton zdcqShortcutButton;
+private SwitchShortcutButton yichangShortcutButton;
+
+//卡片
+ public WorldCategoryBox() {
+createShortcutButtons();
+ contentContainer
+
+.addView(createtbgdSwitchContentCard())
+.addView(createtzfbSwitchContentCard())
+.addView(createwwpySwitchContentCard())
+.addView(createycjzSwitchContentCard())
+.addView(createqjjsSwitchContentCard())
+.addView(createzdcqSwitchContentCard())
+.addView(createyichangSwitchContentCard())
+.addView(createskyboxSwitchContentCard())
+
+;
+ }
+
+//快捷键文本
+private void createShortcutButtons() {
+
+tbgdShortcutButton = new SwitchShortcutButton().setText("铁臂固定").OText("铁臂固定","Nomove").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+tzfbShortcutButton = new SwitchShortcutButton().setText("停止发包").OText("停止发包","Contract").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+wwpyShortcutButton = new SwitchShortcutButton().setText("万物偏移").OText("万物偏移","Excursion").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ycjzShortcutButton = new SwitchShortcutButton().setText("移除建筑").OText("移除建筑","Dismantling").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+qjjsShortcutButton = new SwitchShortcutButton().setText("全局加速").OText("全局加速","Velocity").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+zdcqShortcutButton = new SwitchShortcutButton().setText("子弹穿墙").OText("子弹穿墙","Penetrate").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+yichangShortcutButton = new SwitchShortcutButton().setText("异常发包器").OText("异常发包器","Outsourcing").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ private SwitchContentCard createtbgdSwitchContentCard() {
+ final SwitchContentCard tbgdSwitchContentCard = new SwitchContentCard("铁臂固定", "[仅自己可见]在玩家视角中固定全局铁臂位置").OText("铁臂固定","[仅自己可见]在玩家视角中固定全局铁臂位置","Nomove","Prohibit all players from moving in their own perspective.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10))
+ );
+
+
+
+ tbgdSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tbgdShortcutButton.show();
+ } else {
+ tbgdShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tbgdSwitchContentCard, tbgdShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("铁臂固定", "已开启","Nomove","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("铁臂固定|Nomove", true);
+
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDD20F8) + 0xF8) + 0x800)+ 0x658) + 0x6B0) + 0x4FC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("8.47695338e-20", daddr,AlguiMemTool.TYPE_FLOAT, false,false);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("铁臂固定", "已关闭","Nomove","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("铁臂固定|Nomove", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xDD20F8) + 0xF8) + 0x800)+ 0x658) + 0x6B0) + 0x4FC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("8.47695338e-21", daddr,AlguiMemTool.TYPE_FLOAT, false,false);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ }
+ return true;
+ }
+ });
+
+ return tbgdSwitchContentCard;
+ }
+
+
+ private SwitchContentCard createtzfbSwitchContentCard() {
+ final SwitchContentCard tzfbSwitchContentCard = new SwitchContentCard("停止发包", "停止向服务器发送数据包").OText("停止发包","停止向服务器发送数据包","Contact","Stop the receiving and contracting of the server.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ tzfbSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ tzfbShortcutButton.show();
+ } else {
+ tzfbShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(tzfbSwitchContentCard, tzfbShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("停止发包", "已开启","Contact","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("停止发包|Contact", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xD3FB68)+0x350)+0x3D0)+0x3C0)+0x160)+0x1F4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9", daddr,AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("停止发包", "已关闭","Contact","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("停止发包|Contact", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB
+ // cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xD3FB68)+0x350)+0x3D0)+0x3C0)+0x160)+0x1F4;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0.00111516414", daddr,AlguiMemTool.TYPE_FLOAT, false,true);// 修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+
+ }
+ return true;
+ }
+ });
+
+ return tzfbSwitchContentCard;
+ }
+
+
+
+ private SwitchContentCard createwwpySwitchContentCard() {
+ final SwitchContentCard wwpySwitchContentCard = new SwitchContentCard("万物偏移", "[仅自己可见]使万物方向偏移且大小改变").OText("万物偏移","[仅自己可见]使万物方向偏移且大小改变","Excursion","Transform the world into a form from one's own perspective").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ wwpySwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+
+ );
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ wwpyShortcutButton.show();
+ } else {
+ wwpyShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(wwpySwitchContentCard, wwpyShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("万物偏移", "已开启","Excursion","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("万物偏移|Excursion", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+AlguiMemTool.MemorySearch("1", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("0.65211695", AlguiMemTool.TYPE_FLOAT, 0,false,true);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("万物偏移", "已关闭","Excursion","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("万物偏移|Excursion", false);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_C_BSS);// 设置内存
+AlguiMemTool.MemorySearch("0.65211695", AlguiMemTool.TYPE_FLOAT);// 内存搜索 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("1", AlguiMemTool.TYPE_FLOAT, 0,false,true);// 修改值结果偏移修改 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return wwpySwitchContentCard;
+ }
+
+
+
+ private SwitchContentCard createycjzSwitchContentCard() {
+ final SwitchContentCard ycjzSwitchContentCard = new SwitchContentCard("移除建筑", "移除所有建筑物,使玩家可穿过").OText("移除建筑","移除所有建筑物,您可穿过原来建筑物的位置","Dismantling","Remove all buildings.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ ycjzSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ ycjzShortcutButton.show();
+ } else {
+ ycjzShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(ycjzSwitchContentCard, ycjzShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("移除建筑", "已开启","Dismantling","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("移除建筑|Dismantling", true);
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_CODE_APP);// 设置内存
+AlguiMemTool.MemorySearch("4.3572124460608017E27", AlguiMemTool.TYPE_FLOAT);// 内存搜索// 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("-1", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ } else {
+notification.make("移除建筑", "已关闭","Dismantling","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("移除建筑|Dismantling", false);
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+AlguiMemTool.setMemoryArea(AlguiMemTool.RANGE_CODE_APP);// 设置内存
+AlguiMemTool.MemorySearch("4.3572124460608017E27", AlguiMemTool.TYPE_FLOAT);// 内存搜索// 【主特征码】
+AlguiMemTool.MemoryOffsetWrite("14428.5986328125", AlguiMemTool.TYPE_FLOAT, 4, false,false);// 修改值结果偏移修改
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return ycjzSwitchContentCard;
+ }
+
+private SwitchContentCard createqjjsSwitchContentCard() {
+ final SwitchContentCard qjjsSwitchContentCard = new SwitchContentCard("全局加速", "[仅自己可见]加速烟雾消散、武器瞄准等").OText("全局加速","[仅自己可见]加速烟雾消散、武器瞄准等","Velocity","Accelerated special effects").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ qjjsSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ qjjsShortcutButton.show();
+ } else {
+ qjjsShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(qjjsSwitchContentCard, qjjsShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("全局加速", "已开启","Velocity","Open", Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("全局加速|Velocity", true);
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xC898A0)+0x2B8)+0x2C8)+0x778)+0x2E8)+0x70;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("1999", daddr, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);//设置冻结修改延迟【毫秒】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("全局加速", "已关闭","Velocity","Close", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("全局加速|Velocity", false);
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xd269f8)+0x38)+0x770)+0x768)+0x1f8)+0x10;//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("500", daddr, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return qjjsSwitchContentCard;
+ }
+
+
+private SwitchContentCard createzdcqSwitchContentCard() {
+ final SwitchContentCard zdcqSwitchContentCard = new SwitchContentCard("子弹穿墙", "使发射的子弹可以穿透部分墙体").OText("子弹穿墙","使发射的子弹可以穿透部分墙体","Penetrate","Bullets go through walls.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ zdcqSwitchContentCard.setExpandableContent(column);
+
+
+
+
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ zdcqShortcutButton.show();
+ } else {
+ zdcqShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(zdcqSwitchContentCard, zdcqShortcutButton, new SwitchCallback() {
+
+
+ @Override
+ public boolean onChecked(boolean newState) {
+
+
+Main.音效();
+
+ if (newState) {
+
+notification.make("子弹穿墙", "已开启","Penetrate","Open" ,Notification.Type.SUCCESS);
+
+ModuleManager.getInstance().setModuleEnabled("子弹穿墙|Penetrate", true);
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0xDCB5E8);//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("0", daddr, AlguiMemTool.TYPE_FLOAT,true,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+
+ } else {
+notification.make("子弹穿墙", "已关闭", "Penetrate","Close",Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("子弹穿墙|Penetrate", false);
+
+AlguiMemTool.clearResultList();//清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");//设置包名
+long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);//获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr = AlguiMemTool.jump64(sAddr + 0xDCB5E8);//跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("10", daddr, AlguiMemTool.TYPE_FLOAT,false,true);//修改目标值 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 修改完成 则清空这次的搜索结果
+
+ }
+ return true;
+ }
+ });
+
+ return zdcqSwitchContentCard;
+ }
+
+private SwitchContentCard createyichangSwitchContentCard() {
+ // 创建快捷键按钮
+ final SwitchShortcutButton yichangShortcutButton = new SwitchShortcutButton().setText("异常发包器").OText("异常发包器", "Packet Emitter")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+ final SwitchContentCard yichangSwitchContentCard = new SwitchContentCard("异常发包器", "向服务器发出自身的异常坐标") .OText("异常发包器", "向服务器发出自身的异常坐标", "Outsourcing", "Send abnormal coordinates of itself to the server")
+ .setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ yichangSwitchContentCard.setExpandableContent(column);
+
+ final Text reachText = new Text()
+ .setText("发包模式:","Outsourcing Mode:").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(5)));
+ column.addView(reachText);
+
+ final RadioGroup radioGroup = new RadioGroup().setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ radioGroup.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent));
+
+ radioGroup.setEnabled(true); // 启用单选按钮组
+ radioGroup.addButton("断开连接","kick","1"); // 添加第一个选项
+ radioGroup.addButton("全图起飞","Fly", "2"); // 添加第三个选项
+ final String[] selectedOption = { "1" }; // 默认选中第一个选项
+ radioGroup.setRadioGroupCallback(new RadioGroupCallback() {
+ @Override
+ public void onChecked(String id) {
+
+ }
+ });
+ column.addView(radioGroup); // 将单选按钮组添加到内容区域
+
+ Widget divider = new Widget()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ .setTopMargin(dip2pxInt(15)))
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ column.addView(divider);
+
+ SwitchContent shortcutSwitchContent = new SwitchContent("快捷键", "显示一个快捷按键以快速使用功能").OText("快捷键","显示一个快捷键以快速使用功能","FloatButton","Create a hover button").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ shortcutSwitchContent.setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ shortcutSwitchContent.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (newState) {
+ yichangShortcutButton.show();
+ } else {
+ yichangShortcutButton.dismiss();
+ }
+ return true;
+ }
+ });
+ column.addView(shortcutSwitchContent);
+
+ SyncUtil.sync(yichangSwitchContentCard, yichangShortcutButton, new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+
+ Main.音效();
+ if (newState) {
+
+ executeBehavior1(selectedOption[0], true); // 执行选中的行为
+
+ModuleManager.getInstance().setModuleEnabled("异常发包器|Outsourcing", true);
+ notification.make("异常发包器", "已开启","Outsourcing","Open", Notification.Type.SUCCESS);
+ } else {
+ notification.make("异常发包器", "已关闭","Outsourcing","Open", Notification.Type.ERROR);
+ModuleManager.getInstance().setModuleEnabled("异常发包器|Outsourcing", false);
+ executeBehavior1(selectedOption[0], false); // 停止执行行为
+
+ }
+ return true;
+ }
+ });
+
+ return yichangSwitchContentCard;
+ }
+
+
+
+
+
+ private SwitchContentCard createskyboxSwitchContentCard() {
+
+ final SwitchContentCard skyboxSwitchContentCard = new SwitchContentCard("天空盒坐标", "对天空盒进行坐标级平移").OText("天空盒坐标", "对天空盒进行坐标级平移","Skybox coordinates","Modify skybox coordinates").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang");
+ final Column column = new Column()
+ .setLayoutParams(new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(15)));
+ skyboxSwitchContentCard.setExpandableContent(column);
+
+
+ Row distanceRow = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow);
+
+ final Text distanceTitleText = new Text().setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setText("X轴:","X:")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceTitleText);
+
+ final Text distanceText = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow.addView(distanceText);
+
+ final Slider slider = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xc62e90)+0x0)+0x540;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr1, AlguiMemTool.TYPE_FLOAT, false, true);
+
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr1 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr1 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr1 + 0xc62e90)+0x0)+0x540;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr1, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ }
+
+ });
+ column.addView(slider);
+
+ Row distanceRow1 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow1);
+
+ final Text distanceTitleText1 = new Text()
+ .setText("Y轴:","Y:").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceTitleText1);
+
+ final Text distanceText1 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow1.addView(distanceText1);
+
+ final Slider slider1 = new Slider(10000, -10000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc62e90)+0x0)+0x548;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText1.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x548;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true, true);
+ AlguiMemTool.setFreezeDelayMs(0);
+
+ }
+ }
+
+ });
+ column.addView(slider1);
+
+ Row distanceRow2 = new Row()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ column.addView(distanceRow2);
+
+ final Text distanceTitleText2 = new Text()
+ .setText("Z轴:","Z").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceTitleText2);
+
+ final Text distanceText2 = new Text()
+ .setText("暂无","You can't do this.").setLanguageSwitchFilePath("/sdcard/TC配置文件/switch.lang")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ distanceRow2.addView(distanceText2);
+
+ final Slider slider2 = new Slider(10000, -1000, 1000)
+ .setSliderCallback(new SliderCallback() {
+
+
+
+ @SuppressLint("DefaultLocale")
+ @Override
+ public void onSlide(float newProgress, float oldProgress) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", newProgress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x544;
+ AlguiMemTool.setMemoryAddrValue(""+newProgress, daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ }
+
+
+
+
+ @Override
+ public void onEnabled(boolean isEnabled, float progress) {
+ if (isEnabled) {
+ distanceText2.setText(String.format(Locale.getDefault(), "%.1f", progress));
+
+ AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr + 0xc62e90)+0x0)+0x544;
+ AlguiMemTool.setMemoryAddrValue(""+progress, daddr, AlguiMemTool.TYPE_FLOAT, true, true);
+
+AlguiMemTool.setFreezeDelayMs(0);
+ }
+ }
+
+ });
+ column.addView(slider2);
+
+
+
+skyboxSwitchContentCard.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+slider.setEnabled(newState);
+ slider.setEnabled1(newState);
+ slider1.setEnabled(newState);
+ slider1.setEnabled1(newState);
+ slider2.setEnabled(newState);
+ slider2.setEnabled1(newState);
+Main.音效();
+ if (newState) {
+ModuleManager.getInstance().setModuleEnabled("天空盒坐标|Skybox coordinates", true);
+
+
+ } else {
+ModuleManager.getInstance().setModuleEnabled("天空盒坐标|Skybox coordinates", false);
+
+
+AlguiMemTool.setPackageName("com.vortex.celestial");
+ long sAddr = AlguiMemTool.getModuleBaseAddr("libclient.so:bss", AlguiMemTool.HEAD_CB);
+
+
+ long daddr = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x540;
+ AlguiMemTool.setMemoryAddrValue("5", daddr, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x544;
+ AlguiMemTool.setMemoryAddrValue("5", daddr2, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr+ 0xc62e90)+0x0)+0x548;
+ AlguiMemTool.setMemoryAddrValue("5", daddr3, AlguiMemTool.TYPE_FLOAT, false, true);
+
+ }
+ return true;
+ }
+ });
+
+ return skyboxSwitchContentCard;
+}
+
+
+
+
+
+
+
+ private void executeBehavior1(String selectedOption, boolean enable) {
+ if (enable) {
+
+ ace.executeHiddenBinary(getAction1(selectedOption));
+
+
+ } else {
+
+
+ ace.stopBinary(getCloseAction1(selectedOption));
+ }
+ }
+
+
+
+
+
+ private String getAction1(String option) {// 铁臂猎手
+ switch (option) {
+ case "1":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x39E2E8) + 0x28) + 0x0)
+ + 0x70) + 0x68) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-25", daddr3, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x380) + 0x1C0)
+ + 0x88) + 0x38) + 0xDC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-25", daddr2, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+
+ return "离线";
+
+ case "2":
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr31 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr31 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr31 + 0x39E2E8) + 0x28) + 0x0)
+ + 0x70) + 0x68) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-41", daddr31, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr21 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr21 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr21 + 0xDCBC30) + 0x380) + 0x1C0)
+ + 0x88) + 0x38) + 0xDC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("-41", daddr21, AlguiMemTool.TYPE_DWORD, true,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.setFreezeDelayMs(0);// 设置冻结修改延迟【毫秒】
+
+
+
+ return "起飞";
+
+ default:
+ return "";
+ }
+
+ }
+
+private String getCloseAction1(String option) {
+
+ AlguiMemTool.clearResultList();// 清空之前的搜索结果
+AlguiMemTool.setPackageName("com.vortex.celestial");
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr3 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr3 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr3 + 0x39E2E8) + 0x28) + 0x0)
+ + 0x70) + 0x68) + 0x16C;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9", daddr3, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+long sAddr2 = AlguiMemTool.getModuleBaseAddr("libclient.so:bss",
+ AlguiMemTool.HEAD_CB);// 获取模块基址 【xa模块传HEAD_XA cb模块传HEAD_CB cd模块传HEAD_CD】
+long daddr2 = AlguiMemTool.jump64(AlguiMemTool.jump64(AlguiMemTool.jump64(
+ AlguiMemTool.jump64(AlguiMemTool.jump64(sAddr2 + 0xDCBC30) + 0x380) + 0x1C0)
+ + 0x88) + 0x38) + 0xDC;// 跳转指针 跳到目标地址 【32位使用 jump32 64位使用jump64】
+AlguiMemTool.setMemoryAddrValue("9", daddr2, AlguiMemTool.TYPE_DWORD, false,true);// 修改目标值
+ // 【如果需要冻结将false改为true】
+AlguiMemTool.clearResultList();// 清空之前的搜索结果
+ switch (option) {
+ case "1":
+ return "离线";
+ case "2":
+ return "起飞";
+ default:
+ return "";
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/ZipUtilT.java b/app/src/main/java/com/bytecat/algui/ui/category/ZipUtilT.java
new file mode 100644
index 0000000..9ae273d
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/ZipUtilT.java
@@ -0,0 +1,63 @@
+package com.bytecat.algui.ui.category; // ← 换成你自己的包名
+
+import java.io.*;
+import java.util.zip.*;
+
+public final class ZipUtilT {
+
+ /** 把 srcDir 整个目录压缩成 zipFile */
+ public static void zip(File srcDir, File zipFile) throws IOException {
+ if (!srcDir.exists()) return;
+ try (ZipOutputStream zos = new ZipOutputStream(
+ new BufferedOutputStream(new FileOutputStream(zipFile)))) {
+ zip(srcDir, "", zos);
+ }
+ }
+
+ /** 递归压缩内部实现 */
+ private static void zip(File srcDir, String base, ZipOutputStream zos) throws IOException {
+ File[] files = srcDir.listFiles();
+ if (files == null) return;
+
+ byte[] buf = new byte[8192];
+ for (File f : files) {
+ String entryName = base + f.getName();
+ if (f.isDirectory()) {
+ // 空目录也要写一条记录
+ zos.putNextEntry(new ZipEntry(entryName + "/"));
+ zos.closeEntry();
+ zip(f, entryName + "/", zos);
+ } else {
+ try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(f))) {
+ zos.putNextEntry(new ZipEntry(entryName));
+ int len;
+ while ((len = bis.read(buf)) != -1) zos.write(buf, 0, len);
+ zos.closeEntry();
+ }
+ }
+ }
+ }
+
+/** 解压 zipFile 到 destDir */
+public static void unzip(File zipFile, File destDir) throws IOException {
+ try (ZipInputStream zis = new ZipInputStream(
+ new BufferedInputStream(new FileInputStream(zipFile)))) {
+ ZipEntry entry;
+ byte[] buffer = new byte[8192];
+ while ((entry = zis.getNextEntry()) != null) {
+ File outFile = new File(destDir, entry.getName());
+ if (entry.isDirectory()) {
+ outFile.mkdirs();
+ } else {
+ outFile.getParentFile().mkdirs();
+ try (FileOutputStream fos = new FileOutputStream(outFile)) {
+ int len;
+ while ((len = zis.read(buffer)) != -1) fos.write(buffer, 0, len);
+ }
+ }
+ zis.closeEntry();
+ }
+ }
+}
+ private ZipUtilT() {} // 禁止实例化
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/category/aboutCategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/category/aboutCategoryBox.java
new file mode 100644
index 0000000..ba92b64
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/category/aboutCategoryBox.java
@@ -0,0 +1,39 @@
+package com.bytecat.algui.ui.category;
+
+import com.bytecat.algui.ui.component.CategoryBox;
+import com.bytecat.algui.ui.component.TextContentCard;
+
+public class aboutCategoryBox extends CategoryBox {
+
+ public aboutCategoryBox() {
+ contentContainer
+ .addView(createMixNewTextContentCard())
+ .addView(createWhatIsMixTextContentCard());
+ }
+
+ private TextContentCard createMixNewTextContentCard() {
+ return new TextContentCard(
+"关于UI:MIX - NEW",
+"由苏沐橙(Su Mucheng)于2024年创建。\n"+
+"QQ:3578557729\n"+
+"QQ群:204677717\n"+
+"价格:100元人民币(恕不议价)\n"+
+"其他UI:MuCuteUI、MuCuteUIX(MIX)\n"+
+"注意事项:本UI基于MuCuteUIX开发,新增了众多组件,并优化了性能。"
+ );
+ }
+
+ private TextContentCard createWhatIsMixTextContentCard() {
+ return new TextContentCard(
+ "关于本项目:TrosCore",
+ "由凌白、龙图主力制作\n" +
+ "由小伙子加密及对接工具\n" +
+ "感谢半夢的支持与帮助\n" +
+ "使用TC客户端(更改地板等)\n" +
+ "更便宜的价格、更流畅的体验\n" +
+ "基于先前项目进行改进,使用了全新的UI\n" +
+ "QQ群:1030990452"
+ );
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/BoxButton.java b/app/src/main/java/com/bytecat/algui/ui/component/BoxButton.java
new file mode 100644
index 0000000..dc1132c
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/BoxButton.java
@@ -0,0 +1,74 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import com.bytecat.algui.component.Stack;
+import android.graphics.Typeface;
+import com.bytecat.algui.layoutparams.StackParams;
+import android.view.Gravity;
+
+public class BoxButton extends Stack {
+ public String buttonText;
+
+ public Text text;
+
+ private ClickCallback clickCallback;
+
+ public BoxButton(String buttonText) {
+ this.buttonText = buttonText;
+
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#00000000"))
+ .setAllRadius(dip2px(8))
+ );
+
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (clickCallback != null) {
+ clickCallback.onClick();
+ }
+ }
+ });
+
+ text = new Text()
+ .setText(buttonText)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#00000000"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setGravity(Gravity.CENTER)
+ .setMargins(dip2pxInt(15), dip2pxInt(5), dip2pxInt(15), dip2pxInt(5))
+ );
+ addView(text);
+ }
+
+ public BoxButton() {
+ this("button.common.run");
+ }
+
+ public BoxButton setClickCallback(ClickCallback clickCallback) {
+ this.clickCallback = clickCallback;
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/BoxContent.java b/app/src/main/java/com/bytecat/algui/ui/component/BoxContent.java
new file mode 100644
index 0000000..de2e915
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/BoxContent.java
@@ -0,0 +1,107 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+import android.graphics.Typeface;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+import android.widget.RelativeLayout;
+
+public class BoxContent extends Relative {
+
+ public static final int BUTTON_ID = View.generateViewId();
+
+ public final String title;
+ public final String description;
+
+ public Relative contentContainer;
+ public Column textContainer;
+ public Text titleText;
+ public Text descriptionText;
+ public BoxButton mButton; // 使用 Button
+
+ public BoxContent(String title) {
+ this(title, null);
+ }
+
+ public BoxContent(String title, String description) {
+ this(title, description, false);
+ }
+
+ public BoxContent(String title, String description, boolean isChecked) {
+ this.title = title;
+ this.description = description;
+
+ contentContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+
+ textContainer = new Column()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setRightMargin(dip2pxInt(15))
+ .addRule(RelativeLayout.START_OF, BUTTON_ID)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(textContainer);
+
+ titleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ )
+ .setText(title)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#FF999999"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(titleText);
+
+ if (description != null) {
+ descriptionText = new Text()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(2))
+ )
+ .setText(description)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(descriptionText);
+ }
+
+
+
+
+
+mButton = new BoxButton(""); // 可以根据需要修改按钮文本
+mButton.setId(BUTTON_ID).setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+);
+contentContainer.addView(mButton);
+}
+
+ // 添加设置按钮点击回调的方法
+ public BoxContent setButtonCallback(ClickCallback clickCallback) {
+ mButton.setClickCallback(clickCallback);
+ return this;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/BoxContentCard.java b/app/src/main/java/com/bytecat/algui/ui/component/BoxContentCard.java
new file mode 100644
index 0000000..06675f2
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/BoxContentCard.java
@@ -0,0 +1,127 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+
+public class BoxContentCard extends ContentCard {
+
+ public BoxContent BoxContent;
+ public Column expandableContentContainer;
+ public Widget divider;
+ public ViewHelper> expandableContent;
+ public boolean isExpanded;
+
+ // ===== 追加字段 =====
+private String chineseTitle;
+private String chineseDescription;
+private String englishTitle;
+private String englishDescription;
+private String languageSwitchFilePath;
+
+// ===== 追加 API =====
+public BoxContentCard OText(String chineseTitle, String chineseDescription,
+ String englishTitle, String englishDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ this.englishTitle = englishTitle;
+ this.englishDescription = englishDescription;
+ return this;
+}
+
+public BoxContentCard OText(String chineseTitle, String chineseDescription) {
+ return OText(chineseTitle, chineseDescription, null, null);
+}
+
+public BoxContentCard setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+}
+
+private void updateTextBasedOnFile() {
+ boolean fileExists = new java.io.File(languageSwitchFilePath).exists();
+ if (fileExists) {
+ BoxContent.titleText.setText(chineseTitle);
+ if (BoxContent.descriptionText != null) {
+ BoxContent.descriptionText.setText(chineseDescription);
+ }
+ } else {
+ if (englishTitle != null && englishDescription != null) {
+ BoxContent.titleText.setText(englishTitle);
+ if (BoxContent.descriptionText != null) {
+ BoxContent.descriptionText.setText(englishDescription);
+ }
+ }
+ }
+}
+
+ public BoxContentCard(String title, String description, boolean isChecked) {
+ BoxContent = new BoxContent(title, description, isChecked);
+ BoxContent.setLayoutParams(
+ new LinearParams()
+ .setAllMargins(dip2pxInt(15))
+ );
+ addView(BoxContent);
+
+ expandableContentContainer = new Column()
+ .setVisibility(View.GONE)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), dip2pxInt(15))
+ );
+ addView(expandableContentContainer);
+
+ divider = new Widget()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ )
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ expandableContentContainer.addView(divider);
+ }
+
+ public BoxContentCard(String title, String description) {
+ this(title, description, false);
+ }
+
+ public BoxContentCard(String title) {
+ this(title, null, false);
+ }
+
+ public BoxContentCard setClickCallback(ClickCallback clickCallback) {
+ BoxContent.setButtonCallback(clickCallback);
+ return this;
+ }
+
+ public BoxContentCard setExpandableContent(ViewHelper> expandableContent) {
+ this.expandableContent = expandableContent;
+ if (expandableContent != null) {
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (build().getLayoutTransition().isRunning()) {
+ return;
+ }
+
+ isExpanded = !isExpanded;
+ if (isExpanded) {
+ expandableContentContainer.setVisibility(View.VISIBLE);
+ } else {
+ expandableContentContainer.setVisibility(View.GONE);
+ }
+ }
+ });
+ expandableContentContainer.addView(expandableContent);
+ }
+ return this;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/Button.java b/app/src/main/java/com/bytecat/algui/ui/component/Button.java
new file mode 100644
index 0000000..115321c
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/Button.java
@@ -0,0 +1,74 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import com.bytecat.algui.component.Stack;
+import android.graphics.Typeface;
+import com.bytecat.algui.layoutparams.StackParams;
+import android.view.Gravity;
+
+public class Button extends Stack {
+ public String buttonText;
+
+ public Text text;
+
+ private ClickCallback clickCallback;
+
+ public Button(String buttonText) {
+ this.buttonText = buttonText;
+
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#B32C2C32"))
+ .setAllRadius(dip2px(8))
+ );
+
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (clickCallback != null) {
+ clickCallback.onClick();
+ }
+ }
+ });
+
+ text = new Text()
+ .setText(buttonText)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFA5A5A5"))
+ .setTypeface(Typeface.DEFAULT_BOLD)
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setGravity(Gravity.CENTER)
+ .setMargins(dip2pxInt(15), dip2pxInt(5), dip2pxInt(15), dip2pxInt(5))
+ );
+ addView(text);
+ }
+
+ public Button() {
+ this("button.common.run");
+ }
+
+ public Button setClickCallback(ClickCallback clickCallback) {
+ this.clickCallback = clickCallback;
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/ButtonContent.java b/app/src/main/java/com/bytecat/algui/ui/component/ButtonContent.java
new file mode 100644
index 0000000..1560fb2
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/ButtonContent.java
@@ -0,0 +1,113 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+import android.graphics.Typeface;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+import android.widget.RelativeLayout;
+import java.io.File;
+
+public class ButtonContent extends Relative {
+
+ public static final int BUTTON_ID = View.generateViewId();
+
+ public final String title;
+ public final String description;
+
+ public Relative contentContainer;
+ public Column textContainer;
+ public Text titleText;
+ public Text descriptionText;
+ public Button mButton; // 使用 Button
+
+ public ButtonContent(String title) {
+ this(title, null);
+ }
+
+ public ButtonContent(String title, String description) {
+ this(title, description, false);
+ }
+
+ public ButtonContent(String title, String description, boolean isChecked) {
+ this.title = title;
+ this.description = description;
+
+ contentContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+
+ textContainer = new Column()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setRightMargin(dip2pxInt(15))
+ .addRule(RelativeLayout.START_OF, BUTTON_ID)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(textContainer);
+
+ titleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ )
+ .setText(title)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#FF999999"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(titleText);
+
+ if (description != null) {
+ descriptionText = new Text()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(2))
+ )
+ .setText(description)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(descriptionText);
+ }
+
+ // 初始化 Button
+ // 初始化 Button
+
+String buttonText = "Run";
+String filePath ="/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+File file = new File(filePath);
+if (file.exists()) {
+buttonText = "执行";
+}
+
+mButton = new Button(buttonText); // 可以根据需要修改按钮文本
+mButton.setId(BUTTON_ID).setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+);
+contentContainer.addView(mButton);
+}
+ // 添加设置按钮点击回调的方法
+ public ButtonContent setButtonCallback(ClickCallback clickCallback) {
+ mButton.setClickCallback(clickCallback);
+ return this;
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/ButtonContent.java.bak b/app/src/main/java/com/bytecat/algui/ui/component/ButtonContent.java.bak
new file mode 100644
index 0000000..37711fb
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/ButtonContent.java.bak
@@ -0,0 +1,113 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+import android.graphics.Typeface;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+import android.widget.RelativeLayout;
+import java.io.File;
+
+public class ButtonContent extends Relative {
+
+ public static final int BUTTON_ID = View.generateViewId();
+
+ public final String title;
+ public final String description;
+
+ public Relative contentContainer;
+ public Column textContainer;
+ public Text titleText;
+ public Text descriptionText;
+ public Button mButton; // 使用 Button
+
+ public ButtonContent(String title) {
+ this(title, null);
+ }
+
+ public ButtonContent(String title, String description) {
+ this(title, description, false);
+ }
+
+ public ButtonContent(String title, String description, boolean isChecked) {
+ this.title = title;
+ this.description = description;
+
+ contentContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+
+ textContainer = new Column()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setRightMargin(dip2pxInt(15))
+ .addRule(RelativeLayout.START_OF, BUTTON_ID)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(textContainer);
+
+ titleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ )
+ .setText(title)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#FF999999"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(titleText);
+
+ if (description != null) {
+ descriptionText = new Text()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(2))
+ )
+ .setText(description)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(descriptionText);
+ }
+
+ // 初始化 Button
+ // 初始化 Button
+
+String buttonText = "Run";
+String filePath ="/sdcard/TC配置文件/switch.lang";
+File file = new File(filePath);
+if (file.exists()) {
+buttonText = "执行";
+}
+
+mButton = new Button(buttonText); // 可以根据需要修改按钮文本
+mButton.setId(BUTTON_ID).setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+);
+contentContainer.addView(mButton);
+}
+ // 添加设置按钮点击回调的方法
+ public ButtonContent setButtonCallback(ClickCallback clickCallback) {
+ mButton.setClickCallback(clickCallback);
+ return this;
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/ButtonContentCard.java b/app/src/main/java/com/bytecat/algui/ui/component/ButtonContentCard.java
new file mode 100644
index 0000000..bd4f76c
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/ButtonContentCard.java
@@ -0,0 +1,138 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+
+import java.io.File;
+
+public class ButtonContentCard extends ContentCard {
+
+ public ButtonContent buttonContent;
+ public Column expandableContentContainer;
+ public Widget divider;
+ public ViewHelper> expandableContent;
+ public boolean isExpanded;
+
+ // 中文文本
+ private String chineseTitle;
+ private String chineseDescription;
+
+ // 英文文本
+ private String englishTitle;
+ private String englishDescription;
+
+ // 文件路径
+ private String languageSwitchFilePath;
+
+ public ButtonContentCard(String title, String description, boolean isChecked) {
+ buttonContent = new ButtonContent(title, description, isChecked);
+ buttonContent.setLayoutParams(
+ new LinearParams()
+ .setAllMargins(BaseHelper.dip2pxInt(15))
+ );
+ addView(buttonContent);
+
+ expandableContentContainer = new Column()
+ .setVisibility(View.GONE)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(BaseHelper.dip2pxInt(15), 0, BaseHelper.dip2pxInt(15), BaseHelper.dip2pxInt(15))
+ );
+ addView(expandableContentContainer);
+
+ divider = new Widget()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.dip2pxInt(1))
+ )
+ .setBackgroundColor(BaseHelper.hexColor("#B32C2C32"));
+ expandableContentContainer.addView(divider);
+
+ // 初始化时直接设置中文文本
+ updateTextBasedOnFile();
+ }
+
+ public ButtonContentCard(String title, String description) {
+ this(title, description, false);
+ }
+
+ public ButtonContentCard(String title) {
+ this(title, null, false);
+ }
+
+ public ButtonContentCard setClickCallback(ClickCallback clickCallback) {
+ buttonContent.setButtonCallback(clickCallback);
+ return this;
+ }
+
+ public ButtonContentCard setExpandableContent(ViewHelper> expandableContent) {
+ this.expandableContent = expandableContent;
+ if (expandableContent != null) {
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (build().getLayoutTransition().isRunning()) {
+ return;
+ }
+
+ isExpanded = !isExpanded;
+ if (isExpanded) {
+ expandableContentContainer.setVisibility(View.VISIBLE);
+ } else {
+ expandableContentContainer.setVisibility(View.GONE);
+ }
+ }
+ });
+ expandableContentContainer.addView(expandableContent);
+ }
+ return this;
+ }
+
+ // 设置中英文文本
+ public ButtonContentCard OText(String chineseTitle, String chineseDescription,
+ String englishTitle, String englishDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ this.englishTitle = englishTitle;
+ this.englishDescription = englishDescription;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 设置语言切换文件路径
+ public ButtonContentCard setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ if (languageSwitchFilePath == null) return;
+
+ boolean fileExists = new File(languageSwitchFilePath).exists();
+ if (fileExists) {
+ buttonContent.titleText.setText(chineseTitle);
+ if (buttonContent.descriptionText != null) {
+ buttonContent.descriptionText.setText(chineseDescription);
+ }
+ } else {
+ buttonContent.titleText.setText(englishTitle);
+ if (buttonContent.descriptionText != null) {
+ buttonContent.descriptionText.setText(englishDescription);
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/CategoryBox.java b/app/src/main/java/com/bytecat/algui/ui/component/CategoryBox.java
new file mode 100644
index 0000000..8ac2055
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/CategoryBox.java
@@ -0,0 +1,33 @@
+package com.bytecat.algui.ui.component;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.ColumnScroll;
+import com.bytecat.algui.layoutparams.LinearParams;
+
+public class CategoryBox extends ColumnScroll {
+
+ public Column contentContainer;
+
+ public CategoryBox() {
+ setScrollBarEnabled(false);
+ setFadingEdgeEnabled(true);
+ setFadingEdgeLength(dip2pxInt(8));
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setTopMargin(dip2pxInt(10))
+ .setBottomMargin(dip2pxInt(10))
+ );
+
+ contentContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/CategoryCard.java b/app/src/main/java/com/bytecat/algui/ui/component/CategoryCard.java
new file mode 100644
index 0000000..030f14d
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/CategoryCard.java
@@ -0,0 +1,56 @@
+package com.bytecat.algui.ui.component;
+
+import android.graphics.Typeface;
+import android.view.Gravity;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+
+public class CategoryCard extends Row {
+
+ private String category;
+
+ public Text categoryTitleText;
+
+ public ViewHelper> content;
+
+ public CategoryCard setText(String category) {
+ this.category = category;
+ if (categoryTitleText != null) {
+ categoryTitleText.setText(category);
+ }
+ return this;
+ }
+
+ public CategoryCard setContent(ViewHelper> content) {
+ this.content = content;
+ return this;
+ }
+
+ public CategoryCard() {
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(34))
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), 0)
+ );
+
+ categoryTitleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ )
+ .setGravity(Gravity.CENTER)
+ .setText(category)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#DAFFFFFF"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ addView(categoryTitleText);
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/ContentCard.java b/app/src/main/java/com/bytecat/algui/ui/component/ContentCard.java
new file mode 100644
index 0000000..da430e9
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/ContentCard.java
@@ -0,0 +1,25 @@
+package com.bytecat.algui.ui.component;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+
+public class ContentCard extends Column {
+
+ public ContentCard() {
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(0, dip2pxInt(5), 0, dip2pxInt(5))
+ );
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#20D0D0D0"))
+ .setAllRadius(dip2px(10))
+ );
+ animatedContent();
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/RadioGroup.java b/app/src/main/java/com/bytecat/algui/ui/component/RadioGroup.java
new file mode 100644
index 0000000..11f976a
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/RadioGroup.java
@@ -0,0 +1,126 @@
+package com.bytecat.algui.ui.component;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.callback.RadioGroupCallback;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.RowScroll;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.StackParams;
+
+
+public class RadioGroup extends RowScroll {
+
+ public Map map = new LinkedHashMap<>();
+
+ public Row row;
+
+ private RadioGroupCallback radioGroupCallback;
+
+ private boolean isEnabled = false;
+
+ /* ===== 中英文切换 ===== */
+ private String languageSwitchFilePath;
+
+ public RadioGroup setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ return this;
+ }
+
+ private boolean isChinese() {
+ return languageSwitchFilePath != null && new java.io.File(languageSwitchFilePath).exists();
+ }
+
+ public RadioGroup addButton(String chineseTitle, String englishTitle, final String id) {
+ return addButton(isChinese() ? chineseTitle : englishTitle, id);
+ }
+
+ public RadioGroup() {
+ setScrollBarEnabled(false);
+
+ row = new Row()
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(row);
+ }
+
+ public RadioGroup setChecked(String id) {
+ StatefulButton statefulButton = map.get(id);
+ if (statefulButton != null) {
+ statefulButton.setChecked(true);
+ for (String key : map.keySet()) {
+ StatefulButton value = map.get(key);
+ if (value != null && !key.equals(id)) {
+ value.setChecked(false);
+ }
+ }
+ }
+ return this;
+ }
+
+ public RadioGroup setEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ return this;
+ }
+
+ public RadioGroup addButton(String title, final String id) {
+ if (map.containsKey(id)) {
+ return this;
+ }
+
+ final StatefulButton statefulButton = new StatefulButton(title);
+ statefulButton.setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ if (statefulButton.isChecked || !isEnabled) {
+ return;
+ }
+
+ setChecked(id);
+
+ if (radioGroupCallback != null) {
+ radioGroupCallback.onChecked(id);
+ }
+ }
+ });
+
+ if (!map.isEmpty()) {
+ statefulButton.setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(10))
+ );
+ } else {
+ statefulButton.setChecked(true);
+ }
+ map.put(id, statefulButton);
+ row.addView(statefulButton);
+ return this;
+ }
+
+ public RadioGroup removeButton(String id) {
+ if (!map.containsKey(id)) {
+ return this;
+ }
+
+ StatefulButton statefulButton = map.get(id);
+ if (statefulButton != null) {
+ map.remove(id);
+ row.removeView(statefulButton);
+ }
+ return this;
+ }
+
+ public RadioGroup setRadioGroupCallback(RadioGroupCallback radioGroupCallback) {
+ this.radioGroupCallback = radioGroupCallback;
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/Slider.java b/app/src/main/java/com/bytecat/algui/ui/component/Slider.java
new file mode 100644
index 0000000..1e0f6fa
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/Slider.java
@@ -0,0 +1,106 @@
+package com.bytecat.algui.ui.component;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.view.MotionEvent;
+import android.view.*;
+
+import com.bytecat.algui.callback.SliderCallback;
+import android.graphics.RectF;
+import android.animation.ValueAnimator;
+import com.bytecat.algui.component.BasicSlider;
+import com.bytecat.algui.component.Card;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.layoutparams.StackParams;
+import com.bytecat.algui.view.SliderView;
+
+public class Slider extends Card {
+
+ public BasicSlider basicSlider;
+
+ private boolean isEnabled;
+
+ private interface DispatchCallback {
+ void onDispatch(float newProgress, float oldProgress);
+ }
+
+ public Slider setSliderCallback(SliderCallback sliderCallback) {
+ basicSlider.setSliderCallback(sliderCallback);
+ return this;
+ }
+
+ public Slider() {
+ this(100f, 0f);
+ }
+
+ public Slider(float max, float progress) {
+ this(max, 0, progress);
+ }
+
+ public Slider(float max, float min, float progress) {
+ setCardBackgroundColor(hexColor("#B32C2C32"));
+ setCardElevation(0f);
+ setRadius(dip2px(10));
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(sp2pxInt(10))
+ .setTopMargin(dip2pxInt(5))
+ );
+
+ basicSlider = new BasicSlider()
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ )
+ .setSliderParams(max, min, progress);
+ addView(basicSlider);
+ }
+
+ public Slider setMax(float max) {
+ basicSlider.setMax(max);
+ return this;
+ }
+
+ public Slider setMin(float min) {
+ basicSlider.setMin(min);
+ return this;
+ }
+
+ public Slider setProgress(float progress) {
+ basicSlider.setProgress(progress);
+ return this;
+ }
+
+ public Slider setSliderParams(float max, float min, float progress) {
+ basicSlider.setSliderParams(max, min, progress);
+ return this;
+ }
+
+ public Slider setEnabled(boolean isEnabled) {
+ if (this.isEnabled != isEnabled) {
+ this.isEnabled = isEnabled;
+ final SliderView sliderView = basicSlider.sliderView;
+ final SliderCallback sliderCallback = sliderView.sliderCallback;
+ if (sliderCallback != null) {
+ float progress = basicSlider.sliderView.getProgress();
+ sliderCallback.onEnabled(isEnabled, progress);
+ }
+ }
+ return this;
+ }
+
+
+
+ public Slider setEnabled1(boolean isEnabled) {
+ basicSlider.setEnabled(isEnabled);
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/StatefulButton.java b/app/src/main/java/com/bytecat/algui/ui/component/StatefulButton.java
new file mode 100644
index 0000000..fc93f90
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/StatefulButton.java
@@ -0,0 +1,218 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.animation.AnimatedSet;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.interpolator.FastOutSlowInInterpolator;
+import com.bytecat.algui.animation.ValueAnimated;
+import android.animation.ValueAnimator;
+
+import java.io.File;
+
+public class StatefulButton extends Button {
+
+ public static final String UNCHECKED_BACKGROUND_COLOR = "#B34A4A50";
+ public static final String CHECKED_BACKGROUND_COLOR = "#CC7F7FD5";
+ public static final String UNCHECKED_TEXT_COLOR = "#B3A9A9B3";
+ public static final String CHECKED_TEXT_COLOR = "#E6E0E0E6";
+
+ public boolean isChecked;
+
+ private SwitchCallback switchCallback;
+
+ private int currentBackgroundColor;
+
+ private int currentTextColor;
+
+ public AnimatedSet animatorSet;
+
+ private String chineseText;
+ private String englishText;
+ private float chineseTextSize = 10f; // 中文文本大小
+ private float englishTextSize = 10f; // 英文文本大小
+
+ private String languageSwitchFilePath;
+
+ public StatefulButton(String buttonText, boolean isChecked) {
+ super(buttonText);
+ this.isChecked = isChecked;
+
+ currentBackgroundColor = BaseHelper.hexColor(isChecked ? CHECKED_BACKGROUND_COLOR : UNCHECKED_BACKGROUND_COLOR);
+ currentTextColor = BaseHelper.hexColor(isChecked ? CHECKED_TEXT_COLOR : UNCHECKED_TEXT_COLOR);
+
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(currentBackgroundColor)
+ .setAllRadius(BaseHelper.dip2px(8))
+ );
+
+ text.setTextColor(currentTextColor);
+
+ setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ if (switchCallback != null && !switchCallback.onChecked(!StatefulButton.this.isChecked)) {
+ return;
+ }
+
+ animated(!StatefulButton.this.isChecked);
+ }
+ });
+ }
+
+ public StatefulButton(String buttonText) {
+ this(buttonText, false);
+ }
+
+ public StatefulButton() {
+ this("button.common.run");
+ }
+
+ // 新增构造函数,用于支持中英文标题
+ public StatefulButton(String chineseText, String englishText, boolean isChecked) {
+ super(chineseText); // 默认显示中文
+ this.isChecked = isChecked;
+ this.chineseText = chineseText;
+ this.englishText = englishText;
+
+ currentBackgroundColor = BaseHelper.hexColor(isChecked ? CHECKED_BACKGROUND_COLOR : UNCHECKED_BACKGROUND_COLOR);
+ currentTextColor = BaseHelper.hexColor(isChecked ? CHECKED_TEXT_COLOR : UNCHECKED_TEXT_COLOR);
+
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(currentBackgroundColor)
+ .setAllRadius(BaseHelper.dip2px(8))
+
+
+
+
+ );
+
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(10))
+ );
+
+ text.setTextColor(currentTextColor);
+ // 设置中文文本大小
+ text.setTextSize(chineseTextSize);
+
+ // 设置语言切换文件路径
+ languageSwitchFilePath = "/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+
+ // 检查语言文件存在与否并更新文本
+ updateTextBasedOnFile();
+
+ setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ if (switchCallback != null && !switchCallback.onChecked(!StatefulButton.this.isChecked)) {
+ return;
+ }
+
+ animated(!StatefulButton.this.isChecked);
+ }
+ });
+ }
+
+ public StatefulButton setChecked(boolean isChecked) {
+ if (this.isChecked != isChecked) {
+ animated(isChecked);
+ }
+ return this;
+ }
+
+ public StatefulButton setSwitchCallback(SwitchCallback switchCallback) {
+ this.switchCallback = switchCallback;
+ return this;
+ }
+
+ private void animated(boolean isChecked) {
+ if (animatorSet != null && animatorSet.build().isRunning()) {
+ animatorSet.cancel();
+ }
+
+ this.isChecked = isChecked;
+
+ int endBackgroundColor;
+ if (this.isChecked) {
+ endBackgroundColor = BaseHelper.hexColor(CHECKED_BACKGROUND_COLOR);
+ } else {
+ endBackgroundColor = BaseHelper.hexColor(UNCHECKED_BACKGROUND_COLOR);
+ }
+
+ int endTextColor;
+ if (this.isChecked) {
+ endTextColor = BaseHelper.hexColor(CHECKED_TEXT_COLOR);
+ } else {
+ endTextColor = BaseHelper.hexColor(UNCHECKED_TEXT_COLOR);
+ }
+
+ animatorSet = new AnimatedSet()
+ .setInterpolator(new FastOutSlowInInterpolator())
+ .setDuration(100L)
+ .playTogether(
+ new ValueAnimated()
+ .ofArgb(currentBackgroundColor, endBackgroundColor)
+ .addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ int animatedValue = (int) animation.getAnimatedValue();
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(animatedValue)
+ .setAllRadius(BaseHelper.dip2px(8))
+ );
+ currentBackgroundColor = animatedValue;
+ }
+ }),
+ new ValueAnimated()
+ .ofArgb(currentTextColor, endTextColor)
+ .addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ int animatedValue = (int) animation.getAnimatedValue();
+ text.setTextColor(animatedValue);
+ currentTextColor = animatedValue;
+ }
+ })
+ )
+ .start();
+ }
+
+ // 设置语言切换文件路径
+ public StatefulButton setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ if (languageSwitchFilePath == null) return;
+
+ boolean fileExists = new File(languageSwitchFilePath).exists();
+ if (fileExists) {
+ text.setText(chineseText);
+ text.setTextSize(chineseTextSize);
+ // 设置中文按钮内间距
+
+ } else {
+ text.setText(englishText);
+ text.setTextSize(englishTextSize);
+ // 设置英文按钮内间距(更小)
+
+
+ }
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/StatefulButton.java.bak b/app/src/main/java/com/bytecat/algui/ui/component/StatefulButton.java.bak
new file mode 100644
index 0000000..3f1bd63
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/StatefulButton.java.bak
@@ -0,0 +1,218 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.animation.AnimatedSet;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+import com.bytecat.algui.callback.ClickCallback;
+import com.bytecat.algui.interpolator.FastOutSlowInInterpolator;
+import com.bytecat.algui.animation.ValueAnimated;
+import android.animation.ValueAnimator;
+
+import java.io.File;
+
+public class StatefulButton extends Button {
+
+ public static final String UNCHECKED_BACKGROUND_COLOR = "#B34A4A50";
+ public static final String CHECKED_BACKGROUND_COLOR = "#CC7F7FD5";
+ public static final String UNCHECKED_TEXT_COLOR = "#B3A9A9B3";
+ public static final String CHECKED_TEXT_COLOR = "#E6E0E0E6";
+
+ public boolean isChecked;
+
+ private SwitchCallback switchCallback;
+
+ private int currentBackgroundColor;
+
+ private int currentTextColor;
+
+ public AnimatedSet animatorSet;
+
+ private String chineseText;
+ private String englishText;
+ private float chineseTextSize = 10f; // 中文文本大小
+ private float englishTextSize = 10f; // 英文文本大小
+
+ private String languageSwitchFilePath;
+
+ public StatefulButton(String buttonText, boolean isChecked) {
+ super(buttonText);
+ this.isChecked = isChecked;
+
+ currentBackgroundColor = BaseHelper.hexColor(isChecked ? CHECKED_BACKGROUND_COLOR : UNCHECKED_BACKGROUND_COLOR);
+ currentTextColor = BaseHelper.hexColor(isChecked ? CHECKED_TEXT_COLOR : UNCHECKED_TEXT_COLOR);
+
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(currentBackgroundColor)
+ .setAllRadius(BaseHelper.dip2px(8))
+ );
+
+ text.setTextColor(currentTextColor);
+
+ setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ if (switchCallback != null && !switchCallback.onChecked(!StatefulButton.this.isChecked)) {
+ return;
+ }
+
+ animated(!StatefulButton.this.isChecked);
+ }
+ });
+ }
+
+ public StatefulButton(String buttonText) {
+ this(buttonText, false);
+ }
+
+ public StatefulButton() {
+ this("button.common.run");
+ }
+
+ // 新增构造函数,用于支持中英文标题
+ public StatefulButton(String chineseText, String englishText, boolean isChecked) {
+ super(chineseText); // 默认显示中文
+ this.isChecked = isChecked;
+ this.chineseText = chineseText;
+ this.englishText = englishText;
+
+ currentBackgroundColor = BaseHelper.hexColor(isChecked ? CHECKED_BACKGROUND_COLOR : UNCHECKED_BACKGROUND_COLOR);
+ currentTextColor = BaseHelper.hexColor(isChecked ? CHECKED_TEXT_COLOR : UNCHECKED_TEXT_COLOR);
+
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(currentBackgroundColor)
+ .setAllRadius(BaseHelper.dip2px(8))
+
+
+
+
+ );
+
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setLeftMargin(dip2pxInt(10))
+ );
+
+ text.setTextColor(currentTextColor);
+ // 设置中文文本大小
+ text.setTextSize(chineseTextSize);
+
+ // 设置语言切换文件路径
+ languageSwitchFilePath = "/sdcard/TC配置文件/switch.lang";
+
+ // 检查语言文件存在与否并更新文本
+ updateTextBasedOnFile();
+
+ setClickCallback(new ClickCallback() {
+ @Override
+ public void onClick() {
+ if (switchCallback != null && !switchCallback.onChecked(!StatefulButton.this.isChecked)) {
+ return;
+ }
+
+ animated(!StatefulButton.this.isChecked);
+ }
+ });
+ }
+
+ public StatefulButton setChecked(boolean isChecked) {
+ if (this.isChecked != isChecked) {
+ animated(isChecked);
+ }
+ return this;
+ }
+
+ public StatefulButton setSwitchCallback(SwitchCallback switchCallback) {
+ this.switchCallback = switchCallback;
+ return this;
+ }
+
+ private void animated(boolean isChecked) {
+ if (animatorSet != null && animatorSet.build().isRunning()) {
+ animatorSet.cancel();
+ }
+
+ this.isChecked = isChecked;
+
+ int endBackgroundColor;
+ if (this.isChecked) {
+ endBackgroundColor = BaseHelper.hexColor(CHECKED_BACKGROUND_COLOR);
+ } else {
+ endBackgroundColor = BaseHelper.hexColor(UNCHECKED_BACKGROUND_COLOR);
+ }
+
+ int endTextColor;
+ if (this.isChecked) {
+ endTextColor = BaseHelper.hexColor(CHECKED_TEXT_COLOR);
+ } else {
+ endTextColor = BaseHelper.hexColor(UNCHECKED_TEXT_COLOR);
+ }
+
+ animatorSet = new AnimatedSet()
+ .setInterpolator(new FastOutSlowInInterpolator())
+ .setDuration(100L)
+ .playTogether(
+ new ValueAnimated()
+ .ofArgb(currentBackgroundColor, endBackgroundColor)
+ .addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ int animatedValue = (int) animation.getAnimatedValue();
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(animatedValue)
+ .setAllRadius(BaseHelper.dip2px(8))
+ );
+ currentBackgroundColor = animatedValue;
+ }
+ }),
+ new ValueAnimated()
+ .ofArgb(currentTextColor, endTextColor)
+ .addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ int animatedValue = (int) animation.getAnimatedValue();
+ text.setTextColor(animatedValue);
+ currentTextColor = animatedValue;
+ }
+ })
+ )
+ .start();
+ }
+
+ // 设置语言切换文件路径
+ public StatefulButton setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ if (languageSwitchFilePath == null) return;
+
+ boolean fileExists = new File(languageSwitchFilePath).exists();
+ if (fileExists) {
+ text.setText(chineseText);
+ text.setTextSize(chineseTextSize);
+ // 设置中文按钮内间距
+
+ } else {
+ text.setText(englishText);
+ text.setTextSize(englishTextSize);
+ // 设置英文按钮内间距(更小)
+
+
+ }
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/Switch.java b/app/src/main/java/com/bytecat/algui/ui/component/Switch.java
new file mode 100644
index 0000000..f2b5939
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/Switch.java
@@ -0,0 +1,146 @@
+package com.bytecat.algui.ui.component;
+
+import android.animation.ValueAnimator;
+import android.view.View;
+
+import com.bytecat.algui.animation.AnimatedSet;
+import com.bytecat.algui.animation.ValueAnimated;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Stack;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.interpolator.FastOutSlowInInterpolator;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.StackParams;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+
+public class Switch extends Stack {
+
+ public static final String UNCHECKED_COLOR = "#B34A4A50";
+//UNCHECKED_COLOR = "#B34A4A50"; // 70 % 不透冷灰
+ //CHECKED_COLOR = "#CC7F7FD5"; // 80 % 不透淡紫
+ //circleColor = "#E6E0E0E6"; // 90 % 不透雾白
+
+
+ public static final String CHECKED_COLOR = "#CC7F7FD5";
+
+ public boolean isChecked;
+
+ public int currentBackgroundColor;
+
+ public Widget circle;
+
+ public AnimatedSet animatorSet;
+
+ private SwitchCallback switchCallback;
+
+ public Switch() {
+ this(false);
+ }
+
+ public Switch(boolean isChecked) {
+ this.isChecked = isChecked;
+ setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+
+ currentBackgroundColor = hexColor(isChecked ? CHECKED_COLOR : UNCHECKED_COLOR);
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(currentBackgroundColor)
+ .setAllRadius(dip2px(30))
+ );
+
+ circle = new Widget()
+ .setTranslationX(isChecked ? dip2px(10) : -dip2px(10))
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#E6E0E0E6"))
+ .setAllRadius(dip2px(15))
+ )
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(dip2pxInt(12))
+ .setHeight(dip2pxInt(12))
+ .setMargins(dip2pxInt(15), dip2pxInt(5), dip2pxInt(15), dip2pxInt(5))
+ );
+ addView(circle);
+
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (switchCallback != null && !switchCallback.onChecked(!Switch.this.isChecked)) {
+ return;
+ }
+
+ animated(!Switch.this.isChecked);
+ }
+ });
+ }
+
+ public Switch setChecked(boolean isChecked) {
+ if (this.isChecked != isChecked) {
+ animated(isChecked);
+ }
+ return this;
+ }
+
+ public Switch setSwitchCallback(SwitchCallback switchCallback) {
+ this.switchCallback = switchCallback;
+ return this;
+ }
+
+ private void animated(boolean isChecked) {
+ if (animatorSet != null && animatorSet.build().isRunning()) {
+ animatorSet.cancel();
+ }
+
+ this.isChecked = isChecked;
+ float endX;
+ if (this.isChecked) {
+ endX = dip2px(10);
+ } else {
+ endX = -dip2px(10);
+ }
+
+ int endColor;
+ if (this.isChecked) {
+ endColor = hexColor(CHECKED_COLOR);
+ } else {
+ endColor = hexColor(UNCHECKED_COLOR);
+ }
+
+ animatorSet = new AnimatedSet()
+ .setInterpolator(new FastOutSlowInInterpolator())
+ .setDuration(200L)
+ .playTogether(
+ new ValueAnimated()
+ .ofFloat(circle.build().getTranslationX(), endX)
+ .addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ float animatedValue = (float) animation.getAnimatedValue();
+ circle.setTranslationX(animatedValue);
+ }
+ }),
+ new ValueAnimated()
+ .ofArgb(currentBackgroundColor, endColor)
+ .addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ int animatedValue = (int) animation.getAnimatedValue();
+ setBackground(
+ new GradientDrawableBuilder()
+ .setColor(animatedValue)
+ .setAllRadius(dip2px(30))
+ );
+ currentBackgroundColor = animatedValue;
+ }
+ })
+ )
+ .start();
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/SwitchContent.java b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContent.java
new file mode 100644
index 0000000..01e20ba
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContent.java
@@ -0,0 +1,165 @@
+package com.bytecat.algui.ui.component;
+
+import android.graphics.Typeface;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+
+import java.io.File;
+
+public class SwitchContent extends Relative {
+
+ public static final String DEFAULT_LANGUAGE_SWITCH_FILE_PATH =
+ "/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+ public static final int SWITCH_ID = View.generateViewId();
+
+ public final String title;
+ public final String description;
+
+ public Relative contentContainer;
+ public Column textContainer;
+ public Text titleText;
+ public Text descriptionText;
+ public Switch mSwitch;
+
+ // 中文文本
+ private String chineseTitle;
+ private String chineseDescription;
+
+ // 英文文本
+ private String englishTitle;
+ private String englishDescription;
+
+ // 文件路径
+ private String languageSwitchFilePath;
+
+ public SwitchContent(String title) {
+ this(title, null);
+ }
+
+ public SwitchContent(String title, String description) {
+ this(title, description, false);
+ }
+
+ public SwitchContent(String title, String description, boolean isChecked) {
+ this.title = title;
+ this.description = description;
+
+ contentContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+
+ textContainer = new Column()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setRightMargin(dip2pxInt(15))
+ .addRule(RelativeLayout.START_OF, SWITCH_ID)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(textContainer);
+
+ titleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ )
+ .setText(title)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#DAFFFFFF"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(titleText);
+
+ if (description != null) {
+ descriptionText = new Text()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(2))
+ )
+ .setText(description)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(descriptionText);
+ }
+
+ mSwitch = new Switch(isChecked);
+ mSwitch.setId(SWITCH_ID).setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(mSwitch);
+ updateTextBasedOnFile();
+ }
+
+ public boolean newState() {
+ return false;
+ }
+
+ public SwitchContent setChecked(boolean isChecked) {
+ mSwitch.setChecked(isChecked);
+ return this;
+ }
+
+ public SwitchContent setSwitchCallback(SwitchCallback switchCallback) {
+ mSwitch.setSwitchCallback(switchCallback);
+ return this;
+ }
+
+ // 设置中英文文本
+ public SwitchContent OText(String chineseTitle, String chineseDescription, String englishTitle, String englishDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ this.englishTitle = englishTitle;
+ this.englishDescription = englishDescription;
+ return this;
+ }
+
+ // 设置语言切换文件路径
+ public SwitchContent setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ // 1. 取自定义路径,没有则用默认路径
+ String path = languageSwitchFilePath != null
+ ? languageSwitchFilePath
+ : DEFAULT_LANGUAGE_SWITCH_FILE_PATH;
+
+ // 2. 如果中英文都未设置,直接 return,避免 NPE
+ if (chineseTitle == null && englishTitle == null) return;
+
+ boolean fileExists = new File(path).exists();
+
+ // 3. 选择对应语言
+ String titleTarget = fileExists ? chineseTitle : englishTitle;
+ String descTarget = fileExists ? chineseDescription : englishDescription;
+
+ if (titleTarget != null) titleText.setText(titleTarget);
+ if (descriptionText != null && descTarget != null) {
+ descriptionText.setText(descTarget);
+ }
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/SwitchContent.java.bak b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContent.java.bak
new file mode 100644
index 0000000..2e93c9b
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContent.java.bak
@@ -0,0 +1,165 @@
+package com.bytecat.algui.ui.component;
+
+import android.graphics.Typeface;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+
+import java.io.File;
+
+public class SwitchContent extends Relative {
+
+ public static final String DEFAULT_LANGUAGE_SWITCH_FILE_PATH =
+ "/sdcard/TC配置文件/switch.lang";
+ public static final int SWITCH_ID = View.generateViewId();
+
+ public final String title;
+ public final String description;
+
+ public Relative contentContainer;
+ public Column textContainer;
+ public Text titleText;
+ public Text descriptionText;
+ public Switch mSwitch;
+
+ // 中文文本
+ private String chineseTitle;
+ private String chineseDescription;
+
+ // 英文文本
+ private String englishTitle;
+ private String englishDescription;
+
+ // 文件路径
+ private String languageSwitchFilePath;
+
+ public SwitchContent(String title) {
+ this(title, null);
+ }
+
+ public SwitchContent(String title, String description) {
+ this(title, description, false);
+ }
+
+ public SwitchContent(String title, String description, boolean isChecked) {
+ this.title = title;
+ this.description = description;
+
+ contentContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+
+ textContainer = new Column()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setRightMargin(dip2pxInt(15))
+ .addRule(RelativeLayout.START_OF, SWITCH_ID)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(textContainer);
+
+ titleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ )
+ .setText(title)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#DAFFFFFF"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(titleText);
+
+ if (description != null) {
+ descriptionText = new Text()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(2))
+ )
+ .setText(description)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(descriptionText);
+ }
+
+ mSwitch = new Switch(isChecked);
+ mSwitch.setId(SWITCH_ID).setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.ALIGN_PARENT_RIGHT)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(mSwitch);
+ updateTextBasedOnFile();
+ }
+
+ public boolean newState() {
+ return false;
+ }
+
+ public SwitchContent setChecked(boolean isChecked) {
+ mSwitch.setChecked(isChecked);
+ return this;
+ }
+
+ public SwitchContent setSwitchCallback(SwitchCallback switchCallback) {
+ mSwitch.setSwitchCallback(switchCallback);
+ return this;
+ }
+
+ // 设置中英文文本
+ public SwitchContent OText(String chineseTitle, String chineseDescription, String englishTitle, String englishDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ this.englishTitle = englishTitle;
+ this.englishDescription = englishDescription;
+ return this;
+ }
+
+ // 设置语言切换文件路径
+ public SwitchContent setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ // 1. 取自定义路径,没有则用默认路径
+ String path = languageSwitchFilePath != null
+ ? languageSwitchFilePath
+ : DEFAULT_LANGUAGE_SWITCH_FILE_PATH;
+
+ // 2. 如果中英文都未设置,直接 return,避免 NPE
+ if (chineseTitle == null && englishTitle == null) return;
+
+ boolean fileExists = new File(path).exists();
+
+ // 3. 选择对应语言
+ String titleTarget = fileExists ? chineseTitle : englishTitle;
+ String descTarget = fileExists ? chineseDescription : englishDescription;
+
+ if (titleTarget != null) titleText.setText(titleTarget);
+ if (descriptionText != null && descTarget != null) {
+ descriptionText.setText(descTarget);
+ }
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/SwitchContentCard.java b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContentCard.java
new file mode 100644
index 0000000..2fe2d26
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContentCard.java
@@ -0,0 +1,174 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+
+import java.io.File;
+
+public class SwitchContentCard extends ContentCard {
+
+
+
+ public SwitchContent switchContent;
+
+ public Column expandableContentContainer;
+
+
+ // 统一默认语言切换文件路径
+ private static final String DEFAULT_LANGUAGE_SWITCH_FILE_PATH = "/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+
+
+ public Widget divider;
+
+ public ViewHelper> expandableContent;
+
+ public boolean isExpanded;
+
+ // 中文文本
+ private String chineseTitle;
+ private String chineseDescription;
+
+ // 英文文本
+ private String englishTitle;
+ private String englishDescription;
+
+ // 文件路径
+ private String languageSwitchFilePath;
+
+
+ public SwitchContentCard(String title, String description, boolean isChecked) {
+ switchContent = new SwitchContent(title, description, isChecked);
+ switchContent.setLayoutParams(
+ new LinearParams()
+ .setAllMargins(dip2pxInt(15))
+ );
+ addView(switchContent);
+
+ expandableContentContainer = new Column()
+ .setVisibility(View.GONE)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), dip2pxInt(15))
+ );
+ addView(expandableContentContainer);
+
+ divider = new Widget()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ )
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ expandableContentContainer.addView(divider);
+
+ // ↓↓↓ 自动使用统一路径刷新文本
+ updateTextBasedOnFile();
+ }
+
+ public SwitchContentCard(String title, String description) {
+ this(title, description, false);
+ }
+
+ public SwitchContentCard(String title) {
+ this(title, null, false);
+ }
+
+ public void setClickCallback(Object onClick) {
+ }
+
+ public SwitchContentCard setExpandableContent(ViewHelper> expandableContent) {
+ this.expandableContent = expandableContent;
+ if (expandableContent != null) {
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (build().getLayoutTransition().isRunning()) {
+ return;
+ }
+
+ isExpanded = !isExpanded;
+ if (isExpanded) {
+ expandableContentContainer.setVisibility(View.VISIBLE);
+ } else {
+ expandableContentContainer.setVisibility(View.GONE);
+ }
+ }
+ });
+ expandableContentContainer.addView(expandableContent);
+ }
+ return this;
+ }
+
+ public SwitchContentCard setSwitchCallback(SwitchCallback switchCallback) {
+ switchContent.setSwitchCallback(switchCallback);
+ return this;
+ }
+
+ public SwitchContentCard setChecked(boolean isChecked) {
+ switchContent.setChecked(isChecked);
+ return this;
+ }
+
+ // 设置中英文文本
+ public SwitchContentCard OText(String chineseTitle, String chineseDescription,
+ String englishTitle, String englishDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ this.englishTitle = englishTitle;
+ this.englishDescription = englishDescription;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 只设置中文文本
+ public SwitchContentCard OText(String chineseTitle, String chineseDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ return this;
+ }
+
+ // 设置语言切换文件路径
+ public SwitchContentCard setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ // 用实例路径,没有则用统一路径
+ String path = languageSwitchFilePath != null ? languageSwitchFilePath
+ : DEFAULT_LANGUAGE_SWITCH_FILE_PATH;
+ boolean fileExists = new java.io.File(path).exists();
+
+ String titleTarget = fileExists ? chineseTitle : englishTitle;
+ String descTarget = fileExists ? chineseDescription : englishDescription;
+
+ if (titleTarget != null) switchContent.titleText.setText(titleTarget);
+ if (switchContent.descriptionText != null && descTarget != null) {
+ switchContent.descriptionText.setText(descTarget);
+ }
+ }
+
+ // 保留原有的构造方式
+ public static SwitchContentCard create(String title, String description, boolean isChecked) {
+ return new SwitchContentCard(title, description, isChecked);
+ }
+
+ public static SwitchContentCard create(String title, String description) {
+ return new SwitchContentCard(title, description);
+ }
+
+ public static SwitchContentCard create(String title) {
+ return new SwitchContentCard(title);
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/SwitchContentCard.java.bak b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContentCard.java.bak
new file mode 100644
index 0000000..e238553
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/SwitchContentCard.java.bak
@@ -0,0 +1,174 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+
+import java.io.File;
+
+public class SwitchContentCard extends ContentCard {
+
+
+
+ public SwitchContent switchContent;
+
+ public Column expandableContentContainer;
+
+
+ // 统一默认语言切换文件路径
+ private static final String DEFAULT_LANGUAGE_SWITCH_FILE_PATH = "/sdcard/TC配置文件/switch.lang";
+
+
+ public Widget divider;
+
+ public ViewHelper> expandableContent;
+
+ public boolean isExpanded;
+
+ // 中文文本
+ private String chineseTitle;
+ private String chineseDescription;
+
+ // 英文文本
+ private String englishTitle;
+ private String englishDescription;
+
+ // 文件路径
+ private String languageSwitchFilePath;
+
+
+ public SwitchContentCard(String title, String description, boolean isChecked) {
+ switchContent = new SwitchContent(title, description, isChecked);
+ switchContent.setLayoutParams(
+ new LinearParams()
+ .setAllMargins(dip2pxInt(15))
+ );
+ addView(switchContent);
+
+ expandableContentContainer = new Column()
+ .setVisibility(View.GONE)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), dip2pxInt(15))
+ );
+ addView(expandableContentContainer);
+
+ divider = new Widget()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ )
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ expandableContentContainer.addView(divider);
+
+ // ↓↓↓ 自动使用统一路径刷新文本
+ updateTextBasedOnFile();
+ }
+
+ public SwitchContentCard(String title, String description) {
+ this(title, description, false);
+ }
+
+ public SwitchContentCard(String title) {
+ this(title, null, false);
+ }
+
+ public void setClickCallback(Object onClick) {
+ }
+
+ public SwitchContentCard setExpandableContent(ViewHelper> expandableContent) {
+ this.expandableContent = expandableContent;
+ if (expandableContent != null) {
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (build().getLayoutTransition().isRunning()) {
+ return;
+ }
+
+ isExpanded = !isExpanded;
+ if (isExpanded) {
+ expandableContentContainer.setVisibility(View.VISIBLE);
+ } else {
+ expandableContentContainer.setVisibility(View.GONE);
+ }
+ }
+ });
+ expandableContentContainer.addView(expandableContent);
+ }
+ return this;
+ }
+
+ public SwitchContentCard setSwitchCallback(SwitchCallback switchCallback) {
+ switchContent.setSwitchCallback(switchCallback);
+ return this;
+ }
+
+ public SwitchContentCard setChecked(boolean isChecked) {
+ switchContent.setChecked(isChecked);
+ return this;
+ }
+
+ // 设置中英文文本
+ public SwitchContentCard OText(String chineseTitle, String chineseDescription,
+ String englishTitle, String englishDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ this.englishTitle = englishTitle;
+ this.englishDescription = englishDescription;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 只设置中文文本
+ public SwitchContentCard OText(String chineseTitle, String chineseDescription) {
+ this.chineseTitle = chineseTitle;
+ this.chineseDescription = chineseDescription;
+ return this;
+ }
+
+ // 设置语言切换文件路径
+ public SwitchContentCard setLanguageSwitchFilePath(String filePath) {
+ this.languageSwitchFilePath = filePath;
+ updateTextBasedOnFile();
+ return this;
+ }
+
+ // 根据文件存在与否更新文本
+ private void updateTextBasedOnFile() {
+ // 用实例路径,没有则用统一路径
+ String path = languageSwitchFilePath != null ? languageSwitchFilePath
+ : DEFAULT_LANGUAGE_SWITCH_FILE_PATH;
+ boolean fileExists = new java.io.File(path).exists();
+
+ String titleTarget = fileExists ? chineseTitle : englishTitle;
+ String descTarget = fileExists ? chineseDescription : englishDescription;
+
+ if (titleTarget != null) switchContent.titleText.setText(titleTarget);
+ if (switchContent.descriptionText != null && descTarget != null) {
+ switchContent.descriptionText.setText(descTarget);
+ }
+ }
+
+ // 保留原有的构造方式
+ public static SwitchContentCard create(String title, String description, boolean isChecked) {
+ return new SwitchContentCard(title, description, isChecked);
+ }
+
+ public static SwitchContentCard create(String title, String description) {
+ return new SwitchContentCard(title, description);
+ }
+
+ public static SwitchContentCard create(String title) {
+ return new SwitchContentCard(title);
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/TextContent.java b/app/src/main/java/com/bytecat/algui/ui/component/TextContent.java
new file mode 100644
index 0000000..48dd0d5
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/TextContent.java
@@ -0,0 +1,84 @@
+package com.bytecat.algui.ui.component;
+
+import android.graphics.Typeface;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+
+public class TextContent extends Relative {
+
+ public final String title;
+
+ public final String description;
+
+ public Relative contentContainer;
+
+ public Column textContainer;
+
+ public Text titleText;
+
+ public Text descriptionText;
+
+ public TextContent(String title) {
+ this(title, null);
+ }
+
+ public TextContent(String title, String description) {
+ this.title = title;
+ this.description = description;
+
+ contentContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ );
+ addView(contentContainer);
+
+ textContainer = new Column()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setRightMargin(dip2pxInt(15))
+ .addRule(RelativeLayout.ALIGN_PARENT_LEFT)
+ .addRule(RelativeLayout.CENTER_IN_PARENT)
+ );
+ contentContainer.addView(textContainer);
+
+ titleText = new Text()
+ .setSingleLine(true)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ )
+ .setText(title)
+ .setTextSize(12f)
+ .setTextColor(hexColor("#FF999999"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(titleText);
+
+ if (description != null) {
+ descriptionText = new Text()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(2))
+ )
+ .setText(description)
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFC5C5C5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ textContainer.addView(descriptionText);
+ }
+
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/component/TextContentCard.java b/app/src/main/java/com/bytecat/algui/ui/component/TextContentCard.java
new file mode 100644
index 0000000..020225c
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/component/TextContentCard.java
@@ -0,0 +1,78 @@
+package com.bytecat.algui.ui.component;
+
+import android.view.View;
+
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.layoutparams.LinearParams;
+
+public class TextContentCard extends ContentCard {
+
+ public TextContent textContent;
+
+ public Column expandableContentContainer;
+
+ public Widget divider;
+
+ public ViewHelper> expandableContent;
+
+ public boolean isExpanded;
+
+ public TextContentCard(String title, String description) {
+ textContent = new TextContent(title, description);
+ textContent.setLayoutParams(
+ new LinearParams()
+ .setAllMargins(dip2pxInt(15))
+ );
+ addView(textContent);
+
+ expandableContentContainer = new Column()
+ .setVisibility(View.GONE)
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), dip2pxInt(15))
+ );
+ addView(expandableContentContainer);
+
+ divider = new Widget()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(1))
+ )
+ .setBackgroundColor(hexColor("#40D0D0D0"));
+ expandableContentContainer.addView(divider);
+ }
+
+ public TextContentCard(String title) {
+ this(title, null);
+ }
+
+ public TextContentCard setExpandableContent(ViewHelper> expandableContent) {
+ this.expandableContent = expandableContent;
+ if (expandableContent != null) {
+ setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (build().getLayoutTransition().isRunning()) {
+ return;
+ }
+
+ isExpanded = !isExpanded;
+ if (isExpanded) {
+ expandableContentContainer.setVisibility(View.VISIBLE);
+ } else {
+ expandableContentContainer.setVisibility(View.GONE);
+ }
+ }
+ });
+ expandableContentContainer.addView(expandableContent);
+ }
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/gui/ClickGUI.java b/app/src/main/java/com/bytecat/algui/ui/gui/ClickGUI.java
new file mode 100644
index 0000000..c3be935
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/gui/ClickGUI.java
@@ -0,0 +1,403 @@
+package com.bytecat.algui.ui.gui;
+
+import android.graphics.Typeface;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.animation.ValueAnimated;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.ColumnScroll;
+import com.bytecat.algui.component.Popup;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Stack;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.interpolator.FastOutSlowInInterpolator;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+import com.bytecat.algui.layoutparams.StackParams;
+import com.bytecat.algui.ui.button.FloatButton;
+import com.bytecat.algui.ui.category.aboutCategoryBox;
+import com.bytecat.algui.ui.category.MiscCategoryBox;
+import com.bytecat.algui.ui.category.PlayerCategoryBox;
+import com.bytecat.algui.ui.category.AttackCategoryBox;
+import com.bytecat.algui.ui.category.SettingCategoryBox;
+
+
+import com.bytecat.algui.ui.category.WorldCategoryBox;
+import com.bytecat.algui.ui.component.CategoryCard;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+
+import java.util.ArrayList;
+import java.util.List;
+import android.content.Context;
+import android.graphics.Bitmap;
+import com.bytecat.algui.view.BlurHelper;
+import android.app.Activity;
+import android.graphics.drawable.BitmapDrawable;
+import android.view.Window;
+import java.lang.ref.WeakReference;
+import com.bytecat.algui.AlguiWindows.AlguiWin2FA;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import java.util.HashMap;
+import com.bytecat.algui.AlguiTools.AlguiToolNative;
+import com.topjohnwu.superuser.ipc.RootService;
+import android.content.Intent;
+import com.bytecat.algui.AlguiHacker.AlguiRootClient;
+import android.os.AsyncTask;
+import com.bytecat.algui.AlguiTools.AlguiToolNetwork;
+import com.bytecat.algui.AlguiManager.AlguiDocument;
+import com.bytecat.algui.AlguiTools.AlguiToolAudio;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.AlguiHacker.AlguiRootService;
+import com.bytecat.algui.MainActivity;
+import android.graphics.drawable.GradientDrawable;
+import com.bytecat.algui.ui.category.TPCategoryBox;
+import com.bytecat.algui.ui.category.SettingCategoryBox;
+import java.util.Map;
+import java.util.LinkedHashMap;
+import com.bytecat.algui.ui.category.ESPCategoryBox;
+import com.bytecat.algui.ui.category.SpecialCategoryBox;
+import com.bytecat.algui.ui.category.*;
+
+public class ClickGUI extends Popup {
+
+ private Context context;
+
+ public static final int MIX_TITLE_TEXT_ID = View.generateViewId();
+
+ public FloatButton floatButton;
+
+ public List categoryCardList;
+
+ public Column maskContainer;
+
+ public Row panelContainer;
+
+ public Column categoryUIContainer;
+
+ public Relative mixContainer;
+
+ public Text mixTitleText;
+
+ public Text mixSubTitleText;
+
+ public ColumnScroll categoryColumnScroll;
+
+ public Stack categoryContainer;
+
+ public Widget categoryCardBackground;
+
+ public Column categoryCardContainer;
+
+ public Widget divider;
+
+ public Column contentContainer;
+
+ public ValueAnimated categoryCardBackgroundAnimator;
+
+ private static WeakReference contextRef = new WeakReference<>(null);
+
+ public static void init(Context context) {
+ contextRef = new WeakReference<>(context.getApplicationContext());
+ }
+
+ private static final String LANGUAGE_SWITCH_FILE_PATH = "/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+ // .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ /* ---------- 2. 中英文映射 ---------- */
+ private final Map cardTexts = new LinkedHashMap<>();
+
+ /* ---------- 3. 双语工具 ---------- */
+ private boolean isChinese() {
+ return new java.io.File(LANGUAGE_SWITCH_FILE_PATH).exists();
+ }
+
+ private void updateAllCardsText() {
+ for (Map.Entry e : cardTexts.entrySet()) {
+ String target = isChinese() ? e.getValue()[0] : e.getValue()[1];
+ e.getKey().setText(target);
+ }
+ }
+
+ public ClickGUI(FloatButton floatButton) {
+ this.floatButton = floatButton;
+ this.categoryCardList = new ArrayList<>();
+ addCategoryCards();
+ updateAllCardsText(); // ← 新增:首次刷新
+
+ setWidth(MatchParent);
+ setHeight(MatchParent);
+ setAnimation(Animation.InputMethod);
+ setFocusable(false);
+ setContentView(createContentView());
+
+ }
+
+ /* ---------- 固定路径常量 ---------- */
+
+
+ /* ---------- 统一改色 ---------- */
+
+
+ /* ---------- addCategoryCards 完成体 ---------- */
+
+
+ private void addCategoryCards() {
+ final String[][] titles = {
+ {"战斗", "Combat"},
+ {"玩家", "Player"},
+ {"世界", "World"},
+ {"灵体", "Sprint"},
+ {"绘制", "ESP"},
+ {"传送", "Teleport"},
+ {"杂项", "Misc"},
+ {"文件", "Document"},
+ {"设置", "Settings"},
+ {"关于", "About"}
+ };
+ final ViewHelper>[] contents = {
+ new AttackCategoryBox(),
+ new PlayerCategoryBox(),
+ new WorldCategoryBox(),
+ new SOULCategoryBox(),
+ new ESPCategoryBox(),
+ new TPCategoryBox(),
+ new MiscCategoryBox(),
+ new SpecialCategoryBox(),
+ new SettingCategoryBox(),
+ new aboutCategoryBox()
+ };
+
+ for (int i = 0; i < titles.length; i++) {
+ CategoryCard card = CategoryCard(isChinese() ? titles[i][0] : titles[i][1], contents[i]);
+ cardTexts.put(card, titles[i]); // 保存双语
+
+ categoryCardList.add(card);
+ }
+ }
+
+ /* ---------- 6. 单语构造(保持兼容) ---------- */
+ private CategoryCard CategoryCard(String text, ViewHelper> content) {
+ return new CategoryCard()
+ .setText(text)
+
+
+ .setContent(content);
+
+
+ }
+
+ private Column createContentView() {
+ maskContainer = new Column()
+ .setBackgroundColor(hexColor("#22000000"))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent))
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // 点击背景区域关闭界面 (根据设置决定是否执行)
+ if (SettingCategoryBox.enableClickBackgroundClose) {
+ floatButton.closeClickGUI();
+ }
+ }
+ });
+
+ panelContainer = new Row()
+ .setElevation(dip2px(12))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setMargins(dip2pxInt(150), dip2pxInt(50), dip2pxInt(150), dip2pxInt(50)))
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setOrientation(GradientDrawable.Orientation.LEFT_RIGHT) // 设置渐变方向
+ .setColor(hexColor("#9C000000"))
+ .setAllRadius(dip2px(8)))
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // 点击面板内部不做处理
+ }
+ });
+ maskContainer.addView(panelContainer);
+
+ panelContainer.addView(createCategoryUI());
+ panelContainer.addView(createDividerUI());
+ panelContainer.addView(createContentUI());
+
+ if (!categoryCardList.isEmpty()) {
+ switchContent(categoryCardList.get(0));
+ }
+
+ return maskContainer;
+ }
+
+ private Column createCategoryUI() {
+ categoryUIContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(dip2pxInt(180))
+ .setHeight(BaseHelper.MatchParent));
+
+ mixContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10))
+ .setBottomMargin(dip2pxInt(10)))
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ floatButton.closeClickGUI();
+ }
+ });
+ categoryUIContainer.addView(mixContainer);
+
+ mixTitleText = new Text()
+ .setId(MIX_TITLE_TEXT_ID)
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.CENTER_IN_PARENT))
+ .setPadding(dip2pxInt(5), 0, dip2pxInt(1), 0)
+ .setText("TrosCore")
+ .setTextSize(20f)
+ .setTextColor(hexColor("#FF9198E5"))
+ .setShadowLayer(10, 0, 0, hexColor("#FF9198E5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ mixContainer.addView(mixTitleText);
+
+ mixSubTitleText = new Text()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.END_OF, MIX_TITLE_TEXT_ID))
+ .setPadding(dip2pxInt(1), 0, dip2pxInt(5), 0)
+ .setText("PRO")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFD0D0E5"))
+ .setTypeface(Typeface.MONOSPACE)
+ .setShadowLayer(10, 0, 0, hexColor("#FFD0D0E5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ mixContainer.addView(mixSubTitleText);
+
+ categoryColumnScroll = new ColumnScroll()
+ .setScrollBarEnabled(false)
+ .setFadingEdgeEnabled(true)
+ .setFadingEdgeLength(dip2pxInt(15))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(10)));
+ categoryUIContainer.addView(categoryColumnScroll);
+
+ categoryContainer = new Stack()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+ categoryColumnScroll.addView(categoryContainer);
+
+ categoryCardBackground = new Widget()
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(34))
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), 0))
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#25D0D0D0"))
+ .setAllRadius(dip2px(8)));
+ categoryContainer.addView(categoryCardBackground);
+
+ categoryCardContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+ categoryContainer.addView(categoryCardContainer);
+
+ for (int index = 0; index < categoryCardList.size(); index++) {
+ addCategoryCard(categoryCardList.get(index), index);
+ }
+
+ return categoryUIContainer;
+ }
+
+ private void addCategoryCard(final CategoryCard categoryCard, final int index) {
+ if (categoryCardBackgroundAnimator == null) {
+ categoryCardBackgroundAnimator = new ValueAnimated()
+ .setDuration(200L)
+ .setInterpolator(new FastOutSlowInInterpolator())
+ .addUpdateListener(new android.animation.ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(android.animation.ValueAnimator animation) {
+ float animatedValue = (float) animation.getAnimatedValue();
+ categoryCardBackground.setY(animatedValue);
+ }
+ });
+ }
+
+ categoryCard.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (contentContainer.build().indexOfChild(categoryCard.content.build()) >= 0) {
+ return;
+ }
+
+ if (categoryCardBackgroundAnimator.build().isRunning()) {
+ categoryCardBackgroundAnimator.cancel();
+ }
+
+ categoryCardBackgroundAnimator.ofFloat(
+ categoryCardBackground.build().getY(),
+ dip2pxInt(34) * index).start();
+
+ switchContent(categoryCard);
+ }
+ });
+ categoryCardContainer.addView(categoryCard);
+ }
+
+ private Widget createDividerUI() {
+ divider = new Widget()
+ .setBackgroundColor(hexColor("#40D0D0D0"))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(dip2pxInt(1))
+ .setHeight(BaseHelper.MatchParent)
+ .setTopMargin(dip2pxInt(10))
+ .setBottomMargin(dip2pxInt(10)));
+ return divider;
+ }
+
+ private Column createContentUI() {
+ contentContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setLeftMargin(dip2pxInt(15))
+ .setRightMargin(dip2pxInt(15)))
+ .layoutTransition();
+
+ return contentContainer;
+ }
+
+ private void switchContent(final CategoryCard categoryCard) {
+ contentContainer.removeAllViews();
+ contentContainer.addView(categoryCard.content);
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/ui/gui/ClickGUI.java.bak b/app/src/main/java/com/bytecat/algui/ui/gui/ClickGUI.java.bak
new file mode 100644
index 0000000..4110bd6
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/ui/gui/ClickGUI.java.bak
@@ -0,0 +1,401 @@
+package com.bytecat.algui.ui.gui;
+
+import android.graphics.Typeface;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.bytecat.algui.animation.ValueAnimated;
+import com.bytecat.algui.base.BaseHelper;
+import com.bytecat.algui.base.ViewHelper;
+import com.bytecat.algui.component.Column;
+import com.bytecat.algui.component.ColumnScroll;
+import com.bytecat.algui.component.Popup;
+import com.bytecat.algui.component.Relative;
+import com.bytecat.algui.component.Row;
+import com.bytecat.algui.component.Stack;
+import com.bytecat.algui.component.Text;
+import com.bytecat.algui.component.Widget;
+import com.bytecat.algui.interpolator.FastOutSlowInInterpolator;
+import com.bytecat.algui.layoutparams.LinearParams;
+import com.bytecat.algui.layoutparams.RelativeParams;
+import com.bytecat.algui.layoutparams.StackParams;
+import com.bytecat.algui.ui.button.FloatButton;
+import com.bytecat.algui.ui.category.aboutCategoryBox;
+import com.bytecat.algui.ui.category.MiscCategoryBox;
+import com.bytecat.algui.ui.category.PlayerCategoryBox;
+import com.bytecat.algui.ui.category.AttackCategoryBox;
+import com.bytecat.algui.ui.category.SettingCategoryBox;
+
+
+import com.bytecat.algui.ui.category.WorldCategoryBox;
+import com.bytecat.algui.ui.component.CategoryCard;
+import com.bytecat.algui.util.GradientDrawableBuilder;
+
+import java.util.ArrayList;
+import java.util.List;
+import android.content.Context;
+import android.graphics.Bitmap;
+import com.bytecat.algui.view.BlurHelper;
+import android.app.Activity;
+import android.graphics.drawable.BitmapDrawable;
+import android.view.Window;
+import java.lang.ref.WeakReference;
+import com.bytecat.algui.AlguiWindows.AlguiWin2FA;
+import com.bytecat.algui.AlguiManager.AlguiCallback;
+import java.util.HashMap;
+import com.bytecat.algui.AlguiTools.AlguiToolNative;
+import com.topjohnwu.superuser.ipc.RootService;
+import android.content.Intent;
+import com.bytecat.algui.AlguiHacker.AlguiRootClient;
+import android.os.AsyncTask;
+import com.bytecat.algui.AlguiTools.AlguiToolNetwork;
+import com.bytecat.algui.AlguiManager.AlguiDocument;
+import com.bytecat.algui.AlguiTools.AlguiToolAudio;
+import com.bytecat.algui.AlguiManager.AlguiAssets;
+import com.bytecat.algui.AlguiHacker.AlguiRootService;
+import com.bytecat.algui.MainActivity;
+import android.graphics.drawable.GradientDrawable;
+import com.bytecat.algui.ui.category.TPCategoryBox;
+import com.bytecat.algui.ui.category.SettingCategoryBox;
+import java.util.Map;
+import java.util.LinkedHashMap;
+import com.bytecat.algui.ui.category.ESPCategoryBox;
+import com.bytecat.algui.ui.category.SpecialCategoryBox;
+
+public class ClickGUI extends Popup {
+
+ private Context context;
+
+ public static final int MIX_TITLE_TEXT_ID = View.generateViewId();
+
+ public FloatButton floatButton;
+
+ public List categoryCardList;
+
+ public Column maskContainer;
+
+ public Row panelContainer;
+
+ public Column categoryUIContainer;
+
+ public Relative mixContainer;
+
+ public Text mixTitleText;
+
+ public Text mixSubTitleText;
+
+ public ColumnScroll categoryColumnScroll;
+
+ public Stack categoryContainer;
+
+ public Widget categoryCardBackground;
+
+ public Column categoryCardContainer;
+
+ public Widget divider;
+
+ public Column contentContainer;
+
+ public ValueAnimated categoryCardBackgroundAnimator;
+
+ private static WeakReference contextRef = new WeakReference<>(null);
+
+ public static void init(Context context) {
+ contextRef = new WeakReference<>(context.getApplicationContext());
+ }
+
+ private static final String LANGUAGE_SWITCH_FILE_PATH = "/sdcard/Android/data/com.vortex.celestial/files/switch.lang";
+ // .setLanguageSwitchFilePath("/sdcard/Android/data/com.vortex.celestial/files/switch.lang");
+
+ /* ---------- 2. 中英文映射 ---------- */
+ private final Map cardTexts = new LinkedHashMap<>();
+
+ /* ---------- 3. 双语工具 ---------- */
+ private boolean isChinese() {
+ return new java.io.File(LANGUAGE_SWITCH_FILE_PATH).exists();
+ }
+
+ private void updateAllCardsText() {
+ for (Map.Entry e : cardTexts.entrySet()) {
+ String target = isChinese() ? e.getValue()[0] : e.getValue()[1];
+ e.getKey().setText(target);
+ }
+ }
+
+ public ClickGUI(FloatButton floatButton) {
+ this.floatButton = floatButton;
+ this.categoryCardList = new ArrayList<>();
+ addCategoryCards();
+ updateAllCardsText(); // ← 新增:首次刷新
+
+ setWidth(MatchParent);
+ setHeight(MatchParent);
+ setAnimation(Animation.InputMethod);
+ setFocusable(false);
+ setContentView(createContentView());
+
+ }
+
+ /* ---------- 固定路径常量 ---------- */
+
+
+ /* ---------- 统一改色 ---------- */
+
+
+ /* ---------- addCategoryCards 完成体 ---------- */
+
+
+ private void addCategoryCards() {
+ final String[][] titles = {
+ {"战斗", "Combat"},
+ {"玩家", "Player"},
+ {"世界", "World"},
+ {"灵体", "Sprint"},
+ {"绘制", "ESP"},
+ {"传送", "Teleport"},
+ {"杂项", "Misc"},
+ {"文件", "Document"},
+ {"设置", "Settings"},
+ {"关于", "About"}
+ };
+ final ViewHelper>[] contents = {
+ new AttackCategoryBox(),
+ new PlayerCategoryBox(),
+ new WorldCategoryBox(),
+ new ESPCategoryBox(),
+ new TPCategoryBox(),
+ new MiscCategoryBox(),
+ new SpecialCategoryBox(),
+ new SettingCategoryBox(),
+ new aboutCategoryBox()
+ };
+
+ for (int i = 0; i < titles.length; i++) {
+ CategoryCard card = CategoryCard(isChinese() ? titles[i][0] : titles[i][1], contents[i]);
+ cardTexts.put(card, titles[i]); // 保存双语
+
+ categoryCardList.add(card);
+ }
+ }
+
+ /* ---------- 6. 单语构造(保持兼容) ---------- */
+ private CategoryCard CategoryCard(String text, ViewHelper> content) {
+ return new CategoryCard()
+ .setText(text)
+
+
+ .setContent(content);
+
+
+ }
+
+ private Column createContentView() {
+ maskContainer = new Column()
+ .setBackgroundColor(hexColor("#22000000"))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent))
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // 点击背景区域关闭界面 (根据设置决定是否执行)
+ if (SettingCategoryBox.enableClickBackgroundClose) {
+ floatButton.closeClickGUI();
+ }
+ }
+ });
+
+ panelContainer = new Row()
+ .setElevation(dip2px(12))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setMargins(dip2pxInt(150), dip2pxInt(50), dip2pxInt(150), dip2pxInt(50)))
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setOrientation(GradientDrawable.Orientation.LEFT_RIGHT) // 设置渐变方向
+ .setColor(hexColor("#9C000000"))
+ .setAllRadius(dip2px(8)))
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // 点击面板内部不做处理
+ }
+ });
+ maskContainer.addView(panelContainer);
+
+ panelContainer.addView(createCategoryUI());
+ panelContainer.addView(createDividerUI());
+ panelContainer.addView(createContentUI());
+
+ if (!categoryCardList.isEmpty()) {
+ switchContent(categoryCardList.get(0));
+ }
+
+ return maskContainer;
+ }
+
+ private Column createCategoryUI() {
+ categoryUIContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(dip2pxInt(180))
+ .setHeight(BaseHelper.MatchParent));
+
+ mixContainer = new Relative()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent)
+ .setTopMargin(dip2pxInt(10))
+ .setBottomMargin(dip2pxInt(10)))
+ .setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ floatButton.closeClickGUI();
+ }
+ });
+ categoryUIContainer.addView(mixContainer);
+
+ mixTitleText = new Text()
+ .setId(MIX_TITLE_TEXT_ID)
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.CENTER_IN_PARENT))
+ .setPadding(dip2pxInt(5), 0, dip2pxInt(1), 0)
+ .setText("TrosCore")
+ .setTextSize(20f)
+ .setTextColor(hexColor("#FF9198E5"))
+ .setShadowLayer(10, 0, 0, hexColor("#FF9198E5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ mixContainer.addView(mixTitleText);
+
+ mixSubTitleText = new Text()
+ .setLayoutParams(
+ new RelativeParams()
+ .setWidth(BaseHelper.WrapContent)
+ .setHeight(BaseHelper.WrapContent)
+ .addRule(RelativeLayout.END_OF, MIX_TITLE_TEXT_ID))
+ .setPadding(dip2pxInt(1), 0, dip2pxInt(5), 0)
+ .setText("PRO")
+ .setTextSize(10f)
+ .setTextColor(hexColor("#FFD0D0E5"))
+ .setTypeface(Typeface.MONOSPACE)
+ .setShadowLayer(10, 0, 0, hexColor("#FFD0D0E5"))
+ .setTypeface(Typeface.DEFAULT_BOLD);
+ mixContainer.addView(mixSubTitleText);
+
+ categoryColumnScroll = new ColumnScroll()
+ .setScrollBarEnabled(false)
+ .setFadingEdgeEnabled(true)
+ .setFadingEdgeLength(dip2pxInt(15))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setBottomMargin(dip2pxInt(10)));
+ categoryUIContainer.addView(categoryColumnScroll);
+
+ categoryContainer = new Stack()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+ categoryColumnScroll.addView(categoryContainer);
+
+ categoryCardBackground = new Widget()
+ .setLayoutParams(
+ new StackParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(dip2pxInt(34))
+ .setMargins(dip2pxInt(15), 0, dip2pxInt(15), 0))
+ .setBackground(
+ new GradientDrawableBuilder()
+ .setColor(hexColor("#25D0D0D0"))
+ .setAllRadius(dip2px(8)));
+ categoryContainer.addView(categoryCardBackground);
+
+ categoryCardContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.WrapContent));
+ categoryContainer.addView(categoryCardContainer);
+
+ for (int index = 0; index < categoryCardList.size(); index++) {
+ addCategoryCard(categoryCardList.get(index), index);
+ }
+
+ return categoryUIContainer;
+ }
+
+ private void addCategoryCard(final CategoryCard categoryCard, final int index) {
+ if (categoryCardBackgroundAnimator == null) {
+ categoryCardBackgroundAnimator = new ValueAnimated()
+ .setDuration(200L)
+ .setInterpolator(new FastOutSlowInInterpolator())
+ .addUpdateListener(new android.animation.ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(android.animation.ValueAnimator animation) {
+ float animatedValue = (float) animation.getAnimatedValue();
+ categoryCardBackground.setY(animatedValue);
+ }
+ });
+ }
+
+ categoryCard.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (contentContainer.build().indexOfChild(categoryCard.content.build()) >= 0) {
+ return;
+ }
+
+ if (categoryCardBackgroundAnimator.build().isRunning()) {
+ categoryCardBackgroundAnimator.cancel();
+ }
+
+ categoryCardBackgroundAnimator.ofFloat(
+ categoryCardBackground.build().getY(),
+ dip2pxInt(34) * index).start();
+
+ switchContent(categoryCard);
+ }
+ });
+ categoryCardContainer.addView(categoryCard);
+ }
+
+ private Widget createDividerUI() {
+ divider = new Widget()
+ .setBackgroundColor(hexColor("#40D0D0D0"))
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(dip2pxInt(1))
+ .setHeight(BaseHelper.MatchParent)
+ .setTopMargin(dip2pxInt(10))
+ .setBottomMargin(dip2pxInt(10)));
+ return divider;
+ }
+
+ private Column createContentUI() {
+ contentContainer = new Column()
+ .setLayoutParams(
+ new LinearParams()
+ .setWidth(BaseHelper.MatchParent)
+ .setHeight(BaseHelper.MatchParent)
+ .setLeftMargin(dip2pxInt(15))
+ .setRightMargin(dip2pxInt(15)))
+ .layoutTransition();
+
+ return contentContainer;
+ }
+
+ private void switchContent(final CategoryCard categoryCard) {
+ contentContainer.removeAllViews();
+ contentContainer.addView(categoryCard.content);
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/util/GradientDrawableBuilder.java b/app/src/main/java/com/bytecat/algui/util/GradientDrawableBuilder.java
new file mode 100644
index 0000000..a4e2806
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/util/GradientDrawableBuilder.java
@@ -0,0 +1,67 @@
+package com.bytecat.algui.util;
+
+import android.graphics.drawable.GradientDrawable;
+
+import com.bytecat.algui.base.BaseHelper;
+
+public class GradientDrawableBuilder extends BaseHelper {
+
+ private final GradientDrawable gradientDrawable;
+
+ public GradientDrawableBuilder() {
+ gradientDrawable = new GradientDrawable();
+ }
+
+ public GradientDrawableBuilder setOrientation(GradientDrawable.Orientation orientation) {
+ gradientDrawable.setOrientation(orientation);
+ return this;
+ }
+
+ public GradientDrawableBuilder setGradientType(int type) {
+ gradientDrawable.setGradientType(type);
+ return this;
+ }
+
+ public GradientDrawableBuilder setShape(int shape) {
+ gradientDrawable.setShape(shape);
+ return this;
+ }
+
+ public GradientDrawableBuilder setColor(int color) {
+ gradientDrawable.setColor(color);
+ return this;
+ }
+
+ public GradientDrawableBuilder setStroke(int width, int color) {
+ gradientDrawable.setStroke(width, color);
+ return this;
+ }
+
+ public GradientDrawableBuilder setColors(int... colors) {
+ gradientDrawable.setColors(colors);
+ return this;
+ }
+
+ public GradientDrawableBuilder setRadius(float... radius) {
+ if (radius.length != 4 && radius.length != 8) {
+ throw new IllegalArgumentException("radius array length must equals 4 or 8");
+ }
+
+ if (radius.length == 4) {
+ gradientDrawable.setCornerRadii(new float[]{radius[0], radius[0], radius[1], radius[1], radius[2], radius[2], radius[3], radius[3]});
+ } else {
+ gradientDrawable.setCornerRadii(radius);
+ }
+ return this;
+ }
+
+ public GradientDrawableBuilder setAllRadius(float radius) {
+ setRadius(radius, radius, radius, radius);
+ return this;
+ }
+
+ public GradientDrawable build() {
+ return gradientDrawable;
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/util/SyncUtil.java b/app/src/main/java/com/bytecat/algui/util/SyncUtil.java
new file mode 100644
index 0000000..52aef62
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/util/SyncUtil.java
@@ -0,0 +1,46 @@
+package com.bytecat.algui.util;
+
+import com.bytecat.algui.callback.SwitchCallback;
+import com.bytecat.algui.ui.button.SwitchShortcutButton;
+import com.bytecat.algui.ui.component.Switch;
+import com.bytecat.algui.ui.component.SwitchContent;
+import com.bytecat.algui.ui.component.SwitchContentCard;
+
+public final class SyncUtil {
+
+ private SyncUtil() {
+ }
+
+ public static void sync(SwitchContentCard switchContentCard, SwitchShortcutButton shortcutButton, SwitchCallback switchCallback) {
+ sync(switchContentCard.switchContent, shortcutButton, switchCallback);
+ }
+
+ public static void sync(SwitchContent switchContent, SwitchShortcutButton shortcutButton, SwitchCallback switchCallback) {
+ sync(switchContent.mSwitch, shortcutButton, switchCallback);
+ }
+
+ public static void sync(final Switch pSwitch, final SwitchShortcutButton shortcutButton, final SwitchCallback callback) {
+ pSwitch.setSwitchCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (callback.onChecked(newState)) {
+ shortcutButton.setChecked(newState);
+ return true;
+ }
+ return false;
+ }
+ });
+
+ shortcutButton.setSwicthCallback(new SwitchCallback() {
+ @Override
+ public boolean onChecked(boolean newState) {
+ if (callback.onChecked(newState)) {
+ pSwitch.setChecked(newState);
+ return true;
+ }
+ return false;
+ }
+ });
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/AndroidStockBlurImpl.java b/app/src/main/java/com/bytecat/algui/view/AndroidStockBlurImpl.java
new file mode 100644
index 0000000..dce52ba
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/AndroidStockBlurImpl.java
@@ -0,0 +1,66 @@
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.RenderScript;
+import android.renderscript.ScriptIntrinsicBlur;
+
+/**
+ * @noinspection ALL
+ */
+public class AndroidStockBlurImpl implements BlurImpl {
+ private RenderScript mRenderScript;
+ private ScriptIntrinsicBlur mBlurScript;
+ private Allocation mBlurInput, mBlurOutput;
+
+ @Override
+ public boolean prepare(Context context, Bitmap buffer, float radius) {
+ if (mRenderScript == null) {
+ try {
+ mRenderScript = RenderScript.create(context);
+ mBlurScript = ScriptIntrinsicBlur.create(mRenderScript, Element.U8_4(mRenderScript));
+ } catch (android.renderscript.RSRuntimeException e) {
+ release();
+ return false;
+ }
+ }
+ mBlurScript.setRadius(radius);
+
+ mBlurInput = Allocation.createFromBitmap(mRenderScript, buffer,
+ Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT);
+ mBlurOutput = Allocation.createTyped(mRenderScript, mBlurInput.getType());
+
+ return true;
+ }
+
+ @Override
+ public void release() {
+ if (mBlurInput != null) {
+ mBlurInput.destroy();
+ mBlurInput = null;
+ }
+ if (mBlurOutput != null) {
+ mBlurOutput.destroy();
+ mBlurOutput = null;
+ }
+ if (mBlurScript != null) {
+ mBlurScript.destroy();
+ mBlurScript = null;
+ }
+ if (mRenderScript != null) {
+ mRenderScript.destroy();
+ mRenderScript = null;
+ }
+ }
+
+ @Override
+ public void blur(Bitmap input, Bitmap output) {
+ mBlurInput.copyFrom(input);
+ mBlurScript.setInput(mBlurInput);
+ mBlurScript.forEach(mBlurOutput);
+ mBlurOutput.copyTo(output);
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/view/BlurHelper.java b/app/src/main/java/com/bytecat/algui/view/BlurHelper.java
new file mode 100644
index 0000000..5f69f04
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/BlurHelper.java
@@ -0,0 +1,32 @@
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.RenderScript;
+import android.renderscript.ScriptIntrinsicBlur;
+
+public class BlurHelper {
+ public static Bitmap blurBitmap(Context context, Bitmap sourceBitmap, float blurRadius) {
+ if (sourceBitmap == null) {
+ return null;
+ }
+
+ Bitmap blurredBitmap = Bitmap.createBitmap(sourceBitmap.getWidth(), sourceBitmap.getHeight(), Bitmap.Config.ARGB_8888);
+
+ RenderScript renderScript = RenderScript.create(context);
+ Allocation allIn = Allocation.createFromBitmap(renderScript, sourceBitmap);
+ Allocation allOut = Allocation.createFromBitmap(renderScript, blurredBitmap);
+
+ ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(renderScript, Element.U8_4(renderScript));
+ script.setRadius(blurRadius); // 设置模糊半径,范围 [0, 25]
+ script.setInput(allIn);
+ script.forEach(allOut);
+
+ allOut.copyTo(blurredBitmap);
+ renderScript.destroy();
+
+ return blurredBitmap;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/view/BlurImpl.java b/app/src/main/java/com/bytecat/algui/view/BlurImpl.java
new file mode 100644
index 0000000..d2190f7
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/BlurImpl.java
@@ -0,0 +1,14 @@
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+
+interface BlurImpl {
+
+ boolean prepare(Context context, Bitmap buffer, float radius);
+
+ void release();
+
+ void blur(Bitmap input, Bitmap output);
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/view/CardView.java b/app/src/main/java/com/bytecat/algui/view/CardView.java
new file mode 100644
index 0000000..ff0e7c4
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/CardView.java
@@ -0,0 +1,460 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.graphics.Color;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.FrameLayout;
+
+/**
+ * A FrameLayout with a rounded corner background and shadow.
+ *
+ * CardView uses elevation property on Lollipop for shadows and falls back to a
+ * custom emulated shadow implementation on older platforms.
+ *
+ * Due to expensive nature of rounded corner clipping, on platforms before Lollipop, CardView does
+ * not clip its children that intersect with rounded corners. Instead, it adds padding to avoid such
+ * intersection (See {@link #setPreventCornerOverlap(boolean)} to change this behavior).
+ *
+ * Before Lollipop, CardView adds padding to its content and draws shadows to that area. This
+ * padding amount is equal to maxCardElevation + (1 - cos45) * cornerRadius on the
+ * sides and maxCardElevation * 1.5 + (1 - cos45) * cornerRadius on top and bottom.
+ *
+ * Since padding is used to offset content for shadows, you cannot set padding on CardView.
+ * Instead, you can use content padding attributes in XML or
+ * {@link #setContentPadding(int, int, int, int)} in code to set the padding between the edges of
+ * the CardView and children of CardView.
+ *
+ * Note that, if you specify exact dimensions for the CardView, because of the shadows, its content
+ * area will be different between platforms before Lollipop and after Lollipop. By using api version
+ * specific resource values, you can avoid these changes. Alternatively, If you want CardView to add
+ * inner padding on platforms Lollipop and after as well, you can call
+ * {@link #setUseCompatPadding(boolean)} and pass true.
+ *
+ * To change CardView's elevation in a backward compatible way, use
+ * {@link #setCardElevation(float)}. CardView will use elevation API on Lollipop and before
+ * Lollipop, it will change the shadow size. To avoid moving the View while shadow size is changing,
+ * shadow size is clamped by {@link #getMaxCardElevation()}. If you want to change elevation
+ * dynamically, you should call {@link #setMaxCardElevation(float)} when CardView is initialized.
+ *
+ * {@link androidx.cardview.R.attr#cardBackgroundColor}
+ * {@link androidx.cardview.R.attr#cardCornerRadius}
+ * {@link androidx.cardview.R.attr#cardElevation}
+ * {@link androidx.cardview.R.attr#cardMaxElevation}
+ * {@link androidx.cardview.R.attr#cardUseCompatPadding}
+ * {@link androidx.cardview.R.attr#cardPreventCornerOverlap}
+ * {@link androidx.cardview.R.attr#contentPadding}
+ * {@link androidx.cardview.R.attr#contentPaddingLeft}
+ * {@link androidx.cardview.R.attr#contentPaddingTop}
+ * {@link androidx.cardview.R.attr#contentPaddingRight}
+ * {@link androidx.cardview.R.attr#contentPaddingBottom}
+ */
+public class CardView extends FrameLayout {
+
+ private static final CardViewImpl IMPL;
+
+ static {
+ if (Build.VERSION.SDK_INT >= 21) {
+ IMPL = new CardViewApi21Impl();
+ } else {
+ IMPL = new CardViewBaseImpl();
+ }
+ IMPL.initStatic();
+ }
+
+ private boolean mCompatPadding;
+
+ private boolean mPreventCornerOverlap;
+
+ /**
+ * CardView requires to have a particular minimum size to draw shadows before API 21. If
+ * developer also sets min width/height, they might be overridden.
+ *
+ * CardView works around this issue by recording user given parameters and using an internal
+ * method to set them.
+ */
+ int mUserSetMinWidth, mUserSetMinHeight;
+
+ final Rect mContentPadding = new Rect();
+
+ final Rect mShadowBounds = new Rect();
+
+ public CardView(Context context) {
+ this(context, null);
+ }
+
+ public CardView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public CardView(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+
+ ColorStateList backgroundColor;
+
+ // If the theme colorBackground is light, use our own light color, otherwise dark
+ final float[] hsv = new float[3];
+ Color.colorToHSV(0, hsv);
+
+ backgroundColor = ColorStateList.valueOf(hsv[2] > 0.5f ? Color.parseColor("#FFFFFFFF")
+ : Color.parseColor("#FF424242"));
+
+ float radius = 0;
+ float elevation = 0;
+ float maxElevation = 0;
+ mCompatPadding = false;
+ mPreventCornerOverlap = true;
+ mContentPadding.left = 0;
+ mContentPadding.top = 0;
+ mContentPadding.right = 0;
+ mContentPadding.bottom = 0;
+ mUserSetMinWidth = 0;
+ mUserSetMinHeight = 0;
+
+ IMPL.initialize(mCardViewDelegate, context, backgroundColor, radius,
+ elevation, maxElevation);
+ }
+
+ @Override
+ public void setPadding(int left, int top, int right, int bottom) {
+ // NO OP
+ }
+
+ @Override
+ public void setPaddingRelative(int start, int top, int end, int bottom) {
+ // NO OP
+ }
+
+ /**
+ * Returns whether CardView will add inner padding on platforms Lollipop and after.
+ *
+ * @return true if CardView adds inner padding on platforms Lollipop and after to
+ * have same dimensions with platforms before Lollipop.
+ */
+ public boolean getUseCompatPadding() {
+ return mCompatPadding;
+ }
+
+ /**
+ * CardView adds additional padding to draw shadows on platforms before Lollipop.
+ *
+ * This may cause Cards to have different sizes between Lollipop and before Lollipop. If you
+ * need to align CardView with other Views, you may need api version specific dimension
+ * resources to account for the changes.
+ * As an alternative, you can set this flag to true and CardView will add the same
+ * padding values on platforms Lollipop and after.
+ *
+ * Since setting this flag to true adds unnecessary gaps in the UI, default value is
+ * false.
+ *
+ * @param useCompatPadding true> if CardView should add padding for the shadows on
+ * platforms Lollipop and above.
+ * {@link androidx.cardview.R.attr#cardUseCompatPadding}
+ */
+ public void setUseCompatPadding(boolean useCompatPadding) {
+ if (mCompatPadding != useCompatPadding) {
+ mCompatPadding = useCompatPadding;
+ IMPL.onCompatPaddingChanged(mCardViewDelegate);
+ }
+ }
+
+ /**
+ * Sets the padding between the Card's edges and the children of CardView.
+ *
+ * Depending on platform version or {@link #getUseCompatPadding()} settings, CardView may
+ * update these values before calling {@link android.view.View#setPadding(int, int, int, int)}.
+ *
+ * @param left The left padding in pixels
+ * @param top The top padding in pixels
+ * @param right The right padding in pixels
+ * @param bottom The bottom padding in pixels
+ * {@link androidx.cardview.R.attr#contentPadding}
+ * {@link androidx.cardview.R.attr#contentPaddingLeft}
+ * {@link androidx.cardview.R.attr#contentPaddingTop}
+ * {@link androidx.cardview.R.attr#contentPaddingRight}
+ * {@link androidx.cardview.R.attr#contentPaddingBottom}
+ */
+ public void setContentPadding(int left, int top, int right, int bottom) {
+ mContentPadding.set(left, top, right, bottom);
+ IMPL.updatePadding(mCardViewDelegate);
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (!(IMPL instanceof CardViewApi21Impl)) {
+ final int widthMode = MeasureSpec.getMode(widthMeasureSpec);
+ switch (widthMode) {
+ case MeasureSpec.EXACTLY:
+ case MeasureSpec.AT_MOST:
+ final int minWidth = (int) Math.ceil(IMPL.getMinWidth(mCardViewDelegate));
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(Math.max(minWidth,
+ MeasureSpec.getSize(widthMeasureSpec)), widthMode);
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ // Do nothing
+ break;
+ }
+
+ final int heightMode = MeasureSpec.getMode(heightMeasureSpec);
+ switch (heightMode) {
+ case MeasureSpec.EXACTLY:
+ case MeasureSpec.AT_MOST:
+ final int minHeight = (int) Math.ceil(IMPL.getMinHeight(mCardViewDelegate));
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(Math.max(minHeight,
+ MeasureSpec.getSize(heightMeasureSpec)), heightMode);
+ break;
+ case MeasureSpec.UNSPECIFIED:
+ // Do nothing
+ break;
+ }
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ } else {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+ }
+
+ @Override
+ public void setMinimumWidth(int minWidth) {
+ mUserSetMinWidth = minWidth;
+ super.setMinimumWidth(minWidth);
+ }
+
+ @Override
+ public void setMinimumHeight(int minHeight) {
+ mUserSetMinHeight = minHeight;
+ super.setMinimumHeight(minHeight);
+ }
+
+ /**
+ * Updates the background color of the CardView
+ *
+ * @param color The new color to set for the card background
+ * {@link androidx.cardview.R.attr#cardBackgroundColor}
+ */
+ public void setCardBackgroundColor(int color) {
+ IMPL.setBackgroundColor(mCardViewDelegate, ColorStateList.valueOf(color));
+ }
+
+ /**
+ * Updates the background ColorStateList of the CardView
+ *
+ * @param color The new ColorStateList to set for the card background
+ * {@link androidx.cardview.R.attr#cardBackgroundColor}
+ */
+ public void setCardBackgroundColor(ColorStateList color) {
+ IMPL.setBackgroundColor(mCardViewDelegate, color);
+ }
+
+ /**
+ * Returns the background color state list of the CardView.
+ *
+ * @return The background color state list of the CardView.
+ */
+ public ColorStateList getCardBackgroundColor() {
+ return IMPL.getBackgroundColor(mCardViewDelegate);
+ }
+
+ /**
+ * Returns the inner padding after the Card's left edge
+ *
+ * @return the inner padding after the Card's left edge
+ */
+ public int getContentPaddingLeft() {
+ return mContentPadding.left;
+ }
+
+ /**
+ * Returns the inner padding before the Card's right edge
+ *
+ * @return the inner padding before the Card's right edge
+ */
+ public int getContentPaddingRight() {
+ return mContentPadding.right;
+ }
+
+ /**
+ * Returns the inner padding after the Card's top edge
+ *
+ * @return the inner padding after the Card's top edge
+ */
+ public int getContentPaddingTop() {
+ return mContentPadding.top;
+ }
+
+ /**
+ * Returns the inner padding before the Card's bottom edge
+ *
+ * @return the inner padding before the Card's bottom edge
+ */
+ public int getContentPaddingBottom() {
+ return mContentPadding.bottom;
+ }
+
+ /**
+ * Updates the corner radius of the CardView.
+ *
+ * @param radius The radius in pixels of the corners of the rectangle shape
+ * {@link androidx.cardview.R.attr#cardCornerRadius}
+ * @see #setRadius(float)
+ */
+ public void setRadius(float radius) {
+ IMPL.setRadius(mCardViewDelegate, radius);
+ }
+
+ /**
+ * Returns the corner radius of the CardView.
+ *
+ * @return Corner radius of the CardView
+ * @see #getRadius()
+ */
+ public float getRadius() {
+ return IMPL.getRadius(mCardViewDelegate);
+ }
+
+ /**
+ * Updates the backward compatible elevation of the CardView.
+ *
+ * @param elevation The backward compatible elevation in pixels.
+ * {@link androidx.cardview.R.attr#cardElevation}
+ * @see #getCardElevation()
+ * @see #setMaxCardElevation(float)
+ */
+ public void setCardElevation(float elevation) {
+ IMPL.setElevation(mCardViewDelegate, elevation);
+ }
+
+ /**
+ * Returns the backward compatible elevation of the CardView.
+ *
+ * @return Elevation of the CardView
+ * @see #setCardElevation(float)
+ * @see #getMaxCardElevation()
+ */
+ public float getCardElevation() {
+ return IMPL.getElevation(mCardViewDelegate);
+ }
+
+ /**
+ * Updates the backward compatible maximum elevation of the CardView.
+ *
+ * Calling this method has no effect if device OS version is Lollipop or newer and
+ * {@link #getUseCompatPadding()} is false.
+ *
+ * @param maxElevation The backward compatible maximum elevation in pixels.
+ * {@link androidx.cardview.R.attr#cardMaxElevation}
+ * @see #setCardElevation(float)
+ * @see #getMaxCardElevation()
+ */
+ public void setMaxCardElevation(float maxElevation) {
+ IMPL.setMaxElevation(mCardViewDelegate, maxElevation);
+ }
+
+ /**
+ * Returns the backward compatible maximum elevation of the CardView.
+ *
+ * @return Maximum elevation of the CardView
+ * @see #setMaxCardElevation(float)
+ * @see #getCardElevation()
+ */
+ public float getMaxCardElevation() {
+ return IMPL.getMaxElevation(mCardViewDelegate);
+ }
+
+ /**
+ * Returns whether CardView should add extra padding to content to avoid overlaps with rounded
+ * corners on pre-Lollipop platforms.
+ *
+ * @return True if CardView prevents overlaps with rounded corners on platforms before Lollipop.
+ * Default value is true.
+ */
+ public boolean getPreventCornerOverlap() {
+ return mPreventCornerOverlap;
+ }
+
+ /**
+ * On pre-Lollipop platforms, CardView does not clip the bounds of the Card for the rounded
+ * corners. Instead, it adds padding to content so that it won't overlap with the rounded
+ * corners. You can disable this behavior by setting this field to false.
+ *
+ * Setting this value on Lollipop and above does not have any effect unless you have enabled
+ * compatibility padding.
+ *
+ * @param preventCornerOverlap Whether CardView should add extra padding to content to avoid
+ * overlaps with the CardView corners.
+ * {@link androidx.cardview.R.attr#cardPreventCornerOverlap}
+ * @see #setUseCompatPadding(boolean)
+ */
+ public void setPreventCornerOverlap(boolean preventCornerOverlap) {
+ if (preventCornerOverlap != mPreventCornerOverlap) {
+ mPreventCornerOverlap = preventCornerOverlap;
+ IMPL.onPreventCornerOverlapChanged(mCardViewDelegate);
+ }
+ }
+
+ private final CardViewDelegate mCardViewDelegate = new CardViewDelegate() {
+ private Drawable mCardBackground;
+
+ @Override
+ public void setCardBackground(Drawable drawable) {
+ mCardBackground = drawable;
+ setBackgroundDrawable(drawable);
+ }
+
+ @Override
+ public boolean getUseCompatPadding() {
+ return CardView.this.getUseCompatPadding();
+ }
+
+ @Override
+ public boolean getPreventCornerOverlap() {
+ return CardView.this.getPreventCornerOverlap();
+ }
+
+ @Override
+ public void setShadowPadding(int left, int top, int right, int bottom) {
+ mShadowBounds.set(left, top, right, bottom);
+ CardView.super.setPadding(left + mContentPadding.left, top + mContentPadding.top,
+ right + mContentPadding.right, bottom + mContentPadding.bottom);
+ }
+
+ @Override
+ public void setMinWidthHeightInternal(int width, int height) {
+ if (width > mUserSetMinWidth) {
+ CardView.super.setMinimumWidth(width);
+ }
+ if (height > mUserSetMinHeight) {
+ CardView.super.setMinimumHeight(height);
+ }
+ }
+
+ @Override
+ public Drawable getCardBackground() {
+ return mCardBackground;
+ }
+
+ @Override
+ public View getCardView() {
+ return CardView.this;
+ }
+ };
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/CardViewApi21Impl.java b/app/src/main/java/com/bytecat/algui/view/CardViewApi21Impl.java
new file mode 100644
index 0000000..aadf5a9
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/CardViewApi21Impl.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.view.View;
+
+class CardViewApi21Impl implements CardViewImpl {
+
+ @Override
+ public void initialize(CardViewDelegate cardView, Context context,
+ ColorStateList backgroundColor, float radius, float elevation, float maxElevation) {
+ final RoundRectDrawable background = new RoundRectDrawable(backgroundColor, radius);
+ cardView.setCardBackground(background);
+
+ View view = cardView.getCardView();
+ view.setClipToOutline(true);
+ view.setElevation(elevation);
+ setMaxElevation(cardView, maxElevation);
+ }
+
+ @Override
+ public void setRadius(CardViewDelegate cardView, float radius) {
+ getCardBackground(cardView).setRadius(radius);
+ }
+
+ @Override
+ public void initStatic() {
+ }
+
+ @Override
+ public void setMaxElevation(CardViewDelegate cardView, float maxElevation) {
+ getCardBackground(cardView).setPadding(maxElevation,
+ cardView.getUseCompatPadding(), cardView.getPreventCornerOverlap());
+ updatePadding(cardView);
+ }
+
+ @Override
+ public float getMaxElevation(CardViewDelegate cardView) {
+ return getCardBackground(cardView).getPadding();
+ }
+
+ @Override
+ public float getMinWidth(CardViewDelegate cardView) {
+ return getRadius(cardView) * 2;
+ }
+
+ @Override
+ public float getMinHeight(CardViewDelegate cardView) {
+ return getRadius(cardView) * 2;
+ }
+
+ @Override
+ public float getRadius(CardViewDelegate cardView) {
+ return getCardBackground(cardView).getRadius();
+ }
+
+ @Override
+ public void setElevation(CardViewDelegate cardView, float elevation) {
+ cardView.getCardView().setElevation(elevation);
+ }
+
+ @Override
+ public float getElevation(CardViewDelegate cardView) {
+ return cardView.getCardView().getElevation();
+ }
+
+ @Override
+ public void updatePadding(CardViewDelegate cardView) {
+ if (!cardView.getUseCompatPadding()) {
+ cardView.setShadowPadding(0, 0, 0, 0);
+ return;
+ }
+ float elevation = getMaxElevation(cardView);
+ final float radius = getRadius(cardView);
+ int hPadding = (int) Math.ceil(RoundRectDrawableWithShadow
+ .calculateHorizontalPadding(elevation, radius, cardView.getPreventCornerOverlap()));
+ int vPadding = (int) Math.ceil(RoundRectDrawableWithShadow
+ .calculateVerticalPadding(elevation, radius, cardView.getPreventCornerOverlap()));
+ cardView.setShadowPadding(hPadding, vPadding, hPadding, vPadding);
+ }
+
+ @Override
+ public void onCompatPaddingChanged(CardViewDelegate cardView) {
+ setMaxElevation(cardView, getMaxElevation(cardView));
+ }
+
+ @Override
+ public void onPreventCornerOverlapChanged(CardViewDelegate cardView) {
+ setMaxElevation(cardView, getMaxElevation(cardView));
+ }
+
+ @Override
+ public void setBackgroundColor(CardViewDelegate cardView, ColorStateList color) {
+ getCardBackground(cardView).setColor(color);
+ }
+
+ @Override
+ public ColorStateList getBackgroundColor(CardViewDelegate cardView) {
+ return getCardBackground(cardView).getColor();
+ }
+
+ private RoundRectDrawable getCardBackground(CardViewDelegate cardView) {
+ return ((RoundRectDrawable) cardView.getCardBackground());
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/CardViewBaseImpl.java b/app/src/main/java/com/bytecat/algui/view/CardViewBaseImpl.java
new file mode 100644
index 0000000..7f6d0cd
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/CardViewBaseImpl.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.RectF;
+
+class CardViewBaseImpl implements CardViewImpl {
+
+ @Override
+ public void initStatic() {
+ RoundRectDrawableWithShadow.sRoundRectHelper = new RoundRectDrawableWithShadow.RoundRectHelper() {
+
+ @Override
+ public void drawRoundRect(Canvas canvas, RectF bounds, float cornerRadius, Paint paint) {
+ canvas.drawRoundRect(bounds, cornerRadius, cornerRadius, paint);
+ }
+
+ };
+ }
+
+ @Override
+ public void initialize(CardViewDelegate cardView, Context context,
+ ColorStateList backgroundColor, float radius, float elevation, float maxElevation) {
+ RoundRectDrawableWithShadow background = createBackground(context, backgroundColor, radius,
+ elevation, maxElevation);
+ background.setAddPaddingForCorners(cardView.getPreventCornerOverlap());
+ cardView.setCardBackground(background);
+ updatePadding(cardView);
+ }
+
+ private RoundRectDrawableWithShadow createBackground(Context context,
+ ColorStateList backgroundColor, float radius, float elevation,
+ float maxElevation) {
+ return new RoundRectDrawableWithShadow(context.getResources(), backgroundColor, radius,
+ elevation, maxElevation);
+ }
+
+ @Override
+ public void updatePadding(CardViewDelegate cardView) {
+ Rect shadowPadding = new Rect();
+ getShadowBackground(cardView).getMaxShadowAndCornerPadding(shadowPadding);
+ cardView.setMinWidthHeightInternal((int) Math.ceil(getMinWidth(cardView)),
+ (int) Math.ceil(getMinHeight(cardView)));
+ cardView.setShadowPadding(shadowPadding.left, shadowPadding.top,
+ shadowPadding.right, shadowPadding.bottom);
+ }
+
+ @Override
+ public void onCompatPaddingChanged(CardViewDelegate cardView) {
+ // NO OP
+ }
+
+ @Override
+ public void onPreventCornerOverlapChanged(CardViewDelegate cardView) {
+ getShadowBackground(cardView).setAddPaddingForCorners(cardView.getPreventCornerOverlap());
+ updatePadding(cardView);
+ }
+
+ @Override
+ public void setBackgroundColor(CardViewDelegate cardView, ColorStateList color) {
+ getShadowBackground(cardView).setColor(color);
+ }
+
+ @Override
+ public ColorStateList getBackgroundColor(CardViewDelegate cardView) {
+ return getShadowBackground(cardView).getColor();
+ }
+
+ @Override
+ public void setRadius(CardViewDelegate cardView, float radius) {
+ getShadowBackground(cardView).setCornerRadius(radius);
+ updatePadding(cardView);
+ }
+
+ @Override
+ public float getRadius(CardViewDelegate cardView) {
+ return getShadowBackground(cardView).getCornerRadius();
+ }
+
+ @Override
+ public void setElevation(CardViewDelegate cardView, float elevation) {
+ getShadowBackground(cardView).setShadowSize(elevation);
+ }
+
+ @Override
+ public float getElevation(CardViewDelegate cardView) {
+ return getShadowBackground(cardView).getShadowSize();
+ }
+
+ @Override
+ public void setMaxElevation(CardViewDelegate cardView, float maxElevation) {
+ getShadowBackground(cardView).setMaxShadowSize(maxElevation);
+ updatePadding(cardView);
+ }
+
+ @Override
+ public float getMaxElevation(CardViewDelegate cardView) {
+ return getShadowBackground(cardView).getMaxShadowSize();
+ }
+
+ @Override
+ public float getMinWidth(CardViewDelegate cardView) {
+ return getShadowBackground(cardView).getMinWidth();
+ }
+
+ @Override
+ public float getMinHeight(CardViewDelegate cardView) {
+ return getShadowBackground(cardView).getMinHeight();
+ }
+
+ private RoundRectDrawableWithShadow getShadowBackground(CardViewDelegate cardView) {
+ return ((RoundRectDrawableWithShadow) cardView.getCardBackground());
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/CardViewDelegate.java b/app/src/main/java/com/bytecat/algui/view/CardViewDelegate.java
new file mode 100644
index 0000000..254c0c6
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/CardViewDelegate.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.bytecat.algui.view;
+
+import android.graphics.drawable.Drawable;
+import android.view.View;
+
+/**
+ * Interface provided by CardView to implementations.
+ *
+ * Necessary to resolve circular dependency between base CardView and platform implementations.
+ */
+interface CardViewDelegate {
+ void setCardBackground(Drawable drawable);
+
+ Drawable getCardBackground();
+
+ boolean getUseCompatPadding();
+
+ boolean getPreventCornerOverlap();
+
+ void setShadowPadding(int left, int top, int right, int bottom);
+
+ void setMinWidthHeightInternal(int width, int height);
+
+ View getCardView();
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/CardViewImpl.java b/app/src/main/java/com/bytecat/algui/view/CardViewImpl.java
new file mode 100644
index 0000000..3ba98de
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/CardViewImpl.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+
+/**
+ * Interface for platform specific CardView implementations.
+ */
+interface CardViewImpl {
+ void initialize(CardViewDelegate cardView, Context context, ColorStateList backgroundColor,
+ float radius, float elevation, float maxElevation);
+
+ void setRadius(CardViewDelegate cardView, float radius);
+
+ float getRadius(CardViewDelegate cardView);
+
+ void setElevation(CardViewDelegate cardView, float elevation);
+
+ float getElevation(CardViewDelegate cardView);
+
+ void initStatic();
+
+ void setMaxElevation(CardViewDelegate cardView, float maxElevation);
+
+ float getMaxElevation(CardViewDelegate cardView);
+
+ float getMinWidth(CardViewDelegate cardView);
+
+ float getMinHeight(CardViewDelegate cardView);
+
+ void updatePadding(CardViewDelegate cardView);
+
+ void onCompatPaddingChanged(CardViewDelegate cardView);
+
+ void onPreventCornerOverlapChanged(CardViewDelegate cardView);
+
+ void setBackgroundColor(CardViewDelegate cardView, ColorStateList color);
+
+ ColorStateList getBackgroundColor(CardViewDelegate cardView);
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/DrawableView.java b/app/src/main/java/com/bytecat/algui/view/DrawableView.java
new file mode 100644
index 0000000..6abfae8
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/DrawableView.java
@@ -0,0 +1,38 @@
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.view.View;
+
+import com.bytecat.algui.callback.DrawCallback;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DrawableView extends View {
+
+ private final List callbacks = new ArrayList<>();
+
+ public DrawableView(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ for (DrawCallback callback : callbacks) {
+ callback.onDrawView(canvas);
+ }
+ super.draw(canvas);
+ }
+
+ public void addDrawCallback(DrawCallback callback) {
+ callbacks.add(callback);
+ invalidate();
+ }
+
+ public void removeDrawCallback(DrawCallback callback) {
+ callbacks.remove(callback);
+ invalidate();
+ }
+
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/EmptyBlurImpl.java b/app/src/main/java/com/bytecat/algui/view/EmptyBlurImpl.java
new file mode 100644
index 0000000..ba22b64
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/EmptyBlurImpl.java
@@ -0,0 +1,21 @@
+package com.bytecat.algui.view;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+
+public class EmptyBlurImpl implements BlurImpl {
+ @Override
+ public boolean prepare(Context context, Bitmap buffer, float radius) {
+ return false;
+ }
+
+ @Override
+ public void release() {
+
+ }
+
+ @Override
+ public void blur(Bitmap input, Bitmap output) {
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/view/RealtimeBlurView.java b/app/src/main/java/com/bytecat/algui/view/RealtimeBlurView.java
new file mode 100644
index 0000000..39f14bc
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/RealtimeBlurView.java
@@ -0,0 +1,272 @@
+package com.bytecat.algui.view;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.util.TypedValue;
+import android.view.View;
+import android.view.ViewTreeObserver;
+
+/**
+ * @noinspection ALL
+ */
+public class RealtimeBlurView extends View {
+
+ private float mDownSampleFactor;
+ private int mOverlayColor;
+ private float mBlurRadius;
+
+ private final BlurImpl mBlurImpl;
+ private boolean mDirty;
+ private Bitmap mBitmapToBlur, mBlurredBitmap;
+ private Canvas mBlurringCanvas;
+ private boolean mIsRendering;
+ private final Paint mPaint;
+ private final Rect mRectSrc = new Rect(), mRectDst = new Rect();
+
+ private View mDecorView;
+
+ private boolean mDifferentRoot;
+ private static int RENDERING_COUNT;
+ private static int BLUR_IMPL;
+
+ public RealtimeBlurView(Context context) {
+ super(context);
+
+ mBlurImpl = new AndroidStockBlurImpl();
+
+ mBlurRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, context.getResources().getDisplayMetrics());
+ mDownSampleFactor = 4;
+ mOverlayColor = 0x8C000000;
+
+ mPaint = new Paint();
+ }
+
+ public void setBlurRadius(float radius) {
+ if (mBlurRadius != radius) {
+ mBlurRadius = radius;
+ mDirty = true;
+ invalidate();
+ }
+ }
+
+ public void setDownSampleFactor(float factor) {
+ if (factor <= 0) {
+ throw new IllegalArgumentException("DownSample factor must be greater than 0.");
+ }
+
+ if (mDownSampleFactor != factor) {
+ mDownSampleFactor = factor;
+ mDirty = true;
+ releaseBitmap();
+ invalidate();
+ }
+ }
+
+ public void setOverlayColor(int color) {
+ if (mOverlayColor != color) {
+ mOverlayColor = color;
+ invalidate();
+ }
+ }
+
+ private void releaseBitmap() {
+ if (mBitmapToBlur != null) {
+ mBitmapToBlur.recycle();
+ mBitmapToBlur = null;
+ }
+ if (mBlurredBitmap != null) {
+ mBlurredBitmap.recycle();
+ mBlurredBitmap = null;
+ }
+ }
+
+ protected void release() {
+ releaseBitmap();
+ mBlurImpl.release();
+ }
+
+ protected boolean prepare() {
+ if (mBlurRadius == 0) {
+ release();
+ return false;
+ }
+
+ float downSampleFactor = mDownSampleFactor;
+ float radius = mBlurRadius / downSampleFactor;
+ if (radius > 25) {
+ downSampleFactor = downSampleFactor * radius / 25;
+ radius = 25;
+ }
+
+ final int width = getWidth();
+ final int height = getHeight();
+
+ int scaledWidth = Math.max(1, (int) (width / downSampleFactor));
+ int scaledHeight = Math.max(1, (int) (height / downSampleFactor));
+
+ boolean dirty = mDirty;
+
+ if (mBlurringCanvas == null || mBlurredBitmap == null
+ || mBlurredBitmap.getWidth() != scaledWidth
+ || mBlurredBitmap.getHeight() != scaledHeight) {
+ dirty = true;
+ releaseBitmap();
+
+ boolean r = false;
+ try {
+ mBitmapToBlur = Bitmap.createBitmap(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
+ if (mBitmapToBlur == null) {
+ return false;
+ }
+ mBlurringCanvas = new Canvas(mBitmapToBlur);
+
+ mBlurredBitmap = Bitmap.createBitmap(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
+ if (mBlurredBitmap == null) {
+ return false;
+ }
+
+ r = true;
+ } catch (OutOfMemoryError e) {
+ } finally {
+ if (!r) {
+ release();
+ return false;
+ }
+ }
+ }
+
+ if (dirty) {
+ if (mBlurImpl.prepare(getContext(), mBitmapToBlur, radius)) {
+ mDirty = false;
+ } else {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ protected void blur(Bitmap bitmapToBlur, Bitmap blurredBitmap) {
+ mBlurImpl.blur(bitmapToBlur, blurredBitmap);
+ }
+
+ private final ViewTreeObserver.OnPreDrawListener preDrawListener = new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ final int[] locations = new int[2];
+ Bitmap oldBmp = mBlurredBitmap;
+ View decor = mDecorView;
+ if (decor != null && isShown() && prepare()) {
+ boolean redrawBitmap = mBlurredBitmap != oldBmp;
+ decor.getLocationOnScreen(locations);
+ int x = -locations[0];
+ int y = -locations[1];
+
+ getLocationOnScreen(locations);
+ x += locations[0];
+ y += locations[1];
+
+ mBitmapToBlur.eraseColor(mOverlayColor & 0xffffff);
+
+ int rc = mBlurringCanvas.save();
+ mIsRendering = true;
+ RENDERING_COUNT++;
+ try {
+ mBlurringCanvas.scale(1.f * mBitmapToBlur.getWidth() / getWidth(), 1.f * mBitmapToBlur.getHeight() / getHeight());
+ mBlurringCanvas.translate(-x, -y);
+ if (decor.getBackground() != null) {
+ decor.getBackground().draw(mBlurringCanvas);
+ }
+ decor.draw(mBlurringCanvas);
+ } catch (StopException ignored) {
+ } finally {
+ mIsRendering = false;
+ RENDERING_COUNT--;
+ mBlurringCanvas.restoreToCount(rc);
+ }
+
+ blur(mBitmapToBlur, mBlurredBitmap);
+
+ if (redrawBitmap || mDifferentRoot) {
+ invalidate();
+ }
+ }
+
+ return true;
+ }
+ };
+
+ protected View getActivityDecorView() {
+ Context ctx = getContext();
+ for (int i = 0; i < 4 && !(ctx instanceof Activity) && ctx instanceof ContextWrapper; i++) {
+ ctx = ((ContextWrapper) ctx).getBaseContext();
+ }
+ if (ctx instanceof Activity) {
+ return ((Activity) ctx).getWindow().getDecorView();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mDecorView = getActivityDecorView();
+ if (mDecorView != null) {
+ mDecorView.getViewTreeObserver().addOnPreDrawListener(preDrawListener);
+ mDifferentRoot = mDecorView.getRootView() != getRootView();
+ if (mDifferentRoot) {
+ mDecorView.postInvalidate();
+ }
+ } else {
+ mDifferentRoot = false;
+ }
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ if (mDecorView != null) {
+ mDecorView.getViewTreeObserver().removeOnPreDrawListener(preDrawListener);
+ }
+ release();
+ super.onDetachedFromWindow();
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ if (mIsRendering) {
+ throw STOP_EXCEPTION;
+ } else if (RENDERING_COUNT > 0) {
+ } else {
+ super.draw(canvas);
+ }
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+ drawBlurredBitmap(canvas, mBlurredBitmap, mOverlayColor);
+ }
+
+ protected void drawBlurredBitmap(Canvas canvas, Bitmap blurredBitmap, int overlayColor) {
+ if (blurredBitmap != null) {
+ mRectSrc.right = blurredBitmap.getWidth();
+ mRectSrc.bottom = blurredBitmap.getHeight();
+ mRectDst.right = getWidth();
+ mRectDst.bottom = getHeight();
+ canvas.drawBitmap(blurredBitmap, mRectSrc, mRectDst, null);
+ }
+ mPaint.setColor(overlayColor);
+ canvas.drawRect(mRectDst, mPaint);
+ }
+
+ private static class StopException extends RuntimeException {
+ }
+
+ private static final StopException STOP_EXCEPTION = new StopException();
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/bytecat/algui/view/RoundRectDrawable.java b/app/src/main/java/com/bytecat/algui/view/RoundRectDrawable.java
new file mode 100644
index 0000000..b34a4e7
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/RoundRectDrawable.java
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.bytecat.algui.view;
+
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.ColorFilter;
+import android.graphics.Outline;
+import android.graphics.Paint;
+import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffColorFilter;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.drawable.Drawable;
+
+/**
+ * Very simple drawable that draws a rounded rectangle background with arbitrary corners and also
+ * reports proper outline for Lollipop.
+ *
+ * Simpler and uses less resources compared to GradientDrawable or ShapeDrawable.
+ */
+class RoundRectDrawable extends Drawable {
+ private float mRadius;
+ private final Paint mPaint;
+ private final RectF mBoundsF;
+ private final Rect mBoundsI;
+ private float mPadding;
+ private boolean mInsetForPadding = false;
+ private boolean mInsetForRadius = true;
+
+ private ColorStateList mBackground;
+ private PorterDuffColorFilter mTintFilter;
+ private ColorStateList mTint;
+ private PorterDuff.Mode mTintMode = PorterDuff.Mode.SRC_IN;
+
+ RoundRectDrawable(ColorStateList backgroundColor, float radius) {
+ mRadius = radius;
+ mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
+ setBackground(backgroundColor);
+
+ mBoundsF = new RectF();
+ mBoundsI = new Rect();
+ }
+
+ private void setBackground(ColorStateList color) {
+ mBackground = (color == null) ? ColorStateList.valueOf(Color.TRANSPARENT) : color;
+ mPaint.setColor(mBackground.getColorForState(getState(), mBackground.getDefaultColor()));
+ }
+
+ void setPadding(float padding, boolean insetForPadding, boolean insetForRadius) {
+ if (padding == mPadding && mInsetForPadding == insetForPadding
+ && mInsetForRadius == insetForRadius) {
+ return;
+ }
+ mPadding = padding;
+ mInsetForPadding = insetForPadding;
+ mInsetForRadius = insetForRadius;
+ updateBounds(null);
+ invalidateSelf();
+ }
+
+ float getPadding() {
+ return mPadding;
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ final Paint paint = mPaint;
+
+ final boolean clearColorFilter;
+ if (mTintFilter != null && paint.getColorFilter() == null) {
+ paint.setColorFilter(mTintFilter);
+ clearColorFilter = true;
+ } else {
+ clearColorFilter = false;
+ }
+
+ canvas.drawRoundRect(mBoundsF, mRadius, mRadius, paint);
+
+ if (clearColorFilter) {
+ paint.setColorFilter(null);
+ }
+ }
+
+ private void updateBounds(Rect bounds) {
+ if (bounds == null) {
+ bounds = getBounds();
+ }
+ mBoundsF.set(bounds.left, bounds.top, bounds.right, bounds.bottom);
+ mBoundsI.set(bounds);
+ if (mInsetForPadding) {
+ float vInset = RoundRectDrawableWithShadow.calculateVerticalPadding(mPadding, mRadius, mInsetForRadius);
+ float hInset = RoundRectDrawableWithShadow.calculateHorizontalPadding(mPadding, mRadius, mInsetForRadius);
+ mBoundsI.inset((int) Math.ceil(hInset), (int) Math.ceil(vInset));
+ // to make sure they have same bounds.
+ mBoundsF.set(mBoundsI);
+ }
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ super.onBoundsChange(bounds);
+ updateBounds(bounds);
+ }
+
+ @Override
+ public void getOutline(Outline outline) {
+ outline.setRoundRect(mBoundsI, mRadius);
+ }
+
+ void setRadius(float radius) {
+ if (radius == mRadius) {
+ return;
+ }
+ mRadius = radius;
+ updateBounds(null);
+ invalidateSelf();
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ mPaint.setAlpha(alpha);
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ mPaint.setColorFilter(cf);
+ }
+
+ @Override
+ public int getOpacity() {
+ return PixelFormat.TRANSLUCENT;
+ }
+
+ public float getRadius() {
+ return mRadius;
+ }
+
+ public void setColor(ColorStateList color) {
+ setBackground(color);
+ invalidateSelf();
+ }
+
+ public ColorStateList getColor() {
+ return mBackground;
+ }
+
+ @Override
+ public void setTintList(ColorStateList tint) {
+ mTint = tint;
+ mTintFilter = createTintFilter(mTint, mTintMode);
+ invalidateSelf();
+ }
+
+ @Override
+ public void setTintMode(PorterDuff.Mode tintMode) {
+ mTintMode = tintMode;
+ mTintFilter = createTintFilter(mTint, mTintMode);
+ invalidateSelf();
+ }
+
+ @Override
+ protected boolean onStateChange(int[] stateSet) {
+ final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor());
+ final boolean colorChanged = newColor != mPaint.getColor();
+ if (colorChanged) {
+ mPaint.setColor(newColor);
+ }
+ if (mTint != null && mTintMode != null) {
+ mTintFilter = createTintFilter(mTint, mTintMode);
+ return true;
+ }
+ return colorChanged;
+ }
+
+ @Override
+ public boolean isStateful() {
+ return (mTint != null && mTint.isStateful())
+ || (mBackground != null && mBackground.isStateful()) || super.isStateful();
+ }
+
+ /**
+ * Ensures the tint filter is consistent with the current tint color and
+ * mode.
+ */
+ private PorterDuffColorFilter createTintFilter(ColorStateList tint, PorterDuff.Mode tintMode) {
+ if (tint == null || tintMode == null) {
+ return null;
+ }
+ final int color = tint.getColorForState(getState(), Color.TRANSPARENT);
+ return new PorterDuffColorFilter(color, tintMode);
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/RoundRectDrawableWithShadow.java b/app/src/main/java/com/bytecat/algui/view/RoundRectDrawableWithShadow.java
new file mode 100644
index 0000000..c432f67
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/RoundRectDrawableWithShadow.java
@@ -0,0 +1,382 @@
+/*
+ * Copyright 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.bytecat.algui.view;
+
+import android.content.res.ColorStateList;
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.ColorFilter;
+import android.graphics.LinearGradient;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.PixelFormat;
+import android.graphics.RadialGradient;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.Shader;
+import android.graphics.drawable.Drawable;
+
+/**
+ * A rounded rectangle drawable which also includes a shadow around.
+ */
+class RoundRectDrawableWithShadow extends Drawable {
+ // used to calculate content padding
+ private static final double COS_45 = Math.cos(Math.toRadians(45));
+
+ private static final float SHADOW_MULTIPLIER = 1.5f;
+
+ private final int mInsetShadow = 1; // extra shadow to avoid gaps between card and shadow
+
+ /*
+ * This helper is set by CardView implementations.
+ *
+ * Prior to API 17, canvas.drawRoundRect is expensive; which is why we need this interface
+ * to draw efficient rounded rectangles before 17.
+ * */
+ static RoundRectHelper sRoundRectHelper;
+
+ private Paint mPaint;
+
+ private Paint mCornerShadowPaint;
+
+ private Paint mEdgeShadowPaint;
+
+ private final RectF mCardBounds;
+
+ private float mCornerRadius;
+
+ private Path mCornerShadowPath;
+
+ // actual value set by developer
+ private float mRawMaxShadowSize;
+
+ // multiplied value to account for shadow offset
+ private float mShadowSize;
+
+ // actual value set by developer
+ private float mRawShadowSize;
+
+ private ColorStateList mBackground;
+
+ private boolean mDirty = true;
+
+ private final int mShadowStartColor = Color.parseColor("#37000000");
+
+ private final int mShadowEndColor = Color.parseColor("#03000000");
+
+ private boolean mAddPaddingForCorners = true;
+
+ /**
+ * If shadow size is set to a value above max shadow, we print a warning
+ */
+ private boolean mPrintedShadowClipWarning = false;
+
+ RoundRectDrawableWithShadow(Resources resources, ColorStateList backgroundColor, float radius,
+ float shadowSize, float maxShadowSize) {
+ mPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
+ setBackground(backgroundColor);
+ mCornerShadowPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
+ mCornerShadowPaint.setStyle(Paint.Style.FILL);
+ mCornerRadius = (int) (radius + 0.5f);
+ mCardBounds = new RectF();
+ mEdgeShadowPaint = new Paint(mCornerShadowPaint);
+ mEdgeShadowPaint.setAntiAlias(false);
+ setShadowSize(shadowSize, maxShadowSize);
+ }
+
+ private void setBackground(ColorStateList color) {
+ mBackground = (color == null) ? ColorStateList.valueOf(Color.TRANSPARENT) : color;
+ mPaint.setColor(mBackground.getColorForState(getState(), mBackground.getDefaultColor()));
+ }
+
+ /**
+ * Casts the value to an even integer.
+ */
+ private int toEven(float value) {
+ int i = (int) (value + .5f);
+ if (i % 2 == 1) {
+ return i - 1;
+ }
+ return i;
+ }
+
+ void setAddPaddingForCorners(boolean addPaddingForCorners) {
+ mAddPaddingForCorners = addPaddingForCorners;
+ invalidateSelf();
+ }
+
+ @Override
+ public void setAlpha(int alpha) {
+ mPaint.setAlpha(alpha);
+ mCornerShadowPaint.setAlpha(alpha);
+ mEdgeShadowPaint.setAlpha(alpha);
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ super.onBoundsChange(bounds);
+ mDirty = true;
+ }
+
+ private void setShadowSize(float shadowSize, float maxShadowSize) {
+ if (shadowSize < 0f) {
+ throw new IllegalArgumentException("Invalid shadow size " + shadowSize
+ + ". Must be >= 0");
+ }
+ if (maxShadowSize < 0f) {
+ throw new IllegalArgumentException("Invalid max shadow size " + maxShadowSize
+ + ". Must be >= 0");
+ }
+ shadowSize = toEven(shadowSize);
+ maxShadowSize = toEven(maxShadowSize);
+ if (shadowSize > maxShadowSize) {
+ shadowSize = maxShadowSize;
+ if (!mPrintedShadowClipWarning) {
+ mPrintedShadowClipWarning = true;
+ }
+ }
+ if (mRawShadowSize == shadowSize && mRawMaxShadowSize == maxShadowSize) {
+ return;
+ }
+ mRawShadowSize = shadowSize;
+ mRawMaxShadowSize = maxShadowSize;
+ mShadowSize = (int) (shadowSize * SHADOW_MULTIPLIER + mInsetShadow + .5f);
+ mDirty = true;
+ invalidateSelf();
+ }
+
+ @Override
+ public boolean getPadding(Rect padding) {
+ int vOffset = (int) Math.ceil(calculateVerticalPadding(mRawMaxShadowSize, mCornerRadius,
+ mAddPaddingForCorners));
+ int hOffset = (int) Math.ceil(calculateHorizontalPadding(mRawMaxShadowSize, mCornerRadius,
+ mAddPaddingForCorners));
+ padding.set(hOffset, vOffset, hOffset, vOffset);
+ return true;
+ }
+
+ static float calculateVerticalPadding(float maxShadowSize, float cornerRadius,
+ boolean addPaddingForCorners) {
+ if (addPaddingForCorners) {
+ return (float) (maxShadowSize * SHADOW_MULTIPLIER + (1 - COS_45) * cornerRadius);
+ } else {
+ return maxShadowSize * SHADOW_MULTIPLIER;
+ }
+ }
+
+ static float calculateHorizontalPadding(float maxShadowSize, float cornerRadius,
+ boolean addPaddingForCorners) {
+ if (addPaddingForCorners) {
+ return (float) (maxShadowSize + (1 - COS_45) * cornerRadius);
+ } else {
+ return maxShadowSize;
+ }
+ }
+
+ @Override
+ protected boolean onStateChange(int[] stateSet) {
+ final int newColor = mBackground.getColorForState(stateSet, mBackground.getDefaultColor());
+ if (mPaint.getColor() == newColor) {
+ return false;
+ }
+ mPaint.setColor(newColor);
+ mDirty = true;
+ invalidateSelf();
+ return true;
+ }
+
+ @Override
+ public boolean isStateful() {
+ return (mBackground != null && mBackground.isStateful()) || super.isStateful();
+ }
+
+ @Override
+ public void setColorFilter(ColorFilter cf) {
+ mPaint.setColorFilter(cf);
+ }
+
+ @Override
+ public int getOpacity() {
+ return PixelFormat.TRANSLUCENT;
+ }
+
+ void setCornerRadius(float radius) {
+ if (radius < 0f) {
+ throw new IllegalArgumentException("Invalid radius " + radius + ". Must be >= 0");
+ }
+ radius = (int) (radius + .5f);
+ if (mCornerRadius == radius) {
+ return;
+ }
+ mCornerRadius = radius;
+ mDirty = true;
+ invalidateSelf();
+ }
+
+ @Override
+ public void draw(Canvas canvas) {
+ if (mDirty) {
+ buildComponents(getBounds());
+ mDirty = false;
+ }
+ canvas.translate(0, mRawShadowSize / 2);
+ drawShadow(canvas);
+ canvas.translate(0, -mRawShadowSize / 2);
+ sRoundRectHelper.drawRoundRect(canvas, mCardBounds, mCornerRadius, mPaint);
+ }
+
+ private void drawShadow(Canvas canvas) {
+ final float edgeShadowTop = -mCornerRadius - mShadowSize;
+ final float inset = mCornerRadius + mInsetShadow + mRawShadowSize / 2;
+ final boolean drawHorizontalEdges = mCardBounds.width() - 2 * inset > 0;
+ final boolean drawVerticalEdges = mCardBounds.height() - 2 * inset > 0;
+ // LT
+ int saved = canvas.save();
+ canvas.translate(mCardBounds.left + inset, mCardBounds.top + inset);
+ canvas.drawPath(mCornerShadowPath, mCornerShadowPaint);
+ if (drawHorizontalEdges) {
+ canvas.drawRect(0, edgeShadowTop,
+ mCardBounds.width() - 2 * inset, -mCornerRadius,
+ mEdgeShadowPaint);
+ }
+ canvas.restoreToCount(saved);
+ // RB
+ saved = canvas.save();
+ canvas.translate(mCardBounds.right - inset, mCardBounds.bottom - inset);
+ canvas.rotate(180f);
+ canvas.drawPath(mCornerShadowPath, mCornerShadowPaint);
+ if (drawHorizontalEdges) {
+ canvas.drawRect(0, edgeShadowTop,
+ mCardBounds.width() - 2 * inset, -mCornerRadius + mShadowSize,
+ mEdgeShadowPaint);
+ }
+ canvas.restoreToCount(saved);
+ // LB
+ saved = canvas.save();
+ canvas.translate(mCardBounds.left + inset, mCardBounds.bottom - inset);
+ canvas.rotate(270f);
+ canvas.drawPath(mCornerShadowPath, mCornerShadowPaint);
+ if (drawVerticalEdges) {
+ canvas.drawRect(0, edgeShadowTop,
+ mCardBounds.height() - 2 * inset, -mCornerRadius, mEdgeShadowPaint);
+ }
+ canvas.restoreToCount(saved);
+ // RT
+ saved = canvas.save();
+ canvas.translate(mCardBounds.right - inset, mCardBounds.top + inset);
+ canvas.rotate(90f);
+ canvas.drawPath(mCornerShadowPath, mCornerShadowPaint);
+ if (drawVerticalEdges) {
+ canvas.drawRect(0, edgeShadowTop,
+ mCardBounds.height() - 2 * inset, -mCornerRadius, mEdgeShadowPaint);
+ }
+ canvas.restoreToCount(saved);
+ }
+
+ private void buildShadowCorners() {
+ RectF innerBounds = new RectF(-mCornerRadius, -mCornerRadius, mCornerRadius, mCornerRadius);
+ RectF outerBounds = new RectF(innerBounds);
+ outerBounds.inset(-mShadowSize, -mShadowSize);
+
+ if (mCornerShadowPath == null) {
+ mCornerShadowPath = new Path();
+ } else {
+ mCornerShadowPath.reset();
+ }
+ mCornerShadowPath.setFillType(Path.FillType.EVEN_ODD);
+ mCornerShadowPath.moveTo(-mCornerRadius, 0);
+ mCornerShadowPath.rLineTo(-mShadowSize, 0);
+ // outer arc
+ mCornerShadowPath.arcTo(outerBounds, 180f, 90f, false);
+ // inner arc
+ mCornerShadowPath.arcTo(innerBounds, 270f, -90f, false);
+ mCornerShadowPath.close();
+ float startRatio = mCornerRadius / (mCornerRadius + mShadowSize);
+ mCornerShadowPaint.setShader(new RadialGradient(0, 0, mCornerRadius + mShadowSize,
+ new int[]{mShadowStartColor, mShadowStartColor, mShadowEndColor},
+ new float[]{0f, startRatio, 1f},
+ Shader.TileMode.CLAMP));
+
+ // we offset the content shadowSize/2 pixels up to make it more realistic.
+ // this is why edge shadow shader has some extra space
+ // When drawing bottom edge shadow, we use that extra space.
+ mEdgeShadowPaint.setShader(new LinearGradient(0, -mCornerRadius + mShadowSize, 0,
+ -mCornerRadius - mShadowSize,
+ new int[]{mShadowStartColor, mShadowStartColor, mShadowEndColor},
+ new float[]{0f, .5f, 1f}, Shader.TileMode.CLAMP));
+ mEdgeShadowPaint.setAntiAlias(false);
+ }
+
+ private void buildComponents(Rect bounds) {
+ // Card is offset SHADOW_MULTIPLIER * maxShadowSize to account for the shadow shift.
+ // We could have different top-bottom offsets to avoid extra gap above but in that case
+ // center aligning Views inside the CardView would be problematic.
+ final float verticalOffset = mRawMaxShadowSize * SHADOW_MULTIPLIER;
+ mCardBounds.set(bounds.left + mRawMaxShadowSize, bounds.top + verticalOffset,
+ bounds.right - mRawMaxShadowSize, bounds.bottom - verticalOffset);
+ buildShadowCorners();
+ }
+
+ float getCornerRadius() {
+ return mCornerRadius;
+ }
+
+ void getMaxShadowAndCornerPadding(Rect into) {
+ getPadding(into);
+ }
+
+ void setShadowSize(float size) {
+ setShadowSize(size, mRawMaxShadowSize);
+ }
+
+ void setMaxShadowSize(float size) {
+ setShadowSize(mRawShadowSize, size);
+ }
+
+ float getShadowSize() {
+ return mRawShadowSize;
+ }
+
+ float getMaxShadowSize() {
+ return mRawMaxShadowSize;
+ }
+
+ float getMinWidth() {
+ final float content = 2
+ * Math.max(mRawMaxShadowSize, mCornerRadius + mInsetShadow + mRawMaxShadowSize / 2);
+ return content + (mRawMaxShadowSize + mInsetShadow) * 2;
+ }
+
+ float getMinHeight() {
+ final float content = 2 * Math.max(mRawMaxShadowSize, mCornerRadius + mInsetShadow
+ + mRawMaxShadowSize * SHADOW_MULTIPLIER / 2);
+ return content + (mRawMaxShadowSize * SHADOW_MULTIPLIER + mInsetShadow) * 2;
+ }
+
+ void setColor(ColorStateList color) {
+ setBackground(color);
+ invalidateSelf();
+ }
+
+ ColorStateList getColor() {
+ return mBackground;
+ }
+
+ interface RoundRectHelper {
+ void drawRoundRect(Canvas canvas, RectF bounds, float cornerRadius, Paint paint);
+ }
+}
diff --git a/app/src/main/java/com/bytecat/algui/view/SliderView.java b/app/src/main/java/com/bytecat/algui/view/SliderView.java
new file mode 100644
index 0000000..05249d5
--- /dev/null
+++ b/app/src/main/java/com/bytecat/algui/view/SliderView.java
@@ -0,0 +1,226 @@
+package com.bytecat.algui.view;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.bytecat.algui.callback.SliderCallback;
+import android.graphics.RectF;
+import android.animation.ValueAnimator;
+
+public class SliderView extends View {
+
+ private static final int PROGRESS_COLOR = Color.parseColor("#CC7F7FD5");
+ private static final int THUMB_COLOR = Color.parseColor("#E6E0E0E6");
+ private static final int GLOW_COLOR = Color.parseColor("#CC7F7FD5"); // 光环颜色
+
+ private final Rect rect;
+
+ private final Paint paint;
+ private final Paint thumbPaint;
+ private final Paint glowPaint;
+
+ public SliderCallback sliderCallback;
+
+
+ private float originalMax;
+
+ private float originalMin;
+
+ private float max;
+
+ private float progress;
+
+ private int right;
+
+ private boolean isEnabled;
+
+ private float thumbRadius = 15; // 滑块的半径
+ private float thumbRadiusPressed = 30; // 滑块按下时的目标半径
+ private float glowRadius = 40; // 光环的半径
+ private float currentThumbRadius; // 当前滑块半径(用于动画)
+ private boolean isPressed = false; // 是否按下
+
+ public SliderView(Context context) {
+ super(context);
+ rect = new Rect();
+
+ paint = new Paint();
+ paint.setColor(PROGRESS_COLOR);
+ paint.setAntiAlias(true);
+
+ thumbPaint = new Paint();
+ thumbPaint.setColor(THUMB_COLOR);
+ thumbPaint.setAntiAlias(true);
+
+ glowPaint = new Paint();
+ glowPaint.setColor(GLOW_COLOR);
+ glowPaint.setAntiAlias(true);
+ glowPaint.setStyle(Paint.Style.STROKE); // 光环为描边样式
+ glowPaint.setStrokeWidth(10); // 光环的宽度
+
+ setSliderParams(100, 0, 0);
+ currentThumbRadius = thumbRadius; // 初始化当前滑块半径
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+
+
+ float progressWidth = progress / max * getWidth(); // 根据进度计算进度条宽度
+ canvas.drawRect(0, 0, progressWidth, getHeight(), paint);
+
+ // 绘制滑块(圆形)
+ float thumbX = progressWidth; // 滑块中心位于进度条终点
+ float thumbY = getHeight() / 2f;
+ // 如果按下,绘制光环
+ if (isPressed) {
+ canvas.drawCircle(thumbX, thumbY, glowRadius, glowPaint); // 绘制光环
+ }
+
+ // 绘制滑块,根据动画调整大小
+ canvas.drawCircle(thumbX, thumbY, currentThumbRadius, thumbPaint);
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ float percent = progress / max;
+ right = Math.max(Math.min((int) (w * percent), w), 0);
+ invalidate();
+ }
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ if (getParent() != null) {
+ getParent().requestDisallowInterceptTouchEvent(true);
+ }
+
+ float percent = event.getX() / getWidth();
+ float newProgress = Math.max(Math.min(max * percent, max), 0);
+ right = Math.max(Math.min((int) (getWidth() * percent), getWidth()), 0);
+ invalidate();
+
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ // 按下时启动放大动画并显示光环
+ isPressed = true;
+ startScaleAnimation(true);
+ invalidate();
+ break;
+ case MotionEvent.ACTION_MOVE:
+ // 移动时更新进度
+ progress = newProgress;
+ invalidate();
+ break;
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL:
+ // 释放时启动恢复动画并隐藏光环
+ isPressed = false;
+ startScaleAnimation(false);
+ invalidate();
+ break;
+ }
+
+ if (sliderCallback != null && isEnabled) {
+
+ sliderCallback.onSlide(
+ Math.max(Math.min(newProgress + originalMin, originalMax), originalMin),
+ Math.max(Math.min(progress + originalMin, originalMax), originalMin)
+ );
+ progress = newProgress;
+ }
+ return true;
+ }
+
+ private void startScaleAnimation(boolean isPressing) {
+ // 动画目标值
+ float targetRadius = isPressing ? thumbRadiusPressed : thumbRadius;
+
+ // 使用ValueAnimator实现动画
+ ValueAnimator animator = ValueAnimator.ofFloat(currentThumbRadius, targetRadius);
+ animator.setDuration(200); // 动画时长200ms
+ animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+ @Override
+ public void onAnimationUpdate(ValueAnimator animation) {
+ currentThumbRadius = (float) animation.getAnimatedValue(); // 更新当前滑块半径
+ invalidate(); // 重绘视图
+ }
+ });
+
+ animator.start();
+ }
+
+ public void setSliderCallback(SliderCallback sliderCallback) {
+ this.sliderCallback = sliderCallback;
+ }
+
+ public void setSliderParams(float max, float min, float progress) {
+ if (min >= max) {
+ throw new IllegalArgumentException("min >= max");
+ }
+ if (progress < min) {
+ progress = min;
+ } else {
+ progress -= min;
+ }
+ if (progress > max) {
+ progress = max;
+ }
+
+ originalMax = max;
+ originalMin = min;
+
+ this.max = max - min;
+ this.progress = progress;
+
+ if (getWidth() >= 0) {
+ float percent = progress / max;
+ right = Math.max(Math.min((int) (getWidth() * percent), getWidth()), 0);
+ invalidate();
+ }
+ }
+
+ public float getMax() {
+ return originalMax;
+ }
+
+ public float getMin() {
+ return originalMin;
+ }
+
+ public float getProgress() {
+
+ return Math.max(Math.min(progress + originalMin, originalMax), originalMin); // 使用 originalMin 作为下限}
+
+ }
+ public void setMax(float max) {
+ setSliderParams(max, getMin(), getProgress());
+ }
+
+ public void setMin(float min) {
+ setSliderParams(getMax(), min, getProgress());
+ }
+
+ public void setProgress(float progress) {
+ setSliderParams(getMax(), getMin(), progress);
+ }
+
+ public void setThumbRadius(float radius) {
+ this.thumbRadius = radius;
+ invalidate();
+ }
+
+ public void setEnabled1(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ }
+
+}
diff --git a/app/src/main/jni/AlguiLog.h b/app/src/main/jni/AlguiLog.h
new file mode 100644
index 0000000..3d07f8b
--- /dev/null
+++ b/app/src/main/jni/AlguiLog.h
@@ -0,0 +1,112 @@
+#pragma once
+#include
+#include
+#include
+#include
+//Algui日志相关
+//作者:ByteCat *_* 作者QQ:3353484607 游戏逆向交流QQ群:931212209
+
+//安卓日志
+#define ALOGTAG "ALGUI"
+#define ALOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))//信息
+#define ALOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, LOGTAG, __VA_ARGS__))//警告
+#define ALOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG, LOGTAG, __VA_ARGS__))//调试
+#define ALOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOGTAG, __VA_ARGS__))//错误
+
+//Algui日志
+//日志优先级
+#define ALGUI_LOG_UNKNOWN 0 /** 仅供内部使用。 */
+#define ALGUI_LOG_DEFAULT 1 /** 默认优先级,仅供内部使用。 */
+#define ALGUI_LOG_VERBOSE 2 /** 详细日志。通常在发布版 apk 中应禁用。 */
+#define ALGUI_LOG_DEBUG 3 /** 调试日志。通常在发布版 apk 中应禁用。 */
+#define ALGUI_LOG_INFO 4 /** 信息日志。通常在发布版 apk 中应禁用。 */
+#define ALGUI_LOG_WARN 5 /** 警告日志。用于可恢复的故障。 */
+#define ALGUI_LOG_ERROR 6 /** 错误日志。用于不可恢复的故障。 */
+#define ALGUI_LOG_FATAL 7 /** 致命日志。用于中止时。 */
+#define ALGUI_LOG_SILENT 8 /** 仅供内部使用。 */
+
+#define ALGUILOGFILE "/storage/emulated/0/Android/内部调试.txt"//Algui日志输出文件路径
+
+#define LOG(priority, tag, ...) \
+ ((void)__algui_log_print__(priority, tag, __VA_ARGS__))// 自定义日志宏
+#define LOGV(tag, ...) LOG(ALGUI_LOG_VERBOSE, tag, __VA_ARGS__)// 详细级别日志宏 /** 通常在发布版 apk 中应禁用。 */
+#define LOGD(tag, ...) LOG(ALGUI_LOG_DEBUG, tag, __VA_ARGS__)// 调试级别日志宏 /** 通常在发布版 apk 中应禁用。 */
+#define LOGI(tag, ...) LOG(ALGUI_LOG_INFO, tag, __VA_ARGS__)// 信息级别日志宏 /** 通常在发布版 apk 中应禁用。 */
+#define LOGW(tag, ...) LOG(ALGUI_LOG_WARN, tag, __VA_ARGS__)// 警告级别日志宏 /** 用于可恢复的故障。 */
+#define LOGE(tag, ...) LOG(ALGUI_LOG_ERROR, tag, __VA_ARGS__)// 错误级别日志宏 /** 用于不可恢复的故障。 */
+#define LOGF(tag, ...) LOG(ALGUI_LOG_FATAL, tag, __VA_ARGS__)// 致命级别日志宏 /** 用于中止时。 */
+
+
+const char* __priorityToString__(int priority);//将优先级映射到字符串
+int __algui_log_print__(int priority, const char* tag, const char* format, ...);//在Algui日志文件中写入一行信息
+
+
+
+///
+/// 将优先级映射到字符串
+///
+/// 优先级id
+/// 优先级字符串
+const char* __priorityToString__(int priority) {
+ switch (priority) {
+ case ALGUI_LOG_VERBOSE: return "VERBOSE";
+ case ALGUI_LOG_DEBUG: return "DEBUG";
+ case ALGUI_LOG_INFO: return "INFO";
+ case ALGUI_LOG_WARN: return "WARN";
+ case ALGUI_LOG_ERROR: return "ERROR";
+ case ALGUI_LOG_FATAL: return "FATAL";
+ case ALGUI_LOG_SILENT: return "SILENT";
+ case ALGUI_LOG_UNKNOWN:
+ default: return "UNKNOWN";
+ }
+}
+///
+/// 在Algui日志文件中写入一行信息
+///
+/// 优先级
+/// 日志标签
+/// 日志信息
+/// 日志信息可变参数
+/// 成功与否
+int __algui_log_print__(int priority, const char* tag, const char* format, ...) {
+ //以追加模式打开文件
+ FILE* file = fopen(ALGUILOGFILE, "a");
+ if (file == nullptr) {
+ return -1;
+ }
+
+ //获取当前时间
+ struct timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+
+ //将时间转换为本地时间
+ time_t now = ts.tv_sec;
+ struct tm* timeinfo = localtime(&now);
+
+ //打印时间戳
+ fprintf(file, "[%04d-%02d-%02d %02d:%02d:%02d.%03ld] ",
+ timeinfo->tm_year + 1900,
+ timeinfo->tm_mon + 1,
+ timeinfo->tm_mday,
+ timeinfo->tm_hour,
+ timeinfo->tm_min,
+ timeinfo->tm_sec,
+ ts.tv_nsec / 1000000L); //纳秒转为毫秒
+
+ //打印日志优先级
+ fprintf(file, "[%s] ", __priorityToString__(priority));
+
+ //打印日志标签
+ fprintf(file, "[%s] ", tag);
+
+ //打印信息内容
+ va_list args;
+ va_start(args, format); //初始化 va_list,用于访问可变参数
+ vfprintf(file, format, args); //将格式化的日志消息写入文件
+ va_end(args); //结束 va_list 的使用
+
+ fprintf(file, "\n"); //添加换行
+
+ fclose(file); //关闭文件
+ return 0;
+}
diff --git a/app/src/main/jni/AlguiMemTool.h b/app/src/main/jni/AlguiMemTool.h
new file mode 100644
index 0000000..4b60b06
--- /dev/null
+++ b/app/src/main/jni/AlguiMemTool.h
@@ -0,0 +1,3360 @@
+#pragma once
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include //kill信号定义在此
+
+using namespace std;
+
+//小白已经在2021年被凌烟kill了
+
+
+
+//AlguiMemTool开源版本:3.0.24109 [🤪警告:仅供Algui外挂模板使用 请勿在其它外挂模板使用可能会发生很多问题]
+/*
+ * MIT License
+ *
+ * 版权所有 (c) [2024] ByteCat
+ *
+ * 特此授予任何获得本项目及相关文档文件 副本的人,免费使用该软件的权利,包括但不限于使用、复制、修改、合并、出版、分发、再许可和/或出售该软件的副本,以及允许他人这样做,条件如下:
+ *
+ * 1. 上述版权声明和本许可声明应包含在所有副本或实质性部分中。
+ * 2. 本软件是按“原样”提供的,不附有任何形式的明示或暗示的担保,包括但不限于对适销性、特定用途的适用性和不侵权的担保。
+ * 3. 在任何情况下,作者或版权持有人对因使用本项目或与本项目的其他交易而引起的任何索赔、损害或其他责任不承担任何责任,无论是在合同、侵权或其他方面。
+ * 4. 请注意,**禁止删除或修改本版权声明和作者信息**,以确保所有用户都能了解软件的来源和许可条款。
+ * * **请勿删除下面的信息!**
+ * 作者:ByteCat *_*
+ * 游戏逆向交流QQ群:931212209
+ * 作者QQ:3353484607
+ * 私人定制请联系我 => 接C/C++ Java 安卓开发 联系作者QQ:3353484607
+ * 此项目对接到Java请联系我 联系作者QQ:3353484607
+ */
+
+
+
+ // 更新内容(只列出重要更新):
+ // 0. 新增完整的联合搜索 完全和GG修改器的联合搜索一样
+ // 1. 所有修改内存数据操作 都会对当前进程进行内存保护🛡️ 防止GG模糊搜索
+ // 注意:内存保护只对当前进程有效 意味着只有直装能够防模糊 Root修改外部进程时无法防模糊[可能需要附加调试器进行代码注入]
+ // 所以如果你开发的是Root插件辅助请使用简单粗暴的方式 直接调用killGG_Root();方法来杀掉GG修改器
+ // 2. Ca内存已适配android11+ scudo内存分配器 修复了某些Ca内存数据搜不到
+ // 3. 完全兼容了模拟器架构
+ // 4. 内存搜索已支持范围搜索 例如:10~20
+ // 5. 动静态基址修改 已兼容所有基址头 HEAD_XA,HEAD_CD,HEAD_CB
+ // 6. 所有修改内存数据操作 新增冻结修改 例如:MemoryOffsetWrite("99999", TYPE_DWORD, 0, true); 将bool参数改为true则冻结 否则改为false则停止冻结
+ // 7. 新增打印搜索结果列表到指定文件 和 打印冻结列表到指定文件的 调试方法
+ // 8. 新增所有常用数据类型和常用内存范围
+ // 9. 重写了所有内存筛选规则,对于内存筛选更加精准了
+ // 10. 新增一些Root跨进程工具
+ // 11. 很多逻辑都进行了原理注释 让新手更好学习
+ //
+ // 2024-10-9 更新内容:
+ // 0. 联合搜索增加了对范围联合搜索的支持 例:0.1F;3~6D;9
+ // 1. 新增内存改善 休眠进程 解冻进程
+ // 2. 偏移改善增加了对范围改善和联合改善的支持
+ // 2. ~偏移联合改善 -适用于:某些副特征码会变化但是永远只会变为那几个固定值的情况 比如只会变化为22或15或27时可以使用偏移联合改善22;15;27
+ // 2. ~偏移范围改善 -适用于:某些副特征码会变化但是只会在一个范围之内变化时 比如特征码始终为1或2或3时 可以使用偏移范围改善使用1~3即可
+ // 3. 优化搜索速度
+ // 4. 修复潜在溢出
+ // 5. 修复一亿个bug
+
+ //初始化ABI字符串
+#if defined(__arm__) && !defined(__aarch64__) //针对 ARM 32 位架构
+#define ABI "ARM32"
+#elif defined(__aarch64__) //针对 ARM 64 位架构
+#define ABI "ARM64"
+#elif defined(__x86_64__) || defined(_M_X64) //针对 x64 架构
+#define ABI "x64"
+#elif defined(__i386__) || defined(_M_IX86) //针对 x86 架构
+#define ABI "x86"
+#else // 其他架构或未知架构
+#define ABI "null"
+#endif
+//内存区域
+#define RANGE_ALL 0 // 所有内存区域 - 全部内存
+#define RANGE_JAVA_HEAP 2 // Java 虚拟机堆内存 - jh内存
+#define RANGE_C_HEAP 1 // C++ 堆内存 - ch内存
+#define RANGE_C_ALLOC 4 // C++ 分配的内存 - ca内存 [已适配 android11+ scudo内存分配器]
+#define RANGE_C_DATA 8 // C++ 的数据段 - cd内存
+#define RANGE_C_BSS 16 // C++ 未初始化的数据 - cb内存
+#define RANGE_ANONYMOUS 32 // 匿名内存区域 - a内存
+#define RANGE_JAVA 65536 // Java 虚拟机内存 - j内存
+#define RANGE_STACK 64 // 栈内存区域 - s内存
+#define RANGE_ASHMEM 524288 // Android 共享内存 - as内存
+#define RANGE_VIDEO 1048576 // 视频内存区域 - v内存
+#define RANGE_OTHER -2080896 // 其他内存区域 - o内存
+#define RANGE_B_BAD 131072 // 错误的内存区域 - b内存
+#define RANGE_CODE_APP 16384 // 应用程序代码区域 - xa内存
+#define RANGE_CODE_SYSTEM 32768 // 系统代码区域 - xs内存
+
+#if defined(__arm__) || defined(__aarch64__) //arm32和arm64架构
+#define BCMAPSFLAG(mapLine, id) \
+ (\
+ (id) == RANGE_ALL ? true: \
+ (id) == RANGE_JAVA_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_C_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[heap]")!=NULL) : \
+ (id) == RANGE_C_ALLOC ? (strstr(mapLine, "rw")!=NULL && (strstr(mapLine, "[anon:libc_malloc]")!=NULL || strstr(mapLine,"[anon:scudo")!=NULL)) : \
+ (id) == RANGE_C_DATA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_C_BSS ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[anon:.bss]")!=NULL) : \
+ (id) == RANGE_ANONYMOUS ? (strstr(mapLine, "rw")!=NULL && strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) : \
+ (id) == RANGE_JAVA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_STACK ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[stack")!=NULL) : \
+ (id) == RANGE_ASHMEM ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && strstr(mapLine, "/dev/ashmem/")!=NULL && strstr(mapLine,"dalvik")==NULL) : \
+ (id) == RANGE_VIDEO ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "/dev/mali")!=NULL) : \
+ (id) == RANGE_B_BAD ? (strstr(mapLine, "r")!=NULL && (strstr(mapLine, "kgsl-3d0")!=NULL||strstr(mapLine, ".ttf")!=NULL)) : \
+ (id) == RANGE_CODE_APP ? (strstr(mapLine, " r")!=NULL && strstr(mapLine, "xp")!=NULL && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL || (strstr(mapLine, "/dev/ashmem/")!=NULL&& strstr(mapLine,"dalvik")!=NULL) ||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_CODE_SYSTEM ? (strstr(mapLine, " r")!=NULL && strstr(mapLine, "xp")!=NULL && (strstr(mapLine, "/system")!=NULL || strstr(mapLine, "/vendor") !=NULL || strstr(mapLine, "/apex") !=NULL || strstr(mapLine, "/memfd") !=NULL || strstr(mapLine, "[vdso")!=NULL)) : \
+ (id) == RANGE_OTHER ? (strstr(mapLine, "rw")!=NULL && !(strstr(mapLine, "dalvik-")!=NULL||strstr(mapLine, "[heap]")!=NULL||strstr(mapLine, "[anon:libc_malloc]")!=NULL || strstr(mapLine,"[anon:scudo")!=NULL || strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL ||strstr(mapLine, "/data/user/")!=NULL|| strstr(mapLine, "[anon:.bss]")!=NULL || (strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) ||strstr(mapLine, "[stack")!=NULL||strstr(mapLine, "/dev/ashmem/")!=NULL||strstr(mapLine, "/dev/mali")!=NULL||strstr(mapLine, "kgsl-3d0")!=NULL||strstr(mapLine, ".ttf")!=NULL||strstr(mapLine, "/system")!=NULL||strstr(mapLine, "/vendor")!=NULL||strstr(mapLine, "/apex")!=NULL||strstr(mapLine, "/memfd")!=NULL||strstr(mapLine, "[vdso")!=NULL)) : \
+ true\
+ )
+#else //x86和x64架构 针对雷电9模拟器《已知bug:cd可能会多搜到一些xa的数据》
+#define BCMAPSFLAG(mapLine, id) \
+ (\
+ (id) == RANGE_ALL ? true: \
+ (id) == RANGE_JAVA_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_C_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[heap]")!=NULL) : \
+ (id) == RANGE_C_ALLOC ? (strstr(mapLine, "rw")!=NULL && (strstr(mapLine, "[anon:libc_malloc]")!=NULL || strstr(mapLine,"[anon:scudo")!=NULL)) : \
+ (id) == RANGE_C_DATA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_C_BSS ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[anon:.bss]")!=NULL) : \
+ (id) == RANGE_ANONYMOUS ? (strstr(mapLine, "rw")!=NULL && strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) : \
+ (id) == RANGE_JAVA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_STACK ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[stack")!=NULL) : \
+ (id) == RANGE_ASHMEM ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && strstr(mapLine, "/dev/ashmem/")!=NULL && strstr(mapLine,"dalvik")==NULL) : \
+ (id) == RANGE_VIDEO ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "/dev/mali")!=NULL) : \
+ (id) == RANGE_B_BAD ? (strstr(mapLine, "r")!=NULL && (strstr(mapLine, "kgsl-3d0")!=NULL||strstr(mapLine, ".ttf")!=NULL)) : \
+ (id) == RANGE_CODE_APP ? (strstr(mapLine, " r")!=NULL && (strstr(mapLine, "xp")!=NULL||strstr(mapLine, "--p")!=NULL) && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL || (strstr(mapLine, "/dev/ashmem/")!=NULL&& strstr(mapLine,"dalvik")!=NULL) ||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_CODE_SYSTEM ? (strstr(mapLine, " r")!=NULL && (strstr(mapLine, "xp")!=NULL||strstr(mapLine, "--p")!=NULL) && (strstr(mapLine, "/system")!=NULL || strstr(mapLine, "/vendor") !=NULL || strstr(mapLine, "/apex") !=NULL || strstr(mapLine, "/memfd") !=NULL || strstr(mapLine, "[vdso")!=NULL)) : \
+ (id) == RANGE_OTHER ? (strstr(mapLine, "rw") != NULL && !(strstr(mapLine, "dalvik-") != NULL || strstr(mapLine, "[heap]") != NULL || strstr(mapLine, "[anon:libc_malloc]") != NULL || strstr(mapLine, "[anon:scudo") != NULL || strstr(mapLine, "/data/app/") != NULL || strstr(mapLine, "/data/data/") != NULL || strstr(mapLine, "/data/user/") != NULL || strstr(mapLine, "[anon:.bss]") != NULL || (strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) || strstr(mapLine, "[stack") != NULL || strstr(mapLine, "/dev/ashmem/") != NULL || strstr(mapLine, "/dev/mali") != NULL || strstr(mapLine, "kgsl-3d0") != NULL || strstr(mapLine, ".ttf") != NULL || strstr(mapLine, "/system") != NULL || strstr(mapLine, "/vendor") != NULL || strstr(mapLine, "/apex") != NULL || strstr(mapLine, "/memfd") != NULL || strstr(mapLine, "[vdso") != NULL)) : \
+ true\
+ )
+#endif
+//(id) == RANGE_OTHER ? (strstr(mapLine, "rw") != NULL && strstr(mapLine, "[anon:mmv8]")!=NULL) : \
+
+//基址头
+#define HEAD_XA 0 //xa基址头
+#define HEAD_CD 1 //cd基址头
+#define HEAD_CB 2 //cb基址头 [bss]
+
+//数据类型
+#define TYPE_DWORD 4 // DWORD 类型 - D类型
+#define TYPE_FLOAT 16 // FLOAT 类型 - F类型
+#define TYPE_DOUBLE 64 // DOUBLE 类型 - E类型
+#define TYPE_WORD 2 // WORD 类型 - W类型
+#define TYPE_BYTE 1 // BYTE 类型 - B类型
+#define TYPE_QWORD 32 // QWORD 类型 - Q类型
+
+//映射数据类型别名 方便管理
+#define DWORD int32_t // 32 位有符号整数
+#define FLOAT float // 单精度浮点数
+#define DOUBLE double // 双精度浮点数
+#define WORD signed short // 有符号短整型
+#define BYTE signed char // 有符号字符
+#define QWORD int64_t // 64 位有符号整数
+
+//范围搜索格式
+#define R_SEPARATE "~" // 范围搜索符号
+
+//联合搜索格式
+#define U_DEFRANGE 512 // 默认搜索附近范围
+#define U_SEPARATE ";" // 数据分隔符
+#define U_RANGESEPARATE ":" // 数据范围符【存在两个此符号将视为按顺序搜索】
+#define U_dword "d" // 32 位有符号整数
+#define U_float "f" // 单精度浮点数
+#define U_double "e" // 双精度浮点数
+#define U_word "w" // 有符号短整型
+#define U_byte "b" // 有符号字符
+#define U_qword "q" // 64 位有符号整数
+#define U_DWORD "D" // 32 位有符号整数的大写
+#define U_FLOAT "F" // 单精度浮点数的大写
+#define U_DOUBLE "E" // 双精度浮点数的大写
+#define U_WORD "W" // 有符号短整型的大写
+#define U_BYTE "B" // 有符号字符的大写
+#define U_QWORD "Q" // 64 位有符号整数的大写
+
+#define FLAG_FREE "FREE" //修改时只进行冻结的标志
+//结构体声明:
+struct Item;//内存数据项
+struct Federated;//联合搜索项
+struct Protection;//内存保护-防模糊优化
+//全局变量
+bool isInit = false;//是否进行了初始化
+bool isSecureWrites = false;//是否进行安全写入
+bool isMapsMemArea = false;//是否为自定义内存区域
+int pid = -1;//存储进程ID
+char* packName;//存储进程包名
+int memory = RANGE_ALL;//存储要搜索的内存区域【默认所有内存】
+char* memoryMaps;//存储自定义要搜索的内存区域【maps内存段 使用自定义内存区域可以精准搜索并且提升100倍搜索速度】
+char memPath[1024];//存储进程mem内存映射虚拟文件路径
+char mapsPath[1024];//存储进程maps内存区域映射文件路径
+uint32_t freezeDelay = 200;//冻结修改延迟(毫秒)默认200ms
+static bool isFreeze;//是否正在冻结 确保只开一个冻结线程
+vector < Item > FreezeList;//冻结修改项列表
+vector < unsigned long >outcomeList;//最终搜索结果列表 - 存储最终筛选出的数据的内存地址列表
+vector < Protection > ProtectList;//保护项列表
+std::mutex lockMutex;//互斥锁 防止全局数据竞争
+
+//函数声明:
+//初始化
+int getPID(const char* packageName);// 获取进程ID
+int setPackageName(const char* packageName);// 设置目标包名 【注意:这是初始化函数,不调用此函数的话其它内存操作均失效】
+void setIsSecureWrites(bool sw);// 设置安全写入启用状态
+
+
+//模块[动/静]态基址偏移内存修改
+unsigned long getModuleBaseAddr(const char* module_name, int headType);//获取模块起始地址(基址)
+unsigned long jump(unsigned long addr,int count);//跳转指针
+unsigned long jump32(unsigned long addr);//跳转指针 [32位]
+unsigned long jump64(unsigned long addr);//跳转指针 [64位]
+int setMemoryAddrValue(const char* value, unsigned long addr, int type, bool isFree,bool isSecure);//设置指定内存地址指向的值 🛡️该方法已对当前进程进行保护 防止GG模糊🛡️
+char* getMemoryAddrData(unsigned long addr, int type);//获取指定内存地址的数据
+
+//内存搜索
+void setMemoryArea(int memoryArea);//设置要搜索的内存区域
+void setMemoryArea(const char* memoryArea);//设置自定义搜索的内存区域 好处:能精准找到想要的数据,并且搜索速度直接提升100倍 坏处:需要自己去找数据所在的maps内存段 示例:setMemoryArea("/apex/com.android.tethering/lib64/libframework-connectivity-jni.so");
+vector < unsigned long > MemorySearch(const char* value, int type);//内存搜索 【支持范围搜索 格式:最小值~最大值(同GG) 支持联合搜索 格式:值1;值2;值3;n个值:范围 示例:2D;3F;4E:50 或 2D;3F;4E没有范围则使用默认范围,两个范围符::代表按顺序搜索 (同GG)】
+vector < unsigned long > MemorySearchRange(const char* value, int type);//范围内存搜索 【格式:最小值~最大值 (同GG)】
+vector < unsigned long > MemorySearchUnited(const char* value, int type);//联合内存搜索 【格式:值1;值2;值3;n个值:附近范围 示例:2D;3F;4E:50 或 2D;3F;4E没有范围则使用默认范围,两个范围符::代表按顺序搜索 (同GG) 并且值也支持范围例如1~2;3:64】
+vector < unsigned long > ImproveOffset(const char* value, int type, unsigned long offset);//偏移改善 [筛选偏移处特征值 支持联合改善,范围改善]
+vector < unsigned long > ImproveOffsetRange(const char* value, int type, unsigned long offset);//偏移范围改善 [筛选偏移处只会在一个范围内变化的特征值] 【格式:最小值~最大值 (同GG)】
+vector < unsigned long > ImproveOffsetUnited(const char* value, int type, unsigned long offset);//偏移联合改善 [筛选偏移处永远只会为某些值的特征值] 【格式:值1;值2;n个值; 示例:2D;3F;4E 或 2D;3~6F;9E 注:联合改善不支持附近范围和顺序改善】
+vector < unsigned long > ImproveValue(const char* value, int type);//改善 [支持联合改善,范围改善]
+int MemoryOffsetWrite(const char* value,int type, unsigned long offset, bool isFree,bool isSecure);//结果偏移写入数据 🛡️该方法已对当前进程进行保护 防止GG模糊🛡️
+int getResultCount();//获取最终搜索结果数量
+vector < unsigned long > getResultList();//获取最终搜索结果列表
+int printResultListToFile(const char* filePath);//打印最终搜索结果列表到指定文件
+int clearResultList();//清空最终搜索结果列表
+
+//内存保护二次修改
+void MemoryProtect(unsigned long addr);
+int getProtectionNum();
+//冻结内存修改
+vector < Item > getFreezeList();//获取冻结修改项列表
+void setFreezeDelayMs(uint32_t delay);//设置冻结修改延迟【毫秒】
+int getFreezeNum();//获取冻结修改项数量
+int addFreezeItem(const char* value, unsigned long addr, int type); // 添加一个冻结修改项
+int removeFreezeItem(unsigned long addr); // 移除一个冻结修改项
+int removeAllFreezeItem();//移除所有冻结修改项
+void* freezeThread(void* arg); // 冻结循环修改线程
+int startAllFreeze(); // 开始冻结所有修改项
+int stopAllFreeze(); // 停止冻结所有修改项
+int printFreezeListToFile(const char* filePath);//打印冻结列表到指定文件
+
+//获取内存信息相关工具
+char* getMemoryAddrMapLine(unsigned long address);//获取指定内存地址的Maps映射行
+char* getMapLineMemoryAreaName(const char* mapLine);//获取Maps映射行所在内存区域名称
+char* getMemoryAreaIdName(int memid);//获取指定内存id的内存名称
+char* getMemoryAreaName();//获取当前内存名称
+char* getDataTypeName(int typeId);//获取指定数据类型id的数据类型名称
+
+//完全需要ROOT权限的操作
+//PS:告诉一下菜鸟,这些操作涉及到跨进程和系统操作,所以必须完全ROOT,直装也没用
+//--kill--
+int killProcess_Root(const char* packageName); // 杀掉指定包名的进程 (此方法对于执行者自身进程无需Root)
+int stopProcess_Root(const char* packageName); // 暂停指定包名的进程 (此方法对于执行者自身进程无需Root)
+int resumeProcess_Root(const char* packageName); // 恢复被暂停的指定包名的进程 (此方法对于执行者自身进程无需Root)
+void killAllInotify_Root(); // 杀掉所有inotify监视器,防止游戏监视文件变化
+int killGG_Root(); // 杀掉GG修改器
+int killXscript_Root(); // 杀掉XS脚本
+//--Other--
+int rebootsystem_Root(); // 重启手机
+int installapk_Root(const char* apkPackagePath); // 静默安装 指定路径的APK安装包
+int uninstallapk_Root(const char* packageName); // 静默卸载 指定包名的APK软件
+int Cmd(const char* command);//执行命令
+int Cmd_Root(const char* command);//执行超级命令
+
+//-内部耗时操作
+//void __MemorySearch__(const char* value, int type);//内存搜索
+//void __MemorySearchRange__(const char* value, int type);//范围内存搜索
+//void __MemorySearchUnited__(const char* value, int type);//联合内存搜索
+//void __ImproveOffset__(const char* value, int type, unsigned long offset);//偏移改善
+//void __ImproveOffsetRange__(const char* value, int type, unsigned long offset);//偏移范围改善
+//void __ImproveOffsetUnited__(const char* value, int type, unsigned long offset);//偏移联合改善
+//void __ImproveValue__(const char* value, int type);//改善
+
+///
+/// 内存数据项
+///
+struct Item {
+ char* value;//值
+ unsigned long addr;//地址
+ int type; //类型
+};
+
+///
+/// 联合搜索项
+///
+struct Federated {
+ char* value;//搜索值
+ int type;//类型
+ bool isRange = false;//是否为范围值 例1~20
+ char minValue[64 + 2];//最小值(范围值)
+ char maxValue[64 + 2];//最大值(范围值)
+ ///
+ /// 构造
+ ///
+ /// 搜索值
+ /// 默认类型:如果值没有+类型字母符则使用此默认类型
+ Federated(const char* v, int defType) {
+ //初始化类型
+ if (strstr(v, U_dword) != nullptr || strstr(v, U_DWORD) != nullptr) {
+ type = TYPE_DWORD;
+ }
+ else if (strstr(v, U_float) != nullptr || strstr(v, U_FLOAT) != nullptr) {
+ type = TYPE_FLOAT;
+ }
+ else if (strstr(v, U_double) != nullptr || strstr(v, U_DOUBLE) != nullptr) {
+ type = TYPE_DOUBLE;
+ }
+ else if (strstr(v, U_word) != nullptr || strstr(v, U_WORD) != nullptr) {
+ type = TYPE_WORD;
+ }
+ else if (strstr(v, U_byte) != nullptr || strstr(v, U_BYTE) != nullptr) {
+ type = TYPE_BYTE;
+ }
+ else if (strstr(v, U_qword) != nullptr || strstr(v, U_QWORD) != nullptr) {
+ type = TYPE_QWORD;
+ }
+ else {
+ type = defType;
+ }
+
+ //初始化值
+ value = strdup(v);
+
+ //去除值中的类型字母符
+ int j = 0; //用于跟踪新的字符串索引
+ for (int i = 0; value[i] != '\0'; i++) {
+ //检查当前字符是否为字母
+ if (!isalpha(value[i])) {
+ //如果不是字母,则将其放到前面
+ value[j] = value[i];
+ j++;
+ }
+ }
+ value[j] = '\0'; //添加字符串结束符
+
+ //如果是范围值 [这里不要使用strtok来获取 因为如果外部正在使用strtok来初始化时这将影响到外部strtok的分割]
+ char* start = strstr(value, R_SEPARATE);
+ if (start != NULL) {
+ strncpy(minValue, value, start - value); //从开头到分隔符的部分为最小值
+ minValue[start - value] = '\0'; //最小值最后的位置添加字符串结束符
+ strcpy(maxValue, start + 1); //从分隔符后一个字符开始为最大值
+ isRange = true;
+ }
+ }
+
+};
+
+///
+/// 内存保护
+///
+struct Protection {
+ unsigned long addr;//地址
+};
+
+/////
+///// 内存搜索
+/////
+///// 搜索值
+///// 搜索类型
+//void MemorySearch(const char* value, int type) {
+// std::thread t([=]() {
+// // 加锁,确保在访问 outcomeList 时是安全的
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __MemorySearch__(value, type); // 假设 __MemorySearch__ 函数会操作 outcomeList
+// });
+// t.detach();
+//}
+//
+/////
+///// 内存搜索某个范围区域内的所有值
+/////
+///// 范围值 格式:10~20
+///// 搜索类型
+//void MemorySearchRange(const char* value, int type) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __MemorySearchRange__(value, type);
+// });
+// t.detach();
+//}
+//
+/////
+///// 联合内存搜索 [注意:附近范围某些情况可能会比GG多4~8个字节]
+/////
+///// 联合搜索值 格式:值1;值2;值3;n个值:附近范围
+///// 默认联合搜索类型
+//void MemorySearchUnited(const char* value, int type) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __MemorySearchUnited__(value, type);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 筛选结果附近指定偏移处具有指定特征值的结果
+/////
+///// 数据附近特征值
+///// 特征值数据类型
+///// 特征值相对主数据的偏移量
+//void ImproveOffset(const char* value, int type, unsigned long offset) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveOffset__(value, type, offset);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 筛选指定偏移处的值在这个范围内的结果
+/////
+///// 范围值[格式:最小~最大]
+///// 数据类型
+//void ImproveOffsetRange(const char* value, int type, unsigned long offset) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveOffsetRange__(value, type, offset);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 筛选指定偏移处的值为联合值中的某一个值的结果
+/////
+///// 联合筛选值
+///// 默认类型
+//void ImproveOffsetUnited(const char* value, int type, unsigned long offset) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveOffsetUnited__(value, type, offset);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 直接改善 [支持范围改善和联合改善]
+/////
+///// 改善值
+///// 默认类型
+//void ImproveValue(const char* value, int type) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveValue__(value, type);
+// });
+// t.detach();
+//}
+
+///
+/// 通过包名获取进程ID
+///
+/// 进程APK包名
+/// 进程ID
+int getPID(const char* packageName)
+{
+ int id = -1; // 进程ID,初始化为-1,表示未找到
+ DIR* dir; // 目录流指针
+ FILE* fp; // 文件指针
+ char filename[64]; // 存储/proc/[pid]/cmdline路径
+ char cmdline[64]; // 存储进程的命令行信息
+ struct dirent* entry; // 目录项结构体,用于存储目录中的条目
+
+ dir = opendir("/proc"); // 打开/proc目录
+ if (dir != NULL) {
+ while ((entry = readdir(dir)) != NULL) // 遍历/proc目录下的每一个条目
+ {
+ id = atoi(entry->d_name); // 将条目名转换为进程ID
+ if (id >= 0) // 过滤非进程ID的条目
+ {
+ sprintf(filename, "/proc/%d/cmdline", id); // 生成进程命令行文件路径
+ fp = fopen(filename, "r"); // 打开命令行文件
+ if (fp != NULL)
+ {
+ fgets(cmdline, sizeof(cmdline), fp); // 读取命令行信息
+ fclose(fp); // 关闭文件
+ if (strcmp(packageName, cmdline) == 0) // 比较包名与命令行信息
+ {
+ closedir(dir); // 关闭目录
+ return id;//找到了
+ }
+ }
+ }
+ }
+ closedir(dir); // 关闭目录
+ }
+ return -1; // 未找到进程,返回-1
+}
+
+///
+/// 设置包名,函数内部将获取该包名的进程ID方便之后操作
+///
+/// 进程APK包名
+/// 进程ID
+int setPackageName(const char* packageName)
+{
+ pid = getPID(packageName);
+ if (pid != -1) {
+ sprintf(memPath, "/proc/%d/mem", pid);//初始化构造mem内存文件路径
+ sprintf(mapsPath, "/proc/%d/maps", pid);//初始化构造maps内存文件路径
+ isInit = true;//进行了初始化
+ packName = strdup(packageName);//设置包名
+ //outcomeList.reserve(100000000); // 预分配足够的内存
+ }
+ return pid;
+}
+
+///
+/// 设置安全写入的启用状态
+///
+/// 状态
+void setIsSecureWrites(bool sw) {
+ isSecureWrites = sw;
+}
+
+
+
+
+
+
+///
+/// 获取动态共享库的基址(起始地址)
+///
+/// 动态共享库名称(后缀.so文件)
+/// 基址头类型
+/// 基地址
+unsigned long getModuleBaseAddr(const char* module_name, int headType)
+{
+ if (!isInit) {
+ //未进行初始化
+ return 0;
+ }
+
+ //存储模块名称
+ char* mod_name = strdup(module_name); //复制字符串
+ if (mod_name == NULL) {
+ perror("strdup failed");
+ return 0;
+ }
+ //检测如果包含:bss则去除
+ char* pos = strstr(mod_name, ":bss");
+ if (pos != NULL) {
+ //如果找到bss
+ *pos = '\0'; //将:bss换成字符串中断符进行截断
+ }
+ FILE* fp; //文件指针
+ unsigned long start = 0;//存储获取到的模块的起始地址
+ unsigned long end = 0;//存储获取到的模块的结束地址
+ char line[1024]; //存储读取的行
+ bool cb = false; //是否开始查询bss
+ bool isFoundIt = false;//是否找到
+ fp = fopen(mapsPath, "r");
+ if (fp != NULL)
+ {
+ //逐行读取文件
+ while (fgets(line, sizeof(line), fp))
+ {
+ if (isMapsMemArea) {
+ //对于自定义内存区域
+ if (strstr(line, memoryMaps)) {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+ break;
+ }
+ }
+ else {
+ switch (headType) {
+ case HEAD_XA:
+ {
+ //查找行中是否包含模块名
+ if (strstr(line, mod_name) && BCMAPSFLAG(line, RANGE_CODE_APP))
+ {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+
+ //转换特殊地址
+ if (start == 0x8000) {
+ start = 0;
+ }
+ isFoundIt = true;//找到了
+ }
+ }
+ break;
+ case HEAD_CD://由于cd的结束地址是cb的起始地址 所以要先找到cb的起始地址 因此这里使用贯穿
+ case HEAD_CB:
+ {
+ //找到模块名之后才开始查询bss
+ if (strstr(line, mod_name) && BCMAPSFLAG(line, RANGE_CODE_APP))
+ {
+ cb = true;
+ }
+ if (cb)
+ {
+ if (BCMAPSFLAG(line, RANGE_C_BSS))
+ {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+ //如果是cb则直接找到
+ if (headType == HEAD_CB) {
+ isFoundIt = true;//找到了
+ break;
+ }
+ //如果是cd则开始查cd
+ if (headType == HEAD_CD) {
+ //将cb起始地址格式化为结束地址作为cd的筛选条件
+ char str[100];
+ sprintf(str, "-%lx", start);
+
+ //重置文件指针到文件的开始位置
+ fseek(fp, 0, SEEK_SET);
+ //重新逐行读取文件
+ while (fgets(line, sizeof(line), fp)) {
+ if (strstr(line, str))
+ {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+ isFoundIt = true;//找到了
+ break;
+ }
+ }
+ //重置文件指针到文件的开始位置
+ fseek(fp, 0, SEEK_SET);
+ }
+ }
+ }
+ }
+ break;
+ }
+ //检查是否找到
+ if (isFoundIt) {
+ break;//跳出循环
+ }
+ }
+
+ }
+ //关闭文件
+ fclose(fp);
+ }
+ //释放模块字符串
+ free(mod_name);
+ // 返回模块的基地址
+ return start;
+}
+///
+/// 跳转到指定内存地址的指针
+///
+/// 内存地址
+// 要读取的字节数
+/// 指针地址
+unsigned long jump(unsigned long addr,int count)
+{
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0) {
+ unsigned long pAddr=0;
+ ssize_t r = pread64(fd, &pAddr, count, addr);
+ if(r<0){
+ pAddr = 0;
+ }
+ close(fd);
+ pAddr &= 0xFFFFFFFFFFFF;
+ return pAddr;
+ }
+ return 0;
+}
+///
+/// 跳转到指定内存地址的指针【32位】
+///
+/// 内存地址
+/// 指针地址
+unsigned long jump32(unsigned long addr)
+{
+ return jump(addr,4);//读取4字节
+}
+///
+/// 跳转到指定内存地址的指针【64位】
+///
+/// 内存地址
+/// 指针地址
+unsigned long jump64(unsigned long addr)
+{
+ return jump(addr,8);//读取8字节
+}
+
+
+///
+/// 设置指定内存地址指向的值
+///
+/// 设置的值
+/// 内存地址
+/// 数据类型
+/// 是否冻结
+/// 设置成功与否
+int setMemoryAddrValue(const char* value, unsigned long addr, int type, bool isFree,bool isSecure)
+{
+int pageSize = getpagesize();
+void* addrToProtect;
+unsigned long alignedAddr;
+ if (!isInit) {
+ //未进行初始化
+ return -1;
+ }
+
+ if(isSecure){
+ addrToProtect = (void*)(addr);
+
+ alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);}
+ //是否冻结修改
+ if (isFree) {
+ addFreezeItem(value, addr, type);//添加一个冻结修改项目
+ startAllFreeze();//开始冻结
+ return 0;
+ }
+ else {
+
+ int fd = open(memPath, O_RDWR | O_SYNC);
+ //打开maps文件
+ FILE* maps = fopen(mapsPath, "r");
+ if (fd >= 0 && maps) {
+ switch (type) {
+ case TYPE_DWORD:
+ {
+
+ DWORD v = atoi(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(DWORD), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(FLOAT), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(DOUBLE), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(QWORD), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(WORD), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(BYTE), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ }
+
+
+ }
+ if (fd >= 0) {
+ close(fd);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ removeFreezeItem(addr);//移除这个冻结修改项目(如果存在)
+ return 0;
+ }
+
+
+ return -1;
+}
+
+///
+/// 获取指定内存地址的数据
+///
+/// 内存地址
+/// 数据类型
+/// 获取到的数据[指针记得用完调用free释放]
+char* getMemoryAddrData(unsigned long addr, int type)
+{
+ if (!isInit) {
+ //未进行初始化
+ return "NULL";
+ }
+
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0) {
+ int size = -1;
+ void* buff;
+ char* value = "NULL";
+
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ size = sizeof(DWORD);//存储要读取的字节数
+ buff = (void*)malloc(size);//分配一块内存来存储读取到的数据
+ pread64(fd, buff, size, addr);//从mem文件指定内存地址读取数据到buff
+ DWORD v = *(DWORD*)buff;//解析获取到的数据
+ int len = snprintf(NULL, 0, "%d", v);//获取数据的字符长度
+ value = (char*)malloc(len + 1);//字符串动态分配足够内存来存储数据 确保能足够存储数据的字符数量
+ sprintf(value, "%d", v);//将数据格式化为字符串
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ size = sizeof(FLOAT);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ FLOAT v = *(FLOAT*)buff;
+ int len = snprintf(NULL, 0, "%f", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%f", v);
+ //检测是否需要使用科学记数法来格式化
+ bool isScience = true;
+ for (int i = 0; i < len; i++) {
+ if (value[i] == '.' || value[i] == '-') {
+ continue;
+ }
+ if (value[i] != '0') {
+ isScience = false;
+ }
+ }
+ if (isScience) {
+ sprintf(value, "%.8e", v);
+ }
+ if (strstr(value, "nan")) {
+ value = "NaN";
+ }
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ size = sizeof(DOUBLE);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ DOUBLE v = *(DOUBLE*)buff;
+ int len = snprintf(NULL, 0, "%f", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%f", v);
+ //检测是否需要使用科学记数法来格式化
+ bool isScience = true;
+ if (len < 20) {
+ for (int i = 0; i < len; i++) {
+ if (value[i] == '.' || value[i] == '-') {
+ continue;
+ }
+ if (value[i] != '0') {
+ isScience = false;
+ }
+ }
+ }
+ if (isScience) {
+ sprintf(value, "%.8e", v);
+ }
+ if (strstr(value, "nan")) {
+ value = "NaN";
+ }
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ size = sizeof(QWORD);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ QWORD v = *(QWORD*)buff;
+ int len = snprintf(NULL, 0, "%lld", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%lld", v);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ size = sizeof(WORD);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ WORD v = *(WORD*)buff;
+ int len = snprintf(NULL, 0, "%d", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%d", v);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ size = sizeof(BYTE);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ BYTE v = *(BYTE*)buff;
+ int len = snprintf(NULL, 0, "%d", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%d", v);
+ }
+ break;
+ }
+
+ close(fd);
+ if (buff != NULL) {
+ free(buff);
+ }
+ return value;
+ }
+ return "NULL";
+}
+
+
+///
+/// 设置要搜索的内存区域,初始化内存区域方便之后内存搜索
+///
+/// 内存区域
+void setMemoryArea(int memoryArea)
+{
+ memory = memoryArea;
+ isMapsMemArea = false;
+}
+///
+/// 设置自定义内存区域 好处:能精准找到想要的数据,并且搜索速度直接提升100倍 坏处:需要自己去找数据所在的maps内存段 示例:setMemoryArea("/apex/com.android.tethering/lib64/libframework-connectivity-jni.so");
+///
+/// maps内存段
+void setMemoryArea(const char* memoryArea)
+{
+ memoryMaps = strdup(memoryArea);
+ isMapsMemArea = true;
+}
+///
+/// 内存搜索
+///
+/// 搜索值
+/// 搜索类型
+/// 搜索结果列表
+vector < unsigned long > MemorySearch(const char* value, int type)
+{
+if(getFreezeNum()>0){
+for(int i=0;i0){
+ for(int i=0;i= 0 && maps)
+ {
+
+ //清空搜索结果列表
+ //clearResultList();
+
+ char mapLine[1024]; //用于存储每行读取到的信息
+ unsigned long start; //存储内存起始地址
+ unsigned long end; //存储内存结束地址
+ //逐行读取maps文件每行信息
+ while (fgets(mapLine, sizeof(mapLine), maps))
+ {
+ //如果当前行匹配内存标志则进行搜索
+ if (BCMAPSFLAG(mapLine, memory))
+ {
+ //从该行中解析出内存区域的起始和结束地址
+ sscanf(mapLine, "%lx-%lx", &start, &end);
+ int size = end - start; //计算内存区域的大小
+ void* buf = (void*)malloc(size);//存储指向起始地址的指针
+ int ret = pread64(mem, buf, size, start);//buf指向起始地址
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(value);//存储要搜索的数值
+ int increment = sizeof(DWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(DWORD*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ int increment = sizeof(FLOAT);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(FLOAT*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ //DOUBLE v = atof(value);
+ int increment = sizeof(DOUBLE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(DOUBLE*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ int increment = sizeof(QWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(QWORD*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ int increment = sizeof(WORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(WORD*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+ int increment = sizeof(BYTE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(BYTE*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ }
+ if (buf != NULL) {
+ free(buf);
+ }
+ }
+ }
+ }
+ if (mem >= 0) {
+ close(mem);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ }
+ return outcomeList;
+}
+
+///
+/// 内存搜索某个范围区域内的所有值
+///
+/// 范围值 格式:10~20
+/// 搜索类型
+/// 搜索结果列表
+vector < unsigned long > MemorySearchRange(const char* value, int type)
+{
+if(getFreezeNum()>0){
+for(int i=0;i0){
+ for(int i=0;i= 0 && maps)
+ {
+ //清空搜索结果列表
+ //clearResultList();
+ //outcomeList.reserve(100000000); // 预分配足够的内存
+ char mapLine[1024]; //用于存储每行读取到的信息
+ unsigned long start; //存储内存起始地址
+ unsigned long end; //存储内存结束地址
+ char formatString[50]; //存储格式规则
+
+ //逐行读取maps每一行
+ while (fgets(mapLine, sizeof(mapLine), maps))
+ {
+
+ //如果当前行匹配内存标志则进行搜索
+ if (BCMAPSFLAG(mapLine, memory))
+ {
+ //从该行中解析出内存区域的起始和结束地址
+ sscanf(mapLine, "%lx-%lx", &start, &end);
+ int size = end - start; //计算内存区域的大小
+ void* buf = (void*)malloc(size);//存储指向起始地址的指针
+ int ret = pread64(mem, buf, size, start);//buf指向起始地址
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%d", R_SEPARATE, "%d");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(DWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ DWORD v = *(DWORD*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);//添加几千万以上大量数据时可能会影响性能
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%f", R_SEPARATE, "%f");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(FLOAT);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ FLOAT v = *(FLOAT*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%f", R_SEPARATE, "%f");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(DOUBLE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ DOUBLE v = *(DOUBLE*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%lld", R_SEPARATE, "%lld");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(QWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ QWORD v = *(QWORD*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%d", R_SEPARATE, "%d");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(WORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ WORD v = *(WORD*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%d", R_SEPARATE, "%d");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(BYTE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ BYTE v = *(BYTE*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ }
+ if (buf != NULL) {
+ free(buf);
+ }
+
+ }
+ }
+ }
+ if (mem >= 0) {
+ close(mem);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ }
+ return outcomeList;
+}
+
+
+
+///
+/// 联合内存搜索 [注意:附近范围某些情况可能会比GG多4~8个字节 比如对于1~2;5:50这种情况gg的联合范围搜索只能按顺序 而这里是不按顺序的 对于联合范围加上::按顺序搜索就和GG联合范围一致了]
+///
+/// 联合搜索值 格式:值1;值2;值3;n个值:附近范围 (没有范围则使用默认范围 两个范围符::代表按顺序搜索) 示例:7F;2D;3E:30 或 7F;2D;3E(未设置范围则使用默认范围) 并且值也支持范围例如1~2;3:64
+/// 默认联合搜索类型:对于未加类型符的值将使用此类型 例如1D;2;3E中的2将使用此类型
+/// 搜索结果
+vector < unsigned long > MemorySearchUnited(const char* value, int type) {
+if(getFreezeNum()>0){
+for(int i=0;i0){
+ for(int i=0;i valueList; //存储分割出的所有数值的列表
+ //获取第一个分割部分
+ const char* token = strtok(valueCopy, U_SEPARATE);
+ //逐个获取剩余的分割部分
+ while (token != NULL) {
+ valueList.emplace_back(token, type); //保存分割出的值
+ token = strtok(NULL, U_SEPARATE); // 获取下一个分割部分
+ }
+
+ //开始联合搜索
+ if (!valueList.empty()) {
+ ///先搜第一个值的内存地址 作为起始地址 [如果第一个值是范围值内部将自动进行范围搜索这里无需判断]
+ MemorySearch(valueList[0].value, valueList[0].type);
+ //搜索剩余值
+ //打开mem内存文件
+ int mem = open(memPath, O_RDONLY);
+ if (mem >= 0) {
+ vector < unsigned long >offsetFilterResults;
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ vector < Item > results;//存储当前起始地址附近找到的值列表
+ //开始查找当前起始地址附近的值
+ for (int j = 0; j < valueList.size(); j++)
+ {
+ switch (valueList[j].type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v;
+ DWORD minv;
+ DWORD maxv;
+ if (valueList[j].isRange) {
+ minv = atoi(valueList[j].minValue);
+ maxv = atoi(valueList[j].maxValue);
+ }
+ else {
+ v = atoi(valueList[j].value);
+ }
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DWORD eV = *(DWORD*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v;
+ FLOAT minv;
+ FLOAT maxv;
+ if (valueList[j].isRange) {
+ minv = atof(valueList[j].minValue);
+ maxv = atof(valueList[j].maxValue);
+ }
+ else {
+ v = atof(valueList[j].value);
+ }
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ FLOAT eV = *(FLOAT*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v;
+ DOUBLE minv;
+ DOUBLE maxv;
+ if (valueList[j].isRange) {
+ minv = strtod(valueList[j].minValue, NULL);
+ maxv = strtod(valueList[j].maxValue, NULL);
+ }
+ else {
+ v = strtod(valueList[j].value, NULL);
+ }
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DOUBLE eV = *(DOUBLE*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v;
+ QWORD minv;
+ QWORD maxv;
+ if (valueList[j].isRange) {
+ minv = atoll(valueList[j].minValue);
+ maxv = atoll(valueList[j].maxValue);
+ }
+ else {
+ v = atoll(valueList[j].value);
+ }
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ QWORD eV = *(QWORD*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v;
+ WORD minv;
+ WORD maxv;
+ if (valueList[j].isRange) {
+ minv = (WORD)atoi(valueList[j].minValue);
+ maxv = (WORD)atoi(valueList[j].maxValue);
+ }
+ else {
+ v = (WORD)atoi(valueList[j].value);
+ }
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ WORD eV = *(WORD*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v;
+ BYTE minv;
+ BYTE maxv;
+ if (valueList[j].isRange) {
+ minv = (BYTE)atoi(valueList[j].minValue);
+ maxv = (BYTE)atoi(valueList[j].maxValue);
+ }
+ else {
+ v = (BYTE)atoi(valueList[j].value);
+ }
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ BYTE eV = *(BYTE*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ }
+ }
+
+ if (results.size() >= valueList.size()) {
+ //检查当前找到的附近值向量中是否包含搜索值向量中的所有元素 (包含所有才添加到结果)
+ bool isAdd = true;
+ for (int i = 0; i < valueList.size(); i++)
+ {
+ bool found = false;
+ for (int j = 0; j < results.size(); j++)
+ {
+ if (strcmp(results[j].value, valueList[i].value) == 0) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ isAdd = false;
+ break;
+ }
+ }
+
+ if (isAdd) {
+ for (int h = 0; h < results.size(); h++)
+ {
+ //防止重复添加
+ if (find(offsetFilterResults.begin(), offsetFilterResults.end(), results[h].addr) == offsetFilterResults.end()) {
+ //if (labs(outcomeList[i] - results[h]) <= unitedRange) {
+ offsetFilterResults.push_back(results[h].addr);
+ //}
+ }
+ }
+ }
+ }
+ }
+
+ close(mem);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < offsetFilterResults.size(); i++)
+ {
+ outcomeList.push_back(offsetFilterResults[i]);
+ }
+ //升序排序结果
+ sort(outcomeList.begin(), outcomeList.end());
+ }
+ }
+ free(valueCopy); //释放副本内存
+ }
+ return outcomeList;
+}
+
+
+
+///
+/// 从当前搜索结果中 筛选结果附近指定偏移处具有指定特征值的结果 [支持范围改善,联合改善]
+///
+/// 数据附近特征值
+/// 特征值数据类型
+/// 特征值相对主数据的偏移量
+/// 最终筛选结果列表
+vector < unsigned long > ImproveOffset(const char* value, int type, unsigned long offset)
+{
+ if (isInit) {
+ //如果包含分隔符则使用偏移联合改善
+ if (strstr(value, U_SEPARATE)) {
+ return ImproveOffsetUnited(value, type, offset);
+ }
+ //如果包含范围则使用偏移范围改善
+ if (strstr(value, R_SEPARATE) && !strstr(value, U_SEPARATE)) {
+ return ImproveOffsetRange(value, type, offset);
+ }
+ vector < unsigned long >offsetFilterResults;//临时筛选结果列表 - 临时存储当前偏移筛选出的附近拥有特征值的数据
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0)
+ {
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(value);
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(DWORD*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(FLOAT*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(DOUBLE*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(QWORD*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(WORD*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(BYTE*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ }
+ close(fd);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < offsetFilterResults.size(); i++)
+ {
+ outcomeList.push_back(offsetFilterResults[i]);
+ }
+ }
+ }
+ return outcomeList;
+}
+
+///
+/// 从当前搜索结果中 筛选指定偏移处的值在这个范围内的结果 [偏移范围改善] 适用于:某些特征码会变化但是只会在一个范围之内变化时 比如特征码始终为1或2或3时 可以使用偏移范围改善使用1~3即可
+///
+/// 范围值[格式:最小~最大 例如1~20]
+/// 数据类型
+///
+vector < unsigned long > ImproveOffsetRange(const char* value, int type, unsigned long offset) {
+ if (isInit) {
+ char minValue[64 + 2];
+ char maxValue[64 + 2];
+ const char* start = strstr(value, R_SEPARATE);
+ if (start != NULL) {
+ strncpy(minValue, value, start - value); //从开头到分隔符的部分为最小值
+ minValue[start - value] = '\0'; //最小值最后的位置添加字符串结束符
+ strcpy(maxValue, start + 1); //从分隔符后一个字符开始为最大值
+ }
+ vector < unsigned long >offsetFilterResults;//临时筛选结果列表 - 临时存储当前偏移筛选出的附近拥有特征值的数据
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0)
+ {
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD minv = atoi(minValue);
+ DWORD maxv = atoi(maxValue);
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DWORD bV = *(DWORD*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT minv = atof(minValue);
+ FLOAT maxv = atof(maxValue);
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ FLOAT bV = *(FLOAT*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE minv = strtod(minValue, NULL);
+ DOUBLE maxv = strtod(maxValue, NULL);
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DOUBLE bV = *(DOUBLE*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD minv = atoll(minValue);
+ QWORD maxv = atoll(maxValue);
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ QWORD bV = *(QWORD*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD minv = (WORD)atoi(minValue);
+ WORD maxv = (WORD)atoi(maxValue);
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ WORD bV = *(WORD*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE minv = (BYTE)atoi(minValue);
+ BYTE maxv = (BYTE)atoi(maxValue);
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ BYTE bV = *(BYTE*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ }
+ close(fd);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < offsetFilterResults.size(); i++)
+ {
+ outcomeList.push_back(offsetFilterResults[i]);
+ }
+ }
+ }
+ return outcomeList;
+
+}
+
+///
+/// 从当前搜索结果中 筛选指定偏移处的值为联合值中的某一个值的结果 [偏移联合改善] 适用于:某些特征码会变化但是永远只会变为那几个固定值的情况 比如只会变化为22或15或27时可以使用偏移联合改善22;15;27
+///
+/// 联合筛选值:[格式:值1;值2;值3;n个值 示例:7F;2D;3E 并且值也支持范围例如1~2;3 注:改善不支持顺序改善和区间范围]
+/// 默认类型:对于未将类型符的值使用此类型 例如1D;2;3E中的2将使用此类型
+///
+vector < unsigned long > ImproveOffsetUnited(const char* value, int type, unsigned long offset) {
+ if (isInit) {
+ //LOGD("联合改善调试", "start");
+ char* valueCopy = strdup(value);//创建副本内存因为之后要进行修改传入的字符串
+
+ //获取联合改善数值到列表
+ vector < Federated > valueList; //存储分割出的所有数值的列表
+ //获取第一个分割部分
+ const char* token = strtok(valueCopy, U_SEPARATE);
+ //逐个获取剩余的分割部分
+ while (token != NULL) {
+ valueList.emplace_back(token, type); //保存分割出的值
+ token = strtok(NULL, U_SEPARATE); // 获取下一个分割部分
+ }
+
+ //开始联合改善
+ if (!valueList.empty()) {
+ //打开mem内存文件
+ int mem = open(memPath, O_RDONLY);
+ if (mem >= 0) {
+ vector < unsigned long >filterResults;//存储临时改善结果列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ for (int j = 0; j < valueList.size(); j++)
+ {
+ bool isF = false;//标记是否已找到
+ switch (valueList[j].type)
+ {
+ case TYPE_DWORD:
+ {
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ DWORD eV = *(DWORD*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ DWORD minv = atoi(valueList[j].minValue);
+ DWORD maxv = atoi(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ DWORD v = atoi(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ FLOAT eV = *(FLOAT*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ FLOAT minv = atof(valueList[j].minValue);
+ FLOAT maxv = atof(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ FLOAT v = atof(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ DOUBLE eV = *(DOUBLE*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ DOUBLE minv = strtod(valueList[j].minValue, NULL);
+ DOUBLE maxv = strtod(valueList[j].maxValue, NULL);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ DOUBLE v = strtod(valueList[j].value, NULL);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ QWORD eV = *(QWORD*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ QWORD minv = atoll(valueList[j].minValue);
+ QWORD maxv = atoll(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ QWORD v = atoll(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ WORD eV = *(WORD*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ WORD minv = (WORD)atoi(valueList[j].minValue);
+ WORD maxv = (WORD)atoi(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ WORD v = (WORD)atoi(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ BYTE eV = *(BYTE*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ BYTE minv = (BYTE)atoi(valueList[j].minValue);
+ BYTE maxv = (BYTE)atoi(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ BYTE v = (BYTE)atoi(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ }
+ //找到则结束循环 开始匹配下一轮的值
+ if (isF) {
+ break;
+ }
+ }
+ }
+
+ close(mem);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < filterResults.size(); i++)
+ {
+ outcomeList.push_back(filterResults[i]);
+ }
+ //升序排序结果
+ //sort(outcomeList.begin(), outcomeList.end());
+ }
+ }
+ free(valueCopy); //释放副本内存
+ }
+ return outcomeList;
+}
+///
+/// 从当前搜索结果中 直接改善 [支持范围改善和联合改善]
+///
+/// 改善值
+/// 默认类型
+/// 结果
+vector < unsigned long > ImproveValue(const char* value, int type) {
+ return ImproveOffset(value, type, 0);
+}
+///
+/// 从最终所有筛选结果的指定偏移处进行写入数据
+///
+/// 写入的数据
+/// 写入数据类型
+/// 相对筛选结果处的偏移量
+/// 是否冻结写入
+/// 写入成功与否
+int MemoryOffsetWrite(const char* value, int type, unsigned long offset, bool isFree,bool isSecure)
+{
+ if (!isInit) {
+ //没有进行初始化
+ return -1;
+ }
+ isSecureWrites=isSecure;
+ int pageSize = getpagesize();
+ int fd = open(memPath, O_RDWR | O_SYNC);
+ //打开maps文件
+ FILE* maps = fopen(mapsPath, "r");
+ if (fd >= 0 && maps)
+ {
+
+ for (int i = 0; i < outcomeList.size(); i++) {
+ if(isSecureWrites){
+ MemoryProtect(outcomeList[i] + offset);}
+ if (isFree) {
+
+ addFreezeItem(value, outcomeList[i] + offset, type);
+ startAllFreeze();
+ }
+ else {
+
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(value);
+
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(DWORD), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(FLOAT), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(DOUBLE), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(DOUBLE), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(WORD), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(BYTE), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ }
+
+ removeFreezeItem(outcomeList[i] + offset);//关闭冻结
+ }
+ }
+ return 0;
+ }
+ if (fd >= 0) {
+ close(fd);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ return -1;//内存写入成功
+}
+
+///
+/// 获取最终搜索结果数量
+///
+/// 最终搜索结果数量
+int getResultCount()
+{
+ return outcomeList.size();
+}
+
+///
+/// 获取最终搜索结果列表
+///
+/// 最终搜索结果列表
+vector < unsigned long > getResultList()
+{
+ return outcomeList;
+}
+
+///
+/// 打印最终搜索结果列表到文件
+///
+/// 文件路径
+/// 成功与否
+int printResultListToFile(const char* filePath)
+{
+ FILE* memDebugFile = fopen(filePath, "a");//追加模式打开
+ if (memDebugFile != NULL) {
+ struct timeval tv;
+ struct tm* tm_info;
+ char timeString[100];
+
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ fprintf(memDebugFile, "\n\n\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[LogName] 日志名称:内存搜索结果列表\n");
+ fprintf(memDebugFile, "[ABI] 处理器:%s\n", ABI);
+ fprintf(memDebugFile, "[PackName] 进程包名:%s\n", packName);
+ fprintf(memDebugFile, "[PID] 进程ID:%d\n", pid);
+ fprintf(memDebugFile, "[PID] 搜索内存:%s\n", getMemoryAreaName());
+ fprintf(memDebugFile, "[RCount] 搜索结果数量:%d\n", outcomeList.size());
+ fprintf(memDebugFile, "[AddTime] 日志生成时间:%s.%ld\n", timeString, tv.tv_usec);
+ fprintf(memDebugFile, "[Source] 来源:ByteCat-MemTool ^O^\n");
+ fprintf(memDebugFile, "ByteCat:以下数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "ByteCat: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[Debug] Log format: Timestamp | Memory Area | Memory Address | DWORD Data | FLOAT Data | DOUBLE Data | WORD Data | BYTE Data | QWORD Data | Mem Map\n");
+ fprintf(memDebugFile, "[调试] 日志格式: 时间戳 | 内存区域 | 内存地址 | DWORD类型数据 | FLOAT类型数据 | DOUBLE类型数据 | WORD类型数据 | BYTE类型数据 | QWORD类型数据 | 内存映射\n");
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ char* mapLine = getMemoryAddrMapLine(outcomeList[i]);
+ fprintf(memDebugFile, "%s.%06ld 📍 内存区域:%s 内存地址:0x%lX D类型:%s F类型:%s E类型:%s W类型:%s B类型:%s Q类型:%s 📑 内存映射:%s\n", timeString, tv.tv_usec,
+ getMapLineMemoryAreaName(mapLine),
+ outcomeList[i],
+ getMemoryAddrData(outcomeList[i], TYPE_DWORD),
+ getMemoryAddrData(outcomeList[i], TYPE_FLOAT),
+ getMemoryAddrData(outcomeList[i], TYPE_DOUBLE),
+ getMemoryAddrData(outcomeList[i], TYPE_WORD),
+ getMemoryAddrData(outcomeList[i], TYPE_BYTE),
+ getMemoryAddrData(outcomeList[i], TYPE_QWORD),
+ mapLine);
+ }
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "注:以上数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "Note: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fclose(memDebugFile);
+ return 0;
+ }
+
+ return -1;
+}
+
+///
+/// 清空最终搜索结果列表
+///
+int clearResultList()
+{
+ if (outcomeList.empty()) {
+ //空列表不做操作
+ return -1;
+ }
+ //清空搜索结果列表
+ outcomeList.clear();
+ // 释放内存
+ std::vector().swap(outcomeList);
+ return 0;
+}
+
+///
+/// 内存保护二次修改
+///
+void MemoryProtect(unsigned long addr){
+Protection Memory;
+ Memory.addr = addr;
+ ProtectList.push_back(Memory);
+}
+///
+/// 获取保护项目数量
+///
+/// 数量
+int getProtectionNum() {
+ return ProtectList.size();
+}
+///
+/// 设置冻结修改延迟【毫秒】
+///
+/// 延迟[MS]
+void setFreezeDelayMs(uint32_t delay) {
+ freezeDelay = delay;
+}
+
+///
+/// 获取冻结修改项目列表
+///
+/// 冻结修改项目列表
+vector < Item > getFreezeList() {
+ return FreezeList;
+}
+
+///
+/// 获取冻结修改项目数量
+///
+/// 数量
+int getFreezeNum() {
+ return FreezeList.size();
+}
+
+///
+/// 添加一个冻结修改项目
+///
+/// 修改值
+/// 内存地址
+/// 数据类型
+int addFreezeItem(const char* value, unsigned long addr, int type)
+{
+ //检查冻结修改项目列表是否已经存在此内存地址,防止重复添加冻结修改项目
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ if (addr == FreezeList[i].addr)
+ {
+ return -1;
+ }
+ }
+ Item table;
+ table.value = strdup(value);
+ table.addr = addr;
+ table.type = type;
+ FreezeList.push_back(table);
+ return 0;
+}
+
+///
+/// 移除一个冻结修改项目
+///
+/// 内存地址
+int removeFreezeItem(unsigned long addr)
+{
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ if (addr == FreezeList[i].addr)
+ {
+ FreezeList.erase(FreezeList.begin() + i);
+ return 0;
+ }
+ }
+ return -1;
+}
+
+///
+/// 移除所有冻结修改项目
+///
+int removeAllFreezeItem() {
+ if (FreezeList.empty()) {
+ //空列表不做操作
+ return -1;
+ }
+ // 清除所有数据
+ FreezeList.clear();
+ // 释放内存
+ std::vector- ().swap(FreezeList);
+ return 0;
+}
+
+///
+/// 冻结循环修改线程
+///
+///
+///
+void* freezeThread(void* arg)
+{
+ unsigned long alignedAddr;
+ void* addrToProtect;
+ for (;;)
+ {
+ if (isInit) {
+ //如果需要结束冻结或者冻结列表没有冻结项目则结束
+ if (!isFreeze || FreezeList.size() == 0)
+ {
+ stopAllFreeze();
+ break;
+ }
+ //每轮冻结才打开mem为了提升性能而不是在每次修改时都打开mem 避免频繁IO
+ int fd = open(memPath, O_RDWR | O_SYNC);
+ if (fd >= 0) {
+ //遍历 内存修改 冻结列表的所有项目
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ int pageSize = getpagesize();
+if(isSecureWrites){
+addrToProtect = (void*)(FreezeList[i].addr);
+alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1); }
+
+
+ switch (FreezeList[i].type)
+ {
+
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(FreezeList[i].value);
+
+ pwrite64(fd, &v, sizeof(DWORD), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(FLOAT), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(FreezeList[i].value, NULL);
+
+
+ pwrite64(fd, &v, sizeof(DOUBLE), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(QWORD), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(WORD), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(BYTE), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ }
+ }
+ close(fd);
+ }
+ //延迟
+ if (freezeDelay != 0) {
+ usleep(freezeDelay * 1000);//转换为微秒
+ }
+ }
+
+ }
+ return NULL;
+}
+
+///
+/// 开始所有冻结修改项目
+///
+int startAllFreeze()
+{
+ if (!isInit) {
+ //没有进行初始化
+ return -1;
+ }
+ if (!isFreeze)
+ {
+ //冻结列表有项目才开冻结线程
+ if (FreezeList.size() > 0)
+ {
+ isFreeze = true;//正在冻结
+ //开始启动冻结线程
+ pthread_t t;
+ pthread_create(&t, NULL, freezeThread, NULL);
+ return 0;
+ }
+ }
+ return -1;
+}
+
+///
+/// 停止所有冻结修改项目
+///
+int stopAllFreeze()
+{
+ if (isFreeze)
+ {
+ isFreeze = false;
+ return 0;
+ }
+ return -1;
+}
+
+///
+/// 打印冻结列表到指定文件
+///
+/// 文件绝对路径
+/// 成功与否
+int printFreezeListToFile(const char* filePath)
+{
+ FILE* memDebugFile = fopen(filePath, "a");//追加模式打开
+ if (memDebugFile != NULL) {
+ struct timeval tv;
+ struct tm* tm_info;
+ char timeString[100];
+
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ fprintf(memDebugFile, "\n\n\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[LogName] 日志名称:冻结修改列表\n");
+ fprintf(memDebugFile, "[ABI] 处理器:%s\n", ABI);
+ fprintf(memDebugFile, "[PackName] 进程包名:%s\n", packName);
+ fprintf(memDebugFile, "[PID] 进程ID:%d\n", pid);
+ fprintf(memDebugFile, "[RCount] 冻结修改数量:%d\n", FreezeList.size());
+ fprintf(memDebugFile, "[AddTime] 日志生成时间:%s.%ld\n", timeString, tv.tv_usec);
+ fprintf(memDebugFile, "[Source] 来源:ByteCat-MemTool ^O^\n");
+ fprintf(memDebugFile, "ByteCat:以下数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "ByteCat: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[Debug] Log format: [❄ Freeze info] Timestamp | Memory Area | Memory Address | DWORD Data | FLOAT Data | DOUBLE Data | WORD Data | BYTE Data | QWORD Data | Mem Map\n");
+ fprintf(memDebugFile, "[调试] 日志格式: [❄ 冻结信息] 时间戳 | 内存区域 | 内存地址 | DWORD类型数据 | FLOAT类型数据 | DOUBLE类型数据 | WORD类型数据 | BYTE类型数据 | QWORD类型数据 | 内存映射\n");
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ char* mapLine = getMemoryAddrMapLine(FreezeList[i].addr);
+ fprintf(memDebugFile, "%s.%06ld 【❄ 修改值:%s 修改类型:%s】 📍 内存区域:%s 内存地址:0x%lX D类型:%s F类型:%s E类型:%s W类型:%s B类型:%s Q类型:%s 📑 内存映射:%s\n", timeString, tv.tv_usec,
+ FreezeList[i].value,
+ getDataTypeName(FreezeList[i].type),
+ getMapLineMemoryAreaName(mapLine),
+ FreezeList[i].addr,
+ getMemoryAddrData(FreezeList[i].addr, TYPE_DWORD),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_FLOAT),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_DOUBLE),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_WORD),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_BYTE),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_QWORD),
+ mapLine);
+ }
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "注:以上数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "Note: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fclose(memDebugFile);
+ return 0;
+ }
+
+ return -1;
+}
+
+///
+/// 获取指定内存地址的maps映射行
+///
+/// 内存地址
+/// maps映射行
+char* getMemoryAddrMapLine(unsigned long address) {
+ if (!isInit) {
+ return "NULL";
+ }
+ //存储映射信息
+ unsigned long start, end, offset;
+ char perms[5], dev[6], path[1024];
+ int inode;
+
+ FILE* file; //maps文件指针
+ char line[4096]; //存储读取到的一行数据
+
+ file = fopen(mapsPath, "r");
+ if (file) {
+ //逐行读取maps文件内容
+ while (fgets(line, sizeof(line), file)) {
+
+ sscanf(line, "%lx-%lx %4s %lx %5s %d %[^\n]",
+ &start, &end, perms, &offset, dev, &inode, path);
+ //如果给定的地址在当前行描述的内存区域范围内
+ if (address >= start && address < end) {
+ fclose(file); // 关闭文件
+ return line;//返回映射行
+ }
+ }
+ fclose(file); // 关闭文件
+ }
+ return "NULL";
+}
+
+///
+/// 获取Maps映射行所在内存区域名称
+///
+///
+/// 内存名称字符串
+char* getMapLineMemoryAreaName(const char* mapLine) {
+ //jh和j 模拟器cd和xa
+
+ if (BCMAPSFLAG(mapLine, RANGE_C_HEAP)) {
+ return "C堆内存 [Ch: C++ heap]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_C_ALLOC)) {
+ return "C分配内存 [Ca: C++ alloc]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_C_BSS)) {
+ return "C未初始化数据 [Cb: C++ .bss]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_ANONYMOUS)) {
+ return "匿名内存 [A: Anonymous]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_STACK)) {
+ return "栈内存 [S: Stack]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_ASHMEM)) {
+ return "Android共享内存 [As: Ashmem]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_VIDEO)) {
+ //BCMEM_LOGI("此内存有错误");
+ return "视频内存 [V: Video]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_B_BAD)) {
+ //BCMEM_LOGI("此内存有错误");
+ return "错误内存 [B: Bad]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_CODE_SYSTEM)) {
+ return "系统代码 [Xs: Code system]";
+ }
+
+ //j内存和jh内存筛选特征相同
+ /*if (BCMAPSFLAG(mapLine, RANGE_JAVA_HEAP)) {
+ return "Java虚拟机堆内存 [Jh: Java heap]";
+ }*/
+ if (BCMAPSFLAG(mapLine, RANGE_JAVA)) {
+ return "Java内存 [J: Java] 或 Java虚拟机堆内存 [Jh: Java heap]";
+ }
+
+ //cd和xa在模拟器可能错误 因此针对
+#if defined(__arm__) || defined(__aarch64__) //arm32和arm64架构
+ if (BCMAPSFLAG(mapLine, RANGE_C_DATA)) {
+ return "C数据内存 [Cd: C++ .data]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_CODE_APP)) {
+ return "应用程序代码 [Xa: Code app]";
+ }
+#else//x86和x64架构 针对模拟器
+ if (BCMAPSFLAG(mapLine, RANGE_C_DATA)) {
+ return "C数据内存 [Cd: C++ .data] 或 应用程序代码 [Xa: Code app]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_CODE_APP)) {
+ return "应用程序代码 [Xa: Code app]";
+ }
+#endif
+
+
+ //if (BCMAPSFLAG(mapLine, RANGE_OTHER)) {
+ // //BCMEM_LOGI("此内存有错误,无法完全排除");
+ // return "其他内存 [O: Other]";
+ //}
+
+ //以上都不是则在O
+ return "其他内存 [O: Other]";
+}
+
+
+///
+/// 获取指定id的内存名称
+///
+/// 内存id
+/// 内存名称字符串
+char* getMemoryAreaIdName(int memid) {
+ if (memid == RANGE_ALL) {
+ return "所有内存 [ALL]";
+ }
+ if (memid == RANGE_JAVA_HEAP) {
+ return "Java虚拟机堆内存 [Jh: Java heap]";
+ }
+ if (memid == RANGE_C_HEAP) {
+ return "C堆内存 [Ch: C++ heap]";
+ }
+ if (memid == RANGE_C_ALLOC) {
+ return "C分配内存 [Ca: C++ alloc]";
+ }
+ if (memid == RANGE_C_DATA) {
+ return "C数据内存 [Cd: C++ .data]";
+ }
+ if (memid == RANGE_C_BSS) {
+ return "C未初始化数据 [Cb: C++ .bss]";
+ }
+ if (memid == RANGE_ANONYMOUS) {
+ return "匿名内存 [A: Anonymous]";
+ }
+ if (memid == RANGE_JAVA) {
+ return "Java内存 [J: Java]";
+ }
+ if (memid == RANGE_STACK) {
+ return "栈内存 [S: Stack]";
+ }
+ if (memid == RANGE_ASHMEM) {
+ return "Android共享内存 [As: Ashmem]";
+ }
+ if (memid == RANGE_VIDEO) {
+ //BCMEM_LOGI("此内存有错误");
+ return "视频内存 [V: Video]";
+ }
+ if (memid == RANGE_OTHER) {
+ //BCMEM_LOGI("此内存有错误,无法完全排除");
+ return "其他内存 [O: Other]";
+ }
+ if (memid == RANGE_B_BAD) {
+ //BCMEM_LOGI("此内存有错误");
+ return "错误内存 [B: Bad]";
+ }
+ if (memid == RANGE_CODE_APP) {
+ return "应用程序代码 [Xa: Code app]";
+ }
+ if (memid == RANGE_CODE_SYSTEM) {
+ return "系统代码 [Xs: Code system]";
+ }
+
+ return "未知内存 [NULL]";
+}
+///
+/// 获取当前内存名称
+///
+/// 内存名称字符串
+char* getMemoryAreaName() {
+ return getMemoryAreaIdName(memory);
+}
+
+///
+/// 获取数据类型名称
+///
+/// 类型id
+/// 类型名称字符串
+char* getDataTypeName(int typeId) {
+ switch (typeId)
+ {
+ case TYPE_DWORD:
+ {
+ return "DWORD-32位有符号整数 [D: int32_t]";
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ return "FLOAT-单精度浮点数 [F: float]";
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ return "DOUBLE-双精度浮点数 [E: double]";
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ return "QWORD-64位有符号整数 [Q: int64_t]";
+ }
+ break;
+ case TYPE_WORD:
+ {
+ return "WORD-有符号短整型 [W: signed short]";
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ return "BYTE-有符号字符 [B: signed char]";
+ }
+ break;
+ default:
+ {
+ return "未知类型 [NULL]";
+ }
+ break;
+ }
+}
+
+///
+/// 杀掉指定包名的进程
+///
+/// 进程APK包名
+/// 成功与否
+int killProcess_Root(const char* packageName)
+{
+ int pid = getPID(packageName); //获取进程ID
+ if (pid == -1)
+ {
+ return -1;
+ }
+
+ //SIGTERM信号杀死进程
+ if (kill(pid, SIGTERM) == -1) {
+ return -1;
+ }
+
+ return 0; //成功
+}
+
+///
+/// 暂停指定包名的进程
+///
+/// 进程包名
+/// 成功与否
+int stopProcess_Root(const char* packageName) {
+ int pid = getPID(packageName);
+ if (pid == -1) {
+ return -1;
+ }
+
+ //SIGSTOP信号暂停进程
+ if (kill(pid, SIGSTOP) == -1) {
+ return -1;
+ }
+ return 0; //成功
+}
+
+///
+/// 恢复被暂停的指定包名的进程
+///
+/// 进程包名
+/// 成功与否
+int resumeProcess_Root(const char* packageName) {
+ int pid = getPID(packageName);
+ if (pid == -1) {
+ return -1;
+ }
+
+ //SIGCONT信号恢复被暂停的进程
+ if (kill(pid, SIGCONT) == -1) {
+ return -1;
+ }
+ return 0; //成功
+}
+///
+/// 杀死所有inotify,防止游戏监视文件变化
+///
+void killAllInotify_Root()
+{
+ //通过将内核inotify文件监视器的最大数量设置为0 这样就可以禁用所有inotify
+ system("echo 0 > /proc/sys/fs/inotify/max_user_watches");
+}
+
+///
+/// 杀死GG修改器进程
+///
+/// 杀死的进程数量
+int killGG_Root()
+{
+ DIR* dir = NULL; //指向目录流的指针
+ DIR* dirGG = NULL; //指向子目录流的指针
+ struct dirent* ptr = NULL; //目录项结构体,用于存储目录中的条目
+ struct dirent* ptrGG = NULL; //目录项结构体,用于存储子目录中的条目
+ char filepath[256]; //存储文件路径
+ int num = 0;// 数量
+
+ dir = opendir("/data/data");
+ if (dir != NULL) {
+ //检测data目录下每一个包名文件夹下是否为GG修改器
+ while ((ptr = readdir(dir)) != NULL)
+ {
+ //跳过"."和".."目录和文件
+ if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0) || (ptr->d_type != DT_DIR)) {
+ continue;
+ }
+
+ //生成当前包名的files文件夹的完整路径
+ sprintf(filepath, "/data/data/%s/files", ptr->d_name);
+ dirGG = opendir(filepath); //打开files
+ if (dirGG != NULL)
+ {
+ while ((ptrGG = readdir(dirGG)) != NULL)
+ {
+ // 跳过"."和".."目录和文件
+ if ((strcmp(ptrGG->d_name, ".") == 0) || (strcmp(ptrGG->d_name, "..") == 0) || (ptrGG->d_type != DT_DIR)) {
+ continue;
+ }
+
+ if (strstr(ptrGG->d_name, "GG"))
+ {
+ //杀掉GG进程
+ killProcess_Root(ptr->d_name);
+ num++;// 成功杀死一个GG进程
+ }
+ }
+ closedir(dirGG);
+ }
+ }
+ closedir(dir);
+ }
+ return num;// 返回杀死的进程数量
+}
+
+///
+/// 杀死XS脚本进程
+///
+/// 杀死的进程数量
+int killXscript_Root() {
+ DIR* dir = NULL; // 目录流指针,用于打开目录
+ DIR* dirXS = NULL; // 目录流指针,用于打开目录
+ struct dirent* ptr = NULL; // 目录项指针,用于读取目录项
+ struct dirent* ptrXS = NULL; // 存储lib文件夹当前目录项
+ char filepath[256]; // 存储文件路径的缓冲区
+ int num = 0;// 数量
+
+ // 打开目录 "/data/data"
+ dir = opendir("/data/data");
+
+ if (dir != NULL) {
+ // 循环读取目录下的每一个文件/文件夹
+ while ((ptr = readdir(dir)) != NULL) {
+ //跳过"."和".."目录和文件
+ if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0) || (ptr->d_type != DT_DIR)) {
+ continue;
+ }
+
+ // 生成要读取的文件的路径
+ sprintf(filepath, "/data/data/%s/lib", ptr->d_name);
+ // 打开这个文件夹
+ dirXS = opendir(filepath);
+ if (dirXS != NULL)
+ {
+ //读取lib文件夹每一个文件
+ while ((ptrXS = readdir(dirXS)) != NULL)
+ {
+ //如果动态库名称包含xs脚本则杀死
+ if (strstr(ptrXS->d_name, "libxscript"))
+ {
+ //杀掉这个XS进程
+ killProcess_Root(ptr->d_name);
+ num++;//成功杀死一个XS进程
+ }
+ }
+ closedir(dirXS);
+ }
+ }
+ // 关闭目录流
+ closedir(dir);
+ }
+ return num;//返回杀死的进程数量
+}
+
+
+///
+/// 重启手机
+///
+/// 成功与否
+int rebootsystem_Root()
+{
+ return system("su -c 'reboot'");
+}
+///
+/// 静默安装 指定路径的APK安装包
+///
+/// apk安装包路径
+/// 成功与否
+int installapk_Root(const char* apkPackagePath)
+{
+ char ml[256];
+ sprintf(ml, "pm install %s", apkPackagePath);
+ return system(ml);
+}
+///
+/// 静默卸载 指定包名的APK软件
+///
+/// APK包名
+/// 成功与否
+int uninstallapk_Root(const char* packageName)
+{
+ char ml[256];
+ sprintf(ml, "pm uninstall %s", packageName);
+ return system(ml);
+}
+///
+/// 执行命令
+///
+/// 命令
+/// 执行状态
+int Cmd(const char* command) {
+ int status = system(command);
+ return WEXITSTATUS(status);
+}
+///
+/// 执行超级命令
+///
+/// 命令
+/// 执行状态
+int Cmd_Root(const char* command) {
+ // 创建一个完整的命令字符串
+ char fullCommand[256];
+ snprintf(fullCommand, sizeof(fullCommand), "su -c '%s'", command);
+ int status = system(fullCommand);
+ return WEXITSTATUS(status);
+}
+
diff --git a/app/src/main/jni/AlguiMemTool.h.bak b/app/src/main/jni/AlguiMemTool.h.bak
new file mode 100644
index 0000000..6909a8f
--- /dev/null
+++ b/app/src/main/jni/AlguiMemTool.h.bak
@@ -0,0 +1,3359 @@
+#pragma once
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include //kill信号定义在此
+
+using namespace std;
+
+//小白已经在2021年被凌烟kill了
+
+
+
+//AlguiMemTool开源版本:3.0.24109 [🤪警告:仅供Algui外挂模板使用 请勿在其它外挂模板使用可能会发生很多问题]
+/*
+ * MIT License
+ *
+ * 版权所有 (c) [2024] ByteCat
+ *
+ * 特此授予任何获得本项目及相关文档文件 副本的人,免费使用该软件的权利,包括但不限于使用、复制、修改、合并、出版、分发、再许可和/或出售该软件的副本,以及允许他人这样做,条件如下:
+ *
+ * 1. 上述版权声明和本许可声明应包含在所有副本或实质性部分中。
+ * 2. 本软件是按“原样”提供的,不附有任何形式的明示或暗示的担保,包括但不限于对适销性、特定用途的适用性和不侵权的担保。
+ * 3. 在任何情况下,作者或版权持有人对因使用本项目或与本项目的其他交易而引起的任何索赔、损害或其他责任不承担任何责任,无论是在合同、侵权或其他方面。
+ * 4. 请注意,**禁止删除或修改本版权声明和作者信息**,以确保所有用户都能了解软件的来源和许可条款。
+ * * **请勿删除下面的信息!**
+ * 作者:ByteCat *_*
+ * 游戏逆向交流QQ群:931212209
+ * 作者QQ:3353484607
+ * 私人定制请联系我 => 接C/C++ Java 安卓开发 联系作者QQ:3353484607
+ * 此项目对接到Java请联系我 联系作者QQ:3353484607
+ */
+
+
+
+ // 更新内容(只列出重要更新):
+ // 0. 新增完整的联合搜索 完全和GG修改器的联合搜索一样
+ // 1. 所有修改内存数据操作 都会对当前进程进行内存保护🛡️ 防止GG模糊搜索
+ // 注意:内存保护只对当前进程有效 意味着只有直装能够防模糊 Root修改外部进程时无法防模糊[可能需要附加调试器进行代码注入]
+ // 所以如果你开发的是Root插件辅助请使用简单粗暴的方式 直接调用killGG_Root();方法来杀掉GG修改器
+ // 2. Ca内存已适配android11+ scudo内存分配器 修复了某些Ca内存数据搜不到
+ // 3. 完全兼容了模拟器架构
+ // 4. 内存搜索已支持范围搜索 例如:10~20
+ // 5. 动静态基址修改 已兼容所有基址头 HEAD_XA,HEAD_CD,HEAD_CB
+ // 6. 所有修改内存数据操作 新增冻结修改 例如:MemoryOffsetWrite("99999", TYPE_DWORD, 0, true); 将bool参数改为true则冻结 否则改为false则停止冻结
+ // 7. 新增打印搜索结果列表到指定文件 和 打印冻结列表到指定文件的 调试方法
+ // 8. 新增所有常用数据类型和常用内存范围
+ // 9. 重写了所有内存筛选规则,对于内存筛选更加精准了
+ // 10. 新增一些Root跨进程工具
+ // 11. 很多逻辑都进行了原理注释 让新手更好学习
+ //
+ // 2024-10-9 更新内容:
+ // 0. 联合搜索增加了对范围联合搜索的支持 例:0.1F;3~6D;9
+ // 1. 新增内存改善 休眠进程 解冻进程
+ // 2. 偏移改善增加了对范围改善和联合改善的支持
+ // 2. ~偏移联合改善 -适用于:某些副特征码会变化但是永远只会变为那几个固定值的情况 比如只会变化为22或15或27时可以使用偏移联合改善22;15;27
+ // 2. ~偏移范围改善 -适用于:某些副特征码会变化但是只会在一个范围之内变化时 比如特征码始终为1或2或3时 可以使用偏移范围改善使用1~3即可
+ // 3. 优化搜索速度
+ // 4. 修复潜在溢出
+ // 5. 修复一亿个bug
+
+ //初始化ABI字符串
+#if defined(__arm__) && !defined(__aarch64__) //针对 ARM 32 位架构
+#define ABI "ARM32"
+#elif defined(__aarch64__) //针对 ARM 64 位架构
+#define ABI "ARM64"
+#elif defined(__x86_64__) || defined(_M_X64) //针对 x64 架构
+#define ABI "x64"
+#elif defined(__i386__) || defined(_M_IX86) //针对 x86 架构
+#define ABI "x86"
+#else // 其他架构或未知架构
+#define ABI "null"
+#endif
+//内存区域
+#define RANGE_ALL 0 // 所有内存区域 - 全部内存
+#define RANGE_JAVA_HEAP 2 // Java 虚拟机堆内存 - jh内存
+#define RANGE_C_HEAP 1 // C++ 堆内存 - ch内存
+#define RANGE_C_ALLOC 4 // C++ 分配的内存 - ca内存 [已适配 android11+ scudo内存分配器]
+#define RANGE_C_DATA 8 // C++ 的数据段 - cd内存
+#define RANGE_C_BSS 16 // C++ 未初始化的数据 - cb内存
+#define RANGE_ANONYMOUS 32 // 匿名内存区域 - a内存
+#define RANGE_JAVA 65536 // Java 虚拟机内存 - j内存
+#define RANGE_STACK 64 // 栈内存区域 - s内存
+#define RANGE_ASHMEM 524288 // Android 共享内存 - as内存
+#define RANGE_VIDEO 1048576 // 视频内存区域 - v内存
+#define RANGE_OTHER -2080896 // 其他内存区域 - o内存
+#define RANGE_B_BAD 131072 // 错误的内存区域 - b内存
+#define RANGE_CODE_APP 16384 // 应用程序代码区域 - xa内存
+#define RANGE_CODE_SYSTEM 32768 // 系统代码区域 - xs内存
+
+#if defined(__arm__) || defined(__aarch64__) //arm32和arm64架构
+#define BCMAPSFLAG(mapLine, id) \
+ (\
+ (id) == RANGE_ALL ? true: \
+ (id) == RANGE_JAVA_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_C_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[heap]")!=NULL) : \
+ (id) == RANGE_C_ALLOC ? (strstr(mapLine, "rw")!=NULL && (strstr(mapLine, "[anon:libc_malloc]")!=NULL || strstr(mapLine,"[anon:scudo")!=NULL)) : \
+ (id) == RANGE_C_DATA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_C_BSS ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[anon:.bss]")!=NULL) : \
+ (id) == RANGE_ANONYMOUS ? (strstr(mapLine, "rw")!=NULL && strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) : \
+ (id) == RANGE_JAVA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_STACK ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[stack")!=NULL) : \
+ (id) == RANGE_ASHMEM ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && strstr(mapLine, "/dev/ashmem/")!=NULL && strstr(mapLine,"dalvik")==NULL) : \
+ (id) == RANGE_VIDEO ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "/dev/mali")!=NULL) : \
+ (id) == RANGE_B_BAD ? (strstr(mapLine, "r")!=NULL && (strstr(mapLine, "kgsl-3d0")!=NULL||strstr(mapLine, ".ttf")!=NULL)) : \
+ (id) == RANGE_CODE_APP ? (strstr(mapLine, " r")!=NULL && strstr(mapLine, "xp")!=NULL && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL || (strstr(mapLine, "/dev/ashmem/")!=NULL&& strstr(mapLine,"dalvik")!=NULL) ||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_CODE_SYSTEM ? (strstr(mapLine, " r")!=NULL && strstr(mapLine, "xp")!=NULL && (strstr(mapLine, "/system")!=NULL || strstr(mapLine, "/vendor") !=NULL || strstr(mapLine, "/apex") !=NULL || strstr(mapLine, "/memfd") !=NULL || strstr(mapLine, "[vdso")!=NULL)) : \
+ (id) == RANGE_OTHER ? (strstr(mapLine, "rw")!=NULL && !(strstr(mapLine, "dalvik-")!=NULL||strstr(mapLine, "[heap]")!=NULL||strstr(mapLine, "[anon:libc_malloc]")!=NULL || strstr(mapLine,"[anon:scudo")!=NULL || strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL ||strstr(mapLine, "/data/user/")!=NULL|| strstr(mapLine, "[anon:.bss]")!=NULL || (strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) ||strstr(mapLine, "[stack")!=NULL||strstr(mapLine, "/dev/ashmem/")!=NULL||strstr(mapLine, "/dev/mali")!=NULL||strstr(mapLine, "kgsl-3d0")!=NULL||strstr(mapLine, ".ttf")!=NULL||strstr(mapLine, "/system")!=NULL||strstr(mapLine, "/vendor")!=NULL||strstr(mapLine, "/apex")!=NULL||strstr(mapLine, "/memfd")!=NULL||strstr(mapLine, "[vdso")!=NULL)) : \
+ true\
+ )
+#else //x86和x64架构 针对雷电9模拟器《已知bug:cd可能会多搜到一些xa的数据》
+#define BCMAPSFLAG(mapLine, id) \
+ (\
+ (id) == RANGE_ALL ? true: \
+ (id) == RANGE_JAVA_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_C_HEAP ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[heap]")!=NULL) : \
+ (id) == RANGE_C_ALLOC ? (strstr(mapLine, "rw")!=NULL && (strstr(mapLine, "[anon:libc_malloc]")!=NULL || strstr(mapLine,"[anon:scudo")!=NULL)) : \
+ (id) == RANGE_C_DATA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_C_BSS ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[anon:.bss]")!=NULL) : \
+ (id) == RANGE_ANONYMOUS ? (strstr(mapLine, "rw")!=NULL && strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) : \
+ (id) == RANGE_JAVA ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "dalvik-")!=NULL) : \
+ (id) == RANGE_STACK ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "[stack")!=NULL) : \
+ (id) == RANGE_ASHMEM ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "xp")==NULL && strstr(mapLine, "/dev/ashmem/")!=NULL && strstr(mapLine,"dalvik")==NULL) : \
+ (id) == RANGE_VIDEO ? (strstr(mapLine, "rw")!=NULL && strstr(mapLine, "/dev/mali")!=NULL) : \
+ (id) == RANGE_B_BAD ? (strstr(mapLine, "r")!=NULL && (strstr(mapLine, "kgsl-3d0")!=NULL||strstr(mapLine, ".ttf")!=NULL)) : \
+ (id) == RANGE_CODE_APP ? (strstr(mapLine, " r")!=NULL && (strstr(mapLine, "xp")!=NULL||strstr(mapLine, "--p")!=NULL) && (strstr(mapLine, "/data/app/")!=NULL || strstr(mapLine, "/data/data/")!=NULL || (strstr(mapLine, "/dev/ashmem/")!=NULL&& strstr(mapLine,"dalvik")!=NULL) ||strstr(mapLine, "/data/user/")!=NULL)) : \
+ (id) == RANGE_CODE_SYSTEM ? (strstr(mapLine, " r")!=NULL && (strstr(mapLine, "xp")!=NULL||strstr(mapLine, "--p")!=NULL) && (strstr(mapLine, "/system")!=NULL || strstr(mapLine, "/vendor") !=NULL || strstr(mapLine, "/apex") !=NULL || strstr(mapLine, "/memfd") !=NULL || strstr(mapLine, "[vdso")!=NULL)) : \
+ (id) == RANGE_OTHER ? (strstr(mapLine, "rw") != NULL && !(strstr(mapLine, "dalvik-") != NULL || strstr(mapLine, "[heap]") != NULL || strstr(mapLine, "[anon:libc_malloc]") != NULL || strstr(mapLine, "[anon:scudo") != NULL || strstr(mapLine, "/data/app/") != NULL || strstr(mapLine, "/data/data/") != NULL || strstr(mapLine, "/data/user/") != NULL || strstr(mapLine, "[anon:.bss]") != NULL || (strchr(mapLine, '[') == NULL && strchr(mapLine, '/') == NULL) || strstr(mapLine, "[stack") != NULL || strstr(mapLine, "/dev/ashmem/") != NULL || strstr(mapLine, "/dev/mali") != NULL || strstr(mapLine, "kgsl-3d0") != NULL || strstr(mapLine, ".ttf") != NULL || strstr(mapLine, "/system") != NULL || strstr(mapLine, "/vendor") != NULL || strstr(mapLine, "/apex") != NULL || strstr(mapLine, "/memfd") != NULL || strstr(mapLine, "[vdso") != NULL)) : \
+ true\
+ )
+#endif
+//(id) == RANGE_OTHER ? (strstr(mapLine, "rw") != NULL && strstr(mapLine, "[anon:mmv8]")!=NULL) : \
+
+//基址头
+#define HEAD_XA 0 //xa基址头
+#define HEAD_CD 1 //cd基址头
+#define HEAD_CB 2 //cb基址头 [bss]
+
+//数据类型
+#define TYPE_DWORD 4 // DWORD 类型 - D类型
+#define TYPE_FLOAT 16 // FLOAT 类型 - F类型
+#define TYPE_DOUBLE 64 // DOUBLE 类型 - E类型
+#define TYPE_WORD 2 // WORD 类型 - W类型
+#define TYPE_BYTE 1 // BYTE 类型 - B类型
+#define TYPE_QWORD 32 // QWORD 类型 - Q类型
+
+//映射数据类型别名 方便管理
+#define DWORD int32_t // 32 位有符号整数
+#define FLOAT float // 单精度浮点数
+#define DOUBLE double // 双精度浮点数
+#define WORD signed short // 有符号短整型
+#define BYTE signed char // 有符号字符
+#define QWORD int64_t // 64 位有符号整数
+
+//范围搜索格式
+#define R_SEPARATE "~" // 范围搜索符号
+
+//联合搜索格式
+#define U_DEFRANGE 512 // 默认搜索附近范围
+#define U_SEPARATE ";" // 数据分隔符
+#define U_RANGESEPARATE ":" // 数据范围符【存在两个此符号将视为按顺序搜索】
+#define U_dword "d" // 32 位有符号整数
+#define U_float "f" // 单精度浮点数
+#define U_double "e" // 双精度浮点数
+#define U_word "w" // 有符号短整型
+#define U_byte "b" // 有符号字符
+#define U_qword "q" // 64 位有符号整数
+#define U_DWORD "D" // 32 位有符号整数的大写
+#define U_FLOAT "F" // 单精度浮点数的大写
+#define U_DOUBLE "E" // 双精度浮点数的大写
+#define U_WORD "W" // 有符号短整型的大写
+#define U_BYTE "B" // 有符号字符的大写
+#define U_QWORD "Q" // 64 位有符号整数的大写
+
+#define FLAG_FREE "FREE" //修改时只进行冻结的标志
+//结构体声明:
+struct Item;//内存数据项
+struct Federated;//联合搜索项
+struct Protection;//内存保护-防模糊优化
+//全局变量
+bool isInit = false;//是否进行了初始化
+bool isSecureWrites = false;//是否进行安全写入
+bool isMapsMemArea = false;//是否为自定义内存区域
+int pid = -1;//存储进程ID
+char* packName;//存储进程包名
+int memory = RANGE_ALL;//存储要搜索的内存区域【默认所有内存】
+char* memoryMaps;//存储自定义要搜索的内存区域【maps内存段 使用自定义内存区域可以精准搜索并且提升100倍搜索速度】
+char memPath[1024];//存储进程mem内存映射虚拟文件路径
+char mapsPath[1024];//存储进程maps内存区域映射文件路径
+uint32_t freezeDelay = 200;//冻结修改延迟(毫秒)默认200ms
+static bool isFreeze;//是否正在冻结 确保只开一个冻结线程
+vector < Item > FreezeList;//冻结修改项列表
+vector < unsigned long >outcomeList;//最终搜索结果列表 - 存储最终筛选出的数据的内存地址列表
+vector < Protection > ProtectList;//保护项列表
+std::mutex lockMutex;//互斥锁 防止全局数据竞争
+
+//函数声明:
+//初始化
+int getPID(const char* packageName);// 获取进程ID
+int setPackageName(const char* packageName);// 设置目标包名 【注意:这是初始化函数,不调用此函数的话其它内存操作均失效】
+void setIsSecureWrites(bool sw);// 设置安全写入启用状态
+
+
+//模块[动/静]态基址偏移内存修改
+unsigned long getModuleBaseAddr(const char* module_name, int headType);//获取模块起始地址(基址)
+unsigned long jump(unsigned long addr,int count);//跳转指针
+unsigned long jump32(unsigned long addr);//跳转指针 [32位]
+unsigned long jump64(unsigned long addr);//跳转指针 [64位]
+int setMemoryAddrValue(const char* value, unsigned long addr, int type, bool isFree,bool isSecure);//设置指定内存地址指向的值 🛡️该方法已对当前进程进行保护 防止GG模糊🛡️
+char* getMemoryAddrData(unsigned long addr, int type);//获取指定内存地址的数据
+
+//内存搜索
+void setMemoryArea(int memoryArea);//设置要搜索的内存区域
+void setMemoryArea(const char* memoryArea);//设置自定义搜索的内存区域 好处:能精准找到想要的数据,并且搜索速度直接提升100倍 坏处:需要自己去找数据所在的maps内存段 示例:setMemoryArea("/apex/com.android.tethering/lib64/libframework-connectivity-jni.so");
+vector < unsigned long > MemorySearch(const char* value, int type);//内存搜索 【支持范围搜索 格式:最小值~最大值(同GG) 支持联合搜索 格式:值1;值2;值3;n个值:范围 示例:2D;3F;4E:50 或 2D;3F;4E没有范围则使用默认范围,两个范围符::代表按顺序搜索 (同GG)】
+vector < unsigned long > MemorySearchRange(const char* value, int type);//范围内存搜索 【格式:最小值~最大值 (同GG)】
+vector < unsigned long > MemorySearchUnited(const char* value, int type);//联合内存搜索 【格式:值1;值2;值3;n个值:附近范围 示例:2D;3F;4E:50 或 2D;3F;4E没有范围则使用默认范围,两个范围符::代表按顺序搜索 (同GG) 并且值也支持范围例如1~2;3:64】
+vector < unsigned long > ImproveOffset(const char* value, int type, unsigned long offset);//偏移改善 [筛选偏移处特征值 支持联合改善,范围改善]
+vector < unsigned long > ImproveOffsetRange(const char* value, int type, unsigned long offset);//偏移范围改善 [筛选偏移处只会在一个范围内变化的特征值] 【格式:最小值~最大值 (同GG)】
+vector < unsigned long > ImproveOffsetUnited(const char* value, int type, unsigned long offset);//偏移联合改善 [筛选偏移处永远只会为某些值的特征值] 【格式:值1;值2;n个值; 示例:2D;3F;4E 或 2D;3~6F;9E 注:联合改善不支持附近范围和顺序改善】
+vector < unsigned long > ImproveValue(const char* value, int type);//改善 [支持联合改善,范围改善]
+int MemoryOffsetWrite(const char* value,int type, unsigned long offset, bool isFree,bool isSecure);//结果偏移写入数据 🛡️该方法已对当前进程进行保护 防止GG模糊🛡️
+int getResultCount();//获取最终搜索结果数量
+vector < unsigned long > getResultList();//获取最终搜索结果列表
+int printResultListToFile(const char* filePath);//打印最终搜索结果列表到指定文件
+int clearResultList();//清空最终搜索结果列表
+
+//内存保护二次修改
+void MemoryProtect(unsigned long addr);
+int getProtectionNum();
+//冻结内存修改
+vector < Item > getFreezeList();//获取冻结修改项列表
+void setFreezeDelayMs(uint32_t delay);//设置冻结修改延迟【毫秒】
+int getFreezeNum();//获取冻结修改项数量
+int addFreezeItem(const char* value, unsigned long addr, int type); // 添加一个冻结修改项
+int removeFreezeItem(unsigned long addr); // 移除一个冻结修改项
+int removeAllFreezeItem();//移除所有冻结修改项
+void* freezeThread(void* arg); // 冻结循环修改线程
+int startAllFreeze(); // 开始冻结所有修改项
+int stopAllFreeze(); // 停止冻结所有修改项
+int printFreezeListToFile(const char* filePath);//打印冻结列表到指定文件
+
+//获取内存信息相关工具
+char* getMemoryAddrMapLine(unsigned long address);//获取指定内存地址的Maps映射行
+char* getMapLineMemoryAreaName(const char* mapLine);//获取Maps映射行所在内存区域名称
+char* getMemoryAreaIdName(int memid);//获取指定内存id的内存名称
+char* getMemoryAreaName();//获取当前内存名称
+char* getDataTypeName(int typeId);//获取指定数据类型id的数据类型名称
+
+//完全需要ROOT权限的操作
+//PS:告诉一下菜鸟,这些操作涉及到跨进程和系统操作,所以必须完全ROOT,直装也没用
+//--kill--
+int killProcess_Root(const char* packageName); // 杀掉指定包名的进程 (此方法对于执行者自身进程无需Root)
+int stopProcess_Root(const char* packageName); // 暂停指定包名的进程 (此方法对于执行者自身进程无需Root)
+int resumeProcess_Root(const char* packageName); // 恢复被暂停的指定包名的进程 (此方法对于执行者自身进程无需Root)
+void killAllInotify_Root(); // 杀掉所有inotify监视器,防止游戏监视文件变化
+int killGG_Root(); // 杀掉GG修改器
+int killXscript_Root(); // 杀掉XS脚本
+//--Other--
+int rebootsystem_Root(); // 重启手机
+int installapk_Root(const char* apkPackagePath); // 静默安装 指定路径的APK安装包
+int uninstallapk_Root(const char* packageName); // 静默卸载 指定包名的APK软件
+int Cmd(const char* command);//执行命令
+int Cmd_Root(const char* command);//执行超级命令
+
+//-内部耗时操作
+//void __MemorySearch__(const char* value, int type);//内存搜索
+//void __MemorySearchRange__(const char* value, int type);//范围内存搜索
+//void __MemorySearchUnited__(const char* value, int type);//联合内存搜索
+//void __ImproveOffset__(const char* value, int type, unsigned long offset);//偏移改善
+//void __ImproveOffsetRange__(const char* value, int type, unsigned long offset);//偏移范围改善
+//void __ImproveOffsetUnited__(const char* value, int type, unsigned long offset);//偏移联合改善
+//void __ImproveValue__(const char* value, int type);//改善
+
+///
+/// 内存数据项
+///
+struct Item {
+ char* value;//值
+ unsigned long addr;//地址
+ int type; //类型
+};
+
+///
+/// 联合搜索项
+///
+struct Federated {
+ char* value;//搜索值
+ int type;//类型
+ bool isRange = false;//是否为范围值 例1~20
+ char minValue[64 + 2];//最小值(范围值)
+ char maxValue[64 + 2];//最大值(范围值)
+ ///
+ /// 构造
+ ///
+ /// 搜索值
+ /// 默认类型:如果值没有+类型字母符则使用此默认类型
+ Federated(const char* v, int defType) {
+ //初始化类型
+ if (strstr(v, U_dword) != nullptr || strstr(v, U_DWORD) != nullptr) {
+ type = TYPE_DWORD;
+ }
+ else if (strstr(v, U_float) != nullptr || strstr(v, U_FLOAT) != nullptr) {
+ type = TYPE_FLOAT;
+ }
+ else if (strstr(v, U_double) != nullptr || strstr(v, U_DOUBLE) != nullptr) {
+ type = TYPE_DOUBLE;
+ }
+ else if (strstr(v, U_word) != nullptr || strstr(v, U_WORD) != nullptr) {
+ type = TYPE_WORD;
+ }
+ else if (strstr(v, U_byte) != nullptr || strstr(v, U_BYTE) != nullptr) {
+ type = TYPE_BYTE;
+ }
+ else if (strstr(v, U_qword) != nullptr || strstr(v, U_QWORD) != nullptr) {
+ type = TYPE_QWORD;
+ }
+ else {
+ type = defType;
+ }
+
+ //初始化值
+ value = strdup(v);
+
+ //去除值中的类型字母符
+ int j = 0; //用于跟踪新的字符串索引
+ for (int i = 0; value[i] != '\0'; i++) {
+ //检查当前字符是否为字母
+ if (!isalpha(value[i])) {
+ //如果不是字母,则将其放到前面
+ value[j] = value[i];
+ j++;
+ }
+ }
+ value[j] = '\0'; //添加字符串结束符
+
+ //如果是范围值 [这里不要使用strtok来获取 因为如果外部正在使用strtok来初始化时这将影响到外部strtok的分割]
+ char* start = strstr(value, R_SEPARATE);
+ if (start != NULL) {
+ strncpy(minValue, value, start - value); //从开头到分隔符的部分为最小值
+ minValue[start - value] = '\0'; //最小值最后的位置添加字符串结束符
+ strcpy(maxValue, start + 1); //从分隔符后一个字符开始为最大值
+ isRange = true;
+ }
+ }
+
+};
+
+///
+/// 内存保护
+///
+struct Protection {
+ unsigned long addr;//地址
+};
+
+/////
+///// 内存搜索
+/////
+///// 搜索值
+///// 搜索类型
+//void MemorySearch(const char* value, int type) {
+// std::thread t([=]() {
+// // 加锁,确保在访问 outcomeList 时是安全的
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __MemorySearch__(value, type); // 假设 __MemorySearch__ 函数会操作 outcomeList
+// });
+// t.detach();
+//}
+//
+/////
+///// 内存搜索某个范围区域内的所有值
+/////
+///// 范围值 格式:10~20
+///// 搜索类型
+//void MemorySearchRange(const char* value, int type) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __MemorySearchRange__(value, type);
+// });
+// t.detach();
+//}
+//
+/////
+///// 联合内存搜索 [注意:附近范围某些情况可能会比GG多4~8个字节]
+/////
+///// 联合搜索值 格式:值1;值2;值3;n个值:附近范围
+///// 默认联合搜索类型
+//void MemorySearchUnited(const char* value, int type) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __MemorySearchUnited__(value, type);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 筛选结果附近指定偏移处具有指定特征值的结果
+/////
+///// 数据附近特征值
+///// 特征值数据类型
+///// 特征值相对主数据的偏移量
+//void ImproveOffset(const char* value, int type, unsigned long offset) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveOffset__(value, type, offset);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 筛选指定偏移处的值在这个范围内的结果
+/////
+///// 范围值[格式:最小~最大]
+///// 数据类型
+//void ImproveOffsetRange(const char* value, int type, unsigned long offset) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveOffsetRange__(value, type, offset);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 筛选指定偏移处的值为联合值中的某一个值的结果
+/////
+///// 联合筛选值
+///// 默认类型
+//void ImproveOffsetUnited(const char* value, int type, unsigned long offset) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveOffsetUnited__(value, type, offset);
+// });
+// t.detach();
+//}
+//
+/////
+///// 从当前搜索结果中 直接改善 [支持范围改善和联合改善]
+/////
+///// 改善值
+///// 默认类型
+//void ImproveValue(const char* value, int type) {
+// std::thread t([=]() {
+// std::lock_guard lock(lockMutex); //锁定互斥量
+// __ImproveValue__(value, type);
+// });
+// t.detach();
+//}
+
+///
+/// 通过包名获取进程ID
+///
+/// 进程APK包名
+/// 进程ID
+int getPID(const char* packageName)
+{
+ int id = -1; // 进程ID,初始化为-1,表示未找到
+ DIR* dir; // 目录流指针
+ FILE* fp; // 文件指针
+ char filename[64]; // 存储/proc/[pid]/cmdline路径
+ char cmdline[64]; // 存储进程的命令行信息
+ struct dirent* entry; // 目录项结构体,用于存储目录中的条目
+
+ dir = opendir("/proc"); // 打开/proc目录
+ if (dir != NULL) {
+ while ((entry = readdir(dir)) != NULL) // 遍历/proc目录下的每一个条目
+ {
+ id = atoi(entry->d_name); // 将条目名转换为进程ID
+ if (id >= 0) // 过滤非进程ID的条目
+ {
+ sprintf(filename, "/proc/%d/cmdline", id); // 生成进程命令行文件路径
+ fp = fopen(filename, "r"); // 打开命令行文件
+ if (fp != NULL)
+ {
+ fgets(cmdline, sizeof(cmdline), fp); // 读取命令行信息
+ fclose(fp); // 关闭文件
+ if (strcmp(packageName, cmdline) == 0) // 比较包名与命令行信息
+ {
+ closedir(dir); // 关闭目录
+ return id;//找到了
+ }
+ }
+ }
+ }
+ closedir(dir); // 关闭目录
+ }
+ return -1; // 未找到进程,返回-1
+}
+
+///
+/// 设置包名,函数内部将获取该包名的进程ID方便之后操作
+///
+/// 进程APK包名
+/// 进程ID
+int setPackageName(const char* packageName)
+{
+ pid = getPID(packageName);
+ if (pid != -1) {
+ sprintf(memPath, "/proc/%d/mem", pid);//初始化构造mem内存文件路径
+ sprintf(mapsPath, "/proc/%d/maps", pid);//初始化构造maps内存文件路径
+ isInit = true;//进行了初始化
+ packName = strdup(packageName);//设置包名
+ //outcomeList.reserve(100000000); // 预分配足够的内存
+ }
+ return pid;
+}
+
+///
+/// 设置安全写入的启用状态
+///
+/// 状态
+void setIsSecureWrites(bool sw) {
+ isSecureWrites = sw;
+}
+
+
+
+
+
+
+///
+/// 获取动态共享库的基址(起始地址)
+///
+/// 动态共享库名称(后缀.so文件)
+/// 基址头类型
+/// 基地址
+unsigned long getModuleBaseAddr(const char* module_name, int headType)
+{
+ if (!isInit) {
+ //未进行初始化
+ return 0;
+ }
+
+ //存储模块名称
+ char* mod_name = strdup(module_name); //复制字符串
+ if (mod_name == NULL) {
+ perror("strdup failed");
+ return 0;
+ }
+ //检测如果包含:bss则去除
+ char* pos = strstr(mod_name, ":bss");
+ if (pos != NULL) {
+ //如果找到bss
+ *pos = '\0'; //将:bss换成字符串中断符进行截断
+ }
+ FILE* fp; //文件指针
+ unsigned long start = 0;//存储获取到的模块的起始地址
+ unsigned long end = 0;//存储获取到的模块的结束地址
+ char line[1024]; //存储读取的行
+ bool cb = false; //是否开始查询bss
+ bool isFoundIt = false;//是否找到
+ fp = fopen(mapsPath, "r");
+ if (fp != NULL)
+ {
+ //逐行读取文件
+ while (fgets(line, sizeof(line), fp))
+ {
+ if (isMapsMemArea) {
+ //对于自定义内存区域
+ if (strstr(line, memoryMaps)) {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+ break;
+ }
+ }
+ else {
+ switch (headType) {
+ case HEAD_XA:
+ {
+ //查找行中是否包含模块名
+ if (strstr(line, mod_name) && BCMAPSFLAG(line, RANGE_CODE_APP))
+ {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+
+ //转换特殊地址
+ if (start == 0x8000) {
+ start = 0;
+ }
+ isFoundIt = true;//找到了
+ }
+ }
+ break;
+ case HEAD_CD://由于cd的结束地址是cb的起始地址 所以要先找到cb的起始地址 因此这里使用贯穿
+ case HEAD_CB:
+ {
+ //找到模块名之后才开始查询bss
+ if (strstr(line, mod_name) && BCMAPSFLAG(line, RANGE_CODE_APP))
+ {
+ cb = true;
+ }
+ if (cb)
+ {
+ if (BCMAPSFLAG(line, RANGE_C_BSS))
+ {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+ //如果是cb则直接找到
+ if (headType == HEAD_CB) {
+ isFoundIt = true;//找到了
+ break;
+ }
+ //如果是cd则开始查cd
+ if (headType == HEAD_CD) {
+ //将cb起始地址格式化为结束地址作为cd的筛选条件
+ char str[100];
+ sprintf(str, "-%lx", start);
+
+ //重置文件指针到文件的开始位置
+ fseek(fp, 0, SEEK_SET);
+ //重新逐行读取文件
+ while (fgets(line, sizeof(line), fp)) {
+ if (strstr(line, str))
+ {
+ //提取起始地址和结束地址
+ sscanf(line, "%lx-%lx", &start, &end);
+ isFoundIt = true;//找到了
+ break;
+ }
+ }
+ //重置文件指针到文件的开始位置
+ fseek(fp, 0, SEEK_SET);
+ }
+ }
+ }
+ }
+ break;
+ }
+ //检查是否找到
+ if (isFoundIt) {
+ break;//跳出循环
+ }
+ }
+
+ }
+ //关闭文件
+ fclose(fp);
+ }
+ //释放模块字符串
+ free(mod_name);
+ // 返回模块的基地址
+ return start;
+}
+///
+/// 跳转到指定内存地址的指针
+///
+/// 内存地址
+// 要读取的字节数
+/// 指针地址
+unsigned long jump(unsigned long addr,int count)
+{
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0) {
+ unsigned long pAddr=0;
+ ssize_t r = pread64(fd, &pAddr, count, addr);
+ if(r<0){
+ pAddr = 0;
+ }
+ close(fd);
+ return pAddr;
+ }
+ return 0;
+}
+///
+/// 跳转到指定内存地址的指针【32位】
+///
+/// 内存地址
+/// 指针地址
+unsigned long jump32(unsigned long addr)
+{
+ return jump(addr,4);//读取4字节
+}
+///
+/// 跳转到指定内存地址的指针【64位】
+///
+/// 内存地址
+/// 指针地址
+unsigned long jump64(unsigned long addr)
+{
+ return jump(addr,8);//读取8字节
+}
+
+
+///
+/// 设置指定内存地址指向的值
+///
+/// 设置的值
+/// 内存地址
+/// 数据类型
+/// 是否冻结
+/// 设置成功与否
+int setMemoryAddrValue(const char* value, unsigned long addr, int type, bool isFree,bool isSecure)
+{
+int pageSize = getpagesize();
+void* addrToProtect;
+unsigned long alignedAddr;
+ if (!isInit) {
+ //未进行初始化
+ return -1;
+ }
+
+ if(isSecure){
+ addrToProtect = (void*)(addr);
+
+ alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);}
+ //是否冻结修改
+ if (isFree) {
+ addFreezeItem(value, addr, type);//添加一个冻结修改项目
+ startAllFreeze();//开始冻结
+ return 0;
+ }
+ else {
+
+ int fd = open(memPath, O_RDWR | O_SYNC);
+ //打开maps文件
+ FILE* maps = fopen(mapsPath, "r");
+ if (fd >= 0 && maps) {
+ switch (type) {
+ case TYPE_DWORD:
+ {
+
+ DWORD v = atoi(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(DWORD), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(FLOAT), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(DOUBLE), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(QWORD), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(WORD), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+ ;
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
+ pwrite64(fd, &v, sizeof(BYTE), addr);
+ res = mprotect((void*)alignedAddr, pageSize, PROT_EXEC);
+
+ }
+ break;
+ }
+
+
+ }
+ if (fd >= 0) {
+ close(fd);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ removeFreezeItem(addr);//移除这个冻结修改项目(如果存在)
+ return 0;
+ }
+
+
+ return -1;
+}
+
+///
+/// 获取指定内存地址的数据
+///
+/// 内存地址
+/// 数据类型
+/// 获取到的数据[指针记得用完调用free释放]
+char* getMemoryAddrData(unsigned long addr, int type)
+{
+ if (!isInit) {
+ //未进行初始化
+ return "NULL";
+ }
+
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0) {
+ int size = -1;
+ void* buff;
+ char* value = "NULL";
+
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ size = sizeof(DWORD);//存储要读取的字节数
+ buff = (void*)malloc(size);//分配一块内存来存储读取到的数据
+ pread64(fd, buff, size, addr);//从mem文件指定内存地址读取数据到buff
+ DWORD v = *(DWORD*)buff;//解析获取到的数据
+ int len = snprintf(NULL, 0, "%d", v);//获取数据的字符长度
+ value = (char*)malloc(len + 1);//字符串动态分配足够内存来存储数据 确保能足够存储数据的字符数量
+ sprintf(value, "%d", v);//将数据格式化为字符串
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ size = sizeof(FLOAT);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ FLOAT v = *(FLOAT*)buff;
+ int len = snprintf(NULL, 0, "%f", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%f", v);
+ //检测是否需要使用科学记数法来格式化
+ bool isScience = true;
+ for (int i = 0; i < len; i++) {
+ if (value[i] == '.' || value[i] == '-') {
+ continue;
+ }
+ if (value[i] != '0') {
+ isScience = false;
+ }
+ }
+ if (isScience) {
+ sprintf(value, "%.8e", v);
+ }
+ if (strstr(value, "nan")) {
+ value = "NaN";
+ }
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ size = sizeof(DOUBLE);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ DOUBLE v = *(DOUBLE*)buff;
+ int len = snprintf(NULL, 0, "%f", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%f", v);
+ //检测是否需要使用科学记数法来格式化
+ bool isScience = true;
+ if (len < 20) {
+ for (int i = 0; i < len; i++) {
+ if (value[i] == '.' || value[i] == '-') {
+ continue;
+ }
+ if (value[i] != '0') {
+ isScience = false;
+ }
+ }
+ }
+ if (isScience) {
+ sprintf(value, "%.8e", v);
+ }
+ if (strstr(value, "nan")) {
+ value = "NaN";
+ }
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ size = sizeof(QWORD);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ QWORD v = *(QWORD*)buff;
+ int len = snprintf(NULL, 0, "%lld", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%lld", v);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ size = sizeof(WORD);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ WORD v = *(WORD*)buff;
+ int len = snprintf(NULL, 0, "%d", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%d", v);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ size = sizeof(BYTE);
+ buff = (void*)malloc(size);
+ pread64(fd, buff, size, addr);
+ BYTE v = *(BYTE*)buff;
+ int len = snprintf(NULL, 0, "%d", v);
+ value = (char*)malloc(len + 1);
+ sprintf(value, "%d", v);
+ }
+ break;
+ }
+
+ close(fd);
+ if (buff != NULL) {
+ free(buff);
+ }
+ return value;
+ }
+ return "NULL";
+}
+
+
+///
+/// 设置要搜索的内存区域,初始化内存区域方便之后内存搜索
+///
+/// 内存区域
+void setMemoryArea(int memoryArea)
+{
+ memory = memoryArea;
+ isMapsMemArea = false;
+}
+///
+/// 设置自定义内存区域 好处:能精准找到想要的数据,并且搜索速度直接提升100倍 坏处:需要自己去找数据所在的maps内存段 示例:setMemoryArea("/apex/com.android.tethering/lib64/libframework-connectivity-jni.so");
+///
+/// maps内存段
+void setMemoryArea(const char* memoryArea)
+{
+ memoryMaps = strdup(memoryArea);
+ isMapsMemArea = true;
+}
+///
+/// 内存搜索
+///
+/// 搜索值
+/// 搜索类型
+/// 搜索结果列表
+vector < unsigned long > MemorySearch(const char* value, int type)
+{
+if(getFreezeNum()>0){
+for(int i=0;i0){
+ for(int i=0;i= 0 && maps)
+ {
+
+ //清空搜索结果列表
+ //clearResultList();
+
+ char mapLine[1024]; //用于存储每行读取到的信息
+ unsigned long start; //存储内存起始地址
+ unsigned long end; //存储内存结束地址
+ //逐行读取maps文件每行信息
+ while (fgets(mapLine, sizeof(mapLine), maps))
+ {
+ //如果当前行匹配内存标志则进行搜索
+ if (BCMAPSFLAG(mapLine, memory))
+ {
+ //从该行中解析出内存区域的起始和结束地址
+ sscanf(mapLine, "%lx-%lx", &start, &end);
+ int size = end - start; //计算内存区域的大小
+ void* buf = (void*)malloc(size);//存储指向起始地址的指针
+ int ret = pread64(mem, buf, size, start);//buf指向起始地址
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(value);//存储要搜索的数值
+ int increment = sizeof(DWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(DWORD*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ int increment = sizeof(FLOAT);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(FLOAT*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ //DOUBLE v = atof(value);
+ int increment = sizeof(DOUBLE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(DOUBLE*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ int increment = sizeof(QWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(QWORD*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ int increment = sizeof(WORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(WORD*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+ int increment = sizeof(BYTE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ //如果当前buf+偏移中的数据等于要查找的数据则将该地址加入搜索结果列表中
+ if (*(BYTE*)((char*)buf + index) == v)
+ {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ }
+ if (buf != NULL) {
+ free(buf);
+ }
+ }
+ }
+ }
+ if (mem >= 0) {
+ close(mem);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ }
+ return outcomeList;
+}
+
+///
+/// 内存搜索某个范围区域内的所有值
+///
+/// 范围值 格式:10~20
+/// 搜索类型
+/// 搜索结果列表
+vector < unsigned long > MemorySearchRange(const char* value, int type)
+{
+if(getFreezeNum()>0){
+for(int i=0;i0){
+ for(int i=0;i= 0 && maps)
+ {
+ //清空搜索结果列表
+ //clearResultList();
+ //outcomeList.reserve(100000000); // 预分配足够的内存
+ char mapLine[1024]; //用于存储每行读取到的信息
+ unsigned long start; //存储内存起始地址
+ unsigned long end; //存储内存结束地址
+ char formatString[50]; //存储格式规则
+
+ //逐行读取maps每一行
+ while (fgets(mapLine, sizeof(mapLine), maps))
+ {
+
+ //如果当前行匹配内存标志则进行搜索
+ if (BCMAPSFLAG(mapLine, memory))
+ {
+ //从该行中解析出内存区域的起始和结束地址
+ sscanf(mapLine, "%lx-%lx", &start, &end);
+ int size = end - start; //计算内存区域的大小
+ void* buf = (void*)malloc(size);//存储指向起始地址的指针
+ int ret = pread64(mem, buf, size, start);//buf指向起始地址
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%d", R_SEPARATE, "%d");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(DWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ DWORD v = *(DWORD*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);//添加几千万以上大量数据时可能会影响性能
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%f", R_SEPARATE, "%f");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(FLOAT);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ FLOAT v = *(FLOAT*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%f", R_SEPARATE, "%f");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(DOUBLE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ DOUBLE v = *(DOUBLE*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%lld", R_SEPARATE, "%lld");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(QWORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ QWORD v = *(QWORD*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%d", R_SEPARATE, "%d");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(WORD);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ WORD v = *(WORD*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE minv, maxv;//存储最小值和最大值
+ sprintf(formatString, "%s%s%s", "%d", R_SEPARATE, "%d");
+ sscanf(value, formatString, &minv, &maxv);//解析范围值
+ int increment = sizeof(BYTE);//偏移增量
+ if (ret == size)
+ {
+ int index = 0;//存储偏移
+ while (index < size)
+ {
+ BYTE v = *(BYTE*)((char*)buf + index);
+ //如果这个数据大于等于最小值并且小于等于最大值的话就加入最终搜索结果列表
+ if (v >= minv && v <= maxv) {
+ outcomeList.push_back(start + index);
+ }
+ index += increment;//偏移移动到下一个位置
+ }
+ }
+ }
+ break;
+ }
+ if (buf != NULL) {
+ free(buf);
+ }
+
+ }
+ }
+ }
+ if (mem >= 0) {
+ close(mem);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ }
+ return outcomeList;
+}
+
+
+
+///
+/// 联合内存搜索 [注意:附近范围某些情况可能会比GG多4~8个字节 比如对于1~2;5:50这种情况gg的联合范围搜索只能按顺序 而这里是不按顺序的 对于联合范围加上::按顺序搜索就和GG联合范围一致了]
+///
+/// 联合搜索值 格式:值1;值2;值3;n个值:附近范围 (没有范围则使用默认范围 两个范围符::代表按顺序搜索) 示例:7F;2D;3E:30 或 7F;2D;3E(未设置范围则使用默认范围) 并且值也支持范围例如1~2;3:64
+/// 默认联合搜索类型:对于未加类型符的值将使用此类型 例如1D;2;3E中的2将使用此类型
+/// 搜索结果
+vector < unsigned long > MemorySearchUnited(const char* value, int type) {
+if(getFreezeNum()>0){
+for(int i=0;i0){
+ for(int i=0;i valueList; //存储分割出的所有数值的列表
+ //获取第一个分割部分
+ const char* token = strtok(valueCopy, U_SEPARATE);
+ //逐个获取剩余的分割部分
+ while (token != NULL) {
+ valueList.emplace_back(token, type); //保存分割出的值
+ token = strtok(NULL, U_SEPARATE); // 获取下一个分割部分
+ }
+
+ //开始联合搜索
+ if (!valueList.empty()) {
+ ///先搜第一个值的内存地址 作为起始地址 [如果第一个值是范围值内部将自动进行范围搜索这里无需判断]
+ MemorySearch(valueList[0].value, valueList[0].type);
+ //搜索剩余值
+ //打开mem内存文件
+ int mem = open(memPath, O_RDONLY);
+ if (mem >= 0) {
+ vector < unsigned long >offsetFilterResults;
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ vector < Item > results;//存储当前起始地址附近找到的值列表
+ //开始查找当前起始地址附近的值
+ for (int j = 0; j < valueList.size(); j++)
+ {
+ switch (valueList[j].type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v;
+ DWORD minv;
+ DWORD maxv;
+ if (valueList[j].isRange) {
+ minv = atoi(valueList[j].minValue);
+ maxv = atoi(valueList[j].maxValue);
+ }
+ else {
+ v = atoi(valueList[j].value);
+ }
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DWORD eV = *(DWORD*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v;
+ FLOAT minv;
+ FLOAT maxv;
+ if (valueList[j].isRange) {
+ minv = atof(valueList[j].minValue);
+ maxv = atof(valueList[j].maxValue);
+ }
+ else {
+ v = atof(valueList[j].value);
+ }
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ FLOAT eV = *(FLOAT*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v;
+ DOUBLE minv;
+ DOUBLE maxv;
+ if (valueList[j].isRange) {
+ minv = strtod(valueList[j].minValue, NULL);
+ maxv = strtod(valueList[j].maxValue, NULL);
+ }
+ else {
+ v = strtod(valueList[j].value, NULL);
+ }
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DOUBLE eV = *(DOUBLE*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v;
+ QWORD minv;
+ QWORD maxv;
+ if (valueList[j].isRange) {
+ minv = atoll(valueList[j].minValue);
+ maxv = atoll(valueList[j].maxValue);
+ }
+ else {
+ v = atoll(valueList[j].value);
+ }
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ QWORD eV = *(QWORD*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v;
+ WORD minv;
+ WORD maxv;
+ if (valueList[j].isRange) {
+ minv = (WORD)atoi(valueList[j].minValue);
+ maxv = (WORD)atoi(valueList[j].maxValue);
+ }
+ else {
+ v = (WORD)atoi(valueList[j].value);
+ }
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ WORD eV = *(WORD*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v;
+ BYTE minv;
+ BYTE maxv;
+ if (valueList[j].isRange) {
+ minv = (BYTE)atoi(valueList[j].minValue);
+ maxv = (BYTE)atoi(valueList[j].maxValue);
+ }
+ else {
+ v = (BYTE)atoi(valueList[j].value);
+ }
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ int range = unitedRange;
+ //范围根据数据类型自动对齐
+ if (range % size != 0) {
+ range = range + (size - (range % size));
+ }
+ int offset = 0;
+ if (!isOrder) {
+ offset = -range;
+ }
+
+ while (offset < range)
+ {
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ BYTE eV = *(BYTE*)buf;
+ if (valueList[j].isRange) {
+ //对于范围
+ if (eV >= minv && eV <= maxv)
+ {
+ //goto add;
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ else {
+ //对于单值
+ if (eV == v)
+ {
+ //add:
+ Item table;
+ table.value = strdup(valueList[j].value);
+ table.addr = outcomeList[i] + offset;
+ table.type = valueList[j].type;
+ results.push_back(table);
+ //break;
+ }
+ }
+ }
+ offset += size;
+ }
+ free(buf);
+ }
+ break;
+ }
+ }
+
+ if (results.size() >= valueList.size()) {
+ //检查当前找到的附近值向量中是否包含搜索值向量中的所有元素 (包含所有才添加到结果)
+ bool isAdd = true;
+ for (int i = 0; i < valueList.size(); i++)
+ {
+ bool found = false;
+ for (int j = 0; j < results.size(); j++)
+ {
+ if (strcmp(results[j].value, valueList[i].value) == 0) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ isAdd = false;
+ break;
+ }
+ }
+
+ if (isAdd) {
+ for (int h = 0; h < results.size(); h++)
+ {
+ //防止重复添加
+ if (find(offsetFilterResults.begin(), offsetFilterResults.end(), results[h].addr) == offsetFilterResults.end()) {
+ //if (labs(outcomeList[i] - results[h]) <= unitedRange) {
+ offsetFilterResults.push_back(results[h].addr);
+ //}
+ }
+ }
+ }
+ }
+ }
+
+ close(mem);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < offsetFilterResults.size(); i++)
+ {
+ outcomeList.push_back(offsetFilterResults[i]);
+ }
+ //升序排序结果
+ sort(outcomeList.begin(), outcomeList.end());
+ }
+ }
+ free(valueCopy); //释放副本内存
+ }
+ return outcomeList;
+}
+
+
+
+///
+/// 从当前搜索结果中 筛选结果附近指定偏移处具有指定特征值的结果 [支持范围改善,联合改善]
+///
+/// 数据附近特征值
+/// 特征值数据类型
+/// 特征值相对主数据的偏移量
+/// 最终筛选结果列表
+vector < unsigned long > ImproveOffset(const char* value, int type, unsigned long offset)
+{
+ if (isInit) {
+ //如果包含分隔符则使用偏移联合改善
+ if (strstr(value, U_SEPARATE)) {
+ return ImproveOffsetUnited(value, type, offset);
+ }
+ //如果包含范围则使用偏移范围改善
+ if (strstr(value, R_SEPARATE) && !strstr(value, U_SEPARATE)) {
+ return ImproveOffsetRange(value, type, offset);
+ }
+ vector < unsigned long >offsetFilterResults;//临时筛选结果列表 - 临时存储当前偏移筛选出的附近拥有特征值的数据
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0)
+ {
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(value);
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(DWORD*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(FLOAT*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(DOUBLE*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(QWORD*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(WORD*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ if (*(BYTE*)buf == v)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ }
+ close(fd);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < offsetFilterResults.size(); i++)
+ {
+ outcomeList.push_back(offsetFilterResults[i]);
+ }
+ }
+ }
+ return outcomeList;
+}
+
+///
+/// 从当前搜索结果中 筛选指定偏移处的值在这个范围内的结果 [偏移范围改善] 适用于:某些特征码会变化但是只会在一个范围之内变化时 比如特征码始终为1或2或3时 可以使用偏移范围改善使用1~3即可
+///
+/// 范围值[格式:最小~最大 例如1~20]
+/// 数据类型
+///
+vector < unsigned long > ImproveOffsetRange(const char* value, int type, unsigned long offset) {
+ if (isInit) {
+ char minValue[64 + 2];
+ char maxValue[64 + 2];
+ const char* start = strstr(value, R_SEPARATE);
+ if (start != NULL) {
+ strncpy(minValue, value, start - value); //从开头到分隔符的部分为最小值
+ minValue[start - value] = '\0'; //最小值最后的位置添加字符串结束符
+ strcpy(maxValue, start + 1); //从分隔符后一个字符开始为最大值
+ }
+ vector < unsigned long >offsetFilterResults;//临时筛选结果列表 - 临时存储当前偏移筛选出的附近拥有特征值的数据
+ int fd = open(memPath, O_RDONLY);
+ if (fd >= 0)
+ {
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD minv = atoi(minValue);
+ DWORD maxv = atoi(maxValue);
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DWORD bV = *(DWORD*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT minv = atof(minValue);
+ FLOAT maxv = atof(maxValue);
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ FLOAT bV = *(FLOAT*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE minv = strtod(minValue, NULL);
+ DOUBLE maxv = strtod(maxValue, NULL);
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ DOUBLE bV = *(DOUBLE*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD minv = atoll(minValue);
+ QWORD maxv = atoll(maxValue);
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ QWORD bV = *(QWORD*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD minv = (WORD)atoi(minValue);
+ WORD maxv = (WORD)atoi(maxValue);
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ WORD bV = *(WORD*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE minv = (BYTE)atoi(minValue);
+ BYTE maxv = (BYTE)atoi(maxValue);
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ //遍历搜索到的数据的内存地址列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ //检查这个从内存地址偏移[offset]之后的内存地址指向的值是否为v
+ int ret = pread64(fd, buf, size, outcomeList[i] + offset);
+ if (ret == size)
+ {
+ BYTE bV = *(BYTE*)buf;
+ if (bV >= minv && bV <= maxv)
+ {
+ //如果匹配成功则将这个内存地址添加进偏移筛选结果列表
+ offsetFilterResults.push_back(outcomeList[i]);
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ }
+ close(fd);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < offsetFilterResults.size(); i++)
+ {
+ outcomeList.push_back(offsetFilterResults[i]);
+ }
+ }
+ }
+ return outcomeList;
+
+}
+
+///
+/// 从当前搜索结果中 筛选指定偏移处的值为联合值中的某一个值的结果 [偏移联合改善] 适用于:某些特征码会变化但是永远只会变为那几个固定值的情况 比如只会变化为22或15或27时可以使用偏移联合改善22;15;27
+///
+/// 联合筛选值:[格式:值1;值2;值3;n个值 示例:7F;2D;3E 并且值也支持范围例如1~2;3 注:改善不支持顺序改善和区间范围]
+/// 默认类型:对于未将类型符的值使用此类型 例如1D;2;3E中的2将使用此类型
+///
+vector < unsigned long > ImproveOffsetUnited(const char* value, int type, unsigned long offset) {
+ if (isInit) {
+ //LOGD("联合改善调试", "start");
+ char* valueCopy = strdup(value);//创建副本内存因为之后要进行修改传入的字符串
+
+ //获取联合改善数值到列表
+ vector < Federated > valueList; //存储分割出的所有数值的列表
+ //获取第一个分割部分
+ const char* token = strtok(valueCopy, U_SEPARATE);
+ //逐个获取剩余的分割部分
+ while (token != NULL) {
+ valueList.emplace_back(token, type); //保存分割出的值
+ token = strtok(NULL, U_SEPARATE); // 获取下一个分割部分
+ }
+
+ //开始联合改善
+ if (!valueList.empty()) {
+ //打开mem内存文件
+ int mem = open(memPath, O_RDONLY);
+ if (mem >= 0) {
+ vector < unsigned long >filterResults;//存储临时改善结果列表
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ for (int j = 0; j < valueList.size(); j++)
+ {
+ bool isF = false;//标记是否已找到
+ switch (valueList[j].type)
+ {
+ case TYPE_DWORD:
+ {
+ int size = sizeof(DWORD);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ DWORD eV = *(DWORD*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ DWORD minv = atoi(valueList[j].minValue);
+ DWORD maxv = atoi(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ DWORD v = atoi(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ int size = sizeof(FLOAT);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ FLOAT eV = *(FLOAT*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ FLOAT minv = atof(valueList[j].minValue);
+ FLOAT maxv = atof(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ FLOAT v = atof(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ int size = sizeof(DOUBLE);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ DOUBLE eV = *(DOUBLE*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ DOUBLE minv = strtod(valueList[j].minValue, NULL);
+ DOUBLE maxv = strtod(valueList[j].maxValue, NULL);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ DOUBLE v = strtod(valueList[j].value, NULL);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ int size = sizeof(QWORD);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ QWORD eV = *(QWORD*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ QWORD minv = atoll(valueList[j].minValue);
+ QWORD maxv = atoll(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ QWORD v = atoll(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ int size = sizeof(WORD);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ WORD eV = *(WORD*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ WORD minv = (WORD)atoi(valueList[j].minValue);
+ WORD maxv = (WORD)atoi(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ WORD v = (WORD)atoi(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ int size = sizeof(BYTE);
+ void* buf = (void*)malloc(size);
+ int ret = pread64(mem, buf, size, outcomeList[i] + offset);
+ BYTE eV = *(BYTE*)buf;
+ if (ret == size)
+ {
+ if (valueList[j].isRange) {
+ BYTE minv = (BYTE)atoi(valueList[j].minValue);
+ BYTE maxv = (BYTE)atoi(valueList[j].maxValue);
+ if (eV >= minv && eV <= maxv) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ else {
+ BYTE v = (BYTE)atoi(valueList[j].value);
+ if (eV == v) {
+ filterResults.push_back(outcomeList[i]);
+ isF = true;
+ }
+ }
+ }
+ free(buf);
+ }
+ break;
+ }
+ //找到则结束循环 开始匹配下一轮的值
+ if (isF) {
+ break;
+ }
+ }
+ }
+
+ close(mem);
+ //筛选完成则清空最终筛选结果列表
+ outcomeList.clear();
+ //将新筛选出的结果列表添加进最终筛选结果列表
+ for (int i = 0; i < filterResults.size(); i++)
+ {
+ outcomeList.push_back(filterResults[i]);
+ }
+ //升序排序结果
+ //sort(outcomeList.begin(), outcomeList.end());
+ }
+ }
+ free(valueCopy); //释放副本内存
+ }
+ return outcomeList;
+}
+///
+/// 从当前搜索结果中 直接改善 [支持范围改善和联合改善]
+///
+/// 改善值
+/// 默认类型
+/// 结果
+vector < unsigned long > ImproveValue(const char* value, int type) {
+ return ImproveOffset(value, type, 0);
+}
+///
+/// 从最终所有筛选结果的指定偏移处进行写入数据
+///
+/// 写入的数据
+/// 写入数据类型
+/// 相对筛选结果处的偏移量
+/// 是否冻结写入
+/// 写入成功与否
+int MemoryOffsetWrite(const char* value, int type, unsigned long offset, bool isFree,bool isSecure)
+{
+ if (!isInit) {
+ //没有进行初始化
+ return -1;
+ }
+ isSecureWrites=isSecure;
+ int pageSize = getpagesize();
+ int fd = open(memPath, O_RDWR | O_SYNC);
+ //打开maps文件
+ FILE* maps = fopen(mapsPath, "r");
+ if (fd >= 0 && maps)
+ {
+
+ for (int i = 0; i < outcomeList.size(); i++) {
+ if(isSecureWrites){
+ MemoryProtect(outcomeList[i] + offset);}
+ if (isFree) {
+
+ addFreezeItem(value, outcomeList[i] + offset, type);
+ startAllFreeze();
+ }
+ else {
+
+ switch (type)
+ {
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(value);
+
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(DWORD), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(value);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(FLOAT), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(value, NULL);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(DOUBLE), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(value);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(DOUBLE), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(value);
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(WORD), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(value);
+
+ void* addrToProtect = (void*)(outcomeList[i] + offset);
+ unsigned long alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1);
+ pwrite64(fd, &v, sizeof(BYTE), outcomeList[i] + offset);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ }
+
+ removeFreezeItem(outcomeList[i] + offset);//关闭冻结
+ }
+ }
+ return 0;
+ }
+ if (fd >= 0) {
+ close(fd);
+ }
+
+ if (maps) {
+ fclose(maps);
+ }
+ return -1;//内存写入成功
+}
+
+///
+/// 获取最终搜索结果数量
+///
+/// 最终搜索结果数量
+int getResultCount()
+{
+ return outcomeList.size();
+}
+
+///
+/// 获取最终搜索结果列表
+///
+/// 最终搜索结果列表
+vector < unsigned long > getResultList()
+{
+ return outcomeList;
+}
+
+///
+/// 打印最终搜索结果列表到文件
+///
+/// 文件路径
+/// 成功与否
+int printResultListToFile(const char* filePath)
+{
+ FILE* memDebugFile = fopen(filePath, "a");//追加模式打开
+ if (memDebugFile != NULL) {
+ struct timeval tv;
+ struct tm* tm_info;
+ char timeString[100];
+
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ fprintf(memDebugFile, "\n\n\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[LogName] 日志名称:内存搜索结果列表\n");
+ fprintf(memDebugFile, "[ABI] 处理器:%s\n", ABI);
+ fprintf(memDebugFile, "[PackName] 进程包名:%s\n", packName);
+ fprintf(memDebugFile, "[PID] 进程ID:%d\n", pid);
+ fprintf(memDebugFile, "[PID] 搜索内存:%s\n", getMemoryAreaName());
+ fprintf(memDebugFile, "[RCount] 搜索结果数量:%d\n", outcomeList.size());
+ fprintf(memDebugFile, "[AddTime] 日志生成时间:%s.%ld\n", timeString, tv.tv_usec);
+ fprintf(memDebugFile, "[Source] 来源:ByteCat-MemTool ^O^\n");
+ fprintf(memDebugFile, "ByteCat:以下数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "ByteCat: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[Debug] Log format: Timestamp | Memory Area | Memory Address | DWORD Data | FLOAT Data | DOUBLE Data | WORD Data | BYTE Data | QWORD Data | Mem Map\n");
+ fprintf(memDebugFile, "[调试] 日志格式: 时间戳 | 内存区域 | 内存地址 | DWORD类型数据 | FLOAT类型数据 | DOUBLE类型数据 | WORD类型数据 | BYTE类型数据 | QWORD类型数据 | 内存映射\n");
+ for (int i = 0; i < outcomeList.size(); i++)
+ {
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ char* mapLine = getMemoryAddrMapLine(outcomeList[i]);
+ fprintf(memDebugFile, "%s.%06ld 📍 内存区域:%s 内存地址:0x%lX D类型:%s F类型:%s E类型:%s W类型:%s B类型:%s Q类型:%s 📑 内存映射:%s\n", timeString, tv.tv_usec,
+ getMapLineMemoryAreaName(mapLine),
+ outcomeList[i],
+ getMemoryAddrData(outcomeList[i], TYPE_DWORD),
+ getMemoryAddrData(outcomeList[i], TYPE_FLOAT),
+ getMemoryAddrData(outcomeList[i], TYPE_DOUBLE),
+ getMemoryAddrData(outcomeList[i], TYPE_WORD),
+ getMemoryAddrData(outcomeList[i], TYPE_BYTE),
+ getMemoryAddrData(outcomeList[i], TYPE_QWORD),
+ mapLine);
+ }
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "注:以上数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "Note: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fclose(memDebugFile);
+ return 0;
+ }
+
+ return -1;
+}
+
+///
+/// 清空最终搜索结果列表
+///
+int clearResultList()
+{
+ if (outcomeList.empty()) {
+ //空列表不做操作
+ return -1;
+ }
+ //清空搜索结果列表
+ outcomeList.clear();
+ // 释放内存
+ std::vector().swap(outcomeList);
+ return 0;
+}
+
+///
+/// 内存保护二次修改
+///
+void MemoryProtect(unsigned long addr){
+Protection Memory;
+ Memory.addr = addr;
+ ProtectList.push_back(Memory);
+}
+///
+/// 获取保护项目数量
+///
+/// 数量
+int getProtectionNum() {
+ return ProtectList.size();
+}
+///
+/// 设置冻结修改延迟【毫秒】
+///
+/// 延迟[MS]
+void setFreezeDelayMs(uint32_t delay) {
+ freezeDelay = delay;
+}
+
+///
+/// 获取冻结修改项目列表
+///
+/// 冻结修改项目列表
+vector < Item > getFreezeList() {
+ return FreezeList;
+}
+
+///
+/// 获取冻结修改项目数量
+///
+/// 数量
+int getFreezeNum() {
+ return FreezeList.size();
+}
+
+///
+/// 添加一个冻结修改项目
+///
+/// 修改值
+/// 内存地址
+/// 数据类型
+int addFreezeItem(const char* value, unsigned long addr, int type)
+{
+ //检查冻结修改项目列表是否已经存在此内存地址,防止重复添加冻结修改项目
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ if (addr == FreezeList[i].addr)
+ {
+ return -1;
+ }
+ }
+ Item table;
+ table.value = strdup(value);
+ table.addr = addr;
+ table.type = type;
+ FreezeList.push_back(table);
+ return 0;
+}
+
+///
+/// 移除一个冻结修改项目
+///
+/// 内存地址
+int removeFreezeItem(unsigned long addr)
+{
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ if (addr == FreezeList[i].addr)
+ {
+ FreezeList.erase(FreezeList.begin() + i);
+ return 0;
+ }
+ }
+ return -1;
+}
+
+///
+/// 移除所有冻结修改项目
+///
+int removeAllFreezeItem() {
+ if (FreezeList.empty()) {
+ //空列表不做操作
+ return -1;
+ }
+ // 清除所有数据
+ FreezeList.clear();
+ // 释放内存
+ std::vector
- ().swap(FreezeList);
+ return 0;
+}
+
+///
+/// 冻结循环修改线程
+///
+///
+///
+void* freezeThread(void* arg)
+{
+ unsigned long alignedAddr;
+ void* addrToProtect;
+ for (;;)
+ {
+ if (isInit) {
+ //如果需要结束冻结或者冻结列表没有冻结项目则结束
+ if (!isFreeze || FreezeList.size() == 0)
+ {
+ stopAllFreeze();
+ break;
+ }
+ //每轮冻结才打开mem为了提升性能而不是在每次修改时都打开mem 避免频繁IO
+ int fd = open(memPath, O_RDWR | O_SYNC);
+ if (fd >= 0) {
+ //遍历 内存修改 冻结列表的所有项目
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ int pageSize = getpagesize();
+if(isSecureWrites){
+addrToProtect = (void*)(FreezeList[i].addr);
+alignedAddr = (unsigned long)addrToProtect & ~(pageSize - 1); }
+
+
+ switch (FreezeList[i].type)
+ {
+
+ case TYPE_DWORD:
+ {
+ DWORD v = atoi(FreezeList[i].value);
+
+ pwrite64(fd, &v, sizeof(DWORD), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ FLOAT v = atof(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(FLOAT), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+
+ break;
+ case TYPE_DOUBLE:
+ {
+ DOUBLE v = strtod(FreezeList[i].value, NULL);
+
+
+ pwrite64(fd, &v, sizeof(DOUBLE), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ QWORD v = atoll(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(QWORD), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_WORD:
+ {
+ WORD v = (WORD)atoi(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(WORD), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize, PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ BYTE v = (BYTE)atoi(FreezeList[i].value);
+
+
+ pwrite64(fd, &v, sizeof(BYTE), FreezeList[i].addr);
+ int res = mprotect((void*)alignedAddr, pageSize,PROT_WRITE | PROT_EXEC);
+ }
+ break;
+ }
+ }
+ close(fd);
+ }
+ //延迟
+ if (freezeDelay != 0) {
+ usleep(freezeDelay * 1000);//转换为微秒
+ }
+ }
+
+ }
+ return NULL;
+}
+
+///
+/// 开始所有冻结修改项目
+///
+int startAllFreeze()
+{
+ if (!isInit) {
+ //没有进行初始化
+ return -1;
+ }
+ if (!isFreeze)
+ {
+ //冻结列表有项目才开冻结线程
+ if (FreezeList.size() > 0)
+ {
+ isFreeze = true;//正在冻结
+ //开始启动冻结线程
+ pthread_t t;
+ pthread_create(&t, NULL, freezeThread, NULL);
+ return 0;
+ }
+ }
+ return -1;
+}
+
+///
+/// 停止所有冻结修改项目
+///
+int stopAllFreeze()
+{
+ if (isFreeze)
+ {
+ isFreeze = false;
+ return 0;
+ }
+ return -1;
+}
+
+///
+/// 打印冻结列表到指定文件
+///
+/// 文件绝对路径
+/// 成功与否
+int printFreezeListToFile(const char* filePath)
+{
+ FILE* memDebugFile = fopen(filePath, "a");//追加模式打开
+ if (memDebugFile != NULL) {
+ struct timeval tv;
+ struct tm* tm_info;
+ char timeString[100];
+
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ fprintf(memDebugFile, "\n\n\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[LogName] 日志名称:冻结修改列表\n");
+ fprintf(memDebugFile, "[ABI] 处理器:%s\n", ABI);
+ fprintf(memDebugFile, "[PackName] 进程包名:%s\n", packName);
+ fprintf(memDebugFile, "[PID] 进程ID:%d\n", pid);
+ fprintf(memDebugFile, "[RCount] 冻结修改数量:%d\n", FreezeList.size());
+ fprintf(memDebugFile, "[AddTime] 日志生成时间:%s.%ld\n", timeString, tv.tv_usec);
+ fprintf(memDebugFile, "[Source] 来源:ByteCat-MemTool ^O^\n");
+ fprintf(memDebugFile, "ByteCat:以下数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "ByteCat: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "[Debug] Log format: [❄ Freeze info] Timestamp | Memory Area | Memory Address | DWORD Data | FLOAT Data | DOUBLE Data | WORD Data | BYTE Data | QWORD Data | Mem Map\n");
+ fprintf(memDebugFile, "[调试] 日志格式: [❄ 冻结信息] 时间戳 | 内存区域 | 内存地址 | DWORD类型数据 | FLOAT类型数据 | DOUBLE类型数据 | WORD类型数据 | BYTE类型数据 | QWORD类型数据 | 内存映射\n");
+ for (int i = 0; i < FreezeList.size(); i++)
+ {
+ gettimeofday(&tv, NULL);
+ tm_info = localtime(&tv.tv_sec);
+ strftime(timeString, sizeof(timeString), "%Y-%m-%d %H:%M:%S", tm_info);
+ char* mapLine = getMemoryAddrMapLine(FreezeList[i].addr);
+ fprintf(memDebugFile, "%s.%06ld 【❄ 修改值:%s 修改类型:%s】 📍 内存区域:%s 内存地址:0x%lX D类型:%s F类型:%s E类型:%s W类型:%s B类型:%s Q类型:%s 📑 内存映射:%s\n", timeString, tv.tv_usec,
+ FreezeList[i].value,
+ getDataTypeName(FreezeList[i].type),
+ getMapLineMemoryAreaName(mapLine),
+ FreezeList[i].addr,
+ getMemoryAddrData(FreezeList[i].addr, TYPE_DWORD),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_FLOAT),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_DOUBLE),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_WORD),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_BYTE),
+ getMemoryAddrData(FreezeList[i].addr, TYPE_QWORD),
+ mapLine);
+ }
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fprintf(memDebugFile, "注:以上数据仅用于内存分析和调试,请勿用于违法用途!\n");
+ fprintf(memDebugFile, "Note: The above data is only used for memory analysis and debugging, please do not use it for illegal purposes!\n");
+ fprintf(memDebugFile, "======================================================================================================================\n");
+ fclose(memDebugFile);
+ return 0;
+ }
+
+ return -1;
+}
+
+///
+/// 获取指定内存地址的maps映射行
+///
+/// 内存地址
+/// maps映射行
+char* getMemoryAddrMapLine(unsigned long address) {
+ if (!isInit) {
+ return "NULL";
+ }
+ //存储映射信息
+ unsigned long start, end, offset;
+ char perms[5], dev[6], path[1024];
+ int inode;
+
+ FILE* file; //maps文件指针
+ char line[4096]; //存储读取到的一行数据
+
+ file = fopen(mapsPath, "r");
+ if (file) {
+ //逐行读取maps文件内容
+ while (fgets(line, sizeof(line), file)) {
+
+ sscanf(line, "%lx-%lx %4s %lx %5s %d %[^\n]",
+ &start, &end, perms, &offset, dev, &inode, path);
+ //如果给定的地址在当前行描述的内存区域范围内
+ if (address >= start && address < end) {
+ fclose(file); // 关闭文件
+ return line;//返回映射行
+ }
+ }
+ fclose(file); // 关闭文件
+ }
+ return "NULL";
+}
+
+///
+/// 获取Maps映射行所在内存区域名称
+///
+///
+/// 内存名称字符串
+char* getMapLineMemoryAreaName(const char* mapLine) {
+ //jh和j 模拟器cd和xa
+
+ if (BCMAPSFLAG(mapLine, RANGE_C_HEAP)) {
+ return "C堆内存 [Ch: C++ heap]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_C_ALLOC)) {
+ return "C分配内存 [Ca: C++ alloc]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_C_BSS)) {
+ return "C未初始化数据 [Cb: C++ .bss]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_ANONYMOUS)) {
+ return "匿名内存 [A: Anonymous]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_STACK)) {
+ return "栈内存 [S: Stack]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_ASHMEM)) {
+ return "Android共享内存 [As: Ashmem]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_VIDEO)) {
+ //BCMEM_LOGI("此内存有错误");
+ return "视频内存 [V: Video]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_B_BAD)) {
+ //BCMEM_LOGI("此内存有错误");
+ return "错误内存 [B: Bad]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_CODE_SYSTEM)) {
+ return "系统代码 [Xs: Code system]";
+ }
+
+ //j内存和jh内存筛选特征相同
+ /*if (BCMAPSFLAG(mapLine, RANGE_JAVA_HEAP)) {
+ return "Java虚拟机堆内存 [Jh: Java heap]";
+ }*/
+ if (BCMAPSFLAG(mapLine, RANGE_JAVA)) {
+ return "Java内存 [J: Java] 或 Java虚拟机堆内存 [Jh: Java heap]";
+ }
+
+ //cd和xa在模拟器可能错误 因此针对
+#if defined(__arm__) || defined(__aarch64__) //arm32和arm64架构
+ if (BCMAPSFLAG(mapLine, RANGE_C_DATA)) {
+ return "C数据内存 [Cd: C++ .data]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_CODE_APP)) {
+ return "应用程序代码 [Xa: Code app]";
+ }
+#else//x86和x64架构 针对模拟器
+ if (BCMAPSFLAG(mapLine, RANGE_C_DATA)) {
+ return "C数据内存 [Cd: C++ .data] 或 应用程序代码 [Xa: Code app]";
+ }
+ if (BCMAPSFLAG(mapLine, RANGE_CODE_APP)) {
+ return "应用程序代码 [Xa: Code app]";
+ }
+#endif
+
+
+ //if (BCMAPSFLAG(mapLine, RANGE_OTHER)) {
+ // //BCMEM_LOGI("此内存有错误,无法完全排除");
+ // return "其他内存 [O: Other]";
+ //}
+
+ //以上都不是则在O
+ return "其他内存 [O: Other]";
+}
+
+
+///
+/// 获取指定id的内存名称
+///
+/// 内存id
+/// 内存名称字符串
+char* getMemoryAreaIdName(int memid) {
+ if (memid == RANGE_ALL) {
+ return "所有内存 [ALL]";
+ }
+ if (memid == RANGE_JAVA_HEAP) {
+ return "Java虚拟机堆内存 [Jh: Java heap]";
+ }
+ if (memid == RANGE_C_HEAP) {
+ return "C堆内存 [Ch: C++ heap]";
+ }
+ if (memid == RANGE_C_ALLOC) {
+ return "C分配内存 [Ca: C++ alloc]";
+ }
+ if (memid == RANGE_C_DATA) {
+ return "C数据内存 [Cd: C++ .data]";
+ }
+ if (memid == RANGE_C_BSS) {
+ return "C未初始化数据 [Cb: C++ .bss]";
+ }
+ if (memid == RANGE_ANONYMOUS) {
+ return "匿名内存 [A: Anonymous]";
+ }
+ if (memid == RANGE_JAVA) {
+ return "Java内存 [J: Java]";
+ }
+ if (memid == RANGE_STACK) {
+ return "栈内存 [S: Stack]";
+ }
+ if (memid == RANGE_ASHMEM) {
+ return "Android共享内存 [As: Ashmem]";
+ }
+ if (memid == RANGE_VIDEO) {
+ //BCMEM_LOGI("此内存有错误");
+ return "视频内存 [V: Video]";
+ }
+ if (memid == RANGE_OTHER) {
+ //BCMEM_LOGI("此内存有错误,无法完全排除");
+ return "其他内存 [O: Other]";
+ }
+ if (memid == RANGE_B_BAD) {
+ //BCMEM_LOGI("此内存有错误");
+ return "错误内存 [B: Bad]";
+ }
+ if (memid == RANGE_CODE_APP) {
+ return "应用程序代码 [Xa: Code app]";
+ }
+ if (memid == RANGE_CODE_SYSTEM) {
+ return "系统代码 [Xs: Code system]";
+ }
+
+ return "未知内存 [NULL]";
+}
+///
+/// 获取当前内存名称
+///
+/// 内存名称字符串
+char* getMemoryAreaName() {
+ return getMemoryAreaIdName(memory);
+}
+
+///
+/// 获取数据类型名称
+///
+/// 类型id
+/// 类型名称字符串
+char* getDataTypeName(int typeId) {
+ switch (typeId)
+ {
+ case TYPE_DWORD:
+ {
+ return "DWORD-32位有符号整数 [D: int32_t]";
+ }
+ break;
+ case TYPE_FLOAT:
+ {
+ return "FLOAT-单精度浮点数 [F: float]";
+ }
+ break;
+ case TYPE_DOUBLE:
+ {
+ return "DOUBLE-双精度浮点数 [E: double]";
+ }
+ break;
+ case TYPE_QWORD:
+ {
+ return "QWORD-64位有符号整数 [Q: int64_t]";
+ }
+ break;
+ case TYPE_WORD:
+ {
+ return "WORD-有符号短整型 [W: signed short]";
+ }
+ break;
+ case TYPE_BYTE:
+ {
+ return "BYTE-有符号字符 [B: signed char]";
+ }
+ break;
+ default:
+ {
+ return "未知类型 [NULL]";
+ }
+ break;
+ }
+}
+
+///
+/// 杀掉指定包名的进程
+///
+/// 进程APK包名
+/// 成功与否
+int killProcess_Root(const char* packageName)
+{
+ int pid = getPID(packageName); //获取进程ID
+ if (pid == -1)
+ {
+ return -1;
+ }
+
+ //SIGTERM信号杀死进程
+ if (kill(pid, SIGTERM) == -1) {
+ return -1;
+ }
+
+ return 0; //成功
+}
+
+///
+/// 暂停指定包名的进程
+///
+/// 进程包名
+/// 成功与否
+int stopProcess_Root(const char* packageName) {
+ int pid = getPID(packageName);
+ if (pid == -1) {
+ return -1;
+ }
+
+ //SIGSTOP信号暂停进程
+ if (kill(pid, SIGSTOP) == -1) {
+ return -1;
+ }
+ return 0; //成功
+}
+
+///
+/// 恢复被暂停的指定包名的进程
+///
+/// 进程包名
+/// 成功与否
+int resumeProcess_Root(const char* packageName) {
+ int pid = getPID(packageName);
+ if (pid == -1) {
+ return -1;
+ }
+
+ //SIGCONT信号恢复被暂停的进程
+ if (kill(pid, SIGCONT) == -1) {
+ return -1;
+ }
+ return 0; //成功
+}
+///
+/// 杀死所有inotify,防止游戏监视文件变化
+///
+void killAllInotify_Root()
+{
+ //通过将内核inotify文件监视器的最大数量设置为0 这样就可以禁用所有inotify
+ system("echo 0 > /proc/sys/fs/inotify/max_user_watches");
+}
+
+///
+/// 杀死GG修改器进程
+///
+/// 杀死的进程数量
+int killGG_Root()
+{
+ DIR* dir = NULL; //指向目录流的指针
+ DIR* dirGG = NULL; //指向子目录流的指针
+ struct dirent* ptr = NULL; //目录项结构体,用于存储目录中的条目
+ struct dirent* ptrGG = NULL; //目录项结构体,用于存储子目录中的条目
+ char filepath[256]; //存储文件路径
+ int num = 0;// 数量
+
+ dir = opendir("/data/data");
+ if (dir != NULL) {
+ //检测data目录下每一个包名文件夹下是否为GG修改器
+ while ((ptr = readdir(dir)) != NULL)
+ {
+ //跳过"."和".."目录和文件
+ if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0) || (ptr->d_type != DT_DIR)) {
+ continue;
+ }
+
+ //生成当前包名的files文件夹的完整路径
+ sprintf(filepath, "/data/data/%s/files", ptr->d_name);
+ dirGG = opendir(filepath); //打开files
+ if (dirGG != NULL)
+ {
+ while ((ptrGG = readdir(dirGG)) != NULL)
+ {
+ // 跳过"."和".."目录和文件
+ if ((strcmp(ptrGG->d_name, ".") == 0) || (strcmp(ptrGG->d_name, "..") == 0) || (ptrGG->d_type != DT_DIR)) {
+ continue;
+ }
+
+ if (strstr(ptrGG->d_name, "GG"))
+ {
+ //杀掉GG进程
+ killProcess_Root(ptr->d_name);
+ num++;// 成功杀死一个GG进程
+ }
+ }
+ closedir(dirGG);
+ }
+ }
+ closedir(dir);
+ }
+ return num;// 返回杀死的进程数量
+}
+
+///
+/// 杀死XS脚本进程
+///
+/// 杀死的进程数量
+int killXscript_Root() {
+ DIR* dir = NULL; // 目录流指针,用于打开目录
+ DIR* dirXS = NULL; // 目录流指针,用于打开目录
+ struct dirent* ptr = NULL; // 目录项指针,用于读取目录项
+ struct dirent* ptrXS = NULL; // 存储lib文件夹当前目录项
+ char filepath[256]; // 存储文件路径的缓冲区
+ int num = 0;// 数量
+
+ // 打开目录 "/data/data"
+ dir = opendir("/data/data");
+
+ if (dir != NULL) {
+ // 循环读取目录下的每一个文件/文件夹
+ while ((ptr = readdir(dir)) != NULL) {
+ //跳过"."和".."目录和文件
+ if ((strcmp(ptr->d_name, ".") == 0) || (strcmp(ptr->d_name, "..") == 0) || (ptr->d_type != DT_DIR)) {
+ continue;
+ }
+
+ // 生成要读取的文件的路径
+ sprintf(filepath, "/data/data/%s/lib", ptr->d_name);
+ // 打开这个文件夹
+ dirXS = opendir(filepath);
+ if (dirXS != NULL)
+ {
+ //读取lib文件夹每一个文件
+ while ((ptrXS = readdir(dirXS)) != NULL)
+ {
+ //如果动态库名称包含xs脚本则杀死
+ if (strstr(ptrXS->d_name, "libxscript"))
+ {
+ //杀掉这个XS进程
+ killProcess_Root(ptr->d_name);
+ num++;//成功杀死一个XS进程
+ }
+ }
+ closedir(dirXS);
+ }
+ }
+ // 关闭目录流
+ closedir(dir);
+ }
+ return num;//返回杀死的进程数量
+}
+
+
+///
+/// 重启手机
+///
+/// 成功与否
+int rebootsystem_Root()
+{
+ return system("su -c 'reboot'");
+}
+///
+/// 静默安装 指定路径的APK安装包
+///
+/// apk安装包路径
+/// 成功与否
+int installapk_Root(const char* apkPackagePath)
+{
+ char ml[256];
+ sprintf(ml, "pm install %s", apkPackagePath);
+ return system(ml);
+}
+///
+/// 静默卸载 指定包名的APK软件
+///
+/// APK包名
+/// 成功与否
+int uninstallapk_Root(const char* packageName)
+{
+ char ml[256];
+ sprintf(ml, "pm uninstall %s", packageName);
+ return system(ml);
+}
+///
+/// 执行命令
+///
+/// 命令
+/// 执行状态
+int Cmd(const char* command) {
+ int status = system(command);
+ return WEXITSTATUS(status);
+}
+///
+/// 执行超级命令
+///
+/// 命令
+/// 执行状态
+int Cmd_Root(const char* command) {
+ // 创建一个完整的命令字符串
+ char fullCommand[256];
+ snprintf(fullCommand, sizeof(fullCommand), "su -c '%s'", command);
+ int status = system(fullCommand);
+ return WEXITSTATUS(status);
+}
+
diff --git a/app/src/main/jni/AlguiMemTool_jni.h b/app/src/main/jni/AlguiMemTool_jni.h
new file mode 100644
index 0000000..586e67c
--- /dev/null
+++ b/app/src/main/jni/AlguiMemTool_jni.h
@@ -0,0 +1,409 @@
+#pragma once
+#include
+#include "AlguiMemTool.h"
+//AlguiMemTool.h - 对接到Java的 JNI 接口
+//作者:ByteCat 作者QQ:3353484607 游戏逆向交流QQ群:931212209
+extern "C" {
+
+ // 设置目标包名 【注意:这是初始化函数,不调用此函数的话其它内存操作均失效】
+ JNIEXPORT jint JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_setPackageName(JNIEnv* env, jobject obj, jstring packageName) {
+ const char* nativePackageName = env->GetStringUTFChars(packageName, 0);
+ int result = setPackageName(nativePackageName);
+ env->ReleaseStringUTFChars(packageName, nativePackageName);
+ return result;
+ }
+ // 获取进程ID
+ JNIEXPORT jint JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_getPID(JNIEnv* env, jobject obj, jstring packageName) {
+ const char* nativePackageName = env->GetStringUTFChars(packageName, 0);
+ int result = getPID(nativePackageName);
+ env->ReleaseStringUTFChars(packageName, nativePackageName);
+ return result;
+ }
+ // 设置安全写入启用状态
+ JNIEXPORT void JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_setIsSecureWrites(JNIEnv* env, jobject obj, jboolean sw) {
+ setIsSecureWrites(sw);
+ }
+
+
+ // 获取模块起始地址(基址)
+ JNIEXPORT jlong JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_getModuleBaseAddr(JNIEnv* env, jobject obj, jstring moduleName, jint headType) {
+ const char* nativeModuleName = env->GetStringUTFChars(moduleName, 0);
+ unsigned long result = getModuleBaseAddr(nativeModuleName, headType);
+ env->ReleaseStringUTFChars(moduleName, nativeModuleName);
+ return result;
+ }
+ // 跳转指针
+ JNIEXPORT jlong JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_jump(JNIEnv* env, jobject obj, jlong addr,jint count) {
+ return jump(addr,count);
+ }
+ // 跳转指针 [32位]
+ JNIEXPORT jlong JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_jump32(JNIEnv* env, jobject obj, jlong addr) {
+ return jump32(addr);
+ }
+ // 跳转指针 [64位]
+ JNIEXPORT jlong JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_jump64(JNIEnv* env, jobject obj, jlong addr) {
+ return jump64(addr);
+ }
+ // 设置指定内存地址指向的值 🛡️该方法已对当前进程进行保护 防止GG模糊🛡️
+ JNIEXPORT jint JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_setMemoryAddrValue(JNIEnv* env, jobject obj, jstring value, jlong addr, jint type, jboolean isFree,jboolean isSecure) {
+ const char* nativeValue = env->GetStringUTFChars(value, 0);
+ int result = setMemoryAddrValue(nativeValue, addr, type, isFree,isSecure);
+ env->ReleaseStringUTFChars(value, nativeValue);
+ return result;
+ }
+ // 获取指定内存地址的数据
+ JNIEXPORT jstring JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_getMemoryAddrData(JNIEnv* env, jobject obj, jlong addr, jint type) {
+ char* result = getMemoryAddrData(addr, type);
+ jstring javaString = env->NewStringUTF(result);
+ return javaString;
+ }
+
+
+
+ // 设置要搜索的内存区域
+ JNIEXPORT void JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_setMemoryArea
+ (JNIEnv* env, jobject obj, jint memoryArea) {
+ setMemoryArea(memoryArea);
+ }
+ // 内存搜索
+ JNIEXPORT jlongArray JNICALL Java_com_bytecat_algui_AlguiHacker_AlguiNativeMemTool_MemorySearch
+ (JNIEnv* env, jobject obj, jstring value, jint type) {
+ const char* nativeValue = env->GetStringUTFChars(value, 0);
+ std::vector results = MemorySearch(nativeValue, type);
+ env->ReleaseStringUTFChars(value, nativeValue);
+
+ jlongArray resultArray = env->NewLongArray(results.size());
+ jlong* arrayElements = new jlong[results.size()];
+ for (size_t i = 0; i < results.size(); ++i) {
+ arrayElements[i] = static_cast