blob: c11e472b701835f452f64800fa5ba8f3367459b6 [file] [log] [blame]
Hridya Valsaraju31d2c262018-07-20 13:35:50 -07001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <functional>
19#include <string>
20#include <vector>
21
22class FastbootDevice;
23
David Anderson1fb3fd72018-08-31 14:40:22 -070024bool GetVersion(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
25bool GetBootloaderVersion(FastbootDevice* device, const std::vector<std::string>& args,
26 std::string* message);
27bool GetBasebandVersion(FastbootDevice* device, const std::vector<std::string>& args,
28 std::string* message);
Bowgo Tsai99f9a382020-01-21 18:31:23 +080029bool GetOsVersion(FastbootDevice* device, const std::vector<std::string>& args,
30 std::string* message);
31bool GetVndkVersion(FastbootDevice* device, const std::vector<std::string>& args,
32 std::string* message);
David Anderson1fb3fd72018-08-31 14:40:22 -070033bool GetProduct(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
34bool GetSerial(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
35bool GetSecure(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
36bool GetCurrentSlot(FastbootDevice* device, const std::vector<std::string>& args,
37 std::string* message);
38bool GetSlotCount(FastbootDevice* device, const std::vector<std::string>& args,
39 std::string* message);
40bool GetSlotSuccessful(FastbootDevice* device, const std::vector<std::string>& args,
41 std::string* message);
42bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& args,
43 std::string* message);
44bool GetMaxDownloadSize(FastbootDevice* device, const std::vector<std::string>& args,
45 std::string* message);
46bool GetUnlocked(FastbootDevice* device, const std::vector<std::string>& args,
47 std::string* message);
48bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
49bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& args,
50 std::string* message);
Hridya Valsarajubf9f8d12018-09-05 16:57:24 -070051bool GetPartitionType(FastbootDevice* device, const std::vector<std::string>& args,
52 std::string* message);
David Anderson1fb3fd72018-08-31 14:40:22 -070053bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std::string>& args,
54 std::string* message);
55bool GetIsUserspace(FastbootDevice* device, const std::vector<std::string>& args,
56 std::string* message);
David Andersonc091c172018-09-04 18:11:03 -070057bool GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args,
58 std::string* message);
Hridya Valsaraju4af80902018-09-26 13:08:16 -070059bool GetVariant(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
Hridya Valsaraju7c9bbe92018-09-27 10:41:01 -070060bool GetOffModeChargeState(FastbootDevice* device, const std::vector<std::string>& args,
61 std::string* message);
Hridya Valsaraju47658ca2018-09-28 11:41:22 -070062bool GetBatteryVoltage(FastbootDevice* device, const std::vector<std::string>& args,
63 std::string* message);
Hridya Valsarajua534a5a2018-10-03 15:53:22 -070064bool GetBatterySoCOk(FastbootDevice* device, const std::vector<std::string>& args,
65 std::string* message);
David Anderson90fe0a42018-11-05 18:01:32 -080066bool GetSuperPartitionName(FastbootDevice* device, const std::vector<std::string>& args,
67 std::string* message);
David Andersonab8f4662019-10-21 16:45:59 -070068bool GetSnapshotUpdateStatus(FastbootDevice* device, const std::vector<std::string>& args,
69 std::string* message);
Bowgo Tsai33da5c92019-11-13 17:13:49 +080070bool GetCpuAbi(FastbootDevice* device, const std::vector<std::string>& args, std::string* message);
Bowgo Tsai99f9a382020-01-21 18:31:23 +080071bool GetSystemFingerprint(FastbootDevice* device, const std::vector<std::string>& args,
72 std::string* message);
73bool GetVendorFingerprint(FastbootDevice* device, const std::vector<std::string>& args,
74 std::string* message);
75bool GetDynamicPartition(FastbootDevice* device, const std::vector<std::string>& args,
76 std::string* message);
77bool GetFirstApiLevel(FastbootDevice* device, const std::vector<std::string>& args,
78 std::string* message);
79bool GetSecurityPatchLevel(FastbootDevice* device, const std::vector<std::string>& args,
80 std::string* message);
81bool GetTrebleEnabled(FastbootDevice* device, const std::vector<std::string>& args,
82 std::string* message);
Hridya Valsarajua534a5a2018-10-03 15:53:22 -070083
David Anderson0f626632018-08-31 16:44:25 -070084// Helpers for getvar all.
85std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device);
86std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice* device);