Pages

Cocos2dx : Security alert Your app is using a version of libpng containing a security vulnerability.

If you are still using Cocos2dx 2 then you've probably got a security warning in Google Play saying:

Security alert
Your app is using a version of libpng containing a security vulnerability.

The fix I've used is documented in this StackOverflow:

http://stackoverflow.com/questions/37852634/cocos2dx-libpng-google-play-notification-june-2016

1) Download these files and Unzip:

libpng_fix.zip for Cocos2d-x 2.x

(courtesy: Bengigi Apps and Games - thanks!)

Find the directory ../cocos2d-x-2.2.3/cocos2dx/platform/third_party/android/prebuilt  and replace the relevant files with the ones you've download

2) Next, you need to edit 'Android.mk'. For me this is in a folder with a path such as ../cocos2d-x-2.2.3/cocos2dx and make the following changes:

a) Change: 
LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libpng_static
to:
 LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libzlib_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libpng_static
b) Change: 
$(call import-module,libpng)
to: 
$(call import-module,libzlib) 
$(call import-module,libpng)
Once you have done this, rebuild and resubmit.
You'll find that it takes a few days for the warning to disappear from Google Play developer console.


1 comment:

  1. hello sir,
    i already make change to what you write about but how to rebuild this? could you please told me step by step.

    ReplyDelete