<!--
Copyright (c) 2018, Rene Lergner - wpinternals.net - @Heathcliff74xda

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->

<UserControl x:Class="WPinternals.NokiaMassStorageView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:WPinternals"
             mc:Ignorable="d" 
             d:DesignWidth="700">
    <Border BorderThickness="1" BorderBrush="#FFD4D4D4" HorizontalAlignment="Stretch" VerticalAlignment="Center" Padding="25">
        <local:FlowDocumentScrollViewerNoMouseWheel Grid.Column="1" Margin="20,0,0,0" VerticalScrollBarVisibility="Auto" >
            <FlowDocument x:Name="Document" FontFamily="Segoe UI" FontSize="12" Loaded="Document_Loaded">
                <local:Paragraph>
                    <Run Text="Nokia Lumia - Mass Storage mode" FontSize="18" FontWeight="Bold" Foreground="#FF3753A6" />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="You can now access the file-system of the phone from your PC at drive " />
                    <Run Text="{Binding Drive, Mode=OneTime}" FontWeight="Bold" />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="Warning 1: " Foreground="Red" FontWeight="Bold"/>
                    <Run Text="Be very careful with altering files. You can easily brick your phone, when you make invalid changes to the file-system of the phone." />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="Warning 2: " Foreground="Red" FontWeight="Bold"/>
                    <Run Text="If you try to access a partition and it cannot be accessed, then DO NOT FORMAT IT! Also when you are asked to format it, DON'T DO THAT!" />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="Warning 3: " Foreground="Red" FontWeight="Bold"/>
                    <Run Text="While in Mass Storage Mode the phone-battery will not charge. When battery is low, the phone will automatically reboot to Normal Mode." />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="Warning 4: " Foreground="Red" FontWeight="Bold"/>
                    <Run Text="Never format or delete the boot-partitions! Take special care with the DPP partition. Do not format or delete this partition, bacause there is no known method to recover the phone after that (except with special equipment to access eMMC directly)." />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="How to reboot back to normal mode" FontWeight="Bold" Foreground="#FF3753A6" />
                    <LineBreak />
                    <LineBreak />
                    <Run Text="When the phone is in Mass Storage mode, it also exposes a special version of the Qualcomm Emergency Download mode. That mode supports reboot-commands. But those are blocked by Mass Storage mode, so this tool is not able to reboot your phone to normal mode. But this is not a problem. To escape from Mass Storage mode you have to perform a soft-reset. Older Lumia models require you to press and hold the volume-down-button and the power-button at the same time for at least 10 seconds. New Lumia models only require to press and hold the power-button for 10 seconds. This will trigger a power-cycle and the phone will reboot. Once fully booted, the phone may show strange behavior, like complaining about mail-accounts, showing old text-messages, inability to load https-websites, etc. This is expected behavior, because the time-settings of the phone are incorrect. Just wait a few seconds for the phone to get a data-connection and have the date/time synced. After that the strange behavior will stop automatically and normal operation is resumed." />
                </local:Paragraph>
            </FlowDocument>
        </local:FlowDocumentScrollViewerNoMouseWheel>
    </Border>
</UserControl>
