yashsingh1/xdaforums huggingface dataset:
[Android General] By Zonik:
Advanced Power Menu for Nougat

Before going to this post and a big thank you, for nougat you need some small changes in the original guide HERE

Decompile services.jar

Download and merge files smalis

After go to GlobalActions.smali (services.jar\smali\com\android\server\policy)

search for :

iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mProKioskToggle:Lcom/android/server/policy/GlobalActions$ToggleAction;

below this you will see a line like this:

new-instance v5, Lcom/android/server/policy/GlobalActions$20 or 19

(Changued 20 or 19 for 99)

search for:

invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$20;-><init>(Lcom/android/server/policy/GlobalActions;II)V

(Changued 20 or 19 for 99)

go to GlobalActions$SinglePressAction.smali

Add this before # instance fields:

# static fields
.field public static rebootMode:I

.field public static final rebootOptions:[Ljava/lang/String;

.field public static final rebootString_chs:[Ljava/lang/String;

Add this below # direct methods:

# direct methods
.method static constructor <clinit>()V
.locals 9

const/4 v8, 0x5

const/4 v7, 0x4

const/4 v6, 0x3

const/4 v5, 0x2

const/4 v4, 0x1

const/4 v3, 0x0

new-array v0, v8, [Ljava/lang/String;

const-string v2, "Reboot"

aput-object v2, v0, v3

const-string v2, "Hot Reboot"

aput-object v2, v0, v4

const-string v2, "Download"

aput-object v2, v0, v5

const-string v2, "Recovery"

aput-object v2, v0, v6

const-string v2, "Safe Mode"

aput-object v2, v0, v7

sput-object v0, Lcom/android/server/policy/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;

new-array v1, v8, [Ljava/lang/String;

const-string v2, "Reboot"

aput-object v2, v1, v3

const-string v2, "Hot Reboot"

aput-object v2, v1, v4

const-string v2, "Download"

aput-object v2, v1, v5

const-string v2, "Recovery"

aput-object v2, v1, v6

const-string v2, "Safe Mode"

aput-object v2, v1, v7

sput-object v1, Lcom/android/server/policy/GlobalActions$SinglePressAction;->rebootString_chs:[Ljava/lang/String;

return-void
.end method

Extra for changue name Power menu Advanced go to GlobalActions$99.smali

search for:

const-string/jumbo v2, ">>Power Menu Advanced<<" (and changue here)

Ready this is all Recompile // Enjoy

Note: If you have problems when recompiling check here https://xdaforums.com/showpost.php?p=74248924&postcount=259
[Android General] By Zonik:
Guide how add more Button Grid in SystemUI for Nougat

Decompile SystemUI

After go to strings.xml (res/value/strings.xml)

delete this:

<string name="qs_screen_grid_3_2">3X2</string>
<string name="qs_screen_grid_4_2">4X2</string>
<string name="qs_screen_grid_5_2">5X2</string>

Now add this:

Add this :
<string name="qs_screen_grid_3_4">3X4</string>
<string name="qs_screen_grid_4_4">4X4</string>
<string name="qs_screen_grid_5_4">5X4</string>
<string name="qs_screen_grid_3_5">3X5</string>
<string name="qs_screen_grid_4_5">4X5</string>
<string name="qs_screen_grid_5_5">5X5</string>

go to ids.xml (res/value/ids.xml)

Add this:

<item type="id" name="gid_save_position">false</item>

go to public.xml (res/value/public.xml) and removed this one:

qs_screen_grid_3_2
qs_screen_grid_4_2
qs_screen_grid_5_2

Download files and merge (if you have some files replace one)

Now Compile and enjoy

thx to [MENTION=6817362]josete_1976[/MENTION] for files for grid mod
[Android General] parth111999:
These Guides are GEMS to me [MENTION=7620420]By Zonik[/MENTION]

Thank You !!
[Android General] prashantp01:
Awsome Work bro [MENTION=7620420]By Zonik[/MENTION] Finally u did it?.

Goodluck for your future and be happy?
[Android General] Albe96:
[MENTION=5554004]alexega[/MENTION] May I know where I'll found "weather_level_analog" id? There's nothing about it in public.xml
[Android General] topbasework:
Hai.any tutorial to make network mode toggle Auto and 4G only.will be easy to change network mode :)
[Android General] Hayzohar:
Thanks for the tutorial

Hey ! thanks for the tutorial, was really helpfull :)
[Android General] X-MAN:
Hiii

Please share how to add screenshot & smart capture in nougat rom
[Android General] XxViRUsPRO:
Hi Guys Im XxViRUsPRO,

Today I Have Searched Too Much On XDA to Find A Guide To Add Rounded Corners In Settings Like Z-Mods By Zonik.

If Any One Know How To Add It Please Give Us A Guide

Best Regards, [MENTION=8203069]XxViRUsPRO[/MENTION]
[Android General] thwam:
Thanks for the great write-ups on making these mods, I've implemented quite a few for my personal use! :good:

Does anyone know of a way to increase the max number of visible notifications that are shown on the lock screen like this: https://xdaforums.com/showpost.php?p=66697124&postcount=1411 on 6.0? Specifically on the S7 flat? Right now it's limited to showing 2, which is not very helpful when looking at a glance.
[Android General] albertmurcia:
as I can color the navbar buttons, I have changed some colors in color.xml of systemUI but only change when you go down curtain and little else
[Android General] LiquidT:
First of all great guide.

But I'm getting an error wail recompiling not sure why. I found the line of code it was talking about just not sure what to change.
[Android General] By Zonik:
Hi try this method :

move the complete folder policy to smali_classes2

make this route in services.jar\smali_classes2\com\android\server\policy (create folder if need) and recompile now.. Report if work!!
[Android General] LiquidT:
It worked. Not sure why, but it did recompile. Will try flashing tomorrow thanks
[Android General] LiquidT:
[MENTION=7620420]By Zonik[/MENTION]

I moved the whole policy folder to smali_classes2 folder like was said last night, That did get it to recompile without errors. I tried flashing it today and it didn't work. I didn't get any errors or FC, it just wasn't there. I'm trying to get this to work on the s8+ Verizon phone.

I also tried the fingerprint after reboot mod as well, it didn't work ether. It is probably me doing something wrong.
[Android General] By Zonik:
I have seen that some users of the S8 is not working this method, and that certain lines are not the same.

I was sent the services.jar of s8 tomorrow I will give me some time to review it and make an adaptation.
[Android General] Albe96:
Yes and in N8,it became more worst,I saw sammy changed many things in smalis..
[Android General] [GS]:
Any Guide how to add Dual Messenger in Nougat Rom (I'm using A5 2016 A510F)
[Android General] yash92duster:
There guide already

Search it in unified thread

And in this also
[Android General] [GS]:
https://xdaforums.com/galaxy-s8+/how-to/guide-7-0-port-note8-dual-messenger-t3670251

This GUIDE not work in A5 2016, i cant find another Guide
[Android General] Albe96:
Yep.That guide won't work as it was for s8 ported roms..
[Android General] parth111999:
Ok sir?
[Android General] LiquidT:
Are you having any luck with making this work for the s8+? Looking forward to the guide when available.
[Android General] kin201303:
my s8+ OK

you try use TickleMyAndroid

C:\TickleMyAndroid\_WorkArea1\_working\services.jar\smali\com\android\server\policy
[Android General] LiquidT:
Did you do anything different than what your guide said to make it work?
[Android General] LiquidT:
Not sure what to do...

picture1.png Is showing my policy folder

picture2.png Is showing the GlobalActions folder in the policy folder

Picture3.png Is showing the Error when I try a compile the .jar with the smali files added to the policy folder
[Android General] AbrahamGC:
for that error u need to move some files to other classes.

So take whole policy folder, and move to smali_classes2, but made necessary folder to have same path, if original it's smali\com\android\server\policy, move to smali_classes2\com\android\server\policy
[Android General] LiquidT:
I'm having the worst time with this. I have moved the whole policy folder to smali_classes2 and it still doesn't work for the Verizon s8+ AQI6 firmware.

If I leave the policy folder in smali/com/android/server/policy it will not compile

If i move it to smali-classes2/com/android/server/policy it compiles, but doesn't work

About to pull my hair out, this should be an easy mod with guide..
[Android General] AbrahamGC:
Upload here if u can original services.jar and decompiled/moded folder for take a look

Enviado desde mi SM-N950F mediante Tapatalk
[Android General] LiquidT:
Hopefully you can help. THANK YOU
[Android General] AbrahamGC:
Try this.

Do cache/art-cache wipe :good:
[Android General] LiquidT:
Does not work. When I press the power menu nothing comes up, if I hold it down it will just reboot.
[Android General] [GS]:
If you want only Rebot to Recovery you can try Reboot Recovery to power menu with toggle method
[Android General] LiquidT:
I would really like "Power Off"-"Reboot Recovery"-"Reboot Download"-"Reboot"
[Android General] kin201303:
you try move smali android folder to smali_classes2

see my screenshot

left is your jar

right is me

my english is bad
[Android General] a.raul:
Good morning

They're spinning ...

Currently, without the modification of DualMessenger, you have the extended restart menu and it works perfectly? :confused:

In case you had the extended restart menu mod, upload the already modified services.jar and that everything works perfectly, in * .jar

Regards
[Android General] LiquidT:
I moved the Android folder to smali_classes2 folder. Still not working
[Android General] AbrahamGC:
I'm having same problem on N8, rly the code doesn't match like in the guide cuz it's based on S7edge... im trying to fix :good:
[Android General] LiquidT:
Good luck. When you get it fixed please post
[Android General] AbrahamGC:
Finally working on N8 (i need to replace old icon) :D

I'm looking ur services.jar but it have different code too so i can't write a guide... i'm trying to do again in ur services, in few minutes i will upload here :good:
[Android General] kin201303:
but i work :confused:
[Android General] LiquidT:
Looking forward to it.

---------- Post added at 05:15 PM ---------- Previous post was at 05:15 PM ----------

Not sure why mine is not working.
[Android General] AbrahamGC:
I maked a wipe/factory data reset before install...

Try u too.

Don't forget to add framework-res.apk modded.

If don't works then i don't know why :rolleyes:
[Android General] LiquidT:
What is the framework-res.apk modded. I haven't made any mods to the framework-res. I didn't see anything about modding the framework-res did I miss something
[Android General] AbrahamGC:
https://xdaforums.com/showpost.php?p=69788683&postcount=3
[Android General] Zapryanovv:
Hey guys. Someone did know how to make brightness 20-30% on default?
[Android General] LiquidT:
Sorry. But it still doesn't work.

I would be more than happy to up load my framework-res.apk, Samsung-framework-res.apk and my services.jar files if you would like a go at it. And make a flashable.zip for me to try. If you have time and would do it.
[Android General] Zapryanovv:
Okay guys, I have some problem... Brightness slider is bugged, when i move the slider to everywhere, the brightness is only on maximum.... Anyone know how to fix it?
[Android General] Aiithem Bennington:
New Mod Toggle Global Action For MM Grace UX & Nougat

https://mega.nz/#!T4QTVIoa!7cvp-l6y7_x_Tlk-IPOY8MxDedCP9SJ7GpR9ES_PZxg[/IMG]
[Android General] a.raul:
https://xdaforums.com/showpost.php?p=74341294&postcount=11525

https://xdaforums.com/showpost.php?p=74341306&postcount=11526
[Android General] Aiithem Bennington:
Service.jar

You Have & Send Me Your Service.jar for Compare
[Android General] LiquidT:
Will this still work even if you don't have a RC? I can for the life of me see why mine isn't working.
[Android General] ANDROIDXFOREVER:
hi bro i like this icons is possible send me ? thanks:D
[Android General] snifing:
SystemUI clock center on the lock screen and home screen

https://xdaforums.com/showpost.php?p=62155618&postcount=2374​

this is my status_bar.xml

<com.android.systemui.statusbar.AlphaOptimizedFrameLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
[COLOR="Red"] <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<com.android.keyguard.AlphaOptimizedLinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
<TextView android:textSize="12.0dip" android:textColor="#ffffffff" android:gravity="center_vertical" android:id="@id/knoxCustomStatusBarText" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:includeFontPadding="false" />
<include layout="@layout/system_icons" />
</com.android.keyguard.AlphaOptimizedLinearLayout>
</LinearLayout>[/COLOR]
<ViewStub android:id="@id/emergency_cryptkeeper_text" android:layout="@layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
[Android General] AbrahamGC:
A.O.K.P RAM BAR IN RECENTS WITH ROMCONTROL SWITCH ON-THE-FLY

This is an adaption from old guides, i'm not the owner of these files :good:

I tested it in 6.0.1, 7.0 and 7.1.1

1- Decompile SystemUI

2- Merge THIS

3- Go to res\layout\recents.xml and before </FrameLayout> add this : IF U HAVE 2 FRAMELAYOUTS AT THE END ADD BEFORE BOTH

<LinearLayout android:orientation="horizontal" android:id="@id/ram_bar_recents" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="70.0dip" android:layout_weight="1.0">
<in.panic.xperience.aokpram android:layout_width="fill_parent" android:layout_height="30.0dip" />
</LinearLayout>

4- Go to res\values\ids.xml and add this at the end :

<item type="id" name="ram_bar_recents">false</item>

5- Add this to res\values\strings.xml :

<string name="service_background_processes">%1$s free</string>
<string name="service_foreground_processes">%1$s used</string>

6- Recompile and decompile for get the new publid id for "ram_bar_recents"

7- Go to smali\com\android\systemui\recents\RecentsActivity.smali and search for .method protected onStart()V.

At the the end of method we have some like this (not all values match with ur smali)

.line 568
:goto_0
iput-boolean v3, p0, Lcom/android/systemui/recents/RecentsActivity;->launchDockedTaskFromFullRecents:Z

return-void

.line 565
:cond_4
invoke-virtual {p0}, Lcom/android/systemui/recents/RecentsActivity;->getWindow()Landroid/view/Window;

move-result-object v0

invoke-virtual {v0, v4}, Landroid/view/Window;->addFlags(I)V

goto :goto_0
.end method

Then before return-void add this:

invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/recents/RecentsActivity;->updateRamView()V

8- Add this method to the bottom of smali:

.method updateRamView()V
.locals 5

invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v1, "ram_bar_recents"

const/4 v2, 0x0

invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-nez v0, :cond_0

const v2, 0x8

const v3, 0x7f13057e [COLOR="Red"][B]## MATCH THIS WITH public.xml >> ram_bar_recents[/B][/COLOR]

invoke-virtual {p0, v3}, Lcom/android/systemui/recents/RecentsActivity;->findViewById(I)Landroid/view/View;

move-result-object v4

invoke-virtual {v4, v2}, Landroid/widget/RelativeLayout;->setVisibility(I)V

goto/16 :goto_0

:cond_0
const v2, 0x3

const v3, 0x7f13057e [COLOR="Red"][B]## MATCH THIS WITH public.xml >> ram_bar_recents[/B][/COLOR]

invoke-virtual {p0, v3}, Lcom/android/systemui/recents/RecentsActivity;->findViewById(I)Landroid/view/View;

move-result-object v4

invoke-virtual {v4, v2}, Landroid/widget/RelativeLayout;->setVisibility(I)V

:goto_0
return-void
.end method

9- Add this anywhere u want in RomControl:

<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="A.O.K.P RAM bar" android:key="ram_bar_recents"
android:defaultValue="false"
android:summaryOn="Showed"
android:summaryOff="Hided"/>

Done :victory:
[Android General] snifing:
SystemUI Clock Vertically/Horizontally​

system/etc/floating_feature.xml

Vertically..

<SEC_FLOATING_FEATURE_COMMON_SUPPORT_SERVICEBOX>[COLOR="Blue"]TRUE[/COLOR]</SEC_FLOATING_FEATURE_COMMON_SUPPORT_SERVICEBOX>

Horizontally..

<SEC_FLOATING_FEATURE_COMMON_SUPPORT_SERVICEBOX>[COLOR="Blue"]none[/COLOR]</SEC_FLOATING_FEATURE_COMMON_SUPPORT_SERVICEBOX>
[Android General] Aiithem Bennington:
How To Recent Apps Style Oreo.

Galaxy A3 2016.

https://mega.nz/#!qgIk3apI!AISXC4YFrL-LQpHRSajk-IJcnAbLZ8p2W0Gcfu_LR14
[Android General] ANDROIDXFOREVER:
Thanks bro [emoji39]

[emoji6] XDROID ROM V.6 [emoji16]
[Android General] snifing:
SystemUI Off the backlight of the screen when clicking on clock​

SystemUI/res/layout/status_bar.xml

<ViewStub android:id="@id/emergency_cryptkeeper_text" android:layout="@layout/emergency_cryptkeeper_text" android:layout_width="wrap_content" android:layout_height="fill_parent" />
[COLOR="Red"] <LinearLayout android:gravity="right" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.KeyButtonView android:gravity="right" android:layout_gravity="right" android:id="@id/back" android:background="#00000000" android:layout_width="45.0dip" android:layout_height="24.0dip" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_back" android:paddingStart="2.0dip" systemui:keyCode="26" />[/COLOR]
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
[Android General] stangdriver44:
This is awesome to see new guys step in and share!

I love seeing people open up their minds for new ways to get things done!

For this particular mod though, if you're simply looking for a show/hide toggle with a sysui restart to set, then there is no need for anything extra from the old guides.

The original author of the mod included a key "aokpram" for that purpose. I did mention this before, but it was a while back and in a different thread so can't blame you for not seeing the reference! Haha

The only thing i didn't like about the original merhod was the need to use sysui restart to show the bar, I've since adapted the mod for my preferance using an observer without the need to restart sysui.

Again, awesome that you are using what you've learned to get things done!

Just for learning purpose and future reference, you can adapt your code and apk with a little additional code one time and it can make your mods easy to rebuild and without generating new public id's. Check [MENTION=4714483]daxgirl[/MENTION] 6th gear mods like this one.

Remember if you are introducing a new id in xml you do not need to add it to ids.xml if you add it to xml like this

android:id="@+id/ram_bar_recents" using the "+" symbol.

So that step can be depreciated as well.

I hope it doesn't sound like I'm being negative towards your contribution, because that is definitely not my intention. Simply trying to pass on what I have learned to someone I think would be open to new ideas and maybe try things another way!

Good luck and keep it coming
[Android General] AbrahamGC:
Nice to see this answer, bro. It can help more beginners like me for some things.

For id's you're absolutelly right. I know that "trick" but i don't used :p

When I aplied ram mod in my phone, i searched for the key, it works fine except when i reboot or restarted my SystemUI. Then, on every boot it's enabled so i needed to find other way,

Maybe i doed something bad when aplied the mod, or not works fine on N8.

Anyway, if original guide it's working with aokpram key integrated, my guide will be forgotten. It's only an alternative if original it's not working. :angel:

And for observer, i think it's better to use original guides by wuby and daxgirl cuz it's explained better.

Imagine all guides here contains observer, i think not much people understands what they r doing.

Again, it's nice to see corrections from experts users. Regards :good:
[Android General] jazzespresso:
I have both Lcom/android/server/policy/GlobalActions$20 and Lcom/android/server/policy/GlobalActions$19, so changing either one should still work, right?

I tried this and did not work for me...
[Android General] zain.ahmad:
if you cant provide actual files/pngs then stop making posts in thread i will report you you did post this before a screenshot of your files

Peace!
[Android General] jazzespresso:
tell you the truth, could not able to find a fully complete guide for power menu for Nougat, I know that there a few posted here and there...i tried some, still no sucess so far, I am on 7.1.1

i am still searching.....hopefully I will figure out, there's this one that I have not tried yet..
[Android General] edzamber:
Disable Playstore Selfupdate by modding androidmanifest

WARNING !!!

This will not working after Playstore Version 8.3.43 !!!

Google have change someting in Playstore since 8.3.72 and we can't decompil/recompil correctly Playstore's ressources.

At the same time, androidmanifest rename com.android.vending into FFFFFFFFFFFF and we can't recompil at all.

We are waiting for a fix in Apktool.jar by [MENTION=3924617]iBotPeaches[/MENTION] to be able to decode ressources correctly on new Playstore versions.

---> For more informations, have a look on issue

here

and

here

Principe is simple

Playstore is checking its own build version on Google server to download and install new Playstore Update in background.

So if we give a very high build version to Playstore, its will not update as its thinks that its is already up to date

Here exemple we change Playstore version from 8.3.43 to 9.3.43

* First you will need AOSP 8.0 Framework-res.apk to be able to recompil correctly

Click Here to Download

* Decompil Playstore (please use TMA Tool for this)

* Edit apktool.yml file with notepad++

We will now change some numbers to "9"

First This :

apkFileName: com.android.vending_8.3.43.U.apk

Change to :

apkFileName: com.android.vending_[color="blue"]9[/color].3.43.U.apk

Next This :

versionCode: '80834300'

Change to :

versionCode: '[color="blue"]9[/color]0834300'

Last This :

versionName: 8.3.43.U-all [0] [FP] 172374098

Change to

versionName: [color="blue"]9[/color].3.43.U-all [0] [FP] 172374098

* Recompil with signature v2 ---> Option 4 (7.0+) in TMA

* Drag and Drop androidmanifest from recompiled Playstore to original Playstore.apk with 7Zip or Winrar and rename original Playstore.apk into "Phonesky.apk"

Now prepare folder for push on your Phone into system/priv-app/Phonesky

* Extract lib folder from Original Playstore and rename "armeabi-v7a" into "arm"

* Put Phonesky.apk + all this lib folder into system/priv-app/Phonesky and change perm to 755 for folders and 644 for libcronet.61.0.3163.81.so and Phonesky.apk

----> Into system/priv-app/Phonesky you should have :

- Phonesky.apk

- lib/arm/libcronet.61.0.3163.81.so

* Reboot

* Enjoy Playstore will never Seflupdate (until build version numbers you gave are not been reached by Playstore official build numbers) !!!

Note : if you have updated playstore before, you need to uninstall previous update

​
[Android General] :
[MENTION=7620420]By Zonik[/MENTION] on nougat 7.1.1, when I decompile services.jar, to add edge screen stuff, the first step to find AOD.Manager service under jumbo v7, only has it listed as v5. Does this affect the code I enter following that and if so, do I simply change v7 stuff to v5?
[Android General] whitelightning76:
Hello!

I have added device info (fromt his post: https://xdaforums.com/showpost.php?p=61801302&postcount=2019 ) to my recents screen.

It is working, however, CPU says 0 and memory 45MB / 3335 MB.

Is there anyone who could help me correct this ? I can post smali files , but i do not know which ones are needed. Any help would be much appreciated!