[ZTE ZMAX Guides, News, & Discussion] DroidisLINUX:
zteroot.java below

// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc

package zte.root;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.SystemProperties;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import java.io.File;

public class zteroot extends Activity
{

private String keystring;
Button mRootBtn;
Button munRootBtn;
private String productname;
private String productversion;
Activity zteroot;

public zteroot()
{
productname = "P892T57";[B][SIZE="7"]Change this to zte zmax id[/SIZE][/B]
productversion = "P892T57_VoLTEV1.0.0B03";B][SIZE="7"]and this to zte zmax id[/SIZE][/B]
keystring = "persist.sys.k";
zteroot = null;
}

public void exit()
{
}

public void onCreate(Bundle bundle)
{
super.onCreate(bundle);
setContentView(0x7f030000);
mRootBtn = (Button)findViewById(0x7f050000);
munRootBtn = (Button)findViewById(0x7f050001);
rootDirectlyByNeed();
zteroot = this;
bundle = new android.view.View.OnClickListener() {

final zteroot this$0;

public void onClick(View view)
{
if (view != mRootBtn) goto _L2; else goto _L1
_L1:
String s = SystemProperties.get("ro.build.sw_internal_version");
if (s.equals(productversion)) goto _L4; else goto _L3
_L3:
showDialog("Failed to root system", "error: product version mismatch", view.getContext());
Log.d("zteroot", (new StringBuilder()).append(s).append(" != ").append(productversion).toString());
_L6:
return;
_L4:
SystemProperties.set(keystring, productname);
if (SystemProperties.get(keystring).equals(productname))
{
restartAdbd();
showDialog("Root system successfully", "please replug usb cable", view.getContext());
exit();
} else
{
showDialog("Failed to root system", "error: product name mismatch", view.getContext());
}
_L2:
if (view == munRootBtn)
{
SystemProperties.set(keystring, "0");
if (SystemProperties.get(keystring).equals("0"))
{
restartAdbd();
showDialog("Unroot system successfully", "please replug usb cable", view.getContext());
exit();
return;
} else
{
showDialog("Failed to unroot system", "error: persist.sys.k not equal to 0", view.getContext());
return;
}
}
if (true) goto _L6; else goto _L5
_L5:
}

{
this$0 = zteroot.this;
super();
}
};
if (mRootBtn != null)
{
mRootBtn.setOnClickListener(bundle);
}
if (munRootBtn != null)
{
munRootBtn.setOnClickListener(bundle);
}
showDialog("Confidential for ZTE", "Any distribution, retransmission, copying, or disclosure is \nstrictly prohibited.", this);
}

public void restartAdbd()
{
SystemProperties.set("ctl.stop", "adbd");
try
{
Thread.sleep(1000L);
}
catch (Exception exception) { }
SystemProperties.set("ctl.start", "adbd");
}

public void rootDirectlyByNeed()
{
label0:
{
if ((new File("/data/local/zterootdirectly")).exists())
{
String s = SystemProperties.get("ro.build.sw_internal_version");
if (s.equals(productversion))
{
break label0;
}
Log.d("zteroot", (new StringBuilder()).append(s).append(" != ").append(productversion).toString());
}
return;
}
SystemProperties.set(keystring, productname);
if (SystemProperties.get(keystring).equals(productname))
{
restartAdbd();
Log.d("zteroot", "Root system successfully.");
return;
} else
{
Log.d("zteroot", "Failed to root system.");
return;
}
}

void showDialog(String s, String s1, Context context)
{
context = new android.app.AlertDialog.Builder(context);
context.setTitle(s);
context.setMessage(s1);
context.setPositiveButton("Close", new android.content.DialogInterface.OnClickListener() {

final zteroot this$0;

public void onClick(DialogInterface dialoginterface, int i)
{
}

{
this$0 = zteroot.this;
super();
}
});
context.create().show();
}

}

zteroot$1.java below

// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc

package zte.root;

import android.os.SystemProperties;
import android.util.Log;
import android.view.View;

// Referenced classes of package zte.root:
// zteroot

class nit>
implements android.view.ckListener
{

final zteroot this$0;

public void onClick(View view)
{
if (view != mRootBtn) goto _L2; else goto _L1
_L1:
String s = SystemProperties.get("ro.build.sw_internal_version");
if (s.equals(zteroot.access$000(zteroot.this))) goto _L4; else goto _L3
_L3:
showDialog("Failed to root system", "error: product version mismatch", view.getContext());
Log.d("zteroot", (new StringBuilder()).append(s).append(" != ").append(zteroot.access$000(zteroot.this)).toString());
_L6:
return;
_L4:
SystemProperties.set(zteroot.access$100(zteroot.this), zteroot.access$200(zteroot.this));
if (SystemProperties.get(zteroot.access$100(zteroot.this)).equals(zteroot.access$200(zteroot.this)))
{
restartAdbd();
showDialog("Root system successfully", "please replug usb cable", view.getContext());
exit();
} else
{
showDialog("Failed to root system", "error: product name mismatch", view.getContext());
}
_L2:
if (view == munRootBtn)
{
SystemProperties.set(zteroot.access$100(zteroot.this), "0");
if (SystemProperties.get(zteroot.access$100(zteroot.this)).equals("0"))
{
restartAdbd();
showDialog("Unroot system successfully", "please replug usb cable", view.getContext());
exit();
return;
} else
{
showDialog("Failed to unroot system", "error: persist.sys.k not equal to 0", view.getContext());
return;
}
}
if (true) goto _L6; else goto _L5
_L5:
}

lder()
{
this$0 = zteroot.this;
super();
}
}

zteroot$2.java below

// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc

package zte.root;

import android.content.DialogInterface;

// Referenced classes of package zte.root:
// zteroot

class nit>
implements android.content.rface.OnClickListener
{

final zteroot this$0;

public void onClick(DialogInterface dialoginterface, int i)
{
}

logInterface()
{
this$0 = zteroot.this;
super();
}
}

in the source zip the zteroot,java files show most of the code only file i havn't opened is the apktool.yml I need to get into that one to figure out the rest, but the zteroot.java, zteroot.java1, and the zteroot.java2 show us the code

the apk was made for the p892tf57 or the voltev1

so the zte volte i believe, so in the zteroot.java change the p892tf57 to our name, and the next line

"p892t57_voltev1.0.0b03" to the ztezmax, i dont know our phone id number I am just typing what needs to be done to test the apk again. change the id, and in the androidmanifest.xml change the versionname to just 4.4.4, or 4.4.2, and change the min sdk to like 17

recompile with any apk recompiler, the dsixda/Android-Kitchen should work to recompile the zip, and see if it works

Here are the permissions here is the source.zip