[Q] Broke my system, can I fix via adb ? - Galaxy S III Q&A, Help & Troubleshooting

Whilst fiddling with something (trying to fix the fact that copy/paste wasn't working) I deleted a directory (after making a copy of it in /sdcard)
/data/clipboard
and rebooted.
I got stuck in a bootloop. erasing caches etc. didn't help and I also tried to repair permissions, no luck
I have since used adb (in recovery mode) to pull the files from /sdcard and push them back to /data (after mounting it in recovery). I have again cleared caches and repaired permissions but still no luck.
anyone have any ideas ?
I have a week old back up that I can restore but I'd rather fix what I have.
cheers,
malty

maltloaf said:
Whilst fiddling with something (trying to fix the fact that copy/paste wasn't working) I deleted a directory (after making a copy of it in /sdcard)
/data/clipboard
and rebooted.
I got stuck in a bootloop. erasing caches etc. didn't help and I also tried to repair permissions, no luck
I have since used adb (in recovery mode) to pull the files from /sdcard and push them back to /data (after mounting it in recovery). I have again cleared caches and repaired permissions but still no luck.
anyone have any ideas ?
I have a week old back up that I can restore but I'd rather fix what I have.
cheers,
malty
Click to expand...
Click to collapse
I don't know, why you would delete a system directory, if you don't necessarily know, what you're doing, but that's a different story..
Anyways; No, you can't fix your phone usining ADB.
You don't have to restore your phone, you should be able to get it working, by performing a factory reset/wipe data, in CWM.
And if that doesn't work, then at least you have a backup

thanks for the reply.
How come I cannot repair it ? I have the files I deleted and I have adb access to the system and data. I have successfully pushed the files back but for some reason it still doesn't work. If I have to restore my backup then that's fine, I just would like to understand why ?
I've never been one for blindly accepting facts
thanks again for the reply

maltloaf said:
thanks for the reply.
How come I cannot repair it ? I have the files I deleted and I have adb access to the system and data. I have successfully pushed the files back but for some reason it still doesn't work. If I have to restore my backup then that's fine, I just would like to understand why ?
I've never been one for blindly accepting facts
thanks again for the reply
Click to expand...
Click to collapse
No worries, I'll gladly explain aswell
Well, basically, the stuff that is in the /data/ partition is also part of the Dalvik VM, which builds up a cache, so, delete those files, the cache is gone, but you haven't told dalvik, that it's knowledge is gone, so it'll look for the files, waiting to build another cache, because it notices, that it's missing.. So, by just copying the files, you're not re-building the cache..
And, also; you deleted the data of ALL the apps, including system ones, so maybe System UI thinks it has to do CSC's work and vice-versa

Thank you for the reply, I now (mostly) understand. I have restored my nandroid backup and put it down to experience.

maltloaf said:
Thank you for the reply, I now (mostly) understand. I have restored my nandroid backup and put it down to experience.
Click to expand...
Click to collapse
Cool Glad things are working again
Don't forget; a backup a day, keeps the bricks away!

Related

Help..advice

so, I editied my build.prop on simple streak, something I have done numerous time on many roms. I changfe some ro.ril, network setting for speed. didnt work so I reverted back, deleted current build.prop, and renamed the build.prop.bak in root explorer to build.prop and reboot. now it doesnt boot up, shows dell logo then blank screen.
Im thinking either build.prop is bad or permissions not set correct, tried clearing cache dalvik and fixing permissions from streakmod recovery, no help.
my next step I think is flash clock work, mount /system, then adb shell in and check it out. Any thoughts/help for this route???
I dont have nandroid of my current rom( I know, dumb.) I have nandroid of previous roms though.
thanks guys, If I have time later I will try IRC,
if nothing in a few hours will be forced to nandroid to old build.
The clockwork route should work fine - just flash it on from fastboot and adb shell into it as you suggest.
As an alternative to nandroiding back down though, you should just be able to reinstall the current rom straight over the top of what you have - don't wipe anything, just flash it straight on. That will replace the build.prop for you, though it will also undo any other mods you've made on the system partition. Though at least it will keep your settings and data intact.
Good luck
will this keep my apps too??, probably better than factory reset huh?? thanks for the help..
Yep, it won't erase any of your apps or settings from your phone at all.
And, while I'm sure you already plan to.... as soon as you get a working phone back, Nandroid it
yeah, just bit the bullet and did it after research and found nothing..
this was a big help,
thanks so much
You're welcome - glad it got you sorted out
and nandroided...
good to go.

[Q] Any way of recovering data after doing a factory reset?

A couple of weeks ago, my SGS II crashed really badly and affected my phone in that I kept getting force close messages as well as "System UIDs Inconsistent" ones plus I couldn't access the partitions within my phone in Windows Explorer even though the phone was recognised by it.
It looks as though I may need to do a factory reset which to me is going to be a pain in the ass especially where videos and MP3's are concerned.
Another problem is that even though I installed VillainROM and followed the rules to the letter concerning its installation, supposedly I didn't install the system recovery that was unique to it and which would have made things a lot easier for me.
I don't even know if there is a way to backup data from the partitions to a 16GB or bigger micro SD card within the regular system recovery or not.
If I do need to a factory reset, are there any Apps out there that will let me recover data from the internal partitions as long as I don't write over the lost data concerned? (I know there's software available for PC that does something similar with data stored on hard drives)
Well on Cutom ROM you can use Titanium Backup Pro for Backup and Restoring. On Stock ROM's even Kies would do.
Regards.
ithehappy said:
Well on Cutom ROM you can use Titanium Backup Pro for Backup and Restoring. On Stock ROM's even Kies would do.
Regards.
Click to expand...
Click to collapse
That's the irony, I actually had Titanium Backup installed on my VillainROM custom ROM and I'd even bought an upgrade to the Pro version but for some reason, it wouldn't let me upgrade to the full version even though I had a license for it that I paid for, and as a result, it wouldn't let me do a full backup without having to do it slowly.
If I did reinstall Titanium Backup and managed to get my problem sorted out, would it recover deleted data or not?
Titanium Backup would only restore what it previously backed up.
The most easy way would be to just dump your data partition into a tarball (given you have root access on your phone).
Just hop into a terminal or adb shell and do
Code:
su
busybox tar zcvf /sdcard/data.tar.gz /data
That will give you a full .tar "backup" of all the data on the internal data partition.
Restoring that to app after a wipe and reinstall can be a bit pain in the poo, but it's better than nothing - and a recovery of previous files after a wipe would at best give you the same.
HellcatDroid said:
Titanium Backup would only restore what it previously backed up.
The most easy way would be to just dump your data partition into a tarball (given you have root access on your phone).
Just hop into a terminal or adb shell and do
Code:
su
busybox tar zcvf /sdcard/data.tar.gz /data
That will give you a full .tar "backup" of all the data on the internal data partition.
Restoring that to app after a wipe and reinstall can be a bit pain in the poo, but it's better than nothing - and a recovery of previous files after a wipe would at best give you the same.
Click to expand...
Click to collapse
How do I go into a terminal or adb shell? I'm using Windows 7 if that's any help?
For Terminal install a Terminal App from the marketplace on your phone and run it directely on it.
ADB you get from the Android SDK.
HellcatDroid said:
For Terminal install a Terminal App from the marketplace on your phone and run it directely on it.
ADB you get from the Android SDK.
Click to expand...
Click to collapse
I take it that once I do the factory reset on the phone and install a Terminal App on it via Android Market, I just need to run the command that you recommend that I do and I should be able to recover the data that was on my partitions, pre factory restore?
(Apologies for asking all these questions as I'm still a newbie when it comes to Android and I'm just pissed that this happened in the first place because of the overheating that caused it to happen in the first place)
What if I select advance restore in CWM recovery and restore data? Will it affect the flashed rom?
borgmanjayce said:
I take it that once I do the factory reset on the phone and install a Terminal App on it via Android Market, I just need to run the command that you recommend that I do and I should be able to recover the data that was on my partitions, pre factory restore?
Click to expand...
Click to collapse
No, you run the command BEFORE the factory wipe and use the tarball you got to restore any data you still need.
kryptoner said:
What if I select advance restore in CWM recovery and restore data? Will it affect the flashed rom?
Click to expand...
Click to collapse
Should work too, but depending on *what* borked up the install (might be some setting/config/piece-of-data somewhere) it will be restored as well - but definitaly worth a shot and pretty much "a must" to do those backups (I do them regulary).
gillian07 said:
It is possible to restore deleted files deleted from samsung galaxy s2 android phone after factory reset, take a look at this guide: recover data after android phone factory reset
You'd better do not use the phone before you get back lost files.
Click to expand...
Click to collapse
Blair Miller said:
You can check this related atciel recover files after restore factory settings
Click to expand...
Click to collapse
No program is free without compromise. If you factory reset without backup, there is not much you can do to recover deleted files. That's why such warnings exist before reverting back to a clean state.
You can try a Recuva download the program connect as storage device and try to scan Hope it helps
ma11221 said:
You can try a Recuva download the program connect as storage device and try to scan Hope it helps
Click to expand...
Click to collapse
Recovery programs such as recuva work best on magnetic media such as pc hard drives. Flash storage on mobile phone are different as there are no moving parts, so recovery is not that easy. There is also a much higher likelihood of corruption on flash storage too when restoring deleted files, so that's why there is really no 'best' method for recovery.
How to Recover Deleted Data from Android after Factory Reset
When you perform a factory reset on Android, you will return the device to the condition it was when shipped from the factory. A factory data reset can help fix most issues that occur on Android. Any incorrect settings, glitches, bugs, viruses, or software problems on the device will be wiped clean.
But the files deleted from an Android phone aren’t actually wiped from its memory. Instead, the files are only marked as deleted and invisible. The system will write data over those files in the future. You can later use specialized data recovery tool to scan the Android memory for deleted files and try to recover them.
mendywen0322 said:
When you perform a factory reset on Android, you will return the device to the condition it was when shipped from the factory. A factory data reset can help fix most issues that occur on Android. Any incorrect settings, glitches, bugs, viruses, or software problems on the device will be wiped clean.
But the files deleted from an Android phone aren’t actually wiped from its memory. Instead, the files are only marked as deleted and invisible. The system will write data over those files in the future. You can later use specialized data recovery tool to scan the Android memory for deleted files and try to recover them.
Click to expand...
Click to collapse
Got any tips on what software?

edit

delete
I am experiencing the same issues. I assume you have this problem with ICS roms, because that's where I get those problems. I am currently running WEUI and half my apps are not at all working. I have also flashed back to stock, tried ICS Slim and MIUI v4, but no luck. I am also getting issues, while listening to music, where the song will keep on playing, but the app will ask me if I want to FC or wait. This has only happened recently. I really do not feel like going back to 2.2 or 2.3. Any help is greatly appreciated
Have you guys tried fixing the permissions?
That usually fixes most force close problems.
Xenoism said:
Have you guys tried fixing the permissions?
That usually fixes most force close problems.
Click to expand...
Click to collapse
Tried it, but no luck. Only option now is to flash a different ics rom, and see if that works. If all else fails I can always go back to bionix.
2 questions:
1 Can you see your internalSD with a file explorer?
2 Did you try wiping /cache and /dalvik-cache and rebooting?
I find a good wipe cure many things wrong (with my phone too )
Woodrube said:
2 questions:
1 Can you see your internalSD with a file explorer?
2 Did you try wiping /cache and /dalvik-cache and rebooting?
I find a good wipe cure many things wrong (with my phone too )
Click to expand...
Click to collapse
1. Yes
2. Yes, usually before I flash a different rom/reflash rom to try and fix this I wipe data and wipe cache patition and dalvik cache.
OK. The first question was to make sure you still had access to your internal and not sole sort of veiled encryption error.
Let me think about somethings and ill get back to you. I am wondering if it wouldn't be a bad idea to format /data and /system to make sure that you don't have any ghosts lurking. If you do, make sure you back up SDs contents to PC just in case.
Woodrube said:
OK. The first question was to make sure you still had access to your internal and not sole sort of veiled encryption error.
Let me think about somethings and ill get back to you. I am wondering if it wouldn't be a bad idea to format /data and /system to make sure that you don't have any ghosts lurking. If you do, make sure you back up SDs contents to PC just in case.
Click to expand...
Click to collapse
All those apps are still force closing on 2.2. Could it be, because I'm restoring them from titanium backup?
I'll try to backup SD onto my Computer and then format sd. It's probably some ghost file that is causing my phone to have errors. It probably is a file that has to do with MIUI since I flashed that as it happened.
Btw thanks for trying to help
Edit: I formatted sd card, put all the files back onto sd card, restored apps with tiatnium backup, but still no luck. I even factory reset,wiped cache and dalvik cache after formatting sd, but still no luck.
Thanks everyone for trying to help. I figued out the problem. Titanium backup was causing all those apps to have issues. I uninstalled all user apps via tb and download them from the market. I am getting no force close what so ever, with dl apps from market.
Usually when that happens from TB, it is from restoring system files (they show in red in the TB list of apps).
I use it to restore user apps + data every time I flash a new ROM, but I never use it to restore system apps, and I don't have any problems with it.
Since you've already restored from the market, you could try running TB and deleting it's backup data and then running a new batch backup of user apps (and no system apps) to have the freshest copy of your apps from a working system. That should allow you to restore in the future, hopefully without issue.
Sent from my SGH-T959 using xda premium
This could be a problem with using TB. TB gives you the option of restoring apps+data. If you're coming from a 2.2 rom to 4.0, you don't want to keep the data from a 2.2 rom. What you can do is restore apps without the data. That should solve your problem.

Non-booting SII with CM 7.1

As of yesterday, my CM7.1 phone won't boot - it gets stuck at the "rotating arrow" blue Android for ever. It's a Samsung Galaxy S II GT-9100.
I have been running CM 7.1.0 for several happy months now, and haven't tried to install or upgrade my ROM. The last action I took before this happened is that I made a full system backup (using CWM 5.0.2.6).
That backup is present on the internal memory. I can boot into recovery, mount drives and access devices using adb shell. So I do have an opportunity to fix what's broken, if I can work out what it is.
Given that the last thing I did was a backup, I checked to see if any of the partitions were full, but none are. (None is more than 42% full according to df; although strangely, df does not show any partition mounted on /.) I tried making another backup, watching carefully - that worked fine. I tried restoring the first backup - no improvement.
I've also tried wiping everything Recovery allows me to that's non data-destructive - cache, Dalvik cache etc. It hasn't helped.
How do I work out what's wrong? Is there a boot log file anywhere which might give me a clue as to what is wrong? I've searched for "*.log" but can't find anything obvious.
I don't want to do a factory wipe if I can avoid it, because obviously that will lose all my data. If I do a factory wipe and restore just the data partition, does that put me pretty much back where I was? If so, how do I restore just the data partition? The Restore option in CWM Recovery seems to do full backups only, and only from a particular directory.
The original CM and Google Apps zips are still on the internal SD (same versions as are currently not working). Would it be worth trying to reinstall those, without wiping? Or would that be data-destructive?
Any other ideas?
Thanks!
Gerv
SOLVED - remove 0-byte data/system/profiles.xml
I tried doing a full factory reset from Recovery. This got the phone booting again, but without any of my data . Fortunately, ClockWorkMod has a "partial backup restore" function. I restored the data partition... and the phone stopped booting again.
So this is progress. I now had some idea where the problem lay. I finally found it using a laborious 5-minutes-per-cycle manual bisection technique. Delete half the stuff on the data partition, reboot, if it still fails, delete more, reboot... once you get it to boot, restore the data partition, narrow it down further. Once you find a top-level directory, repeat the process inside it.
The result: the existence of a single 0-byte file stopped my phone from booting entirely. The file was: data/system/profiles.xml.
I have no idea what that file does (there are only a few references online), how a 0-byte version of it got created, or why having it existent but empty breaks things but if it's not present everything works fine. I have no idea if anyone else will ever see this problem, or if they will ever find this forum post. But still, here's my Wisdom of the Ancients (google the phrase for the relevant XKCD comic).

[Q] CWM error while making backup image of /data

This error is still not answered on the forums so im starting a new thread.
i get the error as the title.
sd card space is not the problem.
i tried formatting the sd card.
i have less than 50 apps installed.
wiped dalvik cache, and all other sorts people say on other posts.
(my phone is LG P936 so "fix permission" screws up the phone. all text disappears)
have latest cwm recovery.
and still get the error.
any answers please?
and please dont reply if you are going to write an opinion.
only answers please.
sorry for my rude behaviour but I'm sick and tired of reading posts full of opinions and "maybe"s.
Not sure if you ever got this fixed but I 'm suffering from the same error. I tried pretty much everything you tried (even fix permissions) and I have about 20GB free on my SD card so space shouldn't be an issue. I have not yet tried formatting the SD card since it has always worked and CWM is able to write to it because the following files are created:
- boot.img
- data.ext3.tar
- recovery.img
- system.ext3.tar
The files that are missing are (based on older backups):
- .android_secure.vfat.tar
- cache.ext3.tar (probably because I wiped it first?)
- nandroid.md5
I have attached the log from CWM in the hopes that someone can tell me what is wrong. The error occurs at the end of the progress bar of 'backing up /data'.
hey just use TWRP Recovery. It's way better than CWM. normal backup on cwm took me like an hour but twrp was never longer than 10minutes.
Today I have formatted the SD card and tried again, but as expected it did not change anything.
ceoleaders said:
hey just use TWRP Recovery. It's way better than CWM. normal backup on cwm took me like an hour but twrp was never longer than 10minutes.
Click to expand...
Click to collapse
I guess I will give this a try. Can I just install it over CWM or can they run side by side?
different reciveries cannot be run side by side as they are installed on a different partition. so it will always be installed over your current one.
ceoleaders said:
different reciveries cannot be run side by side as they are installed on a different partition. so it will always be installed over your current one.
Click to expand...
Click to collapse
Well, I tried TWRP and it also fails at backing up my data partition. The log is a bit more clear though and it seems to get stuck on "/data/data/com.android.vending/cache/images" which is the last line before it gives an error. I checked the "images" folder and it seems empty but I cannot delete it. Tried ES File Explorer and Terminal Emulator but no way to get rid of it. The folder appears to be related to Google Play, so I cleared all data and cache from Google Play, even uninstalled the updates but there 's simply no way to get rid of it. I 'm not sure if this is the reason why the backup fails, but I CAN copy the folder and even rename it.
Pff looks like I 'm going to have to do a clean install after all .
Hello, I too have this problem and unfortunately TWRP is not available for my phone.
I used to be able to do CWM backups fine on my old phone, and they work great on my tablet. But they consistently fail at "/data" on my Galaxy Ace II x. Might it be because I'm using Link2SD? I don't see why that would cause a problem, but maybe it's having trouble with the symlinks?
Hmm. Seems the issue was that, despite having only 1.28 GB total available storage space on stock, the backups wanted more than 4 GB. Cleared some room on my microSD card and suddenly backups worked fine! Of course, shortly after I installed CyanogenMod, which has much smaller backups...
Sent from my GT-S7560M using Tapatalk 4
I forgot to report back here but the only way I found to fix the problem was by doing a clean install. After that, I was able to backup my data partition again. I then restored my apps ' data with TB and was unable to backup the data partition again. I 'm guessing one of my apps had corrupt data, but never got to find out which one it was.
maybe your partition not match with recovery, like something wrong vold.fstab
Just in case anyone still wants to know how to fix this, I managed to solve it by running these commands:
1. run adb shell in recovery.
2. unmount data partition (umount /dev/block/mmcblk0p26). -> this one failed so I skipped it
3. run e2fsck /dev/block/mmcblk0p26
See http://forum.xda-developers.com/showpost.php?p=48659092&postcount=868 for original post.
I got a few HTREE errors and a bunch of duplicate names which I renamed when prompted. Booted the phone and rebooted into TWRP and now I am able to backup my data partition again. :good:
EDIT: Problem reappeared so I tried the above commands again but it said that the filesystem was clean. Ran 'e2fsck -f /dev/block/mmcblk0p26' instead and had to fix a bunch of HTREE errors from Facebook again and duplicate names from Xprivacy but now I 'm able to backup my data partition again.
Dude just selest the backup format as both zip and tar filea

Categories

Resources