Android NDK UPX Reinforcement

Source: Internet
Author: User
<span id="Label3"></p><p><p>Prepare the compilation environment:</p></p> <pre class="brush:shell;toolbar: true; auto-links: false;"><pre class="brush:shell;toolbar: true; auto-links: false;">1, zlib-1.2.8.tar.gz2, ucl-1.03.tar.gz3, lzma443.tar.bz24, upx-hg-d9e7cb4b5485.tar.gz HTTPS://WWW.PYSOL.ORG:4443/HG/UPX.HG</pre></pre> <p><p>Compile UPX to set environment variables:<br></p></p> <pre class="brush:shell;toolbar: true; auto-links: false;"><pre class="brush:shell;toolbar: true; auto-links: false;">Export Upx_ucldir=/usr/local/android/upx/ucl-1.03export Upx_zlibdir=/usr/local/android/upx/zlib-1.2.8export UPX_ Lzmadir=/usr/local/android/upx/lzmaexport Upx_lzma_version=0x443export upx_dir=/usr/local/android/upx/ upx-hg-d9e7cb4b5485</pre></pre> <p><p>Hint at a few points:</p></p> <p><p>1, UPX Use the above to download the link, this version fixed the reinforcement so can not run on the phone error</p></p> <p><p>2, Compile-time prompt cannot find libz library, need to add in Upxdir/src/makefile</p></p> <pre class="brush:shell;toolbar: true; auto-links: false;"><pre class="brush:shell;toolbar: true; auto-links: false;">Includes + =-i$ (upx_zlibdir) LIBS + = $ (addprefix-l,$ (dir $ (wildcard $ (upx_zlibdir)/libz$ (libext))))</pre></pre> <p><p>finally, the UPX root directory is compiled with make all and will be generated in the SRC directory when the compilation is completed Upx.out</p></p> <p><p>Preparing the JNI Environment</p></p> <p><p>Use the compiled upx.out to harden the. so file generated by JNI and put it into the apk to run on the PHONE.</p></p> <p><p>Hardening Syntax:</p></p> <pre class="brush:shell;toolbar: true; auto-links: false;"><pre class="brush:shell;toolbar: true; auto-links: false;">$./upx.out-f-o libjin_upx.so libjni.so.....packed 1 file.</pre></pre> <p><p><br></p></p><p><p>Android NDK UPX Reinforcement</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.