## 3 Chidroid Architecture
### AppOpsManager and Privilege Extraction
The logs can contain valuable information about the device and its applications, such as hardware and software information, system events, and running applications. The metrics collected include battery status, network connections, virtual memory, and CPU usage. These metrics are important for monitoring the performance and overall state of the device. Logs and metrics are retrieved from the Android device using the Logcat and Package Manager tools. Logs from Android devices can be useful for improving the security of Internet of Medical Things (IoMT) devices in a number of ways. For example, logs can be used for security analysis as follows:

* Detect and diagnose security issues, such as unauthorised access or malicious activity on the device. * Track changes to the device's configuration and identify potential security risks, such as installing unauthorised software or enabling unsafe permissions. * Monitor device usage and identify unusual or suspicious activity that may indicate a security threat. * Assist forensic investigations in the event of a security breach by providing a record of events that can help identify the cause of the issue and the steps taken to resolve it. Overall, logs can be an important resource for improving the security of IoMT devices by providing visibility into the device's activities and helping to detect and mitigate potential security risks. In addition to logs, Chidroid directly retrieves various system metrics from the Android device, including information about battery status, virtual memory usage, and CPU usage. These metrics are important to monitor the performance and overall state of the device. By regularly retrieving and analysing logs and system metrics, Chidroid can help identify and mitigate potential security and privacy risks for devices and the sensitive data they handle. It can also be used to extract datasets from logs and use them to improve device performance and reliability. In general, Chidroid is a powerful and versatile tool that can help ensure the safety and security of Android devices in the smart healthcare and IoMT domains. ### Future Work

There are several directions in which the Chidroid tool could be improved and extended in the future. Some potential areas of future work include the following:

* Improved log collection and analysis: The Chidroid system aims to enhance its security posture by collecting and analysing logs. Currently, the focus is on securing and protecting the privacy of Android devices. However, further analysis is needed to define detection rules for security incidents. Advanced log analysis techniques such as machine learning algorithms or statistical analysis could potentially provide insight into the performance and security of the device. The security analysis of collected logs represents a promising area for future research. * Enhanced security and privacy: The Chidroid system is designed to identify and mitigate security and privacy risks in Android devices. However, further analysis is necessary to determine additional ways to improve protection. A key future milestone will be to conduct a security analysis to support the development of more robust detection rules. * Extended testbed: An eHealth testbed will be established as a platform for conducting experiments and evaluating the performance of the Chidroid system in real-world eHealth applications. The testbed will be flexible and scalable, allowing for the testing of various configurations and parameters. * Performance assessment: A comprehensive evaluation method will be developed to measure the impact of the Chidroid system in a more comprehensive manner regarding the resource utilisation and performance. This will provide valuable information on the potential of Chidroid as a solution for edge computing applications. Towards this direction, more research will be conducted to examine the feasibility of reducing the resource requirements by scaling down the continuous log retrieval process.