yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] bert269:
E:Can't open CACHE:recovery/log

Hey

I'm using a G1 with RA's recovery 1.7.0.

I did a full wipe (0-5) and the partitioning (1-3). Then installed the FR-MTD-PartHack-recovery-v1-1_S.zip,Rebooted, restored my last working nandroid backup (and I know it's working, I just wiped and nandroid-restore it, it's fine) and before I could reboot into recovery, it seems like the restore is not working.

The settings was 85 2 in /sdcard/mtdpartmap.txt

They say, a picture is worth a thousand words:

Any ideas what I'm doing wrong?
[G1 Android Development] speedysilwady:
just gonna take a shot in the dark here and say you prolly needa add more space to cache through the mtdpartmap.txt
[G1 Android Development] Firerat:
Looks like system or data is not mountable

Reboot to fastboot, get in fastboot mode and

From pc

fastboot erase system -w

Reboot to recovery and try again
[G1 Android Development] speedysilwady:
firerat...idk why it wont load anything. i have my phone off now nothing loads. ima try v1 of the patch and see. you said the latest patch was only tested on danger?
[G1 Android Development] bert269:
Fireat,

Thanks for the help. I did try that, but for some weird reason, the G1 is not 'seen' as a device anymore. When I am in fastboot mode, ADB responds with <waiting for device>.

And earlier when I tried to restore my nandroid backup - well, it does not get past the bootscreen........

I'll wipe again and see if flashing a ROM from the beginning will help.

is there anyway I can undo what "FR-MTD-PartHack-recovery-v1-1_S.zip" did ?

Seems like there is where all the problems started......

Ideas?
[G1 Android Development] speedysilwady:
yay the v1_S patched worrked my phones functional again! =D
[G1 Android Development] Firerat:
No, I've used the script on both NoneDanger and Danger
[G1 Android Development] speedysilwady:
oh well for some reason the newest patch screwed up my phone on Engineering SPL even after a system erase through fastboot nothing would load up

but the v1_S patch in the old thread works great! idk what broke for me in the new patch
[G1 Android Development] Firerat:
you can flash a standard recovery,

e.g

from Amon_RA

http://rapidshare.com/files/387558151/recovery-RA-dream-v1.7.0.img

with fastboot, are you sure you have pressed 'back' on the phone?

There is no reason why any of this would effect fastboot

also have you recently installed Danger?

if so did you install the new USB drivers?
[G1 Android Development] Firerat:
glad its working,

I've triple checked, and I can't for the life of me see where the issue would be
[G1 Android Development] speedysilwady:
thank you.

i have no clue. whats the difference between the two patches anyway? im sure its not much of a difference but eh idk.

hmm well ima nandroid super e right now and try the latest nightly again!
[G1 Android Development] Firerat:
the older one used the settings in /sdcard/mtdpartmap.txt or the defaults ( same as the recovery version )

The new one uses the same layout as the running recovery, its the exact same script as the AutoPatcher

in both the recovery and boot versions the script is

tmp/patchbootimg.sh

recovery reads /sdcard/mtdpartmap.txt

boot reads /proc/mtd
[G1 Android Development] speedysilwady:
hmm maybe it was the 7014 nightly rom that screwed things up whenever i removed

assert: get_prop (*LONG SPL LIST*)

from the update script and resigned?

but idk why thatd do anything as crazy as start a reboot everytime its abt to load?

well they just put up a new nightly rom 1003 ima remove those lines and try again.
[G1 Android Development] Firerat:
DoH

Mybad

CM updater-script delete /tmp/boot.img

I have added to the script to re-dump the installed boot.img
[G1 Android Development] bert269:
Still not working, not matter what nandroid I restore.

Yes, I have RA.1.7.0 installed - shall I re-install it - It's the only one I ever use(d).

Yes, i did press 'back' to get to the fastboot screen, but cannot see it from ADB.

Something might have been different since I last tried (and suceeded) to root my friend's Slide. I had some issues and have installed the latest drivers for his slide on my laptop and it's the first time I wanted to get into fastboot with the same laptop to the G1...maybe that's why. One cannot have the same drivers installed for G1 & Slide, simultaniously...I guess.

No, I have not recently installed Danger either, I have been using it from the first time I installed ROMS, more than 13 months ago.

No matter what nandroid I restore (and my SDCARD is full of them, dating back to Donut days), the G1 just froze on the G1 bootscreen. I even wiped, install a ROM and then just nandroid restore (the same ROM, no wipe, but the nandroid backup & EXT) over it, but it still freezes on the G1 bootscreen - very weird.

The only thing that gets my G1 to work, is wipe and installing a ROM and restore all my apps with Titanium.

Now, I will make another nandroid backup of this working ROM and just wipe and restore that, and see if it still works or not. I will report on that.

If I do the above mentioned restore, and it loops again during boot, I'll capture a log.

BTW, it was Superbad 1.7 that I tried for this process. I have a Nandroid of 5.0.8 and will probably try that later also with the MTD process and will report on that.

Another question: The sdcard/mtdpartmap.txt is still on the SD. It's presence should not creates part of the problem that the G1 does not wanna boot?

Thanks for all your time and great work and effort you put into this - I really appreciate it.

Bert
[G1 Android Development] Bzerk1:
I know firerates always commin out with awesome stuff. But i need someone to dumb it down for me... i got lost reading. i dont really know what MTD partitions are for, nor do i know why i want to customize them.

What is this exactly? and why do i want it? how does it improve my phone?
[G1 Android Development] mdneilson:
Thanks again. I was too slow getting home to get Linux, but now I don't need it!

Installed and is working fantastically.

EDIT: Is the /sdcard filesystem correct? I thought it was mmcblk#.
[G1 Android Development] mdneilson:
In a nutshell, the MTD partitions are the partitions on your phones memory. System, data, and cache partitions.

Resizing allows for a few things (likely more than I'm listing):

[upgradability]

More space for larger ROMs (DangerSPL has a limit of 90mb)

...meaning this could make way for future Android versions that would otherwise be too large.

[flexibility]

I've seen dual-booting ROMs mentioned by firerat

...I guess two system partitions with a bootloader that has a selection screen to choose which ROM(/speculation)

...I would love this... I would be able to test CM6 while still being able to use functions I need for work in CM5 (I work out of my car *GPS*)

[storage]

More space for your data/programs on the phone itself

...pretty self-explanatory

[efficiency]

More efficient use of space

...the cache isn't used much by live ROMs, so this opens space that would otherwise be unused/wasted

[safety]

Creates the ability to flash ROMs larger than the stock partition's ~60mb limit without having to flash a DangerSPL

... NO BRICK RISK!

Basically, it means more flexibility for our more dated, but far from dead phones!
[G1 Android Development] Bzerk1:
awesome explanation. Thank you so much. id love the dual boot aswell. that would be an awesome combo with apps2sd
[G1 Android Development] Ace42:
Firerat, your script ignores my .txt on my sdcard and decides to give me the default partitions, could this be related to me making the scipt in windows?

I tried doing the 70MB and system is still 90 after flashing both zips.
[G1 Android Development] Royalknight6190:
Disregard - figured it out thanks
[G1 Android Development] ANtiHazarD:
deleted....
[G1 Android Development] ANtiHazarD:
it is necessary to use this before all patches?

fastboot erase system -w
[G1 Android Development] smuvman:
Your Welcome

special thanks to

•smuvman - for trying to teach me humility via personal insults

lmao :cool:
[G1 Android Development] smuvman:
necessary

no. only if you have changed the size of your partition in your mtd txt.
[G1 Android Development] ANtiHazarD:
i ask it, because already tryed to apply this patches and after that i got errors about cache...

and i can't fix it without re-flashing recovery... it was for me big trouble... Coz all guides about recovery flashing with all knowns method not working for me :-) but i found solution after all...

and know i want to try again...

And now i want to understand what i made wrong at last time...

And how to make all fine now!

Because i have strange spl version (and i can't flash Danger SPL and etc.) and this is only one method to me to flash 2.2 :-) i'm really want ...
[G1 Android Development] eyegor:
Before I begin, let me apologize in case of repetition.

The specs of my phone are in my sig. My question is could I use this script or does the boot patch actually flash a different kernel?

If it is possible to use it with my current setup then it would probably be the cure of the only new radio flaw - low data space.

Best regards,

Eyegor
[G1 Android Development] eyegor:
That would mean that they work for the so called old radio - or the 3.22 one. But can they be adapted to work on the 6.35 as well?
[G1 Android Development] Firerat:
all the patchers do is add the mtd partition command line to the boot.img

the "rogers" compatible ( or as Lbcoder correctly points out the universal ) , includes a little extra bit

I neglected to include that bit as the default works on a standard g1 ( but I will include in any future versions )

the patchers should work on any kernel... however *you must* confirm your misc, recovery,boot and system start addresses match if your phone is not a 32a/32b ( g1 mt3g )

e.g. this s a dangerSPL

android@Firerat:~$ fastboot oem listpartition
...
INFO[radio] start block=0, size=287 (36736 KB)
INFO[hboot] start block=288, size=6 (768 KB)
INFO[misc] start block=294, size=2 (256 KB)
INFO[mfg] start block=296, size=2 (256 KB)
INFO[sp1] start block=298, size=6 (768 KB)
INFO[misc2] start block=304, size=3 (384 KB)
INFO[mfg2] start block=307, size=3 (384 KB)
INFO[recovery] start block=310, size=40 (5120 KB)
INFO[boot] start block=350, size=20 (2560 KB)
INFO[system] start block=370, size=720 (92160 KB)
INFO[cache] start block=1090, size=240 (30720 KB)
INFO[userdata] start block=1330, size=718 (91904 KB)
INFO[cpld] start block=0, size=0 (0 KB)
INFO[microp] start block=0, size=0 (0 KB)

you can also get the required info from dmesg

6 cmdlinepart partitions found on MTD device msm_nand
Creating 6 MTD partitions on "msm_nand":
0x0000024c0000-0x000002500000 : "misc"
0x0000026c0000-0x000002bc0000 : "recovery"
0x000002bc0000-0x000002e40000 : "boot"
0x000002e40000-0x000008840000 : "system"
0x000008840000-0x000008a40000 : "cache"
0x000008a40000-0x000010000000 : "userdata"

its a bit easier as the addresses are already in hex
[G1 Android Development] eyegor:
What I did is I took a dive and did it anyway, without checking anything.

I've now ended up with a HUGE data partition and a smile on my face :)

So this indeed DOES work well with this setup:

1. 6.35.10.18

2. 1.76.2007

3. Hero recovery

Great job guys!
[G1 Android Development] mblaster:
Hi Firerat. I think I found some redundancy in your boot hack zip:

First patchbootimg.sh is run by the updater and, at some point in the end, creates a 06bindcache if the actual cache partition is smaller then 30mb (which seems to be a good idea).

if [ "`expr $CacheKBytes \/ 1024`" -lt "30" ];
then
cat > /tmp/06BindCache << "EOF"
#!/system/bin/sh
......
EOF
if [ "`grep -q system /proc/mounts;echo $?`" != "0" ];
then
mount /system
fi
install -m 700 -o 0 -g 0 -D /tmp/06BindCache /system/etc/init.d/06BindCache
fi

Then the updater-script flashes 06bindcache anyway.

ui_print("Installing cache bind mount script");
package_extract_dir("system", "/system");
set_perm(0, 0, 0700, "/system/etc/init.d/06BindCache");

Nice work though, gotta try it if i find some time :D

mblaster

€: Yes, I know that probably won't matter as everyone will have /cache down to 2mb anyways with that patch...
[G1 Android Development] Firerat:
ahh, yeah, I removed the system dir in v1.2

it was a hangover from the initial zips I did

but I really should refine the script for clockwork recovery

rom manager wants to reinstall recovery.img ( which is not a great idea with cm5/6 on a 32b)

rom manager can't send commands to recovery ( since it puts them on our bind mount )

should be relatively straight forward,

I just need to install a minimal rom manager config ( or tell the existing one which cwr version is installed ).

and with the launch recovery, I just need to remount the real cache someplace and redirect rom managers commands from the bind mount to real cache

I should also get round to making a windows version of AutoMTD

( I might just cheat and make a minimal linux virtualbox image, but tbh converting to a windows batch file might be more fun )
[G1 Android Development] mblaster:
D'oh! Didn't see that one. Never mind, learned a few things from 1.1 anyway :rolleyes:
[G1 Android Development] eyegor:
Oh just one thing, i've opened a thread on the magic dev section with instructions how to use this. It has a link to this thread and all the credits of course.
[G1 Android Development] mblaster:
This just gave me a headache:

zip $ROMZIP META-INF $TOOLS -r

in PatchUpdateScript.sh has to be

zip -r $ROMZIP META-INF $TOOLS

on my box. Otherwise it will not go into recursive mode and just add the empty directories. And yes, this time I had the most recent version of the file from the OP :D

Don't know if there are different zip versions around, but if something goes wrong this might be the cause.
[G1 Android Development] Abhi_UK:
I flashed this patch on Cm6 with standard kernel on amon ra v1.7 and internal storage still shows 55mb (In settings in sd card and phone storage) which it was before I flashed the patch.

I am using danger spl.
[G1 Android Development] Firerat:
yeap

latest is info-zip.org's v3.0, released July 2008

you should probably make sure you have at least version 2.32 ( previous versions had a buffer-overrun vulnerability )

but I can move the -r flag , its just a nasty habit I have :(
[G1 Android Development] Abhi_UK:
If you install cm6 rc2 on a g1 and then install gapps frf91-3 once you have loaded up and gone into settings and then sd card and phone storage available space for internal phone storage has been for me 55mb and I've installed it about 6 times.

I did follow the instructions. Download both files, do nandroid back up flash the first file and then restore and then flash second file.
[G1 Android Development] Firerat:
Like lbcoder says in points 1 and 2

Point 3 I belive there is just some confusion, the 55mb will be free space

dalvik-cache + the vanila cm6 /data/data files will be ~33mb , which ties in with a none modified DangerSPL

in recovery via console or adb shell

mount /data
df -h

what is the size of cache and data?

if cache is 30mb, and data is 89mb you did not flash recovery patcher

and in the ROM, via terminal or adb shell

df -h

what is the size of data?

if its 89mb you did not flash the boot patcher ( make sure you are using v1.2 )
[G1 Android Development] Abhi_UK:
I did that and cache is 30mb and data is 89mb.

This is the second file I flashed : FR-MTD-PartHack-boot-v1-2_S_S

If I have done it wrong what are my next steps.

Thank for reply and help.
[G1 Android Development] techjosh:
So to summarize the steps for installation are:

Backup your data (this is where you prove you're not as dumb as you look)

Optionally configure the mtdpart.txt (only do this if you aren't happy with the default setup of 90MB for system and 2MB for cache)

Reboot to recovery and Flash the latest Recovery partition hack (this is the one named FR-MTD-PartHack-recovery-v???.zip)

Fastboot erase system -w (this zeros out the system data and cache partitions... you need to reboot into fastboot mode to do this... if you don't know how there are guides in the forum that will teach you. If you skip this step you will probably have trouble and will have nobody to blame.)

Reboot to recovery and Wipe cache + data (this actually formats these partitions)

Flash your favorite ROM+kernel

Flash the latest BOOT partition hack (this is the one named FR-MTD-PartHack-boot-v???.zip)

Reboot and enjoy

Going forward if you ever want to change roms / kernels without resizing any of the partitions here is all you have to do:

Flash your favorite ROM+kernel

Flash the latest BOOT partition hack (this is the one named FR-MTD-PartHack-boot-v???.zip)

Reboot and enjoy

The #1 thing I've seen people doing wrong is not rebooting after flashing the recovery hack. The #2 thing I've seen is people not doing "fastboot erase system -w" which, if you don't do that, may cause weird issues with any ROM you flash or leave garbage data in your new partitions. By making the "fastboot erase system -w" step explicit, and putting it after the recovery hack flash we can kill 2 birds with 1 stone.

Of course the #3 thing is people confusing internal flash memory with either their SD card or RAM but frankly until those people learn a bit more or the process becomes much simpler they probably shouldn't be doing this hack at all.
[G1 Android Development] mblaster:
Got version 2.32 from June 2006, guess thats what they call long term service at ubuntu (8.04LTS) :D At least no buffer overflow bug...

There won't be many users of this 'old' os around, so i think you can keep the -r where it is.
[G1 Android Development] Firerat:
Well, I've fixed the issue with clockwork/rom manger so due another release anyway

guess I should also make the scripts more compatible with none cm5/6 roms

( and the pain in the a 'lets rename init.d to super, cos we is super' rom )
[G1 Android Development] ANtiHazarD:
firerat, thx to you for your works :-)

Amazing, all fine now... i flash all and now all works great
[G1 Android Development] izzy001:
Hey Firerat. I seem to have a problem with my audio, no one at CM had this problem on there G1, and audiofix.zip didn't work. All sound is coming from the ear piece, speaker phone is not working either,can you help me? Could this be caused by the kernel or the patches?
[G1 Android Development] Firerat:
the size of MTD Partitions effect Audio?

no

The kernel?

Possibly, but seeing as its the same src code, I doubt it.

BUT,

why are you even using that kernel?

if your sig is correct you have SafeSPL, you don't need that kernel

What is your radio version?

ideally you should use 2.22.23.02

please be careful updating your radio

use the method described in here

http://xdaforums.com/showthread.php?p=6510019#post6510019
[G1 Android Development] izzy001:
My radio is the one that came with the Dreaimg.nbh, but could that really be the cause of the bug? But I flash an older 2.1 rom and it works fine.
[G1 Android Development] Firerat:
yes, it is the reason the audio is messed up
[G1 Android Development] izzy001:
So I flash it via fastboot? This will give me a less chance of getting brick?
[G1 Android Development] pigmej:
So...

something went wrong... and my phone cannot even boot into recovery...

Only fastboot works... I was using this metod many times... but today failed ;/

I reflashed the radio + spl and recovery, and nothing;/

Any ideas anyone ?
[G1 Android Development] Foo_Blyat:
firerat,

can you hold my hand while i cross the street and wipe my ass for me when im done going potty.

thank you!

;P
[G1 Android Development] pigmej:
@Firerat

I have read it... That's why I reflashed the spl + radio...

I erased the system too... Nothing changed...

I'm going to make root again tomorrow.
[G1 Android Development] Firerat:
and what does logcat or adb shell tell you?
[G1 Android Development] pigmej:
The weirdest thing is... my g1 has an hidden function 'autorepair'... no idea why, no idea how... but it works now... I reflashed everything 5 times or so... Now it works... no idea wtf.
[G1 Android Development] Firerat:
lol

like my cm forum sig says, logcat or its in your mind :P

PHONE - Dream(G1) / / HBOOT - 1.33.2003 a NoneDangerSPL / / RADIO - 2.22.23.02 / / ROM - CM6 Nightly / / CM6 Nightly Changelog <= collated by **** Coaster

XDA Link ==>> 90.0M system / / 2.0M cache / / 117.8M data | | logcat !!! or the problem you are having is not real, it is in your mind.. PS link logcat to post from http://pastebin.com/

They say "With great power comes great responsibility.." you have root, the most powerful *nix account you can get.. *you* are responsible if it goes wrong :D
[G1 Android Development] izzy001:
Hey Firerat I try to install the radio for my dream in fastboot but I get an error saying that the partition does not exist, what can I do to flash my radio?

Sorry about all the questons, but your the only person that has actually helped me :)
[G1 Android Development] lbcoder:
You have fastboot -- that means that there is NO REASON to "root" -- just fastboot in your appropriate images.

Note: It is possible that you made some bone-headed move that broke its every ability to do anything, like mismatched radio/spl. MAKE SURE that if you have a 0.95 or 1.33.2003 SPL, that you have a 1.x or 2.x radio. MAKE SURE that if you have a 1.33.20(not03) SPL, that you have a 2.x or 3.x radio. ANY OTHER COMBINATION will yield functional fastboot (except if you triggered boot-recovery in the misc partition), but failure to boot anything else.

Also note: If you for some reason have managed to end up with 0.95.3000+3.x radio, then you're boned since 0.95.3000 CAN'T FASTBOOT RADIO/SPL. Any 1.33.2xxx SPL *CAN* fastboot radio/SPL, which means that you simply need to fastboot in a proper match.

FINALLY, if you have a 1.x or 2.x radio, make sure that you have an EBI0 recovery installed. If you have a 3.x radio, make sure that you have an EBI1 recovery installed.
[G1 Android Development] lbcoder:
What SPL do you have installed?

In order to fastboot the radio or SPL, you MUST have a 1.33.2xxx SPL installed, however, your SIGNATURE is confusing -- it shows 1.33.2003 as well as "hardspl", and hardspl is 0.95.3000 with a minor and useless hack. So there is some contradictory information there. I VERY STRONGLY BELIEVE that you do NOT have 1.33.2003 installed, otherwise fastboot wouldn't complain about a missing partition.

If you have 0.95.3000, then your first move should be to install 1.33.2003, and this MUST be done via RECOVERY -- there is no alternative.

Also note: since the SPL is much smaller than the radio, it presents a marginally smaller risk of bricking due to bad flash via recovery than flashing the radio.
[G1 Android Development] Firerat:
v1.5 uploaded

uploaded a new version

Largely its just better cache bind mount ( with support for ROM Manager launching recovery )

but it should also be a lot more 'compatible' which have system 'starting' in a different place
[G1 Android Development] Foo_Blyat:
If everything is running smoothly on the old version do you recommended leaving it as is or updating anyway.
[G1 Android Development] Firerat:
well, at the moment , yeah stick with the old one

I've managed to screw something up and it doesn't actually patch anything :(

should have it fixed soon
[G1 Android Development] Flaming Cow:
Hey do you guys know the MTD partitions for Firerat's MT Slide to 32B?
[G1 Android Development] robuser007:
download FR-recovery-v1-5-MTD-PartHack_S.zip and FR-boot-v1-5-MTD-PartHack_S.zip

Where?

edit: I'll use the old patches for now.
[G1 Android Development] Firerat:
sorry, fixed now

I had a little bit of a DoH moment,

Anyway, they are fixed now
[G1 Android Development] Firerat:
errm , there isn't any really

tbh, I need to fix the browser in that, didn't realise anyone was still using it..
[G1 Android Development] Flaming Cow:
Um I wanted to know because I wanted to download yours but I ended up downloading one based on yours, and it didn't fit on my G1. So is there aa way to make it fit?
[G1 Android Development] Firerat:
Not a clue , sorry
[G1 Android Development] robuser007:
Links don't work.
[G1 Android Development] Flaming Cow:
But if I download yours, will it fit and run fine?