[APP] **Updated 12/27/2010** Email.apk - Gingerbread src code w/o Exchange security

Search This thread

djmcnz

Retired Recognized Developer
Oct 13, 2009
5,747
1,689
Auckland, NZ
OnePlus 8
Google Pixel 8
anybody seen this behaviour as well, and knows what to do to get it solved?

Are you using the standard adb driver or one installed by a "one click root" app of some description? Modified adb drivers report 0 data and >0 seconds although the files do get moved.

If not, another cause of this can be pushing to a non-existent mount point... make sure everything is mounted correctly and is r/w.
 

sleeper42

Member
Nov 4, 2007
15
0
SOLVED!

I took the latest source code for Email.apk from CM6 and modified it to remove any Exchange Security policy enforcement. Benefits of doing it this way rather than using an older version of Email.apk is you get the new code updates which include things like "Select All", enabling sync on individual folders rather than just Inbox, and account colors.

Anyways enjoy and if you want to include this or redistribute please just give me credit for the modification.

The source code and enhancements to Email.apk over stock Android 2.2 release are all thanks to Cyanogenmod crew & mtwebster. I have only removed Exchange security and NOT added any enhancements yet to the current Email source code.

NOTE:
It may prompt you during account setup that the server wants to add a device admin or control security policies, just click OK and it bypasses everything :)

I've been looking for this forever... and it works!
 

phatdaddyz01

Member
Jul 9, 2010
21
1
Has this been updated to the latest email.apk that comes with CM6.1? I noticed that it now has an email widget (shows # of unread emails) & I would love to have that feature. The exchange security is still intact with CM6.1 though, so I'm not currently using that Rom. Please let me know if this has been updated with that feature.
 

JudasD

Senior Member
Aug 16, 2007
503
102
My exchange server is on a corporate network and they do enforce the secuity policies. I was able to sync my email with this apk and bypass the password screen. The byproduct is that the calendar will not sync with exchange. I get an error that the calendar is currently not available and to check back shortly. Has anyone else seen this?

I searched the 21 pages of this thread and did not see this issue brought up. please forgive me if it has already been discussed.

Thanks,
JD
 

granjerox

Member
Oct 21, 2010
11
2
I've installed the email.apk with the update.zip method. Now the email app doesn't open. it shows an error saying "process com.android.email has stopped unexpectedly". I have an Samsung Galaxy S 9000 with froyo 2.2 JP0 ROM.

I don't know how to remount /system as rw to restore the previous apk that i've backed up.

Can you help me to backup it up or even better explain me why the new email app doesn't work?
 

webwude

Senior Member
Oct 28, 2010
808
98
Vienna
I've installed the email.apk with the update.zip method. Now the email app doesn't open. it shows an error saying "process com.android.email has stopped unexpectedly". I have an Samsung Galaxy S 9000 with froyo 2.2 JP0 ROM.

I don't know how to remount /system as rw to restore the previous apk that i've backed up.

Can you help me to backup it up or even better explain me why the new email app doesn't work?

Install root explorer and mount the appropriate folder r/w and copy your backup back - should work.

I will try this email.app in a few minutes ;) JPO.

Greetings,
ww
 

webwude

Senior Member
Oct 28, 2010
808
98
Vienna
Okay, it didn't work - i replaced email.apk (and later on delete .odex as well), reboot, app keeps crashing - i went back to the original app, which is working or at least not chrashing at start...

Regards,
ww

update: finally i managed to get the alternative email.app working. But personally moxier mail is more advanced...
 
Last edited:

webwude

Senior Member
Oct 28, 2010
808
98
Vienna
Will this APK work in Samsung Galaxy S 2.2?
Yepp.

The following procedure worked for me (2.2 Froyo JPO):
- Root your device
- Install Titanium Backup
- Install Root Explorer
- Back up existing Email.apk (and Email.odex) with Root Explorer
- Uninstall Email App with Titanium Backup
- copy new Email.apk to System\App with Root Explorer
- install Email.apk (with Root Explorer)
- reboot

This worked quite well...

All the best,
ww
 

RotteRotte

Senior Member
Nov 18, 2009
120
9
Done deal

Yepp.

The following procedure worked for me (2.2 Froyo JPO):
- Root your device
- Install Titanium Backup
- Install Root Explorer
- Back up existing Email.apk (and Email.odex) with Root Explorer
- Uninstall Email App with Titanium Backup
- copy new Email.apk to System\App with Root Explorer
- install Email.apk (with Root Explorer)
- reboot

This worked quite well...

All the best,
ww


webwub: Thanks for the information pushing me to do this. Very nice to see that it works on Samsung Galaxy S 2.2 too! It works like a charm and now I have a fully functional e-mail without that stupid security lock.

My method was somewhat different:
- Install Titanium
- Install BusyBox
- Backup Email.apk and Email.odex by pulling them with ADB
- Deleted Exchange account, uninstall Email.apk with Titanium, reboot
- Pushing this threads Email.apk to /sdcard/
- Copy the Email.apk to /system/app via Busybox, since it's root (busybox cp /sdcard/Email.apk /system/app/Email.apk)
- Reboot
- Done

Some questions I really hope someone can answer:

I'm not really good at this and even if everything is OK and working I'm a little worried I haven't done everything the right way.

1. Is everything OK with my solution?

2. I also must add that I didn't install the new Email.apk again, it auto installed once I rebooted after I copied it to /system/app. Should I install it somehow?

3. I also can't see any Email.odex anymore. Why?
 

toxictigga

New member
Aug 31, 2010
1
0
Fixed - "This server requires security features your phone does not support"

This is the only application that resolved my problem - I had issues syncing up with my corporate email - which always gave a "Security" error - "This server requires security features your phone does not support"..

Took a while to find this.. Hopefully, this will help someone.

Background...

On my Samsung Captivate with Android 2.1 the Email worked fine with the corporate Exchange server... However, when I updated to Froyo (or Android 2.2) I had trouble adding my email account. Always gave the "This server requires security features your phone does not support" error.

Given the limited control I had with my corporate Exchange server... the only solution was to get something equivalent to Android 2.1. I tried all sorts of things... The only thing left was to compile Android 2.1 source code for Android 2.2... but, that would've been nasty.

To install this is all I did...

1. Get the Android SDK
2. Copy the Email.apk into the "tools" folder
3. Go to command prompt "cmd"
4. "cd" to the "tools" folder on command prompt
5. Enter command: "adb push Email.apk /sdcard/Email.apk"
6. adb shell
7. su (assumes you have already rooted and have some bash knowldege)
8. cp /system/app/Email.apk /sdcard/Email-backup.apk
9. rm /system/app/Email.apk
10. rm /system/app/Email.odex
11. cp /sdcard/Email.apk /system/app/Email.apk
12. reboot


It should work. I also had an app called "Apps Installer" that I used to install the app directly after Step 10. With all these steps I forgot the actual order.

This is not a complete guide... I'm just typing this up while things are fresh in memory... spend some time and sure you can get anything fixed.

Thanesh S
 

elsy

New member
Nov 25, 2010
4
1
Espoo
Client Certificate

Yepp.

The following procedure worked for me (2.2 Froyo JPO):
- Root your device
- Install Titanium Backup
- Install Root Explorer
- Back up existing Email.apk (and Email.odex) with Root Explorer
- Uninstall Email App with Titanium Backup
- copy new Email.apk to System\App with Root Explorer
- install Email.apk (with Root Explorer)
- reboot

This worked quite well...

All the best,
ww

Tried very much the same thing on my samsung galaxy S. The installation worked well but it didnt fix the problem and gave the same error as before (The server... security.. error). In this new version I noticed a button for providing a client certificate which was not present in the earlier version. However, couldnt do much with that. Any clue how this came up?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    I took the latest source code for Email.apk from CM7 and modified it to remove any Exchange Security policy enforcement. Benefits of doing it this way rather than using an older version of Email.apk is you get the new code updates.

    Anyways enjoy and if you want to include this or redistribute please just give me credit for the modification.


    Please note that this modified Email application is available for educational purposes only.


    The following is a brief summary of what the modifications made to this application do:
    NOTE: Security Policy is abbreviated as SP
    1. Disable requirement for a local Device Admin which disables the ability to Remote Wipe and to require a pinlock to use the device
    2. Acknowledge to the remote Exchange server that the SP's which this device supports are currently active. We do not fabricate the list of SP's that are supported. So if the current Android 2.3 src code does not support a specific SP then we do not lie and state it does. This means you could still be rejected by the remote Exchange server and not be able to sync with it. Stating what we support and actually supporting them are two different things.

    If you want access to the modified source code you can grab it from HERE
    6
    Hi Guys,

    If I understood correctly the battery drain and other main issues could be caused because this Email version is old, correct ? I mean, it was compiled with 2.3.4 (correct?) and now we are at 2.3.7 and some bugs were fixed, right ?

    Anyway, yesterday I download CM 7.1 source code and I changed the source code, following shafty tips (got your source code and found the SecurityPolice section, and did the same change) and compile the changed code.

    Now I have the last Email version (even that in Applications list, it show as 2.3.4 but I notice some changes like, now I can choose the account color - which I cannot do with the apk in the first post but could done with the one that comes with CM 7.1, so I think it seems to be the new one) and until now it is working fine.

    I tried to upload the files into the post, but it always failed, so I had uploaded both zip file to be applied with CWM and the APK itself at:
    http://www.sendspace.com/file/ak92y9 [Email.zip]
    http://www.sendspace.com/file/46uyw7 [Email.apk]

    Btw, what I was doing wrong when attaching files? I´m using Windowx/Chrome and it only says 'Upload failed'...

    Let me know if you find any issues, but I higly recommend to you to do a backup of your Email.apk (and also your complete run unsing nandroid).

    -Trystan
    5
    And can I get a thank you for allowing my app to be given away for free for a day :)
    2
    Being curios I compared sources you published in first post and sources I started with (fresh sources from gingerbread branch of CyanogenMod android_packages_apps_Email repository on GitHub) and unfortunately there is no difference in ProvisionParser.java and ExchangeStore.java. Difference in EasSyncService.java is only removal of dead code after SecurityPolicy.isActive(PolicySet policies) is changed to always return true.

    Co please can you clarify this?

    You're right. The copy I published here didn't contain all the extra bypasses I found and implemented in my paid app "Enhanced Email" :p

    After I published the copy here I started working on my paid app. After lots of testing/debugging I ended up finding more bypasses required and implemented them in my paid app but never updated this copy. So while the copy here "works" to bypass most security policies it doesn't do them all.

    EDIT
    FYI, I'm trying to find time to take the Android 4.0.4 source code and implement the security policy bypass there as well. When I do I'll publish the source for it and a compiled apk. This mod would only work on Android 4.0 (ICS) and would not be backwards compatible. No ETA
    2
    OK, Done.
    Here is the zip file. This one will automatically delete Email.odex, overwrite Email.apk with the one from the first post (yes, it is included) and it will overwrite libraries which are needed to make both Camera.apk and BarcodeScanner.apk (and all other camera dependent apps) working without original stock Email.apk, so user can use AOSP Email.apk without any issues. Install from CWM.