yashsingh1/xdaforums huggingface dataset:
[Wing, P4350 ROM development] darkstar62:
I don't have it available quite yet -- still trying to work out the remaining kinks with the touchscreen.

All I did to get cupcake working was to download the sources from Google and build it. Then I copied the contents of the <build_root>/out/target/generic/system to my device and tweaked the init.rc to align more with what they had in <build_root>/out/target/generic/root.

As for the kernel, I've attached the latest one, along with the /etc/pointercal file that goes with it. You'll need that to use the touchscreen in GPE. Just point your default.txt at the new kernel to boot it (you'll need to copy in pointercal to your /etc directory in Linux before you can use the touchscreen there). If you've got SSH access to your phone from Linux, it's as easy as:

scp pointercal root@10.100.0.1:/etc

Otherwise you might want to use a card reader and copy it from Linux on your computer.

I *think* android 1.0 should work with the updated touchscreen driver, but I don't know -- haven't tested it.

- d
[Wing, P4350 ROM development] expone:
Hmm. I have already touchscreen support on GPE with your package "wing-linux 0.2". Also the keyboard is working nearly correctly.

However, once I start, android crashes by pressing some key - I have been reported it.

As a no linux expert - I can't understand why the touchscreen and keyborad works on GPE and not under Android.

According my knowledge, driver will compile in the linux kernel. But we use the same kernel for both surfaces (GPE/Android) over HARET, or not?

When it true, it must imply that android knows the correct driver for keyboard and touchscreen, or not?
[Wing, P4350 ROM development] darkstar62:
Yeah, the key crash in Android is still an issue. I think we're missing a mapping from our keyboard to Android's key layouts. Haven't worked on it yet though.

Yeah, the touchscreen is a weird beast with Android. What works beautifully in GPE and everywhere else in Linux causes headaches for Android. It depends on the driver giving very precise events (like pen-up and pen-down at the right moments, along with device coordinates in the correct scale) that things like tslib (which GPE uses) can calibrate around. So basically, we have to calibrate the touchscreen driver to android, not the reverse which to me would make more sense...oh well.

Yeah, the same driver is used for both GPE and Android -- changes we make in the touchscreen driver have little effect on GPE (other than requiring a new pointercal file -- easily generated with the ts_calibrate program...which I just realized isn't distributed in WL-0.2...oops).

- d
[Wing, P4350 ROM development] ivanmmj:
I wonder if that's because Android doesn't use styluses. It probably expects a screen that doesn't require a stylus or alignment.
[Wing, P4350 ROM development] darkstar62:
That would seem to mesh with what I've found online. The synaptic capacitive touch screen that's used in the G1 doesn't need to be calibrated. Makes life kinda hard for those of us with resistive touch screens...:)

- d
[Wing, P4350 ROM development] expone:
Perhaps, the following article is able to help us?

http://www.kandroid.org/android_pdk/keymaps_keyboard_input.html#androidKeymapKeyLayoutMapTitle
[Wing, P4350 ROM development] darkstar62:
Awesome, that should help a LOT! All kinds of good stuff in there. I'll have to take a look, it doesn't specifically mention touchscreen drivers, but their input sample driver is close.

Great find, expone!

- d

[EDIT: Added the link to the wing linux wiki homepage]
[Wing, P4350 ROM development] expone:
Perfectly!

I had the page already found long ago, before this topic. But then, I couldn't find it again. But know, they can help us, I hope so ;)

It is too a great chance for noobs like me, in context of linux development. It could be to help me to get a understanding of linux and driver development.

Finally: You, darkstar, hat now the task develop a full supported android for my wing. let's go!
[Wing, P4350 ROM development] darkstar62:
It works...!

Go here:

http://www.youtube.com/watch?v=2aakZoAmHJg

Then go here:

http://dl.getdropbox.com/u/198699/linux_wing/wing-linux-0.3pre1.zip

- d
[Wing, P4350 ROM development] ivanmmj:
ohhhh you rock!

Any changes to the display driver, though? I wonder if the white issue is still there...
[Wing, P4350 ROM development] darkstar62:
Sadly, I think it probably still is there. You can try the kernel alone if you'd like -- maybe there's something changed.

http://dl.getdropbox.com/u/198699/linux_wing/zImage34

I've put working that issue on hold for now, since I don't have access to a device that does that (and it's really hard to debug problems you're not personally having :)) I think there's probably still a weird initialization happening in one of the chips, but I've taken people through all the settings I can think of, and nothing seems to help, so I'm kindof at a loss for what more to try.

On your device, when you boot, does the screen fade to white like mine does initially, and then just stay there?

- d
[Wing, P4350 ROM development] neoobs:
Just so you know the build.prop file in the boot.img now has a way to change screen sizes (I think it is screen sizes or DPI)
[Wing, P4350 ROM development] ivanmmj:
I don't have an SD card set up to try that ATM. I'd have to wait until later on today. On another note:

I have a few optimizations for you to try:

A better dalvik vm from the Ion build.

And read about Odex files. Read the whole thread.
[Wing, P4350 ROM development] neoobs:
two very good threads. I have been trying to make dream roms by merging two roms. I have yet to flash my herald but that is my next task this week. Maybe I will see what I can do.
[Wing, P4350 ROM development] ivanmmj:
The RAM and ROM size will be an issue, but I can try to help as much as I can.

I might not know as much as you about linux but I am starting to learn a lot about android having an android phone myself.
[Wing, P4350 ROM development] Fenopy:
It fades just like yours, but instead of flashing and having a bunch of rolling text, mine flashes a brighter white (like full brightness) and stops there (the phone also starts making a very high pitched noise).

This is just using Haret loader RAR you uploaded.
[Wing, P4350 ROM development] expone:
Unfortunally, when I using the package wing-linux 0.3 pre 1, my phone boots only with GPE.

I use the default default.txt with start-command-last-number 5 - for android.

The boot need a lot of more time. In GPE I enter the both commands:

fixbacklight

startAndroid

Now, I can see the text message "android" on screen. After this, on the console I get for six time the message failed.

Then, I am on the console user login...

Whats happen?
[Wing, P4350 ROM development] darkstar62:
Yeah, that's my bad. 5 = GPE, 4 = Android, 3 = Text.

You should eventually see the Android startup logo the way you did it though -- just gotta wait a bit.

- d
[Wing, P4350 ROM development] expone:
Maybe I have something wrong words.

I had used the default "default.txt" with number 5. Ok, you has write a wrong definition. It's not Android but it is GPE.

That was not the main problem. After starting GPE, I was in the terminal and has try to start Android (command: startAndroid). My phone was leaving GPE mode and had try to boot Android.

During this step, the phone is leaving the graphical mode and enter in to text-mode of "Angström-Linux". Before I get the login mask again, I get the error message "failes." for six times.

I believe the start script is corrupt for this version.

Thats to this try in the past.

------

After your reply I has tried to start Android directly by changing default.txt. I had set the number to "4".

Now, after a lot of text-state-messages, I see the "Angröm" bootscreen. It was overpainted by Android-Starting-Script and the text-message "Android_".

After over 5 minutes on this screen, the phone seems to be switched off. Power on/off button has no effect. Display is off. It was need to press soft-reset button to enable again the power button and to start Windows Mobile.

Is this problem known? And is there an Solution? When I has some time, I will repeat this last step SSH-Connection to see more information, perhaps.

Thanks a lot to your work. Best regards,

expone.
[Wing, P4350 ROM development] darkstar62:
Ok, here's some detail about how all this works. The "Failed" messages you're seeing are because the script repeatedly tries to unmount /android/sys, as android's startup will try and mount it (on top of the replacement we added). The "Failed" messages are it saying that it isn't mounted, so they can be safely ignored.

As to the screen shutting off after 5 minutes, yeah, the screen has a 5 minute timeout to go into power saving. You should be able to get it out by hitting any key.

The distribution I sent out has an empty /android/data directory, so Android has to rebuild all the data there on boot. It takes a while (not sure how long, been a while since I did it, but probably a good 5 minutes at least). Rest assured your phone is working and doing everything properly.

When you did the startAndroid from GPE, there's some commands to change the terminal. That change no doubt brought you to a text login. That's OK, Android should be booting in the background.

Moral of the story, you're doing everything right -- just give it some time to start. A first boot of Android without the /data directory can take some time, but after that it should be much quicker.

- d
[Wing, P4350 ROM development] expone:
Unfortunatly, after six hours in the night, Android was not booted up. It stay on the text-logo "Android_".

Any Ideas?
[Wing, P4350 ROM development] darkstar62:
Could be something is crashing...

Try this:

Boot into Linux using runlevel 3 (console mode). Then attach your phone to your computer and log in with SSH. This'll help you observe what's going on.

Post the output of the following commands:

# ls /android
# mount
# cat /bin/start_android
# cat /android/android.sh

Run "start_android" from your SSH session. You should start to see log information go by. My guess is that you'll also start to see Java exceptions or other errors. Let it go for a little while (until you start to see errors, maybe after 3 minutes or so) and copy/paste the data that was put to your console here (from as far back as you can -- might be helpful to adjust your scrollback buffer to be as long as possible).

Good luck, lemme know if any of that is unclear.

- d
[Wing, P4350 ROM development] expone:
Ok, I wwill try it in the next hours. Need now to works sth.

Where are you from, darkstar? You reply me around the clock ;)
[Wing, P4350 ROM development] neoobs:
OK this is so horrible, but I just noticed that the thread title is a little decieving.

I googled

http://www.google.com/search?q=Andriod+for+Herald

and

http://www.google.com/search?q=Tmobile+Wing

LOL now what? LOL
[Wing, P4350 ROM development] Kuuf:
So, it has been I while since I've posted here but I didn't have much time.

Last few days I've been trying to boot the new versions, but still no luck for me, I've still the white/blank screen.

I do have got a working linux from Gizard or something.

I can boot en can even start the interface. But I couldn't mount my partition with android, and so I couldn't try to boot it.

Then I've been playing around with the zImage en default.txt and so, trying to boot the wing zImage34 with the working default. But no luck.

Also, Gizard has (had?) no ssh, so couldn't really do anything.

Atm I have some time so I will keep trying.

Also, I will have an iPhone in August (I'll start working then, and the company gives me one) so I'll probably use my Herald (yes it's a herald, no wing) for Android testing only :-)

Maybe darkstar is something with the fact that I can boot (a) linux ...

(for solving the whitescreen info for some people)
[Wing, P4350 ROM development] Saew:
Sometimes Android boots just fine, other times I get the Android_ logo and I go back to my terminal.

Below I've posted the logs of what happens when android fails to boot.

root@htcherald:~$ ls /android
android.sh etc sdcard
bin init sqlite_stmt_journals
cache init.goldfish.rc sys
data init.rc sys_dev
default.prop proc system
dev sbin

root@htcherald:~$ mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,errors=continue,data=ordered)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/root on /dev/.static/dev type ext3 (rw,errors=continue,data=ordered)
tmpfs on /dev type tmpfs (rw,size=2048k,mode=755)
/dev/mmcblk0p1 on /media/mmcblk0p1 type vfat (rw,sync,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1)
/dev/mmcblk0p3 on /media/mmcblk0p3 type ext3 (rw,errors=continue,data=ordered)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /var/volatile type tmpfs (rw)
tmpfs on /dev/shm type tmpfs (rw,mode=777)
tmpfs on /media/ram type tmpfs (rw)

root@htcherald:~$ cat /bin/start_android
#!/bin/sh

#if grep -q /android/dev /proc/mounts; then
# true
#else
# mount --bind /dev /android/dev
#fi

#if grep -q /android/proc /proc/mounts; then
# true
#else
# mount --bind /proc /android/proc
#fi

if grep -q /android/sys_dev /proc/mounts; then
true
else
mount --bind /sys /android/sys_dev
fi

chvt 3
chroot /android /android.sh &
chroot /android /system/bin/logcat
kill_android
chvt 1

root@htcherald:~$ cat /android/android.sh
#!/system/bin/sh

export LD_LIBRARY_PATH=/system/lib
export ANDROID_BOOTLOGO=1
export ANDROID_ROOT=/system
export ANDROID_ASSETS=/system/app
export ANDROID_DATA=/data
export EXTERNAL_STORAGE=/sdcard
export DRM_CONTENT=/data/drm/content

export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event1
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_COINFFILE=/etc/ts.conf
export TSLIB_PLUGINDIR=/usr/lib/ts
export LD_PRELOAD=/usr/lib/libts-1.0.so.0:/usr/lib/ts/pthres.so

/init &
/system/bin/sleep 2

/system/bin/umount /sys
/system/bin/umount /sys
/system/bin/umount /sys
/system/bin/umount /sys
/system/bin/umount /sys
/system/bin/umount /sys
/system/bin/umount /sys

#/system/bin/app_process -Xzygote /system/bin --zygote &
#/system/bin/dbus-daemon --system &
#runtime

And this is what I get when trying to run android:

root@htcherald:~$ start_android
Unable to open log device '/dev/log/main': No such file or directory
killall: logcat: no process killed
[1] Terminated /init
killall: vold: no process killed
failed.
failed.
failed.
failed.
failed.
killall: servicemanager: no process killed
failed.
killall: app_process: no process killed
killall: system_server: no process killed
killall: installd: no process killed
killall: mountd: no process killed
killall: mediaserver: no process killed
killall: rild: no process killed
[Wing, P4350 ROM development] neoobs:
Just out of curiosity does adb work?
[Wing, P4350 ROM development] expone:
OK, there are the wished information.

File: output__ls_mount_cat_cat.txt

----

Output of the posted commands.

File: bin,start_android.txt

----

Copy of /bin/start_android

File: android,android.sh.txt

----

Copy of /andrid/android.sh

File: output__start_android.txt

----

Output of command "start_android". During this command, I get console putput in a loop. Same messages has repeated.

Can you work with this information?
[Wing, P4350 ROM development] expone:
adb?

PS: I think I have the same result as Saew....
[Wing, P4350 ROM development] neoobs:
I have a funny feeling only darkstar can answer that.

ADB is to connect to Android for developers. It lets you see the android log on your computer in real time and would help figure out the problems.

I am actually going to flash my wing to android (if you consider it flashing) today/tomorrow and try to help all of you out since I am pretty fluent in android for the G1.
[Wing, P4350 ROM development] Kuuf:
Nice neoobs! :-)
[Wing, P4350 ROM development] Kuuf:
So, I've been able to boot GPE too now.

Using linwizard first and by formatting the gpe/android partition as ext2, apparently, linwizard doesn't support ext3. Pitty.

But when I run startAndroid, I first get "segmentation fault /init", and than also 6 times "failed". A few seconds later I got another error, regarding usb0 and than it stops. Nothing more happens (and yes, I waited a while).

I guess I should first try to fix the segmentation fault.

Any idea darkstar? Maybe android needs ext3 or something.
[Wing, P4350 ROM development] darkstar62:
Which kernel are you using? If it's one of the linwizard kernels, I think theirs doesn't have the Android patches. The "failed" messages are OK -- that's it trying to make sure the /android/sys filesystem stays emulated and doesn't actually get mounted as a real /sys filesystem (needed until we get proper power management).

- d
[Wing, P4350 ROM development] darkstar62:
That's interesting...Where did you get the kernel for that? Maybe everyone having white screen problems should try that...If it fixes it, there's no doubt something in that kernel that ours doesn't have that could fix it.

OK, that looks like the contents of /android/dev are wrong -- there may be a problem with the image I posted. I'll go back and check.

In theory, yes, but the kernel would have to be rebuilt with USB support set to Android Debug (currently it is an ethernet gadget). I just use SSH + logcat to see log messages (specifically, chroot /android /system/bin/logcat).

Yeah...Looks like your /android/data directory might not have good permissions.

Try these commands:

# chown -R root:root /android
# chmod 755 `find /android -type d`
# chmod 644 `find /android -type f`

If that doesn't work, post the output of the following command:

# ls -l /android/dev

- d
[Wing, P4350 ROM development] Kuuf:
You're right, it's a bad kernel.

I've found a kernel able to boot android now, one bad thing, it boots the android of the given android-initrd in default.txt

I'm playing around now to be able to boot your android fs.

I'll keep you posted
[Wing, P4350 ROM development] expone:
It doesn't work. I will try to set up completly new by using your installation tutorial on wing-linux 0.3 pre1-package.

It is wrong to set persissions to 777 on / recursivly?

(Naturally, on a productive system, this is a security problem. )
[Wing, P4350 ROM development] darkstar62:
Yeah, that's dangerous. Things *might* work, but I'd expect it to be even more broken with that. Some programs won't operate if they see permissions like that.

- d
[Wing, P4350 ROM development] ivanmmj:
This is where he probably got gizzard from:

http://xdaforums.com/showpost.php?p=2508370&postcount=5
[Wing, P4350 ROM development] darkstar62:
The link in that forum seems to be old. Here's a recent one:

<link removed -- It's not the kernel, looking for it>

Can everyone who's having white screen problems go and try the linwizard kernel above? You'll need to use their default.txt to boot it. Don't worry about trying to get into the system itself -- we just need to see if the screen is readable when it comes up.

- d
[Wing, P4350 ROM development] darkstar62:
Kuff, can you post a link to the kernel you're working with? I'm having trouble finding it.

Thanks

- d
[Wing, P4350 ROM development] Kuuf:
http://xdaforums.com/showpost.php?p=2156270&postcount=28
[Wing, P4350 ROM development] darkstar62:
Sweet, thanks.

I've got a new kernel up to try too:

http://dl.getdropbox.com/u/198699/linux_wing/zImage35

I noticed earlier linwizard kernels didn't have some initialization code for the framebuffer that initially turns it off...I tested removing that code from our kernel, and I get the early framebuffer messages much longer, but then the main framebuffer kicks in immediately -- no white screen period.

So, give this one a try. If it doesn't work, you might try Kuuf's kernel (use MTYPE 1229 for that one in your default.txt, otherwise it definitely won't boot).

Good luck, and lemme know if it works.

- d
[Wing, P4350 ROM development] Fenopy:
Here is zImage34 & zImage35 w/Log Files

http://rapidshare.com/files/239779890/zImage.rar.html

Here is w/Kuuf's Image (Which seems like it was working?!?!)

http://rapidshare.com/files/239782449/KuufImage.rar.html

-OR-

http://www.megaupload.com/?d=86GU6BLO

Kuuf Image Log:

HaRET(5)# bootlinux
boot KERNEL=Image INITRD=
Opening file Image
boot params: RAMADDR=10000000 RAMSIZE=04000000 MTYPE=1229 CMDLINE='debug quiet psplash=false loglevel=7 root=/dev/mmcblk0p3 init=/sbin/init console=tty0 video=omapfb:accel 5'
Boot FB feedback: 1
Built virtual to physical page mapping
Allocated 616 pages (tags=50B00000/10f79000 kernel=50B01000/10f7a000 initrd=50D64000/111dd000 index=50D64000/111dd000)
Built kernel tags area
Built page index
Video buffer at 48900020 sx=240 sy=320 mx=60 my=53
Video Phys FB=20001020 Fonts=111df064
preload=2264@50D67000/111e0000 sj=50D67000 stack=50D65000/111de000 data=50D66000/111df000 exec=111e0128
Reading 2498840 bytes...
Read complete
Launching to physical address 111e0010
Trampoline setup (tram=136@000241C0/080241c0/105651c0)
MMU setup: mmu=AC3A0000/103a0000
Go Go Go...
[Wing, P4350 ROM development] darkstar62:
Awesome post, Fenopy! Those videos are really helpful -- it looks like the problem lies squarely in the framebuffer initialization code -- the last line seen is right before FB init.

Very interesting that Kuus's kernel works with your phone. I looked at it, and it was built circa April 23rd 2008. Looking through the Linwizard commit history, that is right around the time some changes were made in the frame buffer code to do de-init and re-init at startup. That kernel appears to be before that code was introduced.

Give this kernel a shot:

http://dl.getdropbox.com/u/198699/linux_wing/zImage36

I played a bit with the init code and modified some of the configuration flags. If you could take another video with it, that would be awesome too. :)

- d
[Wing, P4350 ROM development] Fenopy:
We still get a white screen... :'(

http://rapidshare.com/files/239817861/VidzImage36.rar.html

Uploading Video Now... Damn you slow UL...

HaRET(5)# bootlinux
boot KERNEL=zImage36 INITRD=
Opening file zImage36
boot params: RAMADDR=10000000 RAMSIZE=04000000 MTYPE=1232 CMDLINE='debug quiet psplash=false loglevel=7 root=/dev/mmcblk0p3 init=/sbin/init console=tty0 video=omapfb:accel 5'
Boot FB feedback: 1
Built virtual to physical page mapping
Allocated 415 pages (tags=51800000/11cba000 kernel=51801000/11ccb000 initrd=5199B000/11b1f000 index=5199B000/11b1f000)
Built kernel tags area
Built page index
Video buffer at 48900020 sx=240 sy=320 mx=60 my=53
Video Phys FB=20001020 Fonts=11b1d064
preload=2264@5199E000/11b1c000 sj=5199E000 stack=5199C000/11b1e000 data=5199D000/11b1d000 exec=11b1c128
Reading 1675280 bytes...
Read complete
Launching to physical address 11b1c010
Trampoline setup (tram=136@000241C0/1a0241c0/107a91c0)
MMU setup: mmu=AC3A0000/103a0000
Go Go Go...
[Wing, P4350 ROM development] darkstar62:
OK...Try this:

http://dl.getdropbox.com/u/198699/linux_wing/zImage37

This one has the de-init code completely disabled, which is what I think Kuuf's had. Should that not work, try this one:

http://dl.getdropbox.com/u/198699/linux_wing/zImage38

This one has the de-init code enabled, but some printk() calls to dump out the contents of a crucial register. I want to see how it compares with what mine gives. You'll more than likely need to SSH into your phone and capture the output of the 'dmesg' command to get that. If you can redirect the output to a file and send me that file, that'd be great:

On the phone:

# dmesg > /tmp/dmesg.txt

Then on your computer:

# scp root@10.100.0.1:/tmp/dmesg.txt .

(Sorry if you already know how to do this.) Don't worry about taking a video this time, I think we're about as far with that as we can get. Huge help that, by the way.

- d
[Wing, P4350 ROM development] Fenopy:
Linux hates my wireless card... So I am loading a virtual machine w/Ubuntu 9 right now.... Waiting for it to download...
[Wing, P4350 ROM development] Kernel Jag:
I've toiled with kernel programming and have coded on UNIX internals (took a course in uni), I've two hands and soon I'll have lots of spare time!! Only prob, I've a Herald that I use as my main phone :(

Would it possible for us to get hold of an OMAP850 emulator, maybe create one using QEMU? Would certainly speed up our dev..