[Java] [Android] Let’s peep at other people’s apps

1 minute read

In business, I want to take a look at the competing company’s apps ~~ and see the source code, so I leave it as a memorandum.

Download the Android application installed on the device

# Check if the connection between the PC and device is established
$ adb devices

# Search target package
$ adb shell pm list packages -f | grep [keyword to download]

If you enter the company name or the name of the application, the keyword to download is usually caught.

# Example
$ adb shell pm list packages -f | grep yamachita0109

The standard output value is decomposed.

First name value
APK save path /data/app/com.yamachita0109.voice-Q6HZbU2pgLu4T3FCQg74kg==/
APK file name base.apk
Application ID com.yamachita0109.voice


# Specify APK save path
$ adb pull [APK save path]
# Example
$ adb pull /data/app/com.yamachita0109.voice-Q6HZbU2pgLu4T3FCQg74kg==/
/data/app/com.yamachita0109.voice-Q6HZbU2pgLu4T3FCQg74kg==/: 1 file pulled. 31.4 MB/s (9086342 bytes in 0.276s)

# APK file has been downloaded
$ ls com.yamachita0109.voice-Q6HZbU2pgLu4T3FCQg74kg\=\=/
base.apk lib

Decompile the APK file

Use jadx.

git clone https://github.com/skylot/jadx.git
cd jadx
./gradlew dist

JDK 8 or higher must be installed:

So be careful.

Finally decompile.

# OK through Path
$ build/jadx/bin/jadx --log-level error [APK file path]

A folder is created with the APK file name. The source code is included in it, so you can use it as a reference.


“Sweet! Martial arts tradition starts with imitation!”

It is a quote from Akame, the character of Kenichi, the strongest disciple in history.

“Every originality begins with imitation”

A quote from Akira Takada, the founder of Japanet Takata.