yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] TheNewGuy:
Hi firerat,

you mentioned once before something about market data on the cahe... or something so downloads would be ok if a certain partition was big enough?....something like that... I am having a prob that might be related since it started when I tried to change from default to system 80 5 for data. now I cant sign in to google and after flashing gaaps there is no market? everything else in the gaaps zip is there...? It could be google i know but i remembered you saying that somewhere.
[G1 Android Development] Firerat:
I very much doubt it is related in anyway

/cache is where the market downloads apks to prior to install

it should be bind mounted to /sd-ext/cache or /data/cache if sd-ext is not mounted

your missing Market is related to something else
[G1 Android Development] Ace42:
On my sdcard, why were my market Dls going to /Sdcard/Download folder?

I never seen them go there before, I'm used to seeing them in /cache.
[G1 Android Development] JAguirre1231:
Because he bind mounted it.
[G1 Android Development] Firerat:
sorry for confusion

When I download stuff with dolphin HD it goes to /sdcard/download

maybe its different with stock browser

the cache bind mount is

added a few extra comments to make it easier to follow

/system/etc/init.d/06BindCache

#!/system/bin/sh

# check we don't already have a bind mount
# ( so if ran manually multiple times we don't end up with strange things happening )

if [ "`awk '/\/cache/' /proc/mounts |sed -n '$='`" -gt "1" ];
then
echo "cache already bind mounted"
echo `awk '/\/cache/' /proc/mounts`
exit
fi

# check if /sd-ext mounted, if yes then bind to /sd-ext/cache, if not /data/cache
if [ "`grep -q sd-ext /proc/mounts;echo $?`" = "0" ];
then
CacheDir=/sd-ext/cache
else
CacheDir=/data/cache
fi

# check we have something to bind mount, and create if not
if [ ! -d $CacheDir ];
then
install -m 771 -o 1000 -g 2001 -d $CacheDir
fi
mount -o bind $CacheDir /cache

# check dalvik-cache exists ( this is really for magics )
# so they don't end up in bootloop because dex files can not be created
if [ ! -d $CacheDir/dalvik-cache ];
then
install -m 771 -o 1000 -g 1000 -d $CacheDir/dalvik-cache
fi

actually, errm yeah it is d/l to /sdcard/downloads

not my doing :)

I guess cache really is pointless on froyo
[G1 Android Development] speedysilwady:
hey firerat great job bro! again ive been really busy and i still didnt get to try this or the earlier betas you made...hell i havent even tried a froyo rom yet. ima try this right now and let you know how it goes!
[G1 Android Development] Firerat:
Froyo has been nice so far

but you may run into issues

for one the updater-script is actively 'kicking' NoneDanger

you can just remove the getprop checks

I have had problems booting cm5.0.8's kernel, I did get round it by compiling a new one from cm github,

I

'm not sure is cm6's kernel has the same issue

it does seem SPL related, I flashed Danger and it was fine, I plan to go back to NoneDanger and confirm it still doesn't work.

but figured that while I was on Danger I might as well put this (Custom MTD) through its paces with a DangerSPL
[G1 Android Development] speedysilwady:
lol yeah i was just gonna say the get prop error occured lemme remove those asserts resign and see what happens
[G1 Android Development] speedysilwady:
hmm oddly everything flashed fine on the latest nightly build but when it gets past the g1 screen it keeps rebooting to recovery? ima rewipe and try again and see if i can get a logcat if it happens again

edit: no dice when i run logcat =/

-exec '/system/bin/sh/' failed: permission denied (13) -"

double edit: i get the same error for any rom i try to flash when i look at the logcat. the only difference is cm's latest nightly build rebooted on the g1, super e freezes at the g1 screen...ima try to modify the .txt to go back to the stock layout so i can nandroid my cachehacked cm5.08 back if not...idk what to do..
[G1 Android Development] Firerat:
Odd, but at leasat the kernel is booting, I wasn't getting anywhere with cm5.0.8

It could be a general error

Which build are you using

I'm on a nightly, but I know Defcon works

If its still not working, try the older v1 version of boot patcher in lbcoders thread

I did change boot v1.1 to the script I use in the automtd one

I'm on the nightly 0704 (944 I think ) btw
[G1 Android Development] speedysilwady:
noo this wasnt cm5.08 this was the latest nightly, same one youre 0704 on.

it got to the g1 screen and right when its abt to hit the boot animation it reboots.

i tried super e but it froze on the g1 screen

trying to get back to 67 67 for cache and system so i can nandroid but its weird that the logcat wont show no matter what rom i use.
[G1 Android Development] asb123:
hey firerat,

i flashed the recovery, and did the steps, i flashed the rom from the the other mtd roms thread, it wont boot. In the log cat all I get is:

- exec '/system/bin/sh' failed: Permission denied 13 -
[G1 Android Development] asb123:
do we need to reflash the recovery patch everytime we fastboot wipe/ wipe?
[G1 Android Development] fsr678:
...not sure if i did this correctly...

this is what i am showing..

Filesystem Size Used Available Use% Mounted on

tmpfs 47.7M 0 47.7M 0% /dev

tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals

/dev/block/mtdblock3 90.0M 87.7M 2.3M 97% /system

/dev/block/mtdblock5 117.8M 34.3M 83.5M 29% /data

/dev/block/mtdblock4 457.4M 18.0K 432.9M 0% /cache

/dev/block/mmcblk0p2 457.4M 18.0K 432.9M 0% /sd-ext

/dev/block/mmcblk0p2 457.4M 18.0K 432.9M 0% /cache

/dev/block//vold/179:1

7.1G 70.5M 7.0G 1% /sdcard

-flashed FR-MTD-PartHack-recovery-v1-3_S

-rebooted into recovery

-flashed cm5 and gaapps

-flashed FR-MTD-PartHack-boot-v1-2_S_S

-rebooted into system

I am not seeing the 2mb cache on block 4?
[G1 Android Development] jaikat:
i got these sizes

mtdblock3 90.0M system

mtdblock5 117.8M data

mtdblock4 470.0M cache

i'm not sure as i don't know what the normal figures would be, did i get it right?
[G1 Android Development] Firerat:
I doubt Metamorph cares about the partition sizes, the problem you are having has nothing to do with this hack

Permission denied , looks like the rom is broken, boot to recovery and chmod 755 /system/bin/sh

no, and you only need to fastboot wipe when you resize,

please read the thread and try to understand the concept behind the custom MTD

that looks fine, since cache is only 2mb, its too small.........

read the thread I already answered this/

http://xdaforums.com/showpost.php?p=7226113&postcount=168

looks fine

as above, cache 2mb = too small, me make bind mount, me make cache look big
[G1 Android Development] fsr678:
Thank you Firerat! My internal phone storage has gone up to 57.22mb from right around 30mb after installing this mod! :)

I do have a couple of more questions..

1. Is there an ideal amount of internal phone storage that should be left free? Or is it ok to use up all of the 57mb with app installs?

2. Would installing your all in one patch (specifically the dc2x Dalvik-cache bind mounts) free up more memory or offer additional benefits? (EDIT: I guess it does free up more internal phone storage because it's now at 97.25mb! :))

Once again, thank you very much for your time and responsiveness!

All the best.
[G1 Android Development] Firerat:
Android will complain about low storage at 10mb free

the dc2x option will work, and free up at least 30mb, but as the dalvik-cache is put on sdxt you may see a slight hit to performance, but you will at least be able to install more apps, especially games which tend to put large amounts of data on /data
[G1 Android Development] arefin:
dear Bro,

you ar e a genius :)

I was using CM6 using your patch and all were running well with all the apps on internal.

I thought of switching back to my Favourite CSDI-based DONUT ROM recently and got problems.

After a lot of iterations, I finally decided for 59 MB System and 4 MB cache (tried 2 MB which wouldn't even boot! So, I used 59 4 in my .txt file). This allows me to install everything on internal which I like very much. Now everything runs fine on Donut but suddenly I found out I cant download anything from Market - no matter what size, nothing will dl.

Any help/suggestion? remember I dont have / want to have an EXT-part on my SD.

Thanks pal,

Again, its a G1 with Donut running.

arefin
[G1 Android Development] Firerat:
You need to run the 10bindcache script in

/system/etc/init.d/

su
sh /system/etc/init.d/10bindcache

If you link the rom I can work out how to get this to work on boot

Ref the cache size, yeah if you don't do a full fastboot wipe then maybe data is 'unmountable' due to some hangover from system or cache

Its important to clear everything if you resize

Clockwork is ideal for this, do partition formats before and after recovery reboot for best result (system,cache and data )
[G1 Android Development] arefin:
Thanx for the quick reply, here is the link to the ROM I am trying to get hold of. This is a CSDI variant by MLIGN.

Yes, about the cleaning stuff, I can assure you that I am using CW and doing the erasing every time I am doing something new.

Should I run those codes from terminal? or do I need to dl some script?

Thanks for your patience and bearing with a noob like me :-)

in the /system/etc/init.d/ folder I have a 06BindCache file btw.
[G1 Android Development] juangil:
I searched for a solution and couldn't find it

any help would be appreciated

I am trying to do bart restore after re-size MTD and I got this msg

"Error occurred during restoration of cache-backup ...

tar operation failed.

Do you have enough space on the /sdcard?"
[G1 Android Development] Firerat:
bart tries to restore cache, maybe you had some crap left in cache

try running bart from command line with the no cache option

tbh I don't know why people still use bart, its not been needed for a longtime
[G1 Android Development] juangil:
thanks,

I know I just use bart because I always keep several backups and I can put a name on each one
[G1 Android Development] arefin:
hey FR,

need more help on this...:) where did you go?

I gave you the link to my ROM in the prev page. plz, help me on how to do the 10BindCache thing :-)

thank u very much
[G1 Android Development] Firerat:
gawd that rom is awful, its moved things around for no good reason

su
busybox mount -o rw,remount /system
mv /system/etc/init.d/* /system/etc/super/

will get you the bind mount on boot
[G1 Android Development] arefin:
i respect you man, too good. it's working now. and about your comment - may be you are right, but who cares? it's the fastest donut anyways :-)

BIG thanks
[G1 Android Development] Firerat:
Well... it would have worked 'out of the box' if they hadn't decided to 'brand' it moving init.d to super...

But yeah , its probably a nice rom, I never really used donut roms, but I understand they are fast, and now you should have a nice big data partition

What 147 mb (145 with your 4mb cache )
[G1 Android Development] jaikat:
i'v set my partitions to "161 2", "150 2" and "170 2", all for the sake of installing kingclick's legend2G1 rom, which, according to the RomBible is the best of the rest out there.. anyway, the rom installs fine, but won't boot, stuck on t-mobile G1 screen...

here's what i did:

- configured mtdpartmap.txt

- wiped system and cache

- wiped everything else (just in case)

- rebooted

- flashed the recovery patch

- rebooted

- flashed the rom

- flashed the boot patch

- rebooted

- got stuck :D

well, is it something i'm doing wrong, or is the rom incompatible with the mod, or is it non of the above?

the rom zip file is 104 mb if that matters, and it uses apps2sd + its compatible with all ext types...
[G1 Android Development] Firerat:
it work 'as is' for all roms,

some notes specific to Kings Legend

system apps are probably being installed on data ( /data/app_s ) along with system framework ( data/system-framework )

they will be too large for your now smaller data partition

you need to unzip the ROM

move data/app_s to the system dir and rename to app

move data/system-framework to system dir and rename to framework

then you need to edit the update-script in META-INF/com/google/android

and remove the lines

symlink DATA:app_s SYSTEM:app

symlink DATA:system-framework SYSTEM:framework

you can then zip up the rom and sign , it should work then
[G1 Android Development] jaikat:
i can make the changes without unzipping the rom file (i'm using ubuntu), the archive manager updates the zip file to incur the changes, would it work this way with having to resign it?

ps: man you should really think about opening your own school to teach this shish :D
[G1 Android Development] lbcoder:
The answer to your question specifically as you have written it is "yes", however, I doubt that you are asking the question you wrote. I suspect you are asking if it would work withOUT having to re-sign it.... in that case, the answer is *no*.

You need to realize that you aren't seeing what is actually going on in the background. It IS unzipping and rezipping in the background.

That and the fact that the signature isn't just a static thing on a file -- it is actually an encrypted table of checksums, and when you add or alter any file within the zip, that table of checksums will no longer match what is in there.

IN FACT, you can UNZIP and REZIP the archive, leaving all files UNCHANGED, and then the signature will still be good.... if that were NOT the case, then adding the signature itself would change the signature and you'd be boned.

Read here: http://en.wikipedia.org/wiki/JAR_(file_format)

Note: JAR = zip.
[G1 Android Development] bubert:
Check your PM please and help me if you can :) Thx
[G1 Android Development] Firerat:
errm not sure

me personally

unzip rom.zip
mv data/app_s system/app
mv data/system-framework system/framework
vim META-INF/com/google/android/update-script
zip newrom.zip boot.img system META-INF -r
signzip.sh newrom.zip

where signzip.sh

java -jar ~/bin/signapk.jar ~/bin/testkey.x509.pem ~/bin/testkey.pk8 $1 YOUR_PREFIX`basename $1 .zip`_S.zip

the YOUR_PREFIX is optional, but you should at least have _S so you know you signed it ;)

Edit,

Ohh and have a look at the AutoMTD, so you don't have to mess about flashing the boot patcher ;)

( infact use that instead of the signzip.sh ;) )
[G1 Android Development] jaikat:
thanks for the tips guys, i'll work on it and report later

but seriously, thanks :)
[G1 Android Development] frankencat:
Getting a "E:can't open CACHE recovery log" error when booting to recovery. Any idea what that's about?

Stuck in a boot loop now. Help....
[G1 Android Development] frankencat:
Reflashed the patch and got rid of the error. So how do I remove this patch if I don't want it?
[G1 Android Development] AndDiSa:
Look at my answer in the other thread.
[G1 Android Development] frankencat:
Thanks again.
[G1 Android Development] asb123:
quick question, it seems like i have less space to install apps when using this mod, is it drawing the extra rom space from the internal memory? so if i want more space for apps i should just lower my system number?
[G1 Android Development] juangil:
yes, just make your system 10-15Mb larger than the rom you are installing and the rest will be on data (for apps)
[G1 Android Development] pascanu:
Link please? (can't find it)
[G1 Android Development] Firerat:
What do you think would happen if,, say you flashed a stock recovery and didn't 'patch' it?
[G1 Android Development] pascanu:
(sometimes after reading several pages from which I struggle to understand 80% my brain stops working; I guess it was really obvious. Thanks...)

:o :o :o
[G1 Android Development] lbcoder:
Less space than WHAT?

A 90 MB system and a 2 MB cache will yield you ~118 MB userdata. DeathSPL will only yield you ~100 MB userdata.
[G1 Android Development] billquinn1:
I have a quick question about erasing system.

My USB is borked and I can't use it for data access anymore (no SD access no adb and no fastboot). Could I erase system from the console in RA1.7.0 and if so what would be the command? I would rather not flash clockwork.
[G1 Android Development] Firerat:
in short no

clockwork's partition formats are much more comprehensive, but even so you have two fall backs, the first being adb shell where you can 'manually' erase_image and the second is fastboot erase

I really can not recommend this if you can't use usb, and I certainly don't recommend using RA recovery as the current version ( 1.7.0 at time of typing ) simply mounts the partitions and deletes files, which *will not* get you out of trouble.

I trust you have exhausted all avenues in getting usb working..

if you want to try this, then you do so at your own risk, but I really should impress that clockwork is your best option and you must format system/data and cache before resizing, and after reboot. If you don't and you can't access your phone via usb you *will* get stuck............
[G1 Android Development] Firerat:
I honestly didn't think this concept was so difficult to grasp

let me try and make it easy for you to understand

I have a pizza, I cut it up into 210 equal slices.

I must give cache at least 2 slices, leaving 208 to share between system and data.

if I give system 90 slices then data can have 118 slices

if I give system 80 slices then data can have 128 slices

edit

btw, I pinched a bit of pizza when I was cutting it and as data is last they get a slice which is slightly smaller

also worth noting that you each need to give 1 and a bit slices to the dog, else you can't eat in peace ;)

the dog's name is yaffs2
[G1 Android Development] billquinn1:
I have tried everything I can safely. I have to be careful with no fastboot to fix something if I break it. I will just have to skip out on this mod for now.

I might be able to talk my wife into switching G1s with me so I can continue the fun.

I wish he would include some of the "extras" in clockwork that are in RA or vice versa.

Thanks for the warnings.
[G1 Android Development] billquinn1:
Which part of the pizza is /dev from?
[G1 Android Development] Firerat:
the microwave oven
[G1 Android Development] billquinn1:
I hope the micro does not get it to hot... it always burns the roof of my mouth.
[G1 Android Development] Firerat:
well, if you look at Amon's github you will see he has the erase_image in his 'sandbox'

I haven't tried compiling it

I'm not sure if clockwork's erase_image is static or dynamic, I know the one in cm5 is dynamic so if you wanted to kang it you might be able to squeeze it in to the ramdisk, you just need to check the strings and figure out which libs ( if any ) you need, keeping only the symbols you need ;) probably just easier to compile yourself

thinking about it, I guess I could include the erase_image in the recovery patcher
[G1 Android Development] billquinn1:
Now that could be a great idea. Would save a lot of people wondering if they should or shouldn't erase. Erasing should never be a bad thing.
[G1 Android Development] Firerat:
well, yes and no

for instance, if you just upgraded recovery you wouldn't need to erase, you would just want to patch
[G1 Android Development] billquinn1:
What if there was an extra pepperoni just under the cheese?
[G1 Android Development] davidhooper4:
Hey firerat, I looked at the previous post in the thread and I tried to figure a problem I have out, but I don't understand.

Okay, so I was running a edited version of CM6 I think it was chromatic or something. I applied your MTD boot patch and all went well.

So I decided to do a nandroid backup on clockworkmod's recovery. I did that and all went well. But the problem is that when I tryed to restore it, it gives me an error in recovery saying there isnt enough cache left to restore the cache file backup.

I understand that my cache was made into 2.0mb when I applied your MTD boot patch, but what I'm asking of you is if you could help me try to figure out how to restore that backup. Thanks.
[G1 Android Development] Firerat:
cache must have had something 'left over' , you don't mention using one of my previous 'NoneDanger' work arounds so I'm going to assume its 'junk' temp files from the market.

here is how to make a new cache backup, requires adb shell

adb shell
mount /sdcard
cd /sdcard/clockworkmod/backup/<tab><tab>
mkyaffs2image /cache/ cache.img
md5sum *.img > nandroid.md5

the <tab><tab> is just to help workout the backup dir, two tabs will present a list, just fill it out ( background here )

that will 'backup' your current tab and recreate the md5sums

you should now be able to restore as normal
[G1 Android Development] yohshua:
this seams to be very odd but iam no longer able to flash any froyo roms or anything above 1.6 and still then only some 1.6 flash and when i do get them running many apps in the market dont want to download i have tryed re rooting but still the same outcome i have even tryed with different recovery and still nothing and i really dont know what to do if you guys could give any help that would be great
[G1 Android Development] Firerat:
are you sure it has anything to do with custom MTD ?

FroYo based on nightly = unstable, it may not even boot

Stuck Market, can sometimes be a problem server side ( i.e. effects all ROMs )

try CM6 RC1

if you still think its a Custom MTD

get to fastboot mode ( reboot holding camera button, connect usb and press back button )

on pc

fastboot erase system -w
fastboot flash recovery <recovery.img>

where <recovery.img> is the full path to the recovery you want to flash
[G1 Android Development] iNDEX3:
It is possible to solve a similar problem with Nexus One?

xdaforums.com/showthread.php?t=731657
[G1 Android Development] Firerat:
similar problem?

I don't see how this is 'similar'

but I will see what I can do in that thread
[G1 Android Development] RebelScum75:
Ok, sanity check here...

I just installed this last night, along with FR's "all-in-one" patch. Here's what I see in Terminal using df -h:

# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 47.7M 0 47.7M 0% /dev
tmpfs 47.7M 0 47.7M 0% /mnt/asec
/dev/block/mtdblock3 90.0M 88.3M 1.7M 98% /system
/dev/block/mtdblock5 117.8M 39.8M 77.9M 34% /data
/dev/block/loop0 3.9M 3.9M 0 100% /system/xbin
/dev/block/mtdblock4 572.0M 58.6M 482.8M 11% /cache
/dev/block/mmcblk0p2 572.0M 58.6M 482.8M 11% /sd-ext
/dev/block/mmcblk0p2 572.0M 58.6M 482.8M 11% /cache
/dev/block/mmcblk0p2 572.0M 58.6M 482.8M 11% /data/dalvik-cache
/dev/block/vold/179:1
6.7G 1.2G 5.5G 18% /mnt/sdcard
/dev/block/vold/179:1
6.7G 1.2G 5.5G 18% /mnt/secure/asec
#

Does that look wonky to anyone, or am I good?

Also, a free gives me:

# free
total used free shared buffers
Mem: 97640 95836 1804 0 308
Swap: 125396 57924 67472
Total: 223036 153760 69276
#

Now, I had originally thought that the 97640 total mem had something to do with free space on the device, but now I realize (correct me if I'm wrong) that this is actual RAM; it has nothing to do with the device's space. (BTW, what type of memory is the internal memory that stuff like apps get installed to, if it's not RAM?)

Anyway, my point is, I just thought it was odd that free always shows about 2000kb free, whether I was using swap or not, and no matter how many things I have running or don't have running. What is the reason for this?

Ok, last question: it was implied earlier by FR that this patch can be undone by flashing a new ROM and just not flashing this patch. Ok, but the "recovery" patch, I would assume, does not get reversed, since that is patching your recovery (right?). If you wanted to completely revoke this, you'd have to re-flash recovery, and then re-flash your ROM, right?

Thanks so much, I know I'm new and learning, thanks for your patience!
[G1 Android Development] Firerat:
everything is working... why the confusion?