Flashing wrong recovery killed all of my partitions — Help! - General Questions and Answers

Hi all,
I'm going to make a long story short and say that my brother's phone has a cracked screen, so I tried to use TWRP to backup everything through ADB. But googling SM-J530F TWRP brings 'j5lte' as one of the first results, I went and flashed it under the wrong assumption that j5lte was SM-J530F's code name (it was not) and that caused severe bootloops.
I flashed correct TWRP, but USERDATA would not mount. I panicked and the crystal bleeding was progressing fast, so I pulled the entire mmcblk0 to dump a raw image of the phone's NAND.
This was the right move, as the phone is completely dead now. Crystal bleeding has made the screen completely dead, but the phone still works.
All I'm left with is the raw NAND backup.
The first thing I did was inspect the image with fdisk. It can recognize the GPT partition table and structure. The USERDATA partition is at the very end.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
GDISK is also recognizing it no problem. It seems like the partition table is in good condition:
GPARTED is also recognizing partitions, but it does not look good:
Looking at more information:
For the record, e2fsprogs is installed. It's always installed by default. GPARTED here is complaining about the superblock, but I can see that its looking to open the partition through /dev/loop0p24 which is no good. The kpartx tool is giving me access to all the partitions of the image through /dev/mapper/loop0p24, so that explains the errors.
Superblocks seem to be present in USERDATA:
I tried mounting the partition with a backup superblock, but...
I was at a loss at this point, so I tried mounting the SYSTEM partition just to see what happens and... it worked?
This proves what I said: This partition is fine, GPARTED was complaining simply because its trying to target them through the wrong device path.
But this raised the question: What the heck is wrong with the USERDATA partition? Why is it ext2 (Isn't that SUPER old?) and could it be that its not corrupted at all, and I'm just trying to mount it the wrong way or something? TWRP couldn't mount it though (Why?).
Being at a loss, I tried repairing the ext2 USERDATA partition using `fsck.ext2 /dev/mapper/loop0p24` and it found so many errors (including a corrupted journal) the file I redirected stdout to (console output) ended up being 78MB. Here it is if you want it (obviously can't post here).
So anybody knows what I can do? Is there any hope? I'm positive that the recovery image couldn't have corrupted the USERDATA partition (How could it? I still can't find a possible explanation). And even if it did, it couldn't overwrite the files. The file data should STILL be in that partition completely in-tact (There's NO WAY the recovery image overwrote them) though the journal is gone, so I can't use a tool like extundelete to recover them.
I tried to flash the phone with a stock rom through download mode to reconstruct everything with a healthy structure. This was so I could flash TWRP again and pull another NAND raw dump to have as a healthy reference I could use, but this doesn't work. Odin fails and I don't know why because the screen on the phone is dead.
Is there some place where I could get this maybe?
Is there something you can suggest I do?
Thanks!

Related

Missing Space?? (partly link2sd related)

I don't understand this.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(IMG tag doesn't seem to work so see this link instead) https://lh5.googleusercontent.com/-...9bQ3HKvY/s800/possible%20Android%20bug-01.png
If you look at the image above, my sgy-data (fat32) partition totals 843.8MB but the system reports 928.4MB used. Where did the 84.6MB go? Now that's ignorable…
But for my sgy-ext (ext3) partition that is linkd with link2sd, the total size of all the files is 246.7MB but the system reports 686.6MB used. A total of 439.9MB is missing! And that is not ignorable anymore.
In fact, if you look at the second image, according to link2sd, my sgy-ext partition is using up 601MB (as compared to 686.6MB reported by Linux, a difference of 85.6MB still in the range of 'ignorable' missing space).
(IMG tag doesn't seem to work so see this link instead) https://lh5.googleusercontent.com/-...Kh4pphYo/s800/possible%20Android%20bug-02.png
My questions are:
1) What's happening? and Why?
2) What's with Android OS as compared to Linux? Or putting it another way, why can't Linux see what Android 'supposedly' sees? Assuming that Android is seeing something that Linux can't, which could explain the missing MBs.
3) If it isn't normal at all, what is the best way to reclaim those missing MBs without resetting and starting from scratch? This is like the last resort if all else fails (although I don't mind since for some weird reason, everytime I plug-in my SGY to Linux, it reboots automatically).
Other info:
1) Using stock ROM
2) Using LA1
3) Samsung Galaxy Y
4) Rooted
5) I use Link2SD
6) regular SD card partition is FAT32
7) SD card partition for Link2SD is ext3
8) and a little bit of story, see next:
I rebooted after installing an app yesterday, and for some weird reason all of the installed apps that exists in Link2SD partition disappeared even though the said partition was mounted properly. I checked Link2SD and yes, it was mounted at boot, Link2SD can read the said partition. However, this is where it starts to get weird - Link2SD can not see any of the apps.
When I check the storage via Link2SD's, it reports that I have "used" space in the partition. True enough, the apps were not deleted, it was just that, Link2SD or maybe the phone itself failed to read those apps. Could this be a Link2SD bug and not Android related?
I tried rebooting, remounting, soft restart, all to no avail. I ended up reinstalling everything. Then trying the relink lib and relink cache. Some successfully relinked, the rest did not.
Then rebooted to see if anything changed. Works fine. However nothing changed. Finally I cleared the "trash", those files that lost its connection to its respective apps (via Link2SD's options). Nope nothing, because as Link2SD reported, these trash files have a total of 0kB! All empty files.
I rebooted once more. And then the problem repeated again. Then I rebooted again, and the problem stopped… finally.
However, the missing space are still there.
As you can see in my screenshots above, I have "all hidden files shown" enabled. The total size of all files is too low compared to the "used" size, which I can not reconcile anyway I looked at it.
And that's where I need help or an explanation… Android, Link2SD, possible bug?
Or is this another case of base-10 and base-2 space naming? My Linux OS uses base-10, is Android and Link2SD using base-2? (ie MB vs. MiB)
Thank you very much.
Same Problem have you found a solution?
I am having this same problem now... except I'm missing 1.90GB after a botched install and i know it's there on the sd cause link2sd is showing that it's being used even though I haven't linked anything to it yet after a fresh install of everything even wiping my sd and recreating the fat32 and the ext2 the missing GB are still gone.
Has anyone figured out what is happening or how we can get it back?

Lost phone storage???

So this morning I made a Nandroid backup (everything was acting normal) and I flashed the LeeDroid ROM then his insecure boot image since my phone wouldn't boot without that. Since then, my phone just will not recognize the internal SD card from Android (although, it is fine in Recovery). I posted about this in the LeeDroid thread because I thought it was ROM specific, but I just restored my Nandroid and the issue persisted. I have no clue what happened here. Any ideas?
Not sure if it is related but since I flashed the new ROM (even after restoring) I get that Android is Upgrading (runs through all apps optimizing) screen on each boot. Is this related to the boot img? Would the boot img have restored when I ran the Nandroid?
hah2110 said:
Not sure if it is related but since I flashed the new ROM (even after restoring) I get that Android is Upgrading (runs through all apps optimizing) screen on each boot. Is this related to the boot img? Would the boot img have restored when I ran the Nandroid?
Click to expand...
Click to collapse
Hi I saw your issue in the LeoDroid thread also. I think if I were you I would flash the stock HTC recovery and do a factory reset with that. Or flash a RUU file.
To answer your question though, if you restore a nandroid it does include your old boot.img
dc211 said:
Hi I saw your issue in the LeoDroid thread also. I think if I were you I would flash the stock HTC recovery and do a factory reset with that. Or flash a RUU file.
To answer your question though, if you restore a nandroid it does include your old boot.img
Click to expand...
Click to collapse
Why would the recovery be involved though? I don't get what caused this. The Recovery console sees my memory card just fine.
Ok so in ROM Toolbox - Root Browser, the sdcard shows up as a file, not a folder. When I click on it, it has empty contents. Does this help? I have full permissions on the file. The sdcard is pointed to /mnt/sdcard but when I specifically go there, it is empty. When I check permissions on sdcard under mnt, they are all unchecked and when I check them off, it is unsuccessful... ARGH
Could someone post their fstab file for me so I can mimic it and push to the phone, I think it is related.
Thanks
Ok so I do have an fstab file and here are the contents
dev_mount sdcard /mnt/sdcard emmc /devices/platform/msm_sdcc.1/mmc_host
Is that correct? Why does the mount command in the shell day fstab not found or corrupt?
Sent from my HTC One S using Tapatalk 2
May be a stupid question, but in settings it doesn't show anything under Phone Storage? What do you see there? Can you try to format it? Can you put a screen shot of your Storage settings? Here is what mine looks like.
You say you can access SDCard from Recovery, did you try to go to Mount and Storage and format SDCard?
FYI I'm on leedroid.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It says phone storage and total space and available space are "unavailable".
hah2110 said:
It says phone storage and total space and available space are "unavailable".
Click to expand...
Click to collapse
Do you have important files on the sdcard your trying to recover? If not have you gone back to a stock recovery and tried to clear storage yet?

[Q] Strangely bricked phone

Hello to everyone.
I have phone LG g pro 2 D838 made in Korea, that has strange symptoms. When it boots, appear screen with keyboard and input box with text ''Enter PIN/password to decrypt 30/30 attempts remaining". After I entered some code, it shows "29/30 attempts remaining, and no matter how many times wrong code is entered, still remains 29/30. Download mode working, and I try to flash latest stock rom 10f, but nothing happened. Then I try stock roms 10a, 10b and 10d, but still nothing. Next to the download mode, I have a recovery mode, in which there is no menu. In this mode, it is possible to access phone with ADB, but everything is read only, and system is not mounted. I can list folder contents, but I can't push or pull, and when i try to use shell, I get a message " -exec '/system/bin/sh' failed: No such file or directory", because system partition is not mounted. ADB Remount generate error " remount failed: Success ". I forgot to mention that every time when i try to flash stock rom, in box on phone display was written, in red letters, 'ROOTED'. I guess that unroot is not succeeded . Also suppose that possible solution is to flash some custom rom with recovery, but i can do that only if I have it in KDZ format. Does anyone know how to make a custom rom in KDZ format, or someone already has it? Does anyone know some other solution?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Thanks in advance
From what it looks like, you've encrypted your phone. That explains the password on startup and the unmounted system.
If you don't know your encryption password, you have a bit of a problem on your hands.
From what I know, there's no way to hack into or change your phone when it's encrypted.
Turtle_Cookies said:
From what it looks like, you've encrypted your phone. That explains the password on startup and the unmounted system.
If you don't know your encryption password, you have a bit of a problem on your hands.
From what I know, there's no way to hack into or change your phone when it's encrypted.
Click to expand...
Click to collapse
In first, thank you on reply ,Turtle_Cookies.
If the phone is encrypted, it should be possible to reset it to factory settings. The user data is encrypted, so it would delete them and set to the default settings, and that should recover the phone. On the other hand, I can access to certain directories by ADB (like etc,sys), but can't change it. Am I right?
Same Issue
Did you found solution to this?

[Bricked Nexus 5] can't mount /persisit ,/data; Currupt Partition; Flashing Failed

My rooted Nexus 5 has got bootloop issue because of faulty power button. It keeps restarting on its own. After replacing the power button with new One from LG Service center, now it stuck
at marshmellow boot screen, that boot keep running entire day untill battery died. LG Service center guys told me to replace the mother board. Since i was not convinced, i decided to make sure
if it is really required. My Nexus 5 has CWM recovery ver 6.0.4 with usb debugging on. Fastboot, adb everything is working. But if i tried to flash / wipe or mount i simply get error
can't mount /persist
cant mount /data
I tried following links to fix it-
https://forum.xda-developers.com/go...-unbrick-nexus-5-stucked-qualcomm-hs-t3043301
https://forum.xda-developers.com/go...orial-how-to-flash-factory-images-lg-t2713833
and some other first hand advice like run "Flash-all.bat" from stock rom, use WUG Toolkit to fix soft brick and flash stock rom or try flashing another custom recovery. But no matter what i try
CWM never get replaced and again same error. i was able to flash TWRP ( only untill reboot)and able to see folders under File Manager. But can't select Data, persist if try to wipe or mount from there.
One thing though, While using LG Flash tool my device never got detected in the tool even though i could see LG USB Serial Port under device manager in PC.
Please suggest if there is anything can be done to get it into working mode ,or motherborad replacement is the only way to go ahead.
You could try repartitioning device. try doing this:
https://forum.xda-developers.com/go...guide-repartition-nexus5-to-increase-t3509880
Actually resizing system partition also deletes userdata partition and it should work after recreating it. You have nothing to loose if it is already broken.
Try flashing the oldest stock ROM from the Google site. Make sure to flash userdata.img and perform a factoru wipe before booting the phone for the first time.
aciupapa said:
You could try repartitioning device. try doing this:
https://forum.xda-developers.com/go...guide-repartition-nexus5-to-increase-t3509880
Actually resizing system partition also deletes userdata partition and it should work after recreating it. You have nothing to loose if it is already broken.
Click to expand...
Click to collapse
Okay. Let me just try what you said. Will post the result
Edit1 -
I was not able to unmount /cache, /data .
On umount /cache it restart on its own and for other unmount /data and unmount /system invalid argument.
This is what happend (See image)--
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
audit13 said:
Try flashing the oldest stock ROM from the Google site. Make sure to flash userdata.img and perform a factoru wipe before booting the phone for the first time.
Click to expand...
Click to collapse
I am really sceptical if this will work. Since I have already tried flashing oldest rom of marshmallow (6.0.0).
Anyways, it won't take much time so will try to flash KitKat and let you know.
Edit -
Result was as expected
remote : failed to erase partition
remote : flash write failure
Any other Help ?? How to make sure if its really hard brick and not soft brick?
Sounds like the internal memory chip is damaged. I had one phone where I could not flash anything so I changed the motherboard and everything worked perfectly after the change.
I think I have a similar issue. Someone please help!

unmount 4.4.2

Hello!
How to unmount an old android 4.4.2 data partition?
Update: phone model if that makes any difference is Sony Xperia E1 dual
Not sure where to put this question, so I guess a general??
I have no knowledge of linux, android. But I got a programming background on windows systems and web.
I want to unmount an old android 4.4.2 data partition to run file system check because after deleting some files in data directory I am unable to write anything.
Could anyone please help me to get an idea how to do this? I searched the threads but they are more about flashing, TWRP and so on. Would not a simple file system check be enough in this case? As I noticed possibly it might be some sort of inode error? So checkdisk or something should fix it, shouldn't it?
I tried clearing the cache, it helped, but after few hours could not write anything again.
Now even the cache cleaning does not help.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It's always a good idea to set filepointer to begin of filesystem if you mount / unmount a partition: doing so you'll never run into error "Device or resource busy"
xXx yYy said:
It's always a good idea to set filepointer to begin of filesystem if you mount / unmount a partition: doing so you'll never run into error "Device or resource busy"
Click to expand...
Click to collapse
thanks for the tip!
However, I am a noob in linux/android, and the mount was done by android or KINGO rooter. So should I something like restart in recovery mode? Update:
Code:
adb reboot recovery
-> just rebooted to the regular interface
Update: phone is Sony Xperia E1 dual
I thought fixing a disk would be something like very basic task, like one liner or one parameter I did not add...
The mounting is just a way how I think I might solve the problem. That might be absolutely wrong way, not sure, now trying to move in the darkness by intuition only ...
Main problem: can not write anything with free space avaliable. Appeared since I deleted some files from /data using adb and rm command.
I also tried all the devices, but none of them was checked with two types of error:

Categories

Resources