Yogi,

I have:

setprop hw.nobattery false

in my init.rc file, you'd change that to "true" and if you look at
"frameworks/base/services/java/com/android/server/BatteryService.java"
around line #138 (on my 2.1 Eclair at least) you'll see the property
being checked and setting hwNoBattery. Now in the update() function
around line #218, it either calls stubUpdate() or native_update()
based on this variable. Since you don't have a bettery, stubUpdate
will get called and things will behave better..

Regards
-- Ashwin



On Tue, Nov 2, 2010 at 5:35 AM, yogi <mails.yog...@gmail.com> wrote:
> Thanks ASHWIN and DEVA
>
> @Ashwin - There is no keyword "hw.nobattery " in init.rc, can you
> please give little detail, how to add this line and where in init.rc
> @Deva - This patch is not looking for ARM, do you have battery patch
> for ARM.
>
> Once again thanks for reply.
> Yogesh Sharma
>
> On Oct 29, 6:36 pm, Deva R <r.deva...@gmail.com> wrote:
>> just check group archive, this battery service issue is a common
>> problem for all new platforms.,
>>
>> repost 
>> fromhttp://groups.google.com/group/android-porting/browse_thread/thread/5...
>>
>> >E/AndroidRuntime(  883): java.lang.UnsatisfiedLinkError: native_update
>> >E/AndroidRuntime(  883):        at
>> >com.android.server.BatteryService.native_update(Native Method)
>> >E/AndroidRuntime(  883):        at
>>
>> till proper battery interface is up, u need to fake battery interface
>> to keep android going.
>> almost all new android ports will hit this block.,
>> you can look for hints/issues-history on similar line.,
>> below is a commit, probably submitted for battery 
>> issue.http://dev.omapzoom.org/?p=aboateng/omap3-linux-cam.git;a=commitdiff;...
>>
>> --
>> Regards,
>> Devawww.bittoggler.com
>>
>>
>>
>> On Fri, Oct 29, 2010 at 6:32 PM, Ashwin Bihari <abih...@gmail.com> wrote:
>> > Your answer is right in the log at:
>>
>> > W/dalvikvm(  898): No implementation found for native Lcom/android/
>> > server/BatteryService;.native_update ()V
>> > W/dalvikvm(  898): threadid=7: thread exiting with uncaught exception
>> > (group=0x40020828)
>> > E/AndroidRuntime(  898): *** FATAL EXCEPTION IN SYSTEM PROCESS:
>> > android.server.ServerThread
>> > E/AndroidRuntime(  898): java.lang.UnsatisfiedLinkError: native_update
>> > E/AndroidRuntime(  898):        at
>> > com.android.server.BatteryService.native_update(Native Method)
>> > E/AndroidRuntime(  898):        at
>> > com.android.server.BatteryService.update(BatteryService.java:208)
>> > E/AndroidRuntime(  898):        at
>> > com.android.server.BatteryService.<init>(BatteryService.java:134)
>> > E/AndroidRuntime(  898):        at
>> > com.android.server.ServerThread.run(SystemServer.java:146)
>>
>> > In your init.rc, set the value "hw.nobattery true" and you should be all 
>> > set..
>>
>> > Regards
>> > -- Ashwin
>>
>> > On Fri, Oct 29, 2010 at 7:21 AM, yogi <mails.yog...@gmail.com> wrote:
>> >> Hi All
>>
>> >> I am porting froyo2.2.1 to 2.6.34.7 kernel on ARM board.
>> >> I can see the "ANDROID" bootanimation is running on the screen, but it
>> >> stuck there and restart after some time. Following messages keep
>> >> repeating.
>> >> Following are logcat messages -
>>
>> >> --------- beginning of /dev/log/main
>> >> I/DEBUG   (  848): debuggerd: Oct 20 2010 09:44:12
>> >> I/Netd    (  847): Netd 1.0 starting
>> >> --------- beginning of /dev/log/system
>> >> I/Vold    (  846): Vold 2.1 (the revenge) firing up
>> >> D/Vold    (  846): Volume sdcard state changing -1 (Initializing) -> 0
>> >> (No-Media)
>> >> W/Vold    (  846): No UMS switch available
>> >> D/AndroidRuntime(  850):
>> >> D/AndroidRuntime(  850): >>>>>>>>>>>>>> AndroidRuntime START
>> >> <<<<<<<<<<<<<<
>> >> D/AndroidRuntime(  850): CheckJNI is ON
>> >> I/        (  851): ServiceManager: 0xacd0
>> >> W/AudioHardwareInterface(  851): Using stubbed audio hardware. No
>> >> sound will be produced.
>> >> D/AudioHardwareInterface(  851): setMode(NORMAL)
>> >> I/CameraService(  851): CameraService started: pid=851
>> >> I/AudioFlinger(  851): AudioFlinger's thread 0xb378 ready to run
>> >> D/AndroidRuntime(  850): --- registering native functions ---
>> >> I/SamplingProfilerIntegration(  850): Profiler is disabled.
>> >> I/Zygote  (  850): Preloading classes...
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 816 objects / 47208 bytes in 5ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 219 objects / 13560 bytes in 8ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 253 objects / 14336 bytes in 11ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 466 objects / 28872 bytes in 9ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 2090 objects / 108312 bytes in
>> >> 11ms
>> >> W/MediaProfiles(  850): could not find media config xml file
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 279 objects / 15968 bytes in 11ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 5017 objects / 223208 bytes in
>> >> 23ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 11314 objects / 384152 bytes in
>> >> 29ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 9826 objects / 462984 bytes in
>> >> 32ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 8679 objects / 422824 bytes in
>> >> 35ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 7801 objects / 462496 bytes in
>> >> 37ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 7482 objects / 462384 bytes in
>> >> 37ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 7712 objects / 459488 bytes in
>> >> 38ms
>> >> D/dalvikvm(  850): GC_FOR_MALLOC freed 7326 objects / 458128 bytes in
>> >> 39ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 1062 objects / 80664 bytes in
>> >> 35ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 596 objects / 29120 bytes in 35ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 449 objects / 24920 bytes in 37ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 308 objects / 35128 bytes in 50ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 279 objects / 18968 bytes in 51ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 341 objects / 18432 bytes in 53ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 449 objects / 28312 bytes in 53ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 529 objects / 53192 bytes in 58ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 623 objects / 34016 bytes in 59ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 861 objects / 46952 bytes in 59ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 1747 objects / 85576 bytes in
>> >> 60ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 447 objects / 29456 bytes in 60ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 315 objects / 20168 bytes in 61ms
>> >> I/Zygote  (  850): ...preloaded 1265 classes in 21503ms.
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 99 objects / 13904 bytes in 61ms
>> >> I/Zygote  (  850): Preloading resources...
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 312 objects / 15552 bytes in 62ms
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801e8 (res/
>> >> drawable-mdpi/jog_tab_bar_left_end_confirm_gray.9.png) that varies
>> >> with configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801ec (res/
>> >> drawable-mdpi/jog_tab_bar_left_end_normal.9.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801ed (res/
>> >> drawable-mdpi/jog_tab_bar_left_end_pressed.9.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801f1 (res/
>> >> drawable-mdpi/jog_tab_bar_right_end_confirm_gray.9.png) that varies
>> >> with configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801f5 (res/
>> >> drawable-mdpi/jog_tab_bar_right_end_normal.9.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801f6 (res/
>> >> drawable-mdpi/jog_tab_bar_right_end_pressed.9.png) that varies with
>> >> configuration!!
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 392 objects / 23904 bytes in 64ms
>> >> W/Zygote  (  850): Preloaded drawable resource #0x10801fb (res/
>> >> drawable-mdpi/jog_tab_left_confirm_gray.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x1080200 (res/
>> >> drawable-mdpi/jog_tab_left_normal.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x1080201 (res/
>> >> drawable-mdpi/jog_tab_left_pressed.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x1080203 (res/
>> >> drawable-mdpi/jog_tab_right_confirm_gray.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x1080209 (res/
>> >> drawable-mdpi/jog_tab_right_normal.png) that varies with
>> >> configuration!!
>> >> W/Zygote  (  850): Preloaded drawable resource #0x108020a (res/
>> >> drawable-mdpi/jog_tab_right_pressed.png) that varies with
>> >> configuration!!
>> >> I/Zygote  (  850): ...preloaded 61 resources in 895ms.
>> >> I/Zygote  (  850): ...preloaded 15 resources in 23ms.
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 331 objects / 19960 bytes in 63ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 111 objects / 4392 bytes in 63ms
>> >> D/dalvikvm(  850): GC_EXPLICIT freed 2 objects / 48 bytes in 62ms
>> >> I/dalvikvm(  850): System server process 898 has been created
>> >> I/Zygote  (  850): Accepting command socket connections
>> >> E/BatteryService(  898): Could not open /sys/class/power_supply
>> >> I/sysproc (  898): Entered system_init()
>> >> I/sysproc (  898): ServiceManager: 0x126150
>> >> I/SurfaceFlinger(  898): SurfaceFlinger is starting
>> >> I/SurfaceFlinger(  898): SurfaceFlinger's main thread ready to run.
>> >> Initializing graphics H/W...
>> >> E/SurfaceFlinger(  898): Couldn't open /sys/power/wait_for_fb_sleep
>> >> or /sys/power/wait_for_fb_wake
>> >> I/gralloc (  898): using (fd=23)
>> >> I/gralloc (  898): id           = diamondfb
>> >> I/gralloc (  898): xres         = 800 px
>> >> I/gralloc (  898): yres         = 480 px
>> >> I/gralloc (  898): xres_virtual = 800 px
>> >> I/gralloc (  898): yres_virtual = 960 px
>> >> I/gralloc (  898): bpp          = 16
>> >> I/gralloc (  898): r            = 11:5
>> >> I/gralloc (  898): g            =  5:6
>> >> I/gralloc (  898): b            =  0:5
>> >> I/gralloc (  898): width        = 127 mm (160.000000 dpi)
>> >> I/gralloc (  898): height       = 76 mm (160.421051 dpi)
>> >> I/gralloc (  898): refresh rate = 288.68 Hz
>> >> D/libEGL  (  898): egl.cfg not found, using default config
>> >> D/libEGL  (  898): loaded /system/lib/egl/libGLES_android.so
>> >> I/SurfaceFlinger(  898): EGL informations:
>> >> I/SurfaceFlinger(  898): # of configs : 8
>> >> I/SurfaceFlinger(  898): vendor    : Android
>> >> I/SurfaceFlinger(  898): version   : 1.4 Android META-EGL
>> >> I/SurfaceFlinger(  898): extensions: EGL_KHR_image EGL_KHR_image_base
>> >> EGL_KHR_image_pixmap EGL_ANDROID_image_native_buffer
>> >> EGL_ANDROID_swap_rectangle EGL_ANDROID_get_render_buffer
>> >> I/SurfaceFlinger(  898): Client API: OpenGL ES
>> >> I/SurfaceFlinger(  898): EGLSurface: 5-6-5-0, config=0x1000000
>> >> I/SurfaceFlinger(  898): flags     : 001c0000
>> >> W/SurfaceFlinger(  898): ro.sf.lcd_density not defined, using 160 dpi
>> >> by default.
>> >> I/SurfaceFlinger(  898): OpenGL informations:
>> >> I/SurfaceFlinger(
>>
>> ...
>>
>> read more »- Hide quoted text -
>>
>> - Show quoted text -
>
> --
> unsubscribe: android-porting+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to