# Corrupted /data... Please Help



## digitalparadigm (Nov 13, 2011)

Did some searching but cannot find any mecha/thunderbolt specific help on this. For the past couple of weeks I have been experiencing numerous and seemingly random issues after a batch update of apps and upgrade to CM7 1.8. Here is a list of symptoms:
cannot backup in CWM 5.0.2.1, fails when backing up /data
2/3 of reboots hang at the white HTC splash screen
occasionally when it does boot i get a message stating something about the data directory followed by the device setup wizzard (reboots fix this)
phone randomly reboots
phone randomly looses all data after oct 26th (data corruption occured i assume)
ex. the other day i sent a sms and locked, on next unlock past couple weeks sms all gone
ex. today made phone call, locked, unlocked to find all sms and phone data gone

attempted to downgrade CWM to see if i could get backup to work, but no change after flash
attempted flashing different ROM, everything appeared to work but same os as pre-flash after reboot
I make the assumption that the data directory is corrupted based on the above symptoms and also some posts like the following:
http://forum.cyanoge...when-restoring/

Can someone please counsel me on how to fix my phone?


----------



## yarly (Jun 22, 2011)

Which version of CM7 is 1.8? Is that the latest stable one from slayher? If not, that is possibly part of your issue.

The other issue could be from using CWM instead of rebooting to recovery. Both CWM and Kernel manager have a history of not doing what they're made to do at random times for users.

I would reboot to recovery, wipe all caches, data, system and reinstall a stable ROM. That should fix your issues. Do not restore data to any system apps if you are using Titanium Backup or something else similar.


----------



## digitalparadigm (Nov 13, 2011)

Thank you for the reply yarly.

I should have been more specific about CWM in that I am using the CWM recovery (blue). Using recovery I have attempted to clear everything a couple of times and attempted a couple of ROM flashes w/ clears, and it pretends like it works until I reboot and find myself back in the same ROM as before lol.


----------



## yarly (Jun 22, 2011)

digitalparadigm said:


> Thank you for the reply yarly.
> 
> I should have been more specific about CWM in that I am using the CWM recovery (blue). Using recovery I have attempted to clear everything a couple of times and attempted a couple of ROM flashes w/ clears, and it pretends like it works until I reboot and find myself back in the same ROM as before lol.


A shorter, simpler way to solve it would be reflashing the last rooted OTA from verizon (make sure to get the right one so you dont lock your bootloader again depending on how you rooted to begin with) in the bootloader and just starting over, just in case there's something wrong with your recovery.

You could also try a different recovery if the issue is the recovery itself, but I'm not sure it's that or not.

I suppose the other more complicated option that would probably work is just going into the terminal shell via adb in recovery, mounting /system, /data, /cache, etc and then doing something like

rm -r /system
rm -r /data
rm -r /cache

That will remove stuff and then try reinstalling your ROM.


----------



## Jaxidian (Jun 6, 2011)

yarly said:


> Which version of CM7 is 1.8? Is that the latest stable one from slayher? If not, that is possibly part of your issue.
> 
> The other issue could be from using CWM instead of rebooting to recovery. Both CWM and Kernel manager have a history of not doing what they're made to do at random times for users.
> 
> I would reboot to recovery, wipe all caches, data, system and reinstall a stable ROM. That should fix your issues. Do not restore data to any system apps if you are using Titanium Backup or something else similar.


FYI, Yarly here meant "ROM Manager" instead of "CWM". You don't want to use ROM Manager or Kernel Manager.


----------



## yarly (Jun 22, 2011)

Jaxidian said:


> FYI, Yarly here meant "ROM Manager" instead of "CWM". You don't want to use ROM Manager or Kernel Manager.


↑ What Jax said ↑


----------



## digitalparadigm (Nov 13, 2011)

K... so I just tried to (HBOOT?) flash the PG05IMG file I used to root the phone and it booted back into a seemingly unchanged ROM. During flash all of the steps reported OK and it appeared to take the proper amount of time.

I would love to try a different recovery but I haven't been able to flash anything for a while now









Attempting to recursively empty the directories now...


----------



## yarly (Jun 22, 2011)

digitalparadigm said:


> K... so I just tried to (HBOOT?) flash the PG05IMG file I used to root the phone and it booted back into a seemingly unchanged ROM. During flash all of the steps reported OK and it appeared to take the proper amount of time.
> 
> I would love to try a different recovery but I haven't been able to flash anything for a while now
> 
> ...


I can't explain why the bootloader method did not work, but if removing the directories does not, then idk. It's unlikely, but maybe your emmc got damaged somehow.


----------



## digitalparadigm (Nov 13, 2011)

Directories emptied and then rebooted only to find... SAME AS BEFORE!!! LOL


```
<br />
~ # cd /system<br />
cd /system<br />
/system # ls -l<br />
ls -l<br />
drwxr-xr-x    2 root	 root		  4096 Oct  1 16:08 app<br />
drwxr-xr-x    2 root	 shell		 4096 Oct  1 16:08 bin<br />
-rw-r--r--    1 root	 root		  6662 Aug  1  2008 build.prop<br />
drwxr-xr-x   14 root	 root		  4096 Oct  1 16:08 etc<br />
drwxr-xr-x    2 root	 root		  4096 Oct  1 16:07 fonts<br />
drwxr-xr-x    2 root	 root		  4096 Oct  1 16:08 framework<br />
drwxr-xr-x    7 root	 root		  4096 Oct  1 16:08 lib<br />
drwxr-xr-x    2 root	 root		  4096 Jan  1  1970 lost+found<br />
drwxr-xr-x    3 root	 root		  4096 Oct  1 16:07 media<br />
drwxr-xr-x    3 root	 root		  4096 Oct  1 16:07 tts<br />
drwxr-xr-x    7 root	 root		  4096 Oct  1 16:07 usr<br />
drwxr-xr-x    3 root	 shell		 4096 Oct  1 16:08 vendor<br />
drwxr-xr-x    2 root	 shell		 8192 Oct 11 01:17 xbin<br />
/system # cd /<br />
cd /<br />
~ # rm -r /system<br />
rm -r /system<br />
rm: can't remove '/system': Device or resource busy<br />
~ # cd /system<br />
cd /system<br />
/system # ls<br />
ls<br />
/system # ls -l<br />
ls -l<br />
~ # rm -r /data<br />
rm -r /data<br />
rm: can't remove '/data': Device or resource busy<br />
~ # rm -r /cache<br />
rm -r /cache<br />
rm: can't remove '/cache': Device or resource busy<br />
~ # cd /cache<br />
cd /cache<br />
/cache # ls -l<br />
ls -l<br />
/cache # cd /data<br />
cd /data<br />
/data # ls -l<br />
ls -l<br />
/data # ls<br />
ls<br />
```
I'm confused how this is even possible!?! BTW... I appreciate all the help everyone


----------



## digitalparadigm (Nov 13, 2011)

yarly said:


> I can't explain why the bootloader method did not work, but if removing the directories does not, then idk. It's unlikely, but maybe your emmc got damaged somehow.


What is emmc? (pardon my ignorance)


----------



## yarly (Jun 22, 2011)

digitalparadigm said:


> What is emmc? (pardon my ignorance)


It looks like you didnt mount your partitions for /system and /data and such before trying to remove them (make sure you select the option for each in recovery beforehand).

Emmc is your internal storage.

Try also getting a logcat dump of wiping your /system and /data partition with recovery and also of flashing a new rom while it happens.


----------



## digitalparadigm (Nov 13, 2011)

Thank you for the clarification yarly. I am 100% positive they were mounted. I can try again if you think it would help?

Is it possible to ascertain where exactly the issue lies? Any tests I can run?


----------



## yarly (Jun 22, 2011)

Dunno really what you can do without showing some logs. Run logcat from adb and dump it to a file while doing what I mentioned above (a seperate log file for each please).

adb logcat -f log.txt

Also, when you do that, put them somewhere like pastebin.com or pastie.org


----------



## digitalparadigm (Nov 13, 2011)

Need to crash and cannot get logcat to work in recovery (keeps saying something like /sbin/sh: exec: line 1: logcat: not found)

I do have a complete startup logfile if that helps?


----------



## yarly (Jun 22, 2011)

Probably not. Logcat probably wont work unless you have /system mounted and maybe /data.

EDIT: It's a little disconcerting that you can't flash the RUU in the bootloader. That either means you did something wrong in the process or reflashing it or your phone really has a bad emmc or something. If it's that, then maybe they might cover it under warranty since it's a hardware issue and could have happened whether you rooted or not.


----------



## Spencer_Moore (Jun 7, 2011)

From what I have read, which could be wrong. YOu need to flash a new recovery. CM uses ext4 (orext3) I don't really remember, but anywho. If you're running the blue version of CWM then you need to be running either the newest CWM or TWRP (Which I recommend) You can flash twrp through fastboot by using the fastboot command fastboot flash recovery recovery.img and then you should be up and running if you can flash this recovery. I just glanced over the responses, but this seems like it might help solve your issue.


----------



## yarly (Jun 22, 2011)

Spencer_Moore said:


> From what I have read, which could be wrong. YOu need to flash a new recovery. CM uses ext4 (orext3) I don't really remember, but anywho. If you're running the blue version of CWM then you need to be running either the newest CWM or TWRP (Which I recommend) You can flash twrp through fastboot by using the fastboot command fastboot flash recovery recovery.img and then you should be up and running if you can flash this recovery. I just glanced over the responses, but this seems like it might help solve your issue.


I would have thought that too, but he flashed an RUU in the bootloader which should trump anything done in recovery and he claims it still didnt change his ROM (no idea how that happens).


----------



## Spencer_Moore (Jun 7, 2011)

yarly said:


> I would have thought that too, but he flashed an RUU in the bootloader which should trump anything done in recovery and he claims it still didnt change his ROM (no idea how that happens).


I saw that. Maybe fastboot might be a good idea. YOu can wipe all the partitions using the fastboot command and at that point flash a recovery.img and start over again. I think this would definitely be a good start if this approach has not been tried yet.


----------



## Spencer_Moore (Jun 7, 2011)

yarly said:


> I would have thought that too, but he flashed an RUU in the bootloader which should trump anything done in recovery and he claims it still didnt change his ROM (no idea how that happens).


----------



## digitalparadigm (Nov 13, 2011)

Still no joy











yarly said:


> From what I have read, which could be wrong. YOu need to flash a new recovery. CM uses ext4 (orext3) I don't really remember, but anywho. If you're running the blue version of CWM then you need to be running either the newest CWM or TWRP (Which I recommend) You can flash twrp through fastboot by using the fastboot command fastboot flash recovery recovery.img and then you should be up and running if you can flash this recovery. I just glanced over the responses, but this seems like it might help solve your issue.


I was (deceptively) able to fastboot flash the latest TWRP as follows:

```
<br />
c:\Program Files (x86)\Android\img>fastboot flash recovery recovery-twrp-mecha-1.1.1.img<br />
sending 'recovery' (5596 KB)...<br />
OKAY [  0.920s]<br />
writing 'recovery'...<br />
OKAY [  0.600s]<br />
finished. total time: 1.520s<br />
```
Unfortunately it loads the same CWM 5.0.2.1 afterwards. Does this mean that the eMMC is busted as yarly suggested, or maybe the file system is messed up?

In the circumstance that this becomes unfixable, does anyone know if HTC would warranty this?


----------



## yarly (Jun 22, 2011)

If it really is the emmc it's most likely not due to anything you did. They *should* replace it for that. However, will they? That would depend on how you go about it and how easy someone can tell you rooted, since you so far cannot even do undo that. Verizon probably won't know or care if you don't say much.

idk if this will help but: http://androidforums...-read-only.html

http://www.google.co...167l2.11.1l14l0

Also, are you sure your phone is still unlocked (s-off) (I don't see how it couldn't be, but I'm out of ideas)? check in the bootloader.


----------



## JBO1018 (Jul 19, 2011)

Yeah, when I read that the RUU didn't take it immediatly screamed trashed EMMC to me.


----------



## mad96 (Aug 23, 2011)

Have you checked your SD card or have access to another one to see if it took a dump?


----------



## Spencer_Moore (Jun 7, 2011)

mad96 said:


> Have you checked your SD card or have access to another one to see if it took a dump?


if he was using fastboot it has nothing to do with sd card.

you can try fastboot to wipe all the partitions using fastboot erase recovery then try flashing twrp again.


----------



## digitalparadigm (Nov 13, 2011)

Spencer_Moore said:


> if he was using fastboot it has nothing to do with sd card.
> 
> you can try fastboot to wipe all the partitions using fastboot erase recovery then try flashing twrp again.


I'm sure this is getting hard to believe but... still no joy


```
<br />
c:\Program Files (x86)\Android\files>fastboot erase recovery<br />
		    erasing 'recovery'... OKAY [  0.204s]<br />
finished. total time: 0.204s<br />
c:\Program Files (x86)\Android\files>fastboot flash recovery recovery-twrp-mecha-1.1.1.img<br />
  sending 'recovery' (5596 KB)... OKAY [  0.913s]<br />
		    writing 'recovery'... OKAY [  0.599s]<br />
finished. total time: 1.512s<br />
c:\Program Files (x86)\Android\files>fastboot reboot<br />
					 rebooting...<br />
finished. total time: 0.147s<br />
```
Recovery is still CWM lol.
Checking on the read/write status of the eMMC now as per yarly's suggestion


----------



## digitalparadigm (Nov 13, 2011)

Is it weird that when I run the mount command there is nothing listed for emmc?


```
<br />
# mount<br />
mount<br />
rootfs on / type rootfs (ro,relatime)<br />
tmpfs on /dev type tmpfs (rw,relatime,mode=755)<br />
devpts on /dev/pts type devpts (rw,relatime,mode=600)<br />
proc on /proc type proc (rw,relatime)<br />
sysfs on /sys type sysfs (rw,relatime)<br />
none on /acct type cgroup (rw,relatime,cpuacct)<br />
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)<br />
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)<br />
none on /dev/cpuctl type cgroup (rw,relatime,cpu)<br />
/dev/block/mmcblk0p25 on /system type ext4 (ro,relatime,barrier=1,data=ordered)<br />
/dev/block/mmcblk0p26 on /data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc)<br />
/dev/block/mmcblk0p27 on /cache type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)<br />
/dev/block/mmcblk0p29 on /devlog type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)<br />
/dev/block/vold/179:65 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)<br />
/dev/block/vold/179:65 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)<br />
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)<br />
```


----------



## Spencer_Moore (Jun 7, 2011)

digitalparadigm said:


> Is it weird that when I run the mount command there is nothing listed for emmc?
> 
> 
> ```
> ...


It sounds like you got a fried device. I'm all out of ideas.


----------



## yarly (Jun 22, 2011)

Spencer_Moore said:


> It sounds like you got a fried device. I'm all out of ideas.


I concur.


----------



## digitalparadigm (Nov 13, 2011)

Balls! Thanks for the help everyone


----------

