Restore data of a specific app from a TWRP backup


Question

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?


Answer

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.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes