Fix a system error after UnTar in /data/data partition I made a backup of app data in a rooted device with

tar -czvf example.app.back.tar.gz /data/data/com.example.app/

And after decompress the tar in other rooted devices with

cd /
tar -xvf example.app.back.tar.gz /data/data/com.example.app/


The app get this data working after I did 

chmod -R 777 /data/data/com.example.app/


and when I reboot its like  a factory reset ,all the app data is gone and the apk that can be installed only in sd and when reboot again the app are deleted and the start wizard appears agains

I think that the tar command create a /data folder or mess in some way the mount points

Maybe I omit in the example some flags in the tar command that i originally typed

The destination device have Android 4.1.1
Well, good job for running chmod after untar-ing. You, however, missed the most important thing: file owner/group.

If you look into /data/system/uiderrors.txt, you'll find a bunch of information like this:

1970/01/01 00:00: Package jackpal.androidterm uid has changed from 0 to 10001, old data erased.


I've already answered a question before about Android applications' UIDs. A factory reset would have made you lose more data than you have already lost now. As Izzy pointed out, you didn't take care about file permission owner/group, as the app might have been assigned a different UID on the other device, and all its data were erased by Package Installer.

You may want to take a look at my answer and restore file owner from /data/system/packages.list manually. As far as I can tell everything will be fine after that.