yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Firerat:
is your recovery already patched for the size you want?

no = you need to flash recovery patcher, fastboot erase, then flash ROM + boot patcher

yes = you just need to flash boot patcher
[G1 Android Development] fonix232:
Firerat, another question, if you don't mind me asking around :D

I was playing around Terminal today, and found a weird partition on my phone, called tmpfs, what is mounted to /dev and /mnt/asec. What is the use of it? I always had 0 bytes on it, totally empty, so I assume it isn't even used (maybe for installation or something? IDK). If it is so, would it be possible to add this ~48MB (48824 x 1KB blocks) somehow? Maybe a symlink?

Or is it actively used by the system? Because AFAIK, the G1 has a 256MB ROM area, and CustomMTD can only move things in the first 210MB (90MB system, 2MB cache, 117.8MB data, this is your config). This may be the missing >40MB area?

So after all those questions, the final one is: can this partition be used to extend DATA or SYSTEM?
[G1 Android Development] Firerat:
its just that, temp file system

its 'shared memory'

its just a filesystem that can use physical memory

but while nothing is 'in it' no memory is used

you can store things in it, but it will use RAM, which tbh would be bad

but its useful because its fast,

http://en.wikipedia.org/wiki/Tmpfs

we found the missing 40mb , ages ago

its used by hboot, radio, misc, recovery and boot
[G1 Android Development] fonix232:
Oh okay, it is clear now.

But if it's RAM, could it be extended by mounting an SD card partition (or part of data) into it?
[G1 Android Development] Firerat:
are you sure its clear?
[G1 Android Development] RueTheDay:
Ok, I'm currently running an old TheOfficial 1.6 Donut ROM on my G1, along with an even more archaic JesusFreke recovery (yeah, old school) and HardSPL.

I wanted to wait to upgrade to 2.2 until there was a way to do it without DangerSPL. It looks like this is it.

Do I need to do anything special given the ancientness of my setup, or can I just follow the OP:

1. download FR-recovery-v1.5.3-CustomMTD_S.zip and FR-boot-v1.5.3-CustomMTD_S.zip

2. Optinally configure*

3. reboot to recovery

4. nandbackup

5. wipe cache + data

6. flash FR-recovery-v1.5.3-CustomMTD_S.zip

7. reboot to recovery ( reboot and hold Home )

8. Either : -

* Nandrestore

* Flash ROM + extras

9. flash FR-boot-v1.5.3-CustomMTD_S.zip

10. reboot

Also, I have ADB on my PC, but it's like version 1.1, will this work?

Thanks.
[G1 Android Development] haunter1982:
No you have to flash a newer recovery i think (not 100% Sure if it is needed). AmonRa 1.7.0 or Clockwork-Recovery.

With the old Jesus Freke Recovery you only can flash update.zip? So if you dont flash a newer recovery you have to rename the files at every step.

Also a new Radio had been released. So the best way to get up-to-date is the following way after download everything:

1. Fastbootflash Radio

2. Reboot to look if flashing was ok

3. Flash Amonra Recovery.

4. Nandbackup, Wipe (Data+Cache)

5. Reboot Recovery

6. Flash FR-recovery-v1.5.3-CustomMTD_S.zip

7. Nandrestore

8. Flash FR-boot-v1.5.3-CustomMTD_S.zip

9. Reboot

And a Problem with this MTD-Hack is that 1.6 needs the cache. It has been posted before that on older ROMS the Bindmounting doesn't work for sure. So someone has set the size for cache to 7MB and it works. so you will need a mtdpartmap.txt with following data:

mtd 90 7

you also can save space for apps if you look how many free space is left on /system and make this part smaller.

And consider that you have to flash FR-recovery....zip then nandrestor then FR-boot....zip everytime you change the mtdpartmap.txt

And consider that you have to flash FR-boot...zip everytime after you flash a new rom.
[G1 Android Development] geekoo:
I am wondering if I missed anything on the compatibility of the Custom MTD Partitions with the Android OS version. I used a custom MTD (70/2) and ran a couple of Froyo ROMs fine.

However, I wanted to try SuperFast (1.6 ROM) and I wasn't able to install that. I tried 70/2, 60/10, 70/5 etc, but nothing worked. Each time I tried to install, I got an error with a symlink in /system. Sometime with busybox on line 59, sometime with toolbox on line 2x. But then I flashed SuperFroyo and it flashed fine.

I am guessing that there is some incompatibility with the 1.6 ROMs. I am running AmonRA 1.7 for the record.
[G1 Android Development] haunter1982:
Perhaps the failure is that you need more space on System? e.g. 90 mb? Try with 90/7 and i think you will be fine.
[G1 Android Development] raven_raven:
If you want to know how much space you have to set in order to be able to install a ROM, you might want unpack .zip with ROM and check how much space takes "system" folder.

For Donut ROMs it will be about 75 mb, for Froyo, Elclair and Sense ROMs about 90 mb.

I used it with official 1.6 (branded by my operator) and it worked just fine.
[G1 Android Development] XianHuen:
Hello! This method works with the T-Mobile Pulse (Huawei U8220)? I want to try it. Thanks!
[G1 Android Development] lbcoder:
As long as it uses the linux MTD drivers, it should work... but that does NOT mean that Firerat's SCRIPTS will work -- just the TECHNIQUE used to pass the partition layout on the kernel command line.... assuming, of course, that your device has provision to allow you to use a custom kernel command line.
[G1 Android Development] XianHuen:
Thanks for the answer. If i try the scipt, can i brick my phone? (its possible to loose fastboot and cant flash the recovery and nandroid backup?)
[G1 Android Development] lbcoder:
The scripts won't just "might" not work... they will ***DEFINITELY*** not work since your phone's partition mapping is TOTALLY DIFFERENT.

In fact, if you use this script, it could potentially overwrite something that you ABSOLUTELY MUST NOT OVERWRITE!!!! Like your SPL!

There is a link in the first post of this thread to another thread that *I* started -- where this procedure was developed. Read that to understand the DETAILS about how this process works. DO NOT RUN THE SCRIPTS! They WILL NOT WORK!
[G1 Android Development] Firerat:
I've been meaning to work on a version which 'discovers' the full original MTD layout

from what I've seen spl is always at the beginning, so not much danger of over writing that as the script only changes stuff from system onwards.. but I have seen some devices with misc at the end.. but I think as long as misc's start has already been set, then the userdata partition will be fine ( as its size is a wildcard "-" which is remaining space.

all this is based on dmesg files I've found on pastebin.com
[G1 Android Development] jozomali:
SquashFS fails to mount

I have trouble getting newer ROMs to work with the patch (stock settings, ie. no config file on sdcard). Here's what I do:

After patching recovery, I reboot to bootloader and run "fastboot erase system -w".

Reboot into recovery, verify with "df" that cache is 2Mb.

Flash the ROM (for example SuperFroyo-MD-6.6.2.zip or SparksMod-1.1.2.zip).

Flash FR-boot-v1.5.3-CustomMTD_S.zip.

Reboot.

Watching first boot with "adb logcat" shows:

--------- beginning of /dev/log/main
E/logwrapper( 67): executing /system/xbin/run-parts failed: No such file or directory
I/logwrapper( 66): /system/xbin/run-parts terminated by exit(255)
E/logwrapper( 73): executing /system/xbin/busybox failed: No such file or directory
I/logwrapper( 68): /system/xbin/busybox terminated by exit(255)
I/DEBUG ( 72): debuggerd: Sep 22 2010 11:25:17

If I do "adb shell", none of the basic shell commands are available ('ls' for example).

Can anyone give any hints on what to do/try?
[G1 Android Development] Firerat:
use a proper rom like stock cm instead of a filepusher's rom
[G1 Android Development] jozomali:
Just tried with latest CM nightly, and get exactly the same results (ie. no tools installed, so ROM gets screwed up). Could SPL be the problem? I have HBOOT-1.33.2005.

Edit: Just tried going back to 1.33.2003, and it seems to be working now.
[G1 Android Development] arfan1984:
@Firerat

i am using 2.1 sense rogers by capychamp, After doing 170 5 partition, any software at market which is greater than 5mb can not be downloaded. i get error of insufficient space...when i re-edit the matdpart.txt file to 170 15, and reflash boot partition, nothing happens. it shows the same space at "busybox df -h" command. i.e. 170 for system and 5 for cache...my internet browser also closes down by itself during browsing..

pls help and reply
[G1 Android Development] Firerat:
boot patcher picks up the partition layout from recovery, not the mtdpartmap.txt.. patch recovery with the new layout and you must erase else the partitions will be messed up.

a better solution is to make the cache bind script run so your ext partition is used ( or data if you don't have an ext partition )
[G1 Android Development] arfan1984:
How to make cache bind script run?? Pls explain
[G1 Android Development] holmestm:
HTC Magic 32B (Vodafone UK)

Followed the instructions on page 1, worked first time. Phone now flies.

Thanks @Firerat I owe you a beer
[G1 Android Development] skarboy:
Hi

What would you say is the right order (and mtd size) for flashing biffmod

I have to ask because i just get a hanging g1-screen when i want to flash cm6 or biffmod so i had to switch back to a donut rom. And because i got internet only over my g1 and the searcht-this-thread option is a bit buggy to me i cannot search for a solution my self.

Did i miss something?

What i already did:

Flashed your recovery and tried different mtd sizes and faked the spl through tha txt file (after that i did a reboot back to recovery)

Then tried to flash cm6 or bm2.0.1 (which worked out after i faked the spl)

but then i hang at the g1 screen wether i execute your boot.zip or not
[G1 Android Development] ezterry:
I'd try "90 10" and modify the boot flasher to *not* to install a cache bind mount init script since it apparently conflicts with binds in the rom

and remember a 'fastboot erase system -w' after changing the recovery partitions. (If you are having problems with cm6 its very likely something wasn't wiped properly)
[G1 Android Development] Firerat:
I'll have to have a look at biffmod, I know NLJ does most of the scripts for that

if there is a conflict we can work around it
[G1 Android Development] ezterry:
What it really looks like is it has a version of your 06bindmout already installed (and does mount by default everything to /sd-ext)

I suspect given all the reported problems however the roms script is not identical to the one the boot flasher installs (either that or its a usuall case of not wiping property)

"90 2" likely works but without poking more I can't promise it without actually trying.

Maybe just have skip installing bindcache if such a script already exists?
[G1 Android Development] Firerat:
well, the biffmod has a script called 06bindcache, mine is called 06BindCache

they both run, and tbh should not cause any real problems you just get a double bind mount

Actually, looking back over my script I'm surprised I haven't included a check to see if a bind mount already exists.

the biffmod thing is odd, I see on the OP it says to not use mtd, yet its 'shipped' with a script from customMTD which is just pointless if your not using customMTD

@NLJ , remove 06bindcache from biffmod

let customMTD install it , as its not needed if you don't have customMTD;)
[G1 Android Development] skarboy:
Is it possible to get some problems because of other partition layouts?
[G1 Android Development] AndDiSa:
What do you mean? The problem with biffmod is not directly related to the partition layout, but with the bind-script which is installed, too, when patching the boot-image.
[G1 Android Development] billquinn1:
90 2 works fine with biffmod 2.0/1. you just need to wipe in the usual order for MTD and wait to flash GAPPS until you have gone in and setup everything as in the Rom instructions. It does move and bind everything.
[G1 Android Development] Firerat:
thought that would be the case, I couldn't see any reason why it wouldn't work

if your fed up of seeing /cache mounted twce in df output, delete one of the bindcache scripts from /system/etc/init.d
[G1 Android Development] billquinn1:
Will do. I will post df -h from before and after.
[G1 Android Development] ezterry:
Good to know that it was just people not wiping properly.

I think most people's issues is data left over from other roms/installs on the ext partition; or formatting the SD card wrong [ie fat 32 formatted partition using linux partition id]

yes did seem odd.. (I didn't start looking at the rom till monday; and was being poked by EBI1 users with 1.33.2005 but needing a kernel.. didn't get around to seeing why so many people where having problems with customMTD)

The only reason I can think of it in there is if they had a dependency on one of the other scripts they are using from your apps2ext solution.. but I can't think of what that dependency would be.

mostly the 'fastboot erase system -w' that is usually recommended to all users installing biffmod

* Without the ext it dosn't matter if you used the G1 or MT3G version;

* With the ext the MT3G leaves the dalvik-cache on the internal /data partition while the G1 version pushes it to sd-ext with /data/data and /data/app ..

Regardless its best to use Firerat's ApkManager.sh that is shipped with the ROM to move common apps back to internal if the ext partition is in use.

Overall a clean install process is not much diffrent than the normal customMTD process even with fixing the 06bindcache
[G1 Android Development] Bladyle:
I use 175 3 when I install my Rogers 2.1 with root but, now I have problems with downloading larger apps from market. Can I change /cache settings without reinstall ?
[G1 Android Development] ezterry:
You can't change partition sizes without re flashing...

You can however:

1) nandroid backup

2) update the partition map

3) reapply recovery patcher

4) reboot to the bootloader and run 'fastboot erase system -w'

5) reboot to recovery

6) nandroid restore

7) apply boot patcher

Note nandroid restore may fail if there is not enough space for all your files in the new layout.

However before doing all of that is there any way to make the bind cache script work (or is it working?) Then the market cache just uses SD or data thus will not take up and more space than absolutely required.
[G1 Android Development] billquinn1:
I don't know if you have followed that thread over there, but it is pretty comical. I recommend the normal wipe we do for MTD plus removing or renaming the "android" folder on the sdcard if people have trouble.
[G1 Android Development] Bladyle:
Thanks for the fast replay!

Doesn't the one from the .zip make reading of init.d script automatic (make a ramdisk changes)? I use a stock kernel without init.d script execute, but I see that this mod make a init.d/06bindcache. Maybe i have to modify kernel manual to execute this script?

Thanks and sorry for my english :)
[G1 Android Development] Bladyle:
I//system/xbin/busybox( 50): /system/etc/init.d/06BindCache: command substitution: line 28: unexpected EOF while looking for matching `"'

I//system/xbin/busybox( 50): /system/etc/init.d/06BindCache: command substitution: line 29: syntax error: unexpected end of file

I/logwrapper( 50): /system/xbin/busybox terminated by exit(0)

This is when i change my boot.img
[G1 Android Development] Firerat:
ahh, yes , thats fixed in 1.5.5

line 28 ( or line 212 of MTDPartPatcher/patchbootimg.sh )

if [ "`grep -q "/dev/cache /proc/mounts;echo $?`" != "0" ];

should be

if [ "`grep -q \"/dev/cache\" /proc/mounts;echo $?`" != "0" ];

http://github.com/Firerat/CustomMTD/commit/8167cb507b62713efa2de38ff08d917f7c04e1dc
[G1 Android Development] Bladyle:
Thanks man, but now I have this error:

I/logwrapper( 50): /system/xbin/busybox terminated by exit(0)
[G1 Android Development] joeleenus:
How to uninstall...

Hi,

Am trying to flash the new Biffmod 2.0.1 over my existing 2.0 but it tells me that I need to not have firerats custom MTD partitions.

I assumed these were still beneficial so intially flashed with Biffmod 2.0 but now need to remove them?

I tried to reinstall Amon RA but I have no idea whether this worked?

Any suggestions? Many thanks,

Joe
[G1 Android Development] Firerat:
lol, ignore the muppet

it makes no real difference except with cmtd you get more space on /data, without it you just waste 28mb of space
[G1 Android Development] joeleenus:
ok, cheers mate!
[G1 Android Development] iLovPieNCake:
Anyone have any recomended settings for a myTouch 3G(Original) ? I was wondering if I increase the sizes, would it run faster ? I don't save many apps and most of them are on the SD using Firerat's App2SDEXT.
[G1 Android Development] Firerat:
it won't dramatically increase the speed of your phone, but it may help a little as I find my apps run better if they are on internal memory , and since you can increase the size of /data, you can fit more on internal.

in any case your phone will still be faster than the computer they used to put man on the moon
[G1 Android Development] fishbed:
I just want to say a big THANK YOU to Firerat and lbcoder!

I was stuck on 1.6 for quite a long time, because I was a bit scared that something could go wrong when installing DeathSPL.

Yesterday I've installed CM6 with the custom MTD partitions and it works like a charm with no DangerSPL.

Cheers!
[G1 Android Development] lbcoder:
Congratulations! Your phone is now sloooowwwwwed down by the bloated CMPiggy {oink}! :D
[G1 Android Development] fishbed:
Actually it runs well for now, at least compared to 1.6

Would you suggest a faster Froyo?

Thanks in advance!
[G1 Android Development] Foo_Blyat:
well i got my htc g2 yesterday but before i picked it up i flashed Biffmod onto the old MT3G while using firerats custom mtd partitions and it worked perfectly fine.
[G1 Android Development] lbcoder:
The problem with froyo is that there is no OEM build of it for DREAM hardware. What this means is that certain things had to be HACKED a bit in order for it to work. Well those hacks all came together into CM. If you build AOSP for DREAM, you end up without those necessary hacks. If you want a functional device, you need to use CM for those hacks, but CM comes also with the superbloat FATTY FATTY FATNESS. All the other froyo builds are BASED ON CM, and therefore come with its bloat.
[G1 Android Development] fishbed:
Perhaps that's why google uses dessert names for the versions - the sweeter, the fatter :)
[G1 Android Development] lbcoder:
No, google is fairly slim. CM adds the fatness. Even if you go back to a donut ROM, comparing a stock or superstock build with a CM build yields night and day difference in terms of performance. The stock build will destroy a CM build.
[G1 Android Development] wrsg:
agreed. until CM4 (donut) this didn't matter, since even with the extra stuff it ran smooth on G1. now the G1 is starting to show its limitations hence all the complaints about sluggishness etc.
[G1 Android Development] daedelus82:
I tired this on my HTC Desire with secury disabled (S-OFF), and it has all but bricked it. Symptoms are: unable to connect to carrier, device no longer recognises SD card, random reboots, PC does not recognize phone when connected via USB, and unable to connect to phone via ADB.

I am still able to access HBOOT/FASTBOOT.

Have tried:

flashing radio, boot, system

restoring phone via RUU, which replaces radio, data, system, SPL, back to shipping state.

no matter what I try the symptoms persist.

any suggestions?

edit:

i've managed to get adb working under recovery by disconnecting usb and restarting adbd in recovery menu. are there any logs which could assist?

I have noticed in kmsg the following: <6>[ 14.427062] bravo_init_mmc: sdcard disabled on cmdline

I think this patch corrupted something in NAND, just trying to work out how to fix it because none of the usual fixes work.

edit2:

i have managed to recover from this. i think it corrupts mtd0, and possibly spl (is that even possible?).

all i know is i had to change some oem flags in fastboot to get usb working again, and reflash spl because fastboot was behaving pretty buggy
[G1 Android Development] roalex:
No offence, you realise this is for G1, Magic ? why on earth would you try them on Desire. Hardly see where is the need, 512 mb storage or something ?
[G1 Android Development] jercik:
Desire has +100 MB unused space on system partition and "only" 140 MB on data. So it would be nice to shrink system end make data bigger.
[G1 Android Development] roalex:
http://pdadb.net/index.php?m=search&quick=1

Tragic...adb push xxx.apk /system/app/xxx.apk ?
[G1 Android Development] Firerat:
Ref desire. I plan to get the desire z ( maybe the hd if tmo are going to be lame about it , currently unemployed so need to get mysekf a job before I start splashing out on stuff,, and before people start offering cash, thanks but I have enought for now, but if you want to give an a hole a job, I'm in manchester uk,)

But untill then there is the version on github, it has a 'test' mode its a bit crap tbh, dumps way more than needed, I'll get my act together and re-write from the ground up ( goal being cross device, as the g1/mt3g works fine, I'm told heros work ok, but I do want to open it up for others )

Now if you know your stuff ^ put it all on github (post 2 or 3 ) but read lbcoders thread it has more detail, this thread is just the script to make it easy for that to happen

Not sure when I can do that, doing other stuff at the moment, and I might start doing some ps3 stuff , proper code and not scripts ( cpp )
[G1 Android Development] daedelus82:
Read OP, it's supposed to be universal on any device that uses msm_nand, altho it's untested on anything except the G1. I went thru all the tests, the partition order is the same, I think it just calculates the partition start/stop addresses wrong and data overlaps into mtd0. And I definitely see a need, the way the device is partitioned the is over 150mb free in system that is going to waste, and constantly run out of space on data unless we a2sd.

I have fixed my device, I will have a bit of a look at this and at lbcoders thread. Thanks firerat.
[G1 Android Development] xillius200:
Hey firerat I remember when you first came to the android g1 community and all I have to say is you still amaze me and I still love your work keep going higher :D
[G1 Android Development] lbcoder:
No, it is NOT universal. The THEORY is universal, but EVERY DEVICE HAS ITS STORAGE MAPPED DIFFERENTLY!!!!

That means that it MUST be ADAPTED for every different device that it is used on! If you just go blindly trying things configured for different devices, you are BOUND to screw something up.
[G1 Android Development] ezterry:
In addition some devices have radio/spl enforced nand locks preventing /system /boot /recovery from being written to directly..

Until this overcome on your device (ie both hacked and you install it) I can't imagine good things happening if you resize the locked partitions without the underlying spl also reviving the sane update.
[G1 Android Development] eric325:
Revert to stock MTD

I have a HTC Dream running CM6 with customized MTD. Is anyone can guide me how to revert back the MTD to stock one? I want to downgrade to donut ROM.
[G1 Android Development] Sik-1:
its best to keep the mtd script and change the values to say 75 10 depending on the rom being used, but none of them shoud b bigger than the 75mb, enjoy:p
[G1 Android Development] AndDiSa:
Flash a standard, i.e. non patched recovery image, go to fastboot and wipe everything and you should be fine.
[G1 Android Development] roalex:
You dont need to, but if you wanna get rid of them you just have to rewrite the recovery img with fastboot.

Power it On with Back + Power,

fastboot erase recovery

fastboot flash recovery Name.img (download the recovery you want to use and put in there a complte path)

fastboot erase system -w

fastboot erase boot

Press Menu,

Turn it on with HOME + Power

flash a new rom or restore a backup.