allow branch switching at will, remove HWID requirement
Some checks failed
/ Build BaseBand Loader (push) Has been cancelled
Some checks failed
/ Build BaseBand Loader (push) Has been cancelled
This commit is contained in:
parent
66b9298f61
commit
a0231f978b
3 changed files with 12 additions and 10 deletions
|
@ -222,6 +222,9 @@ public class Loader implements Util {
|
||||||
.option("Set timeout: 5s", x1 -> x1.data.set("timeout", 5))
|
.option("Set timeout: 5s", x1 -> x1.data.set("timeout", 5))
|
||||||
.option("Set timeout: 10s", x1 -> x1.data.set("timeout", 10))
|
.option("Set timeout: 10s", x1 -> x1.data.set("timeout", 10))
|
||||||
.option("Back", ClientBoot::back))
|
.option("Back", ClientBoot::back))
|
||||||
|
.option("Set branch", x -> x.newScreen()
|
||||||
|
.option("release (Broadway)", x1 -> x1.back().data.set("branch", "release"))
|
||||||
|
.option("main (Iceland)", x1 -> x1.back().data.set("branch", "main")))
|
||||||
.option("Persist changes", x -> {
|
.option("Persist changes", x -> {
|
||||||
try(FileOutputStream fos = new FileOutputStream("baseband_launch.json")) {
|
try(FileOutputStream fos = new FileOutputStream("baseband_launch.json")) {
|
||||||
fos.write(JSON.writeReadable(x.data).getBytes(StandardCharsets.UTF_8));
|
fos.write(JSON.writeReadable(x.data).getBytes(StandardCharsets.UTF_8));
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class LoaderHandler {
|
||||||
sendClasses(Main.classesLoader, key, outputStream);
|
sendClasses(Main.classesLoader, key, outputStream);
|
||||||
}
|
}
|
||||||
if(response.o == UserHandler.Response.OK.ordinal()) {
|
if(response.o == UserHandler.Response.OK.ordinal()) {
|
||||||
String userBranch = response.t.getString("branch");
|
String userBranch = userData.getString("branch");
|
||||||
if(userData.getBoolean("release-only") == Boolean.TRUE) {
|
if(userData.getBoolean("release-only") == Boolean.TRUE) {
|
||||||
userBranch = "release";
|
userBranch = "release";
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,15 +36,14 @@ public class UserHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(BCrypt.verifyer().verify(remotePassword.toCharArray(), localPassword.toCharArray()).verified) {
|
if(BCrypt.verifyer().verify(remotePassword.toCharArray(), localPassword.toCharArray()).verified) {
|
||||||
if (isReset) {
|
//if (isReset) {
|
||||||
localTCN.set("hardware-id-reset", false);
|
// localTCN.set("hardware-id-reset", false);
|
||||||
localTCN.set("hardware-id", remoteHardwareID);
|
// localTCN.set("hardware-id", remoteHardwareID);
|
||||||
return new DoubleTypedObject<>(Response.RESET.ordinal(), localTCN);
|
// return new DoubleTypedObject<>(Response.RESET.ordinal(), localTCN);
|
||||||
}
|
//}
|
||||||
|
//if(!localHardwareID.equals(remoteTCN.getString("hardware-id"))) {
|
||||||
if(!localHardwareID.equals(remoteTCN.getString("hardware-id"))) {
|
// return new DoubleTypedObject<>(Response.HWID_INVALID.ordinal(), localTCN);
|
||||||
return new DoubleTypedObject<>(Response.HWID_INVALID.ordinal(), localTCN);
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
String remoteCommit = remoteTCN.getString("commit");
|
String remoteCommit = remoteTCN.getString("commit");
|
||||||
if("[dev]".equals(remoteCommit) || Main.loaderHash.equals(remoteCommit)) {
|
if("[dev]".equals(remoteCommit) || Main.loaderHash.equals(remoteCommit)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue