I have android backups from my old (now dead) kitkat phone. Trying to restore the appdata of two different apps from a backup I cannot run the app with the old database. I copy the files to /data/data/TLD.SOMETHING.APPDIRECORY, but when I open the app it crashes immediately.

At least one of the apps is the exact same version as before, as it has not been updated for years. The access rights for the files are correct (user and group and -rw-------). If I generate appdata on android 6 by renaming the old data and starting the app, the app does not crash and the newly generated files have the same access rights as the ones that I restored.

So the only reason I can think of is the format of the database. I think most likely the db format changed between android 4 and 6 and apps do only use an interface to the OS, which handles the actual db-access for the app. "The OS" might be an OS-bundles SQLite provider or something else. Is my assumption correct? What is the difference and how can I convert?

thank you!

  • 1
    I can't really answer the question about the database formats, but if your device uses SELinux or SEAndroid, you need to fix the Security Contexts of the files to match the app they should be read from, otherwise an app can't read the file nor delete it and create it anew. – GiantTree Jul 13 '17 at 19:58

GiantTree got this thing working. With his comment I found https://forum.xda-developers.com/showpost.php?s=08f8d78aabe88fb570ec1e59a37e71a8&p=67319237&postcount=3

Which does the trick. So you need to fix user, group, Unix rights and SELinux Security Context. Thanks for this quick reply!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.