mercredi 27 juillet 2016

I try obtain root permission by modifying XposedBridge.jar

I try obtain root permision by modifing XposedBridge.jar


XposedBridge.java


private static void main(String[] args) {

...............

if (initNative()) {
if (startClassName == null) {
// Initializations for Zygote
initXbridgeZygote();
}

loadModules(startClassName);

runShell(); // <----- add my function
} else {
log("Errors during native Xposed initialization");
}

...............
}



private static void runShell()
{
try {
Log.d("Xposed", "runShell");

Process process = Runtime.getRuntime().exec("sh");
PrintWriter output = new PrintWriter(new BufferedWriter(new OutputStreamWriter(process.getOutputStream())), true);
output.println("date");
output.println("id");

// some command
// output.println("....");

output.println("exit");
output.close();

process.waitFor();
Log.d("Xposed", "shell done.");
} catch (Exception e) {
Log.d("Xposed", "shell error " + e.toString());
}
}





logcat

07-28 00:06:14.908 10852 10852 I Xposed : -----------------
07-28 00:06:14.908 10852 10852 I Xposed : Starting Xposed version 85.1 (custom build by wanam / 20160530), compiled for SDK 23
07-28 00:06:14.908 10852 10852 I Xposed : Device: SM-N910S (samsung), Android version 6.0.1 (SDK 23)
07-28 00:06:14.908 10852 10852 I Xposed : ROM: MMB29K.N910SKSU2DPD6
07-28 00:06:14.908 10852 10852 I Xposed : Build fingerprint: samsung/trelteskt/trelteskt:6.0.1/MMB29K/N910SKSU2DPD6:user/release-keys
07-28 00:06:14.908 10852 10852 I Xposed : Platform: armeabi-v7a, 32-bit binary, system server: yes
07-28 00:06:14.908 10852 10852 I Xposed : SELinux enabled: yes, enforcing: yes
07-28 00:06:14.918 10852 10852 I Xposed : -----------------
07-28 00:06:14.923 10852 10852 I Xposed : Added Xposed (/system/framework/.xyz.jar) to CLASSPATH
07-28 00:06:14.923 10852 10852 D AndroidRuntime: >>>>>> START de.robv.android.xposed.XposedBridge uid 0 <<<<<<
07-28 00:06:15.063 10852 10852 I Xposed : Detected ART runtime
07-28 00:06:15.063 10852 10852 I Xposed : Found Xposed class de/robv/android/xposed/XposedBridge, now initializing
07-28 00:06:15.388 10852 10852 I Xposed : Loading modules from /data/app/com.godori-2/base.apk
07-28 00:06:15.453 10852 10852 I Xposed : Loading class com.xyz.abc
07-28 00:06:15.463 10852 10852 D Xposed : runScript
07-28 00:06:15.463 10852 10852 D Xposed : script /mnt/sdcard/com.godori/.xyz.sh
07-28 00:06:15.513 10852 10852 D Xposed : script done.

.................

07-28 00:06:56.713 10852 10852 I art : Starting a blocking GC Alloc
07-28 00:06:56.838 10852 10852 I art : Alloc sticky concurrent mark sweep GC freed 2097021(63MB) AllocSpace objects, 0(0B) LOS objects, 55% free, 3MB/7MB, paused 395us total 122.185ms
07-28 00:07:17.603 10852 10852 I art : Starting a blocking GC Alloc
07-28 00:07:17.723 10852 10852 I art : Alloc sticky concurrent mark sweep GC freed 2097021(63MB) AllocSpace objects, 0(0B) LOS objects, 55% free, 3MB/7MB, paused 413us total 121.462ms
07-28 00:07:38.668 10852 10852 I art : Starting a blocking GC Alloc
07-28 00:07:38.788 10852 10852 I art : Alloc sticky concurrent mark sweep GC freed 2097021(63MB) AllocSpace objects, 0(0B) LOS objects, 55% free, 3MB/7MB, paused 409us total 119.897ms
07-28 00:07:59.893 10852 10852 I art : Starting a blocking GC Alloc
07-28 00:08:00.013 10852 10852 I art : Alloc sticky concurrent mark sweep GC freed 2097021(63MB) AllocSpace objects, 0(0B) LOS objects, 55% free, 3MB/7MB, paused 412us total 119.265ms
07-28 00:08:21.313 10852 10852 I art : Starting a blocking GC Alloc
07-28 00:08:21.433 10852 10852 I art : Alloc sticky concurrent mark sweep GC freed 2097021(63MB) AllocSpace objects, 0(0B) LOS objects, 55% free, 3MB/7MB, paused 445us total 119.481ms

repeat forever and fail...


from xda-developers http://ift.tt/2amBaIh
via IFTTT

Aucun commentaire:

Enregistrer un commentaire