yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Firerat:
yes, purely because I assumed all would be 'laid out' in the same order.

also, that dmesg output has extra fields at the begining , so as it stands it will simply do nothing (the script will abort )

However, I believe I could make it compatible

can you supply a raw dmesg?

mount -a
dmesg > /sdcard/pulsedmesg.txt

I have since made a 'test' script which I can run on my linux

#################################################

for anyone interested its attached ( the next release will be based on it )

you can run via updater-script, passing test option ( instead of boot or recovery)

or on your linux box.

if on linux box, you need

symlinks for mkbootimg unpackbootimg, in your working dir , pointing to relevant bins ( they should be in your sdk )

and dump_image needs to be a executable script in your PATH

#!/bin/sh
cp Images/{1}.img ${2}

( assumes Images/ is in your working dir )

put recovery.img and boot.img in Images/

optionally include mtdpartsmap.txt in working directory

then run the attached script with two options test dmesg.txt

eg
sh ../patchbootimg.sh test pulsedmesg.txt

it will dump everything to a dir <discovered board name>_CustomMTD

at spit a tarball to sdcard/

diff patches welcome ( and yeah, I should get all this stuff on to github for the same reason )

Note, this will not do anything interesting don't pester for support on it

if you haven't a clue what the stuff below #######################

means, you don't need it
[G1 Android Development] bigboidomo:
Anyone else having nandroid problems

Did I catch you having fun? *slaps*
[G1 Android Development] Firerat:
nope

consider defining your "nandroid problem"

because I can't quite get a fix on your mind, and it looks like someone removed the trojan which was pulling your logcats and recovery logs for me.
[G1 Android Development] bigboidomo:
Ummm trojen what!?!?!? And the issue was nandroid froze halfway through

Did I catch you having fun? *slaps*
[G1 Android Development] Firerat:
I was hinting that you should post your recovery log

I can't take a proper look at it at the moment,

But post and I can look at when I can ( or someone else can take a look )
[G1 Android Development] bigboidomo:
nevermind i wiped and redid everything nandroid works

Did I catch you having fun? *slaps*
[G1 Android Development] Xx12thANG3LxX:
Hey firerat,

So I just installed recovery and boot. Nothing else. And by default got 117mb data. In order to customize this. I have to put the files fr 138b and that other text file on cyanogens site. And run them in terminal. And I'm taking it I have to either do a fresh wipe and flash recov and boot again. Or fastboot erase before I run these in terminal? Or can I go ahead and put these text files on sd card and run them while parted already? Only thing that's confusing me a bit.

repost edited ( oh i figured it out) sorry for my r tard question. nevermind

sent from my superfroyo dream
[G1 Android Development] izzy001:
Ok what's the max you can put the txt file to???
[G1 Android Development] Firerat:
on a g1 you have 210mb, with 2mb cache ( the minimum ) you have 208mb ( 207.9 ) to share between system and data

you should probably stick with system 90mb ( since this is the max size a rom will be )
[G1 Android Development] bigboidomo:
OK so all I do is flash the Auto patch and I wont have to flash boot patch everytime I upgrade Rom or theme?

Sprint Htc Hero

CM6 Froyo 2.2

Firerats recover mod 368 Internal Memory

Uncapped Kernal

Overclock to 710

Collin_ph battery tweak

Envy Port Theme

I Love My Phone
[G1 Android Development] Firerat:
no

you *must* patch boot in someway

the AutoMTD just patches the ROM to patch the boot, it just saves a step

recovery patcher patches recovery with custom mtd as per defaut ( 90 2 ) or the sizes in /sdcard/mtdpartmap.txt

boot patcher patches boot with custom mtd as per the running recovery

AutoMTD builds the boot patcher into a ROM ( for convenience )

if you flash a new rom or kernel and it says nothing about MTD then you *must* flash the boot patcher.

maybe one day I might be able to hack together a recovery which will do everything for you

first I have to learn c and kernel hacking and get the msm_nand modules to do cmdline parsing ( as modules they don't , which I thought was odd )

but tbh, that isn't a priority ,, its quite simple to use the 'patchers'

much higher on my list is making it more compatible with other phones, for instance the pulse's layout is quite different, and its dmsg looks to be incompatible as well.

so maybe in a week or so I can post to general android dev and open this up to everyone ( mixed feelings about that, you just know that even if I put up a FAQ I will get asked questions that are answered in the FAQ ;) )
[G1 Android Development] bigboidomo:
Thanks for the. Clear up and for this mod u saved me from killing my SD card with a2sd

Sprint Htc Hero

CM6 Froyo 2.2

Firerats recover mod 368 Internal Memory

Uncapped Kernal

Overclock to 710

Collin_ph battery tweak

Envy Port Theme

I Love My Phone
[G1 Android Development] Firerat:
:)

guessing your 'sig' is via tapatalk or what ever its called,

http://xdaforums.com/profile.php?do=editsignature

so we don't have to remember to snip it ;)
[G1 Android Development] Firerat:
Well, said I would do it , and yeah I eventually did

so yeah.. fix it!! :)
[G1 Android Development] cd993:
Hi, I apologise if the answer I seek is an easy one, but I have been trying to solve my problem! I am running Super D 1.9.3 (WG) and successfully extended the partitions however Market downloads fail as result in Download Unsuccessful. Small downloads complete and so this must be a cache size issue. So I tried placing a mtdpartmap.txt on the root of my sd card with the line:

echo "mtd 80 7" > /sdcard/mtdpartmap.txt

...to hopefully raise cache size to 7mb. I mounted the sd card in the console with this command:

echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file

...and proceded to flash the FR-recovery-v1.5.3-CustomMTD_S.zip but nothing changed. I even, for the hell of it, edited the patchbootimg file from the FR-recovery-v1.5.3-CustomMTD_S.zip by changing the 90mb to 85mb and 2mb cache to 7mb but that didnt work. Please could someone give me some guidance, and again please accept my apologies if Ive done something majorly wrong here. All i want to do it extend my cache enough so market downloads dont fail.

Thanks!
[G1 Android Development] Firerat:
cache should end up as a bind mount with /sd-ext/cache ( or /data/cache if sd-ext is not mounted )

the script is installed in /system/etc/init.d

as far as I remember this should work with superd 1.9.3

but

if you change the defaults in patchbootimg, then you must delete /sdcard/mtdpartmap.txt , tbh its just easier to edit mtdpartmap.txt
[G1 Android Development] wxsunny:
Great Job,Firerat!

I've make my G1's data space 117M successfully.It's really great.

And I have a question.

If it is possible to make the 28M space saved from the cache as swap or even part of RAM?

I think that would be a more effective way for the improve of the performance.

:):)
[G1 Android Development] Firerat:
this question has cropped up before

I don't advise using mtd as swap,

Its possible but I won't tell you how to do it
[G1 Android Development] wxsunny:
You mean using mtd as swap will make a damage to MTD?
[G1 Android Development] cd993:
Hi many thanks for the response!

So just to be clear, how do I edit the txt file, do I first create one with that certain line of text in it, then place it on the root on my sd card?
[G1 Android Development] lbcoder:
Yes, that is exactly what he means.
[G1 Android Development] Firerat:
yeah, just write it using notepad , vim , notepad++ and save in plain text to /sdcard/mtdpartmap.txt

the script will convert it to unix format, so don't worry about that

another option is to do it in recovery console/adb ( or in your current rom )

mount /sdcard
echo "mtd 85 7" > /sdcard/mtdpartmap.txt

if you want to write a second line, use >> instead of >

Or,

cat > /sdcard/mtdpartmap.txt << "EOF"
mtd 85 7
aio remount
EOF

if your on a CM rom, you might like to use vi

vi /sdcard/mtdpartmap.txt

or nano

nano /sdcard/mtdpartmap.txt

you will probably prefer nano
[G1 Android Development] cd993:
many thanks for that, will try it out!

Update: worked perfectly, after resizing the cache my market downloads no longer instantly fail!

Cheers!
[G1 Android Development] raven_raven:
I tried it on Dwang some time ago and it also had problems with Market, after downloading few percents it was aborting download. After resizing cache to 10 mb everything worked fine, so I assume that Donut do not like bind mount of cache.
[G1 Android Development] Firerat:
hmm

busybox mount -o rw,remount /system
echo "/system/etc/init.d/06BindCache" >> /system/bin/custom_init

reboot and you will have a working cache bind mount
[G1 Android Development] wrsg:
ran the custom mtd patch last night using the procedure you described, just wanted to check if it looks like it has worked, attaching my df log, please confirm if it looks right? i have a 256mb apps2ext partition on the card also.

Filesystem Size Used Available Use% Mounted on
tmpfs 47.6M 0 47.6M 0% /dev
tmpfs 47.6M 0 47.6M 0% /mnt/asec
/dev/block/mtdblock3 90.0M 77.2M 12.8M 86% /system
/dev/block/mtdblock5 89.8M 51.2M 38.5M 57% /data
/dev/block/loop0 3.9M 3.9M 0 100% /system/xbin
/dev/block/mtdblock4 30.0M 1.1M 28.9M 4% /cache
/dev/block/mmcblk0p2 229.0M 19.3M 197.5M 9% /sd-ext
/dev/block/mmcblk0p2 229.0M 19.3M 197.5M 9% /data/app
/dev/block/mmcblk0p2 229.0M 19.3M 197.5M 9% /data/app-private
/dev/block/vold/179:1
7.1G 6.7G 446.4M 94% /mnt/sdcard
/dev/block/vold/179:1
7.1G 6.7G 446.4M 94% /mnt/secure/asec
[G1 Android Development] Firerat:
nope, sorry that didn't work..

data is still 89.8

cache is still 30

block4 is mounted as /cache, not /dev/cache

this is the kind of thing you should have

( been messing about so at the moment I have no apps at all on internal

which is at least reminding my why I try to keep my key apps in internal as its slooooow with everthing on sd :( )

Filesystem Size Used Available Use% Mounted on
tmpfs 47.7M 0 47.7M 0% /dev
tmpfs 47.7M 0 47.7M 0% /mnt/asec
/dev/block/mtdblock3 85.0M 83.4M 1.6M 98% /system
[B]/dev/block/mtdblock5 122.8M 61.6M 61.2M 50% /data[/B]
/dev/block/loop0 1.0M 1.0M 0 100% /system/lib/modules
/dev/block/loop1 4.0M 4.0M 0 100% /system/xbin
/dev/block/mmcblk0p2 457.4M 157.2M 275.8M 36% /sd-ext
[B]/dev/block/mmcblk0p2 457.4M 157.2M 275.8M 36% /cache[/B]
[B]/dev/block/mtdblock4 2.0M 776.0K 1.2M 38% /dev/cache[/B]
/dev/block/mmcblk0p2 457.4M 157.2M 275.8M 36% /data/app
/dev/block/mmcblk0p2 457.4M 157.2M 275.8M 36% /data/app-private
/dev/block/mmcblk0p2 457.4M 157.2M 275.8M 36% /data/data
/dev/block/vold/179:1
7.0G 5.3G 1.7G 76% /mnt/sdcard
/dev/block/vold/179:1
7.0G 5.3G 1.7G 76% /mnt/secure/asec

the fact that you are able to boot the ROM suggests to me that you didn't flash the recovery patcher or you didn't reboot before flashing the ROM and boot patcher
[G1 Android Development] Foo_Blyat:
Firerat, i just tried reflashing my MTD to my own set values and everything works fine untill i try and flash the boot file, it freezes at extracting patch tools.

so i adb reboot recovery then boot the rom

and get this with df -h

C:\android-sdk-windows\tools>adb shell
# df -h
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 47.7M 0 47.7M 0% /dev
tmpfs 47.7M 0 47.7M 0% /mnt/asec
/dev/block/mtdblock3 91.0M 88.7M 2.3M 97% /system
/dev/block/mtdblock5 372.8M 2.8M 370.0M 1% /data
/dev/block/loop0 4.0M 4.0M 0 100% /system/xbin
/dev/block/mmcblk0p2 457.4M 40.4M 392.6M 9% /sd-ext
/dev/block/mmcblk0p2 457.4M 40.4M 392.6M 9% /cache
/dev/block/mtdblock4 2.0M 776.0K 1.2M 38% /dev/cache
/dev/block/mmcblk0p2 457.4M 40.4M 392.6M 9% /data/app
/dev/block/mmcblk0p2 457.4M 40.4M 392.6M 9% /data/app-private
/dev/block/vold/179:1
7.1G 69.4M 7.0G 1% /mnt/sdcard
/dev/block/vold/179:1
7.1G 69.4M 7.0G 1% /mnt/secure/asec
#

my mtd.txt file was set at "mtd 91 2" so im sure that part worked and /dev/cache is mounted so can i assume it all worked correctly even tho it "didnt"?

EDIT: I went ahead and removed "mtdpartmap.txt" from my sd card, fastboot wiped system, reflashed mtd recovery and boot and all went fine this time. not sure what the issue with my "mtdpartmap.txt" file could have been but that def was the cause of the freezing at extracting patch tools.
[G1 Android Development] Firerat:
yeah that all looks ok, I wonder where it froze ..

I'm planing on re-writing quite a bit of the script, I can make it a lot neater and include better logging

but yeah, it looks ok
[G1 Android Development] Foo_Blyat:
i edited the post right after ur reply. when i reopened my "mtdpartmap.txt" before deleting it i noticed that it looked like

mtd 91 2 aio swap

instead of

mtd 91 2
aio swap

either way, i just ended up using the default 90 - 2 and plan on running your AIO script manuelly thru terminal.
[G1 Android Development] wrsg:
thanks dude, that worked, no idea what i missed 1st time round, but was sure i had done it in the order you mentioned on the OP
[G1 Android Development] AustinAce:
Same here gonna try what you did by deleting the partmap and erasing system

Edit: Worked :)
[G1 Android Development] redrim:
I also had a Cache error in the recovery after 1st attempt

wiping with fastboot and then reflashing seemed to fix it
[G1 Android Development] Firerat:
nearly forgot...

anyone need a 0.x 10.x compatible kernel for cm6 final ?
[G1 Android Development] Noxxolous:
No sir

but i do need a link to your 2 mtd files in your OP as im on a macbook n no matter how i try 2 dwnload the files they dwnload as a folder n not as zips...PLEASE HELP ME FIRERAT MI BLOOMING G1s BURNING MI've GOT TO PUT THE FIRE OUT :D
[G1 Android Development] Firerat:
try shift+click, or right click save as

or download direct to phone ( they are tiny )
[G1 Android Development] gee one:
First off- thanks to Firerat for all the effort you put into the G1. I am certainly reaping the benefit of your efforts.

I have a question about my configuration. I am using CustomMTD to increase my data partition. Would there be any benefit to also using the All in One patch to run apps2sdext? With CustomMTD, I seem to have plenty of space and don't see a foreseeable need for more. I think that leaving the apps on the phone will prevent lag issues.

Also, my SD card is partitioned with 96MB swap and 512M ext4. I'm not using these right now, so would it make sense to reformat the SD card so that mounting/unmounting is simpler?

I'm running CM6.0.0, 1.33.2005, and Amon Ra 1.7.0.

I pasted the df and free output below. Hopefully, they will be formatted legibly.

Filesystem Size Used Available Use% Mounted on
tmpfs 47.7M 0 47.7M 0% /dev
tmpfs 47.7M 0 47.7M 0% /mnt/asec
/dev/block/mtdblock3 90.0M 80.0M 10.0M 89% /system
/dev/block/mtdblock5 117.8M 70.8M 46.9M 60% /data
/dev/block/loop0 4.0M 4.0M 0 100% /system/xbin
/dev/block/mtdblock5 117.8M 70.8M 46.9M 60% /cache
/dev/block/mtdblock4 2.0M 776.0K 1.2M 38% /dev/cache
/dev/block/vold/179:1
3.1G 562.0M 2.6G 18% /mnt/sdcard
/dev/block/vold/179:1
3.1G 562.0M 2.6G 18% /mnt/secure/asec
/dev/block/dm-0 7.1M 5.4M 1.7M 76% /mnt/asec/com.qualcomm.qx.neocore-1

total used free shared buffers
Mem: 97708 94092 3616 0 1900
Swap: 0 0 0
Total: 97708 94092 3616
[G1 Android Development] Dissonanz:
I'd like a 0.x 10.x compatible kernel for cm6 final! :)
[G1 Android Development] 3linedesigns:
what exactly is the advantage of this mod

will it help my phone run any faster? lol
[G1 Android Development] emalf:
Hi,

I am using a Desire with 2 bad block in the boot partition. I am wondering how I could try this method. I come across your suggestion in the N1 forum for similar problem. But I have no luck on the fastboot command below

All of them return the message FAILED (remote: not allowed)

But since I have a custom recovery in, I can use flash_image recovery <boot.img> in adb shell to flash the boot to recovery and start up the phone.

Before that I try manually flashing the boot.img to boot in recovery mode, it is quite strange that I get no error message from flashing boot.img into boot partition or when I am flashing a rom and it reach this step. But the phone will not boot and stuck in loop.

Then I try the method found in replacing boot.img (http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images)

most likely writing the boot partition to all zero

Then I got this message when writing boot.img

I am not quite sure what the above step do besides zeroing the boot.img, as this time, it is like the boot partition is already empty and when I boot the phone, it stay on fastboot mode. But then I think may be the boot partition need to be cleared before flashing. Is there any command to do that in shell ? Since fastboot erase does not seem to be available for the same reason : FAILED (remote: not allowed). Then I try flash boot in debug mode, and it do show the error message now

Since I can only use recovery to boot, your custom MTD method should be my last resort. In this case, I need to modify the boot and recovery size, but it does not seems to be a option in the script. Is there any way I could get this parameters modify to fit my desire ?

Information about my desire's partition:

H.Boot 0.80 - Information captured from the H.boot I am using now.

H.boot 0.92 - Message captured in official 2.2 or I should say h.boot for 2.2, quite sad that there is no rooting method available for this H.boot aside from downgrade it to 0.80

From the about information, I found that may be HTC is addressing this problem for the large boot.img for the 2.2 rom by shrinking the recovery to enlarge the boot. So I guess the custom layout needed to to modify the allocation from the H.boot 0.80 version to the 0.92 version. Could you please tell me how can I do that ?

Best Regards,

Edit: Just notice one problem. As fastboot is not available, after modifiying the partition, it seems I have no way in flashing rom or boot or recovery. Seems I have no option bu wait for rooting method for h.boot 0.92

Edit again while I am going to CM6 from official 2.2: If i have a working boot and working rom (system,data, and etc), Could I shrink the recovery and enlarge the boot leaving only the recovery unuseable ?
[G1 Android Development] Shadowafs8:
Hey guys. When I finished applying this patch, sound does not seem to be playing through the rear speakers, instead it plays through the top front speaker, where you put your ears when making a call and where the notification light comes on. Any idea if this is due to the script or if I can fix this?
[G1 Android Development] izzy001:
Well this is caused by your radio, what's your rom, spl, and radio
[G1 Android Development] Shadowafs8:
My radio version starts with a 1 (I don't know the exact version...the phone is not currently with me), I'm using CM 5.0.7 and I have the SPL before Danger. The radio and SPL are the ones that come with it when you first downgrade it to 1.0 in order to root it. I came to this script because my I had to flash Danger, and I couldn't do to my radio version which would not update because I kept getting errors when I came to the "update .zip" option.

Please help and thanks in advance.
[G1 Android Development] Firerat:
As izzy says its your radio

Please be careful flashing radio

idealy you should flash via fastboot

If you must flash via recovery then make sure its stock, and not cmtd patched
[G1 Android Development] Shadowafs8:
May you please point me in the right direction to install it via fastboot? Can I install it from my memory card or do I need to have it connected with the PC? If I'm using fastboot do I have to reverse the script or take anything into consideration besides bricking?
[G1 Android Development] Firerat:
I'm afraid I can't go into detail right now, in a pub, drinking ;

In the second post is a link to ezterry's guide

But please , understand it before you do anything
[G1 Android Development] Shadowafs8:
Do I need a computer to use fastboot? Or when that screen with the green androids and the skateboard comes up, I just type the flash command on that link? Also, do I need to wipe the whatever the script did and install CM 5.0.7 again, or I'm I free to just go ahead?

Enjoy your drinks!
[G1 Android Development] izzy001:
You need a computer to use fastboot... look around the forum for help on fastboot. Fastboot is the best thing you can fall back to when all else fails
[G1 Android Development] Shadowafs8:
That might be a problem though...anyway, I just need to flash the radio and dangerSPL via flashboot then install CM 5.0.7 regularly right? There is nothing else I need to do since I applied this script? Also, which one do I follow, the 1.33.2003 or the 1.33.2005?
[G1 Android Development] ezterry:
The guide is to install 1.33.2003 on top of a T-Mobile/ADP1 phone currently with a 0.95.0000/0.95.3000/10.95.3000 SPL installed.

Then it is up to you but the files included allow for safely using fastboot to flash:

* the most recent 2.x radio

* from 1.33.2003->1.33.2005 (stock partition layout to danger layout)

* from 1.33.2005->1.33.2003 (danger layout to stock partition layout)

Since if you use fastboot to switch between these its unlikely to brick your phone as long as you are sure the images are valid.

However if you use customMTD that will override whatever partition layout the SPL defines.. so unless you want to install the official rom without customMTD (and you loose 28MB /data if you do) there is no need to install 1.33.2005
[G1 Android Development] Shadowafs8:
Excuse me for being a bit slow with this procedure, but how exactly should I go about and doing this? I just need to install the radio then go into recovery and flash DangerSPL right? Or do I just use flashboot for the radio then use flashboot to with the 1.33.2005 file?
[G1 Android Development] wrsg:
why are you flashing the radio? if you just want the custom MTD patch, it works with the latest 2.22.23.02 (or whatever the version is) radio, don't need to update.
[G1 Android Development] Shadowafs8:
I need to flash the radio because I have an outdated version (1. something) and I'm experiencing issues with the speakers which I have been told by other users in this forum that the radio is causing the problem.

So I just have the flash the radio right?
[G1 Android Development] wrsg:
yeah, if its causing problems then just flash the newer one.
[G1 Android Development] gee one:
Check out this post xdaforums.com/showpost.php?p=6535848&postcount=87

I'm not 100% sure of the theory, but if I read it correctly- I think you need to erase your recovery image, update your radio, update your SPL, flash your recovery and then finally, rerun the patch on your recovery. This is like putting your shoes on- order does matter- socks first, then shoes!

Of course, it's not as simple as it appears since there are lots of intermediate steps of erasing the recovery, rebooting, etc. that I left out. This post gives a hint as to the gory details of the process xdaforums.com/showpost.php?p=7143952&postcount=91

If you aren't 100% sure of what you are doing, don't do it! Ask more questions and search/read/re-read these threads. I'm just some dude for the internet- for all you know, I could have a pile of bricked G1s keeping the papers on my desk from blowing away.
[G1 Android Development] Shadowafs8:
Which radio can I flash? My SPL is a 1.33.200 and something, I'm not sure if it's a 3 or 5. Does it matter?
[G1 Android Development] wrsg:
it doesn't matter, you can flash straight to the latest.
[G1 Android Development] Firerat:
carefull !!!

1.33.2003 is compatible with 1.x and 2.x radios

1.33.2005 is compatible with 2.x and 3.x radios

2.x is 'safe' ,

saying 'latest' is dangerous as 3.x radio would brick 1.33.2003
[G1 Android Development] Foo_Blyat:
NVM edited
[G1 Android Development] Shadowafs8:
Alright, I'm trying to install using fastboot, however, my G1 won't go into it. It goes to the multicolor screen and when I press the back button, it just reloads the multicolor screen. The HBoot is 0.95.0000. I installed the 1.3.2003 SPL but I'm still getting the same thing.

Should I do a full wipe since I installed the script?