3

After installing an OTA update my phone bootlooped so I made a TWRP backup and did a clean install of the latest version of the ROM I'm using but restoring the backup using TWRP bootloop my phone again. I only need to restore one or two apps. I know that I can extract the files by adding .tar and opening them with WinRAR. Now my question is : What files I need to move from the backup to my phone to restore the data of a single app manually?

  • ROM : Pixel Experience Plus (Official)
  • Android : 11
  • Magisk : 22.0

I tried copying the data from /data/data/com.exemple.idk and replacing the new ones in my phone but that doesn't seem to work. Is there anything else I need to copy from the backup files?

11
  • 1
    If the app uses the hardware backed AndroidKeystore for storing private or secret cryptographic keys you won't succeed in restoring the data as the keystone can't be restored selectively (if it can be restored at all). Therefore it depends on the app.
    – Robert
    Apr 3, 2021 at 21:26
  • 1
    Is there a way to know if the app is using Android keystore system?
    – Yox
    Apr 3, 2021 at 22:26
  • 1
    Does this answer your question? Backup WhatsApp from NANDROID
    – alecxs
    Apr 3, 2021 at 22:34
  • for more than one app use that script and restore with this app (with some intermediate steps)
    – alecxs
    Apr 3, 2021 at 22:47
  • 1
    Is the device rooted? IIRC Titanium Backup can restore parts of Nandroid backups, but it requires root.
    – Izzy
    Apr 4, 2021 at 0:41

1 Answer 1

2

Thanks to @alecxs and @Izzy I realized that the problem was related to the folder and subfolders attributes (permissions, owner and groups). I will tell you what I did to restore just a specific application from the NANDroid backup generated by TWRP (without using any command but root is required)

  1. Add .tar to the .win000 and .win001 etc (ignore the .sha2 files and any other files)

Exemple

  1. Extract everything in the same folder using WinRAR or any similar software
  2. Go to \data\data and copy the folder of the app you want to restore to the internal storage of your phone (for exemple com.exemple.idk) and remove the cache folders from inside this folder (IMPORTANT)
  3. Install Solid Explorer File Manager from the Play Store
  4. Install the app(s) you want to restore from the Play Store too
  5. Using Solid Explorer copy everything that's inside com.exemple.idk and navigate to /data/data/com.exemple.idk then paste everything
  6. Now select the cache folder FIRST and select all the folders you just pasted one by one! DON'T use the select all button! > Click on the 3 dots > Properties > Attributes (You should be able to see a similar screen with similar permissions)

Screenshot

  1. Now just check Recursive ☑ in both checkboxes and apply both.

Et voila! The application should be now restored to its previous state, if not uninstall it and try again step by step carefully.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .