Splendid™
15.03.26
조회 수 9792
추천 수 11
댓글 24

Splendid입니다.


3Minit Battery Settings의 포팅법에 대해 알아보도록 하겠습니다.


3Minit Battery가 뭔지 모르는 분들도 계실겁니다.

복잡한건 아니고 배터리 아이콘 바꿔주는 앱.기능입니다.


3Minit Develop(http://3minit.com)에 가이드가 올라와있지만 이것이 영어라서 제가 한글로 서술해보도록 하겠습니다.

(솔직히 테마제작좀 해보신분들은 굳이 영어를 모르셔도 감잡히실 겁니다.)


그리 어렵지 않습니다.


#준비물

apk manager, 자신이 쓰고있는 롬의 디오덱스된 SystemUI.apk, 3Minit Battery Settings (첨부파일은 제가 한글번역한 어플입니다. 이것을 쓰셔도 무방합니다.)



#가이드


1.Install the 3Minit Battery App (Paid or Free)


  3Minit Battery 앱을 다운받습니다. (첨부파일 한글판 권장)



2.Decompile SystemUI.apk then once complete navigate to: res/layout/status_bar.xml (for some older Samsung devices: tw_status_bar.xml) or system_icons.xml for Android 5.x


  SystemUI.apk 앱을 디컴파일합니다. 그후에 res/layout 폴더에 들어갑니다. 그리고 status_bar.xml을 열어줍니다.

 (삼성 기기일 경우엔 tw_status_bar.xml입니다. 롤리팝(Android 5.x)일 경우엔 system_icon.xml 입니다.



3.Search for the line that contains:

  android:id="@id/battery


  android:id="@id/battery를 검색합니다.



4.find:

android:layout_width="wrap_content"

and 

android:layout_height="wrap_content"


android:layout_width="wrap_content"와 android:layout_height="wrap_content"를 찾아줍니다.



5.and change them to:

android:layout_width="0.0dip"

and 

android:layout_height="0.0dip"


위에서 찾아준 구문들을 위처럼 wrap_content를 0.0dip로 바꿔주세요.



6.then directly under this line add:

<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" />

EXAMPLE:

<ImageView android:id="@id/battery" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="7.0dip" />

<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" />


그 바로 아래줄에 구문을 두줄 추가합니다.

예▼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" android:alpha="0.74" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="2.0dip" android:layout_marginEnd="@dimen/rssi_battery_gap" layout="@layout/signal_cluster_view" />
<TextView android:textSize="@dimen/battery_text_size" android:textColor="@color/battery_text_color" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:alpha="0.74" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/battery_text_marginStart" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:alpha="0.74" android:layout_marginStart="3.0dip" />
<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content"
/>
</LinearLayout>
</LinearLayout>


빨간구문 부분을 저렇게 추가해줍니다.



7.Download the Smali files and place them in smali/com/android/systemui/statusbar/policy folder. Make sure to download the files to match your apktool version, or you'll get recompile errors.


  Smali 파일을 다운받습니다.(첨부파일)

  그 후에 SystemUI.apk의 smali/com/android/systemui/statusbar/policy 폴더에 다운받은 smali파일들을 넣어줍니다.

  이 때 자신의 apk tool의 버전과 맞는 smali 파일을 다운받으셔야 합니다. (첨부파일)

  그렇지 않을 경우 컴파일 할 때 오류를 얻게 될것입니다. 컴파일중에 오류가 난다면 이유는 이 이유 때문입니다.


컴파일 후에 적용해보세요.

3Minit Battery Settings는 일반설치하셔도 되고 system/app/ 에 넣으셔도 됩니다.


혹시 잘못쓴게 있으면 지적해주시기 바랍니다.



Extra Form
첨부
3Minit_Battery_Mod_Files_apktool_2.0.0rc2.zip  [File Size:7.5KB/Download:91]
3Minit_Battery_Mod_Files_apktool_1.5.x.zip  [File Size:7.0KB/Download:28]
3MinitBatterySettings.apk  [File Size:20.90MB/Download:135]
댓글을 남겨야 다운로드가 가능합니다. 감사의 댓글을 달고 오른쪽 확인버튼을 눌러주세요.
다운로드시 일주일에 한개 이상의 게시물 작성이 필요합니다. 지금 자유게시판에 회원님의 하루를 남겨보세요.
추천♡버튼을 잊지 마세요. 추천인과 회원님 모두 포인트가 적립됩니다.

Splendid™ 님의 SIGNATURE

profile
Splendid입니다
댓글 24
댓글 쓰기 권한이 없습니다.
강좌 정렬 목록 검색 쓰기
등록된 글이 없습니다.
1