9

I want to assemble ".smali" and make new ".apk" in an Android application. I don't have so much time to do this so I have to use some source code that already exists.

There is an Apktool project which can build on Windows/Mac OS X/Linux, but I want to build it on Android.

I also tried to include the "apktool.jar" as an external library in an Android Application Project in Eclipse, but it failed.


After some research, it seems more clear that I need only the following two projects running on Android:

  1. Smali (independent project)
  2. JarSigner (from OpenJDK)

And, Apktool is not necessary.


This project has what I need:

https://code.google.com/p/java-ide-droid/

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Yin
  • 612
  • 7
  • 10

3 Answers3

2

Requirements JRE 1.6 (Java Runtime Environment) aapt command in a PATH basic knowledge of what is SDK, aapt, PATH, smali and Google search engine may be useful

This is from the apktools official website. Because it needs aapt, it seems quite hard to use apktools in an Android app. But if you can get the source code and compiled in an aosp environment, it could possibly make it run on the Android side.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Frank Cheng
  • 5,928
  • 9
  • 52
  • 80
0

Yes, there is a program also named apktool, but which runs on Android! Just have a look at http://code.google.com/p/apktool.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

As of 2022, Yes there is a mobile version of Apktool, it is however not developed by iBotPeaches it's developed by Maximoff.

It's called Apktool M, you can grab the latest stable version from the link below.

https://maximoff.su/apktool/?lang=en

As far as stability goes it's definitely stable for Android 12 as far as I've tested.

Because I'm also a security freak, I ran it through about 7 different AV scanners to make sure I wasn't installing some hogwash virus masquerading as a legit app, and all of the scan results returned nothing malicious.

As far as usage goes it definitely decompiles APK's like Apktool as far as I've tested, however I don't expect it to work on every APK though.

According to the documentation,

Apktool M uses the following open source projects:

  • Apktool-android
  • aapt, aapt2
  • Commons IO
  • Apktool
  • antlr4
  • apksig
  • smali, baksmali, dexlib2
  • guava
  • jadx
  • textwarrior
  • axml
  • unapkm
  • imagetracerandroid
  • ZipAligner-for-Android
  • Dex2Jar_Android_2x
  • AndroidX
  • AndroidSVG
  • PhotoView
Morsmalleo
  • 85
  • 8