LinuxConsulting

- Nicu Pavel personal page

PaNiC Random Rant (or how we used to call it: .plan)


Ethernet patch for Android Gingerbread


Finished porting the ethernet patch from android-x86 froyo branch to gingerbread and made them available on picopc android gingerbread repository here: https://gitorious.org/picopc-android-gingerbread (see the commits in frameworks-base, build and packages-apps-settings)

Changes from the android-x86 version:
- fixed static ip not being correctly setup
- added new icons for status bar
- changed status bar policy code

Remember to add dhcpcd_eth0 service in init.rc:

service dhcpcd_eth0 /system/bin/dhcpcd -BKL -d eth0 -dd
group system dhcp
disabled
oneshot


Direct download links to the patches:
patch /build repository
patch frameworks/base repository
patch /packages/apps/Settings repository

Labels:

3 Comments:

At August 4, 2011 at 10:48 AM , Blogger Bian Jiang said...

Hi Nicu:
I try to port this patch to ARM, when select, "Ethernet
configuration" got same error messages
. logcat:

I/ActivityManager( 111): Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.EthernetSettings } from pid 472
W/ApplicationContext( 472): Error getting service name:ethernet
D/AndroidRuntime( 472): Shutting down VM
W/dalvikvm( 472): threadid=1: thread exiting with uncaught exception (group=0x40015560)
I/EthernetManager( 472): Init Ethernet Manager, service: null
E/AndroidRuntime( 472): FATAL EXCEPTION: main
E/AndroidRuntime( 472): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.EthernetSettings}: java.lang.NullPointerException
E/AndroidRuntime( 472): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
E/AndroidRuntime( 472): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
E/AndroidRuntime( 472): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 472): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
E/AndroidRuntime( 472): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 472): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 472): at android.app.ActivityThread.main(ActivityThread.java:3647)
E/AndroidRuntime( 472): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 472): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 472): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 472): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 472): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 472): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 472): at android.net.ethernet.EthernetManager.getState(EthernetManager.java:131)
E/AndroidRuntime( 472): at com.android.settings.ethernet.EthernetEnabler.(EthernetEnabler.java:77)
E/AndroidRuntime( 472): at com.android.settings.EthernetSettings.initToggles(EthernetSettings.java:77)
E/AndroidRuntime( 472): at com.android.settings.EthernetSettings.onCreate(EthernetSettings.java:61)
E/AndroidRuntime( 472): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 472): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
E/AndroidRuntime( 472): ... 11 more
W/ActivityManager( 111): Force finishing activity com.android.settings/.EthernetSettings
W/ActivityManager( 111): Force finishing activity com.android.settings/.Settings
W/ActivityManager( 111): Activity pause timeout for HistoryRecord{407c9e68 com.android.settings/.EthernetSettings}
V/RenderScript_jni( 316): surfaceCreated
V/RenderScript_jni( 316): surfaceChanged

 
At January 27, 2012 at 3:38 PM , Blogger androidallover said...

hi, i have the same error. have you found any solution yet. thanks.

II

 
At October 4, 2012 at 2:57 AM , Blogger Krishnan said...

I was able to apply the patch and I could see the Ethernet Configuration settings in Gingerbread. However,the Ethernet Setting control does not reflect update when switching interfaces. So, If I switch between eth0, eth1, or dummy0 the data displayed in the Ethernet settings control never changes and just shows the last data that was actually saved. Any ideas on this?

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home