FORUMS
Remove All Ads from XDA

[Root][4.4.2 ND7]GhettoRoot (Towelroot port) v0.3.2

21 posts
Thanks Meter: 69
 
By 25yvdgpo06, Junior Member on 1st September 2014, 05:22 AM
Post Reply Email Thread
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.

  1. 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
  2. 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'.
  3. 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.
  4. Plug in your device to your computer.
  5. Unlock your device's lockscreen if it is locked.
  6. 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.
  7. If/when a popup appears asking for authorization for your PC, allow it.
  8. 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.
  9. On Linux or OS X, enter a terminal at the folder you extracted the zip file to,
    and type chmod +x INSTALL.sh.
  10. To run, execute INSTALL.cmd on Windows.
    On Linux or OS X, type the following in the same terminal: ./INSTALL.sh
  11. Follow the on-screen instructions.


Configuration
v0.3.2 config.txt details:
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
A note on v0.3.2 Testing:
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.
Older changelogs:

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

Apologies in advance for any kind of faux pas I've made or rule I've broken. There always seems to be something...

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/>.    *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Attached Files
File Type: zip ghettoroot.zip - [Click for QR Code] (2.20 MB, 6129 views)
File Type: zip ghettoroot-v0.2.zip - [Click for QR Code] (2.69 MB, 2333 views)
File Type: zip ghettoroot-v0.2.2.zip - [Click for QR Code] (2.76 MB, 10568 views)
File Type: zip ghettoroot-v0.3.2.zip - [Click for QR Code] (3.32 MB, 28549 views)
The Following 44 Users Say Thank You to 25yvdgpo06 For This Useful Post: [ View ] Gift 25yvdgpo06 Ad-Free
 
 
1st September 2014, 06:11 AM |#2  
Junior Member
Thanks Meter: 0
 
More
hmmm
If I hadn't just killed my phone (perma red angry text of death) I would definitely help test. Of course you have me to thank as well. Why? Because I knew as soon as I broke my phone, or upgraded someone would come out with a root fix. So you're welcome. However there is still a good chance that the new "probably very used" replacement phone I get from Verizon will be 4.4.2 already so then I will try this out. Unless this is some sort of very cruel trick played on those of us that can't afford to upgrade our phones every other month, in which case shame on you, and I will still try it until I am blue in the face. And crying.
2nd September 2014, 08:49 AM |#3  
OP Junior Member
Thanks Meter: 69
 
More
Quote:
Originally Posted by J_3dgar_H00v3r

If I hadn't just killed my phone (perma red angry text of death) I would definitely help test. Of course you have me to thank as well. Why? Because I knew as soon as I broke my phone, or upgraded someone would come out with a root fix. So you're welcome. However there is still a good chance that the new "probably very used" replacement phone I get from Verizon will be 4.4.2 already so then I will try this out. Unless this is some sort of very cruel trick played on those of us that can't afford to upgrade our phones every other month, in which case shame on you, and I will still try it until I am blue in the face. And crying.

Nope, not a trick! My username looks a bit dubious even to me, but it was randomly generated by KeePass.
The Following 3 Users Say Thank You to 25yvdgpo06 For This Useful Post: [ View ] Gift 25yvdgpo06 Ad-Free
2nd September 2014, 01:39 PM |#4  
Junior Member
Thanks Meter: 6
 
More
I am getting, "error: device unauthorized. Please check the confirmation dialog on your device." I am not getting anything on my phone. Any thoughts?
2nd September 2014, 02:43 PM |#5  
TCPDump's Avatar
Senior Member
Flag Central US
Thanks Meter: 287
 
More
Im testing this now. Will let you know in a few mins. So far, so good.

Edit: This worked like a champ for me. Root achieved. For anyone wanting to do this, please follow these steps:
  • Run clean.cmd
  • Run prepare.cmd
  • Run root.cmd

Do these in this order. I went ahead and added a pause to each batch (Except root.bat that already had one) to ensure everything was kicking off as expected. Sorry if this was outlined in the OP, but Im sort of a "D personality" and wont read a lot of fluff.

Thanks!
The Following 3 Users Say Thank You to TCPDump For This Useful Post: [ View ] Gift TCPDump Ad-Free
2nd September 2014, 03:06 PM |#6  
Matttrix's Avatar
Senior Member
Thanks Meter: 23
 
More
Seems to be running good here to ... some more fiddling and see how things go but I now have root on 4.4.2. Thanks

Update: no problems also Knox has NOT been tripped and no other issues.
2nd September 2014, 05:54 PM |#7  
Junior Member
Thanks Meter: 0
 
More
Worked for me!
I tried this, and it worked like a charm. So far, no issues.

Thank you!!!
2nd September 2014, 08:35 PM |#8  
rod_ol_fo's Avatar
Member
Flag San Diego
Thanks Meter: 16
 
More
=D
i dont think i've been this excited since safestrap was in the works for the N2!!! cant wait to try this when i get home!!! thanks dev
2nd September 2014, 09:54 PM |#9  
Member
Thanks Meter: 3
 
More
I still don't have root. Not sure what went wrong. My phone restarted like it was supposed to but not root.
2nd September 2014, 10:41 PM |#10  
Senior Member
Thanks Meter: 50
 
More
Quote:
Originally Posted by NetworkingPro

Im testing this now. Will let you know in a few mins. So far, so good.

Edit: This worked like a champ for me. Root achieved. For anyone wanting to do this, please follow these steps:

  • Run clean.cmd
  • Run prepare.cmd
  • Run root.cmd

Do these in this order. I went ahead and added a pause to each batch (Except root.bat that already had one) to ensure everything was kicking off as expected. Sorry if this was outlined in the OP, but Im sort of a "D personality" and wont read a lot of fluff.

Thanks!

Does clean.cmd wipe all data? I only ran root.cmd and the phone rebooted like it was supposed to, but Titanium Backup doesn't register my device as rooted.
2nd September 2014, 10:48 PM |#11  
TCPDump's Avatar
Senior Member
Flag Central US
Thanks Meter: 287
 
More
Quote:
Originally Posted by Tkun

Does clean.cmd wipe all data? I only ran root.cmd and the phone rebooted like it was supposed to, but Titanium Backup doesn't register my device as rooted.

It just cleans up old root files that might have been part of previous root methods, or failed attempts.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes