FORUMS
Remove All Ads from XDA

[WIP] Partitions - memory address listing

1,771 posts
Thanks Meter: 1,144
 
By Blue6IX, Senior Member on 5th November 2011, 06:41 PM
Post Reply Email Thread
Okay everyone. Let's get this all straightened out.

We need a concise listing of what memory address corresponds to what partition.

This is a fantastic idea:
Quote:
Originally Posted by dhkr234

Probably would be a good idea to add a wiki for this device..

...and we'll work up to that. Documentation is my big thing with the device, and what i've been working on more then anything else as far as development goes.

So let's get all the partition information together, and get it set for a reference thread in the dev section. Then we'll graduate up to a wiki that includes this and all the other necessary info.

Here's what I posted in the CWM thread, I just copied it over to get this thread started. I don't have a lot of time in front of the pc right now, but as I get it i'll move people's finding up into the first post and sort it all out.

Thanks in advance for everyone who wants to contribute to this, we need whatever we don't have, verification that what we do have is right, and corrections to anything that's wrong.

----------------------------------------------

Here's what we got so far:

/dev/block/mmcblk0p27 /devlog ext4
/dev/block/mmcblk0p24 /cache ext4
/dev/block/mmcblk0p23 /data ext4
/dev/block/mmcblk0p22 /system ext4
/dev/block/mmcblk0p17 /vendor/firmware/misc vfat
/dev/block/mmcblk0p14 - Boot Splash Screen
/dev/block/mmcblk0p12 - hboot


----------------------------------------------

I'd like to thank dhkr234 and Etn40ff for their contributions thus far.

Quote:
Originally Posted by dhkr234

Just an FYI: With the UNofficial recovery, we could NOT flash Undeadk9's images (at least not the older ones, haven't tried the newer ones). The unofficial recovery would not mount the /system partition via the updater-script. Issuing an "adb shell mount /system" would mount the system partition for us and allow the install to proceed normally.

---------- Post added at 02:42 PM ---------- Previous post was at 02:28 PM ----------

Ah, I think I see where the issue is.....
From CM's updater-script:

Code:
format("ext4", "EMMC", "/dev/block/mmcblk0p22");
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
From Undeadk9's updater-script:
Code:
mount("ext3", "EMMC", "system", "/system");
delete_recursive("/system");
Undeadk9's updater-script *assumes* that the /system partition is formatted, ext3, and clean.

I would say that the CM approach is better. Formatting the bastard ensures that the filesystem is perfect.

Here are some, but not all:

Quote:
Originally Posted by Blue6IX

/dev/block/mmcblk0p22 /system ext4
/dev/block/mmcblk0p23 /data ext4
/dev/block/mmcblk0p24 /cache ext4

/dev/block/mmcblk0p27 /devlog ext4
/dev/block/mmcblk0p17 /vendor/firmware/misc vfat

doubleshot mount points specifically, i've been using them for a lot of adb stuff.

Just thought i'd throw it out as a handy reference.

And:

Quote:
Originally Posted by Etn40ff

which is the partition containing the splash?

---------- Post added at 12:34 PM ---------- Previous post was at 12:11 PM ----------

Self answer: mmcblk0p14

Don't forget:
Quote:
Originally Posted by nbetcher

mmcblk0p31: 000ffa00 00000200 "misc"
mmcblk0p21: 00fffc00 00000200 "recovery"
mmcblk0p20: 01000000 00000200 "boot"
mmcblk0p22: 31fffc00 00000200 "system"
mmcblk0p24: 077fde00 00000200 "cache"
mmcblk0p23: 4aabc400 00000200 "userdata"
mmcblk0p27: 01400000 00000200 "devlog"
mmcblk0p29: 00040000 00000200 "pdata"
mmcblk0p17: 02800000 00000200 "radio"
mmcblk0p19: 01000000 00000200 "adsp"
mmcblk0p18: 007ffa00 00000200 "radio_config"
mmcblk0p25: 00400000 00000200 "modem_st1"
mmcblk0p26: 00400000 00000200 "modem_st2"

Other partitions are accessed only by the radio, hboot, and other low-level subsystems.

In this post:

Quote:
Originally Posted by thrice43

I'm down to try the dd command, but I'll still need a copy of the 1.44.0006 hboot. If anybody has the 1.44.0006 hboot, can you please open a terminal and run

Quote:

dd if=/dev/block/mmcblk0p12 of=/data/local/tmp/hboot.img
mv /data/local/tmp/hboot.img /sdcard/

Then send me the file on you sdcard?

Quote:
Originally Posted by Etn40ff

I messed up a little with strings (1) and file (1). Apparently hboot is stored in /dev/block/mmcblk0p12. If you feel really adventurous you can try to flash a new hboot via dd as you suggested.
I am not 100% sure it will help you: revolutionary hboot (1.44.1107) contains some reference to emapiWlanMac even if it gives an error if you try to use the command.

---------- Post added at 03:29 PM ---------- Previous post was at 02:36 PM ----------

question: where have you got 1.44.0006 ???

I just compared 1.44.0007 (the original hboot) with 1.44.1107 (revolutionary's). They are almost identical: I guess they simply hexedited the significant bits to unlock it (they also changed version number and added the "-Revolutionary-" signature) so none of them will help you change your mac address.

Hboot 1.45.0013 (the latest hboot) is a significantly different beast and might have the desired features but I would not flash it since it will lock your phone again.



I know that HTC's engineering bootloader enables the use of more "fastboot oem xxx" commands, and many of them are missing with revolutionary's bootlaoder


Also, check this thread in general for some more info on mount points:

http://forum.xda-developers.com/show....php?t=1318237

I'm pretty sure there was another post or two describing what some of the as yet unmentioned mount points corresponded to, but I can't remember where they were randomly in threads right now.
The Following 3 Users Say Thank You to Blue6IX For This Useful Post: [ View ] Gift Blue6IX Ad-Free
 
 
5th November 2011, 07:55 PM |#2  
Member
Thanks Meter: 42
 
More
We also know that screwing up partition 19 is "harmless":

cf. http://forum.xda-developers.com/show...2#post19078122
5th November 2011, 09:36 PM |#3  
Account currently disabled
Flag Bonney Lake
Thanks Meter: 4,410
 
Donate to Me
More
Quote:
Originally Posted by Etn40ff

We also know that screwing up partition 19 is "harmless":

cf. http://forum.xda-developers.com/show...2#post19078122

run adb shell mount
The Following User Says Thank You to xboarder56 For This Useful Post: [ View ] Gift xboarder56 Ad-Free
6th November 2011, 02:59 AM |#4  
Techlvr's Avatar
Senior Member
Flag Gilbert, AZ.
Thanks Meter: 12
 
More
Have you collected enough info to make the older roms installable on the new official cwm? Switching the version of cwm when I want to try a new rom is a bit of a pain. I like having ROM manager working.

I just found out how to install the older roms with new recovery but I how it can be made automatic.
6th November 2011, 05:46 AM |#5  
Member
Flag Houston
Thanks Meter: 10
 
More
OMG where was this info a few days ago
Good info to have lol

Quote:
Originally Posted by Jaytex24

Was fooling around with the old data2ext mod I used on my old mt3gs since cm7 is available. Long story short, after installing the .zip and hitting reboot = insta hard brick, as in totally dead (although there is, or was a flickering red light under the trackpad). Win some, lose some amirite. Oh well thats what insurance is for, yay 130.00 deductible from asurion.

I realize it doesnt make much sense to use data2ext, but with a 32g sdcard i figured I could leave all the apps on the internal so I wouldnt have to worry about sacrificing some apps that come with a widget. Plus android is all about fooling around with technology, trial and error I suppose. Oh, I guess I suck, 637 installed apps on my slide :P

Quote:
Originally Posted by Jaytex24

Nope, adb doesn't list the phone as being recognized, all buttons unresponsive. Textbook hard brick, would have similar results by plugging in the USB cable to my flipflops. As long as the device has some life to it I can normally weasel my way out of a brick with adb, but this time its totally dead. I've been lucky tho between my xoom and especially with my mt3gs, guess it was bound to happen eventually, play with fire expect to get burned. I'm sure it has to do with the command line from the original mod altering the /dev/blck of an older device, I didn't make adjustments so that it would write to the correct /block location. So I guess I sent the partition somewhere close to Neptune in relation to the mt4gs build lol

Sent from my Xoom using xda premium

7th November 2011, 01:45 PM |#6  
Account currently disabled
Thanks Meter: 157
 
More
Quote:
Originally Posted by Techlvr

Have you collected enough info to make the older roms installable on the new official cwm? Switching the version of cwm when I want to try a new rom is a bit of a pain. I like having ROM manager working.

I just found out how to install the older roms with new recovery but I how it can be made automatic.

That's trivial. The problem is a less-than-stellar updater-script used in the "older roms". What they did is they mounted the /system partition as ext3 and then wiped the data from them. What CM does differently is it FORMATS the /system partition as ext4 and then mounts it. It is trivial to fix the updater-script of the older "roms" so that they actually work.
The Following User Says Thank You to dhkr234 For This Useful Post: [ View ] Gift dhkr234 Ad-Free
7th November 2011, 01:58 PM |#7  
Blue6IX's Avatar
OP Senior Member
Thanks Meter: 1,144
 
Donate to Me
More
The application of this information goes well beyond simply flashing a ROM, and it was actually a bootsplash issue that finally convinced me this info needed it's own thread.

Directly interacting with any partition needs to be done using it's memory address, not just a generic mount point.

But yes, it will help people having issues with flashing ROMs too.

Hopefully I can get some time soon to map out a few more, otherwise I also hope that others will post up info to contribute as they find them out.

Sooner or later we'll have all the memory addresses mapped out, and what they correspond to.

This brutal gig at work is over for me on friday morning/afternoon, so hopefully i'll get a few days off to recover and sit around working on stuff like this.
8th November 2011, 02:05 PM |#8  
Account currently disabled
Thanks Meter: 157
 
More
Quote:
Originally Posted by Blue6IX

The application of this information goes well beyond simply flashing a ROM, and it was actually a bootsplash issue that finally convinced me this info needed it's own thread.

Directly interacting with any partition needs to be done using it's memory address, not just a generic mount point.

All partitions on the device have a unique device file within /dev/block/ -- use of the memory address is highly inadvisable since it creates the potential to mess up your math and affect prior or later partitions on the device (aka, you could brick it). All interaction should be via the specific device file for that partition.

Just remember that the actual addresses are stored within the partition table and each partition is strictly isolated and protected by the kernel.

'fdisk -l /dev/block/mmcblk0' will output the full list of partitions, but note that HTC has applied their particular brand of insanity and partially broken the partition table. You will note at the top of the output it says "Warning: deleting partitions after 60". Basically, look at the START block for each partition. While the start block INCREASES, the partitions are real. When you see the start block suddenly DECREASE, that partition (and all after it) are duplicates of ones that came earlier -- just ignore them.

Also, 'cat /proc/partitions' will give out the proper list, but won't give you the start addresses.

You can find all of the NAMED partitions listed in /proc/emmc.

Determination of other names may require disassembly of the bootloader since they are NOT provided to the kernel.

Quote:

Sooner or later we'll have all the memory addresses mapped out, and what they correspond to.

The memory addresses ARE mapped out. All we need is to know what they correspond to.

Edit: http://forum.xda-developers.com/show...45&postcount=3

Edit2: Do NOT confuse device files with mount points. They are NOT equivalent. If you've done any C programming, you may know what a POINTER is. When dealing with storage devices and memory, a device file is basically a pointer to a memory address as specified within the device's partition table.

So for example, if the partition table says "partition 3 starting address is 0x12345678, length is 0x1000", then /dev/block/mmcblk0p2 (because they count from 0) is a pointer to 0x12345678 and has a length of 0x1000. So address 0x0 of /dev/block/mmcblk0p2 ***IS*** address 0x12345678 of /dev/block/mmcblk0. Further, the kernel prevents you from writing outside the range of 0x0->0x0FFF, otherwise you may endanger the contents of partition 4.
The Following 4 Users Say Thank You to dhkr234 For This Useful Post: [ View ] Gift dhkr234 Ad-Free
9th November 2011, 03:45 AM |#9  
Blue6IX's Avatar
OP Senior Member
Thanks Meter: 1,144
 
Donate to Me
More
Just wanted to say thanks for that helpful posting. I know that's what the thanks button prints, but I wanted to go ahead and type it too.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes