yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy Note I717] darkspr1te:
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
[AT&T Samsung Galaxy Note I717] darkspr1te:
New files for shv-e160l devices here

http://xdaforums.com/showthread.php?p=35088701

Sent from a de-bricked SHV-E160L
[AT&T Samsung Galaxy Note I717] jon1234444:
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
[AT&T Samsung Galaxy Note I717] unoaman:
Any update on fixing procedure??

Any update on fixing procedure??
[AT&T Samsung Galaxy Note I717] SouL Shadow:
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-
[AT&T Samsung Galaxy Note I717] darkspr1te:
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
[AT&T Samsung Galaxy Note I717] darkspr1te:
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.
[AT&T Samsung Galaxy Note I717] darkspr1te:
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

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
[AT&T Samsung Galaxy Note I717] unoaman:
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
[AT&T Samsung Galaxy Note I717] darkspr1te:
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
[AT&T Samsung Galaxy Note I717] unoaman:
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

#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
[AT&T Samsung Galaxy Note I717] darkspr1te:
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

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

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
[AT&T Samsung Galaxy Note I717] darkspr1te:
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
[AT&T Samsung Galaxy Note I717] unoaman:
Thats great ...

Congratulations man
[AT&T Samsung Galaxy Note I717] darkspr1te:
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.
[AT&T Samsung Galaxy Note I717] darkspr1te:
And the basic gui

root will be needed
[AT&T Samsung Galaxy Note I717] unoaman:
Ntt docomo sc-03d dead boot repair without jtag

Ok i have got all the required partition from working phone

can you please guide me to get a cwm recovery with adb or any recovery with adb or fdisk
[AT&T Samsung Galaxy Note I717] darkspr1te:
Bit of Side reading on msm8x60 jelly bean porting, good guide on understanding the system.

http://blog.eda.kr/wp-content/uploads/2012/10/JB_BSP_Porting_Guide6-1.pdf
[AT&T Samsung Galaxy Note I717] darkspr1te:
You will have to search hard for a cwm that matches your phone, i could port one if you can provide me with they recovery.img from your current device but that might not support adb in the kernel, if you have any copy of cwm for your device i can use that to track down another one. i would need again the recovery from that file, not the whole rom, just the img.

darkspr1te
[AT&T Samsung Galaxy Note I717] unoaman:
Ntt docomo sc-03d dead boot repair without jtag

Hi darkspr1te,

i have found the CWM with adb :) and root. but now the problem is the blue animated screen :(. i can boot into cwm recobery but after 30 40 seconds the blue screen animation comes up and the usb connection is lost.

CWM with ADB for SC-03D

SC03D-ICS-KBC-CWM-V6.0.1.2_r11-recovery-odin.tar.md5

Now the next step would be to write a script to zero out the partition ad dd write back the available striped mbn from working phone

the above script should be called by a batch file on windows which would start adb and push the script and mbns to sdcard and then call the script.

the above mentioned effort is all to save those precious seconds available before the connection loss.

What do u say? and can u help me in writing the script and the batch file??
[AT&T Samsung Galaxy Note I717] darkspr1te:
Please post your cwm img or zip file i will patch that to allow us the access we need.
[AT&T Samsung Galaxy Note I717] unoaman:
please find attached cwm image.

please add .md5 in the name at last. I have to remove that to upload it
[AT&T Samsung Galaxy Note I717] darkspr1te:
Ok Pulled the file, I will work on this as soon as i get home, should be 9pm gmt+2 my side, if all goes well i will have a recovery for you in a few hours.

Note, due to the time it takes to flash back my phone it will be 30 mins minimum between tests on my side. I get only one shot then have to restore the phone.

darkspr1te
[AT&T Samsung Galaxy Note I717] darkspr1te:
Sorry for the delays. We had no power last night. Its our rainy season and boy, it can rain here.

Will get back into this today as soon as general power is restored .

Darkspr1te
[AT&T Samsung Galaxy Note I717] sfortier:
Hi!

Did you think the MSM7227 has this functionality?

I have i5500 model that after a flash attempt (developing a MTD onenand driver for msm7227 SOC) the phone only blinks (the backlit turns on and of repeatedly) if I conect the charger, or blink the samsung logo if I try to boot.

I can enter download mode (yes!), can flash a stock rom, but the phone still "blinking"...
[AT&T Samsung Galaxy Note I717] darkspr1te:
I am not sure with the msm7 based soc, but there are a few files floating around for it, the hwx is in latest qpst but i dont know if it supports msimage.mbn based sdcard mode.
[AT&T Samsung Galaxy Note I717] darkspr1te:
Unoaman,

sorry for delay in gwtting back to you. Ive almost finished the recovery image, i had to start from scratch as timing was key. I should be done in a day or so i hope.

I ended up rewriting part of cwm from its source then dumping that for much simpler tricks.

Update as soon as i have further news.
[AT&T Samsung Galaxy Note I717] unoaman:
Sorry, Ignore below message as i dint see your last reply.

:( I assume that general power is not yet restored.

I am just curious about where you are located :)
[AT&T Samsung Galaxy Note I717] darkspr1te:
I am located in Zambia, Africa. Actually power was restored the following day but work and family and faulty telephone lines & just general stuff has delayed me in sitting down to actually finish code. I have also been talking to other dev's.

I've not explained but the issue at hand is we get one shot at this if we are not careful. If i patch the recovery to dd data into the partitions and it shuts down at the wrong time then we could end up in a total brick by way of it crashes part of the way through the boot and never gets out of the loop. my device has been modified via hardware change to ignore the emmc bootloaders completely and go back to QDLoad mode when ever i want, with your device it's not like that, it we crash at the wrong point then it's bricked.

I didnt take that into account when i said a couple of hours, it only occurred when i dead bricked mine and needed to completely flash the bootloaders, I am sorry i didn't explain this sooner.

The least risky option it to go back to QDLoad mode first. this way we get to do it right from the start using the new tools i have developed and thats what i have been planning and testing. the safest way to purpose brick the device to a known state.

Activating sd-card mode again reflash with good partition table using new tools and restore boot correctly.

On the power side of things we normally get 2 to 3 hours of no power every other day from about 6, so by the time i get home the time i would have for coding is useless without power. I have backup power but only enough for lights, my server and the internet gets disconnected during storms, it's quite a light show here as the is a lot of metal deposits.

I will have time by this weekend to finish the testing and have a file by the weekend. I also have been speaking to other devs who are willing to lend a hand in the project as a whole which should speed up some areas of development.

regards

darkspr1te
[AT&T Samsung Galaxy Note I717] keywo:
Hey darkspr1te,

I run a GT-i9210T, essentially an AT&T skyrocket with different front buttons. My phone has the same chipset as the E160L, so if you manage to get that recovery image finished will anything you're able to do be able to help me get my phone unbricked? I'm stuck in qhusb_dload mode and QPST detects my phone in Download mode but I don't know what to do from there to get it unbricked. Would you be able to help me at all?
[AT&T Samsung Galaxy Note I717] SouL Shadow:
Any idea what happened to cause the brick?

-SLS-
[AT&T Samsung Galaxy Note I717] keywo:
I recently put on a stock ROM and then I just did a shut down through the menu and the phone just never booted again. Computer detected in qpst but nothing could be done.
[AT&T Samsung Galaxy Note I717] SouL Shadow:
Interesting. I don't know anything about that device, so I wouldn't know why that would happen. But with any luck you should be able to recover it, unless there's an underlying hardware problem.

-SLS-
[AT&T Samsung Galaxy Note I717] keywo:
Would anyone be able to aid me in recovering it at all? I'd imagine it wouldn't be too similar to the Note.
[AT&T Samsung Galaxy Note I717] SouL Shadow:
Darkspr1te can probably assist, but you may need to be patient. If you read back over the last page or 2 you'll understand. It sounds like it was a bad flash, but what exactly is unclear. Could you provide a link to the file/rom that you flashed so we can examine what it contained? That should help narrow down the possibilities.

Also, any information about the device would be helpful. Specs, manufacturer, any forums on XDA. I'm not familiar with it so anything you can provide will help reduce the time needed to research it.

Finally, if you don't have a recent version of linux, I suggest you download the Ubuntu 12.04 live CD and burn it to a disk. Depending what we learn, you may need to use it for recovery or further diagnosis.

Again, patience is key. It may be recoverable now, but if you try the wrong fix you risk bricking for good.

-SLS-
[AT&T Samsung Galaxy Note I717] darkspr1te:
Latest QPST tools

https://www.dropbox.com/s/lmoeetfl96oac3z/72-V1400-139 (1).zip
[AT&T Samsung Galaxy Note I717] kalain:
Hardbricked SC-03D resurrectted

Thanks you so much, darkspr1te, using your method and my dead hardbricked SC-03D finally comes to life again :D.

After I went and flash some custom rom (docomo stock rom sucks), my phone just dead, it didn't turn on, no matter what. Plugged in my laptop and it showed up as qualcom hs-usb qdloader, I though I just lost my phone then :(.

After googling around and bumped in your thread, with some partition ripped from my friend's phone, finally I can successfully resurrected my dead phone.

The partitions I ripped from my friend's phone are: mmcblk0 (I just want to see the partition table and I can only borrow my firend's phone for a short time), sbl1.mbn, sbl2.mbn, sbl3.mbn, rpm.mbn, aboot.mbn, tz.mbn.

Here is the partition table I get:

# Device Boot Start End Blocks Id System
#mmcblk0p1 1 204800 102400 92 Unknown
#mmcblk0p2 * 204801 205800 500 4d QNX4.x
#mmcblk0p3 205801 208800 1500 51 OnTrack DM6 Aux1
#mmcblk0p4 208801 30777343 15284271+ 5 Extended
#mmcblk0p5 212992 213991 500 47 Unknown
#mmcblk0p6 221184 225279 2048 45 Unknown
#mmcblk0p7 229376 234375 2500 4c Unknown
#mmcblk0p8 237568 258047 10240 48 Unknown
#mmcblk0p9 262144 263143 500 46 Unknown
#mmcblk0p10 270336 271335 500 5d Unknown
#mmcblk0p11 278528 279527 500 91 Unknown
#mmcblk0p12 286720 307199 10240 93 Amoeba
#mmcblk0p13 311296 511999 100352 c W95 FAT32 (LBA)
#mmcblk0p14 516096 522239 3072 4a Unknown
#mmcblk0p15 524288 530431 3072 4b Unknown
#mmcblk0p16 532480 538623 3072 58 Unknown
#mmcblk0p17 540672 741375 100352 8f Unknown
#mmcblk0p18 745472 751615 3072 59 Unknown
#mmcblk0p19 753664 759807 3072 5a Unknown
#mmcblk0p20 761856 767999 3072 5b Unknown
#mmcblk0p21 770048 790527 10240 ab Darwin boot
#mmcblk0p22 794624 815103 10240 60 Unknown
#mmcblk0p23 819200 839679 10240 94 Amoeba BBT
#mmcblk0p24 843776 2297855 727040 a5 FreeBSD
#mmcblk0p25 2301952 6500351 2099200 a6 OpenBSD
#mmcblk0p26 6504448 7122943 309248 a8 Darwin UFS
#mmcblk0p27 7127040 7391231 132096 a9 NetBSD
#mmcblk0p28 7397376 30777343 11689984 90 Unknown

Looking at the partition table I realized that it is slightly different from the one darkspr1te used. For me to be completely a noob, I just went a head, made a new partition0.bin and changed a little bit inside brixfix.sh. And boom, my phone is alive again.

dd if=partition0.binx of=/dev/sdb skip=1 seek=208801 count=21 bs=512

Once again, thank you so much, darkspr1te :D.

P.S: @unoaman: maybe because you were using the wrong partition0.bin file that made your device become unstable. I attached here my partition0.bin file, hope it helps you.
[AT&T Samsung Galaxy Note I717] unoaman:
Can you provide all other files required and the modified fscripts
[AT&T Samsung Galaxy Note I717] kalain:
Here are all the files I used. In your case, because you broke your pit file, maybe you need to manually take it from your friend's phone and put it back to yours by using the script.
[AT&T Samsung Galaxy Note I717] prahasta:
hm.. i confused, really confused coz i'v no basic knowledge for using JTAG, QSPT or else.

My SHV E160K just bricked a weeks ago, can't turn on but my COmputer can recognized it as Qualcomm HS-USB QDloader 9008

darkspr1te told me, with QSPT, there is a chance my deviced can wake up again.

please tell me step by step to do that, what files i nedd. i'v latest QSPT version right now.

thanks in advanced.
[AT&T Samsung Galaxy Note I717] darkspr1te:
Ok. You need to down load a Ubuntu live CD from Ubuntu.com we need this to fix some of your issues. Its a big download but worth it.
[AT&T Samsung Galaxy Note I717] SouL Shadow:
Make sure you get the 32bit version!

-SLS-
[AT&T Samsung Galaxy Note I717] unoaman:
Hi darkspr1te,

I was still waiting for ur magical cwm.

Why this thread is so slow now??