Related
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.
Fellow Android chefs, I need some help.
Up to Android 4.1.2 you could easily change the Settings background by replacing the framework-res/res/drawable-nodpi/background_holo_dark.png. This png was also responsible for background in SystemUI, Mms and some other apps.
From Android 4.2.0 Google changed this behavior. They've hardcoded it in the /framework-res/red/drawable/background_holo_dark.xml and have moved from png resource to color - gradient or solid.
This is the content of background_holo_dark.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#ff000000" android:endColor="#ff272d33" android:angle="270.0" />
</shape>
I have a problem reverting this change back to the pre-4.2.0 behavior, means - I want to use the background_holo_dark.png instead of the coded color in the xml.
Any thoughts?
Are images referable in xml files?
I know nothing of ROM development, I'll try not to be nuisance, but here goes...
Can you store the .png you want to use somewhere suitable, and then refer to it in the /framework-res/red/drawable/background_holo_dark.xml file?
for example (pseudo code, n00b remember )
Code:
<image = /where/ever/the/image/is/stored.png
</image>
Hope this helps (at least a bit)
Thanks for the reply. Yes, I know that I need to point in the xml to the png, but I don't know the right format that's xml expecting.
brainmaster said:
Thanks for the reply. Yes, I know that I need to point in the xml to the png, but I don't know the right format that's xml expecting.
Click to expand...
Click to collapse
Oh, I see. Sorry I couldn't've been of more help.
---edit---
Wait a moment, I confess I don't think I read your Q properly: I didn't realise it was coded into framework-res.apk, I assumed it was contained within Settings.apk .
HTCDreamOn said:
Oh, I see. Sorry I couldn't've been of more help.
Click to expand...
Click to collapse
No problem. I appreciate the effort.
Sorry for intruding but take a look here. See the last part of post 36. If you still don't get it, just PM Uber.
http://forum.xda-developers.com/showpost.php?p=36079807&postcount=36
Sent from my Nexus 7
veeman said:
Sorry for intruding but take a look here. See the last part of post 36. If you still don't get it, just PM Uber.
http://forum.xda-developers.com/showpost.php?p=36079807&postcount=36
Sent from my Nexus 7
Click to expand...
Click to collapse
Thanks, gonna take a look.
The next question would be - how can i delete xml through the VRTheme System?
Hello friend, this is my first post after years of just being a silent reader ... I finally decided to create an account on this forum.
Now I want to ask, what's the name of the action bar and the 9patch.png name of this image number one in attachment below
then these two objects below on image number two marked with arrows
and one more question about this editing contact page that I can't figure it out how to change its background instead of holo white, any other pages was changed except this one, where is the damn layout xml for this thing?
help from my friends here will be greatly appreciated and I would be grateful
C.E.R.N said:
Hello friend, this is my first post after years of just being a silent reader ... I finally decided to create an account on this forum.
Now I want to ask, what's the name of the action bar and the 9patch.png name of this image number one in attachment below
then these two objects below on image number two marked with arrows
and one more question about this editing contact page that I can't figure it out how to change its background instead of holo white, any other pages was changed except this one, where is the damn layout xml for this thing?
help from my friends here will be greatly appreciated and I would be grateful
Click to expand...
Click to collapse
Welcome new XDA participant
I don't write down all png files I have modified and I don't have access to my theme right now but here are some clues:
1st screenshot: it's in framework-res.apk and check .9.png called "***bottom***" There aren't so much .9.png called like that.
2nd screenshot: it should be located into the Contacts.apk and there isn't a lot of .9.png files.
3rd screenshot: there's a .xml file into /res/drawable/ of Contacts.apk for the background.
Primokorn said:
Welcome new XDA participant
I don't write down all png files I have modified and I don't have access to my theme right now but here are some clues:
1st screenshot: it's in framework-res.apk and check .9.png called "***bottom***" There aren't so much .9.png called like that.
2nd screenshot: it should be located into the Contacts.apk and there isn't a lot of .9.png files.
3rd screenshot: there's a .xml file into /res/drawable/ of Contacts.apk for the background.
Click to expand...
Click to collapse
Okay, I will check all *bottom 9.png
And about the .xml can you give me any other clue?
C.E.R.N said:
Okay, I will check all *bottom 9.png
And about the .xml can you give me any other clue?
Click to expand...
Click to collapse
Check the color of "background_dial_holo_dark"
Primokorn said:
Check the color of "background_dial_holo_dark"
Click to expand...
Click to collapse
the value of "background_dial_holo_dark" refer to an .png image, I was replace this with my own .png image, or maybe it is "primary background color" ? in the folder values/colors/color.xml there is an code <color name="background_primary">#ffffffff</color> but I haven't change it yet.
I want to make half transparent effect on the background that shows my current wallpaper instead, if it's possible.
Would you mind to check my res folder if you're not busy, in the attachment...
C.E.R.N said:
the value of "background_dial_holo_dark" refer to an .png image, I was replace this with my own .png image, or maybe it is "primary background color" ? in the folder values/colors/color.xml there is an code <color name="background_primary">#ffffffff</color> but I haven't change it yet.
I want to make half transparent effect on the background that shows my current wallpaper instead, if it's possible.
Would you mind to check my res folder if you're not busy, in the attachment...
Click to expand...
Click to collapse
So try to remplace into colors.xml file
Code:
<color name="background_primary">#ffffffff</color>
by this
Code:
<color name="background_primary">#00ffffff</color>
Primokorn said:
So try to remplace into colors.xml file
Code:
<color name="background_primary">#ffffffff</color>
by this
Code:
<color name="background_primary">#00ffffff</color>
Click to expand...
Click to collapse
I will try that and report the result later
It works :good: thanks man
i Change my Setting Themes. to Holo.Light. One problem is when you go into manage applications the text is white on a white background almost impossible to see. What XML file needs to be edited to change that and what part needs to be changed?
Settings ->Applications ->Manage Applications
zomer143 said:
i Change my Setting Themes. to Holo.Light. One problem is when you go into manage applications the text is white on a white background almost impossible to see. What XML file needs to be edited to change that and what part needs to be changed?
Settings ->Applications ->Manage Applications
Click to expand...
Click to collapse
If you're on a Linux distro
Code:
grep -r "manage app"
This should give you the XML file that's present in.
Regards
MasterAwesome
MasterAwesome said:
If you're on a Linux distro
Code:
grep -r "manage app"[\CODE]
This should give you the XML file that's present in.
Regards
MasterAwesome[/QUOTE]
what can't understand
Click to expand...
Click to collapse
zomer143 said:
what can't understand
Click to expand...
Click to collapse
Its a bash command...to find stuff inside files..
Regards
MasterAwesome
MasterAwesome said:
Its a bash command...to find stuff inside files..
Regards
MasterAwesome
Click to expand...
Click to collapse
what file .xml or .smali
and what name of file
MasterAwesome said:
Its a bash command...to find stuff inside files..
Regards
MasterAwesome
Click to expand...
Click to collapse
MasterAwesome said:
Its a bash command...to find stuff inside files..
Regards
MasterAwesome
Click to expand...
Click to collapse
zomer143 said:
what file .xml or .smali
and what name of file
Click to expand...
Click to collapse
manage_applications_running.xml
manage_applications_item.xml
manage_applications_content.xml
manage_applications_apps.xml
or
ApplicationsState.smali
AppViewHolder.smali
InstalledAppDetails.smali
InstalledAppDetailsTop.smali
InterestingConfigChanges.smali
LinearColorBar.smali
ManageApplications.smali
zomer143 said:
manage_applications_running.xml
manage_applications_item.xml
manage_applications_content.xml
manage_applications_apps.xml
or
ApplicationsState.smali
AppViewHolder.smali
InstalledAppDetails.smali
InstalledAppDetailsTop.smali
InterestingConfigChanges.smali
LinearColorBar.smali
ManageApplications.smali
Click to expand...
Click to collapse
Smali files are files that define your action upon touch they are made by the compiler it transforms java code to smali..the XML files are the ones you need to edit
Regards
MasterAwesome
MasterAwesome said:
Its a bash command...to find stuff inside files..
Regards
MasterAwesome
Click to expand...
Click to collapse
MasterAwesome said:
Smali files are files that define your action upon touch they are made by the compiler it transforms java code to smali..the XML files are the ones you need to edit
Regards
MasterAwesome
Click to expand...
Click to collapse
where i change the text color ? what name of .xml
Settings ->Applications ->Manage Applications
zomer143 said:
where i change the text color ? what name of .xml
Settings ->Applications ->Manage Applications
Click to expand...
Click to collapse
manage_applications_running.xml
manage_applications_item.xml
manage_applications_content.xml
manage_applications_apps.xml
send these 4 and the colour you want me to change.. look at the xml after i change them to see what i changed.. its easier that way
MasterAwesome said:
manage_applications_running.xml
manage_applications_item.xml
manage_applications_content.xml
manage_applications_apps.xml
send these 4 and the colour you want me to change.. look at the xml after i change them to see what i changed.. its easier that way
Click to expand...
Click to collapse
yeah i try that but still no change i add this android:textColor="#ff000000"
zomer143 said:
yeah i try that but still no change i add this android:textColor="#ff000000"
Click to expand...
Click to collapse
yeah you need to change them in many places... send the 4 files i'll try my best
if you want to do it by yourself
do the samething i told you b4 go to the folder where your manage_app.xml files are present and copy those files to a folder on your desktop and name it x
Code:
cd Desktop/x
find ./ -type f -exec sed -i 's/android:textColor="#FFFFFF"/android:textColor="#000000"/g' {} \;|
this will replace all colour codes from white to black put the modified files from x back to their respective folders then compile the apk, test
MasterAwesome said:
yeah you need to change them in many places... send the 4 files i'll try my best
if you want to do it by yourself
do the samething i told you b4 go to the folder where your manage_app.xml files are present and copy those files to a folder on your desktop and name it x
Code:
cd Desktop/x
find ./ -type f -exec sed -i 's/android:textColor="#FFFFFF"/android:textColor="#000000"/g' {} \;|
this will replace all colour codes from white to black put the modified files from x back to their respective folders then compile the apk, test
Click to expand...
Click to collapse
ok i try to change if working or not
but thanks for this
zomer143 said:
ok i try to change if working or not
but thanks for this
Click to expand...
Click to collapse
Did it work?
Regards
MasterAwesome
Hi guys. I want to make transparent the toggle's background. Can someone tells me how to do it? What .pns or xml that i need to edit ????
The image is on the attached link below.
bad news i'm afraid
sanydeadpool said:
Hi guys. I want to make transparent the toggle's background. Can someone tells me how to do it? What .pns or xml that i need to edit ????
The image is on the attached link below.
Click to expand...
Click to collapse
on l3 II not yet
but dont give up
if you find solution post here for people to use
sanydeadpool said:
Hi guys. I want to make transparent the toggle's background. Can someone tells me how to do it? What .pns or xml that i need to edit ????
The image is on the attached link below.
Click to expand...
Click to collapse
This instructions is for L7 II, but you can try:
1. Make backup!
2. To make it transparent, you must decompile LGSystemUI.apk
3. In LGSystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali find this line:
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;-><init>(I)V
4: Remove line below:
Code:
invoke-virtual {v0, v1}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
5: Adjust transparency in LGSystemUI\res\values\colors.xml, find:
Code:
<color name="bg_expanded">#[COLOR="Red"]ef000000[/COLOR]</color>
And change red value.
Some values of transparency:
bf000000 - 25%,
7F000000 - 50%,
3F000000 - 75%,
00000000 - 100%
Good luck
need lgsystem.apk pls
guys i edited my systemui.apk file and now lost status bar and some other funtion
can u guys help me with it my phone is lg p715 dual
maxx_hr said:
This instructions is for L7 II, but you can try:
1. Make backup!
2. To make it transparent, you must decompile LGSystemUI.apk
3. In LGSystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali find this line:
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;-><init>(I)V
Click to expand...
Click to collapse
There are many PhoneStatusBar.smali files like
PhoneStatusBar$1.smali
PhoneStatusBar$2.smali
PhoneStatusBar$3.smali
...
which to use?
mid143 said:
guys i edited my systemui.apk file and now lost status bar and some other funtion
can u guys help me with it my phone is lg p715 dual
Click to expand...
Click to collapse
This guide is for deodexed rom.
To restore functionality, just copy stock LGSystemUI.apk, change permission like other files in folder and restart.
If you have odexed rom, do the same, but with LGSystemUI.apk and LGSystemUI.odex.
If you have backup (CWM or TWRP), restore only System.
yashgumaste said:
There are many PhoneStatusBar.smali files like
PhoneStatusBar$1.smali
PhoneStatusBar$2.smali
PhoneStatusBar$3.smali
...
which to use?
Click to expand...
Click to collapse
PhoneStatusBar.smali
Without $ etc.
Only one is in that folder, and it is bigest.
maxx_hr said:
5: Adjust transparency in LGSystemUI\res\values\colors.xml, find:
Code:
<color name="bg_expanded">#[COLOR="Red"]ef000000[/COLOR]</color>
And change red value.
Some values of transparency:
bf000000 - 25%,
7F000000 - 50%,
3F000000 - 75%,
00000000 - 100%
Good luck
Click to expand...
Click to collapse
Can we also add other colors by their hex code
---------- Post added at 12:19 PM ---------- Previous post was at 12:05 PM ----------
I want to change the notification dropdown simlar to lollipop.
Any idea how to change background of other parts.
Can we also add other colors by their hex code
Click to expand...
Click to collapse
Yes.
I want to change the notification dropdown simlar to lollipop.
Any idea how to change background of other parts.
Click to expand...
Click to collapse
You must research how to do this.