yashsingh1/xdaforums huggingface dataset:
[Nexus 6  General] adrman:
This thread is located in the Nexus 6 General forum.
[Nexus 6  General] doitright:
Please do not post binaries in this thread.

Thanks.
[Nexus 6  General] doitright:
I've added 6.0.1 boot image for shamu to the repository. Should work, but not tested.
[Nexus 6  General] androcraze:
I'm not disagreeing with you. You're right; it's in the N6 forum.

And it's the only thread on XDA for the work of [MENTION=6124077]doitright[/MENTION], which is not only for the N6.

Because of that, I think it's a recipe for disaster not to label things.
[Nexus 6  General] Lost Dog:
I'm not seeing 6.0.1 on the git hub repository. It's still only showing 6.0.

Thanks for the update. I'll try as soon as it's posted.
[Nexus 6  General] AlxMAX:
Sorry. I have removed the ZIP.
[Nexus 6  General] doitright:
Naturally, I committed, but forgot to push. :P

Should be there now.

Sorry about that.
[Nexus 6  General] Lost Dog:
Got it!

I like to live dangerously so I'll flash it as soon as I get on my next flight. No need to wait until I get home!
[Nexus 6  General] cdaly1970:
6.0.1 Flashed, it is running great so far. Nice job!

-Chris
[Nexus 6  General] adrman:
Sorry, meant to put a smilie on that post, but yeah, depending on what you're viewing the thread on, the forum isn't always prominently displayed. :)
[Nexus 6  General] _that:
Only in the page title, in the URL bar, and near the top of the page... do you want a permanent overlay to remind you in which forum you are? If a user bricks his non-Nexus 6 after flashing some binary from this thread, maybe they'll learn to read before flashing. The sources, which are the real main topic of this thread, are mostly portable anyway.
[Nexus 6  General] b8842dc0:
Hi All, I'm trying to root my phone using this method. I'm running android 6.0.1 based upon the ROM found here:

http://xdaforums.com/nexus-6/orig-development/rom-omni-rom-t2968425

Before installing the ROM mentioned above, I flashed the latest MMB29K factory bootloader image and radio.

I've installed the Superuser.apk from the link provided in doitright's second post. Then, I put my shamu into fastboot. Then I ran the following command: "fastboot flash boot shamu-6.0.1-boot.img". But I get the following output:

target reported max download size of 536870912 bytes

sending 'boot' (22 KB)...

OKAY [ 0.004s]

writing 'boot'...

(bootloader) Invalid boot image

FAILED (remote failure)

finished. total time: 0.009s

I've redownloaded the 6.0.1 boot image that doitright has posted and tried again, but got the same error. Any ideas?
[Nexus 6  General] pellen:
You downloaded the img incorrectly... on the github page, first click on "shamu-6.0.1.img", dont try to save the link etc...then instead click on the "This file has been truncated, but you can view the full file." link...That should download the img (which is ~8MB)
[Nexus 6  General] Lost Dog:
I flashed the 6.0.1 boot image and can confirm the world did not end. The battery indicator is even displaying the correct percentage. Good job!
[Nexus 6  General] phaze one:
Flashed 6.0.1 and all is well. Thanks for your work!
[Nexus 6  General] one20:
Anybody try Android Pay with 6.0.1 on N6?

I flashed the new shamu-6.0.1-boot.img along with the 6.0.1 system.img and the root part appears to work but Android Pay is giving me the following error when I try to use it:

"Android Pay cannot be used. Google is unable to verify that your device or the software running on it is Android compatible."

Maybe I missed something?
[Nexus 6  General] Captain_Throwback:
Sounds like Google "fixed" their root detection in SafetyNet.
[Nexus 6  General] rocco24:
Will this method void warranty of N6 ?
[Nexus 6  General] istperson:
Not in a way it counts, not like tripping Knox on Samsung phones. But you must acknowledge that unlocking the bootloader might void some warranties. And it also depends where you live. In the EU the manufacturer hast to prove that the damage to the phones was caused by software that was installed after you unlocked the bootloader. So if the battery dies, or screen loses a line or two they can't say it's because you unlocked the bootloader. And as opposed to Samsung's Knox this is reversible. You can return a phone to factory status again.
[Nexus 6  General] JimSmith94:
In Chainfire's SU thread, it looks like the only people that have been able to get Android Pay working have done a full wipe before the flash and root. Hopefully somebody can find a way around that, as I hate wiping.
[Nexus 6  General] :
I'm having trouble writing to the system. I flashed 6.0.1 images without wipe. Installed Superuser.apk, flashed shamu-6.0.1-boot.img. It says it's granting superuser access, but I can't write anything to the system partition (adaway, build.prop, etc). Any help would be appreciated.

Edit: I did have SuperSU installed before I flashed the factory images. I tried to uninstall SuperSU in it's setting, to which it said it failed. So I just uninstalled the app. I figured the flashing the factory image (even without data wipe) would take care of it anyways.
[Nexus 6  General] scryan:
You can follow all the development you want, and check into what ever forums you want.

The real recipe for disaster is taking stuff from a phone specific forum, when your not on that phone... And installing it when you do t know what it is and what your doing.

If it works on other phones, and others want to use it... Awesome.

But everything here is ALREADY marked as for the nexus 6 due to the nature of where its posted. Anything that is generally applicable can me marked as such, not the other way around... Or others can feel free to try at their own risk.

But the assumptions is and will be that by nature of it being in the nexus 6 forums, that that is what its for.

If you don't know enough to know what is generally applicable and what's not, that's on you.
[Nexus 6  General] Adreaver:
You figured wrong. SuperSU has many tentacles in both /data/ and /system/, and the only way to properly remove it is to fully wipe (including internal storage) and flash.
[Nexus 6  General] :
Okay. Thank you very much!
[Nexus 6  General] rocco24:
That;s very helpful. Thanks a lot
[Nexus 6  General] doitright:
On Nexus 6 factory system images, android pay requires dm-verity to be enabled. While we do have a "root" mechanism that permits dm-verity to be enabled, the boot images I provide do NOT have it so. I'm considering to eventually make it easy to enable, but not yet. If you must have this feature, then I suggest reading the thread carefully with respect to enabling dm-verity and doing your own build.

At this time, I cannot give any estimate on when you can expect "us" to provide you with a method of maintaining verity. Sorry.

Nope, nothing changed.
[Nexus 6  General] doitright:
Could be bad interaction between Superuser and whatever is left over from "that blob",

Or more likely, the fact that the system partition is pretty much "full" means that there is actually nowhere *TO* install it.

Note: if 'df' claims to have a few megabytes free, it isn't accounting for reserved space.

There is a lot of junk in the system image that you can delete to make space to "play".

For example;

/system/app/Photos, PlayGames, PlusOne, PrebuiltGmail, YouTube
[Nexus 6  General] doitright:
Dead horse pal.

Solution is to not post binaries here (in my thread) at all. The person who did post binaries here has removed them on my request. As a matter of security, and without prejudice, I don't think it is a good idea to train people to just download whatever they find in some thread in a forum. As a result, the ONLY place where you will find us posting binaries is on the "team"'s github project page at github.com/seSuperuser
[Nexus 6  General] :
Thank you so much! I forgot about the system image being full like that. I don't mess with my phone as much as I used to. Just when new factory images come out. Deleting some apks did the trick. I usually delete SprintDM, BuaContactAdapter and VZWAPNService.

Thanks again! Glad I waited to do a full wipe.
[Nexus 6  General] JavaTiggy:
I just want to double check because I think I read somewhere about this but I am not positive. Are there any issues with using Titanium Backup and this root method on 6.0.1?
[Nexus 6  General] rpmccormick:
Thank you, thank you, thank you!

This thread is so incredibly important. I wish all the members of XDA would start a movement to never install any root app that is not open-source. People's entire lives are on their phones these day and ANY tiny closed-source root app could easily grab tons of personal information and send it to the owners servers. If the code is not community auditable, you are risking your identity by allowing that code root!

I brought this up long ago when Sunshine started charging money for S-OFF. If everyone on XDA refused to use close-source code, someone would eventually provide an open app/method. If people have no problem paying for closed-source root apps, then the entire community will (eventually) enevitibly be destroyed by malicious root code. I never gave Sunshine my email, but they emailed me anyway after the card was reported stolen... what other personal information of mine did their app steal?

PS: Please donate to devs that continue to develop open-source code.

PPS: Charging in the app store is fine. Charging for compiled binaries on your site is fine. Not allowing people to view your code and complie/distribute their own binaries must be shamed out of existence!
[Nexus 6  General] westhaking:
TB auto restore didn't work for me.
[Nexus 6  General] doitright:
Well, the authorization UI has 4 options for you to choose from;

Allow this time, allow for 10 minutes, allow forever, and deny.

But I absolutely agree that it should be much more fine grained, especially when you don't actually know what that program is trying to do with the root privileges it is asking for.

The difference between su and sudo, is that su is more of a "do what you want" command that jumps you into a user account, whereas sudo is actually there to grant specific commands and sets of parameters to specific users, so it will pass that command into root to run.

For example, it can allow you to allow user A to run "ifconfig", but nothing else. Or it can allow user A to run it only with a specific set of parameters.

Also, sudo actually provides facility to NOT require a password.
[Nexus 6  General] doitright:
You do know about NOPASSWD: option for sudo? It doesn't always ask for password, only when configured to.

You know that #2 is built into Android now, right? And its fully automated.
[Nexus 6  General] doitright:
You are getting into conspiracy theories, which are *massively* off topic.

I promise you that Google is NOT owner of or funding them. That is just silly.

Especially considering that Google has their own implementation of su built into Android already. It is enabled on a userdebug or engineering build and accessible via adb. In fact, that very same implementation is what I am activating in my sepolicy adjustments.

What do you think the typical "su" command does? The standard old fashioned su command is nothing but a binary password prompt that is setuid 0.

On android, it is a little bit more complicated though, because setuid/setgid are blocked by the kernel for all processes that are descendants of zygote, which means all applications.

Besides that, though, setuid/gid are incredibly dangerous since they are applicable to everyone. There is no sane way to limit it to a specific user or set of users on android.

Let me make that a little more clear: setuid *IS* an escalation to root.
[Nexus 6  General] scryan:
Thanks but I know what root is, and wasn't talking about the root user... I was talking about the more general use of the term "root" as in I want to "root" my phone (thats why I had it in quotes, trying to indicate I didn't mean actual root, but what is often referred to when root is said by random users here). I guess I should have said that was my understanding of what "rooting" your phone is...
[Nexus 6  General] topaza:
:good: I definitely would appreciate an open source way of rooting!

Unfortunately I cannot support you with testing as I am still on lollipop...
[Nexus 6  General] freeza:
OP, I cannot stress enough how happy this makes me. I've never been a fan of SuperSU or its practices but it became the ONLY solution available. I will be switching to this ASAP. THANK YOU!
[Nexus 6  General] :
+1!
[Nexus 6  General] rawhide85:
[MENTION=6124077]doitright[/MENTION]- Thanks for the education. Been flashing for a long time but truly had no idea about this. I'll be watching your progress closely.
[Nexus 6  General] haibane:
doitright,

Do you mind stepping into more detail on the above? Specifically the splitting and patching of the individual projects?

Sorry. I am extremely rusty on all things coding these days, and I am still trying to relearn some of the basics.
[Nexus 6  General] :
Yes I do but I didn't actually think of this so thanks for reminding

No it's not. If you think it's the same thing as Greenify, you don't know quite how Greenify works. The system in M doesn't sleep user selected apps after the screen goes off. It puts off background actions after X amount of time of not usage. You can't define if and when it starts working. It's not the same things.

Also that's besides my point. I just gave a few examples (there are plenty more) of apps that need to request root access on a regular basis where a sudo password would be an inconvenience. Nopassword could help there though. Then again I don't think a user password is too much safer than giving SuperSU or another superuser app root rights. Passwords are commonly hacked and if it was something that every Android phone had as an option, then it would be a major target for hackers. Also this is somewhat offtopic in this thread since this is about a root option to SuperSU.

I'm following this thread with great interest. Thanks for the initiative [MENTION=6124077]doitright[/MENTION]
[Nexus 6  General] linzoid:
Yes . . I was thinking the very same thing. Google doesn't seem too enthusiastic about people rooting their devices lately.

---------- Post added at 08:03 PM ---------- Previous post was at 07:46 PM ----------

That is no more of a 'conspiracy theory' than some of your own opening statements, for example;

"something very frightening and dangerous involving the potential exploitation of everybody's devices."

If you think the possibility of exploitation by Coding Code Mobile Technology exists, why not Google - or any other large tech company?
[Nexus 6  General] doitright:
Ok, the way that a typical patch file is formed is that it includes the relative paths to all of the files that are being patched, with respect to the point in the filesystem where the "diff" command is run.

But what "repo diff" does, is it creates individual diff's for each project separately, with respect to the root of *that project*, it then throws them all together into one file and says "here you go, good luck".

But one thing it does do, at least, is it marks the boundaries between different projects with two lines, first a blank and second a "project" line. So if you look at the patch, the first project you see (second line in the file) is "project build/". If you keep looking down the file, the second one at line 17 is "project device/htc/flounder/" (you don't need that one, its for nexus 9).

So the way it goes is this;

blank line

project line

patch

blank line

project line

patch

etc.

So what you will need to do, is break the "repo patch" apart into separate patches for each of the projects you need to modify.

So as an example, for "project build/", you would create a "build.patch" that contains lines 3 through 15 (inclusive). Line 16 is part of the project header added for the *next* project "blank line".

Once you have that, you can go into the project path, in this case build, and patch it using "patch < build.patch".

** most people probably (a) don't need, and (b) shouldn't use the patch for build/, I just added it as a hack to get around the java requirements in the build test, since java isn't involved in making the boot.img, it doesn't actually matter if I break it. If you intend to build a full Android, you will need to satisfy that java requirement properly.
[Nexus 6  General] doitright:
Doze works a lot better than the "greenify" hack, which will actually break functionality, and could lead to an *increase* in power consumption or other bad side-effects when you forcibly enable/disable packages or parts thereof.
[Nexus 6  General] doitright:
Google has way too much to lose by engaging in crap like that.

But more to the point, if you're interested in engaging in conspiracy theories, please take it elsewhere.
[Nexus 6  General] :
Even so doze isn't the same thing. And even so I was still trying to point out a few examples out of many root apps that require constant root requests. Your apparent dislike of Greenify doesn't change that.

I'll drop this now. No point arguing about one app when your approach to superuser is a lot more interesting to me. And others I'd say too. So thanks again for the initiative - I'll keep monitoring the progress.
[Nexus 6  General] doitright:
You really shouldn't think of this project as an alternative to supersu, since this project PREDATES supersu and *all* other options. The reality is that supersu was created as an alternative to THIS targeted at those people who have the irrational belief that open source means that baddies can more easily exploit flaws.
[Nexus 6  General] :
You have a very aggressive tone towards me for some reason. Yes superuser predates SuperSU but the latter is the one used right now. So an updated/improved/whatever superuser will for most users be an alternative - perhaps one day the preferred choice.

As in my previous post and for the third time I'll thank you now. Since you seem to be very defensive or annoyed by me I won't bother writing here anymore. Keep up the good work.

Edit: I replied to your PM. No point dragging on this debate here. Your way of "suggesting" another point of view totally ignored my entire point of posting.
[Nexus 6  General] doitright:
Whatever aggressiveness, defensiveness, or annoyance you perceive is imagined. All I'm doing is trying to suggest an alternative and more meaningful point of view for you to consider.
[Nexus 6  General] scholbert:
Hi doitright!

First of all, thanks a lot for starting this project!

Second... some positive feedback:

Followed these steps on my Nexus 5 with a fresh mra58k-factory image.

No issue at all, though i just used android terminal for testing su access.

No glitches here.

The only thing i noticed are very big radio buttons, when the app pops up to make your choice...

It's usable and works as it should!

Thanks again!

Regards,

scholbert
[Nexus 6  General] doitright:
I'm not the one who started it!

Koush started it http://xdaforums.com/member.php?u=617884

phhusson forked it (Koush is marked as "retired") http://xdaforums.com/member.php?u=1915408

And I'm helping him out as much as I can.

I've helped patch a couple of minor bugs, and did the heavy lifting in developing an enforcing and secure (well, security is an art, so its growing more secure... but not a bad start compared to others in this area) factory-source based selinux policy for Android 6.0. He is working now on being able to apply my sepolicy changes to a pre-existing binary policy file, i.e., add the changes to an existing boot image, rather than generating a whole new boot image.

Terminal (untrusted_app context) is actually the *hard* part, since adb (shell context) has an easier path through selinux.

What I'm hoping you can do, is try out a few things that use root, and make sure that they actually do their job rather than bailing, crashing, or just not actually doing what they claim.

Unlike "that other" root application, I'm not willing to compromise the device's security by allowing the selinux policy to be hacked up and reloaded. I need a SOLID and fully enforcing policy that protects you from malicious software as much as possible, given that it is root we are dealing with.

I noticed that it didn't cause as much bleeding of the eyes when I tested it on a 5. You should see it on a 6, or even worse, a 9.
[Nexus 6  General] JavaTiggy:
How about manual restore or freezing or uninstalling system apps?
[Nexus 6  General] pellen:
I have successfully restored some apps in TB, so it seem to be working.
[Nexus 6  General] lispnik:
Stuck in startup/shutdown loop

First I really appreciate the open nature of this project! I hate installing stuff that doesn't have source code, especially for low level security stuff like this.

So I have a new Nexus 6, and its been through all the OTA updates and is on 6.0.1 and I've never installed SuperSU on it. I downloaded the blobs from Github (Superuser.apk and shamu-6.0.1-boot.img). I installed Superuser.apk, then in Developer Options, I enabled OEM unlock, then I rebooted to bootloader and ran "fastboot oem unlock", confirmed "Yes" to wipe data and continue. Then ran "fastboot flash boot shamu-6.0.1-boot.img. All of that succeeds without error and then I reboot.

On boot-up, it shows Google logo and an "unlocked icon" at the bottom, then the colorful ball things, and then the Welcome screen and then it immediate shows "Powering off" and shuts down. I think I might have seen it shut down before getting to the Welcome screen, too.

Might I have missed something? Some stuff I'm thinking of trying; Fresh install with 6.0.1 (avoiding the OTA updates), maybe installing CM-13 instead (not really a "solution" :)
[Nexus 6  General] topaza:
Just posting to confirm 6.0.1 patch is working fine for me on Nexus 5.

Reflashed stock boot, recovery and system images and then applied the update and flashed the patched boot.img.

Everything works fine for me so far.

Thank again for your great work!

BTW: open source root is the one thing but if you use third party apps that are closed source which require root access you are still facing the same risks as with a closed source root or am I missing something?

Does anybody know a backup application like titanium backup which is open source?
[Nexus 6  General] phhusson:
The long-term goal is to provide an su with only "trusted" or "safe" features. Like considering that changing /system/etc/hosts is safe, but not reading data of applications.

Though in the case of Titanium Backup-like features, it is much more complicated, since it needs to read apps' data anyway.

Titanium Backup-like feature is implementable without requiring to actually access app's data, through backup framework (I think Helium app does that), which enables the user to encrypt data before it goes to the backup app.

Another easier possibility is a two-sided su: some apps get "low" su, which only gives "safe" features. and a "sensitive" su which gives real full rights.

This way, you have less apps to worry about.
[Nexus 6  General] rpmccormick:
Not a bad idea... but honestly who can you really trust "sensitive" to when ownership can be bought? The su should remove privileges upon app-upgrade I guess, and people should be trained to do research before enabling "sensitive" after an update.
[Nexus 6  General] aosp:
[MENTION=1915408]phhusson[/MENTION] You know of any open sourced su logging apps?

Only one app in the play store but no opensource code unfortunately :/

https://play.google.com/store/apps/details?id=com.stericson.rootlogger.free
[Nexus 6  General] phhusson:
I usually use Catlog
[Nexus 6  General] JavaTiggy:
Finally clean flashed 6.0.1 and added root using this method. So far so good and I was able to restore apps with TB 7.3.0. Will report back here if I notice any specific issues. Thanks!