android Programming Glossary: su
Determine if running on a rooted device http://stackoverflow.com/questions/1101380/determine-if-running-on-a-rooted-device return new ExecShell .executeCommand SHELL_CMD.check_su_binary null @author Kevin Kowalewski public class ExecShell.. ExecShell.class.getName public static enum SHELL_CMD check_su_binary new String system xbin which su String command SHELL_CMD.. SHELL_CMD check_su_binary new String system xbin which su String command SHELL_CMD String command this.command command..
READ_LOGS permission on Jelly Bean (api 16) http://stackoverflow.com/questions/11461650/read-logs-permission-on-jelly-bean-api-16 on Jelly Bean api 16 Since Android Jelly Bean doesn't support the logs reading permission according to this google io.. String pname getPackageName String CMDLINE_GRANTPERMS su c null if getPackageManager .checkPermission android.Manifest.permission.READ_LOGS..
How can I connect to Android with ADB over TCP? http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp over TCP solutions but the connection appears to have issues since the adb monitor reports devicemonitor failed to start.. can enable ADB over WiFi from the device with the commands su setprop service.adb.tcp.port 5555 stop adbd start adbd And you.. on the computer that has the device connected via USB issue the commands adb tcpip 5555 adb connect 192.168.0.101 5555..
Android eclipse DDMS - Can't access data/data/ on phone to pull files http://stackoverflow.com/questions/4867379/android-eclipse-ddms-cant-access-data-data-on-phone-to-pull-files rooted device you can do this Open cmd Type ' adb shell ' su Press 'Allow' on device chmod 777 data data data data data com.application.pacakage..
How can I get root permissions through the Android SDK? http://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk do is something like Process root Runtime.getRuntime .exec su That causes SuperUser to show which lets you either Allow or..
Android INJECT_EVENTS permission http://stackoverflow.com/questions/5383401/android-inject-events-permission application into the system app directory from the SDCARD su mount o remount rw t yaffs2 dev block mtdblock3 system cp sdcard..
Runtime.exec() : Reboot in Android? http://stackoverflow.com/questions/5484535/runtime-exec-reboot-in-android shell or ConnectBot for instance than going through the usual of rebooting with the ACTION_REBOOT that I can't use anyway... I can't use anyway. For the moment I'm able to get the superuser privileges with Process root Runtime.getRuntime .exec.. privileges with Process root Runtime.getRuntime .exec su But I can't do the actual reboot. I try on a G1 HTC and on a..
Obtain root access via su on the Android emulator http://stackoverflow.com/questions/5687082/obtain-root-access-via-su-on-the-android-emulator root access via su on the Android emulator I need to get root access via su to.. su on the Android emulator I need to get root access via su to lunch a TcpDump binary I am working on a sort of android.. use this code try Process process Runtime.getRuntime .exec su DataOutputStream os new DataOutputStream process.getOutputStream..
Running Shell commands though java code on Android? http://stackoverflow.com/questions/6882248/running-shell-commands-though-java-code-on-android sysro Then in the onClick call RunAsRot like such RunAsRoot commands Then there RunAsRoot itself public void.. RunAsRoot String cmds Process p Runtime.getRuntime .exec su DataOutputStream os new DataOutputStream p.getOutputStream.. os.writeBytes exit n os.flush java android shell exec su share improve this question To run root commands you have..
Determine if running on a rooted device http://stackoverflow.com/questions/1101380/determine-if-running-on-a-rooted-device catch Exception e return false public boolean checkRootMethod3 return new ExecShell .executeCommand SHELL_CMD.check_su_binary null @author Kevin Kowalewski public class ExecShell private static String LOG_TAG ExecShell.class.getName public.. public class ExecShell private static String LOG_TAG ExecShell.class.getName public static enum SHELL_CMD check_su_binary new String system xbin which su String command SHELL_CMD String command this.command command public ArrayList String.. String LOG_TAG ExecShell.class.getName public static enum SHELL_CMD check_su_binary new String system xbin which su String command SHELL_CMD String command this.command command public ArrayList String executeCommand SHELL_CMD shellCmd..
READ_LOGS permission on Jelly Bean (api 16) http://stackoverflow.com/questions/11461650/read-logs-permission-on-jelly-bean-api-16 permission on Jelly Bean api 16 Since Android Jelly Bean doesn't support the logs reading permission according to this google io 2012 video and this one too i would like to know if it's possible.. restart the app after that for the change to take effect though String pname getPackageName String CMDLINE_GRANTPERMS su c null if getPackageManager .checkPermission android.Manifest.permission.READ_LOGS pname 0 Log.d TAG we do not have the..
How can I connect to Android with ADB over TCP? http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp guest or from the host. I installed a couple of different USB over TCP solutions but the connection appears to have issues since the adb monitor reports devicemonitor failed to start monitoring repeatedly. I was wondering if there is a way to.. if it is Rooted According to a post on xda developers you can enable ADB over WiFi from the device with the commands su setprop service.adb.tcp.port 5555 stop adbd start adbd And you can disable it and return ADB to listening on USB with setprop.. using WiFi if you already have USB access. From a command line on the computer that has the device connected via USB issue the commands adb tcpip 5555 adb connect 192.168.0.101 5555 Be sure to replace 192.168.0.101 with the IP address that is..
Android eclipse DDMS - Can't access data/data/ on phone to pull files http://stackoverflow.com/questions/4867379/android-eclipse-ddms-cant-access-data-data-on-phone-to-pull-files android eclipse data share improve this question On rooted device you can do this Open cmd Type ' adb shell ' su Press 'Allow' on device chmod 777 data data data data data com.application.pacakage data data com.application.pacakage Go..
How can I get root permissions through the Android SDK? http://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk root share improve this question What you need to do is something like Process root Runtime.getRuntime .exec su That causes SuperUser to show which lets you either Allow or Block it from root access. This approach might not work if..
Android INJECT_EVENTS permission http://stackoverflow.com/questions/5383401/android-inject-events-permission the system directory as read write and to install the application into the system app directory from the SDCARD su mount o remount rw t yaffs2 dev block mtdblock3 system cp sdcard APP.apk system app If you prefer to use adb from your computer..
Runtime.exec() : Reboot in Android? http://stackoverflow.com/questions/5484535/runtime-exec-reboot-in-android a phone is far far quicker using reboot in a terminal adb shell or ConnectBot for instance than going through the usual of rebooting with the ACTION_REBOOT that I can't use anyway. For the moment I'm able to get the superuser privileges with.. through the usual of rebooting with the ACTION_REBOOT that I can't use anyway. For the moment I'm able to get the superuser privileges with Process root Runtime.getRuntime .exec su But I can't do the actual reboot. I try on a G1 HTC and.. I can't use anyway. For the moment I'm able to get the superuser privileges with Process root Runtime.getRuntime .exec su But I can't do the actual reboot. I try on a G1 HTC and on a Galaxy S Samsung without any success. I located the reboot..
Obtain root access via su on the Android emulator http://stackoverflow.com/questions/5687082/obtain-root-access-via-su-on-the-android-emulator root access via su on the Android emulator I need to get root access via su to lunch a TcpDump binary I am working on a sort of android sniffer.. root access via su on the Android emulator I need to get root access via su to lunch a TcpDump binary I am working on a sort of android sniffer . I use this code try Process process Runtime.getRuntime.. binary I am working on a sort of android sniffer . I use this code try Process process Runtime.getRuntime .exec su DataOutputStream os new DataOutputStream process.getOutputStream os new DataOutputStream process.getOutputStream os.writeBytes..
Running Shell commands though java code on Android? http://stackoverflow.com/questions/6882248/running-shell-commands-though-java-code-on-android Define the string String commands sysrw rm data local bootanimation.zip sysro Then in the onClick call RunAsRot like such RunAsRoot commands Then there RunAsRoot itself public void RunAsRoot String cmds Process p Runtime.getRuntime .exec su.. RunAsRoot commands Then there RunAsRoot itself public void RunAsRoot String cmds Process p Runtime.getRuntime .exec su DataOutputStream os new DataOutputStream p.getOutputStream for String tmpCmd cmds os.writeBytes tmpCmd n os.writeBytes.. for String tmpCmd cmds os.writeBytes tmpCmd n os.writeBytes exit n os.flush java android shell exec su share improve this question To run root commands you have to use the flllowing format public void RunAsRoot String cmds..
|