[FIX][JB][CM10]How to Center Align the Lock screen and Answer screen in Jellybean

Search This thread

Moose0704

Senior Member
May 6, 2012
2,344
4,503
41
Princeton TX
Google Pixel Fold
How to Center Align the Lock screen and Answer screen in Jellybean

All, I like most others have been really excited about the new CM10, 4.1.1 Jellybean ROMS. I however have been annoyed by the off centered lock screen unlock handle. As most of you know just about all of them are off. Well after many hours of looking through code I have found out how to center that unlock handle on the lockscreen as well as the incall answer screen.

Now the changes that need to be made have to be made per ROM, it is not just a simple flashable zip and boom you have it on any ROM. The changes have to be made in two files inside the "framework-res.apk" and the "Phone.apk". So because there are so many different JB ROMs out there I decided to just share the code I changed and where I changed it. ;)

So if you have a ROM and want them centered for your users, or you are a user that knows how to de-compile an APK and re-compile it, then this is for you!


Files to change:

framework-res.apk - The file that needs to be edited is "keyguard_screen_tab_unlock.xml" this file can be found in framework-res.apk/res/layout
Phone.apk - The file that needs to be edited is "incall_touch_ui.xml" this file can be found in Phone.apk/res/layout


Code to change: CHANGES ARE IN RED

framework-res.apk - BEFORE:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:id="@id/unlock_widget" 
android:gravity="top" 
android:focusable="true" 
android:layout_alignParentBottom="true" 
android:targetDrawables="@array/lockscreen_targets_with_camera" 
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" 
android:directionDescriptions="@array/lockscreen_direction_descriptions" 
android:handleDrawable="@drawable/ic_lockscreen_handle" 
android:outerRingDrawable="@drawable/ic_lockscreen_outerring" 
android:outerRadius="@dimen/glowpadview_target_placement_radius" 
android:innerRadius="@dimen/glowpadview_inner_radius" 
android:snapMargin="@dimen/glowpadview_snap_margin" 
android:feedbackCount="1" 
android:vibrationDuration="20" 
android:glowRadius="@dimen/glowpadview_glow_radius" 
android:pointDrawable="@drawable/ic_lockscreen_glowdot"


framework-res.apk - AFTER:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="[COLOR="Red"]wrap_content[/COLOR]" 
android:id="@id/unlock_widget" 
android:gravity="[COLOR="Red"]left|top[/COLOR]" 
android:focusable="true" 
android:layout_alignParentBottom="true" 
android:targetDrawables="@array/lockscreen_targets_with_camera" 
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" 
android:directionDescriptions="@array/lockscreen_direction_descriptions" 
android:handleDrawable="@drawable/ic_lockscreen_handle" 
android:outerRingDrawable="@drawable/ic_lockscreen_outerring" 
android:outerRadius="@dimen/glowpadview_target_placement_radius" 
android:innerRadius="@dimen/glowpadview_inner_radius" 
android:snapMargin="@dimen/glowpadview_snap_margin" 
android:feedbackCount="1" 
android:vibrationDuration="20" 
android:glowRadius="@dimen/glowpadview_glow_radius" 
android:pointDrawable="@drawable/ic_lockscreen_glowdot"


Phone.apk - BEFORE:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@id/incomingCallWidget" 
android:visibility="gone" 
android:layout_marginBottom="-46.0dip" 
android:background="@color/incall_call_banner_background" 
android:layout_gravity="bottom|center" 
android:layout_marginTop="20.0dip" 
android:gravity="top" 
prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 
prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 
prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 
prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 
prvandroid:innerRadius="@android:dimen/glowpadview_inner_radius" 
prvandroid:outerRadius="@android:dimen/glowpadview_target_placement_radius" 
prvandroid:outerRingDrawable="@android:drawable/ic_lockscreen_outerring" 
prvandroid:snapMargin="@android:dimen/glowpadview_snap_margin" 
prvandroid:vibrationDuration="20" prvandroid:feedbackCount="1" 
prvandroid:glowRadius="@android:dimen/glowpadview_glow_radius" 
prvandroid:pointDrawable="@android:drawable/ic_lockscreen_glowdot"


Phone.apk - AFTER:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@id/incomingCallWidget" 
android:visibility="gone" 
android:layout_marginBottom="-46.0dip" 
android:background="@color/incall_call_banner_background" 
android:layout_gravity="bottom|center" 
android:layout_marginTop="20.0dip" 
android:gravity="[COLOR="red"]left|top[/COLOR]" 
prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 
prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 
prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 
prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 
prvandroid:innerRadius="@android:dimen/glowpadview_inner_radius" 
prvandroid:outerRadius="@android:dimen/glowpadview_target_placement_radius" 
prvandroid:outerRingDrawable="@android:drawable/ic_lockscreen_outerring" 
prvandroid:snapMargin="@android:dimen/glowpadview_snap_margin" 
prvandroid:vibrationDuration="20" prvandroid:feedbackCount="1" 
prvandroid:glowRadius="@android:dimen/glowpadview_glow_radius" 
prvandroid:pointDrawable="@android:drawable/ic_lockscreen_glowdot"



If you do not want to find and change the code, here is a ZIP that has both files with code in them so that you can just replace them with your old ones. I am pretty sure it is the same across devices, but the rest of the APK's may not be so only replace these files.

Center FIX Files




If you appreciate me sharing this information, please hit the THANKS button :good: and/or the "Donate to Me" Button :fingers-crossed:
 
Last edited:

andronikal659

Senior Member
Sep 28, 2011
710
117
Montreal
Thank you for your hard work.

I don't know if this works for all rom but I just flash the inverted mms 4.1 (contacts.apk) without the phone.apk and it works beautifully.

The only problem I have with the paranoid rom is when I change the "settings" to phablet or tablet I get the offset lockscreen slider. & my system keeps rebooting from time to time but that's something with paranoid I guess.
 

Bradl79

Senior Member
May 25, 2008
3,355
4,586
J'Ville
So we cant just replace the files we have to decompile and recompile. Can u make them complied and upload. Thank u
 

Moose0704

Senior Member
May 6, 2012
2,344
4,503
41
Princeton TX
Google Pixel Fold
So we cant just replace the files we have to decompile and recompile. Can u make them complied and upload. Thank u

Yes you have to do that. And no I cannot do that for you, this has to be done "per ROM" every framework-res.apk and Phone.apk is different per ROM.

Now if you tell me what ROM you are on I can do it then but I cannot just simply get you the file, it will boot loop your phone if you are not on the ROM I de-compile and re-compile from.
 
Last edited:

ColSaulTigh

Senior Member
May 24, 2011
72
21
Lake Mary, FL
Yes you have to do that. And no I cannot do that for you, this has to be done "per ROM" every framework-res.apk and Phone.apk is different per ROM.

Now if you tell me what ROM you are on I can do it then but I cannot just simply get you the file, it will boot loop your phone if you are not on the ROM I de-compile and re-compile from.

I am running [ROM]4.1.1[Android Open Kang Project] BUILD 1 + Lockscreen Targets **Aug. 22nd,, specifically this version: aokp_quincyatt_jb-build-1_AUG_22_12.zip

If you could make a flash-able zip, I'd be most grateful.

Thanks!
 

mejori

Senior Member
Mar 8, 2008
561
266
fort myers
ok moose,...i F$%&%^ hate you right now!!!! lol....:crying::laugh::eek:

holy crap this apk editing s%$! is a pain in the ars!!!!

just joking..it is a pain but since you left no choice but for me to learn how to do it i wanted to say thank you ..i been 2 days on this crap ..between braks at work/home..finally figured out how to edit..still havent finished it up, but again wanted to thank you!!!:highfive:
 
  • Like
Reactions: Moose0704

Moose0704

Senior Member
May 6, 2012
2,344
4,503
41
Princeton TX
Google Pixel Fold
ok moose,...i F$%&%^ hate you right now!!!! lol....:crying::laugh::eek:

holy crap this apk editing s%$! is a pain in the ars!!!!

just joking..it is a pain but since you left no choice but for me to learn how to do it i wanted to say thank you ..i been 2 days on this crap ..between braks at work/home..finally figured out how to edit..still havent finished it up, but again wanted to thank you!!!:highfive:

Lol what are you having problems with? What ROM are you on?

Sent from my SAMSUNG-SGH-I717 using xda premium
 
  • Like
Reactions: mejori

mejori

Senior Member
Mar 8, 2008
561
266
fort myers
Lol what are you having problems with? What ROM are you on?

Sent from my SAMSUNG-SGH-I717 using xda premium

nevermind i got it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i can not get it to recompile :

Code:
C:\Users\Admin\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Admin\apktool\framework-res\res\values\plurals.xml:79: error: Multiple
substitutions specified in non-positional format; did you mean to add the format
ted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values\plurals.xml:79: error: Found tag
 </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-af\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-af\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-am\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-am\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ar\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ar\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-bg\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-bg\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ca\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ca\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-cs\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-cs\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-da\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-da\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-de\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-de\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-el\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-el\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-en-rGB\plurals.xml:79: error: Mu
ltiple substitutions specified in non-positional format; did you mean to add the
 formatted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-en-rGB\plurals.xml:79: error: Fo
und tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-es\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-es\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-es-rUS\plurals.xml:79: error: Mu
ltiple substitutions specified in non-positional format; did you mean to add the
 formatted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-es-rUS\plurals.xml:79: error: Fo
und tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-fa\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-fa\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-fi\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-fi\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-fr\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-fr\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-hi\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-hi\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-hr\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-hr\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-hu\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-hu\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-in\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-in\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-it\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-it\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-iw\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-iw\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ja\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ja\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ko\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ko\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-lt\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-lt\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-lv\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-lv\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ms\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ms\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-nb\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-nb\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-nl\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-nl\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-pl\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-pl\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-pt\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-pt\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-pt-rPT\plurals.xml:79: error: Mu
ltiple substitutions specified in non-positional format; did you mean to add the
 formatted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-pt-rPT\plurals.xml:79: error: Fo
und tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ro\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ro\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-ru\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-ru\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-sk\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-sk\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-sl\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-sl\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-sr\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-sr\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-sv\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-sv\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-sw\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-sw\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-th\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-th\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-tl\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-tl\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-tr\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-tr\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-uk\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-uk\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-vi\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-vi\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-zh-rCN\plurals.xml:79: error: Mu
ltiple substitutions specified in non-positional format; did you mean to add the
 formatted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-zh-rCN\plurals.xml:79: error: Fo
und tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-zh-rTW\plurals.xml:79: error: Mu
ltiple substitutions specified in non-positional format; did you mean to add the
 formatted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-zh-rTW\plurals.xml:79: error: Fo
und tag </item> where </plurals> is expected
C:\Users\Admin\apktool\framework-res\res\values-zu\plurals.xml:79: error: Multip
le substitutions specified in non-positional format; did you mean to add the for
matted="false" attribute?
C:\Users\Admin\apktool\framework-res\res\values-zu\plurals.xml:79: error: Found
tag </item> where </plurals> is expected
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\RICHAN~1\AppData\Local\Tem
p\APKTOOL8798548609813210201.tmp, -x, -S, C:\Users\Admin\apktool\framework-res\r
es, -M, C:\Users\Admin\apktool\framework-res\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
        at brut.androlib.Androlib.buildResources(Androlib.java:248)
        at brut.androlib.Androlib.build(Androlib.java:171)
        at brut.androlib.Androlib.build(Androlib.java:154)
        at brut.apktool.Main.cmdBuild(Main.java:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\RICHAN~1\AppData\Local\Temp\APKTOOL8798548609813210201.tmp, -x, -S, C:\User
s\Admin\apktool\framework-res\res, -M, C:\Users\Admin\apktool\framework-res\Andr
oidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more

C:\Users\Admin\apktool>
 
Last edited:

mejori

Senior Member
Mar 8, 2008
561
266
fort myers
ok moose i need help if you can or willing .. i decompiled using apk tool, changed the framework like your post says using note++, then recompiled. now i have the new apk, it seems to be about 3MB smaller?? and as far as installing it i used root explorer and replaced existing framework res apk(not sure of a better method)..phone worked for like 30 seconds then it went into bootloop ..can you point me in the right direction? this is fun stuff!! and yes i have searched but cannot find the answer..thanks!!!
 

Moose0704

Senior Member
May 6, 2012
2,344
4,503
41
Princeton TX
Google Pixel Fold
ok moose i need help if you can or willing .. i decompiled using apk tool, changed the framework like your post says using note++, then recompiled. now i have the new apk, it seems to be about 3MB smaller?? and as far as installing it i used root explorer and replaced existing framework res apk(not sure of a better method)..phone worked for like 30 seconds then it went into bootloop ..can you point me in the right direction? this is fun stuff!! and yes i have searched but cannot find the answer..thanks!!!

You should get a tool called ticklemyandroid. That is what I use. After making the changes you have to recompile it then prepare it for pushing then push it to the phone (which you have to be in recovery mode for). Or you can create a zip and just flash it. But either way yes you are doing it wrong lol but your getting there ;)

I was in the same boat as you when I figured this out ;)

Sent from my SAMSUNG-SGH-I717 using xda premium
 
  • Like
Reactions: mejori

Clark Joseph Kent

Senior Mod / Moderator & RC-RT Committees Lead
Staff member
Dec 17, 2011
28,647
4
67,662
55
www.marines.com
Samsung Galaxy S24 Ultra
Add to the Super GNote Page

Tossed you in the JBean ROM Section, thx Moose!!
[Road & Ref Map]: Galaxy Note Super Everything Thread (I717)
YK3Cv.gif
 
  • Like
Reactions: Moose0704

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    How to Center Align the Lock screen and Answer screen in Jellybean

    All, I like most others have been really excited about the new CM10, 4.1.1 Jellybean ROMS. I however have been annoyed by the off centered lock screen unlock handle. As most of you know just about all of them are off. Well after many hours of looking through code I have found out how to center that unlock handle on the lockscreen as well as the incall answer screen.

    Now the changes that need to be made have to be made per ROM, it is not just a simple flashable zip and boom you have it on any ROM. The changes have to be made in two files inside the "framework-res.apk" and the "Phone.apk". So because there are so many different JB ROMs out there I decided to just share the code I changed and where I changed it. ;)

    So if you have a ROM and want them centered for your users, or you are a user that knows how to de-compile an APK and re-compile it, then this is for you!


    Files to change:

    framework-res.apk - The file that needs to be edited is "keyguard_screen_tab_unlock.xml" this file can be found in framework-res.apk/res/layout
    Phone.apk - The file that needs to be edited is "incall_touch_ui.xml" this file can be found in Phone.apk/res/layout


    Code to change: CHANGES ARE IN RED

    framework-res.apk - BEFORE:

    Code:
    <com.android.internal.widget.multiwaveview.GlowPadView 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@id/unlock_widget" 
    android:gravity="top" 
    android:focusable="true" 
    android:layout_alignParentBottom="true" 
    android:targetDrawables="@array/lockscreen_targets_with_camera" 
    android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" 
    android:directionDescriptions="@array/lockscreen_direction_descriptions" 
    android:handleDrawable="@drawable/ic_lockscreen_handle" 
    android:outerRingDrawable="@drawable/ic_lockscreen_outerring" 
    android:outerRadius="@dimen/glowpadview_target_placement_radius" 
    android:innerRadius="@dimen/glowpadview_inner_radius" 
    android:snapMargin="@dimen/glowpadview_snap_margin" 
    android:feedbackCount="1" 
    android:vibrationDuration="20" 
    android:glowRadius="@dimen/glowpadview_glow_radius" 
    android:pointDrawable="@drawable/ic_lockscreen_glowdot"


    framework-res.apk - AFTER:

    Code:
    <com.android.internal.widget.multiwaveview.GlowPadView 
    android:orientation="horizontal" 
    android:layout_width="fill_parent" 
    android:layout_height="[COLOR="Red"]wrap_content[/COLOR]" 
    android:id="@id/unlock_widget" 
    android:gravity="[COLOR="Red"]left|top[/COLOR]" 
    android:focusable="true" 
    android:layout_alignParentBottom="true" 
    android:targetDrawables="@array/lockscreen_targets_with_camera" 
    android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" 
    android:directionDescriptions="@array/lockscreen_direction_descriptions" 
    android:handleDrawable="@drawable/ic_lockscreen_handle" 
    android:outerRingDrawable="@drawable/ic_lockscreen_outerring" 
    android:outerRadius="@dimen/glowpadview_target_placement_radius" 
    android:innerRadius="@dimen/glowpadview_inner_radius" 
    android:snapMargin="@dimen/glowpadview_snap_margin" 
    android:feedbackCount="1" 
    android:vibrationDuration="20" 
    android:glowRadius="@dimen/glowpadview_glow_radius" 
    android:pointDrawable="@drawable/ic_lockscreen_glowdot"


    Phone.apk - BEFORE:

    Code:
    <com.android.internal.widget.multiwaveview.GlowPadView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:id="@id/incomingCallWidget" 
    android:visibility="gone" 
    android:layout_marginBottom="-46.0dip" 
    android:background="@color/incall_call_banner_background" 
    android:layout_gravity="bottom|center" 
    android:layout_marginTop="20.0dip" 
    android:gravity="top" 
    prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 
    prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 
    prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 
    prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 
    prvandroid:innerRadius="@android:dimen/glowpadview_inner_radius" 
    prvandroid:outerRadius="@android:dimen/glowpadview_target_placement_radius" 
    prvandroid:outerRingDrawable="@android:drawable/ic_lockscreen_outerring" 
    prvandroid:snapMargin="@android:dimen/glowpadview_snap_margin" 
    prvandroid:vibrationDuration="20" prvandroid:feedbackCount="1" 
    prvandroid:glowRadius="@android:dimen/glowpadview_glow_radius" 
    prvandroid:pointDrawable="@android:drawable/ic_lockscreen_glowdot"


    Phone.apk - AFTER:

    Code:
    <com.android.internal.widget.multiwaveview.GlowPadView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:id="@id/incomingCallWidget" 
    android:visibility="gone" 
    android:layout_marginBottom="-46.0dip" 
    android:background="@color/incall_call_banner_background" 
    android:layout_gravity="bottom|center" 
    android:layout_marginTop="20.0dip" 
    android:gravity="[COLOR="red"]left|top[/COLOR]" 
    prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 
    prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 
    prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 
    prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 
    prvandroid:innerRadius="@android:dimen/glowpadview_inner_radius" 
    prvandroid:outerRadius="@android:dimen/glowpadview_target_placement_radius" 
    prvandroid:outerRingDrawable="@android:drawable/ic_lockscreen_outerring" 
    prvandroid:snapMargin="@android:dimen/glowpadview_snap_margin" 
    prvandroid:vibrationDuration="20" prvandroid:feedbackCount="1" 
    prvandroid:glowRadius="@android:dimen/glowpadview_glow_radius" 
    prvandroid:pointDrawable="@android:drawable/ic_lockscreen_glowdot"



    If you do not want to find and change the code, here is a ZIP that has both files with code in them so that you can just replace them with your old ones. I am pretty sure it is the same across devices, but the rest of the APK's may not be so only replace these files.

    Center FIX Files




    If you appreciate me sharing this information, please hit the THANKS button :good: and/or the "Donate to Me" Button :fingers-crossed:
    2
    If you want I nice smooth running CM10 ROM on your Samsung Galaxy Note i717 that already has the centered fixes, check out this ROM HERE by ManelScout4Life
    2
    looks like h0tw1r3 got the lockscreen center fix approved
    http://review.cyanogenmod.com/#/c/21925/
    1
    Thanks for doing this moose! I appreciate it!

    Sent from my SAMSUNG-SGH-I717 using xda app-developers app
    1
    finally got it today as a flashable zip !! thanks to the above post..i only did it for the lockscreen .. phone is already centered,.. thanks moose

    it centered my lockscreen the way it should and all is working fine, but after toying with the phone i am having one issue.. it seems i cannot acccess system settings at all??? "unfortunately,settings has stopped" any help?
    im on cm10 paranoid 2.00