yashsingh1/xdaforums huggingface dataset:
[XPERIA X1 Android Development] milaq:
that's because u just loaded them with

insmod /lib/modules/microp-ksc.ko
insmod /lib/modules/microp-keypad.ko

correct me if I'm wrong but i think that till march-05 kernel the keyboard modules reside inside the kernel and therefore aren't listed with

lsmod

at startup
[XPERIA X1 Android Development] bruno_123:
all fixed now xD forgotten to install new modules and kernel trough terminal
[XPERIA X1 Android Development] wallaceff:
So Bruno, pardon me, but have you got it all working with the keyboard fixes etc?

If so, can you post a bit more of a clear step by step guide?
[XPERIA X1 Android Development] 85362:
I also think the march-07 kernel did not load keyboard modules properly at startup:

"- Keyboard drivers added as module instead of included in kernel. Keyboard fix script posted elsewhere can be reused here, cannot remember the link."
[XPERIA X1 Android Development] bruno_123:
okay i did this

changed the kernel and the modules in the root of sd card

booted up android

downloaded gscrip lite(market)

edited default script(any of them) to this

su -
cd /lib/modules
pwd
ls
rm -rf *
ls

executed it and then i've restarted phone

after booting up to android again i've edited another of default scripts to this

#!/bin/sh

echo "Restart Kovsky keyboard and buttons"
rmmod microp-keypad
rmmod microp-ksc
insmod /lib/modules/microp-ksc.ko
insmod /lib/modules/microp-keypad.ko

executed it

and it worked :)

i know it is sloppy and it could be done nicer but this is how i've done it
[XPERIA X1 Android Development] wallaceff:
Thanks for posting that. Now just a few more questions to clear things up...

1) Which kernal are you using exactly?

2) did you have to use the newer haret.exe?

3) did you have to change the startup.txt file?

4) does your keyboard die? if so, how exactly do you go about restarting it/how do you get back to the home screen to restart the script?

Thanks for your help so far
[XPERIA X1 Android Development] duckly:
Yep, I can only see the compcache modules after boot with lsmod.

I use this script in gscript

#!/bin/sh

echo "Restart Kovsky keyboard and buttons"

rmmod microp-keypad

rmmod microp-ksc

insmod /lib/modules/microp-ksc.ko

insmod /lib/modules/microp-keypad.ko

I begin to wonder if it fails becuase of #!/bin/sh to execute the script properly, you do not have this in your script. The echoed text Restart Kovsky... flashes twice and then phone freeze, I will try without #!/bin/sh at the top as it apparently is not needed in my other gscripts.
[XPERIA X1 Android Development] 85362:
My phone freezed if without "sleep 3", I tried no sleep or sleep 1 but failed, can't figure out why because I know kernel not much.
[XPERIA X1 Android Development] yma900:
im using the kernel with the no key freeze. the one without the camera support on BLAZN MOD rom... i just experienced a key freeze? is that normal?
[XPERIA X1 Android Development] bruno_123:
ok sorry for waiting(had to do some hw)

i'm using this ducklys kernel and modules http://tingstenen.dk/data/X1-kernel-ygge37-2011-03-07-1299534118.zip

yes i'm using new haret.exe with edited startup.txt, keyboard didnt freez yet but with this kernel camera button works as home screen button xD

one more thing i dont recommend this setup because wifi doesn't work and for some reason duckly removed links saying that it screws up file system on phone so take one of those in first post
[XPERIA X1 Android Development] duckly:
Kernels ready for testing, updated to improve performance, address keyboard freeze issue and added iptable modules for wifi tethering. Have compiled two kernels with keyboard drivers as modules or drivers included in kernel.

(Kernel with keyboard as modules has been tested for several hours, everything should work this time :) )

Non camera 200MB mem

http://tingstenen.dk/data/X1-kernel-modules-2011-03-09-1299698853.zip

Non camera 200MB mem and keyboard as modules

Keyboard modules have to be loaded manually after boot, gscript can be used.

http://tingstenen.dk/data/X1-kernel-modules-2011-03-09-1299699115.zip

Camera kernel

http://tingstenen.dk/data/X1-kernel-modules-2011-03-08-1299611327.zip

Camera kernel and keyboard as modules

Keyboard modules have to be loaded manually after boot, gscript can be used.

http://tingstenen.dk/data/X1-kernel-modules-2011-03-08-1299595494.zip

Updates:

- Added iptables modules for wifi tethering

- Compiled for performance instead of small size

- Camera kernel compiled with gcc 4.4 instead of 4.3

- Camera key can be used to go to home screen or standby

- Small update to keyboard driver

Installation:

1 Make sure you remove old modules before booting up on the new kernel.

2 Use new haret.exe and add one line to startup.txt

Add line "set INITRD_OFFSET 0x608000"

Download new haret.exe

http://xdaforums.com/attachment.php?attachmentid=502481&d=1296235965

Information on updated haret.exe and startup.txt was from below thread, in first post.

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

Testing needed.

Performance: compiled with -O2 and gcc 4.4

How is performance after these updates, are they noticeable and should we keep compiling it with performance optimizations instead of small size?

Stability: compiled with -O2 and gcc 4.4

How is stability?

Keyboard freezes: Small update to driver

Have it improved, should we continue to create two different kernels, with and without keyboard modules?

Camera or not:

Are there any interest in the non camera kernel with the slightly increased amount of memory?
[XPERIA X1 Android Development] neo299:
I think the camera is far from perfect and RAM is always better when more available, so I think for now you should continue with the development of no camera - more RAM kernels :) Appreciate your work man!
[XPERIA X1 Android Development] Benquick:
first of all, thank you for your great work.:)

in my opinion, development should focus on kernel with kernel modules. it is true, that it is for advanced users, but if someone would make a complete guide how to do everything, there wouldn't be any problems.

developers should work on a camera too. it is true, that it uses 16 mb of ram and that it is almost unusable, but if someone fixes autofocus, the problem is solved. i know it isn't easy to do, but i think we all have time to test & wait for a solution.
[XPERIA X1 Android Development] wallaceff:
I'm using keyboard modules kernal

For some reason, as soon as I finish running the keyboard script, my screen rotates to landscape! then, I can slide the keyboard open and closed to move it back to portrait, but if I then say run the android settings app, or any app, I'm back to portrait again? Any ideas whats causing this? I have 'autorotate' disabled in the screen settings option, I have ADWSettings set the default screen to portrait... I'm not sure what else to do/try??

This doesn't happen for me with the plain camera kernal rom.
[XPERIA X1 Android Development] neock:
test with Camera kernel

test with faryaab's Froyo 2.2.1 ext2 build

test with sandisc class6 8g card with ext3 partition

replaced with previous one, no fresh installation, using special haret and startup.txt parameter

overall performance better than last test, quadrant advanced full benchmark gave me result:1st351 2nd445 3rd501 4th448.

camera failed to take a shot but ok to view image in third party app, auto focus not working.

battery indicator seems not that correct. battery consumption was really good, spare part battery information logged that with 2hr40min running time, dropped only 10%(some sms, some benchmark). no battery heat for continuous usage (20min).

no sod, no keypad freeze so far.

headset not working

3g network data transfer randomly mulfunction
[XPERIA X1 Android Development] duckly:
Thanks for taking your time to test the updated kernel. Sounds like the updates have provided some performance improvements and stability also sounds good, the same apply to my own experience of the updates. I appreciate you also mention the ROM used for testing as I have seen one ROM become more unstable and another have so far been impossible to crash now after 16 hours of use.

Do you not get any sound in your headset when you plug it in the phone? It should work even though you do not get the headset icon on the phone. The headset functionality is somewhat limited as the button on headset is not working and plugging in a regular headset with no mic will still mute the phone mic.
[XPERIA X1 Android Development] saobang3886:
Test the Camera kernel 09-03-11: I don't use phone so much, just write some message ang get 1 call, every things seem ok, but still have key freeze !
[XPERIA X1 Android Development] preston74:
first i tied camera kernel and keyboard as modules, but again X and OK keys not working.

so i switched to camera kernel, which does not have this problem.

tested with needo's honeycomb:

- i can confirm better performace.

- neocore test: 19.1fps with CPU overclocked to 652 mhz and 19.4 with 672mhz (no sound)

- no sod & no keys freeze so far

- charging works

- battery indicator is not accurate. android 70%, winmo 40%

im not using camera so i don't need kernel with camera support. i prefer more ram instead.

thanks duckly & waiting for more...:D
[XPERIA X1 Android Development] milaq:
that's because the keyboard modules aren't loaded @boot with the "kb as modules-kernel" ;)

u got to load em manually

insmod /lib/modules/microp-ksc.ko
insmod /lib/modules/microp-keypad.ko
[XPERIA X1 Android Development] neock:
the way i tested on the headset was to plug in with the original earphone from SE. then navigated to settings-audio, selected some ringtones to play. all the sound only came from external speaker but nothing from my earphone (yeah, it is working in other situation).
[XPERIA X1 Android Development] preston74:
another build to test

this is rom from chinese forum darkforcesteam developed by cys460.

clean and fast froyo 2.2.2 build

original thread: http://www.darkforcesteam.com.cn/forum.php?mod=viewthread&tid=30997&extra=page%3D1

i just removed few chinese applications, added task killer, english calendar and overclocked to 672mhz.

download link:

http://dl.dropbox.com/u/6832810/%28cys460%29X1Froyo2.2.2-10.03.11.zip
[XPERIA X1 Android Development] duckly:
Hi

Have added two kernels to the above post, only difference is removal of camera support and increase of available memory to 200MB.

http://xdaforums.com/showpost.php?p=11942079&postcount=54

Kernel overview:

Based on linux-msm kernel source code from 2 of March

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

- Compiled with gcc 4.4.3

- Compiled with performance optimizations (-O2) instead of small size (-Os)

- Added headset driver from sp3dev

- Added and modified battery driver from sp3dev

- Added camera driver from sp3dev

- Added tiwlan wifi driver

- Added compcache driver

- Included extra iptable modules

- Non camera kernel have 200MB available memory

- Camera kernel have 184MB memory

- Minor updates
[XPERIA X1 Android Development] bruno_123:
gonna test it in the morning :) thank you
[XPERIA X1 Android Development] sp3dev:
What about merging this stuff to main htc-linux tree? I have no time for 27 now..

Btw, take a look at the battery driver and board file from the 35.7 branch. I have pushed some patches to make ds2746 driver more accurate, less hackish and fixed a typo - now the charger is recognized immediately when plugged, not in some 2 minutes
[XPERIA X1 Android Development] Benquick:
i think someone should update the first post, to make easyer to find latest kernels.

and someone should put the scripts for reloading keyboard modules and all other scripts in one post (first one if possible), so everything would be in one place.
[XPERIA X1 Android Development] bruno_123:
these scripts work for me and i've packed gscript too

install gscript then put these scripts in gscript folder on sd card after that run gscript and select any of default scripts to edit go to load file and there should be these tow scripts select one, check needs su? and save the script do the same for the second one and your ready to go
[XPERIA X1 Android Development] Ronniebiggs:
I forgot something before, but did you use the autostart app? This can run a script file on boot. This is done in needo's kernel keyboard fix, so that the keyboard drivers are auto loaded at boot. I can try to perform some copypasta, but will take a bit
[XPERIA X1 Android Development] Gab1288:
Hi, i was secretely testing all of the roms and kernels that have been posted here.

I tried the last one, without keyboard as modules (since its too complicated to make it work the first time) without camera(2001-03-08, 1299611327) , on the Froyo F1 FAT32 build (the only stable one with wifi not quitting every 2 minutes). All seemed to work good. I had no key freeze but i havent tried to let it on sleep for more that 5 minutes. The only problem i got, is that i can't make a phone call. I can receive though. Sms works and 3G works when it wants to. When i try to call, it blocks on ''dialing'' and it drops back to the contacts menu. I get a Network or SIM card error when trying to access the call settings.

-Edit, i tried the kernel with keyboad as modules and it didn't boot, i tried several times. (2011-03-08-1299595494). It stays stuck in the ''terminal'' before the boot animation. It keeps repeating the same lines. Still on froyo F1 FAT32 build. I used new haret.exe and added the line to STARTUP.TXT. I always format and reinstall when testing new kernel.

Lines are:

[ 68.097686] ds2746: 4057mV 250mA charge: 82/100 (2981 uni

ts) aux0: 167 (81) aux1: 163 (79) / 31

[ 68.155883] ds2746: polling FAST

Of course the time and charge changes at every repeat. At 120 seconds intervals the kernel tries to do something but falls back to those lines.
[XPERIA X1 Android Development] ahmadin:
download and try it....
[XPERIA X1 Android Development] duckly:
Hi sp3dev, I am glad to hear your are still working on improving the kernel for our x1. It is amazing what you allready accomplished and I often look at your kernel source repository to check if any updates are added :)

Sounds great that you have improved the battery driver, look forward to give it a try. I have one question though. I have updated the code to continue read battery status while in standby and changed the code to stop charging when voltage above 4.8 and current added falls below 100ma to prevent overcharging the battery. My knowledge of lith-ion is limited to what I can google, please correct me if I was wrong adding this to the battery driver code.

My phone often died while charging overnight and halting charge before absolute maximum seems to have stopped this from happening.

I also wanted the battery driver to update the battery info and shutdown the phone if it was running out of power while it was is standby
[XPERIA X1 Android Development] sp3dev:
I thought that my driver already drops charge after reaching some voltage level. Anyway, an extra precaution won't hurt

don't think it is a good idea. userspace should think of that.. to correctly unmount partitions and do other things..
[XPERIA X1 Android Development] duckly:
Have not checked the updated battery driver you have made yet, I belive it is working if you say so :) My death by charging might have come from other causes like unstabe ROMs. The current ROM I am using is impossible to kill, will try your updated driver and see if I would encounter any problems.

I have not made something that comlicated in the battery driver, just reactivated the battery status readings while being suspended. The android system should hopefully take care of closing down the mobile when power is down at 5%. This I have not tested yet.

The problem I had with the current halt charging mechanism is that my battery never reached 4.2 volt, it would peak around 4.194, it would simply continue to charge even when added current was down at 0-1 ma. I had to lower it down to 4.180, there could be other old batteries out there like mine that no longer are able to pass 4.2 V.

I then added a small check to see if battery was at 100% and added current below 100ma before stopping charging temporarily. What I found on google and several lith-on charging chip datasheets is that they have around 30ma as threshold for detecting when battery is fully charged. We could try to use the same limit.
[XPERIA X1 Android Development] Ronniebiggs:
Buttons as modules auto start + restarter script

As I said earlier, I will try to make a list with shameless copy-paste from others, but all is together in a nice tutorial. So credit goes to all who gave the info and as I do not remember who they are, sorry, but thank them if you know who...

First, if you are replacing your modules, you should first remove them.

Open up the terminal or use ADB to connect to your phone and type the following:

su
rm /lib/modules/* -rf

This will remove the modules installed and on next boot will reinstall your new modules.

Unpack the attached file in the root of your SDcard.

To make your buttons working from boot, you have to run an autostart script which you just extracted in the root of your SDcard.

In terminal type the following to copy over the autostart.sh script to the correct location:

su
mkdir /data/opt
cp /sdcard/autostart.sh /data/opt
chmod 777 /data/opt/autostart.sh

Then install autostart.apk and now on each boot, the modules will be installed automatically.

When your buttons stop functioning, you have to run a script from GScript that reinstalls the modules so they work once more. Perform these steps:

Install GScript.apk

Open GScript Lite and press <menu> button, then <add script>

Press the <Load file> button.

The script you need is located autmatically and is called "XPEROID Gscript Button restarter script.sh"

Select it and then in the new screen press <Save>

You can now return to your homescreen and add a shortcut to the script so you can reset your buttons easily. To do this do the following:

Press <menu> and then <add> to add widgets.

Select <shortcut> from the list and then locate and select <GScript Lite>

Then select the "XPEROID Gscript Button restarter script" and you now have a shortcut on your homescreen to reset your buttons.

I hope this is clear enough. Feel free to use this and the most important correct me if I made a mistake (which I doubt, since this worked for me ;))
[XPERIA X1 Android Development] Ronniebiggs:
double post...
[XPERIA X1 Android Development] milaq:
if i remember correctly my BB Bold also never reached 4.2V and was idling around 4.194 too. well, it also had a 1500mah battery. maybe that's the default behaviour?
[XPERIA X1 Android Development] bruno_123:
last night i've started up android with duckly's latest camera kernel(keyboard drivers as modules) and guess what the phone didn't die overnight instead it was fully charged and worked flawless trought the day except two key freezes that were fixed with gscript , headsets work , phone doesn't overheat , 3d works better , even battery indicator is pretty accurate in winmo 50% , restarted android 60% i'm using froyo 2.2 honeycomb rom
[XPERIA X1 Android Development] duckly:
It looks like the current battery driver is off by ~15%, meaning for 1% it measures 0,15 less than it should, it should after dropping to 50% show ~42%. I have configured the driver to change battery level to 5% when battery reaches 3,550V. My own test from a fully charged android discharged to 20% and was allmost down at 3,55 before I reconnected usb charging.

Will try to finetune it but I think the only way it will ever be precise is if it is charged to 100 after booting up in Android first. I have seen some very odd battery meter changes when going back and forth between winmo and android
[XPERIA X1 Android Development] wallaceff:
I did a clean install with the keyboard modules, but again, as soon as the script is finished, my screen rotates to landscape? Then when I open an app, bang, portrait again

Did this happen for you too??
[XPERIA X1 Android Development] bruno_123:
no it didn't , i actually had freezes , sometimes because of wrong scripts.I use this one to load keyboard modules after boot:

insmod /lib/modules/microp-ksc.ko
insmod /lib/modules/microp-keypad.ko

but after key freez i use this one to load them back again:

rmmod microp-keypad
rmmod microp-ksc
insmod /lib/modules/microp-ksc.ko
insmod /lib/modules/microp-keypad.ko

both need su checked this is my last setup and i'm currently running android for 11 hours and i'm just using script to fix the key freezes , everything else works fine
[XPERIA X1 Android Development] bruno_123:
me to with previous builds android would show 100% it rebooted by self and 5% left when booted back up to winmo
[XPERIA X1 Android Development] Ronniebiggs:
I only get landscape at boot, when I open and close the keyboard, all is normal again. It is such a minor quirk that I cannot be bothered about it really ;)

If you look into the package I upped, you will see the exact same scripts really, just with some echo's (which I shamelessly ripped out of Needo's packages, just shared them here all in one)
[XPERIA X1 Android Development] wallaceff:
I've done exactly what you've said (only you include gscript, not gscipt light). Still fricking rotates ALL the time!!! urrghhh
[XPERIA X1 Android Development] Ronniebiggs:
I actually used GScript lite as well. Not sure why you have those rotations really.
[XPERIA X1 Android Development] xorium:
what is the difference of Keyboard Drivers In Kernel Not As Modules and keyboard drivers as modules?

what is better for using the keyboard?
[XPERIA X1 Android Development] Ronniebiggs:
The difference is that when you have the drivers as modules you are able to reinitialize them in Android when your hardware keys fail to work. This is not possible when the drivers are included in the kernel, then you have to reboot android to reinitialize.
[XPERIA X1 Android Development] xorium:
how can i reintialize in android when i got them as modules?
[XPERIA X1 Android Development] Ronniebiggs:
read this thread, I posted a full tut one or two pages back
[XPERIA X1 Android Development] bruno_123:
okay running froyo(honeycomb build) 25 hours and 20 minutes so far everything works but at some point i think 23rd hour or so key freezed so i executed script to reload keyboard drivers and it work but now i had screen rotated landscape and i played around(executed script to load modules like on the boot-nothing happened still the same , executed script to reload drivers again-nothing happened again) then i went crazy and started to crash main app , auxilary app in dev tool and neither of those worked but when i've crashed system server android hot booted and everything was back to normal , portrait mode and guess what even keyboard worked fine without need to load modules on boot :)

thank you duckly and sp3dev on your hard work , don't give up now when your so close

thank you very much

edit: screen lock up had to reboot
[XPERIA X1 Android Development] milaq:
777 is not a good idea as the system could easily be compromised (we HAVE linux, so let's use the security ;) )

i would suggest 755 instead

regards
[XPERIA X1 Android Development] Gab1288:
Its been two days that i test the kernels without camera and with keyboard as modules. Gscript and autostart does their job good! The only problem i get is that the phone app crashes some times and i can't make a phone call after that, i need to reboot to make it work. Receiving calls works though. And sometimes android reboots itself starting from the boot screen animation (not very long but annoying). Other than that, so far so good, performance is great but battery life is a bit short. Im using Froyo F1 EXT2 build.

- If you guys get wifi disconnecting every minutes, try setting the beacon to 1000ms in the router settings, that fixed it for me.
[XPERIA X1 Android Development] nickel1109:
I cannot finish this step using this kernal. when i type mkdir /data/opt, it said cannot create directory. file exists. and when i proceed to cp /sdcard/autostart.sh /data/opt, it said cannot copy. the key does not work.
[XPERIA X1 Android Development] milaq:
make sure ur root with

su