PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Apache (http://forum.ppcgeeks.com/forumdisplay.php?f=14)
-   -   Android on the apache walkthrough (http://forum.ppcgeeks.com/showthread.php?t=51666)

pio_masaki 01-03-2009 07:08 PM

Android on the apache walkthrough
 
First off, read the primary thread, here http://forum.ppcgeeks.com/showthread.php?t=43753
Special thanks to the posters in the primary thread for helping this along, and especially tekkdrone for doing the hard work. All credit goes to him, and whoever he gives credit to.

My Android+Apache guide, slightly more detailed in terms of time, not just "wait for awhile".

*update* new video at the bottom.

Copy the files provided here
http://chillaxin.net/?page_id=268

Copy them to your SD card, just like this:

SD/Android/haret,initrd, zImage, startup.txt
SD/android.rootfs.tar.bz2, *android.img
*SD/AndroidApps

Capitals matter to Linux. Capitalize that A in your Android directory.

*notes*
*android.img- created on your first boot, this should not be messed with and left where it is.
*SD/AndroidApps-this is created by you for your programs. Android on the apache is not far enough along to utilize this yet, you can leave it out. Your Android programs will go here once supported.

After all of that is created/copied, check and double check your file extensions. If downloaded in IE, the files with no extensions will have .txt added. Make sure to check that your file extensions are visable. In explorer (not IE) go to Tools>Folder Options>View tab>Advanced settings, find the check box for Hide extensions for known file types. Uncheck this. Click ok, then browse back to your SD card (if using active sync explore, close the window then re open it). Make sure the file extensions are how they should be:

In SD/Android you should see:
haret-0.5.2.exe (or whatever version you use)
zImage
initrd
startup.txt

In SD/ you should see
android.rootfs.tar.bz2

Yes, that .bz2 is important. Remember, linux cares about what is capitalized and what is not, zImage is a capital I not lowercase i or L. Users of AS will notice nothing changed if you changed the extensions, press back, then go back into the window. It won't update your screen unless you reload it. F5 should work, too.

Now the crappy finicky stuff is done, you should be ready for your first try at booting android!

I personally do a soft reboot to clear out the system memory, once that is all done (unplug the USB cable so AS doesn't fire up on reboot) you can run haret one of two ways, you can use your file browser of choice and run it from SD/Android, or my way, I created a shortcut in start>programs so I wouldn't have the file manager running when I launched haret. Up to you, just personal choice. I normally "overclock" however I disable this when I plan to run android.

First off, make sure you are NOT plugged into the PC, it will stop haret from booting, getting stuck at jumping to kernal. Power doesn't seem to do it, just the USB to the PC.

Once you launch haret it's just a wait until it does something, if anything. If it works the way it should, you will see haret launch, a short progress bar, then a black screen with:

jumping to kernal- This message should be around about 2 mins, if it's sitting there for over 5 then it hung.

Then it spouts off a bunch of spam system messages, nothing you should care about until it stops and you see:

creating 100M root file - This should be around for about 3 mins, this is dependant on the SD card speed, it could take more like 5 mins, any longer then 8 is probably a hang. I use a corsair, and it takes about 2 mins for me. Next you see some more spam, then:

Populating root from /sdcard/android.rootfs.tar.bz2 - This should take about 5mins. Again dependant on the card you use, I would give it 5-8 mins before thinking it hung. Anything past 10 mins is a hang. Next you see more spam then:

Booting Android...with a short warning about legacy support of rild, not an issue, this should be about 1 min.

ANything past 4 is a hang. Next you see:

Android start screen *animated* approx 1 min, much more then 3 is a hang. Next is...

Android main screen, what our Today screen is for android. The screen is locked on start, pressing the Menu key (windows key) unlocks the screen.

Welcome to Android. Windows key is menu, OK button is back.

If you run haret and the screen doesn't go black with the first message about jumping to kernal or gives an error at that stage, double check your initrd and zImage files for errors, no extensions or anything like that. If you get a white screen, use the other Haret here http://chillaxin.net/downloads/2.6.25-longbow/haret.exe

If it hangs up at the stage it should say creating 100M root file, check your initrd and android.rootfs.tar.bz2 files for errors in spelling and extensions.

If it hangs where it should say populating root from...then check your android.rootfs.tar.bz2 for errors in spelling and extensions.

If it just doesn't work, and everything looks right, soft reset then try again, sometimes it just doesnt work for some reason, once it took me 3 reboots without changing a thing to get it to run, then it just ran fine like nothing was wrong.

After your first succesful boot you will have a new file in your SD/ directory, android.img. Once this is created you can choose to delete the android.rootfs.tar.bz2 file as android.img is creaded from the 100M file it created and then populated with the files contained in android.rootfs.tar.bz2. I leave mine there as I tend to mess around with it alot and have to redo it often. The android.img is a loopback image that the linux kernal (android) uses for its data, so any changes to this file may render it useless and must be rebuilt from the beginning. For those familiar with linux (not me) you can mount it as an ext2 partition and then add or subract from it as you please, it should be fine. Windows users, I am not aware of any way to modify it as windows won't utilize ext2 partitions, you would need a linux live cd, or in other words, a linux installation on a cd, boot from this and you can boot linux without interferring with your windows installation, similar what we do with android on the phone.

I can't offer help in this as I'm not real familiar with the method, I do however have a knoppix live cd. Try to find one via google or even torrent sites.

Any other help needed I would be glad to offer my assistance, the more we get on board with this, the more likely we are to get a nearly fully functional android os for our phones, the vogue already has one, we need one too!

I'll be making a video of the entire process from haret's launch to android "desktop" so you can get a better feel for the times and what to expect to see. Don't think you can read the screen, it's hard even with it an inch from my nose, it will not show up on video. Video is approx 9 mins. http://www.youtube.com/watch?v=RilNAk48fZc

Video of second boot is up, this has haret, zimage and initrd on phone memory, android.img on sd root http://www.youtube.com/watch?v=sB9cVU4DDHI about 3:30 with some playaround time in it.

Remember to pop a thanks my way if this helps you out :)

dennygun 01-03-2009 10:32 PM

Re: Android on the apache walkthrough
 
pio, when i try to run haret, then pop up the message "MTYPE Undefined", why?

pio_masaki 01-03-2009 11:50 PM

Re: Android on the apache walkthrough
 
Haven't seen that one yet, does it do it in WinMo or on the black screen where it would normally say jumping to kernal?

My files may be slightly outdated, I will go download the files and see what happens.

Ok I downloaded everything again, set it all up like I normally do, just how I have it above, and it worked fine.

Check your startup.txt, Haret will spit that out if theres no set MTYPE command, though for some reason the startup.txt provided on the site lacks it, and it works fine on mine, there have been reports of it NOT working and giving that error on Moguls. Make sure you have no other installation or files for android on your SD card, delete them all and try again. If not, in the startup.txt enter set MTYPE 1667 above set KERNEL zImage, so its like this:

set com "1"
set MTYPE "1667"
set kernel "zImage"
set initrd "initrd"
set cmdline "root=/dev/mmcblk0p2 mem=64M rootdelay=3 boot_delay=0 console=ttyS0,115200n8 console=tty0 fbcon=rotate:0 androidboot.console=ttyS0 android.checkjni=1
bootlinux

And see what it does.

osyrus 01-04-2009 01:03 AM

Re: Android on the apache walkthrough
 
wow this is awsome

pio_masaki 01-04-2009 04:20 AM

Re: Android on the apache walkthrough
 
Thanks for the vote osyrus!

BTW, if you want android to fly through its bootup, you can put the Android folder on your SD card on your phone memory as well, it takes about a hair over 2 MB. The biggie files, the android.rootfs and the later android.img remain on your SD card. May be safer to suffer the longer times and run it from your SD card, then move your android folder over AFTER it creates android.img.

pio_masaki 01-05-2009 01:39 AM

Re: Android on the apache walkthrough
 
Oh, anyone with linux knowledge, could you look into shrinking the image this creates to something smaller? I would but I don't have linux, don't know how to use it even if I did have it. While I can extract the files from it, I can't actually manipulate it in any way, like removing or adding, it treats it like a CD image.

tekkdrone 01-05-2009 08:10 AM

Re: Android on the apache walkthrough
 
Don't worry pio, I changed the filesystem format quite a bit in the future builds, the next release will have a totally different image layout to mimic the layout used by Android (separate data and system partitions, etc) And thanks for taking the time to do a writeup. I have only one small request, can you edit your links to show http://chillaxin.net/ instead of http://esc180.midphase.com/~chillaxi/ ? It's not a security concern but when my host moves my account to another server (as they did last month) All the old links will be broken unless they point to the chillaxin.net domain instead of the direct webhost server address >_< Thank you! :)

-tekk

pio_masaki 01-05-2009 04:55 PM

Re: Android on the apache walkthrough
 
Okie links to your site have been updated, hopefully they won't show dead links next month ;)

yotoad 01-06-2009 11:06 AM

Re: Android on the apache walkthrough
 
ok so i'm hung up on the Jumping to Kernel screen . . . third time so far, no progress beyond that. any tips?

yotoad 01-06-2009 11:53 AM

Re: Android on the apache walkthrough
 
ok it just booted! incredible. just moved everything to the phone's memory (not the .img file) -- a lot faster than the first boot. so, now what do i do? :)


All times are GMT -4. The time now is 02:19 PM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0