본문 바로가기
AndroidOverLinux

린백 런처 아이콘 위치 수정하기 (난이도 : 중상)

by ㅋㅋ잠자 2019. 1. 31.
반응형

안녕하세요. 린백런처의 아이콘을 마음대로 가지고 놀기 위해서 찾아본 결과 입니다.


이 글을 작성하면서 테스트 하고 있어서 글이 중구난방일 수 있습니다.


그래서 제가 시간을 제한하겠습니다. 아래의 노래를 트시고 끝날 때 까지만 보시길 바랍니다.



1. apktool 동작 환경 만들기


https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


제 서버가 맛이 간 상태로 위의 사이트에서 자바 임베디드를 받습니다.



받은 파일을 ZMODEM 으로 전송합니다.



# 자바 실행파일을 /usr/bin/java 와 바인딩합니다.

root@AOL-Debian:~# tar xf jdk-8u201-linux-arm32-vfp-hflt.tar.gz

root@AOL-Debian:~/jdk1.8.0_201/bin# ln -s /root/jdk1.8.0_201/bin/java /usr/bin/java


https://ibotpeaches.github.io/Apktool/ <-- APK 툴 주소 입니다.


root@AOL-Debian:~# wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.4.jar

--2019-01-31 19:17:15--  https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.3.4.jar

Resolving bitbucket.org (bitbucket.org)... 18.205.93.0, 18.205.93.2, 18.205.93.1, ...

Connecting to bitbucket.org (bitbucket.org)|18.205.93.0|:443... connected.

HTTP request sent, awaiting response... 302 Found

Location: https://bbuseruploads.s3.amazonaws.com/0becf6a1-1706-4f2e-9ae6-891e00a8dd5f/downloads/b50ea5ab-2d35-4238-86cb-1ad3c5f6c504/apktool_2.3.4.jar?Signature=iB8ngHQpaB79aDeTpQlTrL579RE%3D&Expires=1548931138&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=6yRi4csRaQXjO1eluVFah8uhiNZKbcQX&response-content-disposition=attachment%3B%20filename%3D%22apktool_2.3.4.jar%22 [following]

--2019-01-31 19:17:16--  https://bbuseruploads.s3.amazonaws.com/0becf6a1-1706-4f2e-9ae6-891e00a8dd5f/downloads/b50ea5ab-2d35-4238-86cb-1ad3c5f6c504/apktool_2.3.4.jar?Signature=iB8ngHQpaB79aDeTpQlTrL579RE%3D&Expires=1548931138&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=6yRi4csRaQXjO1eluVFah8uhiNZKbcQX&response-content-disposition=attachment%3B%20filename%3D%22apktool_2.3.4.jar%22

Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 52.216.107.164

Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|52.216.107.164|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 11003267 (10M) [application/x-java-archive]

Saving to: ‘apktool_2.3.4.jar’


apktool_2.3.4.jar                   28%[=================>                                                ]   3.01M  88.7KB/s   eta 41s   


# apktool wrapper 다운로드

root@AOL-Debian:~# wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool

--2019-01-31 19:27:45--  https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool

Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...

Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 2319 (2.3K) [text/plain]

Saving to: ‘apktool’


apktool                            100%[=================================================================>]   2.26K  --.-KB/s   in 0.001s 


2019-01-31 19:27:46 (2.99 MB/s) - ‘apktool’ saved [2319/2319]


# apktool.jar 로 이름바꾸기

root@AOL-Debian:~# mv apktool_2.3.4.jar apktool.jar


# /usr/local/bin/ 으로 옮기기

root@AOL-Debian:~# mv apktool* /usr/local/bin


# wrapper 실행권한 주기

root@AOL-Debian:~# chmod a+x /usr/local/bin/apktool


# 실행 테스트

root@AOL-Debian:~# apktool

Apktool v2.3.4 - a tool for reengineering Android apk files

with smali v2.2.2 and baksmali v2.2.2

Copyright 2014 Ryszard Wiśniewski <brut.alll@gmail.com>

Updated by Connor Tumbleson <connor.tumbleson@gmail.com>


usage: apktool

 -advance,--advanced   prints advance information.

 -version,--version    prints the version then exits

usage: apktool if|install-framework [options] <framework.apk>

 -p,--frame-path <dir>   Stores framework files into <dir>.

 -t,--tag <tag>          Tag frameworks using <tag>.

usage: apktool d[ecode] [options] <file_apk>

 -f,--force              Force delete destination directory.

 -o,--output <dir>       The name of folder that gets written. Default is apk.out

 -p,--frame-path <dir>   Uses framework files located in <dir>.

 -r,--no-res             Do not decode resources.

 -s,--no-src             Do not decode sources.

 -t,--frame-tag <tag>    Uses framework files tagged by <tag>.

usage: apktool b[uild] [options] <app_path>

 -f,--force-all          Skip changes detection and build all files.

 -o,--output <dir>       The name of apk that gets written. Default is dist/name.apk

 -p,--frame-path <dir>   Uses framework files located in <dir>.


For additional info, see: http://ibotpeaches.github.io/Apktool/ 

For smali/baksmali info, see: https://github.com/JesusFreke/smali

root@AOL-Debian:~# 


2. Leanback Customizer apk 파일 뜯고 고치고 묶기


# 시스템 LeanbackCustomizer apk 옮기기

root@AOL-Debian:~# cp /system/priv-app/LeanbackCustomizer/LeanbackCustomizer.apk .

root@AOL-Debian:~# ls

jdk1.8.0_201  jdk-8u201-linux-arm32-vfp-hflt.tar.gz  LeanbackCustomizer.apk  supersu-install.deb


# LeanbackCustomizer 언팩

root@AOL-Debian:~# apktool d LeanbackCustomizer.apk 

I: Using Apktool 2.3.4 on LeanbackCustomizer.apk

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

S: WARNING: Could not write to (/root/.local/share/apktool/framework), using /tmp instead...

S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable

I: Loading resource table from file: /tmp/1.apk

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Baksmaling classes.dex...

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...


Leanback Customizer 는 아래를 참고하시길 바랍니다.


https://android.googlesource.com/device/sample/+/android-5.1.1_r4/apps/LeanbackCustomizer


root@AOL-Debian:~/LeanbackCustomizer# tree

.

├── AndroidManifest.xml

├── apktool.yml

├── original

│   ├── AndroidManifest.xml

│   └── META-INF

│       ├── CERT.RSA

│       ├── CERT.SF

│       └── MANIFEST.MF

├── res

│   ├── drawable-xhdpi-v4

│   │   ├── bg_custom.png

│   │   ├── ic_broadview_banner.png

│   │   ├── ic_bundled_tuner_banner.png

│   │   ├── ic_eontv_banner.png

│   │   ├── ic_estreamtv_banner.png

│   │   ├── ic_firefox_focus_banner.png

│   │   ├── ic_hifilemanager_banner.png

│   │   ├── ic_iptv_banner.png

│   │   ├── ic_launcher.png

│   │   ├── ic_livetv_banner.png

│   │   ├── ic_magicsing_banner.png

│   │   ├── ic_mediacenter_banner.png

│   │   ├── ic_miracast_banner.png

│   │   ├── ic_play_movies_banner.png

│   │   ├── ic_selecttv_banner.png

│   │   ├── ic_skytv_banner.png

│   │   ├── ic_staycompass_banner.png

│   │   ├── ic_ted_banner.png

│   │   ├── ic_title_apps.png

│   │   ├── ic_title_custom.png

│   │   ├── ic_title_games.png

│   │   ├── ic_title_settings.png

│   │   ├── ic_try_play_movies_banner.png

│   │   └── ic_try_ted_banner.png

│   ├── values

│   │   ├── arrays.xml

│   │   ├── bools.xml

│   │   ├── colors.xml

│   │   ├── drawables.xml

│   │   ├── public.xml

│   │   └── strings.xml

│   ├── values-ar-rXB

│   │   └── strings.xml

│   ├── values-en-rXA

│   │   └── strings.xml

│   └── values-ko

│       └── strings.xml

└── smali

    ├── android

    │   └── os

    │       └── SystemProperties.smali

    └── com

        └── google

            └── android

                └── leanbacklauncher

                    └── partnercustomizer

                        ├── GetServerInfo.smali

                        ├── PartnerReceiver$1.smali

                        ├── PartnerReceiver$2.smali

                        ├── PartnerReceiver$3.smali

                        ├── PartnerReceiver.smali

                        ├── TestActivity$1.smali

                        ├── TestActivity$2.smali

                        ├── TestActivity$3.smali

                        ├── TestActivity$4.smali

                        ├── TestActivity$5.smali

                        ├── TestActivity$6.smali

                        └── TestActivity.smali


16 directories, 52 files


자 그럼 오늘은 아이콘을 넣고 빼고만 해보겠습니다.






반응형

댓글