[Req] Sense GPS Crosshair Removal - Sprint HTC One (M7)

Hey guys! I'm on stock rooted 4.3 sense 5.0 using Xposed framework + Sense 5 toolbox for all the tweaks/mods (awesome btw for anyone unaware) and I've been looking for a way to get rid of the GPS crosshair in the status bar.
I've only had this phone for about a week but I did some searching for something but was unable to come up with anything. The closest I could find was OMJ's mod pack but to enable that feature, it looks like you have enable a couple other things... plus I believe I'm still odexed.
I'd like to stay stock like I am. Is there an easy way to do this, or have I missed something?
Thanks in advance!

Hixman said:
Hey guys! I'm on stock rooted 4.3 sense 5.0 using Xposed framework + Sense 5 toolbox for all the tweaks/mods (awesome btw for anyone unaware) and I've been looking for a way to get rid of the GPS crosshair in the status bar.
I've only had this phone for about a week but I did some searching for something but was unable to come up with anything. The closest I could find was OMJ's mod pack but to enable that feature, it looks like you have enable a couple other things... plus I believe I'm still odexed.
I'd like to stay stock like I am. Is there an easy way to do this, or have I missed something?
Thanks in advance!
Click to expand...
Click to collapse
If you like stock so much then flash the stock deodexed Rom , problem solved
sent from my Sprint HTC ONE using Tapatalk 4

olorolo said:
If you like stock so much then flash the stock deodexed Rom , problem solved
sent from my Sprint HTC ONE using Tapatalk 4
Click to expand...
Click to collapse
Not necessarily. I'd thought of that but, as I said in my previous post, the only mod I'd found that would take care of it is OMJ's mod pack which comes with eqs and something else that I didn't really want.
Thanks for the reply though :laugh: I now feel like I'm being too picky haha! I like my setup but it's the only thing that bothers me having that icon just sitting there for no reason.

Gps removal is a smali mod to SystemUi.apk(not really that hard)
Sent from my HTCONE using Tapatalk

dased14 said:
Gps removal is a smali mod to SystemUi.apk(not really that hard)
Sent from my HTCONE using Tapatalk
Click to expand...
Click to collapse
Please share how to modify it bro because I actually hate it too
Sent from my unknown using Tapatalk

you have to decompile SystemUI.apk and the you have go to smali/com/android/systemui/statusbar/policy/LocationBasedController.small and find this
Code:
method private updateIcon()V
.locals 4
const/4 v1, 0x1
const/4 v2, 0x0
const/4 v0, 0x1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isVerizon()Z
move-result v3
if-eqz v3, :cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-nez v3, :cond_0
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isVerizonLbsEnabled:Z
if-eqz v3, :cond_1
:cond_0
move v0, v2
:goto_0
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->setIconType(I)V
return-void
:cond_1
move v0, v1
goto :goto_0
:cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-eqz v3, :cond_3
move v0, v2
:goto_1
goto :goto_0
:cond_3
move v0, v1
goto :goto_1
.end method
and make it like this
Code:
.method private updateIcon()V
.locals 4
const/4 v0, 0x0
return-void
.end method
then recompile SystemUI.apk(make sure you sign it) and flash or adb push
(i would do it this way.
Code:
adb remount(hit enter)
adb shell stop(hit enter)
adb push<drag newly signed and compiled SystemUI here> /system/app/(hit enter)
adb reboot(hit enter)
then go set permissions(with whatever file explorer you use) to rw-r-r

dased14 said:
you have to decompile SystemUI.apk and the you have go to smali/com/android/systemui/statusbar/policy/LocationBasedController.small and find this
Code:
method private updateIcon()V
.locals 4
const/4 v1, 0x1
const/4 v2, 0x0
const/4 v0, 0x1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isVerizon()Z
move-result v3
if-eqz v3, :cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-nez v3, :cond_0
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isVerizonLbsEnabled:Z
if-eqz v3, :cond_1
:cond_0
move v0, v2
:goto_0
invoke-direct {p0, v0}, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->setIconType(I)V
return-void
:cond_1
move v0, v1
goto :goto_0
:cond_2
iget-boolean v3, p0, Lcom/android/systemui/statusbar/policy/LocationBasedServiceController;->isGpsEnabled:Z
if-eqz v3, :cond_3
move v0, v2
:goto_1
goto :goto_0
:cond_3
move v0, v1
goto :goto_1
.end method
and make it like this
Code:
.method private updateIcon()V
.locals 4
const/4 v0, 0x0
return-void
.end method
then recompile SystemUI.apk(make sure you sign it) and flash or adb push
(i would do it this way.
Code:
adb remount(hit enter)
adb shell stop(hit enter)
adb push<drag newly signed and compiled SystemUI here> /system/app/(hit enter)
adb reboot(hit enter)
then go set permissions(with whatever file explorer you use) to rw-r-r
Click to expand...
Click to collapse
thanks bro it worked! :laugh:

dased14 said:
you have to decompile SystemUI.apk and the you have go to smali/com/android/systemui/statusbar/policy/LocationBasedController.small and find this
Click to expand...
Click to collapse
nice...this is how I did it...
Code:
find:
.method public static isSupported()Z
.locals 1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isSprint()Z
move-result v0
return v0
.end method
change to:
.method public static isSupported()Z
.locals 1
invoke-static {}, Lcom/android/systemui/statusbar/policy/HtcGenericNetworkController;->isSprint()Z
move-result v0
if-eqz v0, :cond_e
:cond_e
const/4 v0, 0x0
return v0
.end method

this xposed module might get rid of it: http://forum.xda-developers.com/showthread.php?t=2353965
its purpose is to fix the data icons, but it also gets rid of the persistent gps icon (on 4.1.2 at least, the 4.3 rom I'm using already has it removed so I haven't checked that on 4.3).

hotaru2k3 said:
this xposed module might get rid of it: http://forum.xda-developers.com/showthread.php?t=2353965
its purpose is to fix the data icons, but it also gets rid of the persistent gps icon (on 4.1.2 at least, the 4.3 rom I'm using already has it removed so I haven't checked that on 4.3).
Click to expand...
Click to collapse
Nice! Confirmed working on 4.3.
Sent from my HTCONE using Tapatalk

Related

[HOW TO] New Power Menu With Screenshot Option {Legacy & MTK Devices}

Hello Everyone,
Here, being on XDA, is like learning new things in a school and getting project homework on daily basis. And Speaking for this, I really like it.
So here is the project that I cleared today morning at around 4.30 AM IST (Indian Standard Time).
But before beginning for project let me THANK few IDOLS of XDA.
@tdunham - You are the master of Power menu Sir. Compared files with your guide. @Adi Aisiteru Reborn - The GOD of MOD & Guides for CM / AOSP / AOKP @ankurbata- For the files I used for comparing.
@Dzol Cp- You are the One brother who taught me these things.
@bombaybadboy-Awesome Thread by You Sir. Got everything working whenever I take help from your thread.
@Goldieking- For helping me in rectifying error.
@Ticklefish- Awesome and Simplest tool for Themers and noobs like me.
@My Wife - My Life's Companion, Dearest Friend, My Love & Encouragement. I love you Sweet-Heart. @Xda Forum- The School for New born Techie child like me.
Before beginning to this guide, please make sure that you followed this guide by tdunham line by line and you failed doing so.
I tried this on my Stock ROMs and Other ported ROMs of My Device forum and got this working.
PART-1​
1st Step:-
Decompile Your framework-res.apk and go to - res/value/strings.xml
add this line at the end.
Code:
<string name="global_action_screenshot_txt">Screenshot</string>
<string name="global_action_recovery_txt">BOND Recovery</string>
And add the png attached in this thread to - res/value/drawable-hdpi/mdpi/xhdpi (any one folder you can choose to add the images as according to your device resolution).
Step-2
Now recompile the framework-res.apk and then again decompile the newly compiled framework-res.apk
Then go to - res/values/public.xml and leave it open.
PART-2
Step-1
Now Decompile your stock "android.policy.jar" and add the attached "android.policy" files to - "android.policy.jar\smali\com\android\internal\policy\impl"
Now open GlobalActions.smali.
and find this lines.
Code:
.field private mRingerModeReceiverRegistered:Z
Just below this line make space for a line just like as its there (One space above the line & One space below)
Then Add these lines
Code:
.field mScreenshotConnection:Landroid/content/ServiceConnection;
.field final mScreenshotLock:Ljava/lang/Object;
.field final mScreenshotTimeout:Ljava/lang/Runnable;
Now find this line
Code:
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneState:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction$State;
Add these line below that.
Code:
.line 315
new-instance v4, Ljava/lang/Object;
invoke-direct {v4}, Ljava/lang/Object;-><init>()V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotLock:Ljava/lang/Object;
.line 317
const/4 v4, 0x0
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
.line 318
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$12;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$12;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
iput-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotTimeout:Ljava/lang/Runnable;
Now Find This line -
Code:
.method static synthetic access$1800(Lcom/android/internal/policy/impl/GlobalActions;)V
.locals 0
.parameter "x0"
.prologue
.line 68
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->handleShow()V
return-void
.end method
And Add the line below end method.
Code:
.method static synthetic access$1900(Lcom/android/internal/policy/impl/GlobalActions;)V
.locals 0
.parameter "x0"
.prologue
.line 64
invoke-direct {p0}, Lcom/android/internal/policy/impl/GlobalActions;->takeScreenshot()V
return-void
.end method
Now find this line
Code:
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$3;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
And add this line below this method and above the line starting with-".line XXX"
Code:
.line 232
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$11;
const v3, 0x1080691 [COLOR=Lime]<-------- This is the ID of "bond_screenshot"[/COLOR]
const v4, 0x1040516 [COLOR=Red] <-------- This is the ID of "global_action_screenshot_txt"[/COLOR]
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$11;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$14;
const v3, 0x1080692[COLOR=Lime] <-------- This is the ID of "bond_recovery"[/COLOR]
const v4, 0x1040517 [COLOR=Red]<-------- This is the ID of "global_action_recovery_txt"[/COLOR]
move-object/from16 v0, p0
invoke-direct {v2, v0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$14;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
Now Find this line--
Code:
# virtual methods
And add this lines just above it with gap of 2(two) Space between "end method" & "Virtual methods"
Code:
.method private takeScreenshot()V
.locals 8
.prologue
.line 330
iget-object v4, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotLock:Ljava/lang/Object;
monitor-enter v4
.line 331
:try_start_0
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
if-eqz v3, :cond_0
.line 332
monitor-exit v4
.line 391
:goto_0
return-void
.line 334
:cond_0
new-instance v0, Landroid/content/ComponentName;
const-string v3, "com.android.systemui"
const-string v5, "com.android.systemui.screenshot.TakeScreenshotService"
invoke-direct {v0, v3, v5}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 336
.local v0, cn:Landroid/content/ComponentName;
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
.line 337
.local v2, intent:Landroid/content/Intent;
invoke-virtual {v2, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 338
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$BondB;
invoke-direct {v1, p0}, Lcom/android/internal/policy/impl/GlobalActions$BondB;-><init>(Lcom/android/internal/policy/impl/GlobalActions;)V
.line 386
.local v1, conn:Landroid/content/ServiceConnection;
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
const/4 v5, 0x1
invoke-virtual {v3, v2, v1, v5}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result v3
if-eqz v3, :cond_1
.line 387
iput-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotConnection:Landroid/content/ServiceConnection;
.line 388
iget-object v3, p0, Lcom/android/internal/policy/impl/GlobalActions;->mHandler:Landroid/os/Handler;
iget-object v5, p0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenshotTimeout:Ljava/lang/Runnable;
const-wide/16 v6, 0x2710
invoke-virtual {v3, v5, v6, v7}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
.line 390
:cond_1
monitor-exit v4
goto :goto_0
.end local v0 #cn:Landroid/content/ComponentName;
.end local v1 #conn:Landroid/content/ServiceConnection;
.end local v2 #intent:Landroid/content/Intent;
:catchall_0
move-exception v3
monitor-exit v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v3
.end method
Few Things to remeber:-
1) The ID's Need to be Same as in public.xml or else boot loop will shake your hands.
2) The register values like - v0,v1,v2.... need to be managed like what it is in your GlobalActions.smali. For the Comparison I have attached My-GlobalActions.smali for comparison.
Just change the extention from zip to smali.
3) I am also human and will be here after my daily life. So please have patience. I will try to get you out of your problem, if and only if you have a adb logcat.
4) If you find any difficulties then post it in the thread.
The Results after successful completion of this will be same as screenshot.
http://dl.xda-developers.com/attach.../7/6/5/2/2/Screenshot_2013-08-09-02-00-21.jpg
Last But Not Least - Don't get bothered to hit thanks. It will not cost you anything but will surely increase my courage to work and try new things.
Awesome Guide My Brother!!
Happy Eid Mubarak to You and rest of your family
Dzol Cp said:
Awesome Guide My Brother!!
Happy Eid Mubarak to You and rest of your family
Click to expand...
Click to collapse
Thanks a lot brother...
Happy EID to you and The whole XDA family of ours brother...
"""Hitting Thanks Don't Cost You Anything So Why Don't You Try Hitting It......."""
Sent From Mind Blowing Canvas Using SUVI-Heart Rom.....<3<3<3
"Happy EID to you all and the whole XDA Family "
Hey, i want to ask something. What is the meaning of line 315 on this ".line315 new-instance v4, Ljava/lang/Object;"? Sorry, just want to know a bit java programming Thanks for your help
i manage to make it bro..sadly after pressing screenshot my phone reboots..but recovery is working just fine..great tut..
BOND1987 said:
Thanks a lot brother...
Happy EID to you and The whole XDA family of ours brother...
"""Hitting Thanks Don't Cost You Anything So Why Don't You Try Hitting It......."""
Sent From Mind Blowing Canvas Using SUVI-Heart Rom.....<3<3<3
Click to expand...
Click to collapse
I did as your followers. click on the menu button to display the power source immediately my phone reboot
Looking forward to your help
vuong95vjpboy said:
I did as your followers. click on the menu button to display the power source immediately my phone reboot
Looking forward to your help
Click to expand...
Click to collapse
Upload you global actions.smali and public.xml of framework....
"" Hitting Thanks Will Not Cost You Anything, So, Why Don't You Try Hitting It Once.....""
Sent While Checking The "AMOI 4.2.2 Beast".....
BOND1987 said:
Upload you global actions.smali and public.xml of framework....
"" Hitting Thanks Will Not Cost You Anything, So, Why Don't You Try Hitting It Once.....""
Sent While Checking The "AMOI 4.2.2 Beast".....
Click to expand...
Click to collapse
Hi sir, my GlobalActions.smali has different with your file, so i dont know put the code in what line
Can you help me? I attach my original GlobalActions.smali, can you mod the code help me? Thanks!
The id in my framework is:
Code:
<public type="drawable" name="bond_recovery" id="0x010805ef" />
<public type="drawable" name="bond_screenshot" id="0x010805f0" />
<public type="string" name="global_action_screenshot_txt" id="0x010404d5" />
<public type="string" name="global_action_recovery_txt" id="0x010404d6" />
My phone was use MTK chipset, ICS 4.0.4. Here is my power menu screenshot
Thanks!
^
^
 @BOND1987 Can you help me sir? Thanks!
sieuan said:
^
^
@BOND1987 Can you help me sir? Thanks!
Click to expand...
Click to collapse
Yes brother,
Of course I'll help you. Yesterday night I corrupted my windows so brother you have to wait for today and tomorrow I'll do this for you.
BOND1987 said:
Yes brother,
Of course I'll help you. Yesterday night I corrupted my windows so brother you have to wait for today and tomorrow I'll do this for you.
Click to expand...
Click to collapse
Thanks sir!
After follow the guide in this thread: http://forum.xda-developers.com/showthread.php?t=2225970, I succes add 3-Way boot to Power Menu, and it work good
Before:
After:
Now, can you help me add screenshot option into Power Menu, sir? Here is my GlobalActions.smali. Thanks!
sieuan said:
Thanks sir!
After follow the guide in this thread: http://forum.xda-developers.com/showthread.php?t=2225970, I succes add 3-Way boot to Power Menu, and it work good
Before:
After:
Now, can you help me add screenshot option into Power Menu, sir? Here is my GlobalActions.smali. Thanks!
Click to expand...
Click to collapse
I absolutely love your set up. What ROM / Theme is that?
babalonius508 said:
I absolutely love your set up. What ROM / Theme is that?
Click to expand...
Click to collapse
A Vietnamese ROM, for a Chinese phone, modify by me with light holo theme, apex launcher and miui v5 icon pack.
That's a very cool setup! Thanks!
I can't seem to open the GlobalActions.smali in the OP for comparison because it says its corrupt? Any one else have this problem?
babalonius508 said:
That's a very cool setup! Thanks!
I can't seem to open the GlobalActions.smali in the OP for comparison because it says its corrupt? Any one else have this problem?
Click to expand...
Click to collapse
Brother,
Change the extension of zip to .Smali.
Or try opening with notepad++ and you will be able to coordinate with the guide as well.
If you get any problems further to this, just let me know by post it in this thread.
BOND1987 said:
Brother,
Change the extension of zip to .Smali.
Or try opening with notepad++ and you will be able to coordinate with the guide as well.
If you get any problems further to this, just let me know by post it in this thread.
Click to expand...
Click to collapse
Thanks a lot man! I missed that part of the instructions. Does this modification work for all devices?
babalonius508 said:
Thanks a lot man! I missed that part of the instructions. Does this modification work for all devices?
Click to expand...
Click to collapse
I think brother,
Other than TouchWiz, it will work on all AOSP based devices. Though I'm not sure for this but you can try. If you are in trouble, just let me know.
BOND1987 said:
I think brother,
Other than TouchWiz, it will work on all AOSP based devices. Though I'm not sure for this but you can try. If you are in trouble, just let me know.
Click to expand...
Click to collapse
Thank you for all your help!
For some reason, after I finish the modification, I hold the power button and my phone just reboots. I'm not sure what I'm doing wrong.
Here is my framework-res.apk: https://db.tt/xy0QGFiH
And my androidpolicy.jar: https://db.tt/IOe6JAkn
And a logcat: https://db.tt/EiN6Qcot
Thank you again!
babalonius508 said:
Thank you for all your help!
For some reason, after I finish the modification, I hold the post menu and my phone just reboots. I'm not sure what I'm doing wrong.
Here is my framework-res.apk: https://db.tt/xy0QGFiH
And my androidpolicy.jar: https://db.tt/IOe6JAkn
And a logcat: https://db.tt/EiN6Qcot
Thank you again!
Click to expand...
Click to collapse
Brother,
Give me 24 hours only to take look on your files. And I will revert you back as soon as possible. Thanks for posting it here. I appreciate your support brothers.
That sounds great! Thank you! I really hope I can get it working.
Sent from my Nexus 4

[MOD]Allow Unknown Sources By Default

After searching months for a way to allow Unknown Sources by default on the HTC One, I've finally discovered where to mod it so I thought I would share for the benefit of the community. Its one of the more convenient mods to have and I thought it would be a great for lazy people like me who want to quickly restore their setup while trying other roms and not have to deal with Blocked install messages lol.
You will need to have apktool or similar tools and decompiling knowledge before attempting this.
Previously you would need to mod SettingsProvider.apk but on Sense 5 that is no longer the case. There are two APK's to look at here. PureC_PackageInstaller and Settings.apk. PureC is the main one you want to look at.
Decompile PureC_PackageInstaller and find this directory in smali folder:
\smali\com\android\packageinstaller\PackageInstallerActivity.smali
open up PackageInstallerActivity.smali and look for this method:
Code:
.method private isInstallingUnknownAppsAllowed()Z
.locals 3
.prologue
const/4 v0, 0x0
.line 261
invoke-virtual {p0}, Lcom/android/packageinstaller/PackageInstallerActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "install_non_market_apps"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-lez v1, :cond_0
const/4 v0, 0x1
:cond_0
return v0
.end method
change
Code:
.locals 3
.prologue
const/4 v0, 0x0
.line 261
to this
Code:
.locals 3
.prologue
const/4 v0, 0x1
.line 261
recompile and you are done
next decompile Settings.apk(optional!)
the only reason to edit this is to give the mod the appearance that Unknown Sources is visibly checked in Settings menu, otherwise the mod still works fine even if it isn't checked.
find this directory:
\smali\com\android\settings\SecuritySettings.smali
locate this method:
Code:
.method private isNonMarketAppsAllowed()Z
.locals 3
const/4 v0, 0x0
invoke-virtual {p0}, Lcom/android/settings/SecuritySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "install_non_market_apps"
invoke-static {v1, v2, v0}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
if-lez v1, :cond_0
const/4 v0, 0x1
:cond_0
return v0
.end method
change the 0x0 to 0x1, and change the 0x1 to 0x0.
recompile and your done.
tested this and working on Sprint HTC One variant, but i'm almost certain this should work on any carrier with version of Sense 5.
also of note: there is a small glitch to this mod while toggling the checkbox on and off. it'll recheck itself if you turn it off and come back to the options screen again. Plus, I turned off the disabled function completely as a temporary solution because there was another glitch where you couldn't install apps while it was checked on if you messed around trying to turn it off, but why would you want to? lol
You can also just edit the default.xml in customize
<item name="def_install_non_market_apps">1</item>
Sent from my HTCONE using Tapatalk 2
is there any way to do this in android10 ?

[Mod][How To] Disable the Harman Kardon icon

I decided i'd post this as its own to make it easier to find an search
(mods can move or delete this thread as needed)
So much like the Boomsound icon, HTC treats the HK icon like the Beats icon, so that's the key to turning it off.
what you'll need:
APKTOOL (i'm not going to spend time on how to decompile and all that)
Text editor of some sort, I love me some Notepad ++
Deodex'd rom
Grab the Framework.jar from your rom and decompile it, then open your smali folder and navigate to
smali\android\media\AudioService$HarmanManager.smali
look for the following:
Code:
method public onMessageBeatsNotify()V
.locals 7
const/4 v1, 0x1
const/4 v4, 0x0
iget-object v5, p0, Landroid/media/AudioService$HarmanManager;->mLock:Ljava/lang/Object;
monitor-enter v5
:try_start_0
iget v6, p0, Landroid/media/AudioService$HarmanManager;->mSignalDoctorEnabled:I
if-ne v6, v1, :cond_0
move v2, v1
:goto_0
iget v6, p0, Landroid/media/AudioService$HarmanManager;->mCurrentSoundEffect:I
if-eqz v6, :cond_1
:goto_1
monitor-exit v5
Change to:
const/4 v1, 0x0
Should look like this:
Code:
method public onMessageBeatsNotify()V
.locals 7
const/4 v1, 0x0
const/4 v4, 0x0
iget-object v5, p0, Landroid/media/AudioService$HarmanManager;->mLock:Ljava/lang/Object;
monitor-enter v5
:try_start_0
iget v6, p0, Landroid/media/AudioService$HarmanManager;->mSignalDoctorEnabled:I
if-ne v6, v1, :cond_0
move v2, v1
:goto_0
iget v6, p0, Landroid/media/AudioService$HarmanManager;->mCurrentSoundEffect:I
if-eqz v6, :cond_1
:goto_1
monitor-exit v5
recompile, sign, and either push or flash it how you please.
Devs and Chef's if this helped feel free to include it in your roms, and credit as you see fit (we'd def appreciate it though)

[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]

[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]
How to permenantly remove SysScope from your Samsung Touchwiz ROM​
Tired of the constant custom padlock on startup? Want permenant device status "Official"?​
Team Blackout and KoolKit ROMs are not responsible if you blow up your house, your dog eats your homework,
the zombie apacolypse, your wife/husband divorcing you or if your device turns into an unrecognizable
smoldering pile of plastic. by reading this you agree to take all responsibility for any damage you do to the
universe, your device, your marriage or your failing grades in school or college.
Click to expand...
Click to collapse
This guide and mod originated in the Galaxy S4 threads and was created by @Aou who has since left the AT&T world so development
stopped at that point, I have taken the code and modded it slightly to work for our S5 devices (All variants even the Active)
Click to expand...
Click to collapse
All devs are free to use this MOD with proper recognition in your OP make sure you provide a mention to "Aou" for the
original code found here Removing SysScope - Permanent "Official" Device Status
and myself for the re-write of the instructions and changes to make this work for our devices.
Click to expand...
Click to collapse
NOTICE:
This MOD is not for the squeamish or novice modder it requires patience and a good amount of time to complete.
Click to expand...
Click to collapse
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/priv-app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
INSTALL:
Install! Use "adb shell" to begin, and use the following commands, one at a time:
rm /system/app/SysScope.apk
rm -r /data/dalvik-cache/*
push SecSettings.apk /system/priv-app/SecSettings.apk
chmod 0644 /system/priv-app/SecSettings.apk
reboot
Click to expand...
Click to collapse
reserved
reserved
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
GDofWR420 said:
Nice. People with o.c.d. are gonna love this. Nice work.
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
cstayton said:
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
Click to expand...
Click to collapse
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
eric-filth said:
Here is not working
The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?
or change this
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
for this
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
const v1, 0x7f0901a6
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
?
Click to expand...
Click to collapse
you need to change the whole method out the lines with the ID are what you need to look up in your build to match to the appropriate status response.
GDofWR420 said:
Lol. Yea no coffee this morning but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.
Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:
The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
Click to expand...
Click to collapse
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
cstayton said:
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
Click to expand...
Click to collapse
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
GDofWR420 said:
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.
Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
Click to expand...
Click to collapse
hmmmm, i wonder if it has an entry in csc that it couldnt handle because its locked down? I might have to re-think the whole "xPosed-Proof" feature mod.
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
{
"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"
}
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
cstayton said:
How to permenantly remove SysScope from your Samsung Touchwiz ROM​
Tired of the constant custom padlock on startup? Want permenant device status "Official"?​
NOTICE:
Prerequisites:
You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.
Main Instructions:
1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)
2. Pull a copy of the SecSettings.apk
adb pull /system/app/SecSettings.apk
3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)
4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.
REMOVE:
Code:
.field private isSysScopeStatus:I
REMOVE:
Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 264
new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
REMOVE:
Code:
.line 216
const/4 v0, -0x1
iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
REMOVE:
Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 102
iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
return p1
.end method
.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
.registers 1
.parameter "x0"
.prologue
.line 102
invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
return-void
.end method
REMOVE:
Code:
.line 687
iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
REMOVE:
Code:
.line 657
iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
new-instance v2, Landroid/content/IntentFilter;
const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.
Code:
.line 952
const v1, 0x7f0901a7
TO:
Code:
.line 952
const v1, [B]0x7f0901a5[/B]
CHANGE:
Code:
.method private changeSysScopeStatus()V
.registers 8
.prologue
const-wide/16 v3, 0x3e8
const v6, 0x7f0901a7
const/4 v5, -0x1
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 958
invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
move-result-wide v0
div-long/2addr v0, v3
.line 959
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v0
div-long/2addr v0, v3
.line 961
const-wide/16 v3, 0x0
cmp-long v3, v0, v3
if-nez v3, :cond_1e
.line 962
const-wide/16 v0, 0x1
.line 965
:cond_1e
iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v3, v5, :cond_30
const-wide/16 v3, 0x78
cmp-long v0, v0, v3
if-lez v0, :cond_30
.line 966
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
:goto_2c
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.line 968
:cond_30
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
const/4 v1, 0x2
if-ne v0, v1, :cond_3a
.line 969
invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 970
:cond_3a
iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
if-ne v0, v5, :cond_46
.line 971
const v0, 0x7f09013f
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.line 973
:cond_46
const v0, 0x7f09013d
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_2c
.end method
TO:
Code:
.method private changeSysScopeStatus()V
.registers 4
.prologue
[B]const v1, 0x7f0901a6[/B]
.line 956
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v2
.line 966
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v0
.line 977
invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
.line 978
return-void
.end method
INSTALL:
Click to expand...
Click to collapse
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
from the error looks as if you are trying to decompile with the wrong frameworks youll need to make sure the framework-res.apk and twframework-res.apk are the ones unmodded stock ones from your rom base
elliwigy said:
try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling
Sent from my SM-G900V using XDA Free mobile app
---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------
hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?
Sent from my SM-G900V using XDA Free mobile app
Click to expand...
Click to collapse
once you have the mod completed yes, remove sysscope.apk and place modded secsettings in rom base and flash
ok...can you take a look at these? I get about half way through your guide and then it gets lost. I don't know if the info just isnt there or what?
Thanks!
deduction said:
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.
However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?
EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.
EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?
EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.
Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.
Click to expand...
Click to collapse
your not looking sysscope your actually looking for " <public type="string" name="sysscope_normal" you have to be specific in the search
am having trouble getting dropbox or anywhere to work. Here is the untouched status.smali.
Thanks very much...I keep getting stumped because the edits I need to make just don't seem to be there when I decompile the apk. Not sure why.
small change in OP
small change in OP
Delete: /smali/com/android/settings/deviceinfo/status$2.smali
re-compile SecSettings.apk
Hello.thanks man. Working great on my 5.1.1 Samsung note edge ROM..
regards
@cstayton
"<public type="string" name="sysscope_tampered" id="0x7f0a01be" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0a01bd" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0a01bc" />"
Those are my public values.
Im having trouble with the last Change. I have changed and removed everything else, could you help me with the last step? Im not sure what needs to be changed. My smali.status should be attached. any help is appreciated. thank you

How to bypass this root check file?

I found out the root check file, but i don't know how to exactly bypass it.
Code:
.class public Lcom/square_enix/Android_dqmsuperlight/RootCheck;
.super Ljava/lang/Object;
# static fields
.field private static final NONCE_SALT:Ljava/lang/String; = "wSrSeYbnhe"
.field private static final mRandom:Ljava/util/Random;
.field private static rootCheckStatus:I
.field private static sContext:Landroid/content/Context;
# direct methods
.method static constructor <clinit>()V
.locals 1
invoke-static {}, Lcom/square_enix/Android_dqmsuperlight/Monsters;->getContext()Landroid/content/Context;
move-result-object v0
sput-object v0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->sContext:Landroid/content/Context;
const/4 v0, -0x1
sput v0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->rootCheckStatus:I
new-instance v0, Ljava/security/SecureRandom;
invoke-direct {v0}, Ljava/security/SecureRandom;-><init>()V
sput-object v0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->mRandom:Ljava/util/Random;
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static checkRooted(Landroid/content/Context;)V
.locals 0
invoke-static {}, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->isRoot()Z
move-result p0
if-eqz p0, :cond_0
const/4 p0, 0x1
:goto_0
sput p0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->rootCheckStatus:I
return-void
:cond_0
const/4 p0, 0x0
goto :goto_0
.end method
.method private static getRequestNonce(Ljava/lang/String;)[B
.locals 3
new-instance v0, Ljava/io/ByteArrayOutputStream;
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
sget v1, Landroid/support/v4/media/session/MediaControllerCompat$MediaControllerImplApi21$ExtraBinderRequestResultReceiver0;->F:I
new-array v1, v1, [B
sget-object v2, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->mRandom:Ljava/util/Random;
invoke-virtual {v2, v1}, Ljava/util/Random;->nextBytes([B)V
:try_start_0
invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->write([B)V
invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B
move-result-object p0
invoke-virtual {v0, p0}, Ljava/io/ByteArrayOutputStream;->write([B)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object p0
return-object p0
:catch_0
const/4 p0, 0x0
return-object p0
.end method
.method public static getRootCheckStatus()I
.locals 1
sget v0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->rootCheckStatus:I
return v0
.end method
.method public static getSensorCount()I
.locals 2
sget-object v0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->sContext:Landroid/content/Context;
const-string v1, "sensor"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/hardware/SensorManager;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/hardware/SensorManager;->getSensorList(I)Ljava/util/List;
move-result-object v0
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
return v0
.end method
.method public static getSensorInfo()Z
.locals 5
sget-object v0, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->sContext:Landroid/content/Context;
const-string v1, "sensor"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/hardware/SensorManager;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/hardware/SensorManager;->getSensorList(I)Ljava/util/List;
move-result-object v0
const-string v2, "ERR"
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v3
const/4 v4, 0x0
if-lez v3, :cond_0
invoke-interface {v0, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/hardware/Sensor;
invoke-virtual {v0}, Landroid/hardware/Sensor;->getName()Ljava/lang/String;
move-result-object v2
:cond_0
const-string v0, "ERR"
invoke-virtual {v2, v0}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
move-result v0
if-eqz v0, :cond_1
return v1
:cond_1
return v4
.end method
.method public static final isAndroidEmulator()Z
.locals 3
sget-object v0, Landroid/os/Build;->PRODUCT:Ljava/lang/String;
const/4 v1, 0x0
if-eqz v0, :cond_1
const-string v2, "sdk"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_0
const-string v2, "_sdk"
invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_0
const-string v2, "sdk_"
invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
const/4 v1, 0x1
:cond_1
return v1
.end method
.method public static isRoot()Z
.locals 4
const/4 v0, 0x1
:try_start_0
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v1
const-string v2, "su"
invoke-virtual {v1, v2}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Process;->destroy()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
return v0
:catch_0
const/4 v1, 0x0
:try_start_1
sget-object v2, Lcom/square_enix/Android_dqmsuperlight/RootCheck;->sContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v2
const-string v3, "com.noshufou.android.su"
invoke-virtual {v2, v3, v1}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
:try_end_1
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
return v0
:catch_1
return v1
.end method
What do you mean "bypass"? If you're root, what's the issue?
Sent from my SM-A605FN using Tapatalk
pr1jker said:
What do you mean "bypass"? If you're root, what's the issue?
Sent from my SM-A605FN using Tapatalk
Click to expand...
Click to collapse
This app detected my magisk then istantly closed. It working normally after i uninstalled magisk.
All you need to hide Magisk can be found here:
https://didgeridoohan.com/magisk/MagiskHide#hn_Hiding_root_from_apps
The current Canary release (20004/252) is extremely difficult to detect. Should soon find it's way to a stable release.
Didgeridoohan said:
All you need to hide Magisk can be found here:
The current Canary release (20004/252) is extremely difficult to detect. Should soon find it's way to a stable release.
Click to expand...
Click to collapse
I tried but still not working. I am waiting for someone can give me advice after read those codes.
cless2004 said:
I tried but still not working. I am waiting for someone can give me advice after read those codes.
Click to expand...
Click to collapse
From a quick look it doesn't look like there's much in there to analyze... It seems to be looking for su and an ancient superuser app. Doesn't seem like something that should be able to bypass MagiskHide. But, there might of course be more to it then what we can see here.
What app is it you're trying to hide from anyway, and when does it detect root? And what exactly is it that you have tried (that doesn't work)?
Didgeridoohan said:
From a quick look it doesn't look like there's much in there to analyze... It seems to be looking for su and an ancient superuser app. Doesn't seem like something that should be able to bypass MagiskHide. But, there might of course be more to it then what we can see here.
What app is it you're trying to hide from anyway, and when does it detect root? And what exactly is it that you have tried (that doesn't work)?
Click to expand...
Click to collapse
"Dragon Quest Monsters: Super Light" version 6.0.4
It detect root from startup, closed istantly.
I tried "Magisk Hide list", "Hide Magisk Manger", "MagiskHide Props Config".
It work when i uninstall magisk but keep renamed magisk manager.
But when i keep magisk and uninstall magisk manager it still not work.
Code:
const-string v2, "su"
invoke-virtual {v1, v2}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
Is this code assert root by execute "su" command? How can i hide root from it?
cless2004 said:
Code:
const-string v2, "su"
invoke-virtual {v1, v2}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
Is this code assert root by execute "su" command? How can i hide root from it?
Click to expand...
Click to collapse
If you've added the app to the Hide list it can't execute su, unless MagiskHide isn't actually working on your device.
Didgeridoohan said:
If you've added the app to the Hide list it can't execute su, unless MagiskHide isn't actually working on your device.
Click to expand...
Click to collapse
App already added to the list, MagiskHide is working normally with other apps, only this doesn't.
If you're not on the Canary build, try that. Other than that, there's not much more I can add (can't test myself since it's not available).
App can be download from here DQMSL.
Waiting for help :crying:.
No issues. Magisk can hide itself from that app just fine (tested on Android Pie, Magisk Canary 20004 with hidden Manager 252).
I suggest you go back to the guide I linked you and try again.
Didgeridoohan said:
No issues. Magisk can hide itself from that app just fine (tested on Android Pie, Magisk Canary 20004 with hidden Manager 252).
I suggest you go back to the guide I linked you and try again.
Click to expand...
Click to collapse
Thanks for testing, let me try again.
Finally i solved the problem by flash another ROM. It is weird that MagiskHide works fine with other apps except this one.
Thank you for your answer @Didgeridoohan.
cless2004 said:
Finally i solve the problem by flashing another ROM. It is weird that MagiskHide works fine with other apps except this one.
Thank you for your answer @Didgeridoohan.
Click to expand...
Click to collapse
Magiskhide works fine, but if you had to change the ROM to get the app to work that could mean that it was something specific about your ROM that was triggering the app (example). Nothing MagiskHide can do about that...
I just found out this app will also detect data encryption. I try to flash ROM after format data partition, then the app can only run a few seconds and auto closed.
You mean that it won't run in a device without encryption?
When I tested it was on a device without encryption, so that doesn't seem to be any worries either...
Didgeridoohan said:
You mean that it won't run in a device without encryption?
When I tested it was on a device without encryption, so that doesn't seem to be any worries either...
Click to expand...
Click to collapse
Yes, here is what i did.
1: fastboot flash stock ROM -> flash OrangeFox -> format data partition by OrangeFox -> flash custom ROM -> app can only run a few seconds
2: fastboot flash stock ROM -> flash OrangeFox -> flash custom ROM -> app run normally

Categories

Resources