KH3/KG3/KG6 E-Mail APK for device-administratorless Exchange access :)

Search This thread

gauner1986

Senior Member
Dec 14, 2008
372
479
37
Hamburg
Hey guys,

just thought i'd share this with you. For those who don't like corporate control. :)
This Email.apk should pretend to the exchange server that device administrator is active, while not really enabling it.
While configuring your Exchange account there will be a message that device administration will be enabled.. If you press OK you would normally be shown the permissions needed by the device admin and be prompted to confirm them. This screen won't be shown anymore. You can also check "Settings/Location & Security Settings/Select device administrators", which will show an empty list now.

Have fun.

EDIT: KH3 version added

EDIT2: For all those curious guys in here.. ;) The patch is that easy actually.. I'm too lazy to make a diff so..

The file that needs to be changed is com/android/email/SecurityPolicy.smali:

You need to find this method signature and change the first boolean constant:

.method public isActive(Lcom/android/email/SecurityPolicy$PolicySet;)Z
.locals 12
.parameter "policies"

.prologue
const/4 v7, 0x0 <- just change this value to 0x1

That's it.
 

Attachments

  • Email.apk.7z
    3.6 MB · Views: 754
Last edited:

gauner1986

Senior Member
Dec 14, 2008
372
479
37
Hamburg
You need to place it manually in /system/app after removing the existing Email.apk AND Email.odex. I have to look into making a CWM-package.. Until then you'd have to place it there manually using a mobile terminal app or ADB.
 
  • Like
Reactions: zyxeu

DarkDvr

Senior Member
May 30, 2007
1,848
259
You need to place it manually in /system/app after removing the existing Email.apk AND Email.odex. I have to look into making a CWM-package.. Until then you'd have to place it there manually using a mobile terminal app or ADB.

Unfortunatelly, doesn't seem to work.
I used the older 2.3.4 email.apk with bypassed security before this one, and it worked fine (replaced in root explorer in system/app/, no odex as I'm running Cognition 1.31).

Upon creating account, asks for security changes, I click Accept (or activate), it asks me to create a password. No way to choose "None" for security settings.
Email doesn't update, says error connecting to server due to security settings.


EDIT: FIXED. Weird though - when renaming Email.apk in Root Explorer to Email_Orig.apk, it kept the reference to it, and when setting up account, it didn't use the new Email.apk, but still used Email_Orig.apk (even after reboot).
Complete uninstall of Email.apk, reboot, copy new Email.apk, then setup the account - worked.
 
Last edited:

Croak

Senior Member
Oct 9, 2007
1,629
271
Mulberry
Worked for me using Root Explorer (moved stock apk and odex, copied new, rebooted, reconfigured Exchange account, done).

Thanks!
 

gauner1986

Senior Member
Dec 14, 2008
372
479
37
Hamburg
Yes.. You need to completely wipe Email.odex and Email.apk, place my file there and reboot. Or if it doesn't work out, better reboot twice (After deleting and after placing the file there)..
 
  • Like
Reactions: zyxeu

reidar.ostrem

Senior Member
Sep 4, 2006
653
45
Sandnes
Hey guys,

just thought i'd share this with you. For those who don't like corporate control. :)
This Email.apk should pretend to the exchange server that device administrator is active, while not really enabling it.
While configuring your Exchange account there will be a message that device administration will be enabled.. If you press OK you would normally be shown the permissions needed by the device admin and be prompted to confirm them. This screen won't be shown anymore. You can also check "Settings/Location & Security Settings/Select device administrators", which will show an empty list now.

Have fun.

After reboot my exchange accounts disappeared, anyone else experienced this?

Sent from my GT-I9100 using XDA Premium App
 

gauner1986

Senior Member
Dec 14, 2008
372
479
37
Hamburg
You may need to reconfigure your email accounts.. If you delete the apk in /system/app and reboot afterwards Android would possibly wipe the userdata for this app.. Not my fault ;)
 
  • Like
Reactions: zyxeu

nickporwal

Senior Member
May 6, 2010
1,678
330
Thank you so much much for this awesome MOD. Its working flawlessly on VR2.3. Please keep this mod alive further. Its very useful.
 

Croak

Senior Member
Oct 9, 2007
1,629
271
Mulberry
gauner, 71H65261ES3858037 added to the beer fund. Worth it to me to not have to enter in a PIN (0000) when waking, let alone being free from the control of underpaid, overworked, uncaring IT admins. :)
 

millinnium

Senior Member
Jun 8, 2010
54
16
Melbourne
Hey guys,

just thought i'd share this with you. For those who don't like corporate control. :)
This Email.apk should pretend to the exchange server that device administrator is active, while not really enabling it.
While configuring your Exchange account there will be a message that device administration will be enabled.. If you press OK you would normally be shown the permissions needed by the device admin and be prompted to confirm them. This screen won't be shown anymore. You can also check "Settings/Location & Security Settings/Select device administrators", which will show an empty list now.

Have fun.
Hi, i've tested this and it works, i like to report a bug where if you download the rest of the mail by clicking on "Load more details" it will show download but even after download completes it gets stuck until you quit and enter the app again and read the mail message.
 

millinnium

Senior Member
Jun 8, 2010
54
16
Melbourne
I've tested it further and now the downloads st working ok, but compose our reply erl force close the email app. Using stock kf4 from voda

Sent from my GT-I9100T using XDA App
 

starbuck123

Senior Member
Nov 17, 2007
75
4
Did anyone get this to work on Snakes KG3 rom? It doesn't seem to be working for me. I pushed it using root explorer and when I restart my phone and setup the account again, it's still asking me to put in a pin or password.
 

zidane

Senior Member
Oct 18, 2007
861
35
this is excellent!
i hope you will be able to make a universal one that would work flawlessly on all ROMs.

thanks for this
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Hey guys,

    just thought i'd share this with you. For those who don't like corporate control. :)
    This Email.apk should pretend to the exchange server that device administrator is active, while not really enabling it.
    While configuring your Exchange account there will be a message that device administration will be enabled.. If you press OK you would normally be shown the permissions needed by the device admin and be prompted to confirm them. This screen won't be shown anymore. You can also check "Settings/Location & Security Settings/Select device administrators", which will show an empty list now.

    Have fun.

    EDIT: KH3 version added

    EDIT2: For all those curious guys in here.. ;) The patch is that easy actually.. I'm too lazy to make a diff so..

    The file that needs to be changed is com/android/email/SecurityPolicy.smali:

    You need to find this method signature and change the first boolean constant:

    .method public isActive(Lcom/android/email/SecurityPolicy$PolicySet;)Z
    .locals 12
    .parameter "policies"

    .prologue
    const/4 v7, 0x0 <- just change this value to 0x1

    That's it.
    5
    There you go @ KH3 version. And no. It uses my own method ;)
    3
    Added a KG6 version of this. :)
    2
    You can grab the KI3 version here from latest 2.3.5 VR.

    Here: http://min.us/lcfdo3IJyvjub

    Please try and test it, I've changed the code as shown from 1st post, not a CWM flash zip, copy and paste into system/app using root explorer or similar and change permissions to:

    uEImt.png


    And as you can see does not appear in admin, so appears it works :D

    oxWn2.png


    Enjoy :cool:
    1
    You need to place it manually in /system/app after removing the existing Email.apk AND Email.odex. I have to look into making a CWM-package.. Until then you'd have to place it there manually using a mobile terminal app or ADB.