HTC rom partitioning help - Upgrading, Modifying and Unlocking

(was HTC greloc? help)
Hello!
I am working towards a flashable rom for a number of devices to allow use of the internal memory for android (kaiser, polaris, nike, vogue, etc)
What tool is used to partition the flash device? How do you turn on or off the extended rom partition, and could this method be used to set aside 80-120MB of space as a separate partition on the flash, for use by android?
Any help is appreciated!
Thanks!

You see, a typical wm5/wm6 rom is a disk image, with MBR and other traditional stuff. Usually, the bootloader calculates the size of storage area based on the size of the OS image. Not sure you can add an extra partition after rom and storage, but you could create a new partition in the OS part (a typical rom has 2 or 3 partitions, uldr, kernel and imgfs, respectively, so there is one empty 'slot' in the mbr) and let android use it or put android partition to ExtROM.
and yeah, g'reloc is a tool for patching wince binaries to change their virtual addresses, nothing to do with partitioning

great!
So can I just use, for example, fdisk on the .nbh file? or is it on the .nb? I'd be happy to use the extrom for the android partition, just need to set it to 100MB instead of 10...

Or do I need to create a dummy ExtROM.nb file that is the right size with a signature of 900?

Related

RAM dumping

Does anyone know how to make a complete memory dump (RAM) of the XDA, apart from the m? commands. These commands give a memory, hex, text breakdown. What i'm looking for is a command that get's 32MB of data and stores is as 32MB of DATA (the the invoking and storing the dump is obvious, so no tips on those please, i only want the commands get this raw memory dump).
Regards,
René
I just read up on some of the other stuff in here.
Somebody mentioned the XDA has 32MB of RAM "AND!!!" 32MB of flash ROM.
So, is this true? And if so. Does this mean that the organizer data is held in flash ROM allways? (this would in my opinion not be correct with some of the functions of the XDA, but OK). And if so..... How do i make a raw dump of this memory?
Cheears,
René
dumping ram
Hi,
I'm not aware of a means to dump RAM using the bootloader functions. However I'm considering developing something for it. It shouldn't be too hard with a bootloader patch like we developed to get around 5.17 limitations.
What I'm looking for is info on how data is organized in RAM such as the filesystem. The 32 RAM contains semi persistent data while the ROM contains what is needed to reinitialize the device and system binaries. However, as far as I understand, applications you install additionally and any application data is only stored in RAM. Anyone knows how the filesystem works on the lower level? I'm looking to implement a tool that can read such a RAM dump and make sense outof it.
Ok, so i came up with the idea of using the m? functions for dumping the data (what is the difference between those anyway?), into a huge file (you get 80bytes for each 16 bytes of data, so 160MB for a 32MB model and a hellufa lot of time, say 4 hours at 105200), and than parse these back to the original 32MB, based on the hex dump supplied.
As to your question, for which i'd like the answer myself, about the file system: as it's windows, i hope it will be some form of FAT or NTFS, but what i've seen so far, i'm afraid it's the system MS developed for storing their office documents....
Does anyone know if parts of the data are stored encoded/crunched/ encrypted?
Anonymous said:
As to your question, for which i'd like the answer myself, about the file system: as it's windows, i hope it will be some form of FAT or NTFS, but what i've seen so far, i'm afraid it's the system MS developed for storing their office documents....
Does anyone know if parts of the data are stored encoded/crunched/ encrypted?
Click to expand...
Click to collapse
I doubt if its FAT or NTFS, as it needs to handle having its size limitations changed dynamically as the device manages objectstore<->memory changes.
And its all stored compressed.
..Chuck..
Well, I recently managed to work out what RAM belongs to the file system, and dump that ram only. And within that RAM I've found some files, and their compressed data, and used the BinaryDecompress calls to decompress it and verify the contents.
However I still can't work out the overall structure that provides the pointers/identifiers to the location of the files, I just happened to find certain files by searching on the filename (which is stored uncompressed BTW).
Has anyone else been trying this?
..Chuck..

What is Ext Rom ?

I am a newbie and just bought my first PDA phone - O2 Atom
Trying to learn as much about it so that I can fully utilize it.
Reading the posts in this site is my first step.
I know this may sound stupid to the experienced users but
I've been reading posts asking about unlocking the Ext. Rom
What is the purpose of doing this ? What are the additional things I can do if I can unlock my ext. Rom vs just leaving the device "as is" ?
Anyone care to enlighten me ?
When you unlock the ext-rom you can see what's in it? Also you can turn it writeable, so you can do anything you like with it, make a copy of the content first. As it it persistent storage on most devices the content won't be erased by hard-reset.
On my magician for instances the ext-rom is concatenated to the internal storage folder enlarging it from 7 to 27MB.
Regards, M
Basically, the ext (extended) rom includes extra settings like operator network settings, extra operator programs and operator visual customisations. Really, if you are new to this, it is best to leave as-is, as unlocking only allows you to edit the Ext rom, which you will probs not want to do yet.
Thanks all for the info. I guess I need to find out more before I try this.
There seems to be 3 kinds of memory on my device:
1. Storage
2. Memory Card
3. Device (which itself seems to be broken into 2 ? One for programs and another for program storage ?)
One of the reasons I asked this question is because I encountered a low memory warning but when I checked the Settings/memory 1 & 2 still showed lots but on the General tab it showed Storage as .5KB left not sure how to interprete the info.
The memory on your device is called RAM & is devided dynamically, by the OS, in a storage & a program part. When you install programs Via Act.sync & choose default they end up in ram, program files folder, this will cost precious space to run an application. So try to install to SD or storage folder. that's why BS is nice. You can use cabinstl to choose where you want to install when you install a cab directly on your magician.
Got the idea
You mentioned the operator blah blah.. does that means that i can unlock my simcard by unlocking the ext rom?
no extented rom and sim locks are 2 different things
Actually, oltp is a bit mistaking in his description of the memory regarding your specific phone.
The Atom is Windows Mobile 5 device.
On WM 5 phones there are two physical types of memory:
RAM and FLASH.
Unlike in older models, on WM 5 the RAM also called 'program memory' is only used to run programs, just like RAM in your PC.
The ROM or flash memory (slower, but isn't erased when power is lost) is divided in to 3 partitions:
ROM / OS - locked partition where the operating system resides. Only special tools like ROM upgrade utilities can write to this section.
Ext ROM - a locked partition where the operator / vendor of the phone stores some extras which are automatically installed after hard reset. As you already know you can unlock it and use as regular storage. Any data stored there will not be erased during hard reset.
Storage memory - this is the part of internal memory (flash) where you can install apps and store your documents and other files. Just like a PC hard drive.
...
Is there a sticky or a thread somewhere about editing ROM/Ext.Rom?
Thank you.
It's all in the WiKi!

Ext Rom and Exe Rom

Ok I don't want to sound like a retard here but there are a few things that I really want to find out if you guys don't mind.
1). Extended Rom is located in the hidden partition of PPC Devices, that the device installs after a hardreset right? Where is my Device ROM located? The one I flash onto it, is it in the hidden partition or another place(as hidden partition content can be deleted)?
2). What about the ROM files that comes in the *.exe format, those that can flash your device?
3). How do I backup my current ROM to a *.exe format so I can go back if I have to?
Thanks a million!!!!!!
Ok, here you go:
1) It is in a partition of its own, not the same one as extended ROM. And most of it is visible as your windows directory.
2) No such thing. Rom files can be NBF or BIN (also some other NB extensions). If you have an exe file, it is the setup app that has the ROM image stashed some ware (resource maybe). The exe does the work, but it is not a ROM image.
3) As you understand from answer 2 you can't. You can backup your image to SD, but it is somewhat complex and depends on the device and version of bootloader. There are instructions in the WiKi.
Warning!
If you are new to ROM changing you should only use official update and head the warnings about loosing all data, having power connected and battery full during update and not being able to downgrade (without some hacked software).
Also using custom ROM will void your warranty.

Maybe I'm blind...

I've been looking all over about information concerning porting a ROM over to the Herald phone, but I can't seem to find the information that I need. I can cook ROMs just fine, but this still escapes me. I've picked up a few things here and there but nothing conclusive that I can put together. I need some guidance on the department.
On a side note, does anyone know how to bypass the 51.2mb size requirement that the Herald RUU imposes? It seems that any OS down to this size with resize the storage accordingly with the extra space, but if I try to make a smaller ROM, it'll give me a corrupted image error. I can pad the os.nb with nothing using a hex editor before I convert it to a NBH file, but the file size seems to be what actually sets the storage size, not the actual partition table set on the ROM.

How to maximize NAND /data size

All Kaiser owners complain at one time or another about size limitations to the /data partition.
I had asked around about increasing the /data partition to a maximum, keeping the /system partition to a bare minimum.
Well, I figured out a way to maximize your /data partition and still give the /system partition some "wiggle room".
The size of your "androidinstall.tar" file is the key here.
Depending on how it is constructed, you can easily figure out how much room you'll need for the /system partition in one of two ways.
1. Build your kernel with ATools as usual. Give it "normal" settings for now because you'll be changing and installing the kernel once more. Install your build and let it finish. Once it does, open up "Terminal Emulator", usually found as part of the "Dev Tools" app.
In Terminal Emulator you'll need to type "df -h" without the quotes. This detects the filesystem partitions and gives it a "human" number, hence the argument "-h".
You are looking for "dev/block/mtdblock2" and the numbers following.
If you are using the "system_froyo_us_odex" file from SF, then your mtdblock2 "should" read 90.7MB. Other builds are larger or smaller, this is why we're looking at mtdblock2.
You will also notice mtdblock3... this is your /data partition.
Once you have your numbers in MB, you can go back and build your kernel based on the size of your /system partition as installed on the phone, releasing as much room as possible for /data.
2. Going back to the "androidinstall.tar" file, most recently Devs have been combining the "app" folder inside the system folder. In the past, the data folder was separate from the system folder and gave the install a "bloated" size, appearing larger than what actually ends up in the mtdblock2 partition.
Most of these builds are built this way, with a few exceptions.
"Packed" size of "system_froyo_us_odex" comes out to around 87MB as a .tar file, relatively close, but you can't be sure unless the file is unpacked to a new folder.
When I unpack mine, it comes out to 90.7MB.
See where this is going?
I go to ATools and build a kernel based on the actual size of the /system file, plus 1 or 2%. (wiggle room)
I build the kernel with 92MB /system and 10MB for /cache, giving me 112MB for /data.
As long and drawn out as it may seem, I strongly suggest option 1. This will give you the best judge of size vs. kernel build size and is a more accurate measurement.
I have gotten it smaller than that once I stripped KingShui's rom to the bare essentials, around 52mb.
I'm just trying to share my knowledge is all.

Categories

Resources