(Q)make an app undecompressible - Windows Phone 7 Q&A, Help & Troubleshooting

Hi.Is there any way to make my app undecompressible or make the decompression harder?
because now anybody can easily change the .xap to .rar or .zip and extract it and read your code.

It is called code obfuscation. Google for 'windows phone obfuscation'

As a side note, making a XAP actually undecompressible would be foolish, since the phone obviously needs to decompress the XAP file in order to install the app.
Also, obfuscation just makes reverse engineering a little bit harder. Depending on the obfuscator, there may even exist automated tools to undo most if not all of the obfuscation.

Related

Editing a XAP

Is there any way to edit a xap file?
I know that you can rename to .zip and open it, and use standard C# tools to decompile, but I haven't been able to recompile it into a usable xap.
any ideas?
There is so way to just straight recompile and recompile. As you found out, you can extract the files, but you then need to use reflector to find the source and reconstruct it.
Depends on your C# skills on whether you can do that without any issues.
Sent from my 7 Pro T7576 using Board Express
Note that you can replace any installed app by installing another app that has the same GUID. This might work for what you need.
Replacing the app is nice, but I was hoping of changing app functionality while keeping most of the original stuff intact.
It was fairly easy to get the source and extract xamls/resources, reconstructing the app back into an editable proj was a bit more.. involved. I'll have to look into creating my tool for that :/

running custom executable from zip files on wp7

I am trying to run a custom executable on my schubert. I can send the file to my email as a zip and then open it. Wp7 gives a warning saying 'do you want to run the executable' I click 'yes' but nothing really happens.
can we convert a silverlight xap file which is actually a zip file into an exeutable and run it?
Also is it possible to depoly an app from within the phone?
There are efforts underway to either run native apps (EXEs) or to install apps (from XAP files) on the phone itself. Currently, I don't think either is possible. Feel free to lend a hand, though. A little searching on the forum will turn up the relevant threads, but I know that a lot of work has been discussed in the DllImport Project thread on this sub-forum.
People have been able to make native apps, but they are DLL's, not EXE's. TouchExplorer/TouchXperience/a few registry editors, File Explorers are all Native. Although there a problem with native Apps & the Multitasking Registry Hack. Once one Native app is loaded, no other will start up unless you restart.

[Q] Pull a XAP off a phone?

Is there a way to pull XAPs off of your phone? I'd like to pull a few apps with ugly icons off and edit their icons (it's fairly easy, I've done it before with stuff off of XDA).
... people keep asking this. The reasons vary but the question has been asked a lot.
The phone doesn't even store the XAP files, so no. It's like asking if you can get the "setup.exe" out of somebody's copy of a PC game.
However, the files in the XAP, and for your particular case the images in the XAP, are unpacked onto the phone's filesystem in \Applications\Install\<APP_GUID>\Install\. You can use an app like WP7 Root Tools to access them. I can't promise it'll work with marketplace apps (the binaries, at least, are signed and the signatures are checked every time the app is loaded) but it's quite possible there are no hash checks on content files.
Advanced Config allows you to change the icons for any app. If it's a free app there is a program floating around here that allows you to download the xaps to your computer from the marketplace then you can use winrar or whatever zip program you want and replace the app icon.

[Q] Repacking .XAP on the phone

Hi
I have big problem with wp7 PC Softwares like 7market OR ezDeploy because it doesnt run on my pc
Now,is there any way to repack apps in the phone (like in File Explorer) ??
It's not really practical at all, no. One app can't (legitimately, without hacks or a custom ROM) access the filesystem enough read another app's install location. Rebuilding a XAP file (assuming you can access the install directory) is theoretically possible, but I'm having a hard time seeing many legitimate reasons to do so.
Thanks 4 your answer my friend
But how Private Marketplace repacking after download the app???
XAP files are just ZIP archives; they're easy to unpack, modify, and repack. As I said, you *could* re-create them from the install location (you'd have a to tweak a few things, but it woulnd't be that hard).
As for "Private Marketplace", I'm not familiar with this tool but, from your description, it sounds like it downloads the marketplace XAP from Microsoft's servers, then repackages it so it can be sideloaded. That's interesting (and potentially sketchy, but I'll assume these are only free apps) but I don't see what it has to do with repackaging XAPs on the phone.
What is your goal, here?
By the way, the "re-package a XAP on the phone" thing has come up several times before. Please use Search before posting.

xap deployment mechanism?

Hello everyone,
I'm new to wp7 and wince. I want to know what happened when I deploy a xap to my wp7 phone. Because my phone has not been unlocked, I could not see files on the phone. How about the XML files in the xap? Where do they go? If there are any registry values that will be changed? Thanks.
Roughly speaking, the process goes like this (I might have the order wrong in a few steps, this is based on observation not reverse engineering):
First, the phone verifies that installing unsigned apps is allowed and that you haven't hit the app limit.
Second, it unpacks the WMAppManifext.xml file from the XAP and p****s it.
Third, it checks whether the app's capabilities are allowed (in particular, if you aren't interop-unlocked, ID_CAP_INTEROPSERVICES will be prohibited).
Fourth, it copies the XAP into a temp folder (under \Application Data\<something>\GUID, I forget exactly where).
Fifth, it registers the app in the AppMgr, a database that contains info about installed apps and shows them in the app list.
Sixth, it creates a "chamber" (basically, a user account) specifically for the app, with permissions specified by the manifest CAPs.
Seventh, it creates a folder at \Applications\Install\{GUID} and one at \Applications\Data\{GUID} where GUID is the app's ProductId.
Eighth, it unpacks the XAP into that Install\{GUID} folder.
Ninth, it adds policies to the PolicyEngine (security system) that allows the app to read its install folder, read/write its data folder, and to be launched into its chamber.
Tenth, it deletes the temp folder where the app was unpacked.
The registry should not be affected during this process. Files in the XAP are unpacked onto the filesystem mostly unmodified.
GoodDayToDie said:
Roughly speaking, the process goes like this (I might have the order wrong in a few steps, this is based on observation not reverse engineering):
First, the phone verifies that installing unsigned apps is allowed and that you haven't hit the app limit.
Second, it unpacks the WMAppManifext.xml file from the XAP and p****s it.
Third, it checks whether the app's capabilities are allowed (in particular, if you aren't interop-unlocked, ID_CAP_INTEROPSERVICES will be prohibited).
Fourth, it copies the XAP into a temp folder (under \Application Data\<something>\GUID, I forget exactly where).
Fifth, it registers the app in the AppMgr, a database that contains info about installed apps and shows them in the app list.
Sixth, it creates a "chamber" (basically, a user account) specifically for the app, with permissions specified by the manifest CAPs.
Seventh, it creates a folder at \Applications\Install\{GUID} and one at \Applications\Data\{GUID} where GUID is the app's ProductId.
Eighth, it unpacks the XAP into that Install\{GUID} folder.
Ninth, it adds policies to the PolicyEngine (security system) that allows the app to read its install folder, read/write its data folder, and to be launched into its chamber.
Tenth, it deletes the temp folder where the app was unpacked.
The registry should not be affected during this process. Files in the XAP are unpacked onto the filesystem mostly unmodified.
Click to expand...
Click to collapse
Thank u for ur excellent reply! I am trying to find ways to interop unlock my nokia phone. Thanks a lot!
Good luck! I've been looking for interop-unlocks for months now (sometimes in Nokia, sometimes in other OEMs like my HTC, sometimes in the OS itself) but more people is always better. Sometimes a new perspective is all it takes.

Categories

Resources