Is there any doc exist for porting android 1.5 into x86

19 views
Skip to first unread message

GrainWang

unread,
May 22, 2009, 3:15:40 AM5/22/09
to android-porting
Dear friends:
I'm a fresh guy on Android system. And have the following
questions:
1. Is there any stable release that fit x86 net book? I heard
the name “cupcake”, but it semed to be a float branch?
2. Is the “asus eee701” project in "cupcake" only fit for asus’s
net books? Or it’s fit for any x86 based net books?
3. The latest stable version that fit for x86 is?
4. The OpenCore's version in "cupcake" now is very old, in
"android-sdk-1.5r1" which is also a stable release, the OpenCore's
version is much newer(V2.02), so I doubt that if there is possibilty
that I put the eee701 project into "android-sdk-1.5r1" and without
mofication it'll work on x86 net books, or should I port V2.02's
version into "cupcake" branch,I completely have no idea which way is
better, as I have little knowledge in eee701 project, and does not
know what this project acturally do and how to do.
5. Is any version that fit for x86 and contain OpenCore’s newer
versions (V2.01 or V2.02)?
6. Is there any doc exist for port "android-sdk-1.5r1" into x86?

Thanks in advance!

GrainWang

unread,
May 22, 2009, 3:21:59 AM5/22/09
to android-porting
Dear friends:
I'm a fresh guy on Android system. And have the following
questions:
1. Is there any stable release that fit x86 net book? I heard
the name “cupcake”, but it semed to be a float branch?
2. Is the “asus eee701” project in "cupcake" only fit for
asus’s
net books? Or it’s fit for any x86 based net books?
3. The latest stable version that fit for x86 is?
4. The OpenCore's version in "cupcake" now is very old, in
"android-sdk-1.5r1" which is also a stable release, the OpenCore's
version is much newer(V2.02), so I doubt that if there is possibilty
that I put the eee701 project into "android-sdk-1.5r1" and without
mofication it'll work on x86 net books, or should I port V2.02's
version into "cupcake" branch,I completely have no idea which way is
better, as I have little knowledge in eee701 project, and does not
know what this project do acturally and how to do.
5. Is any version that fit for x86 and contain OpenCore’s newer
versions (V2.01 or V2.02)?
6. Is there any doc exist for porting android 1.5 into x86?

Thanks in advance!


zqqa zqqa

unread,
May 25, 2009, 11:12:18 PM5/25/09
to android...@googlegroups.com
2.       Is the “asus eee701” project in "cupcake" only fit for asus’s
net books? Or it’s fit for any x86 based net books?
 
no,it can use in any x86 platform.please visit http://code.google.com/p/live-android.
it bases on asus eee701” project in "cupcake".

2009/5/22 GrainWang <wlc...@yahoo.com.cn>

Yi Sun

unread,
May 25, 2009, 11:55:43 PM5/25/09
to android...@googlegroups.com
On Tue, 2009-05-26 at 11:12 +0800, zqqa zqqa wrote:
> 2. Is the “asus eee701” project in "cupcake" only fit for asus’s
> net books? Or it’s fit for any x86 based net books?
>
> no,it can use in any x86 platform.please visit
> http://code.google.com/p/live-android.
> it bases on asus eee701” project in "cupcake".
>
>
> 2009/5/22 GrainWang <wlc...@yahoo.com.cn>
>
> Dear friends:
> I'm a fresh guy on Android system. And have the
> following
> questions:
> 1. Is there any stable release that fit x86 net book? I
> heard
> the name “cupcake”, but it semed to be a float branch?
no, there is no stable release even we are trying to create one. But at
the moment, I'm still looking for a server with enough space to host the
source tree.
> 2. Is the “asus eee701” project in "cupcake" only fit
> for asus’s
> net books? Or it’s fit for any x86 based net books?
You should be able to boot up eee701 on most of the x86 machines, but,
you will need to take care of the devices on your platform to make sure
they works fine.
> 3. The latest stable version that fit for x86 is?
See code.google.com/p/patch-hosting-for-android-x86-support to
understand how to build a x86 enabled android.
> 4. The OpenCore's version in "cupcake" now is very old,
> in
> "android-sdk-1.5r1" which is also a stable release, the
> OpenCore's
> version is much newer(V2.02), so I doubt that if there is
> possibilty
> that I put the eee701 project into "android-sdk-1.5r1" and
> without
> mofication it'll work on x86 net books, or should I port
> V2.02's
> version into "cupcake" branch,I completely have no idea which
> way is
> better, as I have little knowledge in eee701 project, and does
> not
> know what this project acturally do and how to do.
YOu should be able to build opencore for x86. See
code.google.com/p/patch-hosting-for-android-x86-support to understand
how to build a x86 enabled android.
>
> 5. Is any version that fit for x86 and contain
> OpenCore’s newer
> versions (V2.01 or V2.02)?
> 6. Is there any doc exist for port "android-sdk-1.5r1"
> into x86?
>
You don't need to worry about SDK for the moment. What you need to do is
to
1. check out cupcake,
2. check out eee701 project
3. apply all the patches listed in
code.google.com/p/patch-hosting-for-android-x86-support
4. rebuild android

If you have problem to build your tree for x86 with the patches you get
from code.google.com/p/patch-hosting-for-android-x86-support, you can
send e-mail to this list for answers.
>
> Thanks in advance!
> >

GrainWang

unread,
May 26, 2009, 1:45:03 AM5/26/09
to android-porting
HI zqqa:
Thanks for your efficent help. I'll try it.

On 5月26日, 上午11时12分, zqqa zqqa <gzq...@gmail.com> wrote:
> 2. Is the "asus eee701" project in "cupcake" only fit for asus's
> net books? Or it's fit for any x86 based net books?
>
> no,it can use in any x86 platform.please visithttp://code.google.com/p/live-android.
> it bases on asus eee701" project in "cupcake".
>
> 2009/5/22 GrainWang <wlc...@yahoo.com.cn>
>
>
>
>
>
> > Dear friends:
> > I'm a fresh guy on Android system. And have the following
> > questions:
> > 1. Is there any stable release that fit x86 net book? I heard
> > the name "cupcake", but it semed to be a float branch?
> > 2. Is the "asus eee701" project in "cupcake" only fit for asus's
> > net books? Or it's fit for any x86 based net books?
> > 3. The latest stable version that fit for x86 is?
> > 4. The OpenCore's version in "cupcake" now is very old, in
> > "android-sdk-1.5r1" which is also a stable release, the OpenCore's
> > version is much newer(V2.02), so I doubt that if there is possibilty
> > that I put the eee701 project into "android-sdk-1.5r1" and without
> > mofication it'll work on x86 net books, or should I port V2.02's
> > version into "cupcake" branch,I completely have no idea which way is
> > better, as I have little knowledge in eee701 project, and does not
> > know what this project acturally do and how to do.
> > 5. Is any version that fit for x86 and contain OpenCore's newer
> > versions (V2.01 or V2.02)?
> > 6. Is there any doc exist for port "android-sdk-1.5r1" into x86?
>
> > Thanks in advance!- 隐藏被引用文字 -
>
> - 显示引用的文字 -

GrainWang

unread,
May 26, 2009, 2:22:51 AM5/26/09
to android-porting
HI YiSun:
Thanks for your efficent help. I have breifly tried the
website,and corresponding method for about 2days. Now have the
following issues:
1. As I know,"cupcake" is a float branch,and "eee701" project is
not included in"cupcake", and it seemed that "eee701" project is
rarely updated,and "cupcake" are always changing,so could they match
now?
2. Can I use "eee701" project to use with"master branch"?
3. I started downloading cupcake on 2009,05,21,finished on
2009,05,25,and when checking out the eee701 project,the repo sync
found cupcake changed,and downloaded the changed part, when building
using "TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true
make -j4 installer_img", found that "Please rename "vendor/asus/
eee_701/Android.mk" to "vendor/asus/eee_701/AndroidBoard.mk", and did
as guided, found that 'com.google.android.maps error"(I don't rember
this error information clearly),modified the "generic_with_google.mk"
and it passed,but the compilation process always show something like
'arm",and when finished,I can't find the correpoding image file.
4. I'm sorry that I can't understand the apply patches part, I
checked this part,mostly bug related, so I did not aplly the patches,
will this cause that the packages built can't be loading and demo the
basic funcions?
Thanks again!
> >                Thanks in advance!- 隐藏被引用文字 -
>
> - 显示引用的文字 -- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Yi Sun

unread,
May 26, 2009, 2:35:53 AM5/26/09
to android...@googlegroups.com
On Mon, 2009-05-25 at 23:22 -0700, GrainWang wrote:
> HI YiSun:
> Thanks for your efficent help. I have breifly tried the
> website,and corresponding method for about 2days. Now have the
> following issues:
> 1. As I know,"cupcake" is a float branch,and "eee701" project is
> not included in"cupcake", and it seemed that "eee701" project is
> rarely updated,and "cupcake" are always changing,so could they match
> now?
The eee701 project only has some makefile changes to make Android to
build for x86 target. There are not much of eeepc specific things. So,
as long as you make your make file correct, you should be able to use
most of the code from standard Android release
> 2. Can I use "eee701" project to use with"master branch"?
Yes, there is one as matter fact.
> 3. I started downloading cupcake on 2009,05,21,finished on
> 2009,05,25,and when checking out the eee701 project,the repo sync
> found cupcake changed,and downloaded the changed part, when building
> using "TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true
> make -j4 installer_img", found that "Please rename "vendor/asus/
> eee_701/Android.mk" to "vendor/asus/eee_701/AndroidBoard.mk", and did
> as guided, found that 'com.google.android.maps error"(I don't rember
> this error information clearly),modified the "generic_with_google.mk"
> and it passed,but the compilation process always show something like
> 'arm",and when finished,I can't find the correpoding image file.
Check out/target/product directory to see if you have an eee701
directory there. I'm updating my tree and will try it out as well.
> 4. I'm sorry that I can't understand the apply patches part, I
> checked this part,mostly bug related, so I did not aplly the patches,
> will this cause that the packages built can't be loading and demo the
> basic funcions?
Yes, you have to apply all these patches. Otherwise, I don't think you
can even build your tree.

GrainWang

unread,
May 26, 2009, 3:06:24 AM5/26/09
to android-porting
HI YiSun:
Thanks for your quick responce and great help!

On 5月26日, 下午2时35分, Yi Sun <beyo...@gmail.com> wrote:
> On Mon, 2009-05-25 at 23:22 -0700, GrainWang wrote:
> > HI YiSun:
> >     Thanks for your efficent help. I have breifly tried the
> > website,and corresponding method for about 2days. Now have the
> > following issues:
> >      1. As I know,"cupcake" is a float branch,and "eee701" project is
> > not included in"cupcake", and it seemed that "eee701" project is
> > rarely updated,and "cupcake" are always changing,so could they match
> > now?
>
> The eee701 project only has some makefile changes to make Android to
> build for x86 target. There are not much of eeepc specific things. So,
> as long as you make your make file correct, you should be able to use
> most of the code from standard Android release>      2. Can I use "eee701" project to use with"master branch"?
>
> Yes, there is one as matter fact.>
What does this actully mean, mean that I checkout the master
branch,and follow the steps mentioned in your website, such as
download eee701 project,apply patches, and I can do a master version
x86's android?

     3. I started downloading cupcake on 2009,05,21,finished on
> > 2009,05,25,and when checking out the eee701 project,the repo sync
> > found cupcake  changed,and downloaded the changed part, when building
> > using "TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true
> > make -j4 installer_img", found that "Please rename "vendor/asus/
> > eee_701/Android.mk" to "vendor/asus/eee_701/AndroidBoard.mk", and did
> > as guided, found that 'com.google.android.maps error"(I don't rember
> > this error information clearly),modified the "generic_with_google.mk"
> > and it passed,but the compilation process always show something like
> > 'arm",and when finished,I can't find the correpoding image file.
>
> Check out/target/product directory to see if you have an eee701
> directory there. I'm updating my tree and will try it out as well.>
How to check out the /target/product directly, after
compling,it's automaticly created,do you mean to checkout before
compling?
And How to get your tree?

     4. I'm sorry that I can't understand the apply patches part, I
> > checked this part,mostly bug related, so I did not aplly the patches,
> > will this cause that the packages built can't be loading and demo the
> > basic funcions?
>
> Yes, you have to apply all these patches. Otherwise, I don't think you
> can even build your tree.



How to apply patches, I'm a fresh guy about this, and I don't even
know the patches are for which files.

GrainWang

unread,
May 26, 2009, 3:49:48 AM5/26/09
to android-porting
HI YiSun:
Thanks for your great help.
When appling the patches, have the following issue. See the
message below:

|>From f4a2e330101cce7ee2e13a6b0a82c24f93923130 Mon Sep 17 00:00:00
2001
|From: Yi Sun <bey...@gmail.com>
|Date: Fri, 1 May 2009 17:46:54 -0700
|Subject: [PATCH] 1. added mouse cursor
|
|---
| core/java/android/view/RawInputEvent.java | 3 +-
| include/ui/EventHub.h | 3 +-
| libs/ui/EventHub.cpp | 4 +
| .../java/com/android/server/KeyInputQueue.java | 45 +++++---
| .../com/android/server/WindowManagerService.java | 120 +++++++++++
+++++++--
| 5 files changed, 150 insertions(+), 25 deletions(-)
|
|diff --git a/core/java/android/view/RawInputEvent.java b/core/java/
android/view/RawInputEvent.java
|index 30da83e..4d9a11a 100644
|--- a/core/java/android/view/RawInputEvent.java
|+++ b/core/java/android/view/RawInputEvent.java
--------------------------
File to patch: core/java/android/view/RawInputEvent.java
core/java/android/view/RawInputEvent.java: No such file or directory
Skip this patch? [y] n
: No such file or directory
Skip this patch? [y] n
File to patch: core/java/android/view/RawInputEvent.java
core/java/android/view/RawInputEvent.java: No such file or directory
Skip this patch? [y]


Why I'm wrong, I created a script file "bash_patch"with the content,
for patch in `pwd`/*patch ; do
project=`awk '/^project /{print $2}' $patch`
(cd $project && patch -p1 < $patch)
done

and cd /home/cupcake/framework/base
mkdir patches
cp -rf somepath/*.patch patches
cp -rf somepath/bash_path patches
./bash_patch

Yi Sun

unread,
May 26, 2009, 12:12:49 PM5/26/09
to android...@googlegroups.com
You try to apply the patches in the wrong directory. Look into the patch
and find out where you can run the patch.
Yi

GrainWang

unread,
May 26, 2009, 10:27:13 PM5/26/09
to android-porting
HI YiSun:
Thanks for your warmhelp. I have made a big progress though
still have the folling issue that needs your help

On 5月27日, 上午12时12分, Yi Sun <beyo...@gmail.com> wrote:
> You try to apply the patches in the wrong directory. Look into the patch
> and find out where you can run the patch.
I have tried your method. and successfuly applied several packages
except for atl2-2.2.3.patch,0001-1.-added-mouse-cursor.patch, 0001-1.-
enabled-power-mgt.patch,frameworks_v2.patch, for the left 4 patches,I
have tried every possibal path, but can't work,and always tell "./
bash_patch: line 3: ../atl2-2.2.3.patch :No such file or directory"
like message,so could you kindly tell me the paths for them,or how to
check this though the patchfiles.


> Yi
>
>
>
> On Tue, 2009-05-26 at 00:49 -0700, GrainWang wrote:
> > HI YiSun:
> >      Thanks for your great help.
> >      When appling the patches, have the following issue. See the
> > message below:
>
> > |>From f4a2e330101cce7ee2e13a6b0a82c24f93923130 Mon Sep 17 00:00:00
> > 2001
> > |From: Yi Sun <beyo...@gmail.com>

GrainWang

unread,
May 26, 2009, 11:15:03 PM5/26/09
to android-porting
HI YiSun:
The auto apply patch method is too complicated,and with your
help, I succesfully apply all the patches manually except 0001-1.-
enabled-power-mgt.patch, is this a out-of-day patch,I have seen that
both this patch and boot_able_img_v2.patch try to apply patch to the
init.rc in asus/eee_701 file. Am i right? If not,how to use the two
patches to the same object? Thanks!

On 5月27日, 上午12时12分, Yi Sun <beyo...@gmail.com> wrote:
> You try to apply the patches in the wrong directory. Look into the patch
> and find out where you can run the patch.
> Yi
>
>
>
> On Tue, 2009-05-26 at 00:49 -0700, GrainWang wrote:
> > HI YiSun:
> >      Thanks for your great help.
> >      When appling the patches, have the following issue. See the
> > message below:
>
> > |>From f4a2e330101cce7ee2e13a6b0a82c24f93923130 Mon Sep 17 00:00:00
> > 2001
> > |From: Yi Sun <beyo...@gmail.com>

Yi Sun

unread,
May 27, 2009, 12:19:18 AM5/27/09
to android...@googlegroups.com, android-porting
Ya,both patches are needed.But they have common parts and you will see
errors when you apply both patches.
The way to solve the error is to rollback the init.rc after you apply
the boot_able_img patch and the apply the power patch
Sorry for the inconvenience. It is on my to be fixed list

GrainWang

unread,
May 27, 2009, 1:42:15 AM5/27/09
to android-porting
HI YiSun:
Thanks for the great job you have done for all and the efficient
help to me,I'll roll back and try to apply the patches correctly and
do the compling again.

GrainWang

unread,
May 27, 2009, 4:27:40 AM5/27/09
to android-porting
HI YiSun:
After roll back and re-apply all the patches, it seemed that my
configurations are right,and compling the x86 branch now ,but there
are still other errors;
prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-
unknown-linux-gnu-gcc -m32 -o out/target/product/eee_701/obj/lib/
crtbegin_static.o -c bionic/libc/arch-x86/bionic/crtbegin_static.S
i686-unknown-linux-gnu-gcc: error trying to exec 'cc1': execvp: No
such file or directory
make: *** [out/target/product/eee_701/obj/lib/crtbegin_static.o] Error
1
make: *** Waiting for unfinished jobs....
prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-
unknown-linux-gnu-gcc -m32 -o out/target/product/eee_701/obj/lib/
crtbegin_so.o -c bionic/libc/arch-x86/bionic/crtbegin_so.S
i686-unknown-linux-gnu-gcc: error trying to exec 'cc1': execvp: No
such file or directory
make: *** [out/target/product/eee_701/obj/lib/crtbegin_so.o] Error 1
It semed that I have no compliers for assembly code. my host pc
is ubuntu8.04, gcc version is 4.2.4.
Thanks!

On 5月27日, 下午12时19分, Yi Sun <beyo...@gmail.com> wrote:

Yi Sun

unread,
May 27, 2009, 10:32:38 AM5/27/09
to android...@googlegroups.com
Could you tell me how did you created your tree? It seems that your
toolchain is incorrect. I think

GrainWang

unread,
May 30, 2009, 8:48:55 PM5/30/09
to android-porting
HI YiSun:
I did every thing that followed the guides,my steps are:
1.repo init -u git://android.git.kernel.org/platform/manifest.git
-b cupcake
2. repo sync
3. cd .repo
4.create local_manifest.xml file with contents exatly the same
as descripted in http://code.google.com/p/patch-hosting-for-android-x86-support/wiki/BuildAndroidForX86Platforms
5.cd ..
6.repo sync
7. . build/envsetup
8.TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true
make -j4 installer_img

Thanks in advance!
> ...
>
> 阅读更多 »- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Yi Sun

unread,
May 30, 2009, 9:23:45 PM5/30/09
to android...@googlegroups.com, android-porting
No need for step 7
BTW, I have fixed the init.rc patch.

GrainWang

unread,
May 30, 2009, 10:48:48 PM5/30/09
to android-porting
HI YiSun:
The same result when do not using step7,also are the steps "How to
build and install image for EeePC701" also the have-to-steps? I
modifid the all the .mk files and init.rc after appling the patch,but
I'm confused by this statement "compile kernel by disable VESA
framebuffer and enable follow features as module atl2.ko
cfbcopyarea.ko cfbimgblt.ko font.ko i915.ko bitblit.ko cfbfillrect.ko
drm.ko fbcon.ko i2c-algo-bit.ko intelfb.ko softcursor.ko ", I used the
"make menuconfig" to disabled the "VESA framebuffer", but I don't know
how to enable the .ko files? And how to build the kernels.
Thanks!

On 5月31日, 上午9时23分, Yi Sun <beyo...@gmail.com> wrote:
> No need for step 7
> BTW, I have fixed the init.rc patch.
>
> On May 30, 2009, at 5:48 PM, GrainWang <wlc...@yahoo.com.cn> wrote:
>
>
>
>
>
> > HI YiSun:
> >     I did every thing that followed the guides,my steps are:
> >     1.repo init -u git://android.git.kernel.org/platform/manifest.git
> > -b cupcake
> >      2. repo sync
> >      3. cd .repo
> >      4.create local_manifest.xml file with contents exatly the same
> > as descripted inhttp://code.google.com/p/patch-hosting-for-android-x86-support/wiki/B...

Yi Sun

unread,
May 31, 2009, 12:00:18 AM5/31/09
to android...@googlegroups.com, android-porting


Ok,I think you broke something when you apply the patches.
Could u create a new tree and apply the new patches I loaded to the
project page?
Just use go to each project dir and apply the patch by using git apply


On May 30, 2009, at 7:48 PM,

GrainWang

unread,
May 31, 2009, 1:44:04 AM5/31/09
to android-porting
HI YiSun:
Thanks for your suggestions! I'm now tring to get the code from
git again and do all the steps from the start again.

Luca Belluccini

unread,
May 31, 2009, 8:11:46 AM5/31/09
to android-porting
When I'll get ALSA work, I'll publish a doc explaining the key edits
to be done over original sources.
Any help for ALSA on x86 will be appreciated.
> ...
>
> leggi tutto

GrainWang

unread,
May 31, 2009, 9:33:42 PM5/31/09
to android-porting
HI YiSun:
The new patches confilt too. 0001*.patch and 0002*.patch try to
patch the same KeyInputQue.java and WindowManagerService.java, See the
log below
root@ubuntu:/home/cupcake_new/frameworks/base# git apply 0001-1.-fixed-
crash-caused-by-wrong-preload-class.patch
0001-1.-fixed-crash-caused-by-wrong-preload-class.patch:2427: trailing
whitespace.
(di, di.mDownTime, curTime,
0001-1.-fixed-crash-caused-by-wrong-preload-class.patch:2429: trailing
whitespace.
((ev.flags &
0001-1.-fixed-crash-caused-by-wrong-preload-class.patch:2430: trailing
whitespace.

WindowManagerPolicy.FLAG_WOKE_HERE)
0001-1.-fixed-crash-caused-by-wrong-preload-class.patch:2441: trailing
whitespace.
((classes&RawInputEvent.CLASS_MOUSE) !
= 0))) {
0001-1.-fixed-crash-caused-by-wrong-preload-class.patch:2464: trailing
whitespace.
if (false)
error: patch failed: services/java/com/android/server/
KeyInputQueue.java:278
error: services/java/com/android/server/KeyInputQueue.java: patch does
not apply
root@ubuntu:/home/cupcake_new/frameworks/base# pwd
/home/cupcake_new/frameworks/base
root@ubuntu:/home/cupcake_new/frameworks/base# cp /home/patch_new/0002-
fixed-screen-flicking-caused-by-wrong-mouse-location.patch .
root@ubuntu:/home/cupcake_new/frameworks/base# git apply 0002-fixed-
screen-flicking-caused-by-wrong-mouse-location.patch
0002-fixed-screen-flicking-caused-by-wrong-mouse-location.patch:112:
trailing whitespace.

RawInputEvent.CLASS_TOUCHSCREEN,
error: patch failed: services/java/com/android/server/
KeyInputQueue.java:41
error: services/java/com/android/server/KeyInputQueue.java: patch does
not apply
error: patch failed: services/java/com/android/server/
WindowManagerService.java:4578
error: services/java/com/android/server/WindowManagerService.java:
patch does not apply


It seemed that the path is not correct.I'll try on mysite. Thanks!
preloaded-classes.x86 | 1156 ++++++++
+++++++++++
.../java/com/android/server/KeyInputQueue.java | 45 +-
.../com/android/server/WindowManagerService.java | 120 ++-

On 5月31日, 下午12时00分, Yi Sun <beyo...@gmail.com> wrote:

GrainWang

unread,
May 31, 2009, 10:18:45 PM5/31/09
to android-porting
HI YiSun:
Also the frameworks patch was not included in "http://
code.google.com/p/patch-hosting-for-android-x86-support/downloads/
list" I have to use the old_patches now.

Thanks!

Yi Sun

unread,
May 31, 2009, 10:35:48 PM5/31/09
to android...@googlegroups.com
0002 should be applied on top of the 0001. I don't have conflict on my
tree. But anyway, I will combine them later.
For now, don't apply 0002 patch. Without it you should be fine for
now.

Yi Sun

unread,
May 31, 2009, 10:38:26 PM5/31/09
to android...@googlegroups.com
The frameworks patch is there. Somehow, the vendor patch is not there.
I'm loading it now

Yi Sun

unread,
May 31, 2009, 10:45:41 PM5/31/09
to android...@googlegroups.com
OK, loaded, try again

Yi Sun

unread,
May 31, 2009, 10:48:27 PM5/31/09
to android...@googlegroups.com
Could you send me the reject file? I tested it again. It works for me.

GrainWang

unread,
May 31, 2009, 11:42:18 PM5/31/09
to android-porting
HI YiSun:
It seemed that it's caused by another confict. Both your 0001-
fixed***.path and touch_screen.path try to modify KeyInputQueue.java.
So could you kindly tell mehow to deal with all the conflicts? such
as which patch should be applied first or something? Thanks!

Yi Sun

unread,
Jun 1, 2009, 12:24:31 AM6/1/09
to android...@googlegroups.com
Don't apply the touch screen patch. YOu don't need it either.
To build a normal 701 image, you only need:
0001-1*
alarm.patch
e2fsprogs.patch.
If you want to build kernel, then you need the kernel.config for your
kernel .config

I will need to update the wiki for this. We need to discuss about how to
continue to support android for x86. We get more patches come in, we
need to find a better way to do this.
We have already started to host a source tree, but tree merge is another
headache.
Yi

GrainWang

unread,
Jun 1, 2009, 5:26:19 AM6/1/09
to android-porting
HI YiSun:
I have applied the 4 patches(and only the 4 patches),
0001-1.-added-scripts-to-build-install-image.patch
0001-1.-fixed-crash-caused-by-wrong-preload-class.patch
alarm.patch
e2fsprogs.patch, but I'm so depressed that after 5 ours
building,it still hangup at
"Target Dex: framework", though there is little hope that it will
pass the build, I still hope that maybe tomorrow, I may got the
result.
See the brief log below. If still not pass tomorrow, I'll give
you all the compile logs and the correspoding source files after
appling the patches. Do you still need other infromation for helpping
me to find out the reason? Thanks in advance!
logs:
..........
Install: out/target/product/eee_701/system/bin/system_server
Install: out/target/product/eee_701/system/lib/libandroid_servers.so
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/
classes-full-debug.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/
classes.jar
target Dex: core-tests
Copying out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
classes-full-debug.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
classes.jar
target Dex: framework


On 6月1日, 上午10时35分, Yi Sun <beyo...@gmail.com> wrote:

Yi Sun

unread,
Jun 1, 2009, 12:18:12 PM6/1/09
to android...@googlegroups.com
I'm checking out the cupcake and rebuild the tree with all these patches
to see if I have the same issue. Otherwise, you may need to check your
build environment.

Yi Sun

unread,
Jun 1, 2009, 3:13:43 PM6/1/09
to android...@googlegroups.com
Ok, I have just checked out one new cupcake and built it with the patches I posted.  I did not see any problem. I attached my screen. Also, I apply the patch 0002*. It works as well.
I think your build env has issues. You may need to try to build the standard cupcake without any patches first to isolate the problem.
Yi



ote: Recompile with -Xlint:deprecation for details.
Copying out/target/common/obj/APPS/ApiDemosTests_intermediates/classes-full-debug.jar
Copying: out/target/common/obj/APPS/ApiDemosTests_intermediates/classes.jar
target Dex: ApiDemosTests
target Package: ApiDemosTests (out/target/product/eee_701/obj/APPS/ApiDemosTests_intermediates/package.apk)
Finding NOTICE files: out/target/product/eee_701/obj/NOTICE_FILES/hash-timestamp
Combining NOTICE files: out/target/product/eee_701/obj/NOTICE.html
gzip -c out/target/product/eee_701/obj/NOTICE.html > out/target/product/eee_701/obj/NOTICE.html.gz
Target system fs image: out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/system.img
tune2fs 1.41.4 (27-Jan-2009)
tune2fs -C 1 out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/system.img
tune2fs 1.41.4 (27-Jan-2009)
Setting current mount count to 1
e2fsck -fy out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/system.img ; [ $? -lt 4 ]
e2fsck 1.41.4 (27-Jan-2009)
Filesystem did not have a UUID; generating one.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? yes

Pass 4: Checking reference counts
Pass 5: Checking group summary information

system: ***** FILE SYSTEM WAS MODIFIED *****
system: 324/816 files (1.9% non-contiguous), 391629/411380 blocks
Install system fs image: out/target/product/eee_701/system.img
Installed file list: out/target/product/eee_701/installed-files.txt
ysun@ysun-desktop:~/android/cupcake_1.5$ ls
bionic  bootable  build  dalvik  development  external  frameworks  hardware  kernel  Makefile  out  packages  prebuilt  system  vendor
ysun@ysun-desktop:~/android/cupcake_1.5$ cd frameworks/base/
ysun@ysun-desktop:~/android/cupcake_1.5/frameworks/base$ git apply ~/Desktop/0002-fixed-screen-flicking-caused-by-wrong-mouse-location.patch
/home/ysun/Desktop/0002-fixed-screen-flicking-caused-by-wrong-mouse-location.patch:112: trailing whitespace.
                                                  RawInputEvent.CLASS_TOUCHSCREEN,
warning: 1 line adds whitespace errors.
ysun@ysun-desktop:~/android/cupcake_1.5/frameworks/base$

Yi Sun

unread,
Jun 1, 2009, 6:43:51 PM6/1/09
to android...@googlegroups.com
I also combine all the mouse cursor fixes as well. Now the 0002* is
removed.

GrainWang

unread,
Jun 1, 2009, 9:34:37 PM6/1/09
to android-porting
HI YiSun:
Thanks for your help. The compling process was over this morning.
I'll check later why it's so time consuming. Now I can boot android on
x86 netbook now. Just when boot from usb disk, it erases the WinXp I
installed, and only have the standard linux .so files and none of
Android software packages are included. Is there any configrations to
boot from usb and does not erase the hard disks? And is that the
intaller.img does not contain the Android software packages? Thanks
again for your efficent help. Now the most difficult part for my
porting is over.

On 6月2日, 上午6时43分, Yi Sun <beyo...@gmail.com> wrote:
> I also combine all the mouse cursor fixes as well. Now the 0002* is
> removed.
>
>
>
> On Mon, 2009-06-01 at 12:13 -0700, Yi Sun wrote:
> > Ok, I have just checked out one new cupcake and built it with the
> > patches I posted.  I did not see any problem. I attached my screen.
> > Also, I apply the patch 0002*. It works as well.
> > I think your build env has issues. You may need to try to build the
> > standard cupcake without any patches first to isolate the problem.
> > Yi
>
> > ote: Recompile with -Xlint:deprecation for details.
> > Copying
> > out/target/common/obj/APPS/ApiDemosTests_intermediates/classes-full-debug.j­ar
> > Copying:
> > out/target/common/obj/APPS/ApiDemosTests_intermediates/classes.jar
> > target Dex: ApiDemosTests
> > target Package: ApiDemosTests
> > (out/target/product/eee_701/obj/APPS/ApiDemosTests_intermediates/package.ap­k)
> > Finding NOTICE files:
> > out/target/product/eee_701/obj/NOTICE_FILES/hash-timestamp
> > Combining NOTICE files: out/target/product/eee_701/obj/NOTICE.html
> > gzip -c out/target/product/eee_701/obj/NOTICE.html >
> > out/target/product/eee_701/obj/NOTICE.html.gz
> > Target system fs image:
> > out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/sy­stem.img
> > tune2fs 1.41.4 (27-Jan-2009)
> > tune2fs -C 1
> > out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/sy­stem.img
> > tune2fs 1.41.4 (27-Jan-2009)
> > Setting current mount count to 1
> > e2fsck -fy
> > out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/sy­stem.img ; [ $? -lt 4 ]
> > e2fsck 1.41.4 (27-Jan-2009)
> > Filesystem did not have a UUID; generating one.
>
> > Pass 1: Checking inodes, blocks, and sizes
> > Pass 2: Checking directory structure
> > Pass 3: Checking directory connectivity
> > /lost+found not found.  Create? yes
>
> > Pass 4: Checking reference counts
> > Pass 5: Checking group summary information
>
> > system: ***** FILE SYSTEM WAS MODIFIED *****
> > system: 324/816 files (1.9% non-contiguous), 391629/411380 blocks
> > Install system fs image: out/target/product/eee_701/system.img
> > Installed file list: out/target/product/eee_701/installed-files.txt
> > ysun@ysun-desktop:~/android/cupcake_1.5$ ls
> > bionic  bootable  build  dalvik  development  external  frameworks
> > hardware  kernel  Makefile  out  packages  prebuilt  system  vendor
> > ysun@ysun-desktop:~/android/cupcake_1.5$ cd frameworks/base/
> > ysun@ysun-desktop:~/android/cupcake_1.5/frameworks/base$ git apply
> > ~/Desktop/0002-fixed-screen-flicking-caused-by-wrong-mouse-location.patch
> > /home/ysun/Desktop/0002-fixed-screen-flicking-caused-by-wrong-mouse-locatio­n.patch:112: trailing whitespace.
>
> > RawInputEvent.CLASS_TOUCHSCREEN,
> > warning: 1 line adds whitespace errors.
> > ysun@ysun-desktop:~/android/cupcake_1.5/frameworks/base$
>

Androidphan

unread,
Jun 2, 2009, 3:11:21 AM6/2/09
to android-porting
The most important thing for ALSA to work, is to get a working
asound.conf file.
Use alsa_ctl for this.
> > > >>>>>>>>>>> as guided,...
>
> read more »

GrainWang

unread,
Jun 5, 2009, 1:27:08 AM6/5/09
to android-porting
HI YiSun:
Sorry to bother you again. I tried the VirtualBox method, when
choose "std_boot", I just got black screen and I can't see any
messages or progesses for booting. Thanks!

On 6月2日, 上午6时43分, Yi Sun <beyo...@gmail.com> wrote:
> I also combine all the mouse cursor fixes as well. Now the 0002* is
> removed.
>
>
>
> On Mon, 2009-06-01 at 12:13 -0700, Yi Sun wrote:
> > Ok, I have just checked out one new cupcake and built it with the
> > patches I posted.  I did not see any problem. I attached my screen.
> > Also, I apply the patch 0002*. It works as well.
> > I think your build env has issues. You may need to try to build the
> > standard cupcake without any patches first to isolate the problem.
> > Yi
>
> > ote: Recompile with -Xlint:deprecation for details.
> > Copying
> > out/target/common/obj/APPS/ApiDemosTests_intermediates/classes-full-debug.j­ar
> > Copying:
> > out/target/common/obj/APPS/ApiDemosTests_intermediates/classes.jar
> > target Dex: ApiDemosTests
> > target Package: ApiDemosTests
> > (out/target/product/eee_701/obj/APPS/ApiDemosTests_intermediates/package.ap­k)
> > Finding NOTICE files:
> > out/target/product/eee_701/obj/NOTICE_FILES/hash-timestamp
> > Combining NOTICE files: out/target/product/eee_701/obj/NOTICE.html
> > gzip -c out/target/product/eee_701/obj/NOTICE.html >
> > out/target/product/eee_701/obj/NOTICE.html.gz
> > Target system fs image:
> > out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/sy­stem.img
> > tune2fs 1.41.4 (27-Jan-2009)
> > tune2fs -C 1
> > out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/sy­stem.img
> > tune2fs 1.41.4 (27-Jan-2009)
> > Setting current mount count to 1
> > e2fsck -fy
> > out/target/product/eee_701/obj/PACKAGING/systemimage_unopt_intermediates/sy­stem.img ; [ $? -lt 4 ]
> > e2fsck 1.41.4 (27-Jan-2009)
> > Filesystem did not have a UUID; generating one.
>
> > Pass 1: Checking inodes, blocks, and sizes
> > Pass 2: Checking directory structure
> > Pass 3: Checking directory connectivity
> > /lost+found not found.  Create? yes
>
> > Pass 4: Checking reference counts
> > Pass 5: Checking group summary information
>
> > system: ***** FILE SYSTEM WAS MODIFIED *****
> > system: 324/816 files (1.9% non-contiguous), 391629/411380 blocks
> > Install system fs image: out/target/product/eee_701/system.img
> > Installed file list: out/target/product/eee_701/installed-files.txt
> > ysun@ysun-desktop:~/android/cupcake_1.5$ ls
> > bionic  bootable  build  dalvik  development  external  frameworks
> > hardware  kernel  Makefile  out  packages  prebuilt  system  vendor
> > ysun@ysun-desktop:~/android/cupcake_1.5$ cd frameworks/base/
> > ysun@ysun-desktop:~/android/cupcake_1.5/frameworks/base$ git apply
> > ~/Desktop/0002-fixed-screen-flicking-caused-by-wrong-mouse-location.patch
> > /home/ysun/Desktop/0002-fixed-screen-flicking-caused-by-wrong-mouse-locatio­n.patch:112: trailing whitespace.
>
> > RawInputEvent.CLASS_TOUCHSCREEN,
> > warning: 1 line adds whitespace errors.
> > ysun@ysun-desktop:~/android/cupcake_1.5/frameworks/base$
>

Yi Sun

unread,
Jun 5, 2009, 1:43:33 AM6/5/09
to android...@googlegroups.com
push f12 and select the boot partition

GrainWang

unread,
Jun 7, 2009, 8:59:43 PM6/7/09
to android-porting
HI YiSun:
I got black srceen after pushing F12 buttom and choosing the boot
from "std_boot" as the guide. Thanks!

Yi Sun

unread,
Jun 7, 2009, 10:12:40 PM6/7/09
to android...@googlegroups.com
Are you ok now? Or you are still having problems?

GrainWang

unread,
Jun 7, 2009, 10:17:34 PM6/7/09
to android-porting
HI YiSun:
Yes, I still have the problem. Thanks!

Yi Sun

unread,
Jun 8, 2009, 12:52:49 AM6/8/09
to android...@googlegroups.com
I assume that your linux kernel boots up ok, And you box only turns to
block screen after launch up the Android. If I'm right, the black screen
could be caused by the wrong FB driver. Please rebuild your kernel to
use VESA fb and see if it works. Otherwise disable app_process and get
into the shell to debug.

GrainWang

unread,
Jun 8, 2009, 1:33:09 AM6/8/09
to android-porting
HI YiSun:
I applied four patches only,did not use the intelfb method you
supplied, so it should be VESA. Am I right? Also, How to disable the
app_process to get into shell? I dit not find the correspondinng
options for virtualbox. Thanks!

Yi Sun

unread,
Jun 8, 2009, 1:40:03 AM6/8/09
to android...@googlegroups.com
On Sun, 2009-06-07 at 22:33 -0700, GrainWang wrote:
> HI YiSun:
> I applied four patches only,did not use the intelfb method you
> supplied, so it should be VESA. Am I right?
No, if you did not rebuild the kernel, then you are using i915.

> Also, How to disable the
> app_process to get into shell? I dit not find the correspondinng
> options for virtualbox. Thanks!
>
Change the init.rc. Just disable following lines:
service zygote /system/bin/app_process -Xzygote /system/bin --zygote
--start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on

GrainWang

unread,
Jun 8, 2009, 4:06:15 AM6/8/09
to android-porting
HI YiSun:
app_process disbaled,still black screen,It should be Ok,maybe my
developping envirmont have unknown issues.I'm now tring to use another
PC(FC8) for doing so,hope it works. Do you think is it worth to try on
another machine? Thanks!

Yi Sun

unread,
Jun 8, 2009, 5:13:03 AM6/8/09
to android...@googlegroups.com
No, it should be a different issue. If you try alt-f1, do you see the
console prompt?

Androidphan

unread,
Jun 8, 2009, 9:02:00 AM6/8/09
to android-porting
Do more people have the problem that they don't see any battery icon
on the status bar? Does it supposed to be there with the battery patch?

Yi Sun

unread,
Jun 8, 2009, 9:01:50 PM6/8/09
to android...@googlegroups.com
I have never see it. But is you sys fs patch is worng, you could end up
with a red square with cross in it.

GrainWang

unread,
Jun 8, 2009, 9:17:09 PM6/8/09
to android-porting
NO console prompt. If there is console prompt, it's much easier.
Thanks!

Yi Sun

unread,
Jun 8, 2009, 11:02:14 PM6/8/09
to android...@googlegroups.com
Ok, do you see the kernel boot messages?

GrainWang

unread,
Jun 8, 2009, 11:31:35 PM6/8/09
to android-porting
No, just when boot from "std_boot", the console flahsed some message
"bzImage", and it's too fast(I can only remember this),after it. black
screen. Thanks!

Androidphan

unread,
Jun 10, 2009, 3:31:11 AM6/10/09
to android-porting
My sys fs paths are good. But the values of it are from 0 to 4338000
in stead of 0 - 100 like it normally is?

Yi Sun

unread,
Jun 10, 2009, 3:53:47 AM6/10/09
to android...@googlegroups.com
ACPI standard said :
(charge_now/charge_full) * scale
I thought I have posted the fix for this part in my earlier patches,
need to check it.

BTW-- if I remember it correct, the vold crash may cause you lost your
battery icon (I seems to remember it happens that way. It has been a
while already)

Androidphan

unread,
Jun 10, 2009, 4:15:20 AM6/10/09
to android-porting
I'm not using vold, but mountd.

Yi Sun

unread,
Jun 10, 2009, 4:28:49 AM6/10/09
to android...@googlegroups.com
Then, I don't have any idea for you :-( sorry.

Androidphan

unread,
Jun 10, 2009, 4:39:48 AM6/10/09
to android-porting
Now that I'm using vold again, it doesn't show a battery icon. It does
show a too big percentage level when I plug back in the power supply.

Yi Sun

unread,
Jun 10, 2009, 5:07:41 AM6/10/09
to android...@googlegroups.com
Ok, here is the thing you may need to dig into; you may need to debug
into statusbarservice code to see why your icon does not show up. Look
at the code in frameworks/base/service/java/com/android/server/status

Androidphan

unread,
Jun 10, 2009, 7:42:27 AM6/10/09
to android-porting
I found the problem. The BATTERY_CAPACITY_PATH is transfered to
mBatterLevel, in my code it was the total 'amount' of battery and the
BATTERY_VOLTAGE_PATH was the amount of battery left. This amount left
is now scaled to fit between 0 and 100. It has to be between these
numbers because the code searches an icon based on this number. If its
too high, it can't find an appropriate icon. Maybe this helps to other
people.

What I still need to do is to find out how Android can update the
battery more often. It's only updated when I unplug and plug the
adapter yet.

Yi Sun

unread,
Jun 10, 2009, 8:07:13 AM6/10/09
to android...@googlegroups.com
look at the update function in BatteryService.java. It is triggered by
uevent. And the icon will only be updated when cap dropped to certain
level.

Yi Sun

unread,
Jun 10, 2009, 8:08:12 AM6/10/09
to android...@googlegroups.com
I need to check the patches. I thought I have put this in.
On Wed, 2009-06-10 at 04:42 -0700, Androidphan wrote:

Yi Sun

unread,
Jun 10, 2009, 8:10:55 AM6/10/09
to android...@googlegroups.com
BTW-- Sometime, I don't see the uevent for battery capacity change hence
the battery icon is not updated. To solve it, I added a timer to call
the update function. But it may not be good for your battery life.
Reply all
Reply to author
Forward
0 new messages