STaaFF7o
Erfahrenes Mitglied
- 87
Für alle die den Unlock Text enternen wollen,hier die Lösung.................
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.
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
*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 window pointing to the folder, an easy way to do this if I remember correctly, was Hold Shift and then press right button on the folder, and select Open command line 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 ).
*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
Zip is attached
Happy Modding!
Attached Files
XWLP2-LK-SwipetoUnlockRemove.zip - [Click for QR Code] (307.9 KB, 37 views)
Quelle:[MOD][DEV][LP2/LPQ]Remove "Swipe Screen to Unlock"(Multilanguage)(Noob-proof) - xda-developers
Ein Danke tut nicht weh.
Intro
Okay
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 window pointing to the folder, an easy way to do this if I remember correctly, was Hold Shift and then press right button on the folder, and select Open command line 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 ).
*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
Zip is attached
Happy Modding!
Attached Files
Quelle:[MOD][DEV][LP2/LPQ]Remove "Swipe Screen to Unlock"(Multilanguage)(Noob-proof) - xda-developers
Ein Danke tut nicht weh.