customize android default settings - Android Software/Hacking General [Developers Only]

Hi!
So getting into the whole rom customizing thing. Got a general grasp on how to edit and customize most of the stuff, however, I'm missing one thing.
How can I change android default settings in a way that it's already included in my to be flashed .zip?
Example, let's say I'd like to set a different locale by default, as well activate transition animations with fast speed an so on (like customizations presented on http://developer.android.com/intl/fr/reference/android/provider/Settings.System.html ), how should I do it?
I got it that post-installation, some sqlite databases are created like settings.db, or that i could build an apk with the right permissions that would access and change these properties. However I'd like to this pre-installation, in the simplest way possible!
Any help appreciated.

Related

[Q] Adding and changing fonts

I'm rooted and running stock Sammy Rom and want to change the system Font without using an app which hogs memory. I'd like to add new fonts to the existing list under display. I've read this can be done using the system/display folder but I can't find it. What are the technicalities of adding fonts?
It'd also be nice to be able to tweak/scale the font size (in pixels) and with more options than the stand list. Is this also possible?
Edit: Dohhhh, didn't even see the 'Get Fonts Online' option in the settings menu. What a plank......I'd delete the question if I could.
Saying that I'd still like to install Google Now's 'Roboto' italic natively rather than through a font changer. It's not listed in the Play Store as a 'Flipfont'.

[Q] [MTK6577] [ICS] How to change animation scale without rebuilding settings.apk?

Is there a way to change the speed (and weight!) of list scrolling animations? Like in most devices with the "window/transition animation duration/scale". I tried googling it, but only found a method that requires rebuilding the settings.apk file... Maybe there's an external application to change the settings anyway? My device's list weight is so light it takes ages to stop! I already installed a third party launcher, so at least the desktops and app drawer scroll fast, but the lists keep bugging me. I've heard there's a way to do this with editing build.prop, but I once bricked my Xperia E by editing it according to some tutorial from XDA (I really have no idea what went wrong), so I'm a bit hesitant to risk again.
Anybody?

[GUIDE] How to make RRO mods / themes

About
In this guide I will be telling you about how to create your own device mods like this. This involves using an engine built into Android Nougat. There is no root required.
Prerequisites
- Apktool installed (official guide here)
- The apk of the app you wish to modify (ex: SystemUI.apk) (system dump here; USE WINRAR AS 7z DOESN'T EXTRACT RIGHT)
- Android Studio
- Basic knowledge of apk guts
- Template RRO project
- optional: Finished Example Project (for reference)
Tutorial
The first step is to decompile your target APK so we can see what options we can change. For this tutorial, I am going to be modding SystemUI.apk.
"apktool d SystemUI.apk"
After it finishes, go to "SystemUI/res/values", as this will be where we change most things.
Here we can see files like "bools.xml, strings.xml, integers.xml, etc..."
Let's look in "bools.xml".
I see a line in here that mentions lock screen rotation:
"<item type="bool" name="config_enableLockScreenRotation">@android:bool/config_enableLockScreenTranslucentDecor</item>"
For this tutorial, let's change this value, as it is easy to change, and we can visually see this change.
It looks like this boolean is enabled if "config_enableLockScreenTranslucentDecor" is enabled. To override this, we have to change it to "true" instead.
Now that we know what we are changing, let's open up the "RRO_Template" project in android studio.
First navigate to the Gradle Scripts and select the "build.gradle" for the "(Module: app)"
Here lets change some variables. First is the "theme_name". Let's change it to "Lockscreen Rotation"
Next is "theme_id". Let's make it "com.mod.lockscreen_rotation"
We don't need to mess with "priority"
Last is the "package_id" Since default is the id for the SystemUI, we don't have to change anything. If you need to find this for another app, look in the decompiled APKs AndroidManifest.xml under "package="com.app.id""
Next, navigate to the res folder. If you remember, our "bools.xml" file is under "res/values/bools.xml", so let's add that file.
We can delete the sample "strings.xml" as we don't need to change anything there, and add the "bools.xml" file.
Inside of the newly created XML file, we should see a setup like this (if not add it):
"<?xml version="1.0" encoding="utf-8"?>
<resources></resources>"
Looking back at the setting we want to change, it's "<item type="bool" name="config_enableLockScreenRotation">@android:bool/config_enableLockScreenTranslucentDecor</item>". So let's add that line.
But since we are overriding the value to true, it will now look like this :"<item type="bool" name="config_enableLockScreenRotation">true</item>"
And that's it for the value changing!
Now let's go build the APK. Press "Alt + B" to bring up the Build menu and press "Build APK"
Click "Show In Folder" on the bottom right after it compiles to see the APK.
Put this on your phone and install the APK.
Since we modified the SystemUI.apk, we need to reboot to see the changes.
Now, lets try going to the lock screen and rotating the screen. It should rotate!
Congratulations! You made a mod / theme!
If you have any questions, please ask. I will try to help if I am available. I have classes starting in a few days so I may be busy. Enjoy the guide!
Hello tytydraco,
Not sure if my problem is totally related to your posted thread but it sounds like you are very knowledgeable on Galaxy theming! I have a rooted Galaxy S8 and have merged/moded different themes from the Theme store, such as using another theme’s icon pack or wallpaper by swapping them out of their respective .apk files and implementing them with success!
My problem is with a theme’s "InCallUI" (accept, reject, hangup icons in phone dialer) after adding cool graphic .png icons (then changing to .qmg) it works flawlessly, however every time I restart my phone or a Samsung system app is updated, they revert back to those default Samsung cartoony icons. I then have to apply stock theme then re-apply customized theme to get icons back. This process also changes/breaks 3 or 4 other theming aspects, which are not affected by restarts, that I have to re-adjust!
Not only have I altered the theme’s “base.apk” in /Data/App/MyTheme folder, but also the theme’s InCallUI.apk and placed into; Data/Overlays/Style/Mytheme folder, then changed permissions to "rwx r-- r-w". I use these permissions because all the other apk's in this folder use them. I have even tried using different theme’s InCallUI.apk, whose icons remain after restart, by just changing the icons and renaming to my theme….but to no avail, same problem!
I know this all sounds really OCD, like probably most of us within these forums, but it’s getting to be a real pain in darse to constantly have to change everything back again every restart if I want to maintain my theme!
So if I may poach upon your smart nature, do you know if there is a configuration file/folder that can be edited/altered to make those “InCallUI” icons stick upon a restart?
Any advise or corrections in what I'm doing would be greatly appreciated!
Thanks in advance.
eltoro5 said:
Hello tytydraco,
Not sure if my problem is totally related to your posted thread but it sounds like you are very knowledgeable on Galaxy theming! I have a rooted Galaxy S8 and have merged/moded different themes from the Theme store, such as using another theme’s icon pack or wallpaper by swapping them out of their respective .apk files and implementing them with success!
My problem is with a theme’s "InCallUI" (accept, reject, hangup icons in phone dialer) after adding cool graphic .png icons (then changing to .qmg) it works flawlessly, however every time I restart my phone or a Samsung system app is updated, they revert back to those default Samsung cartoony icons. I then have to apply stock theme then re-apply customized theme to get icons back. This process also changes/breaks 3 or 4 other theming aspects, which are not affected by restarts, that I have to re-adjust!
Not only have I altered the theme’s “base.apk” in /Data/App/MyTheme folder, but also the theme’s InCallUI.apk and placed into; Data/Overlays/Style/Mytheme folder, then changed permissions to "rwx r-- r-w". I use these permissions because all the other apk's in this folder use them. I have even tried using different theme’s InCallUI.apk, whose icons remain after restart, by just changing the icons and renaming to my theme….but to no avail, same problem!
I know this all sounds really OCD, like probably most of us within these forums, but it’s getting to be a real pain in darse to constantly have to change everything back again every restart if I want to maintain my theme!
So if I may poach upon your smart nature, do you know if there is a configuration file/folder that can be edited/altered to make those “InCallUI” icons stick upon a restart?
Any advise or corrections in what I'm doing would be greatly appreciated!
Thanks in advance.
Click to expand...
Click to collapse
Sounds like the apk is reverting back... There may be another QMG file that puts the icon back. Other than that, it may be samsung's themes overriding this. Good luck and thanks for the question!
Couple of quick questions
Thanks for the guide OP!
I had a couple of quick questions.
You mention at the beginning of your guide that your method works because of a built in engine in Nougat and that it doesn't require root. I thought that RRO support was added to the AOSP by Sony in Marshmallow? Is this different, or did it just take until Nougat for Samsung to catch up?
The reason I ask is that I tried to do something very similar on an A5 (2017) running 6.0.1 and had no success. I had full root access so I manually installed my .apk into /system/vendor/overlay and could see that the app was installed in the Application Manager, but the desired changes did not take effect. I based my .apk on a similar guide from tutsplus and they say it should work on a device running Marshmallow or higher, but they emulate a Nexus which is obviously closer to AOSP than a Galaxy.
Is this guide Nougat specific or S8 specific? i.e. will a J5 2017 (released after the S8) running Nougat also work in the same way? Can you still install the app manually to the /system/vendor/overlay folder or do you have to manually install it through the UI?
Thanks again for the guide!
tytydraco said:
Enjoy the guide!
Click to expand...
Click to collapse
Hello, sorry for waking this up, the RRO template links are down. Can you attach them here?

How to effectively change theme settings

HI, wihile I'm able to initially apply a theme, I'm confused about the many choices in the paintbrush menu when I want to change an individual theme setting (eg. accent colour).
Firstly before everything refreshes the change takes a very long. to apply
Secondly the changed value not always appears in the UI, coz I'm not quite sure if using right action.
Build & enable, Build & update, Change overlay, what are exact differences between these?
I see that if I choose build & choose, the change is more like to apply, but Substratum creates a new element beside the old, and I want to replace the previous.
Also I would expect some kind of preview before applying the customized item. As I wrote, the change takes long to apply to UI, and from the menu it's not always clear how it will look.
I need some more insight how things do work. Is there a comprehensive tutorial for using Substratum?

Root and all...

I'm wondering..
I am used to root every phone I get. Not a programmer at all, so I rely on guides and tutorials.
I read somewhere it's not possible to get an access to the bootloader so I assume we won't get customized roms in the near future.
So, assuming it's true, what is the best way to manipulate the OS?
My main problem is the DISPLAY - it's just too big! I changed it to the smallest width in the developer menu, but it didn't solve everything as the height remains the same so everything is just "spaced out"...
And fonts! The options available (Theme manager, launcher) change the fonts only superficially (i.e. some apps still use the default fonts)...
Any suggestions/ insights?...

Categories

Resources