Results 1 to 2 of 2
  1. Jackalo's Avatar
    Posts
    23 Posts
    Global Posts
    35 Global Posts
       #1  
    I'm in the process of converting an old Sprint 755p of mine over to Verizon for a buddy, and after reading for days about how to do it, and after quite a few experiments, I think I finally understand how it all works.

    RomUpdater.prc is what does all the magic, but I need to have the binary files from the 755p VZW updater on Palm's site. I was able to extract the ROM from the multiple *.pdb zip files with Grack's RomTool, but I can't find a way to extract the IPL's and such from their little *.pdb prisons.

    Anyone know how to extract binary data from the *.pdb format?
  2. Jackalo's Avatar
    Posts
    23 Posts
    Global Posts
    35 Global Posts
       #2  
    I eventually found T3.jar on Shadowmite's forum, and after some retooling, I made it a little more dynamic. For those that come after me looking for this solution, simply compile this java code and run it in a directory with the PDB files.

    Code:
    /***
     * T3_allfiles
     * based upon T3_APR.java from Shadowmite's forum
     *
     * This file will extract a binary file from it's
     * Palm PDB prison.  Just drop this in the directory
     * that contains the *.pdb files, and run it.  It'll
     * get them all.  Well, mostly.  See next.
     *
     * This file is NOT made to extract the rom image.
     * Use Grack's RomTool for that.
     */
    
    import java.io.*;
    
    public class T3_allfiles
    {
    	/* Toggle this to show step-by-step console debug */
    	static boolean debug = true;
    
    
    
    	public static void main( String[] args ) throws Exception 
    	{
    		File directory = new File( "./" );
    		String[] files = directory.list( new PDBfilter() );
    
    		for( String individualFile: files )
    		{
    			/* trim .pdb from filename so we can export the original file */
    			zipOut = new BufferedOutputStream( new FileOutputStream( individualFile.substring(0,individualFile.length()-4) ) );
    			pdb2(individualFile);
    			zipOut.close();
    		}
    	}
    
    
    
    	/* Starting here, this is taken verbatim from T3_APR.java */
    	static OutputStream zipOut;
    
    	static void pdb2(String file) throws Exception 
    	{
    		RandomAccessFile in = new RandomAccessFile(file, "r");
    		in.skipBytes(76);
    		int numRec = in.readShort();
    		int[] toc = new int[numRec];
    		for (int i=0; i<numRec; ++i) 
    		{
    			toc[i] = in.readInt();
    			in.readInt();
    		}
    		for (int i=0; i<numRec; ++i) 
    		{
    			in.seek(toc[i]+4);
    			int blksize = in.readInt();
    			byte[] buf = new byte[blksize];
    			in.read(buf);
    			zipOut.write(buf);
    		}
    	}
    	/* This is the end of T3_APR.java */
    }
    
    
    
    class PDBfilter implements FilenameFilter
    {
    	public boolean accept( File dir, String name )
    	{
    		if ( new File( dir, name ).isDirectory() )
    		{
    			return false;
    		}
    
    		name = name.toLowerCase();
    		return name.endsWith( ".pdb" );
    	}
    }

Posting Permissions