MCPcopy Create free account
hub / github.com/Tencent/Hardcoder

github.com/Tencent/Hardcoder @1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.0 ↗ · + Follow
3,354 symbols 5,203 edges 136 files 520 documented · 16% updated 2y ago1.0.0 · 2019-11-19★ 2,20117 open issues

Browse by type

Functions 2,625 Types & classes 729
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Hardcoder

licensePRs Welcome

中文版请见这里

Hardcoder is a solution which allows Android APP and Android System to communicate with each other directly, solving the problem that Android APP could only use system standard API rather than the hardware resource of system. Through Hardcoder, Android APP could make good use of hardware resource of mobile phone such as CPU frequency, Large Core, GPU to improve APP performance while Android system could get more information from APP in order to provide system resource to Android APP more properly. At the same time, for lack of implementation by the standard interface, the APP and the system can also realize the model adaptation and function expansion through the framework.

Hardcoder framework could averagely optimize the performance of Wechat by 10%-30% in terms of Wechat startup, video delivery, mini program startup, and other highly-loaded scenes. Furthermore, it could also averagely optimize the performance of Mobile QQ by 10%-50% in terms of mobile QQ startup, chatting Initialization, picture delivery, and other highly-loaded scenes. The framework now has been applied to mobile brands such as OPPO, vivo, Huawei, XIAOMI, Samsung, Meizu, etc and covers more than 460 millions devices.

readme

Getting started

  1. Read “Product introduction of Hardcoder” to learn about Hardcoder.

  2. Read “Technical introduction of Hardcoder” to know the implementation philosophy and technical framework.

  3. Use the testapp to quickly verify the performance of Hardcoder. For the further detail, please check ”Hardcoder testapp testing instruction“ and “Hardcoder Benchmark”.

  4. Please check the “Hardcoder Application Instruction” to learn how to use Hardcoder.

  5. Download Hardcoder repo and compline Hardcoder aar.

  6. Apply Hardcoder aar to “build.gradle”.
  7. Call initHardCoder to establish socket connection when process initializes (Generally, it needs to request resource when process initializes. That is the reason why to call initHardCoder when process initializes). Every process is individual and they all need to call initHardCoder to establish socket connection. Every process keeps a socket after the connection and the socket will disconnect if the process quits.
  8. Call checkPermission after the success of InitHardCoder call-back and transfer authentication values which are applied from different mobile brands by APP.
  9. Call startPerformance under the condition of resource request scenes and transfer parameters that request resource. If the scene is in the stage of process initiation, for example APP startup, startPerformance should not be called until it successfully calls back initHardCoder or it needs to verify whether socket is connected by examining isConnect() of HardCoderJNI.
  10. Actively call stopPerformance when scene stops and it needs to transfer the “hashCode" corresponding to the startPerformance in order to identify the corresponding scene. Then it can stop this request.
  11. Test the performance. To do the comparison between the situation in which “Hardcoder is on and off”.

  12. Apply the authentication from mobile brands. For the further detail, please check FAQ.

  13. Launch APP which has involved Hardcoder.

Document Support

  1. Product introduction of Hardcoder——https://github.com/Tencent/Hardcoder/wiki/Hardcoder-产品方案介绍
  2. Technical introduction of Hardcoder——https://github.com/Tencent/Hardcoder/wiki/Hardcoder-技术方案介绍
  3. Hardcoder testapp testing instruction——https://github.com/Tencent/Hardcoder/wiki/Hardcoder-Testapp测试指南
  4. Hardcoder Application Instruction——https://github.com/Tencent/Hardcoder/wiki/Hardcoder-接入指南
  5. FAQ——https://github.com/Tencent/Hardcoder/wiki/FAQ
  6. Hardcoder for Android API References——https://tencent.github.io/Hardcoder/
  7. Hardcoder Benchmark——https://github.com/Tencent/Hardcoder/wiki/Hardcoder-Benchmark

License

Hardcoder is under the BSD license. See the LICENSE file for details.

If you have any questions,welcome to join QQ group to contact us.

qqgroup_qrcode.png

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 1,818
Function 807
Class 673
Enum 49
Interface 7

Languages

C++92%
Java5%
C3%

Modules by API surface

libapp2sys/prebuilt/include/google/protobuf/descriptor.pb.h537 symbols
libapp2sys/prebuilt/include/google/protobuf/repeated_field.h153 symbols
libapp2sys/prebuilt/include/google/protobuf/map.h145 symbols
libapp2sys/src/main/cpp/cjson/cJSON.c109 symbols
libapp2sys/prebuilt/include/google/protobuf/type.pb.h105 symbols
libapp2sys/prebuilt/include/google/protobuf/wire_format_lite_inl.h93 symbols
libapp2sys/prebuilt/include/google/protobuf/descriptor.h82 symbols
libapp2sys/prebuilt/include/google/protobuf/stubs/type_traits.h81 symbols
libapp2sys/prebuilt/include/google/protobuf/struct.pb.h68 symbols
libapp2sys/prebuilt/include/google/protobuf/reflection.h68 symbols
libapp2sys/prebuilt/include/google/protobuf/extension_set.h67 symbols
libapp2sys/prebuilt/include/google/protobuf/compiler/plugin.pb.h64 symbols

For agents

$ claude mcp add Hardcoder \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page