[MOD][HOW-TO][4.1.2]StatusBar Toggles+Custom Settings[Controlable] - Galaxy S II Android Development

Hi To all
Me again...
This mod and how to is come from my Rom!
After many request...i decided share that to all but if anybody will use that just dont forget give me a credit:laugh:
What is this mod and how to?
this mod and how to have:
how to make custome settings in "secsettings.apk"
how to add make 23 toggle statusbar
how to add toggle between stock and 23 toggle statusbar in custome settings
and many things will come...
what you tools you need?
you need apktools or apk manger or apkmulti tools for decompile and Tools and Not pad++(i always use apkmulti tools this is better or you can use wanam Apk_Manager Repack.
lets Go to start
post 1 have system files download my Attachment "systemfiles.zip" put all of the in your device system\app folder to system\app and system\framework to system\framework
post 2 is "how to make custome settings in "secsettings.apk" and secsettings.apk files"
post 3 is "how to make custome settings in "systemui.apk""
screen shots:
will upload
thanks:
Wanam

lets go strat with Secsettings.apk
part1:
decompile "Secsettings.apk"
download my Attachment file "SecSettings.apk.rar" extract that and copy all things from that to your "secsettings.apk"
go to decompiled "secsettings.apk" go "res/xml open "settings_headers.xml" with not pad ++
Find this line:
Code:
<header android:id="@id/manufacturer_settings" android:fragment="com.android.settings.WirelessSettings">
<intent android:action="com.android.settings.MANUFACTURER_APPLICATION_SETTING" />
</header>
put this after that line:
Code:
<header android:title="Custom Settings" />
<header android:icon="@drawable/biftor_rom_control" android:title="Custom Settings" android:fragment="com.android.settings.Biftor.BiftorMain" />
save and compile "secsettings.apk" after you compile that decompile it again you need change id
part 2:
Decompile your modded "Secsettings.apk" Go to res/values and open "public.xml" with not pad
try to find this:
Code:
<public type="xml" name="biftor_customsettings" id="
copy id of "biftor_customsettings"
Go to smali/com/android/settings/Biftor open "BiftorMain.smali" and try to find this:
Code:
.locals 5
const/4 v1, 0x1
const/4 v2, 0x0
invoke-super {p0, p1}, Landroid/preference/PreferenceFragment;->onCreate(Landroid/os/Bundle;)V
const v0, [COLOR="Red"]0x7f07008d[/COLOR]
invoke-virtual {p0, v0}, Lcom/android/settings/Biftor/BiftorMain;->addPreferencesFromResource(I)V
const-string v0, "23toggle_statubar"
invoke-virtual {p0, v0}, Lcom/android/settings/Biftor/BiftorMain;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
check-cast v0, Landroid/preference/CheckBoxPreference;
see red line
Chang that to id of "biftor_customsettings" you copied that befor
save and compile
Secsettings.apk finish
Go to post 3 for Systemui.apk

lets go start with "Systemui.apk"
part1:
decompile your "Systemui.apk"
download my Attachment file "systemui.apk.rar" extract that and copy all things from that to your "Systemui.apk" decompiled
go to res/values open "ids.xml" with not pad++
add this line to that"
Code:
<item type="id" name="exp_power_stat">false</item>
after that compile and after compile,decompile that again!
part 2:
Go to smali\com\android\systemui\statusbar\phone and open "PhoneStatusBar.smali" with Not pad++
try to find this line:
Code:
.field mPostCollapseCleanup:Ljava/lang/Runnable;
and add this line after that:
Code:
.field mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
try to find this method:
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
[COLOR="Blue"] .locals 13[/COLOR]
.prologue
.line 521
change the blue line to this:
Code:
.locals 15
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;"
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
if-eqz v9, :cond_9
.line 532
const v9, 0x7f03003e
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
[COLOR="Blue"] iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;[/COLOR]
put this after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_Biftor
const v9, 0x7f030045
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
:cond_Biftor
exactly same this:
you can remove "##############" this is just for hint!
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useTouchWizGUI:Z
if-eqz v9, :cond_9
.line 532
const v9, 0x7f03003e
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
##############################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_Biftor
const v9, 0x7f030045 [COLOR="Red"]#biftor23_tw_super_status_bar[/COLOR]
const/4 v10, 0x0
invoke-static {v1, v9, v10}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
:cond_Biftor
#################
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;":
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004c
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ScrollView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
.line 700
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
[COLOR="Blue"] invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
[/COLOR]
put this lines after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_arm
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011b [COLOR="Red"]#exp_power_stat[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/Biftor/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
.line 702
:cond_arm
exactly same this:
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d004c
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ScrollView;
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
.line 700
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const/4 v10, 0x0
invoke-virtual {v9, v10}, Landroid/widget/ScrollView;->setVerticalScrollBarEnabled(Z)V
#################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_arm
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d011b [COLOR="Red"]#exp_power_stat[/COLOR]
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Lcom/Biftor/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
.line 702
:cond_arm
#################
try to find this on ".method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;":
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useAttPlmnDisplay:Z
const/4 v10, 0x1
if-ne v9, v10, :cond_7
.line 857
const-string v9, "android.intent.action.SCREEN_ON"
invoke-virtual {v2, v9}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 860
:cond_7
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
[COLOR="Blue"] invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;[/COLOR]
put this after blue line:
Code:
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_ar
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/Biftor/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 863
:cond_ar
exactly same this:
Code:
sget-boolean v9, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->useAttPlmnDisplay:Z
const/4 v10, 0x1
if-ne v9, v10, :cond_7
.line 857
const-string v9, "android.intent.action.SCREEN_ON"
invoke-virtual {v2, v9}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 860
:cond_7
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
#################
iget-object v12, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;
invoke-virtual {v12}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v12
const-string v13, "23toggle_statubar"
const/4 v14, 0x0
invoke-static {v12, v13, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v12
if-eqz v12, :cond_ar
move-object/from16 v0, p0
iget-object v9, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/Biftor/systemui/quickpanel/PowerWidget;
invoke-virtual {v9}, Lcom/Biftor/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 863
:cond_ar
#################
Important Note 1 Red lines:
Go to res/values open "public.xml" with Not pad++
Find new id of "exp_power_stat" and "biftor23_tw_super_status_bar"
after that replace new id to red lines.
i attached my modded "PhoneStatusBar.smali" you can use that maybe you need that!
final part:
go to decompiled SystemUI.apk open "AndroidManifest.xml"
try to find this:
Code:
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="com.sprint.permission.SPRINT4G" />
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS" />
[COLOR="Blue"] <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
[/COLOR]
put this after blue line:
Code:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.REBOOT" />
compile Systemui.apk and Signe that (dont forget do signe)
and put it in your device!
important Note 2:
you need do This [HOW TO][20Mar][How to Disable Signature Checker For System App[Sammy JB]
because you Changed "AndroidManifest.xml" and you singed SystemUi.apk
Dont Forget do this!
i attached my Modded Systemui.apk if you want you can use that!
Enjoy.

res3

res4

res5 maybe will need...

I'd like to know what makes this mod.
please post the screenshoot.
thanks

remuntada78 said:
I'd like to know what makes this mod.
please post the screenshoot.
thanks
Click to expand...
Click to collapse
This mod is your statusbar toggle
With this mod
You can make lidroid 23toggle statusbar
And make toggle for switch from stock toggle to lidroid 23 toggle or lidroid to stock toggle....
I haven't screen Shot from that
Goodluck
Armin.
Sent from my GT-I9100 using xda premium

offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?

rrgrrg said:
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
Click to expand...
Click to collapse
You just gotta wait. It can take aaagggeeesss
Sent from my GT-I9305 using Tapatalk 4 Beta

Goldieking said:
You just gotta wait. It can take aaagggeeesss
Sent from my GT-I9305 using Tapatalk 4 Beta
Click to expand...
Click to collapse
ok ,,thats why not every rom has this future :silly:
edit : i see that aapt.exe is taking more memory by the passage of time ,,but its a slight increase so its working yea

rrgrrg said:
offtopic but apktool is stuck in compiling secsettings.apk ,,, i increased the heap size to 1024mb and still getting stuck ,,,whats wrong ?
Click to expand...
Click to collapse
rrgrrg said:
ok ,,thats why not every rom has this future :silly:
edit : i see that aapt.exe is taking more memory by the passage of time ,,but its a slight increase so its working yea
Click to expand...
Click to collapse
Hi
I suggest use apk multi tools that's much better than apktools for noob peoples...
Goodluck
Armin.
Sent from my GT-I9100 using xda premium

Biftor said:
Hi
I suggest use apk multi tools that's much better than apktools for noob peoples...
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Or apk manager
Sent from my GT-I9100 using Tapatalk 2

Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium

bombaybadboy said:
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Should ask Goldie for this mate, but he is taking a break right now.

Namoi said:
Should ask Goldie for this mate, but he is taking a break right now.
Click to expand...
Click to collapse
Im just a seeker of knowledge and see parts of this guide could be useful to me mate
Sent from my GT-I9100 using xda premium

bombaybadboy said:
Just a question please, I was looking for a guide almost like this one but from what I have read both stock and 23 toggle mods would look the same. My question is what would it take to have 2 different themes? eg-a full stock theme and a aosp 23 toggle theme, so I can add transparent pulldown, blue % battery ect.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Hi
You can do it same me!
You can change lidorid stock to aosp theme that's easy just change layout xml for lidroid in systemui.apk
Just look again you have one tw_super_statusbar.xml for 23 toggle!!!
Change layouts to aosp style!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium

Biftor said:
Hi
You can do it same me!
You can change lidorid stock to aosp theme that's easy just change layout xml for lidroid in systemui.apk
Just look again you have one tw_super_statusbar.xml for 23 toggle!!!
Change layouts to aosp style!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thankyou for the reply but how do you separate 2 tw_statusbar.xml and stat_battery_charge.xml and expandable_header ect can I ask. I will have a proper look when I next get back on my pc
Sent from my GT-I9100 using xda premium

bombaybadboy said:
Thankyou for the reply but how do you separate 2 tw_statusbar.xml and stat_battery_charge.xml and expandable_header ect can I ask. I will have a proper look when I next get back on my pc
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
For battery you should add your new xml to batterycontroller.smali with your lidroid toggle switch string I will check that!!
After that lock in Tw_super_statusbar.xml
You can add new Tw_statusbar.xml and new new expanded.xml and in tw_statusbar_expanded.xml
You have tw_statusbar_expanded_header.xml
You can make your aosp layouts and added to new Tw_super_statusbar.xml
Tw_super_statusbar.xml is same controller
Look into the Tw_super_statusbar.xml
I can't access to my pc now!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium

Biftor said:
For battery you should add your new xml to batterycontroller.smali with your lidroid toggle switch string I will check that!!
After that lock in Tw_super_statusbar.xml
You can add new Tw_statusbar.xml and new new expanded.xml and in tw_statusbar_expanded.xml
You have tw_statusbar_expanded_header.xml
You can make your aosp layouts and added to new Tw_super_statusbar.xml
Tw_super_statusbar.xml is same controller
Look into the Tw_super_statusbar.xml
I can't access to my pc now!
Goodluck
Armin.
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
Thankyou for your time and will give me something to look into I only have a hour or 2 pc time a day and its hard for me to hunt blind. Thanks again
Sent from my GT-I9100 using xda premium

Related

Developing

I am slowly getting through the basics of apk decompiling, Editing, Debugging & recompiling.
Using tools like Apk Tool, Winrar, Notepad++ Winmerge, Adb .
first time I have touched an android or even done any kind of stuff like this was Early August 2012. So not long at all, now i have a question to the more experienced Devs. Eg; Lets just say I dont want increasing ringtone How do you pin point where in the apk to start editing i mean there are heaps of files its like looking for a needle in a haystack. One way I came close and pin pointed it is using a previous made mod and then used Winmerge to compare the differences, Problem is the differences in these to Apks is not just the Increasing ringtone, so when I winmerged them it picked out out the other differences Now this deffinatley narrowed it down. I have a feeling it has something to do with the Callnotifier.xml is this the only Xml?
Also Lets just say you dont have another apk to compare it to , how to you find out this stuff..
Another thing is I want to cook up a rom, but the way I want to do it is modding my own rom untill I am happy with it and then creating something like a nandroid without my personal data. then making it flashable for people. What tools is best used for this? I was thinking editing my nandroid and adding it to a cwm flash. but I think there is an easier way.
Thanks for you help
btemtd said:
I am slowly getting through the basics of apk decompiling, Editing, Debugging & recompiling.
Using tools like Apk Tool, Winrar, Notepad++ Winmerge, Adb .
first time I have touched an android or even done any kind of stuff like this was Early August 2012. So not long at all, now i have a question to the more experienced Devs. Eg; Lets just say I dont want increasing ringtone How do you pin point where in the apk to start editing i mean there are heaps of files its like looking for a needle in a haystack. One way I came close and pin pointed it is using a previous made mod and then used Winmerge to compare the differences, Problem is the differences in these to Apks is not just the Increasing ringtone, so when I winmerged them it picked out out the other differences Now this deffinatley narrowed it down. I have a feeling it has something to do with the Callnotifier.xml is this the only Xml?
Also Lets just say you dont have another apk to compare it to , how to you find out this stuff..
Another thing is I want to cook up a rom, but the way I want to do it is modding my own rom untill I am happy with it and then creating something like a nandroid without my personal data. then making it flashable for people. What tools is best used for this? I was thinking editing my nandroid and adding it to a cwm flash. but I think there is an easier way.
Thanks for you help
Click to expand...
Click to collapse
In my point of view,this is no shortcut,this is experience have been modified in the way
correct me,maybe i'm wrong!
Disable Increasing ringtone @secphone.apk\com\android\phone\Ringer$1.smali
delete every this code
Code:
setstreamvolume
thanks for your input.....It would now be good to have someone that has done this mod, to give us the 100% answer and maybe some extra advise/tips/tricks from their personal book of knowledge
Try the Android hacking forum on XDA
http://forum.xda-developers.com/
jje
I search, search and search the net for info on the mod i want. Some can be difficult to find the guides for.
If searching fails ill ask a dev for some info.
When it comes to comparing apks I will only do that if I know where the change needs to be then trial and error
Sent from my GT-I9305 using XDA Premium HD app
btemtd said:
thanks for your input.....It would now be good to have someone that has done this mod, to give us the 100% answer and maybe some extra advise/tips/tricks from their personal book of knowledge
Click to expand...
Click to collapse
I've 100% done this mod
disable increasing ringtone
http://www.mediafire.com/?72la46qi95j1d7b
leamoor said:
I've 100% done this mod
disable increasing ringtone
http://www.mediafire.com/?72la46qi95j1d7b
Click to expand...
Click to collapse
is this Disable Increasing ONLY mod?
And could you let me know what files inside the Secphone.apk you edited just for curiosty? was it the one file you stated above? Or did you port this mod?
btemtd said:
is this Disable Increasing ONLY mod?
And could you let me know what files inside the Secphone.apk you edited just for curiosty? Or did you port this mod?
Click to expand...
Click to collapse
yes,only disable Increasing ringtone!
this is exactly what i said @#2
decompile secphone/smali/com/android/phone/Ringer$1
delete red sentences
Code:
#setter for: Lcom/android/phone/Ringer;->mOriginRingtoneVolume:I
invoke-static {v1, v2}, Lcom/android/phone/Ringer;->access$702(Lcom/android/phone/Ringer;I)I
.line 571
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
[COLOR="Red"]invoke-virtual {v1, v6, v4, v5}, Landroid/media/AudioManager;->setStreamVolume(III)V[/COLOR]
.line 573
const/4 v1, 0x7
const-wide/16 v2, 0x7d0
invoke-virtual {p0, v1, v2, v3}, Lcom/android/phone/Ringer$1;->sendEmptyMessageDelayed(IJ)Z
.line 578
:cond_4
:goto_2
invoke-virtual {v0}, Landroid/media/Ringtone;->play()V
.line 579
iget-object v2, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
monitor-enter v2
.line 580
:try_start_1
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mFirstRingStartTime:J
invoke-static {v1}, Lcom/android/phone/Ringer;->access$900(Lcom/android/phone/Ringer;)J
move-result-wide v3
const-wide/16 v5, 0x0
cmp-long v1, v3, v5
if-gez v1, :cond_5
.line 581
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
move-result-wide v3
#setter for: Lcom/android/phone/Ringer;->mFirstRingStartTime:J
invoke-static {v1, v3, v4}, Lcom/android/phone/Ringer;->access$902(Lcom/android/phone/Ringer;J)J
.line 583
:cond_5
monitor-exit v2
goto/16 :goto_0
:catchall_0
move-exception v1
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v1
.line 546
:catchall_1
move-exception v1
:try_start_2
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
throw v1
.line 563
:cond_6
invoke-virtual {v0, v5}, Landroid/media/Ringtone;->setRepeat(Z)V
goto :goto_1
.line 574
:cond_7
const-string v1, "extra_ringer"
invoke-static {v1}, Lcom/android/phone/PhoneFeature;->hasFeature(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_4
.line 575
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mExtraRinger:Lcom/android/phone/ExtraRinger;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$800(Lcom/android/phone/Ringer;)Lcom/android/phone/ExtraRinger;
move-result-object v1
invoke-virtual {v1}, Lcom/android/phone/ExtraRinger;->startExtraRinger()V
goto :goto_2
.line 589
:pswitch_2
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
const-string v2, "mRingHandler: PLAY_TTS..."
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
.line 591
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v2, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v2, v2, Lcom/android/phone/Ringer;->mContext:Landroid/content/Context;
invoke-static {v2, v4}, Lcom/android/phone/CallTextToSpeech;->getInstance(Landroid/content/Context;I)Lcom/android/phone/CallTextToSpeech;
move-result-object v2
#setter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1, v2}, Lcom/android/phone/Ringer;->access$1002(Lcom/android/phone/Ringer;Lcom/android/phone/CallTextToSpeech;)Lcom/android/phone/CallTextToSpeech;
.line 592
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mRingHandler:Landroid/os/Handler;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1100(Lcom/android/phone/Ringer;)Landroid/os/Handler;
move-result-object v1
if-eqz v1, :cond_0
.line 593
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mRingHandler:Landroid/os/Handler;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1100(Lcom/android/phone/Ringer;)Landroid/os/Handler;
move-result-object v1
const/4 v2, 0x5
invoke-virtual {v1, v2}, Landroid/os/Handler;->removeMessages(I)V
goto/16 :goto_0
.line 598
:pswitch_3
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
const-string v2, "mRingHandler: STOP_RING..."
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
.line 599
iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
.end local v0 #r:Landroid/media/Ringtone;
check-cast v0, Landroid/media/Ringtone;
.line 600
.restart local v0 #r:Landroid/media/Ringtone;
if-eqz v0, :cond_9
.line 602
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1000(Lcom/android/phone/Ringer;)Lcom/android/phone/CallTextToSpeech;
move-result-object v1
if-eqz v1, :cond_8
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1000(Lcom/android/phone/Ringer;)Lcom/android/phone/CallTextToSpeech;
move-result-object v1
invoke-virtual {v1}, Lcom/android/phone/CallTextToSpeech;->IsSpeakingTts()Z
move-result v1
if-eqz v1, :cond_8
.line 603
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$1000(Lcom/android/phone/Ringer;)Lcom/android/phone/CallTextToSpeech;
move-result-object v1
invoke-virtual {v1}, Lcom/android/phone/CallTextToSpeech;->stopTts()V
.line 604
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#setter for: Lcom/android/phone/Ringer;->mCallTextToSpeech:Lcom/android/phone/CallTextToSpeech;
invoke-static {v1, v8}, Lcom/android/phone/Ringer;->access$1002(Lcom/android/phone/Ringer;Lcom/android/phone/CallTextToSpeech;)Lcom/android/phone/CallTextToSpeech;
.line 606
:cond_8
invoke-virtual {v0}, Landroid/media/Ringtone;->stop()V
.line 610
:goto_3
invoke-virtual {p0}, Lcom/android/phone/Ringer$1;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-virtual {v1}, Landroid/os/Looper;->quit()V
goto/16 :goto_0
.line 608
:cond_9
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "- STOP_RING with null ringtone! msg = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
goto :goto_3
.line 614
:pswitch_4
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "RETURN_ORIGIN_VOLUME: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-object v3, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mOriginRingtoneVolume:I
invoke-static {v3}, Lcom/android/phone/Ringer;->access$700(Lcom/android/phone/Ringer;)I
move-result v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
#calls: Lcom/android/phone/Ringer;->log(Ljava/lang/String;Z)V
invoke-static {v1, v2, v4}, Lcom/android/phone/Ringer;->access$400(Lcom/android/phone/Ringer;Ljava/lang/String;Z)V
.line 615
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
iget-object v2, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mOriginRingtoneVolume:I
invoke-static {v2}, Lcom/android/phone/Ringer;->access$700(Lcom/android/phone/Ringer;)I
move-result v2
[COLOR="Red"] invoke-virtual {v1, v6, v2, v5}, Landroid/media/AudioManager;->setStreamVolume(III)V[/COLOR]
.line 616
const-string v1, "extra_ringer"
invoke-static {v1}, Lcom/android/phone/PhoneFeature;->hasFeature(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_0
.line 617
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
#getter for: Lcom/android/phone/Ringer;->mExtraRinger:Lcom/android/phone/ExtraRinger;
invoke-static {v1}, Lcom/android/phone/Ringer;->access$800(Lcom/android/phone/Ringer;)Lcom/android/phone/ExtraRinger;
I am so confused now as i just tried to decompile the same secphone.apk as i did before which worked, it also worked now but it gave this message
with your apk and my own something like could not decode replacing by false value: drawable *****bla bla/calll video icon.png
My apk said could not find 9patch chunk in file and all of a sudden it is doing this i did nothing!! each apk repeated this message with a few differnet files. Now how and why would it do this for no reason. it has always decompiled flawlessly. now it seems like there are missing files weirddd.
PS how did you locate that line, It would be almost in possible to search for that with no leads
btemtd said:
I am so confused now as i just tried to decompile the same secphone.apk as i did before which worked, it also worked now but it gave this message
with your apk and my own something like could not decode replacing by false value: drawable *****bla bla/calll video icon.png
My apk said could not find 9patch chunk in file and all of a sudden it is doing this i did nothing!! each apk repeated this message with a few differnet files. Now how and why
Click to expand...
Click to collapse
This is the method i from i9000 alreay know(i decompile some devs mod and fround it)
What version apktool are you used?Modifed code apk some apktool can not compile and decompile them
maybe for this reason,i used two sets of apktool to compile and decompile jelly bean apk
i'm use apktool 1.4.3 to decomplie,apktool 1.4.2 to compile,hope this can help.
but the funny thing this only just happened now it showing these weird errors, but the file is decompiled , but before it nevr showed these errors. They are more like files or certain things not found... not really errors. thanks anyways
here is the screen shot of these weird messages i have NEVER seen them before when decompiing does anyone know what they are, and why is it saying that
OK I removed that line that you said setstreamvolume etc,,,,,, now check out what happened wen i tried to compile it. I really dont get it now this would of happened if i didnt remove the line as it already happened even when i decompiled
has anyone seen this
btemtd said:
OK I removed that line that you said setstreamvolume etc,,,,,, now check out what happened wen i tried to compile it. I really dont get it now this would of happened if i didnt remove the line as it already happened even when i decompiled
has anyone seen this
Click to expand...
Click to collapse
Because your apktool can not compile modified apk
try use another apktool compile them
upload your apk here,for test compile and decompile
leamoor said:
Because your apktool can not compile modified apk
try use another apktool compile them
upload your apk here,for test compile and decompile
Click to expand...
Click to collapse
but this seems too strange i already made a mod 5x6 touchwiz layout... and it compiled perfectt.
Do you think i hould get the latest apktool?
btemtd said:
but this seems too strange i already made a mod 5x6 touchwiz layout... and it compiled perfectt.
Do you think i hould get the latest apktool?
Click to expand...
Click to collapse
Yes,this is strange,but sometimes happen ,
apktool I will suggestion you get the latest one!

[HOW-TO] [4.1.2] [LSJ] JB AOSP LockScreen

Hello xda'ers,
I post this thread to help people who want JB AOSP LockScreen in their I9100...
How to:
1. Decompile android.policy.jar and go to smali/com/android/internal/policy/impl/KeyguardViewManager.smali
Green line - add
Red line - delete
Code:
or-int/lit8 v1, v1, 0x8
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->privateFlags:I
.line 144
[COLOR="Green"] iget v1, v0, Landroid/view/WindowManager$LayoutParams;->systemUiVisibility:I
or-int/lit8 v1, v1, 0x8
iput v1, v0, Landroid/view/WindowManager$LayoutParams;->systemUiVisibility:I
const/4 v2, 0x1
iput v2, v0, Landroid/view/WindowManager$LayoutParams;->screenOrientation:I
.line 145[/COLOR]
const-string v1, "Keyguard"
invoke-virtual {v0, v1}, Landroid/view/WindowManager$LayoutParams;->setTitle(Ljava/lang/CharSequence;)V
[COLOR="Red"].line 145[/COLOR]
[COLOR="Green"].line 146[/COLOR]
iput-object v0, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mWindowLayoutParams:Landroid/view/WindowManager$LayoutParams;
.line 147
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mViewManager:Landroid/view/ViewManager;
iget-object v2, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mKeyguardHost:Landroid/widget/FrameLayout;
invoke-interface {v1, v2, v0}, Landroid/view/ViewManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
.line 150
.end local v0 #lp:Landroid/view/WindowManager$LayoutParams;
.end local v4 #flags:I
.end local v8 #stretch:I
:cond_5
if-eqz v6, :cond_9
.line 152
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mWindowLayoutParams:Landroid/view/WindowManager$LayoutParams;
[COLOR="Green"]const/4 v2, 0x1[/COLOR]
[COLOR="Red"]const/4 v2, 0x4[/COLOR]
iput v2, v1, Landroid/view/WindowManager$LayoutParams;->screenOrientation:I
.line 158
Code:
.line 155
.end local v9 #visFlags:I
:cond_9
:try_start_1
iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardViewManager;->mWindowLayoutParams:Landroid/view/WindowManager$LayoutParams;
[COLOR="Green"]const/4 v2, 0x1[/COLOR]
[COLOR="Red"]const/4 v2, 0x5[/COLOR]
iput v2, v1, Landroid/view/WindowManager$LayoutParams;->screenOrientation:I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto/16 :goto_0
.line 110
.end local v6 #enableScreenRotation:Z
.end local v7 #res:Landroid/content/res/Resources;
:catchall_0
move-exception v1
monitor-exit p0
throw v1
.line 184
2. Go to smali/com/android/internal/policy/impl/LockPatternKeyguardView.smali
Code:
.method createLockScreen()Landroid/view/View;
.locals 6
.prologue
.line 1319
[COLOR="Red"]new-instance v0, Lcom/android/internal/policy/impl/sec/CircleLockScreen;[/COLOR]
[COLOR="Green"]new-instance v0, Lcom/android/internal/policy/impl/LockScreen;[/COLOR]
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mContext:Landroid/content/Context;
iget-object v2, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
iget-object v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockPatternUtils:Lcom/android/internal/widget/LockPatternUtils;
iget-object v4, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mUpdateMonitor:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;
iget-object v5, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mKeyguardScreenCallback:Lcom/android/internal/policy/impl/KeyguardScreenCallback;
[COLOR="Red"]invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/sec/CircleLockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V[/COLOR]
[COLOR="Green"]invoke-direct/range {v0 .. v5}, Lcom/android/internal/policy/impl/LockScreen;-><init>(Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/widget/LockPatternUtils;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;)V[/COLOR]
.line 1325
.local v0, lockView:Landroid/view/View;
invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->initializeTransportControlView(Landroid/view/View;)V
.line 1326
return-object v0
.end method
Code:
.method public isGlanceScreenVisible()Z
.locals 2
.prologue
.line 633
const-string v0, "LockPatternKeyguardView"
const-string v1, "isGlanceScreenVisible()"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 634
const/4 v0, 0x0
return v0
.end method
[COLOR="Red"].method protected onConfigurationChanged(Landroid/content/res/Configuration;)V
.locals 4
.parameter "newConfig"
.prologue
.line 1006
invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->getResources()Landroid/content/res/Resources;
move-result-object v0
.line 1007
.local v0, resources:Landroid/content/res/Resources;
const v1, 0x111001f
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getBoolean(I)Z
move-result v1
iput-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mShowLockBeforeUnlock:Z
.line 1008
iput-object p1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mConfiguration:Landroid/content/res/Configuration;
.line 1010
invoke-direct {p0}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->saveWidgetState()V
.line 1013
iget-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mIsWaterRipple:Z
if-eqz v1, :cond_0
.line 1014
const/4 v1, 0x0
iput-boolean v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreenIsReady:Z
.line 1015
const-string v1, "LockPatternKeyguardView"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "!!! mLockScreenIsReady = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
iget-boolean v3, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mLockScreenIsReady:Z
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 1019
:cond_0
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mRecreateRunnable:Ljava/lang/Runnable;
invoke-virtual {p0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->removeCallbacks(Ljava/lang/Runnable;)Z
.line 1020
const-string v1, "LockPatternKeyguardView"
const-string v2, "recreating lockscreen because config changed"
invoke-static {v1, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 1021
iget-object v1, p0, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->mRecreateRunnable:Ljava/lang/Runnable;
invoke-virtual {p0, v1}, Lcom/android/internal/policy/impl/LockPatternKeyguardView;->post(Ljava/lang/Runnable;)Z
.line 1022
return-void
.end method[/COLOR]
.method protected onDetachedFromWindow()V
.locals 2
Recompile android.policy.jar
it's all
Download flashable zip for Deodex XXLSJ: View attachment JB_AOSP_LockScreen.zip
Cool! Can make CWM flashable zip for deodex?
dancer810 said:
Cool! Can make CWM flashable zip for deodex?
Click to expand...
Click to collapse
Ok...post flashable zip later
Sent from my GT-I9100 using xda premium
Why did you change the other files? I added this as an extra lock purely by calling lockscreen instead of circle like you did in createlockscreen method.
What purpose does changing manager etc serve?
Sent from my GT-I9100 using Tapatalk 2
Goldieking said:
Why did you change the other files? I added this as an extra lock purely by calling lockscreen instead of circle like you did in createlockscreen method.
What purpose does changing manager etc serve?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
If I not edit keyguardviewmanager.smali LockScreen is not displayed correctly in landscape mode
Sent from my GT-I9100 using xda premium
Ahhh ok. I have lock rotation disabled.
Sent from my GT-I9100 using Tapatalk 2
Looks pretty cool to me..
Goldieking said:
Ahhh ok. I have lock rotation disabled.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
There is no desire to help with porting SMotion(Quick glance, Palm swipe to capture and other) with Note2 to S2 ?
EDIT: Nothing. You already did it. Thanks
Thank you!
ok then
this is a solution for lockscreen freeze right?
apidroid said:
ok then
this is a solution for lockscreen freeze right?
Click to expand...
Click to collapse
Lol no. It happens on all locks and even with no lock
Sent from my GT-I9100 using Tapatalk 2
---------- Post added at 08:57 PM ---------- Previous post was at 08:56 PM ----------
mythtrandyr said:
There is no desire to help with porting SMotion(Quick glance, Palm swipe to capture and other) with Note2 to S2 ?
Click to expand...
Click to collapse
I will once im finished with my rom.
Sent from my GT-I9100 using Tapatalk 2
Thx for the mod. Work on neatrom!
Gesendet von meinem GT-I9100 mit Tapatalk 2
May I know if wheater panel work on this lockscreen?
crisgen said:
May I know if wheater panel work on this lockscreen?
Click to expand...
Click to collapse
I'm not sure I understand you correctly..
Rephrase your question
mythtrandyr said:
I'm not sure I understand you correctly..
Rephrase your question
Click to expand...
Click to collapse
I think he would say if we can have weather in lockscreen as in stock one...
Sent from my GT-I9100
thank you very sir. this is a simple guide but perfect :good:
i done it on XWLSW.

[TUTORIAL]How To Add Advance Power Menu[3/1/2014]

Happy New Year...
This is my first tutorial of 2014. Today I will teach
you how to add Reboot and Recovery option in Power Menu.
Make sure you have a basic knowledge on how to compile/decompile .apk/.jar files.
framework-res.apk
Decompile framework-res.apk
[*]Navigate to framework-res.apk\res\drawable-hdpi
[*]Extract all the files from PNG folder (Download From Attachment)
[*]Navigate to framework-res.apk\res\values
[*]Open strings.xml file in file editor
[*]Add these line at the end
Code:
<string name="reboot">Reboot</string>
<string name="reboot_progress">Rebooting…</string>
<string name="reboot_confirm">Your phone will reboot</string>
<string name="recovery">Recovery</string>
<string name="recovery_progress">Rebooting into recovery…</string>
<string name="recovery_confirm">Your phone will reboot into recovery</string>
[*]Save the file
[*]Recompile your framework-res.apk
[*]Decompile framework-res.apk which you have recompiled a moment ago
[*]Navigate to framework-res.apk\res\values
[*]Open public.xml file in file editor
framework.jar
Decompile framework.jar
[*]Navigate to framework.jar\smali\com\android\internal\app
[*]Open ShutdownThread.smali file in file editor
[*]Search for .field private static mReboot:Z and add the red line only
Code:
.field private static final TAG:Ljava/lang/String; = "ShutdownThread"
[COLOR="Red"].field public static mReboot:I[/COLOR]
.field private static mReboot:Z
[*]Search for .local v1, pd:Landroid/app/ProgressDialog; and add the red lines only
Code:
.line 184
.local v1, pd:Landroid/app/ProgressDialog;
[COLOR="Red"]sget v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v2, v5, :cond_1
if-nez v2, :cond_2[/COLOR]
const v2, 0x104014a
[COLOR="Red"]goto :goto_1
:cond_1
const v2, name="reboot"
goto :goto_1
:cond_2
const v2, name="recovery"
:goto_1[/COLOR]
invoke-virtual {p0, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
[*]Search for invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setTitle(Ljava/lang/CharSequenceV and add the red lines only
Code:
move-result-object v2
invoke-virtual {v1, v2}, Landroid/app/ProgressDialog;->setTitle(Ljava/lang/CharSequence;)V
.line 185
[COLOR="Red"]sget v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v2, v5, :cond_3
if-nez v2, :cond_4[/COLOR]
const v2, 0x104014e
[COLOR="Red"]goto :goto_2
:cond_3
const v2, name="reboot_progress"
goto :goto_2
:cond_4
const v2, name="recovery_progress"
:goto_2[/COLOR]
invoke-virtual {p0, v2}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
move-result-object v2
[*]Search for .catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_0 and change the blue lines only
Code:
invoke-virtual {v2}, Landroid/os/PowerManager$WakeLock;->acquire()V
:try_end_1
.catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_0
.line 208
[COLOR="Blue"]:goto_3[/COLOR]
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
iput-object v6, v2, Lcom/android/internal/app/ShutdownThread;->mScreenWakeLock:Landroid/os/PowerManager$WakeLock;
.line 209
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
iget-object v2, v2, Lcom/android/internal/app/ShutdownThread;->mPowerManager:Landroid/os/PowerManager;
invoke-virtual {v2}, Landroid/os/PowerManager;->isScreenOn()Z
move-result v2
[COLOR="Blue"]if-eqz v2, :cond_5[/COLOR]
.line 211
:try_start_2
[*]Search for .catch Ljava/lang/SecurityException; {:try_start_2 .. :try_end_2} :catch_1 and change the blue lines only
Code:
:try_end_2
.catch Ljava/lang/SecurityException; {:try_start_2 .. :try_end_2} :catch_1
.line 222
[COLOR="Blue"]:cond_5
:goto_4[/COLOR]
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
new-instance v3, Lcom/android/internal/app/ShutdownThread$2;
[*]Search for .end local v0 #e:Ljava/lang/SecurityException; and change the blue lines only
Code:
iput-object v6, v2, Lcom/android/internal/app/ShutdownThread;->mCpuWakeLock:Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]goto :goto_3[/COLOR]
.line 215
.end local v0 #e:Ljava/lang/SecurityException;
:catch_1
move-exception v0
.line 216
.restart local v0 #e:Ljava/lang/SecurityException;
const-string v2, "ShutdownThread"
const-string v3, "No permission to acquire wake lock"
invoke-static {v2, v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 217
sget-object v2, Lcom/android/internal/app/ShutdownThread;->sInstance:Lcom/android/internal/app/ShutdownThread;
iput-object v6, v2, Lcom/android/internal/app/ShutdownThread;->mScreenWakeLock:Landroid/os/PowerManager$WakeLock;
[COLOR="Blue"]goto :goto_4[/COLOR]
.end method
.method public static reboot(Landroid/content/Context;Ljava/lang/String;Z)V
[*]Search for .method public static rebootOrShutdown(ZLjava/lang/StringV and change the blue line only
Code:
.end method
.method public static rebootOrShutdown(ZLjava/lang/String;)V
.locals 5
.parameter "reboot"
.parameter "reason"
.prologue
.line 403
[COLOR="Blue"]if-eqz p0, :cond_3[/COLOR]
.line 404
const-string v2, "ShutdownThread"
[*]Search for invoke-static {p1}, Landroid/os/Power;->reboot(Ljava/lang/StringV and add the red lines and change the blue lines only
Code:
:try_start_0
invoke-static {p1}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
:try_end_0
[COLOR="Blue"].catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1[/COLOR]
.line 428
:goto_0
const-string v2, "ShutdownThread"
const-string v3, "Performing low-level shutdown..."
invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
[COLOR="Red"]sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :cond_0
const/4 v2, 0x2
if-eq v1, v2, :cond_1[/COLOR]
.line 429
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 430
return-void
[COLOR="Red"]:cond_0
const-string/jumbo v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:cond_1
:try_start_1
new-instance v1, Ljava/io/File;
const-string v4, "/cache/recovery/boot"
invoke-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 442
.restart local v1
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v4
if-nez v4, :cond_2
.line 443
invoke-virtual {v1}, Ljava/io/File;->createNewFile()Z
:try_end_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
:catch_0
:cond_2
const-string/jumbo v4, "recovery"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void[/COLOR]
.line 407
[COLOR="Blue"]:catch_1[/COLOR]
move-exception v0
.line 408
.local v0, e:Ljava/lang/Exception;
const-string v2, "ShutdownThread"
[*]Search for .end local v0 #e:Ljava/lang/Exception; and change the blue lines only
Code:
.line 412
.end local v0 #e:Ljava/lang/Exception;
[COLOR="Blue"]:cond_3[/COLOR]
new-instance v1, Landroid/os/Vibrator;
invoke-direct {v1}, Landroid/os/Vibrator;-><init>()V
.line 414
.local v1, vibrator:Landroid/os/Vibrator;
const-wide/16 v2, 0x1f4
[COLOR="Blue"]:try_start_2[/COLOR]
invoke-virtual {v1, v2, v3}, Landroid/os/Vibrator;->vibrate(J)V
[COLOR="Blue"]:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3[/COLOR]
.line 422
:goto_1
const-wide/16 v2, 0x1f4
[COLOR="Blue"]:try_start_3[/COLOR]
invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V
[COLOR="Blue"]:try_end_3
.catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_3} :catch_2[/COLOR]
goto :goto_0
.line 423
[COLOR="Blue"]:catch_2[/COLOR]
move-exception v2
goto :goto_0
.line 415
[COLOR="Blue"]:catch_3[/COLOR]
move-exception v0
.line 417
.restart local v0 #e:Ljava/lang/Exception;
[*]Search for .local v1, longPressBehavior:I and change the blue lines only
Code:
.line 106
.local v1, longPressBehavior:I
const/4 v3, 0x2
[COLOR="Blue"]if-ne v1, v3, :cond_4[/COLOR]
const v2, 0x1040150
.line 110
.local v2, resourceId:I
:goto_1
const-string v3, "ShutdownThread"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Notifying thread to start shutdown longPressBehavior="
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 112
[COLOR="Blue"]if-eqz p1, :cond_7[/COLOR]
.line 113
new-instance v0, Lcom/android/internal/app/ShutdownThread$CloseDialogReceiver;
[*]Search for invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/ContextV and add the red lines only
Code:
new-instance v3, Landroid/app/AlertDialog$Builder;
invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
[COLOR="Red"]const v5, 0x1
sget v4, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v4, v5, :cond_2
if-nez v4, :cond_3[/COLOR]
const v4, 0x104014a
[COLOR="Red"]goto :goto_2
:cond_2
const v4, name="reboot"
goto :goto_2
:cond_3
const v4, name="recovery"
:goto_2[/COLOR]
invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;
move-result-object v3
[*]Search for invoke-virtual {v3}, Landroid/app/AlertDialog;->show()V and add the red lines and change the blue lines only
Code:
sget-object v3, Lcom/android/internal/app/ShutdownThread;->sConfirmDialog:Landroid/app/AlertDialog;
invoke-virtual {v3}, Landroid/app/AlertDialog;->show()V
[COLOR="Blue"]goto/16 :goto_0[/COLOR]
.line 102
.end local v0 #closer:Lcom/android/internal/app/ShutdownThread$CloseDialogReceiver;
.end local v1 #longPressBehavior:I
.end local v2 #resourceId:I
:catchall_0
move-exception v3
:try_start_1
monitor-exit v4
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v3
.line 106
.restart local v1 #longPressBehavior:I
[COLOR="Blue"]:cond_4[/COLOR]
[COLOR="Red"]const v3, 0x1
sget v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
if-eq v2, v3, :cond_5
if-nez v2, :cond_6[/COLOR]
const v2, 0x104014f
[COLOR="Blue"]goto/16 :goto_1[/COLOR]
[COLOR="Red"]:cond_5
const v2, name="reboot_confirm"
goto/16 :goto_1
:cond_6
const v2, name="recovery_confirm"
goto/16 :goto_1[/COLOR]
.line 132
.restart local v2 #resourceId:I
[COLOR="Blue"]:cond_7[/COLOR]
invoke-static {p0}, Lcom/android/internal/app/ShutdownThread;->beginShutdownSequence(Landroid/content/Context;)V
goto/16 :goto_0
.end method
[*]Now you have to find the names below
Code:
name="reboot"
name="recovery"
name="reboot_progress"
name="recovery_progress"
name="reboot_confirm"
name="recovery_confirm"
[*]You have to replace these name with hex ids from public.xml which is already opened in file editor
[*]For example search for name="reboot" in public.xml file
[*]In my case I have got
Code:
<public type="string" name="reboot" id="[COLOR="Blue"]0x01040548[/COLOR]" />
[*]The blue marked part is hex. Copy the hex and remove the 3rd digit. So 0x01040548 will be 0x1040548
[*]Now search for name="reboot" in ShutdownThread.smali file and replace name="reboot" with 0x1040548
[*]Do the same for other names too
[*]Save the file
[*]Recompile your framework.jar
android.policy.jar
Decompile android.policy.jar
[*]Navigate to android.policy.jar\smali\com\android\internal\policy\impl
[*]Extract all the files from SMALI folder (Download From Attachment)
[*]Open GlobalActions$2.smali file in file editor
[*]Search for invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$100(Lcom/android/internal/policy/impl/GlobalActionsLandroid/content/Context; and add the red lines only
Code:
#getter for: Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/android/internal/policy/impl/GlobalActions;->access$100(Lcom/android/internal/policy/impl/GlobalActions;)Landroid/content/Context;
move-result-object v0
const/4 v1, 0x1
[COLOR="Red"]const/4 p0, 0x0
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I[/COLOR]
invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V
.line 171
return-void
.end method
[*]Save the file
[*]Open GlobalActions.smali file in file editor
[*]Search for .method private createDialog()Landroid/app/AlertDialog; and change the blue lines only
Code:
.end method
.method private createDialog()Landroid/app/AlertDialog;
[COLOR="Blue"].locals 12[/COLOR]
.prologue
const/4 v9, 0x1
[*]Search for invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V and add the red lines only
Code:
invoke-direct {v1, p0, v2, v3}, Lcom/android/internal/policy/impl/GlobalActions$2;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
[COLOR="Red"]iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "reboot"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-nez v10, :cond_0
const-string v1, "reboot_system"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-eqz v10, :cond_1
:cond_0
const-string v1, "ic_lock_reboot"
const-string v2, "drawable"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v11
if-eqz v11, :cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$7;
invoke-direct {v1, p0, v11, v10}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:cond_1
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "recovery"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-nez v10, :cond_2
const-string v1, "recovery_system"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v10
if-eqz v10, :cond_3
:cond_2
const-string v1, "ic_lock_recovery"
const-string v2, "drawable"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v11
if-eqz v11, :cond_3
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
new-instance v1, Lcom/android/internal/policy/impl/GlobalActions$8;
invoke-direct {v1, p0, v11, v10}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z[/COLOR]
.line 183
[COLOR="Red"]:cond_3[/COLOR]
iget-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mItems:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/android/internal/policy/impl/GlobalActions;->mAirplaneModeOn:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction;
[*]Save the file
[*]Recompile your android.policy.jar
Please Note :
Take backup before doing anything.
Use Notepad++ to edit files.
Please read the tutorial properly befor editing files.
If you found any mistake in this tutorial then please let me know.
this is the one thing our xperia community was lacking of. Now it's fulfilled thanks for this :good:
Good Job bro
Thank u
WOW, really a nice guide, perfectly explained & noob Friendly
keep it coming
Great guide, will really help many people, not just to Arc owners but to all Xperia family
saqib nazm said:
this is the one thing our xperia community was lacking of. Now it's fulfilled thanks for this :good:
Click to expand...
Click to collapse
3andala said:
Good Job bro
Thank u
Click to expand...
Click to collapse
stanlin salu said:
WOW, really a nice guide, perfectly explained & noob Friendly
keep it coming
Click to expand...
Click to collapse
Ayush Singh said:
Great guide, will really help many people, not just to Arc owners but to all Xperia family
Click to expand...
Click to collapse
Thanks for these encouraging comments. You all are cordially welcome...
Awesome Guide
This is how its done!
Understanding that smali was a pain in the a**.
You just made this simpler to copy paste
Thank you!
Wonderful work man..
You ll soon be a great themer. Thanks for keeping 2011 xperias forum alive..:thumbup:
Cheers,
Vatsal
Nice work mate.. Nice write up. Way to go. Keep it up and hoping to see more of your works
Sent from my GT-P3110 using Tapatalk
Nice tutorial @BDFreak ...
Can you tell which apktool is recommended for use in this tutorial ?
karandpr said:
Nice tutorial @BDFreak ...
Can you tell which apktool is recommended for use in this tutorial ?
Click to expand...
Click to collapse
I am using THIS one. But I think you can use old versions too...
Ayush Singh said:
Great guide, will really help many people, not just to Arc owners but to all Xperia family
Click to expand...
Click to collapse
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
devilmaycry2020 said:
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
Click to expand...
Click to collapse
I meant all Xperia 2011 family
devilmaycry2020 said:
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
Click to expand...
Click to collapse
Would be the same for atleast the 2011 Xperia Line up
devilmaycry2020 said:
this is for Arc only, another xperia phone will be different .
in my TX, framework.jar dont have ShutdownThread.smali but it in services.jar
Click to expand...
Click to collapse
It's obvious that this will be different in 2012-13 xperias. But the main idea is quite same, like if you know where you have to look for
Nice tut! Its also not very complicated
i dont understand about "change the blue lines only" .what does it mean ? if my own different change it to same as yours ?
devilmaycry2020 said:
i dont understand about "change the blue lines only" .what does it mean ? if my own different change it to same as yours ?
Click to expand...
Click to collapse
Exactly. I mean yes...
BDFreak said:
Exactly. I mean yes...
Click to expand...
Click to collapse
i dont think so because i've modded this before and it work great but the only i missed was when i choose reboot or recovery it didn't show "Reboot" or "Recovery" tittle but only Power off. could you help me. thanks
basically my mod for TX as same as your but have some different
i can send to you all relate files for modding this, could you take a look to it. thanks
devilmaycry2020 said:
i dont think so because i've modded this before and it work great but the only i missed was when i choose reboot or recovery it didn't show "Reboot" or "Recovery" tittle but only Power off. could you help me. thanks
basically my mod for TX as same as your but have some different
i can send to you all relate files for modding this, could you take a look to it. thanks
Click to expand...
Click to collapse
Actually this tutorial is for 2011 Xperia phones. I didn't try in newer phones yet. But I will give it a try in my SP when times allow me.

[GUIDE] How To Add -Apps Edge/Contacts/Task Panel - For Galaxy S5 - UX Port Roms [MM]

Hello Xda Users,
This Guide is for Adding Edge Panels To Latest Samsung UX Based Roms
What's Required:
*Apktool for Decompiling/Recompiling jars
*Notepad++ For Editing Smalis
Steps:
1. Open your " system/etc/floating_feature.xml " with Notepad++
And
Find The Following Code:
Code:
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>
REPLACE IT WITH:
Code:
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>[COLOR="DarkGreen"]people,task,circle,panel[/COLOR]</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>
<SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>[COLOR="darkgreen"]-1[/COLOR]</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>
Now you must use ApkTool to decompile/Make Changes to smalis/Recompile
*Use Tickle My Android Apktool or Any other Apktool
2. Now Decompile your " Services.jar "
Find Red Text and Add Green Lines:
LOCATE TO:
smali/com/android/server/SystemServer.smali
Click to expand...
Click to collapse
Open up "SystemServer.smali" with Notepad++
SEARCH FOR:
Code:
[COLOR="Red"]const-string/jumbo v6, "spengestureservice"[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
const-string/jumbo v6, "spengestureservice"
new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
move-object/from16 v0, v218
invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
:try_end_85
.catch Ljava/lang/Throwable; {:try_start_85 .. :try_end_85} :catch_53
:goto_57
const-string v6, "2"
invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v192
const/4 v6, 0x2
move/from16 v0, v192
if-lt v0, v6, :cond_32
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.aod.AODManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;
:cond_32
:try_start_86
const-string v6, "SystemServer"
Now add the Green lines:
Code:
const-string/jumbo v6, "spengestureservice"
new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
move-object/from16 v0, v218
invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
:try_end_85
.catch Ljava/lang/Throwable; {:try_start_85 .. :try_end_85} :catch_53
:goto_57
[COLOR="DarkGreen"]move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.cocktailbar.CocktailBarManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;[/COLOR]
const-string v6, "2"
invoke-static {v6}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Integer;->intValue()I
move-result v192
const/4 v6, 0x2
move/from16 v0, v192
if-lt v0, v6, :cond_32
move-object/from16 v0, p0
iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
const-string v7, "com.android.server.aod.AODManagerService"
invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;
:cond_32
:try_start_86
const-string v6, "SystemServer"
LOCATE TO:
smali/com/android/server/power/PowerManagerService.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"]const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: false"[/COLOR]
REPLACE IT WITH:
Code:
[COLOR="darkgreen"]const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: true"[/COLOR]
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService$6.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
return-void
.end method
Now Replace the Whole method with this one:
Code:
[COLOR="darkgreen"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3700(Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v3
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v4
move-object v1, p1
move-object v2, p2
move v5, p3
move-object v6, p4
move v7, p5
invoke-virtual/range {v0 .. v7}, Lcom/android/server/notification/NotificationManagerService;->enqueueEdgeNotificationInternal(Ljava/lang/String;Ljava/lang/String;IIILandroid/os/Bundle;I)V
return-void
.end method[/COLOR]
In Same Smali
SEARCH FOR:
Code:
[COLOR="Red"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 7
return-void
.end method
Now Replace the Whole method with this one:
Code:
[COLOR="darkgreen"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 7
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3700(Ljava/lang/String;)V
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v0
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v1
const/4 v3, 0x1
const/4 v4, 0x0
const-string v5, "cancelNotificationWithTag"
move v2, p4
move-object v6, p1
invoke-static/range {v0 .. v6}, Landroid/app/ActivityManager;->handleIncomingUser(IIIZZLjava/lang/String;Ljava/lang/String;)I
move-result p4
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
move-result v1
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
move-result v2
move-object v3, p1
move v4, p2
move-object v5, p3
move v6, p4
invoke-virtual/range {v0 .. v6}, Lcom/android/server/notification/NotificationManagerService;->removeEdgeNotificationInternal(IILjava/lang/String;ILandroid/os/Bundle;I)V
return-void
.end method[/COLOR]
Done
3. Now Recompile your " services.jar "
4. *Now Decompile your " Framework.jar "
LOCATE TO:
smali/android/app/NotificationManager.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
.method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
.locals 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
return-void
.end method
Now add the Green lines:
Code:
.method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
[COLOR="DarkGreen"].locals 4[/COLOR]
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
[COLOR="darkgreen"]new-instance v0, Landroid/app/NotificationManager$EdgeNotificationManager;
invoke-direct {v0, p1}, Landroid/app/NotificationManager$EdgeNotificationManager;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroid/app/NotificationManager;->mEdgeNotificationManager:Landroid/app/NotificationManager$EdgeNotificationManager;[/COLOR]
return-void
.end method
LOCATE TO:
smali/android/app/SystemServiceRegistry.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"]const-string/jumbo v1, "multiwindow_facade"[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
Code:
const-string/jumbo v1, "multiwindow_facade"
const-class v2, Lcom/samsung/android/multiwindow/MultiWindowFacade;
new-instance v3, Landroid/app/SystemServiceRegistry$83;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$83;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
const-string v1, "2"
invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x2
if-lt v0, v1, :cond_1
const-string v1, "AODManagerService"
const-class v2, Lcom/samsung/android/aod/AODManager;
new-instance v3, Landroid/app/SystemServiceRegistry$87;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$87;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
:cond_1
const-string/jumbo v1, "spengestureservice"
Now add the Green lines:
Code:
const-string/jumbo v1, "multiwindow_facade"
const-class v2, Lcom/samsung/android/multiwindow/MultiWindowFacade;
new-instance v3, Landroid/app/SystemServiceRegistry$83;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$83;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
[COLOR="darkgreen"]const-string v1, "CocktailBarService"
const-class v2, Lcom/samsung/android/cocktailbar/CocktailBarManager;
new-instance v3, Landroid/app/SystemServiceRegistry$85;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$85;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V[/COLOR]
const-string v1, "2"
invoke-static {v1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
move-result v0
const/4 v1, 0x2
if-lt v0, v1, :cond_1
const-string v1, "AODManagerService"
const-class v2, Lcom/samsung/android/aod/AODManager;
new-instance v3, Landroid/app/SystemServiceRegistry$87;
invoke-direct {v3}, Landroid/app/SystemServiceRegistry$87;-><init>()V
invoke-static {v1, v2, v3}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
:cond_1
const-string/jumbo v1, "spengestureservice"
5. Now Download
The " SystemServiceRegistry$85.smali " and
Add it to " framework.jar\smali\android\app "
Download From Here ->> View attachment SystemServiceRegistry$85.rar
Done
6. Now Recompile your " framework.jar "
7. Download the Attached
System Folder For " Edge Apks, Permissions Xmls "
Add them to correct location into your System Folder
Download From Here ->> https://www.androidfilehost.com/?fid=457095661767134120
Thank you
If Anyone has Access code Error, then only follow this post #2
Then Match the Access Code in the two smalis as below
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService$6.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
See the Red Code, the access code should be same in NotificationManagerService.smali Also
Code:
.method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
.locals 8
# invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->[COLOR="Red"][B]access$3700[/B][/COLOR](Ljava/lang/String;)V
iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
LOCATE TO:
smali/com/android/server/notification/NotificationManagerService.smali
Click to expand...
Click to collapse
SEARCH FOR:
Code:
[COLOR="Red"].method static synthetic access$3700(Ljava/lang/String;)V
[/COLOR]
YOU SHOULD SEE SOMETHING LIKE THIS:
See the Red Code, the access code is same as in NotificationManagerService$6.smali
Code:
.method static synthetic [COLOR="Red"][B]access$3700[/COLOR][/B](Ljava/lang/String;)V
.locals 0
invoke-static {p0}, Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
return-void
.end method
Also make sure that access$3700 access right on NotificationManagerService
Hi mate @yash92duster, do you know how to make the background to blur? really needed... thank's before
Axl_Rush said:
Hi mate @yash92duster, do you know how to make the background to blur? really needed... thank's before
Click to expand...
Click to collapse
What background?
Explain more
Where you needed blur?
yash92duster said:
What background?
Explain more
Where you needed blur?
Click to expand...
Click to collapse
I mean, i want to make this blur. I have change in system/lib/libsurface.so but my phone dont even boot.
Axl_Rush said:
I mean, i want to make this blur. I have change in system/lib/libsurface.so but my phone dont even boot.
Click to expand...
Click to collapse
if you have S5 then that blur lib will work
it works fine on S5 G900F and G900H - no issues
if you tried this mod and blur lib on different device
specify the device model, stock rom or port rom
if you had tried on A Series device then native blur wont work
if J series also in some variants it wont work
so give more info so that i can see if i can help
yash92duster said:
if you have S5 then that blur lib will work
it works fine on S5 G900F and G900H - no issues
if you tried this mod and blur lib on different device
specify the device model, stock rom or port rom
if you had tried on A Series device then native blur wont work
if J series also in some variants it wont work
so give more info so that i can see if i can help
Click to expand...
Click to collapse
Oh I see.. Well ok my friend...
My device is J700F running on stock MM Indonesia firmware
I appreciate for your work and for your help my friend.. thank U
and sorry for my bad english
Axl_Rush said:
Oh I see.. Well ok my friend...
My device is J700F running on stock MM Indonesia firmware
I appreciate for your work and for your help my friend.. thank U
and sorry for my bad english
Click to expand...
Click to collapse
you can try to enable the EDGE PANELS in your J Series Device
but
Blur lib wont work on J series ( Many tried and failed )
only way for you is to use ACER BLUR to edge panels
Check for acer blur in
https://forum.xda-developers.com/showthread.php?t=2799050
https://forum.xda-developers.com/ga...ified-development/devs-helpingd-devs-t3321679
yash92duster said:
you can try to enable the EDGE PANELS in your J Series Device
but
Blur lib wont work on J series ( Many tried and failed )
only way for you is to use ACER BLUR to edge panels
Check for acer blur in
https://forum.xda-developers.com/showthread.php?t=2799050
https://forum.xda-developers.com/ga...ified-development/devs-helpingd-devs-t3321679
Click to expand...
Click to collapse
Ok i will try it.... thank's mate :good::good:
@yash92duster : this method really working on pure stock S5 MM? I tried many times but always FC when swipe... from another guide also..and tried your framework ans services.jar that you share on that guide, but still FC.
maybe something missing on pure stock. If anyone have success on pure stock, please share the framework & service.jar, me and others will greatly appreciate it.
thanks working fine in AJ A8 Rom
@yash92duster
nice guide, very well done. I was wondering if this would work on Nougat 7.X.X too...
I am trying to port that Galaxy Tab A, but when I decompile framework.jar, nothing really...in fact, its framework.jar is only 14kb size..so probably Samsung move that stuff somewhere in Galaxy Tab A...no idea..
jazzespresso said:
@yash92duster
nice guide, very well done. I was wondering if this would work on Nougat 7.X.X too...
I am trying to port that Galaxy Tab A, but when I decompile framework.jar, nothing really...in fact, its framework.jar is only 14kb size..so probably Samsung move that stuff somewhere in Galaxy Tab A...no idea..
Click to expand...
Click to collapse
Bad deodex
Lol
yash92duster said:
Bad deodex
Lol
Click to expand...
Click to collapse
oh crap...yeah saw -- Framework\arm folder is still there...funny though, it deodexed some, but not all...
what deodex utility you use usually?
jazzespresso said:
oh crap...yeah saw -- Framework\arm folder is still there...funny though, it deodexed some, but not all...
what deodex utility you use usually?
Click to expand...
Click to collapse
Use
Assayyed
It works perfectly till 7.0
7.1.1 also works in assayyed but for framework folder alone use flumics tool
yash92duster said:
Use
Assayyed
It works perfectly till 7.0
7.1.1 also works in assayyed but for framework folder alone use flumics tool
Click to expand...
Click to collapse
yeah I used Assayyed cook my ROM, so assumed it deodexed fine, then found out today, it is not...
it seems like, build ROM with Assayyed Kitchen, and switch over to flumics tool to deodex and copy back to Assayyed and finish the build
I got all figured out now..
following your guide up until framework.jar, smali/android/app/SystemServiceRegistry.smali, and search for "multiwindow_facade", which does not find in the file (found all other though) but i added Green lines change in the file anyway...
have not tested yet, we will see if it works:good:
jazzespresso said:
yeah I used Assayyed cook my ROM, so assumed it deodexed fine, then found out today, it is not...
it seems like, build ROM with Assayyed Kitchen, and switch over to flumics tool to deodex and copy back to Assayyed and finish the build
I got all figured out now..
following your guide up until framework.jar, smali/android/app/SystemServiceRegistry.smali, and search for "multiwindow_facade", which does not find in the file (found all other though) but i added Green lines change in the file anyway...
have not tested yet, we will see if it works:good:
Click to expand...
Click to collapse
Better ask in right place
This is not kitchen thread:silly:
yash92duster said:
Better ask in right place
This is not kitchen thread:silly:
Click to expand...
Click to collapse
wasn't really kitchen question, read my post again
Screenshots?

[Devs][Guide] Add Reboot Safestrap Recovery to power menu with toggle

Credits goes to @sagitt67 and @daxgirl .
Credits for toggle goes to @tdunham main guide is here and @asc1977 for the guide here big thanks to them.
In this Guide we'll modify framework-res.apk and services.jar
framework-res.apk:
Download framework-res.zip that is attached below, extract and copy it in your decompiled framework-res.apk folder
now open res/values/arrays.xml
find <string-array name="config_globalActionsList"> and add blue
Code:
<string-array name="config_globalActionsList">
<item>power</item>
<item>datamode</item>
<item>airplane</item>
<item>restart</item>
<item>lockdown</item>
<item>bugreport</item>
<item>users</item>
[COLOR="blue"]<item>rebootsafestrap</item>[/COLOR]
<item>emergencymode</item>
<item>subscreen</item>
</string-array>
now go to res/values/strings.xml at very end and add blue
Code:
<string name="wifi_extender_notification_title">Wi-Fi extender on</string>
<string name="wifi_extender_notification_message">Tap here to set up.</string>
<string name="config_tspstate_threshold" />
[COLOR="blue"]<string name="tw_ic_do_restart_safestrap">Reboot Safestrap</string>[/COLOR]
</resources>
done with framework-res.apk recompile
Services.jar:
download services.zip that is attached below, extract and copy it in your decompiled services.jar folder
open smali/com/android/server/policy/GlobalActions.smali
add blue line in # instance fields
Code:
.field private mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="blue"].field private mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[/COLOR]
.field mRestartIconResId:I
find .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;
add blue
Code:
if-eqz v4, :cond_27b
const v4, 0x1080a58
.line 1642
:goto_11c
const v6, 0x104070e
.line 1639
move-object/from16 v0, p0
invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$21;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
[COLOR="Blue"]new-instance v4, Lcom/android/server/policy/GlobalActions$99;
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_restart_safestrap"
const-string v2, "drawable"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v5
move-object/from16 v0, p0
iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const-string v1, "tw_ic_do_restart_safestrap"
const-string v2, "string"
const-string v3, "android"
invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
move-result v6
move-object/from16 v0, p0
invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$99;-><init>(Lcom/android/server/policy/GlobalActions;II)V
move-object/from16 v0, p0
iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]
.line 1688
invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
move-result-object v4
const-string/jumbo v5, "CscFeature_Common_ConfigBikeMode"
invoke-virtual {v4, v5}, Lcom/samsung/android/feature/SemCscFeature;->getString(Ljava/lang/String;)Ljava/lang/String;
Now next part is tricky, add lines in blue and changes in green
Code:
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
.line 1767
new-instance v4, Lcom/android/server/policy/GlobalActions$BugReportAction;
move-object/from16 v0, p0
invoke-direct {v4, v0}, Lcom/android/server/policy/GlobalActions$BugReportAction;-><init>(Lcom/android/server/policy/GlobalActions;)V
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
[COLOR="blue"]const/16 v6, 0x100
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;[/COLOR]
const/16 v6, [COLOR="Green"]0x200[/COLOR] [COLOR="Red"]#before was 0x100[/COLOR]
const/4 v7, 0x1
move-object/from16 v0, p0
invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
now search for const-string/jumbo v4, "silent" and add blue line above it and green parts must match orange part
Code:
const-string/jumbo v4, "emergencymode"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_381
.line 1835
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="orange"]goto_2d9[/COLOR] #look that green part match this
.line 1836
:cond_381
[COLOR="Blue"]const-string/jumbo v4, "rebootsafestrap"
invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_3da
move-object/from16 v0, p0
iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto/16 :[COLOR="Green"]goto_2d9 [/COLOR]
:cond_3da[/COLOR]
const-string/jumbo v4, "silent"
next part is missing in Android 7 services.jar so we need to readd it for mod
find .method private addCustomDialogItems(Landroid/graphics/drawable/BitmapDrawable;Ljava/lang/String;Landroid/content/Intent;ILjava/util/ArrayListZ
add this above method
Code:
[COLOR="Blue"].method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
.locals 1
iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
return-object v0
.end method[/COLOR]
thats it, recompile and push to phone
Note: For me one time i get after reboot a loop of phone restarts, only one time happens. If it happen i solved it with wipe dalvik-cache and cache
Credits goes to @TheDriller for this part in this guide
Note: no need to change the code in GlobalActions$99.smali already done
GlobalActions$99.smali:
find .method public onPress()V and replace blue lines with red one
Code:
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
[COLOR="Red"]const-string v1, "recovery"
invoke-virtual {v0, v1}, Landroid/os/PowerManager;->reboot(Ljava/lang/String;)V[/COLOR]
to
Code:
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
[COLOR="Blue"]const-string v1, "su -c echo 1 > /data/.recovery_mode && su -c reboot now"
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;[/COLOR]
Wow thia makes things so much easier
Sent from my SM-G950U using Tapatalk
This is different on the Note 8 isn't it? I got as far as the services jar .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; I input the blue text that was mentioned but I'm curious why in your sample does it not have .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; before the blue text?
The Second batch of code with the green changes I had no idea where to input that and I couldn't find const/16 v6, 0x100 to change to 200 either
The step after that I was genuinely lost nothing matched what you had in your sample I felt like I was so close to getting it.
Thanks
SM-N950W
dillweedinc said:
This is different on the Note 8 isn't it? I got as far as the services jar .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; I input the blue text that was mentioned but I'm curious why in your sample does it not have .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog; before the blue text?
The Second batch of code with the green changes I had no idea where to input that and I couldn't find const/16 v6, 0x100 to change to 200 either
The step after that I was genuinely lost nothing matched what you had in your sample I felt like I was so close to getting it.
Thanks
Click to expand...
Click to collapse
I will check them soon.
Maybe @JavixKGD can help you as he asked for the mod and he got it working on Note 8.
It is important to specify that this mod only applies to Nougat, it needs to be updated for Oreo.
I am using Nougat 7.1.1 on a note 8 sm-n950w with me's samfail firmware bl1 - I sent him a message thanks! I see it built into another firmware that is available but id rather build it into me's samfail firmy since there is some issues to be wrinkled out in the other custom firmwares.
This thread is more currently active than the Safestrap one. I'm just here looking for more information on how to flash ROMS while keeping your others. Like do I activate that slot then start flashing and do you know if it's possible to use Slick ROM as one of the slots? I'm rooted with Partcyborg on bootloader v2
xSl33p said:
This thread is more currently active than the Safestrap one. I'm just here looking for more information on how to flash ROMS while keeping your others. Like do I activate that slot then start flashing and do you know if it's possible to use Slick ROM as one of the slots? I'm rooted with Partcyborg on bootloader v2
Click to expand...
Click to collapse
Dont quote me on this but im pretty sure the slots arent 100% functional yet you can do backups and restore your system flash zips ect. , I know this thread is more active but you should really stick with the topic of the thread, your question would get answered there.
I got an answer from the guy you recommended afaneh92 thanks, it looks like I need to place the smalis in a different folder as they go over the limit, I dont have time right now but he also sent me his services .jar so I can see what the difference is I got some learning to do.
Thanks
Canadian Dilly.
dillweedinc said:
Dont quote me on this but im pretty sure the slots arent 100% functional yet you can do backups and restore your system flash zips ect. , I know this thread is more active but you should really stick with the topic of the thread, your question would get answered there.
I got an answer from the guy you recommended afaneh92 thanks, it looks like I need to place the smalis in a different folder as they go over the limit, I dont have time right now but he also sent me his services .jar so I can see what the difference is I got some learning to do.
Thanks
Canadian Dilly.
Click to expand...
Click to collapse
Im working on update and some fixes for the mod, then will rewrite this guide in the Note 8 section.

Categories

Resources