[DEV][Q] What's wrong with Sense GSM

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
Hi folks I want to ask. As you can see,I'm trying to port decently Sense ROM to P500. But GSM isn't working. For making it work i tried to use and import the following libs from devoid:

Code:
[B]/system/lib[/B]

libril-qc-1.so 
liboncrpc.so 
libdsm.so 
libqueue.so 
libdiag.so 
libauth.so 
libcm.so 
libnv.so 
libpbmlib.so 
libwms.so 
libwmsts.so 
libmmgsdilib.so 
libgsdi_exp.so 
libgstk_exp.so 
libril-qcril-hook-oem.so 
liboem_rapi.so 
libsnd.so 
libqmi.so 
libdll.so 
liblgeat.so 
liblgdrm.so 
liblgdrmwbxml.so 
liblgerft.so 
libbcmwl.so 
libdss.so 

[B]/system/bin[/B]

rild
But nothing. Mik also gave me a link of his sources,telling me that maybe I had to add some lg proprietary things.

Code:
[B]/system/bin[/B]

qmuxd
rmt_storage
port-bridge
wiperiface
tsdown
netmgrd 

[B]/system/etc[/B]

MELFAS_FIRM.bin (I know it's a TS thang,but just to be sure...)

[B]/system/lib[/B]

libsdutils.so
libnetmgr.so
Did I miss something? I don't think so. I've imported all libs specified here.

It's impossible! GSM Still isn't working. I'm now thinking it's a permission problem,found this in logcat:

Code:
W/PackageManager( 1405): Unknown permission android.permission.ACCESS_NETWORK_LOCATION in package com.htc.android.locationpicker
W/PackageManager( 1405): Unknown permission android.permission.ACCESS_NETWORK_LOCATION in package com.htc.htcsettingwidgets
E/ConnectivityService( 1405): Error in networkAttributes - ignoring attempt to adopt radio 6
Any ideas?
 
  • Like
Reactions: yasingedik

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
Zecanilis made a mistake here. Why moving it to general section? I'm talking about a PORTING,which is a DEV thing.

Sent from my LG Optimus One P500 using XDA App
 

Lawful123

Senior Member
Nov 30, 2010
298
49
0
Zecanilis made a mistake here. Why moving it to general section? I'm talking about a PORTING,which is a DEV thing.

I agree. Why? This is made by a dev who is talking dev. +1 to moving this back.
Sent from my LG Optimus One P500 using XDA App


Sent from my LG-P500 using XDA App
 

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
Ok here's my platform.xml:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
  
          http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- This file is used to define the mappings between lower-level system
     user and group IDs and the higher-level permission names managed
     by the platform.

     Be VERY careful when editing this file!  Mistakes made here can open
     big security holes.
-->
<permissions>

    <!-- ================================================================== -->
    <!-- ================================================================== -->
    <!-- ================================================================== -->

    <!-- The following tags are associating low-level group IDs with
         permission names.  By specifying such a mapping, you are saying
         that any application process granted the given permission will
         also be running with the given group ID attached to its process,
         so it can perform any filesystem (read, write, execute) operations
         allowed for that group. -->

    <permission name="android.permission.BLUETOOTH_ADMIN" >
        <group gid="net_bt_admin" />
    </permission>

    <permission name="android.permission.BLUETOOTH" >
        <group gid="net_bt" />
    </permission>

    <permission name="android.permission.INTERNET" >
        <group gid="inet" />
    </permission>

    <permission name="android.permission.CAMERA" >
        <group gid="camera" />
    </permission>

    <permission name="android.permission.READ_LOGS" >
        <group gid="log" />
    </permission>

    <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
        <group gid="sdcard_rw" />
    </permission>

    <!-- The group that /cache belongs to, linked to the permission
         set on the applications that can access /cache -->
    <permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
        <group gid="cache" />
    </permission>

    <!-- RW permissions to any system resources owned by group 'diag'.
         This is for carrier and manufacture diagnostics tools that must be
         installable from the framework. Be careful. -->
    <permission name="android.permission.DIAGNOSTIC" >
        <group gid="input" />
        <group gid="diag" />
    </permission>

    <!-- ================================================================== -->
    <!-- ================================================================== -->
    <!-- ================================================================== -->

    <!-- The following tags are assigning high-level permissions to specific
         user IDs.  These are used to allow specific core system users to
         perform the given operations with the higher-level framework.  For
         example, we give a wide variety of permissions to the shell user
         since that is the user the adb shell runs under and developers and
         others should have a fairly open environment in which to
         interact with the system. -->

    <!-- Standard permissions granted to the shell. -->
    <assign-permission name="android.permission.WRITE_EXTERNAL_STORAGE" uid="shell" />
    <assign-permission name="android.permission.SEND_SMS" uid="shell" />
    <assign-permission name="android.permission.CALL_PHONE" uid="shell" />
    <assign-permission name="android.permission.READ_CONTACTS" uid="shell" />
    <assign-permission name="android.permission.WRITE_CONTACTS" uid="shell" />
    <assign-permission name="android.permission.READ_OWNER_DATA" uid="shell" />
    <assign-permission name="android.permission.WRITE_OWNER_DATA" uid="shell" />
    <assign-permission name="android.permission.READ_CALENDAR" uid="shell" />
    <assign-permission name="android.permission.WRITE_CALENDAR" uid="shell" />
    <assign-permission name="android.permission.READ_USER_DICTIONARY" uid="shell" />
    <assign-permission name="android.permission.WRITE_USER_DICTIONARY" uid="shell" />
    <assign-permission name="android.permission.ACCESS_FINE_LOCATION" uid="shell" />
    <assign-permission name="android.permission.ACCESS_COARSE_LOCATION" uid="shell" />
    <assign-permission name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" uid="shell" />
    <assign-permission name="android.permission.ACCESS_NETWORK_STATE" uid="shell" />
    <assign-permission name="android.permission.ACCESS_WIFI_STATE" uid="shell" />
    <assign-permission name="android.permission.BLUETOOTH" uid="shell" />
    <!-- System tool permissions granted to the shell. -->
    <assign-permission name="android.permission.GET_TASKS" uid="shell" />
    <assign-permission name="android.permission.CHANGE_CONFIGURATION" uid="shell" />
    <assign-permission name="android.permission.REORDER_TASKS" uid="shell" />
    <assign-permission name="android.permission.SET_ANIMATION_SCALE" uid="shell" />
    <assign-permission name="android.permission.SET_PREFERRED_APPLICATIONS" uid="shell" />
    <assign-permission name="android.permission.WRITE_SETTINGS" uid="shell" />
    <assign-permission name="android.permission.WRITE_SECURE_SETTINGS" uid="shell" />
    <assign-permission name="android.permission.BROADCAST_STICKY" uid="shell" />
    <!-- Development tool permissions granted to the shell. -->
    <assign-permission name="android.permission.SET_DEBUG_APP" uid="shell" />
    <assign-permission name="android.permission.SET_PROCESS_LIMIT" uid="shell" />
    <assign-permission name="android.permission.SET_ALWAYS_FINISH" uid="shell" />
    <assign-permission name="android.permission.DUMP" uid="shell" />
    <assign-permission name="android.permission.SIGNAL_PERSISTENT_PROCESSES" uid="shell" />
    <!-- Internal permissions granted to the shell. -->
    <assign-permission name="android.permission.FORCE_BACK" uid="shell" />
    <assign-permission name="android.permission.BATTERY_STATS" uid="shell" />
    <assign-permission name="android.permission.INTERNAL_SYSTEM_WINDOW" uid="shell" />
    <assign-permission name="android.permission.INJECT_EVENTS" uid="shell" />
    <assign-permission name="android.permission.SET_ACTIVITY_WATCHER" uid="shell" />
    <assign-permission name="android.permission.READ_INPUT_STATE" uid="shell" />
    <assign-permission name="android.permission.SET_ORIENTATION" uid="shell" />
    <assign-permission name="android.permission.INSTALL_PACKAGES" uid="shell" />
    <assign-permission name="android.permission.CLEAR_APP_USER_DATA" uid="shell" />
    <assign-permission name="android.permission.DELETE_CACHE_FILES" uid="shell" />
    <assign-permission name="android.permission.DELETE_PACKAGES" uid="shell" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="shell" />
    <assign-permission name="android.permission.READ_FRAME_BUFFER" uid="shell" />
    <assign-permission name="android.permission.DEVICE_POWER" uid="shell" />
    <assign-permission name="android.permission.INSTALL_LOCATION_PROVIDER" uid="shell" />
    <assign-permission name="android.permission.BACKUP" uid="shell" />

    <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
    <assign-permission name="android.permission.ACCESS_DRM" uid="media" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />

    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />

    <!-- This is a list of all the libraries available for application
         code to link against. -->

    <library name="android.test.runner"
            file="/system/framework/android.test.runner.jar" />
    <library name="javax.obex"
            file="/system/framework/javax.obex.jar"/>

    <!-- HTC PIM library (Contacts / Calendar / Mail / Sync ...) -->
    <library name="com.htc.android.pimlib"
            file="/system/framework/com.htc.android.pimlib.jar"/>          
    <!-- HTC EAS shared library (for OpenSource parts) -->
    <library name="com.htc.android.easopen"
            file="/system/framework/com.htc.android.easopen.jar"/>          
    <!-- add by Justin_Liu, for scalado library -->
    <library name="com.scalado.util.ScaladoUtil"
            file="/system/framework/com.scalado.util.ScaladoUtil.jar"/>  

</permissions>
So,I need to add something like this:

Code:
    <permission name="android.permission.ACCESS_NETWORK_LOCATION" >
        <group gid="sdcard_rw" />
    </permission>
But,I also need to change "group gid". Any idea of what I need to put in that "group gid"?

Also I found some other interesting things. I found this in platform.xml:
Code:
    <assign-permission name="android.permission.WRITE_EXTERNAL_STORAGE" uid="shell" />
    <assign-permission name="android.permission.SEND_SMS" uid="shell" />
    <assign-permission name="android.permission.CALL_PHONE" uid="shell" />
    <assign-permission name="android.permission.READ_CONTACTS" uid="shell" />
    <assign-permission name="android.permission.WRITE_CONTACTS" uid="shell" />
    <assign-permission name="android.permission.READ_OWNER_DATA" uid="shell" />
    <assign-permission name="android.permission.WRITE_OWNER_DATA" uid="shell" />
    <assign-permission name="android.permission.READ_CALENDAR" uid="shell" />
    <assign-permission name="android.permission.WRITE_CALENDAR" uid="shell" />
    <assign-permission name="android.permission.READ_USER_DICTIONARY" uid="shell" />
    <assign-permission name="android.permission.WRITE_USER_DICTIONARY" uid="shell" />
    <assign-permission name="android.permission.ACCESS_FINE_LOCATION" uid="shell" />
    <assign-permission name="android.permission.ACCESS_COARSE_LOCATION" uid="shell" />
    <assign-permission name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" uid="shell" />
    <assign-permission name="android.permission.[B]ACCESS_NETWORK_STATE[/B]" uid="shell" />
    <assign-permission name="android.permission.ACCESS_WIFI_STATE" uid="shell" />
    <assign-permission name="android.permission.BLUETOOTH" uid="shell" />
    <!-- System tool permissions granted to the shell. -->
    <assign-permission name="android.permission.GET_TASKS" uid="shell" />
    <assign-permission name="android.permission.CHANGE_CONFIGURATION" uid="shell" />
    <assign-permission name="android.permission.REORDER_TASKS" uid="shell" />
    <assign-permission name="android.permission.SET_ANIMATION_SCALE" uid="shell" />
    <assign-permission name="android.permission.SET_PREFERRED_APPLICATIONS" uid="shell" />
    <assign-permission name="android.permission.WRITE_SETTINGS" uid="shell" />
    <assign-permission name="android.permission.WRITE_SECURE_SETTINGS" uid="shell" />
    <assign-permission name="android.permission.BROADCAST_STICKY" uid="shell" />
    <!-- Development tool permissions granted to the shell. -->
    <assign-permission name="android.permission.SET_DEBUG_APP" uid="shell" />
    <assign-permission name="android.permission.SET_PROCESS_LIMIT" uid="shell" />
    <assign-permission name="android.permission.SET_ALWAYS_FINISH" uid="shell" />
    <assign-permission name="android.permission.DUMP" uid="shell" />
    <assign-permission name="android.permission.SIGNAL_PERSISTENT_PROCESSES" uid="shell" />
    <!-- Internal permissions granted to the shell. -->
    <assign-permission name="android.permission.FORCE_BACK" uid="shell" />
    <assign-permission name="android.permission.BATTERY_STATS" uid="shell" />
    <assign-permission name="android.permission.INTERNAL_SYSTEM_WINDOW" uid="shell" />
    <assign-permission name="android.permission.INJECT_EVENTS" uid="shell" />
    <assign-permission name="android.permission.SET_ACTIVITY_WATCHER" uid="shell" />
    <assign-permission name="android.permission.READ_INPUT_STATE" uid="shell" />
    <assign-permission name="android.permission.SET_ORIENTATION" uid="shell" />
    <assign-permission name="android.permission.INSTALL_PACKAGES" uid="shell" />
    <assign-permission name="android.permission.CLEAR_APP_USER_DATA" uid="shell" />
    <assign-permission name="android.permission.DELETE_CACHE_FILES" uid="shell" />
    <assign-permission name="android.permission.DELETE_PACKAGES" uid="shell" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="shell" />
    <assign-permission name="android.permission.READ_FRAME_BUFFER" uid="shell" />
    <assign-permission name="android.permission.DEVICE_POWER" uid="shell" />
    <assign-permission name="android.permission.INSTALL_LOCATION_PROVIDER" uid="shell" />
    <assign-permission name="android.permission.BACKUP" uid="shell" />

    <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
    <assign-permission name="android.permission.ACCESS_DRM" uid="media" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />

    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
These should be the declared permissions.



I've seen that here android.permission.ACCESS_NETWORK_STATE is declared but it isn't declared here:
Code:
    <permission name="android.permission.BLUETOOTH_ADMIN" >
        <group gid="net_bt_admin" />
    </permission>

    <permission name="android.permission.BLUETOOTH" >
        <group gid="net_bt" />
    </permission>

    <permission name="android.permission.INTERNET" >
        <group gid="inet" />
    </permission>

    <permission name="android.permission.CAMERA" >
        <group gid="camera" />
    </permission>

    <permission name="android.permission.READ_LOGS" >
        <group gid="log" />
    </permission>

    <permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
        <group gid="sdcard_rw" />
    </permission>

    <!-- The group that /cache belongs to, linked to the permission
         set on the applications that can access /cache -->
    <permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
        <group gid="cache" />
    </permission>

    <!-- RW permissions to any system resources owned by group 'diag'.
         This is for carrier and manufacture diagnostics tools that must be
         installable from the framework. Be careful. -->
    <permission name="android.permission.DIAGNOSTIC" >
        <group gid="input" />
        <group gid="diag" />
    </permission>
I should declare it together with android.permission.ACCESS_NETWORK_LOCATION,shouldn't I?
 
Last edited:

Zecanilis

Retired Forum Moderator
Feb 22, 2008
1,473
445
0
Aveiro
Zecanilis made a mistake here. Why moving it to general section? I'm talking about a PORTING,which is a DEV thing.

Sent from my LG Optimus One P500 using XDA App
Yes i made a mistake, for 2 minutes. I'm human you know!
And if you've changed the name of the thread it whouldn't happen. So please change the [Q] to [DEV Q].

Cheers
 

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
you are missing the lib libril.so and the binary rild

if its still not working, have a look in init.rc and init.thunderg.rc files to see
how and when services are started;)
No,i didn't miss rild binary and neither libril.so :)

Ok i'll take a look at that .rc files.
 

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
upd: I looked after froyo platform.xml but ACCESS_NETWORK_LOCATION isn't declared there too. So,I now think that it's something in .rc files,but I'll try to touch platform.xml too.

ciaox
 

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
upd:Got it working. Took libs from my openOptimus rom and opensource rild binary. One question: I can't make calls,but I can recieve 'em. Why? Trying with another dialer.
 
D

doktornotor

Guest
upd:Got it working. Took libs from my openOptimus rom and opensource rild binary. One question: I can't make calls,but I can recieve 'em. Why? Trying with another dialer.
Well, just symlink gsmincomingcall.so to gsmoutgoingcall.so? :p

OK, seriously - maybe upload it somewhere so that people can mess with it and possibly find out? (After all, incoming calls working is still a whole lot better than no GSM altogether - which is what people are stuck with ATM.)
 

Bytecode

Inactive Recognized Developer
Dec 30, 2010
2,684
4,487
0
22
/dev/null
Well, just symlink gsmincomingcall.so to gsmoutgoingcall.so? :p

OK, seriously - maybe upload it somewhere so that people can mess with it and possibly find out? (After all, incoming calls working is still a whole lot better than no GSM altogether - which is what people are stuck with ATM.)
Upload what man? The whole rom or what?