CCFileUtils::getWriteablePath does not work correctly on Nexus 10



I use Cocos-2D-X on one cross-platform iOS/Android game.
Some customers with Nexus 10 reported the game was not behaving properly on Nexus 10.
After careful investigation, we found out that the issue is because CCUserDefault is making use of CCFileUtils::getWriteablePath(), which has hard-coded “/data/data/” prefix into the code.

This does NOT work on Nexus 10 (maybe because of Android 4.2 + multi-user environment.
My fix was to make a getCacheDirJNI() method calling back Java method in Cocos2DXActivity, returning proper Context.getCacheDir().
That fixed the issue.

Could somebody with proper rights create appropriate issue and/or grant me right to do so ?
I can commit a proper patch if needed.

Thanks !
Romain Tisserand
CTO & Co-Founder
DotEmu SAS


agree with you


Ok, see pull request here :