yashsingh1/xdaforums huggingface dataset:
[XPERIA X1 Android Development] vdelf:
Damn, you beat me on creating backlight kernel! ;)

Can you set brightness from android settings, too? Because i found my error :o

Edit: i uploaded my kernel, too. Backlight turns off, and brightness control works.
[XPERIA X1 Android Development] dexteral:
Thanks to ALL

@angusmcb

tested and works with Android 2.1 wth HTC Sense :D

thanks

edit: thx to vdelf
[XPERIA X1 Android Development] katem:
@vdelf

-in WinMo put the "echo 2 > /sys/devices/platform/msm_hsusb/usb_function_switch"-line into the conf-file

would u explain it more

or would you just put eclair conf file you edit here

thank you
[XPERIA X1 Android Development] n00b3r:
Did you push your memory patch into git?
[XPERIA X1 Android Development] jerpelea:
no please push it
[XPERIA X1 Android Development] X1iser:
The most major problem with the kernel is solved, good work. Thank you :)
[XPERIA X1 Android Development] Musse_1:
usually its part of of the conf, just make sure is unchecked.

if not, add it in last section within echo part, see below

# custom shell commands, these commands run last
custom_shells{
#echo "Hello!!!" # example
#echo "You can create your own commands here" # example
echo 2 > /sys/devices/platform/msm_hsusb/usb_function_switch
}
[XPERIA X1 Android Development] vdelf:
Look at this thread for more details: Link to thread

attached the modified eclair.user.conf. The line is added at the end of this file. This way android executes this line during boot (before the boot animation).

This file works only with plain eclair-android-releases, like fatsal's. The hero-sense-release uses user.eclairhero.conf instead.

edit: Damn, too slow again :D
[XPERIA X1 Android Development] n00b3r:
I'm not sure how to do it, so maybe vdelf can help?
[XPERIA X1 Android Development] Musse_1:
Thank you ALL:)

a big step in android dev/porting for winmo devices, great work!!
[XPERIA X1 Android Development] angusmcb:
Lol sorry, push your changes to git, I just put up a quick hack to get there first :D

Big thanks to everyone on this job - great work! Battery meter and wifi-crash to go ;)
[XPERIA X1 Android Development] asalia:
Thank you all for your efforts, this is a great contribution to the development of android kernal for kovsky.
[XPERIA X1 Android Development] neock:
Hi all Chefs, I may really need you guy's kindness help.

The coding in SMS sending is a major problem to eastern character user, such as Chinese, Japanese, Arabian etc. I post a thread that discuss this issue time ago righ here. But no hope, beside vdelf's tips, which I still not figue out what to do.

By seeing backward, in fatsal's 20100221 builds, with the whole pack, the SMS was working quite well, no character displaying issue. But since the speaker problem solved(maybe? i can't remember well, sorry), no more builds later on can sending eastern characters correctly.

A Chinese guy modified babijoee and phhusson 's build at post here and manage to correct this issue by modifying rootfs.img, nearlly all infomations are included in my post. I try to make use of his work integrated into kovsky. But no luck, neither by replacing "libhtcgeneric-ril.so" file in rootfs.img nor system.sqfs, and also tried the file he compiled and/or ripped from his rootfs.img for Raphel.

And now I figued that different between fatsal's 20100221builds pack and the latest repack by sanjayecb, is the zimage(kenel build maybe?). And I wonder if there is something changed from the normal function fatsal's zimage that the following various updated zimages inherit, and making SMS sends not working propertly? Or, just the same source codes that changed only because by using non-unicode environment?

Please, I may really need you guys' wisdom.

And sorry for my bad english.

Tks in adv.

B.rgds, you guys make Kovsky more than it values.
[XPERIA X1 Android Development] drlucky:
Feel free to join the git group we've created. If you provide me with your username on gitorious, I can add you to the group :)

Battery: I have read several threads stating X1 uses a DS2746 chip for battery management. And I have found a driver of that chip for the kaiser. Currenty I'm trying to make this work on kovsky too - maybe that driver is solving some of the battery problems (mainly: wrong and jumping display of battery percentage). Stay tuned :)
[XPERIA X1 Android Development] drlucky:
Since the idea came from phhusson, is this a general patch for all HTC devices, or is this a kovsky specific patch?

If it's a kovsky thing, we need to include some switches (machine_is_htckovsky()) so that this will only be used on kovsky - since we want to push our changes back to the "original" git repo for all htc devices.
[XPERIA X1 Android Development] jerpelea:
is generic and every board_htc_xxxx.c is patched except kovsky

no need to add switches
[XPERIA X1 Android Development] _Sensible:
Updated post 1 re backlight fix. Many thanks to vdelf, drlucku and angusmcb. We are not too far from this kernel being able to support a rom methinks...
[XPERIA X1 Android Development] scholbert:
Wow!!!

Hey there,

i've been away for some time and it's amazing to see the Android section growing every day :D

I see that the kernel is getting in better shape everyday.

That's fantastic!

Of course some research would give me answers... but maybe someone could give easy answers concerning rep's ;)

It seems there's a new development tree for kovsky.

Is this the actual "official" xda developers kernel tree?

Were the kernel tree's merged again to support all platforms (blackstone, diamond, kovsky, etc.)?

What happened to fatsals repository?

Is there still some active development at linuxtogo?

Some very special greetings to vdelf....very impressive work ;)

Regards,

scholbert
[XPERIA X1 Android Development] _Sensible:
@scholbert

Well, its as official as anything else on this forum ;)

Fatsal lost his x1 and so development from him is suspended. In the meantime drlucky and vdelf continued development and began creating patches. It was decided pushing changes to a git repo would be more useful for devs. Hope that makes things clear :)
[XPERIA X1 Android Development] ollep:
I agree scholbert

it´s amazing what they do...............

vdelf great job :D
[XPERIA X1 Android Development] Musse_1:
backlight report

Ok, here is small report on backlight.

haven't delete data.img nor cache when testing

using jerpelea eclaire clean 2.1

- audio & headset working (no icon when headset pluged-in)

- wifi working but craches (reboot) when switching off

occasionally it works when switching off and seems to continue on/off with no problem

vdelf's kernel (zImage_kovsky_20100501_wlan)

- lcd backlight and brightness control working fine

- button lights always on both when using phone and when lcd sleep will continue testing using a new data.img

angusmcb' kernel (linux-2.6.27_backlight_wifi)

- lcd backlight working fine, brightness control not working

( i know it has been reported, just bring it up to ease how both kernels works with these builds)

using klinux eclaire 2.1/rosie sense ui (wifi not yet working)

- audio & headset working with icon notification when headset pluged-in

vdelf's kernel (zImage_kovsky_20100501_wlan)

- lcd backlight and brightness control working fine

- button & keyboard lights don't switch on, nor does the flash led when charging

- when backlight in lcd sleeps, the 4 leds flashes blue...hmmm will continue testing using a new data.img

angusmcb' kernel (linux-2.6.27_backlight_wifi)

- lcd backlight working fine, brightness control not working

again the kernel doesn't bring issue with flash led

Thank you all for your efforts!! fantastic work;)
[XPERIA X1 Android Development] angusmcb:
This is maybe not relevant at all, but I notice in the Dalvik debug monitor we are getting pages of messages like this from system_process:

05-02 16:37:12.570: WARN/BatteryStatsImpl(1209): Couldn't get kernel wake lock stats

might provide a clue where to look, dunno :)
[XPERIA X1 Android Development] scholbert:
Hey _Sensible,

thanks for the information.

Yeah that's a sad thing, i'd been in contact with fatsal... he really pushed the things in the right direction.

Yes thanks again... will have a closer look at this repo.

BTW, the kernel at linuxtogo seems to be outdated :o

http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-msm-2.6.27

Best regards,

scholbert
[XPERIA X1 Android Development] drlucky:
Hi,

We have created a clone of the "official" repo for all htc devices here:

http://gitorious.org/+kovsky-linux-msm/linux-on-qualcomm-s-msm/linux-msm-xdadev

If you want to join, just send me your username on gitorious and I'll add you to the group of developers.

We're trying to make changes that can be merged back to the main repo (http://gitorious.org/linux-on-qualcomm-s-msm/linux-msm) which has been done at least once on May, 1st.

And thank you for your really good work on the identification of the hardware used in the kovsky. I think that really helped a lot of us :)
[XPERIA X1 Android Development] Musse_1:
some further testing...

now I have started with clean setup, no data store, no cache, no backup and no androidapps

- button lights always on, both when using phone and when lcd sleep, have tested with both fatsal 2.0.1 build and jerpelea clean 2.1

However once I place androidapps folder and restart phone, buttons does not lit anymore :confused:(don't ask me why, I'm still confused)

- same happens when working with klinux rosie sense ui, backlight in lcd sleeps, the 4 leds flashes blue...put in androidapps folder and restart phone "problem/behaviour" disappears :confused:
[XPERIA X1 Android Development] katem:
thx it works

when i use adb devices

it shows me

000000000000 attached

is this normal?!
[XPERIA X1 Android Development] waikeong:
strange is that which i attached the latest android (5/2) I cant call nor text. Previous version still working
[XPERIA X1 Android Development] drlucky:
I2C Tools

Hi all!

Does anybody have an i2c-tools running on android? I'm trying to get my hands on the battery i2c chip, but doesn't know it's device name. I know from scholbert (give hands!) that this is a DS2746, but that's not the device-name (or I have done something completely wrong ... *hrrmpf*)

Unfortunately I'm too dumb to cross-compile this package from sources ... :)

Any other possible solution is welcome, too (e.g. use i2c-tools from the PC over a debug connection ... if this is possible at all).

I'm running Windows7, kernel development + compiler in a debian VMWare.
[XPERIA X1 Android Development] angusmcb:
I think sp3dev has used i2c-tools. I tried cross-compiling myself and it made my brain bleed :D

I'll try again tomorrow, but maybe sp3dev can post a link to some arm binaries for us?
[XPERIA X1 Android Development] katem:
iam using now jerpelea android 2.1 clean

i used last zimage and wlan module

and it works good exept sometimes restart

when i turn the wireless off

i want to view pages in my language

i read this thread

http://xdaforums.com/showthread.php?t=480964

i tried to do the same steps

but when i write this command

chmod 4755 /system/fonts/DroidSansFallback.ttf

it told me it's read only file

i try to use terminal emulator

but told me permissions denied

i try to download superuser app from the thread

http://xdaforums.com/showthread.php?t=580814

but i think the download link dead

any idea?!
[XPERIA X1 Android Development] the49ers:
any ideas?

Hi Kernel developers,

do you have any further ideas, how to debug the issue where internet is not working?

http://xdaforums.com/showthread.php?t=653303

(please post ideas here).

Tested various APN settings with 2 different sim cards and networks, which work under winmo, but not under Android.

Will test a 3rd card which runs on a android unit to see if the issue is maybe caused by the sim card.

Running out of ideas (do I maybe have a different hardware revision (you all do not have?)).

/j
[XPERIA X1 Android Development] sp3dev:
Get a copy of arm linux environment with gnu libc (i.e., install android to a separate partition on your device. then, do "mount /dev /mnt/angstrom/dev -o bind" and chroot to it to run 'regular' linux binaries). Get i2c-tools from here (http://packages.debian.org/sid/utils/i2c-tools), the ones for armel. use 7zip or dpkg to extract the data.tar.gz file, then extract it to the root of your angstrom partition.
[XPERIA X1 Android Development] angusmcb:
I built this Ångström rootfs with i2ctools included download

Link is only valid for 3 days, so build your own if it expires :-)

you can extract it into a subdir of /data, bind the dev mount and chroot in there instead of using another partition.

i2ctools are in usr/sbin
[XPERIA X1 Android Development] hotlein:
telnet over usb

hop it can help.

i have found a way to establish an telnetconnection to android.

in winmob you switch your USB connection to Active Sync

in linux
lsusb
Bus 005 Device 019: ID 0bb4:0a1f High Tech Computer Corp. PocketPC Sync

in winmob start haret and wait *g*

in linux
lsmod | grep usbnet
usbnet 24072 3 rndis_wlan,rndis_host,cdc_ether

ifconfig usb0 192.168.20.10 netmask 255.255.255.0 up

telnet 192.168.20.1

192.168.20.1 is the IP of your phone

know anyone the rootpassword?

I am stupid^^

Edit line 380 in /init of rootfs.img. change line to

busybox telnetd [B]-l /bin/sh[/B] -b 192.168.20.1

then you need no password

here an ls -l /sys/class/leds

lrwxrwxrwx 1 0 0 0 May 4 20:59 button-backlight -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/button-backlight
lrwxrwxrwx 1 0 0 0 May 4 21:05 klt::action -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/klt::action
lrwxrwxrwx 1 0 0 0 May 4 21:05 klt::back -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/klt::back
lrwxrwxrwx 1 0 0 0 May 4 21:05 klt::end -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/klt::end
lrwxrwxrwx 1 0 0 0 May 4 21:05 klt::home -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/klt::home
lrwxrwxrwx 1 0 0 0 May 4 21:05 klt::send -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/klt::send
lrwxrwxrwx 1 0 0 0 May 4 20:59 lcd-backlight -> ../../devices/platform/i2c-adapter/i2c-0/0-0066/leds/lcd-backlight

regards
[XPERIA X1 Android Development] drlucky:
Thanks a lot - I can use the chrooted angstroem and start the i2c-tools. Any hint on how to identify a chip?

i2cdetect -l doesn't show anything

i2cdetect -F 0 shows some information about the i2c bus itself

i2cdetect 0 0x66 0x66 (for example) gives an error

i2cdetect -r 0 0x66 0x66 shows "UU" ?

i2cdetect -r 0 scans many addresses and reboots my phone :)

Anybody knows how I can get a list of connected i2c devices? And then, get the i2c device id? I need the device-id of the ds2746 battery driver (which should be used in the xperia, according to scholbert's thread).
[XPERIA X1 Android Development] angusmcb:
i2cdetect -r 0 returns "UU" entries only at 0x66 and 0x67 for me which is the microp chips only, I suppose.

If you have a ds2746 attached to the I2C bus, it will respond at a hard-coded slave address 0x36

see datasheet - the r/w status register is at 0x01 (datasheet has register info too)
[XPERIA X1 Android Development] angusmcb:
Which is a ..err. "slight" bit of a problem, because that's where we have the camera chip placed on the bus in board-htckovsky.c :)
[XPERIA X1 Android Development] drlucky:
Hi - found the first error. I have forgotten to include the new device in the I2C_BOARD_INFO block in board-htckovsky.c :)

Trying to get it up and running this evening ... I have commented out allunused/notworking GPIO values from the board-htckovsky.h, so that may not be a problem here ...
[XPERIA X1 Android Development] mudenza:
I just want to comment something that I read about on this thread or another about USB debugging. I noticed that when I have the phone plugged into my Mac and hit Haret, my Mac signals a "Smartphone" network connection of some sort. Then I noticed that once I'm in Android, it notifies me that it has entered USB Debugging mode. Anyways, I might be just spouting out irrelevant stuff here so, if thats the case, just ignore this post :D
[XPERIA X1 Android Development] angusmcb:
Here is the i2cdump of 0x36:

i2cdump 0 0x36
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x36, mode byte
Continue? [Y/n]

0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: ff 03 ff ff ff ff ff ff 0a 60 0a 80 6b 80 04 7c .?......?`??k??|
10: 0e 96 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ??..............
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
60: ff 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................

And here is the register-map of the DS2746 from the datasheet:

Table 4. Memory Map
ADDRESS (HEX) DESCRIPTION READ/WRITE POR DEFAULT
00 Reserved —
01 Status/Config Register R/W X1110X00b
02 to 07 Reserved —
08 Auxiliary Input 0 Register MSB R 00h
09 Auxiliary Input 0 Register LSB R 00h
0A Auxiliary Input 1 Register MSB R 00h
0B Auxiliary Input 1 Register LSB R 00h
0C Voltage Register MSB R 00h
0D Voltage Register LSB R 00h
0E Current Register MSB R 00h
0F Current Register LSB R 00h
10 Accumulated Current Register MSB R/W Undefined
11 Accumulated Current Register LSB R/W Undefined
12 to 60 Reserved —
61 Offset Bias Register R/W 00h
62 Accumulation Bias Register R/W 00h
63 to FF Reserved —

That looks like a direct hit to me :)
[XPERIA X1 Android Development] drlucky:
DS2746 battery driver

Hooray! Got it working!

Give me a few more days and I may push a patch to the git repository, which handles the battery more accurate.

I have compiled a kernel which looks promosing. The ds2746 is detected and returns good-looking battery percentages. I need to clean up the code a little bit and I need to fine-tune the configuration (currently the percentage is about 10-15% too high), bit I think this is no big problem anymore.

Thanks for the big help from angusmcb, sp3dev and all the others helping me with i2c basics and other stuff. Wouldn't have made it without you! :D
[XPERIA X1 Android Development] angusmcb:
Free beer for that man!

Any idea where the camera is? :P
[XPERIA X1 Android Development] sanjayecb:
great update man

we all respect you
[XPERIA X1 Android Development] dexteral:
Excellent work, thank you to ALL :D
[XPERIA X1 Android Development] sp3dev:
btw, drlucky, are you using the driver from the polaris port or writing your own? (anyhow, it shouldn't matter, as it's a pretty simple device)
[XPERIA X1 Android Development] drlucky:
No, I think I'm not that hardware geek ... I've found an implementation for the htc kaiser, changed a little bit and included it in the board-htckovsky.c and the htc_battery_smem.c

Just need to tweak the maximum capacity - I will try to change that using a configuration in the startup.txt (or default.txt? not quiete sure currently), so that anyone can change this value easily without recompiling the kernel ...
[XPERIA X1 Android Development] Mic159:
Surely it can detect the battery capacity itself?

I mean if you change battery to a higher capacity, you shouldnt have to edit some command line value just to make the battery indicator work right :S

You dont have to do such a thing in WinMo?
[XPERIA X1 Android Development] drlucky:
Hi,

No idea if this works in WinMo, I haven't changed my battery... is there a battery with a higher capacity than the original one? Would be great for android in general ...
[XPERIA X1 Android Development] angusmcb:
Screen Rotation

As far as I remember, scholbert was playing around with the hardware screen rotation for the S1D13774 chip.

I've been looking into it myself, but setting the chip registers according to the datasheet,

doesn't seem to have the expected results (surprise surprise!).

Has anyone looked into why the chip rotation settings don't behave as expected?

I mean is this a problem with the framebuffer, or perhaps other kovsky hacks that

have been put in to rotate the screen?

I notice that taking a screenshot with droid explorer produces garbage, so maybe the framebuffer

representation isn't quite right.
[XPERIA X1 Android Development] vdelf:
Hi @all!

I just pushed my backlight changes to repos. It is not a very elegent change because it adds more machine-dependent code in microp-klt-driver. But it should be pushable to main repos.

That brings me to another point: Who keeps our repos-clone linux-msm-xdadev in sync with main repos? There are many changes in main repos and some of them are quite interesting. Either we push our changes to main repos (without breaking other devices ;) ) or we get all changes to our clone. But i think it is important to keep our clone up-to-date.

Well done!! Looking forward to you commit :D

Thanks! Nice to see you around again. Any luck with screen rotation? ;)
[XPERIA X1 Android Development] drlucky:
Great - will get your changes as soon as possible. But currently it's a good thing that my android eats battery, since I'm debugging the battery level and therefore just need a few minutes to see some changes on the percentage ;)

Thought about that, too. I know that I can do that with "git merge" on a local repository, but how can I do that on gitorious? Do I need to merge my local repo with the official one and then push the changes to our clone?

EDIT: found a great link about that: http://github.com/guides/keeping-a-git-fork-in-sync-with-the-forked-repo

Give me some time and I will try that (maybe tomorrow, don't have that time today, sorry)

EDIT2: ok - got it. The latest commits from the original repo should be in out gitorious tree ...

Just have some problems - need to find out how the battery driver identifies the battery or hard-code the maximum capacity of the standard x1 battery (maybe the first commit will be hard-coded). And currently charging doesn't work at all on my kernel. The charger is identified, the battery symbol in android shows the charging animation, but the battery is not charging at all. Battery drains the same as without charger.

But good news: my android is runing until the battery is really empty. After shotdown at 2% in android I was not able to restart the phone, but I needed to charge a little bit (x1 default beviour - I just got some red lights on pushing the power-on button). Promosing, so our devices will not be rebooting before the battery is really empty ... :)
[XPERIA X1 Android Development] _Sensible:
@vdelf,

Wow, your changes are great, :) The code is looking quite good :)

@drlucky

Looking forward to your battery commit :)
[XPERIA X1 Android Development] vdelf:
Excellent! And it seems that the merge worked quite well. I found only one conflict in headset-code (resolved and commited by now), everything else seems to work. I am impressed!! :D