[XAP] [Source] IDswitch

ne0cr0n

Senior Member
Nov 13, 2009
130
106
0
Just picked up a request from the DEV IDEA POOL

I have a very simple app request to target unlocked phones. Basically a one button switch between primary LiveID accounts based on sensboston's work: http://forum.xda-developers.com/showthread.php?t=1335240

1. Launch app
2. app asks for email address
3. user types in email address or selects email from list of last-used addresses
4. app asks "Are you sure?" with suitable warning
5. app writes selected email address to following regkeys:
Code:
[HKCU\Software\Microsoft\ActiveSync\Partners\{B2830118-7BC6-4A74-8C9A-3D8B9CEF88E0}]
"Email"[email protected]
"User"=your_new_[email protected]

[HKCU\Software\Microsoft\IdentityCRL\Environment\Production]
"DefaultID"[email protected]
6. app automatically reboots phone

Simple enough, right?
Here it is!

Because I made no test on myself please give me feedback if the registry values get applied
 

Attachments

Last edited:

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
ne0cr0n, unfortunately, "my" method has some important cons (you should list 'em) - after that change you'll be not able to upload pictures to SkyDrive, also some accounts like Twitter will be non-functional :( I've tried to find some workaround but without success...
 
  • Like
Reactions: danchar4

kevyn82

Senior Member
Mar 2, 2011
108
8
0
Riva del Garda
ne0cr0n, unfortunately, "my" method has some important cons (you should list 'em) - after that change you'll be not able to upload pictures to SkyDrive, also some accounts like Twitter will be non-functional :( I've tried to find some workaround but without success...
but you can revert it back, right?

The new LiveID could be associated to a different market zone, which you could use to buy some apps with your correct credit card infos, then revert back to your main LiveID, and regain all regular functionalities like auto uploads to skydrive, twitter integration, etc.

Am I right?
http://forum.xda-developers.com/showthread.php?p=25500576#post25500576
 

danchar4

Senior Member
Feb 27, 2011
53
9
0
Seattle
Wow dude thanks for writing the app so quickly. What is the etiquette for sharing apps? Are you supposed to share source code too? I don't want to be rude by asking you for the source ;)


I don't use twitter, but I was able to upload a photo to skydrive just fine after swapping LiveID's. Steps:

reset my phone with my own liveID
download bunch of apps from appstore
dev unlock/interop, etc
manually edit registry and change to my wife's LiveID (she has zunepass on her ID which is why I wanted to swap to hers)
reboot phone
take picture
upload to skydrive
login to skydrive app and see that picture is there on *my* skydrive account, not my wife's




So skydrive integration with picture hub/camera obviously stored my liveID and credentials somewhere other than the regkeys I edited. Most likely Twitter is the same way.

I presume the credential data is stored encrypted in some weird GUID key with no obvious pattern. Too bad there is no regmon/procmon tool like on Big windows, otherwise I could figure it out in a few seconds... Although somehow I doubt that you can use provxml to import export those keys to re-write encrypted credentials. That would be a pretty bad exploit.
 
Last edited:

danchar4

Senior Member
Feb 27, 2011
53
9
0
Seattle
So I ran IDSwitch and it gave me the error "no root access". Hmm. So I went into WP7 Root tools and switched on "trusted" for the app.

So a pre-requisite for running the app is to have WP7 root tools? I'm kinda new at this so perhaps that is an assumption of any app that is going to do interop/native stuff? In order to get it to work you have to set it to "trusted"?

Anyway the app let me type in the new liveID and rebooted the phone, but upon booting up, it appears that the old LiveID is still there in the 3 registry settings. I ran it a second time and the app remembered the address I typed in so thats cool. BUt again after rebooting, it failed to modify the registry entries.

Can you post up a debug version with some breakpoints or console spew? I could try to attach a debugger on my end (not sure I know how to do that, but I can try to figure it out)
 
Last edited:
  • Like
Reactions: ne0cr0n

ne0cr0n

Senior Member
Nov 13, 2009
130
106
0
ne0cr0n, unfortunately, "my" method has some important cons (you should list 'em) - after that change you'll be not able to upload pictures to SkyDrive, also some accounts like Twitter will be non-functional :( I've tried to find some workaround but without success...
Thanks for the info. I will add a warning and how to use message when launching the app for the first time.

Wow dude thanks for writing the app so quickly. What is the etiquette for sharing apps? Are you supposed to share source code too? I don't want to be rude by asking you for the source ;)
I will do that, but the code is kind of ugly xD
 

wpxbox

Senior Member
Oct 24, 2011
284
41
0
Kolkata
I tried it on Samsung Focus Mango updated with WP7 Root Tools. Even though it reboots but it does not change the primary id. After reboot when I open the app again, it shows the primary id as the old id and not the id to which I wanted to switch.
 

wpxbox

Senior Member
Oct 24, 2011
284
41
0
Kolkata
I guess nobody tested it or I am getting a different result. Here is what happens :

1. ID A which is primary ID in my Account with No CC.
2. I switch from ID A to ID B. ID B does not have a CC.
3. When I access Marketplace, The region used is according to ID B.
4. Next I Move to buy an App and it asks me to signin with ID A instead of ID B.
5. For free apps, I can easily download it without going to login page ever which is pretty obvious.

Today Evening I will try out to buy app by signing with ID A when it sends me to login page of ID B by first sigining out and then signing again.


Few things I noticed :

1. Facebook, Twitter, Skydrive all was working.
2. It takes a while for the OS to realize the ID is new and hence may take around a minute or more to change marketplace.
3. I downloaded a free app with the swtched id and used it without any issues.
4. I even updated a free App which was bought using the primary ID with the new ID.
5. Email ID A stopped working. It did not show any email nor it gave an error of wrong password which is pretty odd.

My Thoughts :

1. This will be useful for parents who have kids carrying a Windows Phone who do not want to give them credit card access but using this they might buy apps for kids.

2. I still need to test but this will work for IDs which are in same region. For example I have a US id to which if I want to add a CC, the country is fixed and hence I cannot use an Indian CC with it.
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
Wait... What "primary Live id" and what are you tried? New one or the old one? Have you tried:
- change LiveID to new one
- reboot handsets
- go to pictures hub and share picture to the SkyDrive ?
 

wpxbox

Senior Member
Oct 24, 2011
284
41
0
Kolkata
When I said Primary Live Id I mean the ID with which the phone was configured.

1.Phone configured with ID A
2. Change to ID B using the app, Reboot
3. Upload to Skydrive and it was stored in ID A Skydrive Account.
 

sensboston

Recognized Developer
Nov 18, 2009
2,142
797
193
Boston, MA
He-he, it's exactly what I mean by "not working". For example if you change first (original) LiveID email to the new one (as I had to do), you'll be not able to upload pictures to SkyDrive, and can't login to the Twitter account. So please do not confuse people.
 

wpxbox

Senior Member
Oct 24, 2011
284
41
0
Kolkata
He-he, it's exactly what I mean by "not working". For example if you change first (original) LiveID email to the new one (as I had to do), you'll be not able to upload pictures to SkyDrive, and can't login to the Twitter account. So please do not confuse people.
Oh Ok I understand now what you said by breaking. The new ID cannot be used for Skydrive or Facebook or Twitter etc in short, anything connected with old Live id.

Basically its not a true switcher and can only be used to buy apps with the new account connected with CC
 

kurdland

Member
Nov 29, 2007
41
1
0
Borås
Hi all
The whole idea of this app is JUST to let you assign an account that will give u the ability to buy apps from marketplace using CC, if your original ID have problem with adding CC information. So it is not to change you ID permanently. You can read my thread if u want. Anyway thanks op for making the app.
 

wpxbox

Senior Member
Oct 24, 2011
284
41
0
Kolkata
I can confirm this works. Just bought an app using a different account and it works. Editing a video on this so will be up in couple of hours.