Android Firewall Code Injection for Compatibility
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional mobile phone firewalls, particularly in earlier Android versions without an iptable/netfilter module, face challenges in providing effective safety protection due to compatibility issues and firmware version restrictions.
Innovation Solution
A safety protection method that injects a code module into a target process to modify package safety information of illegal applications, preventing them from operating by altering their package safety information, thus implementing a firewall functionality without relying on iptable/netfilter modules.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If an iptable/netfilter module is used to implement firewall functions in Android firmware, then firewall functionality is provided, but compatibility problems occur in earlier Android versions without such module
Solution Approach 1:
The patent introduces a code module as an intermediary component that can be injected into existing Android processes (such as system_server or zygote) to provide firewall functionality. This intermediary approach allows the firewall to operate without requiring the iptable/netfilter module, thus resolving the compatibility issue with earlier Android versions while maintaining reliable firewall protection.
Solution Approach 2:
The code module is designed to be universally compatible across different Android versions by injecting into core processes that exist in all versions. The module provides multi-functional capabilities including packet filtering, application identification, and security policy enforcement, making it adaptable to various firmware versions without requiring version-specific implementations.
2Reliability
If firewall functions are added by compiling into ROM for earlier Android versions, then firewall capability is enabled, but the solution is restricted by firmware versions
Solution Approach 1:
The firewall implementation transitions from a static ROM-compiled solution to a dynamic code injection approach. The code module can be dynamically injected into running processes at runtime, allowing the firewall to adapt to different Android versions and firmware configurations without requiring re-compilation or re-imaging of the ROM. This dynamic approach eliminates firmware version restrictions.
3Reliability
If package safety information is modified to block illegal applications, then security protection is improved, but system compatibility must be maintained
Solution Approach 1:
The code module modifies package safety information in a localized and targeted manner, affecting only specific illegal applications identified by the firewall rules. Rather than globally modifying system security mechanisms, the injection selectively alters package information for blocked applications, maintaining system compatibility while providing focused security protection against malicious apps.
Data Source
AI summary
Various examples provide a safety protection method, a firewall, a terminal device and a computer-readable storage medium. According to the method, a firewall injects a code module including a first function capable of modifying package safety information corresponding to an illegal application into a target process, and triggers the first function to modify the package safety information corresponding to the illegal application to make the illegal application fail to perform an operation due to the modified package safety information.


