Skip to content

Commit

Permalink
Merge pull request #102 from Surendrajat/master
Browse files Browse the repository at this point in the history
Merge from an updated clone
  • Loading branch information
Surendrajat committed Mar 20, 2018
2 parents 9e114ca + a64fdb1 commit 9f56d97
Show file tree
Hide file tree
Showing 32 changed files with 329 additions and 247 deletions.
46 changes: 38 additions & 8 deletions .travis.yml
Expand Up @@ -7,13 +7,43 @@ branches:
os:
- linux

install:
- sudo add-apt-repository -y ppa:beineri/opt-qt521
- sudo apt-get -qy update
- sudo apt-get -qy install qt52base qt52tools
before_install:
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install qt5-default qttools5-dev-tools

script:
- source /opt/qt52/bin/qt52-env.sh
- lrelease res/lang/en.ts
- qmake apkstudio.pro CONFIG+=release
- make
- lrelease res/lang/en.ts
- qmake apkstudio.pro CONFIG+=release
- make

- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt*.AppImage

- mkdir apkstudio-latest-release
- cd apkstudio-latest-release
- cp ../apkstudio .

- ../linuxdeployqt*.AppImage apkstudio -bundle-non-qt-libs -no-translations -verbose=2 -appimage -no-copy-copyright-files

# removing doc folder, apprun shortcut and .DirIcon
# - rm -rf doc AppRun .DirIcon
# removing extra libraries
# - cd lib && mv libQt5Core.so.5 libQt5Gui.so.5 libQt5Widgets.so.5 libicu* .. && rm -r * && mv ../libQ* ../libi* . && cd ..
#
# - rm -rf plugins/imageformats/ plugins/platforminputcontexts/ plugins/xcbglintegrations/

# - cd ..
# - env GZIP=-9 tar -zvcf apkstudio-latest-release.tar.gz apkstudio-latest-release

after_script:
- curl --upload-file ./*.AppImage https://transfer.sh/apkstudio-$(git rev-parse --short HEAD)-linux_x86_64.AppImage

# deploy:
# provider: releases
# api_key: $GITHUB OAUTH TOKEN"
# file: "*.AppImage"
# overwrite: true
# skip_cleanup: true
# # on:
# # tags: true
112 changes: 51 additions & 61 deletions README.md
@@ -1,63 +1,53 @@
[APK Studio](https://github.com/vaibhavpandeyvpz/apkstudio) is a **cross-platform** IDE for reverse-engineering (decompiling/editing) & recompiling of android application binaries within a single user-interface. It features a friendly layout, with a code editor which support syntax highlighting for Android SMALI (*.smali) code files.

[![Build status (Linux)](https://travis-ci.org/vaibhavpandeyvpz/apkstudio.svg)](https://travis-ci.org/vaibhavpandeyvpz/apkstudio) [![Build status (Windows)](https://ci.appveyor.com/api/projects/status/8v8g7qbfxix8cth3?svg=true)](https://ci.appveyor.com/project/vaibhavpandeyvpz/apkstudio) [![Download](https://api.bintray.com/packages/vaibhavpandeyvpz/generic/apkstudio/images/download.svg) ](https://bintray.com/vaibhavpandeyvpz/generic/apkstudio/_latestVersion)

Instructions:
--------
- Make sure **JAVA_HOME** point to a valid **JDK** (*JRE* may not work)
- You should also install or have **ADB** in *PATH*. This can be done on debian{-based} distros as follows:
```bash
sudo apt-get install android-tools-adb
```
- You can then download, install & start de/re-compiling

**Note**: If you encounter any problems, make sure to check **Console Output** at bottom of IDE to get the output of command which was actually executed by program. Report any issues related to APK Studio [here](https://github.com/vaibhavpandeyvpz/apkstudio/issues) on Github. Please note, an issue with [apktool](http://ibotpeaches.github.io/Apktool/) is not an issue with **APK Studio**. Please verify the context of issue before opening a ticket.

Download:
--------
- Native installers for supported platforms are [here](https://bintray.com/vaibhavpandeyvpz/generic/apkstudio/view).
<br>
[![Installers by BitRock](https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/master/external/bitrock.png "Many thanks to BitRock for donating license for InstallBuilder.")](http://installbuilder.bitrock.com/)


Building (Linux):
--------
- Make sure you have **GCC 4.6+**, **QT 5.2+**
- Run below commands in a writable directory
```bash
git clone https://github.com/vaibhavpandeyvpz/apkstudio.git
cd apkstudio
lrelease res/lang/en.ts
qmake apkstudio.pro CONFIG+=release
# {IF} On KDE 5.x
export CXXFLAGS="$CXXFLAGS -DNO_NATIVE_DIALOG"
# {/IF}
make
```
- More information on building from source is provided in the [Wiki](https://github.com/vaibhavpandeyvpz/apkstudio/wiki)

Features:
---------------------------------
- Decompile/Recompile APK
- Flexible Keystore & Key-Alias Chooser
- Automatic Zip-align
- Syntax Highlighting (*.java; *.smali; *.xml; *.yml)
- Image Viewer For Resources
- One-click **Install** To Device
- Frameworks Support

TODO:
-------------
- Code Completion

Screenshots:
-------------
![Windows Screenshot #1](https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/master/external/screenshots/windows-1.png "Windows Screenshot #1")

![Linux Screenshot #1](https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/master/external/screenshots/linux-1.png "Linux Screenshot #1")

![Linux Screenshot #2](https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/master/external/screenshots/linux-2.png "Linux Screenshot #2")
# APK Studio [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9709de5012824c36b54fda9c2c6390bf)](https://app.codacy.com/app/Surendrajat/apkstudio?utm_source=github.com&utm_medium=referral&utm_content=Surendrajat/apkstudio&utm_campaign=badger) [![Build Status(Linux)](https://travis-ci.org/Surendrajat/ApkStudio.svg)](https://travis-ci.org/Surendrajat/ApkStudio) [![Build status(Windows)](https://ci.appveyor.com/api/projects/status/mnr254lm0mlshmfb?svg=true)](https://ci.appveyor.com/project/Surendrajat/apkstudio) [![Join the chat at https://gitter.im/apk-studio/ideas](https://badges.gitter.im/apk-studio/ideas.svg)](https://gitter.im/apk-studio/ideas?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
>**A Cross-Platform IDE for Reverse-Engineering (Disassembling, Hacking & Rebuilding) Android applications - featuring a friendly UI and Code editor with Syntax-highlighting support**
### Features
- Disassembling & Rebuilding APKs
- Code Editor with Syntax Highlighting (`java` `smali` `xml` `yml`)
- Built-in Image viewer for Resources
- Single-click APK Signing with embedded key-store *(New)*
- Android Signing scheme v2 Support *(New)*
- Flexible Keystore & Key-Alias import
- Automatic Zip-Aligning with embedded `zipalign` *(New)*
- Single-click App Install to device
- Frameworks Support

Disclaimer:
-------------
Same as [apktool](http://ibotpeaches.github.io/Apktool/), **APK Studio** is neither intended for piracy nor other non-legal uses. It could be used for localizing, adding some features or support for custom platforms, analyzing applications &amp; much more.
### Download
>[![Download](https://img.shields.io/github/release/surendrajat/apkstudio/all.svg?longCache=true&style=for-the-badge)](https://github.com/Surendrajat/apkstudio/releases)
### Requirements
- **JDK >= 8**
- **Apktool**
>Download latest [`apktool.jar`](https://bitbucket.org/iBotPeaches/apktool/downloads/) and put it in the following path:
>- Linux: `/home/{your-user-name}/.apkstudio/vendor/apktool.jar`
>- Windows: `C:\Users\{your-user-name}\.apkstudio\vendor\apktool.jar`
>If you've `apktool.jar` already installed in the specified path, replace it with the new one and execute the following command in same path: `java -jar apktool.jar empty-framework-dir --force`
- **uber-apk-signer**
>Download latest [`uber-apk-signer.jar`](https://github.com/patrickfav/uber-apk-signer/releases) and put it in the following path:
>- Linux: `/home/{your-user-name}/.apkstudio/vendor/uber-apk-signer.jar`
>- Windows: `C:\Users\{your-user-name}\.apkstudio\vendor\uber-apk-signer.jar`
- **adb** (optional) and **zipalign** (linux_x86 only)
>- Ubuntu: `sudo apt-get install android-tools-adb zipalign`
>- Windows: [adb driver](https://lifehacker.com/the-easiest-way-to-install-androids-adb-and-fastboot-to-1586992378)
### Links
- [Building (Command line)](https://github.com/Surendrajat/ApkStudio/wiki/Building#building-linux)
- [Building (Qt Creator)](https://github.com/Surendrajat/ApkStudio/wiki/Building#building-with-qt-creator)
- [Bug Reporting](https://github.com/surendrajat/apkstudio/issues)
- [Contributors](https://github.com/Surendrajat/ApkStudio/graphs/contributors)
- [Special Thanks](https://github.com/Surendrajat/ApkStudio/wiki/SpecialThanks)
- [XDA Thread](https://forum.xda-developers.com/showthread.php?t=3761033)

### TODO
- [Framework management](https://ibotpeaches.github.io/Apktool/documentation/#frameworks) within IDE
- Opcode Hex Viewer

### Screenshots
>![Screenshot #1](https://raw.githubusercontent.com/surendrajat/apkstudio/master/external/screenshots/apkstudio881.png "Screenshot #1")
>![Screenshot #2](https://raw.githubusercontent.com/surendrajat/apkstudio/master/external/screenshots/apkstudio882.png "Screenshot #2")
### Disclaimer
>Same as [Apktool](http://ibotpeaches.github.io/Apktool/), **APK Studio** is neither intended for piracy nor other non-legal uses. It could be used for localizing, adding some features or support for custom platforms, analyzing applications &amp; much more.
1 change: 1 addition & 0 deletions _config.yml
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
11 changes: 5 additions & 6 deletions apkstudio.pro
Expand Up @@ -22,7 +22,6 @@ HEADERS += \
include/flickcharm.h \
include/ide.h \
include/installrunnable.h \
include/jarsigner.h \
include/java.h \
include/macros.h \
include/menubar.h \
Expand All @@ -43,14 +42,13 @@ HEADERS += \
include/toolbar.h \
include/viewer.h \
include/widgetbar.h \
include/zipalign.h
include/uberapksigner.h

OTHER_FILES += \
.gitignore \
.travis.yml \
appveyor.yml \
res/highlight/default.theme \
res/highlight/java.def \
res/highlight/numbers.def \
res/highlight/smali.def \
res/highlight/strings.def \
Expand All @@ -60,7 +58,9 @@ OTHER_FILES += \
res/lang/en.ts \
res/styles/default.qss \
res/win32.rc \
README.md
README.md \
LICENSE.md \
_config.yml

QT += core gui widgets

Expand All @@ -87,7 +87,6 @@ SOURCES += \
src/flickcharm.cpp \
src/ide.cpp \
src/installrunnable.cpp \
src/jarsigner.cpp \
src/java.cpp \
src/main.cpp \
src/menubar.cpp \
Expand All @@ -108,7 +107,7 @@ SOURCES += \
src/toolbar.cpp \
src/viewer.cpp \
src/widgetbar.cpp \
src/zipalign.cpp
src/uberapksigner.cpp

TARGET = apkstudio

Expand Down
25 changes: 21 additions & 4 deletions appveyor.yml
@@ -1,8 +1,25 @@
branches:
only:
- master

install:
- set QTDIR=C:\Qt\5.5\mingw492_32
- set PATH=%PATH%;%QTDIR%\bin;C:\MinGW\bin
- set QTDIR=C:\Qt\5.8\mingw53_32
# - choco install -y InnoSetup
- set PATH=%QTDIR%\bin;C:\Qt\Tools\mingw530_32\bin;%PATH%;"C:\Program Files (x86)\Inno Setup 5"
build_script:
- qmake apkstudio.pro
- lrelease res\lang\en.ts
- qmake apkstudio.pro
- mingw32-make
test: off
after_build:
- windeployqt release/apkstudio.exe --release --no-translations
# - cmd: cp LICENSE release/LICENSE.txt"
# - iscc innosetup.iss
- rm release/*.o
- rm release/*.cpp
- rm release/*.h
- tree

artifacts:
- path: release
type: zip
name: apkstudio
Binary file removed external/bitrock.png
Binary file not shown.
Binary file added external/screenshots/apkstudio881.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added external/screenshots/apkstudio882.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed external/screenshots/linux-1.png
Binary file not shown.
Binary file removed external/screenshots/linux-2.png
Binary file not shown.
Binary file removed external/screenshots/windows-1.png
Binary file not shown.
12 changes: 6 additions & 6 deletions include/constants.h
Expand Up @@ -22,7 +22,7 @@
#define HIGHLIGHTER_THEME "default.theme"
#define HIGHLIGHTER_STYLE_WHITESPACES "whitespaces"

#define PREF_DEFAULT_JAVA_HEAP 128
#define PREF_DEFAULT_JAVA_HEAP 256
#define PREF_DEFAULT_TAB_STOP_WIDTH 4
#define PREF_DEFAULT_TEXT_ENCODING "UTF-8"

Expand Down Expand Up @@ -54,6 +54,7 @@
#define REGEX_LF "[\\r\\n]"
#define REGEX_ADB_VERSION "^.*(\\d+)\\.(\\d+)\\.(\\d+)$"
#define REGEX_APKTOOL_VERSION "^(\\d+)\\.(\\d+)\\.(\\d+)$"
#define REGEX_UBERAPKTOOL_VERSION "^.*(\\d+)\\.(\\d+)\\.(\\d+)$"
#define REGEX_JAVA_VERSION "^.*\"(\\d+)\\.(\\d+)\\.(\\d+)_(\\d+)\"$"
#define REGEX_THEME_STYLE "\\b([a-z]+)\\:\\s*([0-9a-z#]+)\\b"
#define REGEX_WHITESPACE "\\s+"
Expand All @@ -64,11 +65,10 @@

#define THREADS_MAX 1

#define URL_CONTRIBUTE "https://github.com/vaibhavpandeyvpz/apkstudio"
#define URL_DOWNLOADS "https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/%1/external/downloads.json"
#define URL_DOCUMENTATION "http://www.vaibhavpandey.com/apkstudio"
#define URL_ISSUES "https://github.com/vaibhavpandeyvpz/apkstudio/issues"
#define URL_THANKS "http://forum.xda-developers.com/showthread.php?t=2493107"
#define URL_CONTRIBUTE "https://github.com/surendrajat/apkstudio"
#define URL_DOCUMENTATION "http://surendrajat.github.io/ApkStudio"
#define URL_ISSUES "https://github.com/surendrajat/apkstudio/issues"
#define URL_THANKS "https://forum.xda-developers.com/showthread.php?t=3761033"

/**
* @brief Build flags
Expand Down
3 changes: 3 additions & 0 deletions include/ide.h
Expand Up @@ -20,6 +20,7 @@ class Ide : public QMainWindow
private:
APP_CONNECTIONS_LIST
QString _apk;
bool _signed;
QPointer<PleaseWait> _pleaseWait;
QString _project;
bool _quit;
Expand Down Expand Up @@ -71,6 +72,8 @@ public Q_SLOTS:
void onMenuBarProjectInstall();
void onMenuBarProjectReload();
void onMenuBarProjectSignExport();
void onToolBarProjectSign();
void onMenuBarProjectBrowseFiles();
void onOpenApk(const QString &apk);
void onOpenDir(const QString &project);
void onRunnableStarted();
Expand Down
22 changes: 0 additions & 22 deletions include/jarsigner.h

This file was deleted.

31 changes: 31 additions & 0 deletions include/uberapksigner.h
@@ -0,0 +1,31 @@
#ifndef UBERAPKSIGNER_H
#define UBERAPKSIGNER_H

#include <QStringList>
#include "macros.h"
#include "java.h"

APP_NAMESPACE_START

class UberApkSigner : public Java
{
private:
QString _jar;
static UberApkSigner *_self;
private:
explicit UberApkSigner(QObject *parent = 0);
public:
// Result build(const QString &project, const QString &apk);
// Result decode(const QString &apk, const QString &project, const QString &framework, const bool sources, const bool resources);
Result sign(const QString &src, const QString &keystore, const QString &keystorePass, const QString &key, const QString &keyPass = QString());
Result signDebug(const QString &src);
inline Result exec(const QString &arg) { return exec(QStringList(arg)); }
Result exec(const QStringList &args = QStringList());
static UberApkSigner *get();
QString getVersion();
};

APP_NAMESPACE_END

#endif // UBERAPKSIGNER_H

22 changes: 0 additions & 22 deletions include/zipalign.h

This file was deleted.

0 comments on commit 9f56d97

Please sign in to comment.