yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] g-banjo:
I've been trying to do this too. I followed the guide as per post one of this thread and haven't been able to flash a ROM or nandroid restore since - it reads all the zip files as "bad". I followed the above suggestion to restore the original MTD but still the same result. What can I try next?
[G1 Android Development] eric325:
Finally I manage to revert back to stock by follow CM wiki, http://wiki.cyanogenmod.com/index.php?title=Full_Downgrade_Guide_-_HTC_Dream

Thank anyway ;)
[G1 Android Development] g-banjo:
Well, I got it sorted - my sd card screwed up somewhere along the way so I had to reformat the card redo partitions then start flashing. I didn't go down the custom MTD road but still want to try it. Is it possible that the sdcard mess-up was due to something going wrong with the customising process or do you think it was just chance that it happened to screw up at the same time?
[G1 Android Development] HellRazorGod:
Not booting

Hey rat ,

I initially created the mtdpartmap.txt file in the root of the sd and put in the values as 161 4 as suggested by Zach .

Here are my steps of flashing , I hav cw mod 2.5.0.1

1) wiped everything (system,data,cache etc)

2)flashed ur FR-recovery zip

3)wiped everything again

4)rebooted to recovery

5)flashed the ZX hero 3.0 Beta rom

6)flashed his wifi fix

7)flashed your FR-boot zip

rebooted . ..

Now my g1 is stuck on the first bootscreen i.e initial T-mobile one .

And the last 2 lines of the logcat says :

I/zygote <2821> Preloading classes.....

D/dalvikvm <2821> GC freed 813 / 51608 bytes in 6 ms

And the logcat does not move further , its just stuck .

Help please : )
[G1 Android Development] lbcoder:
Step 1 is not required.

Step 3 and 4 are REVERSED.

So... you should have performed in this order; 2, 4, 3, 5, 6, ...

Also... what SPL do you have? 0.95's are known to cause some problems. 1.33.2003 (with a THREE) is safe to flash over 0.95 IN ALL CASES, but is more universally compatible with everything.
[G1 Android Development] lbcoder:
This is good for donut too!!!

Adjust your values, set the system partition smaller, leave the cache partition tiny. You will end up with a HUGE userdata partition and probably be able to install everything you want INTERNALLY.
[G1 Android Development] lbcoder:
Random chance. These patches can do NOTHING to the sdcard.
[G1 Android Development] HellRazorGod:
Yeah . I reversed the order as you said . I even repartitioned my SD and followed all steps . My SPL is the Danger SPL 2003 one .Still the logcat hangs on the same 2 lines and the Tmo screen is there . Any pointers ? :S
[G1 Android Development] billquinn1:
161 4 is not going to leave much room on /Data. If you don't have your ext setup and it can't move apps to sd (however that rom is doing that) you may be out of room. Just a thought. I mean 161 for system is enormous.
[G1 Android Development] xillius200:
well it was a beta xD anyway beta 2 will be out soon and I have got apps2sd enabled by default on next one so that will fix it as for now you can just do firerats bindcache script it works perfectly :D
[G1 Android Development] lbcoder:
DeathSPL is 1.33.2005 (ending with a FIVE).

1.33.2003 is PERFECTLY SAFE.

....

So.... WHICH IS IT?

Also what bill says. You may not have enough space on userdata.
[G1 Android Development] xillius200:
the rom he is using he can use the 06bindcache data trick can't he to fix it well fixed it here xD
[G1 Android Development] HellRazorGod:
Oh yea the 2005 one . My bad too lazy to check again :P .how do i do that bindcache ? hopefully it should fire the ROM up at least . coz with the MTD its not helping :S That stupid GC thing comes in the logcat and it says it freed some objects but it gets stuck there till x^1/0 seconds
[G1 Android Development] xillius200:
to bindcache use adb

adb shell

adb sh /system/etc/init.d/06BindCache

I think it was or it could be without adb shell otherway is download terminal and type

su

sh /system/etc/init.d/06BindCache
[G1 Android Development] geokuttan:
so i tried the Custom MTD partitions...and it was successful and i flashed cyanogen 6.0...but i can no longer flash 2.1 roms....its just stuck at the G1 screen.. yes i wiped data and all..and waited for like 30 mins...is there a way to restore the original partitions?

using RA-1.7.0

i also get

E: Can't opn CACHE:recovery/log
[G1 Android Development] lbcoder:
READ THE INSTRUCTIONS.

Whenever you flash a new boot partition (usually as part of a ROM), you need to re-run the boot-script.
[G1 Android Development] geokuttan:
yea got that...its fixed now...:D
[G1 Android Development] Firerat:
yeah, if your rom needs a huge 161 system partition, then its bound to have a c load of dex files created.. so yeah.. your going to need to redirect the dalvik-cache to sd-ext partition, it will hit performance but its the only way your going to fit bloat. still it will probably work better than dumping the system apps to sd
[G1 Android Development] captaincrook:
Hold up, if you flash new roms, you just gotta flash the boot script again? I've been flashing both (As if doing it for the first time). Should I do it my way or just flash boot only?
[G1 Android Development] AndDiSa:
Flashing the boot-patcher is sufficient. As long as you do not change your recovery it remains patched and there is no need to patch it again.
[G1 Android Development] mad-murdock:
hey firerat - maybe you are my only hope to unbrick my htc desire - i bricked it when following a guide and using your G1-repartition tool on it.

i summed things up in this post

boy, that was incredible stupid of myself
[G1 Android Development] xillius200:
well I have been able to increase the rom speed and take out swap altogether do you think it would even out performance if I sent the salvik-cache to sd-ext partition would the performance be relatively the same? btw would the 06BindCache script when stuck in Firstboot.sh i've put it in there ^^ send the dalvik-cache to sd-ext by default or by any chance do you have a modified one just for that? lol I would appreciate it if you have one laying about or would the default one work? sry i've forgot a bit while I have been gone :D

PS: I can probably get the partition down to 140 or lower I just chose 161 as it sounded right -_- and big enough to have apps which are also odex'd etc. would you still suggest sending dalvik to sd-ext?

PS2: I still love MTD :D
[G1 Android Development] pardus:
Sorry quick question (hope it's not too nooby:)), rm is remove, right, so there shouldn't be a 06BindCache (or 06bindcache) in '/system/etc/init.d/', should there?
[G1 Android Development] ezterry:
Most not annoying filesystems are case sensitive..

So 06BindCache and 06bindcache are two different files. You removed one the other remains.
[G1 Android Development] Lateralos:
To reset the MTD Partitions back to standard would i just need to wipe down everything and then apply the original custom recovery? cheers in advance
[G1 Android Development] Firerat:
well, if your not using swap dalvik-c on sd-ext might not be all that bad

To send the dalvik-cache to sd-ext use the dc2x option in my all in one script ;)

here is the script it installs

/system/etc/init.d/10bind-dc

#!/system/bin/sh
if [ "`mount |grep -q dalvik-cache;echo $?`" = "1" ];
then
if [ "`egrep -q "sd-ext|/system/sd" /proc/mounts;echo $?`" = "0" ];
then
SD_EXT_DIRECTORY=`egrep "sd-ext|/system/sd" /proc/mounts|awk '{ print $2 }'`
else
echo "sdext not mounted.. nothing to bind with.. exiting"
exit
fi

if [ -e $SD_EXT_DIRECTORY/dalvik-cache ] && [ ! -d $SD_EXT_DIRECTORY/dalvik-cache ];
then
rm $SD_EXT_DIRECTORY/dalvik-cache
fi

if [ ! -d $SD_EXT_DIRECTORY/dalvik-cache ];
then
install -m 771 -o 1000 -g 1000 -d $SD_EXT_DIRECTORY/dalvik-cache
fi

rm /data/dalvik-cache/*
busybox mount -o bind $SD_EXT_DIRECTORY/dalvik-cache /data/dalvik-cache
else
exit 0
fi
[G1 Android Development] xillius200:
thanks firerat ^^
[G1 Android Development] pardus:
Thank you, does it matter which one remains?
[G1 Android Development] rallapag:
nandbackup and nandrestore with custom MTD

Hello Firerat,

Thank you very much for the guide and help you have extended to community

I have successfully used Custom MTD script to redefine partition sizes and install ROM on HTC tattoo.

Therefore linked your post in XDA Tattoo comunity (http://xdaforums.com/showthread.php?p=8785904)

But the problem i am facing is, i couldn't restore any backups i have creatd after custom MTD.

This is how i did it

Install ROM using wipe, flash custom-restore, wipe, reboot-recovery, flash rom, flash boot-patch, restart

Everything works and even with reboots

After a while reboot-recovery, nandbackup and changed ROM & things

Later on reboot-recovery, wipe, custom-restore, wipe, reboot-recovery, nandrestore and boot-patch and restart

At the point phone stays at TATOO screen for ever.

Wipe means data and cache wipe, as system always stays same, it's only data and cache got adjusted.

Please let me know what is the point i am doing wrong. how can create and restore backups from customMTD ROM.

After testing few other things, I have realized that this issue is not associated with CustomMTD. I couldn't even restore other images using original recovery.

Probably some issues associated with sdcard or something else??

I know it is not the right place, but if any one has experience with nand restore and backup help me or point me in right direction

Cheers
[G1 Android Development] roalex:
/dev/block/mtdblock3 92160 87636 4524 95% /system

/dev/block/mtdblock5 120576 90312 30264 75% /data

/dev/block/mtdblock4 2048 776 1272 38% /dev/cache

even tho i have : mtd 90 2

Im pretty sure it use to be exactly 90 with the 1.5.3 version, any idea about this ?
[G1 Android Development] Firerat:
# expr 92160 \/ 1024
90
# expr 120576 \/ 1024
117
# expr 2048 \/ 1024
2

note, expr only does integers, but you get the idea

try df -h instead of just df
[G1 Android Development] roalex:
Yup right again ;) thanks
[G1 Android Development] Firerat:
I couldn't say anything really.

recovery usually dumps a log somewhere that may hold a clue

it could be a space thing ( clockwork 2.5 on g1 carries on with backup, even if space on sdcard is not enough )

it could have been fat being screwy as per the rule that it has to eff up once in a while )
[G1 Android Development] soulife:
i just recommend keeping system related dalvik internal.. this can easily be done on a cyan build by changing build.*.prop value for dalvik in cache and expanding your cache partition to around 40mb depending on what gapps you have installed. then you can bind dalvik to sdext and it will reside only datas dalvik.
[G1 Android Development] Firerat:
yeah, thats not a bad idea

Still, I like to have my app dalvik on internal as well

I could do a script to look at the size of system*dex and available cache to automate that.
[G1 Android Development] soulife:
I used to be the same way, I always kept dalvik internal, but after years of using the g1 I have about 120 apps and it won't fit without moving dalvik to ext. I noticed with system dalvik internal you don't lose the performance that you do with all dalvik on ext. It would be convenient for the general public to have that option for dc2x, but at 30mb it won't fit without a custom mtd table..
[G1 Android Development] Firerat:
well, I think remember a commit to cm6 where it would look at the size of cache

I like the idea very much

infact I even hinted on it in my very old (old ) a2sd for mt3g pre cm5 thread

( or it may have been the cachehack one, can't remember )

please don't comment in either thread, they be dead

but hackish scritpty bs, it can be done, just not in a daz (uk tv ad) way
[G1 Android Development] ftruck90:
Using cm 6.1 rc1 with mtpartmap of 90 2 I'm still only getting a data partition of 90mb with tmpfs at 50 and /dev/cache at 30 is this because cm6.1 isn't binding cache on startup
[G1 Android Development] Firerat:
no

its because you didn't patch recovery & boot
[G1 Android Development] ftruck90:
I was using my old mtdpartmap which didn't have the "mtd" in it as it was used with the old patches hence why it wasn't working
[G1 Android Development] rallapag:
Your guess is right with recovery.

I have downloaded new recovery.img and everything works.

I should have tried things before asking, but tend to get worried when things fail:o

Thanks for your help
[G1 Android Development] mad-murdock:
Can you please tell, which build.prop value this would be? I just read mine and didn't find anything appropriate.

Sure I am on bravo/desire, but the system should be the same. Separating system dalvik from my countless apps sounds perfect

Sent from my S-OFF'd brain using teh internetz
[G1 Android Development] soulife:
dalvik.vm.dexopt-data-only=0

Change the value from 1 to 0.. after reboot it will try to rebuild dalvik on cache, but it will leave it on data or ext depending on where its at on your particular setup.. so delete the old system*.dex. if cache isn't big enough it will fail during dex opt and your device might not boot or if your luck some apps just might not work. So make sure your cache is equal to or bigger than the total size of system*.dex
[G1 Android Development] Firerat:
du -hcs /data/dalvik-cache/system*

will tell you its current size

but I wouldn't bother

use customMTD and shrink cache to 2mb, its pointless
[G1 Android Development] xillius200:
Hey firerat man could you send some insight my way :/ so after I have used FR-boot to get the 06BindCache in the rom I then flash FR-boot-rpp however the 06BindCache is still not executed blah I would have added the 06BindCache to /system/etc/init.d/ and executed it by adding sh /system/etc/init.d/06BindCache being in First_Permissions.sh however reading back through the thread does teh script have to be executed on every boot rather than just once?
[G1 Android Development] Firerat:
the rpp edits the boot.img's init.rc and adds run parts, it should be a one time deal

then again it could be that the sed I use fails,

sed '/class_start default/ i \ \ \ \ # start runparts script\n\ \ \ \ \/system\/bin\/sh \/system/runparts.sh\n' -i init.rc

it looks for a line containing "class_start default", then inserts

# start runparts script
/system/bin/sh /system/runparts.sh

/system/runparts.sh is

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
if [ -e "/system/xbin/logwrapper" ];
then
/system/xbin/logwrapper /system/xbin/busybox echo -e "====================================================================\nShoehorned run-parts\nPlease Pester the ROM Dev to include run-parts in the ROM by default\n===================================================================="
/system/xbin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
else
/system/xbin/busybox run-parts /system/etc/init.d
fi

it should display

====================================================================
Shoehorned run-parts
Please Pester the ROM Dev to include run-parts in the ROM by default
====================================================================

in logcat
[G1 Android Development] xillius200:
ah i see cheers firerat but na it isn't working I don't see

====================================================================

Shoehorned run-parts

Please Pester the ROM Dev to include run-parts in the ROM by default

====================================================================

appear in my logcat :/
[G1 Android Development] Firerat:
ok, well either upload the boot.img, or the init.rc

in terminal

su
cp /init.rc /sdcard/<insert rom name + version here>_init.rc.txt

in all honest , I don't like having to patch the boot.img's init.rc, I would much rather ROMs had the ability to execute boot scripts built in.

busybox's run-parts is the ideal way to do this, as it is very flexible

Actually, thinking about it, it could be that busybox is not where I would expect it to be.. its impossible for me to tell as I have no idea which ROM it is

edit: tbh, i was being lazy, the reason I called a script from the init.rc was so I could have the script do checks and stuff ( as I wasn't sure if all roms had logwrapper,, I've been using cm for too long and have gotten used to how well put together it is... which is the reason I use cm !! ), mind you since busybox has which I can't use that to check for busybox!.. lol scripting 'in the dark' is complicated at times edit 2: doh, I can look for the exit code I guess.. but may need to use a different test syntax grrr I don't know what would and wouldn't work now .. time to flash random roms I guess )
[G1 Android Development] xillius200:
k ill upload the boot.img init,rc file ^^ also I appreciate all the help you give :D
[G1 Android Development] Firerat:
k, I can have a quick look, after sss, but going out soon,, so will be tomorrow if its 'involved'
[G1 Android Development] xillius200:
Damn I have edited this 5 times already lol dw I will just add it to the init.rc myself etc. xD yeah think it may be the sed as the class_start default line is there ^^ lol thanks for the help lol

PS: damn calm down on the edits :D your gonna fry your brain xD

PS2: Na busybox seems to be located where you said it is ^^
[G1 Android Development] Firerat:
well, if the line is there, it _should_ work

if you have no look then let me know the rom, I can then flash itmyself and have a look
[G1 Android Development] xillius200:
yeah will do ^^ well just gonna try in a second so ill say if it works or not :D just gotta download all the android tools first though blah need mkbootimg for the kernel and ramdisk to make a boot.img xD xD
[G1 Android Development] xillius200:
K im gonna take you up on that offer firerat xD na didn't work added that code under class_start default in init.rc remade the boot.img and then added the runparts.sh in the /system/ also got the init.d scripts there but na didn't work -_- anyway here's the link to the rom ^^ haven't patched it with auto_mtd my linux was being screwy and am using for the mtd txt file 161 8 as the system is 158mb or something like that lol

rom: http://www.mediafire.com/?3n0yakmpaq235sg

still not getting that message in logcat thing :/ so im guessing the code ain't running blah might just be im doing something incorrect xD

cheers for all the help :D hope this can get sorted xD
[G1 Android Development] soulife:
I just got tired of tryin to pick apps I used to uninstall to make everything fit. With cache shrunk I had like 15 megs free in data on a fresh install.. with data dalvik on ext and cache at 40 with system dalvik on it I have like 50 somethin megs free, just enough room to breath
[G1 Android Development] sparksco:
I don't know if this is the correct thread for this, but I am having a issue with flashing the latest nightly build on my g1. When I flash the rom, on first boot my logcat shows that the LatinIME.apk fails to load. It says that it can not read the Android.xml file in the apk. So I was wondering if I am running out of room on my system partition on flash? This is my current MTD set up:

/dev/block/mtdblock3 1k-blocks = 92160 / Used = 88644 / Available = 3516 / Use% = 96% / Mounted on = /system
[G1 Android Development] sparksco:
All you need to type in terminal is:

su
# df

This will tell you the sizes of everything
[G1 Android Development] Firerat:
no

df -h

is more useful

( may need busybox df -h on broken roms )

Filesystem Size Used Available Use% Mounted on
tmpfs 48.2M 0 48.2M 0% /dev
tmpfs 48.2M 0 48.2M 0% /mnt/asec
/dev/block/mtdblock3 73.0M 72.6M 396.0K 99% /system
/dev/block/mtdblock5 134.8M 109.8M 24.9M 81% /data
/dev/block/loop0 896.0K 896.0K 0 100% /system/lib/modules

/dev/block/loop1 4.0M 4.0M 0 100% /system/xbin
/dev/block/mmcblk0p2 457.4M 207.7M 225.2M 48% /sd-ext
/dev/block/mmcblk0p2 457.4M 207.7M 225.2M 48% /cache
/dev/block/mtdblock4 2.0M 776.0K 1.2M 38% /dev/cache
/dev/block/mmcblk0p2 457.4M 207.7M 225.2M 48% /data/app
/dev/block/mmcblk0p2 457.4M 207.7M 225.2M 48% /data/app-private
/dev/block/mmcblk0p2 457.4M 207.7M 225.2M 48% /data/data
/dev/block/mmcblk0p2 457.4M 207.7M 225.2M 48% /data/system
/dev/block/vold/179:1
7.0G 6.6G 412.1M 94% /mnt/sdcard
/dev/block/vold/179:1
7.0G 6.6G 412.1M 94% /mnt/secure/asec
[G1 Android Development] xillius200:
dw even though the bindcache script never shown in adb think it's working or my apps2sd is only thing I had to change was the /cache/ size realised 8 was too small for some apps on the market -_- thanks for the help though :D
[G1 Android Development] sparksco:
Great info thanks! I may look into changing my partitions even though I'm on the 2005 spl and you are on 2003. Or maybe I'll just look into 2003 with fastboot. So basicly I would want to set my system size to the size of the rom+gapps uncompressed? I moved some of the gapps to data/app/ like genie widget, maps, ect.
[G1 Android Development] soulife:
Lol, I know, thanks man.. I wasn't talkin about how to check how much room was left.

I think I been gone too long, maybe a froyo remix? Ill be sure to add man pages for the command line impared :)
[G1 Android Development] hotaru:
if you're running a froyo rom with a bunch of apps installed to sd, you may want to do this instead:

df -h | grep -v asec
[G1 Android Development] Firerat:
::facepalm::

@sparksco

do yourself a favour and stop posting, every post you do makes you look even more clueless.
[G1 Android Development] mrinehart93:
What would I write into the mtdpartmap.txt so that instead of moving space from /system to /data, a new partition is created with the freespace? I would like to create a new partition, /dualboot, so that I could install another operating system there (WebOS).
[G1 Android Development] Firerat:
as it stands you can't

would need to change stuff in the script

basically the script creates a command line like

mtdparts=msm_nand:256K@0x0000024C0000(misc),5120K@0x0000026C0000(recovery),2560K@0x000002BC0000(boot),92160k@0x000002E40000(system),2048k@0x8840000(cache),120576k@0x8A40000(userdata)

so between system and cache you would want to make a webos partition

I plan on tiding up the customMTD github , ( branches that make more sense and tags for versions )

when I do that I will add a dual system branch ( which will be very unstable to start with )
[G1 Android Development] mrinehart93:
Hmm, so I'll have to wait until you update the script for that? For the time being, is it possible to boot another system inside of the /data partition? For example, /data/webos?
[G1 Android Development] Firerat:
I haven't looked at the webos yet, so I have no idea

but its a linux kernel, so just do what the hell you want ;)

for now just get it booting 'normally' dual booting can come later

in my head I can get dual boot working,

for say FroYo + donut, but without a working recovery on the phone.

its very easy, just havn't got round to doing it yet

have a couple of things in my head than will enable us to keep a working recovery on the phone , but need to work through them.
[G1 Android Development] ktmdms:
Maybe I missed it but, with every nightly that I install, do I need to run the PatchUpdateScript against it before I install it or is that a one and done deal and the aio stuff will remain installed even with updates?

Thanks.
[G1 Android Development] Firerat:
the PatchUpdateScript shoehorns the boot patcher into the ROM

so you need to do that, or flash the boot patcher Manually after flashing the ROM
[G1 Android Development] mrinehart93:
So would there be a way currently that I could wipe Android off my phone and install a bootable version of the WebOS port I've come up with?
[G1 Android Development] bigboidomo:
ZipPatcher

Can someone clarify what the rom PatchUpdateScript actually does?

I mean, does it make it so when flash a rom it automatically patches recovery, or do you still have to flash the recoveryMtd and the patch makes it so you do not have to apply boot.mtd. everytime you flash a rom or kernal?
[G1 Android Development] Firerat:
http://xdaforums.com/showpost.php?p=9052199&postcount=486
[G1 Android Development] Firerat:
seriously , do you need to ask such questions?

you obviously don't understand basics, how do you expect to get this webos off the ground?
[G1 Android Development] bigboidomo:
thanks

thanks and sorry about the double post @_@