Skip to content

Commit 455ccee

Browse files
Download binary dependencies automatically (#201)
* Download binary dependencies automatically. * Fix aapt option on apktool * Fix java installation on mac * Use native dark themes * Fix launch issues on mac * Fix for icon & mac bundle name * Update icns file for mac * Update README with more features * Update screenshot * Remove unused qss files.
1 parent dedc87a commit 455ccee

27 files changed

+1669
-1523
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,9 @@ jobs:
288288
289289
- name: Create DMG
290290
run: |
291-
APP_NAME="ApkStudio"
292-
APP_PATH="build/bin/ApkStudio.app"
291+
APP_NAME="APK Studio"
292+
APP_BUNDLE_NAME="ApkStudio.app"
293+
APP_PATH="build/bin/${APP_BUNDLE_NAME}"
293294
DMG_NAME="ApkStudio-macOS-x64.dmg"
294295
295296
if [ ! -d "$APP_PATH" ]; then
@@ -313,20 +314,20 @@ jobs:
313314
314315
# Create a temporary directory for DMG contents
315316
mkdir -p dmg_temp
316-
cp -R "$APP_PATH" "dmg_temp/$APP_NAME.app"
317+
cp -R "$APP_PATH" "dmg_temp/${APP_BUNDLE_NAME}"
317318
318319
# Remove quarantine from copied app as well
319-
xattr -cr "dmg_temp/$APP_NAME.app"
320+
xattr -cr "dmg_temp/${APP_BUNDLE_NAME}"
320321
321322
# Code sign the copied app as well
322-
codesign --force --deep --sign - "dmg_temp/$APP_NAME.app" || {
323+
codesign --force --deep --sign - "dmg_temp/${APP_BUNDLE_NAME}" || {
323324
echo "Warning: Code signing copied app failed, but continuing..."
324325
}
325326
326327
# Touch the app bundle to refresh Finder icon cache
327-
touch "dmg_temp/$APP_NAME.app"
328-
touch "dmg_temp/$APP_NAME.app/Contents"
329-
touch "dmg_temp/$APP_NAME.app/Contents/Info.plist"
328+
touch "dmg_temp/${APP_BUNDLE_NAME}"
329+
touch "dmg_temp/${APP_BUNDLE_NAME}/Contents"
330+
touch "dmg_temp/${APP_BUNDLE_NAME}/Contents/Info.plist"
330331
331332
# Verify icon exists in app bundle
332333
ICON_PATH="$APP_PATH/Contents/Resources/icon.icns"
@@ -335,33 +336,51 @@ jobs:
335336
echo "Contents of Resources directory:"
336337
ls -la "$APP_PATH/Contents/Resources/" 2>/dev/null || echo "Resources directory not found"
337338
fi
339+
340+
# Rename the bundle in DMG to show "APK Studio" instead of "ApkStudio"
341+
# The executable name stays the same, only the bundle name changes
342+
if [ -d "dmg_temp/${APP_BUNDLE_NAME}" ]; then
343+
mv "dmg_temp/${APP_BUNDLE_NAME}" "dmg_temp/APK Studio.app"
344+
DMG_APP_NAME="APK Studio.app"
345+
echo "Renamed bundle to 'APK Studio.app' for DMG display"
346+
else
347+
DMG_APP_NAME="${APP_BUNDLE_NAME}"
348+
fi
349+
350+
# Re-sign the renamed bundle
351+
if [ -d "dmg_temp/${DMG_APP_NAME}" ]; then
352+
codesign --force --deep --sign - "dmg_temp/${DMG_APP_NAME}" || {
353+
echo "Warning: Re-signing renamed bundle failed, but continuing..."
354+
}
355+
fi
338356
339357
# Create DMG with volume icon and ensure app icon is visible
340358
if [ -f "$ICON_PATH" ]; then
341359
create-dmg \
342-
--volname "ApkStudio" \
360+
--volname "APK Studio" \
343361
--volicon "$ICON_PATH" \
344362
--window-pos 200 120 \
345363
--window-size 600 400 \
346364
--icon-size 100 \
347-
--icon "$APP_NAME.app" 150 190 \
348-
--hide-extension "$APP_NAME.app" \
365+
--icon "${DMG_APP_NAME}" 150 190 \
366+
--hide-extension "${DMG_APP_NAME}" \
349367
--app-drop-link 450 190 \
350368
"$DMG_NAME" \
351369
dmg_temp/
352370
else
353371
echo "Creating DMG without volume icon (icon file not found)"
354372
create-dmg \
355-
--volname "ApkStudio" \
373+
--volname "APK Studio" \
356374
--window-pos 200 120 \
357375
--window-size 600 400 \
358376
--icon-size 100 \
359-
--icon "$APP_NAME.app" 150 190 \
360-
--hide-extension "$APP_NAME.app" \
377+
--icon "${DMG_APP_NAME}" 150 190 \
378+
--hide-extension "${DMG_APP_NAME}" \
361379
--app-drop-link 450 190 \
362380
"$DMG_NAME" \
363381
dmg_temp/
364382
fi
383+
365384
366385
# Verify DMG was created
367386
if [ -f "$DMG_NAME" ]; then

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ compile_commands.json
4747

4848
# QtCreator local machine specific files for imported projects
4949
*creator.user*
50+
51+
# Debug output
52+
*.log

CMakeLists.txt

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_CXX_STANDARD_REQUIRED ON)
77

88
# Find Qt6
9-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
9+
find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets)
1010

1111
set(CMAKE_AUTOMOC ON)
1212
set(CMAKE_AUTORCC ON)
@@ -74,21 +74,20 @@ set(SOURCES
7474
sources/apksignworker.cpp
7575
sources/appearancesettingswidget.cpp
7676
sources/binarysettingswidget.cpp
77-
sources/darkstyle.cpp
7877
sources/findreplacedialog.cpp
7978
sources/flickcharm.cpp
8079
sources/hexedit.cpp
8180
sources/imageviewerwidget.cpp
82-
sources/lightstyle.cpp
8381
sources/mainwindow.cpp
8482
sources/processutils.cpp
8583
sources/settingsdialog.cpp
8684
sources/signingconfigdialog.cpp
8785
sources/signingconfigwidget.cpp
8886
sources/sourcecodeedit.cpp
8987
sources/splashwindow.cpp
90-
sources/stylecommon.cpp
9188
sources/themedsyntaxhighlighter.cpp
89+
sources/tooldownloaddialog.cpp
90+
sources/tooldownloadworker.cpp
9291
sources/versionresolveworker.cpp
9392
)
9493

@@ -98,23 +97,22 @@ set(HEADERS
9897
sources/apkdecompileworker.h
9998
sources/apkrecompileworker.h
10099
sources/apksignworker.h
101-
sources/darkstyle.h
102100
sources/appearancesettingswidget.h
103101
sources/binarysettingswidget.h
104102
sources/findreplacedialog.h
105103
sources/flickcharm.h
106104
sources/hexedit.h
107105
sources/imageviewerwidget.h
108-
sources/lightstyle.h
109106
sources/mainwindow.h
110107
sources/processutils.h
111108
sources/settingsdialog.h
112109
sources/signingconfigdialog.h
113110
sources/signingconfigwidget.h
114111
sources/sourcecodeedit.h
115112
sources/splashwindow.h
116-
sources/stylecommon.h
117113
sources/themedsyntaxhighlighter.h
114+
sources/tooldownloaddialog.h
115+
sources/tooldownloadworker.h
118116
sources/versionresolveworker.h
119117
)
120118

@@ -141,6 +139,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
141139
target_link_libraries(${PROJECT_NAME} PRIVATE
142140
Qt6::Core
143141
Qt6::Gui
142+
Qt6::Network
144143
Qt6::Widgets
145144
QHexView
146145
)
@@ -192,6 +191,8 @@ if(APPLE)
192191
" <string>6.0</string>\n"
193192
" <key>CFBundleName</key>\n"
194193
" <string>${PROJECT_NAME}</string>\n"
194+
" <key>CFBundleDisplayName</key>\n"
195+
" <string>APK Studio</string>\n"
195196
" <key>CFBundlePackageType</key>\n"
196197
" <string>APPL</string>\n"
197198
" <key>CFBundleShortVersionString</key>\n"
@@ -202,8 +203,16 @@ if(APPLE)
202203
" <string>10.13</string>\n"
203204
" <key>NSHighResolutionCapable</key>\n"
204205
" <true/>\n"
206+
" <key>NSPrincipalClass</key>\n"
207+
" <string>NSApplication</string>\n"
208+
" <key>LSApplicationCategoryType</key>\n"
209+
" <string>public.app-category.developer-tools</string>\n"
210+
" <key>NSRequiresAquaSystemAppearance</key>\n"
211+
" <false/>\n"
205212
" <key>CFBundleIconFile</key>\n"
206213
" <string>icon.icns</string>\n"
214+
" <key>CFBundleIconName</key>\n"
215+
" <string>icon.icns</string>\n"
207216
"</dict>\n"
208217
"</plist>\n"
209218
)

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
Open-source, cross platform [Qt6](https://www.qt.io/) based IDE for reverse-engineering [Android](https://android.com/) application packages. It features a friendly IDE-like layout including code editor with syntax highlighting support for \*.smali code files.
1010

11-
**Note**: This project has been migrated from Qt5 to Qt6 and from qmake to CMake. The build system now uses modern CMake with automated CI/CD via GitHub Actions.
12-
13-
[![Screenshot](https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/master/resources/screenshot.png)](https://raw.githubusercontent.com/vaibhavpandeyvpz/apkstudio/master/resources/screenshot.png)
11+
[![Screenshot](resources/screenshot.png)](resources/screenshot.png)
1412

1513
<p align="center">
1614
<a href="https://github.com/vaibhavpandeyvpz/apkstudio/actions">
@@ -31,20 +29,24 @@ Open-source, cross platform [Qt6](https://www.qt.io/) based IDE for reverse-engi
3129

3230
- Cross platform, run on **Linux**, **Mac OS X** & **Windows**
3331
- Decompile/recompile/sign & install APKs
32+
- **Automatic tool download & installation** - APK Studio can automatically download and install required tools (Java, Apktool, JADX, ADB, Uber APK Signer)
3433
- Built-in code editor (\*.java; \*.smali; \*.xml; \*.yml) w/ syntax highlighting
3534
- Built-in viewer for image (\*.gif; \*.jpg; \*.jpeg; \*.png) files
3635
- Built-in hex editor for binary files
36+
- **Dark/Light theme support** - Native Qt 6 theming with system integration
3737

3838
### Downloads
3939

40-
Please head over to [Releases](https://github.com/vaibhavpandeyvpz/apkstudio/releases) page for downloading. **Important:** Make sure to have `JAVA_HOME` environment variable pointing to a valid java installation for _jadx_ to be able to run.
40+
Please head over to [Releases](https://github.com/vaibhavpandeyvpz/apkstudio/releases) page for downloading.
41+
42+
**Note:** APK Studio can automatically download and install required tools (Java, Apktool, JADX, ADB, Uber APK Signer) on first launch. If you prefer to use your own installations, you can configure them in Settings.
4143

4244
### Building
4345

4446
#### Requirements
4547

4648
- **CMake** 3.16 or higher
47-
- **Qt6** 6.10.1 or higher (Core, Gui, Widgets components)
49+
- **Qt6** 6.10.1 or higher (Core, Gui, Network, Widgets components)
4850
- **C++17** compatible compiler
4951
- **Git** (for version information)
5052

@@ -90,7 +92,6 @@ The project uses GitHub Actions for automated builds on Windows, Linux, and macO
9092
- [patrickfav](https://github.com/patrickfav) for [uber-apk-signer](https://github.com/patrickfav/uber-apk-signer)
9193
- [skylot](https://github.com/skylot) for [jadx](https://github.com/skylot/jadx)
9294
- [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy) team for [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy) and [linuxdeploy-plugin-qt](https://github.com/linuxdeploy/linuxdeploy-plugin-qt)
93-
- [Antonio Dias](https://github.com/antonypro) for [QGoodWindow](https://github.com/antonypro/QGoodWindow)
9495
- [Antonio Davide](https://github.com/Dax89) for [QHexView](https://github.com/Dax89/QHexView)
9596
- [p.yusukekamiyamane](https://p.yusukekamiyamane.com/) for [Fugue](https://p.yusukekamiyamane.com/) icons
9697
- [Icons8](https://icons8.com/) for various icons

resources/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
code for this application is hosted at
1212
<a href="https://github.com/vaibhavpandeyvpz/apkstudio">Github</a>.
1313
</p>
14-
<p>Copyright (c) 2015-2018 Vaibhav Pandey -aka- VPZ and contributor(s)</p>
14+
<p>Copyright (c) 2015-2025 Vaibhav Pandey -aka- VPZ and contributor(s)</p>

resources/all.qrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
<file>icon.png</file>
3131
<file>splash.png</file>
3232
</qresource>
33-
<qresource prefix="/styles">
34-
<file>dark.qss</file>
35-
<file>light.qss</file>
36-
</qresource>
3733
<qresource prefix="/themes">
3834
<file>dark.theme</file>
3935
<file>light.theme</file>

0 commit comments

Comments
 (0)