New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
ne0cr0n
Old
(Last edited by ne0cr0n; 1st May 2012 at 10:29 PM.)
#1  
Senior Member - OP
Thanks Meter 98
Posts: 127
Join Date: Nov 2009

 
DONATE TO ME
Default [XAP] [Source] IDswitch

Just picked up a request from the DEV IDEA POOL

Quote:
Originally Posted by danchar4 View Post
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/show....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"=your_new_id@hotmail.com
"User"=your_new_id@hotmail.com

[HKCU\Software\Microsoft\IdentityCRL\Environment\Production]
"DefaultID"=your_new_id@hotmail.com
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
Attached Files
File Type: xap IDswitch.xap - [Click for QR Code] (252.3 KB, 1152 views)
File Type: 7z IDswitch.7z - [Click for QR Code] (91.4 KB, 226 views)
The Following 4 Users Say Thank You to ne0cr0n For This Useful Post: [ Click to Expand ]
 
sensboston
Old
#2  
Recognized Developer
Thanks Meter 323
Posts: 1,252
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
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...
The Following User Says Thank You to sensboston For This Useful Post: [ Click to Expand ]
 
kevyn82
Old
#3  
Senior Member
Thanks Meter 8
Posts: 108
Join Date: Mar 2011
Location: Riva del Garda
Quote:
Originally Posted by sensboston View Post
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/show...6#post25500576
always up-to-date
 
sensboston
Old
#4  
Recognized Developer
Thanks Meter 323
Posts: 1,252
Join Date: Nov 2009
Location: Boston, MA

 
DONATE TO ME
Quote:
Originally Posted by kevyn82 View Post
Am I right?
I'm so sorry but I can't confirm - just never tested this way. I've researched that hack 'cause damn Verizon blocked and deleted my very-very old email ( @verizon.net) what I've used during 11 years, and also as my LiveID email.
 
danchar4
Old
(Last edited by danchar4; 1st May 2012 at 01:55 AM.)
#5  
Member
Thanks Meter 6
Posts: 53
Join Date: Feb 2011
Location: 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.
 
danchar4
Old
(Last edited by danchar4; 1st May 2012 at 03:59 AM.)
#6  
Member
Thanks Meter 6
Posts: 53
Join Date: Feb 2011
Location: 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)
The Following User Says Thank You to danchar4 For This Useful Post: [ Click to Expand ]
 
ne0cr0n
Old
#7  
Senior Member - OP
Thanks Meter 98
Posts: 127
Join Date: Nov 2009

 
DONATE TO ME
Quote:
Originally Posted by sensboston View Post
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.

Quote:
Originally Posted by danchar4 View Post
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
 
ne0cr0n
Old
#8  
Senior Member - OP
Thanks Meter 98
Posts: 127
Join Date: Nov 2009

 
DONATE TO ME
Quote:
Originally Posted by danchar4 View Post
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)
I uploaded the source. Should make things much easier
 
wpxbox
Old
#9  
wpxbox's Avatar
Senior Member
Thanks Meter 41
Posts: 283
Join Date: Oct 2011
Location: 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.
 
ne0cr0n
Old
#10  
Senior Member - OP
Thanks Meter 98
Posts: 127
Join Date: Nov 2009

 
DONATE TO ME
Found the bug. I used the content from to current ID textbox not the new ID textbox -.-