Skip to content

Commit 3830794

Browse files
committed
Add standalone executable build system and GitHub Actions
1 parent b34718a commit 3830794

File tree

9 files changed

+636
-6
lines changed

9 files changed

+636
-6
lines changed
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
include:
15+
- os: windows-latest
16+
artifact_name: android-bloatware-remover.exe
17+
asset_name: android-bloatware-remover-windows.exe
18+
- os: ubuntu-latest
19+
artifact_name: android-bloatware-remover
20+
asset_name: android-bloatware-remover-linux
21+
- os: macos-latest
22+
artifact_name: android-bloatware-remover
23+
asset_name: android-bloatware-remover-macos
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install pyinstaller
37+
38+
- name: Create PyInstaller spec file
39+
run: |
40+
cat > android-bloatware-remover.spec << 'EOF'
41+
# -*- mode: python ; coding: utf-8 -*-
42+
43+
block_cipher = None
44+
45+
# Collect all brand directories and their contents
46+
brand_dirs = ['Samsung', 'Xiaomi', 'Oppo', 'Vivo', 'Realme', 'Tecno', 'OnePlus', 'Huawei', 'Honor', 'Motorola', 'Nothing']
47+
datas = []
48+
49+
# Add brand directories
50+
for brand in brand_dirs:
51+
datas.append((f'{brand}/*.md', f'{brand}/'))
52+
datas.append((f'{brand}/*.py', f'{brand}/'))
53+
54+
# Add core module
55+
datas.append(('core/*.py', 'core/'))
56+
57+
# Add other files
58+
datas.append(('README.md', '.'))
59+
datas.append(('LICENSE', '.'))
60+
61+
a = Analysis(
62+
['main.py'],
63+
pathex=[],
64+
binaries=[],
65+
datas=datas,
66+
hiddenimports=[
67+
'Samsung.samsung_remover',
68+
'Xiaomi.xiaomi_remover',
69+
'Oppo.oppo_remover',
70+
'Vivo.vivo_remover',
71+
'Realme.realme_remover',
72+
'Tecno.tecno_remover',
73+
'OnePlus.oneplus_remover',
74+
'Huawei.huawei_remover',
75+
'Honor.honor_remover',
76+
'Motorola.motorola_remover',
77+
'Nothing.nothing_remover',
78+
'core.bloatware_remover'
79+
],
80+
hookspath=[],
81+
hooksconfig={},
82+
runtime_hooks=[],
83+
excludes=[],
84+
win_no_prefer_redirects=False,
85+
win_private_assemblies=False,
86+
cipher=block_cipher,
87+
noarchive=False,
88+
)
89+
90+
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
91+
92+
exe = EXE(
93+
pyz,
94+
a.scripts,
95+
a.binaries,
96+
a.zipfiles,
97+
a.datas,
98+
[],
99+
name='android-bloatware-remover',
100+
debug=False,
101+
bootloader_ignore_signals=False,
102+
strip=False,
103+
upx=True,
104+
upx_exclude=[],
105+
runtime_tmpdir=None,
106+
console=True,
107+
disable_windowed_traceback=False,
108+
argv_emulation=False,
109+
target_arch=None,
110+
codesign_identity=None,
111+
entitlements_file=None,
112+
)
113+
EOF
114+
115+
- name: Build with PyInstaller
116+
run: |
117+
pyinstaller android-bloatware-remover.spec --clean
118+
119+
- name: Test executable (Windows)
120+
if: matrix.os == 'windows-latest'
121+
run: |
122+
dist/android-bloatware-remover.exe --test
123+
timeout-minutes: 2
124+
125+
- name: Test executable (Unix)
126+
if: matrix.os != 'windows-latest'
127+
run: |
128+
chmod +x dist/android-bloatware-remover
129+
timeout 30s dist/android-bloatware-remover --test || true
130+
131+
- name: Upload artifact
132+
uses: actions/upload-artifact@v3
133+
with:
134+
name: ${{ matrix.asset_name }}
135+
path: dist/${{ matrix.artifact_name }}
136+
137+
release:
138+
needs: build
139+
runs-on: ubuntu-latest
140+
if: startsWith(github.ref, 'refs/tags/')
141+
142+
steps:
143+
- uses: actions/checkout@v4
144+
145+
- name: Download all artifacts
146+
uses: actions/download-artifact@v3
147+
148+
- name: Create Release
149+
id: create_release
150+
uses: actions/create-release@v1
151+
env:
152+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
153+
with:
154+
tag_name: ${{ github.ref }}
155+
release_name: Release ${{ github.ref }}
156+
body: |
157+
## Android Bloatware Remover ${{ github.ref }}
158+
159+
Standalone executables for Windows, Linux, and macOS.
160+
161+
### Download Instructions:
162+
- **Windows**: Download `android-bloatware-remover-windows.exe`
163+
- **Linux**: Download `android-bloatware-remover-linux`
164+
- **macOS**: Download `android-bloatware-remover-macos`
165+
166+
### Usage:
167+
1. Download the appropriate executable for your operating system
168+
2. Make sure ADB is installed and in your PATH
169+
3. Enable USB debugging on your Android device
170+
4. Connect your device and run the executable
171+
172+
### Supported Devices:
173+
- Samsung (One UI)
174+
- Xiaomi/Redmi/POCO (MIUI)
175+
- Oppo (ColorOS)
176+
- Vivo/iQOO (FunTouch OS)
177+
- Realme (Realme UI)
178+
- Tecno (HiOS)
179+
- OnePlus (OxygenOS)
180+
- Huawei (EMUI/HarmonyOS)
181+
- Honor (Magic UI)
182+
- Motorola (My UX)
183+
- Nothing (Nothing OS)
184+
185+
### Test Mode:
186+
Run with `--test` flag to try without a connected device.
187+
draft: false
188+
prerelease: false
189+
190+
- name: Upload Windows Release Asset
191+
uses: actions/upload-release-asset@v1
192+
env:
193+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
194+
with:
195+
upload_url: ${{ steps.create_release.outputs.upload_url }}
196+
asset_path: ./android-bloatware-remover-windows.exe/android-bloatware-remover.exe
197+
asset_name: android-bloatware-remover-windows.exe
198+
asset_content_type: application/octet-stream
199+
200+
- name: Upload Linux Release Asset
201+
uses: actions/upload-release-asset@v1
202+
env:
203+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204+
with:
205+
upload_url: ${{ steps.create_release.outputs.upload_url }}
206+
asset_path: ./android-bloatware-remover-linux/android-bloatware-remover
207+
asset_name: android-bloatware-remover-linux
208+
asset_content_type: application/octet-stream
209+
210+
- name: Upload macOS Release Asset
211+
uses: actions/upload-release-asset@v1
212+
env:
213+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214+
with:
215+
upload_url: ${{ steps.create_release.outputs.upload_url }}
216+
asset_path: ./android-bloatware-remover-macos/android-bloatware-remover
217+
asset_name: android-bloatware-remover-macos
218+
asset_content_type: application/octet-stream

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,10 @@ config.json
5656

5757
# Old uninstaller scripts (replaced by new system)
5858
*-uninstall.py
59-
*-uninstaller.py
59+
*-uninstaller.py
60+
61+
# Build artifacts
62+
build/
63+
dist/
64+
*.spec
65+
*.egg-info/

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,18 @@ Your phone comes with tons of apps you never asked for. This tool helps you get
2020
- Motorola (My UX)
2121
- Nothing (Nothing OS)
2222

23-
## Setup
23+
## Quick Download (Recommended)
24+
25+
**Download standalone executable** - No Python installation required!
26+
27+
1. Go to [Releases](https://github.com/PixelCode01/UIBloatwareRegistry/releases)
28+
2. Download for your system:
29+
- **Windows**: `android-bloatware-remover-windows.exe`
30+
- **Linux**: `android-bloatware-remover-linux`
31+
- **Mac**: `android-bloatware-remover-macos`
32+
3. Run the executable directly!
33+
34+
## Manual Setup (Advanced)
2435

2536
1. **Install ADB**
2637
- Windows: Download Android SDK Platform Tools, add to PATH
@@ -33,12 +44,24 @@ Your phone comes with tons of apps you never asked for. This tool helps you get
3344

3445
3. **Get the tool**
3546
```bash
36-
git clone https://github.com/AnantMishra01/UIBloatwareRegistry.git
47+
git clone https://github.com/PixelCode01/UIBloatwareRegistry.git
3748
cd UIBloatwareRegistry
3849
```
3950

4051
## How to use
4152

53+
### Using Standalone Executable
54+
Just run the downloaded executable:
55+
```bash
56+
# Windows
57+
android-bloatware-remover-windows.exe
58+
59+
# Linux/Mac
60+
./android-bloatware-remover-linux
61+
./android-bloatware-remover-macos
62+
```
63+
64+
### Using Python Source
4265
Connect your phone and run:
4366
```bash
4467
python main.py

build.bat

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
@echo off
2+
REM Local build script for Windows
3+
4+
echo Android Bloatware Remover - Local Build Script
5+
echo ================================================
6+
7+
REM Check if Python is available
8+
python --version >nul 2>&1
9+
if errorlevel 1 (
10+
echo Error: Python is required but not installed
11+
exit /b 1
12+
)
13+
14+
REM Install PyInstaller if not present
15+
echo Installing PyInstaller...
16+
pip install pyinstaller
17+
18+
REM Create spec file
19+
echo Creating PyInstaller spec file...
20+
(
21+
echo # -*- mode: python ; coding: utf-8 -*-
22+
echo.
23+
echo block_cipher = None
24+
echo.
25+
echo # Collect all brand directories and their contents
26+
echo brand_dirs = ['Samsung', 'Xiaomi', 'Oppo', 'Vivo', 'Realme', 'Tecno', 'OnePlus', 'Huawei', 'Honor', 'Motorola', 'Nothing']
27+
echo datas = []
28+
echo.
29+
echo # Add brand directories
30+
echo for brand in brand_dirs:
31+
echo datas.append(^(f'{brand}/*.md', f'{brand}/'^^)
32+
echo datas.append(^(f'{brand}/*.py', f'{brand}/'^^)
33+
echo.
34+
echo # Add core module
35+
echo datas.append(^('core/*.py', 'core/'^^)
36+
echo.
37+
echo # Add other files
38+
echo datas.append(^('README.md', '.'^^)
39+
echo datas.append(^('LICENSE', '.'^^)
40+
echo.
41+
echo a = Analysis(
42+
echo ['main.py'],
43+
echo pathex=[],
44+
echo binaries=[],
45+
echo datas=datas,
46+
echo hiddenimports=[
47+
echo 'Samsung.samsung_remover',
48+
echo 'Xiaomi.xiaomi_remover',
49+
echo 'Oppo.oppo_remover',
50+
echo 'Vivo.vivo_remover',
51+
echo 'Realme.realme_remover',
52+
echo 'Tecno.tecno_remover',
53+
echo 'OnePlus.oneplus_remover',
54+
echo 'Huawei.huawei_remover',
55+
echo 'Honor.honor_remover',
56+
echo 'Motorola.motorola_remover',
57+
echo 'Nothing.nothing_remover',
58+
echo 'core.bloatware_remover'
59+
echo ],
60+
echo hookspath=[],
61+
echo hooksconfig={},
62+
echo runtime_hooks=[],
63+
echo excludes=[],
64+
echo win_no_prefer_redirects=False,
65+
echo win_private_assemblies=False,
66+
echo cipher=block_cipher,
67+
echo noarchive=False,
68+
echo ^^)
69+
echo.
70+
echo pyz = PYZ(^a.pure, a.zipped_data, cipher=block_cipher^^)
71+
echo.
72+
echo exe = EXE(
73+
echo pyz,
74+
echo a.scripts,
75+
echo a.binaries,
76+
echo a.zipfiles,
77+
echo a.datas,
78+
echo [],
79+
echo name='android-bloatware-remover',
80+
echo debug=False,
81+
echo bootloader_ignore_signals=False,
82+
echo strip=False,
83+
echo upx=True,
84+
echo upx_exclude=[],
85+
echo runtime_tmpdir=None,
86+
echo console=True,
87+
echo disable_windowed_traceback=False,
88+
echo argv_emulation=False,
89+
echo target_arch=None,
90+
echo codesign_identity=None,
91+
echo entitlements_file=None,
92+
echo ^^)
93+
) > android-bloatware-remover.spec
94+
95+
REM Build executable
96+
echo Building executable...
97+
pyinstaller android-bloatware-remover.spec --clean
98+
99+
if %errorlevel% equ 0 (
100+
echo ✓ Build completed successfully!
101+
echo Executable location: dist\android-bloatware-remover.exe
102+
103+
REM Test the executable
104+
echo Testing executable...
105+
timeout /t 10 /nobreak > nul
106+
dist\android-bloatware-remover.exe --test
107+
) else (
108+
echo ✗ Build failed!
109+
exit /b 1
110+
)

0 commit comments

Comments
 (0)