yashsingh1/xdaforums huggingface dataset:
[Galaxy Note GT-N7000 General] AC-DC:
Hi, I've got a problem with my Galaxy S2, I installed a 4.0.4 ROM and when I changed the ROM it wasn't the same anymore.

I installed the ressurection pit and the smartphone get back to life, but it crashes everytime that I try to install a new app at Play Store or when I try to transfer files from computer.

I really need some help here. I used the emmc partition scanner and it showed me that between the 1073 and 2148 block are unusable.

My english is terrible, and I didn't understand some explanation about this, but is it possible to create some pit file that isolates the bad blocks?
[Galaxy Note GT-N7000 General] himanshu_1502:
TY

Thank You
[Galaxy Note GT-N7000 General] vislavskid:
Please help hg42 ,i have bricked my gt-i9100 and after that i used i9100_u1_02_20110310_emmc_EXT4-patched-ums-bricked+1048576-kb.pit and my phone is working again but i have freazes. Standard patched pit didn worked for me.

I have used your app-recovery and when i start emmc find brick it from start its stops "2047 MIB = 2147 and when i run emmc find brick from the end its stop at 4346 MIB = 4558 .

Please tel me witch pit to youse? to avoid this bricked blocks.

Your app-recovery working god on galaxy s2

Thank you for your work
[Galaxy Note GT-N7000 General] crossroadscel:
tnx hg42. I recovered n7000 from soft brick using patch pit.
[Galaxy Note GT-N7000 General] hg42:
same for me...I knew the emmc brick bug and also knew which operations *not* to do, but "something" mysteriously told me I wanted to try something on stock ICS and additionally just for moment I forgot all my knowledge and wiped -> *boom*

**** happens...

wow, finally someone who learns from his mistakes :)

errm, I think I wrote it in the thread starter :) All partitions which get new locations contain nonsense after repartitioning (it's the data from the previous partitions but at the wrong place, administration structures are missing).

For the N7000 partitions mmcblk9 / 10 / 11 = system / data / ums are moved, so they are all kind of unformatted.

Even worse sometimes the nonsense data may irritate Android when it's interpreted as administration tables (theoretically, I never heard of such a case in real life).

well, that's an additional solution. I'm not sure, this may be specific to cm9 only, can someone with non cm roms verify this please?

Usually I would recommend formatting ums in the recovery.

Did you try that before?

Did you have problems?

EDIT: Sorry, I forgot that I also had this problem in the beginning, the cm9 recovery wasn't able to format the internal sd.

Apart from your solution with adb, another possibility is to do this in the booted ROM, where you find an option in settings / storage.
[Galaxy Note GT-N7000 General] brainbang12:
Superbricked GT-P6800...

Hello. I'm a GT-P6800 owner and I also superbricked my tablet :(. I want to try this guide to revive my tablet. But before that, I have some questions to ask:

Q1 - I red the guide that I have to format the cache, data, and internal SD after the repartition. Will it be still safe to use CWM recovery to format them? (Which is the cause of bricking my tablet after wiping the data/factory reset while it was ICS)

Q2 - Since I superbricked my tablet, will it be better and safer if I flash it back to its original stock rom (which is Honeycomb) instead of ICS after repartition?; and

Q3 - if ever I flash it again to ICS, will superbrick happen again or it's only a cause of wipe data/factory reset on CWM?

I hope you can help me . Thanks in advance.
[Galaxy Note GT-N7000 General] MohElShafei:
Thank you so much for the kind wishes, but unfortunately it hangs again over and over. It seems that the scan I did didn't fix anything :(. Now, whenever it hangs with me I just keep restarting the phone till it successfully boots, sometimes it takes more than 3 restarts, others it might take 5 ~ 6 restarts for the phone to work.. Why ??? I don't know.

Just an update.

Thanks.
[Galaxy Note GT-N7000 General] AC-DC:
My problem is almost like yours. But the emmc scanner stops at 1073 and 2148. I think we need a different PIT.
[Galaxy Note GT-N7000 General] hg42:
you should flash a known good ROM together with the PIT in Odin.

A known good ROM would certainly NOT be a stock ICS ROM (you bricked with it, right?).

yes, at least for your first move

it's a littel bit unclear.

Samsung seems to think, that the brick cannot occur when using their software alone.

But there seem to be reports that bricks can also happen with a stock recovery or factory reset of the stock ROM.

Generally, if flashing a stock ICS ROM, you should also flash a custom kernel to be on the safe side.

Please read the instructions of the custom kernel, it should mention to be emmc brick safe.

Note:I have no experiences with your device!
[Galaxy Note GT-N7000 General] hg42:
big changes

I completely rewrote several sections in the thread starter and recalculated all those PITs for all devices.

Because we have the brick finder now, we can use it to quickly select the right PIT file.

Therefore I renamed the PITs by using the two numbers for BRICK_START and BRICK_END.

I also changed the descriptions and procedures to reflect this simplification.

Please reread the thread starter.
[Galaxy Note GT-N7000 General] hg42:
now that I rewrote the thread starter I noticed, that your PITs (i9100) start at 713, so 1073 is covered by the "HOLE".

This PIT should be the coreect one for you:

i9100_u1_02_20110310_emmc_EXT4--patched--brick-between-713-and-2323-MB--DATAFS-moved-by-1536-MiB.pit

The conditions for BRICK_START and _END are true: 713 < 1073 and 2148 < 2323
[Galaxy Note GT-N7000 General] hg42:
as another example I cite a PM:

so with the new PIT files you find that

i9100_u1_02_20110310_emmc_EXT4--patched--brick-between-713-and-4739-MB--DATAFS-moved-by-3840-MiB.pit

fits the conditions:

BRICK_START = 2147 MB > 713 MB and BRICK_END = 4558 MB < 4739 MB

You will loose 3840 MiB = 3840*1024*1024 bytes = 3840*1024*1024/1000000 MB = 4026 MB
[Galaxy Note GT-N7000 General] hg42:
I think I answer publicly on this, too:

you should try the new procedure (find brick with scanner and select PIT via new file naming scheme).

I posted it some minutes before (see thread starter and redownload the new PITs).

You may also send me a PIT for your device, so I can compare it to the other devices. Although it may also work if the PIT isn't exactly for your device, there may be problems in compatibility etc.

If you know your partition table you can also compare it yourself. Look at the pits-stock folder in the zip. The txt file tells how the partition table looks like.
[Galaxy Note GT-N7000 General] AC-DC:
Thank you very much for the help!

I will test this PIT and let's see what happens.

But sometimes the emmc scanner freezes right after it starts, at 1, 2 MB. So I think I have several bad blocks. Is there a PIT that isolates the whole first 3 GB area?
[Galaxy Note GT-N7000 General] brainbang12:
Thanks for your urgent response to my questions, but I don't get your answer on my first question. What I mean is do I have to format the cache, data, and internal SD using

CWM recovery

? If not, how do I format these partitions?

Thanks again!
[Galaxy Note GT-N7000 General] mmola:
I would also expect it to be usable on any ROM. What I meant by booting CM9 was that this command is not available when the phone is in recovery, you need to boot the full system.

I tried that, but since the partition was not mounted the format option was deactivated. I fumbled around quite a bit to avoid installing a stock ROM, and this was the only solution I found.
[Galaxy Note GT-N7000 General] hg42:
unfortunately a ghost has stolen :) my zip files from the thread starter.

May be it came from the long editing session...seems like the forum software may have discarded the attachments?

Anyway, I re-attached the files.

My apologies for any inconvenience...

Good night from Germany...(04:15 here)
[Galaxy Note GT-N7000 General] hg42:
I just repaired the attachments, someone has eaten them...thanks for reporting.

It should be possible to flash the PIT, the boot loader and the kernel/recovery in one single step.

So this may work.

But if something fails and the boot loader isn't restored, you will have a real brick.

1 GANG 0 + 0 blocks 0 + 0 = 0 MB
2 BOOT 0 + 0 blocks 0 + 0 = 0 MB

unused 0 + 8192 blocks 0 + 4 = 4 MB

3 EFS 8192 + 40960 blocks 4 + 21 = 25 MB
4 SBL1 49152 + 2560 blocks 25 + 1 = 26 MB

unused 51712 + 1536 blocks 26 + 1 = 27 MB

5 SBL2 53248 + 2560 blocks 27 + 1 = 29 MB

unused 55808 + 1536 blocks 29 + 1 = 29 MB

6 PARAM 57344 + 16384 blocks 29 + 8 = 38 MB
7 KERNEL 73728 + 16384 blocks 38 + 8 = 46 MB
8 RECOVERY 90112 + 16384 blocks 46 + 8 = 55 MB
9 CACHE 106496 + 204800 blocks 55 + 105 = 159 MB
10 MODEM 311296 + 32768 blocks 159 + 17 = 176 MB
11 FACTORYFS 344064 + 1048576 blocks 176 + 537 = 713 MB
12 DATAFS 1392640 + 4194304 blocks 713 + 2147 = 2861 MB
13 UMS 5586944 + 24133632 blocks 2861 + 12356 = 15217 MB
14 HIDDEN 29720576 + 1048576 blocks 15217 + 537 = 15754 MB
15 0 + 0 blocks 0 + 0 = 0 MB

I think BOOT / SBL1 / SBL2 will be necessary, but I don't know which one is for which functionality.

I would assume:

* BOOT for the first boot phase (samsung/device logo?)

* SBL1 or SBL2 for download mode

* but what's the function of the second boot loader?

Also, BOOT has no size, so I think the offset would be ignored, so this probably cannot be moved.

looks very difficult.
[Galaxy Note GT-N7000 General] AC-DC:
No problem!

But unfortunately it still doesn't work with me. It still keeps freezing and freezing and freezing... I suppose the bad block is still there, maybe at the first 3 GB as I said. What do you think about my case? I am almost giving up. I flashed at least 10 different PITs, so I really don't know what to do...
[Galaxy Note GT-N7000 General] gunmetalrx8:
Help

Thanks for your reply.

Im not sure how to Start the scanning process. I might not have a working recovery. I flashed CWM 6.0.0.8 with Odin over Stock PIT & not able to mount usb storage. So i dont think i can use your Scanner zip files via recovery.

I am attaching supposedly stock PIT of 6200 which i downloaded from Internet. Please see if you can make patched versions of those.

I have ZERO knowledge about partitions.

Thanks again for your help.
[Galaxy Note GT-N7000 General] AC-DC:
Now I understood your point of view. As you said, very dificult... It's a big risk.
[Galaxy Note GT-N7000 General] gunmetalrx8:
Stock P6200 PIT

The Stock PIT for p6200
[Galaxy Note GT-N7000 General] hg42:
in the first phase, fake flashing the scanner is no problem even with cwm on an unsafe kernel because it's no real flashing.

Then, after you flash pit and a gb rom or a safe custom kernel you are on the safe side.

but never flash a stock ics rom alone, you need at least a custom kernel!
[Galaxy Note GT-N7000 General] hg42:
I think you should try emmc scanner to scan all partitions.

Write down those partitions that get a freeze.

Repeat multiple times.

emmc scanner can also be used as a command line tool e.g. from adb. You can extract the executable emmc-scan from any of the scanner zips.

Can be used like this:

adb push emmc-scan /cache/

adb shell chmod a+x /cache/emmc-scan

adb shell /cache/emmc-scan mmcblk0p1

With a little luck your boot partitions are ok.
[Galaxy Note GT-N7000 General] raz-or:
hi hg42,

should the start and end scanner pause at a bad block? just ran the start and it went on for about 20mins and then just rebooted the phone, is it supposed to pause at the bad block before a reboot??
[Galaxy Note GT-N7000 General] hg42:
update

I added the P6200 on request.

This has a MODEM partition in between.

So flashing a P6210 pit on a P6200 would remove this MODEM partition, I think you will loose all phone functionality, then.

A P6800 pit could also work (small differences in partition sizes, e.g. P6800 has bigger FACTORYFS).

For all devices, I added more starting partitions, that is the first bricked partition. So there is more room to optimize, if you have special cases.

The selection of the pit still works by BRICK_START and BRICK_END.

For current schemes the revive procedure remains the same.

Note, in the future other starting partitions may be added, which require to restore them, too.

E.g. a modem partition could be affected, then this also would have to be flashed in Odin or restored by other ways.
[Galaxy Note GT-N7000 General] hg42:
usually, at a bricked block the scanner freezes.

If it counts up to the end of the internal memory or down to zero then you most probably are brick free.

Then you could also try the emmc check app, which scans each byte thoroughly (if you can install and boot your ROM).

Or the dd method in adb, which also scans each byte, e.g.

dd if=/dev/block/mmcblk0 of=/dev/null

if mmcblk0 is your internal emmc device name (like for N7000 etc.).
[Galaxy Note GT-N7000 General] hg42:
that's a problem, I didn't look at before.

If you are unable to mount internal storage via USB on the PC, then you probably have a damaged (or bricked) internal sd.

You could try your external sd, e.g. move file to it via a card reader/writer mounted to the PC.

Even if the internal sd is bricked, you should be able to use the external sd.

You could also try

adb push ZIPFILE /cache/

or something else, but then you need a recovery able to install from other media than internal or external sd.

e.g. TWRP can do this.

For N7000 I can eventually provide a kernel with TWRP recovery.

It is also possible to start the whole scanner manually via recovery.

Another way via adb would be to push the zip to /cache and create a /cache/recovery/command file, which tells the recovery to automatically install this zip.
[Galaxy Note GT-N7000 General] raz-or:
cannot boot, ran forest method to check partitions, 7 and 9 are ok, 10 is no good, tried formatting via recovery, reinstalling stock rom didnt work

will run the scanner again, am sure it didnt get to zero before it rebooted, as it rebooted after about 20mins.

would it be possible to write to a text file so when it crashes, even if it reboots, you can see the start/end values?

---------- Post added at 02:09 PM ---------- Previous post was at 01:15 PM ----------

just did it again, ran from 16gb down, got to around 5gb and then before i realised, it rebooted!

ok re-ran both again, got 1246 and 5083 before it crashed, does this sound like too much? or would there be a bit in between that would be ok
[Galaxy Note GT-N7000 General] gunmetalrx8:
forest1971 may provide me with a Recovery image with Parted funcion & yeah ill try to do the scan process using my External SD. Ill Let you know the result.

Thanks for your active help on this matter.
[Galaxy Note GT-N7000 General] AC-DC:
OK, I flashed the original PIT to do it (I don't know if I had to do it, but I did).

I did it one by one till mmcblk0p12, and I did at least 10 times each one, the only one who freezes is the mmcblk0p10, I waited a couple of minutes and the phone restarted.
[Galaxy Note GT-N7000 General] brainbang12:
Superbricked GT-P6800...

I'm sorry, but I'm not talking about the first phase. I'm asking for the "format partitions" phase which is:

On these last 3 steps (format cache, data and internal sd), do I have to format these partitions using CWM Recovery? If not, how do I format these partitions?

Sorry if I ask you again this question because I just want to make sure before I do this guide. Please help me. Thank you again.. :(
[Galaxy Note GT-N7000 General] hg42:
every emmc brick is different...

I would use the lowest/highest values as brick area.

May be there is some healing effect, but I think it is more in the other direction, for some devices bricked blocks seem to occur in former clean areas. Other devices like mine seem to be very stable in bricked block positions.

Perhaps running the write scanner can stabilize the block assignment.

But there is no valid indicator for this up to now.
[Galaxy Note GT-N7000 General] hg42:
I don't think that the n7000 kernel will work on s2.

You seem to have a brick in efs partition.

I hope you have a backup?

Otherwise you will get headaches...
[Galaxy Note GT-N7000 General] AC-DC:
OK, I flashed the original PIT to do it (I don't know if I had to do it, but I did).

I did it one by one till mmcblk0p12, and I did at least 10 times each one, the only one who freezes is the mmcblk0p10, I waited a couple of minutes and the phone restarted.

I didn't backup the efs partition, but in my external memory there is a folder named EFS_BACKUP with a file named efs_23Aug2012-0236.tar.gz inside, it wasn't me who created this.
[Galaxy Note GT-N7000 General] AC-DC:
Now I flashed the PIT for my phone and the CM9 just for testing. It worked without freezing at least 2 hours. I installed a lots of apps, I believed the problem was gone, but it cames to a moment that freezes, when I was downloading at Play Store. I suppose my phone has another bad block, but I don't know where!!!
[Galaxy Note GT-N7000 General] hg42:
I tried to answer both :)

Yes, format via cwm, but never do that from a stock ics kernel.
[Galaxy Note GT-N7000 General] hg42:
Save the efs backup to your pc!

dd method?

So you are telling me your brick is partly healed now?

Some emmc bricks seem to be moving targets.

I am really lucky that my own brick doesn't hop around.
[Galaxy Note GT-N7000 General] hg42:
from your tests I would assume

mmcblk0p10, which is internal sd.

But play store writes to cache and data I think.
[Galaxy Note GT-N7000 General] brainbang12:
Superbricked GT-P6800...

I got it. Thanks for your answer. I already read your updated post at the beginning. But I also found another problem...

I flashed emmc_find_brick_start.zip on my tablet and freezes at 28Mib=30 ok. I tried it several times but it still stops at that point. My problem is I can't find the right PIT for my tablet if the brick starts at 30.

I also tried to check all partitions using dd commands in adb and my tablet freezed at FACTORY FS and DATA.

What is the meaning of this and what shall I do for it?
[Galaxy Note GT-N7000 General] hg42:
Another strange brick?

Did you really check all partitions with dd, especially that around 30MB?

I cannot imagine why reading one byte at 30 MB should freeze but reading many bytes there works...
[Galaxy Note GT-N7000 General] AC-DC:
I saved the efs backup to my PC now, using your method. When I was installing some apps, the phone freezes. And when I restart, it freezes again. The solution is another ROM and it starts all over again. Is there a help for me?

---------- Post added at 01:10 PM ---------- Previous post was at 01:08 PM ----------

So is there a way to isolate some part of the internal sd? Do you think is there a solution for me?
[Galaxy Note GT-N7000 General] brainbang12:
Superbricked GT-P6800...

Yes I'm 100% sure. I checked all 12 partitions with dd. Everything is fine except for #9 (FACTORY FS) and #10 (DATA FS). If I'm not mistaken, that partition, especially around 30mb would be EFS partition (...correct me if I'm wrong). I checked that EFS with dd and it didn't freeze my tablet, so it means that there are no brick blocks in that partition. But if I check all partitions with emmc_find_brick_start, my tablet freezes at 30. Should I use the PIT with least MB at start? Because the FACTORY FS partition of this tablet starts at 281mb. What do you think? :confused:
[Galaxy Note GT-N7000 General] allexsava:
N7000 OTA Brick

http://xdaforums.com/showthread.php?t=1867068 - this post explains my problem ..and the only solution remains your fix:

After emmc_find_brick_start.zip I get stucked on:

scanning 1167 Mib = 1224 MB ... (picture below)

And now I am waiting emmc_find_brick_end.zip to get stuck

LE: emmc_find_brick_end.zip stuck at:

scanning 3356 MiB = 3520 MB ... (picture below)
[Galaxy Note GT-N7000 General] hg42:
repartitioning irst few partitions

P6800 and N7000 (and others) are equally partitioned for the first few:

name start size start size end
----------------------------------------------------------------------
1 GANG 0 + 0 blocks 0 + 0 = 0 MB
2 BOOT 0 + 0 blocks 0 + 0 = 0 MB

unused 0 + 8192 blocks 0 + 4 = 4 MB

3 EFS 8192 + 40960 blocks 4 + 21 = 25 MB
4 SBL1 49152 + 2560 blocks 25 + 1 = 26 MB

unused 51712 + 1536 blocks 26 + 1 = 27 MB

5 SBL2 53248 + 2560 blocks 27 + 1 = 29 MB

unused 55808 + 1536 blocks 29 + 1 = 29 MB

6 PARAM 57344 + 16384 blocks 29 + 8 = 38 MB
7 KERNEL 73728 + 16384 blocks 38 + 8 = 46 MB
8 RECOVERY 90112 + 16384 blocks 46 + 8 = 55 MB
9 CACHE 106496 + 409600 blocks 55 + 210 = 264 MB
10 MODEM 516096 + 32768 blocks 264 + 17 = 281 MB

the differences begin with the FACTORYFS.

So the following also applies to user anakind (via PM) also having a brick starting at 30MB but on N7000.

PARAM starts at 29MB, so it includes 30MB.

I could create PITs for this case, which means moving all partitions from PARAM to UMS by a variable offset.

I could also do this for KERNEL to UMS, RECOVERY to UMS, CACHE to UMS, MODEM to UMS.

This would allow to skip bricks starting after 29, 38, 46, 55, 264 MB.

The same could be done for other devices with respect to their partition schemes.

BUT, this also means that you have to restore all these additional partitions to some senseful contents.

Some of them would be without problems, some I don't know currently.

Some general thoughts:

* if you have a brick in a partition you cannot create a backup to restore afterwards

* partitions which have stock contents (not personalized) will be easy

* EFS cannot be restored without having a backup,

it contains nearly all really personalized information, with the most important data being the IMEI, which is unique to your phone. You find it printed on a sticker on your phone, but currently no one seems to be able to patch it into a generic copy of the EFS.

* some partitions will be needed to boot into recovery and/or download mode

I would assume BOOT, SBL1 and/or SBL2 are involved.

Some may be needed to boot into both recovery *and* download mode.

Some may be needed only for one of them.

If a PIT would move these, you cannot enter download and/or recovery again, thus your phone is nearly dead and only recoverable by JTAG.

* what about PARAM?

So let's visit partitions one by one:

GANG has zero size in PIT, seems to be hidden in the following unused area
BOOT has zero size in PIT, seems to be hidden in the following unused area
EFS only restorable when having a backup
SBL1 boot loader, probably needed for boot, why we have SBL1 *and* SBL2?
SBL2 boot loader, probably needed for boot, why we have SBL1 *and* SBL2?
PARAM currently I don't know anything about this
KERNEL no prob
RECOVERY seems to be unused on N7000, KERNEL comes with recovery integrated
CACHE no prob, can be formatted
MODEM can be flashed from stock file

SO as a conclusion, before repartitioning these, we have to find solutions for each of them.

Let's collect and discuss information here (or should we make an own thread for it?).
[Galaxy Note GT-N7000 General] hg42:
...and you know how to find correct PIT and revive your phone (after reading OP carefully)?

it's standard behavior for the emmc brick (so I assume that's indeed your problem) and you probably/hopefully have the easier variant of this brick.
[Galaxy Note GT-N7000 General] hg42:
I have added a thread in Android General to collect information about android partitions:

Android partitions list

please add useful info there.
[Galaxy Note GT-N7000 General] allexsava:
No I don't know how to find correct PIT file,and I don't want by mistake to brick my phone more harder..
[Galaxy Note GT-N7000 General] hg42:
I thought I described it unambiguous.

Take the pits*.zip for your device.

The pit file is named like:

...brick-between-BEGIN-and-END-MB--...

Here, your found numbers should be between BEGIN and END.

Naturally you will take the one which is nearest to your numbers.

Apart from that, with all current pit files (for your device) it will not get worse than your current situation. Taking a wrong pit will freeze if the brick still spans into a partition, and taking any pit where the "hole" completely covers your brick will work, but you may loose more space than necessary.