I am trying to work on a project which requires to take backup of complete android configration say wifi connection list and pwd's, ringtone, screen brightness, bookmarks, etc. Is there any common place that android stores them or do we individually need to extract them and revert then in case of lost phone or factory reset?
Related
I'm running Android Kit-Kat 4.4.2. I've been able to configure a global proxy using the settings.db database in data/data/com.android.providers.settings/databases, which I've been manually altering using adb. To do this I've done the following:
Inserted a value into the global table with _id=99, name='http_proxy', and value='[proxy_host]:[proxy_port]' (obviously replacing [proxy_host] and [proxy_port] with their appropriate values).
Rebooted. This automatically generates rows in the global table with names: global_http_proxy_host, global_http_proxy_port, global_proxy_pac_url, and global_http_proxy_exclusion_list.
The global_http_proxy_host and global_http_proxy_port rows have been automatically given the correct settings (i.e. [proxy_host] and [proxy_port], respectively). The rest are empty.
The proxy works. For reference, I'm using Firefox for Android version 44.0.1 to test that it works. As long as the network.proxy.type setting has a value of 5 then this global proxy is respected (see this Mozilla knowledge-base).
When I enter a URL into the global_http_proxy_exclusion_list and test to see if it's been excluded, I'm still routed through the proxy. I thought that maybe I needed to reboot the device for the update to take, but on reboot the global_http_proxy_exclusion_list resets so that it is empty once more.
I've tried doing a web search for this property but I just get links to source code, which is not helpful in this instance.
I've also found this StackOverflow question which configures a proxy exclusion list programmatically. If this is the only way to configure such a list then it will make do, but I'd rather avoid it if I can.
I've been able to specifically configure Firefox with a proxy exclusion list using the network.proxy.no_proxies_on configuration option (and setting network.proxy.type to 1), but would like to know if there's a way to set a global proxy.
Use of an Android app would be an acceptable solution to this problem. I've installed ProxyDroid and configured a proxy but, as far as I can tell, this does nothing (or Firefox just doesn't respect the proxy). (For anybody who might believe that using ProxyDroid is the right answer here: I have rooted my device but still get messages from ProxyDroid saying that a rooted device is required. Is this normal?)
Is there any way for me to configure a proxy exclusion list in Android non-programmatically?
In order for your global_http_proxy_exclusion value to persist, I think you need to remove the old http_proxy entry. (In other words, only set the global_http_proxy_* keys.)
ConnectivityService implements a handleDeprecatedGlobalHttpProxy() method that looks at the old http_proxy key before generating a new ProxyInfo that gets persisted to the global_http_proxy_* keys. The ProxyInfo this method generates always uses a blank exclusion list, which I think is what's overwriting the value you set once Android boots up.
Running Lollipop, my exclusion list persisted after reboot when I removed http_proxy and just relied on the global settings.
Not able to understand WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, which is introduced in Android M. .However the definition in android developer site is very ambiguous.Please anyone clarify about this varible
WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN - is the defined user wifi configuration state (true means its locked, false means its changeable).
from android documentation :
http://developer.android.com/reference/android/provider/Settings.Global.html
This setting controls whether WiFi configurations created by a Device
Owner app should be locked down (that is, be editable or removable
only by the Device Owner App, not even by Settings app).
since Marshmallow this configurations have been changed and now are accessible only if you produce your own configuration per application using specific API's.
please refer to Android 6.0 Changes.
https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html
Your apps can now change the state of WifiConfiguration objects only
if you created these objects. You are not permitted to modify or
delete WifiConfiguration objects created by the user or by other apps.
hope it clarifies a bit.
I want to read the DeveloperSettings like - Bluetooth HCI snoop capture enabled/disabled.
Does Android provide an API for user applications to read this information. Is there a listener to which user space app can register and get a callback when value of DeveloperSettings change?
AFAIK you can access some of the properties on the Settings using for example :Settings.Secure.getInt(getContentResolver(),Settings.Secure.BLUETOOTH_ON,0);
I'm not sure about all the features available for developers. Also some of them need root to be modified.
I have a list of apps which consume high battery.
when I select one app, I want to "Restrict background data (Settings > Data usage > select app > Restrict background data)" for the selected app.
How Can I do this ?
Same question is asked at below link
Programatically toggle "Restrict Background Data"
And it says it can not be done.
You can run this command in the command line
svc data disable or svc data enable
You obviously need root to do that, like this:
Runtime.getRuntime().exec("echo svc data disable | su");
This should bring up root dialog if your device is rooted.
And it says it can not be done.
There is nothing in the Android SDK for this. Therefore, it is usually assumed to be impossible until proven otherwise. In this case, there is also a security aspect -- one app should not be able to control this setting for other apps, except perhaps on rooted devices.
You may try Reflection.I am not sure of it.
i have create custom WiFi setting UI in android application but i am struggle to get security name like (WPA/WPA2/PSK) i.e when user click on the WiFi list item so it display network information like Status , signal strength etc. all information accessed except Security.
i have tried WIFi configuration , manager but i am not able to get exact security name please help me how to get this thing
i am attach screen shot for more understanding.