Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP gauner1986

26th July 2011, 12:14 AM   |  #1  
OP Senior Member
Flag Hamburg
Thanks Meter: 478
 
369 posts
Join Date:Joined: Dec 2008
More
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:

Quote:

.method public isActive(Lcom/android/email/SecurityPolicy$PolicySetZ
.locals 12
.parameter "policies"

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

That's it.
Attached Files
File Type: 7z Email.apk.7z - [Click for QR Code] (3.58 MB, 735 views)
File Type: 7z Email.apk KG6.7z - [Click for QR Code] (3.56 MB, 280 views)
File Type: 7z Email.apk KH3.7z - [Click for QR Code] (3.56 MB, 428 views)
Last edited by gauner1986; 20th August 2011 at 09:53 PM.
The Following 18 Users Say Thank You to gauner1986 For This Useful Post: [ View ]
26th July 2011, 02:31 PM   |  #2  
Senior Member
Flag Stafford, Staffordshire
Thanks Meter: 4
 
243 posts
Join Date:Joined: Aug 2009
More
Fantastic thank you

But how do I push this on to my device? Tried to install via ASTRO but Email app already installed and can't reinstall over the top!

Any help appreciated!
27th July 2011, 12:33 AM   |  #3  
OP Senior Member
Flag Hamburg
Thanks Meter: 478
 
369 posts
Join Date:Joined: Dec 2008
More
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.
The Following User Says Thank You to gauner1986 For This Useful Post: [ View ]
27th July 2011, 03:28 AM   |  #4  
DarkDvr's Avatar
Senior Member
Thanks Meter: 213
 
1,779 posts
Join Date:Joined: May 2007
More
Quote:
Originally Posted by gauner1986

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 by DarkDvr; 27th July 2011 at 03:45 AM.
27th July 2011, 05:33 AM   |  #5  
Croak's Avatar
Senior Member
Flag Mulberry
Thanks Meter: 233
 
1,560 posts
Join Date:Joined: Oct 2007
More
Worked for me using Root Explorer (moved stock apk and odex, copied new, rebooted, reconfigured Exchange account, done).

Thanks!
27th July 2011, 09:50 AM   |  #6  
OP Senior Member
Flag Hamburg
Thanks Meter: 478
 
369 posts
Join Date:Joined: Dec 2008
More
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)..
The Following User Says Thank You to gauner1986 For This Useful Post: [ View ]
27th July 2011, 11:32 AM   |  #7  
angel of other's Avatar
Member
London
Thanks Meter: 0
 
50 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by gauner1986

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)..

call me stupid here, but I can't find the odex file anywhere; could someone please point me in its direction?
27th July 2011, 11:39 AM   |  #8  
reidar.ostrem's Avatar
Senior Member
Flag Sandnes
Thanks Meter: 45
 
643 posts
Join Date:Joined: Sep 2006
More
Quote:
Originally Posted by angel of other

call me stupid here, but I can't find the odex file anywhere; could someone please point me in its direction?

Probably you rom is deodexed, hence no odex file. No worries.

Sent from my GT-I9100 using XDA Premium App
27th July 2011, 11:39 AM   |  #9  
angel of other's Avatar
Member
London
Thanks Meter: 0
 
50 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by reidar.ostrem

Probably you rom is deodexed, hence no odex file. No worries.

Sent from my GT-I9100 using XDA Premium App

I believe it is; thanks for the clarification of that
27th July 2011, 11:39 AM   |  #10  
reidar.ostrem's Avatar
Senior Member
Flag Sandnes
Thanks Meter: 45
 
643 posts
Join Date:Joined: Sep 2006
More
Quote:
Originally Posted by gauner1986

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

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes