[GUIDE][AOSP][CM12/12.1]How To Port Fully Featured Sony Phonebook,Dialer & InCallUI - Sony Cross-Device General

[GUIDE][AOSP][CM12/12.1]How To Port Fully Featured Sony Phonebook,Dialer & InCallUI
Quick Guide To Port Xperia Z5,Z4,Z3,Z2,Z1,Z etc. Fully Featured Sony Phonebook,Dialer & InCallUI . For Many Phones Running AOSP,CM12,CM12.1. I Hope Everyone Like & Enjoy It.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Guide & Download Link Is On 2nd Post
Screenshots On 3rd Post
Cheers U Can Post Screenshots Too & I'll Add To This Thread
If U Like My Work Dont Forgot To Press Thanks Button

Guide For AOSP,CM12,CM12.1
1. Extract framework.jar Decompile classes.dex
2. Go to android/telephony/TelephonyManager.smali add this method before .method public handlePinMmi
PHP:
.method public getVoicemailString()Ljava/lang/String;
.registers 3
.prologue
.line 3592
iget-object v0, p0, Landroid/telephony/TelephonyManager;->mContext:Landroid/content/Context;
if-nez v0, :cond_6
const/4 v0, 0x0
.line 3593
:goto_5
return-object v0
:cond_6
iget-object v0, p0, Landroid/telephony/TelephonyManager;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x1040051
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_5
.end method
3.To Port InCallUI add this method in android/telecom/Call.smali
PHP:
.method public getNotificationCode()I
.registers 2
.prologue
.line 415
iget v0, p0, Landroid/telecom/Call;->mNotificationCode:I
return v0
.end method
.method public getNotificationType()I
.registers 2
.prologue
.line 410
iget v0, p0, Landroid/telecom/Call;->mNotificationType:I
return v0
.end method
& Add This Instance Fields
PHP:
.field private mNotificationCode:I
.field private mNotificationType:I
4. Go To android/telecom/Phone.smali Add This Field at line 55
PHP:
.field private mSomcInCallAdapterExtend:Landroid/telecom/SomcInCallAdapterExtend;
5. Add This method before .method public switchToOtherActiveSub
PHP:
.method public final somcGetCommand(ILjava/lang/String;)Ljava/lang/String;
.registers 5
.parameter "commandId"
.parameter "option"
.prologue
.line 386
const/4 v0, 0x0
.line 387
.local v0, result:Ljava/lang/String;
iget-object v1, p0, Landroid/telecom/Phone;->mSomcInCallAdapterExtend:Landroid/telecom/SomcInCallAdapterExtend;
if-eqz v1, :cond_b
.line 388
iget-object v1, p0, Landroid/telecom/Phone;->mSomcInCallAdapterExtend:Landroid/telecom/SomcInCallAdapterExtend;
invoke-virtual {v1, p1, p2}, Landroid/telecom/SomcInCallAdapterExtend;->somcGetCommand(ILjava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 389
:cond_b
return-object v0
.end method
6. Download & Extract SomcInCallAdapterExtend.zip from attachments move SomcInCallAdapterExtend.smali to android/telecom folder
7. Recompile & Move Modify classes.dex In framework.jar
Done (Remember Superusermod & Deodex Rom Require)
Now CM12.1,AOSP Users Can Flash This http://www.mediafire.com/download/eokbox8h6otz5s5/EnfriarZ5Dialer.zip

Screenshots

How to and where to edit the files

@xperiaz2 awesome , thank yoooou so much for sharing this to us...
---------- Post added at 02:23 PM ---------- Previous post was at 01:51 PM ----------
Decompile Framework.apk
and add
<string name="config_voicemail_string" /> to string.xml
<public type="string" name="config_voicemail_string" id="#Number#" /> to Public.xml
Number in Public is like this 0x01040054 #Number is a example
You need to replace number in following code like this 0x1040054
PHP:
.method public getVoicemailString()Ljava/lang/String;
.registers 3
.prologue
.line 3592
iget-object v0, p0, Landroid/telephony/TelephonyManager;->mContext:Landroid/content/Context;
if-nez v0, :cond_6
const/4 v0, 0x0
.line 3593
:goto_5
return-object v0
:cond_6
iget-object v0, p0, Landroid/telephony/TelephonyManager;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v1, 0x1040054
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v0
goto :goto_5
.end method
add this code before .method public handlePinMmi

wolfmannight said:
@xperiaz2 awesome , thank yoooou so much for sharing this to us...
---------- Post added at 02:23 PM ---------- Previous post was at 01:51 PM ----------
Decompile Framework.apk
and add
<string name="config_voicemail_string" /> to string.xml
<public type="string" name="config_voicemail_string" id="#Number#" /> to Public.xml
Number in Public is like this 0x01040054 #Number is a example
You need to replace number in following code like this 0x1040054
Click to expand...
Click to collapse
most welcome bro yeah correct :good:

I cant find .method public switchToOtherActiveSub in Phone.smali

To CM12.1 users: the 'telecom' folder can be found at /smali_classes2/android (at least in my case).

wolfmannight said:
I cant find .method public switchToOtherActiveSub in Phone.smali
Click to expand...
Click to collapse
i think we should add this also
PHP:
.method public switchToOtherActiveSub(Ljava/lang/String;Z)V
.registers 4
.param p1, "subId" # Ljava/lang/String;
.param p2, "retainLch" # Z
.prologue
.line 287
iget-object v0, p0, Landroid/telecom/Phone;->mInCallAdapter:Landroid/telecom/InCallAdapter;
invoke-virtual {v0, p1, p2}, Landroid/telecom/InCallAdapter;->switchToOtherActiveSub(Ljava/lang/String;Z)V
.line 288
return-void
.end method
in the end

wolfmannight said:
I cant find .method public switchToOtherActiveSub in Phone.smali
Click to expand...
Click to collapse
its last line if not there add that method at end
.method public switchToOtherActiveSub(Ljava/lang/String;Z)V
.registers 4
.parameter "subId"
.parameter "retainLch"
.prologue
.line 276
iget-object v0, p0, Landroid/telecom/Phone;->mInCallAdapter:Landroid/telecom/InCallAdapter;
invoke-virtual {v0, p1, p2}, Landroid/telecom/InCallAdapter;->switchToOtherActiveSub(Ljava/lang/String;Z)V
.line 277
return-void
.end method
wolfmannight said:
i think we should add this also
Click to expand...
Click to collapse
yes

@xperiaz2 Where should I put the fields in Call.smali? In static or instance fields?

elmkzgirxp said:
@xperiaz2 Where should I put the fields in Call.smali? In static or instance fields?
Click to expand...
Click to collapse
instance fields

If Compile error try this attachment with latest smali jar
or
use smali jar 1.3.3 with developer added attchment

wolfmannight said:
If Compile error try this attachment with latest smali jar
or
use smali jar 1.3.3 with developer added attchment
Click to expand...
Click to collapse
try using romtoolspc no error

Hi, awesome work man! You're like on of the first porting this Can you port Conversations as well?

Deleunes254 said:
Hi, awesome work man! You're like on of the first porting this Can you port Conversations as well?
Click to expand...
Click to collapse
wow thanks alot bro yeah i will port Conversations too

You serious? Alright Awesome!!!!

I'm getting errors when smaling Phone.smali.
Code:
framework.jar.out\smali_classes2\android\telecom\Phone.smali[828,4] Error for input '.parameter': Invalid directive
framework.jar.out\smali_classes2\android\telecom\Phone.smali[829,4] Error for input '.parameter': Invalid directive
framework.jar.out\smali_classes2\android\telecom\Phone.smali[828,15] mismatched input '"commandId"' expecting END_METHOD_DIRECTIVE
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/telecom/Phone.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:71)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:55)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:372)
at brut.androlib.Androlib.buildNonDefaultSources(Androlib.java:316)
at brut.androlib.Androlib.build(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)

My framework.jar is only 309 bytes what should I do?
m on cm12.1 lollipop 5.1.1

@xperiaz2
I've flashed this in AICP for Huashan (Xperia SP) and I'm getting contacts FC. Taken a log of the fc by repeatedly opening dialer.
The thing is, contacts opens up and can use it for a while ( Google account contacts are not there) . I try to click on import contacts and it FC's.
As for the dialer, it doesn't even open up.
So the log has a NoSuchMethodError .
Here is the link to the whole log.
http://hastebin.com/upurexegun.vhdl
Hope this helps you .

Related

[GUIDE] How to port SONY Small Apps to Any Device Cm Based Roms

SONY SMALL APPS FOR CM BASED ROM
1-STEP
decompile framework-res.apk
goto res/values/strings.xml and add these lines a the end
Code:
<string name="permlab_externalTaskSwitcher">Start as an external task switcher</string>
<string name="permdesc_externalTaskSwitcher">Allows the application to be an external task switcher replacing the native task switcher</string>
<string name="permlab_smallapp">Small application overlay</string>
<string name="permdesc_smallapp">Allows running movable small applications on top of other applications.</string>
open AndroidManifest.xml
and add the following lines
Code:
<permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:label="@string/permlab_systemAlertWindow" android:description="@string/permdesc_systemAlertWindow" android:protectionLevel="dangerous" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" />
and
Code:
<permission android:name="com.sony.smallapp.permission.SMALLAPP" android:label="@string/permlab_smallapp" android:description="@string/permdesc_smallapp" android:protectionLevel="dangerous" />
like this shown in the pic..
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
done recompile the framework-res.apk
2-STEP
decompile android.policy.jar
and open com\android\internal\policy\impl\PhoneWindowManager.smal
and add the red marked lines
Code:
.field static final RECENT_APPS_BEHAVIOR_DISMISS_AND_SWITCH:I = 0x3
.field static final RECENT_APPS_BEHAVIOR_EXIT_TOUCH_MODE_AND_SHOW:I = 0x1
.field static final RECENT_APPS_BEHAVIOR_SHOW_OR_DISMISS:I = 0x0
.field static final SHOW_PROCESSES_ON_ALT_MENU:Z = false
[COLOR="red"].field static final SHOW_STARTING_ANIMATIONS:Z = true ----------------------[COLOR="Blue"][B]add this line if u dont have[/B][/COLOR]
.field static final SMALLAPP_LAYER:I = 0x3[/COLOR]
.field public static final SYSTEM_DIALOG_REASON_ASSIST:Ljava/lang/String; = "assist"
.field public static final SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS:Ljava/lang/String; = "globalactions"
.field public static final SYSTEM_DIALOG_REASON_HOME_KEY:Ljava/lang/String; = "homekey"
.field public static final SYSTEM_DIALOG_REASON_KEY:Ljava/lang/String; = "reason"
.field public static final SYSTEM_DIALOG_REASON_RECENT_APPS:Ljava/lang/String; = "recentapps"
and find these lines in the same file.
Code:
[COLOR="Blue"].method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;)I
.locals 4
.parameter "attrs"
.prologue
const/4 v2, 0x0
.line 1588
iget v1, p1, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1590
.local v1, type:I
const/16 v3, 0x7d0
if-lt v1, v3, :cond_0
const/16 v3, 0xbb7
if-le v1, v3, :cond_1
.line 1622
:cond_0
:goto_0
return v2
.line 1594
:cond_1
const/4 v0, 0x0
.line 1595
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
.line 1614
const-string v0, "android.permission.INTERNAL_SYSTEM_WINDOW"
.line 1616
:goto_1
:sswitch_0
if-eqz v0, :cond_0
.line 1617
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v3, v0}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_0
.line 1619
const/4 v2, -0x8
goto :goto_0
.line 1611
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1612
goto :goto_1
.line 1595
nop
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0x7e7 -> :sswitch_0
.end sparse-switch
.end method[/COLOR]
no is the funny part replace all the above blue marked lines with the below red marked lines
Code:
[COLOR="red"].method public checkAddPermission(Landroid/view/WindowManager$LayoutParams;)I
.locals 4
.parameter "attrs"
.prologue
const/4 v2, 0x0
.line 1115
iget v1, p1, Landroid/view/WindowManager$LayoutParams;->type:I
.line 1117
.local v1, type:I
const/16 v3, 0x7d0
if-lt v1, v3, :cond_0
const/16 v3, 0xbb7
if-le v1, v3, :cond_1
.line 1152
:cond_0
:goto_0
return v2
.line 1121
:cond_1
const/4 v0, 0x0
.line 1122
.local v0, permission:Ljava/lang/String;
sparse-switch v1, :sswitch_data_0
.line 1144
const-string v0, "android.permission.INTERNAL_SYSTEM_WINDOW"
.line 1146
:goto_1
:sswitch_0
if-eqz v0, :cond_0
.line 1147
iget-object v3, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
invoke-virtual {v3, v0}, Landroid/content/Context;->checkCallingOrSelfPermission(Ljava/lang/String;)I
move-result v3
if-eqz v3, :cond_0
.line 1149
const/4 v2, -0x8
goto :goto_0
.line 1137
:sswitch_1
const-string v0, "android.permission.SYSTEM_ALERT_WINDOW"
.line 1138
goto :goto_1
.line 1141
:sswitch_2
const-string v0, "com.sony.smallapp.permission.SMALLAPP"
.line 1142
goto :goto_1
.line 1122
:sswitch_data_0
.sparse-switch
0x7d2 -> :sswitch_1
0x7d3 -> :sswitch_1
0x7d5 -> :sswitch_0
0x7d6 -> :sswitch_1
0x7d7 -> :sswitch_1
0x7da -> :sswitch_1
0x7db -> :sswitch_0
0x7dd -> :sswitch_0
0xbb5 -> :sswitch_2
0xbb6 -> :sswitch_2
.end sparse-switch
.end method[/COLOR]
save it..done now recompile the android.policy.jar
3-STEP
decompile framework.jar
add the whole sony folder (provided in the resources.zip attached below ) in classout/com
and recompile framework.jar
4-STEP
now u need to add some files in system/app
system/etc
system/framework
all the files are provided in resources.zip so just take them and add those files in ur flashable zip
5-STEP
once u flash the mod .u need an Slauncher or Small app launcher app to launch the small apps...download it from google play
so its done enjoy the smalls on cm based roms..
This is the screenshots from galaxy SL Running CM10 xperia themed..
some more SS of more small apps
ROM THREAD LINK with working small apps using this tutorial..
http://forum.xda-developers.com/showthread.php?t=1862705
This method is tested working on most xperia devices and GALAXY SL and also on CM9 , CM10 , PA , PACMAN
Also tested working CM10.1
Here is a video from CM10.1
might also work on Stock based FW but not tested
CREDITS
c3ma138 (for help , resources , app)
Its weird how smilies show up in tutorials instead of : permission... It becomes ermission
Anyways nice tutorial bro... The screens are of sony stock ROM... any screens of it running on CM?
And are the smallapps affected by CM themes too?
Edit: oops I missed the slauncher part. Got my answers.
predatOr said:
Its weird how smilies show up in tutorials instead of : permission... It becomes ermission
Anyways nice tutorial bro... The screens are of sony stock ROM... any screens of it running on CM?
And are the smallapps affected by CM themes too?
Edit: oops I missed the slauncher part. Got my answers.
Click to expand...
Click to collapse
The screenshots are from galaxy SL running cm10 xperia themed rom...
Sent from my SK17i using XDA Premium HD app
sandy7 said:
The screenshots are from galaxy SL running cm10 xperia themed rom...
Sent from my SK17i using XDA Premium HD app
Click to expand...
Click to collapse
So wait, it can run on Galaxy SL? Gonna try it on another based CM10. BTW, do you own a Galaxy SL?
Is it possible to make a flashable zip?
Yes please,CWM flashable zip!
i am getting some errors while compiling the framework-res.apk
Rich'Dawg' said:
So wait, it can run on Galaxy SL? Gonna try it on another based CM10. BTW, do you own a Galaxy SL?
Click to expand...
Click to collapse
no i dont own a Galaxy SL.....but the mod was test and reported working my friend Vasishta Reddy on his Galaxy SL
mateuszwon94 said:
Is it possible to make a flashable zip?
Click to expand...
Click to collapse
deniz2051 said:
Yes please,CWM flashable zip!
Click to expand...
Click to collapse
its a easy tutorial try it for ur self...if u guys can make it...upload me the framework-res.pak , framework.jar and android.policy.jar from ur rom ill make one cwm flashable when i have free time
Ashutos1997 said:
i am getting some errors while compiling the framework-res.apk
Click to expand...
Click to collapse
plz post the error log..
Nice tut bro....keep it up :good:
Best Regards,
AJ
Did this, when i tried to flash, it said error status 7. Any help?
Sent from my Sony Tablet S using xda app-developers app
jumper62 said:
Did this, when i tried to flash, it said error status 7. Any help?
Sent from my Sony Tablet S using xda app-developers app
Click to expand...
Click to collapse
Check ur update script in flashable zip..there might be a problem
sandy7 said:
Check ur update script in flashable zip..there might be a problem
Click to expand...
Click to collapse
I put it in a cm10.1 Rom zip that I am currently using and flash that but still error
Sent from my GT-S5830 using xda app-developers app
jumper62 said:
I put it in a cm10.1 Rom zip that I am currently using and flash that but still error
Sent from my GT-S5830 using xda app-developers app
Click to expand...
Click to collapse
Dont put it...it will end formating ur system...try any mod's flashable zip...
Sorry I forgot to make a flashable zip format...ill do that 1st in the morning..
Can it be based on other roms eg aokp parandroid??
Sent from my GT-S5830 using xda app-developers app
Awesome guide sandy7!
jumper62 said:
Can it be based on other roms eg aokp parandroid??
Sent from my GT-S5830 using xda app-developers app
Click to expand...
Click to collapse
Nope it cant be....see my signature in 'framework mods' thread...see 2 nd post in that take the small apps flashable zip format and use that...(but make sure to use cwm recovery it wont support twrp)
Small app for CM10.1 2011 xperia device.
Link thread: [MOD] SONY Small Apps for CM-10.1 [20130412-UNOFFICIAL] Xperia 2011 devices
Thanks sandy7!!!
lukakas said:
Small app for shu_cm-10.1-20130412-UNOFFICIAL
Thanks sandy7!!!
Click to expand...
Click to collapse
Hope u like it and managed to get it work...good job.
sandy7 said:
Hope u like it and managed to get it work...good job.
Click to expand...
Click to collapse
Thanks so much! It's my first official mod thanks for you guide!
[Q]
I Have PACman Rom Based On CM10 For Xperia Play :
I Opened My Rom Zip File > System > Framework > Framework-res.apk > res > .... But Theres No "values" In It !!
Should I Move Along or i have to do to the first step ?

[17.09.2014][MOD]Patched Sony Lifelog 2.1.A.0.10 | Unlimited data history | 6 rows

Hello everyone,
The stock Lifelog app allows only to look back 21 days. I patched the app so it displays all the data. For example: if you want to look back where you have been a year ago, it's finally possible. It's especially useful for those who use the location logging service.
Patched Sony Lifelog version: 2.1.A.0.10
Originally I was going to write an Xposed mode for this purpose, but unfortunately it would require to rewrite the whole function just from smali code and that overwhelmed my skills I'll keep updating this mod as soon as a new Lifelog version comes out. Enjoy!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I also attached a screenshot, if anyone is wondering how the patched version looks like. Sorry for the German language
Also, as a bonus I'm posting a version that has 6 rows of grid.
I just realized sony only allows us to keep 21 days record
WT..
why they are doing this? its ridiculous
Anyway, thanks for your effort!! please keep updating it
worth a 5 star!
kennethlam said:
I just realized sony only allows us to keep 21 days record
WT..
why they are doing this? its ridiculous
Anyway, thanks for your effort!! please keep updating it
worth a 5 star!
Click to expand...
Click to collapse
Exactly my thought. The funny thing is that Lifelog logs all the data, just the display is limited. Weird. Maybe because of some performance issues? The app is slow while browsing the data.
I realized the limit is there as I wanted to look back at my trip 3 months earlier... And it wasn't possible
Based on a request from an XDA member I did some research regarding the two additional modes that are available only for Sony devices - bicycle and travel. Unfortunately it's not possible to add those two mods for non-Sony devices, because they are based on libraries that are present only in Xperias.
Here is also some funny stuff: I found unfinished and unused code parts of following modes:
Code:
.field public static final BUS:Ljava/lang/String; = "BUS"
.field public static final CAR:Ljava/lang/String; = "CAR"
.field public static final TRAIN:Ljava/lang/String; = "TRAIN"
.field public static final ELEVATOR:Ljava/lang/String; = "ELEVATOR"
Those are functions that may be work-in-progress. So expect the Lifelog to get better and better overtime. Well, mainly for Sony devices...
Nice work, installing it now. Quick question for you guys: are you also having problems with your device not going in to deep sleep when lifelog 2.0.A.0.12 is running?
kistigun said:
Nice work, installing it now. Quick question for you guys: are you also having problems with your device not going in to deep sleep when lifelog 2.0.A.0.12 is running?
Click to expand...
Click to collapse
My device has no problem getting into deep sleep.
Jackos said:
My device has no problem getting into deep sleep.
Click to expand...
Click to collapse
you have a Z2 running stock(stanima activated?) On my Z1 the lifelog app is draining more battery then my screen since the 2.0.A.0.12 update...
kistigun said:
you have a Z2 running stock(stanima activated?) On my Z1 the lifelog app is draining more battery then my screen since the 2.0.A.0.12 update...
Click to expand...
Click to collapse
No matter if the STAMINA mode is on or off. The device always goes into deep sleep. Yes, I run stock (although heavy modified).
Jackos said:
No matter if the STAMINA mode is on or off. The device always goes into deep sleep. Yes, I run stock (although heavy modified).
Click to expand...
Click to collapse
ok, unfortunately mine isn't
Hoping your modified app will dain less. Nevertheless thanks for the mod!
kistigun said:
ok, unfortunately mine isn't
Hoping your modified app will dain less. Nevertheless thanks for the mod!
Click to expand...
Click to collapse
Hmm, seems like a ROM compatibility issue. Did you try after a hard reset? Just use the stock ROM, without modifications.
Something is not right.
@kistigun Actually this seem to be quite a widespread problem: http://talk.sonymobile.com/t5/Lifelog/Battery-drain/m-p/746519
Not only for the Z1.
Jackos said:
@kistigun Actually this seem to be quite a widespread problem: http://talk.sonymobile.com/t5/Lifelog/Battery-drain/m-p/746519
Not only for the Z1.
Click to expand...
Click to collapse
Thanks for the heads up!
Jackos said:
Based on a request from an XDA member I did some research regarding the two additional modes that are available only for Sony devices - bicycle and travel. Unfortunately it's not possible to add those two mods for non-Sony devices, because they are based on libraries that are present only in Xperias.
Click to expand...
Click to collapse
Hi dev,
thanks for research, you know what are the libraries used by LifeLog to enable the unique functions? thanks
vitor_hs said:
Hi dev,
thanks for research, you know what are the libraries used by LifeLog to enable the unique functions? thanks
Click to expand...
Click to collapse
According to the method isSonyDevice the LifeLog app searches for the "com.sony.device" library in package manager.
Ref:
Code:
.method public static isSonyDevice(Landroid/content/Context;)Z
.locals 7
.param p0, "context" # Landroid/content/Context;
.prologue
.line 17
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v5
.line 18
.local v5, "pm":Landroid/content/pm/PackageManager;
invoke-virtual {v5}, Landroid/content/pm/PackageManager;->getSystemSharedLibraryNames()[Ljava/lang/String;
move-result-object v4
.line 19
.local v4, "libNames":[Ljava/lang/String;
move-object v0, v4
.local v0, "arr$":[Ljava/lang/String;
array-length v2, v0
.local v2, "len$":I
const/4 v1, 0x0
.local v1, "i$":I
:goto_0
if-ge v1, v2, :cond_1
aget-object v3, v0, v1
.line 20
.local v3, "libName":Ljava/lang/String;
if-eqz v3, :cond_0
const-string v6, "com.sony.device"
invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_0
.line 21
const/4 v6, 0x1
.line 24
.end local v3 # "libName":Ljava/lang/String;
:goto_1
return v6
.line 19
.restart local v3 # "libName":Ljava/lang/String;
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 24
.end local v3 # "libName":Ljava/lang/String;
:cond_1
const/4 v6, 0x0
goto :goto_1
.end method
Jackos said:
According to the method isSonyDevice the LifeLog app searches for the "com.sony.device" library in package manager.
Ref:
Code:
.method public static isSonyDevice(Landroid/content/Context;)Z
.locals 7
.param p0, "context" # Landroid/content/Context;
.prologue
.line 17
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object v5
.line 18
.local v5, "pm":Landroid/content/pm/PackageManager;
invoke-virtual {v5}, Landroid/content/pm/PackageManager;->getSystemSharedLibraryNames()[Ljava/lang/String;
move-result-object v4
.line 19
.local v4, "libNames":[Ljava/lang/String;
move-object v0, v4
.local v0, "arr$":[Ljava/lang/String;
array-length v2, v0
.local v2, "len$":I
const/4 v1, 0x0
.local v1, "i$":I
:goto_0
if-ge v1, v2, :cond_1
aget-object v3, v0, v1
.line 20
.local v3, "libName":Ljava/lang/String;
if-eqz v3, :cond_0
const-string v6, "com.sony.device"
invoke-virtual {v3, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_0
.line 21
const/4 v6, 0x1
.line 24
.end local v3 # "libName":Ljava/lang/String;
:goto_1
return v6
.line 19
.restart local v3 # "libName":Ljava/lang/String;
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
.line 24
.end local v3 # "libName":Ljava/lang/String;
:cond_1
const/4 v6, 0x0
goto :goto_1
.end method
Click to expand...
Click to collapse
Thanks
Hahaha working !! , copy framework com.sony.device, and etc/permission from xperia z2 , set permission correct 644.
And clean data.
Samsung galaxy Note 3 Happy
vitor_hs said:
Thanks
Hahaha working !! , copy framework com.sony.device, and etc/permission from xperia z2 , set permission correct 644.
And clean data.
Samsung galaxy Note 3 Happy
Click to expand...
Click to collapse
Glad to hear that.
Ensure that it is properly working.
Can you port the app to 4.3 if possible?
Sent from my C5303 using XDA Premium 4 mobile app
TheSG said:
Can you port the app to 4.3 if possible?
Sent from my C5303 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
No, unfortunately I don't have time to do that.
New version released.
Changelog:
Power consumption improvements
Receive notification about achieved goals
Extended SEN account support
General bugfixing
Click to expand...
Click to collapse
My mod has been updated, download in first post.
vitor_hs said:
Thanks
Hahaha working !! , copy framework com.sony.device, and etc/permission from xperia z2 , set permission correct 644.
And clean data.
Samsung galaxy Note 3 Happy
Click to expand...
Click to collapse
Can you please post framework com.sony.device from z2, so I can also use full lifelog app (this is anoying)

[PORT][CM12] Official Xperia Z3 Lollipop SystemUI + Z3 Particle Effect Lockscreen

Introduction:-
Hey guys! Here's My New Port of Official Xperia Z3 Lollipop SystemUI and Xperia Z3 Particle Effect Lockscreen for devices running on CM12. I have also added Z3 Lollipop ClockWidgets and Z3 Media Sounds in this MOD. Hope you like it!
POST 1- Introduction And Features
POST 2- Screenshots
POST 3- Downloads And Instructions
POST 4- Guide To Create Superuser MOD
Disclaimer:-
* Your warranty is now void.
* I am not responsible for bricked devices, dead SD cards,thermonuclear war, or you getting fired because the alarm app failed!!
*Please make nandroid backup before flashing this as a precaution!
*Try this MOD at your own risk!
Click to expand...
Click to collapse
Features:-
Drag And Drop To Add Or Remove Quick Settings
Added New Animations
Z3 Particle Effect Lockscreen With 3 Different Clocks On Lockscreen
Xperia Z3 Lollipop Live Wallpaper
Xperia Z3 Lollipop ClockWidgets
Xperia Z3 Media Sounds
NOTE- DO NOT USE OR SHARE ANY PART OF MY WORK IN ANY ROM OR ANY MOD WITHOUT MY PERMISSION!!
Credits:-
@serajr for amazing guidance and precious help!
@vandroid7 for Z3 ClockWidgets fonts xmls
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Screenshots
Screenshots:-
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Downloads And Instructions
Instructions:-
Make sure you're on CyanogenMod 12.(I don't know if this PORT works on AOSP ROMs..Confirmation Required!!)
Make sure you have Superuser MOD installed.(Guide to create it is given on next post.)
Download My Z3 Lollipop System Apps Port Zip.
Go into Recovery.
Flash the downloaded zip.
Wipe Cache partition and ART/Dalvik-cache.
Reboot your phone.
Done!Enjoy The New Looks!!
Download:-
Z3 Lollipop System Apps Port
Bugs:-
Some of the Quick Settings tiles are not working.
NOTE:- To Get Particle Effect Lockscreen, Just Set Xperia Live Wallpaper as your default wallpaper.
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Guide To Create Superuser MOD
Superuser MOD disables the signature verification for all apps. After using this MOD you can install apps with different signature!
Requirements:-
Services.jar from your device.It's located in system/framework/
Apktool or some similar software.
Decompiling-Recompiling Knowledge.
Notepad++ for Editing XMLs.
Working brain and patience!!
STEP 1- Decompile services.jar using apktool.
STEP 2- Go to \smali\com\android\server\pm\
STEP 3- Find the file named PackageManagerService.smali and open it using Notepad++
STEP 4- Now Find this method:-
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v6, 0x1
const/4 v8, -0x3
const/4 v7, 0x0
.line 2955
if-nez p0, :cond_1
.line 2956
if-nez p1, :cond_0
.line 2988
:goto_0
return v6
.line 2956
:cond_0
const/4 v6, -0x1
goto :goto_0
.line 2961
:cond_1
if-nez p1, :cond_2
.line 2962
const/4 v6, -0x2
goto :goto_0
.line 2965
:cond_2
array-length v9, p0
array-length v10, p1
if-eq v9, v10, :cond_3
move v6, v8
.line 2966
goto :goto_0
.line 2970
:cond_3
array-length v9, p0
if-ne v9, v6, :cond_5
.line 2971
aget-object v6, p0, v7
aget-object v9, p1, v7
invoke-virtual {v6, v9}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_4
move v6, v7
goto :goto_0
:cond_4
move v6, v8
goto :goto_0
.line 2976
:cond_5
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 2977
.local v3, "set1":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, "arr$":[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, "len$":I
const/4 v1, 0x0
.local v1, "i$":I
:goto_1
if-ge v1, v2, :cond_6
aget-object v5, v0, v1
.line 2978
.local v5, "sig":Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2977
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 2980
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_6
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 2981
.local v4, "set2":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_2
if-ge v1, v2, :cond_7
aget-object v5, v0, v1
.line 2982
.restart local v5 # "sig":Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2981
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 2985
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_7
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_8
move v6, v7
.line 2986
goto :goto_0
:cond_8
move v6, v8
.line 2988
goto :goto_0
.end method
STEP 5- Shrink it to:-
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v7, 0x0
.line 2934
return v7
.end method
STEP 6- Now Find the lines given below:-
Code:
invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
if-nez v4, :cond_c
.line 5572
new-instance v4, Lcom/android/server/pm/PackageManagerException;
const/16 v5, -0x13
const-string v11, "Cannot install platform packages to user storage!"
invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
throw v4
.line 5578
.end local v89 # "s1":[Landroid/content/pm/Signature;
:cond_c
STEP 7- Change it to the Red line:-
Code:
invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
[B][COLOR="Red"]if-eqz[/COLOR][/B] v4, :cond_c
.line 5572
new-instance v4, Lcom/android/server/pm/PackageManagerException;
const/16 v5, -0x13
const-string v11, "Cannot install platform packages to user storage!"
invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
throw v4
.line 5578
.end local v89 # "s1":[Landroid/content/pm/Signature;
:cond_c
STEP 8- Save and recompile your services.jar..Set the permissions to rw-r--r-- and push it to system/framework/
STEP 9- Done! Reboot your device.
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Will it work with CM12.1?
elmkzgirxp said:
Will it work with CM12.1?
Click to expand...
Click to collapse
Cooooooooooooooooooooool Bro. :good::good::good:
Bro...finally you made it
Awesome mahn...
But update the thread with download links fast or else it would be considered as placeholder
And i hope it works on cm12.1 also
evil.demon_s said:
Bro...finally you made it
Awesome mahn...
But update the thread with download links fast or else it would be considered as placeholder
And i hope it works on cm12.1 also
Click to expand...
Click to collapse
12.1 and 12 are nearly same so it will work
elmkzgirxp said:
Will it work with CM12.1?
Click to expand...
Click to collapse
I don't think so..Give it a try if you want..Let me know if it woks or not.
wolfmannight said:
Cooooooooooooooooooooool Bro. :good::good::good:
Click to expand...
Click to collapse
Thanks a lot!
evil.demon_s said:
Bro...finally you made it
Awesome mahn...
But update the thread with download links fast or else it would be considered as placeholder
And i hope it works on cm12.1 also
Click to expand...
Click to collapse
Thanks!Thread updated..I don't know if it woks on CM12.1 or not..Give it a try!
Thanks dude. ?
And how to create super user mode?
Nope , Not work on 12.1
---------- Post added at 03:51 PM ---------- Previous post was at 03:50 PM ----------
please make it for 12.1
I think I' m gonna get back to CM12 haha. nice, I believe you would port more and more apps
nirmal471 said:
Thanks dude.
And how to create super user mode?
Click to expand...
Click to collapse
Guide updated on 4th post! Enjoy!!
wolfmannight said:
Nope , Not work on 12.1
---------- Post added at 03:51 PM ---------- Previous post was at 03:50 PM ----------
please make it for 12.1
Click to expand...
Click to collapse
miku6r said:
I think I' m gonna get back to CM12 haha. nice, I believe you would port more and more apps
Click to expand...
Click to collapse
I will surely try!
STRYDER~007 said:
Guide updated on 4th post! Enjoy!!
Click to expand...
Click to collapse
Without super user mode it will work?
nirmal471 said:
Without super user mode it will work?
Click to expand...
Click to collapse
No.. It won't work.. Superuser mod is compulsory..
STRYDER~007 said:
No.. It won't work.. Superuser mod is compulsory..
Click to expand...
Click to collapse
Dude I dont known how to edit apk, can you make me a super user mode enabled services. Jar for me plz.. You known how badly like this system ui.. Plz if you can means do for me.. Thanks
My service.Jar file link
https://www.dropbox.com/s/v8dzadpk6tb20ke/services.jar?dl=0
STRYDER~007 said:
Features:-
Drag And Drop To Add Or Remove Quick Settings
Added New Animations
Z3 Particle Effect Lockscreen With 3 Different Clocks On Lockscreen
Xperia Z3 Lollipop Live Wallpaper
Xperia Z3 Lollipop ClockWidgets
Xperia Z3 Media Sounds
Click to expand...
Click to collapse
Hey buddy, the modified fallback fonts.xml and fonts.xml are mine !! and I saw you r using them for clock widgets !! If you didn't ask permission to me I think it's ok, atleast give credit to me
@STRYDER~007 can I try your guide on cm12.1, I mean try the changes on cm12.1
Another question, will it work on cm "based" roms too?( Just to be sure)
vandroid7 said:
Hey buddy, the modified fallback fonts.xml and fonts.xml are mine !! and I saw you used them for clock widgets !! If you didn't ask permission to me I think it's ok, atleast give credit to me
Click to expand...
Click to collapse
yes
 @STRYDER~007 give him credit for Clock fonts

[PORT][CM12.1/AOSP 5.1/STOCK 5.1] Xperia Z5 SystemUI And Particle Effect Lockscreen

Introduction:-
Hey guys! Here's my new port of Official Xperia Z5 Lollipop SystemUI and Particle Effect Lockscreen for Xperia as well as Non-Xperia devices running on CM12.1,AOSP 5.1 as well as Sony Stock 5.1. Possibly working on CM and AOSP variants such as AICP, Resurrection Remix etc. [TESTING REQUIRED!] I have also added Xperia Z5 Home and Z5 Media Sounds in this MOD. Hope you guys like it!
POST 1- Introduction And Features
POST 2- Screenshots
POST 3- Downloads And Instructions
POST 4- Guide To Create Superuser MOD
Disclaimer:-
* Your warranty is now void.
* I am not responsible for bricked devices, dead SD cards,thermonuclear war, or you getting fired because the alarm app failed!!
*Please make nandroid backup before flashing this as a precaution!
*Try this MOD at your own risk!
Click to expand...
Click to collapse
Features:-
Drag And Drop To Add Or Remove Quick Settings
Added New Animations
Added New Expandable Sound Panel
Particle Effect Lockscreen With 3 Different Clocks On Lockscreen
Xperia Live Wallpaper
Xperia Z5 Home Launcher
Xperia Z5 Media Sounds
NOTE- DO NOT USE OR SHARE ANY PART OF MY WORK IN ANY ROM OR ANY MOD WITHOUT MY PERMISSION!!
Credits:-
@gamzekal for Xperia Z5 system dump
@Uncle Lucifer for deodexed system apps
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Screenshots
Screenshots:-
Xperia Z5 SystemUI
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Xperia Particle Effect Lockscreen
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Downloads And Instructions
Instructions:-
Make sure you have Superuser MOD installed.
There are 2 ways of doing Superuser MOD.
1. Using the guide given in next post. [Recommended for CM and AOSP!]
2. If you have Xposed framework installed, then use Serajr Xperia Xposed LP module and in system option,click on Superuser MOD.
Download Xperia Z5 Lollipop System Apps Port Zip.
Go to Recovery.
Flash the downloaded zip.
Wipe Cache partition and ART/Dalvik-cache.
Reboot your phone.
Done!Enjoy The New Looks!!
Download:-
Xperia Z5 System Apps Port
Bugs:-
Some of the Quick Settings tiles are not working.
PIN,Pattern and Password locks are not working. (3x3 pattern lock works fine.)
NOTE:- To get Particle Effect Lockscreen, just set Xperia Live Wallpaper as your default wallpaper.
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Guide to create Superuser MOD
Superuser MOD disables the signature verification for all apps. After using this MOD you can install apps with different signature!
Requirements:-
Services.jar from your device. It's located in system/framework/
Apktool or some similar software.
Decompiling-Recompiling Knowledge.
Notepad++ for Editing XMLs.
Working brain and patience!!
STEP 1- Decompile services.jar using apktool.
STEP 2- Go to \smali\com\android\server\pm\
STEP 3- Find the file named PackageManagerService.smali and open it using Notepad++
STEP 4- Now Find this method:-
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v6, 0x1
const/4 v8, -0x3
const/4 v7, 0x0
.line 2955
if-nez p0, :cond_1
.line 2956
if-nez p1, :cond_0
.line 2988
:goto_0
return v6
.line 2956
:cond_0
const/4 v6, -0x1
goto :goto_0
.line 2961
:cond_1
if-nez p1, :cond_2
.line 2962
const/4 v6, -0x2
goto :goto_0
.line 2965
:cond_2
array-length v9, p0
array-length v10, p1
if-eq v9, v10, :cond_3
move v6, v8
.line 2966
goto :goto_0
.line 2970
:cond_3
array-length v9, p0
if-ne v9, v6, :cond_5
.line 2971
aget-object v6, p0, v7
aget-object v9, p1, v7
invoke-virtual {v6, v9}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_4
move v6, v7
goto :goto_0
:cond_4
move v6, v8
goto :goto_0
.line 2976
:cond_5
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 2977
.local v3, "set1":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, "arr$":[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, "len$":I
const/4 v1, 0x0
.local v1, "i$":I
:goto_1
if-ge v1, v2, :cond_6
aget-object v5, v0, v1
.line 2978
.local v5, "sig":Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2977
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 2980
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_6
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 2981
.local v4, "set2":Ljava/util/HashSet;, "Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_2
if-ge v1, v2, :cond_7
aget-object v5, v0, v1
.line 2982
.restart local v5 # "sig":Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 2981
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 2985
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_7
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_8
move v6, v7
.line 2986
goto :goto_0
:cond_8
move v6, v8
.line 2988
goto :goto_0
.end method
NOTE- It doesn't matter if some of your code in above method differs than this code. Just go to next step!
STEP 5- Shrink the above code to:-
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v7, 0x0
.line 2934
return v7
.end method
STEP 6- Now Find the lines given below:-[Hint-In search box type Cannot to find faster!]
Code:
invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
if-nez v4, :cond_c
.line 5572
new-instance v4, Lcom/android/server/pm/PackageManagerException;
const/16 v5, -0x13
const-string v11, "Cannot install platform packages to user storage!"
invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
throw v4
.line 5578
.end local v89 # "s1":[Landroid/content/pm/Signature;
:cond_c
STEP 7- Make changes as per the Red line only:-
Code:
invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
[B][COLOR="Red"]if-eqz[/COLOR][/B] v4, :cond_c
.line 5572
new-instance v4, Lcom/android/server/pm/PackageManagerException;
const/16 v5, -0x13
const-string v11, "Cannot install platform packages to user storage!"
invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
throw v4
.line 5578
.end local v89 # "s1":[Landroid/content/pm/Signature;
:cond_c
STEP 8- Save and recompile your services.jar..Set the permissions to rw-r--r-- and push it to system/framework/
STEP 9- Done! Reboot your device.
DON'T FORGET TO HIT THANKS BUTTON!!:good::good:
Awesome! I would love to try it but you said pattern lock doesn't work :/ Do you mean the 4*4 and 5*5 with that? (so 3*3 works?)
Otherwhise, looking forward to try it on aicp and on the upcoming stryflex update!
Deleunes254 said:
Awesome! I would love to try it but you said pattern lock doesn't work :/ Do you mean the 4*4 and 5*5 with that? (so 3*3 works?)
Otherwhise, looking forward to try it on aicp and on the upcoming stryflex update!
Click to expand...
Click to collapse
3x3 pattern lock works fine..Others doesn't..Possibly working on all CM variants such as AICP, Resurrection Remix etc..Give it a try!
Are the stock wallpapers included? If not, it would be a great additional feature to Xperia Home (like in /etc/customizations/com/sonyericsson/wallpapers).
elmkzgirxp said:
Are the stock wallpapers included? If not, it would be a great additional feature to Xperia Home (like in /etc/customizations/com/sonyericsson/wallpapers).
Click to expand...
Click to collapse
Sure! Will add it..
Thanks! Is it working on dual SIM phones?
Found bug, notification not showing in lockscreen bro ?
vjtigas said:
Thanks! Is it working on dual SIM phones?
Click to expand...
Click to collapse
Try it out! Possibly working..
osa_misuari said:
Found bug, notification not showing in lockscreen bro
Click to expand...
Click to collapse
It shows in mine.. Attach screenshot bro..
Hi OP is it ok if i just push the home-release to system app with correct permission? I'm on 5.1.1 stock odex.
In lockscreen not showing, but in list notice show up bro
anakdayak said:
Hi OP is it ok if i just push the home-release to system app with correct permission? I'm on 5.1.1 stock odex.
Click to expand...
Click to collapse
Yes.. Most probably it'll work.. Give it a try..
osa_misuari said:
In lockscreen not showing, but in list notice show up bro
Click to expand...
Click to collapse
Thanks for screenshots..I'll look into it..
Hi OP auto rotate not showing but small and large icon showed.
Hello I tried it on cm12.1 Ressurection Remix 5.5.5 Sprout 4 (android one) but after booting system UI Crashed.. Hoping you could give a solution.. Dalvik and cache were cleared..
Thank You
anakdayak said:
Hi OP auto rotate not showing but small and large icon showed.
Click to expand...
Click to collapse
New Xperia home just icon setting bro, auto rotation is on by default
Has anyone tried this on any Stock Motorola firmware? Can I consider my stock Moto X 2014's Android 5.1 as being AOSP? Since Motorola has kept it as close to the original as possible.
Thanks!
are all you apps supposed to disappear??
rom 5.1.1 Cyanogenmod 12.1
device - s3 mini
LividGamerZx said:
are all you apps supposed to disappear??
rom 5.1.1 Cyanogenmod 12.1
device - s3 mini
Click to expand...
Click to collapse
No you won't loose any app

[GUIDE][MIUI ROM] Enable 4G LTE Setting [If don't have 4G LTE option]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
INTRODUCTION
I was received Xiaomi Redmi Note 3 PRO (kenzo), and i see there is no 4G LTE option in setting on MIUI 7/8 GLOBAL ROM. in INDONESIA there is RULES called "TKDN" (Tingkat Kandungan Dalam Negeri) is mean (Local Content). Every Xiaomi Devices that shipped officially to INDONESIA with GLOBAL MIUI ROM don't have 4G LTE option, so i dedicated to search how to enable it permanently, and finally i found 2 solution to enable 4G LTE Option.
SOLUTION TO FIX 4G LTE OPTION
1. Edit framework.jar (Recommended)
2. Or Edit Teleservice.apk]
NOTE :
- This thread is for MODDER/THEMER/DEVELOPER ONLY.
- If you want to use this guide and implement to your ROM please mention me. you don't need to PM me. Thanks
CREDITS
XIAOMI INDONESIA FORUM/GROUP
GOOGLE
HOW TO FIX 4G LTE OPTION USING SOLUTION 1 WORK ON DEODEXED ONLY
1. Edit framework.jar
Requirements :
Follow this GUIDE to decompile and recompile framework.jar http://forum.xda-developers.com/crossdevice-dev/sony/tool-xperia-quick-decompile-recompile-t3428341
Step By Step
1. Download this tool http://forum.xda-developers.com/showpost.php?p=67952722&postcount=2
2. Decompile framework.jar (framework.jar must be deodexed)
3. Go to classout2/miui/telephony
4. Open TelephonyManager.smali using text editor like notepad++
5. Search
Code:
.method public isDisableLte(Z)Z
and you will see like this :
Code:
.method public isDisableLte(Z)Z
.registers 10
const/4 v5, 0x1
const/4 v4, 0x0
sget-boolean v6, Lmiui/os/Build;->IS_GLOBAL_BUILD:Z
if-nez v6, :cond_8
move v0, v4
:cond_7
:goto_7
return v0
:cond_8
iget-object v6, p0, Lmiui/telephony/TelephonyManager;->BUILD_OPERATOR_TYPE:Ljava/lang/String;
if-nez v6, :cond_12
invoke-static {}, Lmiui/util/Network;->getOperatorType()Ljava/lang/String;
move-result-object v6
iput-object v6, p0, Lmiui/telephony/TelephonyManager;->BUILD_OPERATOR_TYPE:Ljava/lang/String;
:cond_12
const-string v6, "id4g"
iget-object v7, p0, Lmiui/telephony/TelephonyManager;->BUILD_OPERATOR_TYPE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_1e
move v0, v4
goto :goto_7
:cond_1e
const-string v6, "ido"
sget-object v7, Lmiui/os/Build;->DEVICE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_5a
const-string v6, "kenzo"
sget-object v7, Lmiui/os/Build;->DEVICE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_5a
const-string v6, "kate"
sget-object v7, Lmiui/os/Build;->DEVICE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_5a
const-string v6, "mido"
sget-object v7, Lmiui/os/Build;->DEVICE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_5a
const-string v6, "rolex"
sget-object v7, Lmiui/os/Build;->DEVICE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_5a
const-string v6, "royal"
sget-object v7, Lmiui/os/Build;->DEVICE:Ljava/lang/String;
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_76
:cond_5a
move v0, v5
:goto_5b
if-eqz v0, :cond_7
if-eqz p1, :cond_7
invoke-virtual {p0}, Lmiui/telephony/TelephonyManager;->getPhoneCount()I
move-result v3
const/4 v1, 0x0
:goto_64
if-ge v1, v3, :cond_7b
invoke-virtual {p0, v1}, Lmiui/telephony/TelephonyManager;->getSimOperatorForSlot(I)Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_78
const-string v6, "510"
invoke-virtual {v2, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_78
move v0, v5
goto :goto_7
:cond_76
move v0, v4
goto :goto_5b
:cond_78
add-int/lit8 v1, v1, 0x1
goto :goto_64
:cond_7b
move v0, v4
goto :goto_7
.end method
6. Shrink code to
Code:
.method public isDisableLte(Z)Z
.registers 10
const/4 v4, 0x0
return v4
.end method
Save file TelephonyManager.smali
7. Compile framework
8. Flash to your MIUI ROM and Done.
HOW TO FIX 4G LTE OPTION USING SOLUTION 2 (WORK ON ODEXED AND DEODEXED ROM)
2. Edit TeleSevices.apk
Requirements :
- Apktool
- I will not explain how to decompile recompile apk MIUI ROM (Search Guide on Google to decompile apk MIUI ROM, Google is your friend)
Step by Step
1. Decompile TeleServices.apk
2. Go to res/xml and edit all files below :
preferred_network_type_3g.xml
preferred_network_type_3g_cm.xml
preferred_network_type_3g_ct.xml
preferred_network_type_lc.xml
preferred_network_type_lte.xml
preferred_network_type_lte_cm.xml
preferred_network_type_lte_ct.xml
preferred_network_type_lte_cu.xml
preferred_network_type_mtk.xml
preferred_network_type_mtk_m.xml
preferred_network_type_pinecone.xml
Click to expand...
Click to collapse
3. Replace all code in all files with this
Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/preferred_network_type_title" android:key="network_type_list_gsm_umts"
xmlns:android="http://schemas.android.com/apk/res/android">
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_0" android:key="0" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_1" android:key="1" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_2" android:key="2" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_5" android:key="5" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_8" android:key="8" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_9" android:key="9" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_10" android:key="10" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_11" android:key="11" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_12" android:key="12" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_14" android:key="14" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_15" android:key="15" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_16" android:key="16" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_17" android:key="17" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_18" android:key="18" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_19" android:key="19" />
<miui.preference.RadioButtonPreference android:title="@string/lovins_preferred_network_mode_20" android:key="20" />
</PreferenceScreen>
save all files.
4. Go to res/value and open strings.xml
Add this code
Code:
<string name="lovins_preferred_network_mode_0">Prefer 3G/2G</string>
<string name="lovins_preferred_network_mode_1">2G only</string>
<string name="lovins_preferred_network_mode_2">3G only</string>
<string name="lovins_preferred_network_mode_5">CDMA only</string>
<string name="lovins_preferred_network_mode_8">Prefer 4G/CDMA</string>
<string name="lovins_preferred_network_mode_9">Prefer 4G/2G</string>
<string name="lovins_preferred_network_mode_10">Global</string>
<string name="lovins_preferred_network_mode_11">4G only</string>
<string name="lovins_preferred_network_mode_12">Prefer 4G/3G</string>
<string name="lovins_preferred_network_mode_14">3G only (TD-SCDMA)</string>
<string name="lovins_preferred_network_mode_15">4G only (TD-SCDMA)</string>
<string name="lovins_preferred_network_mode_16">2G only (TD-SCDMA)</string>
<string name="lovins_preferred_network_mode_17">Prefer 4G/2G (TD-SCDMA)</string>
<string name="lovins_preferred_network_mode_18">Prefer 3G/2G (TD-SCDMA)</string>
<string name="lovins_preferred_network_mode_19">Prefer 4G/3G (TD-SCDMA)</string>
<string name="lovins_preferred_network_mode_20">Prefer 4G/3G/2G (TD-SCDMA)</string>
save file.
5. Compile TeleServices also Sign and ZipAlign
6. Flash To your MIUI ROM, (If your ROM odexed just remove TeleServices.odex)
7. Done
Credits for reference : Indra Binuners
ADVENTAGES, BUG OR LACK
USING SOLUTION 1 :
- Only Enable 4G LTE Option (Prefer LTE)
- Network type will remain stick even after device reboot/restart
- No bugs
USING SOLUTION 2 :
- Enable other networks type too
- Network type will back to default network type after reboot/restart
- If you wipe data (not wipe cache or dalvik) after flashing TeleServices MOD you will get Force Close "com.android......" and will not be able to use you device. it may be signatures checking, but i already disable signatures checking on services.jar but still Force Close after wipe data.
So if you want to use SOLUTION 2 DO NOT TRY TO WIPE DATA!!!
Nice guide bro...
Sent from my Redmi Note 3 using Tapatalk
Master ?
Thanks for sharing
I dont have problem with miui rom , only with cm and rr but working in slim rom
Sent from my Redmi Note 3 using Tapatalk
great tutorial , thanks
awesome tutorial...
yes, editing teleservice are causing serious error if you did wiping data..
solution 1 seems the safest way.. thanks a lot..
Keep up the good work!
Thanks bro, really awesome work. Terima kasih banyak
@Rizal Lovins , i usually change the build.prop to enable the 4g (changing ro.product.name and ro.product.device from kenzo to gemini). Beside enabling the 4g , by doing that the stock miui camera now also shows "manual" mode with manual focus etc.
Maybe there's another way around that like your tutorial here (editing framework.jar).
a.marduk said:
@Rizal Lovins , i usually change the build.prop to enable the 4g (changing ro.product.name and ro.product.device from kenzo to gemini). Beside enabling the 4g , by doing that the stock miui camera now also shows "manual" mode with manual focus etc.
Maybe there's another way around that like your tutorial here (editing framework.jar).
Click to expand...
Click to collapse
Editing build.prop is not recommended, your device will identified as gemini instead of kenzo, enabling manual focus, other camera option and other feature is on miuisystem.apk/assets/kenzo.xml
there is many disabled features by Xiaomi, you should enable it (like boolean "true" or "false") you can change some of the feature from "false" to "true".
Rizal Lovins said:
Editing build.prop is not recommended, your device will identified as gemini instead of kenzo, enabling manual focus, other camera option and other feature is on miuisystem.apk/assets/kenzo.xml
there is many disabled features by Xiaomi, you should enable it (like boolean "true" or "false") you can change some of the feature from "false" to "true".
Click to expand...
Click to collapse
great ... i'll look into it, thank you
has anyone tried to replace TeleService.apk from extracted system.img (fastboot rom) with the one extracted from Mod_TeleService_MIUI8_MM_V2-By-Indra-Binunerz, repack and flash it via miflash?
Wow the legend of galaxy wonder is coming hehehe, thanks for sharing
Love you Om working perfectly and very easy tutorial for enable Preferred 4G
Thanks so much
Numpang tanya om...
Do we need to redo the #1 method everytime we update MIUI (weekly global dev), or we can just use the same modified file?
thanks
Gusagus said:
Love you Om working perfectly and very easy tutorial for enable Preferred 4G
Thanks so much
Click to expand...
Click to collapse
Hi, which method did you use? Could you share the modified framework.jar please? Thanks in advance.
Sent from my MI MAX using Tapatalk
may i share this guide to my blog(indonesia)?
of course i'll put source.

Categories

Resources