[SUBSTRATUM] Bring the clock at right place - Razer Phone 2 Themes, Apps, and Mods

After Pie update, I was very upset about the clock that moved on the left of the status bar.
Inspired by this guide, I tried to make a razer compatible version.
I made an overlay for com.android.systemui/res/layout
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@*com.android.systemui:id/status_bar" android:background="@*com.android.systemui:drawable/system_bar_background" android:focusable="false" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="@*com.android.systemui:dimen/status_bar_height" android:accessibilityPaneTitle="@*com.android.systemui:string/status_bar"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<ImageView android:id="@*com.android.systemui:id/notification_lights_out" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@*com.android.systemui:dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@*com.android.systemui:drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:paddingStart="@*com.android.systemui:dimen/status_bar_padding_start" />
<LinearLayout android:orientation="horizontal" android:id="@*com.android.systemui:id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="@*com.android.systemui:dimen/status_bar_padding_start" android:paddingEnd="@*com.android.systemui:dimen/status_bar_padding_end">
<FrameLayout android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<include layout="@*com.android.systemui:layout/heads_up_status_bar_layout" />
<LinearLayout android:id="@*com.android.systemui:id/status_bar_left_side" android:clipChildren="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:orientation="horizontal" android:id="@*com.android.systemui:id/notification_icon_area" android:clipChildren="false" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
</FrameLayout>
<android.widget.Space android:gravity="center" android:id="@*com.android.systemui:id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@*com.android.systemui:id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent" >
<include layout="@*com.android.systemui:layout/system_icons" />
<android.widget.Space android:gravity="center" android:id="@*com.android.systemui:id/cutout_space_view" android:layout_width="0.0dip" android:layout_height="fill_parent" />
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@*com.android.systemui:style/TextAppearance.Pie.StatusBar.Clock" android:gravity="start|center" android:id="@*com.android.systemui:id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="4.0dip" android:singleLine="true" />
</com.android.keyguard.AlphaOptimizedLinearLayout>
</LinearLayout>
<ViewStub android:id="@*com.android.systemui:id/emergency_cryptkeeper_text" android:layout="@*com.android.systemui:layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
I got the correct style names from the SystemUi.apk decompiled directly from razer system directory; nevertheless, even though Substratum can compile and apply the overlay, it has no effect.
Any clue on what might I be missing?

I tried to use substratum too. Seems like Razer's own them engine gets in the way. As soon as we get TWRP, I assume there will be a stock based rom with all of that stripped out. For now I'm using gravity box to at least move it to the center. Left is dumb.

jonchance_84 said:
I tried to use substratum too. Seems like Razer's own them engine gets in the way. As soon as we get TWRP, I assume there will be a stock based rom with all of that stripped out. For now I'm using gravity box to at least move it to the center. Left is dumb.
Click to expand...
Click to collapse
GB beta 4 fixes the clock positions and allows it on the right.

jonchance_84 said:
I tried to use substratum too. Seems like Razer's own them engine gets in the way. As soon as we get TWRP, I assume there will be a stock based rom with all of that stripped out. For now I'm using gravity box to at least move it to the center. Left is dumb.
Click to expand...
Click to collapse
but you can flash any gsi rom without twrp

RKBD said:
but you can flash any gsi rom without twrp
Click to expand...
Click to collapse
Right, but isn't there a special process to do that?

jonchance_84 said:
Right, but isn't there a special process to do that?
Click to expand...
Click to collapse
you mean
clearing your data and typing in terminal
fastboot flash system_a "systemname".img
fastboot flash system_b "same systemname". img?
this is hard?

RKBD said:
you mean
clearing your data and typing in terminal
fastboot flash system_a "systemname".img
fastboot flash system_b "same systemname". img?
this is hard?
Click to expand...
Click to collapse
No. I just looked into it when I first got the phone. It was something new to me then, but not now. I'll look more into the different GSI ROMs. Which ones do you like?

It is possible to move the statusbar clock from the left side to the center or right side as desired. Doing so requires the installation of EdXposed (which passes SafetyNet!!! but is not yet compatible with every Xposed module) and the beta version of GravityBox [P].
Once EdXposed and GravityBox [P] beta are installed:
GravityBox [P] > Statusbar tweaks > Clock settings > Clock position (don't forget Clock position in header for the notification shade)

roflkaapter said:
It is possible to move the statusbar clock from the left side to the center or right side as desired. Doing so requires the installation of EdXposed (which passes SafetyNet!!! but is not yet compatible with every Xposed module) and the beta version of GravityBox [P].
Once EdXposed and GravityBox [P] beta are installed:
GravityBox [P] > Statusbar tweaks > Clock settings > Clock position (don't forget Clock position in header for the notification shade)
Click to expand...
Click to collapse
I can confirm that this works perfectly.

Related

[Q] Apps & WIFI/4G Connection Failed after Rooting with Towelroot

Hi All,
I followed ALL the instructions (and verified root work with SuperSU) on this website galaxynote3root using towelroot (sorry I can't post external link) and everything appeared to be working perfectly fine. However, after a few minutes I ran into problems:
1. First, apps like Youtube, Map, Google Play, Chrome, Browser, Netflix … all pop up with error “Unfortunately, [app name] has stopped”.
2. Phone won’t connect to internet. Any app that uses internet connection won’t work. Both WIFI and 4G connections appear to connect, but no content could be served.
3. Phone won’t see content of External SD card or internal SD storage area. Attempting to look at these storage areas results in “Empty” folder.
4. Google Play shows “No Connection” message.
5. Attempt to run PvZ game gives me this error “Unfortunately, the process com.google.process.gapps has stopped.” The game still works, though.
I can still make phone calls, but that is it. I tried to clear cache, turned off/forced close Google Framework Services, Google Play … but still didn’t help.
The only thing that I changed, other than installing tr.pkg and supersu.pkg above, was the platform.xml. In the WRITE_EXTERNAL_STORAGE tag, I found two entries:
<group gid=”sdcard_r” />
<group gid=”sdcard_rw” />
I replaced the first entry with:
<group gid=”media_rw” />
in < permission name=”android.permission.WRITE_EXTERNAL_STORAGE” >
After seeing the errors, I replaced the xml file with original version. That didn’t help. Rebooting, turning off, removing batteries multiple times didn’t help. I un-rooted the phone using the “full unroot” feature in SuperSu, and that didn’t help either. I went into Settings and turned KNOX back on, still didn’t help.
At this point, I am stuck. I don’t know what else I should try. I would appreciate any help and suggestions, I would like to avoid resetting or doing more substantial changes to the phone, though.
One more note: I was using ES File Explorer and granted its root access. I don't know if that caused the issues but I just uninstalled it, still no help. Phone while booting shows Samsung Note 3 logo and an unlock Icon with the word Custom.
My phone has Android version 4.4.2
Thank you.
vbcomer said:
Hi All,
I followed ALL the instructions (and verified root work with SuperSU) on this website galaxynote3root using towelroot (sorry I can't post external link) and everything appeared to be working perfectly fine. However, after a few minutes I ran into problems:
1. First, apps like Youtube, Map, Google Play, Chrome, Browser, Netflix … all pop up with error “Unfortunately, [app name] has stopped”.
2. Phone won’t connect to internet. Any app that uses internet connection won’t work. Both WIFI and 4G connections appear to connect, but no content could be served.
3. Phone won’t see content of External SD card or internal SD storage area. Attempting to look at these storage areas results in “Empty” folder.
4. Google Play shows “No Connection” message.
5. Attempt to run PvZ game gives me this error “Unfortunately, the process com.google.process.gapps has stopped.” The game still works, though.
I can still make phone calls, but that is it. I tried to clear cache, turned off/forced close Google Framework Services, Google Play … but still didn’t help.
The only thing that I changed, other than installing tr.pkg and supersu.pkg above, was the platform.xml. In the WRITE_EXTERNAL_STORAGE tag, I found two entries:
<group gid=”sdcard_r” />
<group gid=”sdcard_rw” />
I replaced the first entry with:
<group gid=”media_rw” />
in < permission name=”android.permission.WRITE_EXTERNAL_STORAGE” >
After seeing the errors, I replaced the xml file with original version. That didn’t help. Rebooting, turning off, removing batteries multiple times didn’t help. I un-rooted the phone using the “full unroot” feature in SuperSu, and that didn’t help either. I went into Settings and turned KNOX back on, still didn’t help.
At this point, I am stuck. I don’t know what else I should try. I would appreciate any help and suggestions, I would like to avoid resetting or doing more substantial changes to the phone, though.
One more note: I was using ES File Explorer and granted its root access. I don't know if that caused the issues but I just uninstalled it, still no help. Phone while booting shows Samsung Note 3 logo and an unlock Icon with the word Custom.
My phone has Android version 4.4.2
Thank you.
Click to expand...
Click to collapse
Update: I just tried Odin with N900AUCUCNC2_N900AATTCNC2_N900AUCUCNC2_HOME.tar and PIT file to re-partition the phone. But still no help. Same issues. It must be something related to the permission, but why replacing the system still doesn't help? Do I need to do something else? Can I install something else via Odin? Can I root via Odin and get access again to the storage areas?

Prevent home button from turning screen on?

I'm trying to find a way to stop the home button from turning on the screen. My wife puts the phone in her purse and I constantly turns the screen on. I read this:
http://android.stackexchange.com/qu...-home-button-from-waking-my-samsung-galaxy-s5
on StackOverflow that had me edit gpio-keys.kl, but it did not work on lollipop. From what I understand the xposed modules don't work at all with lollipop and touchwiz either, so using wanam probably won't work. I have root, so any suggestions would help. Thanks!
shaklee3 said:
I'm trying to find a way to stop the home button from turning on the screen. My wife puts the phone in her purse and I constantly turns the screen on. I read this:
http://android.stackexchange.com/qu...-home-button-from-waking-my-samsung-galaxy-s5
on StackOverflow that had me edit gpio-keys.kl, but it did not work on lollipop. From what I understand the xposed modules don't work at all with lollipop and touchwiz either, so using wanam probably won't work. I have root, so any suggestions would help. Thanks!
Click to expand...
Click to collapse
Wanam actually does work for me. I'm currently on OF2. It also worked on OC4.
Or if you're comfortable decompiling/recompiling you can try: http://forum.xda-developers.com/showthread.php?t=2799050 has it somewhere in there. I haven't tried this mod specifically.
Edit:
[Guide How-To] DISABLE HOME KEY WAKE
This will prevent the Home Key from waking the phone.
android.policy.jar smali edit:
smali/com/android/interal/policy/impl/PhoneWindowManager.smali
.method private isWakeKeyWhenScreenOff(I)Z
Add the new lines in BLUE
Code:
:sswitch_1
move v0, v1
goto :goto_0
[COLOR="Blue"]:sswitch_4
return v1
nop
[/COLOR]
:sswitch_data_0
.sparse-switch
[COLOR="Blue"]0x3 -> :sswitch_4
[/COLOR] 0x18 -> :sswitch_0
0x19 -> :sswitch_0
Thanks! I'll give it a shot

[GUIDE] Enabel DT2W Nugat B388

If your double tap to wake (DT2W) is not enabled by default, and other how-tos
don't worki for you, try this:
1. You will need to edit the local build prop:
got to: /product/etc/prop and edit local.prop (your system must be rw)
2. Find the "ro.config.hw_easywakeup=false" and change the value to true, press save and exit
3. Now you need to mod the hw_easywakeupmotion_config.xml which is in /system/emui/base/xml:
Change the
Code:
<HwEasyWakeUpMotion>
<EasyWakeUpMotion name="Double_Touch" support="1" value="0" flag="11" keycode="142" />
to :
Code:
<HwEasyWakeUpMotion>
<EasyWakeUpMotion name="Double_Touch support="1" value="1" flag="11" keycode="142" />
you can edit other paramethers as well.
4. Save, exit and reboot.
5. After the reboot go to: Settings -> Smart assistance -> Motion Control -> turn the features on.
We already have a guide about this
i
Johnny TDN said:
We already have a guide about this
Click to expand...
Click to collapse
They did nkt work for me, so I tought I share my method

Flashfire Force Closing

I have 3 5th gen rooted Amazon fires running different builds of CyanogenMod and Lineage. On all tablets flashfire force closes after "checking for Pro" during start of the app. Anyone else have this issue? Maybe a different version of Flashfire that works?
JKSurf said:
I have 3 5th gen rooted Amazon fires running different builds of CyanogenMod and Lineage. On all tablets flashfire force closes after "checking for Pro" during start of the app. Anyone else have this issue? Maybe a different version of Flashfire that works?
Click to expand...
Click to collapse
Well known issue discussed in multiple threads. FlashFire developer has retired (at minimum taking a sabbatical with no publicly communicated end date) leaving in place "time bombs" that disable the free version of his tools.
Three workarounds:
- roll date back to March 31st, 2018 for v0.73 (not always easy to do on FireOS)
- purchase 'pro' version of FlashFire on another device which will then allow access to 'pro' version everywhere (no time bomb)
- purchase ODIN from same developer which alsos unlock FlashFire
First option is probably your best best if running CM 12.1 as the date can easily be rolled back from the UI. Be sure to use FlashFire v0.73; if opting for an earlier build you'll need to set the date back further which can trigger other unpleasant device behavior.
Add this line to file /data/data/eu.chainfire.flash/shared_prefs/eu.chainfire.flash_preferences.xml
<boolean name="have_pro_cached" value="true" />
s00thsayer said:
Add this line to file /data/data/eu.chainfire.flash/shared_prefs/eu.chainfire.flash_preferences.xml
<boolean name="have_pro_cached" value="true" />
Click to expand...
Click to collapse
Interesting hack. Looking for collaboration as I purchased pro long ago. Pretty simplistic validation method if it holds up.
For flashfire to work, first install it from the play store, then in a command window you type this:
adb.exe shell su 0 date -s 20130503.100022
And then I'll let you use it.
Rortiz2 said:
For flashfire to work, first install it from the play store, then in a command window you type this:
adb.exe shell su 0 date -s 20130503.100022
And then I'll let you use it.
Click to expand...
Click to collapse
Has this been validated with FireOS v5 (specifically 5.11-5.3.1 inclusive)? There are several reports that suggest it is ineffective. ATM I do not have a gizmo loaded up with (rooted) FireOS to test with.
Davey126 said:
Interesting hack. Looking for collaboration as I purchased pro long ago. Pretty simplistic validation method if it holds up.
Click to expand...
Click to collapse
I have tested this on a couple devices and modifying eu.chainfire.flash_preferences.xml works fine and gets around the date change thing. Of course root is required to mod this file. Just thought I would share an alternative to changing the date.
s00thsayer said:
I have tested this on a couple devices and modifying eu.chainfire.flash_preferences.xml works fine and gets around the date change thing. Of course root is required to mod this file. Just thought I would share an alternative to changing the date.
Click to expand...
Click to collapse
Also worked for me. Just had to add the line below the "boolean name" line that's already in the file. Tried adding to the bottom at first and it wouldn't work for me.

Question Settings in Developer Options

Is it possible to enable Install via USB and USB debugging (Security settings) without having a Mi account on the device? And what does MIUI optimisation options do?
Yes. MIUI optimizations heavily restrict background apps which lead to battery savings among other things.
Yes for the first question? Then how?
miravision said:
Yes. MIUI optimizations heavily restrict background apps which lead to battery savings among other things.
Click to expand...
Click to collapse
You need to root your phone. Here is a termux script that will achieve what you want without Mi account.
Code:
su
setprop persist.security.adbinstall 1
Edit file /data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml
and change value to true if it's set to false or add line before the closing </map> tag. Reboot
Code:
<boolean name="security_adb_install_enable" value="true" />
Code:
reboot
I guess rooting will have to wait... can''t void warranty in a new phone before I have had a chance to test it fully. But, thank you. I will save the above.
I'm trying to disable automatic updates , i disabled them everywhere i could , including developer options but when i enable wifi , the updater app notifies me that i have a new update. Indeed, it won't update without my confirmation but i want to get rid of notifications completely . The notifications for this updater system app can not be turned off . Any workaround for this ?
miravision said:
You need to root your phone. Here is a termux script that will achieve what you want without Mi account.
Code:
su
setprop persist.security.adbinstall 1
Edit file /data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml
and change value to true if it's set to false or add line before the closing </map> tag. Reboot
Code:
<boolean name="security_adb_install_enable" value="true" />
Code:
reboot
Click to expand...
Click to collapse
should this be valid in MIUI 13?
I did save the xml file twice, but after reboot the line for "install enable" was gone.
Any further ideas to mod this - without logging in to Mi Account?
Thaks
linolino
oops EDIT: I did an reboot via button instead of entering "reboot" in adb/termux - so I can confirm the toggel button is still on after command "reboot" in case of pressing button for reboot it was reverted ;-)
@miravision
is there another line for MIUI.
"Install via USB" worked to be turned on.
But still "USB debugging (Security settings)" can't be turned on in developer options.
This would be the toggle from this repeating screen shot: https://github.com/Genymobile/scrcpy/issues/70
Thanks
linolino
miravision said:
You need to root your phone.
Click to expand...
Click to collapse
this is a chicken egg problem:
in turn, root requires unlocking the bootloader (which requires logging in with a mi account over a cellular data sim, it doesn't allow this over wifi)

Categories

Resources