The aim of this patch is to bypass those security enforcements and allow you to set up an Exchange account without any security restrictions. This is achieved through various code modification in the AOSP Email application where security policies are checked and enforced. These modifications bypass the creation of the various security policies and forcefully makes the application think that all the security policies are enabled. For example, one part of this modification completely bypasses the Device Administrator creation and forcefully returns a true every time the code check if the account is a device administrator.

This modification is based on AOSP (or AOSP derivatives) and should work on any stock Google ROMs or AOSP-based ROMs like CyanogenMod, AOKP, ParanoidAndroid, Evervolv, SlimRoms, Carbon. There, however, is no guarantee that this will work on all ROMs or devices, especially OEM ROMs like Sense, Touchwiz, Blur, etc.

IMPORTANT:Since this modification disables the enforcement of Exchange security policies, it may be illegal and may violate your workplace/school policies. If you chose to install and use this modification, please remember that you are doing so at your own discretion. I, craigacgomez, cannot and will not be held responsible for any issues, legal, technical or otherwise, that may arise due to the use of this modification.

The latest version of this modification is based on AOSP android-4.4.2_r1 (KOT49H) and should work on Android 4.1+. However, should you encounter any issues, please use the previous version of this patch.

PLEASE READ THROUGH THIS THREAD PROPERLY, ESPECIALLY THE KNOWN ISSUES AND INSTRUCTIONS

CHANGELOG:
v6.0
1. Rebased to AOSP android-4.4.2_r1 (KOT49H)
2. Made some modifications to the bypass code to fix issues with storage encryption
3. Improved robustness of the bypass logic
4. Added backuptools script for custom ROMs like CyanogenMod, SlimRoms, etc. which will automatically restore the mod after re-flashes and/or updates to the ROM. Credit @BlackFang171

v5.0
1. Built using AOSP android-4.4_r1.1 (KTR16O)
2. Rebuilt the modification from ground up and added several bypasses to improve robustness of the modification
3. Disables remote wipe functionality
4. No longer requires modifications in the Exchange apk. All modification are in Email apk
4. Should also work on any Google stock/AOSP-based ROMs running Android 4.1.x, 4.2.x & 4.3.x (untested)

v4.0
1. Rebased to the CM-10.2 (Android 4.3) source. This release is only intended for Android 4.3.x. For prior versions of Android, flash the appropriate mod release below.

v3.1
1. Small bugfixes to "really" make sure that we fake that all security policies are active. This is basically making "really" sure that the device does not ask you to set up any security policies. It can be safely flashed over v3.0 without having to remove & re-setup the account. However, updating from any earlier version would still require you to remove and re-setup the account.

v3.0
1. Built using the latest updates from the CyanogenMod 10.1 (Android 4.2.2) source as of July 20, 2013.
2. Published source code to GitHub (link below)
3. Fixes and updates to the patch changes
4. No longer requires that the account be setup as a "Device Administrator"

v2.0
1. Built using the CyanogenMod 10.1 (Android 4.2.2) source
2. Some nice additions and fixes over the AOSP version like LED notification support, blocked attachment extensions selection and more.

INSTRUCTIONS [RECOVERY VERSION]:
1. Download the zip file named ExchangeNoPIN-xxxx
2. Remove all existing Exchange accounts and wipe data for Email/EmailGoogle & Exchange2/Exchange2Google
3. Make a nandroid backup (optional, but recommended)
4. Flash the zip using ClockworkMod Recovery, TWRP or a similar recovery
5. Wipe cache & dalvik-cache
6. Reboot and set up you Exchange account(s)

IMPORTANT:
1. For patch version 4.0 and earlier, you need to have a device with a custom recovery or a rooted device.
2. Root is not required unless you wish to apply this patch manually by replacing the files in /system/app.
3. After you flash this, make sure you DO NOT replace the Email or Exchange apks with themed versions or you will have issues.
4. If you use the ExchangeNoPIN-xxxx zip version, you may need to reflash this every time you update your ROM.
5. Before upgrading to a newer version of this patch (example v2.0 to v3.0), you need to remove all existing Exchange accounts.

CREDITS:
The base of this modification is the EmailPolicyPatch created by rustamabd. I have made these change to the AOSP source rather than smali patches to pre-compiled version and I have expanded the capabilities of the modification.

I think the link is dead again (in a different way). I tried removing the key parameter from the end of the download URL and managed to get a file but get a Status 6 in ClockworkMod when installing even after attempting to re-sign.

I think the link is dead again (in a different way). I tried removing the key parameter from the end of the download URL and managed to get a file but get a Status 6 in ClockworkMod when installing even after attempting to re-sign.

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?