Thursday, 23 April 2015

Cara Menggunakan APKTOOL Mobile Tanpa PC (decompile dan recompile serta sign)

Assalamu'alaikum wr wb
Langsung saja download bahan nya terlebih dahulu:
APKTOOL V4.4 (RECOMMENDED  Download Here !!!
APKTOOL V5.01 (New Version) Download Here !!!

PERSIAPAN APKTOOL
- Download apktool di atas (Recommended v4.4)
- Extract Apktool.zip
- Pindahkan folder apktool ke sdcard (/sdcard/di sini)

- Install Apktool4.4.1.apk yang ada di dalam folder apktool hasil Extract-kan tadi
- Setelah itu buka aplikasi Apktool nya
- Masuk settings dengan cara klik tombol di sebelah kiri, tepat di sebelah tombol home
- Pilih apktool version lalu pilih 1.5.2
- Pilih aapt version lalu pilih sesuai OS yang di pakai
- Setelah itu masuk folder sdcard lalu tap and hold folder apktool dan pilih set as apktool data folder

PROSES INSTALASI FRAMEWORK

- Salin framework-res.apk dan mediatek-res.apk serta oppo-res.apk / htc-res.apk (Jika Ada) yang ada di /system/framework KE /sdcard/apktool/disini
Tap framework-res.apk
- Pilih import as framework
- Lakukan hal yang sama (jika ada) pada mediatek-res.apk / oppo-res.apk / htc-res.apk dsb

PROSES DECOMPILE (Contoh SystemUI.apk)
- Masukan SystemUI.apk ke folder apktool
- Buka apktool
- Masuk ke /sdcard/apktool
- Tap SystemUI.apk
- Pilih Decompile ALL
- Tunggu proses selesai
- Hasil proses Decompile akan muncul folder baru SytemUI_src 
- Perhatikan di dalam folder tsb jika terdapat file apktool.yml berarti proses Decompile Berhasil!, Silahkan lakukan proses editing yang dikehendaki.
- Jika tidak ada file tersebut (apktool.yml) berarti proses Decompile Gagal! Harap di ulang proses Decompilenya
- Jika muncul output/log error dan warning dari apktool pilih copy to clipboard lalu paste di comment bawah kita diskusikan bersama

PROSES RECOMPILE
Setelah melewati proses Decompile lalu melakukan editing/oprek langkah selanjutkan adalah proses Recompile
- Pastikan telah melakukan editing dengan benar serta men-Save file-file yang di edit
- Buka apktool
- Masuk ke sdcard/apktool
- Tap folder SystemUI_src 
- Pilih recompile
- Tunggu hingga proses selesai
- Perhatikan pada output/log jika akhirannya terdapat tulisan building apk file APAPUN warning diatasnya disertai muncul file baru SystemUI_src.apk maka proses Recompile Berhasil!
- Jika pada output/log apktool di akhirannya tidak terdapat tulisan building apk file dan tidak muncul file baru SystemUI_src.apk maka proses Recompile tsb Gagal!
- Jika Gagal pada jendela output/lognya muncul warning/error pilih copy to clipboard lalu paste di comment bawah kita diskusikan bersama

PROSES SIGN
- Buka Root Explorer
- Masuk ke sdcard/apktool
- Tekan lama file SystemUI_src.apk lalu pilih Extract All
- Tunggu hingga selesai
- Lalu klik SystemUI.apk > View
- Ceklis AndroidManifest.xml dan META-INF
- Lalu extract
- Setelah selesai masuk ke folder speedsoftware/extracted
- Pindahkan AndroidManifest.xml dan META-INF ke dalam folder SystemUI_src
- Selanjutnya tekan lama folder SystemUI_src, pilih zip this folder
- Tunggu sampai kelar
- Jika sudah selesai keluar dari folder extracted dan masuk folder archives
- Disitu ada file SystemUI_src.zip
- Rename menjadi SystemUI.apk
- Lalu push ke system/app
- Jangan lupa utuk ubah permissions nya jadi rw-r--r--
- Selesai

CONTOH BEBERAPA LOG + SOLUSI

1. Error Parameter

../../../storage/sdcard1/twitUI/SystemtwitUIkonsep_src/smali/com/nemesis/ownerinfo/Carrier$1.smali[24,4] Error for input '.parameter': Invalid directive ../../../storage/sdcard1/twitUI/SystemtwitUIkonsep_src/smali/com/nemesis/ownerinfo/Carrier$1.smali[40,4] Error for input '.parameter': Invalid directive ../../../storage/sdcard1/twitUI/SystemtwitUIkonsep_src/smali/com/nemesis/ownerinfo/Carrier$1.smali[41,4] Error for input '.parameter': Invalid directive 

Solusi
- Ganti versi apktool ke v.1.5.2 lalu lakukan Decompile ULANG


2. Error Could Not Decode attr (karena belum install framework yang dibutuhkan)
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080676
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080676
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080676
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x010808da
....... dst

Solusi
- lakukan import as framework semua (.apk) di folder framework (misal; framework-res.apk - mediatek-res.apk - miui-res.apk - lidroid-res.apk , twframework-res.apk - dll)


3. 
Error values yang berderet sampe lag ga bisa di scroll (akibat kesalahan format image)
I: Building resources... libpng error: Not a PNG file ERROR: Failure processing PNG image /storage/sdcard1/-asu/SystemUI_src/res/drawable-mdpi/battery_low_battery.png /storage/sdcard1/-asu/SystemUI_src/res/values/public.xml:40: error: Public entry identifier 0x7f020079 entry index is larger than available symbols (index 121, total symbols 83). /storage/sdcard1/-asu/SystemUI_src/res/values/public.xml:40: error: Public symbol drawable/APKTOOL_DUMMY_0079 declared here is not defined. /storage/sdcard1/-asu/SystemUI_src/res/values/public.xml:44: error: Public entry identifier 0x7f0200c3 entry index is larger than available symbols (index 195, total symbols 83). /storage/sdcard1/-asu/SystemUI_src/res/values/public.xml:44: error: Public symbol drawable/APKTOOL_DUMMY_00c3 declared here is not defined. /storage/sdcard1/-asu/SystemUI_src/res/values/public.xml:45: error: Public entry identifier 0x7f0200c7 entry index is larger than available symbols (index 199, total symbols 83). /storage/sdcard1/-asu/SystemUI_src/res/values/public.xml:45: error: Public symbol drawable/APKTOOL_DUMMY_00c7 declared here is not defined. 

Solusi- cek ulang format gambar penyebabnya
jangan asal menambahkan 9.png di belakang gambar yang bukan image 9.png
jangan asal merubah nama gambar (misal aslinya blaemblaem.jpg direname  jadi blaemblaem.png)


4. Error data apktool No such file or directory
/data/data/per.pqy.apktool/mydata/apktool.sh: line 4: /data/data/per.pqy.apktool/lix/jvm/java-7-openjdk-armel/jre/bin/java: No such file or directory

Solusi
- baca lagi PROSES PERSIAPAN APKTOOL di atas

Artikel Terkait

14   comments

cara ngatasin tema yang susah di lepas gmn gan ?

* Mohon bantuannya :3
Reply Delete
Hapus data di manager applikasi, uninstal sampai ke akar2nya,, trus pake wiztouchpad bawaan, insyaaloh :-bd
Reply Delete
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more

Reply Delete
gimn tu gan.. mohon pencerahanya
Reply Delete
This comment has been removed by the author.
Delete
nice tutorial dan lengkap, ikut meramaikan ya gan

Cara Menggunakan APKtool pada Windows
http://catatandroid.blogspot.co.id/2012/11/cara-menggunakan-apktool-pada-windows.html

Cara Mudah Decompile Recompile Menggunakan Apktool Mobile Tanpa PC
http://catatandroid.blogspot.co.id/2015/09/cara-decompile-recompile-tanpa-pc.html

Cara Instal Apktool untuk Decompile Recompile di Windows 10 Terbaru
http://catatandroid.blogspot.co.id/2015/09/decompile-recompile-windows-10.html
Reply Delete
mantap gan lengkap.. sampai team malaysia iri soalnya dia aja pengen pinter hahahaha padahal saya udah tau compile.. terus kan usaha moga berkah
Reply Delete
Gan framework-res kok gak mau di import as framework
Reply Delete
invalid resource directory name: /storage/sdcard0/Apktool/SystemUI_src/res/values-?@-rES
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt4.4, p, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-b0612b9691, -F, /data/data/per.pqy.apktool/APKTOOL7124841425348877733.tmp, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/sdcard0/Apktool/SystemUI_src/res, -M, /storage/sdcard0/Apktool/SystemUI_src/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
at brut.androlib.Androlib.buildResources(Androlib.java:374)
at brut.androlib.Androlib.build(Androlib.java:277)
at brut.androlib.Androlib.build(Androlib.java:250)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt4.4, p, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-b0612b9691, -F, /data/data/per.pqy.apktool/APKTOOL7124841425348877733.tmp, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/sdcard0/Apktool/SystemUI_src/res, -M, /storage/sdcard0/Apktool/SystemUI_src/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:488)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [/data/data/per.pqy.apktool/apktool/openjdk/bin/aapt4.4, p, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-b0612b9691, -F, /data/data/per.pqy.apktool/APKTOOL7124841425348877733.tmp, -0, arsc, -I, /data/data/per.pqy.apktool/1.apk, -S, /storage/sdcard0/Apktool/SystemUI_src/res, -M, /storage/sdcard0/Apktool/SystemUI_src/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:482)
... 6 more
I: Using Apktool 2.0.0-5d73e2-SNAPSHOT on SystemUI_src
I: Smaling smali folder into classes.dex...
I: Building resources...


Nubi butuh pencerahan gan
Reply Delete
This comment has been removed by the author.
Delete
Klo ini kenapa gan???
ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libudf.so' from LD_PRELOAD cannot be preloaded: ignored.
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
Reply Delete
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f07000a dimen/notification_min_height, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)


Ini ptoses dc nya udah berhasil belum gan?
Reply Delete
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f07000a dimen/notification_min_height, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)

Reply Delete

Post a Comment

Cancel Reply