So, I finally managed to solve my problem, and it was much easier than I thought. Instead of coming with changes to the C ++ source code, I found a function in the java class of Cocos2dxHelper class, which is nativeSetApkPath. After studying its use, it turned out that Cocos2dx processes the apk package as a zip file. Since my obb is just a renamed zip file, I could use it without any problems. All my assets were loaded perfectly, except for the sounds. This requires another quick fix.
Most of the credits are related to the forum post ( http://www.cocos2d-x.org/boards/6/topics/11243 ) and Irwin Billing, as this was the base that I could use for my modifications in Cocos2dxMusic.java and Cocos2dxSound.java.
In addition, I had to be sure that the audio assets were not compressed in a zip file (according to the documentation provided by Google).
To do this, I used the following command on my Mac:
zip -rn .ogg:.mp3:.wav assets.zip assets/
The last thing I would like to mention is the folder structure. I copied and archived the resource folder, so I have a folder inside my zip file. This is great, since apk works the same way, I didn't have to make any changes anymore.
Finally, my modified source files just remember to go through it and change some Cocos2dxHelper.java values: http://pastebin.com/RqeYkTkP
Cocos2dxMusic.java: http://pastebin.com/RXjwmEyb
Cocos2dxSound.java: http://pastebin.com/1GfDB6jb
source share