yashsingh1/xdaforums huggingface dataset:
[Touch CDMA Android Development] SuperJMN:
USB implementation

I don't know if this has been discussed, but I consider it a bug to dig into, since it could be the reason for some other features to fail:

When I have my Polaris (running Android) plugged to my PC's USB cable and I power it on, it just doesn't boot up, the BIOS screen remains there forever. As soon as I disconnect my Polaris, the PC continues to boot.

It seems like the USB client is not well implemented, since it completely blocks my PC. It produces other undesirable behaviors, like some USB disks not refreshing, and blocking their files.
[Touch CDMA Android Development] scooter1556:
This is just a limitation of some BIOS', most modern BIOS' have usb legacy support which means they can boot from flash drives etc, the phone causes it to hang because it thinks it is a removable drive and tries to load it which fails. I have seen many cases where printers, scanners etc.. have also caused this and i'm not sure it is rectifiable in the kernel.
[Touch CDMA Android Development] SuperJMN:
Well, although you might be right, I have a reasonable doubt about it because I tried to plug in in several stages of the boot:

one of the most surprising hanging/blocking is when the Windows 7 logo is about to glow (the 4-colored rounded flag on a black background). At this part of the boot, I have managed to completely block my PC if I plug in my Polaris to the USB cable. The Windows logo pauses the glowing, the hard disk stops its operations and it just freezes. As soon as I remove it, the booting continues as if my device caused some kind of an infinite loop that lasts until I disconnect my Polaris.

This is also true when I try to install drivers for it: Windows tries to setup the drivers for it, but the process never completes. It seems that the USB implementation is lacking some functionality the produces those failures.

I observed that it makes other USB devices malfunction. When it's connected, my Xbox360 Gamepad sometimes doesn't work. All the problems disappear when I disconnect my Polaris.

It's strange, but I swear that it's not my computer, but a behavior that is present in every kernel I tried (.NBH). I don't remember if it happens the same booting from HaRET.

Please, check it out.
[Touch CDMA Android Development] grktaurus83:
All of a sudden my status LED is solid green at all times and the back button, pin hole reset, and volume up keys are not recognized...

Any idea what might cause this?

I'm using the latest version of everything on Super Froyo RLS 11 on a Vogue.
[Touch CDMA Android Development] scooter1556:
I agree this needs work and it would be great to have all usb functionality working properly. It is strange that the phone causes other devices to stop working for you. The only thing i can think of there would be a power issue because the phone is draining the limited power divided up over the usb ports to charge the battery. This may be an issue, especially if using a hub. I'm still not sure that anything in the kernel will stop your booting problems as so many devices cause this. If i try booting with my e-sata hard drive plugged in ubuntu won't boot and the BIOS fails to detect the device so hangs. If any usb device is plugged in whilst windows boots it causes an interrupt which disrupts the boot process and if it can't deal with the device it will hang. Be interesting to get some other views on this but i have never had any issue using adb with my phone plugged in through usb using ubuntu and it hasn't caused any other devices to fail when plugged in. I have had issues booting with it plugged in though, but i've always had this issue as far as i can remember.

I'd love to see the USB storage function work on my Kaiser. It seems to work fine up until the SD card is remounted after unplugging from USB. It says it is preparing the card but then says that i have inserted a 'Blank Card' so i have to reboot the phone. Still, Eclair wouldn't even allow me to transfer files so it's a step in the right direction.
[Touch CDMA Android Development] ThomasHW:
On the phone last night, I noticed it was echoing everything I said. I installed the latest kernel recently, and it wasn't doing it before. Is this something wrong with the kernel?
[Touch CDMA Android Development] samjam:
I get that from time to time on my windows mobile. It might be an effect of the mobile network or the remote phone. Is it persistent?

Sam
[Touch CDMA Android Development] WnG88:
Don't know if this is a Kernel issue. I just updated to 26-07-10 from 05-07-10, when doing an install of incubus rls 12 and after installing (cleared dalvik, and deleted data), on first boot after install, doesn't find sd card. Odd because it installed the system. Once in android, says sd card file system not recognized, or blank sd card.

I put the sd card into my computer, and its corrupted. I redid the whole thing including formatting the sd card and it gets corrupted again after installing the system and rebooting.

Went back to 07-05-10, and everything is fine again.

EDIT: Tried again with 26-07-10, except this time once it booted into android and didn't recognize the sd card, I pulled the card and formatted it in windows and reloaded the card into the phone, and the phone recognizes it.

EDIT: Can't post a log since the SD card trashes every time. I'm willing to try another debug log approach if someone can guide me.

EDIT: Forgot to post that I update rom from the SD card in boot loader (512mb card FAT32).
[Touch CDMA Android Development] samjam:
When I first installed (system and data to NAND) it trashed my SD card and I lost many GB of data. As a consequence it was unable to finish the install as it had also trashed the install tar.

I had to re-partition and reformat my SD card and after that it was fine.

I wondered if it was because I chose to erase the data (recommended) and because the data wasn't already on the NAND (but was going to be) it assumed that the data was currently on the flash and so trashed the flash.

Sam
[Touch CDMA Android Development] dzo:
In case you've been wondering what I've been up to recently, I've spent the last few weeks porting the kernel to 2.6.32. It's been lots of work and it's not finished yet but it does boot.

This is what I have so far:

http://androidhtc.git.sourceforge.n....git;a=shortlog;h=refs/heads/htc-vogue-2.6.32

The audio crashes sometimes, BT doesn't work and Power Collapse doesn't always resume, so it's not yet usable but is getting there. I'll let you know when it's working better.
[Touch CDMA Android Development] Prowess:
dzo, your intensive labor is well appreciated!
[Touch CDMA Android Development] zenulator:
Great work dzo. I appreciate all the time and effort you put into this.
[Touch CDMA Android Development] kallt_kaffe:
I totally agree with the previous writers. I'm a bit curious what kind of advantages we can except with a newer kernel? One I know and that is that we hopefully can use the latest compcache version but I suppose there may be more?
[Touch CDMA Android Development] WnG88:
Phew! Thanks for the update! Was starting to think you'd moved on to a newer phone!
[Touch CDMA Android Development] samjam:
Thanks dzo.

With the current kernel, my keyboard lights stay on until I slide back the keyboard. I guess they should be timing out like the dpad lights time out.
[Touch CDMA Android Development] pentagramII:
Dzo, is there any chance to get a test 2.6.32 kernel? :)

Thanks m8
[Touch CDMA Android Development] kallt_kaffe:
New kernel is a bit larger so compiling tinboot.S fails. I just want to see if the Froyo built in Wifi tethering works with the new kernel. With the old kernel I get some iptables errors that I suspect may just be that it expect something that was added in later kernels.

Any hint on what I need to change in tinboot.S to try the kernel?
[Touch CDMA Android Development] dzo:
Just compress the initrd with lzma (and enable lzma initrds in the kernel) and it should fit.

The new kernel has problems with kaiser though, you'll probably need to change disable_irq to disable_irq_nosync in the kbd drivers.

I've been using kexec to test it so you could use that instead.
[Touch CDMA Android Development] mssmison:
spread the word.

http://xdaforums.com/showthread.php?t=757788
[Touch CDMA Android Development] 79bass:
Thanks for this work.. I was looking around for something like this a a couple of week ago and than I found this last week.. gorgeous!

I have tested it on my Kaiser.

I've changed disable_irq to disable_irq_nosync in board-kaiser-keypad.c and now the system doesn't freeze (it's seems so). I can't get touchscreen to work even if I have compiled in ts2003, vogue touchscreen. and the combination of the two (one on other off and so on...).

I had a try with msm_ts but it doesn't compile at all.

It seems that the battery management is improoved, with older kernel I had a battery 15% now.. even if I know it was charged, and the new kernel gives me the exact value :).

sound works, dial out works. You have still a lot to do, and I'm sorry I can't help you in coding... but I feel the device really improved...

thanks again!!
[Touch CDMA Android Development] l1q1d:
same problem on polaris, with disable_irq_nosync doesn't freeze but ts doesn't work :-(

good news: It is faster then ever :-)
[Touch CDMA Android Development] kallt_kaffe:
If you have a setup for compiling Froyo you could try reenabling this: http://androidhtc.git.sourceforge.n...;hpb=7a643f1521b303505977df875b0698860ad877f0

Hopefully the new kernel will work better with the Froyo tethering.
[Touch CDMA Android Development] l1q1d:
i'm going to try it when ts (touch screen) will work, polaris hasn't keyboard and so it's totally unusable :-(
[Touch CDMA Android Development] kallt_kaffe:
I think we also need to recompile wlan.ko for this kernel. Got "Error" when I tried enabling Wifi.
[Touch CDMA Android Development] kallt_kaffe:
btw, where can I find the sources for the wlan module?
[Touch CDMA Android Development] deadpig:
I use git://android.git.kernel.org/platform/system/wlan/ti.git
[Touch CDMA Android Development] kallt_kaffe:
Thanks, I'll give it a try.
[Touch CDMA Android Development] 79bass:
:( I was hoping it was just a metter to compile a linux module...doesn't like all this apk.

Will wait to test further when wifi and ts will be working.

Does anybody confirm my feeling about the battery (on Kaiser at least).

Also other modules are loaded right now with .25 ramzswap xvmalloc lzo_compress lzo_decompress.

We would also recompile other modules in /system/lib/modules and I can't find them in the kernel tree... everything is in the wlan git repo?

thanks ;)
[Touch CDMA Android Development] kallt_kaffe:
Attached new wlan.ko (not tested, yet)
[Touch CDMA Android Development] kallt_kaffe:
Do NOT enable compcache with the new kernel just yet. We should be able to get the newer compcache version to work with this kernel. Until then, avoid compcache if you try the new kernel.
[Touch CDMA Android Development] deadpig:
1) Go into folder sta_dk_4_0_4_32

2) make CROSSCOMPILE=<android-sdk-tools-dir> KERNEL_DIR=<kernel-dir> ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
[Touch CDMA Android Development] kallt_kaffe:
Seems enabling Wifi gets stuck now with the new wlan.ko instead of getting Error. But I did try it with a build that had Wifi tethering enabled so that may have caused some problems.

But as long as the touchscreen is not working it's a pain to try to do anything. It seems to be the more or less the same ts2003 driver is used with very little modifications and I can't really find out why it only works on Vogue.

These lines have been added, maybe it could provide some clues?

snprintf(ts->phys, sizeof(ts->phys),
"%s/input0", dev_name(&client->dev));
...
input_dev->phys = ts->phys;

Maybe client->dev isn't reporting the same thing on Kaiser/Polaris or maybe it does but it should report something else? (Yes, I'm just guessing blindly...)
[Touch CDMA Android Development] dzo:
I've got the new kernel working quite well now, it boots fine on at least vogue and kaiser and the ts should now work on kaiser.

I'm not going to release a binary because if you can't compile it then you probably shouldn't be using it.

There will be things that don't work, BT doesn't work with the new firmware but it does with the old one so change texas to texasalt in sysinit.rc if you need bluetooth.

Remember to do make vogue_defconfig before building to get the latest config.

Let me know how you get on and post any kernel panics here.
[Touch CDMA Android Development] kallt_kaffe:
Touchscreen confirmed working on Kaiser.

DOH! Oh, well, it booted without doing it but I'm going to recompile and reflash.

Wifi doesn't start but I haven't tried with the new wlan.ko yet. I'll let you know how it goes.
[Touch CDMA Android Development] l1q1d:
Touch screen works also in polaris :-)

i recompile by myself wlan.ko and install on system but crashes...

[ 445.778024] mmc0: new SDIO card at address 0001
[ 445.783664] TIWLAN: Found SDIO controller (vendor 0x104c, device 0x9066)
[ 445.790994] TIWLAN: Driver initialized (rc 0)
[ 445.791128] ------------[ cut here ]------------
[ 445.791223] WARNING: at drivers/mmc/core/sdio_ops.c:130 mmc_io_rw_extended+0x8c/0x1e8()
[ 445.791261] Modules linked in: wlan(+)
[ 445.791403] [<c002caa4>] (unwind_backtrace+0x0/0xe0) from [<c005313c>] (warn_slowpath_common+0x4c/0x68)
[ 445.791486] [<c005313c>] (warn_slowpath_common+0x4c/0x68) from [<c01c740c>] (mmc_io_rw_extended+0x8c/0x1e8)
[ 445.791563] [<c01c740c>] (mmc_io_rw_extended+0x8c/0x1e8) from [<c01c85dc>] (sdio_io_rw_ext_helper+0x150/0x190)
[ 445.791631] [<c01c85dc>] (sdio_io_rw_ext_helper+0x150/0x190) from [<c01c8684>] (sdio_memcpy_toio+0x20/0x28)
[ 445.792449] [<c01c8684>] (sdio_memcpy_toio+0x20/0x28) from [<bf05369c>] (SDIO_SyncWrite+0x44/0x70 [wlan])
[ 445.794019] [<bf05369c>] (SDIO_SyncWrite+0x44/0x70 [wlan]) from [<bf052f74>] (export_wifi_chip_id+0x40/0x1d4 [wlan])
[ 445.795376] [<bf052f74>] (export_wifi_chip_id+0x40/0x1d4 [wlan]) from [<bf081104>] (init_module+0x104/0x14c [wlan])
[ 445.796103] [<bf081104>] (init_module+0x104/0x14c [wlan]) from [<c0027378>] (do_one_initcall+0x58/0x19c)
[ 445.796184] [<c0027378>] (do_one_initcall+0x58/0x19c) from [<c007bb84>] (sys_init_module+0xc0/0x1f0)
[ 445.796253] [<c007bb84>] (sys_init_module+0xc0/0x1f0) from [<c0027e60>] (ret_fast_syscall+0x0/0x2c)
[ 445.796294] ---[ end trace c315ded83ff56180 ]---
[Touch CDMA Android Development] kallt_kaffe:
Touchscreen in Android works fine but behaves a bit strange in the installer. If I press down like 4 times, then press the center, then it will go down once more and on the next tap it will activate my choice. It's like the tap uses the last position instead of the new one.

Looks like the same errors that I get on my Kaiser (with a freshly compiled wlan.ko)
[Touch CDMA Android Development] dzo:
The new kernel seems fairly stable now so I've put a zImage and Vogue NBH on the website. It should work fine with an existing Froyo system.

You should only use this if you wouldn't be upset if the kernel crashed!
[Touch CDMA Android Development] Leryan:
Thanks Dzo for your work.

Just installed new ndh on Pola100.

Two things that i am using daily not working:

- vibration (not for start, not for typing. Calls not checked yet)

- WiFi

- when phone waked up with power button, sometimes i got a mirrored image on the screen. Colors are also a bit different :)
[Touch CDMA Android Development] samjam:
Will a kaiser nbh follow?
[Touch CDMA Android Development] dzo:
Just use loserskater's NBH editor to turn the vogue NBH into a Kaiser NBH.
[Touch CDMA Android Development] samjam:
Can I use a hex editor or does it have to be the nbh editor - meaning too many changes to the boot strings?

Well I see enough NULL padding, so i guess I can use a hex editor and just grab the strings from the kaiser nbh
[Touch CDMA Android Development] samjam:
Well I'm giving it a go with the new image (sync changes I hope) and data back on Nand.

Also using: Appbrain (http://appbrain.com/) to help install my favourite apps (as I re-flash so often) and some of these: http://lifehacker.com/5616299/lifehacker-pack-for-android-our-list-of-the-best-android-apps
[Touch CDMA Android Development] samjam:
hang while installing

I got a UI hang while installing some apps, used the USB cable to get logcat (attached) seemed to be in an infinite loop restarting apps
[Touch CDMA Android Development] dzo:
I've seen this before and I'm fairly sure it's not the fault of the kernel. I'll take a look at the bionic futex code since this is where it's crashing.
[Touch CDMA Android Development] mt1976:
zImage-2.6.32-froyo-24-08-10 and Haret

Hi dzo,

I have used this zImage-2.6.32-froyo-24-08-10 for a test with haret on my Kaiser Tytn II. But it doesn't boot in the installation menu.

These are the last lines, before it hangs:

[1.763788] msm_rtc msm_rtc.0: setting system clock to 2010-08-24 14:19:03 UTC (1282659543)
[1.776286] set sdcc vdd to 16

And this is my default.txt:

#alloctest 0x2000

set RAMSIZE 0x08000000

set RAMADDR 0x10000000

set FBDURINGBOOT 0

set MTYPE 1553

set KERNEL zImage

set initrd initrd.gz

#

# The following kernel parameters are useful

# ppp.nostart	- Set ppp.nostart=1 to disable starting the ppp connection on boot

# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller

# pm.sleep_mode - The mode used when the phone is off

# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,

# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt

# Default is 1, use 1 for best power savings

# board-htckaiser.panel_type - Panel type used to power the panel off and on

# 0=Don't power off the panel (Default)

# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)

# lcd.density - Defaults to 160, 128 shows more on screen

#

set cmdline "ppp.nostart=0 pm.sleep_mode=1 mddi.width=240 mddi.height=320 no_console_suspend board-kaiser-keypad.atttilt=4 board-htckaiser.panel_type=1 hw3d.version=1 board-kaiser-battery.battery_capacity=2700 board_htckaiser.pmem_size=4 board_htckaiser.pmem_adsp_size=1 clock-7x00.a11=500"

boot
[Touch CDMA Android Development] dadevil666:
managed to install the new kernel properly this time :P

wifi doesn't work

vibration works

seems stable for now

can't install new apps to check if it crashes / hangs during the installation due to no data plan and no working wifi connection(hope it will be fixed in the near future)

Thank you DZO for all your hard work bringing back life to our Kaisers and all other phones :)
[Touch CDMA Android Development] Barogi44:
Just something i have noticed is that while using both system and data on nand, if i keep my sd card in the phone it becomes sluggish over a period of time and also has poor battery life.. but if i take it out and restart the device then the phone is much much more responsive and i get much better battery life! Perhaps its only because my sd card is a 4gb class 2 and it causes it to slow down? Either way i now take the card out when im not using it. :)
[Touch CDMA Android Development] wondercow:
New kernel panic

I also am having trouble with the zimage version of the new kernel on my Vogue. I get a kernel panic before it even gets to the "hold down volume up for menu" phase. A bunch of text scrolls by really fast, and I am left with this on my screen:

[2.322598] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[2.330876] [<c002bb18>] (unwind_backtrace+0x0/0xd8) from [<c0274714>] (panic+0x58/0x130)
[2.339148] mdp_dma_to_mddi: busy
[2.342078] [<c0274714>] (panic+0x58/0x130) from [<c0008d6c>] (mount_block_root+0x258/0x2a8)
[2.350223] [<c0008d6c>] (mount_block_root+0x258/0x2a8) from [<c0008f48>] (prepare_namespace+0x128/0x180)
[2.358490] [<c0008f48>] (prepare_namespace+0x128/0x180) from [<c0008440>] (kernel_init+0xe0/0x114)
[2.366691] mdp_dma_to_mddi: busy
[2.369530] [<c0008440>] (kernel_init+0xe0/0x114) from [<c00278dc>] (kernel_thread_exit+0x0/0x8)
[2.377781] Rebooting in 3 seconds..

It doesn't actually reboot, though. The dmesg, exports, and bootlog.txt files on my sd card don't seem to indicate any panic, though.

Is there a certain version of default.txt or initrd.gz I should be using?

Thanks for all your hard work.
[Touch CDMA Android Development] Prowess:
We'll just have to patiently wait. I'm getting the same issue here as well.
[Touch CDMA Android Development] czar_au:
Dumb question... but can someone please enlighten me as to what features this new kernel has?
[Touch CDMA Android Development] samjam:
You can see a list of them here: http://androidhtc.git.sourceforge.n....git;a=shortlog;h=refs/heads/htc-vogue-2.6.32
[Touch CDMA Android Development] alexinc:
nobody mentioned yet, that camera isnt working with latest kernel and everything on nand... just get greenish screen, which becomes the picture, when taking a shot. (pola200) as already written, wlan not working... but all in all froyo with that kernel feels much snippier!!! :)
[Touch CDMA Android Development] samjam:
Buitl-in camera app works, but I had problems with another camera app showing greenish interlaced effect like you say.

WLAN works, but less well than before; which is to say I get periods of no communication even though the status bar reports WLAN as connected. Also, sometimes, it fails to get DHCP (same reason probably) - but mostly works for me.

Sam
[Touch CDMA Android Development] alexinc:
whats your device then?

i tried latest froyo with new and older kernel and more than once... on pola200 both isnt working for sure with latest kernel! ;) older kernel works with the above programs.
[Touch CDMA Android Development] samjam:
With the new kernel, it hangs a lot when using gps.

Attached is a logcat and traces.txt, I can easily get more.
[Touch CDMA Android Development] Leryan:
One day of usage -> battery behaves strange:

- charges very fast

- also battery life is also less than 10 hours (no wifi used, no gps used, no mobile data used)
[Touch CDMA Android Development] t1mman:
Anyone getting issue in apps that said SD is unavailable?

Using latest DZO's build and latest kernel, it says no sd in camera apps and Trapster :S
[Touch CDMA Android Development] dzo:
That's good, you will need to find out which gpio or cpld inputs it uses for the buttons and make a titan machine type. The keyboard probably works something like the kaiser one.
[Touch CDMA Android Development] uiucryan:
And here I was hoping to get some sleep tonight!

Thanks Martin!!!
[Touch CDMA Android Development] zeo2k:
Great Find!
[Touch CDMA Android Development] zeo2k:
My question is, what is the purpose of that curtain-like thing you can drag down from the top of the screen. If you dont know what I mean, drag your finger from the top taskbar where the clock is located down to the bottom of the screen.

Also is there a way to make "Street View" work on the Maps app?
[Touch CDMA Android Development] uiucryan:
I know the 'curtain' will at least store notifications. Like if you get an SMS message, or GTalk message, it will put an icon on the bar on the top and have details in the 'curtain'.

I also wanted to mention that I updated the AndroidGeeks.net wiki entries for the the Vogue and Titan. They sure could use some love though...

http://www.androidgeeks.net/wiki/HTCTitanPort

http://www.androidgeeks.net/wiki/HTCVoguePort

Martin is a g-d! :)
[Touch CDMA Android Development] zeo2k:
Thanks for the wiki! Can someone explain to me how to install apps and games?
[Touch CDMA Android Development] unsungboxer:
I have followed the instructions, unzipping the entire file to my storage card (not into any subfolders).

When booting from my xv6900 using a 6GB memory card. Booting fails every time saying it is unable to mount storage card.

When booting from my 2GB card, booting is successful.

Any thoughts?
[Touch CDMA Android Development] qwho:
I bet android or haret does not yet have the ability to support sdhc cards. 2gb is regular microsd, where 6gb is a microsdhc card.
[Touch CDMA Android Development] lennysh:
Hmmm... doesn't seem to work with my 4gig, and it is a SDHC. Sheesh... I'll never be able to run it on my titan. :D
[Touch CDMA Android Development] Grondinm:
can't wait to try this one out....hopefully my sdcard will work...great work dzo