Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mediaexplorer74 committed Jan 7, 2023
1 parent e69b634 commit 2f71d0e
Show file tree
Hide file tree
Showing 16 changed files with 547 additions and 206 deletions.
Binary file removed Images/YQrUOujt_4x.jpg
Binary file not shown.
Binary file modified Images/shot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/shot8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 12 additions & 5 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
This tool allows you to enable and view logs for a few different aspects of Windows 10 Mobile

## Screenshots
![W10MLoggingTools Compilation Success](Images/shot1.png)
![](Images/shot1.png)
![](Images/shot2.png)
![](Images/shot3.png)
![](Images/shot4.png)
![](Images/shot5.png)
![](Images/shot6.png)
![](Images/shot7.png)
![](Images/shot8.png)

## My 2 cents
- A little WP-Logging-Tools research
- App successfully compiled... but idk registry.dll role :))))
- WP-Logging-Tools research provided
- W10MLoggingTools "generated" (with minimal changes at async-await logics...)

## Types of logging available?
- Windows Boot Logging (What drivers and files are loaded on startup)
Expand All @@ -31,11 +38,11 @@ This is currently WIP so UI and features may change before release
## References :: Credits
- [Empyreal96](https://github.com/Empyreal96) for cool WP-Logging-Tools src code :)
- [Bashar Astifan](https://github.com/basharast) with help testing
- NDTKLib creator for the NDTK library
- NDTKLib creator (Gustave Monce?) for the NDTK library
- [Fadil Fadz](https://github.com/fadilfadz01) for CMD Injector

## ..
AS IS :: No support :: RnD only :: DIY

## .
m][e :: 2023
m][e :: January, 7 2023
47 changes: 29 additions & 18 deletions src/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// App

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand All @@ -16,22 +18,20 @@
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// Logging_Enabler
namespace Logging_Enabler
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
// App class
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
// App
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}

}//App end


/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
Expand Down Expand Up @@ -65,15 +65,19 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
// rootFrame.Navigate(typeof(MainPage), e.Arguments);
// configuring the new page by passing required information as a navigation parameter

IPropertySet roamingProperties = ApplicationData.Current.RoamingSettings.Values;

Package package = Package.Current;
string systemArchitecture = package.Id.Architecture.ToString();

// First Run checks, if running on architecture other than ARM notify
// the user (Development purposes only)
if (systemArchitecture != "Arm")
{
Exceptions.CustomMessage("Detected " + systemArchitecture + " CPU, This is in test mode during development, release target is for ARM CPUs");
Exceptions.CustomMessage("Detected " + systemArchitecture
+ " CPU, This is in test mode during development, release target is for ARM CPUs");
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
else
Expand All @@ -94,7 +98,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// Ensure the current window is active
Window.Current.Activate();
}
}

}//OnLaunched end


/// <summary>
/// Invoked when Navigation to a certain page fails
Expand All @@ -104,7 +110,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}

}//OnNavigationFailed end


/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
Expand All @@ -118,6 +126,9 @@ private void OnSuspending(object sender, SuspendingEventArgs e)
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

}//OnSuspending end

}// App class end

}//Logging_Enabler namespace end
63 changes: 45 additions & 18 deletions src/FirstRunPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
// FirstRunPage

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand All @@ -25,20 +27,28 @@

// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238

// Logging_Enabler
namespace Logging_Enabler
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
// FirstRunPage
public sealed partial class FirstRunPage : Page
{
bool IsCMDPresent;

ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;

static CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();

TelnetClient client = new TelnetClient(TimeSpan.FromSeconds(3), cancellationTokenSource.Token);


string LocalPath = ApplicationData.Current.LocalFolder.Path;

private IAsyncOperation<IUICommand> dialogTask;

IPropertySet roamingProperties = ApplicationData.Current.RoamingSettings.Values;

// FirstRunPage
public FirstRunPage()
{
try
Expand All @@ -62,8 +72,12 @@ public FirstRunPage()
Exceptions.ThrowFullError(ex);
}

}//
}//FirstRunPage end

/// <summary>
/// Connect function here checks for CMD access
/// TODO: add Interop/NDTK checks
/// </summary>
private async void Connect()
{
try
Expand Down Expand Up @@ -103,24 +117,29 @@ private async void Connect()

}
progbar.IsEnabled = false;
}
string LocalPath = ApplicationData.Current.LocalFolder.Path;

private IAsyncOperation<IUICommand> dialogTask;
IPropertySet roamingProperties = ApplicationData.Current.RoamingSettings.Values;
}//Connect end


// FinishBtn_Click
private async void FinishBtn_Click(object sender, RoutedEventArgs e)
{
try
{
//await ApplicationData.Current.LocalFolder.CreateFileAsync("FirstRunComplete.txt", CreationCollisionOption.ReplaceExisting);
{
roamingProperties["FirstRunDone"] = bool.TrueString;
client.Disconnect();
var ThrownException = new MessageDialog("App will close in 10 seconds for configuration to load properly, please reopen this app to continue.");

// The following code is a workaround to a bug.
// After finishing first run checks the values in MainPage
// don't get read/load until app restarts
MessageDialog ThrownException = new MessageDialog(
"App will close in 10 seconds for configuration to load properly, " +
"please reopen this app to continue.");

ThrownException.Commands.Add(new UICommand("Close"));
try
{
dialogTask = ThrownException.ShowAsync();

}
catch (TaskCanceledException ex)
{
Expand All @@ -138,15 +157,20 @@ private async void FinishBtn_Click(object sender, RoutedEventArgs e)
{
Exceptions.ThrowFullError(ex);
}
}

}//FinishBtn_Click end


// dt_Tick
void dt_Tick(object sender, object e)
{
(sender as DispatcherTimer).Stop();
dialogTask.Cancel();
Application.Current.Exit();
}

}//dt_Tick end

// LoopCmd_Tapped
private void LoopCmd_Tapped(object sender, TappedRoutedEventArgs e)
{
DataPackage dataPackage = new DataPackage();
Expand All @@ -158,6 +182,9 @@ private void LoopCmd_Tapped(object sender, TappedRoutedEventArgs e)
dataPackage.SetText(command);
Clipboard.SetContent(dataPackage);
Exceptions.CustomMessage("'" + command + "' copied to clipboard");
}
}
}

}//LoopCmd_Tapped end

}//FirstRunPage class end

}//Logging_Enabler namespace end
2 changes: 1 addition & 1 deletion src/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
HorizontalAlignment="Stretch"
Margin="0,5,0,0" Foreground="{ThemeResource SystemAccentColor}"
></ProgressBar>
<Pivot x:Name="MainWindowPivot" Title="Windows Logging Tools">
<Pivot x:Name="MainWindowPivot" Title="Windows(10Mobile) Logging Tools">

<PivotItem Header="Home">
<Grid>
Expand Down
Loading

0 comments on commit 2f71d0e

Please sign in to comment.