[Galaxy S II General] adejager1:
Hello,

Wanted to enable VOIP on ICS, but couldn't find the info. After bricking my phone twice and fixing it again:p

I succeeded.

problems i encountered so far:

Fragmented info in the numerous treads that are around over voip

Incomplete manuals

People giving advice without trying it on their own phone first

Bugs

So this is what i did:

On the PC

Install latest Java Runtime Environment (current version 6 Update 31)

Install latest Java SE Development Kit (current version 7u3)

Install latest Android SDK then run SDK manager and install the suggested packages

Download latest APKtool (http://code.google.com/p/android-apktool/ version 1.4.3)

Install samsung USB drivers (available on sammobile.com)

Add the \bin, \tools and \platform-tools directory to the PATH variable

in windows 7, right click computer in start menu->properties->click advanced system properties->hit the button system variables and add them to the path variable.

In my case:

c:\Program Files\Java\jdk1.7.0_03\bin;c:\Program Files\Java\jre7\bin;c:\Program Files\Android\android-sdk\platform-tools;c:\Program Files\Android\android-sdk\tools

Reboot PC (just to be sure, its windows)

On the Phone

Rooted phone

Install rootexplorer (market)

Install clockworkmod recovery (download rommanager in market)

Install busybox (Market, Stephen Erickson)

CWM and Busybox needed in case you mess up

With Rootexplorer

goto /system/framework/ and make the directory R/W

copy /system/framework/framework-res.apk to /system/framework/framework-res.apk.bak

Copy /system/framework/framework-res.apk to PC

Back to PC

Make directory

c:\APKTool

unpack downloaded APKTool to this folder

copy framework-res.apk to this folder

this folder should now contain:

framework-res.apk

apktool.jar

The following info is from http://www.miui-au.com/add-ons/apktool/

open a command prompt in the APKTool directory and run the following command:

java -jar apktool.jar if framework-res.apk

java -jar apktool.jar d framework-res.apk

this should decompile framework-res.apk to a folder named framework-res

goto the following folder

c:\apktool\framework-res\res\values

edit (notepad) the following lines in the file bools.xml to

<bool name="config_sip_wifi_only">false</bool>
<bool name="config_built_in_sip_phone">true</bool>

Now we are going to compile framework-res.apk again

java -jar apktool.jar b framework-res

Due to a bug in either APKTool.jar or aapt.exe you will probable run into a number of errors that need to be fixed

apktool\framework-res\res\values\plurals.xml:79: error
: Multiple substitutions specified in non-positional format; did you mean to add
the formatted="false" attribute?

A fix is explained at the following site:

http://www.miui.nl/?page_id=2216

in every plurals.xml file that generates an error find the following section and change it to:

<plurals name="matches_found">
<item quantity="other">%d of %d</item>
<item quantity="one">1 match</item>
</plurals>

to

<plurals name="matches_found">
<item quantity="other">%1$d of %2$d</item>
<item quantity="one">1 match</item>
</plurals>

After fixing this (could be up to 80 files, depending on ROM)

we can successfully compile framework-res.apk

java -jar apktool.jar b framework-res

We should have one warning

W: Could not find sources

This is normal for framework-res.apk

After compilation we should have the following two new folders

c:\temp\apktool\framework-res\build\
c:\temp\apktool\framework-res\dist\

in the directory dist there is a newly created framework-res.apk

DO NOT USE THIS FILE, IT WILL BRICK YOUR PHONE

instead go to the directory

framework-res\build\apk\

there should be a file resources.arsc. This file contains all our modifications and is all we need.

Framework-res.apk is a compressed file. We can open it with a zip program. I used Total Commander for this (www.ghisler.com)

now open the original Framework-res.apk and copy (pack) our modified resources.arsc (overwrite the original)

Now we have a modified framework-res.apk with voip enabled

Next we have to make the following two files:

android.software.sip.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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 is the standard set of features for devices that support SIP API. -->
<permissions>
<feature name="android.software.sip" />
</permissions>

android.software.sip.voip.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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 is the standard set of features for devices that support SIP-based VoIP. -->
<permissions>
<feature name="android.software.sip" />
<feature name="android.software.sip.voip" />
</permissions>

Copy the three files back to the Phone

Back to Phone again

UNSUCCESSFUL COMPILING, WRONG COPYING OR PURE BAD LUCK CAN BRICK YOUR PHONE. BACKUP YOUR PHONE BEFORE PROCEEDING!

CONTINUE AT YOUR OWN RISK

FORGET ADB PUSH, BE SURE TO HAVE ROOTEXPORER

Everyone saying otherwise is:

a)lying

b)not running stock rom

c)lucky

d)laisy for not writing a decent HOWTO ADB PUSH

So go ahead with root explorer

Copy android.software.sip.xml and android.software.sip.voip.xml to /system/etc/permissions

Set the persissions to rw-r--r--

Change owner to user 0-Root, group 0-root

copy framework-res.apk to /system

Set the persissions to rw-r--r--

Change owner to user 0-Root, group 0-root

Move /system/framework-res.apk to /system/framework (be sure to make backup the original file)

After reboot VOIP is enabled:D

What if something goes wrong:

If all else fails flash your original rom

or (works only if you followed everything in this manual)

Reboot your Phone in recovery mode (press&hold home, volume-up, power button)

In recovery mode mount /system and /SDCARD

Connect your Phone (still in recovery mode) to the PC

on the PC open a command prompt

Type the following (sgs2)

adb shell

su

mount -o remount,rw /dev/block/mmcblk0p9 /system

cp /system/framework/framework-res.apk.bak /system/framework/framework-res.apk.bak

reboot

this should copy the backup file back.

good luck;)