Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,034 Members 47,374 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
gauner1986
Old
(Last edited by gauner1986; 20th August 2011 at 08:53 PM.)
#1  
Senior Member - OP
Thanks Meter 478
Posts: 369
Join Date: Dec 2008
Location: Hamburg
Default KH3/KG3/KG6 E-Mail APK for device-administratorless Exchange access :)

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)
The Following 18 Users Say Thank You to gauner1986 For This Useful Post: [ Click to Expand ]
 
Funkyfin2000
Old
#2  
Senior Member
Thanks Meter 4
Posts: 243
Join Date: Aug 2009
Location: Stafford, Staffordshire
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!
Samsung Galaxy S2 - | CyanogenMod 10 Jelly Bean | HTC Hero Gone but not Forgotten
 
gauner1986
Old
#3  
Senior Member - OP
Thanks Meter 478
Posts: 369
Join Date: Dec 2008
Location: 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.
The Following User Says Thank You to gauner1986 For This Useful Post: [ Click to Expand ]
 
DarkDvr
Old
(Last edited by DarkDvr; 27th July 2011 at 02:45 AM.)
#4  
DarkDvr's Avatar
Senior Member
Thanks Meter 212
Posts: 1,779
Join Date: May 2007
Quote:
Originally Posted by gauner1986 View Post
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.
 
Croak
Old
#5  
Croak's Avatar
Senior Member
Thanks Meter 228
Posts: 1,556
Join Date: Oct 2007
Location: Msida, Malta
Worked for me using Root Explorer (moved stock apk and odex, copied new, rebooted, reconfigured Exchange account, done).

Thanks!
 
gauner1986
Old
#6  
Senior Member - OP
Thanks Meter 478
Posts: 369
Join Date: Dec 2008
Location: 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)..
The Following User Says Thank You to gauner1986 For This Useful Post: [ Click to Expand ]
 
angel of other
Old
#7  
angel of other's Avatar
Member
Thanks Meter 0
Posts: 50
Join Date: Jul 2008
Location: London
Quote:
Originally Posted by gauner1986 View Post
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?
 
reidar.ostrem
Old
#8  
reidar.ostrem's Avatar
Senior Member
Thanks Meter 45
Posts: 643
Join Date: Sep 2006
Location: Sandnes
Quote:
Originally Posted by angel of other View Post
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
[PHONE] Samsung Galaxy Note III (SM-N9005)
[ROM] XXUBMJ1
[BASEBAND] MJ1
[KERNEL] 3.4.0
[PAD] Nexus 7
(Use the "Thanks" button instead of flooding the thread!)
 
angel of other
Old
#9  
angel of other's Avatar
Member
Thanks Meter 0
Posts: 50
Join Date: Jul 2008
Location: London
Quote:
Originally Posted by reidar.ostrem View Post
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
Galaxy s4 i9505 | Samsung Galaxy S2 | Motorola Milestone | HTC Dream

Stock Touchwiz 5x (I think) / i9505GPE rom (via MoDaCo switch)
 
reidar.ostrem
Old
#10  
reidar.ostrem's Avatar
Senior Member
Thanks Meter 45
Posts: 643
Join Date: Sep 2006
Location: Sandnes
Quote:
Originally Posted by gauner1986 View Post
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
[PHONE] Samsung Galaxy Note III (SM-N9005)
[ROM] XXUBMJ1
[BASEBAND] MJ1
[KERNEL] 3.4.0
[PAD] Nexus 7
(Use the "Thanks" button instead of flooding the thread!)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes