text:
Turn on USB debugging using command-line
I have a Samsung Galaxy S2 and a PC running Debian 8. How can I turn on USB debugging using command-line on my PC without touching the phone?

This question is for the Galaxy S3 but is very similar but unfortunately does require root : http://android.stackexchange.com/questions/120394/can-i-enable-usb-debugging-using-adb

If I may ask, what are you aiming to achieve by doing this? There may be a better way to do it.

USB Debugging is activated on the device... You cannot do this "remotely" since without USB Debugging, you can't execute the proper commands to enable/disable it, or give your computer authorization to use USB Debugging. You must be able to physically use the device to enable this feature.

@acejavelin: you can enable USB debugging using an SSH server. If the Android is rooted, run an SSH server, get remote shell access on PC and make changes.

@Firelord True... The user made no mention of root or being non-stock, guess I shouldn't have assumed. This would still require interaction with the phone though to enable SSH.

If the question is simply "using the command-line"
Let it be simple (root possibly[1] required):
settings put global development_settings_enabled 1
settings put global adb_enabled 1

And then you need to
echo "mtp,adb" > /data/property/persist.sys.usb.config

If you want to do this without touching your phone
Then I'm feeling interesting because in most cases you won't gain access to command line via PC before enabling ADB, so it's impossible to enable this prior to touching your phone.
It is in any case possible but made extremely difficult. Please also bear in mind that if your bootloader hasn't been unlocked yet, unlocking it will wipe all data on your phone, making this alternate way mostly useless except for rescuing a brick.

1. Actually you only need either 'system' or 'shell' privilege, but 'system' is impossible to access without rooting and 'shell' is granted only if you're already logging in via adb, where it makes no sense to enable adb while it's already active.

Hm, and that works "using command-line on my PC without touching the phone?"

@Izzy See edit.

Yupp. Exactly those were my thoughts :) So taking the question literally, the only valid answer would be: "Not at all."

@Izzy Let's say, assume only the title is taken, this is actually a valid answer because it involves no GUI. Grab a terminal emulator and you'll find it right :)

Yes, that's how I've seen it. Haven't yet verified it, but +1 though :)

@Izzy I legitimately had a situation in which this was necessary... over adb.

Sorry, @NonnyMoose – but I don't get it: how can one use ADB to enable ADB? That's a henn-and-egg thing to me.

@Izzy I had temporarily enabled adb somehow, and needed it to be permanent.


text:
How to find out which app is trying to open spam websites?
I've recently bought a new Android smartphone. After setting it up and loading my contacts onto it I thought that would be it.
Now after some days, every time I unlock the phone it takes a few seconds before it opens the default browser and opens some spam website. I tried to see what was causing it. I removed any apps I didn't know I could trust, but the problem persisted. After trying to solve it for some time I gave up and reset the phone to factory default. Now after having it reset to the default it ran without issues for roughly a week before the problem reappeared.
I tried to uninstall some apps in order to see if they were to cause of it, but nothing changed after doing so. However I did notice that if I turn off the wifi it won't even try to open the browser (I haven't tried mobile data since I don't have a bundle). This makes me feel like it might be related to something on the network but that wouldn't explain why only that phone would have the issue when there are at least 6 android phones on that very same network.
I hope that there is someone who can help me find the cause of this issue and help me solve it.
TL;DR
When unlocking my phone, it opens the browser and tries to open a spam website. But only does so while connected to the wifi.
Things I've tried so far:

Factory reset (only helped for a limited time)
Clearing the browser cache and all related data
Removing any app I don't know to be reliable
Attempting to find what triggers it (seems like some type of internet connection is required??)

The device is the Doogee Shoot 1. As for the browser, the default is set to be the Android browser, but if I change the default it would use Chrome just as well. It seems to really just use the browser that is set to default.

I suffered the same problem. I detected the root cause, in my case APK Extracter Lite was the reasıon.

Related: How to view network traffic requested by a specific app?

Comments are not for extended discussion; this conversation has been moved to chat.

Based on the troubleshooting OP did following my advices, the culprit appeared to be a system app as a malware named System Locker
with package name com.tihomobi.lockframe.syslocker. The issue appears to be a result of a system update, per some users of the device.
As usual with a system app, if you get to use the Disable option under Settings → Apps → System apps/All apps → the culprit, than by all means, do disable that app, force-stop it or reboot the Android. The issue should stand resolved until you factory reset the device.

Troubleshooting #0
Before you begin with a bit technical steps mentioned below, you would want to try a rather user friendly solution suggested here. It that doesn't work for you, than come back and follow the rest of my answer.

Troubleshooting #1
Here's how I found out the culprit. The in-built Android tool dumpsys inter alia shows which app was called by which other app. The caller is referred to as Calling Package.
Provided that you have setup adb and usb-debugging successfully in the PC and Android device, do the following:

keep the device connected to PC

reboot the device or force-stop that default browser app

let the malware do its job, that is, have the browser be launched automatically

as soon as the browser is launched, do nothing with the device physically, but run the following adb command on PC:
 adb shell dumpsys activity activities

Here's the output from OP's device:

ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)
Display #0 (activities from top to bottom):
  Stack #1:
    Task id #2
    * TaskRecord{8190ba1 #2 A=android.task.browser U=0 sz=1}
      userId=0 effectiveUid=u0a64 mCallingUid=u0a26 mCallingPackage=com.tihomobi.lockframe.syslocker
      affinity=android.task.browser
      intent={act=android.intent.action.VIEW dat=http://im.apostback.com/click.php?c=362&key=9wl83884sg67y1acw3z56z90&s4=8%2FdNwcNuQFEjjaucho5IqA%3D%3D flg=0x10000000 pkg=com.android.browser cmp=com.android.browser/.BrowserActivity}
      realActivity=com.android.browser/.BrowserActivity
...
...
Hist #0: ActivityRecord{66cd59b u0 com.android.browser/.BrowserActivity t2}
          packageName=com.android.browser processName=com.android.browser
          launchedFromUid=10026 launchedFromPackage=com.tihomobi.lockframe.syslocker userId=0
          app=ProcessRecord{5ad1810 4337:com.android.browser/u0a64}
          Intent { act=android.intent.action.VIEW dat=http://im.apostback.com/click.php?c=362&key=9wl83884sg67y1acw3z56z90&s4=8%2FdNwcNuQFEjjaucho5IqA%3D%3D flg=0x10000000 pkg=com.android.browser cmp=com.android.browser/.BrowserActivity }

In the output: :

com.android.browser is the package name of stock Android browser in your device
com.tihomobi.lockframe.syslocker is the package name of the malware app and is referred as calling package.

If you've found the malware, avoid next troubleshooting and skip to the heading Nuke the malware.

Troubleshooting #2
(In response to a duplicate posted here -- the culprit app was Farming Simulator 18)
In certain circumstances, aforesaid troubleshooting may not be able to help, such as when calling package name is the package name of the browser itself shown in dumpsys output. In that case, prefer logcat. Setup logcat like this:

adb logcat -v long,descriptive | grep "dat=http"   # you can grep anything from URL too. It is purely up to you.
adb logcat -v long,descriptive > logcat.txt        # alternative; if grep is not installed in your OS. You need to search into that file now.

Now unlock the device and let the browser with that URL be launched automatically. Also, press Ctrl with C if you are saving the output into a file.
The output we're seeking would look akin to:

[ 11-27 16:03:22.592  3499: 6536 I/ActivityManager ]
START u0 {act=android.intent.action.VIEW dat=https://livemobilesearch.com/... flg=0x10000000 pkg=org.mozilla.firefox cmp=org.mozilla.firefox/.App}

from uid 10021
...

[ 11-27 16:03:22.647  3499:15238 I/ActivityManager ]
START u0 {act=android.intent.action.VIEW dat=https://livemobilesearch.com/... pkg=org.mozilla.firefox cmp=org.mozilla.firefox/org.mozilla.gecko.BrowserApp}

from uid 10331

See the two highlighted UIDs 10021 and 10331. One of them (they would be different in you case) is for the browser app launched, and one of them is malware app requesting that URL. So, how to find what is what?
If you've root access, simply do:

adb shell su -c 'ls -l /data/data/ | grep u0_a21'
adb shell su -c 'ls -l /data/data/ | grep u0_a331'

Output would be like:

drwx------  5 u0_a21    u0_a21    4096 2018-01-01 10:31 com.android.chrome
drwx------  5 u0_a331    u0_a331    4096 2018-01-01 10:31 com.tihomobi.lockframe.syslocker

If you don't have root access, do:
adb shell dumpsys package > packages_dump.txt

Now search for the line with your UIDs such as "userId=10021" and "userId=10331". The line above the line searched would give you the package name, and may look something like this:

Package [com.android.chrome] (172ca1a):
    userId=10021
...
Package [com.tihomobi.lockframe.syslocker] (172ca1a):
    userId=10331

The two package names are com.android.chrome (for Chrome browser -- certainly not a malware) and com.tihomobi.lockframe.syslocker. To know the app's name from package name, use my answer here.

Nuke the malware
Now that you know the culprit, you can disable it through GUI as stated above. If that is not possible, do:

adb shell pm disable-user PKG_NAME  # disables the app
adb shell pm uninstall --user 0 PKG_NAME # removes the app for primary user
adb shell am force-stop PKG_NAME # only force-stops the app

Replace PKG_NAME with package name of the malware you noted in the troubleshooting above.
That should do the trick. Furthermore, you can also consider removing the malware app permanently for all users, but that requires root access though.

So I was having this same issue and I kinda stumbled on a simple way to fix it.
First thing I did is I reset all the browser defaults so if ANY application wanted to open a browser it needed to ask me permission and then I can select which browser I wanted it to use.
Second I installed a browser I have never used... went into its settings and reset all its defaulted programs too so it couldnt just piggy back onto the new browser.
Then when it prompted me to select what browser that I wanted it to use I told it the new one I installed and told it to use that as default so it would put it in the browser.
I then went into the browser and found the only app that is set to use it as a default. It also showed me the last time it was used by that program and that time matched the time I told the spam thing to use the new browser as default.
In my case it turned out to be my QR code reader... I did notice its icon had changed a couple months ago. So it was either bought by a company that changed how it worked or the company was hacked and so it traveled down.
And as far as the browser goes I used the Samsung browser but I am sure the reset of them will have that last used part to make it easier for you to track down.
Hope this helps. :-)

Related for this specific malvertisement app: Finding and removing Android adware that opens Chrome tabs when unlocking the lockscreen

Inspired by the Firelord answer I investigated logcat in very simple way and found the quilty immediatelly - it was Barcode Scanner by the The space team.
The steps:

Connected my Galaxy Note 8 to PC, open CMD and took the logcat with basic command from withn CMD prompt:

C:\Users\igorn> adb logcat > note8.1.log

As soon as the new tab with spam page was opened, I stopped the logcat capturing immediately by Ctrl-C and searched the log for "chrome":

grep -i chrome note8.1.log

Last ten of found lines revealed the suspicious:
02-03 09:43:14.443  3931  4232 D GameManagerService: handleForegroundChange(). pkgName: com.qrcodescanner.barcodescanner, clsName: kotovich.kotovich.kotovich.kotovich.ScannerChromeActivity,FgActivityName:com.qrcodescanner.barcodescanner/kotovich.kotovich.kotovich.kotovich.ScannerChromeActivity,userID:0

Than I went to application list in device settings and saw the Barcode Scanner. Checked it on GoolePlay and found a plenty of 1-star reviews for exactly same malware behavior!
As well I noted that this application got last update two days ago, that match perfectly the timing - the problem started to appear exactly two days ago! Bingo!

Uninstalled it and the problem gone! Happy end :)

For infomation only: neither of other approaches like installing BitDefender, MalwareBytes, etc worked for me, so I was simply happy to sort it out!
So thank you, Firelord!

Related for this specific malvertisement app: Finding and removing Android adware that opens Chrome tabs when unlocking the lockscreen

Slightly more information needed to solve the issue, although I will attempt to find the possible problems. Which browser? What phone model? Was it purchased from official sources?
In theory factory reset should have helped you with the issue. Since it didn't, there are a couple more places where you can get some form of adware. First of all, you said uninstalling some apps? Which apps in particular? Did it appear after installing a particular piece of software?
Is it your wifi or are you using a public one? If its public one, usually companies send app install and advertisements requests through wifi relatively often. If you live in/near a busy area, wouldn't be surprised if that would be just someone using to advertise their product. Try using different wifi or someone else's wifi, see if the problem persists. If it doesn't. It is an issue with the network you are using, which means you are most likely going to need to change. You could try contacting your provider to help you with that (Had an issue like that before, my ISP providers helped me after contacting support). Also, see if the mobile network shows the same problem. If it doesn't, then your option would be to change the network you are currently using.

The apps i meant were all installed from the appstore but I do realize that not all of them can be safe at all times and sometimes things get past the security of it. so I tried to remove some that i didn't know if they were completely safe or not. as for the internet, it is a private network and I dont live in a crowded area. But since im using a Pre-Paid card would mean trying the mobile data becomes expensive. I might try something using the pc as a hotspot see if that has any diffrence from the wifi directly.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
What can cause "Android OS" process to use high percentage of battery?
I've read a bunch of forum posts about the Android OS battery drain bug. This is where the 'Android OS' process is showing large percentages in the battery statistics.
For me, I'm running 2.3 Gingerbread. I don't use bluetooth or GPS. I'm on 2G most of the time. Some days I get 40 hours out of a battery. On these days in the battery usage settings, the 'Android OS' process uses about 3% of battery. However other days I get about 8 hours with similar use. On these days the 'Android OS' process uses about 35% of the battery. I really want to find out what causes this.
The fixes suggested so far are:

Reboot (Temporary).
Turn off and remove battery for a couple of minutes.
Reset battery stats.
Change WIFI sleep policy.
Use a task manager
Flash stuff to the phone.
Revert to older versions of the OS (not really a fix).

Does anyone know the definitive cause of this problem and the correct fix? Or is it possible there are multiple issues that cause this so different things will work for different people?
Here are some of the threads:

FIX and INVESTIGATION: Android OS (battery drain) problem on Gingerbread
Fix- Battery drain 2.3.3 - high android OS
S2 Battery Drain Problem - solved for now
Issue 16721:     Android OS 2.3.3 Battery Drain

For what it's worth, I haven't seen this. Can you please add your device and carrier to your message?

This depends very heavily on what OS you are running?  2.2-Froyo?  2.3-Gingerbread?

Running 2.3 Gingerbread.

Why the downvotes? This is a legitimate question. Many Android users including myself have trouble with battery time and, by observation, on some phones battery drain is connected with "Android OS" appearing to consume more than 30% of battery charge.

I believe, there is at least one bug related to "Android OS" and battery drain. I'll outline how to reproduce the issue: (Tested with Motorola Flipout, Blur_Version.0.28.9_MB511.Retail.en.DE (stock ROM the phone was sold with), Android 2.1.)

Start with a fully charged phone.
Download the Audiobooks (free) app and launch it.
Choose a book from the free library and listen.
Send Audiobooks to the background, e.g. by clicking home button.
Go back to the Audiobooks app by the same operation you used to start it, e.g. click the icon in the app drawer. (This is the only way I am aware of to get the app in the foreground again.)
Do whatever it takes to stop the audiobook playback. (There is a "shutdown player" button, but I never get to use it, because the player just stops/disappears before I can navigate to the player screen.)
Leave the phone idle. After 8 hours the battery will be almost flat (<15%). Android's battery usage monitor attributes 33% of the batter consumption to "Android OS". The remainder is split between "cell standby", "phone idle".
Shut down the phone. Switch it on. Recharge.
Leave phone idle.
After 8 hours, check the battery status (>50%). "Android OS" does not show up as draining battery.

Whether this is a bug in the Audiobooks player or Android or both is not clear. However, this does not appear to be normal behaviour.

I just had this problem. I think what caused it was that I had removed some email accounts (but not the app) and the data continued to poll for something in "running services" in applications. This caused "Android OS" to consume up to 43% of "battery use". In less than 8 hours the phone was dead.
After the app had its "clear data" activated, I also tried it with all apps that I had installed but seldom use. It then went down to 13%! Proves that the "removed" cache data had something to do with it.
Cheers

On my Galaxy S2 media scanning stuck and battery drains completely in 8 hours at night without using.
Battery usage was like:

Android OS - 30%
Media - 28%
Display - 25%

I cleared Media Storage data and the issue resolved:

Settings » Applications » Manage Applications >> All >> Media Storage >> Clear Data

What I noticed:
media scanner starts and drains battery and my Galaxy S2 became hot quickly for long minutes when I unplug the usb connection with my computer.
It was same on 4.0.x (currently I got stock unrooted 4.1.2 on Galaxy S2).
I have a lot of media files in phone memory and on the sdcard as well.
My workaround without root (seems works):

Go to Settings > Apps > All
Find "Media Storage", tap on it
"Disable"
"Force stop"

Edit:
What I noticed since I'm using this workaround:

ringtones doesn't work
Gallery app doesn't work
Video Player app has failure as reported by wbogacz (thanks)

I miss Gallery and ringtones a bit but I'm still continuing to use this method because the media scanner problem is more annoying for me. I'll update again if I notice other differences.
Update:
Few months later I still miss the ringtones and notification sound but I can live without it. Meanwhile I've installed the Flash Notification app and I love it. :)
https://play.google.com/store/apps/details?id=com.manzy.flashnotification

This recommendation causes failures of "Video Player" to find media, and "Gallery" to display photos from the phone. Restoring Media Storage to Enable, and opening Video Player and Gallery restore useability.

It causes another problem what I noticed: I unable to choose ringtone and notification sound in preferences.

Basically you are answering your own question.
To begin with I'll go with BMitch, this is NOT a bug. There are various reasons for high rate of battery drain. Also it depends a a lot on the firmware, android version and device you are using. For example : I have a Samsung Galaxy 5 device. Initially it came loaded with Android 2.1 and a pretty poor battery life of utmost 2 days. I rooted my device and I saw a significant increase in battery life of around 3 days without charging. Next I gave a tried out a custom ROM for my handset and the battery life inreased tremendously to 5-6 days and when I upgraded to gingerbread its back down to 2 days. Also it depends on how you use your phone.

Some apps keeping running in the background and eat out battery life. Try avoiding them. Alternate solution would be using a task killer.
Excessive Data usage (over WiFi/3G) also reduces charge. Switch off wifi and turn on to 2G network when not using the internet.
Keep Bluetooth off when not using it since it also eats charge.
Turn off GPS when not using any kind of map apps.
Also there is one method many people have vouched to be working. This is be deleting the battery calibration data and forcing the system to make a new one. This however does not increase battery life. It one fixes battery mis-calibration. This app does the job.
Using some battery saving apps like Juice defender. It basically does some of the above tasks in an automated format.

Hope this explains it.

Thanks. While helpful, most of this is just general battery savings advice. I was specifically trying to find out about the 'Android OS' process. I've updated the question a little to explain better.

Okay to this question, it really depends on various factors. I can only provide instances and some cases. For example gingerbread on galaxy 5 uses a lot of battery especially when the orientation sensor is on because the refresh rate of the screen increases abnormally. Similarly each ROM will probably have it own reason. You should probably question the dev team of your ROM.

many badly coded apps on loss of network continuously keep polling till connectivity is restored, this can cause massive battery drain.

Another reason your cell phone battery can die quickly is that your cell phone is being monitored or bugged by be someone who had to download a spy program which runs in the background all the time. And depletes your cell phone battery quicker. Check for suspicious programs on your phone.

This is true, battery depletion occurs for any background process. Labeling or pointing deliberately to a "spy" program for instance, leads me to suspect you have not considered the nature of "spying", which is a covert activity. Anyone placing such an app covertly would want it to be as slight an impact to system draws as possible to be more effective.

Start by not calling it a bug.  There are lots of causes of battery usage, just like there are lots of things that will cause the electric meter to spin.  A short circuit needs to be fixed, just as a bad application needs to be removed.  A task manager is similar to having someone run around behind you and turning off the lights.  And various settings can be tweaked to get more out of the existing system, just like you can switch to CFL bulbs.  There's no one fix, because there's no one reason.

Really looking for something more specific as to why the Android OS process would be using such a high percentage of battery?

@sickgemini, OS = Operating System, not a simple thing with a single switch.  Some people have issues with misbehaving apps not suspending, others have hardware issues, or perhaps a network problem.  Everything touches the OS and the OS touches everything, and should one of those things malfunction and get in a tight loop, it will eat CPU.  There is no easy "specific" answer that will solve the problem for everyone.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Using Activesync with folders in inbox
I recently purchased Note II and am using the stock email. This is a exchange connection and use rules to push email to folders. I can see the folders and get notifications when new mail arrives however if more than one email arrives and is pushed to different folders the notification does not indicate where the email is and so the search begins. The folders do not show unread emails only all emails in the folder read or not. Any ideas.


text:
Alarm Settings on Samsung Galaxy S3
Since updating to Jelly Bean, I can no longer change the settings of my alarms on my S3 i.e snooze (time in between, length), activate smart alarm, change the alarm tone etc... When I click more, it just lets me change the volume. Can anyone help?

Could you give us a screenshot of what "more" you're referring to?  I do not see any such thing to click on on my GS3 and you just scroll down to see the options you're referring to.

Are you still using the "Clock" app? I have JB too, I use Clock to set alarms and I can set all of these options.

After you tap "more" you can scroll down to change more than just the volume. I didn't think there was anything else, either, at first.

In case you haven't figured it out yet, (or for future reference):
From the clock app, tap on the alarm in question. You'll be brought to the original settings you saw when you first set it. Tap on more at the bottom.

I'm not sure, but since you updated to JB, It may have other stock alarm app, so it wouldn't be some bug. Although you can download an app for this, like Xtreme Alarm which is free.
Or you can search on XDA forums the stock alarm APK for ICS. I've found this topic, which lists a lot of stock apps for downloading.


text:
link 2sd working but apps not move to sd card
I created second partition on sd card. But when I mood apps to sd it's showing insufficient storage available on sd card. But my sd card total blank

May sound like a stupid question, but did you also format the new partition? Without having a file system (i.e. being "formatted"), it is not useable for the system to store files on it.

link2sd will not move apps to sdcard but it will link  2nd partition with system
1)Format your 2nd partition of sdcard  and try it


text:
Disable Slide to Lock
I have a Cruz T301 which is rooted.  The screen calibration is a bit off and I cannot access the home screen. (It is next to impossible to use the slide to unlock.)  Basically, it will slide to the right, but not far enough to unlock.  I know that the app "nolock" will correct this problem, but since I cannot even access the home screen, I am unsure how to turn on this app.
I have tired three different ROMS (Official Cruz, SJHill, and the Davik.)
If I could find the ADB shell command to disable the slide lock, I think I could save this tablet.  I have tried the adb shell input keyevent 82, but it will not work.
I also have Android Commander installed on my PC.  With this I can install apps, just not access the features.
Any help would be appreciated.
Thanks...

Have you tried installing the No Lock app from the web-based play store?

@TomG I guess he had -- or he wouldn't have it mentioned in his Q: I know that the app "nolock" will correct this problem, but since I cannot even access the home screen, I am unsure how to turn on this app.

@Izzy - I meant that he should install it from the web store, which might turn it on automatically (the description in the store seems to indicate that it is enabled by default).   Some Android users don't realize you can trigger an app install from the web.

@TomG Ah, I see. You didn't give that reason initially, so Todd might have missed it as well ;)

authors: ʇolɐǝz ǝɥʇ qoq


text:
Want to root Using windows which is on VirtualBox.How do i make it recognise the fone when phone is off?
I want to root my phone (Micromax A52) and i got the procedure.
But I use Ubuntu for everyday use and now for rooting i need Windows.
I installed it in virtualbox. Now in vbox,the usb device is recognised only if the host recognizes it.
But with the phone off for the flash process, how can i make the guest windows recognise the phone as ubuntu does not recognise

You might get better results with VMware.

If you have the ADB drivers on Ubuntu, try performing the tasks of installing busybox and su manually as detailed here - http://androidforums.com/a52-all-things-root/586982-how-root-any-android-device-manually.html
The author has used Nautilus on Ubuntu to perform the requisite tasks. YMMV, though upon reading through the thread.
As a workaround, perhaps you could use the root methods detailed in the relevant XDA thread(s) on a Windows machine.


text:
Network connection lost when receiving or making a call using Samsung Galaxy S2
Recently noticing that while making or receiving a call, the net connection on the Galaxy S2 is lost. Once the call is over, the connection is restored automatically. OS is android 2.3.6 (gingerbread).
can anyone please help if it is a handset problem or any setting that needs to be updated.

What cellular carrier are you using?

This is absolutely normal. GSM connections cannot maintain a data and voice connection at the same time. The S2 can, and will, however be able to make a voice call and still continue using a WiFi data connection.
This is true for MOST cellular providers in India, UNLESS they support the DTM protocol (highly doubtful).

GSM networks typically do support simultaneous voice/data, though. If they don't then the network is basically failing to meet the 3GPP specs (DTM was part of R4 of the spec, which was originally finalized around 2001). Not to say it's impossible, but if that's the case...ick.

@eldarerathis - speaking from personal experience as I have connections with two separate service providers (in India).


text:
How does Google Play determine the region on a tablet without SIM card
I know Google Play uses SIM card to determine the region on cell phones. And I know Market Unlocker and Market Enabler.
How does Google Play determine your region on a tablet without SIM card?
And how to change it? I have access to IP address where Google Play is available. And I own a credit card whose billing address is in a country where Google Play paid apps are available.

The region is set in the installed firmware, so you can't change it unless your device is rooted. However, other app stores like Amazon apparently can be fooled

@THelper Therefore, if I purchase a Nexus 7 from Google US and bring it to somewhere Google Play paid apps are not available, Google Play will behave as if I'm in US? This would be great, exactly what I want it be.

Google uses your IP Address and visible WiFi networks, as well as the information from the Google Account you used to determine your region.

Why was this down voted? I am using my USA Nexus 7 with a Singapore Google account/credit card while in Japan and a lot of the text is in Japanese (featured sales and some games e.g. Sonic 4). So it does seem to be by IP.

@row1 Possibly due to the fact that this doesn't cite references and seems to be quite low quality.

Your region is determined by your IP address and your account. What you see in the store is determined by your IP's location, but what you can actually purchase is determined by your Google account.
I bought a Nexus 7 from the USA and primarily use it in Singapore with a Singapore Google account and credit card. All of the prices are in SGD and I don't have access to things like books or movies.
I am currently in Japan and a lot of the Play store text and app titles are in Japanese, the prices are in Yen and I can see movies and books. I have bought some apps, but I cannot download region restricted items e.g. books and some games (even free ones).


text:
How to allow only certain people to make my phone ring on silent mode?
I usually sleep with my cellphone on silent mode, but some important people are allowed to wake me up whenever they want. When it's not on silent mode, some inconvenient people usually wake me up for nothing.
Is there a way to make a call filter and allow only these important people to make my phone ring?

It can be done without an app. Set your default ringtone to silent for all calls. Then choose certain contacts and assign them a custom ringtone. Never put your phone on silent mode, all calls will be silent except the contacts you customized.

The short of it in Tasker is to create a new profile as follows:
New Profile:
Context: Time

From: 22:00
To: 6:30

Context: State> Phone Call

Type: Incoming
Number: C:FAV  (This is any starred contact, You can also list specific contacts if you like)

Task
New Action: Audio Setting > Ringer Volume

Level: 7

Exit Task
New Action: Audio Setting> Silent Mode

Mode: On

I will try to update later with screenshots and more in depth walkthrough.


text:
Why are there so many tty files in the /dev directory?
It is confusing that there are so many tty files in the /dev directory...

By the way, what does each file in /dev stand for? Do they stand for physical devices which are part of my Android device? For example, which file stands for the raw storage device in the /dev directory?

That's because there are so many devices available. Entries in /dev are not restricted to physical devices, but also include logical ones. You just named one: TTY. You don't really think you've got 63 "connectors" somewhere to attach keyboards etc. to? Also, /dev/random is nothing physical, but rather "software" (a random-number generator provided by the system itself). Same applies to things like /dev/null, /dev/zero, and several others.
For more/deeper details, you might refer to following articles:

Linux Filesystem Hierarchy
Device file (Wikipedia) -- recommended for this topic, as it explicitly included Pseudo-devices
Linux System Administrator's Guide - The / dev directory

Not all devices at /dev are physical, some of them are logical and may be temporary needed by kernel/software (and some of them are symlinks, like log_modem -> /dev/ttyACM2).
And, as I see, you have default linux tty count. It's not used (reserved and may be used), but it's no problem.


text:
Sending a message to all contacts in WhatsApp
I need to send a message to all my contacts (309 phone numbers) via WhatsApp.
Is there a way to send a message for all my contacts, because the application just allows 25 contacts at once?

Use the broadcast function, see: http://www.whatsapp.com/faq/en/android/23130793

Open WhatsApp
Press the [Menu Button]
Tap [New broadcast]
Type your contacts' names or press the [+] button to choose from your contact
list
Tap [Next]
Type your message and optionally attach media
Tap  the send button

will it send the message an an individual message to all, or a group message? will they come to know that it has been sent to others too?

No, others will be unaware about your broadcast. They will get message in separate chat.

But limitation of this is, If user added in broadcast is not having your number saved in his contact list, he may not get your message.

I don't think this is possible since it's a limitation of the app itself. The best you can do is to put a status message so everyone can see, but you won't know for sure. Or you message them in groups of 25.

Easiest is to select:

Chat icon at the bottom screen
Broadcast list OR new Group at the top screen
Create your contacts


text:
How can I get a LogCat?
Sometimes I get asked for a LogCat.
What is this?
What is it supposed to do?
How can I get it?

Hmm. Possible. I searched for it, but don't found something similar. ;)

What is a LogCat?
A "LogCat" is for debugging applications / Android system. When applications / Android crash the output the "explanation" for the crash, the Exception Stacktrace, to a Log. This log can be saved and help developers to fix the crash.
What is it supposed to do?
It will help to solve your questions, if your asked for a LogCat it is always useful.
How can I get a LogCat?
This isn't hard.
Prerequisites:
Linux, Windows or Mac
USB cable for your device
Android Device
Instructions:

Install your device driver for using adb. Everything you need will you find here
Download adb executable for your OS (Download: Windows | Linux | Mac). Paste it somewhere.
Connect your android device.
Verify if "Settings > Developer options > USB debugging" is checked, if not, simply check it.
Open a command promt (windows) or terminal (linux / mac). How to do it: On Windows: windows + r > enter "cmd" (without quotes) > click enter | On Linux: You don't know how to open a terminal? LOL | On Mac: Type Terminal into Spotlight and open it
CD to the directory where the adb executable is located. On Windows: Go to the directory where you downloaded the adb executable, Shift+Right Click and select "Open Console" (or similar) | On Linux / Mac: Rightclick in the directory and select "Open Terminal here" (or simply CD into the directory)
Type in your cmd/terminal: adb devices to verify your device is properly connected.
If your device is properly selected, type in adb logcat to show the mighty and magic logcat aka stacktrace.
Reproduce your error (or whatever) on your device.
Right after, paste the whole cmd / terminal window into a paste-service like http://pastebin.com/ and send it to us.

Or you could just use an app like aLogCat and easily share the resultant log file via email, messenger, upload to dropbox etc.

Nope, not possible with JellyBean. The API changed, you only can read the LogCat from your own app.

aLogCat is being updated. An alternative called CatLog also works but it needs root access for JB devices.


text:
How to type and handwrite Japanese on devices without Japanese input?
By default there is no Japanese input in Samsung keyboard. I know there is a plugin called Multiling with it's HanWriting plugin but it only supports 1 letter by time.
Is there a way to handwrite Japanese in sentence?

I use the Simeji input method. it uses the great "flick" method for inputting kana. It takes some getting used to, but is very fast once you do. To switch between keyboards, just long press in the text field.

I don't think there is a handwriting app, at the moment. At least, not for writing, although there are some for practicing Kana and Kanji.
For typing, I currently use Google Japanese Input (10 MB, Free), it's reliable and seems solid to me.
You have two choices: one is typing the Romaji, the other one is typing Kana directly. In this second way, you click the 行 (gyou). For example, click on the Sa-gyou to choose the syllables that start with s- (sa, shi, su, se, so), then swype towards the one you want.
A visual example in the image below: the user chose the Ra-gyou (ra, ri, ru, re, ro), and swyped towards "ri", highlighted just above.

Google Japanese Keyboard has been updated many times since then, and now it also supports Godan keyboard (in Japanese)

I use MyScript Stylus (Beta) by Vision Objects for german, english, and japanese handwriting input on my Note 8, and it works vey good.
I use it e.g. for input to the Aedict dictionary to look up unknown Kanji, and recognition by myscript stylus is excellent. The only challenge is to write large Kanji not too slow, because else recogniton starts with left kanji part before finishing handwriting the complete kanji. I dont know any input method that makes it soo easy to switch between languages and combine Japanese text with other languages, e.g. get real German or nordisk Umlauts instead using ae, oe.


text:
Play Store not registering my phone after root
I rooted my phone and after that for the 1st time, as I was just checking out stuff, Google Play recognized my device and registered it.
Later I did a factory reset and now for some reason it is not registering my phone and I cannot download anything!
Entering the "My apps" section only lists the installed apps. No update options, no all apps section!
What happened? Now what should I do?

Did you re-add the same accounts?  Has it upgraded to the latest app version?  Have you tried clearing the data for the app and rebooting?

Update to latest Play Store.
Clear Play Store app's Data and Cache.
Reboot your phone. They check whether problem exists or not.

I just did another factory reset and its all fine now! the behavior was weird though!

In my case, it's because of the Freedom app.
To fix it:

Download Root Explorer
Go to etc then click on mount on the upper part
Find the hosts and delete it
Restart the phone


text:
Display media volume in the status bar
I have a Samsung Galaxy SII running CM9.
Currently I have an app that displays my media volume by using a persistent notification.
However I have 2 problems with this.

Since media volume is a system thing, I feel that it shouldn't belong on the left hand side of the status bar.
This takes up a notification slot when I pull down the notification bar.

Is there a way that I can display the media volume on the right hand side in the status bar next to the battery level, clock, reception meter, etc?

For this, you'll have to modify/replace stock status bar...

As far as I know there's currently no way to add functionality like that without changing the source code of the stock status bar, your best bet may be a custom Status bar like Omega(http://forum.xda-developers.com/showthread.php?t=1825283) or Super(http://forum.xda-developers.com/showthread.php?t=1265106)

You can install a widget known as Volume Ace. It gives access to all the volume levels in the system. You get 1X1  menu sizes as you prefer.

Please read the question. It clearly states right in the status bar. Not a widget or shortcut to volume settings.


text:
Is it possible to limit the list of contacts in WhatsApp?
Today, I installed WhatsApp, and I know that it wants to upload my complete contact list to its servers to see who else has WhatsApp, so it can create a contact list. I don't like this, and I prefer to give it just what it needs, maybe only five contacts for now.
I have LBE Privacy installed, and it blocks the contact list for WhatsApp. The result is that WhatsApp doesn't work. Now I can of course remove the entire contact list except for those five contacts, then unblock it, let WhatsApp connect, then block WA again, and hope it works.
If I open the contact list, and go to the setting which contacts to display, I see several options: all contacts, WhatsApp, Gmail-account, and phone. Choosing one of these, only these contacts are listed in the contact list. But I guess WhatsApp won't bother and use all contacts anyway. In the contact list, I have hundreds of contacts with email-addresses and no phone number. Will it upload those as well? And if I take a closer look at those lists, they are not properly organized, so limiting
If I add a contact later, will WhatsApp know?
Is there a way to handle this properly, let WhatsApp have the addresses it needs, without giving it all?

Related: Can WhatsApp be used without granting contacts permission?.

I looked into this some time ago and at least then it was not possible super easily.
The best tip I found (which I haven't tried out myself as it applies to rooted devices only and I haven't yet taken that plunge) was from a Reddit thread that discussed the question.
The thread points to an Exposed Framework module called DonkeyGuard. The developer explains it in the xda-developers forum quite well.
Would be nice to hear if this works!

The technical answer is no, there is no way to limit WhatsApp's access to the contacts list's full contents.  You can, in certain cases, receive messages, without giving WhatsApp contact access, but only if someone else who has allowed WhatsApp full contact access has first added you as a contact on their device.
There are two workarounds to allow you to do what you are asking:

Different Device: The obvious, though least helpful, solution is to simply use another device and have that device be your WhatsApp device.  You give WhatsApp full access to that device's contacts, but have no contacts in it for WhatsApp to siphon clean.
Sandboxed User: Recent versions of Android allow multiple users and allow easy switching between them.  Each user is essentially its own self-contained ecosystem with access to its own set of apps, accounts, and permissions.  You can have a second user on your phone that has no contacts, so giving Whatsapp on that account access to the contacts is no problem.  This is the solution I use.

While it doesn't solve the problem of software vendors using bad faith methods to get inflated permissions, it does limit it.  And if enough people take advantage of Android users to contain WhatsApp, then we may see change there.


text:
Is there someway to make "My Maps" in Google Maps available offline with location markers?
I see how to save a map area offline on the Google Maps app, but how can I make sure the markers layer on "My Maps" is saved for offline use?
I see how to view it as a layer, but are all the layers saved for offline use?  (Seems unlikely and a waste of resources.) How do you save a select few for offline map use?

It seems to me that you are talking about your "Starred locations" when you're talking about the markers layer on "My Maps"? These are stored in Google Bookmarks and can be exported -- including the locations.
As a general note: The way Googe has set up its Maps/Geo operations leads to a likely reality that Google will "never" provide good offline capabilities. Your proper solution comes from something that does. And that something is increasingly likely using OpenStreetMap. My personal recommendations for apps that can also (easily enough) handle your exported starred Google Maps locations are OsmAnd and Maverick. See OSM Wiki for details and more options.

I tried saving map data from Google Maps onto my phone, not even trying to save marker layers, and found it unreliable at best. I eventually decided to invest in a satnav app that had maps stored locally on the phone, along with favorites.
I have tried CoPilot (expensive and crashy but has the features of a true satnav, ) and Scout (much cheaper more reliable, better voice navigation but fewer features; no way-points and limited avoid area/route support).

Save locations for offline use

Search for a location.
Select the white info log at the bottom and scroll down. You'll see "Save map to use offline" at the bottom.
Google Maps will prompt you with the option "Save this map?" Go ahead and save it.
You'll see the "Map saved" confirmation.
Name the offline map.
To see the offline map, go to your profile.

The maximum size for the area you can download is 50km x 50km. If you try to save an area bigger than that, you'll be asked to zoom in on a smaller area.
If you're already on a map that you want to save, you can save it without searching for a place.

Move the map to the area you want to save.
Touch inside the search box at the top, and scroll down to the bottom of the page.
Touch Save map to use offline.

You'll delete your saved offline maps if you clear your application data on your device. But you won't delete your saved offline maps if you sign out of the Google Maps app, delete your Search History, or delete your Maps history.
To make sure that your map has the most up-to-date information, your saved maps need to be updated at least once every 30 days. If you don’t update them, they’ll expire and be removed from your saved maps list.
Since you cannot search an offline map, save several smaller maps covering the same area. Name the map after the area.

References:

Mashable - Your Guide to Saving Google Maps Locations for Offline Use
Google Maps Help - Download areas & navigate offline


text:
How to make an unrooted phone use or detect ad-hoc Wi-Fi?
I have an unrooted Android 2.3.6 phone and I want it to connect to the ad-hoc connection made on my Ubuntu.
I referred to some already existing questions here but none seem to be the solutions for unrooted phones.
How do I do this?

As far as I know, there isn't a way. It's been requested since 2008

This is unfortunately not something you can do without root. I found a fully fleshed out discussion about solutions and alternative options on Stack Overflow.
User Andy notes:

[T]his is currently not natively supported in Android, although Google has been saying it will be coming ever since Android was officially launched.
While not natively supported, the hardware on every android device released to date do support it. It is just disabled in software, and you would need to enable it in order to use these features.
It is however, fairly easy to do this, but you need to be root, and the specifics may be slightly different between different devices. Your best source for more informationa about this, would be XDA developers: https://forum.xda-developers.com/forumdisplay.php?f=564. Most of the existing solutions are based on replacing wpa_supplicant, and is the method I would recommend if possible on your device. For more details, see http://szym.net/2010/12/adhoc-wifi-in-android/.

User Silveri also notes that there are other options:

[I]f you just want to share your laptop's internet connection via Wi-fi using any means necessary, then you have at least two more options:

Use your laptop as a router to create a wifi hotspot using Virtual Router or Connectify. A nice set of instructions can be found here.
Use the Wi-fi Direct protocol which creates a direct connection between any devices that support it, although with Android devices support is limited* and with Windows the feature seems likely to be Windows 8 only.

*Some phones with Android 2.3 have proprietary OS extensions that enable Wi-fi Direct (mostly newer Samsung phones), but Android 4 should fully support this (source).


text:
Does Android keep a log of when it boots?
I'm making a parental control/accountability app for Android. It consists of a monitoring service that runs in the background and starts when the phone is booted.
Unfortunately, I have found that when Android is started in "Safe Mode", services are not started automatically, and because of this, my app has a serious flaw. While in safe mode, the web and other apps can be started without my monitoring service running.
I thought that if it isn't possible to monitor app activity while in safe mode, maybe I could at least have a way to detect if the phone was previously in safe mode.
Does Android keep any log of this? Or any boot log in general? I'm very open to suggestions and alternatives.

I think you have caught yourself out, in short, nothing you can do!
Have a look at this source that explains why, specifically in this section:

System Partition and Safe Mode
The system partition contains Android's kernel as well as the operating system libraries, application runtime, application framework, and applications. This partition is set to read-only. When a user boots the device into Safe Mode, third-party applications may be launched manually by the device owner but are not launched by default.

Keywords is third-party applications [...] are not launched by default.

When Android boots up, it keeps a cache of the logcat, in a temporary buffer that is reserved found in /dev/log. That buffer gets recycled when it hits the threshold, obviously, the bigger the threshold, the slower Android gets with the continual spamming into the logcat buffer hence kept to minimum - IIRC, its around 64K:
#define DEFAULT_LOG_ROTATE_SIZE_KBYTES 16
#define DEFAULT_MAX_ROTATED_LOGS 4

Source: system/core/logcat/logcat.cpp
Do not ask how many lines that can be, as to each and to every app, it's different. Not alone that, the logcat disappears upon reboot!

The only method I'm aware of that contains a log produced by the system after a reboot is /proc/last_kmsg. Whether or not the kernel keeps this log file after a reboot depends on the settings provided during kernel compilation.
My experience has shown that some stock devices (HTC) have this logging enabled and others do not. I haven't seen a consistent pattern.

Thank you!  Where did you learn about this log?  Do you have any suggestions as to how I can learn about more of these logs? Is there a reference somewhere?

In case anyone wanders in like I did, the log is now in /sys/fs/pstore/console_ramoops.   It's not a full log like dmesg, but basically just has information about the last kernel panic and what led up to it.

adb shell cp /sys/fs/pstore/console-ramoops /data/media/0/console-ramoops.\date "+%Y_%m_%d_%H_%M_%S"`.log` works with TWRP on OP3 with Android 8-based LineageOS

If you're rooted, I would just open Termux and do:
sudo cat /proc/bootloader_log | less

Or you could use the app "LiveBoot" and it will show you all your boot processes every time you turn your phone on.


text:
How can I use Google Latitude's Location History without a constant Internet connection?
I find the Location History part of Google Latitude really useful. Is there any way to make the app (or another) store my location when an Internet connection is not available, and send it to the Latitude servers as soon as a connection is available?

Latify in the Play Store does the trick.

Is the Latify project down? If yes, can you recommend a similar software?


text:
Force all WiFi traffic through VPN?
Is there any way to force Android to route all (but only) public WiFi traffic through a PPTP VPN?
My phone basically has three connectivity scenarios:

AT&T's HSPA+ or LTE. I don't want to use a VPN with this.
Public WiFi. I don't ever want to send anything that isn't tunneled through a VPN over public WiFi. If I just connected to WiFi right now, I don't want Android to instantly launch into all of its pent-up WiFi tasks until I'm connected to the VPN. Ideally, I'd prefer that Android not even broadcast the notification that I'm now WiFi-connected until after the VPN is up. If the VPN drops, I want the traffic to be blocked (or routed over AT&T) until the VPN is re-established.
My home WiFi. I could live with VPN'ing this if it's impossible to distinguish between "my WiFi" and "all other WiFi", but I'd prefer to not VPN it either.

I know that Tasker can theoretically achieve most of these goals, except for one problem: AFAIK, nobody has written a Tasker VPN plugin that works with ICS. Does one exist yet that I've overlooked?
That leaves the second problem -- leaked traffic during the interval between the time the WiFi connects and the VPN is established, and traffic leaked if the VPN dies for some reason while the WiFi remains connected. Is there any way to fix this problem?

Unfortunately there are no new answers since my bounty started. I believe this means the bounty will not be awarded to anyone.

I'm using the Private Internet Access app for the same situation. It has a "kill switch" to prevent the leaking. It only works with the private internet access vpn service though.


text:
How do I connect Android devices to a WiFi AP and mobile data network simultaneously?
When I turn WiFi on, my 3G connection shuts down, which is fine in most cases. However, I need to connect to a LAN at work that is not connected to the internet and I'd prefer not to lose my data connection when I connect to the work intranet.
How can I keep both connections active?
Ideally, I could limit this desired behavior to this one SSID because I want it to continue to operate with the default behavior for all other WiFi connections.  If that can't be done, prefer a solution that is easy to toggle on and off.
I'm using a Samsung Galaxy Nexus (Verizon Wireless) on CyanogenMod 9.

See this answer In short you cannot have both on as they are mutually exclusive.

@t0mm13b, is this an Android limitation, then?  My understanding is that with iOS, APNS is always enabled, and is always using the data connection.  It would seem that with Android, you then simply go offline with some apps as the switch between the connections is performed?

For example, I need to be able to be always available on SIP, it would seem like having WiFi enabled then precludes such requirement; on the other hand, when you don't have WiFi enabled, then the GPS doesn't work.  WTF?

@cnst its an Android limitation, mainly how the RIL driver is programmed in conjunction with Android's Ts TelephonyManager (PhoneManager). To be capable of using both WiFi and 3G would require modifications of the RIL driver and TelephonyManager/PhoneManager located in the bowels of the lower layer of the telephony mechanism handling on the java side. You mentioned about iOS's APNs which is definitely applicable for data transmission over the telephony 3G layer.

Also for GPS, it does not need WiFi, in fact, it can work over 3G if so required but Google Maps recommend WiFi usage in conjunction with GPS so not to drain your 3G data plan. If you are unlimited data plan by all means, great. But having said what I said, there is no known modification of RIL on the net to enable/bypass the mutually exclusive flip-flop mechanism either. Am 100% sure the same applies to iOS - switch on WiFi, 3G gets disabled. No wtf's there from what I can see.

@t0mm13b, I don't have a reference to back it up right now, but it's my understanding that on data-enabled iOS devices, APNS always works over the data connections, which enables the high level of reliability of getting your notifications on time, as well as preserving the battery life by turning off WiFi when in sleep mode.  (If you have a reference to confirm either way, I'd like to see it, please.)

This would seem to suggest that APNs indeed always uses the cellular connection for APNs, even when WiFi is available: http://support.apple.com/kb/TS4264

Despite the wide-spread information of its impossibility, an app named Super Download claims to be capable of this, as you can read in the article Combine 3G 4G Mobile Data + Wifi together to Boost Download Speeds at Geeknizer.

As expected, this comes from one of the XDA developers (elban) -- and, also expected, it requires your device to be rooted (not an issue for you, as you're running CM9;) ).
According to the article, you should keep some things in mind additionally:

Using both connections is not supported on all devices / rom combinations.
Some web servers may provide insufficient functionalities on the requested files.
The Lite version has a filesize limit of 50 megabytes. You’ll have to buy full version to go further. But if you download it from here (using barcode below), its free, with full features, courtesy of XDA).

EDIT: t0mm13b was so shocked that he dug deeper, so I can now add the link to the FAQ of Super Download...

Am shocked to see this - how the hell does it multiplex tcpip through both wifi and [3|4]g .... looks interesting, would expect that requires a custom kernel with a particular wifi chipset no?

@t0mm13b As I already wrote in my answer: Using both connections is not supported on all devices / rom combinations. That's all I know about it...

I'm curious how well it works -- didn't try it myself, as I had no need yet. But just in case... Please, let us know then ;)

It didn't work. I ran the app and I had both the 3g and the wifi icons in my notification bar but I couldn't get on the internet. I checked my connection status in elixer and it showed that despite the icon my cellular data was disconnected. Thanks anyway.

So you probably was affected by the not supported on all devices / rom combinations. Sorry to read that. But it was worth a try.

That is very strange. There are some apps, like Livestream, that will allow you to connect over WiFi to a GoPro or other action camera and stream it using the cell phone's 4G connection.
I have a Samsung Galaxy Grand Prime and I can stream from a WiFi FPV camera. I did have to root the device though.
I do know for a fact that the Livestream app works for streaming WiFi video over 4G on both the Samsung Galaxy S3 and Grand Prime.

There is Notification Toggle, which can display buttons on the notification bar to quickly toggle Wifi and many other stuffs. Didn't CM have this built in though?

The toggles don't seem to override the either or restriction.

@Matt: you're correct, it's an answer to this part of the question If that can't be done is like a solution that is easy to toggle on and off. I don't think there's a practical implementation of SuperDownload-like dual network is available for arbitrary connections yet, and so thusly.


text:
How to flash Magisk-x.y.z.zip using fastboot without using TWRP?
Is it mandatory to use twrp to flash Magisk. Can it be flashed using fastboot

you probably can't flash magisk with fastboot
you must have twrp installed or any other custom recovery..
Thanks..

You probably meant fastboot mode.
And no, Magisk cannot be flashed using Fastboot mode. It is a zip file and not an image file that you can just flash to a partition.  If you want to use fastboot, you should consider patching your boot image using Magisk Manager and then boot that image using fastboot boot command.
fastboot boot magisk-patched.img

Or if you are sure you have the correct boot image, you can flash the patched image too:
fastboot flash boot magisk-patched.img

Thanks. Fixed typo. Magisk Manager is a apk file. How to use Magsik Manager to rewrite the boot image on a non-rooted phone while i am trying to root the mobile using Magisk.

@Talespin_Kit this way

You need the stock boot image. Then you can use Magisk Manager to inject Magisk into the boot image. And then flash/boot the image which will load magisk init commands when the device starts up.


text:
What does "Ignore messages like this" do? How do I see what I've ignored?
When I tap and hold on a notification in the notifications list, I get an option to "Ignore messages like this." I can't find any explanation, though, of what this means. Does it really mean, ignore all notifications from this app? Or does it mean, only ignore messages like this one from this app? (i.e. can one app have multiple "channels" or types of notifications?)
And the other side of this - where can I see what messages I have chosen to ignore, and possibly undo it, if I once again want certain messages?
UPDATE: In CM settings there's a "Notification Filter" screen that lists all notifications that I've chosen to ignore. (Settings > Privacy > Filter Notifications in CM11.) I still don't know what the filter does, though - it hasn't seemed to keep me from seeing any notifications.
(I suspect that this feature only blocks you from seeing notifications whose source and content exactly matches a past notification, but I can't confirm that so I don't want to post it as an answer. Can anyone confirm or deny?)

After some testing, this feature seems to hide future notifications when the same app shows a notification with exactly the same text again in the future. This means you can't filter messages like [filename] download completed from the download manager, [app name] installed from the app store, or Level up! You are now level [number] from Google Play Games, since they have changing content.
As such, its usefulness seems pretty limited. There's no good way to choose which notifications you get from most apps, unless the app has those options built-in.

I believe this is simply the standard Android feature for turning off notifications.  It's on a per-app basis, rather than analyzing what kind of notification it is or its contents (etc.).
This answer provides the details of how to turn them off or back on:

Under each application info screen there is now a checkbox for "show notifications" (assuming the app sends notifications). Uncheck that and no more notifications from that app.
You can get to the screen by going to Settings | Apps | {application} or, more conveniently, long-pressing the notification itself and then tapping "App Info".

In cm12 if you go to "settings > notification manager > filter notifications" you can see which ones you blocked

@saloalv is right, except on CM11 it's under settings > privacy > filter notifications. It appears to be a list of all the specific notifications that I've chosen "Ignore messages like this" on. Those apps do NOT have "Show notifications" disabled, and they still show notifications. I still can't guess what it's supposed to be doing though.

@Josh preventing from showing same notification? "download completed"?

@saloalv, I'm afraid that's true, except that almost no app shows the "same notification" twice. Downloads, for example, say "[filename] download completed," so they're different every time. You can't filter them unless for some reason you need to download exactly the same file regularly :)


text:
How can I send SMS messages from my real phone number, not my Google Voice number?
This question is precisely the opposite of the existing question: "How can I send SMS messages from my Google Voice number without using the Voice app?"
Since installing the Google Voice app, text messages that I send from the ordinary Messaging app are coming from my Google Voice number. I don't know how or why - no setting I can find in the messages app mentions GV or my GV number.

I currently use my OnePlus One's built-in Messaging app for SMS. I installed Hangouts and Google Voice, but both are NOT configured for SMS. (I use Google Voice occasionally, but I still use my real cell number directly for most calls and texts to my friends.)
In the "Messaging" app settings, it says "SMS Enabled."
In the "Hangouts" app settings, it says "SMS Disabled."
In the "Google Voice" SMS view, it says, "You are now receiving SMS in Hangouts." This is obviously not true, but doesn't seem relevant to my problem either. (I'm guessing that the writers of that particular message couldn't conceive of any SMS app other than GV or Hangouts. :)
When I actually receive messages, I get them in the "Messaging" app as expected. When I reply to those messages, which were sent to my AT&T number, my replies come from my GV number, confusing my friends.

After further digging, I found the answer. In the settings app under "wireless and networks," there is a setting: "Enable all apps to send SMS messages through Google voice." Disabling this fixed it.

Even though you are using the default messaging app, open hangouts and go into the settings and check under Send SMS From.
It should say send from Carrier, if it says Google Voice, the default app could use that number.

Also, you may want to try to click on SMS Enabled and set it to disabled if it says enabled.

The hangouts app had "SMS Disabled," which meant that "Send SMS From" wasn't even an available option.


text:
Replaced /system/bin/toolbox. How to I revert that?
I renamed the original /system/bin/toolbox" to "toolbox_alt".
I replaced the file /system/bin/toolbox with a file that was supposed to work, but doesn't work at all.
My filemanagers and the most terminal comands have stopped working and I apparently lost root access.
I have a Samsung Galaxy Note 3 (N9005) (International) running the newest Cyanogenmod nightly.
Can anyone help me deleting the current toolbox and renaming the "toolbox_alt" back to "toolbox" ?
Thanks ahead

Have you tried re-rooting?  You might be looking at a factory reset.

I fixed it myself.

I went to the recovery menu (CWM)
Mounted /system
Plugged it into my Laptop
Opened ADB on my Laptop Comand: adb shell
went to /system/bin and replaced the file

Hopefully this helps other who do the same mistake!


text:
How repair sd-card locked read-only mode? Its probably file system error
I have alcatel onetouch pop with jellybean 4.2.2. I put into 32 Gb sd hc card. Card did not work correctly.  Sometimes (specialy when i tried write more that one file) card has blocked with something like read-only mode. In that sitiation I used to connect my phone to computer (win 8.1) and run disk checking from properties. thats usuly had fix problem. Now my friend have switched on developer mode on my phone and my computer stoped seeing phone. I can't switch off dev mode, and I don't know how to repair sd card. Sorry for my English. Anyone can help me?

First, stop letting your friend mess with your phone. :) Dismount the card on your phone (or shut the phone down), remove the card, and use a compatible USB card reader to mount the card on your Windows computer.
At that point I would strongly suggest you copy off all the files from the SD card to your computer. After that reformat the SD card, using either the official utility at https://www.sdcard.org/downloads/formatter_4/ , or by putting it back into your phone and having it reformat it. (I strongly suggest the first option!)
If you encounter problems with any of this, chances are your card has been damaged beyond repair, perhaps by the flash memory write cycles being exhausted. Grab what you can and get a new one.
All of this, by the way, assumes you really have a micro SD card, or a full-sized one that you've verified the write lock tab is set properly.

I formatted the card as FAT32 and didn't work. I uninstalled the application (for access rights). Nothing.
What worked for me WITHOUT rooting the phone. Format the card from the phone, not computer. If you don't find the formatting facility then you can format the card as NTFS. Then insert the card. The phone will notice you it is faulty and give you the possibility to format it. After that it should be solved.


text:
How do I remove images from the Downloads folder that are visible from within certain apps, but not visible from any file manager?
Background: I used to use the Share with another app button on Google Chrome to send images from Google Chrome App to my Text Messaging App. It would go to my text message but not be seen in the Downloads folder.
Now, if I have a file stored in the Downloads folder that I want to attach to either a Text Message (via Messaging App) or an Email (via Gmail App), when I go to upload that file from the File Explorer within one of those Apps, all of the images that I have ever "Shared" in the method described are listed there, and can be clicked and uploaded as though they are stored in the system. However, when I use a File Management App, they are not there.
I simply want to remove the images from the Downloads folder, or from appearing as though they are in the Downloads folder to certain Apps (i.e., Messages and Gmail). Also, I'd like an appreciation of what is going on, but I think that would be clear upon a solution being presented.
I am not interested in rooting my phone.
What Has Not Worked:
• Clearing cache of Google, Google Chrome, and Messages Apps
• Deleting the Downloads folder in its entirety.
• Downloading multiple File Explorers and Hidden Image/File Apps to Search for the Locations of the Files
• Granting storage permissions to Google Chrome Apps

The file manager shows the truth. The other apps show the Android media service cache. The simplest way to update the cache is to reboot the device. Or use one of the "sd-scanner apps".

That's because those images are still in the servers of those particular apps and not in your device. They will be removed eventually.

While rebooting the device did not work (these images have been cached for over a year and were in fact on my device), your 'Android media service cache' comment gave me some insight. After clearing the cache on all Android system apps, the problem has been resolved. Specifically, I believe it was the 'Download Manager' system app cache. Thank you.

That's because those images are still in the servers of those particular apps and not in your device. They will be removed eventually.
Edit: The problem has been solved by the OP himself. I did not quite understand the situation when I wrote this answer. Please refer to the comments bellow.

That is not true. The images could be clicked from the Download folder and added to the email or text message from those apps. This could be done despite a lack of connectivity. They have also been on my device for over a year now, in some cases. It is not a transient issue.

@Joe So you are saying that you can't access them directly from the downloads but you can access them through certain apps?

Yes. I have (mostly) resolved the issue as commented above by clearing the cache of my 'Download Manager' Android System App. There are still two greyed out files that were there before, but unlike the other dozen or so images, they are broken links and cannot in fact be attached to a text or email.

Update: Clearing the data in addition to the cache of the Downloads and Download Manager system Apps has entirely solved this issue.

Good to know. Mark something as the answer and close the question.


text:
Dead phone and lost data
Few weeks ago,my phone has suddenly dead and entered in an endless restart loop.
All data saved in the phone is gone. What I care for the most is  WhatsApp chats and attachments.
I remember I have backed up my WhatsApp chats few months ago ,but I do fail to remember what e mail I have used as I installed WhatsApp on my “late” phone 4 years ago and have changed my emails several times since then.
Is there any method to know the email on which I have backed up the info.
Or is there any method to retrieve the lost data ,escpecially Whatsapp Chats to my PC for instance ?
Another question : Can I find the messages sent through this period.
Note: I don’t  know if my problem resides within the speciality of this website

Partial answer: How to get data off a completely dead Android phone?

a friend of me didn't even know SIM pin because she never switched off her device for one year. the email (google account) is bonded to device (FRP) and therefore important security attribute, you should be more careful with credentials (without email password you can't use device anymore after factory reset)

Try replacing the sim to a different phone and downloading whatsapp in it. Log into the whatsapp with your phone number. It will prompt to retrieve saved data. Make sure you retrieve it otherwise it will be difficult. Whatsapp automatically backs-up the chats.

As far as I know WhatsApp is deactivated on a  phone whenever installed on another phone with the same number. I am afraid the data would be lost forever then.

I don’t think chats would  be retrieved as simple as that as the same SIM card might be owned by another person (if one cancels his SIM card it is given to another person) This would be a huge hack to privacy . What I know is that the back up and restore process is related to an email address, which I ,unfortunately ,  fail to remember

@user261947 Whatsapp deletes everything after 45 days. But if you manage to get access to the phone number before that... https://faq.whatsapp.com/en/android/24068052/?category=5245246

https://faq.whatsapp.com/en/android/20887921

If you want to use a local backup, you'll need to transfer the files to the new phone using a computer, file explorer or SD Card.
Note:
Your phone will store up to the last seven days worth of local backup files.
Local backups will be automatically created every day at 2:00 AM and saved as a file in your phone.
If your data isn't stored in the /sdcard/WhatsApp/ folder, you might see "internal storage" or "main storage" folders.


text:
My phone is unlocked, but I don't remember pin code. Recover from Google somehow?
There's plenty of directions for those who forget their pin code and can't unlock their phone, but there's no explanation for those who have their phone UNLOCKED, but don't remember their pin code to change it.
I can use my phone right now, but I don't remember my pin. That's why once it's off or the screen is locked, which will happen at night, I suppose, I won't be able to access it anymore without wiping the data.
Is there an easier way for me to deal with the problem?

If you really want you data I suggest you install a custom Recovery while you still can... Enable Developer Options  (OEM AND USB debugging ) then when you think you have the required files to Install a working recovery for your phone you can go ahead and power it down .  Once you have a working TWRP or CWM recovery you can go ahead and delete the password or pattern lock screen from the recovery while phone is off..
If it seems complicated I think backing up your files would be reasonable enough

I think you can turn screen timeout off, if possible (may vary by OEM).
Most times, Google has no control of your phone lock, as far as I know.


text:
Internet Access unavailable in browsers and mail. But Youtube and Google Play worrk fine
[EDIT] after further diagnosis I observed that I am unable to access my router via its (local)ip address in chrome but I am able to access my router via edge browser.
Chrome in my android device is unable to access any website(can't open this page error) but at the same time, it works in the Microsoft Edge app. The chrome gives some suggestion link but when I click on the suggestion link a screen overlay comes up Similar to the image below, but the overlay quickly vanishes(I suspect whatever process was called, it crashes).
I observed similar behavior in my Gmail app, when I load an click on an email it tries to open it and quickly crashes(after showing loading similar to the image below). Although I am still able to open attachments in Gmail app.
Almost all other apps like youtube, google play are working nicely.
I am using an Android device with Android Pie(9).
This problem happened Suddenly whilst the phone was idle.
I have tried disabling these apps, clearing storage, starting in safe mode.
Chrome error:

Loading screen after which crashes take place look something like this:

Please show us the error messages you get in the web browser(s).

@Robert I updated the question, when I click on learn more. An loading overlay occurs and the overlay crashes and I am back to this "can't open this page screen".

I have now disabled my chrome browser and which has allowed me to use Gmail and other apps that were crashing.
There is some problem with Google Chrome App, which leads to other apps crashing(maybe they use chrome[or its API] as a default backend).


text:
moving legacy app to new device
So I recently bought a new phone and there's this app I have on my old device that is not available in the play store anymore and that I should nonetheless like to move to my new device.
I'm confident that if I searched for it on the net, I'd be able to find the .apk of the app.
However, I also know that after installation, the app used to connect to a server to download additional files necessary for the app to work (once). That server doesn't exist, anymore. The data, though, must of course still be on my old device, somewhere.
Where do I find that data and how can I move the app?
Note: neither device is rooted.
Note: I cannot root the new device

Titanium backup and/or ADB backup. ADB backup definitely works without root, but you need 4.3+. You'll need to extract the app data along with the .apk. Ti+ requires root, but it can import ADB backups (.ab files) if you root the new device and the old device is 4.3+, perfect scenario. Look at this answer for details. You can try an adb restore on the new device from the old one to avoid rooting, but that will likely cause persistent ANR dialogs and maybe a bricked device.

I should add that I cannot root the new device because that would break a critical app that intentionally stops working on rooted devices.

Dang. Here's what I have in mind, then. Extract the apk and app data from the old device. If the data is on /sdcard, then you've wasted our time! Just copy it. Else, If you can root it without resetting it, then root and use Ti+ (older devices usually are open to one-click-root apps -- Framaroot, Towelroot, Poot, etc). If it's new enough to have Jellybean or better, use ADB backup and extract the specific app data. On the new device, install the app. If the data was in /sdcard, just paste it. Else, you'll have to mimic the server on your Wifi network (ouch). Mimic the IP address and files.


text:
Sony Xperia ST21i forgotten PIN help
I set a PIN screen lock on my Sony ST21i (Android 4.0) and forgot the code. No encryption, no root, and the phone won't show up a "Forgot PIN?" button. How to regain access to my phone? There is no important information in it, so any solution that deletes all data is fine. Help!
Edit: Didn't work:

Android Device Manager
Trying to boot into "recovery mode" using various key combinations found online

The phone does not (and won't) ask me for my Google account information, unlike the pattern lock case.

Can you explain what Recovery options you tried? A factory reset will wipe all settings, including your PIN.

Have you checked with our locked-out tag-wiki, its first-aid and the questions/solutions linked from there – especially Can not unlock my Android device as have no internet connection?


text:
Is it possible to have a higher level of lock-screen security only on boot up?
Many of my apps are protected by an lock app ('Smart Applock' - asking for a pattern unlock before access to gMail, install/uninstall, etc). As most of my apps are thus locked individually, I would like to have the convenience of a swipe-only unlock during normal use ... however, none of the app-locking apps I have tried offer protection just after boot-up! While the various bits of the system are loading, one can still access, say, gMail, and other functions for ~ 30 seconds.
To get around this problem of reduced security during the startup process, I was wondering if it would be possible to have a pattern or password unlock requested by the system once only, after boot?
Edit: one suggestion is to disable the 'power button instantly locks' and the automatic lock after sleep, which would mean that a password/pattern is asked on startup only and never thereafter. However, for the lock after sleep all one can do is select a time up to 30 minutes, not disable the auto-lock after sleep entirely. Is there a hack to extend or remove that limit?

Is your device set to lock when the screen turns off? If you can disable that then the initial unlock request should be the only one unless you manually lock it.

Good suggestion - but there is still a timed lock that happens, and the maximum I could set is 30 minutes. Perhaps there's a setting I could set (in terminal) to remove that timed lock?

You can encrypt your phone and it then will ask for a pin each time you boot your phone

Actually this is seriously counter-productive. After encryption, swipe is totally disabled and the device asks for a pin code every time you use it.

authors: غلامرضا میرزایی


text:
How can I install customized Android OS?
I want to install customized Android OS in my Samsung Galaxy III.
Can we do that or not ?
If we can not do with Galaxy III, then is there any other phone on which we can do the same?
Thanks In Advance

I want to customize android OS for specific requirement . For that I need to install that OS instead of the default OS provided with the Galaxy III by Samsung. Is it possible ?

customized OS means I am going to do code change in android source code and wanted to install that in a mobile again.

Are you talking about the galaxy 3 or the galaxy s3?

Yes, you can, but you need to use a compatible ROM (if you don't want to break your phone). But before flashing it's recommended to read forums, where potential and actual problems with ROM are described.
Example: XDA Developers forums, Android Development subforums for you device (ROM are hardware specific).
Every phone with unlocked or possible to unlock bootloader.

You will have to create your own custom rom, e.g. customize the AOSP build, which is the most standard Android version you can imagine, no extra's from HTC or Samsung etc.

Have you tried using a custom launcher first? Nova and Apex (among others) give you a stock AOSP feel with many extras including the ability to use custom icon packs. You can get a customized look and feel without the warranty concerns that come with rooting and custom ROMs.


text:
USB Internet is not working in sleep mode
I am using Micromax Funbook Pro. The USB Internet connection gets disconnected after the system goes into sleep mode after 1 minute. I want to keep the connection alive. Please help.

Are you talking about USB data dongle?

I use the WakeLock app when transferring data, to prevent my device going to sleep. It's simple but effective.


text:
My Google Nexus S won't connect to network
I have a problem with my Google Nexus S. Yesterday I was out in the city and my battery meanwhile died and the phone shutdown. The next day when I charged the phone, I  noticed that it is showing no signal even when there is signal. I've turned it off and on a couple of times. I also tried a different SIM from a different service and it didn't show signal either! Also I tired those SIM cards on a different phone and it works.
The big mystery for me is that until the battery died yesterday I made calls from this phone with no problems, and until now I never had problems with this phone.
When I go to Settings -> About phone -> Status, I see that Network shows unknown and Service state shows out of service. Is there anything I can try resetting?

Yes I did, but with no result

Yea.. I realized that later, as you mentioned that you tried different SIM as well. Obviously, you had to remove SIM and battery. Silly me!

Your SIM tray may have some problems. See if the connectors (not sure what it's called) are not bended. Try lifting the connectors up a bit. This solves problem in most cases. Also, blow some air to de-dust it.

I also had this problem few months ago, but it was fixed very quickly with an update from Google (I was lucky with that update from Google). From what I observe (from my experience) at Google Nexus S, this problem appears when battery die and the phone it shutdown. And I guess that this a soft problem.

Ohk.. If that is the case then a reset might help. You can also try flashing a custom ROM, if you are comfortable.

Have you been able to solve your issue? If so, how?


text:
How to turn off talkback feature on Galaxy S2 ICS 4.03
I have turned on Talkback to see if it worked on My Galaxy S2.That also disabled my touch screen scrolling .Now I cannot turn off talkback because I cannot scroll through the setting menu. What should I do?

If you have a USB OTG Adapter you can just plug in a regular keyboard and use the arrow keys to navigate.

In this post, it says to: double tap and scroll with two fingers.
Let us know if it works.

Use 2 fingers to scroll through menu.


text:
How can I make the system folder writable without rooting?
My device is Sprint Samsung Galaxy S III
Model number: SPH-L710
I want to do this, because I want to stop the camera shutter sound.
And I don't want to root my device.

If you could do this then the entire security framework of Android would basically be broken, since you could modify system files anytime you wanted. You'll have to modify your device (temp or permanent root or a custom ROM/boot image with root) to access /system.

@eldarerathis Excuse me, I didn't understand that! Could you please explain more for me?

Well, the system protects a lot of personal/valuable information by restricting access to certain features and files. For example, your text messages, call logs, emails and the like are all stored on disk somewhere. If you could write to /system without restriction then you could modify or replace the portions of the OS that enforce these rules, bypass all of these restrictions, and access all of the data on the phone; this would mean that apps on your phone could do the same thing, and potentially steal your personal info or use your phone in unsavory ways without your knowledge.

There are probably other issues aside from security, though. You could accidentally brick your phone, for example (or a malicious app could brick it on purpose).

Also note that it is illegal in some places to mute the camera shutter sound.

@MatthewRead Any idea which countries?

@LiamW We do have a closed question about it, but I don't know much more specifically.

Why don't you simply ask "How can I disable/turn off/stop the camera shutter sound on may Galaxy S III?" and wait till the answers come in? XY Problem

Ultimately, this is a duplicate of http://android.stackexchange.com/questions/89/how-do-i-disable-the-click-sound-on-the-camera-app

I don't know why this  question was downvoted, even though it has multiple problems.

There is absolutely no way to do this without root, and for a good reason.
If an app was do do this imagine the havok that would ensue?
You will have to root your device, either temporarily or permanently, to do this.

Which mean I can't turn off the camera shutter sound???!!

@user1843769 Without rooting, correct - although some devices have the ability to do it without modifying system values.

You could physically remove or block the speaker. That would prevent the camera from making a noise (no, plugging in headphones won't prevent the external speaker from making a shutter sound).
Aside from that, you really do have to root your device. Or at least put a custom rom on your device (which usually requires root or an unlocked bootloader, not to mention that almost every custom rom has root enabled by default).

Yes You can change system.files without root through ADB by booting TWRP or CWM temporarily and by mounting system in options .

You could create an updater-script to access the system and mute the shutter sound, without rooting your phone. http://www.freeyourandroid.com/guide/introdution_to_edify
http://forum.xda-developers.com/showthread.php?t=1610121
You should include an update-binary and an empty line at the end of the updater-script.

If they aren't rooted, how do they flash? They won't have a custom recovery.


text:
Not able to connect xperia tipo to Ubuntu
I can connect my Xperia Tipo to Windows but not able to connect Ubuntu. Why is it so? Is there any changes that I need to make to my phone ?

What do you want to connect (USB storage, ADB, ...)? What happens when you connect your device to Ubuntu? Anything appearing? Did you check with the lsusb command if the device was recognized? Most likely some UDev rules are missing (your device not being known to the system). Though that should not matter to the USB storage.

Do you have the drivers installed on Ubuntu? For windows most Xperia devices automatically install drivers, it doesn't happen on Ubuntu..

This question seems to come up every few weeks...
Ubuntu 10 (and sometimes above) requires manual editing of your udev config in order to recognize an Android device.
As root create the text file "/etc/udev/rules.d/51-android.rules” and add this line for a Sony device:
SUBSYSTEM=="usb", SYSFS{idVendor}=="054c", MODE="0666"

Save the file and exit the editor, then set the permissions of the file and tell the udev system to reload the rules:
$ sudo chmod a+rx /etc/udev/rules.d/51-android.rules
$ sudo udevadm control --reload-rules

Maybe your phone is not in mass-storage-mode. Go to
settings / XPeria / connectivity

and set USB connection mode to mass-storage.
However, with this setting access is limited to the SD card; you won't be able to mount the internal memory.


text:
Is it possible to keep track when my Android phone is startup and when it is shutdown?
Where can I get the information about when and what time my Android phone is being shut down and also being start up. (shut down / start up - meaning that someone press the Power button to cause it to shut down / start up OR a program that cause it to start it or shut it.)
Information should look something similar like the following:

=========================================================
| Date          |  Time       |  Operation |   By       |
=========================================================
| 12 Dec 2012   |  11:59 PM   | Shutdown   |   User     |
| 13 Dec 2012   |  10:00 AM   | Startup    |   User     |
| 13 Dec 2012   |  10:59 AM   | Shutdown   |   Program  |
| 13 Dec 2012   |  02:16 PM   | Startup    |   User     |
=========================================================

If the shut down or start up is caused by a Program, it would be better to display the program name that cause it to shutdown.
Prefer method that does not require rooting and for Android version below 4.

Just to be sure, are you asking about the phone completely shutting down and starting up (ie a reboot)? Or do you rather mean the screen turning off and turning back on (ie sleep mode)?

Also, without root, any non-system app should be unable to shutdown the phone. So the only time a phone would shut down or reboot is if the user specifically said so (excluding hardware events like a battery dying).

You say. I saw phones suddenly rebooting on a system crash (something messed up in the Dalvik Cache probably). So that was surely not a user-initiated shutdown :)

My standard recommendation again here: Tasker, the most complete automation solution available for Android. Tasker can react on different events and perform tasks when they occur. So you could setup two profiles:

Profile "Startup":

Condition: Device Boot (this is boot_completed))
Task: Write File (with your information specified in the parameters)

Profile "Shutdown":

Condition: Device Shutdown
Task: Write File (with your information specified in the parameters)

For the text you can use Variables like e.g. %DATE. Only difficulty will be to determine whether the shutdown was caused by the user or a program -- no easy recipe here, especially not for un-rooted devices. This information might be extracted from the system logs somehow; but starting with JellyBean, this would require root permissions.

Was wondering on the following if there are any free Apps with just this function only. (I like your recommendation but Tasker have too many useful functions that I felt I am being overwhelmed). At least I know that I should not upgrade to JellyBean cause it seems that JellyBean need the user to root the phone in order to get basic features. (Was wondering why not the JellyBean phone is rooted in the first place, would not it be much better?)

Sure, every 2nd answer I give mentions Tasker :) It's what I use as it's most flexible. There are many free similar apps, but I cannot tell you whether/which supports this. As for root: ALL phones should come rooted if you ask me -- like all *nix come with root and Windows with handles (oh, oops... the other Windows with "Administrator")...

I tried Tasker but found could not get the variable which shows the shutdown or startup is caused by the user or a program. I also could not find something like SHUTDOWN_BY that can tell me which program / user caused shutdown. Any ways to find this information?

That would be a bit more tricky: you probably will have to parse the system logs for that. There is no Tasker Variable telling you what caused the shutdown. If your device is rooted, the commands dmesg and logcat might prove useful -- but I've got no complete recipe ready.