/system/customize/MNS/default.xml - Android

Code:
<set name="plenty">
[B] [U]<!--4b7f5274-5658-4f5a-bcba-10167ab5d89f-->[/U][/B]
<item name="package">com.htc.calendar</item>
<item name="class">com.htc.calendar.LaunchActivity</item>
<item name="screen">2</item>
<item name="x">3</item>
<item name="y">2</item>
<item name="itemtype">0</item>
</set>
At the risk of sounding like a complete noob, what is that bolded/underlined part in the snippet above?
I'm editing the default widgets/shortcuts for my latest release of ZenEXP - something I haven't done previously - and the ones I add do not work, probably because they don't include that snippet above.. so, on top of needing to know what that is, how do I find it or create it for widgets/shortcuts I want to add to the default.xml?
TIA!

Also looking to understand default "config" settings
I echo the same questions posted by .mak and have been trying to find wich of the default.xml files are used in the defaul screen layouts...
Basically I am looking to understand the file tree structure and WHERE each of the important "config" files are located, WHAT they control, and WHEN they are read by the applications... Dr. Google has not been able to provide me with much (e.g. I am searching on things like: "android /system/customize/default.xml file use"); so I was hoping someone could point me in the right direction.
I have found that the /system/customize/CID/default.xml has the settings for the setup wizard...
Thanks!

zach.xtr said:
I echo the same questions posted by .mak and have been trying to find wich of the default.xml files are used in the defaul screen layouts...
Basically I am looking to understand the file tree structure and WHERE each of the important "config" files are located, WHAT they control, and WHEN they are read by the applications... Dr. Google has not been able to provide me with much (e.g. I am searching on things like: "android /system/customize/default.xml file use"); so I was hoping someone could point me in the right direction.
I have found that the /system/customize/CID/default.xml has the settings for the setup wizard...
Thanks!
Click to expand...
Click to collapse
I've, since posting this, found that default settings for homescreen layout, browser, mms and a few other things is in /system/customize/MNS/default.xml

.mak said:
I've, since posting this, found that default settings for homescreen layout, browser, mms and a few other things is in /system/customize/MNS/default.xml
Click to expand...
Click to collapse
I have tried modifying these and it did not change the settings when I first flash... is there something more that I must do? I am using Ivans official ROM as base and have removed the rosi (sense home screen) and want to default shortcut, widgets, etc on the native Launcher app...
Thanks!

zach.xtr said:
I have tried modifying these and it did not change the settings when I first flash... is there something more that I must do? I am using Ivans official ROM as base and have removed the rosi (sense home screen) and want to default shortcut, widgets, etc on the native Launcher app...
Thanks!
Click to expand...
Click to collapse
I am having the same issue. If anyone knows private message me.

try editing the launcher module in the \customize\MNS\default.xml. you have to note though that depending on the ROM you are modifying the launcher.apk file may need to be changed. a great example to use is the JacHeroSki2.7.4. once you go to the above file you're most likely to find the file you need to make changes to.

If you want to change a native's launcher default settings , you have to modify default_workspace.xml, every launcher has it. (cfr. Launcher Pro, ADW Launcher,..)

Related

[Q] Change default values in settings for android rom

Hi Everyone!
I'm starting to make my own android roms and i was wondering if it was possible to change the default android settings you get when you flash a rom. For example, when you first boot, animations are already turned on and orientation is turned off (unchecked) by default.
I've got an .apk manager so i've had a feeble attempt at going through .xml files in the decompiled Settings.apk. "res/xml/sound_and_display_settings.xml" had the most potential but i couldn't see any "enable/disable" options.
Thanks to Everyone in advance. Any feedback is welcome, even if it's not the answer- it could still help!
Uuuuuuuuupppppppppppp?
Bump.
Bump.
bit of a delay with replying here but if you are still interested, you can use apk manager to unpack and decode the settings app, then go into the xml directory that appears (there will be quite a few but you just want the one called xml) and edit the xml files. Settings are there for you to tweak
Even i asked same question and no reply till now...
May be there are no devs left on xda or they ignore q/a section or ignore our questions because they don't know it or maybe they don't even read it as they think we are noob and they are god of Android development...
Damn..
Sent from my GT-S7500 using xda premium
If you are building from sources, then you can overlay these files :
Code:
packages/apps/Settings/res/values/strings.xml
frameworks/base/core/res/res/values/config.xml
These contains most default settings values afaik, hope it helps.
Good luck
How would I go about creating an overlay in the source please?
Little-Boy-Lost said:
How would I go about creating an overlay in the source please?
Click to expand...
Click to collapse
Here overlay means "change the values".
Here's an example, let's say you want to disable screen rotation by default.This is a sample from cm10's framework/base/core/res/res/values/config.xml :
Code:
<!-- If this is true, key chords can be used to take a screenshot on the device. -->
<bool name="config_enableScreenshotChord">true</bool>
<!-- If true, the screen can be rotated via the accelerometer in all 4
rotations as the default behavior. -->
<bool name="config_allowAllRotations">true</bool>
<!-- If true, the direction rotation is applied to get to an application's requested
orientation is reversed. Normally, the model is that landscape is
clockwise from portrait; thus on a portrait device an app requesting
landscape will cause a clockwise rotation, and on a landscape device an
app requesting portrait will cause a counter-clockwise rotation. Setting
true here reverses that logic. -->
<bool name="config_reverseDefaultRotation">false</bool>
<!-- The number of degrees to rotate the display when the keyboard is open.
A value of -1 means no change in orientation by default. -->
<integer name="config_lidOpenRotation">-1</integer>
So you're going to change this line's value to false :
Code:
<!-- If true, the screen can be rotated via the accelerometer in all 4
rotations as the default behavior. -->
<bool name="config_allowAllRotations">true</bool>
Like this :
Code:
<!-- If true, the screen can be rotated via the accelerometer in all 4
rotations as the default behavior. -->
<bool name="config_allowAllRotations">false</bool>
Then, when you will compile the sources, rotation will be enabled in all 4 ways by default in the resulting rom.
Thank
So I create framework/base/core/res/res/values/config.xml in the device overlay folder and it will change settings during build?
I tried altering some settings by modifying the original files and it didn't seem to have any effect. Maybe I needed the overlay version instead
Is the theme changer in there to so I can change the theme to the one I want in the rom..??
---------- Post added at 01:27 PM ---------- Previous post was at 01:22 PM ----------
Androguide.fr said:
Here overlay means "change the values".
Here's an example, let's say you want to disable screen rotation by default.This is a sample from cm10's framework/base/core/res/res/values/config.xml :
Code:
<!-- If this is true, key chords can be used to take a screenshot on the device. -->
<bool name="config_enableScreenshotChord">true</bool>
<!-- If true, the screen can be rotated via the accelerometer in all 4
rotations as the default behavior. -->
<bool name="config_allowAllRotations">true</bool>
<!-- If true, the direction rotation is applied to get to an application's requested
orientation is reversed. Normally, the model is that landscape is
clockwise from portrait; thus on a portrait device an app requesting
landscape will cause a clockwise rotation, and on a landscape device an
app requesting portrait will cause a counter-clockwise rotation. Setting
true here reverses that logic. -->
<bool name="config_reverseDefaultRotation">false</bool>
<!-- The number of degrees to rotate the display when the keyboard is open.
A value of -1 means no change in orientation by default. -->
<integer name="config_lidOpenRotation">-1</integer>
So you're going to change this line's value to false :
Code:
<!-- If true, the screen can be rotated via the accelerometer in all 4
rotations as the default behavior. -->
<bool name="config_allowAllRotations">true</bool>
Like this :
Code:
<!-- If true, the screen can be rotated via the accelerometer in all 4
rotations as the default behavior. -->
<bool name="config_allowAllRotations">false</bool>
Then, when you will compile the sources, rotation will be enabled in all 4 ways by default in the resulting rom.
Click to expand...
Click to collapse
When you unzip the apk file how do you zip it back up does it need a special app to do it with..?
What is the best editor to edit the xml file or any other file in the rom...how about Notepad++..?
Can someone please answer this ASAP..?
spannernick said:
What is the best editor to edit the xml file or any other file in the rom...how about Notepad++..?
Can someone please answer this ASAP..?
Click to expand...
Click to collapse
Note pad++ is the best
~~~~~~~~~~~~~~~~~~~~~
Samsung galaxy s2
Rom: Jedi knight 6
kernel: Jedi kernel 2
~~~~~~~~~~~~~~~~~~~~~
And you thought celebrities weren't smart! =P
spannernick said:
Is the theme changer in there to so I can change the theme to the one I want in the rom..??
When you unzip the apk file how do you zip it back up does it need a special app to do it with..?
Click to expand...
Click to collapse
You can edit the build.prop file and change the default theme chooser theme value it's one of the properties toward the bottom of the build.prop file. Make sure to copy the theme chooser theme apk you want to be default in the ROM's /system/app folder. You need to use an apk decompiler such as apktool to (http://code.google.com/p/android-apktool/) decompile the apk file, then after you make the changes you want to make recompile the apk using the same program you used to decompile the apk. If it's not a system app you will need to sign it with "Zip Signer" it works with apk files to (https://www.dropbox.com/s/mldk52ba1u1o6ty/zip signer.apk). If it is a system app I would recommend looking at this guide http://forum.xda-developers.com/showpost.php?p=24986373&postcount=9. Let me know if you still have questions .
Sent from my SCH-I535 using xda premium
shimp208 said:
You can edit the build.prop file and change the default theme chooser theme value it's one of the properties toward the bottom of the build.prop file. Make sure to copy the theme chooser theme apk you want to be default in the ROM's /system/app folder. You need to use an apk decompiler such as apktool to (http://code.google.com/p/android-apktool/) decompile the apk file, then after you make the changes you want to make recompile the apk using the same program you used to decompile the apk. If it's not a system app you will need to sign it with "Zip Signer" it works with apk files to (https://www.dropbox.com/s/mldk52ba1u1o6ty/zip signer.apk). If it is a system app I would recommend looking at this guide http://forum.xda-developers.com/showpost.php?p=24986373&postcount=9. Let me know if you still have questions .
Sent from my SCH-I535 using xda premium
Click to expand...
Click to collapse
I have looked in the build.prop file and I can't see anything about changing the theme,Do I need to add the line..?
spannernick said:
I have looked in the build.prop file and I can't see anything about changing the theme,Do I need to add the line..?
Click to expand...
Click to collapse
On older versions of Cyanogenmod there used to be these lines in the build.prop:
Code:
persist.sys.themeId=Cyanbread
persist.sys.themePackageName=com.tmobile.theme.Cyanbread
Where persist.sys.themeId is the name of the theme you want to set as default, and persist.sys.themePackageName is the package name of the theme you want to set as default. You could try adding those lines to the build.prop and see what happens, if that doesn't work you could always extract the image's from the theme chooser theme you want to use and then decompile the framework-res.apk and systemui.apk and replace the images in those two apk files with the ones from the theme chooser theme you want to use, then replace the modified framework-res.apk and systemui.apk files with the default framework-res.apk and systemui.apk files in the ROM. Now when the user uses your ROM for the first time they will see the modified theme you wanted rather then the previous default theme.
Can you copy the settings from your phone,after you changed them the way you want them(on cm10)..?
BUMP....???
spannernick said:
Can you copy the settings from your phone,after you changed them the way you want them(on cm10)..?
Click to expand...
Click to collapse
I have only done this on CM7 for CM10 you can try adding these lines on CM10 on CM7 here is what I changed in the build.prop:
From:
Code:
persist.sys.themeId=Cyanbread
persist.sys.themePackageName=com.tmobile.theme.Cyanbread
To:
Code:
persist.sys.themeId=Androidian
persist.sys.themePackageName=com.tmobile.theme.Androidian
Then I made sure that the Androidian.apk file was located in the system\app folder. This should work for CM10 as long as the lines "persist.sys.themeId=" and "persist.sys.themePackageName=" are added to the build.prop.

[GUIDE][MOD] Transparent Background of Arc System App

Hello,
I had asked how to make the background of System App transparent a couple of weeks ago here.
But Nobody can answer the way what exactly I want to do so I finally figure out how to make the background of System App transparent~~
This is including for Phone, Contacts, Messaging, Settings, Music, Alarms, Email, Calendar, Calculator, Sync, Media Server, Clock, Media Discovery, Setup Guide.
This is not including for Timescape, TrackID, Support.. I'm still investigating and will update for this...
It's actually not make the background of System app transparent.... show the wallpaper in the background of System app.
So if you change wallpaper, the background of System app also can be changed to your wallpaper~~~
When I modified style.xml just for the transparency, it's so confusing because the other app behind of System app.
This is based on Rooted LT15i 3.0.1.A.0.145 O2 so working for 145 based Rom. But I'm not sure it's working for LT15i_3.0.A.2.181 Rom.
--------------------------------------------------------------------------------------------------------
[GUIDE HOW TO]
I add the guide which xml and png is modified so it will be helpful for someone who use the other version ROM.
It's so simple if you already know how to inherit from the other in android.
For framework-res.apk, first of all decompile framework-res.apk
Step 1 : In \res\values\style.xml
Change this :
Code:
<style name="SEMCTheme" parent="@style/Theme">
to
Code:
<style name="SEMCTheme" parent="@style/Theme.Wallpaper">
Save and close
Step 2 : In \res\drawable-hdpi-v4\semc_bg.png
Open with photoshop and make semc_bg.png transparent
Step 3 : Compile framework-res.apk
For SemcGenericUxpRes.apk, first of all decompile SemcGenericUxpRes.apk
Step 1 : In \res\values\style.xml
Change this :
Code:
<style name="SEMCTheme" parent="@android:style/Theme">
to
Code:
<style name="SEMCTheme" parent="@android:style/Theme.Wallpaper">
Save and close
Step 2 : In \res\drawable-hdpi-v4\semc_bg.png and \res\drawable-land-hdpi-v4\semc_bg.png
Open with photoshop and make semc_bg.png transparent
Step 3 : Compile SemcGenericUxpRes.apk
For FBMediaDiscovery.apk, first of all decompile FBMediaDiscovery.apk
Step 1 : In \res\values\style.xml
Change this :
Code:
<style name="MediaUpdatesTheme" parent="@android:style/Theme">
to
Code:
<style name="MediaUpdatesTheme" parent="@android:style/Theme.Wallpaper">
Save and close
Step 2 : In \res\drawable-hdpi-v4\semc_bg.png
Open with photoshop and make semc_bg.png transparent
Step 3 : Compile FBMediaDiscovery.apk
--------------------------------------------------------------------------------------------------------
Please see the attached apk files.
Framework-res.apk and SemcGenericUxpRes.apk is for System Apps and should push under /system/framework/
FBMediaDiscovery.apk is for Media Discovery in 145 based rom and should push under /system/app
Looks good, I'll test it out when I get home.
hi rleon...
...thank you so much dude, i've been waiting for this mod everything works perfectly fine....i have just one small request: could you possibly include the CRT screen off animation, or the reboot options mod?
That's what has just come to my mind, it'd be great if you could include those....if not, it's actually awesome anyway
Great~ everything works fine for you...
As I know, CRT Screen off animation and reboot option already exists in the other thread...
If you wanna just one framework-res.apk file including all things, I will try but I'm not sure~~
Please give me a time~~
Hi rleon,
Could you please give a detailed list of items / files / folders you changed or altered?
I'm trying to make the system backgrounds invisible aswell however it seems folders have different names in .181
Thanks for the hard work tho!
For framework-res.apk and SemcGenericUxpRes.apk, 181 Rom is same.
framework-res.apk and SemcGenericUxpRes.apk should be located in the same folder which is under /system/framework/ so you can push these files under /system/framework/
And FBMediaDiscovery.apk is just for 145 based Rom so it may not be there in 181 Rom.
Please check whether there is FBMediaDiscovery.apk under /system/app ro not.
If not, you cannot push this file.
Hmm just tried to install them.. however I got a bootloop.
Anything special I should do while copying the files?
I think your 181 rom is different so it cannot be applied this apks.
I just compiled for 145 based rom...
I will update how to modify style.xml later so you can modify and compile for your 181 based rom by yourself....
That would be awesome, looking forward to it
I did a noob mistake and put it on my phone (3.0.1 UK) and now i can't change my wallpaper at all =\
can anybody upload me the original files for my firmware please???
This is good! My homedock, status bar and notification is already transparent and now I just added this too. Cool!
Sent from my LT15i using XDA Premium App
Is it Build 3.0.1.A.0.145 UK?? It should be working...
Currently my rom also Build 3.0.1.A.0.145 UK......
Thanks a lot for the guide! :-D
// Edit
However there doesnt seem to be a style.xml in my version hmmm interesting ;p!
meidan95 said:
I did a noob mistake and put it on my phone (3.0.1 UK) and now i can't change my wallpaper at all =\
can anybody upload me the original files for my firmware please???
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1052067
Damorisio said:
http://forum.xda-developers.com/showthread.php?t=1052067
Click to expand...
Click to collapse
sorry if it's a stupid question but what am I need to do with this link?
where did you find the "value" folder inside the res folder, i cant find it anywhere..Trying to edit it myself so that i can retain the crt sreen off as well as the reboot option.
Can't even find the value folder much less the style.xml
Sent from my LT15i using XDA Premium App
Since I changed my rom to HK 145 rom, I applied your work to my arc. It looked good and nice and worked very well. Great job. Thank you very much.
I followed the instructions for framework-res.apk and got a bootloop.
Couldn't even decompile SemcGenericUxpRes.apk, I got error messages.
I don't suppose anyone might have any idea why?
Is it possible to have it as a solid black background?
and does this work on Xperia Play?

[Q] Changing Default Launcher in CM7 source

I am trying to change the default launcher in CM7 to something such as Launcher7.
I tried to remove both the Launcher2 folder as well as ADWLauncher folder and add the Launcher7 source in /packages/apps but CM7 during build seems to add ADW back into the build so that when I flash it to my device, ADW is still default and installed.
Any advice? Is there some xml file or makefile which seems to set or be referencing ADW?
This is all for my Nexus One btw.
If you delete the launchers that are located in system/app om the ROM ZIP and put the apk of the launcher you want in system/app then it should work fine. I always do that for myself, replacing ADW for Launcher Pro,
Yeah I got it now after a fresh build. Apparently, I was messing with the package names and performing custom modifications and I didnt roll back the changes so when I tried building, it caused all kinds of problems. *facepalm*
Additionally, The changes I am making are all in source, not after ROM compilation so for me the changes were in /packages/apps not /system/app. I am trying not to edit the ROM after building as a good learning experience and its a cleaner solution too.
Smh, Thanks for the reply though. Appreciate it.
If you add in another launcher(also add it to PRODUCT_PACKAGES in device), you'll get a prompt on boot, and you may be able to edit default settings via overlay to use some other launcher as default
and what must be done inorder to add the launcher pro(any launcher) preferences to the settings, like we have the adw settings in the default android settings!!!! Please help...
To change it from source just change PRODUCT_PACKAGES (in common.mk) for AdwLauncher to your launcher name.
https://github.com/CyanogenMod/android_vendor_cyanogen/blob/gingerbread/products/common.mk
To find your product name from your own launcher from source just look for your local package name in Android.mk.
example for Adw:
https://github.com/CyanogenMod/android_packages_apps_ADWLauncher/blob/gingerbread/Android.mk
To add a custom launcher in Settings.apk
https://github.com/CyanogenMod/andr...rbread/src/com/android/settings/Settings.java
line 76 in that file change "com.android.launcher.Launcher" to whatever main activity is there for your new launcher.
also in settings.xml
Code:
<!-- Launcher -->
<com.android.settings.IconPreferenceScreen
settings:icon="@drawable/ic_settings_launcher"
android:title="@string/launcher_settings_title"
android:key="launcher_settings">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="com.android.launcher"
android:targetClass="com.android.launcher.MyLauncherSettings" />
</com.android.settings.IconPreferenceScreen>
Change the "android:targetClass="com.android.launcher.MyLauncherSettings" to your settings class on the launcher. After you compile you should now have a customer launcher available in settings.
lithid-cm said:
To change it from source just change PRODUCT_PACKAGES (in common.mk) for AdwLauncher to your launcher name.
https://github.com/CyanogenMod/android_vendor_cyanogen/blob/gingerbread/products/common.mk
To find your product name from your own launcher from source just look for your local package name in Android.mk.
example for Adw:
https://github.com/CyanogenMod/android_packages_apps_ADWLauncher/blob/gingerbread/Android.mk
To add a custom launcher in Settings.apk
https://github.com/CyanogenMod/andr...rbread/src/com/android/settings/Settings.java
line 76 in that file change "com.android.launcher.Launcher" to whatever main activity is there for your new launcher.
also in settings.xml
Code:
<!-- Launcher -->
<com.android.settings.IconPreferenceScreen
settings:icon="@drawable/ic_settings_launcher"
android:title="@string/launcher_settings_title"
android:key="launcher_settings">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="com.android.launcher"
android:targetClass="com.android.launcher.MyLauncherSettings" />
</com.android.settings.IconPreferenceScreen>
Change the "android:targetClass="com.android.launcher.MyLauncherSettings" to your settings class on the launcher. After you compile you should now have a customer launcher available in settings.
Click to expand...
Click to collapse
Can you tell me where is the PRODUCT_PACKAGE
thank you ~

[Q] [Advanced question] Editing framework

I'm recently trying to edit my framework with this mod
http://forum.xda-developers.com/show....php?t=1916094
Well actually the steps in that thread are very simple, but since I'm trying to apply that to my Xperia Ray so it must have slightly different steps
What I want to ask :
- In framework/res, I found drawable-.........( mdpi,hdmpi,ldpi,etc.). If I'm going to replace the .9png's picture in there, should I make the picture as same as the original picture dimension? I'm using Dev-Drawable app in the Play Store ( it makes picture to drawable- hdpi,mdpi,etc. ), the result of using it is it gives me the mdpi version of the picture but with different dimesion from the original picture.
- I found errors and it says that I have errors in the /res/values/public.xml
I found this :
Code:
Don't do that! I think I should explain the purpose of public.xml file in the project wiki, because many people are confused. Note that you don't need this file when you build an apk from sources and apktool building mechanisms are very similar, so guess what: you could remove this file from decoded application and apktool will rebuild it without any problems. I had a reason why to generate public.xml - it's a feature, not a bug!
Well, the reason is: there may be references to resources in the application code. If resources ids will change after build, then code will reference different resources than in original apk. public.xml file gives us sureness that resources will get same ids after build - it's the only one reason to use this file. And you want to manually modify these ids
Adding or removing new resources is somewhat tricky. Yeah, I should write about that in the wiki.
You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code.
There is never much sense in modifying ids in public.xml, because then modified lines lose their purpose.
If you want to add new resources, e.g. drawables and use them in the XML files you don't have to change anything in the public.xml file.
If you want to add new resources and use them in your code, then you have to add them into public.xml, because you need to reference them somehow. Or you could use Resources.getIdentifier() method, but this is ugly.
And now the most tricky part: if you want to remove some resources, you have to remove info about them from public.xml as well. So first you have to be sure that they aren't referenced in the code. But there is also this "hole" problem, so:
If these resources are at the end of ids stack, then there is no problem.
If resources are near the end of ids stack and you are sure, that all resources after them aren't referenced in the code as well, then you could just remove them all. Actually you have did virtually the same, cause after modifying ids you made these lines totally useless, you broke them, so you could just remove them.
If you want to remove some resources, but add same or greater quantity of new ones (of the same type), then there is no problem - new resources will automatically fill in "holes" in ids. You don't have to add them to public.xml .
If none of above conditions are met, then you have holes and you have to fill them by something. But you don't have to add "useless .pngs" - just add:
Code:
<item type="drawable" name="DUMMY1" />
<item type="drawable" name="DUMMY2" />
<item type="drawable" name="DUMMY3" />
...
Like above, you don't have to add these resources to the public.xml .
And because I'm a newbie I don't really get what that mean. So I just delete the files that I'm going to replace and I can re-compile the framework, but I got bootloop, LOL.
I confused about :
1."You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code."
What are the "holes" and " referenced in the code" mean?
2. Because I want to add .png's picture to the drawable-mdpi folder, Do I need to add dummies to the public.xml ?
3. I'm using the tricky signing method ( open archive in the original framework, copy meta-inf & android manifest and replace those files to the modded framework). Is this cause me an error?
Help me mateee
Why do you post this thread 2 times?
mihahn said:
Why do you post this thread 2 times?
Click to expand...
Click to collapse
Cause no one reply & help meee:crying:
RivaultUser said:
What I want to ask :
- In framework/res, I found drawable-.........( mdpi,hdmpi,ldpi,etc.). If I'm going to replace the .9png's picture in there, should I make the picture as same as the original picture dimension? I'm using Dev-Drawable app in the Play Store ( it makes picture to drawable- hdpi,mdpi,etc. ), the result of using it is it gives me the mdpi version of the picture but with different dimesion from the original picture.
Click to expand...
Click to collapse
It's best to keep the original dimensions yes although not essential, but some images will look strange if not.
RivaultUser said:
- I found errors and it says that I have errors in the /res/values/public.xml
I found this :
Code:
Don't do that! I think I should explain the purpose of public.xml file in the project wiki, because many people are confused. Note that you don't need this file when you build an apk from sources and apktool building mechanisms are very similar, so guess what: you could remove this file from decoded application and apktool will rebuild it without any problems. I had a reason why to generate public.xml - it's a feature, not a bug!...
I confused about :
1."You could remove any line from public.xml (even making a "hole" in the ids) at any moment, but you must be sure, that resource isn't referenced in the code."
What are the "holes" and " referenced in the code" mean?
Click to expand...
Click to collapse
It means you can remove lines so long as they don't point to anything in the drawables folder for example.
RivaultUser said:
2. Because I want to add .png's picture to the drawable-mdpi folder, Do I need to add dummies to the public.xml ?
Click to expand...
Click to collapse
No.
RivaultUser said:
3. I'm using the tricky signing method ( open archive in the original framework, copy meta-inf & android manifest and replace those files to the modded framework). Is this cause me an error?
Click to expand...
Click to collapse
No. If you're doing it like in my guide you should be fine. Re read the bold quoted text above.

[Q] [SlimBean 4.3] Add own Battery Icons to Settings

Hi,
I flashed the Sabermod version of SlimBean a few days ago. It is awesome, but there was one thing bothering me: None of the Icons you can choose (in Settings -> Interface -> Statusbar -> Battery Icon Style) pleased me. So I wanted to add other Icons to the menu. So I extracted the frameworks-res.apk, Settings.apk, SystemUI.apk and some more files and searched where this menu gets it's themes. The only thing I found after hours of investigating are the Icons you get, when you just select Icon in the Settings. I replaced those with my own and it worked, but I have two problems with this.
1. The default Icon does not support 1% steps (which the other selectable Icons do)
2. It doesn't complie with the idea behind this menu
Does anyone know how this menu works and where I can add my ressources? Or at least where the other options in the menu are stored? I searched the whole Rom by now. :crying:
Cheers,
Darky
PS: This was supposed to go in the developer thread for this Rom, but as a new user I could not post there :/ .
I'm not sure how to change it to *exactly* the icon you want (custom icons), I've never done it. What you can do is look in the themes and apps section, there's mods to flash a different battery icon. Should be plenty which are compatible.
Sent from a galaxy far, far away
I just found it in the source code:
github.com/SlimRoms/frameworks_base/blob/8c3428ebc393c112bef6ff3ab845ab61942de784/packages/SystemUI/src/com/android/systemui/statusbar/policy/CircleBattery.java
Unfortunately it's hardcoded. In the same package is a BatteryBarController.java which holds constants for each of the options. So without modifying and recompiling/flashing the whole Rom it is not possible as far as I understand it.
I will try one of these BatteryMods to get the 1% steps and modify SystemUI.
Edit: I just modified the SystemUI.apk myself to get the 1% steps. The files to modify are in /res/drawable: stat_sys_battery.xml and stat_sys_battery_charge.xml.
It is enough to just add steps from 0 to 100 in those files and add the images under res/drawable-hdpi.
The input can be produced easily with a pythonscript like this.
Code:
#!/usr/bin/env python3.3
def main():
for i in range(101):
#for stat_sys_battery.xml remove 'sys_battery_charge_anim'
print (' <item android:drawable="@drawable/stat_sys_battery_charge_anim',i,'" android:maxLevel="',i,'" />',sep='')
if __name__ == "__main__":
main()
Cheers,
Darky

Categories

Resources