1 /* 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 22 class FastbootDevice; 23 24 bool GetVersion(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 25 bool GetBootloaderVersion(FastbootDevice* device, const std::vector<std::string>& args, 26 std::string* message); 27 bool GetBasebandVersion(FastbootDevice* device, const std::vector<std::string>& args, 28 std::string* message); 29 bool GetOsVersion(FastbootDevice* device, const std::vector<std::string>& args, 30 std::string* message); 31 bool GetVndkVersion(FastbootDevice* device, const std::vector<std::string>& args, 32 std::string* message); 33 bool GetProduct(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 34 bool GetSerial(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 35 bool GetSecure(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 36 bool GetCurrentSlot(FastbootDevice* device, const std::vector<std::string>& args, 37 std::string* message); 38 bool GetSlotCount(FastbootDevice* device, const std::vector<std::string>& args, 39 std::string* message); 40 bool GetSlotSuccessful(FastbootDevice* device, const std::vector<std::string>& args, 41 std::string* message); 42 bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& args, 43 std::string* message); 44 bool GetMaxDownloadSize(FastbootDevice* device, const std::vector<std::string>& args, 45 std::string* message); 46 bool GetUnlocked(FastbootDevice* device, const std::vector<std::string>& args, 47 std::string* message); 48 bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 49 bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& args, 50 std::string* message); 51 bool GetPartitionType(FastbootDevice* device, const std::vector<std::string>& args, 52 std::string* message); 53 bool GetPartitionIsLogical(FastbootDevice* device, const std::vector<std::string>& args, 54 std::string* message); 55 bool GetIsUserspace(FastbootDevice* device, const std::vector<std::string>& args, 56 std::string* message); 57 bool GetHardwareRevision(FastbootDevice* device, const std::vector<std::string>& args, 58 std::string* message); 59 bool GetVariant(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 60 bool GetOffModeChargeState(FastbootDevice* device, const std::vector<std::string>& args, 61 std::string* message); 62 bool GetBatteryVoltage(FastbootDevice* device, const std::vector<std::string>& args, 63 std::string* message); 64 bool GetBatterySoCOk(FastbootDevice* device, const std::vector<std::string>& args, 65 std::string* message); 66 bool GetSuperPartitionName(FastbootDevice* device, const std::vector<std::string>& args, 67 std::string* message); 68 bool GetSnapshotUpdateStatus(FastbootDevice* device, const std::vector<std::string>& args, 69 std::string* message); 70 bool GetCpuAbi(FastbootDevice* device, const std::vector<std::string>& args, std::string* message); 71 bool GetSystemFingerprint(FastbootDevice* device, const std::vector<std::string>& args, 72 std::string* message); 73 bool GetVendorFingerprint(FastbootDevice* device, const std::vector<std::string>& args, 74 std::string* message); 75 bool GetDynamicPartition(FastbootDevice* device, const std::vector<std::string>& args, 76 std::string* message); 77 bool GetFirstApiLevel(FastbootDevice* device, const std::vector<std::string>& args, 78 std::string* message); 79 bool GetSecurityPatchLevel(FastbootDevice* device, const std::vector<std::string>& args, 80 std::string* message); 81 bool GetTrebleEnabled(FastbootDevice* device, const std::vector<std::string>& args, 82 std::string* message); 83 84 // Helpers for getvar all. 85 std::vector<std::vector<std::string>> GetAllPartitionArgsWithSlot(FastbootDevice* device); 86 std::vector<std::vector<std::string>> GetAllPartitionArgsNoSlot(FastbootDevice* device); 87