Info Call to dynamic code loading API

Description

List of all dynamic code loading API calls in the application. Loading code from untrsuted sources could allow the execution of malicious code in the context of the current application.

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method com.google.android.gms.internal.zzdb.zza() calling method dalvik.system.DexClassLoader.<init>()


    public static com.google.android.gms.internal.zzdb zza(android.content.Context p8, String p9, String p10, boolean p11)
    {
        void v0_1 = new com.google.android.gms.internal.zzdb(p8);
        try {
            v0_1.zzqI = java.util.concurrent.Executors.newCachedThreadPool();
            v0_1.zzqn = p11;
        } catch (com.google.android.gms.internal.zzcy) {
            return v0_1;
        }
        if (p11 != 0) {
            v0_1.zzqN = v0_1.zzqI.submit(new com.google.android.gms.internal.zzdc(v0_1));
        }
        v0_1.zzqI.execute(new com.google.android.gms.internal.zzde(v0_1));
        com.google.android.gms.common.api.GoogleApiClient v1_3;
        com.google.android.gms.internal.zzdb.zzqV = com.google.android.gms.common.zze.zzoU();
        if (com.google.android.gms.common.zze.zzau(v0_1.zzqG) <= 0) {
            v1_3 = 0;
        } else {
            v1_3 = 1;
        }
        com.google.android.gms.common.api.GoogleApiClient v1_6;
        v0_1.zzqS = v1_3;
        if (com.google.android.gms.internal.zzdb.zzqV.isGooglePlayServicesAvailable(v0_1.zzqG) != 0) {
            v1_6 = 0;
        } else {
            v1_6 = 1;
        }
        v0_1.zzqU = v1_6;
        if (v0_1.zzqG.getApplicationContext() == null) {
            v0_1.zza(0, 1);
            if (com.google.android.gms.internal.zzdg.zzR()) {
                if (((Boolean) com.google.android.gms.ads.internal.zzbs.zzbK().zzd(com.google.android.gms.internal.zzmo.zzFd)).booleanValue()) {
                    throw new IllegalStateException("Task Context initialization must not be called from the UI thread.");
                } else {
                }
            }
            v0_1.zzqK = new com.google.android.gms.internal.zzcw(0);
            v0_1.zzqL = v0_1.zzqK.zzl(p9);
            try {
                com.google.android.gms.internal.zzcn v9_17 = v0_1.zzqG.getCacheDir();
            } catch (String v8_4) {
                throw new com.google.android.gms.internal.zzcy(v8_4);
            }
            if (v9_17 == null) {
                v9_17 = v0_1.zzqG.getDir("dex", 0);
                if (v9_17 == null) {
                    throw new com.google.android.gms.internal.zzcy();
                } else {
                }
            }
            String v6_3 = new Object[2];
            v6_3[0] = v9_17;
            v6_3[1] = "1489418796403";
            Object[] v3_0 = new java.io.File(String.format("%s/%s.jar", v6_3));
            if (!v3_0.exists()) {
                String v10_1 = v0_1.zzqK.zza(v0_1.zzqL, p10);
                v3_0.createNewFile();
                String v4_3 = new java.io.FileOutputStream(v3_0);
                v4_3.write(v10_1, 0, v10_1.length);
                v4_3.close();
            }
            v0_1.zzb(v9_17, "1489418796403");
            try {
                v0_1.zzqJ = new dalvik.system.DexClassLoader(v3_0.getAbsolutePath(), v9_17.getAbsolutePath(), 0, v0_1.zzqG.getClassLoader());
            } catch (String v10_4) {
                com.google.android.gms.internal.zzdb.zza(v3_0);
                v0_1 = v0_1.zza(v9_17, "1489418796403");
                Object[] v3_1 = new Object[2];
                v3_1[0] = v9_17;
                v3_1[1] = "1489418796403";
                com.google.android.gms.internal.zzdb.zzm(String.format("%s/%s.dex", v3_1));
                throw v10_4;
            }
            com.google.android.gms.internal.zzdb.zza(v3_0);
            v0_1 = v0_1.zza(v9_17, "1489418796403");
            String v2_1 = new Object[2];
            v2_1[0] = v9_17;
            v2_1[1] = "1489418796403";
            com.google.android.gms.internal.zzdb.zzm(String.format("%s/%s.dex", v2_1));
            v0_1.zzqQ = new com.google.android.gms.internal.zzcn(v0_1);
            v0_1.zzqY = 1;
            return v0_1;
        } else {
            v0_1.zzqR = new com.google.android.gms.common.api.GoogleApiClient$Builder(v0_1.zzqG).addApi(com.google.android.gms.internal.zzbaz.API).build();
        }
    }

Method com.google.android.gms.dynamite.zzg.<init>() calling method dalvik.system.PathClassLoader.<init>()


    zzg(String p1, ClassLoader p2)
    {
        super(p1, p2);
        return;
    }

Method android.support.multidex.MultiDex$V14.makeDexElements() calling method dalvik.system.DexFile.loadDex()


    private Object[] makeDexElements(java.util.List p8)
    {
        Object[] v0_1 = new Object[p8.size()];
        int v2 = 0;
        while (v2 < v0_1.length) {
            Object v3_0 = ((java.io.File) p8.get(v2));
            v0_1[v2] = this.elementConstructor.newInstance(v3_0, dalvik.system.DexFile.loadDex(v3_0.getPath(), android.support.multidex.MultiDex$V14.optimizedPathFor(v3_0), 0));
            v2++;
        }
        return v0_1;
    }

Method android.support.multidex.MultiDex$V4.install() calling method dalvik.system.DexFile.loadDex()


    static void install(ClassLoader p10, java.util.List p11)
    {
        dalvik.system.DexFile[] v0_0 = p11.size();
        reflect.Field v1_1 = android.support.multidex.MultiDex.access$000(p10, "path");
        StringBuilder v2_1 = new StringBuilder(((String) v1_1.get(p10)));
        String[] v3_0 = new String[v0_0];
        java.io.File[] v4 = new java.io.File[v0_0];
        java.util.zip.ZipFile[] v5 = new java.util.zip.ZipFile[v0_0];
        dalvik.system.DexFile[] v0_1 = new dalvik.system.DexFile[v0_0];
        String v11_1 = p11.listIterator();
        while (v11_1.hasNext()) {
            dalvik.system.DexFile v6_2 = ((java.io.File) v11_1.next());
            String v7 = v6_2.getAbsolutePath();
            v2_1.append(58);
            v2_1.append(v7);
            int v8_1 = v11_1.previousIndex();
            v3_0[v8_1] = v7;
            v4[v8_1] = v6_2;
            v5[v8_1] = new java.util.zip.ZipFile(v6_2);
            dalvik.system.DexFile v6_4 = new StringBuilder();
            v6_4.append(v7);
            v6_4.append(".dex");
            v0_1[v8_1] = dalvik.system.DexFile.loadDex(v7, v6_4.toString(), 0);
        }
        v1_1.set(p10, v2_1.toString());
        android.support.multidex.MultiDex.access$100(p10, "mPaths", v3_0);
        android.support.multidex.MultiDex.access$100(p10, "mFiles", v4);
        android.support.multidex.MultiDex.access$100(p10, "mZips", v5);
        android.support.multidex.MultiDex.access$100(p10, "mDexs", v0_1);
        return;
    }

Method com.facebook.common.soloader.SoLoaderShim$DefaultHandler.loadLibrary() calling method java.lang.System.loadLibrary()


    public void loadLibrary(String p1)
    {
        System.loadLibrary(p1);
        return;
    }

Method android.support.multidex.MultiDex.<clinit>() calling method java.lang.System.getProperty()


    static MultiDex()
    {
        android.support.multidex.MultiDex.installedApk = new java.util.HashSet();
        android.support.multidex.MultiDex.IS_VM_MULTIDEX_CAPABLE = android.support.multidex.MultiDex.isVMMultidexCapable(System.getProperty("java.vm.version"));
        return;
    }

Method android.support.multidex.MultiDex.doInstallation() calling method java.lang.System.getProperty()


    private static void doInstallation(android.content.Context p5, java.io.File p6, java.io.File p7, String p8, String p9, boolean p10)
    {
        try {
            if (!android.support.multidex.MultiDex.installedApk.contains(p6)) {
                android.support.multidex.MultiDex.installedApk.add(p6);
                if (android.os.Build$VERSION.SDK_INT > 20) {
                    String v3_1 = new StringBuilder();
                    v3_1.append("MultiDex is not guaranteed to work in SDK version ");
                    v3_1.append(android.os.Build$VERSION.SDK_INT);
                    v3_1.append(": SDK version higher than ");
                    v3_1.append(20);
                    v3_1.append(" should be backed by ");
                    v3_1.append("runtime with built-in multidex capabilty but it\'s not the ");
                    v3_1.append("case here: java.vm.version=\"");
                    v3_1.append(System.getProperty("java.vm.version"));
                    v3_1.append("\"");
                    android.util.Log.w("MultiDex", v3_1.toString());
                }
                ClassLoader v1_3 = p5.getClassLoader();
                if (v1_3 != null) {
                    try {
                        android.support.multidex.MultiDex.clearOldDexDir(p5);
                    } catch (java.io.IOException v2_7) {
                        android.util.Log.w("MultiDex", "Something went wrong when trying to clear old MultiDex extraction, continuing without cleaning.", v2_7);
                    }
                    java.io.File v7_2 = android.support.multidex.MultiDex.getDexDir(p5, p7, p8);
                    android.support.multidex.MultiDexExtractor v8_2 = new android.support.multidex.MultiDexExtractor(p6, v7_2);
                    java.io.IOException v6_2 = 0;
                    try {
                        try {
                            android.support.multidex.MultiDex.installSecondaryDexes(v1_3, v7_2, v8_2.load(p5, p9, 0));
                        } catch (java.io.IOException v2_10) {
                            if (p10 == 0) {
                                throw v2_10;
                            } else {
                                android.util.Log.w("MultiDex", "Failed to install extracted secondary dex files, retrying with forced extraction", v2_10);
                                android.support.multidex.MultiDex.installSecondaryDexes(v1_3, v7_2, v8_2.load(p5, p9, 1));
                            }
                        }
                        try {
                            v8_2.close();
                        } catch (java.io.IOException v6_2) {
                        }
                        if (v6_2 != null) {
                            throw v6_2;
                        } else {
                            return;
                        }
                    } catch (java.util.List v5_3) {
                        v8_2.close();
                        throw v5_3;
                    }
                } else {
                    android.util.Log.e("MultiDex", "Context class loader is null. Must be running in test mode. Skip patching.");
                    return;
                }
            } else {
                return;
            }
        } catch (java.util.List v5_5) {
            throw v5_5;
        }
    }

Method bolts.BoltsExecutors.isAndroidRuntime() calling method java.lang.System.getProperty()


    private static boolean isAndroidRuntime()
    {
        boolean v0_2 = System.getProperty("java.runtime.name");
        if (v0_2) {
            return v0_2.toLowerCase(java.util.Locale.US).contains("android");
        } else {
            return 0;
        }
    }

Method com.google.zxing.ReaderException.<clinit>() calling method java.lang.System.getProperty()


    static ReaderException()
    {
        StackTraceElement[] v0_2;
        if (System.getProperty("surefire.test.class.path") == null) {
            v0_2 = 0;
        } else {
            v0_2 = 1;
        }
        com.google.zxing.ReaderException.isStackTrace = v0_2;
        StackTraceElement[] v0_3 = new StackTraceElement[0];
        com.google.zxing.ReaderException.NO_TRACE = v0_3;
        return;
    }

Method kotlin.internal.PlatformImplementationsKt.getJavaVersion() calling method java.lang.System.getProperty()


    private static final int getJavaVersion()
    {
        int v0_1 = System.getProperty("java.specification.version");
        if (v0_1 == 0) {
            return 65542;
        } else {
            CharSequence v8_1 = ((CharSequence) v0_1);
            int v9 = kotlin.text.StringsKt.indexOf$default(v8_1, 46, 0, 0, 6, 0);
            if (v9 >= 0) {
                int v11 = (v9 + 1);
                int v2_2 = kotlin.text.StringsKt.indexOf$default(v8_1, 46, v11, 0, 4, 0);
                if (v2_2 < 0) {
                    v2_2 = v0_1.length();
                }
                if (v0_1 == 0) {
                    throw new kotlin.TypeCastException("null cannot be cast to non-null type java.lang.String");
                } else {
                    String v3_2 = v0_1.substring(0, v9);
                    kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v3_2, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)");
                    if (v0_1 == 0) {
                        throw new kotlin.TypeCastException("null cannot be cast to non-null type java.lang.String");
                    } else {
                        int v0_6 = v0_1.substring(v11, v2_2);
                        kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(v0_6, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)");
                        try {
                        } catch (NumberFormatException) {
                        }
                        return ((Integer.parseInt(v3_2) * 65536) + Integer.parseInt(v0_6));
                    }
                }
            } else {
                try {
                } catch (NumberFormatException) {
                }
                return (Integer.parseInt(v0_1) * 65536);
            }
        }
    }

Method kotlin.text.SystemProperties.<clinit>() calling method java.lang.System.getProperty()


    static SystemProperties()
    {
        kotlin.text.SystemProperties.INSTANCE = new kotlin.text.SystemProperties();
        String v0_3 = System.getProperty("line.separator");
        if (v0_3 == null) {
            kotlin.jvm.internal.Intrinsics.throwNpe();
        }
        kotlin.text.SystemProperties.LINE_SEPARATOR = v0_3;
        return;
    }

Method com.google.android.gms.internal.vh.zzc() calling method java.lang.System.getProperty()


    public final String zzc(com.google.android.gms.internal.va p4)
    {
        String v0_2 = System.getProperty("java.specification.version", "Unknown");
        StringBuilder v2_3 = new StringBuilder(((String.valueOf(v0_2).length() + 1) + String.valueOf("AppEngine").length()));
        v2_3.append(v0_2);
        v2_3.append("/");
        v2_3.append("AppEngine");
        return v2_3.toString();
    }

Method com.google.android.gms.internal.vl.zzc() calling method java.lang.System.getProperty()


    public final String zzc(com.google.android.gms.internal.va p4)
    {
        String v4_2 = System.getProperty("java.vm.name", "Unknown JVM");
        String v0_3 = System.getProperty("java.specification.version", "Unknown");
        StringBuilder v2_3 = new StringBuilder(((String.valueOf(v0_3).length() + 1) + String.valueOf(v4_2).length()));
        v2_3.append(v0_3);
        v2_3.append("/");
        v2_3.append(v4_2);
        return v2_3.toString();
    }