Set default settings - Android Q&A, Help & Troubleshooting

I'm putting together a custom ROM for the Samsung Captivate and I'm trying to figure out how to configure default settings. As in, I'd like to set Auto Brightness to Off, Audible Selection to Off, etc. This would be in regards to after a flash of the ROM. Any ideas? I can't find information on it anywhere.
Thanks!

Jirv311 said:
I'm putting together a custom ROM for the Samsung Captivate and I'm trying to figure out how to configure default settings. As in, I'd like to set Auto Brightness to Off, Audible Selection to Off, etc. This would be in regards to after a flash of the ROM. Any ideas? I can't find information on it anywhere.
Thanks!
Click to expand...
Click to collapse
You will need to edit the bools XML in the settings apk. They are in other places as well but that's a good place to start

Thanks for the response. I looked in bools.xml and this is what I see:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="has_intrusive_led">false</bool>
<bool name="has_dock_settings">false</bool>
<bool name="config_additional_system_update_setting_enable">false</bool>
</resources>
Do you know the other places I need to look? Thanks again for your help.

OK next I would check the settings apk and settings provider apk in the bools XML. Also look in the framework AOL's depending on model of phone

zelendel said:
OK next I would check the settings apk and settings provider apk in the bools XML. Also look in the framework AOL's depending on model of phone
Click to expand...
Click to collapse
Thank you! SettingsProvider seemed to be the ticket. I did in fact find a couple settings in the framework-res.apk as well. Last one I'm looking for is the setting to turn off the "Audible Selection". Samsung should have disabled that by default.
Thanks a ton for pointing me in the right direction.

Related

MIUI 5 way lockscreen

I am trying to change the lockscreen to go to google voice instead of sms and I know I have to change a line in the XML file, but I am struggling trying to get it to work.
<Intent action="android.intent.action.MAIN" type="vnd.android-dir/mms-sms" category="android.intent.category.DEFAULT"/>
is the line that needs to be changed, but I can't seem to put the right variables in to change to google voice.
<Intent action=”android.intent.action.MAIN” package=”com.google.android.apps.googlevoice” class=”com.google.android.apps.googlevoice.SplashActivity”/>
I tried "android.intent.action.VIEW" as well.
any ideas?
Thanks in advance!

Android Default Settings?

Hello I'm making my first android rom for the sgsii, but can't really find the default values, i found some when decompiling the settingsprovider.apk and in ro.prop
I want to enable Vibrate on answer By default specifically
Thanks in advance
Most of the default setting are in the systemui but what your looking for should be phone apk. Decompile them and look at the bools xml
Sent from my Inspire 4G using Tapatalk
Decompile the settings apk. There should be an bools.xml or something like that..

Add Wimax toggle to Power Widget

I have been helping Sinistertensai with his ShenduOS port for the HTC EVO 4G. I got Wimax to work and was wanting to see if anyone knows how to add a Wimax toggle to the power widget dropdown from the status bar. The port is CM7 based. In the SystemUI.apk I see there is WimaxButton.smali. I have tried adding the ids for it in public.xml and creating pngs for the toggle. I get no errors on compile but I get reboots or force closes when I try to bring up the power widget dropdown. I have very limited experience with editing smail code. I have also tried copying over the resources, classes, and xmls to the original apk with the same results. I have researched how to edit smali but I could just be doing it wrong or leaving something out. This has been driving me to madness. If anyone could help out that would be amazing!
Is there a reason you can't rebuild from source with Wimax enabled?
Sent from my SCH-R760 using Tapatalk 2
The ShenduOS SystemUI has been changed drastically and I cannot find the source code. That would require me to completely redo what Shendu has done and is well beyond my capabilities. The functionality for the wimax is there, I just need to find a way to add the toggle button. The actual widget has a wimax toggle which works, just not the one in the status bar.
Sent from my EVO using xda premium
I have only done smali a few times. How I did it was for example get a cm build going. Remove all wimax toggle related noti widget elements. Compile. Now you have a systemui base. Now build with the wimax toggle. You have a wimax toggle systemui.
Then use a program like beyond compare and after apktooling both systemui in their own folders. Compare the smali differences. Should get you pretty close. Of course there will be some trial and error if the systemui is different then that of cm.
Sent from my Galaxy Nexus using xda premium
The code is quite different that the CM7 code. I have found what needs to be edited, it just results in reboots upon clicking on the status bar to open the powerwidget dropdown. Here are the steps I take:
Decompile SystemUI.apk
In PowerWidget.smali -> replace both instances of toggleNetworkMode with toggleWimax
In WimaxButton.smali -> write down ids from method updateState (0x7f0200ca is off, 0x7f0200cb is on)
In public.xml -> Removed bad APKTOOL_DUMMYs for above ids. Add the following lines:
<public type="drawable" name="stat_wimax_off" id="0x7f0200ca" />
<public type="drawable" name="stat_wimax_on" id="0x7f0200cb" />
In res/drawable-hdpi -> Created on/off images and placed them there
In drawables.xml -> Removed bad APKTOOL_DUMMYs for above ids that were set to false. Add the following lines:
<item type="drawable" name="stat_wimax_off">true</item>
<item type="drawable" name="stat_wimax_on">true</item>
Recompiled
Pushed to phone with adb and cleared dalvik cache
Reboot
I have also tried pushing the changes and overwriting the ones in the original using Archive Manager(Ubuntu) with the same issues. If someone could point out what I am doing wrong that would help alot! I could have broken my tools(Android Utility/apktool). Feel free to give it a shot if you want. Once I/someone gets it right I will write up a tutorial.

Operator Logo Removal ??

Evening all,
Does any one know of a way to either Remove or Hide the operator logo form the Lock-screen ? My OCD is starting to kick in.
Thanks in advance.
Schumi 01 said:
Evening all,
Does any one know of a way to either Remove or Hide the operator logo form the Lock-screen ? My OCD is starting to kick in.
Thanks in advance.
Click to expand...
Click to collapse
Removing operator name requires you to decompile M10 files, I do this for fun so the only tool I'm aware of that does this is VTS. Nevertheless the steps are:
Decompile Idlescreen_Base.apk
In assets open: Lockscreen_time.m10/0x0dc105ce/lockscreen_time/timeline.time_fade/
Locate the code that says: /text.lockscreentime_operator - change the value to zero
Recompile the apk, then you can push the modded app to your phone via VTS or just swap it out with a file browser and reboot.
I've attached an Idlescreen.apk that is already modded, however, the clock text has been slightly downsized (not a result of the mod), also I don't like screen shortcuts, but they will still work.
Thanks for the tip!! I was able to remove everything. Operator, Time and Date.
Better thing to do is to look for <Bool Name="Visible" Header="239748898" IDC="true">true</Bool>
<Unknown Name="0x7ce54727" Header="239748898" IDC="true">00000000</Unknown>
<Unknown Name="0x7c9663eb" Header="239748898" IDC="true">00406144</Unknown>
and change to
<Bool Name="Visible" Header="239748898" IDC="true">false</Bool>
<Unknown Name="0x7ce54727" Header="239748898" IDC="true">00000000</Unknown>
<Unknown Name="0x7c9663eb" Header="239748898" IDC="true">00406144</Unknown>
Thanks for the info Ghost, if you'd like to go even more minimal you can hide the shortcut text:
Lockscreen_shortcut.m10/0x0dc105ce/Lockscreen_Shortcut/
Under: <FxTimeLine Name="textcomp.shortcut_name1" Header="0x7c89ba8b" Type="0x19930c9c">
Find: <Bool Name="Visible" Header="239748898" IDC="true">true</Bool>
Change to: <Bool Name="Visible" Header="239748898" IDC="true">false</Bool>
Under: <FxTimeLine Name="textcomp.shortcut_name2" Header="0x7c89ba8b" Type="0x19930c9c">
Find: <Bool Name="Visible" Header="239748898" IDC="true">true</Bool>
Change to: <Bool Name="Visible" Header="239748898" IDC="true">false</Bool>
Under: <FxTimeLine Name="textcomp.shortcut_name3" Header="0x7c89ba8b" Type="0x19930c9c">
Find: <Bool Name="Visible" Header="239748898" IDC="true">true</Bool>
Change to: <Bool Name="Visible" Header="239748898" IDC="true">false</Bool>
Under: <FxTimeLine Name="textcomp.shortcut_name4" Header="0x7c89ba8b" Type="0x19930c9c">
Find: <Bool Name="Visible" Header="239748898" IDC="true">true</Bool>
Change to: <Bool Name="Visible" Header="239748898" IDC="true">false</Bool>
Is it possible to remove the (current) bit from the location?
Ghost said:
Is it possible to remove the (current) bit from the location?
Click to expand...
Click to collapse
If you set that specific location instead of using current location
Sent from my HTC One XL using Tapatalk 2
Thank you both, will give them a go a bit later in, thanks again for your replies.
Sent from my HOX+
fnut6969 said:
Removing operator name requires you to decompile M10 files, I do this for fun so the only tool I'm aware of that does this is VTS. Nevertheless the steps are:
Decompile Idlescreen_Base.apk
In assets open: Lockscreen_time.m10/0x0dc105ce/lockscreen_time/timeline.time_fade/
Locate the code that says: /text.lockscreentime_operator - change the value to zero
Recompile the apk, then you can push the modded app to your phone via VTS or just swap it out with a file browser and reboot.
I've attached an Idlescreen.apk that is already modded, however, the clock text has been slightly downsized (not a result of the mod), also I don't like screen shortcuts, but they will still work.
Click to expand...
Click to collapse
Thank you for supplying the Apk file, so much easier for myself to use that, than try to decompile an Apk file It worked like a charm
Really happy now the logo has gone.
Thanks once again.
Sent from my HOX+
Schumi 01 said:
Thank you for supplying the Apk file, so much easier for myself to use that, than try to decompile an Apk file It worked like a charm
Really happy now the logo has gone.
Thanks once again.
Sent from my HOX+
Click to expand...
Click to collapse
You're welcome, not a problem at all, if you'd like one with the original text size or no icon labels let me know.
fnut6969 said:
You're welcome, not a problem at all, if you'd like one with the original text size or no icon labels let me know.
Click to expand...
Click to collapse
Thanks, if it isnt too much bother could you post one without the No icon labels too,I think it looks so much cleaner without the labels.
The text size is on the clock is fine.
Thanks
superchilpil said:
If you set that specific location instead of using current location
Sent from my HTC One XL using Tapatalk 2
Click to expand...
Click to collapse
I dont think you can use a spseific location in the weather lock screen can you?
Schumi 01 said:
Thanks, if it isnt too much bother could you post one without the No icon labels too,I think it looks so much cleaner without the labels.
The text size is on the clock is fine.
Thanks
Click to expand...
Click to collapse
Here you go.
Ghost said:
I dont think you can use a spseific location in the weather lock screen can you?
Click to expand...
Click to collapse
Ghost, did you try looking in Idlescreen_Weather.apk I found a way to hide the entire city name, but it also inadvertently hid the current weather conditions.
fnut6969 said:
Here you go.
Click to expand...
Click to collapse
Thanks fnut, you are a prince amongst men, it works like a charm and it looks so much better.
Sent from my HOX+
Schumi, here is the Idlescreen you wanted, if you need the text size changed or anything moved lower let me know.
Compile
How can I compile and decompile M10 file...?
Can you please send me Link from where I can download that tool.?
samecin said:
How can I compile and decompile M10 file...?
Can you please send me Link from where I can download that tool.?
Click to expand...
Click to collapse
Vts is the tool try here
http://www.virtuous-ten-studio.com/
Sent From My Sweet Ass EVO LTE
fnut6969 said:
Schumi, here is the Idlescreen you wanted, if you need the text size changed or anything moved lower let me know.
Click to expand...
Click to collapse
Oh fnut, you are a star, once again i thank you.
Brilliant.
Thanks very much.
Sent from my HOX+
fnut6969 said:
Schumi, here is the Idlescreen you wanted, if you need the text size changed or anything moved lower let me know.
Click to expand...
Click to collapse
Sorry to be a pain, but in your own time obviously, could you just change the text size to the first APK you sent me, then that will be the last request i have.
Honestly.
Thanks again fnut
Schumi, here's the IdleScreen the text is 3/4's (or whatever value 0.75 is in the world of M10 code)of the stock size.

[GUIDE][TUT][.9.png] Theming your SamsungIME Keyboard

Hey guys,
I was asked a week or so back to make a guide so others can theme the Stock SamsungIME.apk the way they like. I have made my thread to do this and you can put in request if this guide is not helpful(which I hope it is).
I will answer as many questions as I can, time permitting, and be as Noob friendly as I can, as well. I know this guide will not be perfect and there might be some things I am leaving out, and if so tell me, I will adjust the OP with any suggestions or changes. So here goes nothing...
Things you need:
Android SDK
Java JDK and JRE
Apktool
Notepad++
xUltimate-d9pc
Photo Editor (Gimp/Photoshop)
Before we begin, I am not going to go into how to load/decompile/recompile apks.. There are some good guides out there and here are some..
http://forum.xda-developers.com/showthread.php?t=2195680
http://forum.xda-developers.com/showthread.php?t=2206938​
After you have the SamsungIME.apk totally decompiled you will want to open the folder it decompiled into and start with the res/drawables-sw359dp-xhdpi folder. In this folder there is all the pngs you need to edit. For starters the keys themselves..
You want:
sip_key_bg_normal.9.png
sip_key_bg_option.9.png
sip_key_bg_pressed.9.png
​As you can tell, by the name, these are not normal pngs. You will see a 1 pixel border on all sides of the image. When editing the png either erase them or resize the canvas of the image. Just subtract by 2 form the height and the width, but remember when you save it re open it and adjust the canvas size back to the way it was. As my understanding of these goes, they are named this way because Android recognizing these .9.pngs and stretches them.. When I first attempted editing these I would have nothing but problems, of course because I was doing it wrong. I never could understand where the lines go and what they actually do. Thats probably because I was trying to do it with transparent/semi-transparent images and could not see the actual image expanding. Well when you are editing these with draw9patch, I noticed two very important things to look at (for the keyboard). The window to your right is how the actual image will look when expanded, but to see that you have to go to the bottom of the screen and the second scroll bar, move it all all the way to the right.
​
You will notice that it stretches the image.. This is the same thing Android does.
The middle image needs attention here because it expands it horizontally. So that means when you expand it all the way thats what you spacebar will look like. .
​
You notice that these edges (red lines) Are not defined they are rounded.. Because they are not patched correctly.
​Notice the difference? This after it was patched with the proper line alignment.
To start you want add to full lines on the bottom and the right side. Next is the top and the left side. These are the lines you need play with to make you image look right. I used to only add a 1 pixel dot in the middle and one pixel line on the left. But when I started getting more advanced with photoshop/gimp I noticed my images would not looking the same. When you add gradients or borders to you keys, seeing the image on the right expanded is important because you will draw you lines to make you image look like it did in photoshop/gimp. NOTE: Don't leave any space in the lines to the right and on the bottom. You can, however, do so on the left and top but it will distort your png.
Here are a few guides to help you if you have anymore questions:
http://forum.xda-developers.com/showthread.php?t=2326393
The next image of importance is:
qwerty_keypad_bg.png
​
This is the background of the keyboard.. NOTE: there is also one of these located in res/drawables-sw359dp--land-xhdpi, the only difference being the above image is for Portrait and land is for Landscape. Also, they are two different resolutions so be careful when changing them. You can change this image to anything you want.. It is a normal png so therefore no patching or further steps are needed.
Next would be all the other option pngs, backspace, space bar, voice, settings, enter key, etc. You will will find these starting with the word qwerty_.
So example:
qwerty_key_icon_enter.png
​
This is the enter key as it sits on your keyboard.. Yes there are other ones but there are for different actions.
Another thing we might want to change is the color of the CAPS key when it is enabled.
That png is named:
qwerty_key_bg_shift_capslock.png
​
As you can see a lot of these are named exactly what they are..well some at least..
Next is .xml edits. You want to locate res/values-sw359hp-xhdpi/colors.xml. You will need to open this with notepad++ to edit colors of the key text, pressed key text, shadow of those text, space bar lettering, etc. You will only (or I only do) need to focus on the first 12 lines. They pretty much explain themselves by there names.
Code:
<color name="normalkey_shadowcolor">#ff000000</color>
<color name="functionkey_shadowcolor">#ff000000</color>
<color name="functionkey_labelcolor">#ffe2e2e2</color>
<color name="normalkey_labelcolor">#ffe2e2e2</color>
<color name="pressedkey_labelcolor">#ff122438</color>
<color name="disablekey_labelcolor">#7fe2e2e2</color>
<color name="popup_normalkey_labelcolor">#ffffffff</color>
<color name="popup_pressedkey_labelcolor">#ff2d5a8c</color>
<color name="normalkey_extra_labelcolor">#ffe2e2e2</color>
<color name="spacekey_labelcolor">#ffb6b6b6</color>
Click to expand...
Click to collapse
You'll notice that the colors are hex codes.. So the first two letters or numbers is for the transparency.. The next six define the actual color.
After we have edited our xml we can go ahead and recompile the apk. You should recompile with no errors. If you do encounter an error it's possible that you edited the color wrong and made it seven letters instead of eight or vice versa. Make sure that you transfer the old AndroidManifest.xml and META-INF folder form your original APK and transfer them to your new APK in SamsungIME/dist/.
FInally, you can copy you NEW SamsunIME.apk to your sd card, reboot into recovery. I prefer this method (Thanks to @Deckoz2302) because I would have trouble with APK's fully copying through adb. When in recovery select Mount, then click System. Select back. Then select Advanced, than File Manager. When in File Manager goto wherever you put your new APK. Copy it. Then go to System/app/ and hit Select and slide to copy. Reboot!
:good:Special THANKS to: @Deckoz2302: Best developer I have ever talk to! @Rizal Lovins, @grilleld, @Arsaw, @twanskys204, @Winterlove, @GuneetAtwal and I REALLY hope I didn't leave anyone out! If I did I'm sorry, tell me and I will update!:good:​
FIRST......!!!
Thanks brother, I am going to give this a go tomorrow.
Today, young ,men on acid realize that all matter is merely energy condensed to a slow vibration, we are all one consciences sharing itself subjectively, there is no such thing as death, life is only a dream, and we are just imaginations of ourselves And now to the weather.....
Reserved. .
Sent from my Galaxy Nexus using xda app-developers app
This is quite the guide thanks so much for this.
Sent from Kendrick Lamar, King of New York
Nice Tut Great Work..!
Can all this be done on Mac osx?
Shamestick said:
Can all this be done on Mac osx?
Click to expand...
Click to collapse
If there is an Android SDK for OSX then i'd imagine it can be done on a Mac.
The SDK was fine, its getting the java jdk that's giving me issue
Shamestick said:
The SDK was fine, its getting the java jdk that's giving me issue
Click to expand...
Click to collapse
@Shamestick - Do you use Polaris to run Windows? That could work possibly.
Sent from my SCH-I605 using xda app-developers app
dudeicles said:
@Shamestick - Do you use Polaris to run Windows? That could work possibly.
Sent from my SCH-I605 using xda app-developers app
Click to expand...
Click to collapse
I do not, and I haven't gotten a copy of windows to dualboot with yet either. My problems always come whe i try to go to the downloading site for java, it just will never open on chrome or safari
well done my friend ! Nice to see you here
Text color SamsungIME.apk Note3-MOD
I have a big problem.
I decompiled the SamsungIME.apk from Note3-MOD to change the color of the KEY-Text from BLACK to WHITE.
But I can't find the right XML and location where the code has to be changed.
Can someone help me in this topic?
Superwolf77 said:
I have a big problem.
I decompiled the SamsungIME.apk from Note3-MOD to change the color of the KEY-Text from BLACK to WHITE.
But I can't find the right XML and location where the code has to be changed.
Can someone help me in this topic?
Click to expand...
Click to collapse
They will most likely be in values/colors.xml
For testing I already changed every black code to white in this XML but it does not change.
Superwolf77 said:
For testing I already changed every black code to white in this XML but it does not change.
Click to expand...
Click to collapse
Oops sorry its in /values-sw359dp-xhdpi/colors.xml.. Took me a long time to figure out that! lmao! Anyways have fun hope I helped!
Thank you for the help. It works fine now.
Thnks sir.. usefull :fingers-crossed:
Apks?
For those who have made custom keyboards will you please post your apks?
Good
Thanks for your tutorial. I have a question about adding a backround image for the keyboard.Not sure if thread is to old so please respond if you an answer question and ill write it . thanks

Categories

Resources