Rom customization - Android Q&A, Help & Troubleshooting

hi how can we customize android on first boot. ie change settings to how we want, like enable data roaming, wifi settings. can this be done in a script in init.d folder? lots of settings are in databases so how can we change the values in them

richmondo said:
hi how can we customize android on first boot. ie change settings to how we want, like enable data roaming, wifi settings. can this be done in a script in init.d folder? lots of settings are in databases so how can we change the values in them
Click to expand...
Click to collapse
Some things can be changed in /system/build.prop
Others in the init.rc and init.devicenamehere.rc, which are in the ramdisk. And some ROMs do have a init.d/*, but that's not standard AOSP.
Are you trying to change a running ROM or customize one for flashing?

For flashing a new own customized rom, how we can made roms, have ap2sd??? ( should we add anything special??
How can we add some new languages to rom..??
I need to add Arabic - persian just for supporting the characters but when I ad fonts to rom, it just shows them disconnected.. how can I fix this..??

.
RichmondoUK said:
hi how can we customize android on first boot. ie change settings to how we want, like enable data roaming, wifi settings. can this be done in a script in init.d folder? lots of settings are in databases so how can we change the values in them
Click to expand...
Click to collapse
<bool name="def_enable_mobile_data">true</bool> change <bool name="def_enable_mobile_data">false</bool> Data transfer is disabled by default.
<bool name="def_install_non_market_apps">false</bool> change <bool name="def_install_non_market_apps">true</bool> Checkbox Unknown sources in Settings \ Security will be marked for easy installation of necessary software.

Lol thanks but this is basic now compared to what i do now as currently work on the xtended settings app.

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.

[Q] On-The-Fly framework config

Question to all the devs out there...
inside of framework-res.apk there is the res/values/bools.xml file with has some true/false settings. Is there a known method of changing these settings from the OS post-boot, perhaps a command hook or API...
It's defined under http://www.androidjavadoc.com/2.3/com/android/internal/R.bool.html
Any thoughts?
aramova said:
Question to all the devs out there...
inside of framework-res.apk there is the res/values/bools.xml file with has some true/false settings. Is there a known method of changing these settings from the OS post-boot, perhaps a command hook or API...
It's defined under http://www.androidjavadoc.com/2.3/com/android/internal/R.bool.html
Any thoughts?
Click to expand...
Click to collapse
no changes on the fly can be made.

[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

Enable Hidden CSC Features on rooted SGY

guYs this stuff has come to my attention lately:
source: http://www.droidviews.com/tag/csc-codes-for-samsung-firmwares/
add features via .xml CSC file
now we need a ready-made file for download to SGY, which will appear below...
Feature: Pressing Enter key takes the cursor to a new line in stock SMS
<CscFeature_Message_ReplaceCRToNewLine>true</CscFeature_Message_ReplaceCRToNewLine>
Feature: Stock Samsung keyboard with sub symbols
<CscFeature_Sip_UseSymbolInCMKey>true</CscFeature_Sip_UseSymbolInCMKey> <CscFeature_Sip_EnableSymbolInSecondary>de;en_US;en_GB</CscFeature_Sip_EnableSymbolInSecondary>Note: To enable your preferred input language on your device’s keyboard, you would have to replace the language code (highlighted in red) with those you want on your device. Below is a list of language codes (in small letters) followed by country code (in capital letters).​en_GB;en_US;en_AU;en_CA;en_PH;en_IE;en_NZ;en_ZA;
ko_KR;
de_AT;de_CH;de_DE;
fr_FR;fr_CH;fr_BE;fr_CA; bg_BG;
cs_CZ;da_DK;el_GR;es_ES;et_EE;fi_FI;
ga_IE;hr_HR;hu_HU;is_IS;it_IT; lt_LT;lv_LV;
mk_MK;ms_MY;nb_NO;nl_NL;nl_BE;pl_PL;pt_PT;pt-BR;ro_RO;sr_RS;sv_SE;tr_TR; ca_ES;eu_ES;gl_ES;kk_KZ;ru_RU;sk_SK;sl_SI;uk_UA;uz_UZ;az_AZ;hy_AM;ka_GE;
pt_BR;in_ID;ja_JP;vi_VN;
zh_CN;zh_TW;
ar_AE;ar_IL;
fa_FA;ur_PK;iw_IL;th_TH;
zh_HK;zh_SGFor an Easier Way to Get Your Native Language, Read This Article (see source link above)​Feature: Enable scheduled message
<CscFeature_Message_EnableScheduledMessage>true</CscFeature_Message_EnableScheduledMessage>
<CscFeature_Message_EnableScheduledMsgBox>true</CscFeature_Message_EnableScheduledMsgBox>
Feature: Dialer search matches numbers in contacts and call logs
<CscFeature_Dialer_PhonebookNdigitsMatching>true</CscFeature_Dialer_PhonebookNdigitsMatching>
<CscFeature_RIL_CallerIdMatchingDigit>true</CscFeature_RIL_CallerIdMatchingDigit>
Feature: Join unlimited contacts together
<CscFeature_Contact_SetLinkCountMaxAs>999</CscFeature_Contact_SetLinkCountMaxAs>
Feature: Get 100 speed dial shortcuts on phone’s dialer (you can personalize the number)
<CscFeature_Contact_ExtendSpeedDialTo100>true</CscFeature_Contact_ExtendSpeedDialTo100>
Feature: Extend Contact name length limit to 1280 characters (you can personalize the number)
<CscFeature_Contact_LimitNameLength>1280</CscFeature_Contact_LimitNameLength>
Feature: Add exit menu to stock web browser
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>
Feature: Turn camera shutter sound on/off
<CscFeature_Camera_ShutterSoundMenu>true</CscFeature_Camera_ShutterSoundMenu>
Feature: Enable infinite scrolling in home screen, app and widget drawer
<CscFeature_Launcher_DisablePageRotation>false</CscFeature_Launcher_DisablePageRotation>
Feature: Enable rotation control icon in Gallery
<CscFeature_Gallery_AddAutoRotationIcon>true</CscFeature_Gallery_AddAutoRotationIcon>
Feature: Show hardware revision in Settings> About
<CscFeature_Setting_EnableHwVersionDisplay>true</CscFeature_Setting_EnableHwVersionDisplay>
Feature: Enables stock browser to load sites in Desktop mode.
<CscFeature_Web_EnableDesktopSiteAsDefault>true</CscFeature_Web_EnableDesktopSiteAsDefault>
Which file should i edit???
mms047 said:
Which file should i edit???
Click to expand...
Click to collapse
Every Android device from Samsung has a folder called csc under system directory. This folder contains some XML files that keep the configuration codes for country and carrier based customization options. If you have root access on your Samsung phone or tablet, you can access this directory and edit those XML file to enable or disable the features that are available or unavailable on your device. In other words, by editing the XML files present in the csc folder, you can easily personalize your device by adding features like your native language pack, screen rotation control, infinite scrolling on home screen, turn on/off camera shutter sound and so on.
mai77 said:
Every Android device from Samsung has a folder called csc under system directory. This folder contains some XML files that keep the configuration codes for country and carrier based customization options. If you have root access on your Samsung phone or tablet, you can access this directory and edit those XML file to enable or disable the features that are available or unavailable on your device. In other words, by editing the XML files present in the csc folder, you can easily personalize your device by adding features like your native language pack, screen rotation control, infinite scrolling on home screen, turn on/off camera shutter sound and so on.
Click to expand...
Click to collapse
In the csc folder there are only two xml files, a database file and a dat file..... others are folders....
two xml files are customers.xml and others.xml in Hyperion 8
which file to edit?
did you read the source link ?
pretty extensive
Not before u asked....
awesome,i have asked myself long time about this,because did we can have this and how its working,many thanx, :good::good::good:
i know about this
but i dont know how to do...
nice guide

Adding custom entries in preferred network options

Are there any build.prop or system.prop edits to add preferred network options entries or and changes to add in device tree as I want to compile rom for my device g4 plus but all the roms have only 3g and lte of course *#*#4636#*#* is a workaround But I want to have it in the system settings.

Categories

Resources