Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 25) sorted by relevance

/bootable/recovery/updater/
Dinstall.cpp85 Value* UIPrintFn(const char* name, State* state, const std::vector<std::unique_ptr<Expr>>& argv) { in UIPrintFn() argument
87 if (!ReadArgs(state, argv, &args)) { in UIPrintFn()
88 return ErrorAbort(state, kArgsParsingFailure, "%s(): Failed to parse the argument(s)", name); in UIPrintFn()
92 state->updater->UiPrint(buffer); in UIPrintFn()
100 Value* PackageExtractFileFn(const char* name, State* state, in PackageExtractFileFn() argument
103 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 or 2 args, got %zu", name, in PackageExtractFileFn()
111 if (!ReadArgs(state, argv, &args)) { in PackageExtractFileFn()
112 return ErrorAbort(state, kArgsParsingFailure, "%s() Failed to parse %zu args", name, in PackageExtractFileFn()
118 ZipArchiveHandle za = state->updater->GetPackageHandle(); in PackageExtractFileFn()
127 if (std::string block_device_name = state->updater->FindBlockDeviceName(dest_path); in PackageExtractFileFn()
[all …]
Dupdater.cpp78 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 …]
Ddynamic_partitions.cpp36 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 …]
Dblockimg.cpp882 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 …]
Dupdater_runtime_dynamic_partitions.cpp57 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/
Dexpr.cpp45 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/
Dexpr.h71 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/
DMainActivity.java252 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/
DUpdaterState.java66 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()
DUpdateManager.java254 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/
Dinit.rc127 setprop sys.usb.state ${sys.usb.config}
133 setprop sys.usb.state ${sys.usb.config}
139 setprop sys.usb.state ${sys.usb.config}
145 setprop sys.usb.state ${sys.usb.config}
154 setprop sys.usb.state ${sys.usb.config}
161 setprop sys.usb.state ${sys.usb.config}
168 setprop sys.usb.state ${sys.usb.config}
175 setprop sys.usb.state ${sys.usb.config}
/bootable/recovery/recovery_ui/
Ddevice.cpp100 void Device::SetBootState(const BootState* state) { in SetBootState() argument
101 boot_state_ = state; in SetBootState()
Dui.cpp422 void RecoveryUI::SetScreensaverState(ScreensaverState state) { in SetScreensaverState() argument
423 switch (state) { in SetScreensaverState()
/bootable/recovery/tests/unit/
Dedify_test.cpp30 State state(expr_str, nullptr); in expect() local
33 bool status = Evaluate(&state, e, &result); in expect()
Dupdater_test.cpp68 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/
Dadb_install.cpp57 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/
DREADME.md70 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/
Dupdater.h83 void ParseAndReportErrorCode(State* state);
/bootable/recovery/recovery_ui/include/recovery_ui/
Ddevice.h144 void SetBootState(const BootState* state);
Dui.h232 void SetScreensaverState(ScreensaverState state);
/bootable/recovery/
Drecovery_main.cpp190 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()
DREADME.md62 `sideload` state.
114 ### `adb devices` shows the device, but in `unauthorized` state.
DNOTICE143 5. Submission of Contributions. Unless You explicitly state otherwise,
/bootable/libbootloader/libxbc/
DCOPYING131 5. Submission of Contributions. Unless You explicitly state otherwise,
/bootable/recovery/tests/testdata/
Drecovery_body1343 …_bluetooth_writable:s0�5���/sys/devices/bt_bcm4358\.[0-9]+/rfkill/rfkill0/state��������������M…