[GUIDE] How to convert Chinese roms based to International [TouchWiz] - Android General

[GUIDE] How to convert Chinese roms based to International [TouchWiz]
Requeriments
Chinese firmware/ROM that want convert
Official European/American firmware/ROM of the same device (Ex: SM-G920F)
Tickle my Android or Advanced Apktool (Easy way)
Be sure to install WinRAR and Notepad+ in your PC
Patience, Time and Concentration
So now we can start to convert
- Create a folder with the chinese base and create another for the international one
- Decompress the 2 firmwares in the correspond folder
- Now in system delete all the chinese folders related like this: *Much of the apps contain this "chn" in his name
/system
/system/chn_sipdb (Chinese Keyboard)
/system/SOGOUDB (Chinese Keyboard)
/system/festival
/system/finder_cp
/system/CSC (Due to is configured to China region) *Backup features.xml and others.xml
/system/preload (It contain chinese store, depending of firmware)
/system/app
/system/app/CMAWeatherPhone201X
/system/app/ChinaHolidayProvider
/system/app/com.samsung.festival.chinadefault_* (If exist, delete all the folders with this name)
/system/app/SamsungChineseIMEvX
/system/app/EventNotificationPhase3
/system/app/Festivalchinadefault
/system/app/GreetingCard
/system/app/SLocation and /system/lib/slocation
/system/app/MyEventWidget
/system/app/InCallUI
/system/app/SearchBoxBaidu_OPEN
/system/app/YellowPage (Could be located in priv-app too)
/system/priv-app
/system/priv-app/AMapNetworkLocation, XNetworkLocation_Baidu, (If exist)
/system/priv-app/SAssistant (If exist)
/system/priv-app/EventCenter
/system/priv-app/SMusicChn
/system/priv-app/BstSpamCallService
/system/priv-app/SVoice* (Delete all SVoice related files including VoiceWakeUp)
/system/priv-app/SecContacts_X_CHN and /system/priv-app/SecMms_X_Chn
/system/etc and /system/lib
/system/etc/gps.conf and system/etc/gps.xml
/system/lib/slocation
- After to delete all the chinese bload related is time to add all the international apps (/system/app and /system/priv-app) and the 2 gps files (system/etc) that we delete it in the last step
- Now is time to decompile so is necessary Tickle my Android or Advanced Apktool
So from your chinese and international firmware/rom take /system/framework/framework-res.apk and decompile (Install the frameworks for dont get error while decompile)
- If dont get error we can continue, from international framework take all /framework-res.apk/res/raw-xx and /framework-res.apk/res/values-xx folders and copy to chinese framework without overwrite existent files
- Then go to /framework-res.apk/res/values folder and open arrays.xml
Search:
HTML:
config_locationProviderPackageNames
And replace the whole string-array by this:
HTML:
<string-array name="config_locationProviderPackageNames">
<item>com.google.android.gms</item>
<item>com.android.location.fused</item>
<item>com.amap.android.ams</item>
<item>com.amap.android.location</item>
<item>com.baidu.map.location</item>
</string-array>
Save it and open strings.xml
Search:
HTML:
config_networkLocationProviderPackageName
And replace the whole string by this:
HTML:
<string name="config_networkLocationProviderPackageName">@null</string>
Search:
HTML:
config_geocoderProviderPackageName
And replace the whole string by this:
HTML:
<string name="config_geocoderProviderPackageName">@null</string>
NOTE: In some custom roms like aurora, some extra features are added in /framework-res.apk/res/values/arrays.xml and /framework-res.apk/res/values/strings.xml so search at final of the xml if exist chinese strings, if exist so translated it, can use google translator if dont understand.
- Save it and recompile the chinese framework-res.apk
Now decompile android.policy.jar (Lollipop), services.jar (Marsmallow) from chinese firmware/rom
Lollipop
- Decompile android.policy.jar with Tickle my Android or any tool that decompile classes.dex
- Go to android.policy.jar/smali/com/android/internal/policy/impl and open GlobalActions$99.smali and GlobalActions$SinglePressAction.smali
- Chinese strings are decoded in unicode so u need search this with notepad+ "\u"
- In GlobalActions$99.smali search
HTML:
const-string v2, "\u
Replace "\u..." by:
HTML:
const-string v2, "Reboot Options"
- In GlobalActions$SinglePressAction.smali search
HTML:
const-string v2, "\u
Replace "\u..." by: *Some lines above u can see the correct order, but almost always this is the order
HTML:
const-string v2, "Reboot"
HTML:
const-string v2, "Hot Reboot"
HTML:
const-string v2, "Download"
HTML:
const-string v2, "Recovery"
HTML:
const-string v2, "Safe Mode"
- Save and recompile back android.policy.jar, be sure that the modified date is different and more recent than original, u can check it open the compiled file with winrar, because some android tools don't compile correctly the .jar files
*Updating guide..:

Reserved

Reserved

Great thread
I will try keep it updated with changes needed

Isn't it possible to just flash an european ROM via Odin?

Checkit53 said:
Isn't it possible to just flash an european ROM via Odin?
Click to expand...
Click to collapse
No You Will BRICK your Device

Ale95 said:
[GUIDE] How to convert Chinese roms based to International [TouchWiz]
Requeriments
Chinese firmware/ROM that want convert
Official European/American firmware/ROM of the same device (Ex: SM-G920F)
Tickle my Android or Advanced Apktool (Easy way)
Be sure to install WinRAR and Notepad+ in your PC
Patience, Time and Concentration
So now we can start to convert
- Create a folder with the chinese base and create another for the international one
- Decompress the 2 firmwares in the correspond folder
- Now in system delete all the chinese folders related like this: *Much of the apps contain this "chn" in his name
/system
/system/chn_sipdb (Chinese Keyboard)
/system/SOGOUDB (Chinese Keyboard)
/system/festival
/system/finder_cp
/system/CSC (Due to is configured to China region) *Backup features.xml and others.xml
/system/preload (It contain chinese store, depending of firmware)
/system/app
/system/app/CMAWeatherPhone201X
/system/app/ChinaHolidayProvider
/system/app/com.samsung.festival.chinadefault_* (If exist, delete all the folders with this name)
/system/app/SamsungChineseIMEvX
/system/app/EventNotificationPhase3
/system/app/Festivalchinadefault
/system/app/GreetingCard
/system/app/SLocation and /system/lib/slocation
/system/app/MyEventWidget
/system/app/InCallUI
/system/app/SearchBoxBaidu_OPEN
/system/app/YellowPage (Could be located in priv-app too)
/system/priv-app
/system/priv-app/AMapNetworkLocation, XNetworkLocation_Baidu, (If exist)
/system/priv-app/SAssistant (If exist)
/system/priv-app/EventCenter
/system/priv-app/SMusicChn
/system/priv-app/BstSpamCallService
/system/priv-app/SVoice* (Delete all SVoice related files including VoiceWakeUp)
/system/priv-app/SecContacts_X_CHN and /system/priv-app/SecMms_X_Chn
/system/etc and /system/lib
/system/etc/gps.conf and system/etc/gps.xml
/system/lib/slocation
- After to delete all the chinese bload related is time to add all the international apps (/system/app and /system/priv-app) and the 2 gps files (system/etc) that we delete it in the last step
- Now is time to decompile so is necessary Tickle my Android or Advanced Apktool
So from your chinese and international firmware/rom take /system/framework/framework-res.apk and decompile (Install the frameworks for dont get error while decompile)
- If dont get error we can continue, from international framework take all /framework-res.apk/res/raw-xx and /framework-res.apk/res/values-xx folders and copy to chinese framework without overwrite existent files
- Then go to /framework-res.apk/res/values folder and open arrays.xml
Search:
HTML:
config_locationProviderPackageNames
And replace the whole string-array by this:
HTML:
<string-array name="config_locationProviderPackageNames">
<item>com.google.android.gms</item>
<item>com.android.location.fused</item>
<item>com.amap.android.ams</item>
<item>com.amap.android.location</item>
<item>com.baidu.map.location</item>
</string-array>
Save it and open strings.xml
Search:
HTML:
config_networkLocationProviderPackageName
And replace the whole string by this:
HTML:
<string name="config_networkLocationProviderPackageName">@null</string>
Search:
HTML:
config_geocoderProviderPackageName
And replace the whole string by this:
HTML:
<string name="config_geocoderProviderPackageName">@null</string>
NOTE: In some custom roms like aurora, some extra features are added in /framework-res.apk/res/values/arrays.xml and /framework-res.apk/res/values/strings.xml so search at final of the xml if exist chinese strings, if exist so translated it, can use google translator if dont understand.
- Save it and recompile the chinese framework-res.apk
Now decompile android.policy.jar (Lollipop), services.jar (Marsmallow) from chinese firmware/rom
Lollipop
- Decompile android.policy.jar with Tickle my Android or any tool that decompile classes.dex
- Go to android.policy.jar/smali/com/android/internal/policy/impl and open GlobalActions$99.smali and GlobalActions$SinglePressAction.smali
- Chinese strings are decoded in unicode so u need search this with notepad+ "\u"
- In GlobalActions$99.smali search
HTML:
const-string v2, "\u
Replace "\u..." by:
HTML:
const-string v2, "Reboot Options"
- In GlobalActions$SinglePressAction.smali search
HTML:
const-string v2, "\u
Replace "\u..." by: *Some lines above u can see the correct order, but almost always this is the order
HTML:
const-string v2, "Reboot"
HTML:
const-string v2, "Hot Reboot"
HTML:
const-string v2, "Download"
HTML:
const-string v2, "Recovery"
HTML:
const-string v2, "Safe Mode"
- Save and recompile back android.policy.jar, be sure that the modified date is different and more recent than original, u can check it open the compiled file with winrar, because some android tools don't compile correctly the .jar files
*Updating guide..:
Click to expand...
Click to collapse
Excellent guide make one guide for xperia cs39h.

Sony developers said:
Excellent guide make one guide for xperia cs39h.
Click to expand...
Click to collapse
A) Would it kill you to be nicer? You catch more flies with honey than with vinegar.
B) Why don't YOU use what he gave you and try to modify it to work on your phone? Then you can post a tutorial to help out others as well
C) Why did you quote the WHOLE OP

Any chance this would work on a locked bootloader, though we have root, such as the s7?

Is it possible to convert the firmware Galaxy Folder 2 (SM-G1600)?
https://drive.google.com/file/d/0B2QhEXa2ySgkNTFFX1R2RnRCN2M/view?usp=sharing

Nice guide! Bro!

Nice guide.
I have a 1 question. How to remove Chinese clock date from Notification Header?
{
"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"
}

i have a marshmallow china rom
. but not deodexed, original stock. how to edit services.jar and framework... without deodexing whole roms

Garry050 said:
Nice guide.
I have a 1 question. How to remove Chinese clock date from Notification Header?
Click to expand...
Click to collapse
Its in system ui
Compare dateview smali with stock one

Related

[UPDATED 24.03.2011] X10 Theme Reference

24.03.2011: Added a link to the themes section and added my last post here for a while (maybe ):
_calum_ said:
So I'm back after dropping off the face of the planet for a while I've been getting into WP7 development and so my X10 has been in the top drawer for a couple of months... I may get into Android development soon but at the moment I'm a bit short on time (as always ).
I still would like to get the timescape animations sorted (I hate being beaten ) but I just can't seem to get the cheecksum figured out. If I ever get them sorted I'll update this post again, but until then I probably won't do anything more with my X10.
I hope this post has been helpful. See ya
Click to expand...
Click to collapse
This thread was opened to consolidate the information/knowledge about themes for the x10. It is basically a reference thread with key bits of information and links so that a new user can find all the necessary information in one place. At the moment this is spread out all over the place, there are a lot of different threads with different bits of information, and the lack of updates in Draken Korin’s sticky makes it pretty hard to find new information. It should also help us avoid the old ‘where the hell was that image…?’ and ‘where was that … thread again?’.
Please PM me or post any useful information that is missing, especially the OPs of the threads in the Themes section below. I will continually update this thread with any new information or links.
All useful information that is posted here will be added to this first page, so that you don't have to wade through pages of posts to try and find something. Everything after the first page should therefore either be repeated on this page somewhere or is just conversation. Please yell at me should this not be the case
Please help me out by posting information, ideas etc.
Creating Themes for the x10:
1. Getting Started
2. Using ADB
3. Creating a theme
4. Modifying XML files and adding resources
5. Modifying Services.jar
6. Timescape/Mediascape
7. Resource locations
8. Theme collection
9. Recovery tips
Change log
14.11.2010 - Added section 4
18.11.2010 - Updated section 3 with a complete guid for modifying .9.png's
25.11.2010 - Updated section 7 with text color locations in the xml files
21.12.2010 - Added a link to MrRusch's tool to section 4
24.12.2010 - Added link to 2.1 Sources to section 5
Getting Started
Before getting started on a theme you'll need to set a few things up. Here's a list of everything you'll need:
Root. Your phone will need to be rooted
Java SDK (JDK). You'll need to install the JDK (and JRE) before you can start modifying the contents of your phone. Check out this video of Chewitts if you're having problems on x64 systems.
ADB (from the Android SDK). You need ADB to push/pull files to and from your phone (see the next post)
X10 Drivers. The drivers are usually installed if you install SEUS. Sometimes however you may need to do a manual installation (from my experience mainly on Win7 x64 machines).
The easiest way to make sure everything is set up properly is to install someone elses theme. Check out this post (1.6) or this post (2.1) for instructions.
After you've done all that take a look at this.
Have you installed someone elses theme yet? If not then go directly to jail, do not pass GO and do not collect £200
Using ADB
There's an ADB Guide here (thanks to XPeriaX10iUser for having this in his sig ): ADB, Fastboot, and Nandroid for Noobs
Before you start need to unsecure the shell. Use the following adb commands to do this if you haven't already (to reverse it do chmod 0755... thanks XperiaX10iUser ):
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
chmod 4755 /system/bin/sh
This is all described in the links posted in the Getting Started section above
Thanks to MrRusch for making our lives easier with this tool. For those of you new to this, you should still read the guide linked above so that you know what is actually going on.
Here's a step by step for pulling the framework from your phone and pushing it back. The original post is here. The boot animation mod at the bottom is for 1.6. In 2.1 it is found in system/media/bootanimation.zip.
@gavriel18: I hope it's OK to use this here, if not then let me know.
gavriel18 said:
Step 1:
Connect phone to pc, enable usb debugging and open adb. Type:
adb pull /system/framework/framework-res.apk framework-res.apk
That will pull your framework-res.apk to whatever folder is displaying in your command line.
Step 2:
Find the framework-res.apk on your hard drive, right click and open with 7zip.
Step 3:
Use png's here or create your own and dump into the appropriate folder within framework-res.apk.
Step 4:
When you are done editing the files open up adb and type the following command:
adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push framework-res.apk /sdcard/framework-res.apk
adb shell dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk
That will put the new framework-res.apk on your phone. It should automatically reboot (if not reboot it) and your changes should be applied!
When running the script above you can replace framework-res.apk with whatever you want. For example, Timescape.apk
Remember, it is CASE sensitive I made this problem many times)
If you would like to pull an entire folder put a slash at the end of the last word. For example, adb pull /system/etc /etc"/" (no " in actual script )
Courtesy of corruptfate is the steps to modify the startupshow (post #207)
step 1: open adb shell
step 2: type "adb shell"
step 3: type "su"
step 4: type "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system"
step 5: type "mkdir system/etc/semc/startupshow"
step 6: exit and redo step 1 - 4
step 7: type "mkdir system/etc/semc/startupshow/default"
step 8: exit and open command prompt again, this time type "ddms"
step 9: look for the default folder in system > etc > semc > startupshow > default
step 10: push the images into that folder
Click to expand...
Click to collapse
Creating a theme
So, now that we’ve got the framework-res.apk onto our hard drive, we can take a look at creating a theme. The only skill that is really required to change the appearance of the framework (this is the system file that contains the notification bar, settings etc.) is being able to edit .png image files to suit your tastes. If you can do this then it is just a matter of knowing how to extract the images, and how to update the .apk with them after editing.
.9.png's
Before we start we need to take a look at a special kind of image in android apk’s: the .9.png’s. These are recognisable, as the name suggests, by the double extension *.9.png.
.9.png's are images with a bit of extra information embedded. They contain information on how they can be stretched, and where the content can go (e.g. for a button background, which area of the background can contain the text).
This information is contained in a single pixel border (the guides) around the image and can be added using draw9patch. The catch here is that the guides must be compiled into the image before it can be used.
The Border: For the most part, you will not have to edit the border of a .9.png because, as long as you follow the guide below, the guides will already be in the image and you will not need to change them. If you do need to create your own (I’d assume you know enough not to be reading this though ), you can find more information here.
Editing the Framework
In this example we will look at editing framework-res.apk. However, the process can be used on any apk.
The method described below may seem overly complicated for those who have experience in this area, but it is (in my opinion) the easiest ‘sure-fire’ way to make sure you don’t have any problems (especially with the .9.png’s).
In rare cases, when the .apk your modifying doesn’t have any .9.png’s (e.g. the Recent Calls widget) then you can skip straight to the ‘Updating images using Drag/Drop’ section below.
Requirements:
You will need the following:
7zip apktool - this is included in the attached file themes.zip
Some people use WinRAR instead of 7zip, but apktool uses some 7zip commands internally so make sure it is installed (I think, I know this is the case for APK Manager, I still need to test this for apktool, but hey, just use 7zip, it's free and works exceptionally well).
Setting up:
In the attached zip file (themes.zip) you will find a copy of my theme creation environment. It’s not too complicated, it only contains a couple of folders so I know where everything is, three key batch files (all one-liners) and apktool.
The first thing we need to look at is install_framework.bat. This contains the following line:
Code:
java -jar apktool.jar install-framework stock\framework-res.apk
All this does is tell apktool to install the framework on your system. The resources from stock\framework-res.apk will be extracted to a default location. If you don’t do this then you will not be able to recompile other apk’s that rely on the framework (you will get a ResourceNotFound error).
The other batch files decompile and build the framework, these are the ones that need to be modified if you start working on a different apk:
Code:
[B]decompile.bat[/B)
java -jar apktool.jar d stock\ framework-res.apk working\ framework-res
[B]build.bat[/B]
java -jar apktool.jar b working\framework-res out\framework-res.apk
I have included the stock X10 framework. If you use on of the other frameworks out there you may find that you get a lot of errors when trying to recompile. That’s because someone got lazy with the .9.png’s
As we are modifying the framework directly we do not need to run install_framework.bat, for a different apk (e.g. Phonebook.apk) you may need to run this first to avoid errors when decompiling.
Decompiling and Building:
1. Run decompile.bat. After this you will see that the working folder is filled with the contents of the apk. The images we need to modify are in the subfolders res/drawable-hdpi and res/drawable-land-hdpi. If you look at some of the .9.png’s in there you can see the guides (see the attached image). This makes it really easy to edit them, you can just edit them like any other image (as long as you do not touch/alter the guides).
2. Edit any images that you want. For the .9.pngs I usually make a copy without the 1 pixel border so that I can edit the entire image, then I paste the copy back into the middle of the original .9.png. You don’t have to worry about the guides, they are already set correctly.
I have created a tool that takes the stock x10 status bar icons, removes the background and sets them to a colour of your choice here. This was made to make my life easier by minimizing the time I spend in photoshop.
3. Run build.bat. This compiles the framework, embedding the guide information into the .9.png’s. The output framework is in the out folder. Do not push this to your phone as it is incomplete and the resources.arsc is stored incorrectly. If you do push it to your phone then you get to reflash
Now you can just drag the edited images out of the generated framework onto your hard drive and use steps 4. and 5. of the Drag/Drop method described below to update your framework.
Updating images using Drag/Drop:
1. Open the .apk in 7zip and browse to the appropriate image folder (almost always the res\drawable-hdpi folder)
2. Drag/Drop the images you want to edit to your hard drive. Leave the .apk open in 7zip
3. Edit the images in your favourite program (photoshop or similar)
4. Drag/Drop the images back into the .apk that is still open
5. Use the process described in the previous post to push the framework back to the phone
The reason that the .apk is left open in this process is that some (all?) of them are signed and updating them in this way doesn’t mess with the signature. I’ll admit to not being 100% sure about this, I’m sort of thinking now that people just had problems re-packing due to files being compressed that shouldn’t have been (see the section on editing XML files and adding resources to see what I mean). Please correct me on this one.
This also [almost] goes without saying, but: Make a backup before you start (you can look at the installer for Chewitts Dark10 theme to see how to do this).
OK, now you can start messing with the appearance of your phone, have fun
Credits
Thanks to Mr_Element for the help testing this process and making it easier to follow
Thanks to damnitpud for his post here, without which I would still have been a bit lost in draw9patch.
Modifying XML files and adding resources
First up, thanks to MrRusch for pointing out that the resources.arsc was being zipped differently. It would have taken a few more flashes to figure out how to pack it into the apk without that little nugget
Secondly, thanks again to MrRusch for this post. Using apktool 1.3.1 means the resources are not compressed, but you still can't just flash the resulting framework. So either use MrRusch's tool or follow the instructions below.
The XML files in the framework-res.apk (and the other apps) are stored in a compiled form, making them impossible to edit without decompiling them. The process of decompiling them and recompiling is reasonably simple but care is required if any images/resources are added to the apk.
Modifying the xml files opens up certain things that can’t be changed by just modifying some image files. The best example is changing the battery icon in the notification bar to show a different image for each percentage instead of just 10%, 20%, 40% etc.
When you modify xml files and add resources to your apk, make sure you copy ALL the modifications made to the stock apk each time after compiling. I have noticed strange effects if I don't do this such as the wrong images being used - I am assuming that in the newly compiled resources.arsc the image references/IDs change when compiled, but I'm not really sure yet. An example of this is when I tried to add the signal strength mod mentioned above to a framework that included the battery icon mod below. This only worked if I also copied the battery mod files to the framework (even though they were already in the apk) after recompiling the signal strength mod. If I just copied the files required for the signal strength mod then the battery indicator would start showing the wrong images (see here, specifically posts 52, 56 and 57).
Battery Icon:
Here is a step by step for modifying the battery icon in the framework. To do this you will need to download apktool and install 7zip (other compression programs may work, but I’ve only used 7zip).
Decompile the framework using the following command:
Code:
java -jar apktool.jar d framework-res.apk framework-res
This will decompile the framework-res.apk that’s in the current command window folder into a subfolder framework-res
Find the xml files you need to modify, e.g. the battery icon xml res\drawable\stat_sys_battery.xml and edit them. This is assuming, of course that you know what needs to go in the XML file . For the battery XML it is pretty obvious, just copy/paste the existing nodes and change them so you have the necessary percentage entries, see the attachment for an example with 100 steps.
Add any necessary resources to the appropriate folder. For the battery icon you need to create an image for each percentage (or download one of these) and add them to the res\drawable_hdpi folder. The name is the same as the name in the xml (stat_sys_battery_*.png)
Rebuild the apk using the following command:
Code:
java -jar apktool.jar b framework-res out\framework-res.apk
This will create a new framework-res.apk in a subfolder out.
IMPORTANT: Do not push this apk to your phone unless you want to reflash
Extract the xml files and images from the newly generated apk (you can use the original images, but the xml files must be the newly compiled ones from the new apk). Add these files to the original framework-res.apk that you want to push to your phone (see the previous post).
Extract the resources.arsc from the root of the apk
Rename the original framework-res.apk from your theme to framework-res.zip
Right-click the extracted resources.arsc and choose the 7zip menu item ‘Add to archive’
In the dialog that appears set the achive field at the top to the framework-res.zip from step 7. And set the archive format to zip. Now set the Compression level to store and click OK(if you do not do this your phone will not boot). The settings are in the attached screenshot.
Rename framework-res.zip to framework-res.apk and double check that the compressed size or resources.arsc is the same as the original size (see screenshot)
Done. Push the new framework to your phone.
Status Bar Text:
The style for most (all?) UI elements can be found in res/values/styles.xml. This xml file is only available in a decompiled framework. In the compiled version everything in res/values is compiled into resoureces.arsc.
The status bar text style is named TextAppearance.StatusBar. The file is pretty large so it's best just to do a search for the name. The definition looks like this:
Code:
<style name="TextAppearance.StatusBar" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_primary</item>
</style>
You can easily adjust the size or make the text bold using the textSize and textStyle elements (see here for a description of these attributes and their values). The color uses the @color/... notation. This is a reference to a color resource, these can be found in colors.xml. We could just change this to a direct color entry (see here for an example), but then we wouldn't have a resource that can be reused for other parts of the UI.
If you open colors.xml you can find this:
Code:
<color name="semc_text_color_primary">#ffffffff</color>
This sets the primary text color to white (ARGB: FFFFFFFF = White). Changing the value of this will change the color of all primary text throughout the phone (settings menu etc.). If we just want to change the notification bar then it's best to add a new color. To do this just duplicate the above color definition and change the name and color:
Code:
<color name="semc_text_color_primary">#ffffffff</color>
<color name="semc_text_color_custom">#9900ff00</color>
And then adjust the style to use this new color resource:
Code:
<style name="TextAppearance.StatusBar" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_custom</item>
</style>
Now recompile and copy resources.arsc to your framework as described above and push the framework to your phone for semi-transparent green text in your status bar
Modifying Services.jar
To modify services.jar we need to decompile the classes.dex file contained within. We can do this with baksmali:
1. Open services.jar (found in system/framework) with 7zip
2. Extract classes.dex from the archive
3. Open a command window and use the following to decompile:
Code:
java -jar baksmali-1.2.5.jar -o out\services classes.dex
4. You will now have a subfolder out\services with the decompiled .dex classes (smali files)
These sort of modifications will not be necessary very often. Two things that have been looked at so far are changing the text color on the status bar clock (just the clock, not the notification text) and changing the signal strength to show dBm instead of just the bars. The text color of the clock is relatively simple and is described below. The signal strength mod was done by MrRusch and requires a bit more code, he describes the process here.
I have attached a converter MrRusch has put together to convert java to smali. This is really helpful when trying to figure out how to modify the smali or event just trying to figure out what a piece of smali code does.
Since the 15th of december the sources for 2.1 are available here. Now we can see how the original java relates to the decompiled smali code.
You can find a reference for all the smali ops here. This one is more complete but I prefer the first purely because it's a bit more compact and it has most of what I need anyway. Thanks to untemensch and JesusFreke for the links.
Status Bar Clock Color:
I have since figured out how to do this without changing any code, just by changing some xml in res/layout, but I will keep this here as I think it is a nice, easy to follow example to start out with.
This section describes how to modify the color of the clock in the status bar without changing the color of the notification text (changing all of the status bar text is described in the xml section above).
First we need to have a look at the smali file com\android\server\status\StatusBarIcon.smali to see how the color of the clock text is set. I use Visual Studio to view/edit the smali files, but you can use any text editor - I have seen PSPad recommended a few times.
If we look at the init method we can see the following piece of smali code:
Code:
.line 44
.local v15, textColor:I
const/4 v13, -0x1
.line 50
.local v13, styleIndex:I
const v18, 0x1030079
:try_start_1f
sget-object v19, Lcom/android/internal/R$styleable;->TextAppearance:[I
move-object/from16 v0, p1
move/from16 v1, v18
move-object/from16 v2, v19
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;
move-result-object v5
.line 53
.local v5, a:Landroid/content/res/TypedArray;
const/16 v18, 0x0
move-object v0, v5
move/from16 v1, v18
move/from16 v2, v16
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getDimension(IF)F
move-result v16
.line 54
const/16 v18, 0x3
move-object v0, v5
move/from16 v1, v18
move v2, v15
invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getColor(II)I
move-result v15
Here's a run-down:
I'm pretty sure the lines that start with a '.' are comments from the decompiler.
The .line 4 entries are just a reference to the line number in java source-code. And I think the .local v15, textColor:I entry just notes the v15 variable name and type (I = integer).
The first bit of interest is the line invoke-virtual {v0, v1, v2}, Landroid/content/Context;->obtainStyledAttributes(I[I). The obtainStyledAttributes method definition can be found here. There are a few overloads, but the call is to the method that accepts an integer and an integer array as parameters - hence the (I[I), I and [I. The three variables in braces at the start denote the object that the method is being called on (the Context object) and the two parameters respectively. The first parameter (v1) is a resource ID and a few lines up the v18 variable is copied to this (move/from16 v1, v18 - this means move the value from v18 to the v1 variable). v18 was declared a few lines above again with the value 0x1030079. This ID can be found in the framework xml-file res/values/public.xml and the value is the name of a style (TextAppearance.StatusBar) that can be found in res/valus/styles.xml (see the xml section above).
The result of obtainStyledAttributes is copied to v5 (move-result-object v5) which (in .line 54) is copied to v0 which is then used to call Landroid/content/res/TypedArray;->getColor with the two integer parameters v18 (0x3) and v15 (0x100 - this is the color black). The first parameter is the index of the color in the style array (index 3 in v5) and the second is the default value (black).
The result of getColor() is then copied to v15 and reused later when setting up the text view for the clock:
Code:
.line 61
.local v14, t:Landroid/widget/TextView;
move-object v0, v14
move-object/from16 v1, p0
iput-object v0, v1, Lcom/android/server/status/StatusBarIcon;->mTextView:Landroid/widget/TextView;
.line 62
new-instance v11, Landroid/widget/LinearLayout$LayoutParams;
const/16 v18, -0x2
const/16 v19, -0x1
move-object v0, v11
move/from16 v1, v18
move/from16 v2, v19
invoke-direct {v0, v1, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V
.line 65
.local v11, layoutParams:Landroid/widget/LinearLayout$LayoutParams;
const/16 v18, 0x0
move-object v0, v14
move/from16 v1, v18
move/from16 v2, v16
invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextSize(IF)V
.line 66
invoke-virtual {v14, v15}, Landroid/widget/TextView;->setTextColor(I)V
All this means that to change the color of the clock text only, we need to declare a new style and use the ID of this style in the call to obtainStyledAttributes. When adding the style to styles.xml I keep it in the same place as the other status bar styles:
Code:
...
<style name="TextAppearance.StatusBar" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_primary</item>
</style>
<style name="TextAppearance.StatusBar.Clock" parent="@style/TextAppearance">
<item name="textSize">16.0sp</item>
<item name="textStyle">normal</item>
<item name="textColor">@color/semc_text_color_clock</item>
</style>
...
The name of the style can be anything, what is important is the ID reference in public.xml, and that a color semc_text_color_clock is declared in colors.xml (see the xml section above).
The style reference in public.xml must have an ID that starts with 0x0103****. This is the ID range for styles, strings and other resources have a different ID range. I always add the new style at the bottom of the style group so that I can easily see which is the next free ID:
Code:
....
<public type="style" name="SEMCTheme.Dialog.Alert.Vanilla" id="0x01030139" />
<public type="style" name="TextAppearance.StatusBar.Clock" id="0x0103013a" />
....
Now that we have added a new style we just need to adjust the smali code to use it. Change the code above from:
Code:
.line 50
.local v13, styleIndex:I
const v18, 0x1030079
to:
Code:
.line 50
.local v13, styleIndex:I
const v18, [B]0x103013a[/B]
Now our new style is used for the call to obtainStyledAttributes. We then need to recompile the smali to a classes.dex file and update the services.jar:
Run the following command to recompile the smali:
Code:
java -jar smali-1.2.5.jar -o out\classes.dex out\services
The output file may be a slightly different size than the original classes.dex but as long as you don't get any errors it will be OK.
Now open services.jar with 7zip and update it with the new classes.dex (drag/drop).
Done Push the services.jar to your phone with adb and reboot (make sure you have updated framework-res.apk with the new xml resources first, otherwise our new ID will point to a non-existant resource)
Timescape/Mediascape
Timescape and Mediascape use a different format for some of the images (for mediascape it's just the background on the first page). Timescape also has some animation files to control the wave in the background and the color of the paginator. In 1.6 we can modify all of these, for 2.1 I still haven't got the animations sussed.
All of the information I have collected, including tools for converting the images, can be found here (the 2.1 converter tools are linked at the top of the first post).
If you're just looking to modify the first page of mediascape then it is here: /system/usr/semc/seee/files/ms_bg_background_home_icn.acet
Here are the two dark themes that I have done for Timescape:
1.6
2.1 (without animations)
and the following themes also include Timescape mods:
Dark10 by Chewitt
Enigma by Mobzter
Resource locations
Images:
gavriel18 has posted some of the standard mods here.
XML:
I have attached some images where you can see the effects of changing the most common colours in res/values/colors.xml. It looks pretty horrible, but you can see what you need to change
I still haven't figured out how to change some of the colours (e.g. the network provider text in the status bar) but I will update this when I find out more...
Please PM me or post any other mods that you've made that were well hidden. We can add them here to avoid searching for them again later.
This especially applies to all the OPs from the next post
Theme collection
Update (24.03.2011): There is a much more up-to-date list here with all the new themes.
Here's a list of some of the existing themes around:
2.1:
Dark10 by Chewitt
X10 Res Mods by XperiaX10iUser
ElementaL by Mr_Element
Pitch Black by Shukla
Xdre4m by PoTi_96
PGFX™ Eternity by SEMPITERNAL
Transparent Status Bar Theme by thefunkaygibbon
HTC Sense and Stock Android Status Bar by dk2000zx
Enigma by Mobzter
1.6:
Dark10 by Chewitt
Frankendroid by Bazza1976
Enigma by Mobzter
Red Theme by djsystem
There's also a lot more here thanks to gavriel18
If I have missed any please PM me or post here and I'll update the list. I just scanned the first 3 pages in the forum.
Recovery tips
This post will be used for tips etc. on recovering your phone if it won't boot (if this never happens to you then you're not trying hard enough )
From here:
MarylandCookie said:
Future tip: For anyone who needs to reflash due to a bad upload of an app i would recommend just flashing the system.sin file (ive done this on a number of occasions!!)...
Your phone will boot up (will take a little longer than usual) and the only difference will be is that you will have all your system apps back but you will need to re-root. Everything else will be the same
Even better if you have the One Click Root app found here:
http://forum.xda-developers.com/showthread.php?t=834428
Click to expand...
Click to collapse
From here:
gavriel18 said:
Possible reasons your phone won't boot after modifications:
images anren't stored properly, right format, right size etc.
unpacked apk improperly, use 7zip, it doesn't mess anything up
you signed the package before pushing it- unless you know what you're doing follow the directions to a tee and you should be fine
pushed the package to the wrong directory, /system/framework-res.apk XX, /system/framework/framework-res.apk
I'm sure many other reasons, these were the only ones I encountered
How to get past boot screen:
Use backup framework-res.apk and push that one to your phone. Remember to place that one where the modified one is.
To see if adb sees your phone type adb devices, if a serial number pops up try pushing your original, if not...
Flash your phone again from scratch . Sorry, I don't know any better way yet.
Click to expand...
Click to collapse
from bitter personal experience :
If anyone does mess their phone up so much that not even the SE logo shows up (just a black, maybe flickering, screen) and a reflash/seus repair doesn't help. Then what sorted me out was a reflash to Generic Nordic 1.6 using jerpelea's flash tool - the same one I used to get the 2.1 update early - then boot the phone, shut down again and run seus for the 2.1 update.
Click to expand...
Click to collapse
Not directly related, but here's a tip from XperiaX10iUser:
To reverse chmod use 0755 instead of 4755.
This would indeed be helpful. Thanks.
This definitely needs to be sticky'd! It beats looking over pages and pages worth of threads to find the correct ones. It's a lot harder to search through threads without getting completely creative with your search strings so as to cull out all of the useless threads.
Thanks for this! I just posted about a theme I'd like to work on and requested this information!
Wow, great tutorial Calum. Thank you once again for all your hard work!
Thanks for the feedback guys
Great thread! Why on earth the mods haven't thought to sticky this is beyond me.
great thread Callum!
i vote yes for sticky also!
Thanks for all the hard work _calum_ and all the other themers too!
Thank you for this Ultimate theme reference thread... It definitely should be sticky....
XperiaX10iUser said:
Great thread! Why on earth the mods haven't thought to sticky this is beyond me.
Click to expand...
Click to collapse
As I told you the other day... because we cannot be monitoring every single thread in this site...
Also, we only do stickies upon request...
In either case, great guide.
Thread stuck.
egzthunder1 said:
Thread stuck.
Click to expand...
Click to collapse
Thanks
And thanks for all the other posts as well. Now you guys just need to tell me what's missing

[MULTI-MOD] Reboot Option, Percentage Battery, Percentage WiFi, & ASU Signal Strength

[MULTI-MOD] Reboot Option, Percentage Battery, Percentage WiFi, & ASU Signal Strength
I managed to port untermensch's modification to add reboot option(s) to our power menu. See original thread for more information on the process.
Alternative versions also include the Super Circle Battery modification, my own WiFi percentage indicator and ASU network signal strength mods.
{
"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"
}
Requirements:
1. Root privileges
2. Choose appropriate firmware version below.
2.3_3.0.1.G.0.75_GENERIC
See this post for Reboot Option only.
See this post for Reboot Option & Percentage Battery.
See this post for Reboot Option & Percentage Battery & WiFi Percentage & ASU Signal Strength.
See this post for Reboot Option & Percentage Battery & WiFi Percentage & ASU Signal Strength + Roaming.
2.1.A.0.435_GLOBAL See this post.
2.0.2.A.0.24_GLOBAL See this post.
2.0.A.0.504_GLOBAL See this post's attachments.
Note: This replaces core system files, i.e. will remove previously installed themes and modifications. If you have problems, push back the original files.
Automatic (xRecovery) Installation:
Reboot into xRecovery and flash update.zip if supplied.
Automatic (ADB GUI) Installation:
Use the X10 Mod Tool, to push the files to the device.
SystemUI.apk goes in system/app if present, and rest in system/framework.
Manual (Terminal Emulator) Installation:
1. Unrar archive.
2. Copy extracted files to /sdcard, and
3. In Terminal Emulator:
a) make sure you have super user permissions (su),
b) remount /system partition as read-write (mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system),
c) replace framework.jar (dd if=/sdcard/framework.jar of=/system/framework/framework.jar),
d) replace android.policy.jar (dd if=/sdcard/android.policy.jar of=/system/framework/android.policy.jar),
e) replace SystemUI.apk (dd if=/sdcard/SystemUI.apk of=/system/app/SystemUI.apk) if present,
f) replace framework-res.apk (dd if=/sdcard/framework-res.apk of=/system/framework/framework-res.apk) if present, and
g) reboot device (reboot) if not automatic.
Thanks Mr. Rusch glad your also modding the x10
Tested on my Singapore X10i but it cannot boot up, I am repairing my X10 via the PC Companion now.
Under contruction
Percentage Battery
A. The 101 stat_sys_battery_X.png and 21 stat_sys_battery_charge_X.png images of which the modification is based, need to be inserted into framework-res.apk.
1. Decompile framework-res.apk with APK Tool or X10 Mod Tool.
2. Add images to res/drawable-hdpi/.
B. These images then need to be referenced in public.xml as drawables.
1. Open res/values/public.xml in e.g. Notepad.
2. Find last drawable-id and increment by one hexadecimal value (XxXXXXXXXX).
3. Create and add all of your drawables as below, incrementing by one hexadeimal value per item.
Code:
<public type="drawable" name="stat_sys_battery_X" id="XxXXXXXXXX" />
4. Save and Close.
C. The XMLs controlling the battery stats (stat_sys_battery.xml and stat_sys_battery_charge.xml) need to be adjusted to percentage levels (100 on battery, and 20 at charging).
1. Replace stat_sys_battery.xml with the one attached to this post.
2. Replace stat_sys_battery_charge.xml with the one attached to this post.
3. Recompile framework-res.apk with APK Tools or X10 Mod Tool.
Replace framework-res.apk on your device.
Reboot Option
A. The reboot.png needs to be inserted into the framework-res.apk.
1. Decompile framework-res.apk with APK Tool or X10 Mod Tool.
2. Add reboot.png to res/drawable-hdpi/.
B. This image is then to be referenced in public.xml as a drawable.
1. Open res/values/public.xml in e.g. Notepad.
2. Find last drawable-id and increment by one hexadecimal value (XxXXXXXXXX).
3. Create and add your drawable as below,
Code:
<public type="drawable" name="reboot" id="XxXXXXXXXX" />
C. The string "Reboot" needs to be added as well, in public.xml and strings.xml.
1. Find last string-id and increment by one hexadecimal value (XxXXXXXXXX).
2. Create and add your string as below,
Code:
<public type="string" name="reboot" id="XxXXXXXXXX" />
3. Save and Close public.xml.
5. Open res/values/strings.xml in e.g. Notepad.
6. Create and add your string as below,
Code:
<string name="reboot">Reboot</string>
7. Save and Close.
8. Recompile framework-res.apk with APK Tool or X10 Mod Tool.
D. ShutdownThread.java needs to be modified to handle the reboot-command from the power menu.
1. Decompile framework.jar with X10 Mod Tool or baksmali.jar.
2. Open com\android\internal\app\ShutdownThread.smali in e.g Notepad.
3. After the last entry in the "# static fields" section, add
Code:
.field public static mReboot:I
4. Search for "invoke-static {}, Landroid/os/Power;->shutdown()V", and add the following code before this line.
Code:
sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :reboot
5. After the next return-void statement, add this code
Code:
:reboot
const-string v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
This will send the "now" command to the kernels shutdown process. When we get our kernels sorted, we can add other commands such as "recovery" or "download" here.
6. Save and Close.
7. Recompile framework.jar with X10 Mod Tool or smali.jar.
E. GlobalActions.java needs to be modified to present the reboot-
drawble/string in the power menu.
1. Decompile android.policy.jar with X10 Mod Tool or baksmali.jar.
2. Open com\android\internal\policy\impl\GlobalActions.smali in e.g Notepad.
3. In the "createDialog" method, extend the array by changing this
Code:
const/4 v0, 0x3
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
to this
Code:
const/4 v0, 0x[B]4[/B]
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
Note here that depending on how many options that already exist in your power menu, this constant's value may differ. The point is - increment it by 1.
4. Add the reboot menu item by adding the following code after last instance of "aput-object v2, v0, v1"
Code:
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, XxXXXXXXX # reboot icon resource id
const v4, YxYYYYYYY # reboot string resource id
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
Note: Swap XxXXXXXXX for the drawable-ID and YxYYYYYYY for the string-ID. The constant v1 decides the placement in the array we extended above. So you can adjust this if you want to place the entry somewhere other than at the end. But remember to adjust the other entries as well then.
5. Save and Close.
6. Now make a copy of GlobalActions$3.smali and rename it to GlobalActions$7.smali.
7. Open GlobalActions$7.smali in e.g Notepad.
8. Replace all instances of "GlobalActions$3" inside it, with "GlobalActions$7".
9. Search for "invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V", and add the following code in the line before
Code:
const/4 v2, 0x1
sput v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
10. Save and Close.
11. Recompile android.policy.jar with X10 Mod Tool or smali.jar.
Replace framework.jar, android.policy.jar and framework-res.apk on your device.
Percentage WiFi
A. The 21 stat_sys_wifi_signal_X.png images need to be inserted into framework-res.apk (<2.3.3) or SystemUI.apk (>2.3.3).
1. Decompile framework-res.apk with APK Tool or X10 Mod Tool.
2. Add images to res/drawable-hdpi/.
B. These images then need to be registered as drawables in public.xml.
1. Open res/values/public.xml in e.g. Notepad.
2. Find last drawable-id and increment by one hexadecimal value (XxXXXXXXXX).
3. Create and add all of your drawables as below, incrementing by one hexadeimal value per item.
Code:
<public type="drawable" name="stat_sys_wifi_signal_X" id="XxXXXXXXXX" />
4. Recompile framework-res.apk (<2.3.3) or SystemUI.apk (>2.3.3) with APKTool or X10 Mod Tool.
C. StatusBarPolicy.java needs to load the new WiFi-drawables into status bar.
1. Decompile services.jar with X10 Mod Tool.
2. Open StatusBarPolicy.smali in e.g. Notepad.
3. Go the start of the constructor at ".method static constructor <clinit>()V".
4. Increment " .locals X" by one decimal value.
5. Under " .prologue", add another registry to extend the array with,
Code:
const/16 vX, 0x21
Note: vX is also incremented by one decimal value.
6. Now search for "sput-object v0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->sWifiSignalImages:[[I"
The three rows above this, will look like this
Code:
new-array vX, vY, [I
fill-array-data vX, :array_Q
aput-object vX, vZ, v4
6. In the first row, swap vY to the constant we created to initiate the array with.
7. From the second row, copy the ":array_Q" value and go to this marker.
8. Extend this array at the end with references to the drawables-IDs we registered in public.xml earlier.
Note: The ID-format is backwards, i.e.
0xXXt 0xYYt 0xZZt 0xQQt = 0xQQZZYYXX
9. Save and Close.
10. Recompile services.jar with X10 Mod Tool.
D. WifiManager's calculateSignalLevel() functions decision-logic needs to be modified for the 20 levels of WiFi (5% increments).
Note: This function should according to the APIs work as is, as it recieves the array-length as maximum value. For some reason though, I constantly face OutOfBoundsExceptions when using this. Instead, I have created my own logic in java, converted it into smali-code, and replaced the original function with it.
1. Decompile framework.jar with X10 Mod Tool or baksmali.jar.
2. Open WifiManager.smali in e.g. Notepad.
3. Replace the "calculateSignalLevel" function with the one attached to this post.
4. Save and Close.
5. Recompile framework.jar with X10Mod Tool or smali.jar.
Replace framework.jar, services.jar and framework-res.apk on your device.
ASU/dBm Signal Strength
A. The 33 stat_sys_signal_X.png images need to be inserted into framework-res.apk.
B. These images then need to be registered as drawables in public.xml.
C. StatusBarPolicy.java needs to be modified to choose drawable by ASU-value.
D. StatusBarPolicy.java needs to load the new ASU-drawables into status bar.
E. For roaming to work, same process (1-4) needs to be repeated for stat_sys_r_signal_X.png images.
Thank you very much for your mod, tested on my X10 with 2.1 Global Generic and work very well.
To serve options:
Recovery and Download?
Great Work
PD: It would be possible to modify the text of the options?:
Reboot----- for Reiniciar
Recovery----for Recuperar
Download--- for Descargar
It's because I have the X10 in Spanish
tiggerbcn said:
PD: It would be possible to modify the text of the options?:
Reboot----- for Reiniciar
Recovery----for Recuperar
Download--- for Descargar
It's because I have the X10 in Spanish
Click to expand...
Click to collapse
You'd have to mod the APK. So depends how comfortable you are with this.
Edit: Decompile the APK, modify strings.xml, and recompile.
Sent from my X10i using XDA App
Buffff, that will not do, be so kind to modify that file and put it here to download it?, I've put a link to this post in a forum Spanish and there are some who call me, but I have the tools to edit these files
Thanks
PD:and these options are used?
Recovery and Download
Hi, MrRusch. How can I install ONLY that grey battery icon with the percentage within it? Is it possible?
Thanks in advance
PS: I'm the one who asked tiggerbcn for the spanish translation btw
is it possible to modify it to have the reboot option only?
as I dont think I would be using the other options...and would rather not press them by mistake....he he
MrRusch said:
You'd have to mod the APK. So depends how comfortable you are with this.
Edit: Decompile the APK, modify strings.xml, and recompile.
Sent from my X10i using XDA App
Click to expand...
Click to collapse
where i can find that "stings.xml" ?
thks
rendeiro2005 said:
where i can find that "stings.xml" ?
thks
Click to expand...
Click to collapse
It's in res\values in the APK.
Zenghelis said:
Hi, MrRusch. How can I install ONLY that grey battery icon with the percentage within it? Is it possible?
Thanks in advance
PS: I'm the one who asked tiggerbcn for the spanish translation btw
Click to expand...
Click to collapse
You will find the battery mod itself in this thread.
tiggerbcn said:
Buffff, that will not do, be so kind to modify that file and put it here to download it?, I've put a link to this post in a forum Spanish and there are some who call me, but I have the tools to edit these files
Thanks
PD:and these options are used?
Recovery and Download
Click to expand...
Click to collapse
Sorry all, but I will not be making language-specific mods, as this would lead to requests for lots of different languages. If you want to modify it to your language, follow the instructions I have given here (or consult your national chef for help).
As for the latter part of your question - perhaps someone else here can answer this, as this is my first Android device.
mith500 said:
is it possible to modify it to have the reboot option only?
as I dont think I would be using the other options...and would rather not press them by mistake....he he
Click to expand...
Click to collapse
Yes, this version is coming.
MrRusch said:
It's in res\values in the APK.
Click to expand...
Click to collapse
thks a lot.
i`m trying to create a new theme with animations, battery info, etc and i don`t want just install.
thks
rendeiro2005 said:
thks a lot.
i`m trying to create a new theme with animations, battery info, etc and i don`t want just install.
thks
Click to expand...
Click to collapse
Now you got me
how the hell i`m suppoused to mess if i don`t have that folder???
yours don`t have it as mine
rendeiro2005 said:
Now you got me
how the hell i`m suppoused to mess if i don`t have that folder???
yours don`t have it as mine
Click to expand...
Click to collapse
You need to decompile it, not just extract it as an archive. Use apktool or client such as APK Manager to access meta-data from resources.arsc.
MrRusch said:
You need to decompile it, not just extract it as an archive. Use apktool or client such as APK Manager to access meta-data from resources.arsc.
Click to expand...
Click to collapse
forget it
i`m working with that now
thks
i`m sorry but i need your hel with one more thing
were i can find "com\android\internal\app\ShutdownThread.smali "?
it`s suppoused to be on framework but we only have framework-res andi can`t find that
thks
rendeiro2005 said:
i`m sorry but i need your hel with one more thing
were i can find "com\android\internal\app\ShutdownThread.smali "?
it`s suppoused to be on framework but we only have framework-res andi can`t find that
thks
Click to expand...
Click to collapse
No, sorry this is embedded in framework.jar, not framework-res.apk. You will need to deodex this file with baksmali to decompile, edit, and then recompile with smali. But FYI you don't need to touch anything but the APK if you only want to change the language. For this editing strings.xml is enough.
MrRusch said:
No, sorry this is embedded in framework.jar, not framework-res.apk. You will need to deodex this file with baksmali to decompile, edit, and then recompile with smali.
Click to expand...
Click to collapse
ooops
ok
thks
I have now added the single option version, only displaying the Reboot (normal) alternative. This one also comes in two versions, with the default battery indicator, or the percentage one. See screenshots in first post.
MrRusch said:
I have now added the single option version, only displaying the Reboot (normal) alternative. This one also comes in two versions, with the default battery indicator, or the percentage one. See screenshots in first post.
Click to expand...
Click to collapse
sorry again
what`s the command to compile android.policy.jar?
thks

[TOOL] V4.0.3-xdaAutoTool ALL-Win | V5.0.0b-xdaautoAPKTool | V1.0.3-xdaautoDeoTool

********************************************************
xda AutoTool (xAT)
CURRENT VERSION: 4.0.3 RELEASE
********************************************************
This POST: xda AutoTool (xAT) Windows Version (AIO)
2nd POST: xda autoAPKTool (xaAT) Command Line automation
3rd POST: xda autoDeodexTool (xaDT) Command Line automation
5th POST : MIUI smali editing and translation tips
7th POST : MIUI System Update modified for OTA
LATEST DOWNLOAD: http://tweaksparadise.com/download/xavierjohn22/index.php?action=list&folder=2100
NOTES:
there's no need for a how-to and full doc in this beta
all auto apk tool and auto deodex tool applies here
adb functionality is in progress
still a lot of room for improvement
REQUESTS:
If you happen to have an idea, please post and make a clear description or screenshot of what you want to happen or do
TO DO:
add more options in the settings menu
catch errors and better handling errors
add more tabs for custom commands
PLANS:
my looking forward is to be able to create custom scripts and run with the tool
also to be able to put many jar files by just adding it in settings and run custom commands for that jar
that way it will automate whatever manual things users do in their customization of apks, rom zip, lang pack, etc
IMPORTANT:
ALL THE DEPENDENCIES LIKE OCX WILL PROMPT ERROR if not in your machine
YOU MAY NOT HAVE THESE OCX YET SO I INCLUDED IT IN THE Res folder
STEPS on FIRST RUN ONLY
1) Go to /Res/
2) Run FileRegister.exe to register these ocx files
If you are using latest w7 it may probably be registering in the wrong path so register manually.
INSTALL:
Place the folder where there is no space yet
C:xdaAutoTool
I havent handled white space yet
- Tested on Windows 7 workstation, it should run in XP as well
- All ocx and posibble dll references and dependecies will be in your machine if you are close to W7 X64 and had installed ms vb runtime in the past
- All the dependency file list are inside the docs folder (docs/xdaAutoTool.xml)
- This means i used mainly files in your Windows 7 system to run it without installation
- Installer will come later or when issues with running is that massive
********************************************************
xdaAutoTool CHANGELOG:
********************************************************
Version 4.0.3
10:30 AM 8/5/2012
====================================
- Fixed code of changing apktool version via combobox
Version 4.0.2
9:30 PM 3/7/2012
====================================
- Move apktool choose settings to combobox
- Fixed theming folder creation runtime error
- Speed up reading columns and lines on multiple apk to display in listview
Version 4.0.1
9:27 PM 2/28/2012
====================================
- Added MULTIPLE INPUT apk support, choose working folder in combobox
- Added code to detect status after recompile or decompile
- Update code to handle listview loading
- Executable size is still down to 1.476KB, decent, he he he
Version 4.0.0
7:58 PM 2/27/2012
====================================
- Recode detecting BIN folder for faster loading
- Load all available apktool versions in menu and use
- Added color code for text on compiled and not compiled apk
- Added save form position to remember when loading app (for testing)
- Added Decompile With..... apktool version
- Added Recompile With..... apktool version
- Added more columns:
-- Compiled (YES or NO)
-- Last compiled (apk)
-- Decompiled with (apktool version from yml file)
Version 3.0.1 (BETA)
2:59 PM 11/5/2011
====================================
- Fixed deodex full rom and timers
- Added bottom last panel as application path panel
- Added xUltimate-d9pc for THEMES
- Added running draw9patch compiler in pngs using xUltimate-d9pc
- Redo zipalign dist code in build usable apk, when option to zipalign is ON, the dist out apk will now be deleted
- Added toolbar icons
- Changed application icon temporarily
- Fixed changing apktool jar file version after pressing save button
Version 3.0.0 (BETA)
5:15 PM 10/29/2011
====================================
- Added mogrify theming options
- Added create themed folders
- Added apply Hue and Saturation using mogrify
- Added Build All Themed APKS, all apks in specific folder structure
- Added Build One Set themed apks
- Added support for Copy_Folders.txt in _CUSTOM_RES
USAGE:
"Left file path source" + delimeter "||" + "Right file path destination"
SAMPLE:
Launcher2buildapkresxmldefault_workspace.xml||Launcher2resxmldefault_workspace.xml
NOTE:
Folder gets deleted after build usable
- Added support for Copy_Files.txt in _CUSTOM_RES
USAGE:
"Left folder path source" + delimeter "||" + "Right folder path destination"
SAMPLE:
framework-resbuildapkresanim||framework-resresanim
NOTE:
File does not get deleted yet after build usable,
thinking if it make sense, filecopy command already overwrites
- Added MOD TAB, use for multiple modding apks
- Added overwrite AndroidManifest.xml binary file
In APK DIST generated apks this is not necessary
Using the apks _OUTPUT_APK_DIST_ZIPALIGN after AndroidManifest.xml is better
It generates a build apk and put it in _OUTPUT_APK_DIST_ZIPALIGN
This then will be signed and gets a new META-INF file to ake the apk usable
(overwrite AndroidManifest.xml binary file is only use when all else fails)
- Added reference to microsoft scripting runtime,
Better folder/file handling,
Space not yet handled for these are third party executables
- Switch to Native Code compiler, no-optimization
- Exe is now 800kb, compiled optimized exe is throwing error atm
P-Code is not an option
Version 2.0.0 (BETA)
8:02 PM 8/28/2011
====================================
- Added zipalign.exe file in bin folder
- Added generate zip aligned APKs option in build usable APKs command
- Added move zip aligned apks in _OUTPUT_APK_ZIPALIGN to _OUTPUT_APK folder
- Added move zip aligned apks in _OUTPUT_APK_DIST_ZIPALIGN to _OUTPUT_APK folder
- Added apktool dist generated apks copy option
- Added apktool dist generated apks zipaligned option
- Added make zipaligned apks independent button for apks in _OUTPUT_APK
- Fixed enabling selection buttons bug
- Fixed error restarting when app save window position on exit
- Fixed saving tab to remember it next time app is started
- Optimized BUILD USABLE apk commands
Version 1.0.3 (BETA)
11:03 AM 6/14/2011
====================================
- Added optimized pngs in TOOLS tab
- Added clear files of working directories in TOOLS tab
- Added feature to add to open with menu, in "Edit" menu
- Added copy to phone and delete to phone function in phone explorer
- Added save column width on all listviews
- Changed UI for progress bar when executing commands
Version 1.0.2 (BETA)
12:33 PM 6/11/2011
====================================
- Added Phone Explorer in ADB TAB
----display system app and data app as initial
----able to copy files from those folders for now
----filter files and save last browse path in worstation
----some adb commands added to UI
- Added Apply Mods
- Added saving of TAB positions when exiting app
- Added save form positions for main and future phone explorer
- Added load input folder when APK Tab was pressed
- Moved all adb related commands in the Phone Explorer form
- Fixed error when double clicking list view without files
- Fixed deodexing rom zip picked from directory with spaces in file path
- Fixed editing bootclass files and adb files
- Changed SIGN to TOOLS, more sign commands in mouse Right Click
- Changed UI for folders and file list views
- Changed the way icons are shown when loading files, now associated
Version 1.0.1 (BETA)
3:34 PM 6/6/2011
====================================
- Fixed list files error when all items are deleted
- Fixed error on check uncheck option when no item is in the list
- Fixed deo rom directory clean up, will clear all source/deo directory
- Added capability to change apktool, smali and baksmali jar file versions
- Added experimental deodexed a full rom and create rom zip file
- Added more flexibility on selection method for files in the list
Version 1.0.0 (BETA)
11:30 PM 6/3/2011
====================================
- Initial release
- apk tool automation
- deodexing basics automation
- sign apk and zip commands
- adb commands- Initial release
- apk tool automation
- deodexing basics automation
- sign apk and zip commands
- adb commands
********************************************************
Acknowledgement:
********************************************************
My thanks to the support of the people here in xda and people who
appreciate my work in any way expressed, Cheers!!!
MGunther, JHatley
********************************************************
CREDITS:
********************************************************
Brut.all for Apktool - a tool for reengineering apk files
http://www.7-zip.org - 7za commandline version
- signapk.jar
- optipng http://code.google.com/p/roptipng/
- smali/baksmali
- JesusFreke, Daneshm90's script and crzyruski
- mogrify executable by ImageMagick
- http://www.imagemagick.org/script/index.php
- xeudoxus xUltimate Draw9Patch Compiler
- http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html
XDA:DevDB Information
[TOOL] V4.0.3-xdaAutoTool ALL-Win | V5.0.0b-xdaautoAPKTool | V1.0.3-xdaautoDeoTool, Tool/Utility for the HTC Desire
Contributors
xavierjohn22
Version Information
Status: Testing
Created 2014-11-05
Last Updated 2014-11-04
xda AutoAPKTOOL
********************************************************
xda AutoAPKTOOL (xAAT)
CURRENT VERSION: 5.0.0b
********************************************************
LATEST DOWNLOAD: http://tweaksparadise.com/download/xavierjohn22/index.php?action=list&folder=2100
5th POST: MIUI smali hunting and images to be change + PSD sources
This tool has been tested MIUI XJ Rom HERE
Compile and Decompile APKS, Build language packs faster with many devices, N1, G7, Galaxy S, etc..
OBJECTIVE:
Main intention is to automate/batch processing decompiling and recompiling, flashable zip creation, etc
Initially made when translating miui apks and building lang pack
USAGE:
Run AutoAPKToolMain.bat
QUICK HOW TO:
THE 1-2-3-4 + 5 PROCESS
- Place ALL apks to decompile in _INPUT_APK folder
- Place the framework-res apk in the _INPUT_APK as well (filename: framework-res.apk)
- Choose 1 then hit enter for if framework-res.apk command
(note that framework-res.apk will always be in the _INPUT_APK folder)
- Choose 2 to decompile all in one shot
(this will create the resources and sources folder inside _INPUT_APK folder)
- Do your edits for all in that folder, add your values-en, values-pt, raw-en, etc.
You may add drawable-en-hdpi as well
Edit your strings.xml and many more...
Remember to keep the folder structure intact
After all edits are done
- Choose 3 and hit enter
This will recompile all in one shot
A notepad will appear to show if there are errors in recompiling, check the log
Adjust if necessary, you can choose to recompile a single folder if you need to
- Choose 4 to build usable APKs
All apks will be in the _OUT_APK folder (These will not FC)
All overwriting of files are automated
These APKs are from the Original apk with:
resource.arsc + classes.dex changed + other resources added
-Choose 5 (the fun part, lol)
It will build your flashable zip signed already, there's a template in the _FLASHABLES folder
You may edit it, replace it with the same name, just keep templates by renaming, place your build.prop there, etc
Read the text file thoroughly...
So that is the short story....
For other options and features read the ReadMeHistory.txt
FYI, read notes below (in _OUT_APKTOOL_DIST folder, those are build by APK Tool)
I manage to build APKs that don't FC in the _OUT_APKTOOL_DIST only that...... (see txt for complete explanation)
EXAMPLE 1: IMAGE
If you are overwriting an image in an APK (widget_1x.png)
_CUSTOM_RES
-MiuiMusic
--res
---drawable-hdpi
----widget_1x.png (this is the image i will overwrite)
Otherwise if you are adding folders no need to turn on "overwrite resources), put all your files in:
_INPUT_APK
-MiuiMusic
--res
---drawable-de-hdpi (this is the image folder i added)
----widget_1x.png
The Copy added resources "ON" will take care of copying these added resources or files
SOME EXAMPLES OF IMAGES AND FILES OVERRIDING:
"_CUSTOM_RES\AppShare\res\drawable-hdpi\installed.png"
"_CUSTOM_RES\Gallery\res\menu\media_context_menu.xml"
"_CUSTOM_RES\ThemeManager\res\drawable-hdpi\desktop_mask.png"
EXAMPLE 2: XML BINARY WHEN YOU DO DIRECT EDITS
Say you are editing a file straight from framework-res\res\drawable\progress_horizontal.xml
FOR NOW YOU HAVE TO DO THIS:
1) After doing [3], recompiling the apk
2) Copy the file _INPUT_APK\framework-res\build\apk\res\drawable\progress_horizontal.xml
to
_CUSTOM_RES\framework-res\res\drawable\progress_horizontal.xml
(this is the binary of your edited file, by doing this, you are telling the tool to overwrite it when building the apk)
3) Once this is done, make sure that "Overwrite res using _CUSTOM_RES" is ON, it is ON by default
4) then do build usable, It should overwrite those binaries in the APK
NOTES:
"Build Usable APKs" perform these depending on options
- overwrite resources.arsc (ON/OFF)
- overwrite classes.dex (ON/OFF)
- copy added resources (e.g. drawable-de-hdpi) (ON/OFF)
- overwrite any file in APK using _CUSTOM_RES (ON/OFF)
- copy optimized pngs to APK (ON/OFF) - EXPERIMENTAL @ the moment (20110503)
- -mx3 is the compression level for the meantime, i'll make it flexible after deotool and windows version
REQUIREMENTS:
- you must have java installed on your machine, you may even have it already, mine is this per the main log file
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)
- tested on windows 7, x64 pc
- adb must be installed in the system, download the image attached to configure adb to be called globally in cmds
CREDITS
Brut.all for Apktool - a tool for reengineering apk files
http://www.7-zip.org - 7za commandline version
signapk.jar
optipng http://code.google.com/p/roptipng/
mogrify http://www.imagemagick.org/www/binary-releases.html#windows
guntherm6​6 for bringing mogrify close to this tool
{
"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"
}
********************************************************
AUTO APK TOOL CHANGELOG:
********************************************************
Version 5.0.0b
- Massive overhaul of codes
- New in this version is 87 and 88
87 = Can be use to remember single recompile of the last path (after 8)
Turn this ON and it will be active
88 = Is use to trigger the single recompile action
recompiling what is the last path
- Redo the recompile code
- Redo menu, starting from 21 is the new apktool 2.0.0.X settings
- 21 Use New apktool version
- 22 Use -f on recompile (this was migrated to work with new apktool and old apktool)
- 23 Use -c on recompile (this is new to work on new apktool)
- 24 Use -o on recompile (this is new to work on new apktool)
This will create a apkname_NEW.apk in _OUT_NEW folder
- 31 Overwrite resources.arsc
- 32 Overwrite classes.dex
- 33 Overwrite using _CUSTOM_RES
- 34 Copy added resources to APK
- 35 Make zipaligned apk from _OUT_APK
- 36 Force delete dir on Decompile (-f)
- 37 Optimized All PNGS in APKs
- 38 Optimized "xyz.9.png" PNGS in APKs
ISSUE:
- The ZIP Align is broken on some apks
- Use 42 ON but leave 43 and 44 off for now
- This will also be redo because the code right now zipaligns then sign
should be sign then zipalign
Version 4.0.2
- Added Menu 21 ON/OFF for new apktool support
- Changed Menu 22 ON/OFF settings saved, Overwrite resources.arsc
- Changed Menu 23 ON/OFF settings saved, Overwrite classes.dex
- Changed Menu 24 ON/OFF settings saved, Overwrite using _CUSTOM_RES
- Changed Menu 25 ON/OFF settings saved, Copy added resources to APK
- Changed Menu 26 ON/OFF settings saved, Make zipaligned apk from _OUT_APK
- Changed Menu 27 ON/OFF settings saved, Force delete dir on Decompile (-f)
- Changed Menu 28 ON/OFF settings saved, Force delete dir on Recompile (-f)
- Changed Menu 29 ON/OFF settings saved, Optimized All PNGS in APKs
- Changed Menu 30 ON/OFF settings saved, Optimized "xyz.9.png" PNGS in APKs
- Changed Menu 85 ON/OFF settings saved, Sign APKs after build themed apks
- Changed Menu 86 ON/OFF settings saved, Build a Flashable Theme Zip (after 84, 85)
version 4.0.1b
- Added support for new apktool 2.0.0b7
- Added menu 58, Open installed framework folder
- Improved colored menu to easily determine numbers from text
Colored_AutoAPKToolMain.bat = colored code
AutoAPKToolMain.bat = default code
- Obsoleted 13recompileICS.bat = 13recompileICS.bat.obsolete
- Obsoleted 14rebuildusableICS.bat.obsolete = 14rebuildusableICS.bat.obsolete
version 4.0.0
8:08 PM 12/20/2013
- Added autoinstall frameworks on application load
55, 56, 57
- chgcolor options for screen clarity (see acknowledgement in hep file)
- clean-up code for ICS decompile, unneeded file obsoleted but still on root directory
- clean-up menus and simplify terms on menus
- input text is set to yellow
- AutoAPKToolMain_Colored.bat is a colored text screen
- AutoAPKToolMain.bat is the original file (use this if _Colored fails on your system)
version 3.0.2
6:56 PM 8/19/2012
- Fixed displaying apktool version, remove 'if codes', now displays apktool name
as its version number, there's no need to change and add to this in the future
version 3.0.1
2:12 PM 8/4/2012
- Make the choosing of apktool version dynamic
- Your apktool must have "apktool" in the filename as prefix and obviously
extension is ".jar" (e.g. apktool_1.4.3.jar, apktool_1.3.1.jar)
- Fixed detecting apk before signing using option 43 and 44
version 3.0.0
10:09 PM 8/3/2012
- Option 42, 43, 44 explained
- Option 42, This is the raw APK tool output in dist (Without using my build apk)
_OUT_APKTOOL_DIST
- Option 43, This is the raw APK tool output then Zipaligned
_OUT_APKTOOL_DIST_ZIPALIGN
- Option 44, When 43 is ON, 44 is ON, the zipalinged apk gets signed
Option 44 wont work without 43 ON
There's a text file Sign_These_Then_Move.txt in _OUT_APKTOOL_DIST_ZIPALIGN
Apks listed here gets signed and moved to _OUT_APKTOOL_DIST_ZIPALIGN_SIGNED
modified by Agat63 03/31/12
version 2.0.4
1:31 AM 3/31/12
- Added decompile ICS apk
- Added recompile ICS apk
- Added baksmali JAR files
- Added baksmali DEX files
- Added smali JAR files
- Added smali DEX files
Version 2.0.3e
1:19 AM 7/5/2012
by xdaer Peteragent5
http://forum.xda-developers.com/showpost.php?p=27566198&postcount=811
- I've added the option to use: apktool_1.4.3.jar
- And I've updated the aapt.exe from latest Android SDK
(Android SDK Platfrorm Tools - Rev.11)
Version 2.0.3b/c/d
3:27 PM 10/24/2011
(d)
- Added flexibility of building flashable zip, will build according to folder name
- Redo folder structure in building themed apks
(b)
- Added create themed folders
- Added apply Hue and Saturation on pngs
(a)
- Added build all themed, apks in all folders _THEMES
- Added build one themed, apks in specified folder _THEMES
- Option to sign apks after build
- Option to make a flashable zip
Version 2.0.3
- Changed folder handling in mogrify commands
- Added option to sign apk after mogrify themed apks are build and zipalign
- Fixed signing apks/zip commands
Version 2.0.2
- Added mogrify.exe and mogrify features
(Ability to change hues of PNGs, see acknowledgements for mogrify usage)
- Move Following APK DIST generated apk commands to recompile
(Copy generated apks of apktool in _OUT_APKTOOL_DIST)
(Create Zipalign apks in _OUT_APKTOOL_DIST to _OUT_APKTOOL_DIST_ZIPALIGN)
Version 2.0.1
- Added saving settings of copy apks and generate zip aligns in dist gen apks
- Added saving settings of compression level
Version 2.0.0
- Added adb reboot commands
- Added script to save apktool version after changing and use that on start of app
- Added option to only zipalign apks placed in the _OUT_APK folder
- Added move apks from _OUT_APK_ZIPALIGN to _OUT_APK
(useful before building flashable zip)
Version 1.0.9
- Added option to generate zipalign apks after each recompile
- goes to _OUT_APKTOOL_DIST_ZIPALIGN
- Separate option for apktool generated apks
Version 1.0.8
- Added option to toggle copying of apk from DIST folder of apktool gen directory
- Added zip align apks (generated apk from _OUT_APK to _OUT_APK_ZIPALIGN)
- Added setting of compression level
- Added Delete "folder name" of mod file text file
___If you have "Mod1" folder the file should be "Delete_Mod1.txt"
___Sample line in the text file is "AppShare\res\drawable-hdpi\installed.png"
___No need to specify the _INPUT_APK folder
___It will delete any file in that path once listed in the text file
- Fixed code jumping over optimization of pngs
Version 1.0.7
- Added install additional resources
Version 1.0.6
- Added more adb functions
- Added request for mods folders
- Fixed error handling when "Enter" key is pressed without choice
- Fixed menu choices for blank entry and "Enter" key is pressed as well
- Fixed mod folders applying only the last folder in menu
Version 1.0.5
- Added apktool 1.4.1, see brut's site for changelog
(Make sure you also have the aapt file from the latest migration notes)
http://code.google.com/p/android-apktool/downloads/list
- Added Single Recompile then Build
- Added adb commands and tools, you must have ADB installed and configure already,
(download "configure_adb_to_be_called_anywhere_in_cmd.rar")
- Reorganized menu for future improvements
Version 1.0.4
- Added optimized "xyz.9.png" in APKs option
Version 1.0.3
- Fix menu handling for option 19 to 21
- Changed "u" switch to "a" for handling copy added resources
- Added optimized PNGs in APKs option
Version 1.0.2
- Initial release
xda AutoDeodexTOOL
********************************************************
xda AutoDEODEXTOOL (xADT)
CURRENT VERSION: 1.0.3
********************************************************
LATEST DOWNLOAD: http://tweaksparadise.com/download/xavierjohn22/index.php?action=list&folder=2100
OBJECTIVE:
Automate/batch processing of deodexing jars and apks (odexed rom)
USAGE:
Run AutoDEOToolMain.bat
IMPORTANT:
- PLEASE AVOID SPACES IN THE TOOL FOLDER PATH FOR NOW
- Good path use underscores or only letters, nos. (L:\TOOL\AutoDEOTool1.0.1)
- Some of the APKs does not like the -mX optimization so watch for those
QUICK HOW TO:
To deodex framework files,
- Place the JARs and corresponding ODEX files in the directory "_framework".
- Otherwise, place deodexed framework JARs into the directory "deodexed_JAR".
To deodex APK files,
- Place the APKs and corresponding ODEX files in the directory "_app".
(1) is for stock android deodexing
(2) is for non stock, such as sense, miui where you can put a custom bootclasspath
(3 to 6) options are for deodexing apks only or jars with 1 and 2 functionality
Options to change between smali-baksmali versions
NOTES:
- Basic out is performed by the tool and classes.dex is just added to the jar/apk
- No compression feature yet for that would be a separate option, i turned it off for FC with miui soundrecorder apk
REQUIREMENTS:
- you must have java installed on your machine, you may even have it already, mine is:
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)
- tested on windows 7, x64 pc
CREDITS
CREDITS:
- JesusFreke, Daneshm90's script and crzyruski Auto-Deodexer
- 7za commandline version http://www.7-zip.org
- sggua @ xda (Sergiy G) http://sgg.im/
********************************************************
AUTO DEODEX TOOL CHANGELOG:
********************************************************
Version 1.0.3
sggua @ xda
http://sgg.im/
- New smali/backsmali version 1.3.2
- API number for right deodex
Version 1.0.2
- Added optimized JARs and APKs option
- Added compression level, functioning separately
- Added clean folders
- Fixed compression levels when -a for all called batch
Version 1.0.1
- Initial Release
- Deodex stock and custom bootclass jars and apks of a rom
- Deodex stock and custom bootclass apks only
- Deodex stock and custom bootclass jars only
i love you
These are some of the smalis you need to change
Posted here during MIUI Ver 1.4.22/1.5.6
(this means, it may change next week, anyways basics are posted)
Use Beyond Compare or other folder, file comparer, for comparing changes
Use Windows Grep for hunting down other smalis in the future
If you got chinese character and you have translated all in strings, arrays, raw, etc.., it is most likely to be in the smali files
Backup
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Backup\smali\com\miui\backup\ui\LocalBackupMain.smali
Code:
const-string v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm:ss"
const-string v1, "yyyy MM dd HH:mm:ss"
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Backup\smali\com\miui\milk\ui\PreferenceCloudBackup.smali
Code:
const-string v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm"
const-string v1, "yyyy MM dd HH:mm:ss"
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Backup\smali\com\miui\milk\ui\ProgressResultActivity.smali
Code:
const-string v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm"
const-string v1, "yyyy MM dd HH:mm:ss"
FileExplorer
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\FileExplorer\smali\com\android\fileexplorer\Util.smali
Code:
const-string v2, "\u7167\u7247"
const-string v2, "MIUI Camera Shots"
const-string v2, "SD\u5361"
const-string v2, "SD Card"
const-string v2, "MIUI\u622a\u5c4f"
const-string v2, "MIUI Screenshots"
const-string v2, "\u94c3\u58f0"
const-string v2, "Downloads"
Gallery
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Gallery\smali\com\android\gallery\app\AppHelper.smali
Code:
const-string v3, "\u25cf"
const-string v3, "Menu" or const-string v3, "Sort"
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Gallery\smali\com\android\gallery\fileexplorer\FileViewInteractionHub$5.smali
Code:
const-string v8, "\u8bbe\u7f6e\u58c1\u7eb8"
const-string v8, "Use as wallpaper"
const-string v9, "\u8bbe\u4e3a\u684c\u9762\u58c1\u7eb8"
const-string v9, "Set as desktop wallpaper"
const-string v9, "\u8bbe\u4e3a\u9501\u5c4f\u58c1\u7eb8"
const-string v9, "Set as lockscreen wallpaper"
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Gallery\smali\com\android\gallery\ui\FolderViewActivity$6.smali
Code:
const-string v2, "\u91cd\u547d\u540d\u5931\u8d25"
const-string v2, "Rename failed"
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Gallery\smali\com\android\gallery\ui\InformationDialog.smali
Code:
const-string v18, "\u89c6\u9891\u5c5e\u6027"
const-string v18, "Video properties"
const-string v18, "\u56fe\u7247\u5c5e\u6027"
const-string v18, "Video properties"
const-string v5, "\u89c6\u9891\u5c5e\u6027"
const-string v5, "Video properties"
const-string v5, "\u56fe\u7247\u5c5e\u6027"
const-string v5, "Image properties"
+ this xml file in Gallery
\Gallery\res\menu\media_context_menu.xml
Code:
<item android:id="@id/rename" android:title="???" />
<item android:id="@id/rename" android:title="Rename" />
Launcher2
Make your own workspace in desktop
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Launcher2\res\xml\default_workspace.xml
MiuiCamera
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\MiuiCamera\smali\com\miui\camera\ui\PictureSizePreferenceActivity.smali
Code:
const-string v10, " (\u5168\u5c4f)"
const-string v10, " (Full Screen)"
MiuiMusic
I don't change and remove tabs in MiuiMusic, it's okay for us here in Singapore
Don't forget to translate plurals.xml too
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\MiuiMusic\res\values\plurals.xml
Mms
translate
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_TEMP\_INPUT_APK\Mms\res\raw-en\sms_frequently_used_phrase
to remove the third tab
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Mms\smali\com\android\mms\ui\MmsTabActivity.smali
remove these lines:
Code:
----------------------------
.method static constructor <clinit>()V
.locals 1
.prologue
.line 22
const/4 v0, 0x0
sput-boolean v0, Lcom/android/mms/ui/MmsTabActivity;->sPasswordConfirmed:Z
return-void
.end method
-----------------------------
.method private setupRecommendationTab()V
.locals 4
.prologue
.line 95
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 96
const-class v1, Lcom/android/mms/ui/FestivalSmsCategoryList;
invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;
.line 97
iget-object v1, p0, Lcom/android/mms/ui/MmsTabActivity;->mTabHost:Landroid/widget/TabHost;
iget-object v2, p0, Lcom/android/mms/ui/MmsTabActivity;->mTabHost:Landroid/widget/TabHost;
const-string v3, "festival"
invoke-virtual {v2, v3}, Landroid/widget/TabHost;->newTabSpec(Ljava/lang/String;)Landroid/widget/TabHost$TabSpec;
move-result-object v2
const v3, 0x7f090135
invoke-virtual {p0, v3}, Lcom/android/mms/ui/MmsTabActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/TabHost$TabSpec;->setIndicator(Ljava/lang/CharSequence;)Landroid/widget/TabHost$TabSpec;
move-result-object v2
invoke-virtual {v2, v0}, Landroid/widget/TabHost$TabSpec;->setContent(Landroid/content/Intent;)Landroid/widget/TabHost$TabSpec;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/widget/TabHost;->addTab(Landroid/widget/TabHost$TabSpec;)V
.line 99
return-void
.end method
-----------------------------
.line 45
invoke-direct {p0}, Lcom/android/mms/ui/MmsTabActivity;->setupRecommendationTab()V
Notes
Introduction translation
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\Notes\res\raw\introduction
Settings
if you are en base provide html helpfile for tethering too
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_TEMP\_INPUT_APK\Settings\assets\html\en\tethering_help.html
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_TEMP\_INPUT_APK\Settings\assets\html\en\tethering_usb_help.html
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_TEMP\_INPUT_APK\Settings\assets\html\en\tethering_wifi_help.html
Sidekick
L:\_000 _MIUI_ROMs\000_AUTOAPKTOOL_EN\_INPUT_APK\SideKick\smali\com\android\sidekick\InputHistoryAdapter.smali
Code:
const-string v2, "\u4eca\u5929"
const-string v2, "Today"
const-string v2, "\u6628\u5929"
const-string v2, "Yesterday"
IMAGES that needs to be taken care of,
Decompile my Updates or Full ROM apks and grab the images there if you want to use it
xavierjohn22 said:
LOL, i was looking for your email in android but never found it, so i posted it here, ha ha ha
Click to expand...
Click to collapse
Haha, you made my day!!! b2t: very nice work, love this new toy. Makes the translation work faster then before.
How to set-up System Update with MIUI
1. Set-up your server
2. Modify the Update.apk smali file pointing to your json file
3. Make your json file and upload it to the server
4. Upload your files (see folder structure)
5. Optional grab my ota binary in xbin, it's from atroy of china, else make your own ota binary
If this will prevent the boot loop of cooked framework s, this is extremely useful indeed. Thank you
Swyped with my Starburst based Desire. Please ignore any typos or grammos.
droidzone said:
If this will prevent the boot loop of cooked framework s, this is extremely useful indeed. Thank you
Swyped with my Starburst based Desire. Please ignore any typos or grammos.
Click to expand...
Click to collapse
kindly feedback when you try it, thanks dude
xavierjohn22 said:
kindly feedback when you try it, thanks dude
Click to expand...
Click to collapse
Will definitely do that..
Swyped with my Starburst based Desire. Please ignore any typos or grammos.
@XJ When i read this it's a little abracadabra...
Is it what you're saying we can make our ohne language pack?
Just folow the steps and make your ohne NL pack (in my case) whenever you want and we can adjust it whenever we want?
Raffie75 said:
@XJ When i read this it's a little abracadabra...
Is it what you're saying we can make our ohne language pack?
Just folow the steps and make your ohne NL pack (in my case) whenever you want and we can adjust it whenever we want?
Click to expand...
Click to collapse
Yes.
Just grab a deodexed miui rom,
Follow what is in the OP, then you have your language pack, i did it to let others try to make their own.
and it relieves me of human error when translating and making multi lang in MIUI, that why we dont usually get chinese strings, only in some smali's left out when new ones come along
Man, you are the master!
Can't i put the translated (say the strings) in the right folder and start with step 2 or i think 3 recompile? Or maybe use the Latest translation and wipe all the other languages?
Sent from my HTC Desire using Tapatalk
Raffie75 said:
Man, you are the master!
Can't i put the translated (say the strings) in the right folder and start with step 2 or i think 3 recompile? Or maybe use the Latest translation and wipe all the other languages?
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
Yes you can do both
yup if you do the first grab the stock apks from a deodexed rom, same version. or grab the apks from my EN and ZH rom
then yeah put your values-nl, raw nl in the right places.
the next one will work too. and you can see how the folders are structure after decompile in the framework-res, so it will aid you in committing mistake
after that both will result in lesser size apks than the multi lang since you just have your language
droidzone said:
Will definitely do that..
Swyped with my Starburst based Desire. Please ignore any typos or grammos.
Click to expand...
Click to collapse
Okay. Buddy.thanks.
Sent from my HTC Desire using XDA App
Nice tool xavierjohn
While apk manager faild to recompile my apks this works.
But my xml edits aren't in apk after recompile. Why?
What option should i change?
affmalg said:
Nice tool xavierjohn
While apk manager faild to recompile my apks this works.
But my xml edits aren't in apk after recompile. Why?
What option should i change?
Click to expand...
Click to collapse
What kind of xml dude?
Is it inside the values? I mean you straight edit from values? Or any folder?
Sent from my HTC Desire using XDA App
xavierjohn22 said:
What kind of xml dude?
Is it inside the values? I mean you straight edit from values? Or any folder?
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
Sorry that i didn't mention it.
The xml i edited were was framework-res/res/value/styles.xml and framework-res/res/drawable/progress_horizontal.xml
I opened i with notepad++ and edited a color hex code, saved and recompiled.
What do you mean with folder?
Thanks a lot for the tool. I m gonna give it a try tomorrow while preparing the greek pack for the latest MIUI
affmalg said:
Sorry that i didn't mention it.
The xml i edited were was framework-res/res/value/styles.xml and framework-res/res/drawable/progress_horizontal.xml
I opened i with notepad++ and edited a color hex code, saved and recompiled.
What do you mean with folder?
Click to expand...
Click to collapse
Ah sorry too, i was not clear either.
Usually i do values-en or values-zh or drawable-en when i do translation in miui.
Anyways, it should save the changes upon recompile.
During build usable make sure:
Overwrite resources.arsc : (10) = ON
Overwrite classes.dex : (11) = ON
10, mostly handle those edits in values xml files
11, when smali edits are made
EDIT:
Ah shocks wait, i am looking at it, seems like i turned it off by bypassing the script

[GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]

Hi Guys,
I have been asked many times how I was able to do transparent app drawer.
Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.
Tools needed:
1) apktool
2) notepad++
3) 7zip
Files needed: (Depending on ROM type)
1) trebuchet.apk, or
2) Launcher2.apk
Steps [HOW TO]:
1) decompile trebuchet.apk or Launcher2.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000" with android:background="#00000000"
There are two instances in this file.
3) now SMALI CODE.
go to
\smali\com\cyanogenmod\trebuchet\
or
smali\com\android\launcher2\
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali
However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.
Example of Smali:
Delete all this method starting from .method to .end mothod.
This code is in Launcher.smali.
.method updateWallpaperVisibility(Z)V
.locals 3
.parameter
.prologue
const/high16 v1, 0x10
.line 2322
if-eqz p1, :cond_1
move v0, v1
.line 2323
:goto_0
invoke-virtual {p0}, Lcom/android/launcher2/Launcher;->getWindow()Landroid/view/Window;
move-result-object v2
invoke-virtual {v2}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;
move-result-object v2
iget v2, v2, Landroid/view/WindowManager$LayoutParams;->flags:I
and-int/2addr v2, v1
.line 2325
if-eq v0, v2, :cond_0
.line 2326
invoke-virtual {p0}, Lcom/android/launcher2/Launcher;->getWindow()Landroid/view/Window;
move-result-object v2
invoke-virtual {v2, v0, v1}, Landroid/view/Window;->setFlags(II)V
.line 2328
:cond_0
return-void
.line 2322
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
Click to expand...
Click to collapse
Having done this deletion, use notepad++ to search for updateWallpaperVisibility
Use fine in files function in Notepadd++, it will tell you exactly where this method is referenced. Then delete all the lines containing this method reference.
Example:
invoke-virtual {p0, v0}, Lcom/android/launcher2/Launcher;->updateWallpaperVisibility(Z)V
Click to expand...
Click to collapse
so, you have to delete the above line completely, and also any lines in all smali files containing "updateWallpaperVisibility"
After deleting the method and all of its references, just compile the apk and make your flashsable zip.
I use APKTOOL and 7zip for that.
Example:
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"
}
After:
Enjoy
wesamothman said:
Hi Guys,
I have been asked many times how I was able to do transparent app drawer.
Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.
Tools needed:
1) apktool
2) notepad++
3) 7zip
Files needed: (Depending on ROM type)
1) trebuchet.apk, or
2) Launcher2.apk
Steps [HOW TO]:
1) decompile trebuchet.apk or Launcher2.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000" with android:background="#00000000"
There are two instances in this file.
3) now SMALI CODE.
go to
\smali\com\cyanogenmod\trebuchet\
or
smali\com\android\launcher2\
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali
However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.
After deleting the method and all of its references, just compile the apk and make your flashsable zip.
I use APKTOOL and 7zip for that.
Example:
Before:
After:
Enjoy
Click to expand...
Click to collapse
Superman™
---------- Post added at 07:25 PM ---------- Previous post was at 07:24 PM ----------
THis is nice
Superman™
Simple, usefull
Thanks for the tutorial, this really helped me, that's my first time modding.
I was looking for a transparent app drawer since i turn on my phone for the very first time.
THANK YOU
From france.
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali
However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.
Click to expand...
Click to collapse
This confused me but i figured it out so i thought i might share incase others get confused as well.
To delete the method look in the Launcher.smali for a line that says ".method updateWallpaperVisibility" , delete everything after that until you get to ".end method" (make sure you delete the ".method updateWallpaperVisibility" and ".end method" line as well), to delete the references find each line that has "updateWallpaperVisibility" (using the "find in files" function in notepad++ as stated in OP) and delete the WHOLE LINE. after that recompile and sign the apk and put it into your phone
bfo12 said:
This confused me but i figured it out so i thought i might share incase others get confused as well.
To delete the method look in the Launcher.smali for a line that says ".method updateWallpaperVisibility" , delete everything after that until you get to ".end method" (make sure you delete the ".method updateWallpaperVisibility" and ".end method" line as well), to delete the references find each line that has "updateWallpaperVisibility" (using the "find in files" function in notepad++ as stated in OP) and delete the WHOLE LINE. after that recompile and sign the apk and put it into your phone
Click to expand...
Click to collapse
Deleting a method implicitly means all of it. From function header .method until .end.
I am glad you managed.
--------------------------------------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
Hey, I don't get it at all, what to do here, is this windows os or android os :S (sry for my unknowledge :/ ) , and also don't get why would I need to use a laucher.apk when I already have a launcher on my CM9, I mean I just don't get it, do I modify the apk and then install it ? :/ Could you explain it to a beginner (who knows how to flash and root ) ?
CroVeXx said:
Hey, I don't get it at all, what to do here, is this windows os or android os :S (sry for my unknowledge :/ ) , and also don't get why would I need to use a laucher.apk when I already have a launcher on my CM9, I mean I just don't get it, do I modify the apk and then install it ? :/ Could you explain it to a beginner (who knows how to flash and root ) ?
Click to expand...
Click to collapse
-APK is android related.
-CM roms use trebuchet.apk while aokp uses launcher2.apk. modding way is the same for both. So you pick up the apk related to your rom type.
-then you follow the guide and make a flashable zip to install from recovery.
--------------------------------------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
link to Trebuchet.apk
wesamothman said:
Hi Guys,
I have been asked many times how I was able to do transparent app drawer.
Description:
Transparent app drawer by definition means you can see the homescreen wallpaper whilst in app drawer instead of the default black background.
Tools needed:
1) apktool
2) notepad++
3) 7zip
Files needed: (Depending on ROM type)
1) trebuchet.apk, or
2) Launcher2.apk
Steps [HOW TO]:
1) decompile trebuchet.apk or Launcher2.apk
2) go to \res\layout\apps_customize_pane.xml
replace android:background="#ff000000" with android:background="#00000000"
There are two instances in this file.
3) now SMALI CODE.
go to
\smali\com\cyanogenmod\trebuchet\
or
smali\com\android\launcher2\
4) open Launcher.smali and delete the following method: updateWallpaperVisibility
Also delete all its references in Launcher.smali and other smali files. Usually this method is referenced in Launcher$13.smali and Launcher$17.smali and AppsCustomizePagedView.smali
However, it could be different from file to file depending on how it was built from source. Therefore, to know the file names exactly, just use notepad++ and use Search in Files feature and search for updateWallpaperVisibility in the decompiled apk samli folder. It will tell you where this method is referenced.
After deleting the method and all of its references, just compile the apk and make your flashsable zip.
I use APKTOOL and 7zip for that.
Example:
Before:
After:
Enjoy
Click to expand...
Click to collapse
Could you please paste a link to download original Trebuchet.apk, so that we can work on it? Thanks!
jago84 said:
Could you please paste a link to download original Trebuchet.apk, so that we can work on it? Thanks!
Click to expand...
Click to collapse
The original trebuchet.apk differs from rom to rom on how it was built from source. But you can get it from cm10. It is default launcher in cm10.
If you use another trebuchet from another rom of a different device, it might not work with your device.
--------------------------------------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
I get an error rebuilding apk: integer types not allowed, referred to the 00000000 value of background color...
gpvecchi said:
I get an error rebuilding apk: integer types not allowed, referred to the 00000000 value of background color...
Click to expand...
Click to collapse
This error comes if your aapt of your apktool is not referring to the correct framework. So you have to get the framework apk file from the same rom where you got the launcher or trebuchet and install it in apktool first
Apktool -f framework-res.apk and then decomplile and do your changes and then build it.
-------------------------
Omega's Team Member
-------------------------
Devices:
---------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
Ok... I don't understand the .smali part so I have done it wrong and I can't compile apk because I have edited somehow wrong the .smali files.. :/
manumanfred said:
Ok... I don't understand the .smali part so I have done it wrong and I can't compile apk because I have edited somehow wrong the .smali files.. :/
Click to expand...
Click to collapse
Use notepad++ to search for the method name i mentioned in op. Delete the method all if it and all the lines that refers to it. You have to do this in all smali files that have this reference. Use notepad++ search in files function to search for its all occurences. Or send me the apk and i will see.
-------------------------
Omega's Team Member
-------------------------
Devices:
---------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
wesamothman said:
Use notepad++ to search for the method name i mentioned in op. Delete the method all if it and all the lines that refers to it. You have to do this in all smali files that have this reference. Use notepad++ search in files function to search for its all occurences. Or send me the apk and i will see.
-------------------------
Omega's Team Member
-------------------------
Devices:
---------
GT-N7000 - Note I
GT-N7100 - Note II
GT-N8000 - Note 10.1 3G
Motorola Xoom MZ601 - UMTS EURO
Click to expand...
Click to collapse
OK Thanks! but I use Linux to decompile and recompile + sign & to zipalign apps. so I use Gedit to edit .xml, .smali and other files.
But the issue is that I don't understand .smali files at all!
I can find the lines but I don't know which is the last line which is needed to be deleted, is it from .method x to .method y or to somewhere .line xy or what... :/
manumanfred said:
OK Thanks! but I use Linux to decompile and recompile + sign & to zipalign apps. so I use Gedit to edit .xml, .smali and other files.
But the issue is that I don't understand .smali files at all!
I can find the lines but I don't know which is the last line which is needed to be deleted, is it from .method x to .method y or to somewhere .line xy or what... :/
Click to expand...
Click to collapse
Soon, i will add the code here before and after so that you can do this...
wesamothman said:
Soon, i will add the code here before and after so that you can do this...
Click to expand...
Click to collapse
OK! Thank You!
manumanfred said:
OK! Thank You!
Click to expand...
Click to collapse
OP updated with example codes deletion of .smali files content. This should be straight forward now
In case you still have issues, let me know and I will be more than glad to assist you
Thank You!
It is easier now, but Nexus Launcher's (JB 4.2.2 JDQ39) Launcher.smali doesn't have:
.method updateWallpaperVibility
When I just put updateWallpaperVibility
then it is this one: (line 3117)
Code:
invoke-virtual {p0, v0}, Lcom/android/launcher2Launcher;->updateWallpaperVisibility(Z)V
.line 2691
invoke-virtual....
So it's different..
Anyway Thanks!
manumanfred said:
Thank You!
It is easier now, but Nexus Launcher's (JB 4.2.2 JDQ39) Launcher.smali doesn't have:
.method updateWallpaperVibility
When I just put updateWallpaperVibility
then it is this one: (line 3117)
Code:
invoke-virtual {p0, v0}, Lcom/android/launcher2Launcher;->updateWallpaperVisibility(Z)V
.line 2691
invoke-virtual....
So it's different..
Anyway Thanks!
Click to expand...
Click to collapse
Aha. This is for 4.2.2 jb. Okay. Send it to me and let me see
wesamothman said:
Aha. This is for 4.2.2 jb. Okay. Send it to me and let me see
Click to expand...
Click to collapse
OK, Thanks!
Here is the stock Launcher with rotation enabled:
http://forum.xda-developers.com/showthread.php?t=2145289

[HOW-TO]{GUIDE}Get Ultra Power Saving Mode and Settings menu of S5 to S4![5.0.1]

EDIT : Guide how to port UPSM on S4 on Post #10
First of all IM not responsible if anything happens to your phone, first back it up!
This mod is tested ONLY on i9506, but you can test it on other S4 mobiles and then tell me if it works
And it works only on Stock rooted official Lollipop build
1. Download the zip file Here
2. Extract the file SecSettings.apk.
3. Use a root explorer from your mobile to move the existing Secsettings file to your sd(for backup purposes)
4. Go to /system/priv-app/SecSettings/ and move the file SecSettings.apk to /storage/extSdCard/oldsec.apk
5. Copy the new SecSettings.apk file to your sd.
6. Navigate to /storage/extSdCard and move the new SecSettings.apk to /system/priv-app/SecSettings
7. Give permissions rw--r---r---
8. Reboot device
What you get
Advanced Power saving mode with grayscale mode
All the new lockscreen settings with popping colors
And more..
What is not working
Ultra power saving mode, but i will try to port it.
Random fc on sound settings and data settings. Trying to fix them
If it fails after reboot, or want to revert back restore the original SecSettings.apk
nikosdd said:
First of all IM not responsible if anything happens to your phone, first back it up!
This mod is tested ONLY on i9506, but you can test it on other S4 mobiles and then tell me if it works
And it works only on Stock rooted official Lollipop build
1. Download the zip file Here
2. Extract the file SecSettings.apk.
3. Use a root explorer from your mobile to move the existing Secsettings file to your sd(for backup purposes)
4. Go to /system/priv-app/SecSettings/ and move the file SecSettings.apk to /storage/extSdCard/oldsec.apk
5. Copy the new SecSettings.apk file to your sd.
6. Navigate to /storage/extSdCard and move the new SecSettings.apk to /system/priv-app/SecSettings
7. Give permissions rw--r---r---
8. Reboot device
What you get
Advanced Power saving mode with grayscale mode
All the new lockscreen settings with popping colors
And more..
What is not working
Ultra power saving mode, but i will try to port it.
If it fails after reboot, restore the original SecSettings.apk
Click to expand...
Click to collapse
Thank you very much!
I am waiting for the Ultra power saving mode:good: Really awesomme if it will work.
Thank You
---------- Post added at 03:43 PM ---------- Previous post was at 02:58 PM ----------
faouz said:
Thank you very much!
I am waiting for the Ultra power saving mode:good: Really awesomme if it will work.
Thank You
Click to expand...
Click to collapse
faouz said:
Thank you very much!
I am waiting for the Ultra power saving mode:good: Really awesomme if it will work.
Thank You
---------- Post added at 03:43 PM ---------- Previous post was at 02:58 PM ----------
Click to expand...
Click to collapse
Everything is working except for the sound it is force closing
FC
Thanks, but I have 4-5 FC... on some icons in settings. And the sound its doesnt work.
If you wipe cache and change in build.prop "ro.product.name=SM-N9000" you have the settings app working after reboot.
Tried on i9506 stock.
superpulosu said:
Thanks, but I have 4-5 FC... on some icons in settings. And the sound its doesnt work.
If you wipe cache and change in build.prop "ro.product.name=SM-N9000" you have the settings app working after reboot.
Tried on i9506 stock.
Click to expand...
Click to collapse
I saw the fc later and I'm trying to fix them. Superpulosu changing product name does nothing to the fc
nikosdd said:
I saw the fc later and I'm trying to fix them. Superpulosu changing product name does nothing to the fc
Click to expand...
Click to collapse
Will this work on i9500?
I don't know. I tested it on 9506. If you can test it and write here again for the result but remember to backup your original apk file!
Ok, sorry. You right it does not change nothing if you change build.prop
I had another settings mod and its not working with your settings app.
I have FC on battery, data usage and the sound bug... Maybe you can make it work.
Thanks for your work.
Right now i've managed to port Ultra Power Saving Mode, but when i find time,i will write the procedure right here, or if anyone wants to send me his services.jar file(Please only from deodexed roms, otherwise first deodex rom and then send me the jar file otherwise it will not work), and to give you the short details how to install it. First before you send me this file, open it with winrar or 7zip and see if inside is a file named classes.dex. If not,deodex your rom, if yes send me this file and the model of the phone of course
Ultra Power Saving Mode port
Alright here is the details of how to port UPSM on lollipop rom
First, be sure that you are on a deodexed rom, otherwise search to the XDA about how to deodex your rom(its easy)
Download ApkTool (attached zip file)
Download Emergency apps(attached zip file)
Pull from your phone the services.jar located in /system/frameworks
Open the file services.jar with 7zip or winrar and extract the file classes.dex to the root of apktool
Drag and drop the classes.dex to the cmd file Quick-Baksmali.cmd
Wait for it to finish
Open the newly created folder Classout and go to classout\com\android\server
Open with notepad++ or other text editor the file SystemServer.smali
Search with the keyword "emergency" and you will find 1 result.
Delete the following result starting from - and ending to ...
Code:
.method static final startEmergencyModeService(Landroid/content/Context;)V
.
.
.
.end method
Now add right here this code
Code:
.method static final startEmergencyModeService(Landroid/content/Context;)V
.registers 6
.parameter "context"
.prologue
.line 2194
:try_start_0
invoke-static {p0}, Lcom/sec/android/emergencymode/EmergencyManager;->getInstance(Landroid/content/Context;)Lcom/sec/android/emergencymode/EmergencyManager;
move-result-object v1
.line 2195
.local v1, emMgr:Lcom/sec/android/emergencymode/EmergencyManager;
invoke-virtual {v1}, Lcom/sec/android/emergencymode/EmergencyManager;->readyEmergencyMode()V
:try_end_7
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_7} :catch_8
.line 2200
.end local v1 #emMgr:Lcom/sec/android/emergencymode/EmergencyManager;
:goto_7
return-void
.line 2196
:catch_8
move-exception v0
.line 2197
.local v0, e:Ljava/lang/Exception;
const-string v2, "SystemServer"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Starting emergency service failed: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_7
.end method
Save this file, and drag n drop the hole folder Classout to the cmd file Quick-Smali.cmd
It will generate a new file named new-classes.dex
Open again services.jar with 7zip or winrar, delete the classes.dex file and insert this newly created dex file, rename it classes.dex and push this file to the device, overwriting the stock services.jar file
DO NOT forget to set permissions rw-r--r--
Copy all the files in the 1st attached zip to /system/apps/ and set the appropriate permissions
After this, you will be able to enable UPSM from the settings mod in post #1 and you can also add it to notification bar with SQLite editor
To do this you must go to settings storage,settings.DB,system and search for notification
Edit the following "notification_panel_active_app_list_for_reset" ,and after the last semicolon( add this
Code:
UltraPowerSaving;
Go to notification settings and restore the buttons and the U.Power saving button will appear
Reboot and everything will work if you followed the whole procedure right
What is not working
While in UPSM, you may not hear voice during a call. Trying to fix it. Stay on for an update
As for the Fc from the settings apk, im testing to see if it will work if i change and the settingsstorage and for now it looks stable.
what you actually did for grid menu ? can you share guide?
Any screenshots to the this new guide?
jagnik said:
what you actually did for grid menu ? can you share guide?
Click to expand...
Click to collapse
You mean for the settings apk?
michaelbelachev said:
Any screenshots to the this new guide?
Click to expand...
Click to collapse
Screenshots about how to install the new secsettings.apk or how to port UPSM? Im afraid that in every model of device, the services.jar is a bit different and the screenshots wont be correct.
nikosdd said:
EDIT : Guide how to port UPSM on S4 on Post #10
First of all IM not responsible if anything happens to your phone, first back it up!
This mod is tested ONLY on i9506, but you can test it on other S4 mobiles and then tell me if it works
And it works only on Stock rooted official Lollipop build
1. Download the zip file Here
2. Extract the file SecSettings.apk.
3. Use a root explorer from your mobile to move the existing Secsettings file to your sd(for backup purposes)
4. Go to /system/priv-app/SecSettings/ and move the file SecSettings.apk to /storage/extSdCard/oldsec.apk
5. Copy the new SecSettings.apk file to your sd.
6. Navigate to /storage/extSdCard and move the new SecSettings.apk to /system/priv-app/SecSettings
7. Give permissions rw--r---r---
8. Reboot device
What you get
Advanced Power saving mode with grayscale mode
All the new lockscreen settings with popping colors
And more..
What is not working
Ultra power saving mode, but i will try to port it.
If it fails after reboot, restore the original SecSettings.apk
Click to expand...
Click to collapse
Please create how to mod SecSettings.apk
Y3dx said:
Please create how to mod SecSettings.apk
Click to expand...
Click to collapse
Hello
You don't mod the secsettings file, you just change it with the file I give you to download. First remember to take a backup at your SD, or even better a nandroid backup. As I've mentioned it has some bugs and due to exams I don't have the required time to fix them in short time but I'm trying
Thanks for your great work. Any news about the FC in the settings app?
Problem solve!!!!!!!!!
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk
setting fc fixed...........
Upsm_fix_v2
flash with cwm......
antugoogly said:
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk
setting fc fixed...........
Upsm_fix_v2
flash with cwm......
Click to expand...
Click to collapse
what problem you actually fixed? Because S health is irrelevant to Settings ui and Ultra power saving mode(i guess so)
antugoogly said:
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk
setting fc fixed...........
Upsm_fix_v2
flash with cwm......
Click to expand...
Click to collapse
antugoogly said:
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk
setting fc fixed...........
Upsm_fix_v2
flash with cwm......
Click to expand...
Click to collapse
UPSM fix 2 is perfect but...
It's force close in lock screen widgets
{
"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"
}

Categories

Resources