GhettoRoot (Towelroot port) v0.3.0.1, v0.3.2 Testing (looking for new owner)

Code: *** Disclaimer This project is licensed under the GPLv3. Bundled third-party components have different licenses, but these components are bundled or downloaded as separate executables; all appropriate LICENSE files are included, along with links to source code. THIS UTILITY MAKES USE OF A KERNEL EXPLOIT TO GAIN ROOT PRIVILEGES AND MAKE MODIFICATIONS TO YOUR DEVICE'S FILESYSTEM. IT WILL PROBABLY WILL VOID YOUR WARRANTY. IF YOU DO NOT FOLLOW THE INSTRUCTIONS, YOU COULD END UP WITH A BRICK. EVEN IF YOU DO FOLLOW THE INSTRUCTIONS, YOU MIGHT END UP WITH A BRICK. ROOTING IS A POTENTIALLY DANGEROUS PROCESS AND, WHILE I WILL TRY TO HELP IF YOU HAVE TROUBLE, I CANNOT ACCEPT RESPONSIBILITY FOR RANDOM MISFORTUNE, COSMIC RAYS, ETC.

Help Wanted

My activity with this project will be diminishing. As far as I know, everything as of now "just works" with the SCH-I605, and that's all I really wanted to accomplish from the start. I'm hoping someone will take it over -- ideally someone who'd be willing to look into fixing the code to support other devices. It's open-source, so you can start looking at it now and see if you're interested. Compiling is simple... Just install the NDK and use ndk-build, or 'make' in Linux.



If you'd like to take over the development, and you've worked on projects like this before, I'd greatly appreciate it; perhaps we can get a mod to transfer this thread to you, or you're free to start a new one. After a certain point, I'll stop monitoring threads and messages, so you're free to go ahead and take charge without waiting to hear from me, if you'd like.



Post elsewhere, if you'd like, to let people know that this code is available and might be adjustable for other devices. It really shouldn't be difficult for someone with a background with this stuff.



Problematic areas are likely the iov code (search "Not sure if this is entirely correct") and also the limit_offset stuff (search "ph->limit_offset != 0"), but I have no way of knowing for sure if there's anything wrong with limit_offset since I don't have an applicable Samsung device. There are scattered references to the sources I used to figure out some of this in the README and in ghettoroot.c itself.



That's all, folks. Thanks.

Introduction

Quote: This is an automatic root method for your Note 2 (or, potentially, other device) based on code for the CVE-2014-3153 exploit.Unlike towelroot, it is a tethered root in that it requires you to connect your device to a computer to perform the root. However, it only requires a computer the one time; root sticks.



This code appears to have been reverse-engineered from towelroot itself (but not the latest version), so Geohot gets the credit for this one. This is more like a bugfix which only works (for sure) with the Verizon Galaxy Note II so far. The changes from the towelroot-equivalent exploit code are incredibly minimal. Only a few lines of code need really be changed to get it working, but devices incompatible with towelroot are becoming ghetto, so there wasn't a lot of motivation for the problems to be investigated.



GhettoRoot attempts to walk you through the prerequisites for the rooting process and give you hints if there are problems; it does the dirty work itself.

Installation instructions

Quote: Please see the LICENSE file for details on copying and usage (GPLv3).



This software will attempt to root your device and might void its warranty.

Please BACK UP ANYTHING IMPORTANT before continuing.



Note: By default, v0.3.0.1 attempts to disable Knox and OTA update packages.

If you'd rather this not happen, scroll to CONFIGURATION.

Install USB drivers for your device if needed, for Windows.

Koush's drivers are a good bet. 'Download Windows Installer', and run:

https://github.com/koush/UniversalAdbDriver Download the busybox-arm4vl binary. The installer will help you with this.

You can get it manually from http://www.busybox.net , specifically from

http://www.busybox.net/downloads/binaries/latest

Place the binary in the files/ folder. It will be automatically renamed

to 'busybox'. Enable USB debugging. If necessary, go to 'About device' under Settings and tap

the Build number several times to enable the Developer options. Go back, and

go to Developer options, and enable USB debugging there. Plug in your device to your computer. Unlock your device's lockscreen if it is locked. Manually choose a USB mode from the notification, or wait for the Installer mode

phase of USB to end, which takes about 30 seconds. If your device does not have

an Installer mode, skip this. If you're not sure, just wait the 30 seconds. If/when a popup appears asking for authorization for your PC, allow it. If a popup does not appear and has never appeared before, or you clicked Cancel,

or you're just having a lot of trouble, go to Developer option and toggle USB

debugging off and on again. Then, try again. You may need to disconnect and re-

connect your device or tap Revoke USB authorization if nothing seems to help. On Linux or OS X, enter a terminal at the folder you extracted the zip file to,

and type chmod +x INSTALL.sh. To run, execute INSTALL.cmd on Windows.

On Linux or OS X, type the following in the same terminal: ./INSTALL.sh Follow the on-screen instructions.

Configuration

Code: Open up config.txt, and customize as follows, adding or removing arguments as you see fit. It should always start with ./root.sh *** ENSURE THE CONTENTS OF config.txt IS A *SINGLE LINE*. *** COMMENTS WITHIN config.txt ARE NOT PERMITTED. Default: ./root.sh --root --deknox --deota --desurveillance Former default: ./root.sh --root --disable-knox --disable-ota Usage: ./root.sh [OPTION] [COMMAND] With no arguments, --root is implied. Main options --root, --supersu Install SuperSU (permaroot) --deknox Remove Knox (recommended) --deota Remove OTA packages (recommended) --debloat Remove Bloat (recommended) --desurveillance Remove some surveillance (recommended) --disable-ota Disable OTA update-related packages --disable-knox Disable Knox packages --really-remove Actually remove things instead of putting them in $jaildir --undo Try to undo the specified option. If you had used --really-remove then it won't work for deknox, debloat, deota. Anti-convenience options --no-mount-rw Don't mount / and /system read-write --no-sepermissive Don't set SEAndroid to permissive --no-chmod-scripts Don't chmod 0755 all scripts in $TMPDIR COMMAND: Command to be run after other options. Arguments may follow. If unspecified, will look for and run custom.sh. ex. ./root.sh --root ./root.sh --root --undo ./root.sh --root --deknox --deota --debloat ./root.sh cp /sdcard/build.prop /system/build.prop

Thanks To/Credits

Code: geohot for developing towelroot , on which this code is DIRECTLY based! Reverse-engineered/decompiled, but not by me. I don't think anyone had a licensing claim on towelroot or this code so I made it GPLv3. fi01 for his shared exploit code on github: tinyhack.com for the helpful post on the Futex bug : chainfire, for SuperSU ! THANK YOU for the lenient distribution policy. NetworkingPro at xda-developers for the assistance to all. :) Other folks at xda-developers for testing and offering support. Google, of course, and the Android Open Source Project.

Changelog & Download

Code: WARNING: ESPECIALLY with this version, PLEASE make sure you have backups of your important applications and their data! Alternatively, you might be safer changing config.txt to the old value as listed below.

Code: This version is called 'Testing' because I haven't really had time to test it fully, and there's a bunch of new stuff, namely the de* (*-removal) scripts. I DON'T KNOW HOW WELL THE DE* CODE WORKS. You may want to give me some time to see how my device holds up before testing yourself, or check out files/root.sh to see what the new stuff does, but I do need other people to test as well, so I've changed the config.txt to include the new features, sans --debloat. If you DO NOT want to try the new features, change config.txt to the following: ./root.sh --root --disable-knox --disable-ota However, even the --disable-knox and --disable-ota code has changed. Your mileage may vary! Search files/root.sh for ### DEBLOAT, ### DEKNOX, ### DEOTA, ## DESURVEILLANCE, etc. to see exactly what they do.

Code: Current changelog: v0.3.2 Testing (2014/09/08) [fixed?] drowsy attempt to fix a silly bug with default modstring [new] new default config.txt: --deknox, --deota, --desurveillance [new] --deknox, --deota, --debloat, --desurveillance, --really-remove, --undo features added. See README.txt or search files/root.sh for ### DEBLOAT, ### DEKNOX, ### DEOTA, ## DESURVEILLANCE, etc. to see exactly what they do. [change] starting to change verbage from 'phone' to 'device' [note] v0.3.1 would have been too confusing, so straight to v0.3.2. Download v0.3.0.1 (2014/09/07) [fixed] Issue with find.exe when other find executables are in PATH. v0.3.0 (2014/09/07) [new] License: this project is licensed under GPLv3. [new] Added ADB binaries for Linux and Mac OS X. [note] This means we have experimental & untested support for Intel Macs [changed] Restructuring of post-root procedures: No more hard-coded commands for installing SuperSU, etc. These things are present in files/root.sh instead, and may be freely edited. [changed] Command-line parameters have DRASTICALLY changed. See the README.txt. [new] Added modstrings.txt, config.txt [changed] Busybox no longer bundled due to licensing concerns; curl added for downloading busybox, instead.



Code: v0.2.2 (2014/09/04) Fixed INSTALL.cmd hanging when launching ADB, or not running properly as an administrator. Further improved error handling, with more detailed steps for troubleshooting, and retries. User acknowledgment now required for certain tasks with (Y/N). Fixed date on previous update being in the future... Hmm... v0.2.1 (2014/09/03) ** pulled, did not fix adb hang issue after all ** v0.2 (2014/09/03) Code cleaned up a bit, but still gives verbose debug messages since they might be important. Can disable those with --brief. Some error handling in the install script. Everything is orchestrated from a single batch file ("one-click", though multiple scripts are still used internally). Should work properly with Windows and Linux, and come bundled with ADB for Windows. Thanks, NetworkingPro! v0.1 (2014/08/31) Initial release.

LINK TO FORMER THREAD HERE

Code: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GhettoRoot is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * GhettoRoot is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with GhettoRoot. If not, see <http://www.gnu.org/licenses/>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

v0.3.2 config.txt details:A note on v0.3.2 Testing Older changelogs:Apologies in advance for any kind of faux pas I've made or rule I've broken. There always seems to be something...