change uid
Just want to change uid itself.
For example, my uid is “user1″, I’d like to keep my configuration, home directory, etc, but I don’t like how it sounds.
Let’s say I want “avatar” instead of “user1″.
You can use “usermod -l “.
#usermod -l user1 avatar
Windows default background color code
I wanted to change background color of my Ubuntu system to Windows default background color, blue.
So I googled and found how to do that.
1. Open registry editor.
Start > Run > regedit
2. Find registry key.
HKEY_USERS\.DEFAULT\Control Panel\Colors
3. Check the value out in RGB format
Value name: Background
Value data: 0 78 152 (R G B format)
Yes, that’s my favorite color code.
official Android app development Q&A
Source:http://android-developers.blogspot.com/2009/12/hello-stack-overflow.html
beginner-level technical questions.
http://stackoverflow.com/questions/tagged/android
intermediate and expert users.
http://groups.google.com/group/android-developers
Rendering in WebKit
Thanks to Eric Seidel!
Nexus One is released
You can buy unlocked nexus one from here @ $529.00!
http://www.google.com/phone
2.1 (Eclair)
800 x 480 AMOLED
Qualcomm QSD 8250 1 GHz
512MB RAM/512MB Flash
GSM/UMTS/Wi-Fi/Bluetooth
Why Java 6 is not supported for android
JDK 5.0, update 12 or higher. Java 6 is not supported, because of incompatibilities with @Override.
WebCore Directory Structure
WebCore Directory Structure
WebCore/
bindings – houses the language-specific bindings for JavaScript and for Objective-C. It has two subdirectories, js and objc. The files that move here will come from khtml/ecma, ksvg/ecma, and also ksvg/bindings. Ultimately these language-specific bindings will be auto-generated from IDL files.
bridge – Bridge is about the bridging to the WebKit framework.
page – Code for the top-level page and frames. Was originally the khtml part and khtml view. We will be making this more abstract so that it can be bridged to either WebKit or another abstraction like the khtml part.
platform – Contains much of the engine-level plumbing (code from khtml/misc and kwq). This code will have platform-specific subdirectories, e.g., mac. Other ports can have their own subdirectories (Qt, GTK, Win32, etc.).
css – The CSS back end. This is consolidated from khtml/css and ksvg2/css.
editing – The editing infrastructure. This is moving from khtml/editing.
html – The HTML DOM. This is moving from khtml/html.
loader – Files that used to be in khtml/misc dealing with subresource loading.
svg – The SVG DOM. This is moving from ksvg2/svg.
xsl – Support for XSLT stylesheets. Moving from khtml/xsl.
xml – The XML DOM (base classes for the HTML+SVG DOMs). Moving from khtml/xml.
Source. http://webkit.org/blog/42/webcore-directory-structure/
How to get cache in Android Browser on Emulator
Sep 26 2009
On target, the behavior might be different.
For example, some target has no support of sqlite3.
1.Run emulator
Suppose that current directory is android source root directory.
Suppose that build is already done.
$. build/envsetup.sh
$lunch 1
$emulator&
2.Run WebKit cache db
$adb shell
Now adb shell is executed.
#cd /data/data/com.android.browser/databases/
Check db name.
#ls
webviewCache.db-journal
webviewCache.db
webview.db
browser.db
#sqlite3 webviewCache.db
SQLite version 3.5.9
3.Fetch cache data
sqlite>.table
android_metadata cache
sqlite>select * from cache;
1|http://www.google.com/m?client=ms-android-google|0ded30f8|||1255230307108|text/html|UTF-8|200||46635
2|http://www.gstatic.com/m/images/gp1.gif|4ab55f19|Mon, 06 Apr 2009 12:37:23 GMT||1285556709831|image/gif||200||4367
…
Suppose that we’re looking for html fine in 1st URL
schema of the cache table is as following.
sqlite> .schema cache
CREATE TABLE cache (_id INTEGER PRIMARY KEY, url TEXT, filepath TEXT, lastmodify TEXT, etag TEXT, expires INTEGER, mimetype TEXT, encoding TEXT,httpstatus INTEGER, location TEXT, contentlength INTEGER, UNIQUE (url) ON CONFLICT REPLACE);
CREATE INDEX cacheUrlIndex ON cache (url);
4.Find the cached file
Terminate query mode.
sqlite> .quit
Since 2nd column is filepath, check that file exists.
#cd ../cache/webviewCache/
#ls
…
0ded30f8
…
Termiate adb shell
#exit
5.Copy the file from Emulator to Host
$adb pull /data/data/com.android.browser/cache/webviewCache/0ded30f8 .
94 KB/s (46635 bytes in 0.484s)
$mv 0ded30f8 test.html
Now you have the HTML file.
How to rotate screen
How to rotate screen
1.If you want to rotate the emulator while it is running.
1.1.Switch to previous layout: use Num pad “7″(without num lock on), Ctrl-F11
1.2.Switch to next layout: use Num pad “9″(without num lock on), Ctrl-F12

2.If you want it from the code,
http://www.anddev.org/rotate_screen_from_code_change_screen_orientation-t2687.html
Android Platform Partial Build
Android Platform Partial Build
1. Modify default application
For example, AlarmClock.
Change app_label to “Alarm Clock Test” in packages/apps/Alarmclock/res/values/strings.xml
2.$. build/envsetup.sh
3.$lunch 1
Generic Or your target
4.$mmm packages/apps/AlarmClock
5.$make snod
It will build system.img quickly.
6.$emulator
You can see Alarm Clock label has changed to “Alarm Clock Test“. I used my name.

or if you want your system.img in your sdk.
6.1. $cp out/target/product/generic/system.img out/host/YOUR_OS/sdk/YOUR_SDK_PATH/tools/lib/images/
6.2. $out/host/YOUR_OS/sdk/YOUR_SDK_PATH/tools/emulator -wipe-data
Note.“make snod” would not check dependences.
If you change some code in the framework, then “make clean”.
