Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,710 Members 39,397 Now Online
XDA Developers Android and Mobile Development Forum

[TUTORIAL][SENSE 3.0+] The M10 Code Discovery Thread

Tip us?
 
il Duce
Old
(Last edited by il Duce; 18th October 2013 at 04:01 AM.) Reason: added links
#1  
il Duce's Avatar
Recognized Developer / Contributor / Themer / Retired Moderator - OP
Thanks Meter 16,445
Posts: 16,696
Join Date: Feb 2009
Location: Twin Cities, MN

 
DONATE TO ME
Default [TUTORIAL][SENSE 3.0+] The M10 Code Discovery Thread

Hello fellow themers and modders!

This thread will be STRICTLY for the sharing and discovery of m10 code modifications.

This is NOT a request thread (for now) - it's possible at some point this could happen...

To contribute to this thread, and to jump in and learn something new, you'll need some basics.
- a sense 3.0+ device or ROM
- Virtuous Ten Studio (VTS) - this is where ALL the code edits happen
- apktool (maybe)
- sdk/jdk (maybe)
- an open mind

I have been modding this code since sense 3.0 in various apks, as have some others I know. Here's their info:
me - mostly lockscreen mods and rosie mods
mayfield103 - mostly clock widget mods
gumby63 - lockscreen mods
jeffsanace - mostly rosie mods
dased14 - general tinkering
ajthescot - general tinkering

^ more can be added! ^ these are just the guys I know personally. My hope is that we will get a HUGE gathering of m10 code modders so we can all make sense more fun.

Stuff I know can be done:
- lock shortcuts
*can be moved anywhere on the screen (literally - also applies to switching them around R-L)
*can be removed or individually removed (i.e. 3 instead of 4)
*can be removed entirely (leaving the text)
*text can be removed
*lots more

- lockring
*same as above
*can be made to unlock in reverse (pull down instead of up)

- lock widgets
*backgrounds can be removed
*can be moved anywhere on the screen

- lock music
*art can be removed
*text can be removed
*buttons can be removed

- lock time
*can be moved anywhere on the screen
*can be removed
*can be individually customized (i.e. remove carrier and time, leave date, etc.)

- rosie navbar
*can be removed
*button highlights can be removed
*workspace grid changes (5x4, 5x5, ad infinitum - requires mods in .arsc)

- rosie widgets
*backgrounds can be removed
*any spacing probably
*transparent clock tiles

There's a lot more that's just what I can think of that I've done or that others listed above have done. Essentially any location changes or size changes, and zillions of other things.

My hope is that we will all post what we have done or can do, along with screens, and tutorials (not n00b proof tutorials, just the pertinent code modifications).

HUGE THANKS TO:
diamondback, vaelek, flemmard, and cypis! - the dev team who brought us VTS
the guys I listed above who have played with these things and helped me along the way!

I'm sure I'll add more info and people to this as the thread progresses

Here's some relevant tutorials (mostly sense 3.0 but almost identical logic applies to the newer versions)
rosie workspace mod
remove "phone" text
remove icon labels
remove widget labels
LOTS of lockscreen edits
minimal music
shortcuts info
The Following 36 Users Say Thank You to il Duce For This Useful Post: [ Click to Expand ]
 
il Duce
Old
#2  
il Duce's Avatar
Recognized Developer / Contributor / Themer / Retired Moderator - OP
Thanks Meter 16,445
Posts: 16,696
Join Date: Feb 2009
Location: Twin Cities, MN

 
DONATE TO ME
reserve
The Following 7 Users Say Thank You to il Duce For This Useful Post: [ Click to Expand ]
 
il Duce
Old
#3  
il Duce's Avatar
Recognized Developer / Contributor / Themer / Retired Moderator - OP
Thanks Meter 16,445
Posts: 16,696
Join Date: Feb 2009
Location: Twin Cities, MN

 
DONATE TO ME
reserved
The Following 7 Users Say Thank You to il Duce For This Useful Post: [ Click to Expand ]
 
il Duce
Old
#4  
il Duce's Avatar
Recognized Developer / Contributor / Themer / Retired Moderator - OP
Thanks Meter 16,445
Posts: 16,696
Join Date: Feb 2009
Location: Twin Cities, MN

 
DONATE TO ME
reserved again
The Following 7 Users Say Thank You to il Duce For This Useful Post: [ Click to Expand ]
 
Gumby63
Old
(Last edited by Gumby63; 13th September 2012 at 10:35 PM.)
#5  
Gumby63's Avatar
Recognized Themer
Thanks Meter 2,920
Posts: 2,107
Join Date: Dec 2010
Location: Atlanta

 
DONATE TO ME
Lockscreen Mods! This post is a continuous WIP!
Updated 9/13


Before we do anything, here are the prerequisites you need:

1. You will need a program called VTS (Virtuous Ten Studio) You can get that here. This is made by the same brilliant minds that created the original m10tools.
2. Idlescreen_Base.apk. That apk is where all of the edits I will be describing are located in.
3. Last but not least, patience. Lots of patience.

If you know how to use VTS, then skip this!

Alright now that you have VTS installed, open it up. In the top left corner click on file -> new project.

Choose M10-Project, and pick your project and solution name. Now click on "import" on the left column and navigate to your Idlescreen_base.apk then click ok.

Now you're ready to get your hands dirty!




Section 1: Time, date, operator, am/pm, and unlock text.

This section will be used to describe all of the amazing things you can do to things in the title.

Navigate to the folder as seen in the screenshot:

 


And double click lockscreen_time.x10

Scroll down a little bit, and you will see a property labeled: "lockscreen_time"

Any edits you make to this property will affect everything. Meaning Time, date, operator, am/pm etc.

So lets say you want to move the all of that to the left side of the screen. Press the + box to the left to unfold the properties. You will see a bunch of different values like so:

 




Let's take a look at "offset" :

There are three values. 0:0:0
  • The first value is what controls where it sits on the screen horizontally.
  • The second value is what controls where it sits on the screen vertically.
  • The third value controls..well..I'm not too sure yet. Anytime I make an edit to it it moves everything diagonally.
  • Negative values move things to the left of the screen. Positive values move things to the right of the screen.
Pro tip: don't mess with the third one. It is MUCH easier to just play with the first two values.

Now let's move everyhting to the left side of screen! So change the first value to -220 and click "save" on the top left. So it looks like: -220:0:0

Okay so let's test your edit. Go over to the left hand column with all of the folders and right click your project name and select "build project" and then "push to device".

An alternative method you can do that I personally use is to click "push all" at the top. That will build your apk and push it to the device in you step. Do not do that method if you have more than one project open in your solution. It will push both projects.

Now there are two ways you can reboot. They are:

1. Click on the ADB tab and select reboot. Done! When you reboot your new lockscreen should be staring you in the face.

2. I prefer this way beacsue you dont have to wait for the reboot, and it's easier on your device. Click on the ADB tab, and open an ADB Shell prompt. Type in "am force-stop com.htc.idlescreen.shortcut" without quotes. This restarts the lockscreen process with your fresh edit.

Pro tip(s): You don't need to re-type that every time, just simply press the up arrow key and then press enter. Also, I have it so my phone never sleeps while charging. That eliminates the problem of having to turn the screen back on every time it turns itself off.



Next up we have "CenterScale"

This value determines the size of the text.

Duce explained this pretty well in a post, so I'm going to quote him on that.

Quote:
Originally Posted by il Duce View Post
I'll use the lock clock as an example

In time x10 find the property under "lockscreen_time" and expand it. The property for "CenterScale" where it's 1:1:1, and the first two values are width and height respectively. They need complete integers in any value. So 2 would work, 3.725 would work, 0.8 would work, but .8 wouldn't.

This logic should apply to anything really, including clock tiles, button sizes, the rosie dock, etc.

Go wild
Those two properties are the two most important/most used in my opinion. Everything else is pretty self explanatory.


Okay. so I shrunk everything and moved it to the left. Now that I look at it, I kinda want to get rid of the date. How do I do that?

Hiding things from the lockscreen is probably the easiest thing you can do.

In the same x10, find these properties:

  • "text.lockscreentime_operator"
    -Service Provider (Sprint, ATT, Verizon etc)
  • "text.lockscreentime_time"
  • "text.lockscreentime_ampm"
  • "text.lockscreentime_date"
  • "textcomp.pull_unlock"
    -The text " pull ring to unlock"


Under every property, you will find a line like this:

<Bool Name="Visible" Header="239748898" IDC="true">true</Bool>

Change that to:

<Bool Name="Visible" Header="239748898" IDC="true">false</Bool>

And BOOM whatever you want gone will no longer be there. Pretty simple.

So that pretty much sums up this section.


Section 2: Lockring & Shortcuts.

This is where it can start to get a little complicated. These are the x10's you will be making edits to:
  • Lockscreen_container.x10
  • Lockscreen_ring.x10
  • Locksceen_ringcontainers.x10
  • Lockscreen_shortcut.x20

More to come!




Some examples of what is possible are attached.
Attached Thumbnails
Click image for larger version

Name:	2012-09-02_21-56-29.jpg
Views:	3488
Size:	24.0 KB
ID:	1300836   Click image for larger version

Name:	2012-09-03_12-04-06.jpg
Views:	2879
Size:	21.1 KB
ID:	1300837   Click image for larger version

Name:	2012-09-03_14-03-07.jpg
Views:	2719
Size:	18.9 KB
ID:	1300838   Click image for larger version

Name:	2012-09-03_14-45-05.jpg
Views:	2617
Size:	19.9 KB
ID:	1300839  
The Following 16 Users Say Thank You to Gumby63 For This Useful Post: [ Click to Expand ]
 
dased14
Old
#6  
dased14's Avatar
Senior Member
Thanks Meter 7,118
Posts: 7,350
Join Date: Dec 2010
Location: cincy,ohio

 
DONATE TO ME
Guess i'll squat here

( squaters rights duce you can no evict me haha)
The Following 5 Users Say Thank You to dased14 For This Useful Post: [ Click to Expand ]
 
whiterider13
Old
#7  
whiterider13's Avatar
Senior Member
Thanks Meter 622
Posts: 1,010
Join Date: Jan 2011
Location: Sugar Hill, GA
Very nice! I look forward to learning some stuff from you guys.

Also, I think fdb8231 would be good to get in on this. I know he did a lot of work on the og and the 3d.

Sent from my EVO using Xparent Blue Tapatalk 2
The Following User Says Thank You to whiterider13 For This Useful Post: [ Click to Expand ]
 
hockeyfamily737
Old
(Last edited by hockeyfamily737; 4th September 2012 at 02:27 AM.)
#8  
hockeyfamily737's Avatar
Recognized Contributor
Thanks Meter 2,817
Posts: 2,240
Join Date: Apr 2011
Location: Connecticut

 
DONATE TO ME
Hi.....Don't mind me. I'm just here for the food. Although if someone ever makes an m10 decompiler for Linux, I might even be able to contribute
•You know you're a nerd when your wife says: "If you don't get off that computer I'm leaving!" & your instinctive response is to chastise her for not following an "if" statement with an "else" clause.
The Following User Says Thank You to hockeyfamily737 For This Useful Post: [ Click to Expand ]
 
dased14
Old
#9  
dased14's Avatar
Senior Member
Thanks Meter 7,118
Posts: 7,350
Join Date: Dec 2010
Location: cincy,ohio

 
DONATE TO ME
Quote:
Originally Posted by whiterider13 View Post
Very nice! I look forward to learning some stuff from you guys.

Also, I think fdb8231 would be good to get in on this. I know he did a lot of work on the og and the 3d.

Sent from my EVO using Xparent Blue Tapatalk 2
sorry we cut off his fingers and pulled out his tongue so he can no play
The Following User Says Thank You to dased14 For This Useful Post: [ Click to Expand ]
 
whiterider13
Old
#10  
whiterider13's Avatar
Senior Member
Thanks Meter 622
Posts: 1,010
Join Date: Jan 2011
Location: Sugar Hill, GA
Quote:
Originally Posted by dased14 View Post
sorry we cut off his fingers and pulled out his tongue so he can no play
ouch!

Sent from my EVO using Xparent Blue Tapatalk 2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes