So it was Dec of 2016 when I was working on a ROM called GravityOS for Yu Yureka device. Since it was an AOSP based ROM, I was in a serious need of this mod as I always used this on CM ROMs. I searched on XDA and found some but sadly they didn't work for Lollipop base. Finally I decided to code my own and here is the result.
Difficulty level
Easy
Requirements
1. Working connection to ADB, data cable and an AOSP based ROM
2. APK Multi-tool
3. Knowledge of basic compiling and decompiling as I will not be discussing it here
4. Some patience
Disclaimer
The following mod has been tested on an AOSP based ROM and found to be safe and functional. Yet I take no responsibility if anything wrong happens with your device.
Process
1. Pull SystemUI.apk and Settings.apk from phone. Decompile them.
2. Download the zip attached here and place the smali in appropriate folder while keeping the folder structure intact.
3. Now add double tap to statusbar. For this open SystemUI.apk/res/layouts/status_bar.xml just after the root element place this:
PHP:
<com.android.systemui.DLock android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" />
So that it would look like:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView androidrientation="vertical" android:id="@id/msim_status_bar" android:background="@drawable/system_bar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.DLock android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent" />
4. Next step is to add the setting to toggle this in Settings.apk
Open Settings.apk/res/xml/display.xml and add
PHP:
<com.android.settings.gravity.SystemSwitchPreference android:title="Double tap status bar to sleep" android:key="double_tap_sb_sleep" android:summary="Double tapping the status bar makes the device sleep" android:defaultValue="true" />
Compile both the APKs and push to your phone. Restart and enjoy.
You may obtain latest smali and Java files from Github
Great job bro.
Hats off. No good guide was available in the whole XDA forum for it and you made it. Awesome.
One question, can we use it in other parts of systemUI like status bar header?
And a kind request, please also make a guide for changing colors of TextClock, Text View and Image View through settings.
nitesh9 said:
Great job bro.
Hats off. No good guide was available in the whole XDA forum for it and you made it. Awesome.
One question, can we use it in other parts of systemUI like status bar header?
And a kind request, please also make a guide for changing colors of TextClock, Text View and Image View through settings.
Click to expand...
Click to collapse
Yes bro. Ofcourse you can. Putting the view com.android.systemui.DLock in other view listens for double click. Practically this would work for any view.
Yes, soon will be making guides for other mods as well.
Congratulations on your Mod ..
It is fantastic .. it works very well.
To see if your next mod is navigation bar of CyanogenMod ..
Thanks for everything
Related
hello i need your help with modifying the systemui.apk from touchwiz.
to start off i have decomplied the systemui.apk and framework-res.apk in my android dev linux vmware machine, i did load in the framworks + the twframework.
what i am trying to do is remove the brigness slider and the quick setting toggles from the notifaction bar and i did so by removing these lines from layout/tw_status_bar_expaneded.xml and i edited it on eclipse
<com.wanamlite.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/notification_panel_header_height" />
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="@dimen/quick_setting_button_height" android:layout_marginTop="@dimen/tw_notification_panel_header_height">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel androidrientation="horizontal" android:id="@id/quicksetting_container" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
and
<LinearLayout androidrientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout androidrientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
after i did that i recomiled it with apktool and it had no problems, i copyed the orignal androidmanifest and meta-inf into the modified apk, zipaligned and made a flashable zip
when i booted the phone i had no status bar and the systemui was crashing so i restored it
moved to q&a as this is a question and not actual development work ready to be released. Please note for the future that questions go into the q&a section.
Also, you don't need to post the same question twice.... you posted the same thing at 11:15 yesterday and this one at 6pm yesterday...
Being annoying like that is no way to get help from anyone.
Brian Gove said:
Also, you don't need to post the same question twice.... you posted the same thing at 11:15 yesterday and this one at 6pm yesterday...
Being annoying like that is no way to get help from anyone.
Click to expand...
Click to collapse
Are you going to help because I'm here to learn
Sent from my SCH-I535 using xda app-developers app
Hello guyss... I will give you a simple guide..
Tested on my device " GT-B5330 " in TW rom
For other device, you must adapt with this guide
How To :
1. Decompile your SystemUI.apk
2. Go to ids.xml in SystemUI/res/values/ids.xml
3. Add this code
Code:
<item type="id" name="panel_flip">false</item>
<item type="id" name="button_flip">false</item>
4. Go to tw_statusbar_expanded_header in SystemUI/res/layout-sw320dp-mdpi/here
5. Find this code
Code:
</LinearLayout>
Above this code, add this
Code:
<com.kangkung.ButtonKangkung android:id="@id/button_flip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
6. Go to tw_statusbar_expanded.xml in SystemUI/res/layout/here
7. Find this code
Code:
<View android:background="#091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="@dimen/tw_notification_panel_header_height" />
Below this code, add this
Code:
<com.kangkung.KangkungViewFlipper android:id="@id/panel_flip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
Now, find this code
Code:
</ScrollView>
Below this code add this
Code:
</LinearLayout>
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
<include layout="@layout/crazy_layout" />
</LinearLayout>
</com.kangkung.KangkungViewFlipper>
8. Add resources file to your decompiled SystemUI
NOW, COMPILE YOUR SystemUI.apk and decompile again your compiled SystemUI.apk
You need do this for get the new id from public.xml
Okey, now open public.xml in SystemUI/res/values/public.xml
You must match this id
Code:
Open "SystemUI.apk\smali\com\kangkung\ButtonKangkung.smali'
Find this code
line #23 const v0, 0x7f0d0132 #type="id" name="button_flip"
line #36 const v1, 0x7f0202a1 #type="drawable" name="button_flip"
Open "SystemUI.apk\smali\com\kangkung\KangkungViewFlipper.smali'
Find this code
Line #21 const v2, 0x7f0d0131 #type="id" name="panel_flip"
Line #87 const v2, 0x7f040016 #type="anim" name="crazy_flip_3d_quicker_anim"
Line #107 const v2, 0x7f040016 #type="anim" name="crazy_flip_3d_quicker_anim"
Line #127 const v2, 0x7f040016 #type="anim" name="crazy_flip_3d_quicker_anim"
Recompile, sign , and push to your phone
NB :
- Still do with your own risk
- Backup your original SystemUI.apk
- If you get error please give me a log
CREDIT
-dugeriss
-SpaceCaker
-KuliDiniHari
Download File :
http://d-h.st/ToY
SORRY FOR MY BAD ENGLISH
Click to expand...
Click to collapse
SCREENSHOT
coming soon
nce guide om
dugeriss said:
nce guide om
Click to expand...
Click to collapse
thanks udah mampir om
great guide om :good:
shevchovski said:
great guide om :good:
Click to expand...
Click to collapse
Thanks bro :good:
Pls re-upload the files
Hello Core Users This Is my First Guide in XDA...Thefe is many guides for thia but.. i'm trying to make it more easier than ever And Big thanks to those who ready Posted this guide In Xda Forum
Okay Lets Get To buisness
Requirements
-apktool
-RC/Dc (compile/decom)
-Brain.jar
Step 1
Decompile Ur SystemUI.apk
open res/layout/tw_status_bar_dual.xml or tw_status_bar.xml (Dual for dual sim users or single for single sim supp UI)
Step 2
Find This Line
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" androidaddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_Parrent" />
Step 3
Change This
<com.android.systemui.statusbar.policy.Clock
To
<DigitalClock
So It will become like This
<DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" androidaddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parrent" />
Save The Xml
Step 4
Recompile,sign,push,reboot
@credits
@me
@all those Who already posted thia guide
NOTE: I HAVE NO SS(SCREENSHOTS)
If u like My work press Thanks
i make this thread from my phone..s o thats whh..guide is overlapping blabla sorry guys
Oh great
I found no github repo for the amazon ariel so i started one
for the first i try to build a CWM recovery
Help me if you want:
https://github.com/etzisim/android_device_amazon_ariel
# android_device_amazon_ariel
Amazon FireHD 7 (4gen)
Local manifest for <build_env>/.repo/local_manifest/
local manifest:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="etzisim/android_device_amazon_ariel" path="device/amazon/ariel" remote="github" />
<project name="etzisim/android_kernel_amazon_ariel" path="kernel/bn/encore" remote="github" />
</manifest>
CM12
great to hear but we do not want rather build CM12 of the new Fire OS 5?
sorry for bad english i am using Google Translate cus im from germany
way to go man keep up the work
etzisim said:
I found no github repo for the amazon ariel so i started one
for the first i try to build a CWM recovery
Help me if you want:
https://github.com/etzisim/android_device_amazon_ariel
Click to expand...
Click to collapse
There is a working TWRP version, so no need to replicate CWM !!!
Instead, what would add most value is if somebody managed to disable checking for signed bootloader/kernel. Basically, somebody would have to comb through TEE1/UBOOT binaries, and figure out how to disable signatures. There is no good way to debug it though, a tiny issue with the code may brick the device.
i have an idea build safestrap recovery for fire hd 7 to get cm 11 working not a cwm recovery
Edit: i cant try to build safestrap cuz there is no source code of it
Hello,
Im a proud owner of mate 8
But the multiwindow drives me crazy!!!!!
I wish to know if someone could tell me how to permanently disable this function..
Or if you can suggest me a custom rom that allow me to disable that!
Thank you for your support!!
in your mainfest you need
android:resizeableActivity="false"
so in your manifest file for each activity you want to disable the feature it would be like
<activity android:name=".SomeActivity"
android:label="@string/app_name"
android:resizeableActivity="false" />
or if you want to disable it in your entire app
<application
android:resizeableActivity="false" >
. . .
</application>