All H.O.E. (HTC One EVO) mods by RunAndHide - Sprint HTC EVO 4G LTE

Must flash in Custom Recovery of your Choice
Releases These will do:
Physical Recent App Key = Menu
Adds Longpress Home = Launch Recent Apps
Must be on deodex roms​Stock w/ on screen menu
here
Stock/no onscreen menu
here
ViperRom v1.2
here
ViperRom 1.2.1 (includes advance power menu now)
Here
Voice Search
enable by halfpress camera button *refer to post three for a copy paste method
HERE
NEW!! for Viper 1.2.1 longpress home = recent apps, physical recent app button = menu, volume up/down = wake device, half press camera button = search/voice search and includes Vinchenzop's APM
HERE​
Also dont kill me if anything of mine does not work cause
1) its not my fualt
2) i dont have this phone so no testing
3) what fun is it without some bootloops (just kidding)
See Post 3 for how this was done, and spread the word
happy modding guys
Screen shot provided by
FattySparks
Vinchenzop

:beer:

How I did it; To help the community
listed are the changes needed to enable longpress on home
these changes are in the android.policy.jar located at /system/framework/
you must decompile the classes.dex file and will find these smali files in a tree of folders
in PhoneWindowsManager.smali
line 1299
from
Code:
.method static synthetic access$300(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V
.registers 3
.parameter "x0"
.parameter "x1"
.prologue
.line 199
invoke-direct {p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager;->startHtcSpeak(J)V
return-void
.end method
to
Code:
.method static synthetic access$300(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V
.registers 3
.parameter "x0"
.parameter "x1"
.prologue
.line 199
invoke-direct {p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager;->startRecentTasks(J)V
return-void
.end method
line 2456
from
Code:
.method private startHtcSpeak(J)V
.registers 5
.parameter "eventDownTime"
.prologue
.line 4578
:try_start_0
new-instance v0, Landroid/content/Intent;
const-string v1, "com.nuance.vsuite.intent.action.VOICE_COMMAND"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 4579
.local v0, intent:Landroid/content/Intent;
const/high16 v1, 0x1000
invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 4580
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
if-eqz v1, :cond_17
.line 4581
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
.line 4582
iput-wide p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHtcSpeakDownTime:J
:try_end_17
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_17} :catch_18
.line 4592
.end local v0 #intent:Landroid/content/Intent;
:cond_17
:goto_17
return-void
.line 4587
:catch_18
move-exception v1
goto :goto_17
.end method
to
Code:
.method private startRecentTasks(J)V
.registers 5
.parameter "eventDownTime"
.prologue
.line 4418
.line 4419
:try_start_0
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mStatusBarService:Lcom/android/internal/statusbar/IStatusBarService;
invoke-interface {v0}, Lcom/android/internal/statusbar/IStatusBarService;->toggleRecentApps()V
.line 4422
iput-wide p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHtcSpeakDownTime:J
:try_end_7
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_7} :catch_8
.line 4432
.end local v0
:goto_7
return-void
.line 4427
:catch_8
move-exception v1
goto :goto_7
.end method
line 1707
from
Code:
.method private handleLongPressOnHome(J)V
.registers 5
.parameter "eventDownTime"
.prologue
const/4 v1, 0x0
.line 1008
iget-boolean v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAutoMotiveEnabled:Z
if-eqz v0, :cond_17
.line 1009
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
if-eqz v0, :cond_17
.line 1010
const/4 v0, 0x0
invoke-virtual {p0, v0, v1, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z
.line 1011
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/android/internal/policy/impl/PhoneWindowManager$7;
invoke-direct {v1, p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager$7;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 1024
:cond_17
return-void
.end method
to
Code:
.method private handleLongPressOnHome(J)V
.registers 5
.parameter "eventDownTime"
.prologue
const/4 v1, 0x0
.line 1008
.line 1009
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
if-eqz v0, :cond_17
.line 1010
const/4 v0, 0x0
invoke-virtual {p0, v0, v1, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->performHapticFeedbackLw(Landroid/view/WindowManagerPolicy$WindowState;IZ)Z
.line 1011
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
new-instance v1, Lcom/android/internal/policy/impl/PhoneWindowManager$7;
invoke-direct {v1, p0, p1, p2}, Lcom/android/internal/policy/impl/PhoneWindowManager$7;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;J)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 1024
:cond_17
return-void
.end method
then in PhoneWindowManager$7.smali
line 54
from
Code:
#calls: Lcom/android/internal/policy/impl/PhoneWindowManager;->startHtcSpeak(J)V
to
Code:
#calls: Lcom/android/internal/policy/impl/PhoneWindowManager;->startRecentTasks(J)V
now to remove the navbar when an app calls for menu is rather simple
decompile the framework-res.apk
and head to res/values/dimens.xml
go to the line that calls the dimens of the narbar
and change
from
Code:
<dimen name="navigation_bar_height">48.0dip</dimen>
<dimen name="navigation_bar_width">45.0dip</dimen>
to
Code:
<dimen name="navigation_bar_height">0.0dip</dimen>
<dimen name="navigation_bar_width">0.0dip</dimen>
i believe that was everything, and i hope i didnt leave anything out
have fun tweeking.
and hope this helps out
to add a phycical search button to the half press action of the camera button change the following
at \system\usr\keylayout\keypad_8960.kl
from
Code:
key 211 FOCUS
key 212 CAMERA
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED
to
Code:
key 211 SEARCH
key 212 CAMERA
key 116 POWER WAKE_DROPPED
key 114 VOLUME_DOWN WAKE
key 115 VOLUME_UP WAKE
key 102 HOME
key 139 MENU
key 158 BACK
key 217 SEARCH
key 107 ENDCALL WAKE_DROPPED

It doesn't matter what ROM you are on, as long as it is deodexed (and Sense, duh). Also, you don't need to wipe anything as ICS automatically detects changed files and adjusts itself accordingly.

freeza said:
It doesn't matter what ROM you are on, as long as it is deodexed (and Sense, duh). Also, you don't need to wipe anything as ICS automatically detects changed files and adjusts itself accordingly.
Click to expand...
Click to collapse
i was not sure if he had changed anything in his framework, so i am/was playing it safe.
and as for wiping, ive always gone with the rule of thumb if your touching the /framework it never hurts.
but yes you are right it will rebuild if anuything has been changed automatically
but if i specify which rom once i add the systemUIs to get rid of the onscreen menu dont mix...

Ill test to get rid of on screen menu buttons
Sent from my EVO

flashing viper now to test

runandhide05 said:
i was not sure if he had changed anything in his framework, so i am/was playing it safe.
and as for wiping, ive always gone with the rule of thumb if your touching the /framework it never hurts.
but yes you are right it will rebuild if anuything has been changed automatically
but if i specify which rom once i add the systemUIs to get rid of the onscreen menu dont mix...
and here is one that includes the systemUI modded to remove the menu
if someone would test it for me
its a MUST you be on viper v1.1
https://www.box.com/s/a3031514c5173e37e687
Click to expand...
Click to collapse
I agree. You should however use Stock as a base. Most people are on that and it won't encourage ROM favortism

Because I have a few untested out please list the full name of the zip u flashed and what from u r running,
Not just " it didn't work"
That does not help me one bit..
Thank you guys/gals
Sent from my Galaxy Nexus using Tapatalk 2

freeza said:
I agree. You should however use Stock as a base. Most people are on that and it won't encourage ROM favortism
Click to expand...
Click to collapse
Good idea man. Although as of now its the one out.
Sent from my Galaxy Nexus using Tapatalk 2

runandhide05 said:
Because I have a few untested out please list the full name of the zip u flashed and what from u r running,
Not just " it didn't work"
That does not help me one bit..
Thank you guys/gals
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I flashed via twrp it ran fine booted and the menu comes but not long press home sorry I posted on both threads I thought that was this one idk lol but like I no long press recent .
I'm on virper Rom 1.1
Edit I wasn't sure why cwm is needed so o tried it anyways still ok
Sent from my EVO using xda premium

ok the viper ones are not right, try the one for stock and report back, and cmw is a force of habbit il fix to to custom recovery, thanks

tested out the viper 1.1 no menu and the menu is gone, but i still have a bar on the bottom. the bar on the bottom doesnt do anything at all since there isnt 3 dots. getting closer..

freeza said:
It doesn't matter what ROM you are on, as long as it is deodexed (and Sense, duh). Also, you don't need to wipe anything as ICS automatically detects changed files and adjusts itself accordingly.
Click to expand...
Click to collapse
Oh i've figure out it matters because of sumthing in the android.policy.jar file

Spyderekz said:
tested out the viper 1.1 no menu and the menu is gone, but i still have a bar on the bottom. the bar on the bottom doesnt do anything at all since there isnt 3 dots. getting closer..
Click to expand...
Click to collapse
screen shot please? not quite understanding what you are saying?
you flashed viperROM_lp_hm_rcnt_noOSmenu?

Stock ver worked fine recent and menu thanks man good shi#
Also on viper Rom 1.1 no wipe on twrp recovery
Sent from my EVO using xda premium

Sorry I'm half drunk.
sent from my EVO LTE

Also long press home didn't work
sent from my EVO LTE

Spyderekz said:
Also long press home didn't work
sent from my EVO LTE
Click to expand...
Click to collapse
yes thanks you, for now the rom specific mods have been scrapped, instead i have in post number 3 a how to and what lines need to be changed.
for the time being mod if the OP will work on the roms that are currently out there

stupid black 3 dotless bar, must remove it..

Related

[MOD][GUIDE] TouchWiz change default screen to center screen on XXLPH

Hi all,
Do you use stock touchwiz launcher then this might be for you!
I don't know if such a guide already has been posted but here it goes:
1) Decompile TouchWiz30Launcher.apk
2) Edit the file QuickViewWorkspace.smali
3) Change the code in close() method around line 4054 from
sget v3, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
if-lt v3, v0, :cond_31
.line 569
sput v0, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
.line 587
:goto_30
return-void
To:
sget v3, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
# if-lt v3, v0, :cond_31
.line 569
const/4 v3, 0x2
div-int v0, v0, v3
sput v0, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
.line 587
:goto_30
return-void
The change is in bold. One line has been removed and 2 lines were added.
4) Edit the file Launcher.smali
5) Change the code in setupViews() method around line 8910 from
sget v1, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
if-lt v1, v0, :cond_be
.line 1913
add-int/lit8 v0, v0, -0x1
sput v0, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
to
sget v1, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
# if-lt v1, v0, :cond_be
.line 1913
add-int/lit8 v0, v0, -0x1
const/4 v1, 0x2
div-int v0, v0, v1
sput v0, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
The change is in bold. One line has been removed and 2 lines were added.
What this change does is it divides (number of screens -1) by 2 and set that as the default screen.
The first change is for when a change in number of screens was made and the second change is for when the app starts.
6) Compile back and you are done.
I have included both odex and deodexed CWM version of mod and original files.
Note: Stock odexed users can also use the deodexed version if they like.
If you have problems then use restore file and clear dalvik-cache.
Have fun...
Thanks for sharing, man
you are the best JKAY keep the good work
Good job bro, that's a good work.
great. thanks _JKay_
any for XXLPQ?
‬1‬ said:
any for XXLPQ?
Click to expand...
Click to collapse
+1
Thanks
can anyone please make a fix for the LPD version?

[HOW TO] Add screenshot option in power menu for every rom

Here it is ....
As some people here asked for it I'll try to explain how I learned to add screenshot option in power menu.
First I'd like to thank some special members that helped me a lot for doing this :
Championswimmer, Barath_000, Achotjan
First you need to know it's not an easy thing to do and you may have bootloop, reboot etc ... that's why you need time and most of everything backup to restore the modded files.
You'll need tools to do this.
I used a "all in one tool": android utility (thanks to tommytomatoe)
http://forum.xda-developers.com/showthread.php?t=1167623
It can be used on linux / mac laptop
If you don't want to use it or using windows laptop you'll need apktool and dex2jar
Before beginning :
Make a backup of these 2 files in system/framework :
framework-res.apk
android.poilicy.jar
Why ? you'll work on these files so if it doesn't work you'll have a "safe working base" ...
Ready ?
1.Framework-res.apk
Decompile this file (with android utility or apktool)
In the "drawable-hpdi" folder place the png attached, and named it "whateveryouwant".
I advice you to keep the name it got as all my how to will name it like that
Then go in the values folder,
You'll find several xml files, with notepad ++ or other xml editor open*: strings.xml and public*.xml
In strings.xml:
Add this line at the end of the file just above </resources> add the line*:
<string name="global_action_screenshot_txt">Take screenshot</string>
It must look like that*:
<string name="add_region_in_locale_picker_dummy_string">+</string>
<string name="global_action_sleep">Sleep mode</string>
<string name="global_action_screenshot_txt">Take screenshot</string>
</resources>
Click to expand...
Click to collapse
Save and close strings.xml
Open public.xml
In the fitting section (drawable and strings) add these lines :
<public type="string" name="global_action_screenshot_txt" id="0x010403da" />
<public type="drawable" name="semc_ic_dialog_screenshot" id="0x0108057f" />
Little tip for "how to" choose the id's (0x010403da and 0x0108057f)
- Search for the last ID for the category (for drawable the last one was0x0108057e)
- write the next letter or number ... (last one was 0x0108057e so the next one is 0x0108057f)
Tip number 2 for the ID ...
the letter list begin to a and finish to f
the number list begins to 0 and finish to 9
Finding the fitting ID can take time so stay calm and relax
Once you've done that, save public.xml but don't close it you'll need it later ....
Now you can compile your framework-res.apk
If you did something wrong apktool will write it .. just read and repair what's wrong.
Now the framework is set, you need now to tell the device wich action you want to run when you tap the option on screen.
2. Andorid.policy.jar
Decompile this file.
Go to com/android/internal/policy/impl folder
Here you'll fond some smali files.
Find the smali named GlobalActions.smali and open it.
In the # annotations thread add this line
Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;,
in must look like this :
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;,
Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;,
Lcom/android/internal/policy/impl/GlobalActions$Action;,
Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
}
.end annotation
Click to expand...
Click to collapse
In the # instance fields thread add this line :
.field private mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
It must look like this :
# instance fields
.field private mAdapter:Lcom/android/internal/policy/impl/GlobalActions$MyAdapter;
.field private mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
.field private mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
.field private final mAudioManager:Landroid/media/AudioManager;
.field private mBroadcastReceiver:Landroid/content/BroadcastReceiver;
.field private mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.field private final mContext:Landroid/content/Context;
.field private mDeviceProvisioned:Z
.field private mDialog:Landroid/app/AlertDialog;
.field private mHandler:Landroid/os/Handler;
.field private mIsWaitingForEcmExit:Z
.field private mItems:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/android/internal/policy/impl/GlobalActions$Action;",
">;"
}
.end annotation
.end field
Click to expand...
Click to collapse
Is that all ??? No !!!!!
Search the line 195
It must be like this in stock rom :
.line 195
const/4 v0, 0x3
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
const/4 v1, 0x0
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v2, v0, v1
Click to expand...
Click to collapse
If there's const/4 v0, 0x4 : this tell the system how many options you've got in the power menu (here 4)
Just under .line 195 add these lines :
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;
const v1, 0x108057f
const v2, 0x10403da
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Click to expand...
Click to collapse
Now it must look like this
.line 195
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;
const v1, 0x108057f
const v2, 0x10403da
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
const/4 v0, 0x4
Click to expand...
Click to collapse
What that mean ????
const v1, 0x108057f
Click to expand...
Click to collapse
= the ID in public.xml for the Drawable ... ATTENTION : the ID must be written without the 0 (in public.xml = 0x0108057f ; in android policy 0x108057f )
const v2, 0x10403da
Click to expand...
Click to collapse
= the ID in public.xml for the string
respect this order
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8
Click to expand...
Click to collapse
In the IMPL folder of the decompiled android.policy.jar you'll see several files named GlobalActions$1.smali ; GlobalActions$2.smali; etc ....
You'll need to create a smali file, it's name will follow the already existing name ... if the last one is GlobalActions$7.smali then you'll create GlobalActions$8.smali ...
What should I get in this file ?????
Calm down and take the GlobalActions$8.smali attached, rename it if you need, but don't forget to rename inside it all GlobalActions$8 entries in GlobalActions$thenumberyouchoose
Once you've done that get back to GlobalActions.smali ....
Find this line
invoke-static {v0}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/ObjectLjava/util/ArrayList;
Click to expand...
Click to collapse
just above add
const/4 v1, 0x3
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x4
Click to expand...
Click to collapse
Added Globalactions.txt file so you can compare with yours
Here it is, work in android.policy is over ... save and close the GlobalActions file, and recompile android.policy.jar
Ready to flash ? .. so must build a zip file with good permissions and all the files ...
Find a flashing zip and decompress it
Create these folder
system/framework
system/app
system/bin
Inside framework folder get framework-res.apk and android.policy.jar you compiled
inside bin get the screenshot file (see attachement)
inside app get CMscreenshot.apk (see attachement)
edit your update-script to get these line : (translation for edify script can be done easily)
copy_dir PACKAGE:system SYSTEM:
set_perm 0 0 04755 SYSTEM:bin/screenshot
Click to expand...
Click to collapse
permissions are needed or else you'll get error (saved to null ...) will taking screenshot
save, compresss make your zip ...
MAKE A BACKUP
And flash ....
reboot .... and enjoy the screenshot option
Hope it helps ..
Once again take your time ... if you're novice in modding it'll take time ... it took me nearly one month to do it ...
FAQ :
Q: Can't find GlobalActions$8.smali in attachment
A: Download GlobalActions$8.zip and rename it GlobalActions$8.smali ....
Q: Can't find the screenshot file to place in bin folder
A : download bin.zip .... it's in
Q: Why can't I use the screencapture.apk from Arc, Neo, Xperia S etc ...
A: We still fighting to make it working ...
Thanks Tof, very useful
Just one question, in my decompiled framework-res, in "public.xml", drawable section are totally mixed order, is there an easier way to find the last id?
LzVebz said:
Thanks Tof, very useful
Just one question, in my decompiled framework-res, in "public.xml", drawable section are totally mixed order, is there an easier way to find the last id?
Click to expand...
Click to collapse
To be honest I don't know easier way than writing the ID you want to get and search if it already exist ..
If someone have a useful xml editor that can sort ID by section ...
I thought..ID's are reading automatically if they miss...only if you add them in strings and xmls…
Finaly here thanks Tof )
FeraVolt said:
I thought..ID's are reading automatically if they miss...only if you add them in strings and xmls…
Finaly here thanks Tof )
Click to expand...
Click to collapse
Finally took time to write it
Got me long long nights with my computer to get it working ... hope it wold help people to have more sleep time
For ID you're not wrong .. ID are getting automatically if you compile from sources (I may be wrong but it's what I understood )
First: THANK YOU!!!
Then...
I've... some issues...
My globalaction now is:
Code:
.line 232
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$11;
const v1, 0x1080452
const v2, 0x10404f5
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
const/4 v0, 0x6
const/4 v0, 0x5
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v1, v0, v10
It is wrong?
Now i'm trying with this, without success:
Code:
.line 232
const/4 v0, 0x5
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v1, v0, v10
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v1, v0, v9
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$3;
const v2, 0x1080418
const v3, 0x10403fc
const v4, 0x10403fd
invoke-direct {v1, p0, v2, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;III)V
aput-object v1, v0, v11
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$4;
const v2, 0x1080030
invoke-direct {v1, p0, v2, v13}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v1, v0, v12
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$10;
const v3, 0x108044e
const v4, 0x1040508
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$10;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
invoke-static {v0}, Lcom/google/android/collect/Lists;->newArrayList([Ljava/lang/Object;)Ljava/util/ArrayList;
const/4 v1, 0x3
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
aput-object v2, v0, v1
const/4 v1, 0x4
move-result-object v0
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
const/4 v1, 0x5
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$11;
const v1, 0x1080452
const v2, 0x10404f5
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Yes, I know there are a lot of things... But I'm sure that there is something in this file...
@dettofatto
Yes there are some errors in your file but can't correctly quote your post since I'm on phone... Recheck with op first until I get back home to show your errors
Sent from my X10s using XDA
dettofatto said:
First: THANK YOU!!!
Then...
I've... some issues...
My globalaction now is:
Code:
.line 232
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$11;
const v1, 0x1080452
const v2, 0x10404f5
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
const/4 v0, 0x6
const/4 v0, 0x5 [COLOR="Red"]----not needed cause line just above is enough[/COLOR]
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mSilentModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
aput-object v1, v0, v10
It is wrong?
Click to expand...
Click to collapse
See above in red
And so I'll have 0x4 and 0x6 without 0x5?
Or I must put all your new lines under 0x5?
Because my. 232 line starts with constant 0x5...
And so I thought that the new screenshot has 0x6...
Or new lines start before 0x5?
Tomorrow I'll try all these options and I'll see!
I'm wrong?
Thank you...
Sent from My Motosola....
No...
Rebooted.. I'll try again...
Ah! I'm on motorola device...
Code:
.line 232
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$11;
const v1, 0x1080452
const v2, 0x10404f5
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
const/4 v0, 0x5
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
dettofatto said:
No...
Rebooted.. I'll try again...
Ah! I'm on motorola device...
Code:
.line 232
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$11;
const v1, 0x1080452
const v2, 0x10404f5
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
const/4 v0, 0x5
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
Click to expand...
Click to collapse
Would you upload and attach your globalaction.smali please?
Sent from my X10s using XDA
Yes!!! I'll do tomorrow! The original file? Yes... I think so...
Thank you!
Sent from My Motosola....
dettofatto said:
Yes!!! I'll do tomorrow! The original file? Yes... I think so...
Thank you!
Sent from My Motosola....
Click to expand...
Click to collapse
The one you modded please
thanks
Tof37 said:
The one you modded please
thanks
Click to expand...
Click to collapse
This is my file!
dettofatto said:
This is my file!
Click to expand...
Click to collapse
Add a quick look at your file and there are some errors in it ...
that's why it doesn't work will attach your file later to show the errors
Thank you again!!!
Sent from My Motosola....
Have a look at the file
I attached mine as model in OP so you can compare
I don't suppose you know how to change the order of the power menu?
blueowl0708 said:
I don't suppose you know how to change the order of the power menu?
Click to expand...
Click to collapse
That can be done
Lines must placed in the order you want them...
Sent from my X10s using XDA

Samsung Galaxy Note 4 Phone Mods Thread-Guides & Links Updated 12/3/2014

Howdy I have been compiling a list mods for the Verizon Note 4, but most should work across all variants!!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This thread is posted in the Samsung Galaxy Note 4 Unified Development Thread and can be viewed across all Note 4 Variants.
This is and will always be a work in progress, so feel free to contribute and please do!!!!
This thread assumes you know how to decompile and compile using APKTOOL.
Enjoy!!!
[Guide How-to] Verizon Note 4 Remove CD Installer & ASEC Note 4
This removes the annoying CD installer that pops up when you plug into your computer and your phone will go straight to MTP.
Enjoy!!
Remove CD Installer Download: http://d-h.st/Wm7
Just flash with TWRP
[Guide How-to] Verizon Note 4 Enable Native Call Recording Note 4
Smali edit for InCallUI.apk:
com/android/services/telephony/common/PhoneFeature.smali
Add the lines that are highlighted in RED
Code:
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
[COLOR="Red"]const-string v0, "RecordingAllowed"[/COLOR]
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
const-string v3, "CscFeature_VoiceCall_ConfigRecording"
invoke-virtual {v0, v3}, Lcom/sec/android/app/CscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
const-string v0, "RecordingAllowed"
.line 1693
sget-object v3, Lcom/android/services/telephony/common/PhoneFeature;->mFeatureList:Ljava/util/HashMap;
const-string v6, "voice_call_recording"
const-string v7, "RecordingAllowed"
For those not capable of doing smali edits just flash this via TWRP. Enable Call Recording
[Guide How-to] Remove Lockscreen Carrier Note 4
This removes the lockscreen carrier text.
Keyguard.apk smali edit:
smali/com/android/keyguard/CarrierText.smali:
Change if-nez to if-eqz in the indicated edit in BLUE:
Code:
.method private static concatenate(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
.locals 5
.param p0, "plmn" # Ljava/lang/CharSequence;
.param p1, "spn" # Ljava/lang/CharSequence;
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 310
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v4
[COLOR="Blue"]if-eqz[/COLOR] v4, :cond_1
move v0, v2
For those of you not capable of smali edit's, just flash this via TWRP Remove Lock Screen Carrier Text
[Guide How-to] Remove Safe Volume Warning Note 4
This removes the safe volume warning that pops up when you turn up the volume beyond a certain point
This mod requires modifying framework.jar
Edit smali/android/media/AudioService.smali:
Changes are in .method private checkSafeMediaVolume(III)Z
, new lines are in BLUE:
Code:
iget-object v6, p0, Landroid/media/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v6
[COLOR="Blue"]goto :goto_td[/COLOR]
if-ne v6, v7, :cond_4
Code:
goto :goto_1
.line 6873
.end local v0 # "e":Ljava/lang/Exception;
.end local v1 # "pm":Landroid/os/PowerManager;
.end local v3 # "wl":Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]:goto_td[/COLOR]
:cond_4
monitor-exit v5
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
goto :goto_0
.end method
For those not capable of smali edit's just flash this in TWRP Remove Safe Volume Warning
[Guide How-To] Enable Call & MSG Blocking Note 4
This enables call and msg blocking natively.
Simple CSC edit.
system/csc/feature.xml edit
Must be inserted BEFORE
</FeatureSet>
</SamsungMobileFeature>
(** please note that feature.xml can be overwritten so this may not stick if using a third party software like Xposed)
Code:
<CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
For those of you not capable of this edit, just flash this with TWRP Native Call & Message Block
[Guide How-to] Replace Recents with Menu Note 4
Keylayout edits:
system/usr/keylayout/Generic.kl
Change key 254 from APP_SWITCH to MENU
key 254 MENU
Download: Generic.kl
Now Recent Apps capacitive key is Menu (single-press) and Search (long-press).
However, we have now lost access to recent apps via a hardware key.
[Guide How-to] VZW Note 4 4 Way Reboot Power Menu EPM Note 4
This will work with Odex or Deodexed Rom. To see the 4 way Menu you must hit restart on the Primary Menu!!!
First grab your Deodexed android.policy.jar from system/framework
Decompile it with APKTOOL. Look in smali\com\android\internal\policy\impl\
Find GlobalActions$SinglePressAction.smali and open with NotePad++
Look for this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Add in the Red Text to look like this:
Code:
.class abstract Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Lcom/android/internal/policy/impl/GlobalActions$Action;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/internal/policy/impl/GlobalActions;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x40a
name = "SinglePressAction"
.end annotation
[COLOR="Red"]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;[/COLOR]
# instance fields
.field public customAction:I
.field public isKnoxCustom:Z
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field mLayoutId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[COLOR="Red"].method static constructor <clinit>()V
.locals 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Hot Boot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method[/COLOR]
.method protected constructor <init>(II)V
.locals 2
.param p1, "iconResId" # I
.param p2, "messageResId" # I
Save file and look for GlobalActions.smali in the same folder.
Find this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$8;
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Change the red text to look like this:
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1126
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];
const-string v2, "VZW"
sget-object v4, Lcom/android/internal/policy/impl/GlobalActions;->mSalesCode:Ljava/lang/String;
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_3
const v2, 0x1080b2d
:goto_2
const v4, 0x10401cf
move-object/from16 v0, p0
invoke-direct {v3, v0, v2, v4}, Lcom/android/internal/policy/impl/GlobalActions$[COLOR="Red"]99[/COLOR];-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.line 1164
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
Save file.
Add the 3 smali files in this zip to the same folder: Smali-Files-Zip
Now recompile. That's it.
For those of you not able to edit smali. Here is a zip flashable with TWRP. VZW Note 4 4 Way EPM Menu
To see the 4 way Menu you must hit restart on the Primary Menu!!!
Enjoy!!!
Framework Mods- Note 4 Native WiFi Tether, All Rotations, Safe Media Volume Disabled, Dreams enabled, Battery Critical Warnings lowered to 1%.
Here is the download: Framework Mods
Here is the download to return to stock: Stock Framework
Enjoy!!!
[Guide How-to] Remove NFC notification icon in status bar Note 4
First grab your Features.xml from /system/csc/
Open with Notepad++ and look for following text:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>Vzw</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Change the red text to look like this:
Code:
<!-- NFC -->
<CscFeature_NFC_SetSecureEventType>ISIS</CscFeature_NFC_SetSecureEventType>
<CscFeature_NFC_StatusBarIconType>[COLOR="Red"]none[/COLOR]</CscFeature_NFC_StatusBarIconType>
<CscFeature_SmartcardSvc_SetAccessControlType>GPAC, MODE1</CscFeature_SmartcardSvc_SetAccessControlType>
<CscFeature_SmartcardSvc_HideTerminalCapability>eSE</CscFeature_SmartcardSvc_HideTerminalCapability>
<CscFeature_NFC_CardModeRoutingTypeForUicc>ROUTE_ON_WHEN_SCREEN_UNLOCK</CscFeature_NFC_CardModeRoutingTypeForUicc>
<CscFeature_NFC_EnableSecurityPromptPopup>all</CscFeature_NFC_EnableSecurityPromptPopup>
<CscFeature_NFC_EnableInvalidTagPopup>true</CscFeature_NFC_EnableInvalidTagPopup>
<CscFeature_NFC_ConfigAdvancedSettings>Disable</CscFeature_NFC_ConfigAdvancedSettings>
<CscFeature_NFC_DefaultCardModeConfig>DH:UICC</CscFeature_NFC_DefaultCardModeConfig>
Save file and copy back to /system/csc, reboot and boom its gone!!!
Enjoy!!
[Guide How-to] Enable Private Mode with a deodexed Rom and SecureStorage=false Note 4
First thing you need to do is grab PersonalPageService.apk from system/priv-app
Decompile with APKTOOL
Find PersonalPageService\smali\com\samsung\android\personalpage\service\util\SecureProperties.smali open with Notepad++
Find the follow code:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
if-nez v0, :cond_3
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
if-nez v0, :cond_2
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Replace the items in Red like this:
Code:
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
.param p1, "context" # Landroid/content/Context;
.prologue
const/4 v1, 0x1
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 54
const/4 v0, 0x0
iput-object v0, p0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->mImpl:Lcom/samsung/android/personalpage/service/util/SecureProperties$PropertiesImpl;
.line 63
invoke-static {}, Landroid/os/Debug;->isProductShip()I
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 64
invoke-static {}, Lcom/sec/android/securestorage/SecureStorage;->isSupported()Z
move-result v0
[COLOR="Red"]if-nez v0, :cond_0[/COLOR]
.line 65
const/4 v0, 0x0
sput-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
.line 72
:goto_0
sget-boolean v0, Lcom/samsung/android/personalpage/service/util/SecureProperties;->SUPPORT_SECURE_STORAGE_FEATURE:Z
if-eqz v0, :cond_0
Save file and compile apk. Push to system/priv-app
For those not capable of changing smali files here is a flashable zip: PersonalPageService.apk
Enjoy!!!
[Guide How-To] Enable Lockscreen Rotation Note 4
First grab Keyguard.apk from system/priv-app
Decompile with APKTOOL.
Open smali file smali/com/android/keyguard/KeyguardViewManager.smali
Look for the following:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
const/4 v1, 0x0
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Replace the Red text to look like this:
Code:
Code:
.method private shouldEnableScreenRotation()Z
.locals 3
.prologue
[COLOR="Red"]const/4 v1, 0x1[/COLOR]
.line 249
iget-object v2, p0, Lcom/android/keyguard/KeyguardViewManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 250
.local v0, "res":Landroid/content/res/Resources;
const-string v2, "lockscreen.rot_override"
invoke-static {v2, v1}, Landroid/os/SystemProperties;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
Compile and push to system/priv-app
For those that are unable to edit smali here is a flashable zip: LockSceen Rotation
Enjoy!!
[Guide How-to] Disable Screen Wake Plugged/Unplugged Note 4
First grab your services.jar from system/framework and decompile with APKTOOL
Find smali\com\android\server\power\PowerManagerService .smali and open PowerManagerService with Notepad++
Look for the following:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
const/4 v1, 0x1
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
Change to Red text to look like this:
Code:
.method private shouldWakeUpWhenPluggedOrUnpluggedLocked(ZIZ)Z
.locals 4
.param p1, "wasPowered" # Z
.param p2, "oldPlugType" # I
.param p3, "dockedOnWirelessCharger" # Z
.prologue
[COLOR="Red"]const/4 v1, 0x0[/COLOR]
const/4 v0, 0x0
.line 2216
iget-boolean v2, p0, Lcom/android/server/power/PowerManagerService;->mWakeUpWhenPluggedOrUnpluggedConfig:Z
if-nez v2, :cond_1
That's it. Compile and push to system/framework
For those of you not capable of editing smali files here is a flashable zip: Disable Screen Wake Plug/unpluged
Enjoy!!!
[Guide How-to] Bluetooth Scan Dialog Removal
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL
Find smali/com/android/settings/Bluetooth/BluetoothScanDialog.smali
Look for the follow in .method private initialize()V method:
Code:
.line 79
new-instance v4, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;
invoke-direct {v4, p0, v0}, Lcom/android/settings/bluetooth/BluetoothScanDialog$3;-><init>(Lcom/android/settings/bluetooth/BluetoothScanDialog;Landroid/app/AlertDialog;)V
invoke-virtual {v0, v4}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V
.line 86
[COLOR="Red"]invoke-virtual {v0}, Landroid/app/Dialog;->show()V[/COLOR]
.line 87
return-void
.end method
Delete the text in Red, save file and compile. That's it. push to system/priv-app
Enjoy!!!
Flashlight Toggle & Battery Stats Toggle Mod Flashable-Settings-About Phone-Status-OFFICIAL Zip Updated 12-3-2014
Here is the flashable Flashlight Toggle Mod: VZW Flash Light Battery Stats Toggle Mod-Official Status
YOU MUST WAIT AT LEAST 5-10 MINS AFTER FLASHING FOR THE MOD TO WORK.
Some of you might also have to add "Flashlight" to your settings DB via SQLite. To see the toggle.
1) Download sqlite editor app. I got it from here.
2) Open the app and give it root permissions. It should populate a list.
3) Scroll and Tap the "Settings Storage"
4) Tap "Settings.db"
5) Tap "System"
6) Scroll down until you find "notification_panel_active_app_list", tap to highlight it. I noticed its a little hard to get it highlighted because it seems to want to highlight the one under it. So you might have to tap the one right above it to get it highlighted. Make sure its the notification_panel_active_app_list, and I also updated my notification_panel_active_app_list_reset NOT the notification_panel_default_active_app_list. I picked the wrong one the first time and it didnt work.
7) Once it is highlighted tap the phones menu button.
8) Tap "Edit Record"
9) You'll see a list of all the toggles that are currently enabled to show in notification area.
10) At the bottom of the list or anywhere else in the list add ; and the words Flashlight and Battery then another ;. So it will look like this at the end. ;TouchSensitivity;Flashlight;Battery; Then press Save.
11) Reboot and you should have a Flashlight and a Battery Stats toggle now. You can now use the edit feature and move it anywhere you want in the list of toggles.
This might also have a positive side effect of the following:
When you go to Settings-About Phone-Status it might say OFFICIAL!!!
Enjoy!!!
Enable Tab view in Settings
First grab your SecSettings.apk from system/priv-app
Decompile with APKTOOL and open res.values/bools with Notepad++
look for the following 2 lines:
Code:
<bool name="settings_list">false</bool>
<bool name="settings_grid">true</bool>
Change them to look like this:
Code:
<bool name="settings_list">[COLOR="Red"]true[/COLOR]</bool>
<bool name="settings_grid">[COLOR="Red"]false[/COLOR]</bool>
That's it. Compile and push to System/priv-app
Enjoy!!
How to enable Flashlight operation with Volume
First grab your SecSettings.apk from system/priv-app and decompile with APKTOOL.
Look in res/xml for display_settings_2014.xml and open with Notepad++
Add the following line in Red. When you are done look in settings-Display and you will see Torch Light options menu
Code:
<CheckBoxPreference android:title="@string/led_indicator_settings" android:key="key_simple_led_indicator_settings" android:summary="@string/led_indicator_settings_summary" android:widgetLayout="@touchwiz:layout/preference_widget_twcheckbox" />
[COLOR="Red"]<PreferenceScreen android:title="@string/torchlight_settings" android:key="torchlight" android:fragment="com.android.settings.torchlight.TorchlightSettings" />[/COLOR]
<ListPreference android:persistent="false" android:entries="@array/touch_key_light_entries" android:title="@string/touch_key_light" android:key="touch_key_light" android:summary="@string/touch_key_light_summary" android:widgetLayout="@layout/round_more_icon" android:entryValues="@array/touch_key_light_values" />
Compile and push to system/priv-app
That's it.
Enjoy!!!!
How to Enable add Apps Ops to Settings.
First grab SecSettings.apk from system/priv-app and decompile with APKTOOL
Get gridlist_settings_headers.xml from res/xml and edit with Notepad++
Look for:
Code:
<header android:icon="@drawable/ic_setting_grid_powersaving" android:id="@id/power_saving" android:title="@string/power_saving_mode_title_k" android:fragment="com.android.settings.powersavingmode.MenuPowerSavingModeSettings" />
and add right below it the following:
Code:
<header android:icon="@drawable/ic_settings_applicationpermissions" android:title="@string/app_ops_settings" android:fragment="com.android.settings.applications.AppOpsSummary" />
Save file and compile. That's it.
Push to system/priv-app
Enjoy!!!
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
thesilentnight said:
Great post...
Will the Wi-Fi tether mod work with the ATT Variant?
Click to expand...
Click to collapse
I have not seen the AT&T firmware. You must be rooted. If you are rooted and want to send me your framework-res.apk I can take a look for you.
Sadly as far as i know, root isnt yet available yet for the ATT variant....
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
OMG, I'm sooo glad I could write what's written in my signature.
EMSpilot said:
...Here is the flashable Flashlight Toggle Mod...
Click to expand...
Click to collapse
You sir, ROCK!!! Very good work
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
pratik_193 said:
the "Verizon Note 4 Enable Native Call Recording Note 4"
Will this work on N910G snapdragon variant ? also, does this enable automatic call recording ?
Click to expand...
Click to collapse
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
EMSpilot said:
If you can send me your InCallUI.apk I can take a look. No automatic call recording. When you get a call or make a call you simply tap the call recording button once on the screen.
Click to expand...
Click to collapse
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
Why is that?
thesilentnight said:
Sadly as far as i know, root isnt yet available yet for the ATT variant....
Click to expand...
Click to collapse
CZ Eddie said:
OMG, I'm sooo glad I could write what's written in my signature.
Click to expand...
Click to collapse
thesilentnight said:
Why is that?
Click to expand...
Click to collapse
My sig is pretty self explanatory in regards to your earlier statement.
I ditched my grandfathered unlimited data plan with AT&T in November 2014 because AT&T won't let anyone root their Galaxy phones.
Hello, T-Mobile!
Click to expand...
Click to collapse
pratik_193 said:
Here it is..
Can you make a modded secphone something we had for note 3 ? link below
http://forum.xda-developers.com/showthread.php?t=2498449
Click to expand...
Click to collapse
Hey @EMSpilot any luck ?
pratik_193 said:
Hey @EMSpilot any luck ?
Click to expand...
Click to collapse
Where did this InCallUI.apk come from? It won't build.
EMSpilot said:
Where did this InCallUI.apk come from? It won't build.
Click to expand...
Click to collapse
i got it from the current ROM i have a N910G snapdragon... you need anything else ?
Hmm, get a whole bunch of errors when trying to decompile SecSettings.apk. I can decompile other apks fine so don't think it's something with my setup.
Code:
W: Skipping "android" package group
W: Could not decode attr value, using undecoded value instead: ns=android, name=widgetLayout, value=0x02030015
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info
Great post op!!
Did by any chance someone tried this in an international N4?
Awesome thread!
Subscribed!
Thanks contributors!
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Psycho_666 said:
@EMSpilot
when i try to add the torchlight mod it makes all the checkboxes in the settings menu disappear.
any idea what the problem could be? the mod itself works perfect, but the checkboxes are pretty usefull as well.
thanks in advance :good:
Click to expand...
Click to collapse
What Rom are you running? NJ5? or? The mods are based on NI2. If you are running NJ5 you have to decompile do the mod compile and push back to the phone.
I'm running an ANK5 rom.
but I don't understand how it has anything to do with the checkboxes.
it's pretty frustrating
Sent from my Note 4

added logcat command to .smali method brakes OPSystemUI.apk

Hello everyone, I have recently started doing modifications in the .smali world. I have already successfully modified my first application by converting the .apk to (almost) .java and then analyzing the method I needed to change. Then, going through the .smali code and modifying it there and compiling the .apk again.
This last one was a non-system apk, but I am currently working on a system apk, more explicitly OPSystemUI.apk.
Since it is odexed (.odex), I had to decompile this into a classes.dex and from there to (almost) .java to analyze the code.
Then, after decompiling the .dex to .smali, I found the function from the .java that I wanted to change.
Here is where the problem starts:
The function in .java I am modifying is (com\android\systemui\statusbar\policy\SignalController.class):
Code:
public int getCurrentIconId()
{
if (this.mCurrentState.connected) {
return getIcons().mSbIcons[this.mCurrentState.inetCondition][this.mCurrentState.level];
}
if (this.mCurrentState.enabled) {
return getIcons().mSbDiscState;
}
return getIcons().mSbNullState;
}
This same function in .smali is (SignalController.smali):
Code:
.method public getCurrentIconId()I
.registers 3
.prologue
.line 137
.local p0, "this":Lcom/android/systemui/statusbar/policy/SignalController;, "Lcom/android/systemui/statusbar/policy/SignalController<TT;TI;>;"
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/SignalController;->mCurrentState:Lcom/android/systemui/statusbar/policy/SignalController$State;
iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/SignalController$State;->connected:Z
if-eqz v0, :cond_19
.line 138
invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/SignalController;->getIcons()Lcom/android/systemui/statusbar/policy/SignalController$IconGroup;
move-result-object v0
iget-object v0, v0, Lcom/android/systemui/statusbar/policy/SignalController$IconGroup;->mSbIcons:[[I
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/SignalController;->mCurrentState:Lcom/android/systemui/statusbar/policy/SignalController$State;
iget v1, v1, Lcom/android/systemui/statusbar/policy/SignalController$State;->inetCondition:I
aget-object v0, v0, v1
iget-object v1, p0, Lcom/android/systemui/statusbar/policy/SignalController;->mCurrentState:Lcom/android/systemui/statusbar/policy/SignalController$State;
iget v1, v1, Lcom/android/systemui/statusbar/policy/SignalController$State;->level:I
aget v0, v0, v1
.line 142
:goto_18
return v0
.line 139
:cond_19
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/SignalController;->mCurrentState:Lcom/android/systemui/statusbar/policy/SignalController$State;
iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/SignalController$State;->enabled:Z
if-eqz v0, :cond_26
.line 140
invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/SignalController;->getIcons()Lcom/android/systemui/statusbar/policy/SignalController$IconGroup;
move-result-object v0
iget v0, v0, Lcom/android/systemui/statusbar/policy/SignalController$IconGroup;->mSbDiscState:I
goto :goto_18
.line 142
:cond_26
invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/SignalController;->getIcons()Lcom/android/systemui/statusbar/policy/SignalController$IconGroup;
move-result-object v0
iget v0, v0, Lcom/android/systemui/statusbar/policy/SignalController$IconGroup;->mSbNullState:I
goto :goto_18
.end method
and I modify it by adding a logcat command in the beginning to see when this is executed, so it looks like so:
Code:
.method public getCurrentIconId()I
.registers 3
.prologue
.line 137
.local p0, "this":Lcom/android/systemui/statusbar/policy/SignalController;, "Lcom/android/systemui/statusbar/policy/SignalController<TT;TI;>;"
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/SignalController;->mCurrentState:Lcom/android/systemui/statusbar/policy/SignalController$State;
iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/SignalController$State;->connected:Z
[COLOR="Red"] const-string v3, "getCurrentIconId SIM"
const-string v4, "Beginning of function SIM"
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I[/COLOR]
if-eqz v0, :cond_19
. . .
- If I try to recompile the .apk from this .smali code, without the .odex, it works perfect (so recompiling should not be the problem)
-However, if I add the logcat command, my phone does not execute OPSystemUI properly (the logcat command is just to modify in some way the code and see its result, it shouldn't change the apk behavior, right?)
Is my added code for logcat wrong? Else, what could it be? I am out of ideas
Overall, the final goal is to remove an icon from the statusbar (the NoSIM icon), and this was a start.
Try changing the .registers 3 to .registers 5
ANIKETultimate said:
Try changing the .registers 3 to .registers 5
Click to expand...
Click to collapse
Thanks for the suggestion!
I tried changing it to 5 and it still failed by looping in the keyguard (first encryption after starting the phone)
rauleeros said:
Thanks for the suggestion!
I tried changing it to 5 and it still failed by looping in the keyguard (first encryption after starting the phone)
Click to expand...
Click to collapse
Hmm. Try moving the lines just before the .local p0 line

[GUIDE] Remove high volume warning for headphones

decompile services.jar.
open smali\com\android\server\audio\AudioService.smali.
Goto this method and add blue text:
.method private checkSafeMediaVolume(III)Z
.locals 4
.param p1, "streamType" # I
.param p2, "index" # I
.param p3, "device" # I
.prologue
const/4 v3, 0x3
const/4 v2, 0x0
.line 6263
iget-object v1, p0, Lcom/android/server/audio/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
monitor-enter v1
.line 6264
:try_start_0
iget-object v0, p0, Lcom/android/server/audio/AudioService;->mSafeMediaVolumeState:Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
goto :goto_td
if-ne v0, v3, :cond_0
.line 6265
iget-object v0, p0, Lcom/android/server/audio/AudioService;->mStreamVolumeAlias:[I
aget v0, v0, p1
if-ne v0, v3, :cond_0
.line 6266
and-int/lit16 v0, p3, 0x3fc
if-eqz v0, :cond_0
.line 6267
iget v0, p0, Lcom/android/server/audio/AudioService;->mSafeMediaVolumeIndex:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-le p2, v0, :cond_0
monitor-exit v1
.line 6268
return v2
.line 6270
:goto_td
:cond_0
const/4 v0, 0x1
monitor-exit v1
return v0
.line 6263
:catchall_0
move-exception v0
monitor-exit v1
throw v0
.end method
Click to expand...
Click to collapse
recompile services.jar.
I've been looking for a method to turn off the high volume warning and I thank you for helping solve this... but I have no idea where to even start with this. Where is the service.jar located? And can I use a standard root file explorer to open it?
I tried doing some Google searches but it seems to point me towards windows. Does this have to be done on a computer?
what version are you using? B06, b08.
you need to decompile and modify it.
HallOfPromise said:
I've been looking for a method to turn off the high volume warning and I thank you for helping solve this... but I have no idea where to even start with this. Where is the service.jar located? And can I use a standard root file explorer to open it?
I tried doing some Google searches but it seems to point me towards windows. Does this have to be done on a computer?
Click to expand...
Click to collapse
There's a tutorial made by bkores about decompiling stuff. Just go read it
Or you could just add audio.safemedia.bypass=true to your build.prop
No more volume warnings
I'm on B32.
I'll attempt the build.prop edit. I've done that in the past before. Thanks for the help!
Tebor said:
Or you could just add audio.safemedia.bypass=true to your build.prop
No more volume warnings
Click to expand...
Click to collapse
This indeed worked for me! Super easy, as well. The warning has been bugging me since upgrading to Nougat. My biggest problem was having to hit OK on the warning message while driving, and having to volume back up after every phone restart. I honestly don't like messing with my phone while driving, and it's illegal to simply handle the phone here in California. It has to be mounted in order to mess with it.
since i dont know how to compile java i would like the more easy way too. i did a search with tc on the fon for "build.prop" without hits. how exactly is it done?
drahtwurst said:
since i dont know how to compile java i would like the more easy way too. i did a search with tc on the fon for "build.prop" without hits. how exactly is it done?
Click to expand...
Click to collapse
You need root and the file is in /system/build.prop.
@HallOfPromise,
Too loud music would damage to ear when in headphone, so here is the suggestion: Please turn down the volume when use headphone. The driving-mode idea great, ZTE engineer will take your idea. 
Tebor said:
Or you could just add audio.safemedia.bypass=true to your build.prop
No more volume warnings
Click to expand...
Click to collapse
Works. Thanks.
audio.safemedia.bypass alone doesn't work on UB32 for me. Neither does Xposed Gravitybox's disabler. However they do work when put together. :victory: Thanks
For those not wanting Xposed perhaps experimenting with the bypass combined with this other method may work. https://www.xda-developers.com/how-to-automatically-disable-the-high-volume-warning-without-root/ It doesn't work alone either, I had tried that before.
Quick tip that i've just discovered : Installing Viper4Android (last ver. 2.5.0.4) removed me that (autocensored) warning on my A2017G. And with the good settings, sound is so much better...

Categories

Resources