Info Call to command execution API

Description

List of all command execution API calls

Recommendation

This entry is informative, no recommendations applicable.

Technical details

Method com.layer.sdk.internal.lsdkk.l.b() calling method java.lang.Runtime.exec()


    private static java.io.File b(java.io.File p4, String p5, int p6)
    {
        try {
            if (com.layer.sdk.internal.lsdkk.k.a(2)) {
                com.layer.sdk.internal.lsdkk.k.a(com.layer.sdk.internal.lsdkk.l.a, "LogUtils::createLogFile:Enter");
            }
        } catch (com.layer.sdk.internal.lsdkk.k$a v4_10) {
            if (com.layer.sdk.internal.lsdkk.k.a(2)) {
                com.layer.sdk.internal.lsdkk.k.a(com.layer.sdk.internal.lsdkk.l.a, "LogUtils::createLogFile:Exit");
            }
            throw v4_10;
        }
        java.io.File v2_1 = new java.io.File(p4, p5);
        com.layer.sdk.internal.lsdkk.k$a v4_2 = new StringBuilder();
        v4_2.append("logcat -t ");
        v4_2.append(p6);
        v4_2.append(" -f ");
        v4_2.append(v2_1.getAbsolutePath());
        com.layer.sdk.internal.lsdkk.k$a v4_3 = v4_2.toString();
        StringBuilder v6_2 = new StringBuilder();
        v6_2.append("Executing `");
        v6_2.append(v4_3);
        v6_2.append("`");
        com.layer.sdk.internal.lsdkk.k.a(com.layer.sdk.internal.lsdkk.l.a, v6_2.toString());
        com.layer.sdk.internal.lsdkk.k$a v4_5 = Runtime.getRuntime().exec(v4_3).waitFor();
        StringBuilder v6_5 = new StringBuilder();
        v6_5.append("Exit code ");
        v6_5.append(v4_5);
        com.layer.sdk.internal.lsdkk.k.a(com.layer.sdk.internal.lsdkk.l.a, v6_5.toString());
        v2_1.setReadable(1, 0);
        if (com.layer.sdk.internal.lsdkk.k.a(2)) {
            com.layer.sdk.internal.lsdkk.k.a(com.layer.sdk.internal.lsdkk.l.a, "LogUtils::createLogFile:Exit");
        }
        return v2_1;
    }

Method freemarker.template.utility.Execute.exec() calling method java.lang.Runtime.exec()


    public Object exec(java.util.List p6)
    {
        Throwable v0_1 = new StringBuffer();
        if (p6.size() < 1) {
            throw new freemarker.template.TemplateModelException("Need an argument to execute");
        } else {
            try {
                String v6_5 = Runtime.getRuntime().exec(((String) ((String) p6.get(0)))).getInputStream();
                try {
                    java.io.InputStreamReader v2_2 = new java.io.InputStreamReader(v6_5);
                    char[] v3_1 = new char[1024];
                } catch (Throwable v0_2) {
                    v6_5.close();
                    throw v0_2;
                }
                while(true) {
                    int v4 = v2_2.read(v3_1);
                    if (v4 <= 0) {
                        break;
                    }
                    v0_1.append(v3_1, 0, v4);
                }
                v6_5.close();
                return v0_1.toString();
            } catch (String v6_7) {
                throw new freemarker.template.TemplateModelException(v6_7.getMessage());
            }
        }
    }