Scripts to change system settings - Android Q&A, Help & Troubleshooting

Hi XDA Peoples,
I am a noob at android scripting and very new to modifying devices, however the company I work for is rolling out a lot of Samsung S3's and soon S4's to upgrade our device fleet ( we have 3500 employees). There are some settings that we change on devices like Owner information, screen timeout, Battery percentage being displayed, just some basic things. When setting up a few hundred devices manually though it can get tedious and a long process.
I am interested to know is it possible to create a script to modify these settings and run it via OTA or copy it to the phone and run it? I am not looking to root the devices as that would void our warranty and these are company devices. I am just looking to see if I can minimize the amount of manual handling I would need to do.
If people have references or knowledge they can share with me I would appreciate it
Thank you in advance I appreciate any help.

Related

hi

hey i'm new just curious what rooting means? and what it lets you do?
xstreetz said:
hey i'm new just curious what rooting means? and what it lets you do?
Click to expand...
Click to collapse
Google is your friend. But, can can start here.
Root Android the Easy Way
Add advanced features, customize the interface, and boost your handset's performance by rooting your Android phone.
By Robert Strohmeyer
Sep 14, 2010 5:00 PM
Google's Android operating system is riding a wave of popularity that has rapidly eclipsed Apple's iOS, and by the end of 2010 it's expected to overtake RIM's BlackBerry as America's leading smartphone platform. However, despite the relative openness and flexibility of the OS, your Android phone still isn't as powerful and customizable as it could be. To unlock all of your phone's potential, you'll need to root it.
WARNING: Rooting--adding superuser capabilities to your phone by altering its system permissions--is an advanced technique that the inexperienced or faint of heart should NEVER ATTEMPT. It's hacking, folks, and if done improperly it can destroy your phone. Do not follow any of the instructions in this guide or on any of the linked sites unless you are comfortable with the very real risk of turning your phone into an expensive brick. As of this writing, rooting is not supported by any carrier or manufacturer, and will most likely void your phone's warranty. In short: This stuff is for big kids only. No whining if things don't go your way.
Why Root?
With that very real and important caveat out of the way, there are a few really good reasons to root your Android phone. The simplest reason is that rooting your handset allows for some cool features that probably ought to be enabled in Android by default, such as on-the-fly screen capture, tethering capabilities (even on phones whose carriers don't allow it), and advanced firewall apps.
Android Superuser Request
Rooting Android gives you superuser access to your phone's OS, letting you do more than you'd be able to with a stock Android installation.
Rooting also lets you install custom ROMs that eliminate the annoying crapware many manufacturers and carriers include by default. In addition, custom ROMs can give you the latest version of Android weeks--or even months--ahead of the carriers' sluggish update schedules.
Rooted phones can take advantage of some great performance tweaks--such as CPU overclocking and improved cache management--that can dramatically speed up Android. You can take advantage of these options either by installing a ROM that includes them or by downloading apps from the Android Market that will automatically tweak settings on your rooted phone for you.
It would be a stretch to say that rooting Android is a necessary project for most users. In fact, most people should never even try it on their phones, just as most PC users probably shouldn't attempt to overclock their processors. But if you're an advanced user (or an intermediate user with a taste for adventure) and you know the risks, rooting can help you get a lot more fun and function out of your Android device.
Get Root
Until fairly recently, rooting Android was a messy process that required installing the Android Debug Bridge and hacking the phone from a command line. Fortunately, some industrious hackers have produced a few simple apps that can root your device in seconds with the tap of a finger. In this tutorial, I'll discuss two such apps--Easy Root (for the Motorola Droid, Droid X, and Milestone, and the HTC/Google Nexus One) and Unrevoked (which supports a variety of HTC handsets).
It's important to note here that although these one-click root apps are easy to use, they aren't completely trouble-free. For instance, as of this writing the developer of Unrevoked 3 is reviewing it to solve a problem with the HTC EVO 4G (but Unrevoked 2 is still available). And the latest version of Android, 2.2 (aka Froyo), will present new challenges for root users as carriers and phone manufacturers continue to try to block users from hacking their handsets. These obstacles are a basic reality for anyone attempting to root their device, just as Apple iPhone users must constantly adapt to Apple's efforts to block people from jailbreaking the iPhone.
Even though Easy Root and Unrevoked don't work on all Android phones, they do cover a broad swath of the Android universe. If you're interested in rooting a Samsung Galaxy or another device, however, you still have options--they're just not as easy. Because the state of Android hacking is constantly in flux, your best bet for phones not covered in this tutorial is to google "root" and the name of your phone, or to keep an eye on the discussions about your phone on a good Android forum, such as AllDroid.org.
Step 1: Download a Rooting App
To get started rooting your phone, you need the appropriate app for your device. If you're using a Droid, Droid X, Milestone, or Nexus One, you'll want Easy Root. HTC users with an Aria, Desire, Droid Incredible, EVO 4G, Hero, or Wildfire/Buzz will want to use Unrevoked. With either of these apps, your first step is to download the app directly from the developer's Website and put it in the root folder of your phone's SD Card.
Easy Root downloads as an APK file that's ready to run from the phone, so you could just download it straight onto the device and tap it in your file manager app to run it.
Unrevoked downloads as a zipped file with several files inside it. If you have an unzip utility on your phone, you can download and unzip it directly on your device. Otherwise, you'll need to unzip it on a PC and copy the appropriate file to the phone. Because Unrevoked comes in a few phone-specific files, it's generally best just to copy the correct file from your PC in the first place. The documentation on the Unrevoked site clearly explains which file to use for your particular phone.
Step 2: Install the App
Once you've placed the APK file for your rooting app onto your phone's SD Card, locate it with a file-management app such as Astro File Manager and tap it to start the installation. Follow the prompts to allow the installation. Once this finishes, the rooting app will appear in the phone's App Drawer. Launch it.
Step 3: Root It
Easy Root for Android
Easy Root's interface is as simple as it gets. Tap 'ROOT ME!' to root your phone.
This is the moment of truth. With your newly installed rooting app launched, tap the option to root the phone. (You may first have to tap past a warning or disclaimer screen.) Once you tap the button to root your phone, the app will spend a few seconds running a script that alters the system's user permissions to allow superuser access and install a customized recovery image on your phone's System partition. It will then present you with a screen that says you have root.
In some instances, running Easy Root or Unrevoked on a supported device and following all the instructions exactly can still result in an unrooted phone. If this happens to you, don't lose heart. The developers of these apps are highly responsive to user questions and feedback, and if you take care to document everything you did and all of the relevant settings on your device, you stand a good chance of getting the help you need to root your handset. Or, at the very least, you could provide valuable information that the developer can use to update the app and make it work on phones like yours. Just remember: Rooting is a precarious business for everyone involved, and these developers have put a lot of work into their projects with very little promise of reward. So be nice, even if you're frustrated.
Step 4: Reboot
Restart your phone to enable the new root permissions on your device. Congratulations--your handset should now be rooted.
Now What?
Gaining superuser access to your phone is just the first step in a vast new territory of Android exploration. Depending on which rooting app you're using, you may already be enjoying the performance and usability benefits of a host of enhancements included in your root recovery image. But there's plenty more to explore.
Barnacle Wi-Fi Tether
Barnacle makes it one-tap easy to add Wi-Fi tethering to your phone, even if your carrier doesn't support the feature.
If your phone doesn't support Wi-Fi tethering out of the box, you can now add it to your rooted phone. Barnacle is a good, fairly simple app that exploits root for tethering with or without your carrier's support.
Root users also have the option to overclock the phone's CPU to give it a serious performance boost. For this task, it's hard to beat SetCPU, which offers a friendly slider-bar interface for setting your phone's clock speed. But be careful: Setting your clock speed too high can damage your phone permanently.
ROM Manager
ROM Manager includes a variety of features that make replacing your phone's stock OS easy.
The ultimate Android hack is to replace your phone's default operating system with a custom ROM. You have many to choose from, and each has its own pros and cons. Some ROMs are designed for specific phone models, and not all Android phones support the installation of a custom ROM. As of this writing, the Droid X is particularly problematic in this regard, while handsets such as the Nexus One and Droid Incredible support a wide variety of ROMs. The best way to find, install, and manage ROMs is to run ROM Manager, which is available for free from the Android Market. ROM Manager Premium even offers a large list of available ROMs that you can download straight from the app itself.
Have Fun
By now you should have a pretty good handle on working with a rooted Android device. I've attempted to cover all the basics in this guide, but there's no shortage of additional tips, tricks, and advice that can help you improve how Android functions. If you have some tips of your own to share, please chime in with a comment. And if you think my attempt to simplify the process has resulted in a significant error or omission, please let me know by e-mailing [email protected].
Click to expand...
Click to collapse
thanks will do some reading

Android TV Patient Entertainment system

Hello all,
As you can no doubt tell I'm new here so please be gentle. If there is a better location for this post please let me know. So my situation is that I am one of a few building on a system for work (a non-profit children's hospital). What we're attempting to do is replicate some of the functionality of commercial and often expensive in room entertainment systems using more inexpensive open source gear. As it stands we've purchased a few small Android TV type boxes and have had good success getting them to do all of the things we want (play games, movies, and television mainly).
My primary responsibility is surrounding what the ongoing maintenance and support of a system of these boxes installed in every patient room might look like. The current thought is to not put too much time into trying lock down the devices but instead build a system for wiping and re-initializing the boxes on patient discharge. I know I can configure the ADB connection daemon on the device to listen to the network instead of the USB port. There isn't any security around the connection but these devices will live on a separate dedicated network anyways. So assuming I know the device name and IP I should be able to issue ADB commands to it through a script which can be triggered on the patient discharge event in our systems. This would allow me to effectively issue a factory reset to the device which should get rid of any changes or content made by the last patient.
What I'm not so sure of is how I can get the device back to the exact state we want it to start out in for the next patient. I suspect that there is a way I can package a custom ROM with the settings/applications I would like configured and have that loaded onto the device as the factory image but I have no idea how to go about that and I haven't had much success searching for the solution. Most of the custom ROM building advice is lower level than I'm looking for and gets into actually compiling and building a true custom OS and to be frank that's probably a little bit past my skillset. I'm really only looking to get the stock OS (or a community ROM), a few applications and ideally even some system settings (name, network config, etc) baked in as a base image.
Any advice/suggestions would be greatly welcomed. Thank you.

System Managed Devices

Howdy, folks. I hope someone can help answer this question. Mods, if I posted this in the wrong section, please relocate.
I'm helping a friend who is expanding his business by hiring 3 field sales reps and they need to be provisioned with smartphones and tablets for doing quotes, reviewing e-blueprints, accessing email, and so on. So, that's six devices in question, with more to come.
There's a question about whether iOS or Android is the better platform for what we're gong to need. Yes, I know XDA is Android-centric, but this decision isn't about what I want to do, but about what's right for his business. So, your honest input is appreciated.
Essentially, what I think we need is an ACL Management utility of some sort that will support these functions:
Remote access to configure devices in the field
Track and 'nuke' devices if lost/stolen
Remote backup of data/settings
Remote install/configuration of apps by managment
Enforce password protection
Good antivirus/malware/firewall software(?)
Prevent users from installing or deleting data/apps
Prevent users from changing settings
Though I have some technical skills, a 'dashboard' style interface to manage the devices and set a group policy would be preferred. I am aware of Android Device Manager, but I was unable to determine if it will do all of the above that we need.
If you think I've left anything out, please let me know.
Thanks in advance for your help!

VoLTE Carrier configuration

Hello,
I'm working for a telecommunications company in the UK, we are currently deploying a IMS / Volte solution, we have spoken to handset manufacturer vendors regarding the addition of our carrier configuration to support VoLTE, however this is proving difficult and long delays, I'm hoping someone is able to support us in editing or creating a new custom carrier configuration file with our specific parameters and settings,
We have access to various handsets, we have currently rooted a S9 and s9+ in the hope of creating these profiles but we can only view them, for example we installed EE UK CSC, but we can’t edit or add a new profile
Is anyone able to assist, your time and effort will be rewarded
Thanks, Regards
I feel for you, trying to get cooperation out of any of the manufacturers. One problem with what you're trying to do, though: Even if you were successful at modifying the rooted devices you have to accept your carrier IMS profile, that really won't help end users unless the manufacturer helps out. Whatever fix you would discover would no doubt require rooted access to the file system. That's something the vast majority of users won't be able/willing to do to apply the configuration.
I wish you the best. I can believe it's not easy to get them to help.
Thanks for the reply, it’s almost the chicken and egg scenario, we have completed installation of our IMS / VoLTE solution but need to test service, once we are confident on all the parameters and settings we need, we can provide this information to the manufacturers to add our carrier configuration to the OS, but the handset tech teams won’t be able to support until Q4 this year. Am I looking for a Google / Android developer for this?
Thanks, Regards
kieran_je said:
Thanks for the reply, it’s almost the chicken and egg scenario, we have completed installation of our IMS / VoLTE solution but need to test service, once we are confident on all the parameters and settings we need, we can provide this information to the manufacturers to add our carrier configuration to the OS, but the handset tech teams won’t be able to support until Q4 this year. Am I looking for a Google / Android developer for this?
Thanks, Regards
Click to expand...
Click to collapse
Ah, so then you're not looking to develop something for end users to deploy right now. You just want to get it working so you can tell the manufacturers what you need included in the stock OS. That makes way more sense. An Android developer would be useful, but mainly someone on the telecom side to know the parameters would be needed. It should just be editing stock configuration files, unless there's some weird authentication you need to do above and beyond the normal LTE stuff.
No. We're doing it in phases. We will allow inbound users on our network first. Then we'll open to our local customers after a period of time. We know what we need to configure to enable VOLTE, but we don't have access to those configuration files. Rooting obviously doesn't give enough access. Is there anyone online that would be able to support that you know off?
kieran_je said:
No. We're doing it in phases. We will allow inbound users on our network first. Then we'll open to our local customers after a period of time. We know what we need to configure to enable VOLTE, but we don't have access to those configuration files. Rooting obviously doesn't give enough access. Is there anyone online that would be able to support that you know off?
Click to expand...
Click to collapse
If there is, this would be the place to find them. Hopefully this is the forum. Sorry, I don't work for a manufacturer, or I'd help you out more directly.
BUMP, anyone able to support in this request. hoping to build a custom carrier configuration file to support a telecoms operator test VoLTE / IMS features
Thanks
kieran_je said:
Thanks for the reply, it’s almost the chicken and egg scenario, we have completed installation of our IMS / VoLTE solution but need to test service, once we are confident on all the parameters and settings we need, we can provide this information to the manufacturers to add our carrier configuration to the OS, but the handset tech teams won’t be able to support until Q4 this year. Am I looking for a Google / Android developer for this?
Thanks, Regards
Click to expand...
Click to collapse
I am interesting in this, i already pm you with my email . Let me know. thanks
If you know what files or folders you need to access, root does give you access. It sounds like you need to research some basic Unix commands and change permissions for the files/folders that you need to access. Root gives you full access to the entire system with super user (SU) privileges.

How to find Info/Errs from an Android App Crash to steer toward App's bad Settings?

I'm a long time developer but brand new to Android, with my having past experience developing in Unix systems as well as a lot using Cygwin in Windows. I have a newly-installed App that seems popular called 'C Locker'. So far, I've just got the Free version because I'm trying it out to see if it does what I need. Unfortunately, it's now crashing with the Settings that I've enabled, and as a general developer, I'm interested in seeing if I can glean information from the Bugreport (or whatever else I can use...perhaps even gdb on the device itself?) to help me know what specific Settings might be the problem being that there are so many of them and I would prefer to gain some type of help from my phone in figuring out what the bad settings might be that I've enabled that are causing the problem rather than to spend all day flipping them around. I've already scanned through the Bugreport after uploading it to my computer, examining all of the references it makes in there to "com.ccs.lockscreen" with this apparently being the process name for the C-Locker program. I've seen indications in there where it indeed shows that it has crashed, but I couldn't yet discern if it is able to give me pointers as to what the cause of the crashes might have been. Is that possible to gain such information out of these Bugreport files? Or is there a way to run it directly in gdb on my device to perhaps see the stack at the time that it crashes, for which the names provided might help to discern what specifically it was trying but failing to do at the time? If it helps, as an intended future Android developer, I've already gotten Android SDK set up on my computer, although I haven't yet really used it much to speak of for anything. I also have adb working from my computer to the smartphone and even have rooted it using a rare method being that I have an older phone purchased years ago via Amazon that I didn't activate until about a month ago. (It's an LG G4 VS986 version 13B so I couldn't use the popular rooting method for version 11A but instead had to use the "Injection" method which took me FOREVER although I finally got it to work!) And just in case it helps perhaps even to bypass a direct answer to this question (although it will still of course be appreciated), my Settings within C Locker involve having set it to be a Device Admin and to bring it up as the first App upon Reboot as well as I've selected within the Root category to make it a System App as well as my then having Disabled ALL things that typically show on the screen (such as 9-1-1, camera, Etc). I had left it set to the default "Gesture" Unlock method, but whenever I bring up the App again and go into "Unlock Methods", it now immediately crashes each time (as well as upon Restarting the phone!). So this covers the majority of the most significant of the Settings that I've made on it so far to the best of my recollection. And I feel that if I could get some indications from the system as to what the specific errors may be when its crashing (or from a stack trace or whatever else), then it might help me to discern what specific Settings are creating the problem being that perhaps I just have an odd (rare) combination of Settings on it that I can tweak to get it working. My goal is to ultimately get a lockscreen App that I can use a Pattern type Unlock with that allows an UNLIMITED number of Failed Attempts (so that it won't ever Factory Reset my phone after the 10th or ANY number of failures!!!). I also--as mentioned above--don't want ANY shortcuts whatsoever being accessible BEFORE the phone is unlocked...not even 9-1-1. Anyway, so if there's a way to glean information from the Bugreport (or from whatever other methods available) to find the specific cause (involved errors) of this or any other App that's crashing that I do NOT have the source code for (being that I of course am not its developer) then it will be greatly appreciated to know how to best find this information. (And I promise that I've already searched extensively on Google but couldn't filter out its replies all being based on the idea that I'm the developer of the App that's crashing, with my even trying adding phrases such as "not my app" and "not the developer of" Etc to no avail...lol). Thanks.
By the way, if I shouldn't have combined the 'C Locker' Settings details into this post, then please just let me know because I'm new to posting here. Also, unfortunately, if I don't receive any help with this right away, then I'll be forced to start testing different Setting combinations anyway, which would then of course solve this problem but without knowing truly what exactly was causing the issue. Even if so, it will still be helpful in the long run with other potential App crashes to get the answer to this general question.
Unless not disabled by user, all runtime activities in Android are logged, so app crashes and their reason also. You can view this log by means of Android's logcat command-line tool or by means of a LogCat Viewer app. My POV: logcat is essential for determining what an app and the Android OS are doing while the app is running on a device.
BTW: Android's log can be filtered per package, too.
Thanks!
jwoegerbauer said:
Unless not disabled by user, all runtime activities in Android are logged, so app crashes and their reason also. You can view this log by means of Android's logcat command-line tool or by means of a LogCat Viewer app. My POV: logcat is essential for determining what an app and the Android OS are doing while the app is running on a device.
BTW: Android's log can be filtered per package, too.
Click to expand...
Click to collapse
Thank you, and since posting this, I've been learning more about Android Studio and have used it to actually see the stack trace within the "Android Monitor" pane there in order to find the instant reason why the/ANY (meaning 3rd party as well) App is crashing at the time! Thanks again for the help!

Categories

Resources