exec function Execution exception-app: Php extract apk icon image

Source: Internet
Author: User
exec function Execution error-app: Php extract apk icon image

Author: Wolinxuebin Wood

Reprint please retain: Http://blog.csdn.net/wolinxuebin


Today in the project, read the image icon information from the APK. Because there is a lot of data to read, and because now the processing of their own testing is the Windows environment, the data processing after the upload to the server, really high half a day.

The main thing is to do two things: 1, read the APK icon path and other information 2, extract the image under the path.

Directly on the code first:

 
  

The tools used are: 1, apktool This online quite a lot, there are installation tutorials, the only trouble is to run in the Java environment

2, unzip:http://download.csdn.net/detail/wolinxuebin/4464939 test winrar can not decompress apk, maybe because I have limited level


Here's another important point,exec run error

Today, my software was installed under E:/program files/gnuwin32/, so define was

Define ("UNZIP", "E:/program Files/gnuwin32/bin/unzip.exe");
But always running without results, this exec will not error

EXEC ("{$aapt} d badging {$apk _file}", $out, $return);
View $return is always 1 then it is not running successfully.

This command is fully operational at the command line.

Finally found that the directory in the Commod parameter in exec () cannot contain spaces , that is, program Files should become ProgramFiles, so I changed an installation directory.

  • 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.