As I mentioned in , I am struggling to get my whatsapp chats from my phone, which I am afraid has something corrupted.
I made many attempts to fix whatsapp backups before resetting completely my phone (which of course is rooted) and installing a clean CyanogenMod, but without success. Anyway, the final summary is the following:
- If I try to run the backup from whatsapp, I get a message saying "message backup impossible" (in Italian, so I cannot really tell which would be the English message)
- In /data/data/com.whatsapp/files/Logs/whatsapp.log I get a message like the following: "java.io.FileNotFoundException: /storage/emulated/0/WhatsApp/.Shared/6y+pX-uxTsEsmXkUyvruzeZYE53m3KqVBYmnWWvvbjM=.tmp: open failed: EACCES (Permission denied)"
- So I checked what was the userid associated to whatsapp:Code:# grep com.whatsapp /data/system/packages.list com.whatsapp 10221 0 /data/data/com.whatsapp default 3002,3003,1028,1015,1023
- Userid 10221 should be associated with username u0_a221, and this appears to be actually the case:Code:# ls -l /data/data/ | grep com.whatsapp drwxr-x--x u0_a221 u0_a221 2016-01-04 18:05 com.whatsapp
- So I su'ed to this user and tried to get into the Whatsapp backup directory, without success:Code:# su u0_a221 :/ $ ls /storage/emulated/0/Android /storage/emulated/0/Android: Permission denied :/ $ ls /storage opendir failed, Permission denied
- All the directories in the path are owned by root.sdcard_r, as I think they should:Code::/ # ls -l / | grep storage lrwxrwxrwx root root 2014-01-01 11:09 sdcard -> /storage/emulated/legacy drwxr-x--x root sdcard_r 2014-01-01 11:09 storage :/ # ls -l /storage | grep emulated d---r-x--- root sdcard_r 2016-01-04 18:06 emulated lrwxrwxrwx root root 2014-01-01 11:09 sdcard0 -> /storage/emulated/legacy :/ # ls -l /storage/emulated drwxrwx--x root sdcard_r 2015-12-20 00:33 0 drwxrwx--x root sdcard_r 2015-12-20 00:33 legacy :/ # ls -l /storage/emulated/0 | grep Android drwxrwx--x root sdcard_r 2015-01-25 22:48 Android
My conclusion, therefore, is that the user u0_a221 does not belong to the group sdcard_r; but I don't know how to check this. I know that Android does not have /etc/passwd and /etc/group, and I read that it stores this information in a database, but I wasn't able to find out exactly which database, and I am not sure that I can modify it. So... where do I find this data, and can I modify it?