Google provided updates to the Android development tools as Christmas gifts!
When I opened my Android SDK manager, I noticed there are 3 updates listed there.
One is Android SDK Tools 21.0.1, the other is Android SDK Platform Tools 16.0.1, and another is Android SDK platform API level 16 Revision 4.
If you are Eclipse and choose Windows -> Android SDK Manager, then select these 3 updates to install them, you may experience a little trouble, the error or warning would say some directory is currently being hold by some process. You would just need to exit the Eclipse IDE, then from the Android SDK Manager run the installation again.
After installing these updates, everything in the $android_sdk_folder/tools/ has been touched.
Right now I do not know what have been updated, and need to look at carefully to dig them out.
I wish I could find release note somewhere.
(
http://developer.android.com/tools/sdk/tools-notes.html
http://developer.android.com/tools/sdk/eclipse-adt.html
The release note for SDK Platform API Level 16 Revision 4 is not available yet at the link
http://developer.android.com/tools/revisions/platforms.html
)
Tuesday, December 25, 2012
Tuesday, December 18, 2012
Handle XXHDPI in your Android apps
After Google mentioned the xxhdpi in their online document and first batch of mobile devices supporting this resolution rolled out to the market, developers may need to know how to handle this resolution in the apps.
HTC Butterfly (Japan)
HTC Butterfly (China)
HTC DNA (Verizon Wireless)
Since this screen resolution parameter is new, if your apps have not handled it, your apps may not be visible on devices when users use Google Play store to search apps.
To solve the issue of app not visible on devices with xxhdpi resolution, developers need to read the documentation provided by Google. Please check the best practice Google provides at http://developer.android.com/guide/practices/screens_support.html ,
It is said that the best practice is to use the <supports-screens > element in the manifest file of the application, and developers can set anyDensity is true. This will solve most of the cases. There are some cases that this solution would not work.
As you may notice that there is another element, <compatible-screens>, mentioned in Google's online document. Some apps on the market are using this element/tag in the manifest files to resolve the screen resolution issue, and even use these 2 tags/elements in the same time. If you create a simple apk with various combinations of these two tags in the manifest file, it could be easily found that some of the definitions inside of the <compatible-screens> would override the definitions inside of the <supports-screens> tag.
It is mentioned that if you have to use <compatible-screens> in the manifest file to filter out your apps for devices with certain screen resolutions or sizes, you will need to add one more value inside of this tag:
<screen
android:screenSize="normal" android:screenDensity="480"
/>
for the xxhdpi. The other definition you may also add is tvdpi, its value is 213, which is for devices like Nexus 7.
After modifying the manifest file, you may also consider adding resources, such as drawables, layout styles, for the xxhdpi.
Friday, December 07, 2012
Build Android Kernel Source Code
In my previous post, I talked about downloading Android kernel source codes and listed links of download sites from major players in the markets of Android devices.
So what are you going to do with the kernel codes after you download it?
Some guys would like to take a look at the Linux codes to see the changes,
others is going to twist it, build it, and flash the devices with the images from the build.
OEM usually provides the Android kernel to end users in zip format,
it may be only one zip file, or several zip files. To open the zip file, the zip tool would be needed. There are several free zip tools user can download from the internet.
After unzipping the downloaded zip file, you can start to check the source codes. If you could like to build it the kernel, other tools and environment would be needed. It is recommended Linux machine would be used to run the build, you can either get an individual Linux PC, install a dual boot of popular Linux OS, or install a virtual machine of Linux on your PC. Some of the Linux Os' are free for personal use.
For myself, I am using a Windows laptop, have a Oracle Virtual Box installed on it. I use Ubuntu Linux as a virtual machine on Virtual Box. You may download Oracle Virtual Box from this web page https://www.virtualbox.org, and the Ubuntu Linux from http://www.ubuntu.com/download .
When you set up and configure the Ubuntu virtual machine in Oracle VirtualBox, please pay attention to the RAM, Storage size and number of processor of the host machine ( for me it is my Windows laptop), please choose proper amount of storage, RAM and number of processors to use by the virtual machine. If you assign too much ram and all the processor of the host machine for the virtual machine, when you run the virtual machine and do heavy jobs, the host machine may not be responsive.
After setting up the Linux machine, please follow the steps at http://source.android.com/source/index.html to set up the environment. You will need the tool chain from AOSP to build the Android kernel code. The tool chain is in the code base of AOSP source codes, or you can get it from somewhere else you could find, please put the tool chain in your path.
Please unzip and put the Android kernel source code in your project directory, for example,
/home/dave/Project/kernels/. Before start building the kernel, you may want to take a look at the build instructions that comes together with the Android kernel source codes, such as a readme.txt file in the directory, or any instructions the OEM lists on their website.
I happened to look at the Android kernels recently published at http://htcdev.com/devcenter/downloads ,
In the download file, there is a readme.txt, which contains the commands recommended to be used to build the kernel, including the instructions to set the path of the tool chain.
After finishing building the kernel, you may try to push some modules you just built on to you device. Please note that you may need to run at root privilege to do this.
Please make sure to back up your personal data, device settings, ect.., anytime you flash your devices with customized build module or rom, and make copy of the modules on your devices you are going to replace with the new modules, and this process is only for person with strong mobile technique experiences.
For example, if I want to put bluetooth driver module onto my device (but most of the time, all driver modules would be needed to push over to device to make the device work properly),
I will run the following commands:
adb remount
adb shell push ./drivers/bluetooth/bluetooth-power.ko system/lib/modules/
adb shell chmod 644 system/lib/modules/*
adb reboot
In case your devices got stuck to start up, you may need to run recovery and reset the device to factory settings (!!!! you would lose data on your device !!!!), you may need to put back the original modules you have backed up, or in the worst case, you may run to boot loader mode and select the recovery or reset options from the menu, or run the recovery and reset command from the adb shell.
So what are you going to do with the kernel codes after you download it?
Some guys would like to take a look at the Linux codes to see the changes,
others is going to twist it, build it, and flash the devices with the images from the build.
OEM usually provides the Android kernel to end users in zip format,
it may be only one zip file, or several zip files. To open the zip file, the zip tool would be needed. There are several free zip tools user can download from the internet.
After unzipping the downloaded zip file, you can start to check the source codes. If you could like to build it the kernel, other tools and environment would be needed. It is recommended Linux machine would be used to run the build, you can either get an individual Linux PC, install a dual boot of popular Linux OS, or install a virtual machine of Linux on your PC. Some of the Linux Os' are free for personal use.
For myself, I am using a Windows laptop, have a Oracle Virtual Box installed on it. I use Ubuntu Linux as a virtual machine on Virtual Box. You may download Oracle Virtual Box from this web page https://www.virtualbox.org, and the Ubuntu Linux from http://www.ubuntu.com/download .
When you set up and configure the Ubuntu virtual machine in Oracle VirtualBox, please pay attention to the RAM, Storage size and number of processor of the host machine ( for me it is my Windows laptop), please choose proper amount of storage, RAM and number of processors to use by the virtual machine. If you assign too much ram and all the processor of the host machine for the virtual machine, when you run the virtual machine and do heavy jobs, the host machine may not be responsive.
After setting up the Linux machine, please follow the steps at http://source.android.com/source/index.html to set up the environment. You will need the tool chain from AOSP to build the Android kernel code. The tool chain is in the code base of AOSP source codes, or you can get it from somewhere else you could find, please put the tool chain in your path.
Please unzip and put the Android kernel source code in your project directory, for example,
/home/dave/Project/kernels/. Before start building the kernel, you may want to take a look at the build instructions that comes together with the Android kernel source codes, such as a readme.txt file in the directory, or any instructions the OEM lists on their website.
I happened to look at the Android kernels recently published at http://htcdev.com/devcenter/downloads ,
In the download file, there is a readme.txt, which contains the commands recommended to be used to build the kernel, including the instructions to set the path of the tool chain.
After finishing building the kernel, you may try to push some modules you just built on to you device. Please note that you may need to run at root privilege to do this.
Please make sure to back up your personal data, device settings, ect.., anytime you flash your devices with customized build module or rom, and make copy of the modules on your devices you are going to replace with the new modules, and this process is only for person with strong mobile technique experiences.
For example, if I want to put bluetooth driver module onto my device (but most of the time, all driver modules would be needed to push over to device to make the device work properly),
I will run the following commands:
adb remount
adb shell push ./drivers/bluetooth/bluetooth-power.ko system/lib/modules/
adb shell chmod 644 system/lib/modules/*
adb reboot
In case your devices got stuck to start up, you may need to run recovery and reset the device to factory settings (!!!! you would lose data on your device !!!!), you may need to put back the original modules you have backed up, or in the worst case, you may run to boot loader mode and select the recovery or reset options from the menu, or run the recovery and reset command from the adb shell.
Wednesday, December 05, 2012
Download Android kernels published by OEMs
Android is an open source project under GPL licences. OEMs under these licenses are obliged to publish the kernels they modified and used in their products.
The major players in the field of Android devices including the following OEMs including Google:
Google Inc (Android creator), Huawei (Android mobile devices), HTC (Android mobile devices), LG (Android mobile devices), Motorola (Android mobile devices), Samsung (Android mobile devices), Sony (Android mobile devices), ZTE in the alphabetic order.
Google's contributions to the kernel source codes are released in the Android Open Source Project at http://source.android.com/
The download sites of the kernel source codes from other OEMs
Huawei - http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&type=software
HTC - http://htcdev.com/devcenter/downloads
LG- http://www.lg.com/global/support/opensource/opensource.jsp
Motorola - http://sourceforge.net/motorola/
Samsung - http://opensource.samsung.com/index.jsp
Sony - http://developer.sonymobile.com/downloads/opensource/
ZTE - http://supporthk.zte.com.cn/support/news/NewsDetail.aspx?newsId=1002402 for example
The major players in the field of Android devices including the following OEMs including Google:
Google Inc (Android creator), Huawei (Android mobile devices), HTC (Android mobile devices), LG (Android mobile devices), Motorola (Android mobile devices), Samsung (Android mobile devices), Sony (Android mobile devices), ZTE in the alphabetic order.
Google's contributions to the kernel source codes are released in the Android Open Source Project at http://source.android.com/
The download sites of the kernel source codes from other OEMs
Huawei - http://www.huaweidevice.com/worldwide/downloadCenter.do?method=index&type=software
HTC - http://htcdev.com/devcenter/downloads
LG- http://www.lg.com/global/support/opensource/opensource.jsp
Motorola - http://sourceforge.net/motorola/
Samsung - http://opensource.samsung.com/index.jsp
Sony - http://developer.sonymobile.com/downloads/opensource/
ZTE - http://supporthk.zte.com.cn/support/news/NewsDetail.aspx?newsId=1002402 for example
Monday, December 03, 2012
Old Nexus 7 received 4.2.1 update
It was days ago my old Nexus 7 got update of 4.2.1, the latest version of Android Jelly Bean.
So now I am checking what is new in Jelly Bean 4.2.1.
First look at the home screen. From the top of the layout, the notifications are on the left the notification bar, and on the right side there is the status bar, user can pull the bar down and check the details.
As always, the voice enabled Google search is on top of the home screen, user can tap on the voice search icon to start voice search. Looks like it would take the speech engine to learn your accents, and after that, the returned results are more accurate.
The application tray at the bottom of the home screen do not change at all, but in the Android site, it says the application tray is a new feature. Am I getting it wrong?
OK, now I see the several more Wallpapers than I used to have with Jelly Bean 4.1, and I can also use the "Day Dream" to display content.
What I really like in this update are new features in developer options, specifically it enable OpenGL traces and simulation of 2nd display.
So now I am checking what is new in Jelly Bean 4.2.1.
First look at the home screen. From the top of the layout, the notifications are on the left the notification bar, and on the right side there is the status bar, user can pull the bar down and check the details.
As always, the voice enabled Google search is on top of the home screen, user can tap on the voice search icon to start voice search. Looks like it would take the speech engine to learn your accents, and after that, the returned results are more accurate.
The application tray at the bottom of the home screen do not change at all, but in the Android site, it says the application tray is a new feature. Am I getting it wrong?
OK, now I see the several more Wallpapers than I used to have with Jelly Bean 4.1, and I can also use the "Day Dream" to display content.
What I really like in this update are new features in developer options, specifically it enable OpenGL traces and simulation of 2nd display.
Subscribe to:
Posts (Atom)