I use libzip to read APK content in native code.
assets/sounds/voice folder "disappeared" for libzip functions only.
libzipstill see other files.- I still can see it in
assets/sounds/voicein project folder. - I did
cleanmany times. - I still can unzip
APKfile frombinfolder and I see all required files. (including files fromassets/sounds/voicefolder)
I added small logging command and it does not print files from assets/sounds/voice folder. All other files are present.
int inum = zip_get_num_files(apkzip);
for(int i = 0; i < inum; i++){
const char * name = zip_get_name(apkzip, i, 0);
__android_log_print(ANDROID_LOG_INFO,"FILEZIP", "zip: %s", name);
}
I have no idea what at what step it is wrong. Had eclipse compressed ZPK with new format that my libzip does not able to read? or what could be a reason.
This is not an answer for libzip, but why you have to use libzip to read apk file in NDK application? In Android NDK, you can use AAsset APIs to get file from the apk. Take a look at "How To Get File In Assets From Android NDK".
EDITED
Ok. So how about Cocos2d-x's ZipFile? It is based on Minizip.
How to use ZipFile from cocos2dx/platform/android/CCFileUtilsAndroid.cpp