Remove All Ads from XDA

Google Voice outgoing call on WiFi-only GT P7510

31 posts
Thanks Meter: 3
By lavender.t, Member on 21st December 2011, 10:36 AM
Post Reply Email Thread
got a GT-P7510 last week which is WiFi-only. my first thought was why can't i make free phone calls out from Google Voice. it turned out to be quite a daunting task. if you happened to have tried installing GV from either market or a custom-made apk for Xoom (see thread:, then you'd have an idea what i'm talking about. even with a working GV on my phone, if i pull out the SIM and connect Wifi, when calling out with GV it complains that "Mobile network not available" regardless that the internet is perfectly connected!! WTF!

with the help of seo from another thread i'm now able to get a little further into this quest. if you also need a bit help decompiling and recompiling jar/apks, and updating core apps and resources, please refer to these 2 posts:

basically at this time i'm focused on Phone.apk and telephony under framework.jar. the following is what i have discovered so far.

1. update "framework-res.apk", under res/values/bools.xml, set the following values to true:
<bool name="config_voice_capable">true</bool>
<bool name="config_built_in_sip_phone">true</bool>
after this step, the phone app shows up and contacts app now allows to invoke the phone when a phone number is pressed. however, instead of showing up the in-call UI, it crashes the phone app. also, the phone app does not show the dialpad. it goes directly into contacts.

2. i investigated the crash and found it was because of PhoneUtils.okToAddCall() checking the phone type, which returned NONE and got it freaked out. digging deeper, i realized that registered a default phone as a faked GSMPhone. the code is under frameworks/base/telephony/java/com/android/internal/telephony/gsm/ instead of setting the phone type to PHONE_TYPE_GSM, it uses PHONE_TYPE_NONE ! i dont have HC source code to refer to but i doubt this was the original coding from google. it appears to me that samsung might have modified the code to block off all phone accesses.

in smali i updated both getPhoneType() method and the ctor where setPhoneType() was called to apply PHONE_TYPE_GSM. now it doesnt crash anymore. however, instead of dialing out, now i'm seeing "Mobile network not available" message instead.

3. to prevent the GSM network check from kicking in, i then modified smali/com/android/phone/InCallScreen.smali in Phone.apk. in method checkIfOkToInitiateOutgoingCall(), update the switch jump-table to return InCallInitStatus.SUCCESS on OUT_OF_SERVICE. the change is shown in the following:
.line 2740
.packed-switch 0x0
    :pswitch_3  ==>  :pswitch_0
.end packed-switch
after this change, the error message doesnt show up any more.

but at this time, the call didnt really happen. another null-pointer exception was thrown from GsmCallTracker.smali when handling EVENT_GET_LAST_CALL_FAIL_CAUSE message. at the code:
.line 1083
.local v3, conn:Lcom/android/internal/telephony/gsm/GsmConnection;
invoke-static {}, Lcom/android/internal/telephony/NonstaticTelephonyFeature;->getInstance()Ljava/util/Map;
move-result-object v7
# <<<< if-eqz v7, :cond_e8
invoke-interface {v7, v8}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
apparently it did check the return value of NonstaticTelephonyFeature().getInstance(). adding the check "if-eqz v7, :cond_e8" as shown above shields off the FC.

this also revealed another problem: looks like the underlying GSM state machine returned an error so the call cound not continue. it is very interesting to see that GV actually plugs itself here and there very intimately into the innerworks of the GSM phone, maybe even piggyback on the GSM state machine while making the call.

this is where i am now before i put it down a bit. will come back for more when i have some spare time.

- lt
The Following User Says Thank You to lavender.t For This Useful Post: [ View ] Gift lavender.t Ad-Free
21st December 2011, 06:28 PM |#2  
SeanHacker's Avatar
Recognized Developer
Flag Portland, Oregon
Thanks Meter: 48,944
Donate to Me
or just download GrooveIP from the market and you can make calls too.
21st May 2012, 01:36 AM |#3  
Junior Member
Thanks Meter: 0
Is it just me or can you now make calls with GV using 3G connection?
29th May 2012, 05:37 AM |#4  
Junior Member
Thanks Meter: 0
Post Reply Subscribe to Thread

google voice, honeycomb, p7510, wifi

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes