Update Dockerfile
Browse files- Dockerfile +100 -3
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
FROM openjdk:11-jdk-slim
|
| 3 |
|
| 4 |
# Устанавливаем необходимые утилиты
|
| 5 |
-
RUN apt-get update && apt-get install -y curl python3
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
@@ -18,8 +18,105 @@ 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 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
RUN javac -cp android.jar:aliuhook.jar -d . Main.java
|
| 25 |
RUN java -cp d8.jar com.android.tools.r8.D8 --release --lib android.jar --classpath aliuhook.jar --output . b/liquidglass/Main*.class
|
|
|
|
| 2 |
FROM openjdk:11-jdk-slim
|
| 3 |
|
| 4 |
# Устанавливаем необходимые утилиты
|
| 5 |
+
RUN apt-get update && apt-get install -y curl unzip python3
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
| 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 |
+
RUN python3 -c '
|
| 22 |
+
code = """
|
| 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 |
+
try { XposedBridge.log("[LG] " + m); } catch(Throwable t) {}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public void start() {
|
| 41 |
+
xLog("DEX Loaded. Targeting FAB Fields...");
|
| 42 |
+
try {
|
| 43 |
+
// Список полей контейнеров FAB из ExteraGram
|
| 44 |
+
String[] fields = {"floatingButtonContainer", "floatingButton2Container", "floatingButton"};
|
| 45 |
+
hook("org.telegram.ui.DialogsActivity", fields);
|
| 46 |
+
hook("org.telegram.ui.ChatActivity", fields);
|
| 47 |
+
} catch (Exception e) { xLog("Hook Setup Error: " + e.toString()); }
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
private void hook(String clsName, String[] fields) throws Exception {
|
| 51 |
+
Class<?> cls = Class.forName(clsName);
|
| 52 |
+
XposedBridge.hookMethod(cls.getDeclaredMethod("createView", Context.class), new XC_MethodHook() {
|
| 53 |
+
@Override
|
| 54 |
+
protected void afterHookedMethod(MethodHookParam p) throws Throwable {
|
| 55 |
+
final Object frag = p.thisObject;
|
| 56 |
+
final View root = (View) p.getResult();
|
| 57 |
+
if (root == null) return;
|
| 58 |
+
|
| 59 |
+
root.postDelayed(() -> {
|
| 60 |
+
for (String fName : fields) {
|
| 61 |
+
try {
|
| 62 |
+
Field f = frag.getClass().getDeclaredField(fName);
|
| 63 |
+
f.setAccessible(true);
|
| 64 |
+
View fabView = (View) f.get(frag);
|
| 65 |
+
if (fabView != null) {
|
| 66 |
+
xLog("FAB Found: " + fName + ". Applying Apple Glass.");
|
| 67 |
+
applyEffect(fabView);
|
| 68 |
+
}
|
| 69 |
+
} catch (Exception ignored) {}
|
| 70 |
+
}
|
| 71 |
+
}, 1000);
|
| 72 |
+
}
|
| 73 |
+
});
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
private void applyEffect(View v) {
|
| 77 |
+
v.setBackground(new AppleGlass());
|
| 78 |
+
if (android.os.Build.VERSION.SDK_INT >= 31) {
|
| 79 |
+
try {
|
| 80 |
+
v.setRenderEffect(RenderEffect.createBlurEffect(25f, 25f, Shader.TileMode.CLAMP));
|
| 81 |
+
} catch (Exception ignored) {}
|
| 82 |
+
}
|
| 83 |
+
v.setOnTouchListener((v1, ev) -> {
|
| 84 |
+
int action = ev.getAction();
|
| 85 |
+
if (action == MotionEvent.ACTION_DOWN) {
|
| 86 |
+
v1.animate().scaleX(0.88f).scaleY(0.88f).alpha(0.7f).setDuration(150).start();
|
| 87 |
+
} else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
|
| 88 |
+
v1.animate().scaleX(1f).scaleY(1f).alpha(1f).setDuration(450)
|
| 89 |
+
.setInterpolator(new OvershootInterpolator(3.0f)).start();
|
| 90 |
+
}
|
| 91 |
+
return false;
|
| 92 |
+
});
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
static class AppleGlass extends Drawable {
|
| 96 |
+
private final Paint glass = new Paint(Paint.ANTI_ALIAS_FLAG);
|
| 97 |
+
private final Paint border = new Paint(Paint.ANTI_ALIAS_FLAG);
|
| 98 |
+
public AppleGlass() {
|
| 99 |
+
glass.setColor(0x82FFFFFF); // 50% белый
|
| 100 |
+
border.setStyle(Paint.Style.STROKE);
|
| 101 |
+
border.setStrokeWidth(3f);
|
| 102 |
+
border.setColor(0xB4FFFFFF); // 70% белый блик
|
| 103 |
+
}
|
| 104 |
+
@Override
|
| 105 |
+
public void draw(Canvas c) {
|
| 106 |
+
RectF rf = new RectF(getBounds());
|
| 107 |
+
float r = Math.min(rf.width(), rf.height()) / 2f;
|
| 108 |
+
c.drawRoundRect(rf, r, r, glass);
|
| 109 |
+
c.drawRoundRect(rf, r, r, border);
|
| 110 |
+
}
|
| 111 |
+
@Override public void setAlpha(int a) {}
|
| 112 |
+
@Override public void setColorFilter(ColorFilter cf) {}
|
| 113 |
+
@Override public int getOpacity() { return PixelFormat.TRANSLUCENT; }
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
"""
|
| 117 |
+
with open("Main.java", "w", encoding="utf-8") as f:
|
| 118 |
+
f.write(code.strip())
|
| 119 |
+
'
|
| 120 |
|
| 121 |
RUN javac -cp android.jar:aliuhook.jar -d . Main.java
|
| 122 |
RUN java -cp d8.jar com.android.tools.r8.D8 --release --lib android.jar --classpath aliuhook.jar --output . b/liquidglass/Main*.class
|