yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Firerat:
not sure, but it seems that the tail end of the kernel gets over written by the ramdisk, if you are 10.95.3000, 0.95.0000 or 0.95.3000

( as observed by lbcoder when looking a jtag data from Ezterry )

1.33.2003 is fine,

my workaround is to make the kernel a little smaller by compiling bluetooth as modules
[G1 Android Development] Firerat:
http://www.mediafire.com/?152jnqwyme3

mediafire mirror
[G1 Android Development] bigdbag:
Thanks very much! The patch fixed all my CM6RC1 issues. :D
[G1 Android Development] ldrifta:
do you have mtdpartmap.txt?
[G1 Android Development] elfasito:
yes, 145 2 spl 1.33.0013d

PS: I have not used fastboot erase system -w
[G1 Android Development] AndDiSa:
why do you think i've told to do so? :confused:
[G1 Android Development] elfasito:
well, because it was only to remove customMTD?. or after flashing FR-Recovery, should I use system-w erase fastboot?
[G1 Android Development] AndDiSa:
After installing or removing CustomMTD you should clean up the complete memory because you are changing the partition layout of your phone.

Using fastboot erase -w everything (/system, /data, /cache) is cleaned up properly and there are no longer any rests of the old rom.
[G1 Android Development] elfasito:
customMTD not get to run again.

I've done this:

*aply fr-remove

*flash new recovery

*fastboot erase system -w

*totally wipe

*flash fr-recovery

*flash rom

*flash fr-boot

I do not understand because it was not applied again customMTD.
[G1 Android Development] AndDiSa:
You are messing up several things ...

1. To install CustomMTD

- flash new (clean) recovery

- flash fr_recovery-xxx.zip

- reboot to bootloader

- fastboot erase system -w

Now you have a custom MTD layout on your phone

2. To remove CustomMTD

- either flash a new (clean) recovery or flash fr_remove-xxx.zip

- reboot to bootloader

- fastboot erase system -w

Now you have the standard partition layout of your SPL.
[G1 Android Development] AndDiSa:
There exists a version of customMTD from Firerat (fr_recovery-1.5.9-Alpha.zip), which is logging some useful information to /sdcard/cMTD-testoutput.txt when applying it. It's an *alpha* version, so it's not intended to be used actually, but the log output probably can help to analyse your problem.

If you flash this version and post the output here in the forum, we can probably help you a bit better ...
[G1 Android Development] eejayyeahuuh:
I flashed a new recovery and am now trying to erase system -w but I keep getting the error, "FAILED remote not allowed".
[G1 Android Development] AndDiSa:
??? what are you trying?

fastboot erase system -w?

Recovery doesn't have anything to do with fastboot, but with the SPL, so you don't have a SPL which allows you to use fastboot.
[G1 Android Development] eejayyeahuuh:
I am just following your post above to remove the mod. I want to flash a new recovery before I erase system -w.
[G1 Android Development] AndDiSa:
What SPL do you have installed? You must have an engineering SPL or at least the 1.33.0013d to use the fastboot commands, otherwise it will not work.
[G1 Android Development] robuser007:
Is it already possible to restore a backuped rom after an MTD change ?
[G1 Android Development] AndDiSa:
It was always possible, a problem arrises only if one of the partition sizes are too small for restoring the old content.

Otherwise after restoring the ROM, but before booting flash the FR-boot-xxx.zip on top of the restored ROM. That's all.

If you completely removed cMTD, you need to flash a new kernel on top of the restored ROM which doesn't have the bootline parameters for cMTD.
[G1 Android Development] robuser007:
A couple of questions:

the right /system size: df and look at size of /system only +1MB, is this okay ?

The cache partition: how big should it be ? Is it used in cm7.1 ? How does the cache works (cache on ext is just slower than on phone memory, right?)?
[G1 Android Development] AndDiSa:
/system size for current GB-ROMs should be at least 87MB, so there is something wrong with your partitioning. I would to use

mtd 90 2

in your mtdpartmap.txt

Change the values, reflash fr_recovery_xxx.zip and wipe everything with

fastboot erase system -w

Regarding cache-size: It's almost only used for storing OTA-updates while downloading, so on custom roms it's almost useless.
[G1 Android Development] robuser007:
My /system is 80,6MB, so I took 82 MB.

Thanks!
[G1 Android Development] ivwonka:
wow. this would be awesome on my evo 3d. i would love to try this with an aosop ROM on that device. There would be silly amounts of data space. Would one of the veterans of this mod mind walking me through some of the compatibility/settings that may be a problem? I wonder if boot manager could find a way to have 2 ROMS on internal NAND? TIA

https://market.android.com/details?id=com.drx2.bootmanager&hl=en
[G1 Android Development] AndDiSa:
Try to contact FR on Github, he's still working on his scripts and probably he can give you a hint.
[G1 Android Development] nico1228:
just wanna ask

hello every one, I just want to ask how can I remove a customMTD if ever I use it? I'm currently using a int2sd by croniccorey to install my apps to my ext part. and I have a 512mb ext part. but I can only use 450mb because in order to use the 512mb I need an 100mb /data part. but as we all know G1 don't have that 100mb in data partition, now I want to give it a try to make the /data part. 100mb by using custom MTD but just for precautions I want to know how to remove custom MTD specially if I don't like it, thanks in advance for those who can help me.
[G1 Android Development] AndDiSa:
Either flash an unmodified recovery.img, or use Firerats's RemoveMTD- script. But don't forget to do a

Fastboot erase system -w

After modifying your mtd layout.
[G1 Android Development] nico1228:
thanks for a quick reply

hey bro, thanks for the quick reply, recovery.img? like the amon-RA recovery image? then fastboot erase system -w? but I can't use fastboot because of my spl, I'm using a .0013d and on my bootloader screen it says that S-Off ship, some one said to me that I can only use limited commands in fatboot just want to clarify if I can use that "Fastboot erase system -w" command, thanks again
[G1 Android Development] demkantor:
fastboot erase system -w

Will work just fine

And yes same recovery.img from before, amonra is good
[G1 Android Development] quierotacobell:
Do we still need to flash the boot from the first post? I'm asking cause on defcon's test 12 I had 111 of internal, and now I only see 81. Or is that normal lol.

I did fastboo erase first, then wipe data/cache, flash rec 1.3, flash cm rc1, then gapps 2, then the auto mtd from your 2nd post.
[G1 Android Development] Firerat:
the flashable zip in the second post will 'pick up' the mtd layout of the running recovery

when you say 81, do you mean 81 free, or 81 for total?

its normal for data to have ~30mb used on first boot ( this is the dex files from system apps and framework + settings)
[G1 Android Development] quierotacobell:
I think 81 total, cause that's what it shows in settings under "Sd and phone storage."
[G1 Android Development] Firerat:
you mean

Internal phone storage
Available Space
81mb

seriously, you took time to post this?

THE 81MB YOU SEE IS FREE SPACE !!!!!!!
[G1 Android Development] quierotacobell:
Lmao sorry man, just trying to make sure.
[G1 Android Development] Firerat:
in future try to think for yourself

available space = free space
[G1 Android Development] rhcp011235:
This hack seems to work quite well.

But, i tried to flash it over CM6-RC for saphire.

after awhile it seems to eat memory / make email not sync.

Anyone try this mod over the CM6? Or find fixes?
[G1 Android Development] Firerat:
I see

please explain how the size of mtd partitions would lead to physical memory being used and cause email not to sink.
[G1 Android Development] jalsing:
it seems since CM6 doesn't support apps2sd-ext, that the /sd-ext isn't being mounted (?) so /cache is being binded to /data. Is there a way to make /sd-ext mount, I don't want to fill up my /data and thus affect my /cache...

..just in case...
[G1 Android Development] Firerat:
yeap

su
sh /sdcard/05mountsd.txt
[G1 Android Development] jalsing:
Well, this doesn't appear to hold after the reboot. I can run /system/etc/init.d/05mountsd and see the mount points, but after a reboot it's back on /data.
[G1 Android Development] Firerat:
hmm,

mine is working fine

have you changed the kernel?
[G1 Android Development] jalsing:
No, just:

nand

wipe

recovery patch

nand restore

boot patch

reboot

.

.

sh /sdcard/05mountsd.txt

reboot
[G1 Android Development] fsr678:
I know this is probably a stupid question...

If I just leave the default system partition of 90 (which I think my phone is already at running cm5/dangerspl), what is the advantage of having additional space on the data partition? I am trying to understand if this is better than just installing my apps on the sd card using app2sd?

With all my apps installed on the system (not on the sd card), I generally have about 30mb in free space if I clear out browser, market, new & weather app caches. Would having the additional memory for the data partition help speed up the phone? Or could I achieve the same by moving the apps off the system and onto the sd card to free up more space?

...I think I confused myself even more just typing this question.

Thank you in advance for your time!
[G1 Android Development] Egepi:
Hey Firerat I just had a quick question for you. I have been using this custom partition layout for CM6 RC1 and was just wondering what would happen if I re flashed gapps? I did my original install with the 2nd gapps cyanogen posted which didn't have working voice search so I kind of want to flash the 3rd one. I was just wondering if I would have to repeat all the steps of the process or just say the boot img part I guess this applies to flashing over a new version of CM6 also in the future I guess.
[G1 Android Development] lbcoder:
First off, the default system partition is 67.5 MB.

Second, with CM6/froyo, the only available apps-to-sdcard method available is the built-in one, dubbed "froyo2sd".

Froyo2sd is a REAL HOG. For each program installed to the sdcard, you end up with 1 encrypted filesystem and 1 redundant mount. That means MEMORY CONSUMPTION and CPU CONSUMPTION, and when you are as limited in resources as DREAM, this is REAL REAL BAD for you.

So the FEWER applications you install to the SDCARD, the better.

The more free space you make in your userdata partition, the more applications you can install INTERNALLY, and therefore the fewer redundant encrypted filesystems you will have mounted at any particular time, and the faster your phone works.
[G1 Android Development] Firerat:
last time I looked gapps didn't have a boot.img in it, so you can just flash gapps

but it make no difference if you do or don't flash the boot patcher again..
[G1 Android Development] Firerat:
lol, I fear you have confused this one even more :)

ok, you have danger 90mb system, cache 30mb, data 89 mb

cache is doing sweet fa

so 90mb system, cache 2mb, data 117mb

do you see it ?

and no, more space on data won't 'speed up' your phone at least not in the way you think it would.

the internal flash IS NOT RAM, I wish you kids would get that to stick in your heads, IT IS NOT RAM.

but since you have more space on data, you can fit more apps on it, you may find that the internal storage is faster than sd-ext ( which is off in cm6 for the moment )

oh, and even if you install all your apps to sd-ext, data is *still* used, more space = good
[G1 Android Development] juangil:
good explanation

this by far a really good explanation

Clear as water; internal memory is faster

and Firerat its been clear about this also, why ppl wants to have lots of free data space when you can use it wisely?

thanks Firerat & Lbcoder!
[G1 Android Development] jcarrz1:
Firerat, You're the man at this stuff and I've benefited greatly from your cache hack in the past, however I haven't quite caught on to the mtd stuff.

I thought I understood that the only way to implement it was your custom recovery, but things changed when defconoi posted some sort of patch thing with your name on it... I didn't even use that patch, and the rom worked fine (i checked the size of system and it would fit with danger)... but because of this I have 2 questions:

Was defconoi assuming that I already had your custom recovery?

If not, how can I make a rom that flashes with RA 1.7 or 1.6.2 and takes advantage of these MTD? I'm sick to high heavens of A2SD.

Thanks in advance.

Jcarrz1
[G1 Android Development] Firerat:
yes

I did an 'AutoMTD' patcher

basically it will patch a ROM zip to automatically set the mtd partition layout of the boot.img to be the same as the running recovery

basically it just saves you having to flash the boot patcher, its just for convenience

see OP for patching recovery

Personally I'm using clockwork ( install from recovery or via fastboot *do not* install via rom manager )

( .imgs can be downloaded here http://www.koushikdutta.com/2010/02/clockwork-recovery-image.html )

why clockwork?

its just more convenient, if you are resizing you _must_ wipe system,cache and userdata to avoid 'corruption'

Formats are available in clockwork's partitions menu, I would advise formating all three before and after reboot

before to avoid the potential of not being able to mount /cache, and after to make sure all is clean .. )

NB you only need to format all if you are resizing !

you should nandbackup before, so you can nandrestore to your new partition layout
[G1 Android Development] juangil:
@firerat

is this the right file to do a 70 2 MTD?

I just installed clockworkmod and I would like to test it by resizing my partitions

thanks
[G1 Android Development] jcarrz1:
thanks, you're the best.

So I gathered that you can't flash a rom with 115 mb allocated to system with an unmodified recovery?
[G1 Android Development] mejorguille:
I am using CM RC with the mtd hack. Do I have to reflash the parthack-boot if I want to change to a different kernel?
[G1 Android Development] Firerat:
looks good to me

yes, you have to patch the new boot.img ( kernel ), unless it happens to be prepatched with AutoMTD ( the flash will say if its patched )
[G1 Android Development] Firerat:
yeap

you need to have the recovery patched with the new sizes, else it won't fit :)

if your rom is system 115, go for

117 2

just to be sure ;)
[G1 Android Development] jcarrz1:
u da best. this is groundbreaking :) finally no a2sd on 2.1 heros... yessss
[G1 Android Development] jcarrz1:
one more question, it seems that 2 mb is the min for cache that you'd go, what's the min for data? like how big can we actually make system without borking it? i want to be able to install a couple of apps... :)
[G1 Android Development] ttabbal:
is there some reason you can't install them on data? that's where they usually go.
[G1 Android Development] jcarrz1:
My request was to state that i'd like to leave enough rroom on data to still install some apps, so if I were to install a hugeee hero rom with everything on system, therre would still have to be X amount of space on data to accommodate for any couple of apps id want and dalvik cache and whatever else.

SO what is X amount?
[G1 Android Development] Firerat:
good question

I would say min of 70,

maybe even as low as 50 if you bind dalvik-cache to sd-ext from the word go

but there is no straight answer, it all depends on how many and what apps
[G1 Android Development] juangil:
nvm

10 char==
[G1 Android Development] jcarrz1:
do both the recovery patch AND the boot patch (to flash on top of rom/bakcup) read from the sdcard file?

Also, the best method for non danger is to:

1. replace amon_ra with clockwork

2. wipe everything/backup

3. flash recovery patch

4. edit sdcard file

5. reboot

6. restore/flash rom

7. boot patch
[G1 Android Development] Firerat:
Recovery patched reads the config

Boot patcher (v1.1+) reads the mtd table (of the running recovery )

You must edit mtdpartmap.txt before flashing the recovery patcher, unless you are happy with the default 90 2 config

So just swap 3 and 4 round

Add a 5.5 format system, cache, data if its the first time you have booted with that layout
[G1 Android Development] jcarrz1:
nice. If i'm trying to smash a 2.1 hero onto internal only, and system is 156 mb (all apps and framework odexed), then 2 questions arise:

data can be smaller because of no dalvik-cache correct?

how can I disable a2sd the most quickly? just delete the script or do i have to edit boot.img
[G1 Android Development] Firerat:
So just ove 50mb data :)

Might be tight without a2sd

But you can't just delete a2sd

If you look at the boot.img's init.rc , you will see an on property

Its waiting for that to be set ( with setprop )

So strip a2sd down so it only has that line, or edit the init.rc

Looks like fun :)

Have to admit I have missed sense
[G1 Android Development] jcarrz1:
There is a 100% chance that i'll be back on cm6 sooner or later :P but thanks for the help.
[G1 Android Development] adrake400:
i wiped data, cache etc via amon_ra 1.7

changed mtdpartmap.txt file

flashed the mtd recovery file

reboot recovery

flashed cm 6 & gapps

flashed mtd boot.zip

reboot

but once booted checked internal space and it was at 50

did i follow the correct steps?
[G1 Android Development] Firerat:
very likely yes

you have 50mb free space on data

in terminal do

df -h
[G1 Android Development] adrake400:
mtdblock3 size 117 used 88.2 available 28.8 use 75%

mtdblock5 90.8 34.7 56.1 38%

mtdblock4 same as mtdblock5

im guessing it worked :)
[G1 Android Development] Firerat:
errm, yeah

but block 3 is system, why do you want a system size of 117?

you are only using 88mb , set it to 90mb and you will have 117 on data ( block 5) Edit: typo, meant block 5 not 4

leaving you with about 83mb free on data ( at current use )
[G1 Android Development] adrake400:
ok thats what I was trying to get lol

thanks!
[G1 Android Development] jcarrz1:
how do I make sure I did it right?
[G1 Android Development] jcarrz1:
fdisk -l

doesn't output anything... how do i check sizes?
[G1 Android Development] Firerat:
you could try flashing it, and watch the logcat

if it gets stuck, adb shell in and manually setprop
[G1 Android Development] adrake400:
ok i redid everything i type df -h

block3 90 88.2 1.8 98%

block5 89.8 34.8 54.9 39%

block4 30 1.1 28.9 4%<----0_o why is cache 30mb!?!? LOL
[G1 Android Development] Firerat:
because you didn't do it right

my guess is you forgot to flash the boot patcher after flashing the rom
[G1 Android Development] jcarrz1:
blank logcat on boot... stays on spl screen forever, never shows bootsplash.

I did flash the boot patch.

i assume it's a2sd problem... when you say "1 line" i just deleted all except

# /system/bin/sh

is that ok? or should i add an "exit" or "echo hi firerat" or what?
[G1 Android Development] Firerat:
at the end of as2d is

setprop cm.filesystem.ready

that is what the init.rc is waiting for

so your a2sd should be

#!/system/bin/sh
setprop cm.filesystem.ready 1

this will fix it

adb remount
adb shell
echo "setprop cm.filesystem.ready 1" >> /system/bin/a2sd
setprop cm.filesystem.ready 1
[G1 Android Development] jcarrz1:
beautiful. thank you sir. booted and runs so fast! omg internal memory is my love forever :)
[G1 Android Development] Firerat:
:)

the first 'real crazy' use of custom mtd ;) I like :D
[G1 Android Development] Bronk93:
I flashed boot and recovery files before flashing cm6 and now I have spiking signal bars. My signal bars will go from 4 then to 0, to 2 etc.....I flashed 2 different 2.2roms, 2 2.1 roms and 1 1.6 all having the same issue after flashing those files.

I've done full wipes, nand backups and same issue. Is there a way I can reverse whatever those 2 files changed?
[G1 Android Development] Firerat:
lol

you think that the size of the mtd partitions is effecting your signal

hehe

anyway

boot to fastboot mode

fastboot erase system -w
fastboot flash recovery recovery.img

then get in touch with you carrier about your reception
[G1 Android Development] Bronk93:
I have no idea but by process of elimination its the only thing I could come up with. Devices can act strange sometimes
[G1 Android Development] Sleeepy2:
hmmm, looks like I might have done something wrong....

Followed instructions on the 1st post and everything went fine (using the latest CM6 nightly).

Now Root Explorer doesn't work, neither does android commander.

Also when I do

adb shell

ls

I get ls: not found.

What did I miss or screw up?
[G1 Android Development] Firerat:
busybox missing from that nightly?

boot to recovery

adb shell mount -a
adb shell
find /system -name busybox
ls -l /system/bin/xbin/xbin.sqf

edit:

so the only thing you did wrong was expect a nightly to work

stick with rc1 ;)

edit2:

actually, that find wouldn't work if xbin was squashed lol

I'll add a bit,

if that ls brings up something around 4mb, then busybox might be in it but have the wrong permissions

upload the xbin.sqf somewhere and I can fix it
[G1 Android Development] Sleeepy2:
no xbin folder. back to RC1. lol.

Thanks for the help.
[G1 Android Development] lbcoder:
The "process of elimination" goes like this:

There is no connection between the partition table and the signal: ELIMINATED.
[G1 Android Development] adrake400:
i know this isnt the hardest thing to do, very simple and not complicated but i re-did everything and flashed the boot AFTER flashing CM-6 and when i type df -h i still get the same results i got before. i used bootv1_2_S_S and recoveryv1_1_S checked and made sure i have the danger spl and i do. any other ideas

thanks
[G1 Android Development] Firerat:
hasn't really got anything to do with the SPL

flash recovery patcher

reboot to fastboot mode

fastboot erase system -w

boot to recovery ( hold home )

flash rom

flash boot patcher

reboot
[G1 Android Development] adrake400:
step 3

i looked thru the 1st 36 pages of the CM thread to figure out how to do this and i found nothing. i know how to boot into fastboot but typing fastboot erase system -w im lost at i know its typed into the cmd prompt but after that Im lost lol
[G1 Android Development] Firerat:
adb and fastboot are *very* useful

well worth learning

this will get you started

http://www.google.com/cse?query=&cx...62879704:fs7umqefhnf&ie=ISO-8859-1&q=adb]&sa=

once you have adb nailed, then just substitute fastboot ;)
[G1 Android Development] adrake400:
thanks will get it all together in few after work! ive tried to not install adb since rooting my G1 but now it seems more likely that its the best option!

thanks again for your help!
[G1 Android Development] elf310:
finally took the plunge and decided to do the nonedanger spl, now have it running with 117 of data, cm6 rc1 thanks firerat
[G1 Android Development] defconoi:
clockworkmod

it seems 2mb cache screws with clockworkmod, im unable to flash roms from rom manager with that small of a cache, because I guess it uses cache to issue commands?
[G1 Android Development] Firerat:
which is why you should fastboot erase system -w

I use clockwork with 2mb cache

when you resize without clearing, recovery may see cache as being full of 'junk'
[G1 Android Development] tomatenjungee:
Filesystem Size Used Available Use% Mounted
tmpfs 47.7M 0 47.7M 0% /dev
tmpfs 47.7M 0 47.7M 0% /mnt/as
/dev/block/mtdblock3 90.0M 85.6M 4.4M 95% /system
/dev/block/mtdblock5 117.8M 12.8M 105.0M 11% /data
/dev/block/loop0 3.9M 3.9M 0 100% /system
/dev/block/mtdblock4 117.8M 12.8M 105.0M 11% /cache
/dev/block/mtdblock5 117.8M 12.8M 105.0M 11% /cache

i am kind of confused o.O ... i cant believe cache is 117M on my g1. Is it somehow bound with Data....because of the same size?

I use CM-6 for D/S RC1-Hourly Testing Grounds and did a fastboot erase system -w before flashing recovery patch.

My mtdpartmap.txt is "90 2".