🤬
  • Adjust ACP tutorial to point readers to release and individual cmdlet pages. (#7)

    * adjust main tutorial based on new documentation.
    
    * nit.
    
    * Point readers to release assets.
    
    * point readers to Win32 Iso version of MPT.
    
    ---------
    
    Co-authored-by: Matheus Cruz Correia de Carvalho Souza <[email protected]>
  • Loading...
  • macruzco committed with GitHub 11 months ago
    14db6c85
    1 parent a307380b
  • ■ ■ ■ ■
    docs/packaging/msix-packaging-tool.md
    skipped 4 lines
    5 5  ## Overview
    6 6  
    7 7  This page will cover everything needed to package an existing MSIX or win32 application into
    8  -Isolated Win32 App. This will be done through the [MSIX Packaging Tool](https://learn.microsoft.com/en-us/windows/msix/packaging-tool/tool-overview)
     8 +Isolated Win32 App. This will be done through the MSIX Packaging Tool (MPT). **Note** that the version of MPT that supports Win32 App Isolation is v1.2023.517.0, available in the release assets of this project. The [store version of MPT](https://learn.microsoft.com/en-us/windows/msix/packaging-tool/tool-overview) is **outdated** for the purposes of the Win32 App Isolation feature.
    9 9  
    10 10  ## Win32 -> MSIX <a name="Win32"></a>
    11 11  
    skipped 81 lines
  • ■ ■ ■ ■
    docs/profiler/Get-ProfilingResults.md
    skipped 229 lines
    230 230  
    231 231  ## RELATED LINKS
    232 232  
    233  -[ApplicationCapabilityProfiler](application-capability-profiler.md)
     233 +[Application Capability Profiler](application-capability-profiler.md)
    234 234  
    235 235  [Start-Profiling](Start-Profiling.md)
    236 236  
    skipped 3 lines
  • ■ ■ ■ ■
    docs/profiler/Merge-ProfilingResults.md
    skipped 198 lines
    199 199  
    200 200  ## RELATED LINKS
    201 201  
    202  -[ApplicationCapabilityProfiler](application-capability-profiler.md)
     202 +[Application Capability Profiler](application-capability-profiler.md)
    203 203  
    204 204  [Get-ProfilingResults](Get-ProfilingResults.md)
    205 205  
    skipped 3 lines
  • ■ ■ ■ ■ ■ ■
    docs/profiler/Start-Profiling.md
    skipped 22 lines
    23 23  
    24 24  ## DESCRIPTION
    25 25  
    26  -The Start-Profiling cmdlet is used to start access attempt profiling for an application package. The cmdlet both starts an access attempt trace logging session and instruments the application package so it’s able to log to the session.
     26 +The Start-Profiling cmdlet is used to start access attempt profiling for an application package. The cmdlet both starts an access attempt trace logging session and instruments the application package so it’s able to log to the session. **Note** that Start-Profiling requires administrator privileges and that Developer Mode be enabled.
    27 27  
    28 28  ## EXAMPLES
    29 29  
    skipped 125 lines
    155 155  
    156 156  ## RELATED LINKS
    157 157  
    158  -[ApplicationCapabilityProfiler](application-capability-profiler.md)
     158 +[Application Capability Profiler](application-capability-profiler.md)
    159 159  
    160 160  [Stop-Profiling](Stop-Profiling.md)
    161 161  
    skipped 5 lines
  • ■ ■ ■ ■ ■ ■
    docs/profiler/Stop-Profiling.md
    skipped 23 lines
    24 24  
    25 25  ## DESCRIPTION
    26 26  
    27  -The Stop-Profiling cmdlet is used to stop access attempt profiling for a specified application package. The cmdlet stops an active trace logging session started via [Start-Profiling](Start-Profiling.md), collects the resulting Event Trace Log (ETL) file and takes away access attempt trace logging instrumentation from all currently instrumented packages.
     27 +The Stop-Profiling cmdlet is used to stop access attempt profiling for a specified application package. The cmdlet stops an active trace logging session started via [Start-Profiling](Start-Profiling.md), collects the resulting Event Trace Log (ETL) file and takes away access attempt trace logging instrumentation from all currently instrumented packages. **Note** that Stop-Profiling requires administrator privileges and that Developer Mode be enabled.
    28 28  
    29 29  ## EXAMPLES
    30 30  
    skipped 125 lines
    156 156  
    157 157  ## RELATED LINKS
    158 158  
    159  -[ApplicationCapabilityProfiler](application-capability-profiler.md)
     159 +[Application Capability Profiler](application-capability-profiler.md)
    160 160  
    161 161  [Start-Profiling](Start-Profiling.md)
    162 162  
    skipped 5 lines
  • ■ ■ ■ ■ ■ ■
    docs/profiler/application-capability-profiler.md
    skipped 1 lines
    2 2  
    3 3  ## Overview
    4 4  
    5  -Packaged applications may need to access resources outside of the sandbox. Examples of such resources include user files, pictures, registry items, camera, location, and microphone, among others. [Capability declaration](https://learn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations) allows sandboxed applications to access some of those resources. Declarations are made in the sandboxed application's package manifest. See [msix-packaging-tool](https://github.com/microsoft/win32-app-isolation/blob/main/docs/packaging/msix-packaging-tool.md) for reference.
     5 +Packaged applications may need to access resources outside of the sandbox. Examples of such resources include user files, pictures, registry items, camera, location, and microphone, among others. [Capability declaration](https://learn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations) allows sandboxed applications to access some of those resources. Declarations are made in the sandboxed application's package manifest. See [msix-packaging-tool](../packaging/msix-packaging-tool.md) for reference.
    6 6  
    7 7  Application Capability Profiler is a set of tools that help identify what capabilities may need to be declared by an application package, so it's granted the resource access it needs. Furthermore, it provides useful diagnostic information on failed access attempts by the application package.
    8 8  
    skipped 15 lines
    24 24  Get-Command wpr
    25 25  ```
    26 26  
    27  -![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-get-command-wpr-output.png)
     27 +![image](images/acp-doc-get-command-wpr-output.png)
    28 28  
    29 29  #### 5. Download the Application Capability Profiler archive and extract it to a convenient path.
    30 30  
    31  -[Download ACP]().
     31 +The Application Capability Profiler archive can be downloaded from this project's release assets.
    32 32  
    33  -#### 6. Follow the instructions on [msix-packaging-tool](https://github.com/microsoft/win32-app-isolation/blob/main/docs/packaging/msix-packaging-tool.md) to package the application and install it on the target system.
     33 +#### 6. Follow the instructions on [msix-packaging-tool](../packaging/msix-packaging-tool.md) to package the application and install it on the target system.
    34 34  
    35 35  #### 7. Obtain the target application package manifest (recommended) and/or the target application package full name.
    36 36  
    37  -1. **(Recommended)** Obtain the target application package manifest. The easiest way to do this is to open it using the [MSIX packaging tool](https://github.com/microsoft/win32-app-isolation/blob/main/docs/packaging/msix-packaging-tool.md) and save a copy of the manifest to a convenient path.
     37 +1. **(Recommended)** Obtain the target application package manifest. The easiest way to do this is to open it using the [MSIX packaging tool](../packaging/msix-packaging-tool.md) and save a copy of the manifest to a convenient path.
    38 38  
    39  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-manifest-open-via-mpt.png)
    40  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-manifest-save-as.png)
    41  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-manifest-newname-save-as.png)
     39 + ![image](images/acp-doc-manifest-open-via-mpt.png)
     40 + ![image](images/acp-doc-manifest-save-as.png)
     41 + ![image](images/acp-doc-manifest-newname-save-as.png)
    42 42  
    43 43  2. Obtain the application package full name.
    44 44  
    skipped 1 lines
    46 46   Get-AppxPackage | where-object {$_.name -like '*Test-AppSilo*'}
    47 47   ```
    48 48  
    49  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-get-appxpackage-output.png)
     49 + ![image](images/acp-doc-get-appxpackage-output.png)
    50 50  
    51 51  #### 8. **(Optional)** Install the Windows Performance Analyzer.
    52 52  
    skipped 11 lines
    64 64  
    65 65  The Start-Profiling cmdlet takes the path to the target application package manifest or the full name of the application package.
    66 66  Start-Profiling will instrument the target application package for trace logging and enable a trace logging provider for access attempts made by the target application package.
    67  -Start-Profiling requires administrator privileges and that Developer Mode be enabled.
     67 +Start-Profiling requires administrator privileges and that Developer Mode be enabled. See [Start-Profiling](Start-Profiling.md) for details.
    68 68  
    69 69  ```PowerShell
    70 70  Start-Profiling -ManifestPath TestAppSilo-AppXManifest.xml
    71 71  ```
    72 72  
    73  -![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-start-profiling-output.png)
     73 +![image](images/acp-doc-start-profiling-output.png)
    74 74  
    75 75  ## Profiling step 3: run the application scenarios
    76 76  
    skipped 3 lines
    80 80  
    81 81  The Stop-Profiling cmdlet stops an access attempt trace logging session that has been started and takes away the instrumentation for any application packages that had been instrumented for trace logging.
    82 82  Stop-Profiling takes an optional trace path parameter that controls the path used for the output Event Trace Log (.etl) file. &lt;current_directory&gt;\trace.etl by default.
    83  -Stop-Profiling requires administrator privileges and that Developer Mode be enabled.
     83 +Stop-Profiling requires administrator privileges and that Developer Mode be enabled. See [Stop-Profiling](Stop-Profiling.md) for details.
    84 84  
    85 85  ```PowerShell
    86 86  Stop-Profiling
    87 87  ```
    88 88  
    89  -![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-stop-profiling-output.png)
     89 +![image](images/acp-doc-stop-profiling-output.png)
    90 90  
    91 91  ## Profiling step 5: Get-ProfilingResults
    92 92  
    skipped 2 lines
    95 95  Get-ProfilingResults takes in the path to the trace file to parse. If none is provided, Get-ProfilingResults will attempt to Stop-Profiling to obtain a trace to parse.
    96 96  Get-ProfilingResults optionally takes a path to a target application manifest. If information in the parsed trace can be attributed to the target application package manifest, the file is edited directly with the output capabilities. Otherwise, a copy of the manifest is made for each of the packages identified in the trace and their identified capabilities.
    97 97  
     98 +See [Get-ProfilingResults](Get-ProfilingResults.md) for details.
     99 +
    98 100  ```PowerShell
    99 101  Get-ProfilingResults -EtlFilePaths trace.etl -ManifestPath TestAppSilo-AppXManifest.xml
    100 102  ```
    101 103  
    102  -![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-get-profilingresults-output.png)
     104 +![image](images/acp-doc-get-profilingresults-output.png)
    103 105  
    104 106  ## Profiling step 6: repackaging
    105 107  
    106 108  1. Include the newly identified capabilities in the target application package manifest (Get-ProfilingResults will edit the manifest directly if provided).
    107  -2. Follow instructions in [msix-packaging-tool](https://github.com/microsoft/win32-app-isolation/blob/main/docs/packaging/msix-packaging-tool.md) to repackage the target application with the new capabilities, and reinstall it.
     109 +2. Follow instructions in [msix-packaging-tool](../packaging/msix-packaging-tool.md) to repackage the target application with the new capabilities, and reinstall it.
    108 110  
    109 111  ## Helper cmdlets
    110 112  
    111  -The Merge-ProfilingResults cmdlet can be used to merge the output from multiple runs of Get-ProfilingResults.
     113 +The [Merge-ProfilingResults](Merge-ProfilingResults.md) cmdlet can be used to merge the output from multiple runs of Get-ProfilingResults.
    112 114  
    113 115  ## Interpreting Get-ProfilingResults output
    114 116  
    skipped 29 lines
    144 146  1. Open trace.etl in WPA.
    145 147  2. Configure WPA Symbol paths to point to the application symbols and the Microsoft public symbol server.
    146 148  
    147  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-wpa-configure-symbols.png)
     149 + ![image](images/acp-doc-wpa-configure-symbols.png)
    148 150  
    149 151  3. Load symbols.
    150 152  4. Apply the ACP-StackTrace.wpaProfile to bring up the access attempt stack visualization.
    151 153  
    152  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-wpa-applyprofile.png)
    153  - ![image](https://github.com/microsoft/win32-app-isolation/blob/main/docs/profiler/images/acp-doc-wpa-stack-analysis.png)
     154 + ![image](images/acp-doc-wpa-applyprofile.png)
     155 + ![image](images/acp-doc-wpa-stack-analysis.png)
    154 156  
    155 157  See [Windows Performance Analyzer](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-analyzer) for details.
     158 +
     159 +## RELATED LINKS
     160 +
     161 +[Start-Profiling](Start-Profiling.md)
     162 +
     163 +[Stop-Profiling](Stop-Profiling.md)
     164 +
     165 +[Get-ProfilingResults](Get-ProfilingResults.md)
     166 +
     167 +[Merge-ProfilingResults](Merge-ProfilingResults.md)
     168 +
     169 +[msix-packaging-tool](../packaging/msix-packaging-tool.md)
     170 +
     171 +[Capability declaration](https://learn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations)
     172 +
     173 +[Windows Performance Recorder](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-recorder)
     174 +
     175 +[Windows Performance Analyzer](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-analyzer)
     176 +
     177 +[Installing PowerShell on Windows](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.3)
Please wait...
Page is in error, reload to recover