DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Educational - FROYO Bypass Exchange Server Policy

  1. n00b.
    raidzero's Avatar
    Member #
    59181
    Join Date
    Apr 2010
    Location
    Denver, CO
    Posts
    1,054
    Liked
    4 times
    Twitter
    raidzero_
    Phone
    Samsung Nexus S 4G
    DroidForums.net Developer
    DroidForums.net Theme Developer
    Premium Member
    #1

    Educational - FROYO Bypass Exchange Server Policy

    First - I take no responsibility if your phone is stolen and all your company secrets get stolen. I have edited the Email.apk to not do anything when asked to set a policy. You will need root to use this, and it only works on Froyo. This was made from the Sapphire email apk.

    How?

    I decompiled the apk with apktool. I then looked onlien and found the source code for the email app. Within that I found the securitypolicy.java file. I opened it up and compared it to the SecurityPolicy.smali file that apktool made for me.

    I found the code in smali and simply changed one "True" to "False", or 1 to 0 (line 151 in java, or 523 in smali). I then rebuilt the apk and lo and behold, no security policy.

    Note - I only did this because my exchange policy does not work on Froyo, I am fine with having a policy I just wanted email to work at all, and touchdown basically sucked.

    Thanks go to cvpcs, sniffle, and rotordroid for the tips. :-D

    I LOVE OPEN SOURCE

    JAVA excerpt:
    Code:
    127        boolean policiesFound = false;
    128
    129   int minPasswordLength = Integer.MIN_VALUE;
    130       int passwordMode = Integer.MIN_VALUE;
    131        int maxPasswordFails = Integer.MAX_VALUE;
    132        int maxScreenLockTime = Integer.MAX_VALUE;
    133       boolean requireRemoteWipe = false;
    134
    135        Cursor c = mContext.getContentResolver().query(Account.CONTENT_URI,
    136               ACCOUNT_SECURITY_PROJECTION, WHERE_ACCOUNT_SECURITY_NONZERO, null, null);
    137        try {
    138           while (c.moveToNext()) {
    139                int flags = c.getInt(ACCOUNT_SECURITY_COLUMN_FLAGS);
    140                if (flags != 0) {
    141                   PolicySet p = new PolicySet(flags);
    142                    minPasswordLength = Math.max(p.mMinPasswordLength, minPasswordLength);
    143                    passwordMode  = Math.max(p.mPasswordMode, passwordMode);
    144                    if (p.mMaxPasswordFails > 0) {
    145                        maxPasswordFails = Math.min(p.mMaxPasswordFails, maxPasswordFails);
    146                    }
    147                    if (p.mMaxScreenLockTime > 0) {
    148                        maxScreenLockTime = Math.min(p.mMaxScreenLockTime, maxScreenLockTime);
    149                    }
    150                    requireRemoteWipe |= p.mRequireRemoteWipe;
    151                    policiesFound = true; //*CHANGE TO FALSE IN SMALI
    152                }
    153            }
    SMALI excerpt:
    Code:
    520    or-int/2addr v5, v0
    521
    522    .line 151
    523    const/4 v13, 0x0 //*WAS 0x1
    524
    525    goto :goto_0
    Last edited by raidzero; 07-08-2010 at 11:21 AM.

    "Success is going from failure to failure without loss of enthusiasm" - Winston Churchill
  2. Senior Droid
    Stretch2m's Avatar
    Member #
    42129
    Join Date
    Feb 2010
    Location
    Rochester, NY
    Posts
    179
    Phone
    Motorola Droid (1)
    #2
    Works like a charm! Thank you!!
  3. Junior Droid
    ethan.r.besbris's Avatar
    Member #
    35454
    Join Date
    Feb 2010
    Posts
    9
    Phone
    Enter Current Phone Model Here
    #3
    will this reset on restart like the other fix?
  4. Junior Droid
    tahdor's Avatar
    Member #
    85766
    Join Date
    Jul 2010
    Posts
    25
    Phone
    Verizon Droid
    #4
    Can I use it for Droid ?
  5. Senior Droid
    droiddadi's Avatar
    Member #
    62057
    Join Date
    Apr 2010
    Posts
    223
    Phone
    Motorola Droid
    #5
    Does this bypasses numeric pin lock also?
  6. Droid Ninja
    aminaked's Avatar
    Member #
    25714
    Join Date
    Jan 2010
    Location
    California, USA
    Posts
    2,187
    Liked
    1 times
    Phone
    Droid
    #6
    Would you fix all of the other stock email client bugs too? ==> http://www.droidforums.net/forum/dro...tml#post725953

    I use K9.

    Oh, and you promise you're not trying to steal my password?
    Last edited by aminaked; 08-16-2010 at 05:12 PM.
  7. Droid Newbie
    The_Hellion's Avatar
    Member #
    105268
    Join Date
    Aug 2010
    Posts
    2
    Phone
    Motorola Droid
    #7
    I'm looking for some guidance on this install. My boss is trying to do it on his Motorola Droid, but after he starts the install he gets an error message regarding an invalid signature. Any idea what he's doing wrong?
  8. Droid Newbie
    awakefie's Avatar
    Member #
    23588
    Join Date
    Jan 2010
    Posts
    4
    Phone
    Motorola Droid
    #8

    Stops Working After Reboot

    This was working for me until I rebooted by phone. After the reboot it made me set up the pin again.

    I'm running a Moto Droid with Cyanogen 6 RC3

    Let me know if anyone has any ideas.
  9. Senior Droid
    Stretch2m's Avatar
    Member #
    42129
    Join Date
    Feb 2010
    Location
    Rochester, NY
    Posts
    179
    Phone
    Motorola Droid (1)
    #9
  10. Junior Droid
    WillRunForBeer's Avatar
    Member #
    3384
    Join Date
    Nov 2009
    Posts
    12
    Phone
    Enter Current Phone Here
    #10
    Improved email works for me. Is there any down side to use it?

    Also, is there a way to say, only prompt for pin if 30 minutes goes by, or will I always be prompted for pin every time I turn on device.

    What if I unclick Improved Email as a device administrator? Will the application stop working completely?
Page 1 of 2 1 2 LastLast

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. MS Exchange Server
    By GaryK in forum Droid Incredible Tech Support
    Replies: 16
    Last Post: 01-12-2011, 07:20 PM
  2. FroYo Exchange Security Policy
    By raidzero in forum Android General Discussions
    Replies: 5
    Last Post: 06-30-2010, 10:02 AM
  3. How do you access an exchange server...
    By Matth3w in forum Motorola Droid
    Replies: 0
    Last Post: 01-28-2010, 05:19 PM
  4. Anyone using droid with your exchange server
    By smallprint in forum Android General Discussions
    Replies: 14
    Last Post: 12-18-2009, 11:56 AM
  5. No More Exchange Server
    By dieselpowered in forum Android General Discussions
    Replies: 4
    Last Post: 12-10-2009, 07:05 AM

Search tags for this page

android bypass exchange security policy

,
android exchange policy bypass
,
bypass android exchange security
,

bypass exchange security android

,

bypass exchange server policy

,
bypass exchange server policy android
,

educational - froyo bypass exchange server policy

,
exchange policy changed message on android phone
,
exchange server policy android
,
froyo bypass exchange server policy
Click on a term to search our site for related topics.
Find us on Google+