Fix RCM for MacOS
This commit is contained in:
parent
aff6044cdb
commit
6b6bf8320f
3 changed files with 3 additions and 19 deletions
|
@ -94,7 +94,7 @@ public class RcmController implements Initializable {
|
||||||
payloadFPathLbl5.setText(recentRcm5);
|
payloadFPathLbl5.setText(recentRcm5);
|
||||||
}
|
}
|
||||||
|
|
||||||
injectPldBtn.setDisable(false); // TODO: write logic ?? Like in case PAYLOADER exist, button active. If not: not active?
|
// TODO: write logic ?? Like in case PAYLOADER exist, button active. If not: not active?
|
||||||
injectPldBtn.setOnAction(actionEvent -> smash());
|
injectPldBtn.setOnAction(actionEvent -> smash());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,23 +269,7 @@ public class RcmTask extends Task<Boolean> {
|
||||||
* MacOS version of RcmSmash class
|
* MacOS version of RcmSmash class
|
||||||
* */
|
* */
|
||||||
boolean smashMacOS(){
|
boolean smashMacOS(){
|
||||||
|
int result;
|
||||||
// Release interface
|
|
||||||
int result = LibUsb.releaseInterface(handler, 1);
|
|
||||||
if (result != LibUsb.SUCCESS) {
|
|
||||||
logPrinter.print("Release interface failed" +
|
|
||||||
"\n Returned: " + result, EMsgType.FAIL);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
logPrinter.print("Release interface 1.", EMsgType.PASS);
|
|
||||||
// Claim interface
|
|
||||||
result = LibUsb.claimInterface(handler, 0);
|
|
||||||
if (result != LibUsb.SUCCESS) {
|
|
||||||
logPrinter.print("Claim interface 0." +
|
|
||||||
"\n Returned: "+UsbErrorCodes.getErrCode(result), EMsgType.FAIL);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
logPrinter.print("Claim interface", EMsgType.PASS);
|
|
||||||
|
|
||||||
ByteBuffer writeBuffer = ByteBuffer.allocateDirect(28672); //writeBuffer.order() equals BIG_ENDIAN; 28672
|
ByteBuffer writeBuffer = ByteBuffer.allocateDirect(28672); //writeBuffer.order() equals BIG_ENDIAN; 28672
|
||||||
result = LibUsb.controlTransfer(handler, (byte) 0x82, LibUsb.REQUEST_GET_STATUS, (short) 0, (short) 0, writeBuffer, 1000);
|
result = LibUsb.controlTransfer(handler, (byte) 0x82, LibUsb.REQUEST_GET_STATUS, (short) 0, (short) 0, writeBuffer, 1000);
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
<Pane VBox.vgrow="ALWAYS" />
|
<Pane VBox.vgrow="ALWAYS" />
|
||||||
<HBox alignment="CENTER">
|
<HBox alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<Button fx:id="injectPldBtn" contentDisplay="TOP" disable="true" mnemonicParsing="false" styleClass="buttonUp" text="%btn_InjectPayloader">
|
<Button fx:id="injectPldBtn" contentDisplay="TOP" mnemonicParsing="false" styleClass="buttonUp" text="%btn_InjectPayloader">
|
||||||
<graphic>
|
<graphic>
|
||||||
<SVGPath content="M 1 1 L 1 13.5 L 21 13.5 L 21 1 L 1 1 z M 26.226562 1.0683594 L 22 5.2949219 L 26.226562 9.5214844 L 27.226562 8.5214844 L 24.697266 6 L 31.158203 6 L 31.158203 20 L 32.566406 20 L 32.566406 4.5917969 L 24.697266 4.5917969 L 27.226562 2.0683594 L 26.226562 1.0683594 z M 2.515625 2.25 L 12.984375 2.25 C 12.993075 2.25 13 2.256995 13 2.265625 L 13 3.984375 C 12.999995 3.993026 12.993031 4 12.984375 4 L 2.515625 4 C 2.5069687 4 2.5 3.993031 2.5 3.984375 L 2.5 2.265625 C 2.5 2.256925 2.50697 2.25 2.515625 2.25 z M 2.515625 5.25 L 17.962891 5.25 C 17.971591 5.25 17.978516 5.256995 17.978516 5.265625 L 17.978516 6.984375 C 17.978516 6.993075 17.971521 7 17.962891 7 L 2.515625 7 C 2.5069687 6.99999 2.5 6.993031 2.5 6.984375 L 2.5 5.265625 C 2.5 5.256925 2.50697 5.25 2.515625 5.25 z M 2.515625 8.25 L 15.421875 8.25 C 15.430575 8.25 15.4375 8.256995 15.4375 8.265625 L 15.4375 9.984375 C 15.4375 9.993075 15.430505 10 15.421875 10 L 2.515625 10 C 2.5069687 9.99999 2.5 9.993031 2.5 9.984375 L 2.5 8.265625 C 2.5 8.256969 2.5069687 8.25 2.515625 8.25 z M 1 14.5 L 1 18 C 1 20 2 21 4 21 L 18 21 C 20 21 21 20 21 18 L 21 14.5 L 1 14.5 z M 5.8515625 16.001953 A 1.8950667 1.8950667 0 0 1 7.7480469 17.898438 A 1.8950667 1.8950667 0 0 1 5.8515625 19.792969 A 1.8950667 1.8950667 0 0 1 3.9570312 17.898438 A 1.8950667 1.8950667 0 0 1 5.8515625 16.001953 z" fill="#71e016" />
|
<SVGPath content="M 1 1 L 1 13.5 L 21 13.5 L 21 1 L 1 1 z M 26.226562 1.0683594 L 22 5.2949219 L 26.226562 9.5214844 L 27.226562 8.5214844 L 24.697266 6 L 31.158203 6 L 31.158203 20 L 32.566406 20 L 32.566406 4.5917969 L 24.697266 4.5917969 L 27.226562 2.0683594 L 26.226562 1.0683594 z M 2.515625 2.25 L 12.984375 2.25 C 12.993075 2.25 13 2.256995 13 2.265625 L 13 3.984375 C 12.999995 3.993026 12.993031 4 12.984375 4 L 2.515625 4 C 2.5069687 4 2.5 3.993031 2.5 3.984375 L 2.5 2.265625 C 2.5 2.256925 2.50697 2.25 2.515625 2.25 z M 2.515625 5.25 L 17.962891 5.25 C 17.971591 5.25 17.978516 5.256995 17.978516 5.265625 L 17.978516 6.984375 C 17.978516 6.993075 17.971521 7 17.962891 7 L 2.515625 7 C 2.5069687 6.99999 2.5 6.993031 2.5 6.984375 L 2.5 5.265625 C 2.5 5.256925 2.50697 5.25 2.515625 5.25 z M 2.515625 8.25 L 15.421875 8.25 C 15.430575 8.25 15.4375 8.256995 15.4375 8.265625 L 15.4375 9.984375 C 15.4375 9.993075 15.430505 10 15.421875 10 L 2.515625 10 C 2.5069687 9.99999 2.5 9.993031 2.5 9.984375 L 2.5 8.265625 C 2.5 8.256969 2.5069687 8.25 2.515625 8.25 z M 1 14.5 L 1 18 C 1 20 2 21 4 21 L 18 21 C 20 21 21 20 21 18 L 21 14.5 L 1 14.5 z M 5.8515625 16.001953 A 1.8950667 1.8950667 0 0 1 7.7480469 17.898438 A 1.8950667 1.8950667 0 0 1 5.8515625 19.792969 A 1.8950667 1.8950667 0 0 1 3.9570312 17.898438 A 1.8950667 1.8950667 0 0 1 5.8515625 16.001953 z" fill="#71e016" />
|
||||||
</graphic></Button>
|
</graphic></Button>
|
||||||
|
|
Loading…
Reference in a new issue