PS4 SDK 2.508: Difference between revisions
Jump to navigation
Jump to search
(Created page with " internal class CpUpdatePlugIn : IPlugIn { public override string Name { get { return "recover-cp"; } } publi...") |
(No difference)
|
Latest revision as of 20:37, 15 October 2018
internal class CpUpdatePlugIn : IPlugIn { public override string Name { get { return "recover-cp"; } } public override string Options { get { return "file [devkit ...]"; } } public override bool IsValidArgCount(int argc) { return argc >= 1; } public override string HelpString { get { return "Updates the firmware of the DevKit with the cpupdater.bin file specified."; } } public override bool Hidden { get { return true; } } public override bool Execute(List<string> args) { ORTMAPI tm = null; API.Instance(out tm); string path = Path.GetFullPath(args[0]); args.RemoveAt(0); bool success = false; List<ITarget> targets = TargetListHelper.TargetList(tm, args); foreach (ITarget tgt in targets) { try { using (CtrlCHandler handler = CtrlCHandler.StandardCtrlCHandler(tgt)) using (RefCountedConnection rc = new RefCountedConnection(tgt)) { ITarget23 tgt23 = (ITarget23)tgt; CpUpdateProgressHandler ph = new CpUpdateProgressHandler(tm, tgt); tgt23.UpdateCPFirmware(path); success = ph.Success || success; } } catch (COMException e) { ErrorHelper.PrintError(tm, e); } } return success; } }