APK re-signing script for Linux

Source: Internet
Author: User

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
  1. [Email protected]:~/Download/apktool-install-linux-r05-ibot$ cd/usr/local/bin/
  2. [Email protected]:/usr/local/bin$ ls-al
  3. Total Dosage 3704
  4. Drwxr-xr-x 2 root root 4096 October 12 10:51.
  5. Drwxr-xr-x root root 4096 April 25 01:11..
  6. -rwxr-x---1 root root 1119899 October 10:51 aapt
  7. -rwxr-xr-x 1 root root 2320 October 10:51 apktool
  8. -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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.