Yesterday I received a 1650mHa battery for my HTC Kaiser, which is 300mHa more than the original 😎 . Since I use a phone that is non native Android, it is necessary to do a few spells to correctly read the battery in%. One of the easiest options is if you use a standard kernel, edit it with Atools by setting the new value for mHa on the battery, flash with the new NBH and dare. The other option is to use a non-standard kernel that does not lend itself to atools processing and make an ugly patch of the problem.
First let's explain a little theory and then move on to the patch. When you make changes to your kernel with atools you are fine-tuning the system in / sys / module / and then according to depends on your hardware. For me, the important file that is responsible for setting the battery is located in / sys / module / board_kaiser_battery / parameters / battery_capacity. It contains how many units is the amount of your battery and based on the number inside is calculated on how many % is your battery right now. I say units because we do not write a pure number in mHa but it is calculated based on the formula
mHa * 1.6 = units
In my case this means 1650 * 1.6 = 2640 units, that is, this will be the contents of our file. Speaking quickly, I drive one into my console
So far, things are crystal clear about what needs to be done, where and why. However, here comes the moment for the small detail, the file in the / sys directory resets its contents after each restart of the phone, which is not much of an offer. So the next step is to put it in the top row of the init on our Android.
Since I didn't put it in init, I want to wait a few days before doing it. When I drive it into the init I will quickly draw a small how to 🙂
Today, because I have more free time, I played with my droid and did it 2 quite interesting improvements. In general, the result was 3 times faster system boot and around 50% application applications. The version I used is 2.2.2. So what did I do
Odexing – So what is it odex and deodex is a topic that I do not intend to consider now and who does what but let a slight explanation deodex these are various hashes check amounts and classes that facilitate the movement of applications from one system to another and improve the life of the programmer, yes, but they also slow down our system because when the application is started, it makes checks and checks. So as long as the lyrics first removed the deodex, this is elementary with the following script. It is launched with root rights on your phone, he will do everything necessary. Once packed packed and so on. Know that you may lose some contact information, etc., so back them up in advance!
JIT enabling – just-in-time compilation this is another beauty that is good to appear. As you know, java is not the fastest platform on the planet like many other programming languages. That's why various smart heads came up with the idea that instead of compiling the application every time and then starting it, it's better to compile it once and then keep the byte code copy.. This avoids the need for recompilation, speeds up startup and reduces the resources required. This turns out to be an interesting task not because of anything else but because the file was in the read only directory of the phone 😀 not that this is a problem 😉 Enabling JIT works by adding the following line to the file /system/build.propdalvik.vm.execution-mode=int:jit How you open it and edit it is your job whether through adb or ssh it is a matter of your discretion to be able to edit it you need to execute the following commands on the phone
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
#mtdblock2 е дяла където е маунтнат system може да видите верния за вас номер с df
echo "dalvik.vm.execution-mode=int:jit" >> /system/build.prop
#може просто да си ъплоуднете файла аз направо на ръка го оправих
mount -o remount,ro /dev/mtd/mtdblock2 /system
Because I had a lot of controversy until I came to the optimal option – for Android on my HTC I decided to write a pretty detailed explanation of things. In this case I will go into specification for installation on the NAND of the phone, haret boot option I will not discuss it, although with him things must be identical.
1. Training – before we start we need to prepare the kernel with which we will flash the NAND chip and make it possible to boot directly on Android. If you are running Linux or Mac OS I recommend Atools-and the option if you have Windows NBH Editor-a е вашата панацея. След това смъквате последното ядротo отGIT-and I personally recommend the latest version 2.6.25. Works more stable than 2.6.32 and saves more electricity, disadvantage is the low transfer of the wifi adapter, which suits me. Then open the nbh file and apply the settings for your phone and droid version . Then save the new reworked kernel for your phone. And you put it on your SD card. It must be in kaisimg.nbh format so that if we have an SPL, we can flash our phone from the SD card.. There is a lot written about these things everywhere, so I will not discuss them. After flashing with the kernel in question, you can now say goodbye to Windows Mobile 😉
2. Android – Once we are done with the top the phone will start charging in console mode and will prompt us to hold the d-pad or the middle button on the front panel. With it we enter the boot menu from which we can install, update, reset, etc. our Android. In order to be able to install we must have a folder andboot in our SD card, it must have a file named androidinstall.tar.gz or androidinstall.tgz. After trying almost all Froyo versions I think it is the fastest and most stable Fat Free Froyo. I personally use it and have had almost no bugs, I will hope that its developer will try so hard in the future as well. It is wise to make at least one before you start installing 512 or a little more ext2 partition on your SD card where data.img will sit or part of the droid wiv which programs will be installed. The installation itself is trivial, you choose your system to be on the NAND and your date on the ext2 partition. You are waiting 2-3 min until everything is set up and you will return to the original menu. Select Quit and your freshly installed Android will start. From now on, dare and have fun.
3. A few words about other things – First of all, I recommend the Radio ROM to be version 1.65.xx version. Versions 1.7xxxx don't work as well. There is some trouble around them with the scope of reading contacts from your SIM card and so on. If you still want to test 2.6.32 the kernel is likely that your Android will not start due to the various parameters that the new kernel passes to the init system. In this case, you update the system by placing the archive hereв adboot папката и после от boot менюте се избира да се ъпдейтне системата. Хубавото при него че прави системата една идея по бърза wifi адаптера смучи с по голяма скорост но не е толкова стабилен като 2.6.25 which is not a small minus 😉 separately that with it the Fat Free Froyo cannot save the contacts from the SIM.
From 2 days I completely lost Windows Mobile and installed Android on NAND 2.2 on my HTC Kaiser. Overall, my observations are positive – not that I have time for in-depth work and research of the seams that start on the phone, etc. but I like at least the idea that there is a normal terminal emulator, that I can stick a top on my phone, ls, iptables, telnet or ssh to do my job normally remotely. I have slight remarks on eating RAM but I believe, that if I drive a SWAP partition into it, things will improve. With the rest of the time, I will study in more detail the init structure of this nonsense to see how many unnecessary things I will remove and whether I will be able to save the startup time..
I have been the owner of for about a week now HTC TyTN 2. I sold my old HTC TyTN 1 and with some surcharge I bought the Kaiser(the TyTN code name 2). My new communicator is different from the old one with its much better hardware – a new generation ARM processor, 2 times more RAM for large NAND for ROM. Apart from the fact that it also has GPS, which I really missed in the old Hermes. The previous owner had not experimented with the machinery and so all the fun of SPL-unlocking and unlocking fell to me 🙂 At the moment I drive it with Android through the memory card, that something lately I'm not fascinated by the droid and I'm thinking of playing to port Openmoko GUI. My work on the previous project ended with the Touch Screen driver. I believe there was more bread in the project but I had neither the time nor the nerve to deal with it. For now, I will drive with Android until I have time to port Openmoko, but the droid, no matter how much I don't like it, is better Windows Mobile 😉 I have various remarks on the work of the phone but the project is too advanced yet to join the development team.