First step: Install Apktool
Installation method Reference (http://blog.csdn.net/wirelessqa/article/details/12655325)
download two filesGet here https://code.google.com/p/android-apktool/downloads/list?q=label:Featured download this file 1. Apktool1.5.2.tar.bz22. apktool-install-linux-r05-ibot.tar.bz2
unzip these two files
[email protected]:~/download $ ls
apktool1.5.2.tar.bz2 apktool-install-linux-r05-ibot.tar.bz2 book.pdf spark_2.4_h5.apk
# method 1 To unzip the bz2 file, first use BUNZIP2 to convert to tar file, then use tar xvf to extract
[Email protected]:~/download $ bunzip2 apktool1.5.2.tar.bz2
bunzip2:apktool1.5.2.tar.bz2:trailing Garbage after EOF ignored
[email protected]:~/download $ ls
Apktool1.5.2.tar apktool-install-linux-r05-ibot.tar.bz2 book.pdf spark_2.4_h5.apk
[Email protected]:~/download $ tar xvf apktool1.5.2.tar
Apktool1.5.2/
Apktool1.5.2/apktool.jar
# Method of extracting bz2 file 2, extract directly: Tar jxvf file. bz2
[Email protected]:~/download $ tar jxvf apktool-install-linux-r05-ibot.tar.bz2
Apktool-install-linux-r05-ibot/aapt
BZIP2: (stdin): Trailing garbage after EOF ignored
apktool-install-linux-r05-ibot/
Apktool-install-linux-r05-ibot/apktool
[Email protected]:~/Download $ ls-al
Total dosage 11740
Drwxr-xr-x 4 Bixiaopeng Bixiaopeng 4096 October 12 10:42.
Drwxr-xr-x Bixiaopeng Bixiaopeng 4096 October 12 10:38.
Drwxrwxr-x 2 Bixiaopeng Bixiaopeng 4096 February 3 apktool1.5.2
-RW-------1 Bixiaopeng bixiaopeng 2658304 October 10:37 Apktool1.5.2.tar
Drwxrwxr-x 2 Bixiaopeng bixiaopeng 4096 December Apktool-install-linux-r05-ibot
-rw-rw-r--1 Bixiaopeng bixiaopeng 419840 October 10:37 apktool-install-linux-r05-ibot.tar.bz2
-rw-rw-r--1 Bixiaopeng bixiaopeng 943231 October 09:13 book.pdf
-rw-rw-r--1 Bixiaopeng bixiaopeng 7963744 October 15:21 spark_2.4_h5.apk
# Three files extracted from the Apktool.jar/aapt/apktool copy to the/usr/local/bin/directory
[Plain]View Plaincopy
- [Email protected]:~/Download/apktool-install-linux-r05-ibot$ cd/usr/local/bin/
- [Email protected]:/usr/local/bin$ ls-al
- Total Dosage 3704
- Drwxr-xr-x 2 root root 4096 October 12 10:51.
- Drwxr-xr-x root root 4096 April 25 01:11..
- -rwxr-x---1 root root 1119899 October 10:51 aapt
- -rwxr-xr-x 1 root root 2320 October 10:51 apktool
- -rw-r--r--1 root root 2655843 October 10:50 Apktool.jar
#!/bin/bash
Source/etc/profile
If [-D "Test"]; Then
RM-FR Test
Fi
Apktool d browser.apk Test
echo "Rename Step 1"
Apktool B Test browser.apk
echo "Rename Step 2"
Jarsigner-verbose-sigalg sha1withrsa-digestalg sha1-keystore debug.keystore-storepass android-keypass android brows er.apk Androiddebugkey
APK re-signing script for Linux