GSM Shop GSM Shop
GSM-Forum  

Welcome to the GSM-Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features.
Only registered members may post questions, contact other members or search our database of over 8 million posts.

Registration is fast, simple and absolutely free so please - Click to REGISTER!

If you have any problems with the registration process or your account login, please contact contact us .

Go Back   GSM-Forum > Other Gsm/Mobile Related Forums > GSM Programming & Reverse Engineering


GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Reply
 
LinkBack Thread Tools Display Modes
Old 07-07-2012, 07:40   #1 (permalink)
Product Manager
 
TestBox2's Avatar
 
Join Date: May 2008
Location: Ukraine
Age: 45
Posts: 3,234
Member: 772096
Status: Offline
Sonork: 100.69222
Thanks Meter: 8,277
Smile Raw2Riff [Jtag FF converter]


Hi by all.

some time we need converted file from ORT to Riff or Medusa to Riff and back.


As i see raw_format used 512 byte nand + 16 byte spare .

I ask about why 512 + 16 when NAND Block 2048kb.

- thet mean 1 block read by jtag by 4 tact.





FileFormat exp:


RAW = block + spare + block + spare + block+ spre + block + spare. [until end]

RIFF = block + block + block + block + spare + spare + spare + spare. [until end]








Here is main algo of converting Raw2Riff:
Code:
 
Procedure MsgBox(Msg: string);
var Capt: String;
begin
Capt:=(' Res = ');
MessageBox(0, PChar(Msg), PChar(Capt), MB_DEFAULT_DESKTOP_ONLY);
end;
 
Procedure _progress(begining,finalise:cardinal);
 begin
   Form1.Pp.MinValue:=0;
   Form1.Pp.MaxValue:=100;
   Form1.Pp.Progress:=round((begining/finalise)*100);
 end;
 
function _ExtractFileName(const FileName: string): string;
var
  I: Integer;
  _FileName:String;
begin
_FileName:=ExtractFileName(FileName);
  I := LastDelimiter('.' + PathDelim + DriveDelim, _FileName);
  if (I > 0) and (_FileName[I] = '.') then
    Result := Copy(_FileName, 1, i-1) else
    Result := '';
end;
 
procedure TForm1.Button1Click(Sender: TObject);
var
loader1,loader2,loader3:TStream;
loader4:TmemoryStream;
n,nsize,i:cardinal;
s,data:string;
begin
//Raw2Riff
s:=(ExtractFileDir(Application.ExeName));
OpenDialog1.InitialDir:=s+'\';
OpenDialog1.Execute;
if OpenDialog1.FileName='' then exit;
Edit1.Text:=_ExtractFilename(OpenDialog1.FileName);
loader1:=Nil;
loader2:=Nil;
 
loader1:=TFileStream.Create(OpenDialog1.FileName,fmOpenRead);
loader2:=TFileStream.Create(_ExtractFilename(OpenDialog1.FileName)+'_2riff.bin',fmCreate);
loader3:=TMemoryStream.Create;
loader3.position:=0;
nsize:=512;
repeat
s:=''; SetLength(S,nsize);
n:=loader1.Read(s[1],nsize);
if n<>nsize then begin MsgBox('not care = 512 '+inttostr(n)); s:=Copy(S,1,n); end;
loader2.Write(s[1],length(s));
s:=''; SetLength(S,16);
n:=loader1.Read(s[1],16);
loader3.Write(s[1],length(s));
_progress((loader1.position),(loader1.size));
until  ((loader1.position)>=(loader1.size));
 
loader3.position:=0;
s:=''; SetLength(S,loader3.size); 
loader3.Read(s[1],loader3.size);
loader2.Write(s[1],length(s)); 
 
loader1.Free;
loader2.Free;
loader3.Free;
 
end;

ERRORS Correction!

My converter true convert files as cleared parts of nand, and converted dump can be parsed at files sbl, amss ets..


But - something i not know, this is EFS have different spare
checksumm, and converting dump can write by jtag only from 0...to.. end of AMSS.



If any ppls know how to fixed filesystem _spare checksumm . u can finalised my algo to complett jtag flash converter.









  Reply With Quote
The Following 4 Users Say Thank You to TestBox2 For This Useful Post:
Show/Hide list of the thanked
Old 07-07-2012, 09:51   #2 (permalink)
Insane Poster
 
Join Date: Sep 2009
Posts: 73
Member: 1111849
Status: Offline
Thanks Meter: 17
Are you really thinking all nand devices have the same architecture ?
  Reply With Quote
Old 07-07-2012, 17:04   #3 (permalink)
Product Manager
 
TestBox2's Avatar
 
Join Date: May 2008
Location: Ukraine
Age: 45
Posts: 3,234
Member: 772096
Status: Offline
Sonork: 100.69222
Thanks Meter: 8,277
Quote:
Originally Posted by kr0m View Post
Are you really thinking all nand devices have the same architecture ?

Hi, as i know exist two main (Nand + 1NAND) structure, 512 and 2048 PageSize.

And about Jtag - yes, i try look both type.
  Reply With Quote
Old 07-11-2012, 12:30   #4 (permalink)
Insane Poster
 
Join Date: Sep 2009
Posts: 73
Member: 1111849
Status: Offline
Thanks Meter: 17
And what about nand device like micron 512(vid 2C/fid BC) with separated spare area ?
  Reply With Quote
Old 07-12-2012, 19:46   #5 (permalink)
Product Manager
 
TestBox2's Avatar
 
Join Date: May 2008
Location: Ukraine
Age: 45
Posts: 3,234
Member: 772096
Status: Offline
Sonork: 100.69222
Thanks Meter: 8,277
Wink

Quote:
Originally Posted by kr0m View Post
And what about nand device like micron 512(vid 2C/fid BC) with separated spare area ?

As i say jtag fullflash convert working true for 512 and 2024 PageSize

Tested at ZTE MF190 = 512 ,HWU E173 - 2048 and many other modems .

But not mistake Partition_Size with RAW to BIN convertor .



This two dumps i do convert by my JTAG RAW to BIN converter and make parsing Qualcom FFS parts of files, all work fine!



Partition parsing have different explanation:

PageSize = 2048
BlkSize = 131072
PagesInBlk = 64



E173EU1_11.126.56.17.272_ok.bin
Partition detected! - method 1

- Partition in dump detected, start parsing...
---------------------------------------------------------------
Flash size 128MB : $20000
Bad_Block MAP vers : 00000001
Bad_Block counter : 00000000

- Check_NAND ok, No one BAD-Block found!
QCSBL_Size : 0000BB80 48000_dec
OEMSBL_Size : 0003D6DD 251613_dec
AMSS_Size : 00EAA4E2 15377634_dec

- Autoanalyse real size for QCSBL OEMSBL AMSS - ok.
0:MIBIB : Found!
Nand_Page : 00000000 -- start blk num
Nand_Size : 0000000A -- end blk num
Fls_Address : 00000000 - start in nand hex
File_Size : 00140000 - end in nand hex

0:SIM_SECURE : Found!
Nand_Page : 0000000A
Nand_Size : 00000006
Fls_Address : 00140000
File_Size : 000C0000

0:QCSBL : Found!
Nand_Page : 00000010
Nand_Size : 00000004
Fls_Address : 00200000
File_Size : 00080000

0:OEMSBL1 : Found!
Nand_Page : 00000014
Nand_Size : 00000006
Fls_Address : 00280000
File_Size : 000C0000

0:OEMSBL2 : Found!
Nand_Page : 0000001A
Nand_Size : 00000006
Fls_Address : 00340000
File_Size : 000C0000

0:AMSS : Found!
Nand_Page : 00000020
Nand_Size : 00000086
Fls_Address : 00400000
File_Size : 010C0000

0:FOTA : Found!
Nand_Page : 000000A6
Nand_Size : 00000002
Fls_Address : 014C0000
File_Size : 00040000

0:EFS2 : Found!
Nand_Page : 000000A8
Nand_Size : 00000034
Fls_Address : 01500000
File_Size : 00680000

0:MMC : Found!
Nand_Page : 000000DC
Nand_Size : 00000312
Fls_Address : 01B80000
File_Size : 06240000

0:OEMINFO : Found!
Nand_Page : 000003EE
Nand_Size : 00000011
Fls_Address : 07DC0000
File_Size : 00220000












PageSize = 512
BlkSize = 16384
PagesInBlk = 32


MF190S_64MB_04JUL_Mobinil.bin
Partition detected! - method 1

- Partition in dump detected, start parsing...
---------------------------------------------------------------
Flash size 64MB : $4000
Bad_Block MAP vers : 00000001
Bad_Block counter : 00000000

- Check_NAND ok, No one BAD-Block found!
QCSBL_Size : 0000B2BC 45756_dec
OEMSBL_Size : 0003F875 260213_dec
AMSS_Size : 00F2C566 15910246_dec
NANDPRG_Size : 0001D97C 121212_dec

- Autoanalyse real size for QCSBL OEMSBL AMSS - ok.

0:MIBIB : Found!
Nand_Page : 00000000
Nand_Size : 0000000A
Fls_Address : 00000000
File_Size : 00028000

0:SIM_SECURE : Found!
Nand_Page : 0000000A
Nand_Size : 00000006
Fls_Address : 00028000
File_Size : 00018000

0:QCSBL : Found!
Nand_Page : 00000010
Nand_Size : 00000005
Fls_Address : 00040000
File_Size : 00014000

0:OEMSBL1 : Found!
Nand_Page : 00000015
Nand_Size : 00000012
Fls_Address : 00054000
File_Size : 00048000

0:OEMSBL2 : Found!
Nand_Page : 00000027
Nand_Size : 00000012
Fls_Address : 0009C000
File_Size : 00048000

0:AMSS : Found!
Nand_Page : 00000039
Nand_Size : 00000521
Fls_Address : 000E4000
File_Size : 01484000

0:FOTA : Found!
Nand_Page : 00000624
Nand_Size : 00000047
Fls_Address : 01890000
File_Size : 0011C000

0:FTL : Found!
Nand_Page : 0000066B
Nand_Size : 00000040
Fls_Address : 019AC000
File_Size : 00100000

0:EFS2 : Found!
Nand_Page : 000006AB
Nand_Size : FFFFFFFF
Fls_Address : 01AAC000
File_Size : FFFFC000
  Reply With Quote
The Following User Says Thank You to TestBox2 For This Useful Post:
Old 07-13-2012, 16:22   #6 (permalink)
Cheater -Don't Deal with him-
 
Join Date: May 2005
Location: Colombia
Posts: 660
Member: 142645
Status: Offline
Sonork: 100.1604204
Thanks Meter: 239
Donate money to this user


Alexey because you no post .exe aplication converter for alls?
  Reply With Quote
Old 07-14-2012, 11:48   #7 (permalink)
Insane Poster
 
Join Date: Sep 2009
Posts: 73
Member: 1111849
Status: Offline
Thanks Meter: 17
Quote:
Originally Posted by TestBox2 View Post
As i say jtag fullflash convert working true for 512 and 2024 PageSize

Tested at ZTE MF190 = 512 ,HWU E173 - 2048 and many other modems .

But not mistake Partition_Size with RAW to BIN convertor .
Your program will not works with this nand flash with 512 page size too because of separated spare area i have told before.


  Reply With Quote
Old 07-14-2012, 12:11   #8 (permalink)
No Life Poster
 
NiRaV.SoN!'s Avatar
 
Join Date: Apr 2012
Location: India ( Gurukrupa )
Age: 32
Posts: 507
Member: 1753913
Status: Offline
Thanks Meter: 298
Donate money to this user
Arrow

Quote:
Originally Posted by COVVA View Post


Alexey because you no post .exe aplication converter for alls?
Search for X-Parser Free Edition


Edit : Its not converter
  Reply With Quote
The Following User Says Thank You to NiRaV.SoN! For This Useful Post:
Old 07-15-2012, 00:54   #9 (permalink)
Cheater -Don't Deal with him-
 
Join Date: May 2005
Location: Colombia
Posts: 660
Member: 142645
Status: Offline
Sonork: 100.1604204
Thanks Meter: 239
Donate money to this user
Please give me link x-parser free edition to download.. i was searching but no found program .. thanks
  Reply With Quote
Old 08-04-2012, 21:40   #10 (permalink)
Product Manager
 
TestBox2's Avatar
 
Join Date: May 2008
Location: Ukraine
Age: 45
Posts: 3,234
Member: 772096
Status: Offline
Sonork: 100.69222
Thanks Meter: 8,277
Quote:
Originally Posted by kr0m View Post
Your program will not works with this nand flash with 512 page size too because of separated spare area i have told before.

Exept spare - all work fine!
  Reply With Quote
Old 08-04-2012, 21:55   #11 (permalink)
Cheater -Don't Deal with him-
 
Join Date: May 2005
Location: Colombia
Posts: 660
Member: 142645
Status: Offline
Sonork: 100.1604204
Thanks Meter: 239
Donate money to this user
Alexey no is possible:.

Make tool to do compatibility dumps ort,riffbox,medusa,gpgjtag --

Converter files???
  Reply With Quote
Old 09-10-2013, 16:19   #12 (permalink)
Insane Poster
 
Join Date: Apr 2012
Posts: 93
Member: 1750726
Status: Offline
Thanks Meter: 16
This is very interesting. Could you provide some more info about how you found the offsets and distinguish different partitions. I.e. How do you know which is which of MIBIB, OEMSBL, AMSS etc?

I'm trying to extract some FW from memory dump, in THIS thread.

Thanks.
  Reply With Quote
The Following User Says Thank You to E:V:A For This Useful Post:
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting 51xx to 61xx by flashing? Mateusz Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 10 12-18-2001 12:45
can 5130 be converted to dual band? s4sajii Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 4 12-02-2001 12:37
Mbus Converter for Flasher Pat UK Nokia Hardware & Hardware Repair 0 06-24-2001 07:43
.nol .ngg converter topcat Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 1 06-12-2001 18:39
3210 5,36 dont show anything in the screen and EE FF!! makona Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) 0 12-09-2000 07:28

 



All times are GMT +1. The time now is 14:42.



Powered by Searchlight © 2024 Axivo Inc.
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
- GSM Hosting Ltd. - 1999-2023 -
Page generated in 0.23405 seconds with 9 queries

SEO by vBSEO