yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Firerat:
Well, I have updated the script to echo if it doesn't find it

you have to extract the original update-script for my script to translate

UPDATESCRIPT="/data/META-INF/com/google/android/update-script"

if [ -e $UPDATESCRIPT ];
then
< Main Script>
else
echo -e "$UPDATESCRIPT\ndoes not exist\nunzip /sdcard/rezippedROM.zip META-INF -d /data/\nto create it"
fi

will now output

/data/META-INF/com/google/android/update-script

does not exist

unzip /sdcard/rezippedROM.zip META-INF -d /data/

to create it
[G1 Android Development] speedysilwady:
oh, using the new script on the last page i didnt have that error, so it must have copied to data just fine. it was only when i typed in the command for install.sh it threw that error at me. so I guess it unzipped it but didnt generate that install script for some reason.
[G1 Android Development] Firerat:
the script uses the tee command, so you should see a lot of stuff on screen

ln -s toolbox /system/bin/getevent
<snip links>
ln -s /system/xbin/busybox /system/xbin/bb/zcat
chmod -R 0755 /system/
chmod -R 0644 /system/*
chmod -R 0755 /system/bin
chmod -R 0755 /system/bin/*
chmod -R 0755 /system/xbin
chmod -R 0755 /system/xbin/*
chmod -R 0755 /system/etc/bluez
chmod -R 0440 /system/etc/bluez/*
chmod -R 0755 /system/etc/ppp
chmod -R 0755 /system/etc/ppp/*
chown -R 0.0 /system/
chown -R 0.2000 /system/bin
chown -R 0.2000 /system/xbin
chown -R 1002.1002 /system/etc/bluez
chown -R 0.0 /system/etc/ppp
chown 0.3004 /system/bin/ping
chown 0.3003 /system/bin/netcfg
chown 0.0 /system/bin/su
chown 0.0 /system/etc/bluez
chown 1002.1002 /system/etc/dbus.conf
chown 1014.2000 /system/etc/dhcpcd/dhcpcd-run-hooks
chown 0.2000 /system/etc/init.goldfish.sh
chown 1001.1005 /system/etc/AudioPara4.csv
chown 0.0 /system/xbin/busybox
chown 0.0 /system/xbin/sqlite3
chown 0.0 /system/xbin/iptables
chown 0.0 /system/etc/ppp/ip-up-vpn
chmod 02755 /system/bin/ping
chmod 02755 /system/bin/netcfg
chmod 04755 /system/bin/su
chmod 0755 /system/etc/bluez
chmod 0440 /system/etc/dbus.conf
chmod 0550 /system/etc/dhcpcd/dhcpcd-run-hooks
chmod 0550 /system/etc/init.goldfish.sh
chmod 0444 /system/etc/AudioPara4.csv
chmod 04755 /system/xbin/busybox
chmod 04755 /system/xbin/sqlite3
chmod 04755 /system/xbin/iptables
chmod 04755 /system/etc/ppp/ip-up-vpn
chown 1000.1000 /data/app
chmod 0771 /data/app
[G1 Android Development] speedysilwady:
i didnt see much on the screen. it hung for a little bit then it showed me the "#" on the next line...was i supposed to see something similar to the code you just showed me or is that a separate script (sorry im extra slow today)
[G1 Android Development] Firerat:
what does the update-script look like?

tell you what, I have a new plan

I have recently used the run_prog update-script command to do stuff couln't get the update-script to do, I can use this to patch Legend for NoneDanger

I'll write a script and upload later
[G1 Android Development] Firerat:
NoneDangerLegend090.zip

Unzip Legend ROM

Unzip Patch into the same folder replacing all files

Zip up, sign

Flash

Green added

Red deleted

assert compatible_with("0.2") == "true"

show_progress 0.1 0

show_progress 0.2 0
format SYSTEM:
[COLOR="SeaGreen"]run_program PACKAGE:NoneDanger.sh[/COLOR]
copy_dir PACKAGE:system SYSTEM:

symlink toolbox SYSTEM:bin/getevent
< snip symlinks>
symlink /system/xbin/busybox SYSTEM:xbin/bb/zcat

set_perm_recursive 0 0 0755 0644 SYSTEM:
<snip permisions>
set_perm 0 0 04755 SYSTEM:etc/ppp/ip-up-vpn

show_progress 0.200000 0

[COLOR="red"]format DATA:[/COLOR]
copy_dir PACKAGE:data DATA:
[COLOR="red"]symlink /data/app_s SYSTEM:app[/COLOR]
set_perm 1000 1000 0771 DATA:app

show_progress 0.1 0

write_raw_image PACKAGE:boot.img BOOT:

show_progress 0.1 0

[COLOR="Red"]format CACHE:[/COLOR]
show_progress 0.1 10

NoneDanger.sh

#!/sbin/sh
mount /system
for i in sd csys;do
mkdir /system/$i
done
mount /cache
mount -o bind /cache /system/csys
for i in lib framework xbin ;do
install -d /system/csys/system/$i
done
ln -s /system/csys/system/* /system/
mount -a
mkdir /data/app_s
ln -s /data/app_s /system/app
cat > /system/bin/data-cache.sh << "EOF"
#!/system/bin/sh
# bind mount /data/cache to /cache - Firerat 2010-03-24
if [ ! -d /data/cache ];
then
mkdir /data/cache
fi

# check cache is not already mounted
if [ "`mount |grep -q \/cache;echo $?`" = "0" ];
then
echo "/cache is already mounted.. exiting"
exit 1;
else
# check /data/cache exists, if not create
busybox mount -o bind /data/cache /cache
fi
EOF
[G1 Android Development] speedysilwady:
E:Error in NoneDanger.sh

(Status 65280)

E:Failure at line 8:

run_program PACKAGE:NoneDanger.sh

:(
[G1 Android Development] Firerat:
errm, ok maybe the script _has_ to be executable

Either redownload ( I have updated ) or just chmod 755 NoneDanger.sh, zip and sign

edit : DoH

remove the

cat > /system/bin/data-cache.sh << "EOF"

bit

it should be

#!/sbin/sh
mount /system
for i in sd csys;do
mkdir /system/$i
done
mount /cache
mount -o bind /cache /system/csys
for i in lib framework xbin ;do
install -d /system/csys/system/$i
done
ln -s /system/csys/system/* /system/
mount -a
mkdir /data/app_s
ln -s /data/app_s /system/app

/system/bin doesn't exist yet
[G1 Android Development] Firerat:
NoneDangerLegend090.zip

I have redone the script, it now shunts 'media' off onto data

it was 2mb short :(
[G1 Android Development] speedysilwady:
yay! no errors while it was flashing! its on the g1 screen now, hopefully it boots right up. i will update this post later and let you know how it goes. Thank you Firerat!

Edit: it worked perfectly fine! No problems regarding the cache hack side of things! Sync works, and market works, its completely fine, I ran it for several hours with no problems from the script!
[G1 Android Development] Viper87227:
Try to get this to work with Vega's legend and DangerSPL, not having much luck. I flashed rom, reboot, flashed update, reboot, flashed firerats file, reboot.

When I went to make /system/csys, it said it already existed, is that normal? When I do qdu.sh /system/, I get the following directories...

/system/

/system/app

/system/sd

/system/lob

/system/csys

/system/lost+found

Looking at the first post... there should be quite a few more directories here. Can anyone guess what I may be doing wrong?
[G1 Android Development] M..N:
Would it be possible if someone could make kings latest legend or latest eris for any spl? thanks
[G1 Android Development] M..N:
Im not sure kings legend is in the posts, also the latest eris port is 1.2 the version there is 1.12. sorry for being a inconvinience
[G1 Android Development] Firerat:
should have been an edit, not a quote
[G1 Android Development] M..N:
ok ill try in a bit, will this work on any rom?
[G1 Android Development] Firerat:
the above,, errm maybe, may be not

its very much targeted at cm5,

But, the way it does it could be used in any ROM

if the ROM is very larger ( like a sense ) then a full cachehack would be needed*

( and its easier to fit the very very large sense roms on NoneDanger )

* I have an idea in mind where I can get the ramdisk to work out if full cachehack is needed and mount cache appropriately
[G1 Android Development] Firerat:
the patch in post 3 should work for kings

personally I found Vega's Legend to be better, which is why I didn't bother trying it on kings myself, but others have reported that it works.
[G1 Android Development] FatBoyExtraordinaire:
I think I understand now. Appreciate the simple break down too. Also, thanks for the heads up on the issues in the rom. My friend was about to give one a go. Tell him to try the CE one and see what happens.
[G1 Android Development] speedysilwady:
No problem, bro. Also, for the record, CE 1.2 can be modded to fit on Stock SPL using my method (minus the smart apps2sd, cache hack setup) or Firerat's method. I had CE 1.2 Running a couple weeks ago before this idea was brought to fruition.

And yes Ive confirmed that BART backups work perfectly if you use a "Cache Hacked" (i guess this is what it'll be known as?) rom.

Nandroid does not work, so dont waste your time unless you want a softbrick.

Also I think if devs making big roms like KingKlick and Vegaman use this method, there will be no need for Danger SPL and if anyone already has Danger SPL they'll gain 30mb on system, so its a win/win. i personally think devs should implement this method.

Also if anyone wonders why some people dont wanna update to Danger SPL, take a look at my sig, Ive been stuck on old radio versions and wont update to latest radio for months now and ADB hasnt been working on my computer so I cant fastboot a radio update. There have been a handful of people in my situation and it sucks, so this makes it awesome for us! Also many people are just afraid to turn their android into a lifeless brick flashing that spl....
[G1 Android Development] Firerat:
ok, sorry about that

my script was a mess

anyway, I now have HBOOT-0.95.3000 :)

attached is a fix, it should work over an existing install

but if it doesn't work ( hangs for more that 5min )

then do a full wipe, flash the ErisPort ROM and then the patch,

NB this is only required for NoneDangerSPLs

and I have put the fix in the Full ROM, so its not needed for anything downloaded

since this post
[G1 Android Development] FatBoyExtraordinaire:
I definitely cosign you on everything you said, especially about why people might not want to go the Danger SPL route. I have personally been witness to 2 bricks and I'm not trying to become the 3rd! :eek:
[G1 Android Development] Kainzo:
Interesting stuff here.. I'm using the black CE 1.2 ... I'm a little interested how this would effect day to day performance and apps on the phone with your cache hack..

Maybe I'm missing the obvious.
[G1 Android Development] M..N:
can someone make a legend rom with this mod. also is there a step by step guide on how to do it myself.
[G1 Android Development] speedysilwady:
you should suggest this thread to vega maybe he'll do it?

Firerat explained how to do it, but its not that easy if you have no coding knowledge
[G1 Android Development] Firerat:
I will take a look,

Since now I have the EngSPL I notice that I have quite a chunck free space,

And I think I can get everything on system

Can't look at it right now, but you can probably expect something around 21:00 GMT

I'll kis it for now. Just config for stockSPLs ( which now have an advantage ;) )

Both Vega's and King's

After that I. Want to redo my movement script, I'm hoping I can get it smart enough to pick up from a simple config, just tell it what to move and where depending on spl
[G1 Android Development] Firerat:
OK, a little later than promised, but here is a 'Patch' for Vega's Legend 0.3

Instructions

Download Vega's Legend 0.3

unzip into a new folder

in that folder create a folder called 'cache'

then a folder in cache called 'system'

move

bin etc lib usr xbin

from system into cache/system/

and move

move data/app_s to system/app

unzip Vega03-patch-STOCK_SPL_ONLY.zip

replacing all files

zip contents of folder and sign

wipe all, flash and your done ;)

tbh I haven't tested this yet, I'm going to do that right now..
[G1 Android Development] enemeone:
Firerat is this only for hard spl? can you use this with the danger spl? I already have vegas rom installed

thanks :)
[G1 Android Development] speedysilwady:
any spl! =]
[G1 Android Development] enemeone:
ok cool thanks:)
[G1 Android Development] Firerat:
oops

little bug

after unzipping the patch, copy system/lib/modules into cache/system/lib/

then remove system/lib/

sorry about that

Link has been updated
[G1 Android Development] Firerat:
No this is Not for DangerSPL

this is Hard, Eng and stock only

this is fresh install, before boot

Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock3 67.5M 61.8M 5.7M 92% /system
/dev/block/mtdblock5 74.8M 21.8M 53.0M 29% /data
/dev/block/mtdblock4 67.5M 65.6M 1.9M 97% /cache

Cache is much too small on Danger

this is kis ( keep it simple )

I will do a fancy patch with some kewl script to move stuff around post install

but for now, Stock SPLs only
[G1 Android Development] speedysilwady:
oops im sorry i didnt realize that -_-; facepalm

edit:

Failure at line 36 symlink toolbox CACHE:system/bin/reboot

hmm i think i was supposed to replace ALL the files in bins with the ones in the patch right?
[G1 Android Development] loganthered:
This is pretty neat. I remember when I first flashed DangerSPL it scared the pants off me. Though didn't you say in your first post that this will work for DangerSPL'ed folks, we just get a bit less extra memory back?

Also, I'm going to go ahead and ask a stupid question. If we're so sure cache is not actually useful for much beyond Market installs and OTA updates, why can we not just create a new SPL that eliminates that partition entirely?
[G1 Android Development] Firerat:
yes, this can be used for any SPL, but to keep them compatible a script is needed post install, at the moment I'm just doing a quick easy patch

once this is done, a few bugs, links are failing :(

I will make an AnySPL Patch, I already have some ideas on making the post install script I quickly knocked up for the KingEris port much better

Edit: Oh, and hacking a new SPL is risky, why do you think Danger is called Danger?
[G1 Android Development] speedysilwady:
Oh okay so i did it right, it was just a problem with the links.

Firerat youre doing an awesome job, I really hope this takes off with the devs. :D

I also linked to this thread in my original thread and modified my sig to grab peoples attention on this subject as i think it should be addressed by the devs.
[G1 Android Development] Firerat:
It's Alive !!

OK, I have it booting now

couple of problems with the first patch I did, the update-script was trying to symlink to files that already existed

one was the lib dir, from my Kernel, and the other two were reboot and sh in /system/bin

with the other builds I did, reboot was from toolbox, and I manually moved sh to sh.old as I much prefer the busybox sh

Dalvik-cache is huge

so either reboot or run a2sd ( as root ) from terminal

69.6M	/data/
8.5K	/data/backup
109.5K	/data/system
2.0K	/data/anr
2.0K	/data/cache
4.0K	/data/DxDrm
48.9M	/data/dalvik-cache
4.0K	/data/property
1012.0K	/data/data
6.5K	/data/local
4.0K	/data/wimax
22.5K	/data/misc
18.0K	/data/dontpanic
19.6M	/data/system-framework
2.0K	/data/lost+found

here are sizes after running a2sd

Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock3 67.5M 61.2M 6.3M 91% /system
/dev/block/mtdblock4 67.5M 66.3M 1.2M 98% /system/csys
/dev/block/mtdblock5 74.8M 52.0M 22.8M 70% /data
/dev/block/mtdblock5 74.8M 52.0M 22.8M 70% /cache
/dev/block/mmcblk0p2 457.4M 57.9M 375.1M 13% /system/sd
/dev/block//vold/179:1
7.0G 6.4G 605.5M 92% /sdcard
/dev/block/mmcblk0p2 457.4M 57.9M 375.1M 13% /data/dalvik-cache
[G1 Android Development] M..N:
I'm extremely confused. Do i copy all the files from the vega rom after creating the cache folder, to the patch file and sign.
[G1 Android Development] enemeone:
ok stupid question but can this be done with vegas rom using the danger spl? (vegas rom already installed)
[G1 Android Development] Firerat:
extract Vega's 0.3 ROM into a new folder

say

c:\Vega03

go into that folder and create cache, and in that create system

so you have

c:\Vega03\cache\system

now move

c:\Vega03\system\bin

c:\Vega03\system\etc

c:\Vega03\system\lib

c:\Vega03\system\usr

c:\Vega03\system\xbin

into c:\Vega03\cache\system\

and then

c:\Vega03\data\app_s in to c:\Vega03\system\

and rename c:\Vega03\system\app_s to c:\Vega03\system\app

now Extract my patch ( I have updated it so no bugs )

into c:\Vega03\

replace all files

now zipup, sign and flash

once you get to the unlock screen prompt , reboot

whilst holding the two outer buttons with fore and ring finger press menu with middle finger.

the reboot will trigger Dalivik-cache to be put on SD card, its too big on this ROM

you can skip the reboot and run a2sd as root via terminal, or adb shell

reboot is easier
[G1 Android Development] Firerat:
yes, I did hint at how to do it earlier in this thread

I will look at making a nice script to handle both Danger and None Danger SPLs

so one download suits all ( like the Eris One I did earlier )
[G1 Android Development] M..N:
extract Vega's 0.3 ROM into a new folder

say

c:\Vega03

go into that folder and create cache, and in that create system

so you have

c:\Vega03\cache\system

now move

c:\Vega03\system\bin

c:\Vega03\system\etc

c:\Vega03\system\lib

c:\Vega03\system\usr

c:\Vega03\system\xbin

into c:\Vega03\cache\system\

now Extract my patch ( I have updated it so no bugs )

into c:\Vega03\

replace all files

I have done the steps in red. but now im stuck at the steps in blue what do you mean replace all files?
[G1 Android Development] loganthered:
Oh come on, live life by the juevos rancheros man! :)

Actually I find it interesting no one has even attempted it after Haykuro. Did he retire from us or something? I came in late to the game and finding out where he went is like unearthing the location of Atlantis.
[G1 Android Development] Firerat:
in the patch zip file are the below files

they need to end up replacing the original files

when you unzip / extract / copy them replace all files

./boot.img
./META-INF
./META-INF/com
./META-INF/com/google
./META-INF/com/google/android
./META-INF/com/google/android/update-script
./cache
./cache/system
./cache/system/lib
./cache/system/lib/modules
./cache/system/lib/modules/wlan.ko
./cache/system/bin
./cache/system/bin/monkey
./cache/system/bin/input
./cache/system/bin/pm
./cache/system/bin/am
./cache/system/bin/svc
./cache/system/bin/ime
./cache/system/bin/qdu.sh
./cache/system/bin/rwsystem
./cache/system/bin/a2sd
./cache/system/bin/bmgr
./cache/system/bin/data-cache.sh
./cache/system/bin/rosystem
./system
./system/modules
./system/modules/lib
./system/modules/lib/modules
./system/modules/lib/modules/2.6.29.6-Firerat
./system/modules/lib/modules/2.6.29.6-Firerat/xvmalloc.ko
./system/modules/lib/modules/2.6.29.6-Firerat/ramzswap.ko
./system/csys
./system/csys/csys
./system/app
./system/app/jackpal.androidterm.apk
[G1 Android Development] speedysilwady:
hmmm i hate non animated boot images cuz i cant tell if its a bootloop or a really long boot.... how long did it take to load up after the htc screen came on?
[G1 Android Development] Firerat:
it was a while, around 6 or 7 min

I watch it via adb
[G1 Android Development] Firerat:
I think he is in the xda protection program after bricking so many g1s
[G1 Android Development] speedysilwady:
adb and fastboot arent working on my laptop for some reason...

6 or 7 minutes....hmm i mustve copied something incorrectly...it was like 10 minutes and it didnt even do the little vibrate towards the end like the latest roms do when they boot....ill dig through it later and see what i did wrong.
[G1 Android Development] M..N:
ok so i have moved all the files and signed the zip but when i install. i get installation aborted due to the update script not being found. if possible could someone make a signed rom using this hack.
[G1 Android Development] Firerat:
here you go

FR-Vega-L03-NoDangerSPL_S.zip

tbh the Eris Port is much better, but it is version 0.3 for a reason :)
[G1 Android Development] speedysilwady:
I agree eris is better but this one has flash player working better and 3d Gallery and its missing a lot of widgets that the eris has.

but anyways back on topic, we need to get the devs to notice this and implement this in their roms! i believe this is a huge advancement on the g1 front!
[G1 Android Development] martin730:
hm..?

installation aborted

E:Error in Cache :recovery/log (no space left on device)

E:Can't symlink /cache/system/xbin/zcip

E:Failure at line 43:

symlink busybox CACHE:system/xbin/zcip

--------------------------------------------------------------

g1: swap 160 , ext4 , haykuro 1.33.2005
[G1 Android Development] Firerat:
:( its too big

its actually easier to fit it all on no danger

I'll have a look and try and fix it

in the meantime the eris works fine ( and over all is better anyway )
[G1 Android Development] Firerat:
Ok, quick hack on this, I'm now redirecting /system/usr to /data/usr, which should leave a meg or two free on cache

quick recap on how to apply the patch

unzip the Legend Rom

then unzip this into the same folder

zip everything up, and sign

if you don't know how to sign, search for

sign update zip
[G1 Android Development] martin730:
...

ok thank :)

Checking
[G1 Android Development] :
Won't need this, but thanks, firerat. You never disappoint. ;)
[G1 Android Development] martin730:
hmmm...?

patch does not work :(

E:Missing file:

system/media/audio/notifications/Spacious.mp3

E:Verification failed

Installation aborted
[G1 Android Development] Firerat:
that happens before it tries to copy anything?

three files and one directory in META-INF

CERT.RSA CERT.SF MANIFEST.MF com

delete CERT.RSA CERT.SF MANIFEST.MF

( leaving just the directory 'com' )

Zip up and resign
[G1 Android Development] martin730:
....

yes

Verifying update package....

error E:....

'com' :)

error again after "Verifying update package"

E:No signature (54 files)

E:Verification failed
[G1 Android Development] Firerat:
you are signing it how?

edited the patch post with brief instructions
[G1 Android Development] enemeone:
firerat can the vega danger spl be flashed over an already installed rom or do i need to do a fresh install? Which method should i follow? Also i am on a g1 160mb swap 512 ext 2 and a 2gig sd card not sure what class :) will speed improve?
[G1 Android Development] martin730:
...

after delete CERT.RSA CERT.SF MANIFEST.MF

error again after "Verifying update package"

E:No signature (54 files)

E:Verification failed

only a message of recovery
[G1 Android Development] Firerat:
it will probably work

its putting about 25mb on /data , if it complains about being full when writing /data* then I'm afraid a wipe is needed.

* Edit( actually it might not mention DATA, I actually put symlinks on system and write DATA to system, then remove the link s ;) take a look at the update-script, I had to get a little creative )

ref the SD card, you should be ok for the most part. a few apps are going to SD , some system apps which I kinda picked because I'm guessing most would be removed/replaced anyway

This should perform a lot better than a standard legend as I have put as many apps as possible on /system ( all of them with No Danger ;) )

when this gets more widely adopted you can expect all round better performance with these large ROMs, and its a lot easier to do with NoDanger

but you are going to get much more from the Eris in post #2, everything is on internal memory, even Dalvik-cache ( until you install 100's of apps )
[G1 Android Development] enemeone:
i have no problem doing the wipe if i need to so do you think going with the eris in post 2 will improve overall? i will do that oh one thing is 3D working in eris (gallery games etc) and what do you recommend for eris setting swap and ext wise

Thanks alot :D

LOL I typed so do hehe
[G1 Android Development] Shaquiel Harris:
extra 30 mbs.. I love that i have the danger spl!! I think this should be included in every build if it works properly. The g1 Rom variety still may be able to grow with these new extremely big roms. :D:D:D:D:D:D:)
[G1 Android Development] Firerat:
yes

E:No signature (54 files)

E:Verification failed

means you are trying to flash an unsigned zip

this will help

http://www.google.com/cse?cx=partne...hnf&ie=ISO-8859-1&q=sign+update+zip&sa=Search

I don't want to upload 400meg when 5meg will do :)
[G1 Android Development] speedysilwady:
spread the word bro! hopefully the devs will utilize this for their roms from now on.
[G1 Android Development] skater991:
WHAT SPL?

What SPL should I have or would you guys recommend for my mt3g?