[DEVS] Understanding aMagldr's nand design, Using 'Last 24 MB of Nand' with android

For general discussion and questions specific to Android development for HTC HD2/Leo
Moderator: Forum Moderator

[DEVS] Understanding aMagldr's nand design, Using 'Last 24 MB of Nand' with android

Postby symbuzzer » Mon Nov 25, 2013 12:25 pm

MANIFEST
- each nand block's size is 128kb so eu hd2's full nand size is 1000 sector.(hexdecimal[512*1024/128])
- magldr's cfg starting 216. block (decimal[2169]*128/1024=66mb). It is on 216, 217 and 218. blocks.
- this area includes ipl, radio rom (which is 23.8mb), (h)spl (which is 0.5mb) and magldr (which is 0.5mb) and other which are I have no idea.
- so android's first partition starts 219. blocks.
- every boot process; spl erases last 24 mb of nand. (which starts from f40 to 1000)(1000-hexdecimal[24*1024/128])
- so we couldnt use first 218 and last 0c blocks. We only can use from 219 to f40 blocks, which is size 420mb for eu. (decimal[f40-219]*128/1024)
- for tmous we have more 512mb too. so we can use tmous nand for android 932mb. (420+512)


THEORY
- with magldr, we can use last 24mb for android too. so we have 444mb usable nand memory for eu, 956mb usable nand memory for tmous.
- probably magldr blocks spl erasing process when phone is booting. but sometimes magldr cant do that. for example if you can use reset button which is under battery cover or flash anyhing from spl via any pc app, last 24mb will erased.
- so if we want to use last 24mb with android, we wont do these. If we do, our last partition (it is data probably) will corrupted.


USING LAST 24MB OF NAND WITH ANDROID
- My Partition Wizard PC tool supports using this feature from version 1.10. It asks if you want or not and it defines nand size with your answer. You can install it from: amagldr-partiton-wizard-v1-0-t185.html
symbuzzer
Forum Moderator
 
Posts: 320
Joined: Mon Jun 24, 2013 7:05 am
Country: Turkey (tr)
Has thanked: 176 times
Been thanked: 168 times

Advertisement
 

Re: [DEVS] Understanding aMagldr's Nand Design, Using Last 24 MB of Nand With Android

Postby Robbie P » Mon Nov 25, 2013 9:01 pm

you could get another 5mb or so deleting recovery partition and using an sd recovery as mentioned here how-to-install-android-on-htc-hd2-leo-t52-40.html#p3170
Also, can the boot partition be deleted? Therefore booting be achieved by using a folder on your sdcard with initrd.gz and zimage in it (see http://forum.xda-developers.com/showthr ... ?t=2523070 to extract using windows) , and booting from magldr ad sd. This would save perhaps another 4mb or so (more if using a 3.0 kernel, since the only working method to boot it via magldr is to add 6mb of zeros to initrd.gz). I think this will work, since magldr works with wp7 in nand without a boot partition afaik. And i have booted a nand (datanoext) rom from sd card before http://forum.xda-developers.com/showpos ... stcount=31 although i still haven't checked whether wp7 is affected.

Edit; I just re-read your OP and noticed
probably magldr blocks spl erasing process when phone is booting. but sometimes magldr cant do that. for example if you can use reset button which is under battery cover or flash anyhing from spl via any pc app, last 24mb will erased.

But i do not seem to remember anyone using the soft reset button (under cover) and it breaking wp7. You need to enable last 24mb memory in order to install wp7, and i am sure that you can use the red/yellow button safely. wp7 memory is raid type memory which extends onto sdcard. If you lose 24mb of it, I am sure wp7 will have serious problems, and i just haven't seen any. Search is down on xda again, and i don't want to risk my wp7 hd2 on testing without backing up first (although the best time to do a backup is exactly when you remember to :lol: )
HTC HD2 (EU)
SPL 2.08. HSPL3;
Magldr 1.13 thanks bepe & Cotulla
On NAND - WP7.8 pdaimatejam v8.8 thanks to pdaimatejam, DFT, YukiXDA, xboxmod etc
On SDcards - Numerous Android SD builds & NativeSD ROMs (Thanks boonbing, Xylograph, securecrt & Almighty tytung!)
Radio 2.15.50.14
User avatar
Robbie P
Recognized Contributor
 
Posts: 154
Joined: Tue Jun 25, 2013 12:04 am
Location: London
Country: United Kingdom (uk)
Has thanked: 127 times
Been thanked: 124 times

Re: [DEVS] Understanding aMagldr's Nand Design, Using Last 24 MB of Nand With Android

Postby symbuzzer » Mon Nov 25, 2013 9:49 pm

Thanks for your detailed comment. Glad to see someones understand me;)

For runing kernel and ramdisk (which are normally loading from yaffs/nand) should work. I have no more knowledge about kernels and kernel based things such us recoveries. If I have, I try to create a second bootlader for magldr which has in-built partition feature;)

For reset key I can say, cotulla gave this examples on his magldr thread on xda if I didnt remember wrong. I didnt tried it, so it is an untested theory.
symbuzzer
Forum Moderator
 
Posts: 320
Joined: Mon Jun 24, 2013 7:05 am
Country: Turkey (tr)
Has thanked: 176 times
Been thanked: 168 times

Re: [DEVS] Understanding aMagldr's Nand Design, Using Last 24 MB of Nand With Android

Postby Robbie P » Mon Nov 25, 2013 10:03 pm

xda search is still down, I can't think why you would use the soft reset button on wp7. If you want to switch off, it is a hardkey and a swipe to confirm. If wp7 goes wrong, it reboots, if it hangs, most people would pull the battery. afaik no instructions have a need to use it, so perhaps no-one has done it yet (except Cotulla). on magldr&android it is necessary to use it before getting dmesg to sd, as opposed to pulling battery.
HTC HD2 (EU)
SPL 2.08. HSPL3;
Magldr 1.13 thanks bepe & Cotulla
On NAND - WP7.8 pdaimatejam v8.8 thanks to pdaimatejam, DFT, YukiXDA, xboxmod etc
On SDcards - Numerous Android SD builds & NativeSD ROMs (Thanks boonbing, Xylograph, securecrt & Almighty tytung!)
Radio 2.15.50.14
User avatar
Robbie P
Recognized Contributor
 
Posts: 154
Joined: Tue Jun 25, 2013 12:04 am
Location: London
Country: United Kingdom (uk)
Has thanked: 127 times
Been thanked: 124 times

Re: [DEVS] Understanding aMagldr's Nand Design, Using Last 24 MB of Nand With Android

Postby symbuzzer » Mon Nov 25, 2013 11:23 pm

Robbie P wrote:xda search is still down, I can't think why you would use the soft reset button on wp7. If you want to switch off, it is a hardkey and a swipe to confirm. If wp7 goes wrong, it reboots, if it hangs, most people would pull the battery. afaik no instructions have a need to use it, so perhaps no-one has done it yet (except Cotulla). on magldr&android it is necessary to use it before getting dmesg to sd, as opposed to pulling battery.


I never used too. And never use a wp7 rom too.
It isnt cleared for me, what instruction you talked about? What is necessary for getting dmesg to sd? (Sorry for that, my english isnt good enough)
symbuzzer
Forum Moderator
 
Posts: 320
Joined: Mon Jun 24, 2013 7:05 am
Country: Turkey (tr)
Has thanked: 176 times
Been thanked: 168 times

Re: [DEVS] Understanding aMagldr's Nand Design, Using Last 24 MB of Nand With Android

Postby Robbie P » Tue Nov 26, 2013 12:38 am

magldr/services/dmesg_to_ sd command dumps the kernel's dmesg log to a file on the sdcard called dmesg.txt
If the battery is pulled the dmesg is lost. It must be stored somewhere in RAM i think, although not sure, since there is either RAM or NAND on hd2, and the dmesg degrades over time. The log should be put to sd as quickly as possible on reboot.
So in android if you have a bootlooping rom for example, and you want a dmesg log for your dev, you must use the soft reset button (under battery cover) to escape the loop and reboot. Then use magldr/services/dmesg_to_sd to get the log on sdcard.

dmesg to sd doesn't work on wp7 since there is no linux kernel to make it (although dmesg.txt is created on sdcard by magldr, it is empty)
HTC HD2 (EU)
SPL 2.08. HSPL3;
Magldr 1.13 thanks bepe & Cotulla
On NAND - WP7.8 pdaimatejam v8.8 thanks to pdaimatejam, DFT, YukiXDA, xboxmod etc
On SDcards - Numerous Android SD builds & NativeSD ROMs (Thanks boonbing, Xylograph, securecrt & Almighty tytung!)
Radio 2.15.50.14
User avatar
Robbie P
Recognized Contributor
 
Posts: 154
Joined: Tue Jun 25, 2013 12:04 am
Location: London
Country: United Kingdom (uk)
Has thanked: 127 times
Been thanked: 124 times

Re: [DEVS] Understanding aMagldr's Nand Design, Using Last 24 MB of Nand With Android

Postby symbuzzer » Tue Nov 26, 2013 12:45 am

Robbie P wrote:magldr/services/dmesg_to_ sd command dumps the kernel's dmesg log to a file on the sdcard called dmesg.txt
If the battery is pulled the dmesg is lost. It must be stored somewhere in RAM i think, although not sure, since there is either RAM or NAND on hd2, and the dmesg degrades over time. The log should be put to sd as quickly as possible on reboot.
So in android if you have a bootlooping rom for example, and you want a dmesg log for your dev, you must use the soft reset button (under battery cover) to escape the loop and reboot. Then use magldr/services/dmesg_to_sd to get the log on sdcard.

dmesg to sd doesn't work on wp7 since there is no linux kernel to make it (although dmesg.txt is created on sdcard by magldr, it is empty)


Ok, I understand now. I dont know that, thanks.
So can we use it safely both os, right?
symbuzzer
Forum Moderator
 
Posts: 320
Joined: Mon Jun 24, 2013 7:05 am
Country: Turkey (tr)
Has thanked: 176 times
Been thanked: 168 times


Return to HD2 Android Q&A, Help & Troubleshooting and General

Who is online

Users browsing this forum: No registered users and 0 guests

cron