yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] good223:
removal

If I wanted to uninstall the custom mtd and go back to the original partition layout of the danger spl, what should I do to remove it?
[G1 Android Development] Firerat:
Use the remove zip, it is what its for.

Nb v1.5.7 has remove built in, set system size to 0 and flash recovery patcher

Moust format system cache and data before rebooting

If your not using clockwork .. why not?

You have to get to fastboot mode and do

fastboot erase system -w

You can nandrestore , but you must flash the boot patcher after
[G1 Android Development] good223:
Will the remove zip still work if I'm on the previous version?

And how would I go about to remove it manually?
[G1 Android Development] Firerat:
Yes, it unpackks your current recovery , blanks out the mtdparts kernel cmdline and then repacks and flashes, like you never had cmtd,,
[G1 Android Development] good223:
OK. Thanks for the help and all your hard work on this.
[G1 Android Development] Firerat:
Lbcoder deserves most of the cedit, without him we would not have this, I just saw it was good and scripted it
[G1 Android Development] anghellic:
just to be clear...

when configuring the mtdpartmap.txt file I just create a file using notepad (or whatever text editor) name it 'mtdpartmap.txt' and write a line something along the lines of "echo "mtd 85 2" > /sdcard/mtdpartmap.txt" as the text in the file and place it on the root of the sdcard?

This is the only thing I found confusing about this process.
[G1 Android Development] xaocon:
Is there any reason not to take nearly every APK out of /system and put the ones you want to keep in /data? I know that most ROMs would need to be modified to install APKs on /data but I can't think of a reason not to do it. Also, has any thought gone in to keeping a small swap in a new partition? I've seen some talk of making an extra for dual booting.
[G1 Android Development] Firerat:
sorry for the confusion

echo "mtd 85 2" > /sdcard/mtdpartmap.txt

is just one way to create the txt file on the command line

another is

cat > /sdcard/mtdpartmap.txt << "EOF"
mtd 85 2
EOF

but that is more typing

but you can just create it in notepad and put it on your sdcard ( custmMTDs script converts it to unix format , so you don't need to worry about doing that yourself )

tbh, a while ago I thought about making a 'helper' script ( in the AIO ) to help create the mtdpartmap.txt .. If I remember I will add that

btw, 85 might be a little small to start with, 90 is a good safe bet ( as this is the standard size of G1 system so ROM will not exceed that limit )

But current nightlies might be pushing the 90mb limit ( depends on your gapps ) so 91 or even upto 93 might be an advantage
[G1 Android Development] xaocon:
I'm not getting the results I expected... Maybe they are what you expect but I wanted to post to show you.

/ # cat /proc/cmdline

board_trout.disable_uart3=0 board_trout.usb_h2w_sw=0 board_trout.disable_sdcard=0 smisize=64 androidboot.baseband=2.22.27.08 androidboot.cid=T-MOB010 androidboot.carrier=TMUS androidboot.keycaps=qwerty androidboot.mode=recovery_manual androidboot.serialno=HT93LGZ07837 androidboot.bootloader=1.33.0013d no_console_suspend=1 console=tty0 androidboot.bootloader=1.33.2005 mtdparts=msm_nand:256K@0x0000024C0000(misc),5120K@0x0000026C0000(recovery),2560K@0x000002BC0000(boot),81920k@0x000002E40000(system),3072k@0x7E40000(cache),129792k@0x8140000(userdata)

The partitioning worked just right but I was guessing that you wanted to change androidboot.bootloader instead of inserting a second. Like I said... maybe not.
[G1 Android Development] Firerat:
Quick post, in darts and crib match, on crib v soon

That is expected, the first spl is from the spl, the 2nd from the boot.img

Recovery zips only read the second

If you using ezterry's mods then spoof as 1.33.0013, as his kernels insist on 1.33.0013 or 1.33.0013d

1.33.0013 is compatible with cm6
[G1 Android Development] g-banjo:
I'm running CM 6.1 RC1 on an ex-vodafone uk magic and I've been interested for a while in trying Firerat's custom partitioning system but so far I've always backed off as I find it difficult to work out exactly which advice applies to my particular phone.

I'm a working musician and we're heading off on tour next week. As my wife is close to having twins I may have to get home fast I'm taking my own car rather than travelling with the band. So I've installed Copilot to help get me home if the need arises. But it struggles - I suspect it needs more space. Am I right in thinking that repartitioning with CustomMTD would help and can you point me somewhere where I can get advice specific to my phone? I'm sure it's all here on the forum but even after a lot of reading I'm not sure exactly what is relevant to my phone and what isn't.
[G1 Android Development] g-banjo:
Further to my above post:

HBOOT-1.33.2010

RADIO-2.22.23.02
[G1 Android Development] HellRazorGod:
Hey Firerat or any other pro :P

How do I check whether Custom MTD is working for me ? after flashing ....How do i check the sizes of the system , data , cache partitions ???? what's the command ? Thanx :D
[G1 Android Development] xaocon:
Im not an android pro but I know enough linux to help you with this! Open a terminal and type "df -h" the -h is for human readable so it's a little easier to understand.
[G1 Android Development] srivers33:
just an idea that noobs will want to know how to get back to stock as if u never changed partition values. would be good to add to the op. add the flashable wipe zip maybe
[G1 Android Development] dhkr123:
If the newb can't figure that out through simple and VERY VERY basic logic, then the newb really should just stick with carrier branded and officially signed firmware.
[G1 Android Development] g-banjo:
Given that you're new here yourself you can probably be forgiven for being ignorant of the fact that people, including "newbs" are usually treated with encouragement and support here.
[G1 Android Development] HellRazorGod:
I have a super Newbie question . Could some1 tell me which partition space does the phone display in the "Internal Memory" section of the phone settings . Is that system free space or data free space or both ?

And also could you point out the respective uses of the data , the cache , and the system partitions individually ?

Thanks : )
[G1 Android Development] dhkr123:
Postcount make a newb does not.

Encouragement and support is not something appropriate to give to someone attempting to cut off his head unless you are encouraging him to NOT cut off his head. Carrier branded firmware does have its place. Not everyone is cut out or prepared for modding -- a certain minimum technical understanding should be mandatory for all forms of modification, or, for all activities that carry some form of RISK. Carrier branded firmware takes the risk out of using a phone. You don't hand the keys to a brand new Ferrari to a 15 year old who has never even read the drivers' handbook and tell him to hit the freeway, do you? Of course not, he'll end up dead and probably take a bunch of other people along with him! That is why there is a drivers' handbook, drivers' training, licensing, etc. Now obviously, the risk here isn't nearly as great, but similarly, you just need to be able to bend your mind around the HOW's and the WHY's before doing something... and asking that particular question proves that he has absolutely ZERO understanding of how the process works! Answering the question would be irresponsible because it could lead that person into trying out something he doesn't understand.

In general, if you don't understand what you are doing and why and how it does what it does, you really should not be attempting it. At least not until a greater degree of understanding has been achieved -- and (nearly) everyone is capable of learning.
[G1 Android Development] g-banjo:
I didn't assume you were a "newb" from your postcount, I just pointed out a certain rudeness to your post.
[G1 Android Development] g-banjo:
Well I managed to find time today to read it all through and try the CustomMTD without juggling five other things at the same time. It works a treat - nice one. And my post was, indeed, best left ignored.
[G1 Android Development] Firerat:
meh, who cares

newbs eventually learn to read stuff before posting questions that have already been answered.

getting flamed it part of their schooling imo

get over it
[G1 Android Development] g-banjo:
Aye, sticks and stones, eh?

It turns out I didn't see much difference from CustomMTD so I've tried ezterry's 2708-enabled custom kernel and, yes, that's what I've been looking for!
[G1 Android Development] sparksco:
This works great for updating to the newest radio! And best part of all is I'm on the same kernel, not Biffmods!
[G1 Android Development] Firerat:
free internal storage is data

system is for system files

data is for user files ( like apps, settings etc )

cache, is from french for "to hide", or is it conceal idk,

anyway, cache can be used for a few things, but on the g1 it is pointless

in eclair it was use by the market to download temp files to

in froyo, that is done on the sdcard now

official roms use /cache for ota updates,

meh, cache is useless imo
[G1 Android Development] HellRazorGod:
Thanks dude . Really good for trivia and changing MTD values :P

Also , If suppose I set MTD values as 90 2 which I know are system and cache size respectively . How would u commute the size of the data partition then ? Is there some total of all the three from which the size of (system+cache) needs to be subtracted to get the size of data ?

P.S : cache is " to hide " in english .
[G1 Android Development] Firerat:
busybox df -h

total up system cache and data

total - ( system + cache ) = data
[G1 Android Development] good223:
To remove while on 1.5.7 would I set mtdpartmap.txt to "mtd 0" using the command echo "mtd 0" > /sdcard/mtdpartmap.txt ?
[G1 Android Development] sebx_g1:
Hello ,

I've tried this mod with CM 6.1 RC1 , and there is one problem - I can't mount sdext in any way - even flashable script for RC1 doesn't help - my phone after using it get bootloop . Could it be sdext partitions got some error ? Fixing it via recovery is data harmfull or not ? . Till Wendsay phone worked perfectly -- @Firerat you know about what I talking if you remember my thread on Cyanogenmod Forum . Need help .
[G1 Android Development] Firerat:
sorry no idea which thread

customMTD does nothing to /sd-ext, the problem is not this mod
[G1 Android Development] HellRazorGod:
Woo hooo ! I finally got Custom MTD working with 85 MB system 2 MB cache giving me 122 MB of data . Sweeeet :D

Also EZterry's radio/SPL/kernel are fully functioning with the above MTD combination .

G1 just touched the moon and came back baby !

1) But dude is there anyway we can predetermine how much a ROM wld take of the system partition so that we can adjust the MTD values accordingly ? ? ?

2) Now if I wanna change the MTD values from 85 2 to say 150 2 for a SENSE ROM , would i have to use your remove zip and re-apply the recovery patch with the modified mtdpartmap values ? or just changing the values in the txt would suffice ?

Your the man firerat .

Cheers !
[G1 Android Development] Firerat:
experience

unzipping rom on pc looking at total size of system, + take account for gapps + add a bit

oversizing system, flashing rom + gapps, df -h, nandbackup , resize*, nandrestore

someone else tells you

I can get a CM6 rom down to system size 68

I remove

CMWallpapers.apk ( copy on sd-ext )

bootanimation ( copy on sd-ext -- see random bootanimation of all in one patch ;) )

media/audio ( customised copy in /data/media/audio )

LainIME ( I use swype )

RomManager ( on sd-ext _

practically all the gapps are either on data or sd-ext

this is the gapps I have on system ( may still weed some out )

app/GoogleBackupTransport.apk

app/GoogleCalendarSyncAdapter.apk

app/GoogleContactsSyncAdapter.apk

app/GoogleFeedback.apk

app/GooglePartnerSetup.apk

app/GoogleQuickSearchBox.apk

app/GoogleServicesFramework.apk

app/HtcCopyright.apk

app/HtcEmailPolicy.apk

app/HtcSettings.apk

app/MarketUpdater.apk

app/MediaUploader.apk

app/NetworkLocation.apk

app/OneTimeInitializer.apk

app/SetupWizard.apk

app/Vending.apk

etc/permissions/com.google.android.maps.xml

etc/permissions/features.xml

lib/libvoicesearch.so

etc/hosts

etc/custom_backup_list.txt

mtd 150 2

flash recovery patcher

format system, cache and data ( either with clockwork, or fastboot erase system -w )

reboot

don't forget to flash boot patcher when rom flashed/restored
[G1 Android Development] mo_mail:
Just wanna mod my partitions

Im super confused.

I read more and more and get more confused about what to do, I have some people say cache is meh, some extend their cache to 90mb. I have a Desire S-off modded custom ROM and I only did S-off to modify the partitions.

I clearly need to keep reading, but if anyone can tell me if I should use the 'new' 1.5.7 files from D/L on first post for my HTC Desire would be appreciated.
[G1 Android Development] Firerat:
data is used for app settings and files ( like extra libs/bins ) games tend to use more

there is no real advantage to having data empty, but the more free space you have, the more apps you can have.

Even using a2sd space can be tight, this MTD parts 'hack' just gives us a little more space to play with

I'm currently s95 c2 d112

This is working great for the current CM6 nightly builds ( they are just a bit too large at the moment )

This is

FR-AutoMTD-cm_dream_sapphire-07082010-001208.zip

with gapps frf83 + finalgapps ( frf 91 ) over the top

Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock3 95.0M 91.8M 3.2M 97% /system
/dev/block/mtdblock5 112.8M 85.9M 26.8M 76% /data
/dev/block/loop0 3.9M 3.9M 0 100% /system/xbin
/dev/block/mtdblock4 2.0M 776.0K 1.2M 38% /cache
[G1 Android Development] Bzerk1:
this might be a a stupid question, but everytime i we want to utilize this we have to flash everytime we flash a new rom right?
[G1 Android Development] Firerat:
Nope, not a stupid question, after all it was what many considered a 'stupid question' which concived this ickle baby ;)

you only need to flash the recovery patcher once

*unless you want to change partition sizes, if you do then you should wipe everything , system data and cache , I'm leaning towards clockwork recovery here as it is much more convenient via the partitions menu.

if you are just flashing a new ROM, then you just need to flash the boot patcher after the ROM ( unless the ROM has been patched with AutoMTD )
[G1 Android Development] Ace42:
yeah all the froyo roms are really big, they all have hdpi folders in them which makes all the apps bigger.
[G1 Android Development] Blackman778g:
Dumb Question

Before I flash this I have one question...

Once I have obtained the custom partition layout is it possible to go back to the Danger SPL stock setup without any issues or hasels?
[G1 Android Development] ukG1freak:
I would of assumed you simply edit the .txt file on the /sdcard back to the "default" partition layout?

Edit: I've just undertaken this partition method myself and It's shocking to see my free /data memory at 113mb lol, Thanks FR and Co for this!
[G1 Android Development] FatBoyExtraordinaire:
Firerat, reading the thread throughout, I think it is safe to say that you would want to have access to fastboot/adb before using this new method. For those of us without the ability to use either, would you 1. recommend holding off for now and 2. will you still make an anyspl version of the eventual stable Froyo ROM (whomever you may chose to use) when it becomes available? Thank in advance for your answers.
[G1 Android Development] ezterry:
No, just reinstall the original recovery, the recovery patch changed it to use the alternative partitions, you want to install a recovery without that modification to run a rom using the spl's partition table again.
[G1 Android Development] Firerat:
yeap, you can edit the text to danger spec, and reflash the patch, or simply flash a stock recovery.. its advisable to atleast clear cache and data

if you have absolutely no access to fastboot, you can still use this, but you can end up in the situation where you can't mount partitions if you don't wipe

in this situation you are in a better position with clockwork

the reason being it has the erase_image binary, which can be used even if system,data or cache are unmountable

for example,

when I went from 95 2, to 90 2 ( with system being full ) , clockwork wouldn't fully boot... ( couldn't open /cache as it was full with 'junk' from system )

BUT, I was able to adb shell and

erase_image system
erase_image cache
erase_image data

after getting back to recovery all was fine

so at a minimum you need adb access

without that, if something does go wrong your only real option is to flash nbh and re-do the whole root thing

Edit: ref AnySPL

this method has superseded the previous AnySPL method, so I won't be 'maintaining' that

however that method would still work, it may just need a tweak now and again.
[G1 Android Development] lbcoder:
How can you not have access to fastboot?

You have root, just flash in 1.33.2003 (ending with a "THREE") and be happy!

This step, in my opinion, is the very first step that EVERYONE should take when obtaining root access to the device.... make sure you can fastboot!

And do it *before* applying a custom partition table -- updating SPL or radio afterwards is slightly more complicated than before (requires a backup of at least system and data prior to SPL, reloading SPL's partition table, updating, reloading custom partition table, restore).

Note: There is virtually NO RISK in going from 0.95.0000 --> 1.33.2003. 1.33.2003 has the SAME partition table as 0.95.0000 and is compatible with a SUPERSET of kernels (means it will boot everything that 0.95.0000 will boot *and possibly more*). The only thing that can go wrong in this update is the *very unlikely* possibility of ending up with a corrupt write, i.e., you lose power during the update. The chances of this happening are so slim that you really shouldn't consider it.

Note2: If you are running the original none-danger hack, then you have some data stored in your cache partition.... which will be obliterated by flashing an SPL. You should perform a backup first, perform the update (don't forget to let it reboot -- the actual update happens AFTER you reboot...), and restore.
[G1 Android Development] Firerat:
I can't remember the details, but there was something 'odd' that was getting in the way

@FatBoyExtraordinaire,

can you remind us why you couldn't update your SPL?
[G1 Android Development] rsxtypes72:
help

Hello All

I need help I was using this hack. I had amon ra 1.7.0 w danger spl and was running cm 5.0.8. I then installed clockwork recovery to play with that. I didnt have the same luck with clockwork mod and then tried to flash amor-ra recovery using the clockwork app under install other recovery. After this happened I have lost all access to phone. I am stuck on G1 screen. I do have fastboot access but cant flash amon ra recovery without changing spl to engineering spl. Can anyone please tell me how to get my phone up and running again? Sorry if this is in the wrong forum.
[G1 Android Development] Firerat:
fastboot erase system -w

but you seem confused, if you don't have an engineering spl then you don't have fastboot !!!!

so you can't get to recovery, you can't do a normal boot and you have stock SPL ?

the only option left is to re-root

*DON'T FLASH RECOVERY VIA ROM MANAGER WITH A CM5/6 BASED ROM*

if you can do a normal boot and can't get into recovery (even wth adb shell ) then try the recover fix I posted on cm forums

http://forum.cyanogenmod.com/topic/...ot-to-recovery/page__view__findpost__p__21996

if you can get to recovery via adb ( even if screen is blank )

if recovery is RA

adb shell mount /sdcard
adb push recovery-clockwork<insert rest of version here>.img /sdcard
adb shell
flash_image recovery /sdcard/recovery-clockwork<insert rest of version here>.img

reboot to recovery

( fore and ring on call + end call, middle finger menu, move ring or fore finger to home, hold until vibrate )

if recovery is clockwork

adb shell
erase_image system
erase_image cache
erase_image userdata

reboot to recovery

( fore and ring on call + end call, middle finger menu, move ring or fore finger to home, hold until vibrate )
[G1 Android Development] rsxtypes72:
thanks for the quick reply. sorry i am confused. i have danger spl. i have completely lost all recovery.

my phone just hangs on the g1 screen. no recovery. I guess i have to reroot :(

I tried to flash recovery using fastboot with no luck.
[G1 Android Development] ezterry:
Do you have access to fast boot if so really rooting will do no good.. as it will also just flash via the bootloader.

What radio, hboot (1.33.2005 if its danger) and recovery image are you trying to flash?
[G1 Android Development] Firerat:
what command are you using?

what error did you get ( if any)
[G1 Android Development] rsxtypes72:
im an idiot. i rerooted my phone. thank you to everyone. sorry I didnt wait. Im sure I would have been able to get it back up with your help but I am back to where I was before I screwed up. thank you both for your help

off subject - the kilt my sister brought me from scotland fits great!
[G1 Android Development] FatBoyExtraordinaire:
First off, thank you both for the responses and knowledge. Secondly, if I'm not mistaken (which I very well may be) fastboot requires the use of ADB. If that is correct, then the reason I am unable to use it because after rooting, for some odd reason, my computer no longer recognizes my G1 and thus I am unable to use any of ADB's useful features. I don't know why this happened (perhaps some random rom I flashed at the time, but I doubt it) but what I do know is that when my phone was unrooted, my computer recognized it fine. As soon as I rooted, it stopped recognizing it. I've tried every driver I've ran across and still no dice.

*Actually, in talking with you both and writing this response, it could be another reason altogether, that just happened to coincide with me rooting the phone. If I plug the phone in through usb to any computer, no lights come on and nothing is "triggered". I may have a dead port*

So I guess I have the ability to flash 1.33.2003, but I'm not sure that would help my issue. Firerat knows because I have rambled about it so often, but my G1 is weird, but I love the damn thing! lol
[G1 Android Development] Firerat:
and if I remember correctly we tried different cables and pcs
[G1 Android Development] FatBoyExtraordinaire:
Indeed we did. I did buy this G1 off EBay and who knows what the person may have done to it before I received it.
[G1 Android Development] mat_pav:
Hi firerat

Can you tall me if this is the right procedure to flash your pach +15MB hack. Should i use the v1.5.6 or v1.5.7. for Dream? Do i need to spoof the SPL if i use your MTDpach?

Clean-fresh install

1. Wipe all

2. Reformat-repartition SD card

3. Flash 2.22.27.08 radio and 1.33.0013d hboot

fastboot flash recovery recovery-RA-dream-v1.7.0-cyan.img

fastboot flash radio radio-2.22.27.08.img

fastboot flash hboot hboot-1.33.0013d.img

fastboot reboot-bootloader

fastboot erase system -w

fastboot erase boot

4. create mtdpartmap.txt and put on /sdcard/

5. Boot into recovery

6. Wipe cache + data

7. Flash FR-recovery-v1.5.6-CustomMTD_S.zip

8. Reboot to recovery ( reboot and hold Home )

9. Flash ROM + extras

10. Flash the anykernel with a 2780 port

11. Flash FR-boot-v1.5.6-CustomMTD_S.zip

12. Then apply the AIO patch

sh /sdcard/fr-patch138b.txt swap a2sd

TNX
[G1 Android Development] Firerat:
you probably need to insmod the bt modules

tbh, you should upgrade your SPL to at least 1.33.2003 ( see post 2 )

And, you really should look at ezterry's 2708 ( link in my sig - Extra 15mb ram )
[G1 Android Development] GunToYoMouth123:
How do you remove the MTD custom partitions? ,the 1.5.7 one... :0|
[G1 Android Development] Firerat:
Either flash the remove.v1.5.6

Or edit the mtdpartmap.txt

To be

mtd 0

flash recovery.v1.5.7

Don't forget to format/erase system cache and data