[App][Xposed][KK] Xposed Frame work with Gravity Module-Tweak Box

Status
Not open for further replies.
Search This thread

Metalhead081

Senior Member
Apr 26, 2013
199
70
Hyderabad
GravityBox - all-in-one tweak box - Xposed module for devices running AOSP 4.4​
Version 2.8.4 [KitKat]

Version for JellyBean is available in this thread:​

http://xdaforums.com/showthread.php?p=48820866#post48820866

READ THIS POST CAREFULLY BEFORE PROCEEDING ANY FURTHER

Hey!
After countless hours of coding and searching for proper entry points to inject code to incorporate fixes and mods, here it is:
GravityBox - a complex Xposed module targeted for devices running Android 4.4, which turns vanilla ROM into
feature-packed "non-flashing" custom ROM.

Originally, this module was designed for MTK6589 devices which lack custom ROMs built from source due to MediaTek closed-source policy.
Later on, it was adjusted to support other (non-MTK) devices running vanilla or close-to-vanilla AOSP ROMs.

Introduction
The app utilizes amazing Xposed framework coded by recognized
developer rovo89 which, briefly, provides interface for injecting code into any app, including system services allowing modifications of applications and system services at run-time. One of the biggest advantages of GravityBox is that it is not bound to any specific device. Actually, it should run on any device having vanilla Android 4.4 (ROM close enough to AOSP).
This project wouldn't be possible without rovo's Xposed framework, so huge kudos to him.

Feature highlight
--- CyanogenMod Pie controls
--- Expanded Desktop
--- Statusbar QuickSettings tile management with tile reordering
--- Lockscreen targets
--- Statusbar icon coloring
--- Statusbar Brightness Control
--- Statusbar icon colors
--- Additional QuickSettings tiles:
------- Sync on/off, WiFi AP on/off, GravityBox shortcut, Torch, Network mode (2G/3G/2G+3G switch), Sleep, QuickRecord,
QuickApp, GPS on/off, Ringer mode, Volume tile
--- Quick pulldown - switches to QuickSettings when status bar is pulled down near edges
--- Auto-switch to QuickSettings when there are no notifications
--- Center clock in statusbar
--- Battery indicator style
--- Navigation bar tweaks
--- Low battery warning policy
--- Disable LED flashing when battery low
--- Disable LED while charging
--- Advanced power-off menu (reboot, recovery)
--- Volume key cursor control
--- Skip tracks by volume key long-press while screen off (thanks to rovo89)
--- More volume levels for music stream
--- Option to control safe headset media volume
--- Button for clearing all recent tasks at once
--- CRT screen off animation
--- Minimal brightness setting
--- Autobrihtness levels adjustment
--- Lockscreen tweaks - show widgets maximized, lockscreen background style (color fill, custom image)
--- Lockscreen rotation
--- Hardware key actions - menu long-press/double-tap, back long-press, home long-press
--- Dithered Holo background
--- Option to use solid black Holo background
--- Expandable volume panel
--- Option to unlink ringtone and notifications volumes
--- Notification drawer style (background color, image for portait/landscape, transparency)
--- Button backlight modes (default, disabled, always on while screen is on)
--- Dialer (Phone) tweaks
--- Launcher tweaks
--- Screen recording
... more to come

Compatibility
Some words about GB's main concept. One thing I didn't like about xposed modules was that it was always necessary to reboot a device after making a change to some option. Since GB's main concept was to turn MTK devices running stock ROM into something that's close enough to a feature-packed custom ROM, I had to take a decision - for it to be as much comfortable as possible and to really behave like a custom ROM, I had to design it to support most of the preference changes to be done on the fly without needing to reboot a device. While this sounds nice, it also brings couple of "drawbacks". For changes to be made on the fly, it is necessary to make some preparations when device starts. This means, even if you don't use the particular feature, the necessary preparation/modification is already there and is waiting for the user to come and change that option.
This means it is not possible to "completely deactivate" particular feature if it causes trouble on your device or if you installed GB because you want to use only one particular feature you can't find elsewhere.
This results in issues on ROMs/devices that have parts that are diverting from default Android implementation too much, or are running heavily modified custom ROMs.
If you experience weird issues after installing GB, even if you didn't activate a particular feature, it is not because of GB is broken, it is because it is not compatible with your ROM. It is very similar as if you installed ROM built from source for Nexus to some Xperia device - it won't work.

Next thing, GB is a complex module and is not suitable for 1 purpose scenario. This means, if you are running custom ROM built from source (CM, PAC, ...), and you are missing a certain feature, your best option is to go ask creators of those ROMs to implement those additional features. Supplementing missing features on well-known custom ROMs built from source by installing xposed modules (especially complex ones) is definitely not a good way to go and can cause more trouble than good.

And finally, the last. GB being a complex module, it shouldn't be combined with other complex modules often racing for the same goal. They can conflict/fight on the same playground and there's no way you can deterministically say which one's going to win.
They can even lose both.

So in summary:
- this module is designed to run on vanilla or close-to-vanilla Android 4.4 (AOSP)
- supports "Google devices" like Nexus, HTC One Google play edition, and others running vanilla Android 4.4
- Samsung Touchwiz, HTC Sense, MIUI, LeWa, etc. are NOT supported. It is not guaranteed this module will work on these at all so try at your own risk. This module is simply too complex to support all kind of ROM brands that were vastly modified by vendors.
- DO NOT USE WITH CUSTOM ROMS LIKE CM,AOSPA,ROOTBOX,AOKP,SLIM, OMNI AND THEIR OTHER CLONES... IT MAKES NO SENSE AND CAN CAUSE CONFLICTS AND UNEXPECTED BEHAVIOUR
- I will not implement any exceptions that will adapt this module to a specific custom ROM. Please, do understand, it is unmanageable.

- I will not provide any support for devices violating these compatibility rules

Prerequisites
To use this module, the following conditions must be met
- You have a device running Android 4.4 that's based on AOSP (vanilla or close-to-vanilla Android)
- ROM must be rooted (XposedInstaller requires root to be able to install framework into system)
- You have working custom recovery allowing you to make a backup before installing Xposed framework

GravityBox KitKat version has been developed and tested on Nexus 5

Installation
1) Backup your current ROM in custom recovery. I am serious. Don't skip this step.

2) Get the Xposed installer from Download section fromhttp://dl.xposed.info/latest.apk (the latest version is typically available at this link: http://dl.xposed.info/latest.apk)

3) Install and run Xposed installer and follow the instructions to activate Xposed framework

4) Reboot. If device doesn't boot that means that the Xposed framework is not compatible with ROM you are currently
running. You don't need to continue with the next steps. You will have to restore your ROM from backup.

5) Download, GravityBox APK from the second post, rename it to GravityBox.apk and install it.
Alternatively, you can download the latest GravityBox directly from Xposed Installer (search for GravityBox [KK] module).

6) Make sure GravityBox app is installed into internal memory. If it was installed into phone storage or external storage,
move it into the internal memory first (applies only to devices having additional or external storage)

7) Run Xposed installer, go to Modules menu and activate GravityBox by checking the checkbox

8) Reboot

9) Launch GravityBox from app drawer or from Xposed installer and set options as desired




Reporting bugs
If you experience problems with certain feature, provide the full-detailed info that can help me
to reproduce the bug and attach debug.log file you'll find in:
/data/data/de.robv.android.xposed.installer/log

In case you experience SystemUI crashes or other apps Force Closing, or device soft reboots, attach logcat from time
crash occurs. (use adb logcat *:E or your favorite logcat app from Play Store).
Please, don't attach big logs. Only the portion where error is clearly seen.
Disable all other xposed modules before reproducing bug to make sure it is really GravityBox related
Remember, this app was developed and tested on one particular device so it is not guaranteed that
it will work flawlessly on yours.

Multilanguage support
Volunteers are welcome to translate GravityBox to other languages.
Simply download this file: https://github.com/GravityBox/Gravit...es/strings.xml
Use Notepad++ to edit strings and then send me edited file so I can include translations into next release.

Source code

GravityBox is opensource. Sources are available in my gihub: https://raw.github.com/GravityBox/GravityBox/kitkat/res/values/strings.xml
If you're a dev and have some ideas for additional features, feel free to fork it, work on it
and send the pull requests.

Copyright notice
https://github.com/GravityBox/GravityBox/blob/kitkat/NOTICE

Support development
Coding, maintaining and supporting this project costs me a lot of my precious time. If you find this project useful, you are welcome to support its development via donation. This form of support is meant to compensate for my time dedicated to the community + eventually, help me to afford newer device to keep up with AOSP evolution thus providing continuous support as Android evolves. Thanks!


Changelog
https://github.com/GravityBox/GravityBox/blob/kitkat/CHANGELOG.txt

Change log:

---Improved Screen Recording
--- now can be used without busybox installed
--- detects if device supports screen recording
- AppLauncher: fix missing apps after reboot on some devices
- Fixed Screen Off Effect not respecting system default
- Updated Chinese (Simplified) translations (thanks to liveasx)
- Updated Spanish translations (thanks to jvbferrer)
- Updated Japanese translations (thanks to WedyDQ10)
- Updated Italian translations (thanks to pesa1234)


Full Change log:
https://github.com/GravityBox/GravityBox/blob/kitkat/CHANGELOG.txt
 
Last edited by a moderator:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Please do not post other's work as if it is your own!

    Original thread here

    You did not even alter the OP, just copied and pasted. Please review XDA forum rule 12

    Thread closed
    2
    GravityBox - all-in-one tweak box - Xposed module for devices running AOSP 4.4​
    Version 2.8.4 [KitKat]

    Version for JellyBean is available in this thread:​

    http://xdaforums.com/showthread.php?p=48820866#post48820866

    READ THIS POST CAREFULLY BEFORE PROCEEDING ANY FURTHER

    Hey!
    After countless hours of coding and searching for proper entry points to inject code to incorporate fixes and mods, here it is:
    GravityBox - a complex Xposed module targeted for devices running Android 4.4, which turns vanilla ROM into
    feature-packed "non-flashing" custom ROM.

    Originally, this module was designed for MTK6589 devices which lack custom ROMs built from source due to MediaTek closed-source policy.
    Later on, it was adjusted to support other (non-MTK) devices running vanilla or close-to-vanilla AOSP ROMs.

    Introduction
    The app utilizes amazing Xposed framework coded by recognized
    developer rovo89 which, briefly, provides interface for injecting code into any app, including system services allowing modifications of applications and system services at run-time. One of the biggest advantages of GravityBox is that it is not bound to any specific device. Actually, it should run on any device having vanilla Android 4.4 (ROM close enough to AOSP).
    This project wouldn't be possible without rovo's Xposed framework, so huge kudos to him.

    Feature highlight
    --- CyanogenMod Pie controls
    --- Expanded Desktop
    --- Statusbar QuickSettings tile management with tile reordering
    --- Lockscreen targets
    --- Statusbar icon coloring
    --- Statusbar Brightness Control
    --- Statusbar icon colors
    --- Additional QuickSettings tiles:
    ------- Sync on/off, WiFi AP on/off, GravityBox shortcut, Torch, Network mode (2G/3G/2G+3G switch), Sleep, QuickRecord,
    QuickApp, GPS on/off, Ringer mode, Volume tile
    --- Quick pulldown - switches to QuickSettings when status bar is pulled down near edges
    --- Auto-switch to QuickSettings when there are no notifications
    --- Center clock in statusbar
    --- Battery indicator style
    --- Navigation bar tweaks
    --- Low battery warning policy
    --- Disable LED flashing when battery low
    --- Disable LED while charging
    --- Advanced power-off menu (reboot, recovery)
    --- Volume key cursor control
    --- Skip tracks by volume key long-press while screen off (thanks to rovo89)
    --- More volume levels for music stream
    --- Option to control safe headset media volume
    --- Button for clearing all recent tasks at once
    --- CRT screen off animation
    --- Minimal brightness setting
    --- Autobrihtness levels adjustment
    --- Lockscreen tweaks - show widgets maximized, lockscreen background style (color fill, custom image)
    --- Lockscreen rotation
    --- Hardware key actions - menu long-press/double-tap, back long-press, home long-press
    --- Dithered Holo background
    --- Option to use solid black Holo background
    --- Expandable volume panel
    --- Option to unlink ringtone and notifications volumes
    --- Notification drawer style (background color, image for portait/landscape, transparency)
    --- Button backlight modes (default, disabled, always on while screen is on)
    --- Dialer (Phone) tweaks
    --- Launcher tweaks
    --- Screen recording
    ... more to come

    Compatibility
    Some words about GB's main concept. One thing I didn't like about xposed modules was that it was always necessary to reboot a device after making a change to some option. Since GB's main concept was to turn MTK devices running stock ROM into something that's close enough to a feature-packed custom ROM, I had to take a decision - for it to be as much comfortable as possible and to really behave like a custom ROM, I had to design it to support most of the preference changes to be done on the fly without needing to reboot a device. While this sounds nice, it also brings couple of "drawbacks". For changes to be made on the fly, it is necessary to make some preparations when device starts. This means, even if you don't use the particular feature, the necessary preparation/modification is already there and is waiting for the user to come and change that option.
    This means it is not possible to "completely deactivate" particular feature if it causes trouble on your device or if you installed GB because you want to use only one particular feature you can't find elsewhere.
    This results in issues on ROMs/devices that have parts that are diverting from default Android implementation too much, or are running heavily modified custom ROMs.
    If you experience weird issues after installing GB, even if you didn't activate a particular feature, it is not because of GB is broken, it is because it is not compatible with your ROM. It is very similar as if you installed ROM built from source for Nexus to some Xperia device - it won't work.

    Next thing, GB is a complex module and is not suitable for 1 purpose scenario. This means, if you are running custom ROM built from source (CM, PAC, ...), and you are missing a certain feature, your best option is to go ask creators of those ROMs to implement those additional features. Supplementing missing features on well-known custom ROMs built from source by installing xposed modules (especially complex ones) is definitely not a good way to go and can cause more trouble than good.

    And finally, the last. GB being a complex module, it shouldn't be combined with other complex modules often racing for the same goal. They can conflict/fight on the same playground and there's no way you can deterministically say which one's going to win.
    They can even lose both.

    So in summary:
    - this module is designed to run on vanilla or close-to-vanilla Android 4.4 (AOSP)
    - supports "Google devices" like Nexus, HTC One Google play edition, and others running vanilla Android 4.4
    - Samsung Touchwiz, HTC Sense, MIUI, LeWa, etc. are NOT supported. It is not guaranteed this module will work on these at all so try at your own risk. This module is simply too complex to support all kind of ROM brands that were vastly modified by vendors.
    - DO NOT USE WITH CUSTOM ROMS LIKE CM,AOSPA,ROOTBOX,AOKP,SLIM, OMNI AND THEIR OTHER CLONES... IT MAKES NO SENSE AND CAN CAUSE CONFLICTS AND UNEXPECTED BEHAVIOUR
    - I will not implement any exceptions that will adapt this module to a specific custom ROM. Please, do understand, it is unmanageable.

    - I will not provide any support for devices violating these compatibility rules

    Prerequisites
    To use this module, the following conditions must be met
    - You have a device running Android 4.4 that's based on AOSP (vanilla or close-to-vanilla Android)
    - ROM must be rooted (XposedInstaller requires root to be able to install framework into system)
    - You have working custom recovery allowing you to make a backup before installing Xposed framework

    GravityBox KitKat version has been developed and tested on Nexus 5

    Installation
    1) Backup your current ROM in custom recovery. I am serious. Don't skip this step.

    2) Get the Xposed installer from Download section fromhttp://dl.xposed.info/latest.apk (the latest version is typically available at this link: http://dl.xposed.info/latest.apk)

    3) Install and run Xposed installer and follow the instructions to activate Xposed framework

    4) Reboot. If device doesn't boot that means that the Xposed framework is not compatible with ROM you are currently
    running. You don't need to continue with the next steps. You will have to restore your ROM from backup.

    5) Download, GravityBox APK from the second post, rename it to GravityBox.apk and install it.
    Alternatively, you can download the latest GravityBox directly from Xposed Installer (search for GravityBox [KK] module).

    6) Make sure GravityBox app is installed into internal memory. If it was installed into phone storage or external storage,
    move it into the internal memory first (applies only to devices having additional or external storage)

    7) Run Xposed installer, go to Modules menu and activate GravityBox by checking the checkbox

    8) Reboot

    9) Launch GravityBox from app drawer or from Xposed installer and set options as desired




    Reporting bugs
    If you experience problems with certain feature, provide the full-detailed info that can help me
    to reproduce the bug and attach debug.log file you'll find in:
    /data/data/de.robv.android.xposed.installer/log

    In case you experience SystemUI crashes or other apps Force Closing, or device soft reboots, attach logcat from time
    crash occurs. (use adb logcat *:E or your favorite logcat app from Play Store).
    Please, don't attach big logs. Only the portion where error is clearly seen.
    Disable all other xposed modules before reproducing bug to make sure it is really GravityBox related
    Remember, this app was developed and tested on one particular device so it is not guaranteed that
    it will work flawlessly on yours.

    Multilanguage support
    Volunteers are welcome to translate GravityBox to other languages.
    Simply download this file: https://github.com/GravityBox/Gravit...es/strings.xml
    Use Notepad++ to edit strings and then send me edited file so I can include translations into next release.

    Source code

    GravityBox is opensource. Sources are available in my gihub: https://raw.github.com/GravityBox/GravityBox/kitkat/res/values/strings.xml
    If you're a dev and have some ideas for additional features, feel free to fork it, work on it
    and send the pull requests.

    Copyright notice
    https://github.com/GravityBox/GravityBox/blob/kitkat/NOTICE

    Support development
    Coding, maintaining and supporting this project costs me a lot of my precious time. If you find this project useful, you are welcome to support its development via donation. This form of support is meant to compensate for my time dedicated to the community + eventually, help me to afford newer device to keep up with AOSP evolution thus providing continuous support as Android evolves. Thanks!


    Changelog
    https://github.com/GravityBox/GravityBox/blob/kitkat/CHANGELOG.txt

    Change log:

    ---Improved Screen Recording
    --- now can be used without busybox installed
    --- detects if device supports screen recording
    - AppLauncher: fix missing apps after reboot on some devices
    - Fixed Screen Off Effect not respecting system default
    - Updated Chinese (Simplified) translations (thanks to liveasx)
    - Updated Spanish translations (thanks to jvbferrer)
    - Updated Japanese translations (thanks to WedyDQ10)
    - Updated Italian translations (thanks to pesa1234)


    Full Change log:
    https://github.com/GravityBox/GravityBox/blob/kitkat/CHANGELOG.txt