[Guide] Porting Features Example - Nexus 4 General

I've had several people asking me to "make a tutorial" on this. You're in for a bad time if you can't be semi-intuitive about it. I literally figured all of this out myself. Should this save you some time? Yes. But it won't make you a "1337 coding hax0r" (which I'm not, either. I don't even know java). Every day you'll learn something new. "Ah! So that prevents it from turning on by default!" "Oh, that makes the actual checkbox appear!" Expect some hickups. Expect to do some reading. Expect staring at your PC for an hour and realizing you're lost. These things happen. This guide is just an example of me forwarding a 4.1 feature of AOKP to 4.2. You can use it as an outline for porting features from one Rom to the other (please ask permission from the author) or doing exactly the sort of work I'm doing here.
So you've been playing around in Gerrit; cherry-picking experimental features, using a mergetool to resolve conflicts, learning to fix your own mistakes...
What's the next step? Where should you go from here to start helping the community and developers along?
How about moving features or fixes forward from old versions of AOKP?
Now, I'm going to be showing you an extremely simple example. Your challenges WILL be harder.
But that's part of the "fun" (or so they keep telling me).
Getting Started:
Familiarize yourself with the basics of Gerrit through Roman's Tutorial.
You're going to want to set up and account on Gerrit, and follow the commands listed to get your Keys set up and authenticated with Gerrit.
Now, find yourself a commit (and it's dependencies) you'd like to port upwards. The easiest way to do this is using Gerrit's search function.
Code:
message:SEARCHTERM
To express myself easily with this tutorial, I'll be using examples. Please don't upload these exact commits 200 times <_<.
I'll be using THIS and THIS.
You'll notice that these commit's have titles that end in (?/2).
This is an indication that they require pieces in more than one location to work.
Any feature in RomControl or Settings will have two commits (usually within /frameworks/base/).
Make sure you find all of the required pieces before moving forward.
You're going to want to "cd" to the projects now and start a repo.
This is explained in Roman's Tutorial.
For example:
Code:
cd ~/aokp_jb/frameworks/base/
repo start portlocktime .
The repo name does NOT matter. Name it whatever is going to be easy to remember.
Now, we want to look at what this commit changed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Under the latest patchset to the commit you'll see a list of files. You're going to want to click each one and open their respective files on your PC. For example, I see "security_settings_chooser.xml" is the only file listed for this commit. So I'll click on it in Gerrit, and see if the file exists on my PC.
It does! So that's a good thing. It means we're probably going to be able to move this forward without finding a new file location and how to merge it into the file.
Now we want to look and see if the changes are going to merge into the file without giving us a hassle.
Will it give us a hassle?
FULL SIZE IMAGE
Nah, that looks about like the file I'm looking at so the changes should be easy.
Now, the green blocks in Gerrit means something completely new was added.
So we have a block of code here that we need to copy into the file.
Oh god! What have we done...it looks like I just gave this file a disease...
Wait a second. Before you go and put this disgusting creature out of it's misery, let's try and fix it.
See how the first "<ListPreference" is indented?
And all of those nasty little red numbers?
Delete all of that and make sure your change lines up where it should (in comparison to Gerrit and the other blocks in this file).
You'll also want to make a run-through with your cursor. I use the arrow keys on my keyboard and roll my cursor all over the lines to make sure it doesn't make any huge jumps (indicating an indent) or any extra spaces after a line is finished. You don't want spaces after a line at all.
And you don't want indents at all.
So I wrapped up my changes...now I'll save the file.
Now in the Terminal:
Code:
git status
You'll see a list of untracked files. These are backup files of the files you just changed and saved.
Code:
/res/xml/security_settings_chooser.xml~
This is the only file I'm seeing.
We want to remove it!
How? Add "rm ." before the location that the Terminal spat out.
Code:
rm ./res/xml/security_settings_chooser.xml~
And the file disappears.
Now we're ready to add these files and prepare them for upload.
Code:
git add -A
Then type:
Code:
git commit -a
Now. We're going to want to be careful here.
The simplest way to be polite and give proper credit is to copy the commit message from the old commit.
Let's look at this commit.
Code:
Lockscreen: Add timeout and instant lock option to slide lock (1/2)
This adds AOSP's new timeout and instant lock options to the
slide (aka chooser) style lockscreen.
To Do: Add the vibrate option as well.
Change-Id: I5d48282e484b325a3c15f2966077222dc753026f
Signed-off-by: KhasMek <[email protected]>
I'm going to cut off the "Signed-off-by" and "Change-Id" lines.
What if we screwed something up? We don't want the owner of this commit to be responsible!
And the Change-Id? This is a different commit. Not a patch of the old one.
Code:
Lockscreen: Add timeout and instant lock option to slide lock (1/2)
This adds AOSP's new timeout and instant lock options to the
slide (aka chooser) style lockscreen.
To Do: Add the vibrate option as well.
Now you want to paste your commit message into the Terminal and hit ctrl+x afterwards.
Save Modified Buffer? (type "y" to answer yes).
Messsage to write? (just hit enter).
Yay! We're ready to upload!
Did you author this commit?
No, you didn't.
So we're going to make the original author the author of this commit as well.
See the author line there?
Copy it from your commit.
Now in your Terminal, type:
Code:
git commit --amend --author="USERNAME <[email protected]>"
For me, I'll use:
Code:
git commit --amend --author="KhasMek <[email protected]>"
Yay! We're ready to upload!
No. Make a build and see if it works.
Did it?
Sure. Why not.
Code:
repo upload .
Remember. We have another commit to add!
Ok so what were the changes in the /frameworks/base/ package?
FULL SIZE IMAGE
Red lines means something was changed. So we can see here that this:
Code:
|| !mLockPatternUtils.isSecure()
Was removed.
Save and reupload...and you're ready to rock!
Me: That's it.
You: You are a horrible person.
Me: What?!
You: You just uploaded the easiest commit ever. I could have used that to start off!
Me: If you're going to learn anything, you need to work at it. JK this would have been perfect. My bad.
READ THIS:
-Don't make the team hate me for writing this by uploading things that don't work or have author, whitespace, or other annoying errors.
-There are other ways (cherry-picking and rebasing which I find confusing) to do this.
-Use Roman's Tutorial for uploading new patchsets to your commit (if you make little errors like missing a tab/space/etc you can fix it here).
-Learning to read the code a little bit? Cool. Maybe you should move on to repo syncing the old 4.1 code and checking to see of the commit had fixes uploaded to it after the commit you're moving up. You can then easily copy from the old code into the new and include all fixes!
-You smell like roses <3

Related

[HELP NEEDED] Make An Icon and Other Graphics for NubDial :P

Hi all,
Sorry if this is the wrong place to start the thread, but I figured most of the design-gifted people will be here.
Some of you might know I'm currently working on NubDial, a smart dialer for Android (more specifically it only works on 2.0+ for now), and am in need of some graphics. NubDial is open-source and free and will always remain that way .
The highest priority right now would be the icon, and eventually I hope the other graphics are replaced as well. I'm looking at something that looks like stock, just nicer. In fact, just throw your concepts/ideas out here!
Also, I'm really bad at 9patch files, so I'd appreciate it greatly if you could do that as well.
I've attached the drawables up, the one with ALL the required files are in hdpi folders, so if you do make them please make them for the mdpi ones too.
Thanks for the help!
NubDial XDA page: http://forum.xda-developers.com/showthread.php?t=629032
Source: http://code.google.com/p/nubdial
Anything you want out of it besides just looking like stock but nicer?
hey bro,
let me give you a tip. drag, drop, rename the image name to the appropriate image name from anything you like from either the dialer i put together or any dialer of your choice. it's as easy as one two three.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
this looks stock enough. probaby just need to change the colors for you. if you go to the CYANOCH xrom theme. you can find all the files inside the phone.apk.
inside the drawables folder you gave, you only have to worry about the 12 main files which can be modified inside the mdpi folder and then dropped inside the hdpi folder- since the hdpi folder is irrelevant for g1's and mt3g's. you can pair all those files from my dialer. so the dialer digits area would coincide with the the main digits area you see above, the delete button on bottom right would coincide with the top right delete button in your nubdialer, and the middle bottom call button would coincide with the top left call button in your nubdialer. um, and as usual, the dial_btn_normal, pressed, selected would be the same for the dialer buttons.
hi, I make some changes to the code, but dont know how to update the source,
my email : qingcai at gmail dot com.
Hello, I'm new at this forum and my level of english is not so good. I have a doubt with android and in a spanish forum I was told that here could help me. My problem is the next: I want to compile android browser but I can't. Searching in google in found this in another forum:
"But now I want to compile android's Browser. Is the application's (e.g. Browser's) source code + 'developer SDK' enough to accomplish this?
No. The built-in applications can only be built as part of the firmware, as most were written before the SDK existed."
I write in this post because in the spanish forum told me that Wysie made modifications to the borwser and maybe is capable to help me. Sorry for the inconvenience and thank you.
bencrimo said:
Hello, I'm new at this forum and my level of english is not so good. I have a doubt with android and in a spanish forum I was told that here could help me. My problem is the next: I want to compile android browser but I can't. Searching in google in found this in another forum:
"But now I want to compile android's Browser. Is the application's (e.g. Browser's) source code + 'developer SDK' enough to accomplish this?
No. The built-in applications can only be built as part of the firmware, as most were written before the SDK existed."
I write in this post because in the spanish forum told me that Wysie made modifications to the borwser and maybe is capable to help me. Sorry for the inconvenience and thank you.
Click to expand...
Click to collapse
you must compile the entire android source to modify system apps. this cannot be done on widows, only on linux or mac OSX. you must download the source (google "android get source") then make your changes and recompile. once again this cannot be done on windows. if you are running windows but are still interested, you can google "ubuntu live CD" and download the ubuntu system image and burn it to a cd. this will give you several options.
1) you can install ubuntu INSIDE windows as a windows application.
2) you can install ubuntu ALONGSIDE windows, allowing you to boot into either OS system independently.*
3) you can remove windows completely, format your HDD, and install ubuntu.*
4) you can boot ubuntu FROM THE LIVECD, to try out and see if you like it, without making ANY changes to your computer or filesystem. this option is not for continued use, as no changes you make while booted into the LIVECD will be saved. it is considered DEMO MODE.
* NOTE: OPTIONS 2 AND 3 REQUIRE YOU TO FORMAT OR REPARTITION YOUR HARDDRIVE. THIS HAS THE ABILITY TO CAUSE DATA LOSS, SYSTEM FAILURE, ETC, AND SHOULD NOT BE ATTEMTED IF YOU DONT KNOW WHAT YOU ARE DOING, AND/OR IF YOU HAVE NOT MADE PROPER BACKUPS OF YOUR IMPORTANT DATA. I AM NOT RESPONSIBLE FOR ANY DAMAGE RESULTING FROM ANY UNINFORMED DECISIONS YOU MAY MAKE.
option 1 is the safest way to start out if youre interested. this way it install as a windows application, and there is NO RISK of data loss.
good luck...
-BMFC

[SOLVED] Changing the 'current screen' bar in Rosie

If I change the look of the Rosie launcher, so instead of the curved stock one it's more in the style of say Espresso, which is flat, the line/bar that denotes what screen you are on still curves, following the line of the stock Rosie launcher. Does anyone know what file needs to be changed to make it run straight when you go from screen to screen?
I know I could just make it invisible but I'd like it to be there if possible.
jpool81 said:
If I change the look of the Rosie launcher, so instead of the curved stock one it's more in the style of say Espresso, which is flat, the line/bar that denotes what screen you are on still curves, following the line of the stock Rosie launcher. Does anyone know what file needs to be changed to make it run straight when you go from screen to screen?
I know I could just make it invisible but I'd like it to be there if possible.
Click to expand...
Click to collapse
Take a look inside Rosie.apk under /res/drawable-port-mdpi. It contains the button bar.
Have had a look in there but can't see a button bar. I have found the actual bar - "common_mainnav_scroller1.png" under "Rosie.apk\res\drawable-normal-mdpi" but as I say that's just the bar that moves. I need to find out what makes it move in the way it does, so that I can stop it curving and make it move horizontal.
That'll Be in one of the xml file won't it ?
It's not in Rosie.apk, I remembered wrong.
It's inside com.htc.resources.apk in /system/framework.
Same folder inside the file as I told before.
In there are the Rosie .png images, but changing those won't alter the direction of the nav bar will it? As "MacaronyMax" said I think it's an XML file. I just don't know which one it is
Hello,
Has anyone found which xml file needs to be changed to get that indicator to move in a straight horizontal line? I've tried searching Rosie.apk, com.htc.resources.apk and framework-res.apk but I couldn't find it.
Had the same problem with sense-villain 12. I had a look but can't find the drawables needed
This guy has figured it out. See here.
He has also remapped the Rosie buttons. This is the third time I've found someone that has been able to do this, but no one on the GSM Hero side seems to be able to do it.
jpool81 said:
This guy has figured it out. See here.
He has also remapped the Rosie buttons. This is the third time I've found someone that has been able to do this, but no on the GSM Hero side seems to be able to do it.
Click to expand...
Click to collapse
Well what he has done can probably be applied to the Hero. BTW in the drawable you will find some precious XML files hehe
C0mpu13rFr34k said:
Well what he has done can probably be applied to the Hero. BTW in the drawable you will find some precious XML files hehe
Click to expand...
Click to collapse
I'm gonna rip it apart and mash it back together for the Hero and see what I get. Most probably a boot loop lol
jpool81 said:
I'm gonna rip it apart and mash it back together for the Hero and see what I get. Most probably a boot loop lol
Click to expand...
Click to collapse
Hehe probably But why not just look for the XML file? Usually the names makes sense and you can see from there what to do
C0mpu13rFr34k said:
Hehe probably But why not just look for the XML file? Usually the names makes sense and you can see from there what to do
Click to expand...
Click to collapse
Thanks. Will take a look.
oorrr..... ask the dev which file he changed to make it do that much easier
i'll pm him now if you havent got it working yet
Might want to thank ihtpfp69
You've got to change these values , and doing so you can make it any shape you like
Code:
<integer name="scroll_x1">
<integer name="scroll_y1">
<integer name="scroll_x2">
<integer name="scroll_y2">
<integer name="scroll_x3">
<integer name="scroll_y3">
(he didn't say what file that was in but im sure it can't be too hard to find , oh and im guessing thats stock
Thanks. I got a response from him also. The file is integers.xml and should be located inside the Rosie.apk \res\values-normal
Will look at this once I have also sorted the remapping of the Rosie buttons and some other stuff.
@macaroniMax and @jpool81
Wow, thanks you guys. That was REALLY helpful. Let me see if I can get it to change on my HTC Desire!
This is another great thread with lots of helpful information: http://forum.xda-developers.com/showthread.php?t=697994
Great. Would be good to know of the result. It's good that Rosie can be changed in this way, although is quite complex at times, but once figured out It might make me revert back to it from AOSP.
jpool81 said:
Great. Would be good to know of the result. It's good that Rosie can be changed in this way, although is quite complex at times, but once figured out It might make me revert back to it from AOSP.
Click to expand...
Click to collapse
Well, I can confirm that it works. Here's a screen dump of my phone.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As you can see, the current screen bar moves in a straight horizontal line as we switch screens (it's on screen 2 in the screenshot).
This was the only change I wanted and all I did was to make scroll_y1 and scroll_y3 equal to scroll_y2 (oh, in case you're wondering, the main launcher icon has also been changed in com.htc.resources, but that's not relevant to this thread).
ADDENDUM:
If you want to change integers.xml, simply opening Rosie.apk in 7-zip will not work because the res/values* folders are compiled when the apk is built and 7-zip will not be able to show them to you. This means you can't drag and drop the modified files as you can with png resource files. So, you need to decompile the apk first. To do this, I followed the excellent guide posted here: http://forum.xda-developers.com/showthread.php?t=697994.
One odd problem was that when I rebuilt the apk as described in that thread using the command:
Code:
apktool build Rosie
it was missing the security certificates (this is not a problem with the guide as it clearly says "make sure you sign the finished apk"). Since the security certificates are missing, simply pushing the apk to /system/app will not work (it will fail with an error about no valid signatures being found). On a side note, I found this strange because I read somewhere that Android does not check security certificates for system apps. Anyway...
If you follow that thread (the URL I posted) to its end, you'll find that someone else had the same problem. The solution suggested was to first sign the apk, create an update.zip, sign the update.zip and then install it using recovery mode. Strangely, this did not work for me (it seems to have worked for the poster who reported the problem in the other thread). I guess YMMV. My logcat shows that Android compares the signature of Rosie.apk against signatures for other system apps (shared_uid) and they don't match.
* * * * UPDATE UPDATE UPDATE * * * *
Apparently, the following method has side-effects because I find that I cannot delete desktop shorcuts after the change. PLEASE DO NOT FOLLOW THE METHOD DESCRIBED BELOW!!!
So, I took the easy way out. I simply copied over the classes.dex and resources.arsc generated by
Code:
apktool build Rosie
to the original apk file (which had the original certificates to match the other system apps in the ROM I was using). I think this method will work as long as the total number and names of the files remain the same.
Just thought I'd put this down in case anyone else has the same problem.

[Program] PNG Un-Optimizer v1.1 [Windows][02-11-2012]

hi themers!
After png's have been optimized, they are shown as indexed color mode, and therefore isnt correctly loaded with photoshop.
So made a small tool, that is able to convert lots of png-files, into 32bit RGB Alpha mode, so that they are all readable with photoshop, and other image editors as well.
I made this tool, because i thought it was a bit of a hassle to convert every png with indexed color mode, into 32bit RGBA mode, one by one. I do realize that it can be accomplished by batch processing, but thought it would be a lot easier with a GUI tool, so I made this
What it does exactly, is that the themer can add thousands of png's to a list, and then convert all of them, with only a few clicks.
I actually dont know how 9-patch png's (*.9.PNG) are behaving after the convertion, so made a button to exclude them from the list, before converting, so they dont get "hurt" in the process.
*EDIT* - Un-Optimizing compiled ninepatch files will mess them up, and they will not work afterwards!
Index color mode png opened with photoshop:
(Before)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​
The exact same png opened with photoshop, but Un-optimized with my tool:
(After)
​
If i helped, i only ask for a "Thanks", and if anyone run into problems, have some ideas for changes or anything else, please let me know
And if just one person find this useful, ill consider this project: "time well spended"
Cheers!
TODO List:
+ Add "Un-Optimize selected file(s)" to the right-click context menu
+ Add panning/scroll feature at View Image window
+ Add "Un-Optimize" to windows context menu, when right-clicking png files
+ Add "Optimize" functionality, to make files optimized again
+ Port it to Linux (?)​
Current release:
v1.1
+ Added Double-Click on items in list, to show image and its resolution, but not bitdepth as it showed 32bit on index png-files as well. Making it show if its index mode seems like a bit of a struggle to accomplish, so didnt add that.
+ Added Right-Click context menu at items in the list, with the ability to show the image, open in favorite editor and remove from list.
+ Added Drag&Drop function.
+ Added Settings window, to set Favorite Image Editor (like photoshop or such...) and Exclude 9-Patch (*.9.PNG) files from list on every add.
+ Fixed a lot of code, so its now more stable and user-friendly.​
Previous releases:
v1.0
(First official release)​
How to use this tool
First of all, if you havent already, then extract the zip content to anywhere you feel like.. Some place you remember
When starting it up, you will see some buttons, and they are kind of self-explanatory, but nevertheless ill explain it anyway.
The first thing you are going to do, is to add some files to convert:
Or you can just drag+drop files and folders from explorer or something similar, onto the tool. This is a newly added feature, so please report if anything goes wrong ​
Then you might want to remove some file(s), you can just select the one(s) from the list, holding CTRL down while left-click on the items. After that, click the "Remove selected..."-button.
I recommend that you click "Remove 9-Patch files..."-button, before starting the convertion, as *.9.png files gets messed up in the process. The technical thing, is that they loose the byte chunk binary information in the header, and therefore cant decode.
​
Now, you should be ready, so just click the "Start !"-button, to begin the convertion. It will take a few minuttes to finnish, depending on your machine and how many PNG-files to convert, and their size and details.
​
For future use, it would be a good idea to check out the Settings for this tool.
​
When the settings window is open, you are able to set your Favorite Image Editor (like Photoshop or such...), so that you are able to select one or more files in the list, right-click and "Open selected file(s) in Favorite image editor". This will then launch you image editor, and then open the selected file(s), within this and your are ready to edit them from there.
There is also the option to make it exclude 9-patch files, by default everytime you add files to the list.
​
If you have any questions, constructive critism, or just some ideas to be made, then feel free to post
Damn... thanks limit... I'll try to remember to give you later the one you deserve.
I've not tried your tool, I'm at the office, leaving in two minutes, but I'm sure it's going to make my life easier.. this indexed color mode drives me crazy..
Thanks anyway, I'll give you feedback later too..
fredmode01 said:
Damn... thanks limit... I'll try to remember to give you later the one you deserve.
I've not tried your tool, I'm at the office, leaving in two minutes, but I'm sure it's going to make my life easier.. this indexed color mode drives me crazy..
Thanks anyway, I'll give you feedback later too..
Click to expand...
Click to collapse
thanks mate
yeah, that was how i felt before making this tool.. so im glad it will make your life easier as well
looking forward for your feedback :good:
Thanks my friend. I'll work when I have some time :good:
Simply Superb :highfive::good:
App Test On Its Way Brother :highfive:
edit : ran a simple test and this is so sexy mate , big thanks will save alot ,, alot of time for users and new themers
just an opinion : if you can add an open button for the converted file , would be awsum
thanks my friends! really glad you like this.. and yeah, this is making theming a whole lot faster..
the point with this, is just select all the apk's output folders, and click "Yes" to include subdirectories, and then it will add all pngs to convert into nicely editable files but, dont know about the 9patch ones, so made a button to exclude them from the list, right before converting, just in case
vegeta, ive already planned to make a double-click function on the items, in the list, to show the image in another window.. and some small description of the image, like resolution, bit depth, and such... so, that will be added into the next version
EDIT:
you guys should probably subscribe to this thread, because updates will come, guaranteed.. just a suggestion
EDIT2:
Updated the TODO list
Great work mate! And I see it's very useful for win users.
Using Mac I have no such issues at all. Photoshop opens 9.png with no problem and the thing which necessary to do is decrease Canvas size to get real image size for future patching after editing.
Just Checked And Works Fine...
Thanks A Lot Mate....
A very nice and Important share for theme makers.
Thanks a lot my friend!!! Work fine! :good:
Feedback time as promised..
It just does it's work.. perfectly.
Congrats anbech, great work ! :good:
Thanks for all that feedback mates! really appreciated
will update it soon, might already be tomorrow..
Update!
I updated my tool.. changes is written in OP
cheers
anbech said:
I updated my tool.. changes is written in OP
cheers
Click to expand...
Click to collapse
thanks alot mate, just kind of update i wanted
double click , right click options to remove file , multi selecting
thanks alot again brother
vegeta, im glad that youre glad about the new changes
hope it comes handy for all the themers at xda.. i certainly, as the developer of it, think its making the theming process a lot faster.. just add the SystemUI extracted apk and framework-res.apk, and it will make ALL the png's fully editable, except 9patch files though...
Thank you
I had to come out of exile to say many, many thanks for this tool.
I've been looking for something like this for a long time instead of using fireworks or pixlr.com.
It runs very smooth and is very light on resources.
If i may make a suggestion. How about adding a right click "un optimize" option to the windows right click menu?.
Highlight png/s> right click> un optimize.
dully79 said:
I had to come out of exile to say many, many thanks for this tool.
I've been looking for something like this for a long time instead of using fireworks or pixlr.com.
It runs very smooth and is very light on resources.
If i may make a suggestion. How about adding a right click "un optimize" option to the windows right click menu?.
Highlight png/s> right click> un optimize.
Click to expand...
Click to collapse
awesome mate! really appreciate it, means a lot to me, since ive used countless hours on this project already
great idea mate, dont know why i havent thought of that.. going to add that to the TODO list at OP, and will be available in the next release..
so may i suggest that you subscribe this thread, to keep yourself updated..?
cheers mate, and thanks for all the "thanks" you gave
You should give mksip a friendly nudge and have this app put in the everything thread
thanks man needed this tool pretty baddly
Sent from my GT-S5830 using xda premium

[COMPETITION] Here To There

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here To There is an application that will tell you how long it will take you to get to a particular destination. It will take in to account traffic conditions that can affect how long it will take. With the API I am currently working with you will be able to choose your routing type (fastest or shortest) and transportation mode (Car, Truck, Pedestrian).
So a little about myself. I originally backed the Pebble kickstarter and bought the Pebble watch in grey. Once I got it I had to create my own app. So I create the Weather app for pebble. It is currently being used by quite a few people all over the world. So I thought it was about time to create something else. I saw XDA was hosting a contest and thought that this was the kick in the pants I needed to really get going on one. So after a night of brainstorming, I came up with the app "Here To There". I always like being able to know how long it will take for me to get to certain destinations with traffic. I was constantly pulling out my phone and opening up Google Maps to route my destination just to find out how long it will take me to get there. Wouldn't it be easier to have that information delivered to my watch? So with my idea in hand, I entered the XDA Pebble Developer Contest and was in the top 20 picked to build the app. I have received the watch a couple of days ago and have been working on coding the app and coming up with more ideas to make it a little better. Below you can see my progress and feel free to make suggestions by leaving a comment.
Current Release
09/04/2014 9:57 PM CST
Download (Side Load)
Pebble Public Web Link
Pebble Deep Link
Source Code Repository https://github.com/bengalaviz/HereToThere
XDA:DevDB Information
Here To There, App for all devices (see above for details)
Contributors
_-_goldfinger_-_
Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2014-09-04
Created 2014-08-13
Last Updated 2014-09-05
Reserved
Things to do
Choose Traffic API (Must be free) http://developer.here.com but also looking at http://www.mapquestapi.com/
Choose Configuration Map API (Must be free) Google Maps API
Build watch app concept (This is to see if it is even possible) I have early alpha builds working independently of configuration page. Locations are hard coded into watch.
Build configuration screen (This is where you input your location details) Configuration page is built
Merge configuration page with watch app.
Debug, debug, debug
Decide final watch screen layout.
Add timer to status screen to refresh every 5 minutes. (Configurable).
Add a processing screen between location and status screen. Just to make it look better.
Reserved
09/03/2014 - Source Code Repository https://github.com/bengalaviz/HereToThere
08/17/2014 - Added new screen shot of status screen.
08/14/2014 - Added some screen shots of the configuration page.
Working Alpha build!
So I finally have a working application. Been testing and finding bugs. Soon I can push a beta build out and have people start testing and submitting bugs. There are a few more things I want to add and I have update my list above with them. Let me know what you think of the status screen. I want to make sure that I have a status screen that makes sense.
Link to screenshots
Working Beta build
So I finally have my watch app in a beta build. I have been working on it for a while and finally decided on the watch layout. There are only 2 screens with this watch app. Nothing complicated. First a list of your saved locations and the time to your location with some other information. I do need to finish the ability to choose routing type and transport mode. Trying to decide if this should be done on the watch or the configuration screen. Right now I am leaning towards having it on the configuration page.
Here is a short video I took at work to give you an idea. Sorry for the cheesy music. I used iMovie on my iphone to make it.
https://www.youtube.com/watch?v=qsSxKeZRA7o
Can't wait for this. How many items can you have on the location list on the watch app? Do you have a beta version available, I would love to test it.
bamachevrolet said:
Can't wait for this. How many items can you have on the location list on the watch app? Do you have a beta version available, I would love to test it.
Click to expand...
Click to collapse
Right now the limit for locations is 5. As you can guess, the return URL string from the configuration page to the pebble app can be very long as some of the long/lat coordinates are very long. I was hoping to make it dynamic so that you can have as many as you want but this may force me to work on the configuration back end to maybe store the location information on my server with the pebble ID. That way I wouldn't have to pass any location data back to the watch. It would be saved to a database. Maybe a version 2 option?
Initial Beta Release
So I am ready for some testers. Here is my first Beta release of Here To There. No companion app required. Try it out and let me know what you think. If you have any issues with the application please make a post here. Thanks!
Moved download link to first post.
Looks awesome man. Grabbed the BETA and I'll try to put some time into working with it today.
Made some change to configuration page to fix an andriod issue. Download in first post above.
New Beta Release
Made some changes to the output screen. Added some separation and an inverted layer to the location. Download in first post.
Final Beta Build
Pushed final beta build for testing. Download in first post. Please update to this version and report any issues. Thanks.
Source Code
Posted the source code on github. Link is in first post.
Hehe: https://github.com/bengalaviz/HereToThere/commit/a6525b9ac7ab822af5bac68295cfdf81d93c0a38
SferaDev said:
Hehe: https://github.com/bengalaviz/HereToThere/commit/a6525b9ac7ab822af5bac68295cfdf81d93c0a38
Click to expand...
Click to collapse
Thanks for pointing this out. I have removed this from the history and now have a script that will clean the project of all api keys before pushing to github.
_-_goldfinger_-_ said:
Thanks for pointing this out. I have removed this from the history and now have a script that will clean the project of all api keys before pushing to github.
Click to expand...
Click to collapse
You're welcome! That's a common error
Final Version
Final version now available.

[MOD][GUIDE] Change Air Command Apps

Hello XDA,
The Air Command feature on the Note 4 is an excellent concept, with all sorts of potential. Unfortunately, that potential is severely crippled by Samsung's decision to hard-code the available apps, and prevent users from changing them...Until now.
This guide will show you how to change the default Air Command apps (Action Memo, Smart Select, Image Clip, and Screen Write) to whatever apps you choose. In order to do this, you must have working knowledge of how to decompile, modify, and recompile .jar and .apk files. If you do not know how to do this, stop here, and come back when you do, as I won't respond to any questions asking how to decompile/recompile in this thread.
***Before proceeding, MAKE A BACKUP.***
***This mod entails making modifications to your phone's framework files. Any mistakes***
***can, and almost certainly will, prevent your phone from booting properly. If you choose to ***
***proceed with this mod, you are doing so at your own risk. I am not responsible for loss of data,***
***damaged devices, sudden onset male pattern baldness and impotence, or any***
***other consequences that may arise as a result of this mod.***
***Did I mention making a backup?***​
With that out of the way, let's get to it.
1) Start by pulling services.jar from /system/framework, and decompiling it.
2) Download the attached zip file, extract it to a location of your choice, and copy the included SpenGestureManagerService$9.smali to /com/android/server/smartclip in your decompiled services.jar, overwriting the existing one.
3) Now in order to set your own apps, you will need to know the package name of the app, and the name of the activity that you want to open from that app, which, for most of you, will be the main activity. To find the package name, go to App Info or Application Manager on your phone, find your app, and look at the line underneath the app's name. This is the package name. Note that it is all lowercase; this is important. Some examples include:
com.android.chrome
com.visionobjects.calculator
com.steadfastinnovation.android.projectpapyrus
com.quoord.tapatalkxdapre.activity​
Alternatively, you can decompile the app and look at its' AndroidManifest.xml. Somewhere on the 2nd line will be
Code:
package="your.package.name"
To find the activity, you can use a launcher like Nova Launcher, long-press the home screen to add a shortcut, select 'Áctivities', go to your app's name, and then try to locate the main activity. Alternatively, you can again look at the AndroidManifest.xml from the decompiled app, and locate it that way. It's not always entirely clear which activity is the main one, so in some cases it may take some trial-and-error to locate. Again, take note of the capitalization; it is important. Some examples are:
com.google.android.apps.chrome.Main
com.visionobjects.calculator.activity.MainActivity
com.steadfastinnovation.android.projectpapyrus.application.HeadlessMainActivity
com.quoord.tapatalkxdapre.activity.MainActivity​
4) Once you have the package name and activity name of the app(s) you want to use, go ahead and open the file you just copied with Notepad++.
***Note: I have left all the original code intact, so the stock functions can still be used if you want.***
***You can change as many of the stock functions as you wish, but I have included 'blanks' for all 4.***​
5) To add your first app, search for:
Code:
CUSTOM.PACKAGE.ONE
Replace it with the package name from your app. Do not remove the enclosing parentheses, and pay attention to the capitalization.
The next line will include:
Code:
CUSTOM.ACTIVITY.ONE
Replace this with the activity name from your app. Again, be sure to keep the parentheses, and watch the capitalization.
If you are changing more than one app, repeat the last two steps. The only thing different will be the lines that you need to search for/replace. The others are:
Code:
CUSTOM.PACKAGE.TWO
CUSTOM.ACTIVITY.TWO
Code:
CUSTOM.PACKAGE.THREE
CUSTOM.ACTIVITY.THREE
Code:
CUSTOM.PACKAGE.FOUR
CUSTOM.ACTIVITY.FOUR
6) Once you have added the packages and activites you want, scroll to the very end of the file, where you will see the following array:
Code:
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_1
:pswitch_3
:pswitch_4
:pswitch_5
:pswitch_6
:pswitch_7
:pswitch_2
.end packed-switch
.end method
Here it is again, with the functions labeled:
Code:
:pswitch_data_0
.packed-switch 0x0
:pswitch_0 ACTION MEMO
:pswitch_1
:pswitch_3 SCREEN WRITE
:pswitch_4
:pswitch_5
:pswitch_6 IMAGE CLIP
:pswitch_7
:pswitch_2 SMART SELECT
.end packed-switch
.end method
If you want to use any of the default options, take note of their numbers:
Action Memo = switch_0
Smart Select = switch_2
Image Clip = switch_6
Screen Write = switch_3
7) Each of the custom apps that you added package/activity names for has a unique number associated with it. Using the same 1-4 numbering as before, they are as follows:
CUSTOM.PACKAGE.ONE = switch_ms1
CUSTOM.PACKAGE.TWO = switch_ms2
CUSTOM.PACKAGE.THREE = switch_ms3
CUSTOM.PACKAGE.FOUR = switch_ms4
Simply take the switch values of the custom apps and/or stock apps that you'd like to use, and place them in the array in any order you'd like. Be aware that changing any of the switch values other than the 4 that I labeled above will have no effect.
8) After you have made your changes, recompile services.jar, push to /system/framework, set permissions, reboot, and enjoy your new, more useful Air Command!
CHANGING THE TEXT AND ICONS​Once you've changed the apps that your Air Command opens, you'll probably want to change the associated icons and text as well. To do so, you will need to decompile your framework-res.apk, found in /system/apps.
The default icons will be found in the /res/drawable folders in your decompiled framework-res. Their names are:
Code:
airbutton_global_icon_quickmemo
airbutton_global_icon_flashannotation
airbutton_global_icon_easyclip
airbutton_global_icon_pinmode
The text for each of the Air Command items can be found in /res/values/strings.xml. Their names are:
Code:
Action memo
Screen write
Image clip
Smart select
Note that you will most likely also have to change the same strings in /res/values-en-rUS/strings.xml to see any effect.
Once you've finsihed making your changes, recompile your framework-res.apk, push it to /system/framework, set permissions, and reboot!
That's it! I hope you enjoy!
I will do my best to answer any questions you may have, but be aware that I do not have a Note 4, so I cannot do any testing or try to replicate any issues. The following screenshot/video are taken from the same mod I did for my Note 3, but are a good representation of what this mod/guide will achieve.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Finally, I'd like to give a huge thank you to @kevinoliva113 for testing for me. Over, and over, and over. Without him this would not have been possible...
Reserved
Works great.. Finally useful shortcuts. Check it out here on the Note 4. http://youtu.be/kiXKFdCg1TM
Really good guide. It should work well with eteam's anyapp aircommand
How many apps minimum/maksimum can be add? And what happen to rounded shape if use more than 4/5?
Sent from my SM-N910C using XDA Premium 4 mobile app
CasTTeLLo said:
How many apps minimum/maksimum can be add? And what happen to rounded shape if use more than 4/5?
Sent from my SM-N910C using XDA Premium 4 mobile app
Click to expand...
Click to collapse
The minimum would be zero, as you could just place one of the existing, nonfunctional switch numbers in every spot, but I believe the maximum is 4. I don't have a Note 4 myself to test with, but @kevinoliva113 did pretty extensive testing for me...
By default, there are 7 (or maybe it was 8 lol), things already set in the array that controls it, and all the code for them seems to basically be there, but only 4 of them actually work. Basically, it looks like Samsung left the existing code from the Note 3, and just added the Note 4 stuff on top of it, as the other items are all the ones that were on the Note 3 (quick memo, S-finder, etc.). I think you could probably put the switches for those in the working slots and have those functions working, if you wanted, but I don't know of any way to get more then 4....
sorry to be "that guy" but im green when it comes to reverse engineering on my android, i am unclear about what to do on step 7 when you say take the values and place in array. am i suppose to search the smali for "e.g..pswitch_ms4 " and replace with app/activity name? thanks in advance
Would this work on Note 4 with Android 5.0.1 too?
Sent from my SM-N910F using XDA Free mobile app
One thing I love -adding V3 calculator, But this takes so much time it isn't worth it...
Anyway, Thanks for your guide and effort!
Sorry, haven't checked back here in a while....
scalleygwags said:
sorry to be "that guy" but im green when it comes to reverse engineering on my android, i am unclear about what to do on step 7 when you say take the values and place in array. am i suppose to search the smali for "e.g..pswitch_ms4 " and replace with app/activity name? thanks in advance
Click to expand...
Click to collapse
Go to where you placed your package/activity names earlier, and scroll up from there until you find the first place it says "pswitch". That is going to be the 'value' for the package/activity below it...Now scroll the the end of the smali file, and you should see several "pswitch" lines all together. That is the array....Replace one of the existing 'values' with the one corresponding to your package/activity.
Freeddi said:
Would this work on Note 4 with Android 5.0.1 too?
Click to expand...
Click to collapse
Yes, but there's a good chance that the number at the end of the filename will be different, so you'd have to figure out which one is the equivalent. Also, the existing pswitch values will likely be different. I don't have a note 4, so I can't work it out myself, but if you'd be willing to do some testing, PM me and we might be able to work something out.
AndroidState said:
One thing I love -adding V3 calculator, But this takes so much time it isn't worth it...
Anyway, Thanks for your guide and effort!
Click to expand...
Click to collapse
It does take awhile, especially the first few times you do it. When you've done it dozens of times, as i have, it's second nature, but hopefully nobody will have to lol.
@Morningstar
My device Note 3 N900
My spen 5 select function have but I want 4 select function (remove pen window )function
Can you help me?
tural_625 said:
@Morningstar
My device Note 3 N900
My spen 5 select function have but I want 4 select function (remove pen window )function
Can you help me?
Click to expand...
Click to collapse
Changing the number of available functions is really beyond the scope of this guide....You would have to set one of them to point to nothing, rather than a specific activity (which may in itself cause nullpointer errors), then you'd have to change the pngs for the bg in framework' adjust the spacing of the remaining icons....It would be far, far easier just to set it to some other app, even if you never use it....
Can you edit for me ?
I want pen window function remove
Can you help ?
Morningstar said:
Yes, but there's a good chance that the number at the end of the filename will be different, so you'd have to figure out which one is the equivalent. Also, the existing pswitch values will likely be different. I don't have a note 4, so I can't work it out myself, but if you'd be willing to do some testing, PM me and we might be able to work something out.
Click to expand...
Click to collapse
Would lovely test it myself if its working on Note 4 or not. But now i see that i have to decompile/reconpile that File. I cant decompile/recompile. Have now Knowless about this.
Sent from my SM-N910F using XDA Free mobile app

Categories

Resources