[MOD][HOW-TO] Fully disable app verification (FOR USER APPS) - Sprint Samsung Galaxy S III

Now there are guides out there that will disable signature checking (such as THIS one)
But no guides (as far as I know) show you how to FULLY disable signature checking...including for user apps that have been modified and so had their original signatures broken
Here I will show you how to do just that :good:
Let's get started.
You will need the following:
core.jar from your rom (use core-libart.jar if you are on Lollipop)
services.jar
apktool/baksmali+smali
Click to expand...
Click to collapse
[SIZE=+1]Part 1: Allows installing apps with broken/mismatched signatures [/SIZE]
[SIZE=+1]Modding core.jar (or core-libart.jar if on Lollipop)[/SIZE]
Decompile core.jar and navigate to java/security
Open MessageDigest.smali and find the following method
Code:
.method public static isEqual([B[B)Z
At the beginning you will find code like this:
Code:
const/4 v1, [color=red]0x0[/color]
array-length v2, p0
Change the 0x0 to 0x1 so that it becomes
Code:
const/4 v1, [color=blue]0x1[/color]
array-length v2, p0
Now save and close MessageDigest.smali
In the same directory, open Signature.smali
Find the method
Code:
.method public final verify([B)Z
Find this code at the very end of the method:
Code:
invoke-virtual {p0, p1}, Ljava/security/SignatureSpi;->engineVerify([B)Z
[color=red]move-result v0[/color]
return v0
Change the move-result v0 to the following:
Code:
invoke-virtual {p0, p1}, Ljava/security/SignatureSpi;->engineVerify([B)Z
[color=blue]const/4 v0, 0x1[/color]
return v0
Now find the method
Code:
.method public final verify([BII)Z
Scroll to the end of the method and find this code:
Code:
invoke-virtual {p0, p1, p2, p3}, Ljava/security/SignatureSpi;->engineVerify([BII)Z
[color=red]move-result v0[/color]
return v0
And replace it with this:
Code:
invoke-virtual {p0, p1, p2, p3}, Ljava/security/SignatureSpi;->engineVerify([BII)Z
[color=blue]const/4 v0, 0x1[/color]
return v0
Now save and close Signature.smali
Recompile core.jar (core-libart.jar for Lollipop)
Click to expand...
Click to collapse
[SIZE=+1]Now move on to step 2[/SIZE]

[SIZE=+1]Part 2: Allows installing older versions on top of newer versions[/SIZE]
[SIZE=+1]Modding services.jar[/SIZE]
Decompile services.jar and navigate to com\android\server\pm
Open PackageManagerService$InstallParams.smali and find the following method
Code:
.method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;I)I
Scroll down until you find code that looks like the following
Code:
if-nez v7, :cond_1
iget v7, p1, Landroid/content/pm/PackageInfoLite;->versionCode:I
iget v8, v3, Landroid/content/pm/PackageParser$Package;->mVersionCode:I
[color=red]if-ge v7, v8, :cond_1[/color]
const-string v4, "PackageManager"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;->()V
const-string v7, "Can\'t install update of "
And change the highlighted part above to this (register numbers may vary, but just make sure that you change it to if-ge vXX, vXX)
Code:
if-nez v7, :cond_1
iget v7, p1, Landroid/content/pm/PackageInfoLite;->versionCode:I
iget v8, v3, Landroid/content/pm/PackageParser$Package;->mVersionCode:I
[color=blue]if-ge v8, v8, :cond_1[/color]
const-string v4, "PackageManager"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;->()V
const-string v7, "Can\'t install update of "
Recompile services.jar. This is conjunction with disabling signature checking in services.jar (shown here for example) allows you to FULLY disable ALL app verification. Mod away :victory:
Click to expand...
Click to collapse
[SIZE=+1]Note that this mod also lets you install unsigned versions over other current versions, as well as installing older versions on top of newer versions of an app[/SIZE]

Nice man!!!
Thanks,
Chaz187
Sent from my SPH-L900 using Xparent UIS Tapatalk

A1 dude thanks
Sent from my One using Xparent Red Tapatalk 2

{
"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"
}

Nice. Did your brain explode today from all the genius it possessed? Lol. May give this a try tomorrow. Hangouts update killed me...
[email protected]'$ [email protected]@XY- eliminate white backgrounds and any form of ics/holo blue.

Cnex, you sir, are just awesome!!!!!
Dude you rock man!
Thanks so much for this.

Very nice sir
Sent from my SCH-I545 using Xparent BlueTapatalk 2

Epic guide
Sent from my One X using Tapatalk

Mod updated...accidentally left out the second part :silly:
@tdunham @Chad The Pathfinder...if you guys have already implemented, sorry but add the second part

CNexus said:
Mod updated...accidentally left out the second part :silly:
@tdunham @Chad The Pathfinder...if you guys have already implemented, sorry but add the second part
Click to expand...
Click to collapse
2 parts? This is getting out of hand. Lol
[email protected]'$ [email protected]@XY- eliminate white backgrounds and any form of ics/holo blue.

Thebear j koss said:
2 parts? This is getting out of hand. Lol
[email protected]'$ [email protected]@XY- eliminate white backgrounds and any form of ics/holo blue.
Click to expand...
Click to collapse
Lol but it's an easy edit
This is it though :thumbup:

Thebear j koss said:
2 parts? This is getting out of hand. Lol
[email protected]'$ [email protected]@XY- eliminate white backgrounds and any form of ics/holo blue.
Click to expand...
Click to collapse
my head is ready to explode lol

Thanks a ton, and thanks for the help Cnexus. Works as described.

Great mod man, this is actually pretty great!

Any way to make a flashable zip?
Md4 Rooted Modded....... Flawless

Robalboa said:
Any way to make a flashable zip?
Md4 Rooted Modded....... Flawless
Click to expand...
Click to collapse
Impossible as every ROM has different jar file mods.
[email protected]'$ [email protected]@XY- eliminate white backgrounds and any form of ics/holo blue.

Just updated to TW 4.4.2 and am wondering if this method would help with Google Play Services not playing nicely with some of my TBO themed apps?
Sent from my SPH-L710 using XDA Premium 4 mobile app

marcran75 said:
Just updated to TW 4.4.2 and am wondering if this method would help with Google Play Services not playing nicely with some of my TBO themed apps?
Sent from my SPH-L710 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Nope. It's caused by something in Google itself. Signatures are an easy fix as most of the time original signatures are used. The problem lies between gmail and the new updated Google settings.
[email protected]'$ [email protected]@XY- eliminate white backgrounds and any form of ics/holo blue.

CNexus said:
Mod updated...accidentally left out the second part :silly:
@tdunham @Chad The Pathfinder...if you guys have already implemented, sorry but add the second part
Click to expand...
Click to collapse
Hello Sir i have a problem with lewa rom.
When i try this method http://forum.xda-developers.com/showthread.php?t=1698352
my phone starts to bootloop and as you mentioned in the second part there is no such code that matches in the method
Here is the method
Code:
.method private installLocationPolicy(Landroid/content/pm/PackageInfoLite;I)I
.locals 8
.parameter "pkgLite"
.parameter "flags"
.prologue
const/4 v5, 0x2
const/4 v4, 0x1
.line 5949
iget-object v2, p1, Landroid/content/pm/PackageInfoLite;->packageName:Ljava/lang/String;
.line 5950
.local v2, packageName:Ljava/lang/String;
iget v0, p1, Landroid/content/pm/PackageInfoLite;->installLocation:I
.line 5951
.local v0, installLocation:I
and-int/lit8 v6, p2, 0x8
if-eqz v6, :cond_34
move v1, v4
.line 5953
.local v1, onSd:Z
:goto_b
iget-object v6, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->this$0:Lcom/android/server/pm/PackageManagerService;
iget-object v6, v6, Lcom/android/server/pm/PackageManagerService;->mPackages:Ljava/util/HashMap;
monitor-enter v6
.line 5954
:try_start_10
iget-object v7, p0, Lcom/android/server/pm/PackageManagerService$InstallParams;->this$0:Lcom/android/server/pm/PackageManagerService;
iget-object v7, v7, Lcom/android/server/pm/PackageManagerService;->mPackages:Ljava/util/HashMap;
invoke-virtual {v7, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
check-cast v3, Landroid/content/pm/PackageParser$Package;
.line 5955
.local v3, pkg:Landroid/content/pm/PackageParser$Package;
if-eqz v3, :cond_46
.line 5956
and-int/lit8 v7, p2, 0x2
if-eqz v7, :cond_56
.line 5958
iget-object v7, v3, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
iget v7, v7, Landroid/content/pm/ApplicationInfo;->flags:I
and-int/lit8 v7, v7, 0x1
if-eqz v7, :cond_3b
.line 5959
if-eqz v1, :cond_36
.line 5960
const-string v4, "PackageManager"
const-string v5, "Cannot install update to system app on sdcard"
invoke-static {v4, v5}, Landroid/util/Slog;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 5961
const/4 v4, -0x3
monitor-exit v6
.line 5994
:goto_33
return v4
.line 5951
.end local v1 #onSd:Z
.end local v3 #pkg:Landroid/content/pm/PackageParser$Package;
:cond_34
const/4 v1, 0x0
goto :goto_b
.line 5963
.restart local v1 #onSd:Z
.restart local v3 #pkg:Landroid/content/pm/PackageParser$Package;
:cond_36
monitor-exit v6
goto :goto_33
.line 5988
.end local v3 #pkg:Landroid/content/pm/PackageParser$Package;
:catchall_38
move-exception v4
monitor-exit v6
:try_end_3a
.catchall {:try_start_10 .. :try_end_3a} :catchall_38
throw v4
.line 5965
.restart local v3 #pkg:Landroid/content/pm/PackageParser$Package;
:cond_3b
if-eqz v1, :cond_40
.line 5967
:try_start_3d
monitor-exit v6
move v4, v5
goto :goto_33
.line 5970
:cond_40
if-ne v0, v4, :cond_44
.line 5972
monitor-exit v6
goto :goto_33
.line 5973
:cond_44
if-ne v0, v5, :cond_4b
.line 5988
:cond_46
monitor-exit v6
.line 5991
if-eqz v1, :cond_59
move v4, v5
.line 5992
goto :goto_33
.line 5977
:cond_4b
#calls: Lcom/android/server/pm/PackageManagerService;->isExternal(Landroid/content/pm/PackageParser$Package;)Z
invoke-static {v3}, Lcom/android/server/pm/PackageManagerService;->access$2000(Landroid/content/pm/PackageParser$Package;)Z
move-result v7
if-eqz v7, :cond_54
.line 5978
monitor-exit v6
move v4, v5
goto :goto_33
.line 5980
:cond_54
monitor-exit v6
goto :goto_33
.line 5985
:cond_56
const/4 v4, -0x4
monitor-exit v6
:try_end_58
.catchall {:try_start_3d .. :try_end_58} :catchall_38
goto :goto_33
.line 5994
:cond_59
iget v4, p1, Landroid/content/pm/PackageInfoLite;->recommendedInstallLocation:I
goto :goto_33
.end method
I dont know how to take logcat when phone is bootlooping so i am sorry for that but i hope that you can help me.

Related

[Guide] Add toggle settings to hide clock/AM/PM

{
"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"
}
****** For ICS 4.0.4, the code has changed a bit. Instead of changing the original tutorial, I'm providing a known working patch I did for an i9100 XWLPT build ******
(there's also a 2nd patch below to ignore regular swipe actions while using AOSP lockscreen)
https://github.com/shoman94/SHOstock2-XWLPT/commit/523075aac1730883a14e365e29c58eb8cce03248
https://github.com/shoman94/SHOstock2-XWLPT/commit/a55fb9b42a5f3f0c0c840c72e68372ab6a199cc2
This tutorial will be a bit involved, you've been warned! It was more of a learning experience, so here are the things you will see:
1. Add toggle settings via xml
2. Add global settings that are retained
3. Add code support for your toggles
4. Have your toggles be smart, and enable/disable other related toggles
5. Add a debug message using Slog, this is invaluable for any project!
Based on 4.0.3 LP3 base..Adjust resource IDs (bolded) for your base!!
--------------------------------------------------------------------------
Step 1. Adding the toggles to Settings/Date & Time (the easy part)
Decompile Settings.apk, modify the following:
public.xml, add:
Code:
<public type="string" name="disable_ampm" id="[b]0x7f0b0923[/b]" />
<public type="string" name="disable_ampm_text" id="[b]0x7f0b0924[/b]" />
<public type="string" name="disable_time" id="[b]0x7f0b0925[/b]" />
<public type="string" name="disable_time_text" id="[b]0x7f0b0926[/b]" />
strings.xml, add:
Code:
<string name="disable_time">Hide Time</string>
<string name="disable_time_text">Remove time from status bar</string>
<string name="disable_ampm">Hide AM/PM</string>
<string name="disable_ampm_text">Remove AM/PM from time in status bar</string>
xml/date_time_prefs.xml, add:
Code:
<CheckBoxPreference android:title="@string/disable_time" android:key="hide_time" android:summary="@string/disable_time_text" />
<CheckBoxPreference android:title="@string/disable_ampm" android:key="hide_ampm" android:summary="@string/disable_ampm_text" />
Compile settings.apk, u/l and reboot. Make sure the toggles are added!
Step 2. Adding code for the settings (the not so easy part). This code gets a bit involved since we have to handle the new settings, and also add 'toggle logic' for different combinations to enable/disable them.
Still in settings.apk, DateTimeSettings.smali:
At top, add:
Code:
.field private mHideTime:Landroid/preference/Preference;
.field private mHideAmPm:Landroid/preference/Preference;
Then in the '.method private initUI()V', find 'return-void' and add this code above it:
Code:
const-string v6, "hide_time"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
const-string v6, "hide_ampm"
invoke-virtual {p0, v6}, Lcom/android/settings/DateTimeSettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v6
check-cast v6, Landroid/preference/Preference;
iput-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :no_disablebtns
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:no_disablebtns
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
if-eqz v0, :no_disableampm
const/4 v0, 0x0
iget-object v6, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v6, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:no_disableampm
Now search for '.method public onPreferenceTreeClick' and on the line below, change .locals 2 to:
Code:
.locals 6
Now search for:
:cond_2
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
if-ne p2, v0, :cond_0
change the last line to:
Code:
if-ne p2, v0, :cond_new
About 10 lines below that, you will see 'invoke-direct {p0, v0}, Lcom/android/settings/DateTimeSettings;->set24Hour(Z)V', add this below that line:
Code:
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-nez v0, :cond_hideampm
const/4 v0, 0x1
goto :set_ampm
:cond_hideampm
const/4 v0, 0x0
:set_ampm
invoke-virtual {v1, v0}, Landroid/preference/Preference;->setEnabled(Z)V
:cond_updatetime
Then search for 'goto :goto_0' about 10 lines below and add this before '.end method':
Code:
:cond_new
const-string v3, "hide_ampm"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
if-ne p2, v0, :cond_new2
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
:save_ampm
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_ampm"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto :cond_updatetime
:cond_new2
const-string v3, "hide_time"
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
if-ne p2, v0, :goto_0
iget-object v0, p0, Lcom/android/settings/DateTimeSettings;->mHideTime:Landroid/preference/Preference;
check-cast v0, Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v2
:save_time
invoke-virtual {p0}, Lcom/android/settings/DateTimeSettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "hide_time"
invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
if-nez v2, :cond_hidebtns
const/4 v2, 0x1
goto :cond_setbtns
:cond_hidebtns
const/4 v2, 0x0
:cond_setbtns
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mHideAmPm:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
iget-object v1, p0, Lcom/android/settings/DateTimeSettings;->mTime24Pref:Landroid/preference/Preference;
invoke-virtual {v1, v2}, Landroid/preference/Preference;->setEnabled(Z)V
goto :cond_updatetime
And that's it for Settings! Recompile and upload and check everything looks right in Settings/Date and Time and the toggles work.
Step 3. Modifying the clock code to handle new changes (kinda easy =)
Decompile SystemUI and open Clock.smali.
Search for the following in func getSmallTime:
.local v3, context:Landroid/content/Context;
invoke-static {v3}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/ContextZ
Then add this code BEFORE the invoke-static .. line above (NOTE: there's a constant below that refers to the clock resource in public.xml [<public type="id" name="clock" id="0x7f0e0027" />], be sure it matches!):
Code:
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v7, "hide_time"
const/4 v0, 0x0
invoke-static {v2, v7, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
const/4 v0, 0x0
if-eqz v7, :cond_nohide
const/16 v0, 0x8
:cond_nohide
const v1, [b]0x7f0e0027[/b]
invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
About 20 lines below that, you will see:
.local v1, MAGIC2:C
invoke-virtual {v3, v5}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v4
Add this directly after:
Code:
if-nez v2, :cond_continue
invoke-virtual {v3}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_ampm"
const/4 v0, 0x0
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v7
########### Start of debug msg, can be removed #######
const-string v0, "ampm"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "getint returned="
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I
########### End of debug msg ###########
move v2, v7
if-eqz v2, :cond_continue
const-string v4, "h:mm"
:cond_continue
That's it for Clock.smali.
Step 4. Almost there, now we just have to make one more change to SystemUI in PhoneStatusBar.smali.
Find '.method public showClock' and change .locals 2 to:
Code:
.locals 3
Find:
if-eqz p1, :cond_1
const/4 v0, 0x0
and insert this code after it:
Code:
iget-object v2, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_time"
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, :goto_0
const/16 v0, 0x8
Recompile SystemUI and reboot. Now try out the new feature =)
Excellent.... built into my rom. Thanks !
...or just use 24h format which is shorter and more natural
sorg said:
...or just use 24h format which is shorter and more natural
Click to expand...
Click to collapse
Ummm You can use this to remove the clock completely....
I just updated to OP to include Step 4. I didn't realize the lock screen was interfering with the feature since I don't use one..Fixed now.
Building into mine as well, tonight if I don't fall asleep.
And a few moments of disagreeing with smali, got it going...thanks a bunch Jeboo!
nice, welldone!
but it s better to leave public.xml, add only the others xml and recompile once.
then decompile again to get the public xml
it s safer, and then match the smali changes with the new public values.
Anyway great guide
if your decompiling with smali/baksmali directly make sure to use the -l flag (thats a L) so you have local varibles instead of registers, learned this the hard way lol
This mod is amazing, thank you very much my friend works fabulously
Add a toggle for CRT Animation
Building upon the same theme from the OP, we can now add another toggle under display settings for CRT animation. This feature is controlled by the boolean animateScreenLights in framework-res.apk (thanks to whomever the original author was!).
Since adding the setting is pretty much identical to the procedure in the OP, I will just discuss the relevant code needed to access the new setting (I leave adding the setting up to you!). The only requirement is you name your setting 'crt_animation'.
Our patch point will be inside services.jar, specifically PowerManagerService$BrightnessState.smali (this is based on LP7):
Code:
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
iget-boolean v6, v6, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z
if-nez v6, :cond_19
NOTE: cond_19 may differ depending on your decompiler.
So we need to delete the 3 lines above. In its place, add our new code:
Code:
iget-object v0, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$4300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "crt_animation"
const/4 v4, 0x0
invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-eqz v6, :cond_19
NOTE: Again, if cond_19 is different, fix the last line above!
Recompile settings.apk & services.jar, u/l and reboot!
Porting this mod to the skyrocket
Hey jeboo, as i told you I am trying to port this over to my rom but need some guidance in clock.smali and PhoneStatusBar.smali Thanks I appreciate the help I am attaching the smali files...
adding toggle CRT animation settings
jeboo said:
Building upon the same theme from the OP, we can now add another toggle under display settings for CRT animation. This feature is controlled by the boolean animateScreenLights in framework-res.apk (thanks to whomever the original author was!).
Since adding the setting is pretty much identical to the procedure in the OP, I will just discuss the relevant code needed to access the new setting (I leave adding the setting up to you!). The only requirement is you name your setting 'crt_animation'.
Our patch point will be inside services.jar, specifically PowerManagerService$BrightnessState.smali (this is based on LP7):
Code:
iget-object v6, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
iget-boolean v6, v6, Lcom/android/server/PowerManagerService;->mAnimateScreenLights:Z
if-nez v6, :cond_19
NOTE: cond_19 may differ depending on your decompiler.
So we need to delete the 3 lines above. In its place, add our new code:
Code:
iget-object v0, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
invoke-static {v0}, Lcom/android/server/PowerManagerService;->access$4300(Lcom/android/server/PowerManagerService;)Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "crt_animation"
const/4 v4, 0x0
invoke-static {v0, v1, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v6
if-eqz v6, :cond_19
NOTE: Again, if cond_19 is different, fix the last line above!
Recompile settings.apk & services.jar, u/l and reboot!
Click to expand...
Click to collapse
hi Mr Jeboo.. could u specify the settings in the strings.xml and public.xml in settings.apk? i assume u have got this mod to work.. I couldn't get what to add in this files.. thanks..
Apparently when I was redoing the whole thing to do AOSP/CRT toggle I placed the step 4 in the wrong spot.
How would we disable Weather in Lockscreen when AOSP is checked?
Clock.smali
Ok so I found out that the the statusbarservices is where I look instead of phonestatusbar.smali
however I'm having trouble with the Clock.smali inserts.
Could someone take a look, who knows, and make any suggestions or point me where i need to edit?
jeboo said:
...
Find:
if-eqz p1, :cond_1
const/4 v0, 0x0
and insert this code after it:
Code:
iget-object v2, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "hide_time"
invoke-static {v2, v3, v0}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-eqz v2, [B][COLOR="DarkOrange"]:goto_0[/COLOR][/B]
const/16 v0, 0x8
Recompile SystemUI and reboot. Now try out the new feature =)
Click to expand...
Click to collapse
On LPD, instead of :goto_0, use :goto_e
Robobob1221 said:
Ok so I found out that the the statusbarservices is where I look instead of phonestatusbar.smali
however I'm having trouble with the Clock.smali inserts.
Could someone take a look, who knows, and make any suggestions or point me where i need to edit?
Click to expand...
Click to collapse
I took a quick look at your clock.smali, GB sure made things complicated (24 registers vs 9 in ICS). When the registers change that much, unfortunately you're going to have to track them, it sucks.
One major problem I see is the return value from is24hourfmt in your ver uses v9, so you need to update the line 'if-nez v2, :cond_continue' to use v9 as well. Try that and let me know.
Thanks to the others for helping with the other changes lately..I must admit I use a much shorter patch for personal use, so I can fall behind with the latest code changes =)
jeboo
jeboo said:
I took a quick look at your clock.smali, GB sure made things complicated (24 registers vs 9 in ICS). When the registers change that much, unfortunately you're going to have to track them, it sucks.
One major problem I see is the return value from is24hourfmt in your ver uses v9, so you need to update the line 'if-nez v2, :cond_continue' to use v9 as well. Try that and let me know.
Thanks to the others for helping with the other changes lately..I must admit I use a much shorter patch for personal use, so I can fall behind with the latest code changes =)
jeboo
Click to expand...
Click to collapse
Thanks for checking out my file.
So you mean that the line should be 'if-nez v2, v9 :cond_continue' or just replace v2 with v9?
Thanks for the help
私はローボーボブ。 Haro!!
Robobob1221 said:
Thanks for checking out my file.
So you mean that the line should be 'if-nez v2, v9 :cond_continue' or just replace v2 with v9?
Thanks for the help
私はローボーボブ。 Haro!!
Click to expand...
Click to collapse
if-nez v9, :cond_continue
Basically if you're using military time, there's no need to worry about am/pm.
Still no compiling
jeboo said:
if-nez v9, :cond_continue
Basically if you're using military time, there's no need to worry about am/pm.
Click to expand...
Click to collapse
In plain English it seems so simple! Lol!
Thanks again. I'll check it out and see if it works. I hope it does Thanks again for the help.
Ok I tried the change you suggested and it still won't compile
I tried a few other changes but it results in the same error '
Could not smali file: [email protected]'. Sometimes the numbers ate end vary but its the same result.
another set is this
[email protected]
私はローボーボブ。 Haro!!
jeboo said:
if-nez v9, :cond_continue
Basically if you're using military time, there's no need to worry about am/pm.
Click to expand...
Click to collapse
Hello Jeboo!
Weird to say but.. with ur tutorial I ve been able to make a toggle to choose Samsung lockscreen or the AOSP one credits for u in my next Simplistic Disaster III Rom
whoa!

[GUIDE] Locking contacts/sms apps in memory on JB/cm10 (technical / baksmali way)

Hi everyone!
kanpurite made a great job giving us the easy way to locking apps in memory in this thread.
But, as i told in http://forum.xda-developers.com/showpost.php?p=31627356&postcount=23 there is other, a little bit harder, but still it can be done.
Requirements:
A Pc (this guide is made over Windows, but may work on linux as well)
notepad++
baksmali/smali tools (attached at this thread)
root explorer (or any file explorer with root capabilities)
Here is a step by step guide to do it:
1. Extract baksmali tools to a new folder
2. Extract services.jar from your phone (at /system/framework) and copy to your baksmali folder
3. Run baksmali manager.bat
4. select option 4 (select file to work), then select services.jar
5. select option 1 (baksmali) and wait (CAUTION: DON'T CLOSE THE BAKSMALI MANAGER WINDOW)
6. Go to your baksmali folder, there must be a new folder named "services"
7. enter to services folder and go to this sub-folder
Code:
\com\android\server\am
8. open ActivityManagerService.smali with notepad++
9. search for ".line 13892" and add the following after "if-lez v10, :cond_2af":
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
(NOTE: You can change to any app you want, just give the proper name of the app process....)
10. add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
11. change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
12. Save the file.
13. Go to the baksmali manager window and select option 2 (smali) and wait, it will create a classes.dex file on your baksmali folder
14. Open up services.jar with 7zip or WinRAR and drag the newly created classes.dex into the window to refresh services.jar with the new
classes.dex
15. Copy the new services.jar file to your sdcard and from there, copy to /system/framework (use root explorer, mount read/write and copy the
file).
16. set proper permissions: set 644 permissions ((rw-r--r--) or (tick Read: owner, group, others / Write: owner)
17. Restart, make a wipe dalvik and cache and
18. Enjoy!
thx... but why not just upload a baked/moded ver of services.jar... it would be much easier just to replace this specific file ;p as i assume u did for youreself ;p
meilbox said:
thx... but why not just upload a baked/moded ver of services.jar... it would be much easier just to replace this specific file ;p as i assume u did for youreself ;p
Click to expand...
Click to collapse
I could do it, but I do prefer to share knowledge with everyone... I could upload a services.jar but it's more fun to learn new things.
Enviado desde mi MB525 usando Tapatalk 2
i dont have line 10429..
This is what is in my services.jar (Latest Build):
.line 10420
:cond_167
const/16 v48, 0x0
.line 10421
.local v48, mi:Landroid/os/Debug$MemoryInfo;
if-eqz v38, :cond_22a
.line 10423
:try_start_16b
move-object/from16 v0, v61
iget-object v5, v0, Lcom/android/server/am/ProcessRecord;->thread:Landroid/app/IApplicationThread;
move-object/from16 v0, p1
move/from16 v1, v43
move/from16 v2, v38
move-object/from16 v3, v42
invoke-interface {v5, v0, v1, v2, v3}, Landroid/app/IApplicationThread;->dumpMemInfo(Ljava/io/FileDescriptor;ZZ[Ljava/lang/StringLandroid/os/Debug$MemoryInfo;
:try_end_17a
.catch Landroid/os/RemoteException; {:try_start_16b .. :try_end_17a} :catch_21b
move-result-object v48
.line 10435
:cond_17b
:goto_17b
if-nez v43, :cond_26b
if-eqz v48, :cond_26b
.line 10436
invoke-virtual/range {v48 .. v48}, Landroid/os/Debug$MemoryInfo;->getTotalPss()I
move-result v5
int-to-long v7, v5
.line 10437
.local v7, myTotalPss:J
add-long v68, v68, v7
Click to expand...
Click to collapse
vaibhav palande said:
i dont have line 10429..
This is what is in my services.jar (Latest Build):
Click to expand...
Click to collapse
I'm not talking about ".line" on the code, I'm talking about the number of the line in the document. On notepad++ look at the numbers at the most left and you will find line 10429 with no problem
Enviado desde mi MB525 usando Tapatalk 2
Should i add here?
SO Should i add the code u gave above in line 10429 in the pic??
This is my services.jar:
{
"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"
}
vaibhav palande said:
SO Should i add the code u gave above in line 10429 in the pic??
This is my services.jar:
Click to expand...
Click to collapse
Ummm... Weird it's send that I have to polish my guide... I'm using last version of quarx too but my code it's aligned different. Don't add the code in that line cause could break all the code. Please, wait a little bit for me to be on my pc to check what is wrong...
Enviado desde mi MB525 usando Tapatalk 2
espaciosalter20 said:
Ummm... Weird it's send that I have to polish my guide... I'm using last version of quarx too but my code it's aligned different. Don't add the code in that line cause could break all the code. Please, wait a little bit for me to be on my pc to check what is wrong...
Enviado desde mi MB525 usando Tapatalk 2
Click to expand...
Click to collapse
I am using latest build 09-12.. U have latest build? or u want me to send u services.jar?
vaibhav palande said:
I am using latest build 09-12.. U have latest build? or u want me to send u services.jar?
Click to expand...
Click to collapse
ok, it was my bad... i was using an old services.jar as reference. I double check again that and the right code is:
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
after this part:
Code:
[SIZE="5"][COLOR="Red"].line 13892[/COLOR][/SIZE]
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_29c
if-lez v10, :cond_2af
.line 13892, it's the key....
espaciosalter20 said:
ok, it was my bad... i was using an old services.jar as reference. I double check again that and the right code is:
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
after this part:
Code:
[SIZE="5"][COLOR="Red"].line 13892[/COLOR][/SIZE]
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_29c
if-lez v10, :cond_2af
.line 13892, it's the key....
Click to expand...
Click to collapse
So, where should i add this code? Which line?
vaibhav palande said:
So, where should i add this code? Which line?
Click to expand...
Click to collapse
I updated OP... Check in there
Enviado desde mi MB525 usando Tapatalk 2
espaciosalter20 said:
I updated OP... Check in there
Enviado desde mi MB525 usando Tapatalk 2
Click to expand...
Click to collapse
If i want to add some more apps, which part of the code needs to be repeated for new app?? Because difference in the upper part and lower part of code is highlighted with red color below and in the lower part green colored part is absent.. otherwise the code is same..
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]nez[/COLOR] v2, :cond_2b[COLOR="red"]4[/COLOR]
[COLOR="Lime"]move-object/from16 v0, p1[/COLOR]
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]eqz[/COLOR] v2, :cond_2b[COLOR="red"]f[/COLOR]
.line 13894
:cond_2b4
const/4 v11, 0x0
Problem doing smali
Here is the problem i am getting while doing smali:
vaibhav palande said:
Here is the problem i am getting while doing smali:
Click to expand...
Click to collapse
OP UPDATED
add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
if-lez v10, :cond_2d2
and change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
espaciosalter20 said:
add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
if-lez v10, :cond_2d2
and change the subsequent numbers of ".line" (including the old .line 13895) like this:
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
Click to expand...
Click to collapse
What about this? Sorry for so many questions but i really don't know a thing about smali files. I just learned one or 2 things by reading it here on xda..
vaibhav palande said:
What about this? Sorry for so many questions but i really don't know a thing about smali files. I just learned one or 2 things by reading it here on xda..
Click to expand...
Click to collapse
it's for resolve the problem that you commented earlier.... i do gave you the code in which i defined "cond_2b4" variable to be readed in the smali, but i forgot to give you the define of "cond_2bf" variable... this is what you have to do in order to make the variable work properly and avoid the error in compile the service.jar again
I mean what about the question below..
vaibhav palande said:
If i want to add some more apps, which part of the code needs to be repeated for new app?? Because there is some in upper and lower part of code.. difference in the upper part and lower part of code is highlighted with red color below and the text in green color is absent in lower part.. So little confused about which part of code to be repeated for locking more apps in memory... otherwise the code is same..
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]nez[/COLOR] v2, :cond_2b[COLOR="red"]4[/COLOR]
[COLOR="Lime"]move-object/from16 v0, p1[/COLOR]
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-[COLOR="red"]eqz[/COLOR] v2, :cond_2b[COLOR="red"]f[/COLOR]
.line 13894
:cond_2b4
const/4 v11, 0x0
Click to expand...
Click to collapse
espaciosalter20 said:
it's for resolve the problem that you commented earlier.... i do gave you the code in which i defined "cond_2b4" variable to be readed in the smali, but i forgot to give you the define of "cond_2bf" variable... this is what you have to do in order to make the variable work properly and avoid the error in compile the service.jar again
Click to expand...
Click to collapse
This is not working.. :crying:
I get this error while doing smali:
Easier version?
http://forum.xda-developers.com/showthread.php?t=1889300
Sent from my MB525 using xda app-developers app
vaibhav palande said:
This is not working.. :crying:
I get this error while doing smali:
Click to expand...
Click to collapse
delete "if-lez v10, :cond_2d2"

[MOD] [LIH/LJ1/LJ2/LJ4/LJ5/LK4/LKC deodex] back/menu long press kills foreground app

Thanks to Sorg, Poppuri, Pako, Wanam.
2 level reboot menu from Wanam also included.
The mod actually developed by sorg and implemented into poppuri ROM with 2 another mods. One of them is too complicated idnd changes whole logic of hard buttons behavior. I just separated it from another ones.
Warning:
Installing of this mod will:
1. Remove another hard keys related mods like volume long press etc.
2. Remove old TV effect.
I dislike this mods, so they are not implemented.
3. Replace power menu with one from WanamLite ROM.
If you need tis mods, please ask autors of mod or ROM for implementing this one or do it yourself.
v2 Update.
Always vibrate, also if nothing killed.
Kills launchers.
Excluded App list:
com.android.providers.applications
com.sec.android.app.clockpackage
com.sec.android.widgetapp.alarmclock
com.sec.phone
com.android.settings
com.android.defcontainer
com.android.contacts
com.sec.android.app.factorymode
v3 - Will not kill launchers, but always provide feedback
To implement into another ROM/file:
1. Decompile android.policy.jar (both from attachment and from your ROM).
2. Copy PhoneWindowManager$BackLongPress.smali into
\android.policy.jar.out\com\android\internal\policy\impl\
3. Merge changes from \android.policy.jar.out\com\android\internal\policy\impl\PhoneWindowManager.smali to your file.
You can use original file from LIH ROM to find differences.
4. Recompile.
hi, just flash the zip in cwm? Criskelo I LIH.?
You can.
Make backup first.
Better - ask Kriskello for implementing this mod.
It simple.
I hope that will work.
---------- Post added at 08:17 PM ---------- Previous post was at 08:13 PM ----------
So I already have and it seems fully functional, many thanks for your work, it's ok
Doesn't work in my custom LIH rom.
well i don.t have a notebook or a desktop system in the next few days,and i really like this feature...so can someone compile one for wanam 4.0 XXDLJ1?tx
Work in omega 29
Enviado desde mi GT-I9300 usando Tapatalk 2
Work on hyper light DLJ1 1.1.5
finally I don't need to install jkay
Tap talk killed now with kill back key
Envoyé depuis mon GT-I9300 avec Tapatalk
You may name my babies
Insert coin 2.0.0 XDLID. works perfectly, wanted this so long. if i could thousand thank i would
akelon said:
Work in omega 29
Enviado desde mi GT-I9300 usando Tapatalk 2
Click to expand...
Click to collapse
I tried on omega 29 and its not worked any solution will be appriciated. Thanks..
There is no differences in android.policy.jar between LIH and LJ1.
So, the mod should work on LJ1.
akelon said:
Work in omega 29
Enviado desde mi GT-I9300 usando Tapatalk 2
Click to expand...
Click to collapse
Have you recompiled it or just flashed it directly?
I am on Omega v29 and it didn't work after flashing. Could you please share the modded file? Thanks in advance.
tczhang said:
Have you recompiled it or just flashed it directly?
I am on Omega v29 and it didn't work after flashing. Could you please share the modded file? Thanks in advance.
Click to expand...
Click to collapse
Worked here on v29. Just flashed
Sent from my GT-I9300 using Xparent Green Tapatalk 2
d8389 said:
To implement into another ROM/file:
1. Decompile android.policy.jar (both from attachment and from your ROM).
2. Copy PhoneWindowManager$BackLongPress.smali into
\android.policy.jar.out\com\android\internal\policy\impl\
3. Merge changes from \android.policy.jar.out\com\android\internal\policy\impl\PhoneWindowManager.smali to your file.
You can use original file from LIH ROM to find differences.
4. Recompile.
Click to expand...
Click to collapse
Plz give us the guide about "the changes of PhoneWindowManager.smali"
androidphone2012 said:
Plz give us the guide about "the changes of PhoneWindowManager.smali"
Click to expand...
Click to collapse
You should add
Code:
.field private final mBackLongPress:Ljava/lang/Runnable;
.field public mBackLongPressed:I
somewhere in
# instance fields
---
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
in
Code:
.method public constructor <init>()V
i do it in another similar group
---
in
Code:
.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
I increased number of registers by 1 (not sure it's necessary)
and after something like
Code:
const-string v41, "RemoteException when showing recent apps"
move-object/from16 v0, v40
move-object/from16 v1, v41
invoke-static {v0, v1, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_521
.line 3110
.end local v10 #e:Landroid/os/RemoteException;
:cond_532
add
Code:
const/16 v40, 0x4
move/from16 v0, v21
move/from16 v1, v40
if-ne v0, v1, :cond_569
.line 2281
if-eqz v9, :cond_556
if-nez v30, :cond_55f
move-object/from16 v0, p0
const v1, 0x0
iput v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-nez v22, :cond_569
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v2
const-wide/16 v4, 0x5
mul-long/2addr v2, v4
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_569
:cond_556
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
:cond_55f
move-object/from16 v0, p0
iget v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-eqz v1, :cond_569
const-wide/16 v40, -0x1
goto/16 :goto_ad
:cond_569
:goto_569
check also for conflicting goto & cond
d8389 said:
You should add
Code:
.field private static final LONG_PRESS_TIMEOUT:I = 0x190
somewhere in
# static fields
---
Code:
.field private final mBackLongPress:Ljava/lang/Runnable;
.field public mBackLongPressed:I
somewhere in
# instance fields
---
Code:
new-instance v0, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;
invoke-direct {v0, p0}, Lcom/android/internal/policy/impl/PhoneWindowManager$BackLongPress;-><init>(Lcom/android/internal/policy/impl/PhoneWindowManager;)V
iput-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
in
Code:
.method public constructor <init>()V
i do it in another similar group
---
in
Code:
.method public interceptKeyBeforeDispatching(Landroid/view/WindowManagerPolicy$WindowState;Landroid/view/KeyEvent;I)J
I increased number of registers by 1 (not sure it's necessary)
and after something like
Code:
const-string v41, "RemoteException when showing recent apps"
move-object/from16 v0, v40
move-object/from16 v1, v41
invoke-static {v0, v1, v10}, Landroid/util/Slog;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
goto :goto_521
.line 3110
.end local v10 #e:Landroid/os/RemoteException;
:cond_532
add
Code:
const/16 v40, 0x4
move/from16 v0, v21
move/from16 v1, v40
if-ne v0, v1, :cond_569
.line 2281
if-eqz v9, :cond_556
if-nez v30, :cond_55f
move-object/from16 v0, p0
const v1, 0x0
iput v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-nez v22, :cond_569
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-static {}, Landroid/view/ViewConfiguration;->getGlobalActionKeyTimeout()J
move-result-wide v2
const-wide/16 v4, 0x5
mul-long/2addr v2, v4
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_569
:cond_556
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPress:Ljava/lang/Runnable;
iget-object v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
:cond_55f
move-object/from16 v0, p0
iget v1, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mBackLongPressed:I
if-eqz v1, :cond_569
const-wide/16 v40, -0x1
goto/16 :goto_ad
:cond_569
:goto_569
check also for conflicting goto & cond
Click to expand...
Click to collapse
Thanks, but PhoneWindowManager.smali in Nexus S differs from SGS III Could you give me some tips?
d8389 said:
Thanks to Sorg, Poppuri, Pako, Wanam.
2 level reboot menu from Wanam also included.
The mod actually developed by sorg and implemented into poppuri ROM with 2 another mods. One of them is too complicated idnd changes whole logic of hard buttons behavior. I just separated it from another ones.
Click to expand...
Click to collapse
also working on CheckROM 5.5 DLIB!
@D8329,can you make Pin Code Unlock without pressing OK button mod too ?
works perfectly on foxhound 1.0

[MOD / How To][5/11/13] - Extended Reboot Menu - De-Odex - MDL

Reboot options as show :good:
Pre-requisites
De-Odex'ed devices only! Will not work on stock ROM!
Must have the the MDL De-Odex mod by Nottach to use this mod!
Installation
I used similar install method as Nottach to apply this mod.
Download the attachment. Unzip it to your desktop.
Simply copy the "Mods" folder to your internal storage
Run the "Mod Me.bat" file after copying
It will copy the mod to the correct location, clear cache, then reboot phone.
{
"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"
}
Feel free to use this in any mod or ROM you make.
Hit Thanks!​
To make this mod your self or further modify it do the following;
First decompile classes.dex in android.policy.jar. I wont get into that part as this mini tutorial assumes you know how to modify smali code.
Add the following BOLD ITALIC code to \com\android\internal\policy\impl\GlobalActions$SinglePressAction.smali
Modded Code:
Code:
# 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
[B][I]# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
[/I][/B]
# instance fields
.field private final mIcon:Landroid/graphics/drawable/Drawable;
.field private final mIconResId:I
.field private final mMessage:Ljava/lang/CharSequence;
.field private final mMessageResId:I
# direct methods
[B][I].method static constructor <clinit>()V
.registers 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, "Restart Shell"
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[/I][/B]
.method protected constructor <init>(II)V[I][/I]
FYI: You can change the string names to what you like best. For example most people word the second string as "Hot reboot" but I think that sounds lame so I call it what it is and that is a shell restart. Another example would be to change "Download" to "Download Mode"
Then change \com\android\internal\policy\impl\GlobalActions.smali
right below .line 566
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
to
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
Then create three smali files as shown below and add them to: \com\android\internal\policy\impl\
GlobalActions$99.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99;
.super Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
.source "GlobalActions.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions;->createDialog()Landroid/app/AlertDialog;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/internal/policy/impl/GlobalActions;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
.registers 4
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
invoke-direct {p0, p2, p3}, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;-><init>(II)V
return-void
.end method
# virtual methods
.method public onPress()V
.registers 7
const/4 v5, 0x4
new-instance v1, Landroid/app/AlertDialog$Builder;
iget-object v2, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v2}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v2
invoke-direct {v1, v2}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
const-string v2, "Reboot Menu"
invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
move-result-object v1
sget-object v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
const/4 v3, 0x0
new-instance v4, Lcom/android/internal/policy/impl/GlobalActions$99$2;
invoke-direct {v4, p0}, Lcom/android/internal/policy/impl/GlobalActions$99$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
invoke-virtual {v1, v2, v3, v4}, Landroid/app/AlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
const v2, 0x104000a
new-instance v3, Lcom/android/internal/policy/impl/GlobalActions$99$1;
invoke-direct {v3, p0}, Lcom/android/internal/policy/impl/GlobalActions$99$1;-><init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
invoke-virtual {v1, v2, v3}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
const/high16 v2, 0x104
const/4 v3, 0x0
invoke-virtual {v1, v2, v3}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
const/16 v2, 0x7d9
invoke-virtual {v1, v2}, Landroid/view/Window;->setType(I)V
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v1}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v1
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x111000f
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v1
if-nez v1, :cond_58
invoke-virtual {v0}, Landroid/app/AlertDialog;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1, v5, v5}, Landroid/view/Window;->setFlags(II)V
:cond_58
invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
return-void
.end method
.method public showBeforeProvisioning()Z
.registers 2
.prologue
.line 307
const/4 v0, 0x1
return v0
.end method
.method public showConditional()Z
.registers 2
.prologue
.line 311
const/4 v0, 0x1
return v0
.end method
.method public showDuringKeyguard()Z
.registers 2
.prologue
.line 304
const/4 v0, 0x1
return v0
.end method
GlobalActions$99$1.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99$1;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions$99;->onPress()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
.registers 2
.parameter
.prologue
.line 281
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
.registers 7
.parameter "dialog"
.parameter "whichButton"
.prologue
const/4 v2, 0x1
const/4 v3, 0x0
.line 282
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, -0x1
if-le v0, v1, :cond_20
.line 291
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
const/4 v1, 0x4
if-eq v0, v1, :cond_4d
.line 283
sget v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
if-eq v0, v2, :cond_2c
.line 284
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
iget-object v0, v0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
sget v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
if-nez v1, :cond_21
const/4 v1, 0x0
:goto_1d
invoke-static {v0, v1, v3}, Lcom/android/server/power/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
.line 291
:cond_20
:goto_20
return-void
.line 284
:cond_21
sget-object v1, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
sget v2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
aget-object v1, v1, v2
invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
move-result-object v1
goto :goto_1d
.line 288
:cond_2c
:try_start_2c
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
const/4 v1, 0x4
new-array v1, v1, [Ljava/lang/String;
const/4 v2, 0x0
const-string v3, "pkill"
aput-object v3, v1, v2
const/4 v2, 0x1
const-string v3, "-TERM"
aput-object v3, v1, v2
const/4 v2, 0x2
const-string v3, "-f"
aput-object v3, v1, v2
const/4 v2, 0x3
const-string v3, "system_server"
aput-object v3, v1, v2
invoke-virtual {v0, v1}, Ljava/lang/Runtime;->exec([Ljava/lang/String;)Ljava/lang/Process;
:try_end_4a
.catch Ljava/lang/Exception; {:try_start_2c .. :try_end_4a} :catch_4b
goto :goto_20
.line 290
:catch_4b
move-exception v0
goto :goto_20
:cond_4d
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions$99$1;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
iget-object v0, v0, Lcom/android/internal/policy/impl/GlobalActions$99;->this$0:Lcom/android/internal/policy/impl/GlobalActions;
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$000(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/android/server/power/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
goto :goto_20
.end method
GlobalActions$99$2.smali
Code:
.class Lcom/android/internal/policy/impl/GlobalActions$99$2;
.super Ljava/lang/Object;
.source "GlobalActions.java"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/android/internal/policy/impl/GlobalActions$99;->onPress()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/GlobalActions$99;)V
.registers 2
iput-object p1, p0, Lcom/android/internal/policy/impl/GlobalActions$99$2;->this$1:Lcom/android/internal/policy/impl/GlobalActions$99;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
.registers 3
sput p2, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootMode:I
return-void
.end method
Recompile and done!
You can also change the names of the reboot method to your liking!
Slowly but surely here comes the goodies. Cant wait for flashy time for AT&T.
ATT S4 Rooted. Beastin.
4.2.2
Scrosler you are the man! Hell ya dude thanks!! I envy your talent
"Tettering" ay, right. Slow down a little, I can't keep up. Very usefull reboot menu. Works for me.
sent from my SGH-i317
Dean1650 said:
"Tettering" ay, right. Slow down a little, I can't keep up. Very usefull reboot menu. Works for me.
sent from my SGH-i317
Click to expand...
Click to collapse
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
scrosler said:
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
Click to expand...
Click to collapse
No, but I'm headed over there now.
sent from my SGH-i317
scrosler said:
Hehehehe.... It was a tough choice my friend. Hardest phone choice I had to make but then after owning both I decided this was going to be a power house!
Me slow down? Never! :angel:
Did you see my launcher mod in themes and apps?
Click to expand...
Click to collapse
Thought you were going back to Verizon?
Sent from my HTC One using Tapatalk 2
powerwagon said:
Thought you were going back to Verizon?
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
I did. The people on Verizon bought me a Note II (when it came out). But I wanted the SGS4 so I broke into my donation fund and bought (part of it anyways).
I now develop for 4 phones, SGS4, Note II (All carriers), SGS3, and HTC One X... and the Nexus 10 Tablet.
scrosler said:
I did. The people on Verizon bought me a Note II (when it came out). But I wanted the SGS4 so I broke into my donation fund and bought (part of it anyways).
I now develop for 4 phones, SGS4, Note II (All carriers), SGS3, and HTC One X... and the Nexus 10 Tablet.
Click to expand...
Click to collapse
Cant wait to be running cleanrom on this! Def one of the best devs in the game, glad you kept it
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Can't wait for mine to come in the mail... Thanks to you guys who able to do this awesome work. Hope I can help out or at least test some stuff out for you guys.
Sent from my SGS3 using xda premium
Deodexed System Installer ran from Noattach but i am still not able to get this mod to work i am updated to the lastest AMDL and deodexed verifiyed by checking build info Nottach.JDQ39.I337UCUAMDL anyone have any ideas ? as to what the problem is .
tokoam said:
Deodexed System Installer ran from Noattach but i am still not able to get this mod to work i am updated to the lastest AMDL and deodexed verifiyed by checking build info Nottach.JDQ39.I337UCUAMDL anyone have any ideas ? as to what the problem is .
Click to expand...
Click to collapse
And you used the installer with this mod?
Yes I did
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
tokoam said:
Yes I did
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
Click to expand...
Click to collapse
Did you get an error messages?
scrosler said:
Did you get an error messages?
Click to expand...
Click to collapse
No error message in cmd batch file
Sent from my SAMSUNG-SGH-I337 using Tapatalk 2
i try right
It does not work for me either
Just says waiting for s4. The other installer works fine I even tried just pushing me jar file but that did not work either
Sent from my SAMSUNG-SGH-I337 using xda premium
And you have ADB installed and in the Windows path?
I have updated the instructions to be more specific and included an alternate installer with the ADB executables.

[GUIDE]MMS.apk Set Skin To Body

Good day fellow, I am here again with some new guide.
People want the message skin and gray is boring. So lets make something new. As far as i know, there is no guide of this, as I searched for a guide to "Message background" and I dont see any. I dont know the right term/title for this but see the screenies. That will describe most.
Disclaimer:
I and XDA dont take the responsibility for your phone damage. If you dont trust my guide do a nandroid backup first.
Click to expand...
Click to collapse
Requirements:
Brains.apk
Notepad++
APKTool(any apk decompiling tool will do)
Click to expand...
Click to collapse
Instruction:
1. Decompile your Mms.apk
2. Now I think you made the Message Skin enabled already but if its not do this first, here. (No MMS Convert No contact Limit Sent Time aren't compulsory)
3. Now you are finish with the message skin chooser so we gonna move on to the main part.
4. Go to /smali/com/android/mms/ui/ComposeMessageActivity.smali
5. Before this
Code:
.line 6091
return-void
.line 5981
:cond_6
if-eq v0, v6, :cond_7
const/16 v1, 0x10
if-ne v0, v1, :cond_8
.line 5982
:cond_7
iget-object v1, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mSendButton:Landroid/widget/Button;
const/high16 v2, 0x4160
invoke-virtual {v1, v3, v2}, Landroid/widget/Button;->setTextSize(IF)V
goto/16 :goto_0
.line 5984
:cond_8
iget-object v1, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mSendButton:Landroid/widget/Button;
const/high16 v2, 0x4180
invoke-virtual {v1, v3, v2}, Landroid/widget/Button;->setTextSize(IF)V
goto/16 :goto_0
.end method
.method private initializeContactInfo()V
add this,
Code:
[COLOR="Red"].line 6062
:cond_5
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->setMessageSkinToBody()V[/COLOR]
Remider : The background will have no effect if, the blue text below have "cond_5". Delete it, it is necessary.
If cant understand what I am sayin, do this
Turn this
.line 6091
cond_5
return-void
to this
.line 6091
return-void
So it will be like this,
Code:
iput-object v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mAttachmentLayout:Landroid/widget/LinearLayout;
[COLOR="Red"].line 6062
:cond_5
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->setMessageSkinToBody()V[/COLOR]
[COLOR="Blue"].line 6091
return-void[/COLOR]
.line 5981
:cond_6
if-eq v0, v6, :cond_7
const/16 v1, 0x10
if-ne v0, v1, :cond_8
.line 5982
:cond_7
iget-object v1, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mSendButton:Landroid/widget/Button;
const/high16 v2, 0x4160
invoke-virtual {v1, v3, v2}, Landroid/widget/Button;->setTextSize(IF)V
goto/16 :goto_0
.line 5984
:cond_8
iget-object v1, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mSendButton:Landroid/widget/Button;
const/high16 v2, 0x4180
invoke-virtual {v1, v3, v2}, Landroid/widget/Button;->setTextSize(IF)V
goto/16 :goto_0
.end method
.method private initializeContactInfo()V
6. Below
Code:
.method public static setIsHideExplict(Z)V
.locals 0
.parameter "hide"
.prologue
.line 7798
sput-boolean p0, Lcom/android/mms/ui/ComposeMessageActivity;->isHideExplict:Z
.line 7799
return-void
.end method
Add this method
Code:
[COLOR="Red"].method private setMessageSkinToBody()V
.locals 3
.prologue
.line 7493
invoke-virtual {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->getApplicationContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/android/mms/ui/MessagingPreferenceActivity;->getMessageSkin(Landroid/content/Context;)I
move-result v0
.line 7494
invoke-virtual {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v1
iget v1, v1, Landroid/content/res/Configuration;->orientation:I
const/4 v2, 0x2
if-ne v1, v2, :cond_0
const/4 v1, 0x1
.line 7496
:goto_0
packed-switch v0, :pswitch_data_0
.line 7517
:goto_1
return-void
.line 7494
:cond_0
const/4 v1, 0x0
goto :goto_0
.line 7499
:pswitch_0
iget-object v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mMsgListView:Lcom/android/mms/ui/MessageListView;
if-eqz v1, :cond_1
const v1, 0x7f020181
:goto_2
invoke-virtual {v0, v1}, Lcom/android/mms/ui/MessageListView;->setBackgroundResource(I)V
goto :goto_1
:cond_1
const v1, 0x7f020180
goto :goto_2
.line 7503
:pswitch_1
iget-object v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mMsgListView:Lcom/android/mms/ui/MessageListView;
if-eqz v1, :cond_2
const v1, 0x7f020183
:goto_3
invoke-virtual {v0, v1}, Lcom/android/mms/ui/MessageListView;->setBackgroundResource(I)V
goto :goto_1
:cond_2
const v1, 0x7f020182
goto :goto_3
.line 7507
:pswitch_2
iget-object v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mMsgListView:Lcom/android/mms/ui/MessageListView;
if-eqz v1, :cond_3
const v1, 0x7f020185
:goto_4
invoke-virtual {v0, v1}, Lcom/android/mms/ui/MessageListView;->setBackgroundResource(I)V
goto :goto_1
:cond_3
const v1, 0x7f020184
goto :goto_4
.line 7511
:pswitch_3
iget-object v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mMsgListView:Lcom/android/mms/ui/MessageListView;
if-eqz v1, :cond_4
const v1, 0x7f020187
:goto_5
invoke-virtual {v0, v1}, Lcom/android/mms/ui/MessageListView;->setBackgroundResource(I)V
goto :goto_1
:cond_4
const v1, 0x7f020186
goto :goto_5
.line 7496
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
:pswitch_2
:pswitch_3
.end packed-switch
.end method[/COLOR]
7.Next, After this code
Code:
invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
.line 3602
if-eqz v0, :cond_4
.line 3603
invoke-virtual {v0}, Landroid/view/View;->requestFocus()Z
.line 3609
:cond_4
iget-boolean v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mIsKeyboardOpen:Z
invoke-direct {p0, v0}, Lcom/android/mms/ui/ComposeMessageActivity;->onKeyboardStateChanged(Z)V
add this
Code:
[COLOR="Red"].line 3440
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->setMessageSkinToBody()V[/COLOR]
So it will be like this,
Code:
invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;
move-result-object v0
.line 3602
if-eqz v0, :cond_4
.line 3603
invoke-virtual {v0}, Landroid/view/View;->requestFocus()Z
.line 3609
:cond_4
iget-boolean v0, p0, Lcom/android/mms/ui/ComposeMessageActivity;->mIsKeyboardOpen:Z
invoke-direct {p0, v0}, Lcom/android/mms/ui/ComposeMessageActivity;->onKeyboardStateChanged(Z)V
[COLOR="red"].line 3440
invoke-direct {p0}, Lcom/android/mms/ui/ComposeMessageActivity;->setMessageSkinToBody()V[/COLOR]
.line 3614
return-void
8. Save it. Recompile and push/flash.
Note:
You can edit the background at drawables-ldpi/view*.png
Click to expand...
Click to collapse
Happy modding.!
SS:
{
"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"
}
Credits to this man for following his mms.apk:
[email protected]
Click to expand...
Click to collapse
Wow haha
Sent from my GT-S5360 using xda premium
Thats awesome sir :thumbup:, actually i want to share this guide but don't have much time.... thanks b4
blu3m4n said:
Thats awesome sir :thumbup:, actually i want to share this guide but don't have much time.... thanks b4
Click to expand...
Click to collapse
Thanks to you sir, after this i learned something, adding message skin and backgroud. Still in development..
PineappleOwl said:
Thanks to you sir, after this i learned something, adding message skin and backgroud. Still in development..
Click to expand...
Click to collapse
there is one my friend at fb can add more than 5 skin into mms.apk....! you can ask him if you want to... pm me
blu3m4n said:
there is one my friend at fb can add more than 5 skin into mms.apk....! you can ask him if you want to... pm me
Click to expand...
Click to collapse
Thanks sir but I figured it out already.
how to make stock mms.apk background to be transparent following framework-res.apk also make a enter message layout to be small?
nice guide....
Is This Applicable In Y Duos Mms..
coz i tryd codes are totally difernt
.line 6091 etc etc
nice guide.... and it work
i hope there is a guide for s7500..
Hmmmm. good thread sir :good:

Categories

Resources