FORUMS
Remove All Ads from XDA

[MOD] 4.4.2 TW Launcher rotation

2,231 posts
Thanks Meter: 6,993
 
By tkari4, Senior Member on 22nd March 2014, 06:57 PM
Post Reply Email Thread
After few tries figured out how to enable the native rotation in the SecLauncher4.apk.

It isn't auto rotation, can be turned on and off with the rotation toggle.

Needed tools:
  • Backsmali/Smali
  • Notepad++
Let's do it!

1.) Baksmali SecLauncher4.apk
2.) Navigate to com\android\launcher2
3.) Open Launcher.smali

Find: .method public onCreateOptionsMenu

Delete RED line.

Code:
    .line 502
    .restart local v3       #filter:Landroid/content/IntentFilter;
    .restart local v4       #intent:Landroid/content/Intent;
    :cond_30e
    const/4 v10, 0x0

    sput-boolean v10, Lcom/android/launcher2/Launcher;->CSCFEATURE_LAUNCHER_REPLACEHOTSEATAREAINEDITMODE:Z

    .line 503
    const/4 v10, 0x0

    invoke-static {v10}, Lcom/android/launcher2/Launcher;->setHomeEditMode(Z)V

    .line 504
    const/4 v10, 0x0

    invoke-static {v10}, Lcom/android/launcher2/Launcher;->setHomeRemoveMode(Z)V

    goto/16 :goto_263

    .line 510
    :cond_31b
    const/4 v10, -0x1

    invoke-virtual {p0, v10}, Landroid/app/Activity;->setRequestedOrientation(I)V

    goto/16 :goto_271
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
Find: 0x258

Delete RED line.
Add BLUE line.

Code:
    iget v10, v10, Landroid/content/res/Configuration;->smallestScreenWidthDp:I

    const/16 v11, 0x258

    if-ge v10, v11, :cond_31b

    .line 512
    const/4 v10, 0x1
    const/4 v10, 0x2

    invoke-virtual {p0, v10}, Landroid/app/Activity;->setRequestedOrientation(I)V

    .line 514
    :goto_271
    sget-boolean v10, Lcom/android/launcher2/Launcher;->UseQwertyKeypad:Z
4.) Save your changes
5.) Smali classout folder
6.) Add the new classes.dex file to SecLauncher4.apk
7.) Push to your Phone, set permissions, reboot

I did it already for the N9005XXUENC2 firmware: Download

Thanks to @dr.ketan for his help.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-03-22-19-13-27.jpg
Views:	1214
Size:	31.3 KB
ID:	2644408   Click image for larger version

Name:	Screenshot_2014-03-22-19-12-39.jpg
Views:	1152
Size:	47.3 KB
ID:	2644409   Click image for larger version

Name:	Screenshot_2014-03-22-19-12-58.jpg
Views:	1065
Size:	27.7 KB
ID:	2644410  
The Following 13 Users Say Thank You to tkari4 For This Useful Post: [ View ] Gift tkari4 Ad-Free
23rd March 2014, 01:30 PM |#2  
Senior Member
Flag Vienna
Thanks Meter: 38
 
More
Does it work 360 degrees?

Gesendet von meinem SM-N9005 mit Tapatalk
23rd March 2014, 01:49 PM |#3  
vinvargas24's Avatar
Member
Flag San Fernando
Thanks Meter: 12
 
Donate to Me
More
Will this Work on NB7?
Hi Mate. Will the Nc2 will work on Nb7? Not really knowledgable with Smali/Baksmali.. Thanks!
23rd March 2014, 01:59 PM |#4  
tkari4's Avatar
OP Senior Member
Thanks Meter: 6,993
 
More
Quote:
Originally Posted by vinvargas24

Hi Mate. Will the Nc2 will work on Nb7? Not really knowledgable with Smali/Baksmali.. Thanks!

Of course!

I'm using it on NB3 base...
The Following 2 Users Say Thank You to tkari4 For This Useful Post: [ View ] Gift tkari4 Ad-Free
23rd March 2014, 02:01 PM |#5  
tkari4's Avatar
OP Senior Member
Thanks Meter: 6,993
 
More
Quote:
Originally Posted by maxmobil201

Does it work 360 degrees?

Gesendet von meinem SM-N9005 mit Tapatalk

Yes if it's enabled in your framework-res.apk.

The Following 4 Users Say Thank You to tkari4 For This Useful Post: [ View ] Gift tkari4 Ad-Free
25th March 2014, 10:39 PM |#6  
vinvargas24's Avatar
Member
Flag San Fernando
Thanks Meter: 12
 
Donate to Me
More
Smile
Quote:
Originally Posted by tkari4

Of course!

I'm using it on NB3 base...

Working Mate! Thanks!!! Though Widgets are getting Resized and there is a small gap on the right side once your on Landscape..
The Following User Says Thank You to vinvargas24 For This Useful Post: [ View ] Gift vinvargas24 Ad-Free
26th March 2014, 12:17 AM |#7  
tkari4's Avatar
OP Senior Member
Thanks Meter: 6,993
 
More
Quote:
Originally Posted by vinvargas24

Working Mate! Thanks!!! Though Widgets are getting Resized and there is a small gap on the right side once your on Landscape..

Yes, because most of the widgets doesn't supports the landscape mode.

Work in progress...

Check my other thread in my signature : Fixed apps for multi dpi use

(my modified launcher needs my modified widgets "due the grid size")
The Following 2 Users Say Thank You to tkari4 For This Useful Post: [ View ] Gift tkari4 Ad-Free
6th April 2014, 04:06 PM |#8  
Cocolopes's Avatar
Senior Member
Flag Rosario
Thanks Meter: 1,584
 
Donate to Me
More
Quote:
Originally Posted by tkari4

Yes, because most of the widgets doesn't supports the landscape mode.

Work in progress...

Check my other thread in my signature : Fixed apps for multi dpi use

(my modified launcher needs my modified widgets "due the grid size")

Hello....is there any ways to make this mod in the new s5 launcher? I search for the lines....but I cant see what to change. thanks in advance
6th April 2014, 04:14 PM |#9  
Senior Member
Thanks Meter: 384
 
More
Thanks or the mod.i have downloaded the mod...now what to do?
Please provide me some details.
Ho can I push dz into system?

SM-N900 KK 4.4.2
Dr.ketans Rom K 5
6th April 2014, 05:39 PM |#10  
Senior Member
Flag KLang
Thanks Meter: 192
 
More
Thanks bro.. smali codes works on my n9005 (4.3) & g7102 (4.3).. No need app setting anymore..
The Following User Says Thank You to inamie For This Useful Post: [ View ] Gift inamie Ad-Free
7th April 2014, 08:47 AM |#11  
Junior Member
Thanks Meter: 1
 
More
It works, after deletin da odex. Thanks n900 @ 4.4.2

Sent from my SM-G900I using XDA Premium 4 mobile app
The Following User Says Thank You to rediffrds For This Useful Post: [ View ] Gift rediffrds Ad-Free
Post Reply Subscribe to Thread

Tags
launcher rotation

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes