sterepando commited on
Commit
6f3dc19
·
verified ·
1 Parent(s): cfe7617

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -10
Dockerfile CHANGED
@@ -18,7 +18,7 @@ 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. Исходник с выводом логов в Python консоль через XposedBridge.log
22
  RUN printf 'package b.liquidglass;\n\
23
  \n\
24
  import android.content.Context;\n\
@@ -26,17 +26,26 @@ import android.graphics.*;\n\
26
  import android.graphics.drawable.Drawable;\n\
27
  import android.view.*;\n\
28
  import android.view.animation.OvershootInterpolator;\n\
 
29
  import de.robv.android.xposed.XC_MethodHook;\n\
30
  import de.robv.android.xposed.XposedBridge;\n\
31
  \n\
32
  public class Main {\n\
 
 
 
 
 
 
 
 
33
  public void start() {\n\
34
- XposedBridge.log("[LiquidGlass-Native] Plugin start called");\n\
35
  try {\n\
36
  hookActivity("org.telegram.ui.ChatActivity");\n\
37
  hookActivity("org.telegram.ui.DialogsActivity");\n\
38
  } catch (Exception e) {\n\
39
- XposedBridge.log("[LiquidGlass-Native] Hook failed: " + e.toString());\n\
40
  }\n\
41
  }\n\
42
  \n\
@@ -47,15 +56,15 @@ public class Main {\n\
47
  protected void afterHookedMethod(MethodHookParam param) throws Throwable {\n\
48
  final View root = (View) param.getResult();\n\
49
  if (root == null) return;\n\
50
- XposedBridge.log("[LiquidGlass-Native] Activity created: " + param.thisObject.getClass().getSimpleName());\n\
51
  \n\
52
  root.postDelayed(() -> {\n\
53
  try {\n\
54
  findAndApply(root);\n\
55
  } catch (Exception e) {\n\
56
- XposedBridge.log("[LiquidGlass-Native] Scan error: " + e.getMessage());\n\
57
  }\n\
58
- }, 600);\n\
59
  }\n\
60
  });\n\
61
  }\n\
@@ -67,12 +76,12 @@ public class Main {\n\
67
  findAndApply(vg.getChildAt(i));\n\
68
  }\n\
69
  }\n\
70
- // Ищем вьюху размером 56dp (стандарт FAB)\n\
71
  int size = v.getMeasuredWidth();\n\
72
  if (size > 0 && v.getVisibility() == View.VISIBLE) {\n\
73
  float dp = size / v.getContext().getResources().getDisplayMetrics().density;\n\
74
- if (dp >= 50 && dp <= 65) {\n\
75
- XposedBridge.log("[LiquidGlass-Native] FAB detected by size! Applying glass...");\n\
 
76
  applyGlass(v);\n\
77
  }\n\
78
  }\n\
@@ -81,7 +90,9 @@ public class Main {\n\
81
  private void applyGlass(View v) {\n\
82
  v.setBackground(new GlassDrawable());\n\
83
  if (android.os.Build.VERSION.SDK_INT >= 31) {\n\
84
- v.setRenderEffect(RenderEffect.createBlurEffect(20f, 20f, Shader.TileMode.CLAMP));\n\
 
 
85
  }\n\
86
  v.setOnTouchListener((view, ev) -> {\n\
87
  if (ev.getAction() == MotionEvent.ACTION_DOWN) {\n\
 
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 printf 'package b.liquidglass;\n\
23
  \n\
24
  import android.content.Context;\n\
 
26
  import android.graphics.drawable.Drawable;\n\
27
  import android.view.*;\n\
28
  import android.view.animation.OvershootInterpolator;\n\
29
+ import android.util.Log;\n\
30
  import de.robv.android.xposed.XC_MethodHook;\n\
31
  import de.robv.android.xposed.XposedBridge;\n\
32
  \n\
33
  public class Main {\n\
34
+ private void xLog(String msg) {\n\
35
+ Log.i("LiquidGlass", msg);\n\
36
+ try { \n\
37
+ // Aliuhook требует Throwable для логирования\n\
38
+ XposedBridge.log(new Throwable("[LiquidGlass-Native] " + msg)); \n\
39
+ } catch(Exception e) {}\n\
40
+ }\n\
41
+ \n\
42
  public void start() {\n\
43
+ xLog("DEX Loaded. Starting hooks...");\n\
44
  try {\n\
45
  hookActivity("org.telegram.ui.ChatActivity");\n\
46
  hookActivity("org.telegram.ui.DialogsActivity");\n\
47
  } catch (Exception e) {\n\
48
+ xLog("Hook setup failed: " + e.toString());\n\
49
  }\n\
50
  }\n\
51
  \n\
 
56
  protected void afterHookedMethod(MethodHookParam param) throws Throwable {\n\
57
  final View root = (View) param.getResult();\n\
58
  if (root == null) return;\n\
59
+ xLog("View created for " + param.thisObject.getClass().getSimpleName());\n\
60
  \n\
61
  root.postDelayed(() -> {\n\
62
  try {\n\
63
  findAndApply(root);\n\
64
  } catch (Exception e) {\n\
65
+ xLog("Scan error: " + e.getMessage());\n\
66
  }\n\
67
+ }, 800);\n\
68
  }\n\
69
  });\n\
70
  }\n\
 
76
  findAndApply(vg.getChildAt(i));\n\
77
  }\n\
78
  }\n\
 
79
  int size = v.getMeasuredWidth();\n\
80
  if (size > 0 && v.getVisibility() == View.VISIBLE) {\n\
81
  float dp = size / v.getContext().getResources().getDisplayMetrics().density;\n\
82
+ // FAB в Телеге обычно от 40 до 60 dp\n\
83
+ if (dp >= 38 && dp <= 62) {\n\
84
+ xLog("FAB detected (size: " + dp + "dp). Applying glass effect.");\n\
85
  applyGlass(v);\n\
86
  }\n\
87
  }\n\
 
90
  private void applyGlass(View v) {\n\
91
  v.setBackground(new GlassDrawable());\n\
92
  if (android.os.Build.VERSION.SDK_INT >= 31) {\n\
93
+ try {\n\
94
+ v.setRenderEffect(RenderEffect.createBlurEffect(20f, 20f, Shader.TileMode.CLAMP));\n\
95
+ } catch (Exception ignored) {}\n\
96
  }\n\
97
  v.setOnTouchListener((view, ev) -> {\n\
98
  if (ev.getAction() == MotionEvent.ACTION_DOWN) {\n\