yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] segelfreund:
Sorry,

but here there are.

egdr.log

"

Mon Aug 5 08:58:58 CEST 2013

busybox mount -o remount,rw /system

Checking com.noshufou.android.su

pm path returned:

Checking eu.chainfire.supersu

pm path returned: package:/system/app/Superuser.apk

- found eu.chainfire.supersu:/system/app/Superuser.apk

- Renaming /system/app/Superuser.apk

- Installed in system. Freezing

Package eu.chainfire.supersu new state: disabled-user

killall: eu.chainfire.supersu: no process killed

Checking eu.chainfire.supersu.nonag

pm path returned:

Attempting to discover leftover apks

Searching for su binaries

- found /system/xbin/su

- hiding it

busybox mount -o remount,ro /system

Killing misc apps

killall: libestool.so: no process killed

Enabling com.good.android.gfe

Package com.good.android.gfe new state: enabled

Starting com.good.android.gfe/com.good.android.ui.LaunchHomeActivity

Starting: Intent { cmp=com.good.android.gfe/com.good.android.ui.LaunchHomeActivity }

+--------------------------------+

Script complete at Mon Aug 5 08:59:05 CEST 2013

+--------------------------------+

Mon Aug 5 09:03:19 CEST 2013

busybox mount -o remount,rw /system

Checking com.noshufou.android.su

pm path returned:

Checking eu.chainfire.supersu

pm path returned: package:/system/app/Superuser.apk

- found eu.chainfire.supersu:/system/app/Superuser.apk

- Renaming /system/app/Superuser.apk

- Installed in system. Freezing

Package eu.chainfire.supersu new state: disabled-user

killall: eu.chainfire.supersu: no process killed

Checking eu.chainfire.supersu.nonag

pm path returned:

Attempting to discover leftover apks

Searching for su binaries

- found /system/xbin/su

- hiding it

busybox mount -o remount,ro /system

Killing misc apps

killall: libestool.so: no process killed

Enabling com.good.android.gfe

Package com.good.android.gfe new state: enabled

Starting com.good.android.gfe/com.good.android.ui.LaunchHomeActivity

Starting: Intent { cmp=com.good.android.gfe/com.good.android.ui.LaunchHomeActivity }

+--------------------------------+

Script complete at Mon Aug 5 09:03:27 CEST 2013

+--------------------------------+

"
[Android Software/Hacking General [Developers Only]] deepflash:
Nice thread!

I am currently struggling with getting good to run again since it refuses to work for quitw some weeks now.

What if u block all the stuff that good wants to read for example with xprivacy?

Gesendet von meinem GT-I9100 mit Tapatalk 2
[Android Software/Hacking General [Developers Only]] calisro:
doubt you can block file system reads with xprivacy
[Android Software/Hacking General [Developers Only]] Fallon:
Root will usually get reinstalled when you upgrade/update your ROM, that's about it. I hear a few re-root on reboot, but have never seen one. Disable GFE before you update, but that's about it.
[Android Software/Hacking General [Developers Only]] deepflash:
It is possible but only for the sdcards as far as i noticed. I can prevent acess to running tasks though so all I would now is to prevent checking good the system for su folders or apks I guess.

Edit: could it be enough to rename the supersu apk to something uncommon?
[Android Software/Hacking General [Developers Only]] calisro:
Or you can use the utility provided in this thread. Just a thought. :confused:
[Android Software/Hacking General [Developers Only]] Krad:
So it says that 4.3 doesn't work. I just wanted to know if I will be able to run the unroot script. I don't need to re-root.. i just want to unroot after loading latest CM10.2. WIll i be able to?
[Android Software/Hacking General [Developers Only]] sean.trinidade:
No. When I tried it, it doesn't clean up su properly so that GFE will still detect it
[Android Software/Hacking General [Developers Only]] calisro:
It depends on the root iplementation. supersu creates a daemon process that this wouldn't yet disable.. I'm not sure if gfe would detect it. Best way to find out is to try it. you can always just reflash your rom to put it back...
[Android Software/Hacking General [Developers Only]] sm_x:
I would love to see this updated to work with 4.3. Thank you for the great work. I have been using it for a while and it's great to have it as an option.
[Android Software/Hacking General [Developers Only]] calisro:
Once I get a 4.3 release for my device.
[Android Software/Hacking General [Developers Only]] Krad:
anyone try this out with cyanogenmod 10.1.3 rc1?

I may try it in a few hours and let everyone know.
[Android Software/Hacking General [Developers Only]] Krad:
so far so good on cyanogenmod 10.1.3 rc1 with privacy guard enabled on good technology. Script ran without issue.

Did a full flush, and reinstall of everything. Will let you know if it craps out tomorrow.
[Android Software/Hacking General [Developers Only]] segelfreund:
So it looks that doesent work with Android 4.3? Or?

Gesendet von meinem Nexus 4 mit Tapatalk 4
[Android Software/Hacking General [Developers Only]] jtdc:
yes. we have to wait for the Android 4.3 solution. actually i want to ask how to just unroot CyanogenMod 10.2 so GFE will just work, and i don't need to be rooted as well. its just that CM10.2 is rooted by default.
[Android Software/Hacking General [Developers Only]] calisro:
I can't answer that till I understand how its rooted in 10.2. Ill get my hands on 10.2 soon. Just haven't had time to upgrade yet.
[Android Software/Hacking General [Developers Only]] jtdc:
ok i tried it on my gingerbread phone. installed the scripts via CWM, and installed SManager from play store.

i wanted to test run the script. ran smanager, went to /system/xbin/egdr ... ran it, and got:

exec /system/bin/sh -e '/system/xbin/egdr'

$ exec /system/bin/sh -e '/system/xbin/egdr'

basename: permission denied

I did not run it as superuser because on the OP its mentioned "The scripts should NOT be setup to run as superuser" ... but it won't do anything due to permission denied.

so i enabled the Su icon and the egdr successfully ran, has some errors seen, some are because GFE is not installed yet. so i want to reverse the process (get root back), ran dger, same permission denied so enabled Su on it, and all it says is

In mgmain JNI_OnLoad

and exits with a -41 code.

AND, supersu icon disappeared on the launcher (and i think root gone, not sure how completely).

there is no /sdcard/gfe.txt log.

so i ended up flashing back supersu using cwm to get root back. not sure if anything else was taken out by the egdr script. at this rate, i am not confident to move on for now.

can i just do this process, unroot the phone using egdr, use the phone and Good as normal.

and whenever i will need to do something needing root, backup & freeze GFE in Titanium Backup,

reinstall back root via SuperSU on CWM, and use phone as normal (but not use GFE at all).

sounds crude so i doubt this. any insights?
[Android Software/Hacking General [Developers Only]] calisro:
"basename" is part of busybox. If you don't have it, add it with a busybox installer.

as for root, since you provided no logs I have no idea what's been done. I can tell you how to manually reverse it if I knew what it did.
[Android Software/Hacking General [Developers Only]] jtdc:
thanks much calisro for all your time in developing this, and for always being responsive and helpful :)

i edited the r_egdr script to disable it from starting good app. basically the egdr script becomes an 'unrooter' only and i will have to reboot the phone immediately afterwards.

this is so that all other root processes running or auto running (for instance cpu overclock app) won't definitely be there as root was taken out before that reboot, plus they will not run on startup (as they're root dependent so won't execute at all) ... This makes a fresh boot unrooted environment, which is intended for a Good compliant session, or even daily use.

i get compliance issue when ran egdr as there can still be root running process (not just titanium backup which i had uninstalled), as it is designed to run Good at its end, hence it detects those and compliance failed.
[Android Software/Hacking General [Developers Only]] jazzman97:
Just wondering if there was an update with 4.3 support?
[Android Software/Hacking General [Developers Only]] sean.trinidade:
Not yet. Waiting for OP to upgrade to 4.3
[Android Software/Hacking General [Developers Only]] calisro:
Just posting an update for people waiting on 4.3.. There are ROMs coning out now for my device. Will be looking into it soon. thx all.
[Android Software/Hacking General [Developers Only]] viper_insane:
I see they are coming out for many, will hold off until this thread updates. Thank you!
[Android Software/Hacking General [Developers Only]] moosefist:
Is it enough to just disable root in the developer settings in cyanogenmod?
[Android Software/Hacking General [Developers Only]] calisro:
no
[Android Software/Hacking General [Developers Only]] moosefist:
What else needs to be done? I don't care about root. How do I know if the app detects root?
[Android Software/Hacking General [Developers Only]] calisro:
your welcome to look at the scripts provided in this thread.
[Android Software/Hacking General [Developers Only]] calisro:
Still waiting for CM for my rom to be *usable*. The current nightlies still do not have working data. Once I have something workable I'll look into this "fix". Just so no one is wondering if this is dead. Its not. Its just delayed.
[Android Software/Hacking General [Developers Only]] monkey39:
Will Good detech "Hide My Root"? I rooted by Galaxy S3 4.1.2 earlier today (from stock rom), and I installed your scripts. Ran "egdr" script, and it seemed to work correctly (saw a bunch of stuff stream by in ConnectBot, anyway), then rebooted. Installed "Good for Enterprise", ran through provisioning ok, and just started browsing email when I got the compliance check fail message. Only thing I can think is that it didn't like one of the apps I had installed today after root:

Hide My Root

Root Checker (2 versions)

Titanium Backup

BusyBox

Irssi ConnectBot

Paragon NTFS & HFS+

AutoStarts

Triangle Away

Attached my log files, for what it's worth. Thanks for all this, btw - been looking for a way to root my phone and still use Good for work. Hope I can get this sorted out.
[Android Software/Hacking General [Developers Only]] calisro:
I would uninstall hide my root and both root checkers. Also, there are other logs for debugging you can provide in the OP. The other apps are fine that you listed anyway.
[Android Software/Hacking General [Developers Only]] monkey39:
Thanks for the reply! I've uninstalled the apps you recommended, as well as Triangle Away, just to be safe. And I've attached the requested files (sorry, should have done that in the first place). Really appreciate your help.

T
[Android Software/Hacking General [Developers Only]] monkey39:
Well, I re-provisioned GFE about 2 hours ago, and it's still working! :victory:

Note to self: Do not install apps with the word "root" in it's name.:good:
[Android Software/Hacking General [Developers Only]] calisro:
Ok, This should be fairly easy to 'fix' for people using SUPERUSER I think (not supersu yet). It will require changing the su daemon process name and restarting it for 4.3 users (or potentially modifying the service so it just always runs with a different name all the time which is what I do below). After making that change, the scripts should function as normal. I do not think there will need to be any modification needed to those scripts to work after the daemon is renamed.

For users who are technical enough to do this manually and who is running superuser (not supersu) below are some directions (until I can get a flashable zip created to modify things).

It should be as simple as duplicating the su to fu and modifying the 1st line of /init.superuser.rc on cyanogenmod roms as follows:

su
mount -o remount,rw /system
cp /system/xbin/su /system/xbin/fu
chmod 6755 /system/xbin/fu

service su_daemon /system/xbin/[COLOR="Red"]fu[/COLOR] --daemon
...
...

On non-CM roms, there is a install-recovery.sh file that deploys superuser. The contents will look like below. You should be able to modify the the portions in red:

#!/system/bin/sh
mount -orw,remount /
mkdir /superuser
mount -t tmpfs swap /superuser
mount -oro,remount /

cp /system/xbin/su /superuser[COLOR="red"]/fu[/COLOR]
chmod 6755 /superuser/[COLOR="red"]fu	[/COLOR]
mount -oro,remount /superuser
/superuser/[COLOR="red"]fu[/COLOR] --daemon &

Have I fully tested this? NO. :) But whats the worst that happens? Just reflash your rom and your back in business. I'll create some flashables soon for superuser. I am not so sure about supersu. The skinny on supersu is that I don't think I can rename the daemon name so I am not sure if there will be the same type of work around. We may be able to terminate the daemon as part of the scripts but then you won't have root until you reboot.
[Android Software/Hacking General [Developers Only]] sean.trinidade:
Not sure if I'm reading your post correctly, but are you saying it's possible to have superuser running at the same time as GFE? If so, am even more excited about the upcoming flashable files!
[Android Software/Hacking General [Developers Only]] calisro:
no. same scripts... it would be on/off. That being said, someone gave me a gfe apk that they decompiled, removed the root check and recompiled. So that's a possibility. I'm not sure if I want to start distributing a hacked gfe apk though.
[Android Software/Hacking General [Developers Only]] sean.trinidade:
Gotcha. Completely agree about the hacked GFE - people will just come back to you each time the app is updated.

Still looking forward to the flashable zips! :)
[Android Software/Hacking General [Developers Only]] LinkinParkmetre:
If the hacking of GFE doesn't take too long, that could be a huge plus for the users of your scripts.

Anyway, looking forward for the flashable zips !!!

Thanks for your work
[Android Software/Hacking General [Developers Only]] calisro:
I've been trying to get this to work but the problem I am trying to overcome is making sure the super user daemon (new for 4.3) remains renamed after a reboot. The problem is that the init.superuser.rc is redeployed on reboot with the prior settings. What this means to us is that if we have GFE running and the phone reboots, when it reboots it leaves GFE susceptible to detect that process and cause a compliance failure.

Anyway firgured i'd give an update. Just not quite sure how to do this consistently so everyone can benefit. (cm, asop, etc)
[Android Software/Hacking General [Developers Only]] calisro:
Legality. :)
[Android Software/Hacking General [Developers Only]] LinkinParkmetre:
OK !

When do you think you'll have a zip file ready? (I know everyone hates ETA, still asking haha)

I don't exactly understand how to use the script code in the previous page, but if someone gives me instruction I'll be glad to learn!

Thanks
[Android Software/Hacking General [Developers Only]] calisro:
Once I figure out how to do it so I don't break root on all your phones. Root changed significantly between 4.1 and beyond. Google forced cm and supersu to use these daemon processes that handle root rather than normal linux shell.

I know how to get it working for me but I'm not sure how to package this up yet so I don't break your phones causing you to reflash.

The issue is that on a reboot, the normal daemon process will be restored causing you a policy violation. I've thought about using init.d to revert the daemon back to the way I want it but OEM roms' init.d is a pain. And for you flashers/tweakers out there, lots of tweak packages use init.d also and the bad devs blindly overwrite prior changes.

Consistency is a problem with this new daemon su.
[Android Software/Hacking General [Developers Only]] sripad79:
HTC one Good not working

Hi Callisro,

First off great job in what you did so far, I have a htc one rooted with andriod hd revolution , andriod version is 4.2.2, I installed script manager from the OP, ran the scripts what you gave, but still cant get Good to work it says IT compliance failed, I have superuser.apk and supersu, my hunch is the script egdr is not able to hide superuser, I also have root checker, ES File explorer, but i did a clean boot and made sure none of it was running.

I have attached the log files, hopefully you can debug and help me out.

Thanks

Sri
[Android Software/Hacking General [Developers Only]] calisro:
Why do you have both superuser and supersu? Anyway...

my scripts don't handle this app and I'm sure it will get flagged:

/data/app/com.koushikdutta.superuser-1.apk

I could add it but why would you need both? I'm guessing that Koush renamed his pkg when he recreated the superuser for the 4.3 roms (backward compatible to older roms). Remove it. Also remove the worthless root checker app. rootuninstaller too.
[Android Software/Hacking General [Developers Only]] sripad79:
Thanks for the reply, I removed superuser, and the other apps too, is there anything specific that i need to remove before trying with a new pin. Is there a way to reuse the pin by deleting some of the GFE cache?, I tried wiping the cache with titanium backup , but couldnt reuse the pin again. My IT admins are not so friendly when it comes to asking for new pins :). Is there a way to check that the phone has really been unrooted before accessing GFE?.
[Android Software/Hacking General [Developers Only]] calisro:
That's probably it.
[Android Software/Hacking General [Developers Only]] calisro:
sdcards won't matter. they won't bother scanning them because they are mounted without setuid ability.
[Android Software/Hacking General [Developers Only]] Bestbaldmanever:
Haven't tried it yet. Probably at the weekend, tbh.

Don't suppose you know which custom JB 4.2 ROM is easiest on the battery do you? CM 10.1 seems to be chewing through it at a rate of knots!
[Android Software/Hacking General [Developers Only]] aydc:
I get flagged as uncompliant often when using this on my SGS3. I think it's because it doesn't remove root completely. Even after removing root, I can run Titanium Backup and it'll run rooted.

Other apps like OTA Rootkeeper and some CWM unroot zips I found on the internet can't stop Titanium Backup from running rooted either. My experience is, if Titanium Backup runs, Good will get flagged as uncompliant, even if apps like RootChecker show no root.

The only way I found to unroot completely is to run Superuser app and select remove root, after which even Titanium Backup can't run. If I do that, Good will run with no problems. I wonder if it's possible to do what the Superuser app does to remove root with a script.
[Android Software/Hacking General [Developers Only]] Bestbaldmanever:
Yep, this was my experience, although I unrooted completely using SuperSU. It ran fine for a few days, then yesterday morning, it stopped, for no apparent reason. I've just done a full factory reset and data wipe and reinstalled the ROM, then unrooted completely using SuperSU, then wiped the Dalvik cache, fixed permissions and rebooted.

only then did I install Good and set it up, and it STILL tells me I'm non compliant. I've even tried a different ROM now (the Supernexus 4.2.1 ROM), and it STILL tells me I'm non compliant. I'm getting really hacked off with it, and am starting to resign myself to having to install the stock ROM back again and put up with all the clag and horror that TouchWiz entails.

Complete and utter nightmare.
[Android Software/Hacking General [Developers Only]] wc4482:
Re: Good for Enterprise ( GFE ) root workaround

I've been running this workaround since January 3rd of this year without a single hitch (knock on wood).

I even went from beans build 4 to beans build 6 and re flashed the workaround and restored data with titanium, and good works every time same as before.

Not sure why you are having problems. Sounds pretty frustrating.

Sent from my VZW Note 2
[Android Software/Hacking General [Developers Only]] Zirillian:
For the record, I've been running GFE flawlessly on my rooted Nexus 7 with CM10.1 for about 2 weeks now. I keep waiting for it to break but it hasn't yet. I have not done a single thing in this post, but have monitored it in the event I needed to actually follow the directions here.

I have wanted to, but have not rooted my Nexus 4 because I am afraid it'll break and I won't be able to go back easily. GFE is the only reason I haven't rooted my phone yet (I rely on being able to access my work email without any hassle associated with it). If GFE broke on my tablet, I wouldn't care that much, but if it stops working on my phone and I am not able to go back and fix the problem, I'd be in trouble.

Is it possible that only phones a susceptible to the GFE non-compliance, and tablets are immune?
[Android Software/Hacking General [Developers Only]] wc4482:
Re: Good for Enterprise ( GFE ) root workaround

Are you sure that your company enabled the root check policy? As I understand it, some companies ask Good to check for rooted devices and other companies don't.

Sent from my VZW Note 2
[Android Software/Hacking General [Developers Only]] Zirillian:
Due to the highly sensitive nature of my job and the company I work for, I'd be extremely surprised if they didn't have that option to check for rooted devices turned on. I remember in some email communication from my Company's IT group back in the day that mentioned Good would not allow rooted devices...but can't remember if it specifically referred to my Company's policy or Good's policy.

Either way...going to give it a little bit more time to see if it breaks on my Nexus 7, then might try it on my N4 as long as I am reasonably assured I can restore everything back to stock (including GFE) without issues.
[Android Software/Hacking General [Developers Only]] wc4482:
Re: Good for Enterprise ( GFE ) root workaround

Better safe than sorry. I'm not up on the nexus 4 development, but with how popular it has been, I'm sure there will be all kinds of developer attention, maybe once Google actually ships out devices, haha.

Check the email that your IT department sent with your Good license and install instructions. Mine said specifically that root was not allowed.

Sent from my VZW Note 2
[Android Software/Hacking General [Developers Only]] Bestbaldmanever:
So my IT guy has been great and contacted Good directly for me. THeir response was:

The only way to ensure that the device is unrooted is by taking it back to the carrier and have them re-install the OS.

This is the only way to return the device back to a useable state.

Good is still detecting the device as Rooted due to the way the files are changed when rooted and the only way to change these is have the carrier re-install the OS.

I made the point that this wasn't going to happen (especially as it's a work issued phone, so there'd be an issue there I suspect!)

Anyway, upshot is I've decided to install it on my personal iPhone and run it on that. As and when we get a different mobile email solution (they're talking about Mobile Iron) I might go back to my SGS3 for work email.

Thanks all for your help and support on this; much appreciated.

Cheers

Ted
[Android Software/Hacking General [Developers Only]] aydc:
I wipe Good's data with Titanium Backup after it's flagged as uncompliant. Then I remove root with Superuser app, reboot and set up Good again. It works every time for me.
[Android Software/Hacking General [Developers Only]] calisro:
Re: Good for Enterprise ( GFE ) root workaround

They are lying to you. ;) It isn't magic. they use immature methods to check for root.

LOL, that is just funny and so untrue.
[Android Software/Hacking General [Developers Only]] calisro:
Re: Good for Enterprise ( GFE ) root workaround

Alot of work to do that everytime you need root. js.
[Android Software/Hacking General [Developers Only]] auslander1138:
I followed the OP directions using the scripted method on my Samsung Galaxy Note I717 (running Paranoid Android CM10) and GOOD is working flawlessly as of now! GFE has been a huge PITA and a thorn in my side, so I'm absolutely thrilled to have this way to "temporarily unroot". I kinda feel a little dirty :P

Thanks mate!

aus