[Guide][DDKQ8] Remove "Swipe screen to unlock" | Center lockscreen Clock | more...

Search This thread

dali47

Senior Member
Dec 21, 2010
159
112
[Guide][DDKQ8] Remove "Swipe screen to unlock" | Center lockscreen Clock | more...

No guide can explain every bit of information a beginner needs to know to achieve the wanted results. You need to make an effort and have patience to learn what you need.
This guide assumes that you have some basic knowledge like managing files on your phone, setting permissions, using command prompt on your computer. I will not explain what is ADB or Root Explorer or how to use them. google can help with that.
The steps described here are the steps i did on my computer (windows) and my rom (rooted, deodexed). i cannot promise to offer support, i'm a semi-noob myself.

standard disclaimer applies: Do it at your own risk & Backup your system before trying any of this.


What you will need:
• apk file compiler/decompiler: i will use apktool
• archive manager: winrar, 7zip
• Text editor : Notepad++ is recommended
• A way to manage files on the phone: ADB, Android Commander, Root Explorer
• an image editor (for some parts): Photoshop, Gimp, Paint.NET...


Part I. Decompiling

1. First you need to download and install apktool which allows you to decompile apk files and rebuild them. some people prefer APK Manager but i find apktool simpler to use.
Download these two files and export them to your Windows directory.
apktool-install-windows-r04-brut1.tar.bz2
apktool1.4.3.tar.bz2

2. Pull the file framework-res.apk from /system/framework/ on your phone and place it on your computer. for exemple under C:\lockscreen\

3. Now open a command prompt window and change the current directory to C:\lockscreen\ by entering the command
Code:
cd c:\lockscreen
Then decompile your apk file by entering the following command
Code:
apktool d framework-res.apk
This will create a new folder named framework-res within it are the decompiled contents of framework-res.apk

Part II. Editing files

Remove "Swipe screen to unlock"
1. Open \framework-res\res\values\strings.xml
2. Find lockscreen_unlock_guide_text
3. In that line, delete Swipe screen to unlock

Note: \res\values\strings.xml is for English language. if you're using a differnet language on your phone then you have to edit the corresponding strings.xml file in the proper values directory. for exemple if you're using French then you'll have to edit the strings.xml file under values-fr

Change the date format on the lock screen

1. Open \framework-res\res\values\strings.xml
2. Find mid_month_day_mid_wday_no_year
3. Replace E. d MMM. with the format you want.

Reference:

d numeric Day of the Month (1)
dd numeric Day of the Month (01)
EEE short Day of the week (Mon)
EEEE long Day of the week (Monday)
M numeric Month (1)
MM numeric Month (01)
MMM short Month (Jan)
MMMM long Month (January)
yy short year (09)
yyyy long year (2009)
exemple: yyyy MMMM d, EEEE to display 2012 March 12, Monday


Center the lockscreen clock and date

Explaining this mod step by step would take too long. All the editing is done in a single file \res\layout\zzz_keyguard_screen_clockwidget.xml
I uploaded the edited file (not compiled). All you have to do is replace you original file under framework-res\res\layout\ with this one before you compile. Advanced users can take a look at it, compare it with the original and edit it if they want/can.
I also replaced the charging icon that appears on the lockscreen. The png file is inluded with the xml file. To apply it, after you're done with Part III of this guide, open your modded apk file with winrar/7zip, browse to \res\drawable-mdpi\ then drag the png and drop it in the apk.


Part III. Creating the modded file
After we're done editing the xml files, we will recompile them and update the original apk with the modded ones.

1. Go back to that command prompt window and enter the following command to recompile the files
Code:
apktool b framework-res
(no .apk at the end)
when it's done, you will find a new folder under framework-res named build where the compiled files are placed.
2. Go to framework-res\build\apk\ copy the resources.arsc file
3. Open your original framework-res.apk file with an archive manager like winrar or 7zip (do not extratct, open with) and paste resources.arsc inside it.
4. If you used the edited zzz_keyguard_screen_clockwidget.xml file, then you have also to copy the compiled version from \buid\apk\layout\ and paste it under the same path inside your apk file.
Now your framework-res.apk is modded and ready to be installed.
5. Place the apk in your phone under /system/framework/ and set its permissions to rw-r--r--
Note: Some may prefer to copy the file to /system/ first, set the permissions and then move it to /system/framework
6. Reboot


Changing the font of the clock:
For some reason, this clock is not actual text, it does not use a font. Instead, the numbers are png files placed under /res/drawable-mdpi/
So to change the font, you will have to make new png files for each number, plus one for the column :))
I uploaded the ones i made. you can take a look at them to note the dimensions and names of the files. you have to use those same names. also notice that there are two different files for the number one.
After you're done modding your framework-res.apk and just before you send it your phone, open it with winrar and browse to /res/drawable-mdpi/ then drag the png files you made and drop them inside the apk.


Flashable zips:
lockscreen_text_patch_DDKQ8.zip => remove "Swipe screen to unlock" text
LockscreenMod_Stock_DDKQ8.zip => Centered clock and mod with replaced clock font for stock DDKQ8
 

Attachments

  • lockscreen_text_patch_DDKQ8.zip
    3.2 MB · Views: 1,109
  • 2012-03-16_17-47-31.png
    2012-03-16_17-47-31.png
    197.8 KB · Views: 3,502
  • centered_clock.png
    centered_clock.png
    94.8 KB · Views: 2,852
  • LockscreenMod_Stock_DDKQ8.zip
    3.2 MB · Views: 652
Last edited:

kmarci

Senior Member
Sep 21, 2011
567
116
Budapest
This is a short guide explaining how to remove the "Swipe screen to unlock" text from the new galaxy-note-like lockscreen available in the new DDKQ8 rom.

i will add more details if asked for.

Maybe you know how to make the date display more "acceptable"? :D I hate how it looks in stock... :mad:
I would really appreciate a flashable zip to solve this problem. :D
 

iSxy

Senior Member
Feb 19, 2012
507
89
Agra
Will try this today or tomorrow...can anyone tell or make a guide on how to enable crt animation on stock 2.3.6 DDKQ8

Sent from my GT-S5830 using xda premium
 

hanaxxaru

Senior Member
Apr 23, 2011
115
33
if i want to replace stock rom lockscreen, i need to replace framework-res.apk only, right?
 

iSxy

Senior Member
Feb 19, 2012
507
89
Agra
1 Question..
Can we just replace that Swipe to unlock text to our own custom one?
 

dali47

Senior Member
Dec 21, 2010
159
112
Maybe you know how to make the date display more "acceptable"? :D I hate how it looks in stock... :mad:
I would really appreciate a flashable zip to solve this problem. :D

how do you mean acceptable?
i can only make a flashable zip for specific roms and themes. maybe i will see what roms out there are based on DDKQ8 and make a couple of zips.
i usually prefer making guides than making falashable zips so anyone can apply the mod on it's own specific system.

Hey Can u tell the way by wich i can use this lockscreen in lewa rom....
the lockscreen it hard coded un the framework, maybe also some other files. i personally cnt do it. if you want to try to port it i can provide you with any files you need from stock DDKQ8

if i want to replace stock rom lockscreen, i need to replace framework-res.apk only, right?
not really. not all frameworks are compatible with all roms. it probably will not work. it needs to be ported. but you can try of you want. just make a backup of your system before.

1 Question..
Can we just replace that Swipe to unlock text to our own custom one?
sure you can. just replace "swipe screen to unlock" with whatever you want. there might be some limitations for how much text you can fit. i didnt try it.
 

iSxy

Senior Member
Feb 19, 2012
507
89
Agra
K ty..ill try tomorw for custom text.. Anyone tell me some good line to write?

Sent from my GT-S5830 using xda premium
 

kmarci

Senior Member
Sep 21, 2011
567
116
Budapest
how do you mean acceptable?
i can only make a flashable zip for specific roms and themes. maybe i will see what roms out there are based on DDKQ8 and make a couple of zips.
i usually prefer making guides than making falashable zips so anyone can apply the mod on it's own specific system.

Something in this format: year. month day., name of the day. For today: 2012. march 12., monday
I'm on same rom as you are (stocklite v5). Would you please help me how to change the date display?
 

dali47

Senior Member
Dec 21, 2010
159
112
Something in this format: year. month day., name of the day. For today: 2012. march 12., monday
I'm on same rom as you are (stocklite v5). Would you please help me how to change the date display?

ok, i figured it out :p

open \res\values\strings.xml
find mid_month_day_mid_wday_no_year
in that line, change E. d MMM. into yyyy. MMMM d., EEEEE
re-build and replace resources.arsc in original apk
 
  • Like
Reactions: kmarci

kmarci

Senior Member
Sep 21, 2011
567
116
Budapest
ok, i figured it out :p

open \res\values\strings.xml
find mid_month_day_mid_wday_no_year
in that line, change E. d MMM. into yyyy. MMMM d., EEEEE
re-build and replace resources.arsc in original apk

Hey dude, you're unbeleivable! :D Thanks a lot! (Unfortunatelly I can only hit once the thanks button... ;))
 

dali47

Senior Member
Dec 21, 2010
159
112

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    [Guide][DDKQ8] Remove "Swipe screen to unlock" | Center lockscreen Clock | more...

    No guide can explain every bit of information a beginner needs to know to achieve the wanted results. You need to make an effort and have patience to learn what you need.
    This guide assumes that you have some basic knowledge like managing files on your phone, setting permissions, using command prompt on your computer. I will not explain what is ADB or Root Explorer or how to use them. google can help with that.
    The steps described here are the steps i did on my computer (windows) and my rom (rooted, deodexed). i cannot promise to offer support, i'm a semi-noob myself.

    standard disclaimer applies: Do it at your own risk & Backup your system before trying any of this.


    What you will need:
    • apk file compiler/decompiler: i will use apktool
    • archive manager: winrar, 7zip
    • Text editor : Notepad++ is recommended
    • A way to manage files on the phone: ADB, Android Commander, Root Explorer
    • an image editor (for some parts): Photoshop, Gimp, Paint.NET...


    Part I. Decompiling

    1. First you need to download and install apktool which allows you to decompile apk files and rebuild them. some people prefer APK Manager but i find apktool simpler to use.
    Download these two files and export them to your Windows directory.
    apktool-install-windows-r04-brut1.tar.bz2
    apktool1.4.3.tar.bz2

    2. Pull the file framework-res.apk from /system/framework/ on your phone and place it on your computer. for exemple under C:\lockscreen\

    3. Now open a command prompt window and change the current directory to C:\lockscreen\ by entering the command
    Code:
    cd c:\lockscreen
    Then decompile your apk file by entering the following command
    Code:
    apktool d framework-res.apk
    This will create a new folder named framework-res within it are the decompiled contents of framework-res.apk

    Part II. Editing files

    Remove "Swipe screen to unlock"
    1. Open \framework-res\res\values\strings.xml
    2. Find lockscreen_unlock_guide_text
    3. In that line, delete Swipe screen to unlock

    Note: \res\values\strings.xml is for English language. if you're using a differnet language on your phone then you have to edit the corresponding strings.xml file in the proper values directory. for exemple if you're using French then you'll have to edit the strings.xml file under values-fr

    Change the date format on the lock screen

    1. Open \framework-res\res\values\strings.xml
    2. Find mid_month_day_mid_wday_no_year
    3. Replace E. d MMM. with the format you want.

    Reference:

    d numeric Day of the Month (1)
    dd numeric Day of the Month (01)
    EEE short Day of the week (Mon)
    EEEE long Day of the week (Monday)
    M numeric Month (1)
    MM numeric Month (01)
    MMM short Month (Jan)
    MMMM long Month (January)
    yy short year (09)
    yyyy long year (2009)
    exemple: yyyy MMMM d, EEEE to display 2012 March 12, Monday


    Center the lockscreen clock and date

    Explaining this mod step by step would take too long. All the editing is done in a single file \res\layout\zzz_keyguard_screen_clockwidget.xml
    I uploaded the edited file (not compiled). All you have to do is replace you original file under framework-res\res\layout\ with this one before you compile. Advanced users can take a look at it, compare it with the original and edit it if they want/can.
    I also replaced the charging icon that appears on the lockscreen. The png file is inluded with the xml file. To apply it, after you're done with Part III of this guide, open your modded apk file with winrar/7zip, browse to \res\drawable-mdpi\ then drag the png and drop it in the apk.


    Part III. Creating the modded file
    After we're done editing the xml files, we will recompile them and update the original apk with the modded ones.

    1. Go back to that command prompt window and enter the following command to recompile the files
    Code:
    apktool b framework-res
    (no .apk at the end)
    when it's done, you will find a new folder under framework-res named build where the compiled files are placed.
    2. Go to framework-res\build\apk\ copy the resources.arsc file
    3. Open your original framework-res.apk file with an archive manager like winrar or 7zip (do not extratct, open with) and paste resources.arsc inside it.
    4. If you used the edited zzz_keyguard_screen_clockwidget.xml file, then you have also to copy the compiled version from \buid\apk\layout\ and paste it under the same path inside your apk file.
    Now your framework-res.apk is modded and ready to be installed.
    5. Place the apk in your phone under /system/framework/ and set its permissions to rw-r--r--
    Note: Some may prefer to copy the file to /system/ first, set the permissions and then move it to /system/framework
    6. Reboot


    Changing the font of the clock:
    For some reason, this clock is not actual text, it does not use a font. Instead, the numbers are png files placed under /res/drawable-mdpi/
    So to change the font, you will have to make new png files for each number, plus one for the column :))
    I uploaded the ones i made. you can take a look at them to note the dimensions and names of the files. you have to use those same names. also notice that there are two different files for the number one.
    After you're done modding your framework-res.apk and just before you send it your phone, open it with winrar and browse to /res/drawable-mdpi/ then drag the png files you made and drop them inside the apk.


    Flashable zips:
    lockscreen_text_patch_DDKQ8.zip => remove "Swipe screen to unlock" text
    LockscreenMod_Stock_DDKQ8.zip => Centered clock and mod with replaced clock font for stock DDKQ8
    3
    Thanks for the tutorial.

    you're welcome :)


    New mod coming soon :)

    2w6uzph.jpg
    3
    Thanks..!! was searching for this..!! :)
    2
    I think I will try to do this... Even thought I never tried anything like this... Can I brick my phone by doing this? And this lockscreen looks like from Galaxy S2 right?

    attention! this will NOT replace your lock screen. this guide is valid ONLY if you have a DDKQ8 rom which already has the new lock screen. the the only shows how to remove a some useless text.
    for bricking, applied this guide on my own phone and it worked. however, i am NOT responsible if your phone decides to commit suicide! so backup your system and do it at your own risk.


    Just one thing:
    replace resources.arsc in original apk

    How to do this? I don't really understand, with WinRAR or what? If with WinRar with which settings? :eek:

    after rebuilding your apk you will find a new directory named build under framework-res, inside it ne new compiled files.
    open the original framework-res.apk file with winrar (do not extract, just open with)
    then drag this file named resources.arsc from framework-res\build\apk\ and drop it inside framework-res.apk and hit OK
    now your file is modded and ready to be placed in your phone.

    note: we do this trick to preserve the system signature inside the original apk file. we only replace the modified files.
    2
    Just because the new apk is ~4 mb, and the old was ~7 mb. So that's normal?
    (Sorry for my noobness, I never do this before...)

    yes it's normal. apk files are in fact zip files that can be compressed with different compression ratios.
    also yes. push to /system/framework/ set permission and reboot
    it's ok :p i'm no expert either. i just google a lot :p