GithubHelp home page GithubHelp logo

cjk035 / nativelibcompression Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liyuming1978/nativelibcompression

0.0 2.0 0.0 8.82 MB

The native library compression sdk is given to solve the apk size problem. It is easy to integrate and will get max 50% size decreasing. Beside sdk, a Java tool for package is provided to convert normal apk to compressed apk. MIT Licence, you can use any where

License: MIT License

Batchfile 0.07% Java 29.10% Makefile 0.88% C++ 0.01% C 69.94%

nativelibcompression's Introduction

NativeLibCompression

====================

There are lots of NDK apps on Google software market. To reduce package size, some ISV will only release Separate APK. A native library compression sdk is given to solve the apk size problem. It is easy to integrate and will get max 50% size decreasing. Beside sdk, a Java tool for package is provided to convert normal apk to compressed apk.

 

HOW TO USE IT:

1.Include DecRawso into your project (if you use ant, please copy DecRawso_Jar to your project , and add the Decrawso.jar, do not use the jar in the sdk bin folder)

2.Call DecRawso.NewInstance before any native library loading!!!

3.Replace all system.loadlibrary(***) to system.load(DecRawso . GetInstance ().GetPath(***))

       now, it is recommend to change to system.load, but system.loadlibrary also work.

--- build your apk as usual, and run your apk as usual when in your development, the apk is not compressed.

 

HOW TO COMPRESS THE APK: -- Use compress tool : ApkLibCompress/bin/ ComPressApk.jar

1.You can use it as:  ComPressApk.jar -a C:/my/test.apk -k c:/key storepass keypass alias [your keyname] -x86 http://www.test.com

2.if “-k” is missing, eclipse default test key will be used to sign this apk. 

3.[you keyname] is optional, if not have it. the defalt CERT will be used

4.If -x86 with link is used, then x86 library will be stored on http://www.test.com/cloudrawso_x86,   you must store the lib on the network bu manuanlly.

5.you can put arm lib on x86 folder to avoid library miss on x86 devices, use -nox86check to forbidden the check (x86 directly cal arm lib is unsafed)

6.you can copy all of "DecRawso_Jar" into your project if you use "ant" to package your project

7.new flag

  -o outputfilename     define the finaly output file name

    -slience             no popup window, that is suitable for ant package

    -nosign             do not sign the apk, that is suitable for ant package , due to the ant will sign apk

-nox86check      do not check x86 library missing and mix use of arm issue (x86 directly call arm library is forbidden default)

-noarm            do not compress arm lib. just put x86 lib on the cloud (with –x86)

8.how to know the result (when you use ant)

    now will create 3 files in the ApkLibCompress.jar folder

    :Done.flag      you can check whether the file is exist , if exist , then compression is ok

    :error.log        if generation fail, the log will has the reason

    :porting.log      it will show the x86/arm mix using or x86 lib missing issue

nativelibcompression's People

Contributors

liyuming1978 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.