yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] FatBoyExtraordinaire:
This is truly fascinating and incredible stuff you guys (with extra special credit going to you for creating this new method and LB for bringing it back to light). On behalf of all G1 users, I thank you. As some one who can't use Fastboot or ADB (because my G1 is an ass to my computer for some reason. I know Firerat must be like "shut up", as many times as I've mentioned that to him) this method (once it becomes stable of course) should work perfectly for me and people in similar situations. Am I correcting in believing so?
[G1 Android Development] scholbert:
Thanks for pointing out, saves much time...

Be it the birth, droidhacker :D

Anyway, i hope it doesn't hurt to point at adq's discovery.

Regards,

scholbert
[G1 Android Development] lbcoder:
Not at all!

It is actually quite interesting, since the same "thing" was found, but it simply wasn't followed through to the same place because the INTENTION was different. When I went looking into the mtd drivers, it was with the explicit objective of altering the partition table.
[G1 Android Development] lbcoder:
I believe that you are correct in believing so.

There are a bunch of not-too-complicated things that can be added to this scheme to make it pretty straight-forward to apply.... automated, even.

One thing that you should hopefully find soon is that things should be handled in the background UPON ROM INSTALL -- such that any particular ROM will ALTER the partitioning to make a system partition of whatever size *IT NEEDS*.
[G1 Android Development] lbcoder:
One minor nitpicky thing you forgot.....

modprobe hci_uart

Kinda needed in order to get bluetooth to actually work.

#!/system/bin/sh
#/system/etc/init.d/04modules
# Load any extra modules

MODULES="hci_uart"

if [ "`getprop persist.net.ipv6`" = "1" ]; then
MODULES="$MODULES ipv6"
fi

for i in $MODULES;
do
modprobe $i;
done
[G1 Android Development] Ace42:
So for a rom i'm working on I'll be able to move the entire framework to /sys instead of /data instead? Also our int memory(for apps) will be at what amount after using this?
[G1 Android Development] lbcoder:
If you use it the way that Firerat configured it, you'll be at 90/5/114 for system/cache/data.

If you do it your own way, it can be any/any/any where sum of any ~209
[G1 Android Development] Firerat:
oops :o

I didn't notice that, guess its because I never use bt

the little patchers avoid that problem, the just patch the already installed boot/recover .imgs :)
[G1 Android Development] Ace42:
Thanks for the response, i'll test this on a rom to see how it goes. But first I must downgrade my SPL from haykuro.
[G1 Android Development] lbcoder:
You're missing the point of this....

It DOESN'T MATTER what SPL you have!

It works with ALL.
[G1 Android Development] Ace42:
Wow do I feel dumb...Good thing I didn't downgrade yet.

When I read the op and it said the the danger is obsolete I assumed it wasn't needed then i saw firerats patch and knew he didnt have the danger too.
[G1 Android Development] haozheng91:
does this work with Magic 32A too? does it matter what radio/spl we are on?
[G1 Android Development] FatBoyExtraordinaire:
This post right here is officially the greatest news I have heard on XDA ever. Just the possibilities and simplification of everything sounds truly incredible. Consider this thread bookmarked!
[G1 Android Development] Blackman778g:
Well, I am shocked that we can do all this whith the G1.... the G1 shall never die!

So if I flash those files/images in Firerat's post will my phone continue work with every ROM or certain ones?
[G1 Android Development] lbcoder:
Not quite. The rom has to be built with this approach in mind or modified to support it. We don't do anything PERMANENT to the phone, which is what is great about this.

And you notice how when you substitute that cheap sounding thing that tmobile likes to use for dream with the proper device name, that your statement sounds WAY COOLER?
[G1 Android Development] zim2dive:
along those lines... have any nibbles from the chefs on this getting adopted?
[G1 Android Development] FatBoyExtraordinaire:
Exactly!

Double exactly!

Honestly though, once Devs start using this, the possibilities will be endless.
[G1 Android Development] lbcoder:
Hard to say.... is this a nibble?

http://code.google.com/p/cyanogenmo...Version Model Owner Summary Stars Modified#c9
[G1 Android Development] lbcoder:
FYI: It doesn't matter too much if the "chefs" adopt it directly. It can still be set up in a way where ANY USER can EASILY apply it. Firerat has already written up some scripts to make things easier.

You want to know HOW easily this could be made to be applied?

***AUTOMATIC***.

As in integrated with recovery.

Imagine this: right now the custom recovery imaged have the option to "flash any zip". How would you like the option to "flash any bootable zip with custom partition table" -- it'll prompt you for system and cache sizes, load mtd with that mapping, flash the zip, and modify the boot image.
[G1 Android Development] Ace42:
I don't understand though, how come the devs that work at HTC or Tmo don't know about this? Is it like an ancient secret or something?

Cause if they did know then they could release a froyo release or maybe espresso rom.And can Amon_Ra mix this with 1.7.1 and add it to other phones to with his recovery?
[G1 Android Development] lbcoder:
They don't *need* to know.

tmobile has NOTHING to do with ANYTHING... AT ALL. So they don't need to know about anything.

HTC built the phone. They have the SOURCE CODE for the SPL and can build new SPLs for any phone they've ever sold, so it doesn't MATTER to them.
[G1 Android Development] Ace42:
They should at least make updates to froyo for their adp devices.
[G1 Android Development] zim2dive:
yep, I'd say you have their attention.
[G1 Android Development] lbcoder:
You may have missed it, but google confirms that they made up froyo specifically with ADP1 in mind. It builds, installs, and works bone stock from AOSP on ADP1. (less proprietary functionality, i.e. you can't make a phone call).

HTC has *confirmed* that they will be producing an update for ION/ADP2, which is *so absolutely the same damned thing* as DREAM/ADP1 that the ONLY thing you may need to do (assuming that they don't also build for DREAM/ADP1) is.... rebuild the boot image with a custom partition table ;)
[G1 Android Development] Se7eN43:
has no one else tried this? i went ahead with it but after flashing the recovery patcher within the recovery console, i rebooted back into recovery and freezes at the recovery menu with the error "E: Can't open CACHE: Recovery/ Log. did i do something wrong here FR?
[G1 Android Development] Firerat:
you may have to do a full fastboot wipe

fastboot system -w

from pc
[G1 Android Development] Daneshm90:
Correction: fastboot erase system -w
[G1 Android Development] Se7eN43:
ok im stuck at the G1 screen. i first flashed the recovery patch > fastboot erase system -w > recovery wiped all > flashed cm508 rom > flashed boot patch > reboot. i gave it 5mins, which never takes that long to see the boot animation. am i being impatient?
[G1 Android Development] albatorcobra:
I am stuck on g1 boot screen too with cm508.
[G1 Android Development] goldenarmZ:
I don't mean to sound arrogant but if you don't have the ability to diagnose and correct any problems in this process, you probably shouldn't be messing with it just yet.

Wait til this has been developed into a more user-friendly form and don't clutter up the thread with "stuck on g1 screen".
[G1 Android Development] zelipukin:
bootloop

Followed exactly

Got a bootloop (G1 screen):

rebooted to recovery , flashed CM again = working phone, but

G1

2.22.19.261

1.7.0

CM5.0.8

8GB cl.6 32/512/
[G1 Android Development] sapphireHero:
I am getting the same loops on boot on my 32B. Tried reinstalling CM 5.0.8 final and applying the boot patch still the same.

Edit: After just applying cm-update again, the phone would boot up, show bunch of FCs and reboot. Had to reinstall the recovery to get to normal again.
[G1 Android Development] albatorcobra:
I didn't see Firerat updated his sripts, now custom partition works for me in recovery, but cm508 doesn't boot, I cannot logcat.

What I have done:

- flash the recovery patcher

- fastboot erase system -w

- wipe

- flash cm508

- flash gapps

- flash the boot patcher

Has anyone succeded in flashing stock cm508 with this method on G1?

Here are my partitions on recovery:

/ # mount -a
/ # df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 47.8M 0 47.8M 0% /dev
/dev/block/mtdblock4 5.0M 1.1M 3.9M 23% /cache
/dev/block/mtdblock3 90.0M 87.7M 2.3M 97% /system
/dev/block/mtdblock5 114.8M 1.1M 113.6M 1% /data
/dev/block/mmcblk0p1 6.5G 3.4G 3.1G 53% /sdcard
/dev/block/mmcblk0p2 1003.7M 174.6M 778.1M 18% /sd-ext
[G1 Android Development] Firerat:
I was having the exact same problem with cm5.0.8

seems it may have something todo with the spl after all

attached is the kernel I'm using

its patched as 90:5 , so if you have used a custom mtdpartmap.txt flash the patcher again
[G1 Android Development] albatorcobra:
That is working for me with your kernel! Thank you!

Is the boot partition bigger on Danger SPL?
[G1 Android Development] Sik-1:
i followed the steps as stated and the only thing i get is a boot loop at the tmo g1 screen....

now i cant flash anything else at all, everything does the samething, even my backups wont restore, cant even get a logcat

nice job
[G1 Android Development] Firerat:
did you do fastboot erase system -w ?
[G1 Android Development] Se7eN43:
Not cool. Where there's fastboot, there's a way, but I think you don't deserve it for what you said sik-1
[G1 Android Development] Sik-1:
ok, this is just wat happened to me, firerat neva sent anybody on the wrong path...

but this is wat happened..... bcuz it started looping at the tmo g1 screen, i simply rebooted and flash over again without his patches...everything worked fine now

the custom layout is also even in place, i just dont kno y wen it first was tryin to boot it didnt...

i tried it with a hero rom and it seems to stay without flashing the patches again, i dont kno wats up wit my g1, but it sure is working much smoother:D
[G1 Android Development] Firerat:
interesting, your saying that you can boot without 'patching' the boot.img and you still have the custom layout?

got to test that, maybe all we have to do is patch our recovery.

Edit:

nope, the boot.img must have the correct partition mapping

booting with a none matching map will also 'kill' stuff, I presume this is due to the init.rc mounting data and writeing stuff, but in actual fact its written stuff over where we wanted system to be and just mashes it up
[G1 Android Development] zelipukin:
That is working for me too with your kernel !!! Thank you !!!

G1

2.22.19.261

1.7.0

CM5.0.8

FR-2634-MPH-s90c5d114_S

8GB cl.6 32/512/
[G1 Android Development] Blackman778g:
That would be awsome... Maybe I'll keep this aging *DREAM* for a long time..

lol, I wonder the same thing.... it's odd how they can get their sales and phones off the shelve by releasing a new phone every week but, can't even keep them alive and running. These phones have so many capabilities but, we dont get to see them because of their greed and want of being the best.
[G1 Android Development] lbcoder:
As I already explained, they ***DO NOT NEED IT***. HTC has the SOURCE CODE for the SPL and can change the SPL (and partition table along with it) at will.
[G1 Android Development] Babaki:
god dam, you ****ers are smart!
[G1 Android Development] haralampije2:
Is this compatible with 32a magics?:confused:
[G1 Android Development] Daneshm90:
Compatible ? :confused:

Any boot.img/recovery.img meant for 32a magics will work if u list the custom partition when packaging the image. Refer to OP.
[G1 Android Development] lbcoder:
***EVERYTHING*** that uses MTD drivers for the internal storage, which most definitely *does* include 32A, and I believe, in fact, for sure all HTC ANDROID PHONES, and probably most (if not all) non-HTC android phones (obviously depends on being ABLE to set the kernel command line in the boot image).
[G1 Android Development] sapphireHero:
Can somebody point what am i doing wrong on this. I did flashing the recovery script, erased from fastboot, wiped, flashed cm 5.0.8 final (fireats provided boot.img)+ gapps and boot script.

Still getting boot loops as before. Heres the file structure. It seems that the script worked beside that loop partition.

device : mt3g

thanx.
[G1 Android Development] lbcoder:
Judging by the fact that you are able to show the output of the "free" command, how can you say that it is "boot looping"? From where I'm sitting, it looks like its working perfectly. If it is "boot looping", then how did you get a working terminal?

And what's wrong with the loop partition? It looks like it mounted just fine.
[G1 Android Development] sapphireHero:
Actually I can adb during the loops. From a logcat I see that it doesn't come any further than a particular screen. The phone just shows me the first boot logo.

I attachted my logcat with this. Thanx for the help.
[G1 Android Development] Firerat:
your sdcard doesn't appear to be formatted correctly ( 6k is way too small for fs overhead )

infact, seeing as you have an mt3g, you don't even need sd ext

repartition your sdcard,

or, try and create dalvik-cache

adb remount

adb shell mkdir /cache/dalvik-cache
[G1 Android Development] lbcoder:
Interesting spot, BUT, 457.4M-6K != 432.9M --- the difference is the filesystem overhead ;)

Not saying that 6K is reasonable though, definitely something weird going on there -- what is the output of "mount"?

And this should definitely be a clue:

E/dalvikvm( 156): Can't open dex cache '/cache/dalvik-cache/system@framework@core.jar@classes.dex': No such file or directory
I/dalvikvm( 156): Unable to open or create cache for /system/framework/core.jar (/cache/dalvik-cache/system@framework@core.jar@classes.dex)
D/dalvikvm( 156): Unable to process classpath element '/system/framework/core.jar'

... unable to open or create.

** no need to do an "adb remount" for modifying cache... adb remount just remounts /system as rw, nothing more.

For whatever reason, it appears that the sdcard is not writable and/or hasn't been set up correctly. This is ***NOT*** a result of the partition table change.

The output of the mount command will indicate HOW the sdcard is mounted. I suspect that it is mounted READONLY, possibly due to corruption, but possibly also could be due to some weird changes that CM has made to the kernel. Reformatting it is probably necessary. Unmount the sdcard, and run the following;

umount /sd-ext

umount /dev/block/mmcblk0p2

e2fsck /dev/block/mmcblk0p2

*** see what e2fsck does/says. If it fixes it, you may be good to keep going -- create directories

If the whole thing blows up in your face, or just to start over from nice fresh, you may do the following:

mke2fs /dev/block/mmcblk0p2

e2fsck
[G1 Android Development] Firerat:
Ah, yeah adb remount

I was going to delete the bind mount from init.d, but then figured it would be nice to see what happened when making the directory

6k used looks messed up
[G1 Android Development] :
Boot loop... i've flashed the patch on cm 5.0.8 DS (SPL DANGER)
[G1 Android Development] lbcoder:
WHAT PATCH did you flash?

Did you WIPE EVERYTHING?

Did you flash from MODIFIED RECOVERY?
[G1 Android Development] sapphireHero:
that did the job. I tried repartitioning my sdcard but got the same loop. Then did the "adb shell mkdir /cache/dalvik-cache" during the loops and rebooted. I am now on the welcome screen. Thanx for the help Firerat and lbcoder.

ps. can this be used to reallocate more memory to ram?
[G1 Android Development] Firerat:
In a single word

No
[G1 Android Development] enatefox:
I lol'd at that one
[G1 Android Development] TheNewGuy:
I want this so bad!! How is the testing going? anyone have an idea when there will be a version for newbs. something flashable from recovery? I am unfamiliar with the line

fastboot erase system -w

anyway this is such a big deal that I will be patient if need be...
[G1 Android Development] TheNewGuy:
Thanks for the link. I have set up ADB and Fastboot, and I guess I know how to run that command but I guess I am still a little confused by the instructions.

Is that the correct procedure for the beta 2 patch? and if so is the line I mentioned necessary? if so when in the procedure should I clear the system?

fastboot erase system -w

Can any one clear this up for me, it looks like there were some edits made to the first post on the link to the beta2 and I am unsure exactly what to do and even though I may be able to repair my phone(with your help) I have never had to and I want to get this right the first time..
[G1 Android Development] Firerat:
tbh, I would say it is a requirement

but you might get away without it just make sure you wipe cache and data before rebooting to the modified recovery

but I haven't tried that nearly enough times to say for sure,I have had at least two 'glithes' where I've had 'junk' on the file system, that could not be easily deleted when I didn't fastboot wipe before booting the modifed recovery ( you only need to do the wipe each time you install a new recovery )
[G1 Android Development] TheNewGuy:
Ok thank you for the reply. so that would be
[G1 Android Development] juangil:
@firerat

after flashing recovery and rebooting back to recovery I see no difference.. am still at RA-dream 1.7 but same I had, not the modified ( I guess?)

yours should have htc logo with black background right?
[G1 Android Development] Firerat:
it dumps your recovery, unpacks it, repacks it with the new partition layout, and then flashes it

do

adb shell df -h

you should see a 5mb cache instead of 30mb ( 67.5 NoneDanger )

the boot patcher does the same, but to boot
[G1 Android Development] juangil:
cool..

thanks for your quick response ( as always..):D

you are very helpful firerat!
[G1 Android Development] pathia:
Nevermind, the original method you posted worked just fine, ignore my post :)
[G1 Android Development] Ace42:
Here is the size of each:Total 261

/System 92

/data 91

/cache 30

/dev 48

Rom: Jubeh Froyo

rec: Amon 1.6.2 & Danger spl

I followed your steps from beginning to end.
[G1 Android Development] lbcoder:
Let me clear up one thing about WIPING.

A WIPE is not a TOTAL WIPE. All it does is it zeros out the first 128kB of the partitions and writes a new filesystem header there.

The big important thing you want to do is to wipe AFTER loading the custom partition layout. It may be possible to *get away* with wiping BEFORE, but it is actually BETTER to wipe AFTER. This ensures that the filesystems are set up correctly at the START of the partitions.

Also, by personal preference, I favor the idea of just flashing a modified recovery while still in fastboot, then just reboot into [modified] recovery (which can be done without rebooting using "fastboot boot recovery.img"), format (wipe) data and cache, flash, and end everything with flashing the boot patch.
[G1 Android Development] lbcoder:
Not only can you simply flash the prepatched recovery image through fastboot, you can fastboot boot it, or you can even fastboot -c "mtdparts=..." boot non-modified-recovery.img using the kernel command line that corresponds to firerat's partition table (which you should be able to find if you look a few pages back).

There are SO MANY ways to do this. Take your pick, use whatever works best for you.
[G1 Android Development] Firerat:
errm, ok , I'll have to try with 1.6.2

maybe the script is dependent on something in 1.7.0
[G1 Android Development] lbcoder:
That is *definitely NOT* a modified recovery.

You can tell by the 30 MB cache partition.

Try again.
[G1 Android Development] Ace42:
I downgraded the rec b/c I keep getting a blue led after rebooting from recovery, it was very annoying.

What I did:

1.Goto rec, flash the rec patcher, went to console.typed reboot recovery

2.wiped all

3.flash froyo, then a pershoot kernel

4.flash the boot patcher

5.reboot
[G1 Android Development] juangil:
can you tell me where is my 5MB cache here please?

# df -h

Filesystem Size Used Available Use% Mounted on

tmpfs 47.8M 0 47.8M 0% /dev

tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals

/dev/block/mtdblock3 90.0M 82.6M 7.4M 92% /system

/dev/block/mtdblock5 114.8M 49.3M 65.5M 43% /data

/dev/block/loop0 1.0M 1.0M 0 100% /system/lib/modules

/dev/block/mtdblock4 826.1M 16.8M 767.3M 2% /cache

/dev/block/mmcblk0p2 826.1M 16.8M 767.3M 2% /sd-ext

/dev/block/mmcblk0p2 826.1M 16.8M 767.3M 2% /cache

/dev/block//vold/179:1

6.5G 3.7G 2.8G 58% /sdcard
[G1 Android Development] lbcoder:
You booted into the full build. The 5MB cache partition is out of sight due to being bound to the sdcard. From the recovery system, you can see the cache partition mounted as 5MB since there is no bind mount.

In any case, you can tell that it is right by the size of the system and data partitions.
[G1 Android Development] juangil:
a'right then, I got it, yeah I saw 90 and 114 but didn't realized cache was only seen from recovery

thanks for the clarification :)
[G1 Android Development] Firerat:
ahh, you will only see that in recovery

I install a script to bind mount cache, as 5mb is too small

it worked, look at the size of data
[G1 Android Development] Firerat:
it worked fine for me on 1.6.2

so, I'm a little confused
[G1 Android Development] Ace42:
Ive tried 2 times using this post from you:

http://xdaforums.com/showpost.php?p=6927076&postcount=58

I notice that you updated on the 29th but the script I have is from 24th.
[G1 Android Development] Firerat:
ooww, actually yes , that would be it

first I did the linux only one, then thought about doing it on the phone

but I resused the same script and forgot to add prefixes , so it never actaully flashed anything

I updated the 25th

:(
[G1 Android Development] Ace42:
Then I shall once again with the updated patches.
[G1 Android Development] Firerat:
:D that will work, I promise
[G1 Android Development] ftruck90:
I fastboot erased system then rebooted to recovery, flashed the MTD recovery patch, rebooted back to recovery df -h showed 5mb cache, flashed chromatic's 3.6 which i thought might be ok as it just uses a OC'd 2.6.3.4 kernel and flashed gapps, flashed MTD boot patch then rebooted to bootloops. log cat attached

adb remounted then mkdir cache/dalvik-cache during loops then rebooted but alas no luck..i was wondering if you could shed any light on the matter
[G1 Android Development] Firerat:
from first looks, it appears that /data/dalvik-cache/ is missing

first off lets check data is mounted

adb shell df

data should be around 114mb

mkdir /data/dalvik-cache

the reason we did /cache/dalvik-cache before was because they were an MT3G. The build.trout.prop in CM5 excludes cache from being used for dalvik-c so we don't needed to worry about it, where as the sapphire.prop doesn't since the mt3g has 80mb cache. I have since added a little bit to the script to create /cache/dalvik-cache in anycase ( not released yet ), so in future it won't be an issue..

now if data isn't mounted.. we will have to look at that a little closer
[G1 Android Development] Ace42:
I have the same prob as him, should I repeat the steps after making the directory?
[G1 Android Development] Firerat:
once you make the directory it should start working

you will see the logcat change

this is Jubeh's Froyo?

I've not actually looked at how its doing things, but tbh of the top of my head I can't think why it wouldn't make /data/dalvik-cache in the first place

I'll have a proper look,

...after I have got myself a coffee :)
[G1 Android Development] ftruck90:
I'm using chromatic 3.6 but yeah checked and it's not mounting data but when i tried to mkdir /data/dalvik-cache it fails to create directory because read only file system.
[G1 Android Development] Ace42:
When you goto make the dir, try:

rwsystem or mount or mount -a

one of these should work for you