yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] xsacha:
Ok, I think I have USB working... USB ethernet isn't working though (usb0 won't show in ifconfig?).

I have to abandon my work so far because of exams and worsening eyesight (lookin at screen too much). I might pick it up in holidays.

I hope someone can pick up where I left in the meantime.

What needs to be done

1. That kernel on github and my git-fork of it simply will not work. It needs the android patches. I have a version (I will upload src) with the android patches (from android.git.linux.org). The one I got was 2.6.27 but 2.6.29 is best (I had to backport a lot of PXA3xx code from 2.6.29).

2. You need to patch the kernel for:

(a) PXAFB: The framebuffer needs to be patched to work with android. It is android-specific.

(b) TOUCH: Android demands the touchscreen input work in a specific way. Though the touchscreen is working, it is giving the wrong input. Android wants screen locations from /dev/input/input1

I hope someone can do these. Android boots fine for me except no graphics due to (a). It is stuck on Press Enter to continue...

Instructions for creating your own kernel from android.git.kernel.org or other bases

1. Extract your base kernel to somewhere like /home/name/ANDROID/

2. Edit Makefile to include your CROSSCOMPILER (first page of this topic)

3. Take my i780.c and put it in arch/arm/mach-pxa/ . This is the 'board'.

4. Edit arch/arm/tools/mach-type file so that the last line has:

Samsung i780 Mobile Phone as English description, i780 as lower case name, I780 as capitalised name, 2265 as machine ID

as per the arm.linux.org.uk machines listing

5. Set up the .config file so that it includes everything necessary (most noticably android relevant configs).
[Upgrading, Modifying and Unlocking] ilMessia:
Thanks a lot for your excellent job;)

I found the already extracted system.img, userdata.img and ramdisk.img and i followed the procedure described by you in post n#82. When i start haret i can see the word " A N D R O I D" but suddentely appears "kernel panic-not syncing: Attempted to kill init!" It' s normal because of the "not so finished" (that's my english...) porting or it's because i did something wrong?
[Upgrading, Modifying and Unlocking] xsacha:
Yes that is normal iMellisa. It is because porting is not finished and requires those fixes I mentioned above. I hope someone else will be able to do them.

However, it may also be due to you using the emulator image. I believe if you use a device image for ARMv5 instead of that emulator image from the SDK you can get it to boot. Though, without video (due to unpatched pxafb).

If someone can find a device image for ARMv5 it would be very helpful. androidonhtc.com has device images for ARMv6.

Download: i780 Kernel Source (55MB) [Click Download File on right hand side]
[Upgrading, Modifying and Unlocking] Ginger_Fish:
Can somebody please post some pics from the Android on i780, or some other Linux on i780.

It would be very interesting to see how it looks!

Kind Regards

.:]GF[:.
[Upgrading, Modifying and Unlocking] wongdg:
Pointers needed for installing debian on an i780

Hi, xsacha,

I am keen to learn from you the steps to get debian working on the i780. It's a shame of me that even I'm a computer system engineering graduate, there's still much to learn in the world of linux and at my time at uni 1991-1994 linux wasn't taught at the time and a few of us had to share 1 UNIX workstation. Much appreciated if you could give some pointers. It will significantly reduce my effort of searching the internet for resources.

I have been a debian user for the past 4 years but all installation have been on my amd64 desktops and my thinkpad notebook. So i have not had previous exposure when it comes to getting it onto a pda phone.

You said you managed to run debian on i780, was the phone function working too?

Best regards,

Wilson
[Upgrading, Modifying and Unlocking] xsacha:
Getting debian running is easy.

Steps for Method 1 (Partition)

1. Download my pack (Kernel + Haret + Default.txt) and put the files on your phones microSD card, eg. /Storage Card/Linux

2. Create an EXT2 partition on your phones card (you can use GParted to make this).

Partiton 1: FAT (WinMo) Partition 2: EXT2 (Linux)

3. Extract an armel debian rootfs (Here's one) to the ext2 partition on your microSD card.

sudo tar -xvf ~/Desktop/debian-lenny-armel-20081004.rootfs.tar.bz2

4. On your phone, run haret.exe and choose Run!

Steps for Method 2 (Initrd)

1. Download pack from above and an initrd of armel debian (need to make). Place all files on your phones microsd card, eg. /Storage Card/Linux.

2. Change initrd line in default.txt to point to armel debian one. Uncomment initrd line and second cmdline, comment out first cmdline. (I could just upload another pack with this done already).

2. Run haret.exe and choose Run!

Notes:

The kernel (Image) is from my post in May. It's the kernel from my github.

I have also included the latest kernel customised for Android (called zImage) as well, but it seems to kernel panic.

I have only tried console debian mind you. I guess Xorg can work on it too. Can try that :P.

Phone modem doesn't function yet (hasn't been priority)

Output:

Give root password for maintenance (or type Control-D to continue): root
lenny:~# cd ..
lenny:/# ls
ANDROID home opt srv
bin lib proc sys
boot lost+found root tmp
dev media sbin usr
etc mnt selinux var
lenny:/# cat /proc/cpuinfo
Processor : XScale-V3 based processor rev 1 (v51)
BogoMIPS : 415.33
Features : swp half fastmult edsp iwmmxt
CPU implementer : 0x69
CPU architecture : 5TE
CPU variant : 0x0
CPU part : 0x689
CPU revision : 1
Hardware : Samsung i780 Mobile Phone
Revision : 0000
Serial : 0000000000000000
lenny:/#
[Upgrading, Modifying and Unlocking] melgurth:
Hi

good thing (in my and tmzt opinion is gentoo) you can download it and unpack on ext2(3) partition as xsacha wrote.

http://tinderbox.dev.gentoo.org/embedded/linwizard/

I'm experiment with kernel from official android git (2.6.29 omap tree) with your latest patches and additons. Separating i780.c is good idea. Curently I'm building GPIOs (later IRQ) list with haretconsole. As far as I know it will help with developing kernel.

http://pastie.org/511819

I've noticed lately that in i780 service manual, in section describing chips used to build it there is plenty of GPIOS named by number and function. it may help a lot too.

I think that we should start cooperate. maybe together (with #htc-linux help) we can make something usefull. Long life linux!
[Upgrading, Modifying and Unlocking] xsacha:
Sounds cool. Change github to that android one please. I tried to rebase with android but rebased to wrong one (2.6.27). Latest kernel needed because it includes new pxa3xx stuff.
[Upgrading, Modifying and Unlocking] Ginger_Fish:
where can we download the *.img files (system.img, users.img ... )

Regards,

.:]GF[:.
[Upgrading, Modifying and Unlocking] ilMessia:
You can find them on the emulator but i don t know if the emulator ones are exactly the same as the phones ones
[Upgrading, Modifying and Unlocking] xsacha:
I tried the emulator ones and while it doesn't boot properly (stuck at Please press enter to continue), I'm not sure if it's because it's the emulator ones or just because you require video (patched pxafb) to continue.

Either way, we aren't going to be droiding until someone gets our pxafb patched.

We need a patch for

latest

kernel to allow pxafb to perform the double buffering required by Android.

Here is one such patch (for

2.6.26

): http://androidzaurus.seesaa.net/article/105551643.html

Here is the patch for omnia (for

2.6.29

): http://support-köhler.de/andromnia/download/file.php?id=22&sid=f104dfcb5adf513fc355d017cf77b3b8 (Not Tested)

Basically we need to multiply yres (vertical) by 2 (yres * 2) in pxafb.c and enable the panstep function for panning. It's not that hard. I just don't have a machine to do it on right now.
[Upgrading, Modifying and Unlocking] melgurth:
ok, I'll se what I can do ;)

I'll upload new kernel to new git when *something* moves forward.
[Upgrading, Modifying and Unlocking] xsacha:
I believe the omnia 2.6.29 one works! I patched my pxafb successfully :).

Should I upload a dump again? Cause I'm working on a merged 2.6.27/2.6.29 :\. I had to change (update) many files to get this.

If you just want the patch, use the patch command on the Omnia 2.6.29 one above.
[Upgrading, Modifying and Unlocking] xsacha:
UPDATE: I have booted Android on my i780. I have exam to do but I will give you all details later.

Need to work on touchscreen for Android (touchscreen works but not on Android)

MARK THIS DAY AS AN EPOCH! lol
[Upgrading, Modifying and Unlocking] ilMessia:
thanks a lot!!!!!!!!!!!
[Upgrading, Modifying and Unlocking] Ginger_Fish:
Iam so happy, i have tears in my eyes... :D

We have to format the SDcard as ext2, can you upload a zipped file from your sdcard and the haret config file?

Regards,

.:]GF[:.
[Upgrading, Modifying and Unlocking] xsacha:
You can use any of the many android rootfs' available. The emulator one works.

The haret and default.txt is the same too.

Change was in the kernel, perfecting it. I have to study for tomorrows exam too (4 exams in a row right now).

Oh by the way, teaser:
[Upgrading, Modifying and Unlocking] xjackassx:
you are a hero , thanx lot for your work :D
[Upgrading, Modifying and Unlocking] hapordigi:
that's very brilliant, thanks a lot, xsacha.

Expecting fully functional android image on i780. :)
[Upgrading, Modifying and Unlocking] wongdg:
Thank you

thanks xsacha for your kind guidance. But if I want to run the i780 entirely on debian I must find some way to "cook" the rom with all the appropriate linux packages right? First I will try the packages I want run off from the memory card. After finalizing the right mix, then I just cook the image onto the rom, right?

I have heard of the "cooking" apps in Windows its called "kitchen", is there any equivalent in linux world?

Best regards,

Wilson
[Upgrading, Modifying and Unlocking] Ginger_Fish:
You can say "cooX" and "cooXed" :D

For Example: "I will cooX a rom for the i780", "I have already cooXed a rom!"

:D:D:D

Kind Regards,

.:]GF[:.
[Upgrading, Modifying and Unlocking] wongdg:
Someone has step to cook android onto a polaris phone

http://xdaforums.com/showpost.php?p=2271238&postcount=73

are the steps the same to cook a armel debian onto the i780?

I need clarification on my doubt. Seems android has the gsm stack (phone functionality) and once cooked onto rom the phone will function both as pda and a phone. Does debian support the phone part too?

Regards,

Wilson
[Upgrading, Modifying and Unlocking] xsacha:
wongdg: You don't want to flash debian on to your device. You just want to boot it without touching your ROM. This is possible by using haret which stops WinMo and boots linux. My instructions to get a fully working debian are here (page 9).

Currently don't have GSM/GPS/Camera on i780 because don't have a driver for the chip responsible, msm6260(gpsOne)/rtr6275(radioOne).

(It's 3am and my exam is tomorrow :O. Studying hard :P)
[Upgrading, Modifying and Unlocking] MarkRain:
Wow!! I didn't noticed this thread, this would be the best gift for i780 users!! :)

Go on with it and...good luck for your exam!!
[Upgrading, Modifying and Unlocking] ilMessia:
When you have some spare time can you please upload all the necessary stuff (patched kernel, system files etc)?

Good luck for your exams too;)

Edit: Is the touchscreen working? I mean, we can only see the word "android" or we can play on a fully(obivusly without sms, call, camera etc) working android?

Re-edit: ok i now read some posts back that touchscreen is not working on android.
[Upgrading, Modifying and Unlocking] xsacha:
I have an exam 1:30pm tomorrow and then have a 3 day break. I'll upload everything in between then. Touchscreen driver is working but Android wants special inputs, so I need to translate it. I'll try to get it working before I upload.

Yes, it gets past the Android logo. It actually boots in to Android and has clock, dock and so on appear.
[Upgrading, Modifying and Unlocking] ilMessia:
WOW great information, thank you really really much and good luck for your exam;)
[Upgrading, Modifying and Unlocking] xsacha:
I don't have a linux machine right now so I can't do much. Need to fix something in pxafb so that it boots properly every time (some times it gets graphical glitches). So I'm just looking through code. I did work work on modem earlier. I'll just release whatever I have tomorrow. It's a bit boring without modem working though, no calls or sms :(.
[Upgrading, Modifying and Unlocking] katoda:
What happened to your Linux machine? :( Hope you'll fix it soon :). Great work xsacha!
[Upgrading, Modifying and Unlocking] xsacha:
I just haven't been at home.

I'm trying to fix a bug with the screen and power management. Here's a little teaser:

With flash

Without flash
[Upgrading, Modifying and Unlocking] katoda:
How do you think, will it be a lot of work to change the android's screen resolution to 320x320?

Anyway great work, waiting till you release a dev alpha build to boot android! :-).
[Upgrading, Modifying and Unlocking] ilMessia:
The photoes show a browser, you solved the touchscreen issue or you opened it in another way?
[Upgrading, Modifying and Unlocking] xsacha:
Yes the touchscreen works.

The only problem is that Android does NOT like 320x320 resolution. If you use 320x320, it will show the Android splash screen and then shut down.

The following resolutions work (and show Android): 320x240, 240x320, 240x400. These are the ones I've tested.

I seriously have no idea how to get around this. If anyone has any tips, please send them forward.

Or do you guys just want me to upload the kernel as it is (with sucky resolution)?
[Upgrading, Modifying and Unlocking] katoda:
Upload it as it is :). Uploading doesn't mean stop working on it, am I right? :-)
[Upgrading, Modifying and Unlocking] ilMessia:
Please upload the kernel: i can live with a 240x320 resolution until someone finds a solution;)
[Upgrading, Modifying and Unlocking] katoda:
--- Deleted
[Upgrading, Modifying and Unlocking] xsacha:
OK, well here it is:

I have uploaded two kernels. One is 320x320 (zImage320x320) resolution. I have uploaded just in case someone can get the right skin or whatever it needed. Maybe a newer version of android rootfs has the right 320x320 skin?

The other is 240x400 (zImage) resolution. This boots in to android but is hard to use because of the resolution.

Both included in zImage.zip (zImage + zImage320x320)
[Upgrading, Modifying and Unlocking] katoda:
How do we boot it?
[Upgrading, Modifying and Unlocking] xsacha:
Refer to here

If you already have Debian running as per my Page 9 description, simply replace Debian with Android OS files and replace the kernel with this new kernel.
[Upgrading, Modifying and Unlocking] ilMessia:
I have problems booting android (I still cannot boot it) can you please upload the whole contenent of your ext partition?

Edit: or your init
[Upgrading, Modifying and Unlocking] xsacha:
OK, by the way guys I have android booting in both 320x240 and 240x320. Which resolution would you prefer? I think android supports 320x240 best so I might go with that.

I will upload the full deal (ext partition + kernel and haret) soon.

Right now i'm trying to fix:

1. Inverted touchscreen

2. White vertical line?

Edit: I have decided to do 240x320 (Portrait) instead as it fits in more stuff. No more while vertical line.

Edit: I have worked out how to invert coordinates in touchscreen driver.

Now, trying to fix:

1. Everything is too large, I need to lower the DPI.
[Upgrading, Modifying and Unlocking] ilMessia:
Every resolution is good for me. Inverted touchscreen means you press on the right of the screen and android thinks you are pressing on the left or it's something else?
[Upgrading, Modifying and Unlocking] xsacha:
Yes that's right iMellissa. I managed to invert the x axis by changing the touchscreen driver.

Also, there were visual glitches on the screen. I learnt how to decode the LCD register (manually, i don't have the script) and found which bits were responsible for margins so I have that working now.
[Upgrading, Modifying and Unlocking] xsacha:
Here it is!

Steps

1. Partition your SD card to have an EXT2/3 partition and extract an Android RootFS on it. Here [22MB 7Z] is the one that I use. Emulator ones work too!

2. Download my Haret Pack[59KB TAR] (Haret.exe + default.txt) and place it somewhere on your SD card, visible to Windows Mobile (eg. /Storage Card/Android/).

3. Download my linux kernel (beneath) and place it in same directory as your Haret Pack.

Choose your weapon: Portrait[320 high, 240 wide] or Landscape[240 high, 320 wide].

4. Run haret.exe on your device and click Run.

What works

Android

Touchscreen

Keypad

LCD/backlight

Battery

SD card

Codec (but no sound, regs?)

Bugs

Right hand side of screen will be brighter in Windows Mobile after running Android (it goes away on reboot).

Margin glitch on Portrait mode (1 pixel on either side)

Everything is 'too big' (DPI needs to be lowered).

There is no 320x320 skin, forcing us to use 320x240 or 240x320.

If you let the device go to sleep (idle), it will die in power management.

Video

Here's a video of the first ever (unglitched) Samsung i780 Android boot ;)

On youtube.
[Upgrading, Modifying and Unlocking] katoda:
I can confirm -- it works! :)

But as far as I can see, there is no possibility to close running application. And clicking OK button turns the phone off and the only help is soft reset of the phone :(.
[Upgrading, Modifying and Unlocking] xsacha:
Yeah the keypad was mapped to weird values because we were using it for console.

Here's an updated landscape kernel with fixed up keymapping. OK should now quit an app. End Call will shut down.

By the way, default DPI is set too high, add this line:

ro.sf.lcd_density=120

to the /system/build.prop on your Ext2 partition.

Also, you may want to go into settings and disable Screen timeout and On-screen keyboard.
[Upgrading, Modifying and Unlocking] Ne0n4t3:
awsome job! keep up the good work :thumbsup:

I have a question... does the phone need to be pluged to power? when I first tried to boot android it didn't start, but then I pluged the phone on power and voila it worked :D
[Upgrading, Modifying and Unlocking] xsacha:
Power doesn't need to be in at all. Though, there is a battery driver and if your battery is under 30% or so, it'll say your battery is about to die.

I haven't had any problems with it though.
[Upgrading, Modifying and Unlocking] katoda:
I can't boot from this updated landscape kernel. I get "jumping to the kernel" and the screen freezes :(.
[Upgrading, Modifying and Unlocking] xsacha:
Does it freeze with the jumping to the kernel still on the screen? This means the kernel doesn't exist (or wrong mtype).

Or does the screen go black?
[Upgrading, Modifying and Unlocking] katoda:
The screen go black. Sometimes a strange white vertical lines appear on left side of the screen.

Portrait kernel works fine.
[Upgrading, Modifying and Unlocking] katoda:
--- Doubled post :/
[Upgrading, Modifying and Unlocking] xsacha:
Ok, well try this one. Hope this doesn't have black screen (works here).

So changes are:

Keys are fixed to work with android (back key, end call and so on).
[Upgrading, Modifying and Unlocking] katoda:
It works! :)

Anyway, I have to press a bit further down than the target appears to click it. Is it normal?
[Upgrading, Modifying and Unlocking] Ginger_Fish:
wow, thats really amazing! This project will change the i780 community. No one wait for the next Windows Mobile 6.5 or Windows Mobile 7.

No, they will wait for the next "Androi780" Version. :rolleyes:

Thank you very much.

With big respect,

.:]GF[:.
[Upgrading, Modifying and Unlocking] xsacha:
Thanks :)

Yes, because the touchscreen is 320x320 but I have had the fake the screen as 320x240, the physical touch positions do not map to the display.

I can scale the touch positions but really I hope that I can get this working fullscreen.

If anyone has any idea how to get this as 320x320 (maybe modifying android source code), it would help heaps! I hope future versions of Android support our resolution.
[Upgrading, Modifying and Unlocking] wongdg:
advantage of android?

xsacha,

since you have the experience of both debian and android, maybe you can give a comment or two.

I wonder what is the advantage of android on mobile over debian or vice versa. Is one easier to find driver? I understand android implements some kind of virtual machine concept much like java but is different. So one must code to run on top of the vm and no option to code up a native app, is that true?

Regards,

Wilson
[Upgrading, Modifying and Unlocking] MarkRain:
Thanks for the great work, i tried to start Android as you described but surely i do something wrong...

...the boot loads but i got an error...

Kernel panic - not syncing: UFS: Unable to mount root fs on unknown-block (179,2).

All i've done is:

-extracted the androidbootfs in an ext3 partition of the sd.

-Copied the haret.exe, default.txt and zimage to the fat32 partition of the sd.

-started haret.exe
[Upgrading, Modifying and Unlocking] katoda:
You have to make the ext3 partition as second primary partition, and fat32 partition as first primary partition.
[Upgrading, Modifying and Unlocking] Ginger_Fish:
Do you insert the zImage too the haret folder?
[Upgrading, Modifying and Unlocking] MarkRain:
Thanks both for the reply, maybe the problem could be this

i think i have the ext3 as first primary partition....

...gonna try :)
[Upgrading, Modifying and Unlocking] xsacha:
What katoda described is correct, the problem is you don't have an ext2/3 partition as the second partition on your SD card. Most likely, you made it the first partition.

Should look like:

1. FAT32 (Windows Mobile)

2. EXT2/3 (Android)

If you have it the other way around, you can just edit your default.txt to point to /dev/mmcblk0p1 instead of /dev/mmcblk0p2 in your cmdline.
[Upgrading, Modifying and Unlocking] hapordigi:
Great work, xsacha.

A little supplement, by copying haret.exe, default.txt and zImage to the phone memory, only one partition on sd card will also work. just modify default.txt as previous post.

Thanks again, xsacha~~~
[Upgrading, Modifying and Unlocking] MarkRain:
mmm maybe i'm tryng to do something bigger than me :D

I changed the first and second primary partition, but now i got another error:

Kernel panic - not syncing: no init found. try passing init= oprtion to kernel.
[Upgrading, Modifying and Unlocking] xsacha:
Can you confirm that your second partition has an init file in the root directory? That is, when you open your partition you can see an 'init' file.

Also, default.txt has init=/init in the cmdline?
[Upgrading, Modifying and Unlocking] MarkRain:
hey...i don't kwon why but in the ext partition there wasn't the init file!!

Now Android works thank you very much, i really appreciate your work!!

Hope to see soon a fullscreen working android on our beautiful i780!!

Thank you
[Upgrading, Modifying and Unlocking] ilMessia:
Xsacha:

have you tried running a different filesystem from the actual one (1.5 cupcake emulator, right?)?

I downloaded a g1 "rom", inside the update.zip there was a system folder but if i substitute our system folder with this new one, android doesn't want to start. I can see the ANDROID word in haret but i get an error (just like when you press the red button in i780 android)
[Upgrading, Modifying and Unlocking] Tumblitech:
I have the same problem like Mark, but I have init files in the root of my ext2 drive, and the default.txt correct also. Could you help me please?