Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Oct 12, 2024
1 parent 51f659c commit 113a701
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using System;
using WPinternals.HelperClasses;

namespace WPinternals
namespace WPinternals.Models.UEFIApps.BootMgr
{
internal class LumiaBootManagerPhoneInfo
{
Expand All @@ -39,7 +39,7 @@ internal class LumiaBootManagerPhoneInfo
public byte BootManagerProtocolVersionMajor;
public byte BootManagerProtocolVersionMinor;

public UInt32 TransferSize;
public uint TransferSize;
public bool MmosOverUsbSupported;

internal void Log(LogType Type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,30 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.


// Copyright (c) 2018, Rene Lergner - @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.

using WPinternals.HelperClasses;

namespace WPinternals
namespace WPinternals.Models.UEFIApps
{
internal class CommonPhoneInfo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using System;
using WPinternals.HelperClasses;

namespace WPinternals
namespace WPinternals.Models.UEFIApps.Flash
{
internal class LumiaFlashAppPhoneInfo
{
Expand All @@ -37,13 +37,13 @@ internal class LumiaFlashAppPhoneInfo
public byte FlashAppProtocolVersionMajor;
public byte FlashAppProtocolVersionMinor;

public UInt32 TransferSize;
public uint TransferSize;
public bool MmosOverUsbSupported;
public UInt32 SdCardSizeInSectors;
public UInt32 WriteBufferSize;
public UInt32 EmmcSizeInSectors;
public uint SdCardSizeInSectors;
public uint WriteBufferSize;
public uint EmmcSizeInSectors;
public string PlatformID;
public UInt16 SecureFfuSupportedProtocolMask;
public ushort SecureFfuSupportedProtocolMask;
public bool AsyncSupport;

public bool PlatformSecureBootEnabled;
Expand Down Expand Up @@ -79,14 +79,14 @@ internal void Log(LogType Type)
break;
}

LogFile.Log($"SecureBoot: {((!PlatformSecureBootEnabled || !UefiSecureBootEnabled) ? "Disabled" : "Enabled")} (Platform Secure Boot: {(PlatformSecureBootEnabled ? "Enabled" : "Disabled")}, UEFI Secure Boot: {(UefiSecureBootEnabled ? "Enabled" : "Disabled")})", Type);
LogFile.Log($"SecureBoot: {(!PlatformSecureBootEnabled || !UefiSecureBootEnabled ? "Disabled" : "Enabled")} (Platform Secure Boot: {(PlatformSecureBootEnabled ? "Enabled" : "Disabled")}, UEFI Secure Boot: {(UefiSecureBootEnabled ? "Enabled" : "Disabled")})", Type);

if ((Type == LogType.ConsoleOnly) || (Type == LogType.FileAndConsole))
if (Type == LogType.ConsoleOnly || Type == LogType.FileAndConsole)
{
LogFile.Log($"Flash app security: {(!IsBootloaderSecure ? "Disabled" : "Enabled")}", LogType.ConsoleOnly);
}

if ((Type == LogType.FileOnly) || (Type == LogType.FileAndConsole))
if (Type == LogType.FileOnly || Type == LogType.FileAndConsole)
{
LogFile.Log($"Flash app security: {(!IsBootloaderSecure ? "Disabled" : "Enabled")} (FFU security: {(SecureFfuEnabled ? "Enabled" : "Disabled")}, RDC: {(RdcPresent ? "Present" : "Not found")}, Authenticated: {(Authenticated ? "True" : "False")})", LogType.FileOnly);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,30 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.


// Copyright (c) 2018, Rene Lergner - @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.

using WPinternals.HelperClasses;

namespace WPinternals
namespace WPinternals.Models.UEFIApps.PhoneInfo
{
internal class LumiaPhoneInfoAppPhoneInfo
{
Expand Down Expand Up @@ -51,7 +72,7 @@ internal void Log(LogType Type)
LogFile.Log($"Product code: {ProductCode}", Type);
}

if (Type != LogType.ConsoleOnly && (Imei != null))
if (Type != LogType.ConsoleOnly && Imei != null)
{
LogFile.Log($"IMEI: {Imei}", LogType.FileOnly);
}
Expand Down

0 comments on commit 113a701

Please sign in to comment.