Hello
I've just recently got a HTC Desire HD. I've rooted it with the help of aahk-11092012.
I've installed CM 7 first and it all worked fine.
A bit later I installed JellyTime ( http://forum.xda-developers.com/showthread.php?t=1778202 ).
This worked fine for about 2 days. Than, suddenly, the phone crashed. The screen went black and I the phone would not accept any key presses anymore. So I removed the battery and started the phone again. It hung on the htc-logo.
I was still able to get into recovery but it complained that it could not access the cache partition.
Upon further investigation i found out, that the partition table of the internal memory is broken. I could not mount or format any of the partitions. Factory reset just complained about that it could not access the partitions.
So i switched off the phone and started adb.
dmesg shows this
Code:
<6>[ 7.630279] rs30000048:00040000 rs30000048:00040000: setting system clock to 2012-11-23 20:51:58 UTC (1353703918)
<4>[ 7.630645] Warning: unable to open an initial console.
<6>[ 7.630828] Freeing init memory: 156K
<6>[ 7.739837] mmc0: new high speed MMC card at address 0001
<6>[ 7.740966] mmcblk0: mmc0:0001 M4G2DE 2.10 GiB
<6>[ 7.741851] mmcblk0: p1 p2 p3 p4 < p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 >
<4>[ 7.767913] mmcblk0: partition table partially beyond EOD, truncated
<4>[ 7.769744] mmcblk0: p28 size 42495 extends beyond EOD, truncated
<3>[ 7.816436] init: Unable to open persistent property directory /data/property errno: 2
And if I try to use parted I only get errors:
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print list
print list
Error: Can't have a partition outside the disk!
(parted)
The same error is show if I try to remove partitions.
When I try to write a new disklabel it just hangs there forever. No error message (also not in dmesg) or anything like this.
How can I fix the partition table of the internal memory and what do I have to do to get it to work again?
I guess that I will have to create a new partition table (and most probably destroy all the data on the internal memory in the process).
What will I have to reinstall in what order afterwards?
hboot?
cwm?
and how do I have to do this from the adb? Or is there a possibility do do this out of recovery?
I've tried several things in the meantime.
Ind the longer I try, the more I think that I have a bricked phone now since I seem to be unable to write anything to the emmc
I've tried to get back to the original firmware. So I copied the File PD98IMG.zip the the sd card, got into hboot and started the installation in hboot.
I could start it and it told me "Updating in progress, do not power off"
But there was no progress bar and after 10 minutes I pulled the battery. The phone is still in the same state as before so I think it did not write anything to the internal memory.
With fastboot, it seems to be the same. I can start fastboot on the phone aqnd it changes to "fastboot usb" when i plug the phone in. But every attempt to flash something to the phone just let's fastboot on the computer stop and hang (no message is shown, it's just sitting there and apparently doing nothing).
My computer system is debian linux btw.
I'm running out of ideas... please help... and it it's just the confirmation, that I have a bricked phone (that is long out of the warranty period anyway)
try with fastboot erase command. do google it a bit before you try
You have a full brick mate the EMMC is fried not amount of commands will fix it.
If you try fastboot getvar all then the try fastboot oem rebootRUU and the phone locks up its a new EMMC chip and jtag session to get it back online.
Google helps sometimes, you can also wipe out sectors on the emmc, because the partition table is corrupt.
http://archive09.linux.com/forums/topic/4033
Sent from my HTC Desire HD using Tapatalk 2
I have tried if he has the Dodgy EMMC doesn't matter what you try its fried and will not work. I have tried everything myself on a Bricked DHD with the Dodgy EMMC chip.
Related
So I got to the part where know I know my partitions are off. Heres what I get with the print command in parted:
Code:
/dev/block/platform/mmci-omap-hs.1 # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 7734MB 7734MB ext2
I have the mmcblk0p1.img, mmcblk0p2.img, ect... on my computer. How would one use these to restore the partitions so I can install twrp and install stock os?
Messing with the partition table is one slip away from brickage...
Sent from my SAMSUNG-SGH-I777 using xda premium
Well, I am bricked.
I just said screw it and got a new one free from bestbuy.
http://forum.xda-developers.com/showthread.php?t=1388996
a good reading on cold night. also factory cable is not a bad thing
danij3l said:
http://forum.xda-developers.com/showthread.php?t=1388996
a good reading on cold night. also factory cable is not a bad thing
Click to expand...
Click to collapse
The partition tables got nuked while being stuck in fastboot mode, so a factory cable isn't gonna help anything. Repartitioning when there aren't any partition tables built can't help either.
Hoping to rev FIREFIREFIRE sometime this weekend with a partition table initializer. This plus the USB boot should give people a way out. It's already in there but I don't think the partition map is right. Maybe I could add an extra command for alternate partitioning so we don't run into this problem...
pokey9000 said:
Hoping to rev FIREFIREFIRE sometime this weekend with a partition table initializer. This plus the USB boot should give people a way out. It's already in there but I don't think the partition map is right. Maybe I could add an extra command for alternate partitioning so we don't run into this problem...
Click to expand...
Click to collapse
How would we install a new version of FFF if we don't have any partitions?
You don't. If the partition table is broken, then likely the CPU will default to USB boot, where you can use Rekindle to run FFF.
pokey9000 said:
You don't. If the partition table is broken, then likely the CPU will default to USB boot, where you can use Rekindle to run FFF.
Click to expand...
Click to collapse
Ah. I see what you mean. I'm sending mine back tomorrow anyway, so this will definitely help people who get nuked partition tables from booting unstable-ish kernels.
And FFF can now restore your partition table. Custom partitions is still TBD.
Get it here.
It's best to set "unit mib" in parted!
Thanks to to all for this useful thread. But I have an additional suggestion:
When starting parted and before issuing a 'print' command, one should issue the command:
Code:
unit MiB
which causes parted to print sizes and boundaries in binary megabytes, i.e., 1MiB = 1024KiB, where 1KiB = 1024 bytes, which is the numbering system still used for RAM chips, but not much else, since marketers prefer the numbering system that makes their product appear bigger. That way, the numbers given by parted are exact and non-overlapping. When numbers are entered in conformity with this presentation, they should be written with the suffix MiB, without any space after the number. Please keep in mind that, in this format, the end of one partition is the 1MiB block before the start of the next one. When the default decimal format is used, the end of one partition will be the in the same 1MB block as the start of the next partition, which hides the actual point of division, which could be anywhere in that 1MB block, depending on where an actual binary boundary falls.
Also note that each block is specified by its offset (in MB or MiB) from the beginning of some larger space, probably /dev/block/mmcblk0. It would make more sense to specify the end of a partition as the offset in MiB to the first byte following the partition, as most disk management programs do. I don't know why parted does it differently.
Hey everyone, today I started having some really horrible problems with my G2. It started when I woke up and noticed that the phone was powered OFF, which was not normal. Pressing the power button was unable to turn it on, but pulling the battery worked fine.
Everything was normal for a couple hours, but then I began getting random freezes. At least they seemed random, but I was able to reproduce it fairly consistently by turning the screen off and then on a few moments later.
Ok I thought, haven't wiped in a while (Currently on Mimicry 1.4 using 4EXT recovery), so in I went to the Superwipe. Flashing the Superwipe failed. This is the error I see (and have NEVER seen before)
E:Error in /sdcard/SuperWipeG2+ext4.zip
(Status 1)
Installation aborted
So I just went in and did a basic wipe everything and reinstall the ROM, unfortunately this leads to just a white HTC screen.
Flash a Nandroid? Nope, below is the error I see
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p25
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p25
Error while formatting /system!
I feel like somehow my file system got corrupted, but unlike using Odin with the Vibrant I'm unsure how to fix this on the Vision. Anybody?
If you're in recovery, hook the phone up to your computer and run these two commands:
adb shell
dmesg | grep mmc0
if you see something like:
mmc0: failed to get card ready
mmc0: reinit card
mmc0: Starting deferred resume
mmc0: Deferred resume failed
Then it means your internal memory (emmc) is fried/dead.
You can do the following two commands:
adb shell
cat /proc/kmsg | grep 'mmc0:0001'
To see if you have the 'good batch' SEM04G chip, or if you were yet another victim of the faulty 'bad batch' of M4G2DE chips
kbeezie said:
If you're in recovery, hook the phone up to your computer and run these two commands:
adb shell
dmesg | grep mmc0
if you see something like:
mmc0: failed to get card ready
mmc0: reinit card
mmc0: Starting deferred resume
mmc0: Deferred resume failed
Then it means your internal memory (emmc) is fried/dead.
You can do the following two commands:
adb shell
cat /proc/kmsg | grep 'mmc0:0001'
To see if you have the 'good batch' SEM04G chip, or if you were yet another victim of the faulty 'bad batch' of M4G2DE chips
Click to expand...
Click to collapse
Thanks for helping out. This is what I get with your first command.
<3>[ 7.968688] mmc0: No card detect facilities available
<6>[ 7.969268] mmc0: Qualcomm MSM SDCC at 0x00000000a0500000 irq 98,0 dma 7
<6>[ 7.969512] mmc0: Platform slot type: MMC
<6>[ 7.969665] mmc0: 4 bit data mode disabled
<6>[ 7.969909] mmc0: 8 bit data mode enabled
<6>[ 7.970031] mmc0: MMC clock 144000 -> 50000000 Hz, PCLK 96000000 Hz
<6>[ 7.970275] mmc0: Slot eject status = 0
<6>[ 7.970428] mmc0: Power save feature enable = 1
<6>[ 7.970550] mmc0: DM non-cached buffer at ff00d000, dma_addr 0x0fffb000
<6>[ 7.970825] mmc0: DM cmd busaddr 0x0fffb000, cmdptr busaddr 0x0fffb300
<6>[ 8.136444] mmc0: new high speed MMC card at address 0001
<6>[ 8.137908] mmcblk0: mmc0:0001 SEM04G 2.10 GiB
And with your second
~ # cat /proc/kmsg | grep 'mmc0:0001'
cat /proc/kmsg | grep 'mmc0:0001'
<6>[ 8.137908] mmcblk0: mmc0:0001 SEM04G 2.10 GiB
Looking good I think?
Nospin said:
Thanks for helping out. This is what I get with your first command.
<3>[ 7.968688] mmc0: No card detect facilities available
<6>[ 7.969268] mmc0: Qualcomm MSM SDCC at 0x00000000a0500000 irq 98,0 dma 7
<6>[ 7.969512] mmc0: Platform slot type: MMC
<6>[ 7.969665] mmc0: 4 bit data mode disabled
<6>[ 7.969909] mmc0: 8 bit data mode enabled
<6>[ 7.970031] mmc0: MMC clock 144000 -> 50000000 Hz, PCLK 96000000 Hz
<6>[ 7.970275] mmc0: Slot eject status = 0
<6>[ 7.970428] mmc0: Power save feature enable = 1
<6>[ 7.970550] mmc0: DM non-cached buffer at ff00d000, dma_addr 0x0fffb000
<6>[ 7.970825] mmc0: DM cmd busaddr 0x0fffb000, cmdptr busaddr 0x0fffb300
<6>[ 8.136444] mmc0: new high speed MMC card at address 0001
<6>[ 8.137908] mmcblk0: mmc0:0001 SEM04G 2.10 GiB
And with your second
~ # cat /proc/kmsg | grep 'mmc0:0001'
cat /proc/kmsg | grep 'mmc0:0001'
<6>[ 8.137908] mmcblk0: mmc0:0001 SEM04G 2.10 GiB
Looking good I think?
Click to expand...
Click to collapse
So looks like the internal memory isn't fried.
Which recovery are you using? clockworkmod or 4EXT Touch Recovery (I much prefer the latter, but you're probably using CWM if you have to use that superwipe zip).
4EXT Touch, I just use the superwipe zip out of habit.
What would you suggest I do to wipe the slate clean? It certainly seems like something is corrupted. When trying a Wipe Data/Factory Reset in 4EXT I get this.
Formatting /data
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p26
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p26
Formatting /cache
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p27
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p27
So it seems mmcblk0p25 through 27 are all failing out.
Since you're using 4EXT, I recommend repartitioning your phone to see if that fixes it. If not, then hopefully you just have a bad download and redownloading the ROM can fix it.
Sent from Spaceball One.
Nada.
After full wipes of everything (including the SD card) I did manage to get rid of the mmcblk errors for a time (they came back, usually after a reboot or too many actions in recovery). After flashing Mimicry I do manage to get past the HTC screen, but I get an endless boot animation. Pulling the battery during an endless animation prompts a normal startup (including the "Android is Upgrading" dialog), but it begins the endless boot animation again after completion.
Ughhhhh. I feel like my salvation is in adb, but i'm just not very familiar with the commands that might solve this....
Edit- whoa whoa whoa, we may have something here. Give me a few.
Edit- I managed to achieve the "Welcome" screen of Mimicry. But I got a barrage of process.acore/Calender/Contacts/Googleeverything force closes.Then it froze.
Edit- And I may have full boot. Going to let it sit for 10 minutes before I attempt anything. What scares me is I never determined the cause of this.....
if your still having problems and the above didn't fix anything do the following.
boot to recovery and reformat everything to ext4 (execpt the fat32 partition of sd card)
try flashing a stable rom again
if problem still persists then I suggest booting into fastboot and flash your spl again (assuming you have eng s-off)
fastboot devices
(if you see yours continue)
fastboot -w
fastboot flash bootloader XXX.img
fastboot reboot bootloader
(of course rename the XXX to whatever you have image named, have it in the same folder as fastboot.exe)
now boot to recovery, you may need to reformat recovery, go for it, now flash rom of choice
hope your phone is working without all this but if not the above should do the trick
Sent from my HTC Vision using xda premium
Nospin said:
Hey everyone, today I started having some really horrible problems with my G2. It started when I woke up and noticed that the phone was powered OFF, which was not normal. Pressing the power button was unable to turn it on, but pulling the battery worked fine.
Everything was normal for a couple hours, but then I began getting random freezes. At least they seemed random, but I was able to reproduce it fairly consistently by turning the screen off and then on a few moments later.
Ok I thought, haven't wiped in a while (Currently on Mimicry 1.4 using 4EXT recovery), so in I went to the Superwipe. Flashing the Superwipe failed. This is the error I see (and have NEVER seen before)
E:Error in /sdcard/SuperWipeG2+ext4.zip
(Status 1)
Installation aborted
So I just went in and did a basic wipe everything and reinstall the ROM, unfortunately this leads to just a white HTC screen.
Flash a Nandroid? Nope, below is the error I see
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p25
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p25
Error while formatting /system!
I feel like somehow my file system got corrupted, but unlike using Odin with the Vibrant I'm unsure how to fix this on the Vision. Anybody?
Click to expand...
Click to collapse
Try flashing a ROM that formats your partitions for you try ICS "Blackout" it makes it easier
hey ! i have the exact same problem! did u manage to fix ur phone ? how?
*fingers crossed*
I'm having the same problem. Whenever I try to reboot phone it goes to htc, reboots and goes to htc, then boots into recovery. Can't get past it.
I've tried connecting the phone via usb but it won't show up under adb devices.
I've wiped the phone and re-partitioned sd card.
Will be trying a different rom and seeing if that helps.
Any help other than that?
Edit: Flashed MIUI v4_2_8_10__VISION_CLEAN and phone booted fine. Must've been the TrickDroid rom I was trying to flash.
did any one tried this? any progress?
error in /sdcard/superwipeg2+ext4.zip (status 1)
For this error in ClockWork Recovery I did this:
CHANGE OPTION: "toggle script asserts" then the wipe script on my T-Mobile HTC Vision G2 acting correctly like it should and rebooted correctly instead of throwing the error above.
Hope this helps!
Hello
I've just recently got a HTC Desire HD. I've rooted it with the help of aahk-11092012.
I've installed CM 7 first and it all worked fine.
A bit later I installed JellyTime ( http://forum.xda-developers.com/showthread.php?t=1778202 ).
This worked fine for about 2 days. Than, suddenly, the phone crashed. The screen went black and I the phone would not accept any key presses anymore. So I removed the battery and started the phone again. It hung on the htc-logo.
I was still able to get into recovery but it complained that it could not access the cache partition.
Upon further investigation i found out, that the partition table of the internal memory is broken. I could not mount or format any of the partitions. Factory reset just complained about that it could not access the partitions.
So i switched off the phone and started adb.
dmesg shows this
Code:
<6>[ 7.630279] rs30000048:00040000 rs30000048:00040000: setting system clock to 2012-11-23 20:51:58 UTC (1353703918)
<4>[ 7.630645] Warning: unable to open an initial console.
<6>[ 7.630828] Freeing init memory: 156K
<6>[ 7.739837] mmc0: new high speed MMC card at address 0001
<6>[ 7.740966] mmcblk0: mmc0:0001 M4G2DE 2.10 GiB
<6>[ 7.741851] mmcblk0: p1 p2 p3 p4 < p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 >
<4>[ 7.767913] mmcblk0: partition table partially beyond EOD, truncated
<4>[ 7.769744] mmcblk0: p28 size 42495 extends beyond EOD, truncated
<3>[ 7.816436] init: Unable to open persistent property directory /data/property errno: 2
And if I try to use parted I only get errors:
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print list
print list
Error: Can't have a partition outside the disk!
(parted)
The same error is show if I try to remove partitions.
When I try to write a new disklabel it just hangs there forever. No error message (also not in dmesg) or anything like this.
How can I fix the partition table of the internal memory and what do I have to do to get it to work again?
This is Desire thread, aka Bravo
U should post this in the Desire HD thread, no doubt u will get an answer there.
Sent from my HTC Desire
Oh sorry... Should have taken a closer look.
@moderators: please close/delete this thread.. i've opened a new one in the right part of the forum
Hello. At first I want to ask if any of you working on Gingerbread experienced "Force Close" loop on restart for many applications (for repair required format /data backup or restore via CWM)?
I spent a lot of time to get to the source of the problem, because even though the system version of JB's okay, it's GB is more stable and does not eat much RAM, moreover is much better for multitasking in the current situation.
Get to the point. The problem appears to be that from time to time, as in any filesystem, in the user partition (/ data) errors may occur that normally are repaired at boot time by e2fsck program. Moreover, in the case of my own and yet another piece of Samsung I8160 e2fsck is unable to complete repairs due to an error related to the library supports file systems.
When I connect ADB in recovery mode, umount /data and issue the command "e2fsck -y -f /dev/block/mmcblk0p5" the mass of errors are discovered, and repairing starts, but of course does not end well:
Code:
"FILESYSTEM WAS MODIFIED,
invalid argument passed to ext2 library while rewriting block and inode bitmaps "
...which tells that filesystem was modified, but the wrong argument was passed to the filesystem library and the correct structure not been written completely, resulting in an even greater massacre on the partition. It is not difficult to guess that the system will not boot normally (/data mounted in read only mode), and applications will start the "Force close" loop .
The story is not only on my phone, but also in other arts. After formatting it for a few weeks until you see the error and restart. After restoring a backup via CWM has usually only until the next reboot.
Has anyone experienced this? Is anyone able to solve this problem?
I tried stock ROM and kernel, reflashing, substitution of e2fsck binaries and libext2fs libraries. Chip does not have bad blocks, checked by dd command and calculated CRCs.
Please don't reply "do full wipe," not considering myself an Android noob, I want to solve the problem.
Have you ever tried to do filesystem check on Gingerbread and did it work for you? "e2fsck -y -f /dev/block/mmcblk0p5" ?
Can you restart the phone without problem?
Can you try if it works now?
Part of the log with dmesg at boot:
Code:
<4> [10.306152] EXT4-fs warning (device mmcblk0p5): ext4_clear_journal_err: Filesystem error recorded from previous mount: IO failure
<4> [10.306213] EXT4-fs warning (device mmcblk0p5): ext4_clear_journal_err: Marking fs in need of filesystem check.
<4> [10.331756] EXT4-fs (mmcblk0p5): warning: mounting fs with errors, running e2fsck is recommended
You can try
1.Boot in recovery mode(NEED CWM-Based Recovery).
2.Select "mounts and storage".
3.Select"mount /data".
4.Reboot.
But It's not really solve the problem because you need do these step when you boot your phone everytime, but this is the only solution(as I know) until who have better solution......
Sorry for my poor English......OTL
This is not possible...
Sent from my GT-I8160 using xda app-developers app
Maybe reflash your fw with odin you can download your fw at sammobile
I tried this, flashing JB and GB back. It seems that CWM 5 formatting procedure is buggy. When I format thru my own binary mke2fs this error is gone. So...
Sent from my GT-I8160 using xda app-developers app
Attention! I know there are already some posts about it. If you find it annoying PLEASE ignore this post. Do Not bother to comment. Just Ignore it.
Disclaimer: I'm Not Responsible for Anything. If you wish do it as your own risk.
These things are goning to happen
For the reason of Formating data will be lost - So backup everything to PC
You'll lose google sign in, contacts, messages, social networking etc. - backup before proceed
Things You will Need
Drivers - For Detecting your device properly (Sony Users can use "Flashtool")
ADB - Use mini version. You don't have to install Android SDK for this
USB Cable
CMD - Use "ConEmu" or "Console2" more flexible than cmd. Provides easy copy of text from console
TWRP Recovery - Download it from twrp site
I'm Going to put this assuming you as Novice. So I'll Explain as much as possible
Step 1 -
* Installing flashtool
Download flashtool from the link given above
Install flashtool as usual.
Then from "C:\Flashtool\drivers" install drivers for your phone.
Open Flashtool (Keep it open for this step)
* Phone Detection
After installing drivers - enable "USB debugging" in phone. Connect your phone to pc see if it is detected or not.
If not try doing uninstall & installing flashtool again. If it is not detected yet I shall say "STOP" forget partitioning. Look in the forum for a solution. Fix it and then continue.
If your device detects properly in normal mode then proceed
Turn off phone. Connect USB cable to PC and while pressing volume up button and connect cable to Phone.
A blue light will flash & Driver will install if necessary. In Flashtool window it will show fastboot mode after detecting phone. If not "STOP" try again. Fix it and then continue.
Step 2 - Install mini adb
If you have downloaded mini ADB.exe version install it to root directory of PC for example C:\ADB. Double click to open the .exe when ask for location of install show to C:\ADB
If you have downloaded Mini ADB as .zip/.rar file. Right click on the file> Extract to > C:\ADB
Step 3 - TWRP
Download from the link given above.
Move Downloaded TWRP image such as twrp-3.0.0-0-nozomi.img to ADB folder (C:\ADB)
Rename the file to twrp.img.
(Optional) - also move rom.zip for later use. If you want to install a fresh rom.
Step 4 - Kernel flash
* Flashing Kernel by flashtool
Turn off phone, conncet it to pc while pressing volume + button
open flashtool> flash device (thunder icon)> fastboot> Flash kernel> select twrp-3.0.0-0-nozomi.img
See the flashtool log if it says "OK" then Reboot/start the phone. Otherwise redo this step.
When starting press volume + - button several time it will bring up recovery screen.
* Flashing kernel into Fota Kernel.
You have to Upload the recovery.img into your phone & Flash to do this: Open Command Window by default in windows it is called cmd.
Opening Command window
* By CMD:
Go to ADB folder> Press Shift + Right Mouse button> Open Command window here> it will open a command window
* Using Other console software:
ConEmu or Console2 can't be open this way. You have to use "cd" command to go to adb folder.
In conEmu or console2 write: cd your adb location for example: cd c:\ADB
Now write these in command window-
adb push twrp.img /sdcard/ <<<<---- this will copy twrp.img to your phone sdcard. Remember to change recovery name to twrp.img
dd if=/sdcard/twrp.img of=/dev/block/mmcblk0p11 <<<<---- this will write twrp to FOTA block of your phone.
** Rebooting phone will bring up recovery screen. In the recovery screen it will ask you whether system should be put into "Read only mode". Don't do that.
** In twrp Go to Mount> deselect System, data, cache, Sdcard and read only system > select again > again Deselect
Before You Procced Any Further Make Sure:
PC can detect your device Normally
PC Can detect device in Fastboot mode
If you really want to do this or not?
Step 5 - Partitioning
[*] Connect USB Cable while in TWRP recovery. (It dosen't matter which screen you are in just Stay in twrp recovery)
[*] Open ADB Folder> Open CMD or ConEmu from there (See Step 4 - opening command window section for this)
Write these command
adb shell <<<<----- it will start ADB
then write
fdisk /dev/block/mmcblk0 <<<<----- It will enable partitioning commands to work
This will bring some info & It will Look Like this:
The number of cylinders for this disk is set to 973824.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):
**NOTE** " Command (m for help): " will show automatically if you successfuly entered in partitioning mode if not redo steps again.
Now we need to see each block of default partition and detect SDCARD & Internal Storage: Write this-
p <<<<<<----- This will print or show each partition. Command (m for help): already be there just write p for example Command (m for help): p
It will show this:
Code:
[HIDE]Disk /dev/block/mmcblk0: 31.9 GB, 31910264832 bytes
4 heads, 16 sectors/track, 973824 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 65 2048 f0 Linux/PA-RISC boot
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 65 81 512 4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 129 768 20480 48 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 769 954240 30511104 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 785 800 512 46 Unknown
/dev/block/mmcblk0p6 833 928 3072 4a Unknown
/dev/block/mmcblk0p7 961 1056 3072 4b Unknown
/dev/block/mmcblk0p8 1089 1184 3072 58 Unknown
/dev/block/mmcblk0p9 1217 1376 5120 70 Unknown
/dev/block/mmcblk0p10 1409 1664 8192 83 Linux
/dev/block/mmcblk0p11 1665 2176 16384 f0 Linux/PA-RISC boot
/dev/block/mmcblk0p12 2177 34944 1048576 83 Linux
/dev/block/mmcblk0p13 34945 42944 256000 83 Linux
/dev/block/mmcblk0p14 42945 108480 2097152 83 Linux
/dev/block/mmcblk0p15 108481 954240 27064320 c Win95 FAT32 (LBA)
Command (m for help):[/HIDE]
STOPCOPY THESE PARTITIOIN INFO TO A TEXT FILE AND SAVE IT. EVERY PHONE HAS SEPERATE PARTITION SETTING. IF ANYTHING GOES WRONG IT WILL BE NECESSARY TO SEE AND GIVE EXACTLY SAME VALUE TO RECOVER ORIGINAL PARTITION.
Identifying SDCARD & Internal Storage - From the print output we see lots of blocks and lots of data. But We need to know which partition belongs to which.
/dev/block/mmcblk0p14 <<<---- this is the Internal Storage. See the blocks column its like 2 GB (2097152)
/dev/block/mmcblk0p15 <<<---- this is the SDCARD. Blocks look like it's around 27GB and there is also win95 FAT32 type partition.
As we need to increase Internal Storage Size. From where these extra storage will come from? Well, it's from SDCARD. That's why SDCARD & Internal Storage has to be deleted and repartition again. As for delete do this
d <<<<<---- for deleting partition Command (m for help): d
Partition number (1-15): <<<<---- it will ask which partition you want to delete?
15 <<<<<---- First delete mmcblk0p15
then again give
d <<<<<---- for deleting partition Command (m for help): d
Partition number (1-15): 14 <<<<----- Deletes Internal storage partition which is mmcblk0p14
You can give P command to see whether those partition deleted or not
Command (m for help): p
Now creating new partition for Internal storage. Write
n <<<<<----- this is for creating new partition Command (m for help): n
this will show this:
Code:
First cylinder (769-954240, default 769):
To Understand properly look at this table you generated earlier using p command:
Code:
start end
/dev/block/mmcblk0p13 34945 42944
/dev/block/mmcblk0p14 42945 108480
/dev/block/mmcblk0p15 108481 954240
Here mmcblk0p13 started ended at 42944. mmcblk0p14 started at 42945. And mmcblk0p14 ended 108480 just after that mmcblk0p15 started at 108481. Ending is beginning. Quiet easy actually.
So when asked to put first cylinder: you take mmcblk0p13 end value plus 1 write that in first cylinder. for example if End value of mmcblk0p13 is 2 then first cylinder will be 3. if mmcblk0p13 end value is 1000 then first cylinder value will be 1001. if mmcblk0p13 End value is 42900 then first cylinder Value will be 42901. I think that's enough for understanding.
First cylinder (769-954240, default 769): 42945 [<<<<----- in my case mmcblk0p13 end value is 42944 so first cylinder value is 42945 this will not be same for you. press Enter]
Then it will ask for Last Cylinder value: There is three way to put this in kilobyte, in megabyte or in default size but we have to put + sign before size. For example: +100000k or +4000M or +2000000. Easiest one will be using Megabyte. 4000 megabyte is 4 gb, 8000 is 8GB. By default when partitioning system keep some space for recording partition info that's why we never get full size in Memory card, Hard disk, Flash drive etc. This will also be applied here. If you give +4000M command you will get 3.6GB or 3.7GB Something like that. So calculate give some more to keep it even if you want.
Code:
Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240):
I want my internal storage is around 4GB So I Gave
+4192 <<<<----- Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240): +4192
Now The SDCARD Partition. To create This partition we have to give First cylinder value. As we don't know mmcblk0p14 has which Ending cylinder value. We have to generate the partition table and see. So give the P command.
Command (m for help): p <<<<--- shows partition table. Note the END Value of mmcblk0p14. suppose End value is 170875
Give n command
Command (m for help): n <<<<--- new partition for SDCARD or mmcblk0p15. It will ask for first cylinder
First cylinder (769-954240, default 769): <<<<---- put noted Ending value of mmcblk0p14 + 1 here. (170875+1 = 170876) press enter
Now Last cylinder: Just press enter it will take default
Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240):
Change partition type for SDCARD by giving these command.
Command (m for help): t <<<--- t for change partition type.
Partition number (1-15): 15 <<<--- It asks which partition to be changed give 15 for SDCARD/mmcblk0p15
Hex code (type L to list codes): c <<<--- FAT32 from win95 for most compatibility give c to choose this. Do not change to any other system type it might not recognized by PC or even your device. Press enter.
Writing all these changing permanently
Command (m for help): w <<<--- give w for write permission. if successful you'll see these message.
Code:
The partition table has been altered.
Calling ioctl() to re-read partition table
**NOTE** if you see something like below line. Partition is not altered or changed. Redo all steps carefully and properly.
Code:
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
Step 6 - Formatting Partition.
Your Partition table redefined or resized only. No Formatting has done yet. Your phone do not read memory unless its properly formatted.
If you wish to use stock or stock based rom DO NOT CHANGE PARTITION FORMAT. It will cause problem even brick. Search around forum for more info about this.
Changing Partition format is good for the Upgraded OS version like lolipop 5.0.0 or 5.1.1 or Marshmallow 6.0.0 to work some features. But not always necessary.
Disconnect Phone from pc> Boot into recovery
Code:
TWRP> Wipe> Advance> Format data, cache, system and SDCARD.
If you want to change Format>
Code:
From TWRP>Wipe>Advance>select system or data or cache> change file format> select desiered one> change.
Nice tutorial...but how to push ROM back to phone
payjo73 said:
Nice tutorial...but how to push ROM back to phone
Click to expand...
Click to collapse
If you Mean Stock ROM Use flash tool.
If you mean a zip file of custom rom use adb command:
adb push something.zip /sdcard/
Hey, I have done the exact same procedure and flashed oneofakind ROM. Now my internal SD card seems to be messed up.
Camera app throws error "insert an SD card before using" error & Gallery app throws error "no SD card detected error"
Kindly HELP !!
ps : I already had TWRP installed, had root access & unlocked bootloader. So started from Step 5 with partitioning steps ! I can see the internal storage of 19GB in settings though.
pps : I searched google extensively but most related solutions had external SD card being used so I couldn't reconcile it with my device (Xperia S)
C0D3FR34K said:
Hey, I have done the exact same procedure and flashed oneofakind ROM. Now my internal SD card seems to be messed up.
Camera app throws error "insert an SD card before using" error & Gallery app throws error "no SD card detected error"
Kindly HELP !!
ps : I already had TWRP installed, had root access & unlocked bootloader. So started from Step 5 with partitioning steps ! I can see the internal storage of 19GB in settings though.
pps : I searched google extensively but most related solutions had external SD card being used so I couldn't reconcile it with my device (Xperia S)
Click to expand...
Click to collapse
You need to allow permissions for letting the app access storage in settings of phone.
Mirhawk said:
You need to allow permissions for letting the app access storage in settings of phone.
Click to expand...
Click to collapse
Thanks.
How do i do that ? I never had to do it earlier. I have installed the ROM multiple times in past year.
C0D3FR34K said:
Thanks.
How do i do that ? I never had to do it earlier. I have installed the ROM multiple times in past year.
Click to expand...
Click to collapse
It's in Settings, Apps>Settings icon at top right> App permissions. This error occurs with Marshmellow ROM's as they some new pemission features. You can check out the link in My signature for more related info
Bro i was following this tutorial but i don't know how mobile got disconnected ?.. Now mobile got damaged it can't able to switch on.. Even pc not detecting.. What should I do now.. Please help???