yashsingh1/xdaforums huggingface dataset:
[HTC 10 Questions & Answers] OMJ:
I can't post the apk I modded...I will extract the systemui from the posted dump, mod it & post it here...
[HTC 10 Questions & Answers] OMJ:
ok, here is the modded SystemUI.apk w/ tuner, from the 1.30.709.1 dump...*untested*....ported from [MENTION=1148003]lyapota[/MENTION] :)

maybe [MENTION=4470081]topjohnwu[/MENTION] can test it :)
[HTC 10 Questions & Answers] JochenP:
So, I just do not have patience and have been tested on the A9:

everything seems ok, just not the modded UItuner :eek:

course can be different at 10. . .

[MENTION=506238]OMJ[/MENTION] can you give me a hint (PM), where to search for changes? I assume qs or qs/tiles folder contains solution...
[HTC 10 Questions & Answers] OMJ:
look in:

\smali\com\android\systemui\tuner\TunerFragment.smali

\smali\com\android\systemui\statusbar\SignalClusterView.smali

\smali\com\android\systemui\statusbar\phone\SettingsButton.smali

\smali\com\android\systemui\statusbar\phone\SettingsButton$3.smali
[HTC 10 Questions & Answers] Jm@n:
It's definitely in SettingsButton.smali

isTunerClick method

To just turn it back on for us

Add const/4 v0, 0x1 above

If-eqz v0, :cond_0

That will unhide it
[HTC 10 Questions & Answers] JochenP:
Close, but this results in:

public boolean isTunerClick() {

boolean z = CustomizationUtil.SENSE_STOCK;

return 1 != 0 ? this.mUpToSpeed : true;

Correct it has to reed:

public boolean isTunerClick() {

return CustomizationUtil.SENSE_STOCK ? this.mUpToSpeed : true;

So you have to edit line 233:

:cond_0

const/4 v0, 0x0

TO

:cond_0

const/4 v0, 0x1

I have this verified on A9 and it works :good:
[HTC 10 Questions & Answers] Jm@n:
Yep that will work too. The way I did it just puts the true right at the top overriding the cond part but I suppose this way is better. Can probably just change the eqz to nez for it to work as well. I see you turned on screen buttons on, htc still using their style over google huh? Can hide nav button still be added in default xml edit? I don't have my 10 just yet, got an unlocked one coming tho
[HTC 10 Questions & Answers] jaypeg123:
Do you want to share the file? For my a9
[HTC 10 Questions & Answers] JochenP:
Adding const/4 v0, 0x1 didn't do the trick

Still some issues (A9):

short tap on gear always asks for deactivating tweak

adding tile results in fc

---------- Post added at 10:40 AM ---------- Previous post was at 10:38 AM ----------

you can find it at A9 XDA-forum and test it.
[HTC 10 Questions & Answers] basdejongg:
ok, so how do i remove this version, it keeps crashing :(
[HTC 10 Questions & Answers] OMJ:
attached is stock...
[HTC 10 Questions & Answers] basdejongg:
Thank u, unfortunatly i was unable to enter android, so i had to completely wipe the phone by entering the encryption password 30 times :crying:

---------- Post added at 04:48 PM ---------- Previous post was at 04:45 PM ----------

is there really no other way to enable Profiles based on wifi connections without installing a 3thparty app ?
[HTC 10 Questions & Answers] Myrmeko:
OMJ, i see you are very good at programming, could you answer a few questions, please?

Next year, by any chance, will there be any way to bring back Grid View on the Recent Apps screen?

Or the 3x3 quick toggles on the status bar? And the lines under them. (But that would be pretty easy to workaround, because i could just open up the .apk, add some lines under the toggles then replace the old icons.) And also remove the brightness slider and add a 4-step brightness toggle like on the old systemui.

Will it also be possible to bring back the old volume control pop-up from M9 5.1.1 Sense 7?

I want to get a HTC 10 next year, but it has all these minor inconveniences. M9 is the best phone i've ever used.
[HTC 10 Questions & Answers] OMJ:
I have not dug into systemui enough to see what it would take to add sense 7 recent app grid & QS, time will tell...
[HTC 10 Questions & Answers] Myrmeko:
As i said before, no rush, i dont even have money to buy it at the moment. I bought an M9 this Christmas, so all my money is gone.

Thanks a lot for trying to figure out how the System UI works, and great job finding the hidden System UI tuner.

Btw, what is "QS"?
[HTC 10 Questions & Answers] ThePhoneGeek:
Question for you, since the US versions are on 1.21.617.3 which is different from the 1.30.X does it make a difference if we use that file on US ver or should we mod a US systemui with the changes needed?
[HTC 10 Questions & Answers] OMJ:
I have not compared the 2...with the 1.53 ota out now, I'll mod the newest US version...
[HTC 10 Questions & Answers] Nosferatu.:
OMJ awesome job! I'm using Custom Quick Settings from the app store. It gets the job done but not the same.

Question...(since you seem experienced). I'm S-ON rooted, 1.21 US version on LeeDroid. If I want to upgrade the firmware (I know I know S-OFF easier) is there a way to get it flashed easily onto the phone?
[HTC 10 Questions & Answers] Behold_this:
You could pull the signed firmware zip from the OTA and flash manually in download mode
[HTC 10 Questions & Answers] Nosferatu.:
I'm all ears...is it just the firmware folder? With S-ON just flash using adb or TWRP? I'm your typical tweaker/flasher I'm not too adept with mucking around with pulling apart ROMs/OTAs and especially with flashing a piece of firmware (could be dangerous if done wrong).
[HTC 10 Questions & Answers] Behold_this:
So within the OTA zip there will be another zip titled firmware. Pull that from the OTA. That firmware zip is signed and can be flashed on S on device. Boot your device into download mode and use fastboot to flash the firmware zip, OR rename zip to 2PS6IMG.zip, place on the root of an SDcard formatted in fat 32, boot into download mode and follow instructions on screen.
[HTC 10 Questions & Answers] ThePhoneGeek:
Yeah I think this is the only thing really annoying me about this phone is that I don't have control to select what quick settings I have displayed. Sure I am control freak enthusiast, but hey that's why I am not a iPhone person. :D
[HTC 10 Questions & Answers] Nosferatu.:
I appreciate it that makes sense. Someone elsewhere was telling me to flash the firmware to the device twice...correct? Also to confirm, download mode (not TWRP) correct (the PWR + VOL DWN sequence screen).
[HTC 10 Questions & Answers] Mace490:
Very Cool!

Can i use this on stock non rooted with 1.21 ?
[HTC 10 Questions & Answers] JochenP:
Sorry but root is provided.

If firmware-version differs SystemUI.apk differs probably
[HTC 10 Questions & Answers] Behold_this:
just pay attention to output to make sure all images flash. And yes download mode is correct. You're welcome?
[HTC 10 Questions & Answers] okgnew:
Hi guys,

Can you make a recovery flashable ZIP file with the modded SystemUI.apk that enables System UI Tuner (for 1.30 EU ROM), please?

Thank you!
[HTC 10 Questions & Answers] ThePhoneGeek:
Had you posted a mod yet for the 1.53 ota and I missed it?
[HTC 10 Questions & Answers] Jm@n:
The way you did it is actually wrong and that's why you get those issues. Do it the way I showed you but also there's one more edit now too in settings button 3 smali. All the way down last method add that same line const/4 v0, 0x1 above the If-eqz v0, line again
[HTC 10 Questions & Answers] Neekeet:
Is there anyway to turn off battery saver notification that's persistent whenever power saver is active.
[HTC 10 Questions & Answers] OMJ:
yes, but u have to be rooted, and systemui modded
[HTC 10 Questions & Answers] Neekeet:
I believe I have all that. What do I need to do? :)
[HTC 10 Questions & Answers] OMJ:
which OS/version are u on? I can mod it for u
[HTC 10 Questions & Answers] Neekeet:
As I said earlier I believe I am hopefully I actually am :) fingers crossed

Android 6.0.1

Software 1.53.617.5

Rooted/Xposed

TWRP + S-OFF
[HTC 10 Questions & Answers] OMJ:
US unlocked...cool, I already have that modded w/ extras...our ROM is almost done if u want to wait or I could send ya just systemui
[HTC 10 Questions & Answers] Neekeet:
Sweet deal! could you send me that!

Also, what installation method is needed?
[HTC 10 Questions & Answers] OMJ:
i'll make a twrp flashable...

i just remembered we changed the wifi & signal icons in ours to the stock google icons, if u dont want that I'll just mod it w/ the power saver mod
[HTC 10 Questions & Answers] Neekeet:
I don't mind the stock. Thanks for the heads up

I'll need to keep an eye out for when you release your rom!
[HTC 10 Questions & Answers] OMJ:
deleted
[HTC 10 Questions & Answers] ThePhoneGeek:
This was based on the US Unlocked ver 1.53.617.5 correct?

Edit: Nevermind. Works great, now if I could get rid of the damn nfc and battery icons and change quick settings I'll be happy! :D
[HTC 10 Questions & Answers] Neekeet:
Just got the chance to flash and it broke my systemUI :(

Are you running 1.53.617.5?
[HTC 10 Questions & Answers] ThePhoneGeek:
Yeah I am having no trouble with it. Were you completely stock otherwise?
[HTC 10 Questions & Answers] meatlocker:
I got it to work, but the battery percentage is not showing embedded in the battery (it is still to the left as a percentage). I can toggle it on and off from the ""Show embedded battery percentage", but the behavior is just as I described.

US Unlocked, Rooted, S-On, running 1.53.xx
[HTC 10 Questions & Answers] OMJ:
this is htc's doing...it will need some work to get it back to stock behavior
[HTC 10 Questions & Answers] stonew5082:
why don't you change the quick settings? You can use Custom Quick Settings https://play.google.com/store/apps/details?id=com.quinny898.app.customquicksettings
[HTC 10 Questions & Answers] ThePhoneGeek:
Not a fan of separate programs to handle functions that should be stock. I'll wait until the dev community here has a solution to enable that function.
[HTC 10 Questions & Answers] Neekeet:
Yes I am on Stock but I am rooted and with xposed.
[HTC 10 Questions & Answers] ThePhoneGeek:
Ugh... Not a fine of that either. Every time I've xposed on M8 or M9 it hosed up the device so I won't do that anymore.

Thx though
[HTC 10 Questions & Answers] Jm@n:
Also if anyone wants, there's 2 easy edits to get battery % in the header and press goes to battery stats in settings
[HTC 10 Questions & Answers] geoff5093:
And those edits are?
[HTC 10 Questions & Answers] tbalden:
Doesn't work with htc10 , maybe with root it could, but it's not working on stock
[HTC 10 Questions & Answers] Nosferatu.:
it just doesn't work on the stock ROM so yes you need root. I've been using it for the time being until a better solution comes up
[HTC 10 Questions & Answers] tbalden:
It's annoying HTC removed this. Anyone can switch to airplane or data in a whim without security blocking it. Seriously HTC, I'm a fan, but it's beyond imagination why remove this.
[HTC 10 Questions & Answers] JochenP:
You have to activate systemUItuner to play with CustomQuickSettings but HTC has disabled it by default...
[HTC 10 Questions & Answers] Jm@n:
Nope. You can be on stock rooted to play with custom quick settings. You don't need the tuner active. Also a little info, if you extract system ui there's a ton of extra quick settings toggles images , and those can be used and set for extra toggles set through custom quick settings. Can get regular power saver back, screen shot, auto sync, and those icons are in system ui
[HTC 10 Questions & Answers] ThePhoneGeek:
Uh ok I'll bite, how? I am on stock and rooted and even on [MENTION=506238]OMJ[/MENTION]'s systemui he posted and I don't see where I can change what tiles I have.
[HTC 10 Questions & Answers] Jm@n:
I didn't say change, although you can reorder, in the tuner but it's a bit buggy atm. These are added toggles, added to the existing ones from within custom quick settings apk, and using your own icons for the toggles
[HTC 10 Questions & Answers] ThePhoneGeek:
Ok so mostly what I want it a tile for turning NFC on and off easily but I don't see how to do that and I would like to not see Extreme Saver.
[HTC 10 Questions & Answers] Jm@n:
Ok so you can definitely add a NFC toggle and can even use htc NFC quick settings icon found inside system ui apk /res/drawable xxxhdpi v4 folder by choosing the custom option for icon, plus you can set long press to go to the NFC section of settings or anything really
[HTC 10 Questions & Answers] Eagle1337:
Doesn't work for me
[HTC 10 Questions & Answers] stonew5082:
You would need the mod from the previous page
[HTC 10 Questions & Answers] Jm@n:
All in StatusBarHeaderView.smali

1. setupButtons method

Change 0x8 to 0x1

2. updateVisibilities method

Under :cond_1 change the

If-eqz v4, :cond_a to

If-nez v4, :cond_a

These 2 get battery % to show

3. onClick method

Under :cond_3 delete the line

if-eqz v1, :cond_1

This gets the on press to launch battery stats page
[HTC 10 Questions & Answers] Eagle1337:
causes system ui to force close on me :(
[HTC 10 Questions & Answers] Myrmeko:
You are making a ROM?

Awesome!

I hope it will have all sense apps and a more customizable System UI with the Sense icons, instead of Google's icons.
[HTC 10 Questions & Answers] Surfo2001:
Is there a way enable UI Tweeks without unlocking boot loader amor root?
[HTC 10 Questions & Answers] OMJ:
nope
[HTC 10 Questions & Answers] Myrmeko:
[MENTION=506238]OMJ[/MENTION]

How is your ROM doing?

Will you release it soon?

Can you change the height where the volume control appears to be in the middle of the screen?
[HTC 10 Questions & Answers] CrazyCypher:
Hy OMJ, is there any possibility for you to share SystemUI.apk with modded enabled System UI Tuner from the HTC 10 latest update 1.90.?

I would really appreciate it if you could share it with us, I really hope you could...

Thank you and kind regards
[HTC 10 Questions & Answers] OMJ:
I have the Sprint 10, we are still on 1.80, plus our systemui will be slightly different
[HTC 10 Questions & Answers] CrazyCypher:
Oh, I understand.. I have attached SystemUI.apk from 1.90.401.5 here, would you mind just implementing System UI Tuner in it maybe? I would really appreciate it... I dont need anything else, just working System UI Tuner...

Thank you very much for your time and effort, I hope you will be willing to do it :)
[HTC 10 Questions & Answers] OMJ:
If I have the time today, I will get it done for ya :)
[HTC 10 Questions & Answers] CrazyCypher:
Wow thanks man, I appreciate it :)
[HTC 10 Questions & Answers] OMJ:
np...here ya go, this should do it :)
[HTC 10 Questions & Answers] CrazyCypher:
Thank you, I replaced it but nothing happens when I long press the icon.. :/
[HTC 10 Questions & Answers] metalfan78:
[MENTION=506238]OMJ[/MENTION]

If you feel up to it, here is the systemui.apk from the latest unlocked version update 1.91.617.1. No rush, thought others might want it and I would love to try it out. Thanks for all your hard work.

https://www.dropbox.com/s/axn5e1n0s760sp1/SystemUI.apk?dl=0
[HTC 10 Questions & Answers] OMJ:
I'm looking at it now..

sure thing...I have the unlocked version already done, but it has ALOT more mods...I mod it w/ just tuner added
[HTC 10 Questions & Answers] OMJ:
Try again, I pushed it to mine (after disabling tuner 1st), it's working for me...
[HTC 10 Questions & Answers] OMJ:
tested...working :D
[HTC 10 Questions & Answers] metalfan78:
That was quick! Thanks! I will give it a go later.
[HTC 10 Questions & Answers] CrazyCypher:
Should I try this other version that you posted or the one you upoaded before? I tried to mount it with Magisk and also direct copy it to system directory before... :/
[HTC 10 Questions & Answers] Light1984:
This being an apk, do we just download and install it or can we just cut and paste it with a file manager? If we can use a file manager to install it, where does it go and I assume we can just change the tag on the old one to make a backup, systemui.bak or something? Thanks for doing this. Any foreseeable issue on Santod's 1.91 unlocked VZW port? Sorry for the noob questions.
[HTC 10 Questions & Answers] OMJ:
here, I'll make it easy for u guys...flash the appropriate version for your device in TWRP...

couldn't tell ya about how it will affect on Santods port, it should be ok, but either do a full backup 1st or back up your current SystemUI..../system/priv-app/SystemUI/....worse case u dirty flash Santods ROM...
[HTC 10 Questions & Answers] Light1984:
Awesome. Thank you
[HTC 10 Questions & Answers] INDIAN-MAfIA:
Could you edit this 1.92.709.1 Taiwan systemUI as well, when you have time, please?
[HTC 10 Questions & Answers] OMJ:
here ya go...
[HTC 10 Questions & Answers] CrazyCypher:
Sorry, but its not working on stock int. firmware.. :/ Thank you for trying, I really appreciate it..
[HTC 10 Questions & Answers] jascolli:
FYI worked fine on Santods Port. Thanks!
[HTC 10 Questions & Answers] INDIAN-MAfIA:
Yeah. Didn't work for me aswell :S
[HTC 10 Questions & Answers] OMJ:
yeah, not sure why it's working for some & not for others...but here is another stab at it, using a different method.

cool, glad to hear it's working for someone lol
[HTC 10 Questions & Answers] INDIAN-MAfIA:
It got enabled but I can't see it in settings
[HTC 10 Questions & Answers] OMJ:
Did you reboot?
[HTC 10 Questions & Answers] INDIAN-MAfIA:
Yeah. Rebooting helped.
[HTC 10 Questions & Answers] OMJ:
So it's good now?
[HTC 10 Questions & Answers] INDIAN-MAfIA:
Yeah mate! Thanks :D
[HTC 10 Questions & Answers] OMJ:
[MENTION=3077225]CrazyCypher[/MENTION] try this one, I modded it differently which worked for INDIAN-MAfIA
[HTC 10 Questions & Answers] CrazyCypher:
Not working unfortunately :/
[HTC 10 Questions & Answers] datafoo:
I'm on stock 1.91.617.1 and I can't get your MOD to work [MENTION=506238]OMJ[/MENTION]

Used your flashable zip, rebooted several times, wiped cache and dalvik. What might I be doing wrong?

Sent from my HTC 10 using telepathy...
[HTC 10 Questions & Answers] OMJ:
sounds like system write protection...I'd have to research it though...

*edit* I assume you're S-ON? my suggestion would get S-OFF or use custom kernel to disable system write protection...
[HTC 10 Questions & Answers] datafoo:
Incorrect. I'm s-off and system was mounted as r/w. I don't run system as read only by choice.

Flashed your zip, tried manually moving the file, cannot get the tuner to activate no matter how long I hold the gear for.

EDIT: I made sure to disable any potential conflicting mods like gravity box and n-ify. I'm running elementalX .18 kernel, magisk v6 and PHHs superuser with xposed 86.5.

UPDATE: solved it. Was due to my odex file. As I mentioned I'm stock which means I'm odex'd and had to rename my odex file to *.odex.orig, wiped cache and it now works.

Sent from my HTC 10 using telepathy...
[HTC 10 Questions & Answers] OMJ:
Haha, I'm so used to deodex, I forgot about the odex file on stock.

To anyone having issues, either delete or rename /system/priv-app/SystemUI/SystemUI.odex. It's not needed, even when stock.
[HTC 10 Questions & Answers] aer0zer0:
Has anyone tried hitting the + button, in the qs tile configuration, I get an FC whenever i press it. I'll get a logcat in a little bit.
[HTC 10 Questions & Answers] OMJ:
don't bother w/ a logcat...systemui requires much more modding for the ability to add tiles
[HTC 10 Questions & Answers] andybones:
the + to add tile?

which ROM?

I posted another test Sysui.apk if you could please test, that F/C should be fixed.
[HTC 10 Questions & Answers] OMJ:
This SystemUI should work for any HTC 10, I added the missing tiles & code...SystemUI data will need to be wiped, you can use titanium backup to wipe systemui data or wipe caches in twrp....worse case, it may require a clean flash (it did for me)

*edit* I removed the zip, it needs more work...:)
[HTC 10 Questions & Answers] OMJ:
I'm testing another modded systemui, I'm having to clean flash my ROM to test though...since it's different than the modded systemui I normally use, the userdata is conflicting...if it's good on a clean flash, I'll post it.
[HTC 10 Questions & Answers] OMJ:
ok, this was quite time consuming, but after clean flashing w/ this modded SystemUI, I have verified tuner is working w/ the ability to add tiles. After flashing, if you get a fc when trying to add a tile, you will either need to wipe systemui data, wipe caches in twrp, or maybe even wipe data & start fresh...sorry, but if you want it that bad, that's the downside.
[HTC 10 Questions & Answers] CrazyCypher:
after replacing systemUI I have SystemUI tuned tile in the notifications but when pressed it does nothing :) I will try to play around and try to activate it somehow...

---------- Post added at 09:13 PM ---------- Previous post was at 09:06 PM ----------

Oh my god, you are a freaking LEGEND! :) I used your apk to mount it in system using Magisk and I also used Magisk to remove odex file.

I activated the tuner and now its working perfectly! :)

Thank you very much, I cannot describe how grateful I am for your effort and time... Working without any problems on stock wwe :)
[HTC 10 Questions & Answers] OMJ:
cool, :) btw...the latest zip I posted also deletes systemui.odex...that was probably the reason it wasn't working for you b4.
[HTC 10 Questions & Answers] CrazyCypher:
Yeah but I extracted only SystemUI from the zip and mounted it with Magisk and also mounted to remove odex file :) That way I still have untouched and write protected system directory :)

Thank you again, I am really happy :)
[HTC 10 Questions & Answers] OMJ:
I'm not familiar with Magisk, but I don't see how your system would be untouched. Any changes to /system changes the checksum resulting in Ota failure.
[HTC 10 Questions & Answers] hgoldner:
I have successfully mounted some mods, too, using Magisk, but what do you mean when you say "and also mounted to remove odex file?"
[HTC 10 Questions & Answers] CrazyCypher:
You are missing big time if you dont know about what Magisk do :)

Magisk creates systemless mask over anything you want, for example it allows you to create a different file/variant of apk to be like a mask over original one, leaving original still in system directory. But operating system will run the other one because it thinks it is inside the system directory now :) You copy files you want to magisk directory and then after reboot they are only virtually replaced :) its amazing :)

---------- Post added at 08:41 AM ---------- Previous post was at 08:25 AM ----------

To remove files from system directory virtually with magisk, I used magisk trick with .replace file.

You create folder in magisk, then inside you know already must have auto_mount and then create folders you want inside and in the final app folder just put .replace empty file.

Example:

I want to replace original SystemUI.apk with modified one and at the same time remove odex file from /SystemUI/oat/SystemUI.odex. I create a folder inside Magisk, like that: Magisk/MyMod

Then I create a new file called auto_mount inside MyMod folder. Then I create directories I want modified. Final look of folders is like that:

Magisk/MyMod/system/priv-app/SystemUI/oat/

I then put modified SystemUI.apk inside this Magisk/MyMod/system/priv-app/SystemUI, and also I create new file called ".replace" and put it inside Magisk/MyMod/system/priv-app/SystemUI/oat/

I correct permissions of modified SystemUI.apk to match permissions of stock SystemUI.apk

After reboot, if I go look in system/priv-app/SystemUI/ I can see that apk is virtually replaced because I see difference in size, and if I look in oat folder I now dont see odex file but only .replace file :)

But system is under this mask still untouched, because if I delete MyMod folder and reboot, stock SystemUI and odex file will be back.

This is the method I used to remove bloatware without modifying system partition, now every bloatware app is only empty folder with .replace file inside, operating system does not see anymore apks :)
[HTC 10 Questions & Answers] BACS7:
We want Grid View for recents on HTC 10

IF there is any HTC repesentative watching, then please reinstate the grid view for recent apps on my shiny new HTC 10.
[HTC 10 Questions & Answers] OMJ:
sounds pretty slick...I'll have to look into it....not sure if it would work for me as my ROMs are heavily modified....easier for me just to restore system/boot/recovery imgs when looking to install a ota...