|
| 1 | +com.malin.plugin.PluginResourceUtil -> o.pv: |
| 2 | +# {"fileName":"PluginResourceUtil.java","id":"sourceFile"} |
| 3 | + android.content.res.Resources mResources -> O000000o |
| 4 | + 15:21:android.content.res.Resources getResource(android.content.Context) -> O000000o |
| 5 | + 27:40:android.content.res.Resources loadResource(android.content.Context) -> O00000Oo |
| 6 | + |
| 7 | + |
| 8 | + //插件apk中的 o.pv类 |
| 9 | + package o; |
| 10 | + import android.content.Context; |
| 11 | + import android.content.res.AssetManager; |
| 12 | + import android.content.res.Resources; |
| 13 | + import java.io.File; |
| 14 | + import java.lang.reflect.Method; |
| 15 | + |
| 16 | + /* loaded from: classes.dex */ |
| 17 | + public class pv { |
| 18 | + private static Resources O000000o; |
| 19 | + |
| 20 | + public static Resources O000000o(Context context) { |
| 21 | + if (O000000o == null) { |
| 22 | + Resources O00000Oo = O00000Oo(context); |
| 23 | + O000000o = O00000Oo; |
| 24 | + if (O00000Oo == null) { |
| 25 | + throw new NullPointerException("plugin Resources==null"); |
| 26 | + } |
| 27 | + } |
| 28 | + return O000000o; |
| 29 | + } |
| 30 | + |
| 31 | + private static Resources O00000Oo(Context context) { |
| 32 | + try { |
| 33 | + File fileStreamPath = context.getFileStreamPath("pluginapk-debug.apk"); |
| 34 | + AssetManager assetManager = (AssetManager) AssetManager.class.newInstance(); |
| 35 | + Method declaredMethod = assetManager.getClass().getDeclaredMethod("addAssetPath", String.class); |
| 36 | + declaredMethod.setAccessible(true); |
| 37 | + declaredMethod.invoke(assetManager, fileStreamPath.getAbsolutePath()); |
| 38 | + Resources resources = context.getResources(); |
| 39 | + return new Resources(assetManager, resources.getDisplayMetrics(), resources.getConfiguration()); |
| 40 | + } catch (Exception e) { |
| 41 | + e.printStackTrace(); |
| 42 | + return null; |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + |
| 48 | + //宿主apk中的 o.pv类 |
| 49 | + package o; |
| 50 | + import android.content.Context; |
| 51 | + import android.os.Handler; |
| 52 | + import android.os.Message; |
| 53 | + import android.util.AttributeSet; |
| 54 | + import android.util.Log; |
| 55 | + import android.view.LayoutInflater; |
| 56 | + import android.view.View; |
| 57 | + import android.view.ViewGroup; |
| 58 | + import java.util.concurrent.ArrayBlockingQueue; |
| 59 | + import o.h; |
| 60 | + |
| 61 | + /* loaded from: classes.dex */ |
| 62 | + public final class pv { |
| 63 | + LayoutInflater O000000o; |
| 64 | + private Handler.Callback O00000o = new Handler.Callback() { // from class: o.pv.1 |
| 65 | + @Override // android.os.Handler.Callback |
| 66 | + public boolean handleMessage(Message message) { |
| 67 | + O00000Oo o00000Oo = (O00000Oo) message.obj; |
| 68 | + if (o00000Oo.O00000o == null) { |
| 69 | + o00000Oo.O00000o = pv.this.O000000o.inflate(o00000Oo.O00000o0, o00000Oo.O00000Oo, false); |
| 70 | + } |
| 71 | + o00000Oo.O00000oO.onInflateFinished(o00000Oo.O00000o, o00000Oo.O00000o0, o00000Oo.O00000Oo); |
| 72 | + pv.this.O00000o0.O000000o(o00000Oo); |
| 73 | + return true; |
| 74 | + } |
| 75 | + }; |
| 76 | + Handler O00000Oo = new Handler(this.O00000o); |
| 77 | + O00000o0 O00000o0 = O00000o0.O000000o(); |
| 78 | + |
| 79 | + /* loaded from: classes.dex */ |
| 80 | + public interface O00000o { |
| 81 | + void onInflateFinished(View view, int i, ViewGroup viewGroup); |
| 82 | + } |
| 83 | + |
| 84 | + public pv(Context context) { |
| 85 | + this.O000000o = new O000000o(context); |
| 86 | + } |
| 87 | + |
| 88 | + public void O000000o(int i, ViewGroup viewGroup, O00000o o00000o) { |
| 89 | + if (o00000o == null) { |
| 90 | + throw new NullPointerException("callback argument may not be null!"); |
| 91 | + } |
| 92 | + O00000Oo O00000o02 = this.O00000o0.O00000o0(); |
| 93 | + O00000o02.O000000o = this; |
| 94 | + O00000o02.O00000o0 = i; |
| 95 | + O00000o02.O00000Oo = viewGroup; |
| 96 | + O00000o02.O00000oO = o00000o; |
| 97 | + this.O00000o0.O00000Oo(O00000o02); |
| 98 | + } |
| 99 | + |
| 100 | + /* JADX INFO: Access modifiers changed from: package-private */ |
| 101 | + /* loaded from: classes.dex */ |
| 102 | + public static class O00000Oo { |
| 103 | + pv O000000o; |
| 104 | + ViewGroup O00000Oo; |
| 105 | + View O00000o; |
| 106 | + int O00000o0; |
| 107 | + O00000o O00000oO; |
| 108 | + |
| 109 | + O00000Oo() { |
| 110 | + } |
| 111 | + } |
| 112 | + |
| 113 | + /* loaded from: classes.dex */ |
| 114 | + static class O000000o extends LayoutInflater { |
| 115 | + private static final String[] O000000o = {"android.widget.", "android.webkit.", "android.app."}; |
| 116 | + |
| 117 | + O000000o(Context context) { |
| 118 | + super(context); |
| 119 | + } |
| 120 | + |
| 121 | + @Override // android.view.LayoutInflater |
| 122 | + public LayoutInflater cloneInContext(Context context) { |
| 123 | + return new O000000o(context); |
| 124 | + } |
| 125 | + |
| 126 | + @Override // android.view.LayoutInflater |
| 127 | + protected View onCreateView(String str, AttributeSet attributeSet) throws ClassNotFoundException { |
| 128 | + View createView; |
| 129 | + for (String str2 : O000000o) { |
| 130 | + try { |
| 131 | + createView = createView(str, str2, attributeSet); |
| 132 | + } catch (ClassNotFoundException unused) { |
| 133 | + } |
| 134 | + if (createView != null) { |
| 135 | + return createView; |
| 136 | + } |
| 137 | + } |
| 138 | + return super.onCreateView(str, attributeSet); |
| 139 | + } |
| 140 | + } |
| 141 | + |
| 142 | + /* loaded from: classes.dex */ |
| 143 | + static class O00000o0 extends Thread { |
| 144 | + private static final O00000o0 O000000o; |
| 145 | + private ArrayBlockingQueue<O00000Oo> O00000Oo = new ArrayBlockingQueue<>(10); |
| 146 | + private h.O00000o0<O00000Oo> O00000o0 = new h.O00000o0<>(10); |
| 147 | + |
| 148 | + private O00000o0() { |
| 149 | + } |
| 150 | + |
| 151 | + static { |
| 152 | + O00000o0 o00000o0 = new O00000o0(); |
| 153 | + O000000o = o00000o0; |
| 154 | + o00000o0.start(); |
| 155 | + } |
| 156 | + |
| 157 | + public static O00000o0 O000000o() { |
| 158 | + return O000000o; |
| 159 | + } |
| 160 | + |
| 161 | + public void O00000Oo() { |
| 162 | + try { |
| 163 | + O00000Oo take = this.O00000Oo.take(); |
| 164 | + try { |
| 165 | + take.O00000o = take.O000000o.O000000o.inflate(take.O00000o0, take.O00000Oo, false); |
| 166 | + } catch (RuntimeException e) { |
| 167 | + Log.w("AsyncLayoutInflater", "Failed to inflate resource in the background! Retrying on the UI thread", e); |
| 168 | + } |
| 169 | + Message.obtain(take.O000000o.O00000Oo, 0, take).sendToTarget(); |
| 170 | + } catch (InterruptedException e2) { |
| 171 | + Log.w("AsyncLayoutInflater", e2); |
| 172 | + } |
| 173 | + } |
| 174 | + |
| 175 | + @Override // java.lang.Thread, java.lang.Runnable |
| 176 | + public void run() { |
| 177 | + while (true) { |
| 178 | + O00000Oo(); |
| 179 | + } |
| 180 | + } |
| 181 | + |
| 182 | + public O00000Oo O00000o0() { |
| 183 | + O00000Oo O000000o2 = this.O00000o0.O000000o(); |
| 184 | + return O000000o2 == null ? new O00000Oo() : O000000o2; |
| 185 | + } |
| 186 | + |
| 187 | + public void O000000o(O00000Oo o00000Oo) { |
| 188 | + o00000Oo.O00000oO = null; |
| 189 | + o00000Oo.O000000o = null; |
| 190 | + o00000Oo.O00000Oo = null; |
| 191 | + o00000Oo.O00000o0 = 0; |
| 192 | + o00000Oo.O00000o = null; |
| 193 | + this.O00000o0.O000000o(o00000Oo); |
| 194 | + } |
| 195 | + |
| 196 | + public void O00000Oo(O00000Oo o00000Oo) { |
| 197 | + try { |
| 198 | + this.O00000Oo.put(o00000Oo); |
| 199 | + } catch (InterruptedException e) { |
| 200 | + throw new RuntimeException("Failed to enqueue async inflate request", e); |
| 201 | + } |
| 202 | + } |
| 203 | + } |
| 204 | + } |
| 205 | + |
| 206 | + |
| 207 | +9778-9778 AndroidRuntime com.malin.hook E FATAL EXCEPTION: main |
| 208 | +Process: com.malin.hook, PID: 9778 |
| 209 | +java.lang.NoSuchMethodError: No static method O000000o(Landroid/content/Context;)Landroid/content/res/Resources; in class Lo/pv; or its super classes (declaration of 'o.pv' appears in /data/app/~~5uAI-TWpCWRT1xO82JB8JQ==/com.malin.hook-UHkYGi3lVHfz3o-kYCKHhQ==/base.apk) |
| 210 | +at com.malin.plugin.BaseActivity.onCreate(SourceFile:20) |
| 211 | +at com.malin.plugin.PluginAppCompatActivity.onCreate(SourceFile:17) |
| 212 | +at android.app.Activity.performCreate(Activity.java:8054) |
| 213 | +at android.app.Activity.performCreate(Activity.java:8034) |
| 214 | +at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341) |
| 215 | +at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688) |
| 216 | +at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864) |
| 217 | +at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) |
| 218 | +at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) |
| 219 | +at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) |
| 220 | +at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253) |
| 221 | +at android.os.Handler.dispatchMessage(Handler.java:106) |
| 222 | +at android.os.Looper.loopOnce(Looper.java:201) |
| 223 | +at android.os.Looper.loop(Looper.java:288) |
| 224 | +at android.app.ActivityThread.main(ActivityThread.java:7870) |
| 225 | +at java.lang.reflect.Method.invoke(Native Method) |
| 226 | +at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) |
| 227 | +at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) |
0 commit comments