SDK Hotfix via Automatic Keep Rule Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing hotfix methods for software development kits (SDKs) face issues with intrusiveness and high maintenance costs due to the need for manual updating of keep rules during SDK version updates, leading to potential app failures and increased maintenance costs.

Innovation Solution

The method involves generating a binary archive file using a proguard.txt file within an Android library project, which stores the keep rule during SDK compilation, allowing the accessing-party app to use the hotfix function without additional obfuscation requirements, thus reducing intrusiveness and maintenance costs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If manual updating of keep rules is performed during SDK version updates, then code security is maintained, but maintenance costs increase and intrusiveness increases

Engineering Contradiction:
Improvecode securityVSAvoidmaintenance costs
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The SDK compilation system automatically generates and updates keep rules based on the compiled classes, eliminating the need for manual maintenance. The system serves itself by autonomously managing the obfuscation rules without human intervention, thereby reducing maintenance costs while ensuring code security.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The keep rules are generated in advance during the SDK compilation process before the SDK is deployed. By preparing the obfuscation rules beforehand based on the compiled classes, the system avoids the need for subsequent manual updates and ensures code security is maintained proactively.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If manual updating of keep rules is performed during SDK version updates, then code security is maintained, but intrusiveness increases

Engineering Contradiction:
Improvecode securityVSAvoidintrusiveness
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system automatically manages keep rule generation and updates during SDK compilation, eliminating the need for manual operations. This self-service approach reduces intrusiveness by allowing the SDK to update its own obfuscation rules without requiring manual intervention from developers or operators.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The keep rules are automatically generated during the SDK compilation process before deployment. This preliminary action eliminates the need for subsequent manual rule updates, thereby reducing intrusiveness and making the SDK easier to operate across different versions.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If keep rules are updated synchronously during SDK updates, then code security is maintained, but device complexity increases

Engineering Contradiction:
Improvecode securityVSAvoidupdate process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The SDK compilation system autonomously generates and manages keep rules without requiring synchronous updates during SDK version changes. This self-service mechanism simplifies the update process by eliminating the need for complex coordinated updates between SDK versions and application keep rules.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The keep rules are generated in advance during SDK compilation based on the compiled classes, before the SDK is deployed to devices. This preliminary generation avoids the need for complex synchronous updates during SDK version changes, thereby reducing device complexity while maintaining code security.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20240095022A1Hotfix method, apparatus, device and storage medium
Publication Date: 2024.03.21 DOUYIN VISION CO LTD
  • US20240095022A1 patent drawing
  • US20240095022A1 patent drawing
  • US20240095022A1 patent drawing

AI summary

A hotfix method, an apparatus, a device and a storage medium are provided in embodiments of the present disclosure. The method includes: compiling a software development kit (SDK) for a hotfix; searching for a target file for storing a keep rule used during code obfuscation; searching for content that needs to be kept in the SDK, and generating an updated keep rule based on the content; updating the keep rule in the target file to the updated keep rule, and generating a binary archive file; where the binary archive file is used for providing a hotfix function for a target application accessing the SDK.