yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] fonix232:
Let's say I want to flash a SYSTEM image with a size of 120MB. Is it possible to do so using this one? I want to try some ****, data size does not matter, I want a bigger system :D

Also I want to make fastboot do the flash, but even with a 150 system 2 cache setting, it says image is too long :S Any suggestions?

Or does anyone have the source code of the G1 T-Mobile SPL?
[G1 Android Development] Firerat:
Yes, but you will not get what you are trying to do to work. It seems clear to me that you lack understanding I doubt you have even included g1 compatible bins

And why the hell are you twittering on about spl?

Honestly, you are not capable, wait for someone capable to port the dump you have
[G1 Android Development] fonix232:
Please do not underestimate me :D I am a beginner, but I learn fast ;)

First of all, yes I want to try the RBM2 system image. I did not modify anything in it, I KNOW many stuff will not work (bluetooth, wifi, GSM modules, GPS, and maybe even the screen), but worth a try.

I had a feeling about this. Maybe I read two things together, but I thought (a weird idea) that SPL controls the size of the partitions (that's why we can flash ROM's over 90MB with hardSPL, but not with stock one). Looks like I was wrong.

I know I am not capable. Any time I jump into something new, I try with a big thing, get info about it, and work a lot on it. For me, that's the best way to learn how things work, and how should I do them.
[G1 Android Development] Firerat:
it will not boot without compatible bins

you can not use fastboot's flash for system, cache or data as we use a different mapping to the SPL

your numbers are wrong, hard spl is 67.5 system, danget spl is 90, only customMTD will allow over 90

I haven't underestimated you, you have a complete lack of understanding, I doubt you have much in the way of logical reasoning as you have failed to understand the basics of how CustomMTD works.

I very much doubt you are a fast learner, for the same reason as I doubt your logical reasoning skills.
[G1 Android Development] fonix232:
Okay, got it. Any way, I will keep trying. I got it how customMTD works, but I was hoping it can affect fastboot too. Well, hope dies last, hope died, we are dead. Don't need to be so hostile because of a simple question. I appreciate all your work, all I did is ask what was bothering me.
[G1 Android Development] Firerat:
it shouldn't do, I have the script convert it to unix format

I've just tried it, and it worked for me

attached is a 70 2 config

put on root of the sdcard

flash recovery-v1-1

wipe

reboot

restore/flash rom

flash boot-v1-2
[G1 Android Development] Ace42:
Thanks, didn't know a 1.2 was out. But now you flash boot before flashing the rom?
[G1 Android Development] bert269:
Fireat,

Again - thank you for all your help. I am currently traveling and on the plane today, I made a Nandroid (+ext) backup of SuperBad 1.7(ROM I re-installed last night). Did a complete wipe and restore. Well, once again, the restore did not complete (same as with the first issue after installing MTD, the restore dots just continue...forever, filling and scrolling more than one screen. normally it's <10 lines)...so something is wrong.

Then I reinstall the same ROM again (after wiping) and got my phone to work at least. I connected it to the laptop and did an ADB shell with the flash_image command. The result was (see attachment).

So I rebooted into recovery and console command, try to flash recovery. The command returned almost instantaneously - as if it did not do anything. But it did not gave any errors either. Since it's the same recovery that I had before, how can I tell if it actually did flash it again? Maybe I should flash a previous version 1.6.x and then 1.7.0, just to make sure it does something (make any sense?)

I have not tried to restore a nandroid backup again, after my last attempt of the flashing of recovery.

Are there any other diagnostics I can run to see if the different partitions are OK (you mentioned /system) before.

When I do a fs, I see all the partitions just fine...(see second attachment)

Any ideas? Should I just try and do another restore and if that fails, re-install the ROM again?

Could it be that one of the areas of flash-memory got screwed-up? I have been flashing a lot of ROMS on this G1 and always do a full wipe......ideas?

Please let me know. I'm still traveling and will check once I land again, for any feedback or ideas.

Thanks

Bert
[G1 Android Development] Firerat:
oops , no , I'll fix that in my post :)
[G1 Android Development] Firerat:
are you trying to flash recovery from a CM5 based ROM?

Don't it has a bug, user recovery or fastboot

but it looks like it worked

flash_image checks the header of the installed boot.img, if it matches the one you are wanting to flash, it just stops

I myself have seen the same issue you are having with the "restore for ever"

Edit: probably worth pointing out I first saw it a while ago, way before this 'hack', but I've also managed to get in the same state while testing, but I set out to break it ;)

from PC

fastboot erase system -w

will fix it

afaik RA recovery just mounts and deletes, if the yaffs2 filesystem is screwed up in anyway it won't do a 'proper job'

if you can't fastboot, then try clockwork recovery 2.0.2.0, it has

erase_image

this should do the same thing as a fastboot erase

erase_image system

erase_image cache

erase_image userdata

or use the partition menu in clockwork recovery (cwr)

http://www.koushikdutta.com/2010/02/clockwork-recovery-image.html

get the .img file from ^^^

HTC Dream (GSM)

and flash via recovery .. don't do it from CM5 based ROM with flash_image or ROM Manager, chances are it won't work
[G1 Android Development] Firerat:
yeah, I think its just how mountd 'maps' it
[G1 Android Development] lbcoder:
Hard link. They are literally the exact same thing.
[G1 Android Development] mdneilson:
Aaah, I see. Thanks.
[G1 Android Development] rsxtypes72:
hey firerat

Just wanted to give a warning to all noobs like me. You will be stuck in a boot loop if you install this hack and then find that you want to change your ext partitons. I didnt realize I was on ext2 and used Amon RA 1.7.0 to change ext2-ext3 then ext3 -ext4 got in a stuck in loop. To fix I had to reflash recovery img.
[G1 Android Development] bert269:
It's working...thanks

Fireat,

Well, I think must have gone seriously wrong with the first flash. That's why I could not boot a Nandroid restore. I did install the clockwork recovery (but does not like it: I'm not sure what are the different format / delete options for partitions. With RA-recovery, they are seperated and I know which one does what). Anyway, I tried it once again after using clockwork recovery - and still no luck. Then I decided that I should increase my setting sizes form 85 5 to 10 (just as a test). I re-installed RA-recovery, did falshed the MTD-recovery, android restore and the MTD-boot (1.2) Boom! It booted!...

This is the before and after shot(See attachment)

I think I'll scale back a little on the settings, until I reach optimum values.

GREAT features....thanks!
[G1 Android Development] bert269:
Last question - (i promise...LOL)

If I make a change in the sizes (mtdpartmap.txt), what should I wipe & flash? I tried to find it in the OP, but I only find the instructions for a new install. I tried to only wipe (Data & Cache) then flash MTD-recov, reboot2recov and get

E:/Can't open CACHE:recovery/log errors....

I then:

1) re-flashed the original RA-recovery,

2) reboot2recov,

3) wiped everything (0-4),

4) flash MTD-recovery,

5) reboot2recov,

6) nandroid restore,

7) flash MTD-boot,

8) reboot.

What are the steps if you want to just apply a size change in the partitions, what do you need to wipe and what do you need to flash?

Bert
[G1 Android Development] lbcoder:
If you want to apply a SIZE CHANGE, you currently need to wipe EVERYTHING!

And not only that, but the cache and userdata partitions need to be wiped with the NEW CUSTOM TABLE LOADED.
[G1 Android Development] Firerat:
when you shrink system, cache will get the hangover from it

2mb cache _should_ be fine, but you *must* clear it

the easiest way is to just blank everything via fastboot

fastboot erase system -w

clockwork recovery's partition format also seems to work well.

Honestly, if you have problems, just clear system , cache and data

as long as your nand backups are not larger than the target, they will restore just fine

( the system.img and data.img are not 'flashed' direct, the files are extracted into the /system and /data folders respectively )

Just remember to flash the boot patcher after the restore
[G1 Android Development] Firerat:
been playing,

I currently have my recovery 'patched' to report itself as 1.33.2005

so no need to be messing with the updater-script

I'll play with it some more, and make it optional in the config
[G1 Android Development] Firerat:
added recovery Patcher v1.3 to post 2

http://xdaforums.com/showthread.php?p=7061481#post7061481

NoneDangerSPl users can use this to trick a ROM into thinking it is DangerSPL

( no need to edit the update(r)-script to install on NoneDanger )
[G1 Android Development] goofyog:
Firerat is the ROM faster then usual sd card?if it is can we make swap from it?
[G1 Android Development] Firerat:
I would not advise it, its easy and cheap to replace a worn out sdcard, your MTD goes and you don't have much in the way of options.
[G1 Android Development] goofyog:
ok thanks for quick reply:)
[G1 Android Development] maxisma:
And yaffs2 doesn't support swapfiles..
[G1 Android Development] Ace42:
Regardless of what I do there's always ~30MB of xxxMB of /data being used by something, are there other files using that space?

I changed my recovery to clockwork since it has the partition wiper you mention to me before, I like it a bit more since it has that rom manager app(surprised amon doesnt have one).
[G1 Android Development] Firerat:
then you *don't* understand how CustomMTD works

honestly stop kidding yourself

fact is I'm not a nice guy and I'm often blunt

your question was poorly constructed, you were bleating like an excited kid and I had to guess what you were actually trying to achieve.

It can be done, but you need to understand more before you can do it.

link the dump, I might port it .. I was thinking of porting the Vision, I might as well do both at the same time
[G1 Android Development] fonix232:
It rewrites/overwrites the MTD partition layout. Now what I did not know was that fastboot reads this layout, or has it's own, built in. Now that's why I asked for the source code (so I can alter it, making fastboot detect the 120MB I allocated).

Yes, I noticed, no problem with it, at least you aren't like so much other modders who are always kind (but telling otherwise behind them). You are a straight man - even if you hurt some - and I respect you for this. Todays it is hard to find such men (at least in the Symbian Community it is in the last years).

I know it was, I am still kinda excited (and you can say I'm a kid, I'm just 16) about the stuff, and sorry for that. I am here to learn, and what is better way to learn than trying?

Here you go:

http://www.mediafire.com/?77o0d9mas8p990w

It is not a dump, but a firmware update for the Huawei u8230 (RedBullMobile 2 firmware) from RedBull Mobile Austria. I attached the tool to take apart the updata.app, and also my extracted files. And thank you for helping me out!

(If you don't mind, I would like to ask you to help me with learning. I know, it will be a long trip, but if you are successful of porting the firmware, could you tell me what you modified, and how? That would make it a lot easier to learn. Of course if you say no, I understand, as a Symbian developer, I had enough of the stupid questions like this. At least here I did not found that huge layer of people who just aren't dumb (like me, YET), but can't even speak english properly.)
[G1 Android Development] Shadowafs8:
Any ideas on this?
[G1 Android Development] ezterry:
If you applied a custom mtd recovery re-apply a non modified custom recovery before flashing 1.33.2003

If you have the unmodified custom recovery and its failing try running erase_image on cache (you may need to find the binary or use clockwork recovery)

If it still fails you may have an issue with cache.
[G1 Android Development] Shadowafs8:
Hpw can I re-apply a non modified custom recovery rom? Should I just install clockwork recovery and that will work?
[G1 Android Development] ezterry:
The reason we assume you know how to do this is its part of the instructions on the ra-recovery page
[G1 Android Development] Shadowafs8:
Thank you so much for this patience

I already have this recovery, should I still proceed in re-installing it? Also can work if I put in the command to flash the radio.

Okay, so I've tried installing clockwork recovery and now instead of booting to the recovery it goes to the multicolored screen...I'm getting real tired of this screen now...
[G1 Android Development] Firerat:
The SPL is closed source, 'hacking' it would not be trivial, and you have no real advantage with being able to flash system,cache or data via fastboot ( but a secondary boot partition would be handy for dual boots without loosing recovery)

Well, hangovers bring out the 'worst' in me

fair play, don't let an a hole like me put you off

I'll try and have a look next week

will do, 'porting' isn't all that difficult , for the most part you just need to 'kang' libs from a ROM that works, and the 'make it fit' but since we have CustomMTD we can just make our device fit the ROM , and not the other way round as in the past

CustomMTD works by giving the MTD layout via the kernel command line ( which in this case is included in the boot.img header, and not 'hardcoded' into the kernel, think of boot.img as a kind of mini lilo/grub )

since the new MTD layout only effects the running kernel fastboot will only work with radio,misc, hboot, boot and recovery as we keep these the same as the SPL's ( we can not change them as the SPL *needs* to use these, we could possible 'grow' boot, but no real point in doing that as far as I see.. but maybe it could be useful for something.. no idea if growing boot will actually work )

BTW , don't mess with radio,misc or hboot unless you *really* have to and know what you are doing
[G1 Android Development] fonix232:
I see. Hell, editing SPL would be a lot easier if it was opensource.

You did not put me off. You were straight, and even if you were a bit harsh, you were right, and you did not hurt me.

Great, thank you very much!

To do not spam here, please, could you post any news here?

Well until I don't really know all little part of android, I won't risk it ;)

But if it is all about kanging libraries, why BT won't work on Sense ROMs?

I know this may be a bit offtopic, but let's say, we can grow the boot partition to a size what can contain a whole GRUB system. Then, would it be possible to have Maemo, a special Ubuntu (compiled to ARM, with modified Gnome for our screen), or any other mobile Linux on our phone(on the sd card)? Of course with a lot of modifying, and experimenting, but theoretically?

Also I never intended to modify any of those without experience. I read too much of bricks (unrecoverable bricks) because of tinkering around them that I do not want to risk it.
[G1 Android Development] Firerat:
people have already got native Linux via modified recovery

assuming the kernel was compatible with both android and a ;inux native you could use an init service to switch

see http://forum.cyanogenmod.com/topic/...to-recovery/page__st__40__p__21996#entry21996 for example script

http://xdaforums.com/showthread.php?t=624392
[G1 Android Development] fonix232:
Let's say that linux wouldn't use boot partition's kernel, but a separate image from the SD card. Would it be possible to do? Still on theoretical level!

And thanks for the links, will try them :D
[G1 Android Development] ezterry:
The SPL expects a boot/recovery partition containing the kernel, ramdisk, and extended command line (to be added to the SPLs command line)

If you have a "booting" kernel that just kexecs some other kernel that will actually deal with the runtime of the system; that is not the SPLs problem
[G1 Android Development] fonix232:
So if we write a boot kernel what simply loads another from an image (and list the images found, etc, so a basic GRUB, a bit (a lot) modified) then it is possible. With a lot of work, and testing, and bricking, but possible ;)

Maybe extending the main kernel with a visual bootloader would make it possible :hmm:
[G1 Android Development] Firerat:
like Ezterry says, http://en.wikipedia.org/wiki/Kexec

you wouldn't need grub, basically you would emulate grub, it could get a little messy but could be ideal for dual booting without loosing the functionality of recovery ( i.e. you modify recovery src for RA and Clockwork are both available ),

a single booting system you would just need to stick with the standard boot.img (Android) way of doing things

Have to admit I never managed to use kexec successfully, but I haven't tried it since it first became available, which was years ago.
[G1 Android Development] haunter1982:
Hi, me again ;)

It looks as the needs for Costum Partition Sizes get bigger also on other devices.. just like on the HTC Desire: http://xdaforums.com/showthread.php?t=775869

So perhaps you could say if your Patch would run also on/with the permanent Clockwork Recovery wich is flashed with unrevoked³ on the Desire.

Do you need more information?

The System Partition is about 250MB big and on Cyano6 it's only about 100MB used. So 150MB more for /data would be very nice and can completly replace the A2SD on ext on most phones I think.
[G1 Android Development] Firerat:
well, in theory yes, it should work

However so far I know of two people who have tried , and it didn't work.

In all honesty I have no idea why ( I've found some dmesg outputs for different phones and ran in a test mode.. and it looks like it works )

I really need to try on the desire myself, but it looks like I'll be holding out for the G2

http://github.com/Firerat/CustomMTD

I intend to do a complete re-write for v1.5.6 and make the boot patch much cleaner taking the mtdparts chunk of the cmdline direct from recovery's /proc/cmdline instead of re-calculating everything, and including much better logging for diagnostics.

I'm also going to parse dmesg to find the actual order of partitions, as some devices have the partitions in different order to g1
[G1 Android Development] haunter1982:
I think on the Desire is the biggest Problem that many use the Fake-Flash Recovery. I think with that it would not work because the Recovery is non-permanent, this means the mtd-flash for the recovery is also non permanent. And after the reboot into recovery its the normal Recovery which lays on the PC Harddrive.

Do you know if the tested Desires have a permanent Recovery flashed via unrevoked?

Can you say what could happen to the phone in worst case if i test it out? I mean to flash your Zip's and test it? In my opinion the worst case is that i have to reflash the recovery, am i right with this? Or is there risk to brick the phone?
[G1 Android Development] lbcoder:
If you are fastbooting your recovery image, then rather than modifying the recovery partition on the device, you modify the recovery image on the PC that you are fastbooting it from.

I haven't looked at the tools used for that device, but fastboot used for DREAM and other HTC phones has an option for specifying a custom kernel command line directly, so it isn't even necessary to modify the recovery image when booting it... you just "fastboot -c 'mtdstuff' boot recovery.img"
[G1 Android Development] mashryock:
Firerat, is there a way I can start over with Custom MTD? I have low memory issues and only a handful of apps are showing up. Should I reformat and re-partition my SD card?
[G1 Android Development] lbcoder:
I'm not Firerat, but you do it the same way as with any other configuration... boot into recovery, wipe cache and userdata, reboot.

However, based on your description, I have a slight feeling that you may be using froyo2sd, which by itself would account for your issue. I suggest, therefore, moving all those externally-installed applications back internal and/or deleting them.
[G1 Android Development] Firerat:
ah, I didn't know about the fake-flash , that would probably account for it not working

expanding on lbcoder's post here would be a system 150 cache 2 cmdline for fastboot..

I've worked out the cmdline from a desirec dmesg

<5>[ 2.297607] 0x00001ff60000-0x000020000000 : "misc"
<5>[ 2.299652] 0x000002c60000-0x000003160000 : "recovery"
<5>[ 2.305969] 0x000003160000-0x0000033e0000 : "boot"
<5>[ 2.309448] 0x0000033e0000-0x00000dde0000 : "system"
<5>[ 2.525573] 0x00000dde0000-0x000015fe0000 : "cache"
<5>[ 2.678466] 0x000015fe0000-0x00001ff60000 : "userdata"

mtdparts=msm_nand:640K@0x00001FF60000(misc),5120K@0x000002C60000(recovery),2560K@0x000003160000(boot),153600k@0x0000033E0000(system),2048k@0xC9E0000(cache),-@0xCBE0000(userdata)

and this is from a bravo dmesg

<5>[ 16.277008] Creating 6 MTD partitions on "msm_nand":
<5>[ 16.277221] 0x00001ff60000-0x000020000000 : "misc"
<5>[ 16.278503] 0x000004240000-0x000004740000 : "recovery"
<5>[ 16.283966] 0x000004740000-0x0000049c0000 : "boot"
<5>[ 16.286834] 0x0000049c0000-0x0000143c0000 : "system"
<5>[ 16.532684] 0x0000143c0000-0x000016bc0000 : "cache"
<5>[ 16.572540] 0x000016bc0000-0x00001ff60000 : "userdata"

mtdparts=msm_nand:640K@0x00001FF60000(misc),5120K@0x000004240000(recovery),2560K@0x000004740000(boot),153600k@0x0000049C0000(system),2048k@0xDFC0000(cache),-@0xE1C0000(userdata)
[code]

the above cmdlines were generated using the test mode of 1.5.5
http://github.com/Firerat/CustomMTD/blob/v1.5.5/MTDPartPatcher/patchbootimg.sh
I should document this test mode, as you need to do some extra things to get it working on a Linux PC, but should work 'out of the box' when flashing the test zip on a device ( the test zip won't flash anything, instead it will dump a huge tarball onto your sdcard )

http://github.com/Firerat/CustomMTD/blob/v1.5.5/MakeZips.sh
will make the zips

I plan to rewrite the scripts for v1.5.6, making them much tidier and make the tarball dump much smaller

as lbcoder posted above, you can test a cmdline without flashing recovery
[CODE]fastboot erase system -w
fastboot -c "mtdparts=xxxx.." boot recovery.img

you can then flash ROM, then the boot patcher,

but note that you will not be able to use the standard recovery until you fastboot erase system -w
[G1 Android Development] Firerat:
I don't believe this is directly related to CustomMTD

CustomMTD will only add 28mb to data to a G1 , if you have a lot of apps then you must use some kind of a2sd

Even then you are still limited, as dalvik-cache uses quite a chunk

you can shift it to sd-ext, but I find performance suffers

in my a2sdext for froYo script I offer to move /data/data to /sd-ext via a bind mount, this can give you an extra 30+ mb ( dependent on the apps you have ) on data

This is all assuming that you mean low storage and not low memory (ram), which is quite a different 'problem'
[G1 Android Development] mashryock:
When I was trying to reflash Amon_Ra to fix a different problem, I was getting low memory messages and it failed. I uninstalled a large app that I had previously moved from Data/Data to SD-Ext using apkmanager, but no longer shows as being installed even though it shows in application manager as being installed to internal. So I guess I am having a RAM issue. Sorry for being unclear.
[G1 Android Development] Firerat:
, ok use fastboot to flash recovery

or

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

from within ROM

thinking about it , I guess I could adapt that script a little to also patch the recovery flash with the MTD map of the running ROM
[G1 Android Development] mashryock:
Thanks, I m sure I did something wrong along the way. :-) I was able to flash and I reformatted and re-partitioned the SD Card, do I need to reflash both files for Custom MTD or just the boot file?