yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] pr0cl1v1ty:
[Tutorial] How To Get Hero

This tutorial will be made from information spread out on the forums, hopefully we can get feedback and work out all kinks to get everything working from ground zero.

First you need "Root" http://xdaforums.com/showthread.php?t=442480

Second you need to "Partition your SD card" http://xdaforums.com/showthread.php?t=512873 OR you can try this http://code.google.com/p/android-roms/wiki/Fat_Ext2_Partition

*im still having problems with partitioning with vista x64 :(*

Third you need to get the "Hero ROM"

If there is steps im missing please P.M. me this is a information/tutorial on the HERO ROM. thank thank you

Thanks to : Haykuro, Koush, robpet2, Jon.Pezz, Google Code am i missing some? *pm me*
[G1 Android Development] slackberry:
Good info! I can't wait to try this.
[G1 Android Development] mhsbrian:
Well, I did something dumb.

I flashed my phone with the new official Hero ROM, wiped before I flashed but now Im looping at the HTC boot screen.

It worked fine on the beta 4.

I've wiped again and reflashed a few times and still it just keeps replaying the logo screen over and over.

Have the the newest SPL, and Radio and like I said worked fine on beta 4.

Any suggestions ?
[G1 Android Development] stevemartin1991:
yo

theres a way 2 get ur sd card partion without using ur pc i just done it:) now im struggling 2 send app_s.zip to the partitioned part of the card:(
[G1 Android Development] rhwd2003:
Can anyone help me please?

I have followed the instructions and as I am trying to create the ext2 partition on my sd card I have downloaded the partition magic 8 application and followed the instructions here: http://xdaforums.com/showthread.php?t=512873

The only problem is I can't get paritition magic to pickup my sd card. I have tried it through a card reader and mounted on my phone and it will still not show it.

I have Windows XP and I also downloaded the android usb drivers as well.

Any thoughts?
[G1 Android Development] pr0cl1v1ty:
by sending it do you mean by using ADB? if so i have no clue about that haykuro told me to do that back when i had a problem with my phone turning off, never really could find that
[G1 Android Development] RaiderX303:
tried this and it made the rosie alot faster, also moved rosie.apk and the widgets to internal memory which gave a speed boost
[G1 Android Development] stevemartin1991:
yeah

yeah theres a way to do it through the emulator but every line i put in trying unzip it it fails:( so stuck in loop just now:(
[G1 Android Development] law_ren_ce:
Yeah there is a way without a computer.

http://code.google.com/p/android-roms/wiki/Fat_Ext2_Partition
[G1 Android Development] thefarleft:
idk how to get to market w/o launcher working.

Also it seems that the main problem (though i could be mistaken) has to do with

ERROR/AndroidRuntime(1552): android.view.InflateException: Binary XML file line #23: Error inflating class java.lang.reflect.Constructor

I haven't been able to figure out what causes that. Intuitively it wouldn't seem that overclocking wouldn't solve that particular exception... would it?
[G1 Android Development] pr0cl1v1ty:
AWESOME find bro! thanks ill add this to tutorial, can u confirm it works correctly?

updated link
[G1 Android Development] funbacon:
I test on my phone and it worked perfect before posting this thread.

Just delete HTC_CIME from app_s and copy HTC_IME to app_s
[G1 Android Development] law_ren_ce:
Yup it works... 4 sure!
[G1 Android Development] jroid:
does removing the launcher.apk delete the 7 homescreens??
[G1 Android Development] wizern23:
does anybody know the steps to do this.
[G1 Android Development] thefarleft:
I couldn't get Partition Magic to work either, try the paragon tool mentioned in the post you link.
[G1 Android Development] twistedumbrella:
adb remount

adb shell cp data/app_s system/sd/app_s

Maybe?
[G1 Android Development] stevemartin1991:
i can comfirm it works i have my 2gb partitioned just cant get my hero rom working:(
[G1 Android Development] BrumBrum74:
I've tried with Terminal on phone and I get the following after typing:

cp sdcard/mods/bin system/bin/

cp: omitting directory 'sdcard/mods/bin'

Any clue what could be wrong?
[G1 Android Development] law_ren_ce:
Oh i recently made a tutorial on how to get the offical hero build up and running on your phone...

http://xdaforums.com/showpost.php?p=3873041&postcount=4

:D
[G1 Android Development] Kllian:
no it doesnt
[G1 Android Development] doubleokneegro:
for anyone using the method of AppstoSD2.apk or AppstoSD2 app...

when setting the amount of space to partition as ext2, how much is good and how much is too little?

AND can this process be run again without "clearing" or messing up and having to do over what is already done...??

just tryna find out
[G1 Android Development] chief2842:
Did anyone get this to work yet?

Originally Posted by twistedumbrella View Post

adb remount

adb shell cp sdcard/gscript/odexdata system/bin/odexdata

adb shell chmod 755 system/bin/odexdata

adb shell cp sdcard/gscript/odexpaid system/bin/odexpaid

adb shell chmod 755 system/bin/odexpaid

adb shell cp sdcard/gscript/odexsys system/bin/odexsys

adb shell chmod 755 system/bin/odexsys

adb shell odexdata

adb shell odexpaid

adb shell odexsys

Same thing in terminal, just mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system (I hate that I know that from memory now)

then do all the same minus the adb shell prefix
[G1 Android Development] ccyrowski:
This solution works. After doing this load the odexdata.sh odexpaid.sh and odexsys.sh into your gscript folder on sdcard and run.
[G1 Android Development] jroid:
ok thnx :)
[G1 Android Development] pr0cl1v1ty:
im think u will have to delete all data by reformatting to change the partition sizes, if im wrong someone please correct me :D
[G1 Android Development] Dantehman:
Not an option???

Im on a Vista X64 Ultimate machine and ADB works fine, you may just need to install drivers found here Enjoy!:D:D:cool:
[G1 Android Development] law_ren_ce:
Im not toally sure i know if you partiton ur memory card using the method on this website http://code.google.com/p/android-roms/wiki/Fat_Ext2_Partition you can do it over and over again without anything getting messed up.. not totally sure if it will erase your existing (if any) files on the ext2 partiton tho!
[G1 Android Development] wizern23:
i figured out the commands to copy it over and now gscript is working. for those who need it they are

su

#cp /sdcard/dexopt-wrapper /system/xbin

#chmod 755 /system/xbin
[G1 Android Development] Kllian:
actually, just use the official drivers in the SDK. 32 and 64bit ones are there.

android-sdk-windows-1.5_r2
[G1 Android Development] mhsbrian:
I can use adb while the phone is stuck in a loop?

What exactly does this command do ? I haven't gotten the app_s file from the 1st post yet and pushed it.
[G1 Android Development] Dantehman:
Aye aye and that page has all the info and drivers on it,,, aint i a stunner :D:D:p:p:D:D
[G1 Android Development] Jrbourque:
okay im trying to copy over using terminal and it keeps telling me wrapper not found when im trying to run "odexdata.sh"
[G1 Android Development] brandenk:
How do you move rosie/widgets to internal memory?
[G1 Android Development] wizern23:
a few pages back twistedumbrella uploaded the dexopt-wrapper. download that and then enter these commands into the terminal emulator after you copy it to your sdcard

su

cp /sdcard/dexopt-wrapper /system/xbin

chmod 755 /system/xbin
[G1 Android Development] defconoi:
Lets optimize memory usage in Hero

Ok I am tired of surfing the web and switching between gmail/browser and have one of them close, and I am sure everyone has experienced this slight annoyance. I have searched the forums and seen that people tried to implement a swapfile on the sd card which is known to currupt these cards. I then had another idea, we are now using apps2sd on most of our new roms and we have on average 30-40 megs unused device memory. So I would like to find out if we could take advantage of that space and use it for RAM to at the least save a few apps from closing. We also need to figure out the best swappiness variable as well.

I tried creating a swapfile /data/swap at 16 megs and used swapon, and I keep getting invalid argument, Id really like to either implement a ramdisk that is safe or possibly look into compcache http://code.google.com/p/compcache/

As newer roms are released "like hero" we are limited with space and have to use appstosd for our g1's, I dont want to feel obligated to buy a new device because a rom requires a few extra megs of ram we could possible squeeze in. As a team we are all smart and can come up with some great solutions.

The question I have is:

If we free up device memory and put more apps/data/audio/video files on sd, and we take advantage of the device memory as ram would it be faster than using a swapfile on sd?

If there is any possibility this could improve our experience, lets put our heads together and write something up, if you have any other ideas please share

defcon
[G1 Android Development] andrews240:
I would like to know this also. Are you using the new apps2sd on Hero?
[G1 Android Development] thefarleft:
Yes, at least i have been able too.
[G1 Android Development] Jrbourque:
now im getting the damn omitting when trying to cp the dexopt-wrapper
[G1 Android Development] emil10001:
To move those apps to internal memory, just remove them from the app_s folder in your ext2 part and install them via the installer, or use "./adb install Rosie.apk" from your computer. That's how I got mine working
[G1 Android Development] Amon_RA:
How do I manually remove the apps2sd? I'm using it on the Magic and I have enough memory so no need for the apps2sd.
[G1 Android Development] Kllian:
thank you!
[G1 Android Development] Jrbourque:
i got the wrapper on there and still getting same errors
[G1 Android Development] serialtoon:
????? What do you mean not an option? I think you simply dont know what you are doing. Copy ADB and its dll into the system32 folder. Heck throw in fastboot too and guess what....you can adb into your phone from anywhere. Also, if you need a 64bit driver, Google released an official one with the 1.5 sdk. People make too much excuses for stupidity.
[G1 Android Development] twistedumbrella:
I forgot the stupid su command in the beginning. Considered it understood. Plus the -a will solve omiting directory errors.
[G1 Android Development] supremeteam256:
Just use GParted on Ubuntu (linux live cd). It's the easiest thing out there.
[G1 Android Development] diaztradeinc:
Idk if i did this right but here's what i did....I adb pushed the 3 files in scripts, and ran the .bat rebooted and Rosie has no lags!! hopefully that's all i had to do if not let me know.

PS: Rosie is sick Haykuro you are the freaking man! :D
[G1 Android Development] Kllian:
To get rosie.apk to your computer (for windows atleast) do the following.

C:\>adb pull system/sd/app_s/Rosie.apk c:\

Next we remove Rosie.apk from the sdcard

C:\>adb shell

#cd system

#cd sd

#cd app_s

#rm Rosie.apk

#exit

Now we install Rosie to internal memory

C:\adb install Rosie.apk
[G1 Android Development] twistedumbrella:
Yup, that was all there was... The bat had all the other stuff done
[G1 Android Development] bestwebs:
Hi,

Great post FunBacon by the way.

Red highlight:

You can add contact pics via gmail from your computer.

This is broke on the hero builds still, but that is a workaround.

:)
[G1 Android Development] funbacon:
I don't think so. apk file still on ext2 partition :))
[G1 Android Development] diaztradeinc:
Nice! Thanks Twisted Rosie is faster then ever thanks to you. :D
[G1 Android Development] MarcusMaximus04@gmail.com:
I've seen some people saying they used unionfs in the Hero build but that seems unlikely to me. Can someone who has it working pm me a printout of a

su

busybox df -h

run from the terminal emulator? I want to see if unionfs is really there or not.
[G1 Android Development] guinoak:
ln

ls /system/app just a simlink to /system/sd/app_s ?

# ls -l /system/app
lrwxrwxrwx root root 2009-06-01 14:17 app -> /system/sd/app_s
[G1 Android Development] chief2842:
Thanks after applying the wrapper this worked about to reboot the phone.
[G1 Android Development] doubleokneegro:
hey twisted?

If i have my app_s on my ext2 partition, hero on running and working, followed the steps to replace and remove the HTC_ime, camera, launcher, etc.. and have setcpu clocked at 528..

it runs fast and stable...

is it recommended to apply ur scripts and run the .bat? (if i want a more "peak" performance right?)

just making sure this wasnt for people that couldnt get Rosie up and stable..

thanx
[G1 Android Development] Buster3616:
Anybody working on a quick fix for the led notification (charge/ text) ??? Haykuro mentioned something about it a while ago but I lost it.
[G1 Android Development] twistedumbrella:
Just something I need to get off my chest before I go to work:

@Haykuro:

"**** the leechers and their supporters"? Then **** you for leeching from HTC and I guess nothing good ever came from having some time with a pre-build before the release was official. I mean it's not like someone would have a mod ready to solve the lag...
[G1 Android Development] savethechicken:
You really shouldn't have to change the name of the HTC_IME.apk to HTC_CIME. I had to do a reboot after enabling the touch input to get this working, but works great. I just followed the steps in the first post.
[G1 Android Development] slackberry:
Is anyone able to fix the lack of landscape while text messaging? That would be awesome!
[G1 Android Development] pixel-painter:
Thanks a good tip, seemed to give a slight performance boost loading Rosie from internal mem.

to make it a tad easier.......instead of

C:\>adb shell
#cd system
#cd sd
#cd app_s
#rm Rosie.apk
#exit

try this as a single line ;)

adb shell rm /system/sd/app_s/Rosie.apk
[G1 Android Development] subguy812:
Issue I could not find a solution for....I have a2sd on ext2 and was able to extract app_s.zip no problem but when I try to run the hero mod I get error Can't chown/mod /system/xbin ...any ideas. The rest of the process no problems. Tried to search...
[G1 Android Development] chief2842:
Rosie is still force closing along with everything else any solutions?
[G1 Android Development] kevincerna990:
I installed Haykuro Hero Rom Squished Version but its too big n I dont have much internal memory...is there a way to make the rom smaller n have at least 20 or 30 mb of internal memory????
[G1 Android Development] Thegovernor:
can anyone tell me if this rom supports wifi tethering.... also does this rom keep root? thanks.... im a noob....
[G1 Android Development] BrumBrum74:
Now it says:

# cp -a sdcard/mods/bin/* system/bin/

cp -a sdcard/mods/bin/* system/bin/

cp: write error: No space left on device

I know I have space left. Over 40mb.

What am I doing wrong now?
[G1 Android Development] Nismo300zx:
boot looping / black screen

okay so ive pretty much tried to set this up everyway possible and it always ends up the same. i start off with a freshly formatted and partitioned sd card and then proceed to copy the app_s folder (unzipped of course) to the ext2 partitions then i continue on to wipe and then apply the update but no matter what i can not get this rom to start up and ive been following all the instructions to the teeth i have a tmobile g1 with the latest radio and spl update with a 4gb class 6 sd card...im going crazy here plz some body help or point me in the right direction this is the only time ive had a problem like this..thanks
[G1 Android Development] DMaverick50:
im in the same boat. i have 9mb after install id love just 8-10 more. theres gotta be a way to delete things like teeter, exchange, chirp and some widgets. wish i new more about this stuff...
[G1 Android Development] bestwebs:
Hi,

If we are using apps to sd, doesn't this still install it back to your sd card?

Fun said it did.

In before hero builds, you would do this:

adb remount

adb push Rosie.apk /system/app to get it on the phone memory.

Anyone know if this will still work on haykuro hero?

:)
[G1 Android Development] diaztradeinc:
Anyone having problems with market downloads?
[G1 Android Development] AbsoluteDesignz:
I don't know much about this stuff, but I was thinking the same thing...I really hope one of the more knowledgeable devs can figure something out...

thanks guys.
[G1 Android Development] subguy812:
Also, I can get beta 4 to run...but I receive the error when trying to install this new rom
[G1 Android Development] Six6Sicks:
terminal directions?

Can someone post the directions to do this via terminal please? I'm at work and can't adb right now and honestly I'm not patient enough to wait another 6 hours to get home. There was a previous post in this thread with some brief directions to do this via terminal but I need a little more help. Thanks.
[G1 Android Development] mikedmeyer:
Since /system/app is symlinked to /system/sd/app_s it will just go right back where you removed it from.
[G1 Android Development] Gameloft:
Tried it, didn't work
[G1 Android Development] rjwisniewski:
I'm assuming you could use this thread: http://xdaforums.com/showthread.php?t=521251

It explains how to delete exchange and some other things to increase space/speed.
[G1 Android Development] thefarleft:
do

adb shell ls -l /system/sd

you should see something like this (possibly among things):

drwxr-xr-x root root 2009-06-01 11:57 app_s

if you instead see something like this (that first part is what i'm referring to):

drwx------ root root 2009-06-01 11:57 app_s

you must do this

adb shell chmod 755 /system/sd/app_s

adb shell chmod 755 /system/sd/app_s/*
[G1 Android Development] chief2842:
Anyone know the fix to stop Rosie from force closing, I can't move the screen from right to left with it force closing?
[G1 Android Development] wwwhershcom:
thanks, that helped a little.

maybe i'll see more of a difference after playing with it a little.
[G1 Android Development] mikedmeyer:
removing the unneeded launcher.apk helps rosie run a lot more smoothly:

rm -r /system/app/launcher.apk

(and if you created odex files for everything) rm -r /system/app/launcher.odex
[G1 Android Development] chief2842:
Could this be why Rosie keeps force clsoing do I need to put it back on my internal memory?
[G1 Android Development] RaiderX303:
i just moved Rosie.apk to /data/app so its in with normal apps
[G1 Android Development] rich0:
The swapon command on android apparently doesn't like file-based swap. A solution is:

losetup /dev/block/loop3 /data/data/swapfile

mkswap /dev/block/loop3

swapon /dev/block/loop3

This is a pretty typical way of implementing swap in a file. Note that file-based swap is going to be a little slower than swap to a direct partition.

16MB is really a drop in the bucket - when I did this there was an initial slowdown but I suspect that was from the system immediately swapping to clear out RAM. I suspect that unless you have at least 50MB of swap it won't do too much. However, I guess every little bit helps.
[G1 Android Development] mexicanojared:
G1 Overclocking!

I wonder if over-clocking the hero build is a good idea?? Maybe use 'Open Overclock' or 'SetCPU'!!

I believe the setting would be:

Max: 528

Min : 384

Default speed is:

Max :384

Min :248
[G1 Android Development] wizern23:
The widgets that take up the whole screen seems to make it lag and force close more often while the medium and small ones don't.

when i set up my apps to sd i copied the app_s folder into the app folder. i don't know if this actually did anything but i haven't experienced that many force closes.
[G1 Android Development] Nismo300zx:
okay when i typed that in i got "drwxrxr-x root root"

so im guessing its something else maybe?..i really want to get this working
[G1 Android Development] ivanmmj:
Does the new ROM require the new SPL? There seems to be no mention on that.

When I try to install it, I get the following error:

E: Can't shown/mod /system/xbin (No such file or directoy)

E:Failure at line 12:

set_perm_recursive 0 2000 0755 0 6755 SYSTEM:xbin

Installation aborted

Is this trying to set permisions to all the system, including the symlink linking to my sd card? (I installed the second set of files there before flashing.)
[G1 Android Development] Senorkabob:
Reflash a different OS version, then go back and reflash Hero? Maybe your update.zip was corrupt
[G1 Android Development] chief2842:
Thanks but I do not have either in the system/app folder
[G1 Android Development] wizern23:
it helps greatly. it still lags a little but the overall time that it takes to come back has increased.
[G1 Android Development] mhsbrian:
Got it to boot with a little adb work.
[G1 Android Development] funbacon:
I want to fix Gallery. Video seek bar doesn't work.
[G1 Android Development] cyanogen:
I was just looking at compcache. It might be useful on a device like this. I will test it out tonight and report back :)
[G1 Android Development] ccpp0:
with following steps to create loop device as swap space.

#dd if=/dev/zero of=/data/swap0 bs=1024 count=30720 # here we create a 30M zero file under /data

#losetup -f # check the first available loop device, here assume that is /dev/block/loop0

#losetup /data/swap0 /dev/block/loop0

#mkswap /dev/block/loop0

#swapon /dev/block/loop0

#free # check Swap line.

i've made two swap files, /data/swap0 and /cache/swap1 , totally have 46M
[G1 Android Development] chief2842:
Thanks everyone I am reflashing because I am getting too many force closings.
[G1 Android Development] AbsoluteDesignz:
I'm pretty sure he's referring to people like HardDaez...but anywho...

Can you start a separate thread or add on to that [Tutorial] Lets fix our Hero build thread with clear step by steps on how to get this optimization done?
[G1 Android Development] DAKIDD236:
i went into a bootloop after i did this, still trying to fix:confused:
[G1 Android Development] thefarleft:
indeed, something else... do

adb logcat

when it's looping the log may clue you/us in to what's wrong.
[G1 Android Development] psjames:
I tried a wipe and then did not set up the exchange client and still not "google" view?
[G1 Android Development] subguy812:
Same error I am receiving...I have A2sd on ext.2 and was able to unzip app_s.zip with no problem but I get the same error
[G1 Android Development] Buster3616:
I tried twisted's script and might have screwed up on my end. I ran the bat file first (worked fine, no errors) then i went to download gscript from market and i got an install error, tried several different apps from the market and same thing. any ideas?
[G1 Android Development] emms007:
Yes it definitely requires the new SPL.
[G1 Android Development] diaztradeinc:
Ok i've downloaded an app from market, then tried to get the apps2sd app now market wont work. Anyone else having issues with market?
[G1 Android Development] jl1030:
im stuck with the HTC Camera part

i typed in terminal emulator

rm -r system/sd/app_s/Camera.apk

cp your_HTCCamera.apk_direction system/sd/app_s/

reboot

i managed to remove the old camera apk, but can't seem to get the new one on...now i have no camera:confused:
[G1 Android Development] namsir:
did you try to push the gallery from saphire to hero? i couldn't find it anywhere....if i found it i would try it.
[G1 Android Development] diaztradeinc:
I'm having the same exact issue. :(
[G1 Android Development] subguy812:
I ran the beta4 with no problem...
[G1 Android Development] Kllian:
I did this and havnt see any problems yet.
[G1 Android Development] Gameloft:
here what i did.

# dd if=/dev/zero of=/data/swap0 bs=10

dd if=/dev/zero of=/data/swap0 bs=1024

30720+0 records in

30720+0 records out

31457280 bytes transferred in 23.532 s

# losetup /data/swap0 /dev/block/loop0

losetup /data/swap0 /dev/block/loop0

losetup: /data/swap0

# mkswap /dev/block/loop0

mkswap /dev/block/loop0

Setting up swapspace version 1, size =

mkswap: lseek(1024): Invalid argument

an error occurs
[G1 Android Development] BrumBrum74:
I'm also having trouble installing apps after applying twisted's script. Downloads ok, but will not install.
[G1 Android Development] alapapa:
this seems to work...

noticeably faster