[Motorola Atrix 2] alteredlikeness:
[HOW-TO] ADB/Change Moto Lockscreen to AOSP

BRIEF GUIDE TO USING ADB:

I will run through some example commands using adb - like pulling files from phone, pushing files to phone, deleting, setting permisisons, etc..

If you have adb set up in your environmental variables or .bashrc, then you can simply open a command prompt on the folder you would like to use adb from (right-click, or hold shift and right-click on the folder). Just always keep in mind your paths and folder structures.. Also, see HERE for more on adb.

Make sure you have adb and your device drivers installed and set up properly, then connect your usb..

#Terminates the adb server process (can help clear up adb issues):
adb kill-server

#Starts adb (or just use any adb command to start):
adb start-server

#List attached devices
adb devices

#Start logcat (Ctrl+C will terminate the current process)
adb logcat

#To pull files to the folder in your command prompt/terminal path
adb pull /system/framework/framework-res.apk
adb pull /system/etc/paranoid/preferences.conf
adb pull /cache/recovery/last_log

#To push files to our phone we need to first push them to the sdcard (also making a new directory on the sdcard called "newfolder")
adb push framework-res.apk /sdcard/
adb push SystemUI.apk /sdcard/
adb shell mkdir /sdcard/newfolder
adb push dexopt-wrapper /sdcard/newfolder

#To start a remote shell in the attached device and get superuser access
adb shell
su

#The following commands need to be run from shell..
#Mount /system re-writable
mount -o rw,remount -t ext3 /dev/block/system /system

#Copy files from sdcard to system
cp /sdcard/framework-res.apk /system/framework
cp /sdcard/SystemUI.apk /system/app
cp /sdcard/newfolder/dexopt-wrapper /system/bin

#Set proper permissions
chmod 0644 /system/framework/framework-res.apk
chmod 0644 /system/app/SystemUI.apk
chmod 0755 /system/bin/dexopt-wrapper

#Remove dalvik-cache and/or other files (note: on some ROMs, dalvik-cache is in /cache/dalvik-cache)
rm /data/dalvik-cache/system@app@SystemUI.apk@classes.dex
rmdir /sdcard/newfolder

#Mount /system read-only (not necessary if rebooting right away)
mount -o ro,remount -t ext3 /dev/block/system /system

#Exit shell
exit
exit

#Reboot the device
adb reboot

Change Moto Lockscreen to stock AOSP (MultiwaveView)

(FYI - In GB it was a simple bools.xml edit to switch the Moto lock off.. and there's probably another way to do this - like by bypassing the zz_moto stuff entirely, but..)

If you have a custom locksceen already, then this probably doesn't apply or has already been done...

-decompile framework-res.apk

-open /res/layout/zz_moto_keyguard_unlock_widget.xml with Notepad++, Geany, or similar text editor

-delete all text there, and replace with this:

<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.multiwaveview.MultiWaveView android:orientation="horizontal" android:id="@id/unlock_widget" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" android:hitRadius="@dimen/multiwaveview_hit_radius" android:vibrationDuration="20" android:snapMargin="@dimen/multiwaveview_snap_margin" android:feedbackCount="3" android:verticalOffset="0.0dip" android:horizontalOffset="0.0dip"
xmlns:android="http://schemas.android.com/apk/res/android" />

Stopping here and recompiling would give you something like this:

The above just changes the "widget" to the aosp multiwaveview and uses resources/drawables that we already have, which Moto decided to overlay with theirs (adding more bulk to the apks/jars)...

To edit the layout (remove/rearrange things in general), you need to edit keyguard_screentab_unlock.xml in the same folder - it's all there - the clock, date, sound toggle, horz. divider, charge (@id/status1) and alarm icons, unlock widget, music controls, etc... just play around with things.. ;)

To add the phone and text msg icons to the unlock widget, we need to edit the android.policy.jar and other xmls in framework-res.

More to come on that...

For Honeycomb style ripple lockscren mod, see here:

http://xdaforums.com/showpost.php?p=33854556&postcount=70

Change Clock Color in Status Bar

(OUTDATED: FOR GB)

(This is a method I came up with myself)

-First, find a color that you want for your status bar clock.

-Now, find the hex code (combination of 6 letters and numbers) for that color --> see HERE, and/or HERE, and the Android Design guide for colors HERE. You may also use programs like GIMP and Photoshop to preview colors by hex code.

*For reference, 000000 is the absence of color (completely black), on the other end is ffffff (full on, all blinding color - completely white). Also, 33b5e5 is for ICS blue, 99cc00 is for android green (used below in the example).

-Decompile SystemUI.apk

-Open /res/layout/status_bar.xml (with a proper text editor like Notepad++)

-Look for the line that I highlighted in blue (from stock 2.3.6):

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="18" />
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
[COLOR="Blue"]<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />[/COLOR]
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">

-Add the code android:textColor="#ff33b5e5" to the line that starts with <com.android.systemui.statusbar.Clock as shown highlighted red below (

NOTE:

Insert your choice of hex code here - the 33b5e5 is just used as an example):

<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"]android:textColor="#ff99cc00"[/COLOR] android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

Again, insert your choice of color in the blanks> android:textColor="#ff------"

-Make sure your spaces are uniform and then save the xml.

-Compile the apk, and use your own method for copying signatures (I use APK Manager, it does it for you)

-Move to your phone by your own means... Enjoy! Please don't blame me if you mess something up!

Related:

There are a lot more mods with partial direction in individual posts throughout this thread.. read on, if interested. I will hopefully compose a location list or something for some of these other mods in the near future.. until then, good luck, and godspeed...

HOW-TO Remove Carrier Name from Status Bar

Bools.xml mods list