xap deployment mechanism? - Windows Phone 7 Q&A, Help & Troubleshooting

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.

Related

Problems with PROVXML files

I've spent the last 6 hours trying to get PROVXML files working with 1.60 ROM and I just can't... Here is what I've tried:
Created my own PROVXML files in Notepad, Notepad++ and XML Notepad, following existing examples and documentation from http://msdn2.microsoft.com/en-us/library/aa456134.aspx
Modified existing PROVXML files (e.g., 'copy' command to 'move' command for OEMDrivers\mxip_HtcApps_HTC_Ringtone.provxml) and re-touched with proper timestamp and file attributes (+s +r +h +a)
Cut up portions of Menu_Operation.XML and placed into renamed files, such as mxipupdate_package_ver.provxml and mxip_package_ver.provxml
Saved in ANSI & Unicode
Used BuildOS.exe and BuildOS+Package_Tools-2.7.exe
And no matter what I do, the file operations I'm trying to perform within the PROVXML never happen!!!
I would be greatful for any help or insight. Thanks much!
I've had issues adding new provxml files but have always been able to add operations to existing ones w/o problems. This is essentially how I split out MMS from SMS on my latest ROM. Timestamp/file attributes weren't an issue for me. Instead, my biggest issue was the fact that my ROM wasnt running the MASD provxml that was part of the ArcSoft package. I ended up working around the problem my placing the MMS account provisioning into another provxml. Interestingly, looking at these files with WinHex shows a 3 byte sequence that proceeds the non-unicode provxml files themselves. Definately not a checksum since I've been able to change the contents w/o adjusting this info and the provisioning itself still runs. In fact, deleting the sequence entirely seems to have no effect on whether the provisioning doc runs at cold boot or not. Consequently, I've always been interested in understanding the mechanism that controls what provxml files get run.
The hex bits are only found in provxml files contained with the OperatorPKG folder. Other provxml files have no special hex bits, and unfortunately, I've added those hex bits to my files and still have not had any success.
The main reason why I want to use provxml files is to replace initflashfiles.txt in every package and reduce the amount of memory used by having duplicate copies in the windows folder and the copied folder.
Any additional insight would be appreciated...
Thanks again.
_Alex_ said:
The main reason why I want to use provxml files is to replace initflashfiles.txt in every package and reduce the amount of memory used by having duplicate copies in the windows folder and the copied folder.
Any additional insight would be appreciated...
Thanks again.
Click to expand...
Click to collapse
You ever have the option to pack the soft into a CAB and install on first boot trough customizacion OEM... i know is not the same, but you gain control about the space on storage.
Cheers.

[Q] Delete integrated app.

hello xda friends!!
I've changed wp7 account with registry tweak.
But I faced with problem. Apps what downloaded by older account are can't update. these include integrated app (ex. Extra Settings (samsung-couldn't find in marketplace.))
I could update by delete old app and newly download. But can't delete integrated app. How can i solve this problem?
Please help me...
thanks!! good day~
Phone ROMs typically include some XAP files (and DRM licenses for them, more like marketplace XAPs than homebrew ones). They are stored in the \Windows folder on the phone. Using the Mango Webserver app you can view and downlod these XAPs. You could either try re-installing them (each one comes with a special provxml file that installs it) if you can process the provxml, or you can try to sideload it.
By the way, what do you mean by "integrated" apps? Do you mean the ones that came with the phone, or the ones that install into the Settings hub? If you're trying to delete apps from Settings, the easiest way is to install another app with the same GUID (downloading the XAP will let you see the GUID) that installs to the app list (will replace the copy in Settings) and then uninstall it from there.
GoodDayToDie said:
Phone ROMs typically include some XAP files (and DRM licenses for them, more like marketplace XAPs than homebrew ones). They are stored in the \Windows folder on the phone. Using the Mango Webserver app you can view and downlod these XAPs. You could either try re-installing them (each one comes with a special provxml file that installs it) if you can process the provxml, or you can try to sideload it.
By the way, what do you mean by "integrated" apps? Do you mean the ones that came with the phone, or the ones that install into the Settings hub? If you're trying to delete apps from Settings, the easiest way is to install another app with the same GUID (downloading the XAP will let you see the GUID) that installs to the app list (will replace the copy in Settings) and then uninstall it from there.
Click to expand...
Click to collapse
thnks reply. Second point is what I wanna bring mean to u(install into the settings hub)

[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.

kindle RCE plugin, hidden files.

I saw this on my device, and only found little info/threads, with almost zero content/analysis. Aparently the kindle app leaves a bunch of random files around. And since the prefix is "RCE" i am a little paranoid, since that usually means "Remote code execution" and is usually associated with exploits
Files:
CS_JIT_Animation.mp4
jit_cs_positive_preview.png
rce_plugin_strings_resource_cs_CZ.json.min
rce_plugin_strings_resource_de_DE.json.min
rce_plugin_strings_resource_en_US.json.min
rce_plugin_strings_resource_es_ES.json.min
rce_plugin_strings_resource_fr_FR.json.min
rce_plugin_strings_resource_it_IT.json.min
rce_plugin_strings_resource_ja_JP.json.min
rce_plugin_strings_resource_nl_NL.json.min
rce_plugin_strings_resource_pt_BR.json.min
rce_plugin_strings_resource_v2_TYPO_TEST.json
rce_plugin_strings_resource_zh_CN.json.min
All Attached in a zip created by the android native file manager.
Current places mentioning this
https://forums.oneplus.com/threads/unkown-files-in-download.948860/
https://talk.sonymobile.com/t5/Xper...erious-Files-in-Downloads-Folder/td-p/1353185
https://forum.xda-developers.com/xperia-xz1/help/phone-mysterious-files-download-folder-t3871763
https://www.youtube.com/watch?v=eMmx5tRm0jM (one of the files is a video, someone uploaded to youtube ...and to https://gfycat.com/generouspinkcolt
How to make those files appear for you:
Install kindle from the google app store
if you already have it installed, or want to see the files again after you deleted, Stop the app and delete all storage. (nothing will be lost, this app syncs everything and some more to the amazon servers)
perform the first Sync on kindle app
Now, insert a pen drive and open the native android File Mananger and look at the local Download folder
Files are somewhat hidden:
If you look into the download folder with any other app (I tried, blackberry file manager, oi file manager, Ghost Commander, and Termux --after enabling the storage setup)
Files probably have a weird attribute or ownership... but the native android file manager does not show anything other than creation date! And every single file operation (copy, move, compress) reset the information to "regular user, creation time set to now". So either I see them on the Native File Manager, without any information available, or I do not see the files until I destroy the information.
Android version is not important (seems to happen on several versions) and has been happening for a while (First mention seems to be Nov2018)
Anyone have any idea what this is? I know I will probably reverse eng the kindle app at some point, wast a bunch of time, and realize it is just some dumb amateur library badly implemented by amazon... or maybe not. I think at this point I am most curious as to how the app "hides" the files from most everything.

Categories

Resources