Patchup Update

This commit is contained in:
kawaiizenbo 2024-04-25 14:04:54 -07:00
parent 8722fe8312
commit dbcdd12520
10 changed files with 160 additions and 104 deletions

View file

@ -8,13 +8,25 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Debug|x64.ActiveCfg = Debug|x64
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Debug|x64.Build.0 = Debug|x64
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Debug|x86.ActiveCfg = Debug|x86
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Debug|x86.Build.0 = Debug|x86
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Release|Any CPU.Build.0 = Release|Any CPU
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Release|x64.ActiveCfg = Release|x64
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Release|x64.Build.0 = Release|x64
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Release|x86.ActiveCfg = Release|x86
{D9BE1C6C-1FC3-427E-A9EC-E2D8246C18EB}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup>
</configuration>

View file

@ -15,6 +15,7 @@
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -25,6 +26,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -34,6 +36,46 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>appmanager.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="iMobileDevice-net, Version=1.3.0.0, Culture=neutral, PublicKeyToken=040ae19651fac98a, processorArchitecture=MSIL">
@ -99,6 +141,9 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Resource Include="appmanager.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\iMobileDevice-net.1.3.17\build\net45\iMobileDevice-net.targets" Condition="Exists('..\packages\iMobileDevice-net.1.3.17\build\net45\iMobileDevice-net.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View file

@ -7,9 +7,12 @@
mc:Ignorable="d"
Title="AppManager (No device)" Height="550" Width="450" MinHeight="550" MinWidth="450" Loaded="Event_window_Loaded">
<Grid>
<Button x:Name="installNewAppButton" Content="Install new" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="20" Width="75" IsEnabled="False" Click="Event_installNewAppButton_Click"/>
<Button x:Name="removeSelectedAppButton" Content="Remove selected" HorizontalAlignment="Left" Margin="90,10,0,0" VerticalAlignment="Top" Height="20" Width="100" IsEnabled="False" Click="Event_removeSelectedAppButton_Click"/>
<GroupBox Header="Installed Apps" Margin="10,35,10,250">
<Menu VerticalAlignment="Top" Height="24">
<MenuItem x:Name="installNewAppButton" Header="_Install new" IsEnabled="False" Click="Event_installNewAppButton_Click" Height="24"/>
<MenuItem x:Name="removeSelectedAppButton" Header="Remove selecte_d" IsEnabled="False" Click="Event_removeSelectedAppButton_Click" Height="24"/>
<MenuItem x:Name="refreshAppListButton" Header="_Refresh List" IsEnabled="False" Click="Event_refreshAppListButton_Click" Height="24"/>
</Menu>
<GroupBox Header="Installed Apps" Margin="10,29,10,245">
<Grid>
<ListView x:Name="installedAppsListView" d:ItemsSource="{d:SampleData ItemCount=5}">
<ListView.View>
@ -22,7 +25,7 @@
</ListView>
</Grid>
</GroupBox>
<GroupBox Header="Log" Margin="10,0,10,10" VerticalAlignment="Bottom" Height="235">
<GroupBox Header="Log" Margin="10,0,10,10" VerticalAlignment="Bottom" Height="230">
<Grid>
<ListBox x:Name="logListBox" d:ItemsSource="{d:SampleData ItemCount=5}" FontFamily="Lucida Console">
<ListBox.ItemTemplate>
@ -33,7 +36,5 @@
</ListBox>
</Grid>
</GroupBox>
<Button x:Name="refreshAppListButton" Content="Refresh List" HorizontalAlignment="Left" Margin="195,10,0,0" VerticalAlignment="Top" Height="20" Width="75" IsEnabled="False" Click="Event_refreshAppListButton_Click"/>
</Grid>
</Window>

View file

@ -7,6 +7,8 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Timers;
using System.Windows;
@ -27,6 +29,7 @@ namespace AppManager
private string deviceName;
private string deviceVersion;
private string deviceUDID = "";
bool madeTempFile = false;
private string ipaPath = "";
private string selectedBundleID = "";
@ -79,10 +82,7 @@ namespace AppManager
new Action(
delegate ()
{
logListBox.Items.Add("Device disconnected.");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log("Device disconnected.");
installedAppsListView.ItemsSource = null;
}
));
@ -100,14 +100,11 @@ namespace AppManager
new Action(
delegate ()
{
logListBox.Items.Add("Connecting to device...");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log("Connecting to device...");
}
));
idevice.idevice_new(out deviceHandle, udids[0]).ThrowOnError();
lockdown.lockdownd_client_new_with_handshake(deviceHandle, out lockdownHandle, "absl").ThrowOnError();
lockdown.lockdownd_client_new_with_handshake(deviceHandle, out lockdownHandle, "AppManager").ThrowOnError();
// get device info
lockdown.lockdownd_get_device_name(lockdownHandle, out deviceName).ThrowOnError();
@ -120,18 +117,18 @@ namespace AppManager
deviceUDID = udids[0];
Task.Run(new Action(GetAppsThread));
Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Normal,
new Action(
delegate ()
async delegate ()
{
installedAppsListView.ItemsSource = appList;
window.Title = $"AppManager ({deviceName}, {deviceType}, iOS {deviceVersion})";
installNewAppButton.IsEnabled = true;
removeSelectedAppButton.IsEnabled = true;
refreshAppListButton.IsEnabled = true;
await Task.Run(new Action(GetAppsThread));
installedAppsListView.ItemsSource = null;
installedAppsListView.ItemsSource = appList;
}
));
gotDeviceInfo = true;
@ -139,19 +136,14 @@ namespace AppManager
catch (Exception ex)
{
deviceUDID = "";
Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Normal,
new Action(
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(
delegate ()
{
installNewAppButton.IsEnabled = false;
removeSelectedAppButton.IsEnabled = false;
refreshAppListButton.IsEnabled = false;
window.Title = $"AppManager (No device)";
logListBox.Items.Add($"Could not connect to device: {ex.Message}");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log($"Could not connect to device: {ex.Message}");
}
));
gotDeviceInfo = false; // never should matter but just in case
@ -171,12 +163,19 @@ namespace AppManager
openIPAFile.ShowDialog();
ipaPath = openIPAFile.FileName;
string origIpaPath = openIPAFile.FileName;
string fixedIpaPath = Regex.Replace(origIpaPath, @"[^\u0000-\u007F]+", "_");
if (origIpaPath == fixedIpaPath) { ipaPath = origIpaPath; madeTempFile = false; }
else
{
Log("Filename contains invalid characters. Making duplicate");
madeTempFile = true;
Debug.WriteLine(origIpaPath);
File.Copy(origIpaPath, fixedIpaPath);
ipaPath = fixedIpaPath;
}
logListBox.Items.Add($"Attempting install of {ipaPath}");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log($"Attempting install of {ipaPath}");
Task.Run(new Action(InstallAppThread));
}
@ -184,22 +183,21 @@ namespace AppManager
{
selectedBundleID = ((DeviceApp)installedAppsListView.SelectedItem).CFBundleIdentifier;
logListBox.Items.Add($"Attempting removal of of {selectedBundleID}");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log($"Attempting removal of of {selectedBundleID}");
Task.Run(new Action(RemoveAppThread));
}
private void Event_refreshAppListButton_Click(object sender, RoutedEventArgs e)
{
Task.Run(new Action(GetAppsThread));
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(
async delegate ()
{
await Task.Run(new Action(GetAppsThread));
}
));
installedAppsListView.ItemsSource = null;
installedAppsListView.ItemsSource = appList;
logListBox.Items.Add("Refreshed.");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log("Refreshed.");
}
private void RemoveAppThread()
@ -223,19 +221,18 @@ namespace AppManager
if (line == null || line.Trim() == "") line = proc.StandardError.ReadLine();
Dispatcher.Invoke(() =>
{
logListBox.Items.Add(line);
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log(line);
});
}
Dispatcher.Invoke(() =>
{
logListBox.Items.Add($"Process ended with code {proc.ExitCode} {(proc.ExitCode == 0 ? "(Success)" : "")}");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Task.Run(new Action(GetAppsThread));
Log($"Process ended with code {proc.ExitCode} {(proc.ExitCode == 0 ? "(Success)" : "")}");
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(
async delegate ()
{
await Task.Run(new Action(GetAppsThread));
}
));
installedAppsListView.ItemsSource = null;
installedAppsListView.ItemsSource = appList;
});
@ -262,22 +259,26 @@ namespace AppManager
if (line == null || line.Trim() == "") line = proc.StandardError.ReadLine();
Dispatcher.Invoke(() =>
{
logListBox.Items.Add(line);
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Log(line);
});
}
Dispatcher.Invoke(() =>
{
logListBox.Items.Add($"Process ended with code {proc.ExitCode} {(proc.ExitCode == 0 ? "(Success)" : "")}");
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
Task.Run(new Action(GetAppsThread));
Log($"Process ended with code {proc.ExitCode} {(proc.ExitCode == 0 ? "(Success)" : "")}");
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(
async delegate ()
{
await Task.Run(new Action(GetAppsThread));
}
));
installedAppsListView.ItemsSource = null;
installedAppsListView.ItemsSource = appList;
});
if (madeTempFile)
{
File.Delete(ipaPath);
madeTempFile = false;
}
}
private void GetAppsThread()
@ -309,6 +310,14 @@ namespace AppManager
}
proc.WaitForExit();
}
public void Log(string msg)
{
logListBox.Items.Add(msg);
var border = (Border)VisualTreeHelper.GetChild(logListBox, 0);
var scrollViewer = (ScrollViewer)VisualTreeHelper.GetChild(border, 0);
scrollViewer.ScrollToBottom();
}
}
public class DeviceApp

View file

@ -8,8 +8,8 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace AppManager.Properties
{
namespace AppManager.Properties {
using System;
/// <summary>
@ -19,31 +19,26 @@ namespace AppManager.Properties
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppManager.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
@ -56,14 +51,11 @@ namespace AppManager.Properties
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

View file

@ -8,21 +8,17 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace AppManager.Properties
{
namespace AppManager.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
public static Settings Default {
get {
return defaultInstance;
}
}

BIN
AppManager/appmanager.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022 KawaiiZenbo
Copyright (c) 2022-2024 KawaiiZenbo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -3,9 +3,10 @@ GUI for ideviceinstaller for Windows
This program does NOT sideload applications used for jailbreaking devices (Phoenix, h3lix, Unc0ver, Electra)
## Requirements
iOS Device (iOS 2 through 15 should work)
iOS Device (iOS 2 through 17 should work)
AppSync (if installing unsigned/cracked apps)
Windows 7 or newer
.NET Framework 4.5 or newer
iTunes 10 or newer (NOT from Microsoft store)
iTunes 10 or newer (NOT from Microsoft store, ensure Apple Devices is not installed)
![image](https://user-images.githubusercontent.com/48113593/149044532-4c16d602-a0b8-4f0e-ab68-2a32cd451e83.png)