A lightweight system-privileged Android app that provides advanced screen rotation control through a Quick Settings tile.
- Quick Settings Tile: Access rotation controls directly from the notification shade
- 4 Rotation Options via overlay dialog:
- 0° (Portrait)
- 90° (Landscape)
- 180° (Reverse Portrait)
- 270° (Reverse Landscape)
- Auto-Rotate toggle
- System Privileged App: Runs with system permissions, no root required after installation
- No UI: Service-only app with no launcher icon
- Overlay Dialog: Clean overlay dialog when tile is tapped showing all rotation options
- Minified & Optimized: ProGuard enabled with multidex support
- Android 11+ (API 30+)
- Root access (for installation only)
- ADB (Android Debug Bridge)
# Windows
gradlew.bat assembleRelease
# Linux/Mac
./gradlew assembleReleaseThe APK will be generated at: app/release/app-release.apk
install_triplerotate_system.batchmod +x install_triplerotate_system.sh
./install_triplerotate_system.shIf the automated scripts don't work, you can install manually:
- Push files to device:
adb push app/release/app-release.apk /sdcard/TripleRotate.apk
adb push system-integration/permissions/com.tripleu.triplerotate.xml /sdcard/
adb push system-integration/sysconfig/triplerotate-sysconfig.xml /sdcard/- Install with root:
adb shell
su
mount -o remount,rw /
# Create directory and copy APK
mkdir -p /system/priv-app/TripleRotate
cp /sdcard/TripleRotate.apk /system/priv-app/TripleRotate/
chmod 644 /system/priv-app/TripleRotate/TripleRotate.apk
chown root:root /system/priv-app/TripleRotate/TripleRotate.apk
# Copy permission files
cp /sdcard/com.tripleu.triplerotate.xml /system/etc/permissions/
chmod 644 /system/etc/permissions/com.tripleu.triplerotate.xml
cp /sdcard/triplerotate-sysconfig.xml /system/etc/sysconfig/
chmod 644 /system/etc/sysconfig/triplerotate-sysconfig.xml
# Set SELinux contexts
chcon u:object_r:system_file:s0 /system/priv-app/TripleRotate/TripleRotate.apk
chcon u:object_r:system_file:s0 /system/etc/permissions/com.tripleu.triplerotate.xml
chcon u:object_r:system_file:s0 /system/etc/sysconfig/triplerotate-sysconfig.xml
mount -o remount,ro /
rebootAfter installation and reboot:
- Pull down the notification shade
- Tap the edit button (pencil icon) to customize Quick Settings
- Find "Screen Rotation" tile and drag it to your active tiles
- Tap the tile to open rotation options dialog
- Select desired rotation: 0°, 90°, 180°, 270°, or Auto-Rotate
The tile shows the current state:
- Auto: Auto-rotation is enabled
- 0°/90°/180°/270°: Fixed rotation angle
To remove the app:
# Windows
uninstall_triplerotate_system.bat
# Linux/Mac
./uninstall_triplerotate_system.shThe app installs to /system/priv-app/ with:
- APK Location:
/system/priv-app/TripleRotate/TripleRotate.apk - Permissions:
/system/etc/permissions/com.tripleu.triplerotate.xml - Sysconfig:
/system/etc/sysconfig/triplerotate-sysconfig.xml
WRITE_SECURE_SETTINGS- Modify secure system settingsWRITE_SETTINGS- Modify system settingsSYSTEM_ALERT_WINDOW- Display overlay windowsINTERNAL_SYSTEM_WINDOW- Internal system window accessSTATUS_BAR_SERVICE- Status bar service accessEXPAND_STATUS_BAR- Expand/collapse status bar
- Package:
com.tripleu.triplerotate - Min SDK: 30 (Android 11)
- Target SDK: 35 (Android 15)
- Build Features:
- Multidex enabled
- ProGuard minification
- Resource shrinking
- No Compose UI (service only)
- No launcher activity
- Tile not appearing: Make sure to reboot after installation
- Permission denied: Ensure you have root access and mount system as read-write
- Build errors: Clean and rebuild:
./gradlew clean assembleRelease - SELinux issues: Check SELinux is set to permissive or contexts are correct
- Overlay not showing: Grant SYSTEM_ALERT_WINDOW permission if needed
The app consists of:
RotationTileService.kt- Main tile service handling rotation control- System integration configs in
system-integration/folder - Minimal resources (only icons, no layouts or activities)
System privileged app for internal use.