Skip to content

Commit c8667df

Browse files
committed
FIx Issues With Missing Files
1 parent d30e703 commit c8667df

File tree

7 files changed

+40
-41
lines changed

7 files changed

+40
-41
lines changed

.gitattributes

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
*.py text eol=lf
2-
*.sh text eol=lf
3-
*.exe binary
4-
*.apk binary
5-
*.so binary
6-
*.xml text eol=crlf
1+
* text eol=lf merge=theirs
2+
73
*.bat text eol=crlf
84
*.ps1 text eol=crlf
5+
6+
*.exe binary
7+
*.dll binary
8+
*.erofs binary
9+
linker64 binary
10+
*.so binary

bin/EROFS/fuse.erofs

32 Bytes
Binary file not shown.

bin/EROFS/mkfs.erofs

122 KB
Binary file not shown.

bin/arm64/makepri.exe

32 Bytes
Binary file not shown.

bin/x64/makepri.exe

-24 Bytes
Binary file not shown.

installer/Install.ps1

+9-6
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,19 @@ Function Test-CommandExist {
4949

5050
function Finish {
5151
Clear-Host
52-
Remove-Item -Force .\disk.txt
5352
Write-Output "Optimizing VHDX size..."
53+
$i = 0
5454
foreach ($Partition in "system","product","system_ext","vendor") {
55+
Remove-Item -Force "$Partition.txt" -ErrorAction SilentlyContinue
5556
Write-Output "SELECT VDISK FILE=`"$PSScriptRoot\$Partition.vhdx`"`
56-
ATTACH VDISK READONLY`
57-
COMPACT VDISK`
58-
DETACH VDISK" | Add-Content -Path "$Partition.txt" -Encoding UTF8
57+
ATTACH VDISK READONLY`
58+
COMPACT VDISK`
59+
DETACH VDISK" | Add-Content -Path "$Partition.txt" -Encoding UTF8
60+
++$i
61+
Write-Progress -Activity "Compacting VHDX : $Partition.vhdx" -PercentComplete ($i / 4 * 100)
62+
Start-Process -NoNewWindow -Wait "diskpart.exe" -Args "/s $Partition.txt" -RedirectStandardOutput NUL
63+
Remove-Item -Force "$Partition.txt"
5964
}
60-
Start-Process -NoNewWindow -Wait "diskpart.exe" -Args "/s disk.txt" -RedirectStandardOutput NUL
61-
Remove-Item -Force .\disk.txt
6265
Clear-Host
6366
Start-Process "shell:AppsFolder\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp"
6467
Start-Process "wsa://com.topjohnwu.magisk"

installer/MakePri.ps1

+23-29
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,30 @@ If (((Test-Path -Path $(Get-Content -Path .\filelist-pri.txt)) -Eq $false).Count
2222
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
2323
exit 1
2424
} Else {
25-
$AppxManifestFile = ".\AppxManifest.xml"
25+
New-Item -Path "." -Name "priinfo" -ItemType "directory" | Out-Null
2626
Copy-Item .\resources.pri -Destination ".\pri\resources.pri" | Out-Null
27-
$ProcNew = Start-Process -PassThru makepri.exe -NoNewWindow -Args "new /pr .\pri /cf .\xml\priconfig.xml /of .\resources.pri /mn $AppxManifestFile /o"
28-
$null = $ProcNew.Handle
29-
$ProcNew.WaitForExit()
30-
If ($ProcNew.ExitCode -Ne 0) {
31-
Write-Warning "Failed to merge resources from pris`r`nTrying to dump pris to priinfo...."
32-
New-Item -Path "." -Name "priinfo" -ItemType "directory"
33-
Clear-Host
34-
$PriItem = Get-Item ".\pri\*" -Include "*.pri"
35-
Write-Output "Dumping resources...."
36-
$i = 0
37-
$Processes = ForEach ($Item in $PriItem) {
38-
Start-Process -PassThru -WindowStyle Hidden makepri.exe -Args "dump /if $($Item | Resolve-Path -Relative) /o /es .\pri\resources.pri /of .\priinfo\$($Item.Name).xml /dt detailed"
39-
++$i
40-
$Completed = ($i / $PriItem.count) * 100
41-
Write-Progress -Activity "Dumping resources" -Status "Dumping $($Item.Name):" -PercentComplete $Completed
42-
}
43-
$Processes | Wait-Process
44-
Write-Progress -Activity "Dumping resources" -Status "Ready" -Completed
45-
Clear-Host
46-
Write-Output "Creating pri from dumps...."
47-
$ProcNewFromDump = Start-Process -PassThru -NoNewWindow makepri.exe -Args "new /pr .\priinfo /cf .\xml\priconfig.xml /of .\resources.pri /mn $AppxManifestFile /o"
48-
$null = $ProcNewFromDump.Handle
49-
$ProcNewFromDump.WaitForExit()
50-
Remove-Item 'priinfo' -Recurse
51-
If ($ProcNewFromDump.ExitCode -Ne 0) {
52-
Write-Error "Failed to create resources from priinfos"
53-
exit 1
54-
}
27+
Clear-Host
28+
$AppxManifestFile = ".\AppxManifest.xml"
29+
$PriItem = Get-Item ".\pri\*" -Include "*.pri"
30+
Write-Output "Dumping resources...."
31+
$i = 0
32+
$Processes = ForEach ($Item in $PriItem) {
33+
Start-Process -PassThru -WindowStyle Hidden makepri.exe -Args "dump /if $($Item | Resolve-Path -Relative) /o /es .\pri\resources.pri /of .\priinfo\$($Item.Name).xml /dt detailed"
34+
++$i
35+
$Completed = ($i / $PriItem.count) * 100
36+
Write-Progress -Activity "Dumping resources" -Status "Dumping $($Item.Name):" -PercentComplete $Completed
37+
}
38+
$Processes | Wait-Process
39+
Write-Progress -Activity "Dumping resources" -Status "Ready" -Completed
40+
Clear-Host
41+
Write-Output "Creating pri from dumps...."
42+
$ProcNewFromDump = Start-Process -PassThru -NoNewWindow makepri.exe -Args "new /pr .\priinfo /cf .\xml\priconfig.xml /of .\resources.pri /mn $AppxManifestFile /o"
43+
$null = $ProcNewFromDump.Handle
44+
$ProcNewFromDump.WaitForExit()
45+
Remove-Item 'priinfo' -Recurse
46+
If ($ProcNewFromDump.ExitCode -Ne 0) {
47+
Write-Error "Failed to create resources from priinfos"
48+
exit 1
5549
}
5650

5751
$ProjectXml = [xml](Get-Content $AppxManifestFile)

0 commit comments

Comments
 (0)