/bootable/recovery/edify/ |
D | expr.cpp | 45 bool Evaluate(State* state, const std::unique_ptr<Expr>& expr, std::string* result) { in Evaluate() argument 50 std::unique_ptr<Value> v(expr->fn(expr->name.c_str(), state, expr->argv)); in Evaluate() 55 ErrorAbort(state, kArgsParsingFailure, "expecting string, got value type %d", v->type); in Evaluate() 63 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr) { in EvaluateValue() argument 64 return expr->fn(expr->name.c_str(), state, expr->argv); in EvaluateValue() 78 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in ConcatFn() argument 85 if (!Evaluate(state, argv[i], &str)) { in ConcatFn() 94 Value* IfElseFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in IfElseFn() argument 96 state->errmsg = "ifelse expects 2 or 3 arguments"; in IfElseFn() 101 if (!Evaluate(state, argv[0], &cond)) { in IfElseFn() [all …]
|
/bootable/recovery/updater/ |
D | install.cpp | 68 static void uiPrint(State* state, const std::string& buffer) { in uiPrint() argument 69 UpdaterInfo* ui = static_cast<UpdaterInfo*>(state->cookie); in uiPrint() 86 void uiPrintf(State* _Nonnull state, const char* _Nonnull format, ...) { in uiPrintf() argument 94 uiPrint(state, error_msg); in uiPrintf() 99 Value* UIPrintFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UIPrintFn() argument 101 if (!ReadArgs(state, argv, &args)) { in UIPrintFn() 102 return ErrorAbort(state, kArgsParsingFailure, "%s(): Failed to parse the argument(s)", name); in UIPrintFn() 106 uiPrint(state, buffer); in UIPrintFn() 114 Value* PackageExtractFileFn(const char* name, State* state, in PackageExtractFileFn() argument 117 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 or 2 args, got %zu", name, in PackageExtractFileFn() [all …]
|
D | updater.cpp | 159 State state(script, &updater_info); in main() local 163 state.is_retry = true; in main() 170 bool status = Evaluate(&state, root, &result); in main() 173 if (state.errmsg.empty()) { in main() 177 LOG(ERROR) << "script aborted: " << state.errmsg; in main() 178 const std::vector<std::string> lines = android::base::Split(state.errmsg, "\n"); in main() 183 if (sscanf(line.c_str(), "E%d: ", &state.error_code) != 1) { in main() 193 if (state.error_code == kNoError) { in main() 194 state.error_code = kScriptExecutionFailure; in main() 196 fprintf(cmd_pipe, "log error: %d\n", state.error_code); in main() [all …]
|
D | dynamic_partitions.cpp | 62 static std::vector<std::string> ReadStringArgs(const char* name, State* state, in ReadStringArgs() argument 66 ErrorAbort(state, kArgsParsingFailure, "%s expects %zu arguments, got %zu", name, in ReadStringArgs() 72 if (!ReadValueArgs(state, argv, &args)) { in ReadStringArgs() 80 ErrorAbort(state, kArgsParsingFailure, "%s argument to %s must be string", in ReadStringArgs() 93 auto state = DeviceMapper::Instance().GetState(partition_name); in UnmapPartitionOnDeviceMapper() local 94 if (state == DmDeviceState::INVALID) { in UnmapPartitionOnDeviceMapper() 97 if (state == DmDeviceState::ACTIVE) { in UnmapPartitionOnDeviceMapper() 101 << static_cast<std::underlying_type_t<DmDeviceState>>(state); in UnmapPartitionOnDeviceMapper() 106 auto state = DeviceMapper::Instance().GetState(partition_name); in MapPartitionOnDeviceMapper() local 107 if (state == DmDeviceState::INVALID) { in MapPartitionOnDeviceMapper() [all …]
|
D | blockimg.cpp | 877 static int CreateStash(State* state, size_t maxblocks, const std::string& base) { in CreateStash() argument 882 ErrorAbort(state, kStashCreationFailure, "stat \"%s\" failed: %s", dirname.c_str(), in CreateStash() 893 ErrorAbort(state, kStashCreationFailure, "mkdir \"%s\" failed: %s", dirname.c_str(), in CreateStash() 899 ErrorAbort(state, kStashCreationFailure, "chown \"%s\" failed: %s", dirname.c_str(), in CreateStash() 905 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu needed)", in CreateStash() 937 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu more needed)", in CreateStash() 1621 static Value* PerformBlockImageUpdate(const char* name, State* state, in PerformBlockImageUpdate() argument 1629 if (state->is_retry) { in PerformBlockImageUpdate() 1634 ErrorAbort(state, kArgsParsingFailure, "block_image_update expects 4 arguments, got %zu", in PerformBlockImageUpdate() 1640 if (!ReadValueArgs(state, argv, &args)) { in PerformBlockImageUpdate() [all …]
|
/bootable/recovery/edify/include/edify/ |
D | expr.h | 70 using Function = Value* (*)(const char* name, State* state, 87 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr); 92 bool Evaluate(State* state, const std::unique_ptr<Expr>& expr, std::string* result); 95 Value* Literal(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 100 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 101 Value* LogicalAndFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 102 Value* LogicalOrFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 103 Value* LogicalNotFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 104 Value* SubstringFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 105 Value* EqualityFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); [all …]
|
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/ |
D | UpdaterState.java | 66 public UpdaterState(int state) { in UpdaterState() argument 67 this.mState = new AtomicInteger(state); in UpdaterState() 94 public static String getStateText(int state) { in getStateText() argument 95 return STATE_MAP.get(state); in getStateText()
|
D | UpdateManager.java | 254 private void initializeUpdateState(int state) { in initializeUpdateState() argument 255 this.mUpdaterState = new UpdaterState(state); in initializeUpdateState() 256 getOnStateChangeCallback().ifPresent(callback -> callback.accept(state)); in initializeUpdateState() 425 int state = mUpdaterState.get(); in synchronizeUpdaterStateWithUpdateEngineStatus() local 435 switch (state) { in synchronizeUpdaterStateWithUpdateEngineStatus() 446 state, in synchronizeUpdaterStateWithUpdateEngineStatus() 467 state, in synchronizeUpdaterStateWithUpdateEngineStatus()
|
/bootable/recovery/updater_sample/src/com/example/android/systemupdatersample/ui/ |
D | MainActivity.java | 252 private void onUpdaterStateChange(int state) { in onUpdaterStateChange() argument 254 + UpdaterState.getStateText(state) in onUpdaterStateChange() 255 + "/" + state); in onUpdaterStateChange() 257 setUiUpdaterState(state); in onUpdaterStateChange() 259 if (state == UpdaterState.IDLE) { in onUpdaterStateChange() 261 } else if (state == UpdaterState.RUNNING) { in onUpdaterStateChange() 263 } else if (state == UpdaterState.PAUSED) { in onUpdaterStateChange() 265 } else if (state == UpdaterState.ERROR) { in onUpdaterStateChange() 267 } else if (state == UpdaterState.SLOT_SWITCH_REQUIRED) { in onUpdaterStateChange() 269 } else if (state == UpdaterState.REBOOT_REQUIRED) { in onUpdaterStateChange() [all …]
|
/bootable/recovery/etc/ |
D | init.rc | 139 setprop sys.usb.state ${sys.usb.config} 145 setprop sys.usb.state ${sys.usb.config} 151 setprop sys.usb.state ${sys.usb.config} 157 setprop sys.usb.state ${sys.usb.config} 166 setprop sys.usb.state ${sys.usb.config} 173 setprop sys.usb.state ${sys.usb.config} 180 setprop sys.usb.state ${sys.usb.config} 187 setprop sys.usb.state ${sys.usb.config}
|
/bootable/recovery/updater/include/updater/ |
D | install.h | 25 void uiPrintf(State* _Nonnull state, const char* _Nonnull format, ...)
|
/bootable/recovery/tests/component/ |
D | edify_test.cpp | 30 State state(expr_str, nullptr); in expect() local 33 bool status = Evaluate(&state, e, &result); in expect()
|
D | updater_test.cpp | 69 State state(expr_str, info); in expect() local 72 bool status = Evaluate(&state, e, &result); in expect() 77 ASSERT_TRUE(status) << "Evaluate() finished with error message: " << state.errmsg; in expect() 82 ASSERT_EQ(kNoError, state.error_code); in expect() 85 ASSERT_EQ(cause_code, state.cause_code); in expect() 143 static Value* BlobToString(const char* name, State* state, in BlobToString() argument 146 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 arg, got %zu", name, argv.size()); in BlobToString() 150 if (!ReadValueArgs(state, argv, &args)) { in BlobToString() 155 return ErrorAbort(state, kArgsParsingFailure, "%s() expects a BLOB argument", name); in BlobToString()
|
/bootable/recovery/install/ |
D | adb_install.cpp | 57 static bool SetUsbConfig(const std::string& state) { in SetUsbConfig() argument 58 android::base::SetProperty("sys.usb.config", state); in SetUsbConfig() 59 return android::base::WaitForProperty("sys.usb.state", state); in SetUsbConfig()
|
/bootable/recovery/updater_sample/ |
D | README.md | 70 tracking suspended state properly. 73 state - `UpdaterState`. To solve the first problem, sample app persists 78 callback. The second problem is solved by adding `PAUSED` updater state. 86 - `Updater state:` - SystemUpdaterSample app state. 139 Reset the already applied update back to an idle state. This method can 220 - [x] Add Sample app update state (separate from update_engine status)
|
/bootable/recovery/ |
D | recovery_main.cpp | 184 static bool SetUsbConfig(const std::string& state) { in SetUsbConfig() argument 185 android::base::SetProperty("sys.usb.config", state); in SetUsbConfig() 186 return android::base::WaitForProperty("sys.usb.state", state); in SetUsbConfig()
|
D | README.md | 50 `sideload` state. 102 ### `adb devices` shows the device, but in `unauthorized` state.
|
D | NOTICE | 143 5. Submission of Contributions. Unless You explicitly state otherwise,
|
/bootable/recovery/recovery_ui/include/recovery_ui/ |
D | ui.h | 230 void SetScreensaverState(ScreensaverState state);
|
/bootable/recovery/recovery_ui/ |
D | ui.cpp | 413 void RecoveryUI::SetScreensaverState(ScreensaverState state) { in SetScreensaverState() argument 414 switch (state) { in SetScreensaverState()
|