Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
LegendK95
Old
(Last edited by LegendK95; 27th March 2012 at 09:59 PM.)
#1  
LegendK95's Avatar
Recognized Developer - OP
Thanks Meter 3855
Posts: 1,379
Join Date: Nov 2011
Location: Jerusalem

 
DONATE TO ME
Default [MOD][DEV][LP3/LP2]Remove "Swipe Screen to Unlock"(Multilanguage)(Noob-proof)

Intro

Okay I heard a lot of people want to disable this text from the Lockscreen, first time it may be useful! But then it just becomes plain Ugly..

So with a little of research, I have come to see where this text comes from, and with the knowledge that the lockscreen is built from classes inside the android.policy.jar I searched there a little and found what I was looking for.


So let's do it! First of all, if you don't know about smali and baksmali this tutorial contains the commands, but it will still be a little hard for beginners so I included a ZIP for flashing.




Needed Resources

You need the JRE to run the jars, found here
You will also need the smali and baksmali jars.
Smali: here
Baksmali: here

[This is for Windows, Although I use Ubuntu] I'll also make things easier for you, here download my simple scripts to make the usage of smali and baksmali easier: here





The Process


*Now we will use baksmali to revive the code to a low-level language (hard to understand, not like java which is a high-level language) called smali.

*So once you have all resources extract Smali.jar/Baksmali.jar/Smali.bat/Baksmali.bat to any folder you like.

*Extract the android.policy.jar found in the system/framework directory inside the ROM, to the same folder.

*Now we need to open a cmd (or terminal for linux) window pointing to the folder, an easy way to do this in windows if I remember correctly, was Hold Shift and then press right button on the folder, and select Open command window here.

*Once you do this, let's get to work. In your cmd type this command:
Code:
baksmali android.policy.jar -o extracted

and don't close the cmd, just minimize it as we will need it later on.
NOTE: Basically, this command extracts the classes.dex (which is the code) found inside android.policy.jar and then reverses it to the smali language, then moves the resulting code to the directory named extracted.
NOTE 2: This is the same as extracting the classes.dex using an archiver (like 7-zip) and using this command: baksmali classes.dex -o extracted. The one above is a faster way to do it.

*Now you will notice the newly created folder called extracted. Open it then go to: com/android/internal/policy/impl. You'll see a lot of files (Don't freak out :P).

*Now find the file named CircleLockScreen.smali and open it using any text editor, I prefer notepad++ for windows. (Don't mind other files sharing the same name with a $ and a number at the end, these are called sub-classes)

*Now we need to find the chunk of code which sets the text to "Swipe screen to unlock" and delete it completely.
So using the find functionality (CTRL + F) find this code
Code:
    .line 178
    iget-object v5, p0, Lcom/android/internal/policy/impl/CircleLockScreen;->mHelpText:Landroid/widget/TextView;

    const v6, 0x10405f6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(I)V
And Simply Delete it!

*We're done so now we should compile the code to classes.dex again. To do this go back to your cmd you had before and type this code
Code:
smali extracted -o classes.dex
*A new classes.dex file will be created (will overwrite the old one if you had an old classes.dex), so Simply open android.policy.jar with an archiver (like winrar) and drag the classes.dex and drop it inside.
NOTE: If it asks you to overwrite the classes.dex choose yes.

And we are ready to go, now you have your android.policy.jar you can try it by pushing it to /system/framework and rebooting.
You can also use it inside your ROMs

For LP3 ZIP Click here! Many thanks to Krendelrus!

Happy Modding!
Attached Files
File Type: zip XWLP2-LK-SwipetoUnlockRemove.zip - [Click for QR Code] (307.9 KB, 662 views)
__________________________
__________________________________
_________________________________________

Simplistic ICS: The Revolution of Samsung ICS ROMs ==> Here

The Following 13 Users Say Thank You to LegendK95 For This Useful Post: [ Click to Expand ]
 
readon1
Old
#2  
Senior Member
Thanks Meter 63
Posts: 312
Join Date: Jan 2012
does it work on LPQ?
The Following User Says Thank You to readon1 For This Useful Post: [ Click to Expand ]
 
LegendK95
Old
#3  
LegendK95's Avatar
Recognized Developer - OP
Thanks Meter 3855
Posts: 1,379
Join Date: Nov 2011
Location: Jerusalem

 
DONATE TO ME
Quote:
Originally Posted by readon1 View Post
does it work on LPQ?
The method works on LPQ
__________________________
__________________________________
_________________________________________

Simplistic ICS: The Revolution of Samsung ICS ROMs ==> Here

 
readon1
Old
#4  
Senior Member
Thanks Meter 63
Posts: 312
Join Date: Jan 2012
Sorry, i had to be more specific x). I mean does the zipfile work on LPQ?

Many thanks in advance!

Sent from my GT-I9100 using XDA
 
Mirko ddd
Old
#5  
Mirko ddd's Avatar
Recognized Contributor
Thanks Meter 4237
Posts: 1,331
Join Date: Nov 2010
Location: Piazza Armerina

 
DONATE TO ME
Quote:
Originally Posted by readon1 View Post
Sorry, i had to be more specific x). I mean does the zipfile work on LPQ?

Many thanks in advance!

Sent from my GT-I9100 using XDA
Probably not. Public number must match with the one in framework-res assigned to the string "swipe screen to unlock"

The guide is very clear, just need to follow it ;)

As soon as i get home i will attach the one for LPQ :)
To do this I will need 1minute ;)


By the way LK95, great stuff ;)

---------- Post added at 08:55 PM ---------- Previous post was at 08:45 PM ----------

Done

Easy enjoy

here is the flashable zip
NICOLA SAVED ME!

If I helped you and/or you like my rom consider a small donation and/or join Disaster Family on Facebook
I DON'T ANSWER ON PM ABOUT ROM/MODDING STUFFS

The Following 3 Users Say Thank You to Mirko ddd For This Useful Post: [ Click to Expand ]
 
readon1
Old
#6  
Senior Member
Thanks Meter 63
Posts: 312
Join Date: Jan 2012
Sweeet thanks man!!!


Sent from my GT-I9100 using XDA
 
readon1
Old
#7  
Senior Member
Thanks Meter 63
Posts: 312
Join Date: Jan 2012
Unfortunatly it did not work...

Sent from my GT-I9100 using XDA
 
Mirko ddd
Old
#8  
Mirko ddd's Avatar
Recognized Contributor
Thanks Meter 4237
Posts: 1,331
Join Date: Nov 2010
Location: Piazza Armerina

 
DONATE TO ME
Quote:
Originally Posted by readon1 View Post
Unfortunatly it did not work...

Sent from my GT-I9100 using XDA
works on stock deodexed LPQ, just attach you android.policy.jar and i make it 4u
NICOLA SAVED ME!

If I helped you and/or you like my rom consider a small donation and/or join Disaster Family on Facebook
I DON'T ANSWER ON PM ABOUT ROM/MODDING STUFFS

 
GaboWinter
Old
#9  
GaboWinter's Avatar
Forum Moderator
Thanks Meter 8278
Posts: 7,882
Join Date: Aug 2011
Location: Kadath - R'lyeh Likes: Caffeine / Whisky
Man, you are great! I'm having a lot of troubles making my own tests and i can't make the things happen but now, everything looks perfect. Really, thanks a lot!

Enviado desde mi GT-I9100 usando Tapatalk
Phone: Nexus 4 [Mako]
ROM: Paranoid Android 3.5 HALO6 19MAY
Kernel: Franco-Paranoid Kernel

Tab: Nexus 7 [Grouper]
ROM: Paranoid Android 3.5 5MAY
Kernel: Stock
 
gmastrota
Old
#10  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Nov 2010
Quote:
Originally Posted by Mirko ddd View Post
works on stock deodexed LPQ, just attach you android.policy.jar and i make it 4u
Mirko, please make attached android.policy.jar? Thanks
Attached Files
File Type: jar android.policy.jar - [Click for QR Code] (181.5 KB, 38 views)

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...