summaryrefslogtreecommitdiffstats
path: root/otautil/include
diff options
context:
space:
mode:
Diffstat (limited to 'otautil/include')
-rw-r--r--otautil/include/otautil/logging.h65
-rw-r--r--otautil/include/otautil/parse_install_logs.h33
-rw-r--r--otautil/include/otautil/roots.h58
-rw-r--r--otautil/include/otautil/thermalutil.h24
4 files changed, 0 insertions, 180 deletions
diff --git a/otautil/include/otautil/logging.h b/otautil/include/otautil/logging.h
deleted file mode 100644
index 4462eca6e..000000000
--- a/otautil/include/otautil/logging.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _LOGGING_H
-#define _LOGGING_H
-
-#include <stddef.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <string>
-#include <vector>
-
-#include <log/log_id.h>
-
-static constexpr int KEEP_LOG_COUNT = 10;
-
-struct selabel_handle;
-
-struct saved_log_file {
- std::string name;
- struct stat sb;
- std::string data;
-};
-
-void SetLoggingSehandle(selabel_handle* handle);
-
-ssize_t logbasename(log_id_t id, char prio, const char* filename, const char* buf, size_t len,
- void* arg);
-
-ssize_t logrotate(log_id_t id, char prio, const char* filename, const char* buf, size_t len,
- void* arg);
-
-// Rename last_log -> last_log.1 -> last_log.2 -> ... -> last_log.$max.
-// Similarly rename last_kmsg -> last_kmsg.1 -> ... -> last_kmsg.$max.
-// Overwrite any existing last_log.$max and last_kmsg.$max.
-void rotate_logs(const char* last_log_file, const char* last_kmsg_file);
-
-// In turn fflush(3)'s, fsync(3)'s and fclose(3)'s the given stream.
-void check_and_fclose(FILE* fp, const std::string& name);
-
-void copy_log_file_to_pmsg(const std::string& source, const std::string& destination);
-void copy_logs(bool save_current_log);
-void reset_tmplog_offset();
-
-void save_kernel_log(const char* destination);
-
-std::vector<saved_log_file> ReadLogFilesToMemory();
-
-bool RestoreLogFilesAfterFormat(const std::vector<saved_log_file>& log_files);
-
-#endif //_LOGGING_H
diff --git a/otautil/include/otautil/parse_install_logs.h b/otautil/include/otautil/parse_install_logs.h
deleted file mode 100644
index 135d29ccf..000000000
--- a/otautil/include/otautil/parse_install_logs.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <stdint.h>
-
-#include <map>
-#include <string>
-#include <vector>
-
-constexpr const char* LAST_INSTALL_FILE = "/data/misc/recovery/last_install";
-constexpr const char* LAST_INSTALL_FILE_IN_CACHE = "/cache/recovery/last_install";
-
-// Parses the metrics of update applied under recovery mode in |lines|, and returns a map with
-// "name: value".
-std::map<std::string, int64_t> ParseRecoveryUpdateMetrics(const std::vector<std::string>& lines);
-// Parses the sideload history and update metrics in the last_install file. Returns a map with
-// entries as "metrics_name: value". If no such file exists, returns an empty map.
-std::map<std::string, int64_t> ParseLastInstall(const std::string& file_name);
diff --git a/otautil/include/otautil/roots.h b/otautil/include/otautil/roots.h
deleted file mode 100644
index 92ee756f0..000000000
--- a/otautil/include/otautil/roots.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-
-#include <string>
-
-#include <fstab/fstab.h>
-
-using Volume = android::fs_mgr::FstabEntry;
-
-// Load and parse volume data from /etc/recovery.fstab.
-void load_volume_table();
-
-// Return the Volume* record for this mount point (or nullptr).
-Volume* volume_for_mount_point(const std::string& mount_point);
-
-// Make sure that the volume 'path' is on is mounted. Returns 0 on
-// success (volume is mounted).
-int ensure_path_mounted(const std::string& path);
-
-// Similar to ensure_path_mounted, but allows one to specify the mount_point.
-int ensure_path_mounted_at(const std::string& path, const std::string& mount_point);
-
-// Make sure that the volume 'path' is on is unmounted. Returns 0 on
-// success (volume is unmounted);
-int ensure_path_unmounted(const std::string& path);
-
-// Reformat the given volume (must be the mount point only, eg
-// "/cache"), no paths permitted. Attempts to unmount the volume if
-// it is mounted.
-int format_volume(const std::string& volume);
-
-// Reformat the given volume (must be the mount point only, eg
-// "/cache"), no paths permitted. Attempts to unmount the volume if
-// it is mounted.
-// Copies 'directory' to root of the newly formatted volume
-int format_volume(const std::string& volume, const std::string& directory);
-
-// Ensure that all and only the volumes that packages expect to find
-// mounted (/tmp and /cache) are mounted. Returns 0 on success.
-int setup_install_mounts();
-
-// Returns true if there is /cache in the volumes.
-bool HasCache();
diff --git a/otautil/include/otautil/thermalutil.h b/otautil/include/otautil/thermalutil.h
deleted file mode 100644
index 43ab55940..000000000
--- a/otautil/include/otautil/thermalutil.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef OTAUTIL_THERMALUTIL_H
-#define OTAUTIL_THERMALUTIL_H
-
-// We can find the temperature reported by all sensors in /sys/class/thermal/thermal_zone*/temp.
-// Their values are in millidegree Celsius; and we will log the maximum one.
-int GetMaxValueFromThermalZone();
-
-#endif // OTAUTIL_THERMALUTIL_H