Some unnecessary fixes

This commit is contained in:
mkuba50 2018-08-10 23:55:45 +02:00
parent 7f859eb6df
commit 212b54a98e
3 changed files with 34 additions and 16 deletions

View File

@ -68,9 +68,14 @@ function uupListIds($search = null) {
);
$tmp = explode('.', $build);
$tmp[0] = str_pad($tmp[0], 10, '0', STR_PAD_LEFT);
$tmp[1] = str_pad($tmp[1], 10, '0', STR_PAD_LEFT);
$tmp = $tmp[0].$tmp[1];
if(isset($tmp[1])) {
$tmp[0] = str_pad($tmp[0], 10, '0', STR_PAD_LEFT);
$tmp[1] = str_pad($tmp[1], 10, '0', STR_PAD_LEFT);
$tmp = $tmp[0].$tmp[1];
} else {
consoleLogger($uuid.'.json appears to be broken and may be useless.');
$tmp = 0;
}
$buildAssoc[$tmp][] = $arch.$title.$uuid;
$builds[$tmp.$arch.$title.$uuid] = $temp;

View File

@ -16,7 +16,7 @@ limitations under the License.
*/
function uupApiVersion() {
return '1.15.3';
return '1.15.4';
}
function uupApiPrintBrand() {

View File

@ -21,41 +21,47 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku) {
if($ring == 'RETAIL') {
$flightEnabled = 0;
$isRetail = 1;
} else {
$flightEnabled = 1;
$isRetail = 0;
}
$attrib = array(
'App=WU',
'App=WU_OS',
'AppVer='.$build,
'AttrDataVer=38',
'AttrDataVer=45',
'BranchReadinessLevel=CB',
'CurrentBranch='.$branch,
'DeviceFamily=Windows.Desktop',
'FirmwareVersion=6.00',
'FlightContent='.$flight,
'FlightingBranchName=external',
'FlightRing='.$ring,
'FlightingBranchName=external',
'Free=32to64',
'GStatus_RS3=2',
'GStatus_RS4=2',
'InstallationType=Client',
'GStatus_RS5=2',
'InstallDate=1438196400',
'InstallLanguage=en-US',
'InstallationType=Client',
'IsDeviceRetailDemo=0',
'IsFlightingEnabled='.$flightEnabled,
'OEMModel=Microsoft',
'OEMName_Uncleaned=Microsoft',
'IsRetailOS='.$isRetail,
'OEMModel=Largehard Device Model 42069',
'OEMModelBaseBoard=Largehard Base Board',
'OEMName_Uncleaned=Largehard',
'OSArchitecture='.$arch,
'OSSkuId='.$sku,
'OSUILocale=en-US',
'OSVersion='.$build,
'PonchAllow=1',
'ProcessorIdentifier=Intel64 Family 6 Model 142 Stepping 9',
'ProcessorManufacturer=GenuineIntel',
'TelemetryLevel=1',
'UpdateManagementGroup=2',
'UpgEx_RS3=Green',
'UpgEx_RS4=Green',
'UpgEx_RS5=Green',
'WuClientVer='.$build,
);
@ -76,6 +82,10 @@ function branchFromBuild($build) {
$branch = 'rs3_release';
break;
case 17134:
$branch = 'rs4_release';
break;
default:
$branch = 'rs_prerelease';
break;
@ -120,19 +130,22 @@ function composeFetchUpdRequest($device, $encData, $arch, $flight, $ring, $build
$branch = branchFromBuild($build);
$products = array(
'Branch='.$branch,
'PN=Client.OS.rs2.'.$arch,
'PrimaryOSProduct=1',
'V='.$build,
'PN=Client.OS.rs2.'.$arch.'&Branch='.$branch.'&PrimaryOSProduct=1&V='.$build,
'PN=Windows.Appraiser.'.$arch.'&V='.$build,
'PN=Windows.AppraiserData.'.$arch.'&V='.$build,
'PN=Windows.EmergencyUpdate.'.$arch.'&V='.$build,
'PN=Windows.OOBE.'.$arch.'&V='.$build,
'PN=Windows.UpdateStackPackage.'.$arch.'&Name=Update Stack Package&V='.$build,
);
$callerAttrib = array(
'Id=UpdateOrchestrator',
'SheddingAware=1',
'Interactive=1',
'IsSeeker=1',
);
$products = implode('&', $products);
$products = implode(';', $products);
$callerAttrib = 'E:'.implode('&', $callerAttrib);
$deviceAttributes = composeDeviceAttributes(