Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,363 Members 43,095 Now Online
XDA Developers Android and Mobile Development Forum

[Q] dd command is only writing 64k bits to partition

Tip us?
 
devnulldne
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default [Q] dd command is only writing 64k bits to partition

I have a sprint phone that can only get into bulk mode. I followed this guide: http://forum.xda-developers.com/show....php?t=2582142 and everything works fine except for the dd command. When I write to a partition (well at least aboot and recovery since those are the only 2 I've tried) and then cmp the image to the partition I just wrote to only the first 64k bits match out of the 1MB partition. I've tried ubuntu fatdog and gparted and all have the same problem. What's weirder is that before I borked my phone I used the Zv8_aboot.img that is around and when I just try to rewrite that image it is still only the first 64k bits that match so it's like I'm not writing to the write part of the partition because the img and the partition should match.

I didn't make a backup of the aboot partition before doing all of this so if anyone else has a sprint phone with a ZV8_aboot.img in the aboot partition, and has access to bulk mode can you use dd to make an image of the partition so that I can try to at least get my aboot back? After that I'll try this: http://forum.xda-developers.com/show...2708466&page=2 to get into fastboot.

Also, for anyone else that has no download mode and no recovery you can get into bulk mode by going into factory reset mode. I can't remember the exact button presses for that but after you are in and you hit power 3 times your phone shouldn't reset (you might have to have a custom recovery installed for that to be the case though) but it will end up going into bulk mode; it did for me anyway.
 
devnulldne
Old
(Last edited by devnulldne; 16th April 2014 at 12:11 AM.)
#2  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default sorry for responding to my own thread, the edit of the 1st post just wasn't saving

Alternatively does anyone know an alternative to DD?

Update:
Tried on different computer, tried with my tongue sticking out at a 33 degree angle, tried with ddrescue, always the same thing..... fts
 
devnulldne
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default Update

I finally looked at the entire hex file for aboot and I found that it seems to write everything fine except for the bits between 65537 and 122880, 64k-120k or sectors 129 to 240 given 512bit sector sizes. This seems really odd. I think my only hope would be getting a good aboot from someone's sprint and writing only to the other sectors and not 129 to 240. Even then I might have to figure out if 129 through 240 aren't changed or are somehow purposefully scrambled when written to through hardware.... this is so lame.

So if you have a sprint phone with a zv7 or zv8 aboot and can get into bulk mode I'd very much like a copy of your aboot.img when you do a raw copy of it using dd.
 
devnulldne
Old
#4  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default going to reply to myself cause

I need to help someone in the development forum, so I need 6 more posts to post there
 
devnulldne
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default more self posting

self posting is natural there's no need to be ashamed
 
devnulldne
Old
#6  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default man this is annoying why 10 posts

If anyone can help me to create a loop back device that maps to the sectors in question, I'd appreciate the help.
 
devnulldne
Old
#7  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default ya, i setup a loop back device

losetup -o 65536 --sizelimit 57344 /dev/loop3 /dev/sdi5
 
devnulldne
Old
#8  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default Omg it has worked so far!!!!

setting up a loopback device over the sectors that weren't writing correctly has so far worked for aroot... I think I want to do the same for the recovery and see my phone actually boot first though
 
devnulldne
Old
#9  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default Works but.....

This is going to take forever, I guess I better figure out how to right scripts since I'm manaully putting in 4 commands to go 64k at a time out of 16MB.... fml
 
devnulldne
Old
#10  
Junior Member - OP
Thanks Meter 0
Posts: 11
Join Date: Apr 2014
Default SOLVED

I did it my way..... oh franky

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes