/bootable/recovery/updater/ |
D | install.cpp | 84 Value* UIPrintFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UIPrintFn() argument 86 if (!ReadArgs(state, argv, &args)) { in UIPrintFn() 87 return ErrorAbort(state, kArgsParsingFailure, "%s(): Failed to parse the argument(s)", name); in UIPrintFn() 91 state->updater->UiPrint(buffer); in UIPrintFn() 99 Value* PackageExtractFileFn(const char* name, State* state, in PackageExtractFileFn() argument 102 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 or 2 args, got %zu", name, in PackageExtractFileFn() 110 if (!ReadArgs(state, argv, &args)) { in PackageExtractFileFn() 111 return ErrorAbort(state, kArgsParsingFailure, "%s() Failed to parse %zu args", name, in PackageExtractFileFn() 117 ZipArchiveHandle za = state->updater->GetPackageHandle(); in PackageExtractFileFn() 126 if (std::string block_device_name = state->updater->FindBlockDeviceName(dest_path); in PackageExtractFileFn() [all …]
|
D | updater.cpp | 78 State state(updater_script_, this); in RunUpdate() local 79 state.is_retry = is_retry_; in RunUpdate() 81 bool status = Evaluate(&state, root, &result_); in RunUpdate() 85 if (result_.empty() && state.cause_code != kNoCause) { in RunUpdate() 86 fprintf(cmd_pipe_.get(), "log cause: %d\n", state.cause_code); in RunUpdate() 94 ParseAndReportErrorCode(&state); in RunUpdate() 125 void Updater::ParseAndReportErrorCode(State* state) { in ParseAndReportErrorCode() argument 126 CHECK(state); in ParseAndReportErrorCode() 127 if (state->errmsg.empty()) { in ParseAndReportErrorCode() 131 LOG(ERROR) << "script aborted: " << state->errmsg; in ParseAndReportErrorCode() [all …]
|
D | dynamic_partitions.cpp | 36 static std::vector<std::string> ReadStringArgs(const char* name, State* state, in ReadStringArgs() argument 40 ErrorAbort(state, kArgsParsingFailure, "%s expects %zu arguments, got %zu", name, in ReadStringArgs() 46 if (!ReadValueArgs(state, argv, &args)) { in ReadStringArgs() 54 ErrorAbort(state, kArgsParsingFailure, "%s argument to %s must be string", in ReadStringArgs() 66 Value* UnmapPartitionFn(const char* name, State* state, in UnmapPartitionFn() argument 68 auto args = ReadStringArgs(name, state, argv, { "name" }); in UnmapPartitionFn() 71 auto updater_runtime = state->updater->GetRuntime(); in UnmapPartitionFn() 76 Value* MapPartitionFn(const char* name, State* state, in MapPartitionFn() argument 78 auto args = ReadStringArgs(name, state, argv, { "name" }); in MapPartitionFn() 82 auto updater_runtime = state->updater->GetRuntime(); in MapPartitionFn() [all …]
|
D | blockimg.cpp | 882 static int CreateStash(State* state, size_t maxblocks, const std::string& base) { in CreateStash() argument 887 ErrorAbort(state, kStashCreationFailure, "stat \"%s\" failed: %s", dirname.c_str(), in CreateStash() 898 ErrorAbort(state, kStashCreationFailure, "mkdir \"%s\" failed: %s", dirname.c_str(), in CreateStash() 904 ErrorAbort(state, kStashCreationFailure, "chown \"%s\" failed: %s", dirname.c_str(), in CreateStash() 910 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu needed)", in CreateStash() 942 ErrorAbort(state, kStashCreationFailure, "not enough space for stash (%zu more needed)", in CreateStash() 1626 static Value* PerformBlockImageUpdate(const char* name, State* state, in PerformBlockImageUpdate() argument 1634 if (state->is_retry) { in PerformBlockImageUpdate() 1639 ErrorAbort(state, kArgsParsingFailure, "block_image_update expects 4 arguments, got %zu", in PerformBlockImageUpdate() 1645 if (!ReadValueArgs(state, argv, &args)) { in PerformBlockImageUpdate() [all …]
|
D | updater_runtime_dynamic_partitions.cpp | 57 auto state = DeviceMapper::Instance().GetState(partition_name_suffix); in UnmapPartitionWithSuffixOnDeviceMapper() local 58 if (state == DmDeviceState::INVALID) { in UnmapPartitionWithSuffixOnDeviceMapper() 61 if (state == DmDeviceState::ACTIVE) { in UnmapPartitionWithSuffixOnDeviceMapper() 65 << static_cast<std::underlying_type_t<DmDeviceState>>(state); in UnmapPartitionWithSuffixOnDeviceMapper() 72 auto state = DeviceMapper::Instance().GetState(partition_name_suffix); in MapPartitionOnDeviceMapper() local 73 if (state == DmDeviceState::INVALID) { in MapPartitionOnDeviceMapper() 88 if (state == DmDeviceState::ACTIVE) { in MapPartitionOnDeviceMapper() 92 << static_cast<std::underlying_type_t<DmDeviceState>>(state); in MapPartitionOnDeviceMapper()
|
/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/edify/include/edify/ |
D | expr.h | 71 using Function = Value* (*)(const char* name, State* state, 88 Value* EvaluateValue(State* state, const std::unique_ptr<Expr>& expr); 93 bool Evaluate(State* state, const std::unique_ptr<Expr>& expr, std::string* result); 96 Value* Literal(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 101 Value* ConcatFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 102 Value* LogicalAndFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 103 Value* LogicalOrFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 104 Value* LogicalNotFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 105 Value* SubstringFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv); 106 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/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/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/etc/ |
D | init.rc | 130 setprop sys.usb.state ${sys.usb.config} 136 setprop sys.usb.state ${sys.usb.config} 142 setprop sys.usb.state ${sys.usb.config} 148 setprop sys.usb.state ${sys.usb.config} 157 setprop sys.usb.state ${sys.usb.config} 164 setprop sys.usb.state ${sys.usb.config} 171 setprop sys.usb.state ${sys.usb.config} 178 setprop sys.usb.state ${sys.usb.config}
|
/bootable/recovery/recovery_ui/ |
D | device.cpp | 100 void Device::SetBootState(const BootState* state) { in SetBootState() argument 101 boot_state_ = state; in SetBootState()
|
D | ui.cpp | 409 void RecoveryUI::SetScreensaverState(ScreensaverState state) { in SetScreensaverState() argument 410 switch (state) { in SetScreensaverState()
|
/bootable/recovery/tests/unit/ |
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 | 68 State state(expr_str, updater); in expect() local 71 bool status = Evaluate(&state, e, &result); in expect() 76 ASSERT_TRUE(status) << "Evaluate() finished with error message: " << state.errmsg; in expect() 81 ASSERT_EQ(kNoError, state.error_code); in expect() 84 ASSERT_EQ(cause_code, state.cause_code); in expect() 115 static Value* BlobToString(const char* name, State* state, in BlobToString() argument 118 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 arg, got %zu", name, argv.size()); in BlobToString() 122 if (!ReadValueArgs(state, argv, &args)) { in BlobToString() 127 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 222 - [x] Add Sample app update state (separate from update_engine status)
|
/bootable/recovery/updater/include/updater/ |
D | updater.h | 83 void ParseAndReportErrorCode(State* state);
|
/bootable/recovery/recovery_ui/include/recovery_ui/ |
D | device.h | 144 void SetBootState(const BootState* state);
|
D | ui.h | 232 void SetScreensaverState(ScreensaverState state);
|
/bootable/recovery/ |
D | recovery_main.cpp | 190 static bool SetUsbConfig(const std::string& state) { in SetUsbConfig() argument 191 android::base::SetProperty("sys.usb.config", state); in SetUsbConfig() 192 return android::base::WaitForProperty("sys.usb.state", state); in SetUsbConfig()
|
D | README.md | 62 `sideload` state. 114 ### `adb devices` shows the device, but in `unauthorized` state.
|
D | NOTICE | 143 5. Submission of Contributions. Unless You explicitly state otherwise,
|
/bootable/recovery/tests/testdata/ |
D | recovery_body | 1343 …_bluetooth_writable:s05/sys/devices/bt_bcm4358\.[0-9]+/rfkill/rfkill0/stateM…
|