Update Dockerfile
Browse files- Dockerfile +110 -108
Dockerfile
CHANGED
|
@@ -18,114 +18,116 @@ RUN curl -L -f "https://maven.aliucord.com/snapshots/com/aliucord/Aliuhook/1.1.3
|
|
| 18 |
# d8 (DEX compiler)
|
| 19 |
RUN curl -L -f "https://maven.google.com/com/android/tools/r8/3.3.28/r8-3.3.28.jar" -o d8.jar
|
| 20 |
|
| 21 |
-
# 2.
|
| 22 |
-
RUN
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
import android.
|
| 26 |
-
import android.graphics
|
| 27 |
-
import android.
|
| 28 |
-
import android.view
|
| 29 |
-
import android.
|
| 30 |
-
import
|
| 31 |
-
import de.robv.android.xposed.
|
| 32 |
-
import
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
//
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
//
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
}
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
c.drawRoundRect(rf,
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
@Override public void
|
| 126 |
-
@Override public
|
| 127 |
-
|
| 128 |
-
}
|
|
|
|
|
|
|
| 129 |
|
| 130 |
RUN javac -cp android.jar:aliuhook.jar -d . Main.java
|
| 131 |
RUN java -cp d8.jar com.android.tools.r8.D8 --release --lib android.jar --classpath aliuhook.jar --output . b/liquidglass/Main*.class
|
|
|
|
| 18 |
# d8 (DEX compiler)
|
| 19 |
RUN curl -L -f "https://maven.google.com/com/android/tools/r8/3.3.28/r8-3.3.28.jar" -o d8.jar
|
| 20 |
|
| 21 |
+
# 2. Создаем исходник через Heredoc (это не ломает билд)
|
| 22 |
+
RUN cat << 'EOF' > Main.java
|
| 23 |
+
package b.liquidglass;
|
| 24 |
+
|
| 25 |
+
import android.content.Context;
|
| 26 |
+
import android.graphics.*;
|
| 27 |
+
import android.graphics.drawable.Drawable;
|
| 28 |
+
import android.view.*;
|
| 29 |
+
import android.view.animation.OvershootInterpolator;
|
| 30 |
+
import android.util.Log;
|
| 31 |
+
import de.robv.android.xposed.XC_MethodHook;
|
| 32 |
+
import de.robv.android.xposed.XposedBridge;
|
| 33 |
+
import java.lang.reflect.Field;
|
| 34 |
+
|
| 35 |
+
public class Main {
|
| 36 |
+
private void xLog(String m) {
|
| 37 |
+
XposedBridge.log("[LiquidGlass] " + m);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public void start() {
|
| 41 |
+
xLog("DEX Started. Targeting FAB Fields...");
|
| 42 |
+
try {
|
| 43 |
+
// Список полей из custom_fab.plugin.py
|
| 44 |
+
String[] fabFields = {"floatingButtonContainer", "floatingButton2Container", "floatingButton"};
|
| 45 |
+
|
| 46 |
+
// Хукаем список чатов
|
| 47 |
+
hookActivity("org.telegram.ui.DialogsActivity", fabFields);
|
| 48 |
+
// Хукаем экран внутри чата
|
| 49 |
+
hookActivity("org.telegram.ui.ChatActivity", fabFields);
|
| 50 |
+
|
| 51 |
+
} catch (Exception e) {
|
| 52 |
+
xLog("Global Error: " + e.toString());
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
private void hookActivity(String clsName, String[] fields) throws Exception {
|
| 57 |
+
Class<?> cls = Class.forName(clsName);
|
| 58 |
+
XposedBridge.hookMethod(cls.getDeclaredMethod("createView", Context.class), new XC_MethodHook() {
|
| 59 |
+
@Override
|
| 60 |
+
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
|
| 61 |
+
final Object fragment = param.thisObject;
|
| 62 |
+
final View root = (View) param.getResult();
|
| 63 |
+
if (root == null) return;
|
| 64 |
+
|
| 65 |
+
// Задержка, чтобы Телега успела создать кнопки
|
| 66 |
+
root.postDelayed(() -> {
|
| 67 |
+
for (String fName : fields) {
|
| 68 |
+
try {
|
| 69 |
+
Field f = fragment.getClass().getDeclaredField(fName);
|
| 70 |
+
f.setAccessible(true);
|
| 71 |
+
View fab = (View) f.get(fragment);
|
| 72 |
+
if (fab != null) {
|
| 73 |
+
xLog("Target found: " + fName + ". Applying Apple Glass.");
|
| 74 |
+
applyGlassEffect(fab);
|
| 75 |
+
}
|
| 76 |
+
} catch (Exception ignored) {}
|
| 77 |
+
}
|
| 78 |
+
}, 700);
|
| 79 |
+
}
|
| 80 |
+
});
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
private void applyGlassEffect(View v) {
|
| 84 |
+
// Устанавливаем Apple Liquid Glass фон
|
| 85 |
+
v.setBackground(new AppleGlassDrawable());
|
| 86 |
+
|
| 87 |
+
// Включаем Backdrop Blur (Android 12+)
|
| 88 |
+
if (android.os.Build.VERSION.SDK_INT >= 31) {
|
| 89 |
+
try {
|
| 90 |
+
v.setRenderEffect(RenderEffect.createBlurEffect(25f, 25f, Shader.TileMode.CLAMP));
|
| 91 |
+
} catch (Exception ignored) {}
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
// Настраиваем Liquid анимацию при касании
|
| 95 |
+
v.setOnTouchListener((view, ev) -> {
|
| 96 |
+
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
|
| 97 |
+
view.animate().scaleX(0.88f).scaleY(0.88f).alpha(0.7f).setDuration(120).start();
|
| 98 |
+
} else if (ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_CANCEL) {
|
| 99 |
+
view.animate().scaleX(1f).scaleY(1f).alpha(1f).setDuration(400)
|
| 100 |
+
.setInterpolator(new OvershootInterpolator(3.0f)).start();
|
| 101 |
+
}
|
| 102 |
+
return false;
|
| 103 |
+
});
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
static class AppleGlassDrawable extends Drawable {
|
| 107 |
+
private final Paint glass = new Paint(Paint.ANTI_ALIAS_FLAG);
|
| 108 |
+
private final Paint border = new Paint(Paint.ANTI_ALIAS_FLAG);
|
| 109 |
+
|
| 110 |
+
public AppleGlassDrawable() {
|
| 111 |
+
glass.setColor(0x82FFFFFF); // rgba(255, 255, 255, 0.5)
|
| 112 |
+
border.setStyle(Paint.Style.STROKE);
|
| 113 |
+
border.setStrokeWidth(3f);
|
| 114 |
+
border.setColor(0xB4FFFFFF); // rgba(255, 255, 255, 0.7) - Specular Highlight
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
@Override
|
| 118 |
+
public void draw(Canvas c) {
|
| 119 |
+
RectF rf = new RectF(getBounds());
|
| 120 |
+
float r = Math.min(rf.width(), rf.height()) / 2f;
|
| 121 |
+
c.drawRoundRect(rf, r, r, glass);
|
| 122 |
+
c.drawRoundRect(rf, r, r, border);
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
@Override public void setAlpha(int a) {}
|
| 126 |
+
@Override public void setColorFilter(ColorFilter cf) {}
|
| 127 |
+
@Override public int getOpacity() { return PixelFormat.TRANSLUCENT; }
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
EOF
|
| 131 |
|
| 132 |
RUN javac -cp android.jar:aliuhook.jar -d . Main.java
|
| 133 |
RUN java -cp d8.jar com.android.tools.r8.D8 --release --lib android.jar --classpath aliuhook.jar --output . b/liquidglass/Main*.class
|