I recently had some disruptive partition troubles. I don't know how they started (must've been a bad flash, or a flash which didn't finish seeing as though i was experimenting with the leaked roms) but basically, my /cache, /system, /data, and /emmc partitions were all corrupted.
Fixing the /emmc, /cache and /system partitions was quite easy. I booted up into fastboot mode, flashed an ADB enabled recovery (the one in the Atrix Development forum works fine) and downloaded ADB.
I booted up into recovery, and in CMD i went into adb shell and used "parted /dev/block/mmcblk0p18" to get into the emmc partition, "rm 1" to remove the corrupted partition and "mkpartfs" to make a new partition as ext2, start 0, end 11.5GB (or something like that) and let it finish. Then i went into Mounts and Storage in CWM and formatted emmc. Did the same for /cache (mmcblk0p15) and /system (mmcblk0p12).
So far so good, my random reboots were fixed and my deadly FC of all apps was gone. But not for long.
I noticed after about 24 hours of normal use, i would start FC everything and multiple reboots + clearing caches (including dalvik) would fix it temporarily. This was a headache as messaging, phone and whatsapp would all crash and not recover.
I chalked this down to the /data partition (also known as /userdata, which houses the dalvik cache). I must be hitting a corrupt part of it during my daily use which messed my device up (once i hit the corrupt part, i could not do ANYTHING with the device, including just checking a partition. I would ALWAYS have to reboot at least twice to even read the partition).
I tried the same method as before (mmcblk0p16 for userdata partition) but i couldn't do it. It would always fail at around 90% and say i/o error and needed a few reboots. If i made a fat32 partition, i couldn't format over it with CWM (error near the end). Same with any kind of partition. This was the partition which couldn't be fixed...
So i decided to go all out. I knew i never flashed OTA 2.3.4 (Gingerbread), so i downloaded the Gingerbread SBF from a quick google search, despite all the warnings (i also THINK you CAN flash this SBF even though you were on OTA 2.3.4, just NOT ANYTHING LOWER SUCH AS FROYO). I booted into RSD mode and hoped for the best. Flashing went fine, but i was in a bootloop (due to data partition). Tried clearing with the stock android recovery and i would get i/o errors even though it said successfully wiped.
It was here when i got angry.
I flashed the ADB enabled recovery via fastboot and booted into it. Went into adb and parted again (first i inspected emmc partition which was mmcblk0p18). Did "print" and it said couldn't find label or something (which meant no partition table was found). ALL my partitions were missing this partition table.
So i created one.
"mklabel msdos" for emmc partition, then mkpartfs to make a primary partition, ext2, start 0, end 11.5GB" (or something like that) and let it happen.
For cache partition, i did "mklabel loop" then mkpartfs ext2, etc etc, with data i did "mklabel loop" and made a partition, same with system.
Then i tried wiping them via CWM. SUCCESS! I formatted them 5 times each just to be sure and sure enough, they were working fine now. I flashed a new ROM (couldn't risk my backup partitions having a corrupt sector or something in them) and heavily used it for a few hours. Downloaded many apps and games, did loads of texting and test calls.
No reboots. No FC, no problems for 24 hours. Hope it stays this way.
I posted this in hopes that others would find a solution with this rare problem. My data partition was the killer, no matter what, i couldn't fix it without flashing sbf. Remember, don't flash froyo sbf, only gingerbread (just to be safe).
Related
Ok hear me out. I have an idea. We need a "rom" that fills the phone with garbage, sort of like you would do a secure wipe, but one that leaves the recovery partition alone so it isn't truly bricked.
My reasoning is the seeming strange ability for parts of roms to linger. Such as when I went from KF to KGB and back to KF, it somehow merged some settings from KGB despite me doing a complete wipe between flashes. Now we have people who for some reason are griping about FC'ing constantly with Tazz GB.
What the rom could consist of is 128MB of /dev/urandom or something (or one huge file per partition however it is layed out.) And make sure it is signed so it will flash. With this rom, we could just download it once and leave it on our SD card and flash the phone with it between rom changes. We'd need to make sure that it overwrote /system /data and the dalvik cache partitions.
Plus it would be an interesting way to securely wipe a phone prior to running flashback and selling it or returning it to Verizon.
I'm sure the rom would take all of 5 minutes to make, we'd just have to make sure that it didn't touch recovery.
Then when someone is having all sorts of problems, recommend they flash BrickRom on it and then reflash back to what rom they had issues with.
adb is available when Amon_RA is running.
It's pretty trivial to go in there and mount /data after you have done a "wipe data/factory recovery". You should see nothing but the lost+found directories in both /data and /cache, and in /cache the /cache/recovery folder (which will contain the log file). Nothing else.
If you mount /system, you will see that it is still fully populated prior to flashing a ROM - that's intentional, so that if someone tries to flash a corrupted ROM, it will not pass verification (in Amon_RA, anyway) and so the phone should still boot into a FR'ed ROM. It is the ROM developer's responsibility to insert a "format SYSTEM:" directive in his/her ROM installer script; if that fails to happen, they could end up with a mixture of things in the /system mount from the new ROM and the prior ROM. I don't know if that has ever happened, though.
There are other possibilities revolving around the SD card - for instance if you moved apps to the SD card (/sdcard/.android_secure) for Froyo/GB, or the ext partition for Eclair ROM users. Amon_RA does not clean either of those up (whereas ClockworkMod does). If you install a ROM that has apps2sd installed by default, and you haven't manually cleaned up the ext partition... well, that's not really Amon_RA's fault.
If you can reliably repeat the behavior you are describing, then do a wipe (in Amon_RA), and then prior to flashing the new ROM, use adb (wth Amon_RA still booted, of course) to:
Code:
mount /system
cd /system
rm -rf /system/*
cd /
sync
umount /system
If the symptoms you are describing still persist (and you are using Amon_RA), then the problem most certainly results from stuff stored on the SD card.
I think a rom like that would be great, Stonent. I have had the same issue with certain roms. Are you thinking of some sort of rom that just contains format commands in the update script that doesn't actually flash a rom (a wiping rom)? I like that idea, but I have no idea how it could be made or if its possible, and I don't have much experience with things like that. Maybe someone could cook something like that up, I think its a good idea.
It's probably files on the SD card with identical names. Like if an app saves a config file to the SD and then KF looks for that same config file it'll carry over between ROMs.
Beginning with Froyo, Android keeps some files linked to your Google account (such as the wallpaper for example) I don't know if that is the same as this behavior but lots of apps store their data to SD (but not same as apps2sd)
I am posting here as there is not sub-forum for Xperia Pro.
I want to flash kernel using CWM already installed on my phone. Is it possible? If so, how do I go about it?
PS: I found a thread which is for Samsung phones here.
I don't think so
There is no way to flash a Kernel for SE phones faik
Were is our moderator!
Sent from my MT15i using Tapatalk
Can anyone tell me why kernel cannot be flashed via flash_image and the like. Is it because /boot partition is locked in Xperia phones? Or because the there is no proper flash_image made for Xperia phones?
That's something like ; doing a bypass surgery while you're awake
Something like that ^
Qwerty123 \m/ said:
That's something like ; doing a bypass surgery while you're awake
Something like that ^
Click to expand...
Click to collapse
I am not a complete nooby. flash_image can be used on (at least) Samsung phones, to flash kernels.
I have a nokia n900(linux kernel)...and i can flash kernels from the phone itself...dual boot maemo OS and android...restore the whole system image on the phone itself...but on neoV...it is not possible.
dont know about other android phones because neoV is my first android.
On PC you can update BIOS, on some motherboards you can do it from Windows, on others you can use some utility in BIOS setup program, on another motherboards you need true DOS and use BIOS flash program, same is with PC video cards, with PDAs...
ameer1234567890 said:
Can anyone tell me why kernel cannot be flashed via flash_image and the like. Is it because /boot partition is locked in Xperia phones? Or because the there is no proper flash_image made for Xperia phones?
Click to expand...
Click to collapse
Because SE xperia phones DONT HAVE recovery partitsion!
taaviu said:
Because SE xperia phones DONT HAVE recovery partitsion!
Click to expand...
Click to collapse
Exactly what does flashing a kernel with flash_image have to do with recovery partition?
ameer1234567890 said:
Exactly what does flashing a kernel with flash_image have to do with recovery partition?
Click to expand...
Click to collapse
The phone's internal memory (not the SD card) is solid-state (flash) memory, AKA NAND. It can be partitioned much like a normal hard drive can be partitioned. The bootloader exists in its own partition. Recovery is another partition; radio, system, cache, etc are all partitions.
Here are the standard partitions on an Android phone:
/misc - not sure what this is for.
/boot - bootloader, kernel
/recovery - holds the recovery program (either clockworkmod or RA recovery for a rooted Evo)
/system - operating system goes here: Android, Sense, boot animation, Sprint crapware, busybox, etc
/cache - cached data from OS usage
/data - user applications, data, settings, etc.
The below partitions are not android-specific. They are tied to the hardware of the phone, but the kernel may have code allowing Android to interact with said hardware.
/radio - the phone's radio firmware, controls cellular, data, GPS, bluetooth.
/wimax - firmware for Sprint's flavor of 4G, WiMax.
During the rooting process, a critical piece of the process is disabling a security system built into the bootloader that protects these partitions from accidental (or intentional) modification. This is what's referred to as "unlocking NAND." The security system can be set to active or inactive. S-ON means the security is in place (NAND locked). S-OFF means the security is off (NAND unlocked). When S-OFF, you have the ability to modify all partitions. With S-ON, you only have write access to /cache and /data. Everything else is read-only.
When you flash a custom ROM, that ROM typically includes a kernel and an OS. That means the /boot and /system partitions will be modified at a minimum. Some ROMs require a clean install, so a format of the /data and /cache partitions is sometimes built into the .zip that you flash. This is essentially doing a factory reset. See next paragraph.
When you do a factory reset (AKA: wipe, hard reset, factory wipe, etc.), you are erasing the /data and /cache partitions. Note that a factory reset does NOT put your phone back to its factory state from an OS standpoint. If you've upgraded to froyo, you will stay on froyo, because the OS lives in /system, and that is not touched during a factory reset. So "factory data reset," as it says under Settings > SD & phone storage, causes confusion. It's not a factory reset. It's a factory DATA reset. Now you know the distinction.
The SD card can also be partitioned to include a section dedicated to storing user apps. To create the partition, your SD card needs to be formatted. Typically a user will copy all the contents in the SD card to a PC hard drive, wipe the card and partition it, and then copy everything back.
Original http://www.addictivetips.com/mobile...plained-boot-system-recovery-data-cache-misc/
taaviu said:
The phone's internal memory (not the SD card) is solid-state (flash) memory, AKA NAND. It can be partitioned much like a normal hard drive can be partitioned. The bootloader exists in its own partition. Recovery is another partition; radio, system, cache, etc are all partitions.
Here are the standard partitions on an Android phone:
/misc - not sure what this is for.
/boot - bootloader, kernel
/recovery - holds the recovery program (either clockworkmod or RA recovery for a rooted Evo)
/system - operating system goes here: Android, Sense, boot animation, Sprint crapware, busybox, etc
/cache - cached data from OS usage
/data - user applications, data, settings, etc.
The below partitions are not android-specific. They are tied to the hardware of the phone, but the kernel may have code allowing Android to interact with said hardware.
/radio - the phone's radio firmware, controls cellular, data, GPS, bluetooth.
/wimax - firmware for Sprint's flavor of 4G, WiMax.
During the rooting process, a critical piece of the process is disabling a security system built into the bootloader that protects these partitions from accidental (or intentional) modification. This is what's referred to as "unlocking NAND." The security system can be set to active or inactive. S-ON means the security is in place (NAND locked). S-OFF means the security is off (NAND unlocked). When S-OFF, you have the ability to modify all partitions. With S-ON, you only have write access to /cache and /data. Everything else is read-only.
When you flash a custom ROM, that ROM typically includes a kernel and an OS. That means the /boot and /system partitions will be modified at a minimum. Some ROMs require a clean install, so a format of the /data and /cache partitions is sometimes built into the .zip that you flash. This is essentially doing a factory reset. See next paragraph.
When you do a factory reset (AKA: wipe, hard reset, factory wipe, etc.), you are erasing the /data and /cache partitions. Note that a factory reset does NOT put your phone back to its factory state from an OS standpoint. If you've upgraded to froyo, you will stay on froyo, because the OS lives in /system, and that is not touched during a factory reset. So "factory data reset," as it says under Settings > SD & phone storage, causes confusion. It's not a factory reset. It's a factory DATA reset. Now you know the distinction.
The SD card can also be partitioned to include a section dedicated to storing user apps. To create the partition, your SD card needs to be formatted. Typically a user will copy all the contents in the SD card to a PC hard drive, wipe the card and partition it, and then copy everything back.
Original http://www.addictivetips.com/mobile...plained-boot-system-recovery-data-cache-misc/
Click to expand...
Click to collapse
As I had mentioned before, I am not a nooby.
ameer1234567890 said:
As I had mentioned before, I am not a nooby.
Click to expand...
Click to collapse
Then show us HOW to install kernel via recovery?
Dont talk about Samsung and HTC option to install kernel via recovery. I have HTC Desire my second phone and yes i know there is option install kernel via recover(also im tested ALL desire roms and kernel already).
SE xperia have just different partitions layout and we simply cant flash kernel via recovery.....BUT i dont want tell you its IMPOSSIBLE.
Be nice and show us how to do that
PS:im tottaly noob.
Boot holds kernel and initrd not the actual bootloader, that is what should be writable. Provided the actual bootloader is not damaged it should be possible, however because there is no recovery partition it is riskier, but s1tool can restore bootloader......
Hmm
Sent from my MT11i using Tapatalk
I have S2(of course i have and xperia neo) and i dont flash with CWM i flash with odin or heimdall; CWM method is not sure.
In my opinion,and i'm NOT an expert, it easy to flash a kernel for xperia with flashtool or using fastboot from adb.
OK guys, you might have misread it. I am looking for a way to flash kernel not just using CWM (eventhough the title says so), but using any method without having to connect to a PC. One such possible method is to use flash_image in terminal, which does not work in my phone.
PS: The fact that I am not a noob doesn't make me a pro.
Alright fellows a few nights ago I Soft bricked my prime while playing with Ubuntu from lilstevie, none the less in my adventures of ADB, fastboot and NVFLASH, i have learned alot, but it seemed i have one issue, My data partition is corrupt to the point that even TWRP won't format it, any clues or suggestions?
If you have no file system on the data partition , you may have to do nvflash create, however this will also require you to recover everything from nvflash as your bootloader will also get wiped and should be your last line of defense.
If you can access adb, then you can try to create the filesystem through that. In adb, check if you can mount the data partition first, and from there you can determine whether you need to recreate folders or the filesystem or the partition itself.
Sent from my SO-01C using xda app-developers app
I have access to the data Partition and media, what lead me to believe i have an issue is I was using botbrew for a while after the ubuntu incident and messed something up so went to delete the botbrew folder, as it was deleting i got error after error, most of which were nonsense things like %%432# and random letters each were pop ups asking to either send an error report of be forced closed, by the way this is on Virtous latest
EDIT: After reflashing and trying the Format all script, it seemed to complete correctly though twrp still wont format /data, I ran dd if=/dev/zero of=temp.tmp in /data/media and filled the partition completely, then killed the file without issue so I'm at a loss
So a friend of mine recently gave me this YP-G70, asking me to fix it for him. His cousin had promised to put KitKat on the device, no problem, as a replacement to the stock software. This is all I know.
When I received the device, it would not boot into any ROM, only into recovery (CWM was flashed). In CWM, I could see that /system, /data, /emmc, and /sdcard partitions were all unmounted. I tried to remount them in CWM, but alas, this did not survive a reboot, even just back into recovery.
I have tried to flash the stock firmware for this device (obtained from sammobile) through odin, which was a success... until it booted up, and found that again, the proper partitions were not mounted. From there, I went on to flash CM9, which ended me up to where I am now.
As it currently stands, /dbdata, /data, /emmc, and /sdcard are all unmounted and are stuck that way. Does anyone know how to solve this, cause I am lost right now.
nicholician said:
So a friend of mine recently gave me this YP-G70, asking me to fix it for him. His cousin had promised to put KitKat on the device, no problem, as a replacement to the stock software. This is all I know.
When I received the device, it would not boot into any ROM, only into recovery (CWM was flashed). In CWM, I could see that /system, /data, /emmc, and /sdcard partitions were all unmounted. I tried to remount them in CWM, but alas, this did not survive a reboot, even just back into recovery.
I have tried to flash the stock firmware for this device (obtained from sammobile) through odin, which was a success... until it booted up, and found that again, the proper partitions were not mounted. From there, I went on to flash CM9, which ended me up to where I am now.
As it currently stands, /dbdata, /data, /emmc, and /sdcard are all unmounted and are stuck that way. Does anyone know how to solve this, cause I am lost right now.
Click to expand...
Click to collapse
I would try to find out what the log files say. If you can still make a full backup under CWM, I suppose this should include the last log written by android. This is where I would start my investigation. It is of course strange that android fails to mount the /data partition. I have no clue what /dbdata is for. My gut feeling is that your friend messed up the partioning, but I think it is key to find out what happens during boot time.
Finally, since you didn't write about this: Did you try wipe the cache and dalvik cache in CWM?
Back in the day I had my phone encrypted with data as a ext4 partition, I switched to using f2fs for a long time.
Now that I've tried to go back to using data as a ext4 partition while booting android asks for a invalid decryption password
using a really old pin number (I've had it encrypted several times since then using f2fs with different pin numbers) from the first
time I encrypted my partition while it was ext4.
Now when ever I wipe my data partition and try and use it as ext4 while booting android asks for a decryption pin which I can enter
but then complains that the filesystem it is trying to decrypt is corrupt.
I've tried doing a data format in twrp but it automatically formats it f2fs which doesn't solve the problem since
the problem only shows up while data is formated ext4.
I've tried every piece of wisdom I can find on the internet.
factory reset,
formatting all partitions,
dd front and back of userdata and then make_ext4 on userdata,
twrp format data,
recovery --wipe_data --set_encrypted_filesystem=off (from within twrp with the partition formated ext4),
format f2fs then boot up and reset and format ext4,
etc.
How do I give data the ultimate clean slate for being formatted ext4?
Or where is the remnant of the old encryption info stored from the first time I encrypted my phone?
I can format my data partition f2fs but frankly I was a little stunned when I saw the kind of overhead that filesystem has,
its space using overhead is way more then I want to have in a filesystem, or any filesystem I've ever seen.
Also is the problem not what I think it is?
Faced the same behaviour on my xt1524. Would be interesting to know if there is a solution for this
Is there a way to generate a new encryption from within the recovery?
Since it won't boot with data formatted as ext4.
Formatting it ext4 and then putting a new valid encryption on it?
From what I've found it, if the UI to unlock the partition on boot had a cancel button the system would boot as normal.
Unfortunately there is no cancel button on the unlock encrypted partition screen on our device. =/
Tried flashing a different recovery and using it wiping tools on data.
official twrp-3.0.2-0-surnia.img.
mkfs-f2fs -t 0 /dev/block/mmcblk0p44
process ended with ERROR:255
Unable to wipe Data.
Unable to format to remove encryption.
Also data wiping on TWRP is defaulting to trying to format data as F2FS which isn't even the default,
and while the partition has been switched to ext4.
I'd like to fastboot erase userdata and then fastboot format userdata.
But its giving me this error message.
fastboot format userdata
(bootloader) has-slot:userdata: not found
Formatting is not supported for file system with type 'raw'.
I've already done a lot of looking around on this issue, I'm normally not worried about this but
formatting internal system partitions that I don't understand how its different from a standard
desktop computers layout does worry me.
Should I be doing a full wipe and format everything to stock and then back to a custom rom?
God I wish this was a desktop computer right now, wipe the hard drive and reinstall the operating system,
there is something to be said for being simple and straight forward.
WTB cellular modem support in standard operating systems, and handheld devices that
can run standard operating systems.
I'd ditch this overcomplicated vendor locked sht so fast and never look back.
Following this guide to setup a new system encryption with rom in one go from the start with data as ext4 to see if I can bypass it this way.
But I'm getting a cannot find libraries error running cryptfs format command from adb shell or twrp terminal. b(>.<)d
http://android.stackexchange.com/questions/33398/cannot-factory-reset-after-encrypting
All this because someone thought it would be a great idea to take off the cancel button on data decryption
during boot.
This is why god invented beer and soaking you're brain in alcohol.
Damn been at this thing all day and still no luck.
Can I smoke the whole userdata partition with DD without bricking the phone?
In fact what can I effectively zero on a android phone without bricking it?
Am I miss reading this problem? Is the new inbuilt ext4 encryption (ext4 filesystem now has built in encryption support on newer kernels) support assumed to be on?
Never mind not as solved as I thought, But I just found another way to have my partition set to F2FS with letting me know. (^.^)
God this illustrates why formatting utilities that take shortcuts and 'ghetto erase' stuff are bad.
*Edited*
Default filesystem from the factory was F2FS (I have a bad memory : ) looks like it doesn't support putting data on Ext4.
Editing this post because I did a lot of post updates on what I was trouble shooting, but that might have
pissed people off because it does 'bump' the thread.
Sigh I'm throwing in the towel and formatting F2FS and moving on, F2FS is a one way door one which you never get back to ext4 from. > : (
Or ext4 formatting utilities suck balls and don't do their jobs.
Format all partitions to f2fs reboot to recovery again and format system and cache to ext4 now make a factory reset and reboot.