[REQ with Sources][Mod] Lockscreen Wallpaper Support for Pattern/Pin/Password

Search This thread

texten

Senior Member
Apr 4, 2012
1,309
1,506
thanks for your try, but still stuck on a bootloop.
so share your ideas.

i will try tomorrow.
 

broodplank1337

Inactive Recognized Developer
Nov 24, 2011
4,992
10,155
Nijmegen
www.broodplank.net
Are you compiling it the right way?

You need to compile it with apk manager with the new files/sources

then you need to open the apk with unsigned before it, and the original apk, then move everything (except androidmanifest.xml) from the unsigned apk to the normal apk. then choose normal as compression, and it's done

It doesn't work if you do it on an other way
 

texten

Senior Member
Apr 4, 2012
1,309
1,506
my version to compile,
use apk manager, after compile, just replace folder "META-INF" and file "AndroidManifest.xml" in the unsigned zip with the files of the original apk




and dont forget to delete the build folder if you are working again after compile at the project folder.


I still think it would be good if you are sharing your ideas
 
Last edited:

SkillCam

Member
Dec 11, 2011
41
13
3rd try

If that one isnt booting i know whats going wrong
and if it is booting try the lockscreen wallpaper thing
 

Attachments

  • fixed_lockscreen3_signed.zip
    5.8 MB · Views: 7

texten

Senior Member
Apr 4, 2012
1,309
1,506
ok, last try for today.
maybe its a compile issue with android.policy.jar?!
 

SkillCam

Member
Dec 11, 2011
41
13
do you have a deodexed system, cause this only works when its deodexed
and i took the original android.policy.jar in the 3rd try.
If this one boots I know that the failure is in the android.policy.jar
 

texten

Senior Member
Apr 4, 2012
1,309
1,506
lol, thats my problem :D will deodexed it in one minute .. and then try all zips again, sorry for that
 

texten

Senior Member
Apr 4, 2012
1,309
1,506
fixed_lockscreen1:
no bootloop, but no lockscreen wallpaper in pattern and password and pin
and cant unlock the screen, device shuts down.

fixed_lockscreen2:
no bootloop, hang on pinlock, because there is just the homescreenwallpaper no keyboard or something else

think it is not necessary to test the rest?!
 
  • Like
Reactions: SkillCam

SkillCam

Member
Dec 11, 2011
41
13
ok we're getting closer
it's not necassary to test the 3rd one

i think i will continue tomorrow and will upload the sources
 
  • Like
Reactions: texten

texten

Senior Member
Apr 4, 2012
1,309
1,506
hey nail16, nice to see ya on this thread.
maybe you can try to port the implement solution with lockscreenwallpaper.smali i've posted before?

i was looking for your work "swipe to remove notification", think with your help we will run that lockscreen mod ;)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    put the wallpaper in drawable-hdpi called: lockbg.png (or so)

    and change it to: android:background="@drawable/lockbg"
    1
    thanks for reply,
    yeah, but i want to make the lockscreen wallpaper easyly changeable, because i'm trying to build an own rom ;)
    i used google, i read a feld hundrets of threads, but nowhere i can find a solution for fetch the wallpaper which i setup in settings. everybody is asking and no one has a how-to. :(

    i looked in the jkay-lockscreens codes, there is a implement of lockscreenwallpaper.smali in android.policy.jar. perherps someone can port this?!

    Code:
    .class Lcom/android/internal/policy/impl/LockscreenWallpaper;
    .super Landroid/widget/FrameLayout;
    .source "LockscreenWallpaper.java"
    
    
    # instance fields
    .field private final TAG:Ljava/lang/String;
    
    .field private final WALLPAPER_IMAGE_PATH:Ljava/lang/String;
    
    .field bitmapWallpaper:Landroid/graphics/Bitmap;
    
    .field private mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
    
    # direct methods
    .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
        .registers 4
        .parameter "context"
        .parameter "attrs"
    
        .prologue
        .line 26
        invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
    
        .line 17
        const-string v0, "LockscreenWallpaperUpdater"
    
        iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->TAG:Ljava/lang/String;
    
        .line 19
        const-string v0, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"
    
        iput-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->WALLPAPER_IMAGE_PATH:Ljava/lang/String;
    
        .line 28
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->setLockScreenWallpaper()V
    
        .line 29
        return-void
    .end method
    
    
    # virtual methods
    .method protected onDetachedFromWindow()V
        .registers 2
    
        .prologue
        .line 48
        iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        if-eqz v0, :cond_9
    
        .line 49
        iget-object v0, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V
    
        .line 51
        :cond_9
        invoke-static {}, Ljava/lang/System;->gc()V
    
        .line 52
        invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V
    
        .line 53
        return-void
    .end method
    
    .method public setLockScreenWallpaper()V
        .registers 6
    
        .prologue
        const/4 v4, -0x1
    
        .line 32
        new-instance v1, Ljava/io/File;
    
        const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"
    
        invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
    
        .line 34
        .local v1, file:Ljava/io/File;
        invoke-virtual {v1}, Ljava/io/File;->exists()Z
    
        move-result v2
    
        if-eqz v2, :cond_3e
    
        .line 35
        new-instance v2, Landroid/widget/ImageView;
    
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getContext()Landroid/content/Context;
    
        move-result-object v3
    
        invoke-direct {v2, v3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V
    
        iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        .line 36
        iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        sget-object v3, Landroid/widget/ImageView$ScaleType;->CENTER_CROP:Landroid/widget/ImageView$ScaleType;
    
        invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
    
        .line 37
        iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        invoke-virtual {p0, v2, v4, v4}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->addView(Landroid/view/View;II)V
    
        .line 38
        const-string v2, "/data/data/com.aokp.romcontrol/files/lockscreen_wallpaper.jpg"
    
        invoke-static {v2}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;
    
        move-result-object v2
    
        iput-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        .line 39
        new-instance v0, Landroid/graphics/drawable/BitmapDrawable;
    
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->getResources()Landroid/content/res/Resources;
    
        move-result-object v2
    
        iget-object v3, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->bitmapWallpaper:Landroid/graphics/Bitmap;
    
        invoke-direct {v0, v2, v3}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/content/res/Resources;Landroid/graphics/Bitmap;)V
    
        .line 40
        .local v0, d:Landroid/graphics/drawable/Drawable;
        iget-object v2, p0, Lcom/android/internal/policy/impl/LockscreenWallpaper;->mLockScreenWallpaperImage:Landroid/widget/ImageView;
    
        invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
    
        .line 44
        .end local v0           #d:Landroid/graphics/drawable/Drawable;
        :goto_3d
        return-void
    
        .line 42
        :cond_3e
        invoke-virtual {p0}, Lcom/android/internal/policy/impl/LockscreenWallpaper;->removeAllViews()V
    
        goto :goto_3d
    .end method

    just copy the file from that android.policy.jar to your android.policy.jar thats all
    1
    and now i have found a source of jkays keyguard_screen_unlock_portrait.xml

    with the implement:

    Code:
    [COLOR="Red"]    <com.android.internal.policy.impl.LockscreenWallpaper 
    android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" 
    android:layout_height="fill_parent" />[/COLOR]

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android">
        <com.android.internal.policy.impl.LockscreenWallpaper android:id="@id/lockscreen_wallpaper" android:layout_width="fill_parent" android:layout_height="fill_parent" />
        <GridLayout android:gravity="center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
          xmlns:android="http://schemas.android.com/apk/res/android">
            <com.android.internal.widget.DigitalClock android:layout_gravity="right" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:layout_marginBottom="@dimen/keyguard_lockscreen_status_line_clockfont_bottom_margin">
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
            </com.android.internal.widget.DigitalClock>
            <LinearLayout android:layout_gravity="right" android:orientation="horizontal" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
                <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/alarm_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="16.0dip" android:singleLine="true" android:drawablePadding="4.0dip" />
            </LinearLayout>
            <com.android.internal.policy.impl.WeatherText android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="end" android:gravity="right" android:layout_gravity="fill_horizontal" android:id="@id/weather" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
            <ViewFlipper android:layout_gravity="right" android:id="@id/calendar" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:drawablePadding="4.0dip" android:inAnimation="@anim/calendar_fadein" android:outAnimation="@anim/calendar_fadeout" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="right" android:id="@id/status1" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:singleLine="true" android:drawablePadding="4.0dip" />
            <Space android:layout_gravity="fill" />
            <com.android.internal.widget.LockPatternView android:layout_gravity="center_horizontal" android:id="@id/lockPattern" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" android:layout_marginBottom="4.0dip" />
            <TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="center_horizontal" android:id="@id/carrier" android:singleLine="true" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
                <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/emergencyCallButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
                <Button android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:layout_gravity="center_horizontal" android:id="@id/forgotPatternButton" android:layout_width="0.0dip" android:layout_height="wrap_content" android:text="@string/lockscreen_forgot_pattern_button_text" android:drawableLeft="@drawable/lockscreen_forgot_password_button" android:drawablePadding="0.0dip" android:layout_weight="1.0" style="?android:attr/buttonBarButtonStyle" />
            </LinearLayout>
            <include android:layout_gravity="fill" android:id="@id/transport" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_column="0" android:layout_row="0" android:layout_rowSpan="6" android:layout_columnSpan="1" layout="@layout/keyguard_transport_control" />
            <TextView android:layout_gravity="fill" android:id="@id/faceLockAreaView" android:background="@color/facelock_color_background" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginTop="8.0dip" android:layout_marginBottom="8.0dip" android:layout_column="0" android:layout_row="6" android:layout_rowSpan="1" android:layout_columnSpan="1" />
        </GridLayout>
    </RelativeLayout>

    is someone there who can make it working in kqb?

    edit: found it in an aosp-rom, seems its not jkay ;)


    Do it like this, in the file "keyguard_screen_unlock_portrait.xml" you have to examine each line and look for the values starting with a "@", these lines need to be present in the files in /values/, so if the things are missing just add them from the aosp rom,

    for example:
    looking at the android:id="@id/lockscreen_wallpaper" part, this means you will need to have the "lockscreen_wallpaper" id inside /values/ids.xml, if the id doesn't exist in that file you simply need to copy it from aosp rom. do that process for all custom variables/ids/colors/dimens, etc

    Also when compiling just look at the log, it will say where the error is present, (you use apk manager?)
    1
    I think i know how to give it a custom lockscreen wallpaper

    We have to add some things to lockscreen.smali and an other in android.policy.jar

    I can give it a try

    But not until, cause im going to bed now


    Sent from my GT-I9001 using XDA
    1
    It shouldnt be that hard, cause its the same way to give the aosp lockscreen a custom lockscreen wallpaper

    I'll give it a try when im back from school

    Edit: for which version should i make that fix xxKQB or?

    Sent from my GT-I9001 using XDA