开发者

Can I use serialization with obfuscation?

I wonder if it will work... In my app I have an object that I'm serializing to file, and then I obfuscate the code with the ProGuard and application goes to Market. Then I want to release new version of app. I do the same. The users run through the application update.

The question is - does the object, that was serialized 开发者_C百科with the first version of app, deserialize properly in the second one? And if yes - why?


I could find several mechanisms (serialPersistentFields, ObjectInputStream#readFields) that make it possible for customised serialisation to be dependent on field names - assuming the default mechanism isn't already. The ProGuard documentation has some example configuration that shows how to make ProGuard ignore field names and all special methods and fields used by serialisation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜