상세 컨텐츠

본문 제목

[강좌] 갤럭시 S4 LTE-A 카메라 촬영음 해제 방법 (Smali 수정)

SmartPhone/Galaxy S4 LTE-A

by Hoyoo 2014. 3. 8. 18:17

본문

갤럭시 S4 LTE-A 카메라 촬영음 해제 방법 (Smali 수정)



[수정 방법]

SamsungCamera2.apk 를 일단 디컴파일을 합니다

SamsungCamera2.apk\smali\com\sec\android\app\camera폴더에서

CameraSettings.smali를 편집기로 엽니다.


1.

.method public getCameraShutterSound()I 를 검색해줍니다.

.method public getCameraShutterSound()I

       ....생략

.end method

까지를아래 빨간 상자의 내용처럼 똑같게 해주세요

.method public getCameraShutterSound()I

    .locals 3


    .prologue

    iget-object v0, p0, Lcom/sec/android/app/camera/CameraSettings;->mActivityContext:Lcom/sec/android/app/camera/Camera;


    invoke-virtual {v0}, Lcom/sec/android/app/camera/Camera;->isCalling()Z


    move-result v0


    if-eqz v0, :cond_a


    const/4 v0, 0x0


    :goto_9

    return v0


    :cond_a

    invoke-virtual {p0}, Lcom/sec/android/app/camera/CameraSettings;->getPreferences()Lcom/sec/android/app/camera/ComboPreferences;


    move-result-object v0


    const-string v1, "pref_camera_shuttersound_key"


    const/4 v2, 0x1


    invoke-virtual {v0, v1, v2}, Lcom/sec/android/app/camera/ComboPreferences;->getInt(Ljava/lang/String;I)I


    move-result v0


    goto :goto_9

.end method


2.

.method public setCameraShutterSound(I)V를 검색합니다

.method public setCameraShutterSound(I)V

....생략

.end method

를 아래에 빨간 상자와 같이 수정해줍니다.

.method public setCameraShutterSound(I)V

    .locals 5

.param p1, "shuttersound"    # I


    .prologue

    invoke-virtual {p0}, Lcom/sec/android/app/camera/CameraSettings;->getPreferences()Lcom/sec/android/app/camera/ComboPreferences;


    move-result-object v1


    const-string v2, "pref_camera_shuttersound_key"


    const/4 v3, 0x1


    invoke-virtual {v1, v2, v3}, Lcom/sec/android/app/camera/ComboPreferences;->getInt(Ljava/lang/String;I)I


    move-result v1


    iput v1, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I


    iget v1, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I


    if-eq v1, p1, :cond_42


    const-string v1, "CameraSettings"


    new-instance v2, Ljava/lang/StringBuilder;


    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V


    const-string v3, "setCameraShutterSound "


    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;


    move-result-object v2


    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;


    move-result-object v2


    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;


    move-result-object v2


    invoke-static {v1, v2}, Landroid/util/Log;->secV(Ljava/lang/String;Ljava/lang/String;)I


    iput p1, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I


    invoke-virtual {p0}, Lcom/sec/android/app/camera/CameraSettings;->getPreferences()Lcom/sec/android/app/camera/ComboPreferences;


    move-result-object v1


    invoke-virtual {v1}, Lcom/sec/android/app/camera/ComboPreferences;->edit()Landroid/content/SharedPreferences$Editor;


    move-result-object v0


    .local v0, "editor":Landroid/content/SharedPreferences$Editor;

    const-string v1, "pref_camera_shuttersound_key"


    iget v2, p0, Lcom/sec/android/app/camera/CameraSettings;->mShutterSound:I


    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;


    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V


    const/16 v1, 0x15


    invoke-virtual {p0, v1, p1}, Lcom/sec/android/app/camera/CameraSettings;->notifyCameraSettingsChanged(II)V


    .end local v0           #editor:Landroid/content/SharedPreferences$Editor;

    :cond_42

    return-void

.end method


수정을 다 하셨으면 다시 컴파일을 시킨 후,

/System/app에 퍼미션 644로 넣어주시고...


/system/csc/feature.xml를 여시고,

<CscFeature_Camera_ShutterSoundMenu>false</CscFeature_Camera_ShutterSoundMenu>를

<CscFeature_Camera_ShutterSoundMenu>true</CscFeature_Camera_ShutterSoundMenu>로

수정하시고 재부팅 해주세요.



[스크린샷]



이 강좌의 무단 복제를 금지합니다.


관련글 더보기

댓글 영역