[Q] Root Access for Incredible S - Where to start? - Android Software/Hacking General [Developers Only]

I have recently bought an Incredible S, and it is a great device, but I would like to gain root access for certain apps. The development forum is dead, I presume anyone with the knowledge and inclination as avoided this phone (and is waiting on the dual cores) so I decided to look for myself, but I am stuck. Either the people who usually discover root on these devices don't like documenting processes and methods, or I am loking in totally the wrong place. Can anyone give me pointers on where to start looking or where I can find info on where to start looking, or am I just barking up the wrong tree and sounding really thick?

Hey people,
I need to root my phone to.
I used z4mod and universal androot, both apps failed to root my phone.
So i hope someone succeed to root his or her incredible s, and post it here.
- Bert

unrevoked.com
just enable usb debugging, plug your phone into pc via usb, start unrevoked3 and wait. It will do all the work for you

There is no support for the HTC incredible S
i think there is a difrence between the HTC droid incredible and HTC incredible S,
so im not taking any risk trying to root my phone as an HTC droid incredible

vindicat said:
unrevoked.com
just enable usb debugging, plug your phone into pc via usb, start unrevoked3 and wait. It will do all the work for you
Click to expand...
Click to collapse
UnrEVOked does not support Inc S at the moment.
Sent from my HTC Incredible S using XDA Premium App

Alright, i'll try to make this simple, because i'm betting not a lot of people know what goes into rooting these devices.
Root is not like buried treasure. No X on a map. In fact, there is no map. We're not hitting up a command prompt on windows, crawling through thousands of bits to find the access codes so we can find the root the creators left for us.
Now that we know what it isn't, it's time to explain what it is.
Finding root is a lot like finding a back door... that's been painted to look like the rest of the outside wall... and all of its cracks sealed... and its doorknob non-existant. You'd have to look from the inside to know where it is, and even THEN you don't know if you can even OPEN the door from the outside.
What devs (or aspiring devs) attempt to do is look for the telltale signs that a phone software vendor has modified from the original stock AOSP. This means that the phone will be attempting to do something unique, something that vanilla android does not. TouchWiz, MotoBlur, etc are all examples of these.
Devs look through the changes, trying to find examples where vendors have hijacked root access (or system access) to perform a task. On Droid3, for example, we found a script that reinstalls stock sample games onto the phone. We attempted to shell-inject some code into a variable to install superuser into an executable directory. Unfortunately, the attempt failed.
In short, you're looking for signs that some root access is happening outside of vanilla android. After that, you need to find a way to hijack it. Checking files for executable permissions, finding out where files can be executed, etc are all examples of searching for root.
Your eventual goal will to be to get the su binary into an executable location. On the Droid3, this was /data/tmp, a temporary filesystem with executable permissions (but no write access for apps or shell.) Our goal was to use some exploit to push su into that directory and execute it. (We still have not achieved this.)
If you really want to learn the process that goes into rooting, check this thread out: http://forum.xda-developers.com/showthread.php?t=1193893
It is 60 pages of root theory where we are still [at time of post] attempting to gain root. We wade through our ideas, our attempts, our successes and our failures. (we have lots of those. )
Good luck, though i think you might be getting in over your head... I sure am already.

Related

[Q] is there likely to ever be a 'one click root' ?

OK.... Ive been an HTC Desire owner for a year and regularly flash ROMs but ive managed to be able to distance myself from the whole adb 'thing' thanks to Unrevoked (ie a 1-click-root).
Being an owner of a Transformer now Id love to be able to root the beast and carry on with Flashing and tweaking but the whole rooting thing now scares me a little
ive done a fair amount of googling and I believe it requires install of software and drivers but most guides are for Android 2.1/2.2 etc and I know 3.0 is a different ballgame ..... Im also running windows 7 64 bit which seems to make things more complex. I fo have a dual boot to ubuntu but ive only really been using that to play around - im no Linux expert !!
Anyone know if there is likely to be a one-click-root developed for Honeycomb ?
adb - or the initial setup of adb - scares me
ADB setup isn't that hard, there are loads of guides on the internet already. I'm running W7 x64 and I didn't really run into any problems getting ADB up and running.
ADB isnt as hard as it sounds, its worth it to learn since there so much you can do with it. its just a matter of knowing what code to use and most of the time its posted and you just have to copy and paste. i prefer to use ADB sometimes instead to scripts that way you know exactly whats going on.
but im sure there will be easier ways to root if you just wait, there's still a huge shortage and im sure lots of people that want to develop for the TF are still waiting to get their hands on one.
ADB isn't all that daunting and besides, learning new things is enjoyable My hesitancy to root rests in some of the issues that folks are having. My screen wouldn't wake up once, I had to reboot to get my TF going again. I'm waiting now
to make sure the unit is solid and stable running the stock configuration. I don't want to root only to have the thing decide to become a paperweight 3 days later.
Using ADB should not be beyond anyone who has rooted and installed bits before. I think it is the lack of GUI and reassuring responses and prompts that people miss and are used to.
if you are following this guide and ADB is responding well, you can even cut and paste the commands into your command window (on PC you can) and this helps prevents missing spaces and syntax problems.
Bottom line though - if you are not comfortable doing it, don't risk it.
lol.... OK.... ive had a go ..... and i think it has worked
didnt help that my 'installing archives' in the Android SDK Manager is now hanging due to the washing machine in the garage catching fire and blowing the fuses therefore causing my connection to the web to break halfway through downloading
... and now im having problems downloading blob5 as it says im running concurrent downloads ....
Its always the unexpected stuff that causes problems
I love the smell of an electrical washing machine fire in the morning
Yep, had problem getting blob5 too. Didn't like my IP address? Got it from work instead - Don't tell the 'IT Police' (Although I am sure their logs will grass me up)
can anyone provide an alternative link to blob5? won't let me download
You could try resetting your ADSL modem to obtain a new IP address - that might work. As I mentioned above the site decided I had abused my download limit (at my first attempt!) and blocked my current IP.
Assuming you are not on a static address?
I'm on static
wilbur-force said:
can anyone provide an alternative link to blob5? won't let me download
Click to expand...
Click to collapse
Try this http://dl.dropbox.com/u/3387763/CWM_BLOB_V5
cheers
that's done the trick
You're welcome.
I've just ordered myself a Transformer and will no doubt want to root it after a while, if there any particular ROM that's considered the 'best so far'?
from what I gather most of the roms are still very early days. at this point I'm after root for nandroid and some of the root apps.
ok... very noob question
the root guide says to copy the blob/files to your 'adb directory' ... which directory is that ? the android-sdk directory ? or a sub folder of that ???
wilbur-force said:
ok... very noob question
the root guide says to copy the blob/files to your 'adb directory' ... which directory is that ? the android-sdk directory ? or a sub folder of that ???
Click to expand...
Click to collapse
copy it to platform-tools
android-sdk-windows/platform-tools/blob (all files + blob should be here)
also you can hold shift + right click platform-tools and choose open cmd window here.

An Introduction to Android Rooting for the Complete Beginner

There are a few of these guides around, but I thought to write my own. Hope it will be helpful! I'll keep the most up-to-date version on my site.
Rooting Android: What Is it?
If you've heard about "rooting" your Android phone, and are confused by what exactly it does, or don't understand the instructions you found on an obscure forum or blog post somewhere, this guide might help you make sense of things.
What Is "Root"?
"Root" is the name of the default administrative user in Unix. The user named "root" can do absolutely anything: edit or delete any file, start or stop any system service, and also add, remove or change the privileges of other users, so that they, too, could perform the same operation.
So, user "root" can actually bestow administrative privileges on any Android user, including the default one you use normally on the phone.
When you buy an Android phone, it normally does not let you login as user "root".
What Can User "Root" Do?
Your phone is really a general-purpose hand-held computer. People have written apps for it that can do the things like this:
Turn it into a wireless internet router, connecting to your 3G/4G network on one end, and broadcasting a wifi hotspot on another. You can thus connect your laptop to the internet from anywhere. "Tethering," but without cables!
Lets you overwrite any of the Android system files, customizing it to your heart's content. This lets you customize the built-in fonts, colors, keyboards, etc.
Lets you install newer versions of Android, beyond what your phone's vendor has provided.
Why stop at standard Android? Because Android is an open source operating system, people have been able to modify it to add features far and beyond what Google has put in it, as well as offering better performance in some situations. With administrative privileges, you can just flash an entire new Android ROM to your phone. A very popular one is CynaogenMod, which is based on Android 2.3.
Install various networking servers and clients, such as QuickSSHd to allow logging in to your phone over the internet, or CifsManager, which lets you access Windows shared drives from your phone.
Who knows? People might think of new users for these hand-held computers, uses that would require full access to all features of the phone.
Why Won't My Phone Normally Let Me Login As "Root"?
First, for reliability -- as far as you're concerned.
Imagine if your phone automatically gave you administrative access. This means that any app you install can do anything it wants to it. Obviously, unacceptable.
An alternate solution is available in newer versions of Windows and other desktop operating systems, which require you to enter a special administrative password whenever a program is trying to access secure parts of your computer. This is annoying enough on a desktop computer: on a phone, it would again be unacceptable.
So, it makes sense -- for your sake -- to disallow any administrative privileges.
Second, for reliability -- as far the phone vendor is concerned.
A smartphone, unlike a PC, is an expensive consumer device with an explicit support contract. People normally and frequently return phones to the shop if they stop working properly, or call customer support to get assistance. There's a huge cost for the vendor to maintain this support network.
Think for a minute what would happen if any phone user could login as "root" and delete any system file: you would have broken phones everywhere, frustrated consumers, and clogged support networks. Indeed, "rooting" a phone pretty much voids your warranty as far the vendor is concerned.
I Understand the Risks and Am Willing to Void the Warranty, So Why Can't I Login As "Root"? It's My Phone!
Even if logging in as "root" were an advanced feature, hidden away somewhere in the menus with thousands of warnings about possible dangers, you can bet that many non-advanced users would find it. When their phone breaks, you bet they will be angry, and will not care that the warnings were there. As far as they would be concerned, this "root" thing is a feature of their phone, and if it can break the phone then it shouldn't even be there.
And there's a third party who has a business interest in denying you "root": the telecommunication carriers. Their business model is designed around typical consumer uses of the phone, and they do not want it to be too powerful. For example, a "rooted" phone can let you tether it to a laptop, so that your laptop gets its internet access. But, carriers typically sell special "laptop sticks" for that purpose specifically, and these usually are more expensive than phone plans, because they take into account the much heavier bandwidth that laptop users tend to use. If everybody could "root" their phone and tether it, this product -- and source of revenue -- would be irrelevant.
So, Phones Don't Come with a "Root" User?
Android is based on the Linux operating system, which requires the "root" user to function. It's there. However, the vendor has tried to hide all the normal ways to access it. The "root" user is there, it's just "locked."
What Is "Rooting"?
In the context of Android phone, rooting means more than just letting you log in as the "root" user: it means installing a set of tools so that any of your programs can access "root" when then need to and you allow them.
The result is that "rooted" phone works just like Windows, in that it will ask you for permission (but not a password) whenever an app is trying to get administrative privileges.
Fortunately, once you gain access to the "root" user, it's very easily to install a set of standard apps that let you implement this feature, specifically the Superuser app.
How Do I Root My Phone?
Nothing in software can be truly locked down, and hackers have found ways to get "root" access on any Android phone on the market. There are quite a few holes.
But, these methods vary a lot and are different per phone. It's easier on some phones than others. It's often risky, too, because a misstep could potentially "brick" your phone -- making it so that you cannot boot into Android. "Unbricking" is possible in some cases, but not in others. Take care!
Search the internet, and you will likely find various blog and forums posts with instructions for rooting your particular phone model.
This is not a guide for rooting your particular phone model. Instead, it is a general description of what rooting is and how it works. It can help you understand the rooting instructions you find.
Any Downsides?
Well, first of all, there is the risk of bricking your phone. You might want to make sure that someone you know with the same model phone as you have has used the method before. Or, read about it in the internet forums, and make sure that lots of other people have used this method successfully.
Also, you may void your warranty: of course, this would only happen if customer support looks closely at your phone and notices that it has been rooted. It's a good idea to look at these rooting guides to see if there is an easy way to un-root the phone, or at least return it to factory settings.
Finally, there's the issue of "firmware updates" coming from your carrier. Sometimes they will work fine with rooted phones (as long as custom Android ROM has not been installed on them), but depending on the rooting method it may mean that won't work fine anymore. "Not working fine" can mean that the upgrades simply won't run, but it can also mean that the upgrades would fail terribly and brick your phone. Generally, if you have rooted your phone and are getting an "Update Available, Do you want to download?" message from your carrier, don't just say "yes," instead check the forums to see the experience of other people with rooted phones with this update. Generally this problem seems rare, a result of a very poor upgrade package from the vendor -- the usual case is that the upgrade simply won't work.
Don't worry too much: with a rooted phone (and a good Recovery program, see below) you will likely be able to install the upgrade yourself, and possibly better upgrades to more advanced versions of Android than your vendor provides.
How Rooting Works
First, let's understand how the locking down happens.
Your phone actually has more than just Android installed on it. There are, at minimum, three and usually four "partitions" in which entirely different programs are installed. Android is just one of them.
The Boot Loader
The first partition has the boot loader, the very first program see when you turn on the phone normally. The boot loader's main job is simply to boot other partitions, and by default it just boots the Android partition, commonly called the ROM (described below). So, you don't really see the boot loader for very long.
However, all phones allow for a special way of turning them on -- for example, holding the volume up button while pressing the power on button -- that shows the boot loader menu.
When you're there, you can actually choose if you want to boot into the Android partition, or you can boot into the Recovery partition (described in detail below).
The interesting thing about the boot loader is that it is very, very simple. It has no mechanism for users and privileges. One way to look at it is that it always is "root," and in fact can't be anything else.
Sounds like a good place from which to unlock your phone! Unfortunately, most boot loaders are too simple.
One exception is the boot loader found in Google's Nexus phones, and in a few other developer-friendly phones. These boot loaders can actually communicate with a PC over USB, and support writing data to partitions ("flashing" them), as well as booting from them. With this feature, you can flash an unlocked Android ROM to the Android partition, and you're done! Well, the challenge is just to find such a ROM that works well with your phone...
Most phones don't have such a flexible boot loader. However, getting into the boot loader menu is important, because it lets you boot into the Recovery partition, detailed next.
The Recovery Partition
As its name can tell you, this partition is mostly for customer support: the Recovery program can be used to return the Android partition to its factory settings, which can solve a lot of problems with faulty phones, or phones that were infected by bad apps. It can also format the SD card partition.
Some Recovery programs can also install special phone upgrades from the SD card, that write directly to ("flash") the Android ROM partition. Obviously, free access for anyone would allow rooting, so vendors make sure that Recovery would only accept official upgrades. But, one way to root a phone would be for hackers to find a way to create such an "upgrade" that the Recovery program would accept.
There's quite a lot of variation in Recovery programs out there: every vendor has their own idea of which recovery features would be useful for their customer support team. Boot into yours and take a look! It's harmless, unless you actually choose one of the recovery options...
Like the boot loader, the Recovery program is always in "root". A hacked Recovery program could let you flash an unlocked Android ROM, or run any "upgrade" you like. So, in addition to just "recovering" an unusable phone, it can help you "recover" the "root" user that has been locked from you!
A good Recovery program is very useful for customizing your phone, beyond just rooting it. By far the most popular Recovery program is Clockwork Recovery, also called ClockworkMod.
Some rooting methods begin by finding a way to flash ClockworkMod to your Recovery partition, from which you can then run an "upgrade" that roots your phone. Other rooting method find another way in, but still recommend you flash ClockwordMod as soon as possible, because it's just so useful for customizers.
You will not find a homepage or an "official" way to download ClockwordMod: carriers obviously do not want you get have easy access to it. But, search around, and you will find one appropriate for your phone. The ROM Manager app can also flash it for you, assuming you are already rooted.
The SD Card
This is another partition, entirely for you. It is not protected in any way, and you have full access to reading and writing files on it.
For many phones, this partition does not exist unless you physically install an SD card. Some phones have a built-in SD card.
The Android ROM
Finally, the most important partition on your phone! When the boot loader starts the Linux operating system (the "kernel") that sits underneath Android, one of the first subsystems to come up is the security system. From then on, the "root" user will be used to start various user-level subsystems required for the phone to function.
Eventually, the default user will be started, and that will be used to run your apps: the status and notification bar that appears on the top of the screen, the settings manager, the virtual keyboards, etc. Finally you get the home launcher, from which you can launch all the other apps on your phone. None of these programs run as "root", so you are effectively locked from administrative privileges.
The Linux operating system can set security permissions per file. So, indeed large parts of this partition are restricted to be read-only by any user except "root". So, if you boot into Android, none of the apps you run will be able to change these system files. The rest of the partition is readable-and-writeable, and generally functions just like the SD card partition, though it's usually much smaller.
Of course, if you boot into Recovery instead, you will be able to write to these files, because you are "root" there. That's why ClockworkMod is so useful for rooting your phone!
Most Android apps run on yet another layer, a virtual machine called Dalvik, which is a heavily modified version of the Java virtual machine found on previous generations of cell phones, as well as on desktop computers, servers, and many other devices. Definitely, everything you install from an app store will run on Dalvik. Dalvik is a tightly controlled environment in which privileges are carefully controlled per program, beyond what the Linux operating system provides. Not only do apps not have administrative access to the phone, but they can be limited in access to wifi, cellular access, and your data.
Except... that Android does provide a way for apps to request administrative privileges. In locked phones, this is automatically and silently denied. However, the Superuser app can hook into these requests and let any app switch to the "root" user, from which they have full administrative access. A friendly dialog box will pop up, asking you if you want to give the app full permissions. Say yes, and there you go!
A phone in which the Superuser app is running properly is rooted.
Summary: Rooting Methods
The rooting instructions you find will likely be one of these, or a combination of these steps:
Phones with boot loaders that can be unlocked (such as Google's Nexus) will let you flash other partitions. You can flash a whole Android ROM that is already rooted, such as CynaogenMod, and you're done! Or, if you don't want to replace your entire Android ROM, you can flash ClockworkMod into the Recovery partition, and move from there to the next method.
Some rooting methods start with a hacked way to flash ClockworkMod into the Recovery partition. With ClockworkMod, you can run your own special "upgrade" from the SD card. This "upgrade" will vary a lot per phone model, but at the minimum it will involve installing the Superuser app. For some phones, it will modify a few Linux configuration settings to make sure that Superuser app can login as "root." Other, more heavily locked-down phone models might require replacing certain locked parts of Linux and the Android system, sometimes much of the Linux "kernel" itself.
Other rooting methods use the phone's existing Recovery program, but the hackers found a way to create an "upgrade" that can fool the Recovery program into believing it's official. From there on, it's identical to the previous step.
Some rooting methods start straight from Android. Hackers found a way to login as root while Android is running. Of course, logging in as root is not the same rooting, but once you are logged in as root you can run a similar "upgrade" as is used in the previous steps.
Need More Help?
Don't ask me, please! Seriously, I spent a lot of time writing this long article specifically so I would not have to keep answering questions about the process. There are many internet forums and bloggers that welcome questions from noobs. I've generally found the Android hacker community to be extremely generous and welcoming.
Happy rooting!
Nice - but clarification requested
I like the article as it answers some questions.
One thing I'm curious about - you seem to use the terms Recovery Partition and Recovery Program interchangeably. Is that your intent? I'm not trying to split hairs - I just want to understand. I would have expected booting into the recovery partition loads the recovery program.
Also, you talk about how vendors choose features of their recovery program. CWM is then a replacement for the vendor supplied recovery program, correct? If you root then install CWM, are you in effect replacing the recovery program after rooting (as opposed to forcing CWM to overwrite the existing recovery program via flash)?
Thx
Thanks!
A very useful guide for android beginners like me!
Sorry for the bump . This post deserves a thanks and a bump
Thanks! A very useful guide for beginner. I've forwarded this to my colleague who just switched from Windows to Android phone.
Much appreciation!
Thank you so much. I have just purchased a rooted phone & have a ton of questions. Have spent hours here tonight searching for basic info. Finally found this & it really helped this total "noob".
Thank you again.
thanks (very2 usefull) from iphone4 user
Good work..
Sent from my Galaxy Mini using xda-premium
Thanks. It helped very much
how to root sony xperia u
How to root sony xperia U..?
please give me detailed and simple procedure to follow...
i would also happy to know should i have pc drivers to run this rooting process..?
thanks
Thx for taking the time to write the article helped me understand a lot of things

Possible to Replace a System File without Rooting?

I am a NOOB, but I like myself just fine. The video for NOOBs is funny, but IMHO, should be a bit more serious.
I'm one of those people experiencing issues with GPS and TTFF being excessively long on the MT. Cry.
If I run MyPhoneExplorer, I can see the system file structure, and I believe I can move files to the phone. I believe I can do the same with SwiFTP.
Can one drop replacement GPS libraries for example into the SYSTEM and SYSTEM/HW sub-directories using a program like MPE, or an FTP program like SwiFTP without rooting, and would they be honored on the next reboot?
Would I be mangling some check-sum or other that determines the integrity of the system loaded?
I'm one of those users that doesn't really want to root if not necessary, but I wonder if doing some mod like the above - would doing so lay subsequent update pushes from VMUSA to waste?
Also, I'd really like if possible to flag some programs not to load, unless I explicitly ask them to load via the U.I. with intent. I suppose I'd have to root to do something like that. Perhaps with Ginger-Break? Would doing this make subsequent updates problematic?
Any information regarding my constraints and options to effect both of the above would be very appreciated. Thanks.
There are ways to mount the various partitions from a host machine (e.g. Linux) while it is in the "emergency" flash mode, which would permit what you want to do. Doing this is quite dangerous - at least as much as rooting the device and perhaps more-so.
I appreciate the response.
OK, if I were to root via Gingerbreak and install the files that way, then un-root, would my system then appear to be (to an update provided by Motorola or VMUSA) as something which couldn't be updated?
In other-words would rooting put me on a path to having to use specially modified updates?
Thanks.
Depends on what you change.
In GENERAL no, the update will come through. The major risk is that it crashes on install as some part of what you changed is a dependency but is not reloaded. This is rare, but can happen.
So.... root, install Clockwork, and make an immediate Nandroid backup BEFORE you screw with anything. That SHOULD allow you to un-hose yourself if you get in trouble.

[Q] Disabling camera(s) in Android via file deletion

I'm a father of three now...a new baby girl, a 7 yo boy, and an 8 yo girl going on 14. Now that my upgrade time has come for my phone i'm figuring out exactly what i want to do with my Droid Eris. I'm pretty sure i'll be running the wifi only script to turn off the cell radio, but i'm also interested in disabling the camera on it.
i'm not familiar with the interworkings of android but i was good enough to do the early days root working with adb and the sdk. of course, that was all step by step, without much understanding what every command did. i won't necessarily need a step by step for this - i'm sure i can find the commands i need, but if it's right off the top of your head i'd appreciate them.
i'm looking for which files i can either delete or rename to disable the camera(s), most likely force closing any camera app that may be opened. i'll be removing the stock app (i can search xda/wiki/google on how to simply remove an app...easy) but i need to know what files are used to access camera functions for the OS.
If the files are specific for the phone, please let me know so i don't attempt it on anything else, but if they're for the android OS that would be ideal - so i can use it on whatever device i give my kids (AndyPad, android phones, other tablets). thanks everyone in advance.

Kingo Root (still) steals your IMEI

This is probably a hell of a way to make a first post, but whatever.
So, in preparation for the wall of text upcoming, a tl;dr: kingoroot for windows (and probably the android app as well) calls "dumpsys iphonesubinfo" over adb for no discernible reason, obtaining the IMEI of every phone one attempts to root with kingoroot. In addition, the application tries to obtain some other nasty things, like the phone's GSM baseband version number and battery information, all of which are entirely useless for something claiming to just root a phone.
Ok, so first for some backstory. I recently got a prepaid ZTE paragon from best buy for 5 dollars. The hardware is pretty good for the price:
-Qualcomm 410
-1 GB RAM
-sd card slot
- IPS screen
Unfortunately, the phone is running Android 4.4.4 out of the box. Because of this, every trustworthy rooting app I could find failed on the phone, as all of the relevant bugs have been patched. So, I turned to China to give me my su jollies, and indeed, Kingoroot managed to root my phone with little trouble. This got me curious: what exactly was that windows executable doing on the phone anyway? And that's where this all begins....
I first tried to sniff the adb traffic between the computer and the phone. Unfortunately, there is no way to do this: adb sessions are isolated from one another, and so there is no real way to see what the Kingo adb thread was doing from a different shell. So, I went one level deeper and scanned ALL of the USB packet traffic on the computer with USBPcap. After opening up the hex dump, this worked a treat: I could see plaintext in the packets corresponding to adb shell commands. After several hours of skimming through the several megabyte dump, I could see roughly what the Kingo app was doing on the phone: It determines some system information (the model number, whether or not the phone is already rooted, some more unsavory stuff I'll get onto later), then copies over the apk of the splash screen that you get on your phone. When you click the button to root the phone, the executable copies over a lot of files to /data/local/tmp (some root essentials like the su binary and busybox, the main exploit binary called "kingo", and some scripts to ensure root persistence after the main root), chmods busybox, the root exploit, and su to give execution rights, and runs "./kingo kingo", which after several seconds creates a temporary instance of the su binary which you can call over adb at that point. (Interestingly, this must be run as "./kingo kingo" to work; anything else causes a segfault. Some form of password protection, maybe?) It then runs some scripts and rearranges some files with this newfound root access to maintain persistence, deletes all the files it brought over, and quits.
My main interest here was determining the root exploit Kingo were using to root the phone, and so after factory resetting the phone, I rooted it again using the app and copied over any files I could see in /data/local/tmp from a second adb instance. This gave me the set of files Kingo was using to root the phone, and after another reset, running the magic exploit offline indeed gave me temporary root access to the device (I haven't fully figured out how to make persistence work, but that is not the main issue here). So, after some hunting around on the internet to see if anyone else had gotten any information on this magic executable, I found some threads here on XDA claiming that Kingo was stealing some information about your phone and sending it to the Chinese mafia or something. Naturally, I was somewhat upset by this: I was running this in my good Windows VM! Now I have to reset it! But this again piqued my interest, and so I went to see if Kingo really was doing anything malicious.
For those who are unfamiliar with the story, Kingo was caught obtaining the IMEIs of phones which were rooted with the app. This upset a lot of people, and so with version 1.2.2, the Kingo developers claimed to have removed the ability to capture phone IMEIs. (Of course now, I know this is a pile of ****, but let's keep going.) So, first things first, I pulled out my packet log of the rooting endeavor and searched for my ZTE's IMEI. And with this, I found in the packet log:
Code:
529 17.074812 5.2 host USB 58 URB_BULK in:
Device ID = 865895021744484
Oh dear....
(Note that I'm not planning on using this phone for any networking over the cellular modem. I don't really care if this phone's IMEI is stolen. That is actually the phone's IMEI, btw)
Looking a little higher into the packet log revealed that Kingoroot was calling "dumpsys iphonesubinfo" over adb shell to obtain this information, and looking around some more revealed the following gems:
Code:
535 17.102832 host 5.2 USB 56 URB_BULK out
getprop gsm.version.baseband
and
Code:
547 17.124868 host 5.2 USB 43 URB_BULK out
dumpsys battery
Now I don't know about you, but I can't for the life of me figure out why a rooting program needs access to my IMEI, my GSM baseband version (!) and my battery information just to root the phone. To add insult to injury, all of this is done after
Code:
388 13527122 5.2 host USB 108 URB_BULK in
Qdevice::ro.product.name=P821A21;ro.product.model=Z753G;ro.product.device=faerie;
was sent over by the phone, indicating that all of the identifying device information that should have been sent was already sent.
This is only the shady stuff kingo is doing before the root happens too! After root privileges have been obtained, there is an unsettling amount of time taken until the application claims to be done and when it appears to actually be done.
I haven't looked through the whole packet log yet, but just from a brief look at the post-root adb commands packet 15710 has the executable calling "getprop", and who knows what the Chinese mafia are going to do with all of that information!
So, in conclusion, I set out to figure out how KingoRoot for windows roots android phones, but also determined that Kingo never really stopped doing shady **** as they claimed. To anyone who wants to take a look at the files I found for themselves, here (www (dot) filedropper (dot) com (slash) kingo)(I still can't post urls) is a link to everything I found during my little experiment. In that zip is the USB packet log for others to find some interesting information in (just open in wireshark) , the files kingo uses to root my Android 4.4.4 phone (I humbly defer to people who know more about binary reversing than I do to figure out what the hell that binary does), and some instructions to rooting a ZTE paragon z753g with this binary should you happen to have such a phone yourself. I realize that disclosing a root executable is not a particularly good idea, but considering the process to obtain it is so straightforward, I don't think not providing it is stopping anyone who wants to do something nefarious. If someone tells me to take it down, I will, however.
In addendum, I have a couple requests of anyone reading this. If you have a phone you don't particularly care about, download USBPcap, ADB, and the kingoroot executable and get the USB packet log during the whole interaction and the contents of /data/local/tmp (just copy that directory to a known safe place, like /sdcard/Download). Im curious if
1) Kingo actually uses different exploits for different phones and
2) the IMEI and baseband firmware version are always sent over
Finally, if anyone out there is good at binary reversing, I am curious about what exploit the "kingo" file is using to root the phone. When I look again at this process, nothing particularly screams that this actually requires the debugging bridge to work; presumably a rogue .apk could do the same thing. (Or worse yet, an ACE exploit like Stagefright) Although the Kingoroot Android app did not root the phone I used for this experiment, I have reason to believe that the same or a similar exploit is being used there, as opening a simultaneous adb shell reveals su privileges being obtained at a certain point of the process, although presumably the process fails because the persistence creating scripts didn't work for some reason.
So, in actual conclusion, Kingoroot is untrustworthy, panic and run
Thanks for this thread.
Kingoroot didn't root the phone, but stole the IMEI. This is 100% theft.
---------- Post added at 05:56 PM ---------- Previous post was at 05:35 PM ----------
zzazzdsa said:
This is probably a hell of a way to make a first post, but whatever.
So, in preparation for the wall of text upcoming, a tl;dr: kingoroot for windows (and probably the android app as well) calls "dumpsys iphonesubinfo" over adb for no discernible reason, obtaining the IMEI of every phone one attempts to root with kingoroot. In addition, the application tries to obtain some other nasty things, like the phone's GSM baseband version number and battery information, all of which are entirely useless for something claiming to just root a phone.
Ok, so first for some backstory. I recently got a prepaid ZTE paragon from best buy for 5 dollars. The hardware is pretty good for the price:
-Qualcomm 410
-1 GB RAM
-sd card slot
- IPS screen
Unfortunately, the phone is running Android 4.4.4 out of the box. Because of this, every trustworthy rooting app I could find failed on the phone, as all of the relevant bugs have been patched. So, I turned to China to give me my su jollies, and indeed, Kingoroot managed to root my phone with little trouble. This got me curious: what exactly was that windows executable doing on the phone anyway? And that's where this all begins....
Click to expand...
Click to collapse
Does Helium Backup work on this phone? I also bought this phone for $5.
I don't really need to root this phone. I just need to disable some System apps for my privacy.
Some members want root at any cost. You're not posting anything that's not already known.
But as with anything, flash at your own risk. That is the bottom line in this hobby.
Read, research, decide. The responsibility is on members to flash what they want. So, use it or dont. Not much more to say. :good:
And SU ??
Sent from my SM-A700FD using Tapatalk
Awesome post. Thanks!
Two comments/questions:
1. I bought two of these phones for my girls (3 years old and 1 year old). I want to load some games and some videos. I need to root so that I can load apps onto the SD card, etc. Should I worry about using Kingoroot or just go for it? They aren't going to be doing email.. at most taking pictures probably. Maybe Dropbox access. Pandora. So some (of mostly my) credentials going over the air.
2. The link you didn't post (see what i did there?) doesn't work any more. Care to upload it elsewhere? Feel free to PM me if you want.
Edit: I should also say this.. these are the only android phones I've ever owned. But I do consider myself very tech savvy (few programming languages, very comfortable at a unix command line, etc). So if there's any newbie android advice for securing a phone for kid use I'm happy to hear it!). Thanks
I have only used KingRoot on a Blu device and then which, gave to my father.
Thanks for all the work, another vendor of my list.
couldn't get Kingo to work
So inspired by the above post I tried Kingo and it didn't work. After much screwing around with Windows in VirtualBox I got Kingoroot installed and it even said it rooted it - but I couldn't get anything (i.e. SuperUser) to work correctly. Mind sharing your method for getting it to work?
@zzazzdsa You gotta do some research on Kingroot
They claim on their website that they parented up with XDA....
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Newyork! said:
@zzazzdsa You gotta do some research on Kingroot
They claim on their website that they parented up with XDA....
Click to expand...
Click to collapse
Nope. Lol
No affiliation. But anyone can put anything out there on the interwebz.
So i haven't had much time to play around with this some more, but I can post a rough guide to making a sniffing setup if you want to play along at home.
First, you're going to need a windows computer. It doesn't matter if it's virtualized, it just needs to have USB support enabled (via native support in VMware or the PUEL extension pack in VirtualBox)
Second, you will need to download adb for windows, USBPcap, and wireshark. All of those can be found with minimal googling. Once you have installed all three, you are ready to go.
Plug in your phone, enable adb on the phone, start USBPcap and an adb shell, and then start kingoroot.
Let kingoroot do its thing. While it is rooting the phone, pay close attention to the directory /data/local/tmp over adb. If anything interesting appears there, copy it over to a safe directory, like the emulated SD card.
Once the phone is rooted, close USBPcap, open wireshark, and comb through the packet log with a fine-toothed comb to find plaintext adb commands which will make the exploit work. A useful tip: the packet log will be extremely long, but almost all of the length will be due to the packet capture picking up file transfers as well. You can filter out these long file transfer sequences without losing any useful information.
zzazzdsa said:
So i haven't had much time to play around with this some more, but I can post a rough guide to making a sniffing setup if you want to play along at home.
First, you're going to need a windows computer. It doesn't matter if it's virtualized, it just needs to have USB support enabled (via native support in VMware or the PUEL extension pack in VirtualBox)
Second, you will need to download adb for windows, USBPcap, and wireshark. All of those can be found with minimal googling. Once you have installed all three, you are ready to go.
Plug in your phone, enable adb on the phone, start USBPcap and an adb shell, and then start kingoroot.
Let kingoroot do its thing. While it is rooting the phone, pay close attention to the directory /data/local/tmp over adb. If anything interesting appears there, copy it over to a safe directory, like the emulated SD card.
Once the phone is rooted, close USBPcap, open wireshark, and comb through the packet log with a fine-toothed comb to find plaintext adb commands which will make the exploit work. A useful tip: the packet log will be extremely long, but almost all of the length will be due to the packet capture picking up file transfers as well. You can filter out these long file transfer sequences without losing any useful information.
Click to expand...
Click to collapse
How did you get kingoroot to root your ZTE Paragon? I thought this phone cannot be rooted.
Get a virtual Windows machine running. Download the pc app at kingoapp com. Plug in, root. The problem is getting apps like super su to work given lack of /system write access. get that figured out and I'll give you a few gold stars. Because from what I can tell that's all that's holding me back from moving my apps to the sd card.
OMG LOL!
Then What? They are going to sell my imei number
With as much due respect for someone I've never met: so what? It's a $5 phone. If they get your imei and something bad happens I'll personally refund your $5.
If you're really nervous about that run your virtual machine thru a mitm proxy and filter out anything that looks like your imei.
Sounds like a very shady enterprise overall.
Wasn't planning on using it anytime soon but thank you for the heads up.
Just goes to show, when in doubt come here first.
Hi, my only concern is many novice use wifi at work is there a risk to hijacking a system via
Wifi, if the imei is the security password key used
By many phone services that allow access to towers.
Sweet i didnt know that thanks for the information.
Imei is not a security password.
It's used to identify the phone when programming a number to it (which then gets stored on your sim card)
Verizon won't even tell you the imei associated with a line unless your the account holder.
Curious what the mobile app installation of kingroot saves.
Sent from my unknown using XDA Free mobile app
wonderful article
iam the victim of the kingroot imei stealing

Categories

Resources