The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone Modding > File Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 11-05-2009, 05:54 PM
Green Apple
 
Join Date: Jul 2008
Device + Firmware: 32GB White iPhone 3Gs+ 3.1.2 + Jailbroken
Operating System: OS X
Posts: 88
Thanks: 7
Thanked 56 Times in 46 Posts
Two Exchange Accounts (ActiveSync)

I do not know if this is limited to any number of Exchange ActiveSync push accounts but I currently have two working side-by-side. Here is how:

Setup one Exchange account on your phone.

SSH into your phone and edit /private/var/mobile/Library/Preferences/com.apple.accountsettings.plist

Look for the section that covers your current Exchange account, copy it and paste it below the current entry. Edit the value of ASAccountEmailAddress and Identifier. Save the file.

Go to Settings and under mail accounts you will see one with the value you assigned to ASAAccountEmailAddress, edit this account and change the server, username, and password to your second Exchange server.

Here is a copy of my files will only the email addresses and server names changed.

Code:
{
    Accounts =     (
                {
            Class = DeviceLocalAccount;
            "Enabled Dataclasses" =             (
                "com.apple.Dataclass.Bookmarks",
                "com.apple.Dataclass.Notes"
            );
            Identifier = DeviceLocalAccount;
            "Short Type String" = "On My iPod touch";
            Type = OnMyDevice;
            "Type String" = "On My iPod touch";
        },
                {
            AccountPath = "/var/mobile/Library/Mail/Mailboxes";
            Class = LocalAccount;
            DraftsMailboxName = Drafts;
            Identifier = "A49ABBBD-04BB-4AF8-B95C-C351A63F1D8F";
            SentMessagesMailboxName = "Sent Messages";
            "Short Type String" = Local;
            "Sync Identifier" = LocalAccountId;
            TrashMailboxName = "Deleted Messages";
            Type = Mail;
            "Type String" = Local;
        },
                {
            ASAccountEmailAddress = "username@server1.com";
            ASAccountHost = "server1.com";
            ASAccountMailNumberOfPastDaysToSync = 0;
            ASAccountUseSSL = 1;
            ASAccountUsername = "username@server1.com";
            ASLastKnownProtocolVersion = "12.1";
            Class = ASAccount;
            DAAccountPersistentUUID = "BE5EC6C9-B1C0-4B21-8E03-6F4885748682";
            DAAccountVersion = 2;
            DisplayName = "server1.com";
            "Enabled Dataclasses" =             (
                "com.apple.Dataclass.Calendars",
                "com.apple.Dataclass.Contacts",
                "com.apple.Dataclass.Mail",
                "com.apple.Dataclass.ContactsSearch"
            );
            Identifier = "30FD82D3-411D-40FF-A609-A70D4A85252E";
            "Short Type String" = Exchange;
            "Sync Identifier" = "30FD82D3-411D-40FF-A609-A70D4A85252E";
            Type = Exchange;
            "Type String" = "Exchange ActiveSync";
            kASAccountVersionKey = 7;
        },
                {
            ASAccountEmailAddress = "username@server2.com";
            ASAccountEmailAddresses = "username@server2.com";
            ASAccountHost = "server2.com";
            ASAccountMailNumberOfPastDaysToSync = 0;
            ASAccountUseSSL = 1;
            ASAccountUsername = "username@server2.com";
            ASLastKnownProtocolVersion = "12.1";
            Class = ASAccount;
            DAAccountPersistentUUID = "BE5EC6C9-B1C0-4B21-8E03-6F4885748682";
            DAAccountVersion = 2;
            DisplayName = server2.com;
            "Enabled Dataclasses" =             (
                "com.apple.Dataclass.Calendars",
                "com.apple.Dataclass.Contacts",
                "com.apple.Dataclass.Mail",
                "com.apple.Dataclass.ContactsSearch"
            );
            Identifier = "31C7D34D-2CFD-41FF-8A46-2819D2DE47A1";
            "Short Type String" = Exchange;
            "Sync Identifier" = "31C7D34D-2CFD-41FF-8A46-2819D2DE47A1";
            Type = Exchange;
            "Type String" = "Exchange ActiveSync";
            kASAccountVersionKey = 7;
        }
    );
    Version = 4;
}
I should state that I haven't used this long enough to comment on battery life.

Click the image to open in full size.

Last edited by drivesoslow; 11-12-2009 at 06:38 AM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following 7 Users Say Thank You to drivesoslow For This Useful Post:
DCBnG (11-19-2009), feinhorn (11-13-2009), lolento (11-06-2009), longstrider (11-16-2009), pwandz (11-17-2009), Spamdumpster (11-12-2009), twon (11-17-2009)
  #2  
Old 11-05-2009, 06:29 PM
What's Jailbreak?
 
Join Date: Sep 2007
Posts: 22
Thanks: 0
Thanked 1 Time in 1 Post

Brilliant!! Nice work. I've been waiting for someone to figure this out for ages. Thanks!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3  
Old 11-05-2009, 06:58 PM
Green Apple
 
Join Date: Jul 2008
Device + Firmware: 32GB White iPhone 3Gs+ 3.1.2 + Jailbroken
Operating System: OS X
Posts: 88
Thanks: 7
Thanked 56 Times in 46 Posts

DAAccountPersistentUUID may need to be altered also on the second account
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4  
Old 11-05-2009, 07:06 PM
What's Jailbreak?
 
Join Date: Aug 2008
Device + Firmware: iPhone 3g
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts

You are a genius!!! I just did it and this works like a charm!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5  
Old 11-06-2009, 09:29 AM
Green Apple
 
Join Date: Jul 2008
Device + Firmware: 32GB White iPhone 3Gs+ 3.1.2 + Jailbroken
Operating System: OS X
Posts: 88
Thanks: 7
Thanked 56 Times in 46 Posts

I'm a day into running this mod and there does not seem to be any adverse battery effect.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #6  
Old 11-06-2009, 01:39 PM
Green Apple
 
Join Date: Aug 2008
Device + Firmware: iphone 2.0
Operating System: vista
Posts: 68
Thanks: 6
Thanked 6 Times in 6 Posts

HOLY SMOKES!!!!

I will try it but if this is working, please STICKY

Guys,

please comment if push mail, push calendar, and push contacts work on both accounts?

thanks,

Last edited by lolento; 11-06-2009 at 01:39 PM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #7  
Old 11-06-2009, 02:06 PM
Green Apple
 
Join Date: Jul 2008
Device + Firmware: 32GB White iPhone 3Gs+ 3.1.2 + Jailbroken
Operating System: OS X
Posts: 88
Thanks: 7
Thanked 56 Times in 46 Posts

I have calendar, mail, and contacts working on both accounts
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
The Following User Says Thank You to drivesoslow For This Useful Post:
lolento (11-06-2009)
  #8  
Old 11-06-2009, 03:18 PM
Green Apple
 
Join Date: Aug 2008
Device + Firmware: iphone 2.0
Operating System: vista
Posts: 68
Thanks: 6
Thanked 6 Times in 6 Posts

drivesoslow,

thanks for the feedback, I'm going to try it now...

does this method merge the calendar and contacts?
For example, if I have a work exchange account and a google exchange account does the calendar events in my work exchange account get sync into my google account? (I don't want this to happen)
Also, if I have same contacts in my work exchange account and my google account, will I see double entries? (I don't want this either)

thanks!

One more question, when you create a Calendar item on the iphone does it sync to both accounts?

Last edited by lolento; 11-06-2009 at 03:18 PM.. Reason: Automerged Doublepost
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #9  
Old 11-06-2009, 03:33 PM
What's Jailbreak?
 
Join Date: Aug 2008
Device + Firmware: iPhone 3g
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts

My battery seems to be draining a bit more than normal, but I am more than willing to keep a charger handy for this functionality!
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #10  
Old 11-06-2009, 04:06 PM
Green Apple
 
Join Date: Aug 2008
Device + Firmware: iphone 2.0
Operating System: vista
Posts: 68
Thanks: 6
Thanked 6 Times in 6 Posts

Answering my own questions...

Yes, you will have double contacts if you have same contacts on both accounts...

But calendar events are separate.

Adding calendar events can be done selectively to one account.

GOOD WORK DRIVESOSLOW! LOVING IT!

Also, you're right, DAAccountPersistentUUID need to be different on both accounts (so please correct the op).

Last edited by lolento; 11-06-2009 at 04:10 PM..
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #11  
Old 11-06-2009, 09:09 PM
Green Apple
 
Join Date: Sep 2007
Posts: 76
Thanks: 3
Thanked 2 Times in 2 Posts
Send a message via AIM to posrjak Send a message via MSN to posrjak

I have tried this serval times and it just lists the last exchange acount on my plist. Which ever one I put the information in second on the plist is list in email settings. I am using plist editor for windows on windows xp and I have 32 gig 3gs. Not sure what I am doing wrong, can any on provide advice?

<dict>
<key>ASAccountEmailAddress</key>
<string>acount1@gmail.com</string>
<key>ASAccountHost</key>
<string>m.google..com</string>
<key>ASAccountMailNumberOfPastDaysToSync</key>
<integer>0</integer>
<key>ASAccountUseSSL</key>
<true/>
<key>ASAccountUsername</key>
<string>acount1@gmail.com</string>
<key>ASLastKnownProtocolVersion</key>
<string>2.5</string>
<key>Class</key>
<string>ASAccount</string>
<key>DAAccountPersistentUUID</key>
<string>47F76882-2678-41C7-91B9-5D1AD5F76BFA</string>
<key>DAAccountVersion</key>
<integer>2</integer>
<key>DATrustSettingsExceptions</key>
<dict>
<key>b8fa0b7f 0e99494e e3210953 21fa4725 65454492</key>
<data>
YnBsaXN0MDChAdICAwQFW1NTTEhvc3RuYW1lWlNIQTFE
aWdlc3QITxAUuPoLfw6ZSU7jIQlTIfpHJWVFRJIICg8b
JicAAAAAAAABAQAAAAAAAAAGAAAAAAAAAAAAAAAAAAAA
Pg==
</data>
</dict>
<key>DisplayName</key>
<string>Gmail</string>
<key>Enabled Dataclasses</key>
<array>
<string>com.apple.Dataclass.Calendars</string>
<string>com.apple.Dataclass.Contacts</string>
<string>com.apple.Dataclass.Mail</string>
<string>com.apple.Dataclass.ContactsSearch</string>
</array>
<key>Identifier</key>
<string>F4EBDF4A-8C1E-486E-89A8-766C1C5D8170</string>
<key>Short Type String</key>
<string>Exchange</string>
<key>Sync Identifier</key>
<string>F4EBDF4A-8C1E-486E-89A8-766C1C5D8170</string>
<key>Type</key>
<string>Exchange</string>
<key>Type String</key>
<string>Exchange ActiveSync</string>
<key>kASAccountVersionKey</key>
<integer>7</integer>
</dict>
<dict>
<key>ASAccountEmailAddress</key>
<string>acount2@workemail.com</string>
<key>ASAccountHost</key>
<string>acount2.workemail.com</string>
<key>ASAccountMailNumberOfPastDaysToSync</key>
<integer>0</integer>
<key>ASAccountUseSSL</key>
<true/>
<key>ASAccountUsername</key>
<string>acount2</string>
<key>ASLastKnownProtocolVersion</key>
<string>2.5</string>
<key>Class</key>
<string>ASAccount</string>
<key>DAAccountPersistentUUID</key>
<string>47F76882-2678-41C7-91B9-5D1AD5F76BFF</string>
<key>DAAccountVersion</key>
<integer>2</integer>
<key>DATrustSettingsExceptions</key>
<dict>
<key>b8fa0b7f 0e99494e e3210953 21fa4725 65454492</key>
<data>
YnBsaXN0MDChAdICAwQFW1NTTEhvc3RuYW1lWlNIQTFE
aWdlc3QITxAUuPoLfw6ZSU7jIQlTIfpHJWVFRJIICg8b
JicAAAAAAAABAQAAAAAAAAAGAAAAAAAAAAAAAAAAAAAA
Pg==
</data>
</dict>
<key>DisplayName</key>
<string>acount2</string>
<key>Enabled Dataclasses</key>
<array>
<string>com.apple.Dataclass.Calendars</string>
<string>com.apple.Dataclass.Contacts</string>
<string>com.apple.Dataclass.Mail</string>
<string>com.apple.Dataclass.ContactsSearch</string>
</array>
<key>Identifier</key>
<string>F4EBDF4A-8C1E-486E-89A8-766C1C5D8170</string>
<key>Short Type String</key>
<string>Exchange</string>
<key>Sync Identifier</key>
<string>F4EBDF4A-8C1E-486E-89A8-766C1C5D8170</string>
<key>Type</key>
<string>Exchange</string>
<key>Type String</key>
<string>Exchange ActiveSync</string>
<key>kASAccountVersionKey</key>
<integer>7</integer>
</dict>
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #12  
Old 11-06-2009, 09:44 PM
Green Apple
 
Join Date: Jul 2008
Device + Firmware: 32GB White iPhone 3Gs+ 3.1.2 + Jailbroken
Operating System: OS X
Posts: 88
Thanks: 7
Thanked 56 Times in 46 Posts

Did you change:

Quote:
<key>Identifier</key>
<string>F4EBDF4A-8C1E-486E-89A8-766C1C5D8170</string>
on one of the two accounts, they cannot match?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #13  
Old 11-06-2009, 10:16 PM
Green Apple
 
Join Date: Sep 2007
Posts: 76
Thanks: 3
Thanked 2 Times in 2 Posts
Send a message via AIM to posrjak Send a message via MSN to posrjak

I chanced it by one letter, not really sure what to change.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #14  
Old 11-07-2009, 11:01 AM
Green Apple
 
Join Date: Jul 2008
Device + Firmware: 32GB White iPhone 3Gs+ 3.1.2 + Jailbroken
Operating System: OS X
Posts: 88
Thanks: 7
Thanked 56 Times in 46 Posts

All i can suggest it to convert the file to xml and try using a text editor.

Personally I ssh'd into my phone and ran
Code:
plutil -convert xml1 /private/var/mobile/Library/Preferences/com.apple.accountsettings.plist
vim /private/var/mobile/Library/Preferences/com.apple.accountsettings.plist
and edited it through VIM.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #15  
Old 11-07-2009, 04:50 PM
Green Apple
 
Join Date: Aug 2008
Device + Firmware: iphone 2.0
Operating System: vista
Posts: 68
Thanks: 6
Thanked 6 Times in 6 Posts

Quote:
Originally Posted by posrjak View Post
I chanced it by one letter, not really sure what to change.
I just used word search on my web browser....you have the same identifier on both accounts

u didn't even change one letter, check it.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > iPhone Modding > File Mods

Tags
activesync, exchange, exchange activesync, multiple exchange email

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 03:09 PM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top