FORUMS
Remove All Ads from XDA

Removing Keyguard Password Policy due to Exchange (HTC Sense & Milestone & Froyo)

313 posts
Thanks Meter: 41
 
By klaus27, Senior Member on 31st March 2010, 02:53 PM
Post Reply Email Thread
Introduction

Hi Everybody,

when synchronizing your HTC, Motorolla or Froyo Androids with Exchange, it might be that your device needs to be locked by a password. Having to enter this password on every unlock is quite annoying. It would be great to use Androids unlock pattern instead of the cumbersome on-screen keyboard or disable the unlock password at all. To achieve this, I have written a small app.
Unlike other workarounds, this one let's you keep using your stock unlock screen.



Android 2.1 Download (HTC/Milestone)

HTC Sense:
  • Install the app
  • Choose which mode you want (password disabled, password enabled or lockpattern enabled)
  • Click Save
If you have enabled "Lockpattern":
  • Click "Set lockpattern"
  • change lockpattern
  • click "Done setting lockpattern"
  • Consider a small donation

Motorola:
Attention: You need to be rooted and you need the sqlite3 binary. If the program won't do anything, the missing sqlite3 binary is most likely the cause. The easiest way is to install another ROM with busybox and sqlite3 binary installed. Otherwise:
get it from somewhere, push it to "/sdcard", open shell with "adb shell" and:
Code:
mount -o remount,rw /dev/system/mtdblock6 /system
cp /sdcard/sqlite3 /system/xbin/sqlite3
chmod 755 /system/xbin/sqlite3
chown root.shell /system/xbin/sqlite3
Then go ahead with my app.
Need help? Have a look here
  • Choose whether to disable or enable password
  • Click Save
  • Please report if it is possible with disabled password to set a lockpattern. If not we can try to work this out together. I don't have a Motorola Droid, so I can't test. Please send me a private message.
  • Please check as well if there is a popup that your device needs security enabled or whatever.
  • Consider a small donation


Android 2.2 - Froyo (Sense & AOSP) - Android 2.3 Gingerbreas AOSP Download

Attention: Root is necessary. You need to replace the original email app with a patched one. The email apps are usually on /system/app, so you definately need root to replace it.
Because I do not want to run into any licensing issues, I have written a toolkit named "FroyoMailUnlocker" which you can use to patch your own email app. I currently support HTC Sense Froyo Mail.apk and Android AOSP (like Cyanogenmod 6 & Cyanogenmod 7) Email.apk. As I do not own a Motorolla, I have no idea if this will work there as well. This toolkit has proven to patch all stock Email apks from Froyo and Gingerbread.

Prerequesites:
You need to have Java Runtime Environment (JRE) installed. Make sure that your Java Home is part of the %PATH% variable. You can test this by issuing start -> run -> cmd -> java -version
And this version is for Windows at the moment. I can easily do one for Linux as well if there is a proper need to.

Basic usage instructions common for both brands:
  • Pull the apk you want to patch from your ROM
  • Download the "FroyoMailUnlocker" and extract it
  • Move the apk to the folder "put_apk_here"
  • Run the file "FroyoMailUnlocker.exe"
  • Push the new apk from the folder "put_apk_here" to the root of your SDcard
  • Boot your phone into recovery
  • Open a shell with "adb shell" and issue the following commands:
    Code:
    mount /system
    mount /sdcard
  • ...continue with instructions below specific for your brand

Instructions for Sense:
  • Code:
    cp /sdcard/Mail.apk /system/app/
  • reboot
  • Setup your Exchange account
  • Accept the policy, set your Pin-Code
  • Open up Settings -> Security -> Device Administrator
  • Remove device administrator
  • Accept every warning that your Exchange account will be wiped
  • Still in Security, disable screen lock
  • Enjoy your policy-free HTC Sense on Froyo
  • Consider a small donation

Instructions for AOSP:
  • Code:
    cp /sdcard/Email.apk /system/app/
  • reboot
  • Setup your Exchange account
  • Consider a small donation




Appendix

Note 1:
My solution does not require a background service which runs all the time. It sets the desired configuration persistantly and survives a policy reenforcement without having to run any more. You can safely set your configuration and uninstall the app. But you need to be rooted.


Note 3:
Please take a short rest and think about why your company has applied these restrictions over their mobile users. If you say "I don't care", then this app is probably for you. If not, stick to the password unlock.

Important Note for HTC devices:
If you don't use the lockscreen shipped by HTC, it is possible to disable password lock, but you should not reenable password lock again! The issue appears if the lockscreen is enabled again. HTCs framework will then try to configure the HTC Lockscreen and won't find it which ends up in an error. This could prevent your device from booting up. You can fix it by booting into recovery and issuiing the following commands from an "adb shell" and reboot.
Code:
mount /system
mount /data
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
update system set value='0' where name='lockscreen.lockexchange.enable';
 
 
31st March 2010, 06:46 PM |#2  
klaus27's Avatar
OP Senior Member
Thanks Meter: 41
 
More
FAQ

Hey, I changed my configuration from X to Y, but it doesn't work
Just reboot. This should fix your issue. Or if lockpattern does not work, just click on "Set lockpattern", go to security settings, set your pattern and click "Done setting lockpattern".

Hey, installation of the apk failed
Please enable USB debugging in the settings, get the Android SDK (adb tool) and execute "adb -d uninstall com.myandroid.keyguardcontroller"

I can't find your app in the market
Absolutely correct. It's not yet upped. Maybe it will in the future, when this app is tested thouroughly enough. I expect that the more technicaly interested guys come here to find a solution for their problems instead of searching the market and those are the best testers.

After pushing the unlocked file to my 2.2 rom, the Mail/Email app does not show up
  • Better use a deodexed rom or deodex the apk. Instructions can be found here: DeodexInstructions or xUltimate
  • Make sure you have cleaned the Dalvik Cache



Changelog

Android 2.2

Version 2.0 : Download
  • First framework version to let the user unlock the mail app they are using

Version 1.0 : -no link yet-
  • Initial release


Android 2.1

Version 1.4 : Download
  • Fixed issue with rules not applied on first set
  • Semi-fixed issue with "fancy" lockscreens (read note in first post)

Version 1.3 : Download
  • Second try with Milestone

Version 1.2 : Download
  • Fixed a bug with the triggers

Version 1.1 : Download
  • Added initial Motorola support (alpha stage) **Need your feedback as I don't have one**
  • Let the user choose which ROM he has
  • Corrected triggers
  • Persistent configuration
  • Improved user interface

Version 1.0 : Download



Great thanks
blegat
tamburylar
britoso
dwang
instaliro
superbimble
Attached Thumbnails
Click image for larger version

Name:	kgc1.png
Views:	1818
Size:	11.5 KB
ID:	305317   Click image for larger version

Name:	kgc2.png
Views:	1636
Size:	11.8 KB
ID:	305318   Click image for larger version

Name:	kgc3.png
Views:	1576
Size:	17.4 KB
ID:	305319  
31st March 2010, 08:08 PM |#3  
j0bro's Avatar
Senior Member
Flag Eindhoven
Thanks Meter: 97
 
More
Quote:
Originally Posted by klaus27

I have quickly put together an app which let's you decide whether lockscreen should ask for password or not, or if it should be disabled at all.
Any testers?

So where's the app?
Does it re-disable the lock screen after the policy has been re-enforced?
31st March 2010, 08:33 PM |#4  
klaus27's Avatar
OP Senior Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by j0bro

So where's the app?
Does it re-disable the lock screen after the policy has been re-enforced?

Do they reenforce the policy? Didn't noticed that so far. Wrote the app and created this thread. That's why I am asking for testers. If you want to help, send a private message
Cheers
1st April 2010, 12:49 AM |#5  
klaus27's Avatar
OP Senior Member
Thanks Meter: 41
 
More
Ok, I have a way to make this setting persistent without having to run any background service, app, script or whatever. I am now iterating the lock-pattern issue. I want to be able to use a lockpattern without having Android Mail ask you to set security policies once a day.
Not sure if this is possible, but we will see.
1st April 2010, 03:52 AM |#6  
Member
Thanks Meter: 0
 
More
is this for using the stock exchange app? using activesync?

Just curious because I cannot use the stock exchange app due to security policies set at the server level. So I wondered how this would be affected by that.
1st April 2010, 07:28 AM |#7  
klaus27's Avatar
OP Senior Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by wildtouch

is this for using the stock exchange app? using activesync?

Just curious because I cannot use the stock exchange app due to security policies set at the server level. So I wondered how this would be affected by that.

It's for the mail app of HTC Sense. They build their own UI on top of stock Android and added support for Exchange policies. With this program, we try to circumvent the Exchange password policy. So you might want to get another ROM with Sense for your mobile, or grab Moxier mail from the market.

-------------------------------------------------------------------

Current status: I am able to remove password policy, set an unlock pattern and stick with that right now. The Exchange security popup shows up, but it does not override the settings. Once again, there is no background task/script involved. To remove the security popup at all is the next task on the agenda.
1st April 2010, 09:35 PM |#8  
klaus27's Avatar
OP Senior Member
Thanks Meter: 41
 
More
Ok, app is ready and tested by two or three people.
It will now make settings persistent, regardless of policy reenforcement.
Additionally it is able to set Lockpatterns without having the policy enforcement popup every morning.

BTW: API level is 3, so it should work with Android 1.5 as well, but I have only been able to test it with Android 2.1.
2nd April 2010, 12:42 PM |#9  
Junior Member
Thanks Meter: 1
 
More
Hi,

Where I could get this app?
Is it really works on 2.1?

Thanks
2nd April 2010, 01:03 PM |#10  
klaus27's Avatar
OP Senior Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by wrzoch

Hi,

Where I could get this app?
Is it really works on 2.1?

Thanks

It is in the testing phase. Yes it works on HTC Sense 2.1 Roms. Milestone is in the testing phase. As I don't own a milestone, I can only rely on users feedback.
2nd April 2010, 01:42 PM |#11  
medicjoe's Avatar
Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by klaus27

It is in the testing phase. Yes it works on HTC Sense 2.1 Roms. Milestone is in the testing phase. As I don't own a milestone, I can only rely on users feedback.

ihave milestone..can try for you...wheres the app?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes