Shared publicly  - 
As some of you might have read on Twitter, I had the chance to remotely(!) play with a Qualcomm-based SGS4 yesterday, and attempted to root it.

So far, it doesn't work. Don't get me wrong, flashing the device and injecting the su binary and app was no problem, but as soon as you actually execute the su binary, the device reboots. Setting to 0 and reflashing boot/recovery is also no problem, but there's some added protection that breaks adbd if boot/recovery is modified.

I've only had about an hour (and no time today) so I haven't done more then some really quick tests, but SELinux is certainly present. It appears to be in permissive mode though, so I'm not sure whether it is responsible for this behavior or if it's something else. The SELinux policies and such are inside the boot/recovery ramdisks, and trying to modify those partitions results in adbd not working.

It's probably going to be something simple to disable this behavior, but an hour of remote access is not enough (at least for me) to figure it out. Several ideas, just have to build/upload/flash/test/etc them. To me it did seem there was actually an explicit policy to allow /system/xbin/su, but I'm no SELinux guru, so I might have misinterpreted that.

To prevent any confusion: there does not seem to be any protection from flashing custom firmwares if you want to do so (on this test device at least). The stock firmware just doesn't like being rooted (so far). This is not Samsung locking down the hardware, as some will undoubtedly have assumed.
Michael “McDaddyTree” McGrade's profile photoAmi Singh's profile photoScott girdwood's profile photoFlorian Krügl's profile photo
What happens if Samsung decides to actually block custom roms?
+Tom Jansen op de Haar you could use a shell for it, but in this case so many flashing and rebooting and whatnot is going on that the guy who has the phone just does everything I ask him to (flash a file, reboot, execute some commands) and he tells me what happens, all this over chat so copy/paste galore.
+Anil Can Then you either don't flash custom roms anymore or you wait until a developer finds a way to crack that mechanism ;)
+Anil Can they do that and they lose a large number of potential customers and beta testers!
wow....getting it in early...people like this are what makes Android such a great platform...lots of hard work from the developers and the community...
SEAndroid in permissive mode doesn't block anything, what you are experiencing seems to be most likely TrustZone or some os integrity protection. 
Thanks for the update. I wouldn't buy a device that couldn't be rooted. I'm sure it's only a matter of time.
permissive mode on selinux does not block access. it only logs then. is there a setrnforce binary? 
Chainfire, that you are a very experienced and knowledgeable in Samsung devices, I wonder how I find out what model of the GT-N7100, eg (SGH-I317, SGH-T889, SCH-R950). The question is because I bought a GT-N7100 to have support for LTE networks, but I read on XDA that only models GT-N7105 is having, however the link all appliances GT N7100-have support for LTE. You can tell if there is any command to know which version of the hardware?
Exactly what processor was it running? There's been at lot of confusion about what the other version of the S4 will have. Thanks chainfire!
To others wondering, Android Central just confirmed it having the S600.
It means no GS4 at least for now. No root, not for me.
+Pau Oliva Thanks, that's what I thought. PS you were in Amsterdam and we didn't have beers? Shame!

+Serban Zodian Thanks, will check this out!

+Corey Zonin Not sure if it's the S600 but I am sure it is a Qualcomm, and as far as I know, only an S600 version is scheduled. This is a European model.

+John Iat I keep seeing people stating that, but I wonder where they get their information, 'cause it's simply not true. Various countries in Europe will get the Qualcomm version, this has already been confirmed. There are even rumors that all countries that will get the S4 at initial release date will get Qualcomm versions, and only later revisions will get the Exynos Octa. Now, I don't know if the latter is true, but I do know for sure that Europe will see at least some Qualcomm S4's.
+Serban Zodian On closer investigation, I was already running that version, and su works fine ... :)
And is the boot insecure ? Dunno. I had issues with all shells with superuser. 3 short vibes reboot. If i dont touch the ramdisk is ok though
+Serban Zodian Hmm, my boot is full stock ...

+John Iat No idea, though again that distinction would imply Exynos for Europe and QC for US/Canada ... :)
If Samsung blocks no one will want the device. I'm sure it will be done soon 
+Doug Rodriguez Samsung seems to be targetting the average comsumer, not the techie power users that root and flash. 
Slightly OT but has anyone played with a Sony Xperia Z with custom ROMs? 
Just an update, I have not really spent any time on this this weekend as I'm simply just darned busy with client projects, but I have been informed that in a newer S4 firmware (I don't have either the S4 or the firmware, so don't ask), SELinux has been switched to "enforcing" mode, which further restricts access (in the stock ROM). These are all pre-production firmwares though, so this says little about the final product other than that they're playing with it.

+Oli Jenkins I have played with a Z, but not with custom firmwares yet :)
Rumour has it Sony were locking down their sources like Samsung have been lately. Looking at the S4 I think Samsung are trying to branch out and away from Android (at least as far as to skin the OS and add so much bloatware) so that it's barely Android anymore. Maybe even dev their own OS. I'm curious to see what OEMs can compete with the Nexus range for Custom ROM'ing - that will ultimately determine my next handset. 
Thanks for the attempt albeit short in time I can't wait to get an S4.  Hopefully we get some root out of it at least...I'll be happy with just a few mods for a while...once again thanks for all your hard work and dedication to the community +Chainfire 
I really don't think i want an S4, despite being an avid SGS2 fan, i hated the Sammy Stock firmware and rooted/flashed custom ROM within weeks of getting it. I've never looked back. Seeing as though the S4 is even more heavily burdened with Sammy bloat and touchwiz naffness, coupled with a limited custom ROM capability....I'm looking elsewhere for my next phone. Any recommendations? 
I was actually rather pleased with my S2 for about 6-9 months before I even rooted it and then shortly after put CM on it.  I like a lot of the gimmicks actually.  I'm totally looking forward to the S4 since it will be much faster and have a better camera and more fun gimmicks to play with...and eventually it will run some custom firmware...of course I'll root it a lot quicker as there's more fun custom mods to do than when I got my S2.
hi chainfire, nice work you do....i am having problems with n7000 booting, i know it will be a simple 5 minute task for the experienced, new to this posting stuff!! don't know if i am posting in the right please to ask for your help? cheers anyway...

getenforce tells it is enabled (Enforcing) and SuperSU is terminated due to unauthorized access
Add a comment...