[Galaxy Tab 2 10.1" Android Development] Android-Andi:
Hey Guys, [MENTION=2536141]chlewior[/MENTION] , [MENTION=5094621]Baeta_BR[/MENTION] and all others!

I am trying to make you a working Phone-Enabeler for P5100 to flash after the Ripper-Rom. This should enable all Phonesettings for you.

I have no P51XX so i can´t try if it is working.

Make a Nandroid-Backup before flashing this patch or setup as 2nd Rom in Dual-Boot using NEXT Kernel for testing first.

What i did: I followed the How-To from [MENTION=4021423]ketut.kumajaya[/MENTION] he posted here: http://xdaforums.com/showthread.php?t=2423804

Patch for framework-res.apk to enable core voice and SMS functionality:

(res/values/arrays.xml)
+++ arrays.xml
--- arraysP5100.xml
@@ -516,7 +516,15 @@
</integer-array>
<string-array name="networkAttributes">
<item>wifi,1,1,1,-1,true</item>
[COLOR="Red"]- <item>bluetooth,7,7,3,-1,true</item>[/COLOR]
[COLOR="Blue"]+ <item>mobile,0,0,0,-1,true</item>
+ <item>mobile_mms,2,0,2,180000,true</item>
+ <item>mobile_supl,3,0,2,60000,true</item>
+ <item>mobile_dun,4,0,2,60000,true</item>
+ <item>mobile_hipri,5,0,3,60000,true</item>
+ <item>bluetooth,7,7,2,-1,true</item>
+ <item>mobile_fota,10,0,2,60000,true</item>
+ <item>mobile_ims,11,0,2,60000,true</item>
+ <item>mobile_cbs,12,0,2,60000,true</item>[/COLOR]
<item>wifi_p2p,13,1,0,-1,true</item>
</string-array>
<integer-array name="config_protectedNetworks">
@@ -526,6 +534,7 @@
</integer-array>
<string-array name="radioAttributes">
<item>1,1</item>
[COLOR="Blue"]+ <item>0,1</item>[/COLOR]
<item>7,1</item>
</string-array>
<integer-array name="config_data_usage_network_types">

(/res/values/bools.xml)
--- bools.xml
+++ boolsP5100.xml
@@ -98,10 +98,10 @@
<bool name="config_homeKeyDoubleClickUseRecent">false</bool
<bool name="config_isAlwaysHideStatusBar">false</bool>
<bool name="config_isWaterRippleEnabled">true</bool>
[COLOR="Red"]- <bool name="config_is_JBP_Upgrade">true</bool>
- <bool name="config_isWaterInkEnabled">true</bool>[/COLOR]
[COLOR="Blue"]+ <bool name="config_is_JBP_Upgrade">false</bool>
+ <bool name="config_isWaterInkEnabled">false</bool>[/COLOR]
<bool name="config_isWaterInkLCD">true</bool>
[COLOR="Red"]- <bool name="config_isSViewCover">true</bool>[/COLOR]
[COLOR="Blue"]+ <bool name="config_isSViewCover">false</bool>[/COLOR]
<bool name="config_multiWindowControlbar">true</bool>
<bool name="tw_seekbar_sliding_animation">false</bool>
<bool name="tw_split_action_bar_is_narrow">true</bool>

android.policy.jar patch to enable "Data network mode" in boot menu:

(/smali/com/android/internal/policy/impl/GlobalActions$1.smali)
--- GlobalActions$1.smali 2013-10-24 18:27:43.776295800 +0200
+++ GlobalActions$1P5100.smali 2013-10-24 18:38:24.660136400 +0200
@@ -342,107 +342,129 @@
.method public showConditional()Z
.registers 6

[COLOR="Red"]- const/4 v4, 0x0[/COLOR]
[COLOR="Blue"]+ const/4 v1, 0x0[/COLOR]

[COLOR="Red"]- const-string v1, "KOR"[/COLOR]
[COLOR="Blue"]+ const-string v2, "KOR"[/COLOR]
[COLOR="Red"]
- const-string v2, ""[/COLOR]

[COLOR="Red"]- invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]

[COLOR="Red"]- move-result v1[/COLOR]
[COLOR="Blue"]+ move-result v2[/COLOR]

[COLOR="Red"]- if-eqz v1, :cond_15[/COLOR]
[COLOR="Blue"]+ if-eqz v2, :cond_5e[/COLOR]

[COLOR="Red"]- const-string v1, "SKT"[/COLOR]
[COLOR="Blue"]+ const-string v2, "SKT"[/COLOR]

[COLOR="Red"]- const-string v2, ""[/COLOR]
[COLOR="Blue"]+ const-string v3, ""[/COLOR]
[COLOR="Red"]
- invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]

[COLOR="Red"]- move-result v1[/COLOR]
[COLOR="Blue"]+ move-result v2[/COLOR]
[COLOR="Red"]
- if-eqz v1, :cond_16[/COLOR]
[COLOR="Blue"]+ if-eqz v2, :cond_16[/COLOR]

:cond_15
:goto_15
[COLOR="Red"]- return v4[/COLOR]
[COLOR="Blue"]+ return v1[/COLOR]

:cond_16
const/4 v0, 0x0

[COLOR="Red"]- const-string v1, "domestic"[/COLOR]
[COLOR="Blue"]+ const-string v2, "domestic"[/COLOR]

[COLOR="Red"]- iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]
[COLOR="Blue"]+ iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]

[COLOR="Red"]- invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]
[COLOR="Red"]
- move-result v1[/COLOR]
[COLOR="Blue"]+ move-result v2[/COLOR]

[COLOR="Red"]- if-nez v1, :cond_33[/COLOR]
[COLOR="Blue"]+ if-nez v2, :cond_33[/COLOR]
[COLOR="Red"]
- const-string v1, "unknown"[/COLOR]
[COLOR="Blue"]+ const-string v2, "unknown"[/COLOR]

[COLOR="Red"]- iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]
[COLOR="Blue"]+ iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]
[COLOR="Red"]
- invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
[/COLOR]
[COLOR="Red"]- move-result v1[/COLOR]
[COLOR="Blue"]+ move-result v2[/COLOR]

[COLOR="Red"]- if-nez v1, :cond_33[/COLOR]
[COLOR="Blue"]+ if-nez v2, :cond_33[/COLOR]

[COLOR="Red"]- iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]
[COLOR="Blue"]+ iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]

[COLOR="Red"]- invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequen
ce;)Z[/COLOR]
[COLOR="Blue"]+ invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequen
ce;)Z[/COLOR]

[COLOR="Red"]- move-result v1[/COLOR]
[COLOR="Blue"]+ move-result v2[/COLOR]

[COLOR="Red"]- if-eqz v1, :cond_34[/COLOR]
[COLOR="Blue"]+ if-eqz v2, :cond_34[/COLOR]

:cond_33
const/4 v0, 0x1

:cond_34
[COLOR="Red"]- sget-boolean v1, Lcom/android/internal/policy/impl/GlobalActions;->SAFE_DEB
UG:Z[/COLOR]
[COLOR="Blue"]+ sget-boolean v2, Lcom/android/internal/policy/impl/GlobalActions;->SAFE_DEB
UG:Z
[/COLOR]
[COLOR="Red"]- if-eqz v1, :cond_5c[/COLOR]
[COLOR="Blue"]+ if-eqz v2, :cond_5c[/COLOR]
[COLOR="Red"]
- const-string v1, "GlobalActions"[/COLOR]
[COLOR="Blue"]+ const-string v2, "GlobalActions"[/COLOR]
[COLOR="Red"]
- new-instance v2, Ljava/lang/StringBuilder;[/COLOR]
[COLOR="Blue"]+ new-instance v3, Ljava/lang/StringBuilder;[/COLOR]
[COLOR="Red"]
- invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V[/COLOR]
[COLOR="Blue"]+ invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V[/COLOR]
[COLOR="Red"]
- const-string v3, "current_plmn = "[/COLOR]
[COLOR="Blue"]+ const-string v4, "current_plmn = "[/COLOR]
[COLOR="Red"]
- invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Strin
g;)Ljava/lang/StringBuilder;[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Strin
g;)Ljava/lang/StringBuilder;[/COLOR]

[COLOR="Red"]- move-result-object v2[/COLOR]
[COLOR="Blue"]+ move-result-object v3[/COLOR]

[COLOR="Red"]- iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]
[COLOR="Blue"]+ iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->val
$current_plmn:Ljava/lang/String;[/COLOR]

[COLOR="Red"]- invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Strin
g;)Ljava/lang/StringBuilder;[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Strin
g;)Ljava/lang/StringBuilder;[/COLOR]

[COLOR="Red"]- move-result-object v2[/COLOR]
[COLOR="Blue"]+ move-result-object v3[/COLOR]

[COLOR="Red"]- const-string v3, " bRetVal = "[/COLOR]
[COLOR="Blue"]+ const-string v4, " bRetVal = "[/COLOR]

[COLOR="Red"]- invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Strin
g;)Ljava/lang/StringBuilder;[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Strin
g;)Ljava/lang/StringBuilder;[/COLOR]

[COLOR="Red"]- move-result-object v2[/COLOR]
[COLOR="Blue"]+ move-result-object v3[/COLOR]

[COLOR="Red"]- invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/Str
ingBuilder;[/COLOR]
[COLOR="Blue"]+ invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/Str
ingBuilder;
+
+ move-result-object v3
+
+ invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String
;
+
+ move-result-object v3
+
+ invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/
String;)I
+
+ :cond_5c
+ if-eqz v0, :cond_15
+
+ :cond_5e
+ iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$1;->thi
s$0:Lcom/android/internal/policy/impl/GlobalActions;
+
+ #getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Lan
droid/content/Context;
+ invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->acces
s$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;[/COLOR]

move-result-object v2
[COLOR="Red"]
- invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String[/COLOR]
;
[COLOR="Blue"]+ invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroi
d/content/ContentResolver;[/COLOR]

move-result-object v2

[COLOR="Red"]- invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/[/COLOR]
String;)I
[COLOR="Blue"]+ const-string v3, "airplane_mode_on"
[/COLOR]
[COLOR="Red"]- :cond_5c
- if-nez v0, :cond_15[/COLOR]
[COLOR="Blue"]+ invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Land
roid/content/ContentResolver;Ljava/lang/String;I)I
+
+ move-result v2
+
+ if-nez v2, :cond_15
+
+ const/4 v1, 0x1[/COLOR]

goto :goto_15
.end method

I don´t know why, but i was unable to patch SecSettings.apk to enable WiFi tethering and driving mode options. Maybe [MENTION=4021423]ketut.kumajaya[/MENTION] or [MENTION=3512588]txr33[/MENTION] has any idea?

Must be like this:

(smali/com/android/settings/TetherSettings.smali)
--- TetherSettings.smali
+++ TetherSettingsP5100.smali
@@ -2885,9 +2885,6 @@
:goto_1
iput-boolean v7, p0, Lcom/android/settings/TetherSettings;->wifiAvailable:Z

[COLOR="Red"]- .line 248
- iput-boolean v9, p0, Lcom/android/settings/TetherSettings;->wifiAvailable:Z

-[/COLOR]
.line 252
iget-object v7, p0, Lcom/android/settings/TetherSettings;->mBluetoothRegexs
:[Ljava/lang/String;