[Sony Cross-Device Development Themes and Apps] venkat kamesh:
hello guys

Here go i come with new tut today

which i got from awesome cataclysm rom and cyanogenmod

So i dont want to kill all your time

i will explain you very simple way

For Lp version Click Here

All you need is

service.jar ( deodexed )

settings.apk (deodexed )

1. Decompile service.jar

2. open com/android/server/policy/PhoneWindowManager.smali

3. look for this method

.method public updateSettings()V

replace all the code with this

.method public updateSettings()V
.locals 20

.prologue
.line 1829
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v15}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v10

.line 1830
.local v10, "resolver":Landroid/content/ContentResolver;
const/4 v11, 0x0

.line 1831
.local v11, "updateRotation":Z
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mLock:Ljava/lang/Object;

move-object/from16 v16, v0

monitor-enter v16

.line 1833
:try_start_0
const-string/jumbo v15, "end_button_behavior"

.line 1834
const/16 v17, 0x2

.line 1835
const/16 v18, -0x2

.line 1832
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

move-object/from16 v0, p0

iput v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mEndcallBehavior:I

.line 1837
const-string/jumbo v15, "incall_power_button_behavior"

.line 1838
const/16 v17, 0x1

.line 1839
const/16 v18, -0x2

.line 1836
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$Secure;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

move-object/from16 v0, p0

iput v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mIncallPowerBehavior:I

.line 1841
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v15}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v15

const v17, 0x1050018

move/from16 v0, v17

invoke-virtual {v15, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

move-result v5

.line 1842
.local v5, "navBarDefaultHeight":I
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v15}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

move-result-object v15

const v17, 0x105001a

move/from16 v0, v17

invoke-virtual {v15, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

move-result v6

.line 1844
.local v6, "navBarDefaultWidth":I
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v15}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v15

.line 1845
const-string/jumbo v17, "navigation_bar_height"

const/16 v18, 0x64

const/16 v19, -0x3

.line 1844
move-object/from16 v0, v17

move/from16 v1, v18

move/from16 v2, v19

invoke-static {v15, v0, v1, v2}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

mul-int/2addr v15, v5

div-int/lit8 v7, v15, 0x64

.line 1846
.local v7, "navBarHeight":I
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v15}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v15

.line 1847
const-string/jumbo v17, "navigation_bar_width"

const/16 v18, 0x64

const/16 v19, -0x3

.line 1846
move-object/from16 v0, v17

move/from16 v1, v18

move/from16 v2, v19

invoke-static {v15, v0, v1, v2}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

mul-int/2addr v15, v6

div-int/lit8 v8, v15, 0x64

.line 1849
.local v8, "navBarWidth":I
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarHeightForRotation:[I

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mPortraitRotation:I

move/from16 v17, v0

.line 1852
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarHeightForRotation:[I

move-object/from16 v18, v0

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mSeascapeRotation:I

move/from16 v19, v0

aput v7, v18, v19

.line 1851
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarHeightForRotation:[I

move-object/from16 v18, v0

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mLandscapeRotation:I

move/from16 v19, v0

aput v7, v18, v19

.line 1850
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarHeightForRotation:[I

move-object/from16 v18, v0

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mUpsideDownRotation:I

move/from16 v19, v0

aput v7, v18, v19

.line 1849
aput v7, v15, v17

.line 1854
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarWidthForRotation:[I

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mPortraitRotation:I

move/from16 v17, v0

.line 1857
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarWidthForRotation:[I

move-object/from16 v18, v0

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mSeascapeRotation:I

move/from16 v19, v0

aput v8, v18, v19

.line 1856
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarWidthForRotation:[I

move-object/from16 v18, v0

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mLandscapeRotation:I

move/from16 v19, v0

aput v8, v18, v19

.line 1855
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mNavigationBarWidthForRotation:[I

move-object/from16 v18, v0

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mUpsideDownRotation:I

move/from16 v19, v0

aput v8, v18, v19

.line 1854
aput v8, v15, v17

.line 1873
const-string/jumbo v15, "wake_gesture_enabled"

const/16 v17, 0x0

.line 1874
const/16 v18, -0x2

.line 1872
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$Secure;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

if-eqz v15, :cond_7

const/4 v14, 0x1

.line 1875
.local v14, "wakeGestureEnabledSetting":Z
:goto_0
move-object/from16 v0, p0

iget-boolean v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mWakeGestureEnabledSetting:Z

if-eq v15, v14, :cond_0

.line 1876
move-object/from16 v0, p0

iput-boolean v14, v0, Lcom/android/server/policy/PhoneWindowManager;->mWakeGestureEnabledSetting:Z

.line 1877
invoke-direct/range {p0 .. p0}, Lcom/android/server/policy/PhoneWindowManager;->updateWakeGestureListenerLp()V

.line 1880
:cond_0
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-virtual {v15}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v17

.line 1886
const-string/jumbo v15, "user_rotation"

const/16 v17, 0x0

.line 1887
const/16 v18, -0x2

.line 1885
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v12

.line 1888
.local v12, "userRotation":I
move-object/from16 v0, p0

iget v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mUserRotation:I

if-eq v15, v12, :cond_1

.line 1889
move-object/from16 v0, p0

iput v12, v0, Lcom/android/server/policy/PhoneWindowManager;->mUserRotation:I

.line 1890
const/4 v11, 0x1

.line 1893
:cond_1
const-string/jumbo v15, "accelerometer_rotation"

const/16 v17, 0x0

const/16 v18, -0x2

.line 1892
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

if-eqz v15, :cond_8

.line 1894
const/4 v13, 0x0

.line 1896
.local v13, "userRotationMode":I
:goto_1
move-object/from16 v0, p0

iget v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mUserRotationMode:I

if-eq v15, v13, :cond_2

.line 1897
move-object/from16 v0, p0

iput v13, v0, Lcom/android/server/policy/PhoneWindowManager;->mUserRotationMode:I

.line 1898
const/4 v11, 0x1

.line 1899
invoke-virtual/range {p0 .. p0}, Lcom/android/server/policy/PhoneWindowManager;->updateOrientationListenerLp()V

.line 1902
:cond_2
move-object/from16 v0, p0

iget-boolean v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mSystemReady:Z

if-eqz v15, :cond_3

.line 1904
const-string/jumbo v15, "pointer_location"

const/16 v17, 0x0

const/16 v18, -0x2

.line 1903
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v9

.line 1905
.local v9, "pointerLocation":I
move-object/from16 v0, p0

iget v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mPointerLocationMode:I

if-eq v15, v9, :cond_3

.line 1906
move-object/from16 v0, p0

iput v9, v0, Lcom/android/server/policy/PhoneWindowManager;->mPointerLocationMode:I

.line 1907
move-object/from16 v0, p0

iget-object v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mHandler:Landroid/os/Handler;

move-object/from16 v17, v0

if-eqz v9, :cond_9

.line 1908
const/4 v15, 0x1

.line 1907
:goto_2
move-object/from16 v0, v17

invoke-virtual {v0, v15}, Landroid/os/Handler;->sendEmptyMessage(I)Z

.line 1913
.end local v9 # "pointerLocation":I
:cond_3
const-string/jumbo v15, "screen_off_timeout"

const/16 v17, 0x0

const/16 v18, -0x2

.line 1912
move/from16 v0, v17

move/from16 v1, v18

invoke-static {v10, v15, v0, v1}, Landroid/provider/Settings$System;->getIntForUser(Landroid/content/ContentResolver;Ljava/lang/String;II)I

move-result v15

move-object/from16 v0, p0

iput v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mLockScreenTimeout:I

.line 1915
const-string/jumbo v15, "default_input_method"

const/16 v17, -0x2

.line 1914
move/from16 v0, v17

invoke-static {v10, v15, v0}, Landroid/provider/Settings$Secure;->getStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;I)Ljava/lang/String;

move-result-object v4

.line 1916
.local v4, "imId":Ljava/lang/String;
if-eqz v4, :cond_a

invoke-virtual {v4}, Ljava/lang/String;->length()I

move-result v15

if-lez v15, :cond_a

const/4 v3, 0x1

.line 1917
.local v3, "hasSoftInput":Z
:goto_3
move-object/from16 v0, p0

iget-boolean v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mHasSoftInput:Z

if-eq v15, v3, :cond_4

.line 1918
move-object/from16 v0, p0

iput-boolean v3, v0, Lcom/android/server/policy/PhoneWindowManager;->mHasSoftInput:Z

.line 1919
const/4 v11, 0x1

.line 1921
:cond_4
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mImmersiveModeConfirmation:Lcom/android/server/policy/ImmersiveModeConfirmation;

if-eqz v15, :cond_5

.line 1922
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mImmersiveModeConfirmation:Lcom/android/server/policy/ImmersiveModeConfirmation;

move-object/from16 v0, p0

iget v0, v0, Lcom/android/server/policy/PhoneWindowManager;->mCurrentUserId:I

move/from16 v17, v0

move/from16 v0, v17

invoke-virtual {v15, v0}, Lcom/android/server/policy/ImmersiveModeConfirmation;->loadSetting(I)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0

:cond_5
monitor-exit v16

.line 1925
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mWindowManagerFuncs:Landroid/view/WindowManagerPolicy$WindowManagerFuncs;

invoke-interface {v15}, Landroid/view/WindowManagerPolicy$WindowManagerFuncs;->getWindowManagerLock()Ljava/lang/Object;

move-result-object v16

monitor-enter v16

.line 1926
:try_start_1
move-object/from16 v0, p0

iget-object v15, v0, Lcom/android/server/policy/PhoneWindowManager;->mContext:Landroid/content/Context;

invoke-static {v15}, Lcom/android/server/policy/PolicyControl;->reloadFromSetting(Landroid/content/Context;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1

monitor-exit v16

.line 1928
if-eqz v11, :cond_6

.line 1929
const/4 v15, 0x1

move-object/from16 v0, p0

invoke-virtual {v0, v15}, Lcom/android/server/policy/PhoneWindowManager;->updateRotation(Z)V

.line 1828
:cond_6
return-void

.line 1860
.end local v3 # "hasSoftInput":Z
.end local v4 # "imId":Ljava/lang/String;
.end local v12 # "userRotation":I
.end local v13 # "userRotationMode":I
.end local v14 # "wakeGestureEnabledSetting":Z

.line 1872
:cond_7
const/4 v14, 0x0

.restart local v14 # "wakeGestureEnabledSetting":Z
goto/16 :goto_0

.line 1895
.restart local v12 # "userRotation":I
:cond_8
const/4 v13, 0x1

.restart local v13 # "userRotationMode":I
goto/16 :goto_1

.line 1908
.restart local v9 # "pointerLocation":I
:cond_9
const/4 v15, 0x2

goto :goto_2

.line 1916
.end local v9 # "pointerLocation":I
.restart local v4 # "imId":Ljava/lang/String;
:cond_a
const/4 v3, 0x0

.restart local v3 # "hasSoftInput":Z
goto :goto_3

.line 1831
.end local v3 # "hasSoftInput":Z
.end local v4 # "imId":Ljava/lang/String;
.end local v5 # "navBarDefaultHeight":I
.end local v6 # "navBarDefaultWidth":I
.end local v7 # "navBarHeight":I
.end local v8 # "navBarWidth":I
.end local v12 # "userRotation":I
.end local v13 # "userRotationMode":I
.end local v14 # "wakeGestureEnabledSetting":Z
:catchall_0
move-exception v15

monitor-exit v16

throw v15

.line 1925
.restart local v3 # "hasSoftInput":Z
.restart local v4 # "imId":Ljava/lang/String;
.restart local v5 # "navBarDefaultHeight":I
.restart local v6 # "navBarDefaultWidth":I
.restart local v7 # "navBarHeight":I
.restart local v8 # "navBarWidth":I
.restart local v12 # "userRotation":I
.restart local v13 # "userRotationMode":I
.restart local v14 # "wakeGestureEnabledSetting":Z
:catchall_1
move-exception v15

monitor-exit v16

throw v15
.end method

in that find these and replace the public ids from framework-res.apk

find this 0x1050018 (replace as yours in framework-res.apk)

<public type="dimen" name="navigation_bar_height" id="0x01050018" />

find this 0x105001a (replace as yours in framework-res.apk)

<public type="dimen" name="navigation_bar_height_landscape" id="0x0105001a" />

Now save this and close

Continued in post #2