[Hero CDMA Themes and Apps] tamburylar:
Hey All,

Just thought I would update with my latest info. So here is the scoop. You can disable the Exchange Password Lock and have it survive reboot/and mail checks. To do this follow these steps:

0. BACKUP

1. adb shell

2. cd /data/data/com.android.providers.settings/databases

3. sqlite3 settings.db

4. update system set value=0 where name='lockscreen.lockexchange.enable';

5. .exit

Done. This "hack" basically tricks the HTC Lock Screen program into thinking that there is no android password set so it doesn't ask for it. This method works and for the past 2 days I've not gotten any warnings about 'enable security' settings. Now for the downside:

The exchange password is still set on the system which means you cannot enable a slide unlock so basically your phone is easily accessible to anyone that wants into it.

In my previous posts I noted you can update the DevicePasswordEnabled = 0 property which will allow you to set a slide unlock but as it's been noted the exchange server eventually does a check on your Exchange Settings and notices that it's disabled and asks to enable it. I have found no way to ignore or bypass this. Below is a log of the Mail program noticing that the DevicePasswordEnabled=0:

D/EAS_SyncEngine( 7262): 06021143 processProvisionData121()
D/EAS_SyncEngine( 7262): 06021143 < downloadPolicy()
D/ProvisionFileUtil( 7262): 06021143 - writeProvisionData
D/ProvisionFileUtil( 7262): 06021143 WriteGlobalInfo:
D/ProvisionFileUtil( 7262): 06021143 [Provision] DevicePasswordEnabled=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AlphanumericDevicePasswordRequired=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] DeviceEncryptionEnabled=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireStorageCardEncryption=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] PasswordRecoveryEnabled=null
D/ProvisionFileUtil( 7262): 06021143 [Provision] AttachmentsEnabled=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] MinDevicePasswordLength=4
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxInactivityTimeDeviceLock=1800
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxDevicePasswordFailedAttempts=4
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxAttachmentSize=null
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowSimpleDevicePassword=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] DevicePasswordExpiration=null
D/ProvisionFileUtil( 7262): 06021143 [Provision] DevicePasswordHistory=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowStorageCard=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowCamera=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireDeviceEncryption=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowUnsignedApplications=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowUnsignedInstallationPackages=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] MinDevicePasswordComplexCharacters=3
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowWiFi=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowTextMessaging=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowPOPIMAPEmail=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowBluetooth=2
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowIrDA=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireManualSyncWhenRoaming=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowDesktopSync=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxCalendarAgeFilter=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowHTMLEmail=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxEmailAgeFilter=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxEmailBodyTruncationSize=-1
D/ProvisionFileUtil( 7262): 06021143 [Provision] MaxEmailHTMLBodyTruncationSize=-1
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireSignedSMIMEMessages=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireEncryptedSMIMEMessages=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireSignedSMIMEAlgorithm=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] RequireEncryptionSMIMEAlgorithm=0
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowSMIMEEncryptionAlgorithmNegotiation=2
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowSMIMESoftCerts=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowBrowser=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowConsumerEmail=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowRemoteDesktop=1
D/ProvisionFileUtil( 7262): 06021143 [Provision] AllowInternetSharing=1
D/ProvisionFileUtil( 7262): 06021143 getDeviceProvision()
D/ProvisionFileUtil( 7262): 06021143 provision DevicePasswordEnabled is not the same(0,1)

If you change any of the EAS (Exchange ActiveSync) settings they will be noticed in the same way and you will get the dreaded "Enable Security Settings" box.

I spent several hours messing around with the permission settings on the /data/data/com.htc.android.mail/app_config/ directory and all the files. The idea was to remove the write permissions to the files and perhaps it would prevent the updates. However it appears the mail app is smart enough and creates .tmp files to store the settings and you get the dialog anyway. I tried write protecting the whole directory but that just broke the mail client completely.

Hopefully someone with more expertise or skills can find a way around this. If we had the source code to the Mail app I think it would be easy to fix the problem.

If someone has any great ideas speak up, but at this point if your satisfied with no password/no slide lock then just follow the first step in the post and your good.