yashsingh1/xdaforums huggingface dataset:
[Galaxy S6 General] asc1977:
i edited now that post and hope it is now right way

http://xdaforums.com/showpost.php?p=65715399&postcount=220

more i do step by step
[Galaxy S6 General] asc1977:
please tell me from where you took this guide

i want to add original guide to the guide here to complete the rules of thread
[Galaxy S6 General] _alex74_:
mate he took from other thread here

But is a copy paste from above thread, the only difference is he wraps the code in linear layout before adding to its layout.(nothing hard as [MENTION=6681786]sheard[/MENTION] sayed)

So everything else is the same, he mentioned the writer of guide, but copied all(not needed i think )

My suggestion is to add only differnces, example of my guide (as my opinion 80 percent of LL mods from S5 thread will work even on MM with small adjustments)

so thanks will be given too to original writer of the mod, who deserves it more(we have just lost few minutes to try it in MM, logcat it and fix)

Thanks mate for doing this job :good:;);).....keep going master :D
[Galaxy S6 General] daxgirl:
This is one sample where only link to the original guide should be posted. You rewrote the entire guide and even gave links to downloads. ONLY link original guide and post changes to made for mm.

And in your op don't link your own post. Link original thread.

Cheers.

Sent from my ACTUAL SM-N920C using transporter...

---------- Post added at 09:30 PM ---------- Previous post was at 09:25 PM ----------

This is how guides should be done... when based on other's work.

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] grzegorz354:
[MENTION=4596062]asc1977[/MENTION]

guide
[Galaxy S6 General] asc1977:
ok, so i did it again and now its right i think

http://xdaforums.com/showpost.php?p=65715399&postcount=220
[Galaxy S6 General] bunnys7679:
Hi guys

I have a problem with the mod - add screenshot and Screen Recorder in Power Menu

If I want my RECOMP Service.jar I get this error. Can anyone help me?

Thank you in advance

Das ist mein Log

Batch ApkTool : 3.4.4

SMALI : smali-2.1.2.jar

API-Ebene : 23

APKTOOL : apktool_2.1.0.jar

Expertenmodus : NO

Unterschrift : JA

--------------------------------------------------

[*] Neu kompilieren services.jar...

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4335,107] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4335,115] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4335,108] mismatched input 'android' expecting OPEN_PAREN

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4335,122] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4335,129] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4335,150] Error for input ';': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4351,107] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4351,115] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4351,108] mismatched input 'android' expecting OPEN_PAREN

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4351,122] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4351,129] Error for input '/': Invalid text

_INPUT_JAR\services.jar\smali\com\android\server\policy\GlobalActions.smali[4351,150] Error for input ';': Invalid text

[*] ---> Fehler deodexing "services.jar"

Kochen mit 1 Fehler.
[Galaxy S6 General] sheard:
logfile says everything u need u have typing error on 4335 line and 4351 line just correct them....
[Galaxy S6 General] asc1977:
You have wrong text in that lines

4335

4331

The second number 107 is the position in that line.

Check if all match the guide

If you really didnt find post your globalActions.smali here as attachment and anybody look inside but first check by your one. Its only a typing error or text error
[Galaxy S6 General] bunnys7679:
Sorry guys but I know? really not what's wrong. Maybe can help to have someone

Global Action.smali
[Galaxy S6 General] sheard:
try with this one https://mega.nz/#!VhBH2Z4Q!7s7QGtqdyOMEMg5HCZ60vWENqd1j5CqQm1d7XcKrA7E and i am sure u getted compiled it ,so why redo all again ? and try to learn to solve your problems .i can't check if it will work but i just copied and pasted from mine .if there will be error don't give logcat just redo everything from s5 mods thread
[Galaxy S6 General] asc1977:
here is mine. its working and done from sheards and edzambers guide. it could be that my rewritten guide have an error. i have to check all guides and do changes like you can read some posts back.

soo.....

compare all parts which you have to do changes with my smali and you will see it work

https://www.dropbox.com/s/per1r57inyx54jb/GlobalActions.smali?dl=0
[Galaxy S6 General] thereassaad:
Take a look here , this fixed my issues & also for ur issues

http://xdaforums.com/showthread.php?p=66357897
[Galaxy S6 General] sheard:
hi mate do you checked log or his smali lol ? :D , your issue was on cond: and if someone will correctly read guide then he willn't have this too.he have typing error here :

invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions
$Action;Ljava/util/ArrayList;Z)Z
[Galaxy S6 General] thereassaad:
xD , then he just copy/paste with ur bug too look

invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions

$Action;Ljava/util/ArrayList;Z)Z

As it should be look like this

invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z

Without the space in this as on ur one

invoke-direct {v0, v4, v5, v6, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions

$Action;Ljava/util/ArrayList;Z)Z

[emoji38][emoji38]
[Galaxy S6 General] sheard:
lol maybe :D but he have succesfully recompiled it with my guide on tdunham's thread(@sagitt67 guide ) as i know ,but i don't know why he re do this process,probably space was maked when i copied and pasted this line from akelpad
[Galaxy S6 General] daxgirl:
Cmon man, there is a line of space in your method invocation... look at lines where you have typo and type them as single line. No spaces in Java byte code..... *rolling eyes*

Sent from my ACTUAL SM-N920C using transporter...

---------- Post added at 12:20 AM ---------- Previous post was at 12:19 AM ----------

So many people followed your guide successfully, all it takes is a little studying before blindly following guides. ;)

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] thereassaad:
Yes when he copy/paste from ur guide then he will get the space so he need to make it as one line , then no issues as he got it ,,
[Galaxy S6 General] sheard:
but i will not change guide i will make them to learn how to solve their problems :D
[MENTION=4714483]daxgirl[/MENTION] maybe i must make more mistakes on guide to make them learn lol

anyway lets stop spamming this thread
[Galaxy S6 General] thereassaad:
No problem mate , anyway thanks to u for writing it here on xda , also thanks to [MENTION=1640795]segi[/MENTION]tt67 for bring this mod to MM , ?
[Galaxy S6 General] tdunham:
This isn't a rule or anything but... ;)

All code for guides that are copied and pasted to XDA should be wrapped.

This it will help prevent many user mistakes trying to find blank spaces in lengthy text guides. I've even seen emojis created by unwrapped text so its pretty hard to figure out what the code is supposed to represent when an emoji pic is replacing some text. :rolleyes:

In case someone does not know what 'wrapping' means... if you select a group of text and select the # symbol in the advanced editing area at the top, it will 'wrap' the text that you see quoted so neatly within boxes in a lot of guides and tutuorials here.
[Galaxy S6 General] sheard:
we were talking about this guide

http://xdaforums.com/showpost.php?p=66349336&postcount=5656

i have wrapped all codes ,but my problem was that first i write guides on akelpad and after that copy paste them here and wrap ,while i copied codes from akelpad it maked auto new line because code was so long i think.But anyway i think everyone can win this problem
[Galaxy S6 General] tdunham:
Yeah, that guide looks great the way it is. I have made a typo here and there it is easy to do. I saw many pages from that one because it is not very simple but I have done this before so know where to get the edits and there are more than a few. I already finished mine and all smali has visibility toggles to limit what show but this is many more edits to provide an additional guide for. :rolleyes:

Edit: Oh, got a couple icons from here btw. Tnx for those. Saved me from having to do at least two of them anyway. :)
[Galaxy S6 General] sheard:
u have nice power menu lol ,as i thinked i am only noob here :D i toggled them as well but i looked code of aurora that is why i didn't shared here as i don't have permission :D it is only for my personal usage .and i failed toggling emergency even i looked code i can't make it :( .Anyway i will go back too lollipop power menu
[Galaxy S6 General] tdunham:
Did you try removing the emergencymode item from framework-res/res/values/arrays.xml? I was wondering if just removing the item from there would work.
[Galaxy S6 General] sheard:
No i didn't tried it ,will try it tomorrow it is too late here.probably it will work.thanks for tip i forgetted about array config
[Galaxy S6 General] asc1977:
I put followed to OP, everybody are OK with that rules or i forget something or have to change something?

Rules of Thread

1. Post only guides here which work 100% on a S6 or S6edge please

2. If you post a guide here than be sure its your own guide

3. If it is not your guide than please only link to that guide to original developer and show only the changes here we have to made

4. Keep your guide please up to date if something is wrong because i link in OP to your guide and dont rewrite

5. If it is not your guide give credits and write that the users have to thank in linked thread from original thread
[Galaxy S6 General] grzegorz354:
[MENTION=4596062]asc1977[/MENTION]

add changes to your post

sec_keyguard_clock_view.xml

Change blue
[Galaxy S6 General] asc1977:
Tell me why because with bottom its like screenshot. If i change to center what happen than?
[Galaxy S6 General] edzamber:
Hi all,

Agree with all have been said here about how to guide and link theses to original threads.

Sorry for now, i'm on holidays until 2 next weeks, so i can't be here, i have a very poor data connexion, i must set 2g only to to be able to post...

Cheers,

Ed.
[Galaxy S6 General] grzegorz354:
[MENTION=4596062]asc1977[/MENTION]

view post @edzamber
[Galaxy S6 General] asc1977:
I know that he in holiday and now?

What you want to say me with that?
[Galaxy S6 General] nguyentankiet:
Can you share rom control with toogle call record only[emoji4]
[Galaxy S6 General] asc1977:
Go to this thread from [MENTION=4714483]daxgirl[/MENTION] and read how to build a romcontroll app. Its easy and guided

http://xdaforums.com/showthread.php?t=3146567
[Galaxy S6 General] Repulsa:
How to Remove the Emergency Button When Pressing Power Button

Decompile Framework-res / values / Arrays.xml

Look for this line:

<string-array name="config_globalActionsList">

Remove Emergencymode save / recompile.

Credit and Thanks : Everyone

And Here's the Thread on how to enable the Emergency Mode without a rom control .
[Galaxy S6 General] tdunham:
Oh perfecto!

We were just talking about trying it that way last night.
[Galaxy S6 General] asc1977:
I want to add it to OP

Can you change your post to a guide please

Thx

Edit: added to OP

Thx [MENTION=3136944]Repulsa[/MENTION] for doing
[Galaxy S6 General] daxgirl:
Just a question.. this move is rather radical, as is anything involving changing resources. Means a user can't enable it if they want to, without installing stock framework-res... can it be done dynamically with toggle in mind? I mean without touching arrays in resources?

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] Repulsa:
Thats really a good question . Im still trying to figure it out on how to enable this feature after removing the button . Maybe someone could add or find a way to add this on settings or atleast make an app to enable this feature ? (Like you )[emoji14](im a newbie only tryib to learn .) anyways i never actually use this feature and i thought posting or sharing it would be nice .
[Galaxy S6 General] daxgirl:
I wish I had a rooted phone, as I once did build mode to enable disable power menu options.

I am just pointing out, that this is removing very radically a potentially life saving feature. I mean thinking about repercussions for a user who couldn't sent their location in emergency mode or enable alarm, are catastrophic. Imo until better option is found, the developer should not remove this feature with potentially life saving ability.

I mean... it's one thing to add disclaimer on your rom page that you're not responsible for any damage to the device, but this is quite serious.

I would caution very much against removing emergency mode irreversibly. But that's just my opinion. I mean nothing will happen to your users if this option cannot be removed. It's actually for their own safety.

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] tdunham:
[Guide] How to hide (Power Menu) Emergency Button with a Toggle

Android 6.x

services.jar smali edits.

Firstly, make certain we are editing the proper child smali for GlobalActions yours may be different.

Look for a method that looks similar to this one to make sure we are editing the correct one. Mine is in GlobalActions$5.smali.

.method public onPress()V
.locals 6

const/4 v1, 0x1

const-string v2, "GlobalActions"

const-string/jumbo v3, "in onPress of LongLifeMode"

invoke-static {v2, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

iget-object v2, p0, Lcom/android/server/policy/GlobalActions$5;->this$0:Lcom/android/server/policy/GlobalActions;

const-string v3, "com.android.service.GlobalAction"

const-string v4, "0002"

const-string v5, [B]"EmergencyMode"
[/B]

Smali edits:

smali\com\android\server\policy\GlobalActions$5.smali

Replace this entire method.

.method public showConditional()Z
.locals 4

const/4 v0, 0x0

const/4 v1, 0x1

iget-object v2, p0, Lcom/android/server/policy/[COLOR="blue"]GlobalActions$5[/COLOR];->this$0:Lcom/android/server/policy/GlobalActions;

# getter for: Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/server/policy/GlobalActions;->[COLOR="blue"]access$500[/COLOR](Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;

move-result-object v2

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

move-result-object v2

const-string v3, "[COLOR="blue"]power_emergency[/COLOR]"

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

move-result v2

if-ne v2, v0, :cond_0

:goto_0
return v0

:cond_0
move v0, v1

goto :goto_0
.end method

Important Notes:

I have highlighted 3 items in BLUE.

Item 1 - Make sure GlobalActions$5 name matches the name of this child smali we are working with.

Item 2 - Look at the parent smali GlobalActions.smali and verify that the access$500 method is calling mContext.

It should look similar to this, if it doesn't match, find the proper access$xxx and make the appropriate change here in this new method.

.method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
.locals 1

iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

return-object v0
.end method

Item 3 - This is our key to toggle the feature on and off.

Rom Control switchpreference:

<SwitchPreference android:title="Emergency Mode" android:key="power_emergency" android:defaultValue="false" android:summaryOn="Emergency mode will be shown" android:summaryOff="Currently removed" />
[Galaxy S6 General] daxgirl:
[MENTION=1042140]tdunham[/MENTION] you're my hero!!! ???

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] tdunham:
Lol.

I started to reply to your prior comment but it tagged it to the end of the guide:

I have heard similar arguments about removing the phone shortcut from the lockscreen since it is also considered an 'emergency' feature by many phone providers.
[Galaxy S6 General] daxgirl:
Agreed. None of those should be removed. I draw the line at user's safety. Anything concerning that they should remove with their own hands at their own peril.

BTW, unlimited thanks don't work for me anymore on Tapatalk... so I will thank all concerned later...

I am not using those guides, as you know, since moved away from building roms a while ago, but always a pleasure to see your skill in action. Forever admirer!!!

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] asc1977:
i edit the services.jar and all work. but please what i have to do that standart is not showing emergency mode. i want that after i mod emergency is hide.

my idea is that people can use this mod to hide emergency mode with this mod without romcontrol. if they want to show back they need rom control. you understand my meaning? so we need in futur not the mod from repulsa if somebody want no romcontrol

btw thx for nice mod
[Galaxy S6 General] mht5o5:
There are no files like that in secsettings.apk
[Galaxy S6 General] asc1977:
Which file you search?
[Galaxy S6 General] asc1977:
Hey my friend.

Tested on s6edge without problems. Guide match 100% s6edge so rules check passed [emoji1]

I add your guide now to OP

Can you add please screenshots for mod? I have made some for you. Only add to your post please
[Galaxy S6 General] sheard:
U can add switch ( toggle)to sec settings too.and if u add defualt value as true then it will show it on first boot.if they want to change visiblity they can turn on off with rom control.
[Galaxy S6 General] daxgirl:
If he adds the switch to settings he needs to add condition in smali for that fragment to put the preference into settings db. FYI. Because the mod that [MENTION=1042140]tdunham[/MENTION] wrote reads from settings system table.

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] asc1977:
I hope anyone have a idea

That was only a idea from me to do that so we can make from 2 mods one mod. Some here have no rom control app but want to use that mod only to hide. The mod of repulsa i read is working but not on fine way if i understand right
[Galaxy S6 General] daxgirl:
The user needs to understand that if rom removes the emergency mod permanently they are left without emergency mode, which is, btw, extremely useful and life saving.

So removing it permanently is not a good idea. For stated above reasons. No rom developer should take that responsibility upon themselves. This should be given to user's decision. Therefore toggle is the best way to go.

You can include toggle in sec settings. But you need to edit smali. It's not difficult.

You can include toggle in rom control or ficetos custom settings. Which are the easier way.

Or... the best way... to leave it alone.

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] asc1977:
I included in my rom control app.

It was only a idea and i understand your meaning. You are right with that
[Galaxy S6 General] asc1977:
You search arrays.xml????

Its there like its mentioned

Which apktool you use for decompile or you didnt recompile??
[Galaxy S6 General] sanoc69:
When you write a post why not use hide button when text it's so long?
[Galaxy S6 General] mht5o5:
I used apk editor app on play store and i opened Sec.Settings2.apk but i didnt find this path
[Galaxy S6 General] asc1977:
Dont work. You must decompile with apktool

Open a apk dont show values folder.
[Galaxy S6 General] asc1977:
Because i like scrolling

.

.

.

No just kidding you

Or you didnt mean me?
[Galaxy S6 General] sanoc69:
I mean all

Not only you or me
[Galaxy S6 General] asc1977:
If i quote a post i dont set it to hide. The main writer must do that. But if you use xda app and not web browser for reading hide dont work. It shows all inside so no different but i give you right. Its better to hide long things
[Galaxy S6 General] nguyentankiet:
Can you attach your rom control above for me. I did reading guide make rom control you share, but it is very difficult for me, because i am amatuer only[emoji23]
[Galaxy S6 General] sheard:
I know it but it is possible. If someone don't want to use your rom control then he or she must do it :) but i prefer your app is it is fast and i can theme it ,your app is really best for me.you are amazing :) .by the way if someone will really need changes for secsettings i can look on it if i can made guide to settings,but i don't promise anything because of limited time and due to my bad skills
[Galaxy S6 General] asc1977:
here is my rom control but the better way is you learn how to build by your own. i also had the same problems but i take the time and now i have reached goal and learnd
[Galaxy S6 General] daxgirl:
It's probably better to provide link to git with full source of your app. Since using compiled app is a problem with later providing sources ?

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] asc1977:
Its only for his private use and not for public i think. And yes i know about sources. We talked about that time ago [emoji1]
[Galaxy S6 General] daxgirl:
Sure sure... no problem. ?

Sent from my ACTUAL SM-N920C using transporter...
[Galaxy S6 General] asc1977:
Btw

Anybody know which is the name of id for the last color i must change on this pic for the area where the slider is located. [MENTION=5198767]ikrom[/MENTION] posted a guide in s5 thread for the first two but i want also the third part and want write by myself but need the right id for that. In lollipop i had founded anytime but now some differences on MM

Original guide is here for that. I want add later to OP if i have last part

http://xdaforums.com/showthread.php?p=66410627

View attachment 3722003
[Galaxy S6 General] thereassaad:
I guess he mentioned about public id that u need to matched with ur editing ,
[Galaxy S6 General] asc1977:
Yes it matched. But he guided only firt part of expanded view and second part with toggles but not last part from slider and i didnt find right id for that value
[Galaxy S6 General] thereassaad:
Adding Ultra Data Power Saving ,,

Seaech for this in ur system/csc/feature.xml

<CscFeature_SmartManager_ConfigSubFeatures>

Then replace it with

<CscFeature_SmartManager_ConfigSubFeatures>roguepopup,autoclean,autorestart,networkpowersaving,storageclean,applock,trafficmanager,notificationmanager,devicesecurity,trafficmanager_auto,UDS,applicationpermission,devicesecurity,chinadualpage,data_compression</CscFeature_SmartManager_ConfigSubFeatures>

[emoji3]
[Galaxy S6 General] OMassalia:
When i replace this csc the second page disappear. Only ultra data saving mode in the 2nd page
[Galaxy S6 General] stangdriver44:
[MENTION=4596062]asc1977[/MENTION] Great idea for this thread!

Working together we will crack MM in no time!!!

I will definitely be following along and as soon as T-mobile decides to drop MM on me I will give what I can to help this community out!!

Thanks