yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] RaiderX303:
Heres how i done it including dalvik-cache all from adb, it cannot be done from phone terminal.

adb remount
adb shell
#first we need to clear dalvik-cache from data partition to make space
cd /data
mkdir /system/sd/dalvik-cache #if you get already exists, just continue and ignore error
mv ./dalvik-cache/* /system/sd/dalvik-cache
rmdir dalvik-cache
ln -s /system/sd/dalvik-cache dalvik-cache

#now the downloaded apps, if you have no installed apps apart from pre-loaded ones ignore this step

cd /data
mkdir /system/sd/app #again, if you receive already exists, ignore the error and continue
mv ./app/* /system/sd/app
rmdir app
ln -s /system/sd/app app

#ok now onto the rest

mkdir /data/app_s

#This is if you have already copied the apps to the sdcard
cp /system/sd/app_s/* /data/app_s

#This is for if you havent
extract the app_s.zip to app_s within the tools folder of android sdk
then using adb
adb push /app_s /data/app_s

cd /system
ln /data/app_s app

that should work, let me know if ive missed anything
[G1 Android Development] fleshdeep:
Is the camera.apk in your hero mod the htc sapphire cam or the hero? You said it will cause force close on rosie>?
[G1 Android Development] Biohazard827:
Would it be possible to move a few .apk's from app_s and run them from /data... I.E. Rosie and messages. Sometimes if I exit music or other apps Rosie take forever to load.
[G1 Android Development] robpet2:
will have to try these hacks out.. later on today
[G1 Android Development] slackberry:
Nice. Thanks. If you need a guinea pig.... :)
[G1 Android Development] King_tee:
Does anyone have a copy of the Rosie.apk? I didn't check to to see if it copied to my c drive before i removed it. I'm such a dummy :(
[G1 Android Development] RaiderX303:
its in the app_s.zip download available form haykuro's thread
[G1 Android Development] dbhatesyou:
get it back from the app_s.zip
[G1 Android Development] buttkicker:
Optimize by creating ODEX files for all apps.

I did make a shell script to create odex files for all apps based on this post, if anyone wants to use it.

-Download

-Unzip the file.

-Copy it to the sdcard.

-Run "sh /sdcard/optimize.sh" from the terminal as su.

-Reboot the phone

What does this script do?

- Mounts /system as rw

- Removes system@app dex files from dalvik-cache

- Removes odex files from /system/sd/app_s if they already exist

- Creates odex files for all apk's in /system/sd/app_s

- Removes data@app dex files from dalvik-cache

- Removes odex files from /data/app if they already exist

- Creates odex files for all apk's in /data/app

- Removes data@app-private dex files from dalvik-cache

- Removes odex files from /data/app-private if they already exist

- Creates odex files for all apk's in /data/app-private

Reboot your phone after running this script and enjoy the speed.
[G1 Android Development] pixel-painter:
Ok took your advice and a Huge thanks.. I seem to be getting way better response.

here is what I did.

I copied /data/data and /data/dalvik-cache and /data/app to sd using symlinks

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

busybox cp -a /data/app /system/sd/

busybox cp -a /data/app-private /system/sd/app-private

busybox cp -a /data/data /system/sd/data

busybox cp -a /data/dalvik-cache /system/sd/dalvik-cache

delete folders on phone

rm -r /data/app

rm -r /data/app-private

rm -r /data/data

rm -r /data/dalvik-cache

make symlinks

ln -s /system/sd/app /data/app

ln -s /system/sd/app-private /data/app-private

ln -s /system/sd/data /data/data

ln -s /system/sd/dalvik-cache /data/dalvik-cache

copied app_s from sd to phone

busybox cp -a /system/sd/app_s /data/app_s

deleted from sd card

rm -r /system/sd/app_s

symlinked to /system/app

ln -s /data/app_s /system/app

rebooted phone and all was good :)

Edit By the way, I have 41mb free on the phone :p

I am still getting a force close when I try to go into "Local & text settings" can anyone help with this?
[G1 Android Development] chicojd:
Now running much faster after removing the PC sync, Launcher and replaced the camera. Also moved app, app-private and dalvik-cache to SD. This helped tremendously.

msg for haykuro:
[G1 Android Development] bolmedias:
It took me a LONG time, but I finally have Hero working smoothly. Woop!
[G1 Android Development] emms007:
How would moving app, app-private and dalvik-cache to SD improve performance ?

I'd rather think that anything running from the SD card is slower than on the internal memory.

So that we have plenty of internal space, what's the point?
[G1 Android Development] surj08:
Hero install

http://herog3.wicholandia.com/news.php <<worked for me first try. If you've messed around before like i did (i put the app_s on the ext2 and tried the /system/sd at the same time) I would recommend either reformatting the card of fsck it in linux (fixed mine) then follow the instructions
[G1 Android Development] Robot Teapot:
Would anyone be willing to re-host the HTCCamera.apk from the original post? I can't seem to get it to download from mediafire. IME and Clicker went fine, but this one is being stubborn.
[G1 Android Development] twistedumbrella:
It is similar to defragmenting your hard drive... More space taken per drive is less to index in one read...

http://xdaforums.com/showthread.php?p=3874714#post3874714
[G1 Android Development] bmic:
Any other HTC_ime.apk link ? i can't download in mediafire this only file.
[G1 Android Development] acidnine:
OC

I just use Open OverClocker from the market, it doesn't stick after a reboot, and will drain the battery faster, but it seems to run f'n smooth.
[G1 Android Development] techinkdev:
My phone always bricks at the G1 screen after i apply the SPL file. What am i doing wrong?

Edit

I do have my SD partition already, could that be the problem?
[G1 Android Development] fairymaru:
helllppp

When I got to this point....busybox cp -a /sdcard/app_s /system/sd

it says:

cp: target '/system/sd/app_s' is not a directory

Help with this will be very appreciated
[G1 Android Development] slackberry:
I had a hard time getting to it as well. Just keep trying...it eventually downloads.
[G1 Android Development] twistedumbrella:
It's on my google code under downloads. I had renamed it to Camera.apk, but if it matters you can just rename it back.
[G1 Android Development] fairymaru:
OOOpss sorry I forgot...THANK YOU FOR TAKING YOUR TIME AND DOING THIS TUT FOR ALL TO HAVE FUN WITH THE HERO ROM
[G1 Android Development] law_ren_ce:
you gotta install the radio file 1st.
[G1 Android Development] rjwisniewski:
After hours of trying I've given up. I've never had a rom beat me, but Hero just doesn't like my G1.
[G1 Android Development] stevemartin1991:
:(

at the stage of flashing the hero beta v4 just wiped and flased it stuck on the boot screen for a while then went to a black screen with force close:(:( any ideas?
[G1 Android Development] g1doobie:
I am using jf 1.42 recovery. Do I need 1.43 in order to use this rom?
[G1 Android Development] prateeksach:
Can I use the stock 1G card for the ext2 partition or a 2G card????????????????????????????????/ I can't afford anything else "_"
[G1 Android Development] law_ren_ce:
I am redoing the process to my phone right as we speak 2 see if i get any errors ok?
[G1 Android Development] stevemartin1991:
:(

i reflashed beta v4 working now......ok now the thing that broke me down...the emulator
[G1 Android Development] law_ren_ce:
turn ur phone off then back on see if it does the same.. did u see the nofication bar or anything?
[G1 Android Development] fairymaru:
Ok i appreciate
[G1 Android Development] law_ren_ce:
yeah u can use any sd card i recomend at least 1gig.
[G1 Android Development] techinkdev:
I have installed the radio first.. but i also have partition my SD card before i saw this tutorial.. do you think that might be the problem?
[G1 Android Development] Undert8726:
Stupid Question

This tutorial says not to wipe when flashing the SPL. My question, wont the phone not boot into android once the SPL is flashed. If so, how do we get the next file on with a non-bootable phone?
[G1 Android Development] crazifyngers:
rich0,

dude the swap is great. just to let you guys know I made my file in /system/sd. this allowed me to have the swap on the sd card. i made 75mb swap and it is using about 38mb of it. I have noticed less crashing of rosie and a more responsive system. again thank you rich your commands work flawlessly! my only suggestion would be to edit your original post with the correct mkswap command so it is less confusing. :)
[G1 Android Development] DAKIDD236:
did anyone use this yet?
[G1 Android Development] law_ren_ce:
no that wouldnt be the problem. ive never had this problem im hopefully wont in the future. so im not sure whats going on.
[G1 Android Development] law_ren_ce:
the spl is only a secondary program loader it has nothing to do with the android os booting.
[G1 Android Development] wesbalmer:
Badass, its cool when the more advanced on this site acknowledge that their is a crowd of people willing to learn, and with guides like these that make it so easy to learn we all benefit. Thanks
[G1 Android Development] dbhatesyou:
i tried this for the hell of it , but i keep getting

sh: Can't open /sdcard/optimize.sh
[G1 Android Development] rjwisniewski:
Still wont work for me. Problem is always the same.

My G1 loads to the "Welcome to T-Mobile G1" set-up screen, but does not get radio signal. When I try to click Menu > APN Settings I get... "The application Setup Wizard (process.com.android.setupwizrd) has stopped unexpectedly. Please try again."

I'm also getting this when the phone starts: Sorry! Process com.android.phone is not responding.
[G1 Android Development] law_ren_ce:
Your welcome. Im not that advanced tho im only 17 at that. and i went through alot of trouble getting this rom on my phone and i dont want people going through what i had 2.
[G1 Android Development] question.com:
i did everything correctly, flashed hero, and now im at a black screen. ive read about other people getting this same issue. should i pull the batt, and try to boot again?
[G1 Android Development] law_ren_ce:
Hmmm you shouldnt have 2 sign into google right away. skip that and see if you can get past that..
[G1 Android Development] RaiderX303:
works fine here, i used adb push optimize.sh /sdcard then adb shell sh optimize.sh, it took a couple minutes to complete and i had to edit it for the new location of the app_s folder
[G1 Android Development] law_ren_ce:
See i dont know y its doing that when 2 me its not!

Im re flashing Hero onto my phone right now ill see if any error messages pop up!
[G1 Android Development] Robot Teapot:
Just ran the optimize script with some edits (not doing Apps2SD) will post results soon (rebooting now)

all i know is that when i ran this bad boy, ALL of my running apps crashed at the same time... i am so crossing my fingers right now....
[G1 Android Development] AbsoluteDesignz:
can you post your edited version of the optimize.sh, I'm assuming you moved your apps to data like I did...
[G1 Android Development] Vision77:
I have it working at about 85% as far as speed. It took a combination of the lucidrem script, funbacons bloat removal technique and twistedumbrellas mods. I have not gotten superuser access back so I can use the overclocking widget from the market yet.
[G1 Android Development] Meltus:
you might want to mention that before you put hero-signed.zip on your sdcard, it needs to be renamed to update.zip.

also, would you need to partition your sdcard? wouldn't it just work as it is?

also n1 for this :D
[G1 Android Development] fairymaru:
i USED THIS CMD # ls -l /system/sd IN TERMINAL TO VERIFY IF THE APP_S FOLDER IS IN EXT2 AND IT COMES THAT I HAVE IT THERE SO I DON'T KNOW WHAT IS HAPPENING WHEN I TYPE THIS busybox cp -a /sdcard/app_s /system/sd IT SAYS THAT IS NOT A DIRECTORY:(:confused:
[G1 Android Development] question.com:
trying again. the beta hero loaded up great. played around with it, then flashed the real hero build. its currently flashing. once it finished, ill post the result. i would love to adb and get a log, but i dont have access to my pc, and my laptop is 64bit, so its a pain to set it up here
[G1 Android Development] jasonpeinko:
can someone post a mirror? the downloads dont seem to work for me
[G1 Android Development] SirFenwick:
Same thing has happened to me. Trying to re-update it now.
[G1 Android Development] blakestimac:
i know this isnt technically about hero.. but i didnt want to make a thread about it. anyone got my back up pro to work with rosie?>it installs fine, but the restore is on the other partition, so i figured that would be an issue. i tried to push the whole folder, but that did not work.. any ideas?
[G1 Android Development] law_ren_ce:
i dont know y you need it partitoned.. haykuro said you needed 2 and i havnt found a way around it and thanks for metioning the mistakes i made!
[G1 Android Development] rjwisniewski:
Hit skips and it gives the same error, that's why i tried APN. I've tried re-flashing, redoing the radio, SPL, wipes, etc. No go.
[G1 Android Development] question.com:
just reflashed, and the htc logo pos up fine, then i get the damn dreaded black screen of death. gonna go back to the hero beta, and reformat my sd partitions, and move the file again, maybe that will work
[G1 Android Development] DAKIDD236:
i think taking the launcher apk off was a bad idea; i just got about 9 force close/wait messages in a row.
[G1 Android Development] Robot Teapot:
Definitely works... i think with all the speed boosts that people are posting in addition to this ODEX script makes the build fully usable on a G1... still a little lag here and there, but completely tolerable now

As far as editing the script, i just went through it with a text editor and changed the apps directory to what mine actually is, in the lines that called for it
[G1 Android Development] rigamrts:
sounds like your sdcards not partioned correctly
[G1 Android Development] prateeksach:
Ok... I am using a 1 GB stock card to partition to use the ROsie rom but the question is that if it keeps crashing-- can i revert the ext2 partition back to fat32 and if so how?????????????
[G1 Android Development] rigamrts:
here a hint try with a fresh formatted card nothing on it cause i got it work work
[G1 Android Development] stevemartin1991:
:(

back 2 this problem aswell:( any fix? thanks in advance
[G1 Android Development] AbsoluteDesignz:
oh okay...doing that now...
[G1 Android Development] dom2684:
mines working fine :)
[G1 Android Development] Meltus:
np :)

i think i see why it needs to be partitioned now :P

i'll give this a go and post the results :p
[G1 Android Development] fairymaru:
ok i will try this...thanks
[G1 Android Development] mikedmeyer:
Battery life seems to be worse, though. I took it off the charger this morning ~7:30 and it's already down to 38%. That's quite a bit worse than I've been experiencing with any of the other non-hero builds.
[G1 Android Development] slackberry:
nm..i found the problem
[G1 Android Development] acidnine:
I tried but I get a permission denied when I try to run the script.
[G1 Android Development] law_ren_ce:
Thank You! And your audio fix is the best.. i was tired of the cupcake sound so low.. But im getting off topic so let me stop!
[G1 Android Development] dbhatesyou:
dexopt-wrapper not found. when using the optimize.sh
[G1 Android Development] law_ren_ce:
No there has to be 2 partitons on the sd card one fat32 and one ext2 and u can use paragon partition manager i am going 2 upload paragon file manager as some people dont know how 2 download torrent files.
[G1 Android Development] swivel:
Lose the obnoxious signature please

Are there no sig rules for these boards? This member's signature is totally ridiculous.
[G1 Android Development] prateeksach:
I know there has to be two partitions on the sd card- i will do that and once i do that and install rosie- and if somehow it crashes because its a 1 GB card- can i revert the ext2 partition back to normal?????? meaning back to fat32????????
[G1 Android Development] stevemartin1991:
cp: target '/system/sd/app_s' is not a directory

what is meant 2 come up at this point? this is pissing me off:@
[G1 Android Development] Undert8726:
SPL problem

I had asked earlier if android would still boot after installing the SPL. Well, Im stuck at the G1 boot screen after flashing the SPL for about 5 minutes now. Anybody have any clue what to do to get the next Rom on there to flash. I dont have an MiniSD Card Reader or anything. If its ADB please tell me how as I have never done it before.
[G1 Android Development] doubleokneegro:
after all of the removing of the apks did you reboot? a simple reboot adb shell reboot worked just fine for me
[G1 Android Development] techinkdev:
i quit :/ im am not sure why i always get stuck at the G1 screen after i apply the SPL file.. im sure im doing everything correct :/
[G1 Android Development] dom2684:
dammit.....im stuck in an looping boot

what now?
[G1 Android Development] wesbalmer:
You must unmount from USB, same errror I got and thats it.:)
[G1 Android Development] King_tee:
Didn't think to look there. Thanks
[G1 Android Development] law_ren_ce:
if you had hard spl r anyother spl other than the original spl it might interfere... do this... start all over again with re rooting your phone..
[G1 Android Development] DAKIDD236:
thats just what i needed
[G1 Android Development] buttkicker:
Do this.

The dexopt-wrapper binary is not in the build by default.
[G1 Android Development] swivel:
Yikes! One question mark does the job just fine.
[G1 Android Development] acidnine:
Your camera app has problems with the drivers, it rotates 90 degrees CCW and is skewed.
[G1 Android Development] prateeksach:
Can you help me "?"
[G1 Android Development] Undert8726:
As far as I heard

the reason why I asked originally is bc haykuro said that you would need a reader or second phone to move the Update.zip file of the rom back onto your phone bc the spl would stop it from booting. Maybe this is the issue with the other guy too.
[G1 Android Development] slackberry:
A couple of pages back i posted the same issue. If you rotate the screen, horizontal it will fix itself for that view.

An update/fix will be posted later per twistedumbrella.
[G1 Android Development] buttkicker:
Are your apps in /system/sd/app_s or /data/app_s ?
[G1 Android Development] dom2684:
system/sd/apps_s
[G1 Android Development] jaboswell:
I dont post much in here..but I know my way around my phone very well...

I had everything running with Hero at decent speed within 15 minutes. I came from using the new radio with JF1.5ADP..I partitioned my sdcard, extracted the app_s.zip from fat32 to the EXT2 using terminal emulator in JF1.5ADP,than flashed the new SPL...than flashed the Hero_signed.zip (update.zip)...Wallah!!! Got hero working...

It will say "Loading" when going to Rosie about 20% of the time so im sure once i do some mods that are on here in the DEVELOPMENT section it will be just fine.

I did notice if you run open overclocker and run at max speed than it runs better and only needs to load about 15% of the time...

so far im happy..
[G1 Android Development] law_ren_ce:
No i have no problem with that.
[G1 Android Development] wesbalmer:
cp stat no directory error can be solved by unmounting your SD card, so many people have asked.
[G1 Android Development] adnans:
doh, link to hero beta 4 is dead ;(

if you're hitting the G1 screen after the spl, thats fine!!

all you need to do is get the new rom you want to flash to your sd card and appy that. thats why haykuro said you would either need two cards (prepared in advance) or a card reader for your pc.

after flashing the new SPL, you will get 'stuck' at the T-Mobile/G1 screen. do not panic. just get the new hero-signed.zip file on your sdcard, renamed to update.zip, and flash it. you'll be okay!
[G1 Android Development] METHOD1911:
im stuck

can someone please help me i got hero on my phone but i cannot see anything i can see the notification bar and im getting htc wizard has stopped i put the app_s file on ext2 by way of paragon file transfer did i do something wrong thats y i cannot see anything PLEASE HELP ME
[G1 Android Development] buttkicker:
I hope you mean /system/sd/app_s.

Otherwise, the script will fail to create the odex files.

Did you notice the output when you ran the script?

You should have seen something similar to this for each apk file.

dexopt-wrapper /system/sd/app_s/htcsettingwidgets.apk /system/sd/app_s/htcsettingwidgets.odex
--- BEGIN '/system/sd/app_s/htcsettingwidgets.apk' (bootstrap=0) ---
--- would reduce privs here
--- waiting for verify+opt, pid=1307
--- END '/system/sd/app_s/htcsettingwidgets.apk' (success) ---
dexopt-wrapper /system/sd/app_s/teeter.apk /system/sd/app_s/teeter.odex
--- BEGIN '/system/sd/app_s/teeter.apk' (bootstrap=0) ---
--- would reduce privs here
--- waiting for verify+opt, pid=1312
--- END '/system/sd/app_s/teeter.apk' (success) ---

You can also verify by checking if each app has a corresponding odex file in /system/sd/app_s.

Type this in adb and report the output.

adb shell ls -l /system/sd/app_s
[G1 Android Development] tampabuc2004:
OK after i enter the busybox command i get:

cp: cannot stat '/sysytem/sd/app_s/AccountManager.apk': Stale NFS file Handle
cp: cannot stat '/sysytem/sd/app_s/AndroidMarket.apk': Stale NFS file Handle

Is this a problem? if so how would i go about fixing it? i have done 2 seperate downloads of app_s just to make sure it wasnt corrupt. Thanks in advance
[G1 Android Development] stevemartin1991:
i give up:( still getting the same error only thing i can think of is im not sure what class my sd card is?
[G1 Android Development] rjwisniewski:
same here. boots perfect. setup wizard messes up and cant skip it then says phone process doesnt work.
[G1 Android Development] samysam05:
Did anyone figure out how to use the apps already in the app and app-private in this build?? so we dont have to redownload them and when we download apps where do they go? app_s or some other place?
[G1 Android Development] DAKIDD236:
what are the commands for the optimization through adb?
[G1 Android Development] maydaysos:
i used a command in adb to mount my sd card in recovery. is there a command that works to unmount it through adb
[G1 Android Development] law_ren_ce:
that shoudlnt matter.
[G1 Android Development] wesbalmer:
I'm flashing the newest rom right now after following each step. I'll report in a moment to see how I did :-)
[G1 Android Development] prateeksach:
how do you revert the ext2 partition back to fat32?
[G1 Android Development] Stigy:
If I do this and then want to go back to a regular ROM (such as JF or CM) do I just flash the Hard SPL and then flash their ROM via recovery mode?
[G1 Android Development] stogchris81:
Is there anyone that successfully flashed hero from dudes 1.2b? If so, how did it go?
[G1 Android Development] dbhatesyou:
thanks thanks.
[G1 Android Development] stevemartin1991:
interesting aswell... i have just formatted my card on my vista laptop its a 2gb and its only allowing me to have 1399mb
[G1 Android Development] law_ren_ce:
Nooooo i wouldnt do that lolz (BRICK) only flash the rom via recovery
[G1 Android Development] law_ren_ce:
i am uploading paragon partion manager.. it will help alot of yous alot! i think that might be the problem the way yous are partitioning your sd cards
[G1 Android Development] wesbalmer:
I love the new boot screen, cute lil android.

1:26: Waiting, waiting waiting. I hate waiting....

1:27: :-( is it stuck?

1:28: YAY!!!!!!! keys lit up

its uh hero

This guide absolutely works!!!
[G1 Android Development] pandemonia99:
Could someone please re-up HTC_IME.apk, for whatever reason, I can't download that one from mediafire, and I've already done the first step (removed the default one) ;_;
[G1 Android Development] slackberry:
Moving Rosie.apk to the phone instead of the sd card did wonders for the performance.

Also, its possible to do all of this using the terminal emulator on the phone, for all you guys that were wondering. It takes a little longer to get it setup, but its easy as pie.

Thanks to all those that are assisting with this.