[SOLVED]-[BRICKED]SHV-E160L Korean model

Status
Not open for further replies.

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
I happen to notice some possible error's in your modded script

Code:
# for windows use md backup
# md backup

#back-up  script
echo "Backing up Bootloaders"
echo
echo " if any of the following fail with errors do no reboot your device, correct the error and re-execute"
echo
adb shell dd if=/dev/block/mmcblk0p2 of=/sdcard/sbl1.mbn bs=512
adb pull /sdcard/sbl1.mbn backup/sbl1.mbn
adb shell dd if=/dev/block/mmcblk0p3 of=/sdcard/sbl2.mbn bs=512
adb pull /sdcard/sbl2.mbn backup/sbl2.mbn
adb shell dd if=/dev/block/mmcblk0p5 of=/sdcard/rpm.mbn bs=512
adb pull /sdcard/rpm.mbn backup/rpm.mbn
adb shell dd if=/dev/block/mmcblk0p6 of=/sdcard/sbl3.mbn bs=512
adb pull /sdcard/sbl3.mbn backup/sbl3.mbn
adb shell dd if=/dev/block/mmcblk0p7 of=/sdcard/aboot.mbn bs=512
adb pull /sdcard/aboot.mbn backup/aboot.mbn
adb shell dd if=/dev/block/mmcblk0p8 of=/sdcard/boot.mbn bs=512
adb pull /sdcard/aboot.mbn backup/boot.mbn
adb shell dd if=/dev/block/mmcblk0p9 of=/sdcard/tz.mbn bs=512
adb pull [COLOR="red"]/sdcard/sbl1.mbn[/COLOR] backup/tz.mbn
adb shell dd if=/dev/block/mmcblk0p10 of=/sdcard/maybepit.mbn bs=512
adb pull [COLOR="Red"]/sdcard/sbl1.mbn[/COLOR] backup/maybepit.mbn
adb shell dd if=/dev/block/mmcblk0p11 of=/sdcard/pit.mbn bs=512
adb pull[COLOR="Red"] /sdcard/sbl1.mbn[/COLOR] backup/pit.mbn
I marked in red that you pulled sbl1.mbn a few times and named it to different files, is it not ment to be /sdcard/tz.mbn /backup/tz.mbn ??
it looks like you forgot to change the sbl1 part for each file and ended up copying sbl1 in many files, if this is the case it would explain you issues and i am surprised that its even booted, shocked even.
please confirm this .

darkspr1te
 

jon1234444

Member
Feb 29, 2012
25
5
0
Just a quick bump to ask if anyone found anything interesting in those files i posted.
I've just about given up, I can't get past the "Image Download Failed. Cookie(if present) not received" error at the emmcswdownload step. tried about 1000 different ways (different drivers, different versions of windows and qpst, hex and mbn files from various sources, tried making my own mbn from stock files) and can't get it to work.

someone has posted this method for the touchpads here: http://rootzwiki.com/topic/36658-tpdebrick-v01/

if you read through it there are others complaining about this cookie issue but there doesn't seem to be any clues on how to get past it, except maybe it has to do with 32 vs 64gb versions.

I think I read somewhere that the .HEX file is only supposed to work on a specific device, yet apparently this one works on the galaxy note and the touchpad? maybe it works on some 8660 devices but not all? maybe it depends on how the device was bricked?

so unless anyone else has any insight, I'm pretty much done here, as I can't seem to get past step one :mad:
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
I've just about given up, I can't get past the "Image Download Failed. Cookie(if present) not received" error at the emmcswdownload step. tried about 1000 different ways (different drivers, different versions of windows and qpst, hex and mbn files from various sources, tried making my own mbn from stock files) and can't get it to work.

someone has posted this method for the touchpads here: http://rootzwiki.com/topic/36658-tpdebrick-v01/

if you read through it there are others complaining about this cookie issue but there doesn't seem to be any clues on how to get past it, except maybe it has to do with 32 vs 64gb versions.

I think I read somewhere that the .HEX file is only supposed to work on a specific device, yet apparently this one works on the galaxy note and the touchpad? maybe it works on some 8660 devices but not all? maybe it depends on how the device was bricked?

so unless anyone else has any insight, I'm pretty much done here, as I can't seem to get past step one :mad:
I've had the cookie not present error a few times, I cannot be 100% sure but it's possible the .hex is not signed for the device(E:V:A's suggestion ) . i don't think it's because of the 16/32gb as the file i have has been used on 32gb model of the 160l. Are you selecting trusted in emmcswdownload?
I often got that same error also due to trying to upload the .hex twice without rebooting, you cannot upload twice with out a reboot and you get that error.
I've been finishing building a new cwm for the 160l devices so not had much chance to go back to my core debrick work.

It has also come to my attention there are two qdload modes, one activated by the iRom pbl and one via sbl1/sbl2.
I hope to further some work in that this weekend, but I have to be honest, where i live it's just come to the rainy season and it's our busy time in our office which has left me little time to do dev work.

when you use emmcswdownload , is the screen setup as follows (see image)
 

Attachments

unoaman

Member
Nov 17, 2011
29
9
0
SC-03d FIXED BUT PHONE HANGS AND SCREEN GOES BLUE AFTER SOME TIME

Hmm. I have same screen behavior "screen go blue from bottom to top in a slow graphic" (This make me sure that there is no hardware fault in phone :eek:) Now answers to ur questions.
where did the loaders come from
"sbl1,sbl2,sbl3,tz,rom,aboot"
Ans: I was lucky that one of my friend had the same phone so i rooted his phone and pulled out the partitions from his phone.
do you get any odin connection ?
Ans: Yes i do get odin connection but it goes away as soon as the screen goes blue.( I have observed that there is no fixed time for screen going blue, i.e it may take five mins or it may go blue in few seconds)

Question in next post -- marked in red
yes i know the modded script was wrong. so i dint used adb pull but after dd of all partition i connected the phone as mass storage and copied all the mbn to my local folder so i assume that all the mbn are correct.

now my few questions
1. yes acc to ur suggestion there is some error, the partition table in mbr/ebr does not match the actual point of stored data but which partition is the problematic one?

2.
Code:
#The following Two lines write back the MBR to sector 0 and EBF to sector 208801
# This is required to restore your partiton table so the the iROM code can find the loaders
dd  if=partition0.bin of=/dev/sdb seek=0 count=1 bs=512 
dd  if=partition0.bin of=/dev/sdb skip=1 seek=208801 count=22 bs=512
i have used the partition0.bin of ur brixfix for my phone. is this correct and the location 208801 for ebr is correct for my device?

3.
Code:
 dd  if=SC03D/sbl1.mbn of=/dev/sdc  seek=204801 count=500 bs=512 
 dd  if=SC03D/sbl2.mbn of=/dev/sdc  seek=205801 count=1500 bs=512 
 dd  if=SC03D/rpm.mbn of=/dev/sdc  seek=212992 count=500 bs=512
 dd  if=SC03D/sbl3.mbn of=/dev/sdc  seek=221184 count=2048 bs=512 
 dd  if=SC03D/aboot.mbn of=/dev/sdc  seek=229376 count=2500 bs=512 
# boot.img only needed if it's damaged on the device, for base ODIN/LOKE interaction you only need sbl1,2,3,rpm,tz files.
 dd  if=SC03D/boot.img of=/dev/sdc  seek=237568 count=10240 bs=512 
 dd  if=SC03D/tz.mbn of=/dev/sdc  seek=262144 count=500 bs=512
 [COLOR="Red"]dd  if=SC03D/pit.mbn of=/dev/sdc  seek=278528 count=500 bs=512[/COLOR]
please see the one in red above. That is the extra intelligence i have used from my side :D
Whats ur opinion? Am i Correct :D
For partition layout for SC-03D u can see this post
sc_03d http://forum.xda-developers.com/show....php?t=1366130

I will wait for ur valuable reply :cowboy:
Thanks

Glad there is progress, The symptoms you are describing bring two things to mind.
1. one or more of the boot loader files are not right for this device, the signing of the files has been accepted but they could be for another device. When i used e120l aboot.mbn the screen was messed up, all other buttons worked but screen was issue.
2. the partition table in mbr/ebr does not match the actual point of stored data, eg, mbr says /dev/block/mmcblk0p3 starts at sector 36 but it really starts at 38 so there is a extra two sectors of data injected into our code chain.

My gut says it's 1. but i included 2 as i've had that issue and it caused the screen to go blue from bottom to top in a slow graphic, it did show the odin mode screen for a fraction of a second.

where did the loaders come from
"sbl1,sbl2,sbl3,tz,rom,aboot"

do you get any odin connection ?

darkspr1te
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
Hmm. I have same screen behavior "screen go blue from bottom to top in a slow graphic" (This make me sure that there is no hardware fault in phone :eek:) Now answers to ur questions.
where did the loaders come from
"sbl1,sbl2,sbl3,tz,rom,aboot"
[SNIP]
dd if=SC03D/pit.mbn of=/dev/sdc seek=278528 count=500 bs=512[/CODE]
please see the one in red above. That is the extra intelligence i have used from my side :D
Whats ur opinion? Am i Correct :D
For partition layout for SC-03D u can see this post
sc_03d http://forum.xda-developers.com/show....php?t=1366130

I will wait for ur valuable reply :cowboy:
Thanks
I am redeveloping my fixing procedure, I've been studying cwm and other recoveries to learn more, if you can wait untill the weekend I will have a script you can run on your freinds phone that will grab everything you need clean and allow you to rebuild your device, missing the errors we are assuming you are getting. It's a WIP right now so i wont post it, last night it bricked my device totally on the software (i still have unbrickable mod in place) but i am back to running again, hence it needs more testing. it ment to function in two ways, backup for device using another phone and produce 1-file bootloader/mbr backup and restore . I want to add sniffing abilities so it can also be used as a dev tool (actually the whole reason i am writing it but to get goal 3 i need 1 and 2 complete :mad: )

darkspr1te
 
  • Like
Reactions: RussianBear

jon1234444

Member
Feb 29, 2012
25
5
0
I've had the cookie not present error a few times, I cannot be 100% sure but it's possible the .hex is not signed for the device(E:V:A's suggestion ) . i don't think it's because of the 16/32gb as the file i have has been used on 32gb model of the 160l. Are you selecting trusted in emmcswdownload?
I often got that same error also due to trying to upload the .hex twice without rebooting, you cannot upload twice with out a reboot and you get that error.
I've been finishing building a new cwm for the 160l devices so not had much chance to go back to my core debrick work.

It has also come to my attention there are two qdload modes, one activated by the iRom pbl and one via sbl1/sbl2.
I hope to further some work in that this weekend, but I have to be honest, where i live it's just come to the rainy season and it's our busy time in our office which has left me little time to do dev work.

when you use emmcswdownload , is the screen setup as follows (see image)
yeah, I've rebooted and everything, and made sure the emmcswdownload was set up right (even tried changing some things just in case)

how do you tell which qdload mode is being activated? maybe that is why it is working for some and not others
 

unoaman

Member
Nov 17, 2011
29
9
0
Any update on fixing procedure??

Any update on fixing procedure??

I am redeveloping my fixing procedure, I've been studying cwm and other recoveries to learn more, if you can wait untill the weekend I will have a script you can run on your freinds phone that will grab everything you need clean and allow you to rebuild your device, missing the errors we are assuming you are getting. It's a WIP right now so i wont post it, last night it bricked my device totally on the software (i still have unbrickable mod in place) but i am back to running again, hence it needs more testing. it ment to function in two ways, backup for device using another phone and produce 1-file bootloader/mbr backup and restore . I want to add sniffing abilities so it can also be used as a dev tool (actually the whole reason i am writing it but to get goal 3 i need 1 and 2 complete :mad: )

darkspr1te
 

SouL Shadow

Senior Member
Jun 17, 2010
466
325
0
Stratford, CT
www.soulshadow.net
yeah, I've rebooted and everything, and made sure the emmcswdownload was set up right (even tried changing some things just in case)

how do you tell which qdload mode is being activated? maybe that is why it is working for some and not others
qhsusb_dload mode is handled by the firmware (sbl3 on secure boot 3 setups) running from the emmc. Under linux it will enumerate all partitions on the phone as sd devices (sda1, sda2, sda3, etc...) this can easily be seen in dmesg output. lsusb will list the usb device as (something, I'll edit this in a few when I get to my computer).

EhostDL is handled directly from the on-chip pbl. I'm not sure how it appears in lsusb, if at all. It also does not support access to the emmc at all. It only allows 1 .hex file to be downloaded to imem (on-chip ram). That .hex file will in turn be executed and it will handle access to emmc, basically providing qhsusb_dload mode.

I'm not sure how the devices would appear in windows.

Also note that ehostdl can only be used once to load a .hex file. After that the device must be rebooted before it can be used again.

Hope this helps, at least a little.

-SLS-
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
Any update on fixing procedure??
Hi All,

I am currently trying to find a bug in my code, part runs in the android itself and this collects the correct partition info, the bug is causing a brick at the moment, i've been at it for two days, taking a break today in the hope of a genius moment.

Will update later

darkspr1te
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
I've just about given up, I can't get past the "Image Download Failed. Cookie(if present) not received" error at the emmcswdownload step. tried about 1000 different ways (different drivers, different versions of windows and qpst, hex and mbn files from various sources, tried making my own mbn from stock files) and can't get it to work.

someone has posted this method for the touchpads here: http://rootzwiki.com/topic/36658-tpdebrick-v01/

if you read through it there are others complaining about this cookie issue but there doesn't seem to be any clues on how to get past it, except maybe it has to do with 32 vs 64gb versions.

I think I read somewhere that the .HEX file is only supposed to work on a specific device, yet apparently this one works on the galaxy note and the touchpad? maybe it works on some 8660 devices but not all? maybe it depends on how the device was bricked?

so unless anyone else has any insight, I'm pretty much done here, as I can't seem to get past step one :mad:
I Am guessing that your device is in the bootloader section and not the pbl, i've been trying to recreate this myself and i always get this error when i have loaded the hex already or crashed at sbl3/2.
i was looking into the hex file i noticed that there seems to be two floating around, i've attached what i have in one zip, the hex files for 8660 have been named based on the compile(s) file they come from.
I dont know if it will help.
 
  • Like
Reactions: adfree

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
no worries, perl/python what's the difference? :)

but now I am getting new errors :(

Code:
Traceback (most recent call last):
  File "mbrebrdump.py", line 53, in <module>
    mbr()  
  File "mbrebrdump.py", line 16, in mbr
    partition = dict(zip(('boot', 'id', 'start', 'size'), unpack('4I', buf)))  
struct.error: unpack requires a string argument of length 16
Ive done some digging, the error sseem to be related to the number of partitions it searches for, if I change unpack('4I',buf)) to unpack('2I',buf)) if get the same error but with 12 as value, i am guessing it's running out of space.
Try changing it to 5 or six and just see if the error happens again,
I made this change for debugging
Code:
        buf = data[446+(16*n):446+(16*(n+1))]
        [B]print unpack('6I',buf)[/B]
        partition = dict(zip(('boot', 'id', 'start', 'size'), unpack('6I', buf)))
        partition['type'] = "MBR"
for both the MBR and EBR section, note partition bit with MBR, that will be EBR in the next section.

Let me know, I am still trying to compile a program in arm binary/android so i can get the tool i need to automate it. not easy

darkspr1te
 
Last edited:

unoaman

Member
Nov 17, 2011
29
9
0
Ntt docomo sc-03d dead boot repair without jtag

Just a update for u. i have stripped 4GB bin (using dd mmcblk0) from a working sc03d of my friend.
I cross checked the offset of each mmcblk partition i used for dd write back to my phone and they are correct. still wondering what is the problem and why i am getting animated blue screen :(

I hope u have enjoyed ur break ;)

I am waiting for ur wonder fix :p

Hi All,

I am currently trying to find a bug in my code, part runs in the android itself and this collects the correct partition info, the bug is causing a brick at the moment, i've been at it for two days, taking a break today in the hope of a genius moment.

Will update later

darkspr1te
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
Just a update for u. i have stripped 4GB bin (using dd mmcblk0) from a working sc03d of my friend.
I cross checked the offset of each mmcblk partition i used for dd write back to my phone and they are correct. still wondering what is the problem and why i am getting animated blue screen :(

I hope u have enjoyed ur break ;)

I am waiting for ur wonder fix :p

Couple of questions, How are you getting to a point of writing the files back? is it qdload mode again or via odin or dd via linux ?
I still think we have a partition issue, if you are in linux and can see the partitions i would love to see fdisk -l /dev/sd? where ? is drive letter (assuming you back via qdload mode and then applied 8660_msimage.mbn)

darkspr1te

P.s I have been trying to port a program across to android that allows me greater access to the paritions, i feel we need to zero out the partitions and the apply each file anew for dd of=/dev/sd?22 (for example recovery) and not via the sectors, eg skip=49665 , thats what messed me up and gave me the blue screen issue,
another issue i've noticed is that if you pull a bootloader using dd, lets say sbl1.mbn, you always get a 500k file, but in reality the file is only 76k (taken as a sample from i717 loader) i would like to cut the file down to it's original size, and then zero out the blk0px and the write new. sfdisk and new scripts will help.
I also have had issue that fdisk on one version of android gives different number values to another and ubuntu linux. ive been searching for a set standard. also trying to include a possible windows port, but thats not been easy
cheers
 

unoaman

Member
Nov 17, 2011
29
9
0
SC-03d FIXED BUT PHONE HANGS AND SCREEN GOES BLUE AFTER SOME TIME

Answers to your questions..
when my phone was in qdload mode and i applied 8660_msimage.mbn i was able to see the emmc as flash disk in windows then i ripped off all the required partition from a working phone including the pit partition then i modified ur brixfix.sh and enabled to write the boot.mbn and pit.mbn, see below
Code:
 #The following Two lines write back the MBR to sector 0 and EBR to sector 208801
 # This is required to restore your partiton table so the the iROM code can find the loaders
 dd  if=partition0.bin of=/dev/sdb seek=0 count=1 bs=512 
 [COLOR="Red"]dd  if=partition0.bin of=/dev/sdb skip=1 seek=208801 count=22 bs=512[/COLOR]
 dd  if=SC03D/sbl1.mbn of=/dev/sdc  seek=204801 count=500 bs=512 
 dd  if=SC03D/sbl2.mbn of=/dev/sdc  seek=205801 count=1500 bs=512 
 dd  if=SC03D/rpm.mbn of=/dev/sdc  seek=212992 count=500 bs=512
 dd  if=SC03D/sbl3.mbn of=/dev/sdc  seek=221184 count=2048 bs=512 
 dd  if=SC03D/aboot.mbn of=/dev/sdc  seek=229376 count=2500 bs=512 
 dd  if=SC03D/boot.mbn of=/dev/sdc  seek=237568 count=10240 bs=512 
 dd  if=SC03D/tz.mbn of=/dev/sdc  seek=262144 count=500 bs=512
 [COLOR="Blue"]dd  if=SC03D/pit.mbn of=/dev/sdc  seek=278528 count=500 bs=512[/COLOR]
and when the operation was complete, disconnected the phone and reinserted the battery and pressed the power button. The phone gave a short vibration and switched on in odin mode. so i started odin and flased the stock rom which was previously there on phone. phone rebooted and it got stuck on "NTT DOCOMO" logo. So using my prior reading knowledge i reflashed the CWM touch recovery for 717 floating around and cleared dalvik cache and wiped /data. then i rebooted the phone. the phone booted into android os but it was laggy so i thought may be it is due to first restart so i again rebooted the phone and after that the phone never booted into android os and started showing animated blue screen.
I did this only once and am still waiting for ur magical genius solution :)
yesterday i ripped off 4 gb of mmcblk0 of working phone for analysis. sent that file to one of guys having riff box so that he can open that in pit based partitioning utility and give me details. he gave me snap shot of the partition layout. it was having the offset of every partition in hex so i calculated the offset in decimal and compared the "seek" value which u used for dd in above script and i confirm that all the seek values are correct (the green in above code is correct value). I still doubt that if the one in red above is correct.
I dont have any idea about what can be the problem of blue screen. it may be the wrong partition or may be i need to write few more partition like SMD_HDR (the first one) or SSD(but it is all zero in working phone) or may be some other partition. you may throw some lights on this.

My phone can be a lab rat for you to experiment :p
I may again brick it with the wrong pit file (i.e bring it to qdlode) if u want and redo the steps with minor tweaks suggested by u.

please advice. I am still waiting for your magical genius :D


Couple of questions, How are you getting to a point of writing the files back? is it qdload mode again or via odin or dd via linux ?
I still think we have a partition issue, if you are in linux and can see the partitions i would love to see fdisk -l /dev/sd? where ? is drive letter (assuming you back via qdload mode and then applied 8660_msimage.mbn)

darkspr1te

P.s I have been trying to port a program across to android that allows me greater access to the paritions, i feel we need to zero out the partitions and the apply each file anew for dd of=/dev/sd?22 (for example recovery) and not via the sectors, eg skip=49665 , thats what messed me up and gave me the blue screen issue,
another issue i've noticed is that if you pull a bootloader using dd, lets say sbl1.mbn, you always get a 500k file, but in reality the file is only 76k (taken as a sample from i717 loader) i would like to cut the file down to it's original size, and then zero out the blk0px and the write new. sfdisk and new scripts will help.
I also have had issue that fdisk on one version of android gives different number values to another and ubuntu linux. ive been searching for a set standard. also trying to include a possible windows port, but thats not been easy
cheers
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
Answers to your questions..
when my phone was in qdload mode and i applied 8660_msimage.mbn i was able to see the emmc as flash disk in windows then i ripped off all the required partition from a working phone including the pit partition then i modified ur brixfix.sh and enabled to write the boot.mbn and pit.mbn, see below
Code:
 #The following Two lines write back the MBR to sector 0 and EBR to sector 208801
 # This is required to restore your partiton table so the the iROM code can find the loaders
 dd  if=partition0.bin of=/dev/sdb seek=0 count=1 bs=512 
 [COLOR="Red"]dd  if=partition0.bin of=/dev/sdb skip=1 seek=208801 count=22 bs=512[/COLOR]
 dd  if=SC03D/sbl1.mbn of=/dev/sdc  seek=204801 count=500 bs=512 
 dd  if=SC03D/sbl2.mbn of=/dev/sdc  seek=205801 count=1500 bs=512 
 dd  if=SC03D/rpm.mbn of=/dev/sdc  seek=212992 count=500 bs=512
 dd  if=SC03D/sbl3.mbn of=/dev/sdc  seek=221184 count=2048 bs=512 
 dd  if=SC03D/aboot.mbn of=/dev/sdc  seek=229376 count=2500 bs=512 
 dd  if=SC03D/boot.mbn of=/dev/sdc  seek=237568 count=10240 bs=512 
 dd  if=SC03D/tz.mbn of=/dev/sdc  seek=262144 count=500 bs=512
 [COLOR="Blue"]dd  if=SC03D/pit.mbn of=/dev/sdc  seek=278528 count=500 bs=512[/COLOR]
and when the operation was complete, disconnected the phone and reinserted the battery and pressed the power button. The phone gave a short vibration and switched on in odin mode. so i started odin and flased the stock rom which was previously there on phone. phone rebooted and it got stuck on "NTT DOCOMO" logo. So using my prior reading knowledge i reflashed the CWM touch recovery for 717 floating around and cleared dalvik cache and wiped /data. then i rebooted the phone. the phone booted into android os but it was laggy so i thought may be it is due to first restart so i again rebooted the phone and after that the phone never booted into android os and started showing animated blue screen.
I did this only once and am still waiting for ur magical genius solution :)
yesterday i ripped off 4 gb of mmcblk0 of working phone for analysis. sent that file to one of guys having riff box so that he can open that in pit based partitioning utility and give me details. he gave me snap shot of the partition layout. it was having the offset of every partition in hex so i calculated the offset in decimal and compared the "seek" value which u used for dd in above script and i confirm that all the seek values are correct (the green in above code is correct value). I still doubt that if the one in red above is correct.
I dont have any idea about what can be the problem of blue screen. it may be the wrong partition or may be i need to write few more partition like SMD_HDR (the first one) or SSD(but it is all zero in working phone) or may be some other partition. you may throw some lights on this.

My phone can be a lab rat for you to experiment :p
I may again brick it with the wrong pit file (i.e bring it to qdlode) if u want and redo the steps with minor tweaks suggested by u.

please advice. I am still waiting for your magical genius :D
Right, Ive got you now. Yes I think I am right on the issue. What ever you do DONT try and re-brick.

Give me a moment to get my words into order. but what you need to do now is go back to your friends phone, you need to dd each boot partition in a file on the sdcard one by one.

eg sb1 would be
dd if=/dev/block/mmcblk0p1 of=/sdcard/sbl1.mbn

we would need sbl1,2,3 tz, rpm and aboot for now.
then in cwm ( or a adb enabled recovery) we would write back these files to your device which will clean out the blocks that have random data on them.
it could be done using the 4gb file you have but the calc's needed to rip the data out correct are long and a small mistake could bootloader loop.

also a working cwm that includes busybox or fdisk will also allow you to view your current partition table


Here is the block info

Code:
              Device               Boot      Start         End      Blocks           Id     System
/dev/block/mmcblk0p1               1            12801      102400        92      Unknown        SMD_HDR.BIN
/dev/block/mmcblk0p2   *       12801       12863         500           4d      Unknown        sbl1.mbn
/dev/block/mmcblk0p3           12863       13051        1500           51     Unknown        sbl2.mbn

/dev/block/mmcblk0p5           13313       13375         500           47       Unknown       rpm.mbn
/dev/block/mmcblk0p6           13825       14080        2048          45       Unknown       sbl3.mbn
/dev/block/mmcblk0p7           14337       14649        2500          4c       Unknown       aboot.mbn 
 
/dev/block/mmcblk0p9           16385       16447         500            46      Unknown       tz.mbn
so for a clean block all we need is the above partitions

you can zero out each partition before with

Code:
dd if=/dev/null of=/dev/block/mmcblk0p?
then copy each bootloader back to a clean partition.

Thanks all i can really add.
also confirm each partition id matches the above, if not let me know, dont try and change them.


Another possible solution is to put the 4gb file online and i pull it and dump on my phone, from there i could play with each file to find out which is the culprit and repair that one, but my guess is aboot.mbn but thats a guess.

darkspr1te
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
Finally!!,
I finally managed to statically compile util-unix for arm.
This is a big step for automation, it also gives me a common tool i can use on the linux side for further developing a debrick solution.
I needed a tool on both linux android and ubuntu side that gave the same output , and that i could script easier.

other than cm10 it's the second thing i've manged to compile correctly for android.

I have also started on the gui for the backup side. the idea is that you download that onto phone to create a backup based on the device , it then creates a debrick package for the target phone thats had 8660_msimage applied.

darkspr1te
 

darkspr1te

Senior Member
Sep 24, 2012
930
555
123
Here some screen shots. Giving me the data i really needed. Also, as ive now cross compiled lsblk it gives us the correct blkid for cm10 /etc/vold.fstab
Ive ported sfdisk,lsblk,blkid.
The one issue is these tools dont support gpt tables.
uploadfromtaptalk1355249573284.jpg
uploadfromtaptalk1355249610007.jpg
uploadfromtaptalk1355249639149.jpg


Sent from my SHV-E160L using xda app-developers app
 
  • Like
Reactions: RussianBear
Status
Not open for further replies.