OnePlus 8T battery capacity Using the AccuBattery app I'm told that the design capacity of the battery is 4500 mAh, but after 3 significant charging sessions the current capacity is 2095 and has never reached 50% of the design capacity. I've tried contacting AccuBattery and OnePlus to see if I should be trying to exchange this brand new phone given this report. I haven't gotten an answer yet. Does anyone else have any info about OnePlus 8T actual battery capacity or how to deal with this?

This is the answer from AccuBattery support (OnePlus 8T has a dual battery apparently):

Unfortunately there's no solution for this at the moment as the system
isn't reporting the values in the correct manner. It looks like more
devices with dual batteries have this issue but we currently don't
have these devices to test with so we can't figure out the exact
underlying problem and build a workaround for it, but the most
apparent issue is that the device reports half of the charge current.
The health estimate can still be calculated if you do a manual
benchmark like this:
https://accubattery.zendesk.com/hc/en-us/articles/213575425-How-to-manually-benchmark-your-battery-health
but the maximum you will get is half the design capacity so you will
need to multiply the mAh estimate by 2 (or change the design capacity
so it's half the original value) and make the assumption that the two
batteries are used at the same rate; which is probably not what's
actually happening (one battery might be used to charged the other for
example).


Stop announcement of who is calling me How do I stop my phone from announcing the name of who is calling me on my Droid Razr Maxx? I've gone into my settings and can't find out why this is doing this.

You probably have Driving Mode enabled. In my Samsung Galaxy S4, it's in Settings > My device > Driving mode > Incoming call. See if you can find something similar on your phone.


How can I enable last_kmsg? I'm trying to diagnose a random reboot on LineageOS 14. last_kmsg is not in /proc, nor it is in /sys/fs/pstore/console-ramoops.

EDIT:

~# mount | grep PSTORE
~# mkdir /mnt/pstore && mount pstore -t pstore /mnt/pstore && ls /mnt/pstore
mount: 'pstore'->'/mnt/pstore': No such device

Back in 2012, /proc/last_kmsg (1) used to be a dump of kernel console messages, exported after reboots by Android's ram_console functionality (CONFIG_ANDROID_RAM_CONSOLE), which used persistent_ram (CONFIG_ANDROID_PERSISTENT_RAM) to handle a block of RAM that wasn't erased across reboots (2).

persistent_ram was based on Linux upstream RAMOOPS code which logged panic and oops messages to RAM. RAMOOPS was deprecated in favor of PSTORE (3) (memory handling) and PSTORE_RAM (4) (logging panics/oops to pstore/dmesg-ramoops). Later PSTORE_CONSOLE support was added (5, 6) to log not only the panics/oops, but all kernel console messages to pstore/console-ramoops-N which can be read later by mounting pstore (7). So the Android specific RAM_CONSOLE (8, 9) and PERSISTENT_RAM (10) were utterly removed.

Now pstore also offers logging userspace messages (PSTORE_PMSG) (11) and other features (12). Plus it supports multiple backends for persistent storage if supported by hardware, though SoC's on Android devices only support RAM storage (ramoops driver, AFAIK).

So it's not possible to enable last_kmsg on an upstream kernel, instead pstore offers a more versatile functionality.

  mount: 'pstore'->'/mnt/pstore': No such device

It shows that your kernel isn't built with pstore support. All you need to do is use a kernel built with CONFIG_PSTORE_CONSOLE and optionally CONFIG_PSTORE_RAM (though buggy). Android's init by-default mounts pstore at /sys/fs/pstore (13) from where dmesg-ramoops (on panics/oops only) and console-ramoops can be read.

You can search forums for a custom ROM shipped with such kernel. Or if you have kernel source, you can build yourself on a Linux machine.

NOTE: Some new devices, like Samsung, still expose /proc/last_kmsg interface; I'm not sure whether they use original implementation or pstore at back end.

FURTHER READING: Reading kernel logs


How do Moto X and Nexus "wake on pickup" work? I have seen many apps that give the ability to wake up phone screen simply by picking the phone up off a table (not talking about proximity sensor here). One thing they all have in-common is that this feature places a wakelock on the device, and therefore it drains battery, and therefore it times out after a preset amount (1-10 minutes). From what I understand, it works by monitoring front camera.

My question is: how do Moto X and Nexus phones do that then? They have this feature in-built, but does that also place a wakelock? A 24-hour wakelock? Or do they use something other than front camera? And if such, why isn't there an app that can replicate this behaviour for all phones?

Devices like Moto X and Nexus 5X/6P use a sensor hub to achieve this feature, which is a:

microcontroller unit/coprocessor/DSP that helps to integrate data from different sensors and process them. This technology can help off-load these jobs from a product's main central processing unit, thus saving battery consumption and providing a performance improvement.

The Android specifications suggest that the manufacturer implement a sensor hub:

The sensor stack of a device can optionally include a sensor hub, useful to perform some low-level computation at low power while the SoC can be in a suspend mode. For example, step counting or sensor fusion can be performed on those chips. It is also a good place to implement sensor batching, adding hardware FIFOs for the sensor events. See Batching for more information.
How the sensor hub is materialized depends on the architecture. It is sometimes a separate chip, and sometimes included on the same chip as the SoC. Important characteristics of the sensor hub is that it should contain sufficient memory for batching and consume very little power to enable implementation of the low power Android sensors. Some sensor hubs contain a microcontroller for generic computation, and hardware accelerators to enable very low power computation for low power sensors.

So the availability of this feature depends on the hardware of the device: if the manufacturer includes a sensors hub, then the power consumption will be optimized because the central processor isn't involved. Otherwise, the only possibility is to install dedicated apps (see for example the one cited in my comment) that will monitor the accelerometer, resulting, though, in a higher battery drain.


Note 3 - Apps Killed I have a rooted Note 3:

Samsung-SM-N900A (AT&T)
Android 4.3
Baseband N900AUCUBNB4

The issue I'm having is that there is something that's killing applications that should be running in the background.

For example, the Alarm Clock. Daily, 7:00 am alarm is set. The alarm never goes off because the application has been killed.

The "battery saver" mode is disabled.

What else is there that I can do to remove Samsung's propensity to kill apps on my Note 3? My phone is rooted, are there Samsung Apps that I can kill/freeze? Is there any options that force an app to keep running?

I am aware of an option in developers settings which limit the amount of background processes. Is this option set to anything besides standard limit? Aside from an app killer application I can think of nothing else except crazy OOM settings.


How to loop a song in youtube? I used to listen to some favourite song in youtube (Android). I would like to loop so it plays all time till I stop. Previously I have tried using Chrome web browser. It work to loop, but no sound. So, I forget it.

the my question is, is any way how to do it? In the case of Chrome, is any specific version I have to use to make it work?

Chrome latest on Play Store 72.0.3626. 105

Open Chrome in Desktop mode (Settings→Desktop site) , paste YouTube  link and click on the video to reveal menu as shown. Select "Loop"


What if you accidentally deleted some important apps and can't install them back? What if you accidentally deleted some important apps and can't install them back because Google Play doesn't have them? For example android system, com.android  dun server and com.android.lgsetup wizard (i.e. basically apps that are originally there).
And every few seconds this message will appear:

  "Sorry! The process com.android.phone has stopped unexpectedly. Please
  try again."

And I cannot even go the browser or Task Killer because every time I do, it will force quit. How can I reinstall those apps? I think I cleared all data for those but I did not clear the browser and so why can't I open the browser?

Do I really need to send it for repair or can I fix it?

For common system apps like the ones you've mentioned, there's no way to uninstall or reinstall them: without root, it at all you can disable them (not all of them even). But they are usually not held in the playstore for re-installation. Even if they receive updates via the playstore (like GMail, Maps, and the Playstore app itself), some of them must reside on the /system partition in order to function correctly (the Google Play app is one example for that).
But as the same situation could also apply to "normal apps", let's take a closer look:
User apps
Though they are usually coming via Google Play, it might well happen they get removed there one day (recent examples are the ad-blockers which got banned). For this, tools like AppMonster come in handy: they enable you to store a copy of the apps .apk file to your SDcard (the Pro version even can do so automatically whenever an app is installed/updated). So in case you have to remove an app for some reason, and want to re-install it later (or even if you want to install the same app on a device without Google account), you can do so by side-loading the .apk. Uninstallation, of course, is easily done either via Settings→Apps, or even via AppMonster itself.
System apps
Here it's a lot different. Without root, you can at maximum disable an app (Settings→Apps, scroll to the app, open its details, press the Disable button) -- if your device is running Android 4.0 or later, that is.
With root, things become a little different: theoretically, you could uninstall everything. A practical issue might be you're rendering your device unusable, if you e.g. uninstall something basic to the system. Also, removing their data might be an issue on re-install. So if you really have need for this, here's my recommendation:

Get ADB installed on your computer (either via the full Android SDK -- or using a minimal installation, see Is there a minimal installation of ADB?
Make a backup of the app you're going to uninstall to be prepared in case something goes wrong. You can use adb backup for this, which backs up the app including its data.
Make a copy of the app's .apk file for a re-install. You can use adb pull for this. The .apk is located in /system/app, so your command could look like adb pull /system/app/Browser.apk . to copy the browser's .apk from the device to the current directory on your computer.
Now that you have two fall-backs, you can try to uninstall the app. Again using ADB, you first call adb shell, then you need to become root (su), and now you can use the pm (package manager) tool to pm uninstall com.package.name. You can also remove the .apk from /system/app.

To re-install the app, you simply copy the .apk back to /system/app. To restore the data, you can use adb restore.
Note that dealing with system apps always bears the risk to render your system unusable. So it's always recommended to make a complete backup (best using Nandroid backup from your custom recovery) prior to such operations -- so in the worst case, you can go back to where you've started.
Dealing with the "The process X has stopped unexpectedly" error
There are several ways to deal with this error. To my knowledge, none of them includes uninstalling a system app.

if the app in question is a user app

delete its cache. If that doesn't help:
delete its data. If that still doesn't help:
delete the app. If that cannot be done due to the app being in a "force-close-loop":
boot into safe-mode, and delete the app from there.

if the app in question is a system app:

pray you've got a good backup :)
as with the user app: first try delete cache, then data.
nothing goes? Then you've got to do a factory-reset


Other appsare terminated when I try to copy an auth code from the Google Authenticator I have the Google Authenticator app and I want to log into Stack Overflow with my Google account.

But if I leave the login page from app to look at the authenticator code, the SO application refreshes.

It can't use an application specific password. Any ideas?

You can't use an app specific passphrase. Stackexchange uses Google as an OpenID provider and that works with access tokens.

To continue/finish the OpenID process you need to be logged in to Google of course (using the regular 2-step passphrase+token method). You will then be asked if you want to grant access by Google and the app will get an access token.


How can I disable automatic OTA updates on a Nexus device on Marshmallow? With Google's new policy of issuing monthly security updates to Nexus devices going on from Marshmallow, me, the proud owner of a Nexus 9 (16GB,WiFi, Build version: MRA58K), has to dirty flash all the factory images every month just because Google issued a 4.0MB update, and I had to connect my tablet to WiFi just because I needed it.

Rather, I prefer to go manual and flash factory images to upgrade between major releases, and ignore those which come in between. So, these monthly OTA updates are a nuisance, even if all I have to do to not install it is ignore the notification it poses. The nuisance being that I have TWRP, root and ElementalX, and prefer to use OfficeSuite over Docs and have no use for Fit - hence I've uninstalled (removed) those system apps, which makes the updates unable to install anyway.

So, the question:

What service(s) or process(es) is/are responsible for downloading this update? Which app are they a part of? And, most importantly, Can I Disable the offending app/process/service without otherwise affecting my system? (That includes interfering with GAPPs in any way)

NOTE: I know the notification is presented by Google Play Services, I checked that. I want to know what processes/services are responsible for downloading the update, not showing the notification.

Edit:

For all those voting to close the question as a duplicate, I have not encountered an answer which satisfies my requirements in the referenced question which this has been thought to be a duplicate of. For future notice, I not only wish to disable the notification, but the updater service as well. Also, the answer provided in the linked question will potentially affect other components of my system, not just the OTA Updater, as it involves disabling all or just notifications from "Google Play Services", which is not at all what I want (I understand what that app is, and disabling any part of it is not in my best interests. So, anything not involving GAPPs is a better solution (since I am heavily dependent on them, excepting the Docs suite).

Edit:

I had since moved on to the PureNexus ROM and rid myself of these issues. Now I have manually upgraded to Android 7.0, and I don't use the device as much anymore. So these answers are not applicable to me any longer, but this question is a good reference point for others with a similar concern.

Rename /system/etc/security/otacerts.zip to otacerts_bak.zip.

This will prevent it from communicating with the OTA update server.


Proper PC Suite for android? I was expecting Android Phones to have some powerful PC Suite, but apparently not.
I'm looking for application that can:

manage my phone files (audio/photo),
calendar (ms outlook independent)
add/remove applications,
access/edit/merge/remove contacts (ms outlook independent)
send SMS messages

This features are pretty common for most mobiles, and I'm wondering is there anything like that available for Android phones?

That's the beauty of Android. You don't need a separate piece of software for your PC. It's designed from the ground up to do everything within the Cloud.

  manage my phone files (audio/photo),

Connect via USB, turn on USB drive mode, and use Windows Explorer to manage your files.

  calendar (ms outlook independent)

Sync over-the-air (OTA) to Google Calendar.

  add/remove applications,

You do that right on the device or in the Google Play Store.

  access/edit/merge/remove contacts (ms outlook independent)

Sync OTA with Google Contacts.

  send SMS messages

There are some apps that allow you to do that.


What happens to my Google Play Music library when I unsubscribe? I'm currently shopping for a music streaming service because I'm currently unsatisfied with Spotify, my current service of choice.

Lured in by the three month free trial, I'm enjoying Google Play Music for a series of reasons, but now that I finally moved my library of music from Spotify to GPM, I'm curious about what will happen if I ever decide to unsubscribe.

Will GPM delete all the songs I added? Or, should I ever want to renew my subscription, will I find them all where I "left" them? I know I won't be able to play the songs while on the free level, obviously, but what I'm wondering is if Google will keep all the songs and albums I added, tied to my Google account or, what I'm afraid of, deletes everything forcing me to readd everything once I decide to pay again?

What happens when you cancel your subscription from Google support page says (emphasis added)

When the end of the billing period is over and your subscription is canceled, you won't be able to access music you downloaded to your device, or playlists you created.
If you subscribe again, you'll get access to your radio stations and also the playlists and music you uploaded.

What happens to All Access albums in my library when I unsubscribe from Google All Access? reiterates

If you unsubscribe from Google Play Music All Access and then re-subscribe you will not have the ability to play YouTube videos in the background on Android another setback for some users


Is Snowden snowing us with his "Smurfs Suite" interview? I hope this is not too off-topic. This morning when I read news it was full of articles quoting Snowden in his most recent interviews. Apparently the UK's GCHQ and the USA's NSA can
(1) turn your phone on and off at will
(2) turn your mic on and off at will, listening
(3) take pics at will, watching
etc. all by sending an encrypted text which we will never actually see.

Check me if I'm wrong, but this seems hopelessly conspiracy-theorish when I consider it from a technical perspective.

(1) When my phone is off, what signal exactly are they going to send to wake it up? When my phone is off my battery goes for months with a barely perceptible drain - is the idea that this barely perceptible drain is intentional and being used by the security agencies? Or that they have a special battery in each and every handset ever made which somehow (magically) has never been discovered in any of the thousands of tear-downs that have been done?!

(2) I have tried some of the apps that are out there to work with my phone remotely. Inevitably they work great on the phone that the developer used in his original testing and they work like crap on most other phones. Are we saying that the NSA/GCHQ has developers dedicated to this on every single platform available? And they do it in advance of every single release so it can be part of the ROM? And they do this regardless of what country the handset maker is in?!

(3) And isn't android open source after all? Doesn't that basically completely rule out the possibility of some huge gaping hole like this?! Surely some 13-year-old would have run across it and once it's discovered how can it not be publicized with internet 2.0 the way it is today?!

I've got friends who were already convinced they needed to take their battery out of their phone when having a conversation (like the NSA cares who won the latest football match?!) - this is just going to throw gas on that fire. I'd like some technical responses to this question...

(No need to just quote the articles or tell us how much Snowden knows - I'm interested in the technical side of things as to whether something like this is remotely feasible.)

To make the question more focused: Is it technically possible that someone could turn on your phone remotely when it was completely turned off (but with battery still in)? Is it possible that spyware could be of sufficient quality to be useful (listen/pic and then send somewhere, presumably) and still buried so deeply that nobody was aware of it? So the question is strictly limited to the technical viability - could it theoretically be done?

Yes, the government can perform nefarious acts on your phone to listen in on what your are doing.

If you phone is truly off, there is no signal you can send to wake it up. But:

You can spoof the phone turning off.
In some older feature phones, turning your phone off was not good enough because some things on the phone stay awake, and the FBI used this to eavesdrop on mobster phones.

One of the best ways you can ensure your phone is truly off is to remove the battery.
This is something they do to particular people. It's not technically feasible to do this to every possible phone, but the government doesn't have to because any given mobster or other target has a particular phone.
This is why there is a market for undiscovered software exploits. Once you get root access, you can basically rewrite software to do what you want.

In conclusion, this is technically possible. But that doesn't mean you shouldn't buy your friends some tin foil hats as a gag gift.


My phone says I have 7 GB of apps but I only have 3 GB I am using Samsung Galaxy S4 and I am running low on space. When I checked my apps list it says I have 7 GB of apps, but when I used Memory Map, it says I am actually using 3 GB of space.

I've deleted caches and moved many data to my SD card, but there is little to no change.

Is there a way to find and remove the 4 GB of phantom apps?

Basically every app will store some data. Hence it increases when number of applications get increased.

To get some free space, do the following:

Press your device's Menu button → select Settings (or System Settings)
Tap Application Manager (or Apps)
Tap the app icon
Tap Clear Data\Cache.

Next thing is to disable\delete the application that you will not use.

6.Delete .thumbnails & also unwanted files by making it show Hidden Files

7.Delete the Social Media Apps Folder Ex:/sdcard/whatsapp. But Before that, Select & Move your Videos, Images, Files, Audios from Social Media Apps Folder.

Note: Clearing the app's data will remove any custom options, stored data and settings.

Note: Clearing the app's data will remove any custom options, stored data and settings.


How to use Google Music MP3s to set a ringtone/alarm? I have bought various albums through Google Music cloud service and they are downloaded for offline use on my device. How can I use one of these MP3s as a ringtone or an alarm?
It seems that the standard picker is not able to find them.

If you are comfortable with copying files in a file explorer

Go grab ES File Explorer if you don't have a file manager already.
Make sure that root browsing is enabled and navigate to /sdcard/Android/data/com.google.android.music/files/music.
Hopefully you don't have too many songs stored locally, cause this is the not-so-fun part.  Go through song-by-song by selecting one and using Google Play Music to complete the action.  When you find which file is the right song, copy it (for ES, long press then select copy, could be different for other apps).
Now navigate to /sdcard/media/audio/<whichever_folder_applies_to_you> if you are on pre-ICS or /sdcard/<whatever_applies_to_you> if on ICS or Jelly Bean.  Paste it in (Hitting Paste on the status bar for ES) and you should be good.

If you aren't comfortable with copying files in a file explorer

If for some reason you don't want to copy, then still figure out which song is the right one.  Then when you go to set your ringtone/alarm/notification use the ES File Explorer entry that pops up.  Then navigate to /sdcard/Android/data/com.google.android.music/files/music and select the right song.


Password protected access to phone features Is it possible to password protect access to certain phone features s.a. ability launch google-play (to install new apps), and certain apps ?

Is it possible to restrict ability of a phone to make phone-calls or send/receive SMS's to/from particular set of numbers, under password control ?

User experience would be that they are prompted to enter a password/secret-PIN to access these features. If user enters the correct password/PIN they get access to the specific application otherwise not.

Edited (Sept 19, 2012):
Looking for solution that does not require flashing custom ROMs. Thus MIUI, Aliyun, Cyanogen-Mod etc. are not feasible, as I require the solution to work on the ultra low-cost Android devices which use Mediatek chipsets.

You can use Smart App protector or similar software. However I haven't tested it personally. I use MIUI rom which have these functions built in.


need to reinstall widget category on nexus 7 I have tried to find answers to this problems at several different forums.  I went to the all apps screen where the widgets category tab should be and it was gone.  I even tried to down load a widgets launcher from play store and it didn't work.

Many APPs have widgets that you can install on a panel of your home screen.  Long click on a panel of your home screen that still has sufficient empty space left for your widget(s) and then click on Widget then on the widget's app you want.   If there was no space left on the home screen panel you were on, you would not be able to see widget choices to be able to install a widget.

You wouldn't find Widgets on the App Screen unless it is an individual widget App.  There is a resemblance between apps screen and home screen, and that is what you probably remember.

You could have possibly answered your own question here, by clicking on the "Widgets" tab on your question, or better by clicking on tag at the top of the page and they typing "widget" into the tag search box,  or using the search box at the top of the page.


Why does the STORE button on Amazon Kindle go to the website instead of the in app store? I have the Android Amazon Kindle app installed on both my Galaxy S phone and my Archos 10" tablet.

I keep the software updated so I'm sure the latest version is installed.

I am logged in with my account on both devices.

When I press the STORE button I go to the inprog Kindle store. But when I press the STORE button on the Archos it starts the web browser in stead.

Now, I have bought ebooks before from both devices and I am sure that previously, the Archos also displayed the inprog store. It's much easier to use the inprog store display than the full Amazon web site version.

Does anyone now what could have changed this behavior ? I looked for some setting but found none.

I'm not too familiar with how intents work exactly but this looks like the browser is mistakenly set as the default app for something it shouldn't handle. Try installing DefaultApp Reset and reset your browser as a default app. This will make sure it won't be registered as the default handler for anything at all. Then try going to the store again.


Where to get the release version of lollipop for Nexus 7 I'm looking for the Lollipop OS that I can sideload to my Nexus 7 2012 and supposedly they released Lollipop for Nexus 7 2012 today (Nov 3, 2014).  Is there a site I can go to download the OTA file?

The official version is not here yet.

The place you've already linked is where the downloads will show up first. Normally OTA updates are staged-rollout, meaning you'll have to wait until your device/region is eligible to receive the update unfortunately.


Deleteing photos from device but still have them in the backup (default Google+) I've been looking all over for a proper explanation of how to delete photos from the device (nexus 5) to reclaim some space, while being sure that the pictures are still in the Google+ backup.
Unfortunatley i have not found one, other than "wild claims" it works somehow, while other say it does not.
Plus deleting photos via the Pictures app actually warns you (now?) that it will delete the backed up copies too. Do i have to delete them in the Gallery app?

I did delete some photos recently, and i was quite sure they ware still backed up (still showed up on the Google+ website) but looking now i see they are in the trash in the device.

Is there really no way to be able to know for sure if the pictures are backed up savely while i can delete them from the device?

Alternatively i'm also open for alternative solutions to this problem, or i just go back to the "good old copy and paste when plugging the phone".

With the latest update to Google+ something changed in the Photos app. To ensure you are deleting the right pictures take the following steps:

Go into the Photos app
Click on the top left corner for the side menu
Scroll down to Folders and click on it

You will be presented with the different folders on your phone. Delete everything from there and check your storage again.


Why is my Nvidia tablet looking for chinese servers(baidu.com)? I am not sure if this is the right area for the question, or if it is even a big deal, but here i go.
When using by Nvidia tablet to develop an app I realized that it was attempting to reach a server in china. this doesn't make sense to me because I don't have any apps that I would think would try to do this. What I would like to know is if this is a security concern?

02-12 14:09:32.448  11220-11284/? E/sdkstat﹕ sdkstat send error++++++java.net.UnknownHostException: Unable to resolve host "hmma.baidu.com": No address associated with hostname

You might want to read this February 2016 article at citizenlab.org.

Most relevant part of the article:

  Leaks sensitive data on startup

  Upon application launch, we observed Baidu Browser sending an HTTP POST request to
  https://hmma.baidu.com/app.gif

  The body of this HTTP request is a gzipped JSON file. The JSON file contains a list of fields with various details about the phone and the user, some in plain text and others encrypted.

  Unencrypted fields in the JSON file include:

  o: the user’s operating system (e.g., “Android”)
  n: Baidu Browser version number
  w, h: width and height, respectively, of the screen in pixels
  gl: GPS coordinates and time of last GPS update

  Some fields are encrypted using AES+ECB with the hard-coded ASCII-encoded key
  h9YLQoINGWyOBYYk

  and then Base64 encoded. These fields include:

  dd: IMEI number
  ii: a string containing the phone’s IMEI number written backwards and an MD5 hash of Android software version information
  wl2: list of all in-range wireless networks and their MAC addresses and signal strengths

  With knowledge of the hard-coded key, these fields can easily be decrypted. The source code for a python script for decrypting these fields is available here.

And then there's Baidu's response (PDF file hosted at citizenlab.org). They don't seem to see an issue in collecting this data, they just acknowledge that they need to improve their encryption:

  Baidu endeavors to collect data in a way consistent with the highest standards of security and
  user privacy in the industry. We disclose our practices in our terms of service under privacy
  rights as detailed here (Chinese): https://www.baidu.com/duty/yinsiquan.html

  We're grateful of Citizen Lab for being mindful of data security in transmission and we have
  already made substantial progress toward ensuring that any such transmission will be secure.

So citizenlab's article is probably no more describing what you can see on the net nowadays.


Receiving Google Voice calls to my EVO I recently set up a GV number and seemingly activated the number for my cell phone, HTC Evo. I can make outgoing calls using the GV# and send/receive texts fine but whenever someone calls the number it gives an 'unable to connect' error and hangs up. Anyone have a solution for this issue?

This is still just my best guess, but I would definitely check to be sure that Google Voice is linked to your cell number and that it is set up to forward your calls. You should see something like this in your settings:

If that's all set up properly then you might want to consider starting a discussion thread over at Google's support forum.


How do I manipulate the filesystem of my Android smartphone from PC without restrictions? Can I do it on an non-rooted phone? I want to be able to copy/move/erase/modify files on my phone and transfer them back and forth on my Windows 10 PC. Without limitations hopefully.
My phone ( Meizu Note 8 ) is not rooted, and I'm not sure if I can root it. It doesn't seem to be very popular.
I got the vague impression that I need ADB drivers which I also couldn't get, and I don't know what software to use after. This is the best I found, but it's far from official and also doesn't work: no installer, and the .inf doesn't have the install option in the context menu, which usually means the driver is not compatible.

To access app data you must be rooted.
When rooted you can access the /data folder with adb. You do adb shell.
Then su to access superuser rights and then you can access /data.


Reset application specific or phone-wide default image folder I was browsing with the official Facebook app and when sending a picture to a friend I used SkyDrive as the folder where to choose my files from. Then I accidentally made it the default folder. So now, whenever I want to send an image, the app always directs me to SkyDrive instead of getting it from the phone's gallery.

I already tried resetting to defaults and deleting the data of the app, but that didn't work. That's why I think it might be a phone-wide setting. I just can't seem to figure it out.

Phone is a Desire X, running Android 4.1.1.

A possible solution is to reset all the defaults:

Settings > Apps > Menu > Restore App preferences (or something, I have a Dutch version installed)


Does the device/charger consume power after charging is complete? I'm a bit OCD about efficiency and I have noticed that at least one of my two Android devices tells me to unplug it after charging is complete to save energy. My questions are:

Is it true that a chargeable USB device may or will continue to consume similar amounts of power if it remains plugged in after fully charging?
Does this vary based on hardware and/or software (Is it possible my LG Optimus T phone continues to consume similar power after it is charged, but my Nexus 7 doesn't)?
If a device continues to "consume" power after it is charged, where does it go (laws of thermodynamics and all)?

In searching for my answer, I have found the following questions relevant but not entirely applicable to my question:

Does constant charging harm my Android cellphone?
AC-USB Charging Device Makes Sounds when Device Fully Charged
What component of my phone charger produces chirps and how does it do that?

Like any other device, regardless if the battery is full or need charging it consumes energy all the time. When your device is fully charged and still plugged in then the charger replenishes the energy used by the phone. It uses less energy than when charging but still. This is called Trickle charging
It is advised to unplug device because keeping you battery fully charged all the time will reduce its capacity and make your battery die faster. Battery needs to be partially discharged and then be fully charged on a semi-regular basis in order to prolong its life.

The following sentence is from  Article on prolonging battery life

  Let’s look at real-life situations and examine what stresses lithium-ion batteries encounter. Most packs last three to five years. Environmental conditions, and not cycling alone, are a key ingredient to longevity, and the worst situation is keeping a fully charged battery at elevated temperatures. This is the case when running a laptop off the power grid. Under these conditions, a battery will typically last for about two years, whether cycled or not. The pack does not die suddenly but will give lower runtimes with aging.

You can also read about partial discharging and charging here:

Techrepublic - Five tips for extending lithium-ion battery life


After rooting- apps on SD card seemingly non-existant I have rooted my phone 2 days ago using iRoot (well, actually, a couple of rooting softwares that failed on me before using iRoot). To be safe, I removed my sim card AND sd card before performing the process of rooting. It was a pretty straight forward process (as with many of the "one-click" rooting mechanisms readily available).
I was slightly concerned afterwards as to where all my apps had gone missing to. You see, most of my apps were installed to SD card anyway, and those that were not were copied there (e.g Du battery saver). I suffered pretty much the same problem as this guy- (can't find apps on sd card after root)

Rebooting and even factory resetting the phone on multiple times did nothing to "revive" the apps. The SD card size is the same as it was before the root, so the apps are definitely still there. The app data is still there also...so I am really confused as to why the apps are not showing up.

Because I needed to get on whatsapp for days, I decided to just re-install the app again and upon doing so it let me know that it was detecting some chat backups and restored the app almost fully to its original state before the root.

After searching around online I couldnt really find many other people in a similar predicament. It seems rather odd.

Could anyone provide some insight into this?

(My phone specs- spreadtrum with froyo...I suspect)

Edit- Forgot to say thanks in advanced.

Removing the sd card and SIM, then rooting can do this. It's better to leave them in

This is probably down to the fact that a root upgrade (I.e. Rooting) can change the apps links, meaning a reinstall. I done the same as you, and had to redownload terraria when it was not there but was, and I kept my data. It's kinda like you delete the app, but not the data.


How can i enable otg in symphony H250? which is unsupported otg phone my phone doesn't support otg how can i enable this feature in my SYMPHONY XPLORER H250 android phone?

Unless someone develops a kernel for it that adds support (which your phone likely never will - the fate of unpopular devices), there's no way around the limitation. Even then you will have to externally power the USB device in question (e.g. via Y-cables), since the port don't natively supply power.


Is there a way I can prevent the back button from going to the home screen? One of my pet hates about Android is the back button. It is fairly unpredictable what it will do.

Depending on where you are, it can do one of three things:

take the user up a page in the same app
take the user back to a previous app
take the user back to the home screen

Normally, I think the 1st and 2nd scenarios generally work pretty well. Even through I'm not sure where it's going to go, 90% of the time, it'll take me to where I want to go.

The last scenario is very frustrating and happens exclusively when I didn't realise that I was already on the first page of my app. It just dumps me on the home screen and I have to figure out how to open the app again. As far as I'm concerned I can't see any good reason for ever taking the user to the home screen when they hit the back screen - especially since there is a home button right next to the back button for that purpose.

Anyway, I want a solution to this. So is there some sort of app or some sort way I can program Tasker or another automation app to either

override and cancel the Back button action if it'll take me to the Home screen. Either have it do nothing or display a message
just disable the back button altogether if clicking it will take me to the home page.

I'm on Lollipop and unrooted.

However, although I want an actual solution for myself, I'd be interested in hearing of any solutions that are rooted or on other versions too.

Well, this is still (after investing so many hours) a half-baked (aka partial) solution. You want a message, you'll get a message. :) We need root access for the solution.

Note: Tested the solution on Android 4.2.1 but works on 5.0 as well.

At this point of time, the message will be received as a Toast and it has no effect on Back key.

For the purpose of example I'm using ES File Explorer and BetterBatteryStats to display a message on their default screen.

Fire up Tasker and enable it.
Go to VARS and create a variable as +→ %Catch (you can use a different name but keep the first letter capital (global variable)). Similarly, create another one with name %Any.
Create a profile with application context and select ES File Explorer.
Create a task under the above profile and then an action inside this task as +→ Code→ Run Shell and enter these details:

Command: dumpsys activity | grep mFocusedActivity | cut -d ' ' -f 6 | cut -d '}' -f 1 -- this command will output the focused  activity (current app launched with its activity).
Check Use Root.
Store Output In: %Catch.
Save this action.

Create another profile with application context inverse of ES File Explorer.
Create a task under the above profile and then an action inside this task as + → Variables → Variable Set, and enter these details:

Name: %Catch
To: The (you can put any word)

This step will make sure that the variable %Catch doesn't hold the value (provided in during execution of step 4) after the profile in step 3 becomes inactive.
Create a last profile under Event → New Window and choose Full Screen under Window Type -- I earlier had Toasts even for dialogs on Main activity. Full Screen option will avoid it.
Create a task under the above profile and then an action inside this task as +→ Code→ Run Shell, and enter these details:

Command: dumpsys activity | grep mFocusedActivity | cut -d ' ' -f 6 | cut -d '}' -f 1 -- this command will output the focused activity (current app launched with its activity).
Check Use Root.
Store Output In: %Any.
Save this action.

Create another action in the same task as + → Alert → Flash, and enter these details:

Text: Don't back Disk :/ -- this is the message that will be displayed in the Toast. Choose wisely!
Tap + corresponding to If and enter %Any eq %Catch -- we're comparing the main activity name for our selected app with any window Android will open. If it matches, you'll see the Toast. Now you can see why we needed an extra "inverse app context" profile in step 5.

Save everything and enable all three profiles.
Note that I had to shift my Superuser app's root access Notifications from Toasts into Status bar notifications because the third profile will need root access every time Android will launch a window. Make sure you either disable your Superuser client's Toasts or change them into Status bar notifications. It was an invasive stream for me!
Anyhow, launch ES File Explorer and see the magic. The default screen of this app will show a Toast to you. You open any other activity and it won't bother you. Come back to main screen of it and see the Toast again.
You can have this behavior for multiple apps. Just choose your app in the profile we made in step 3 and 5. They are supposed to be added in OR context like ES File Explorer or BetterBettaryStats and Not BetterBatteryStats or ES File Explorer.

Some screenshots:

(Click any image for its larger variant)

                     →                                  →

(No toast for any other app)                                                (Default screen for BetterBatteryStats)

                    →                                    →

(No toast on dialog on same screen)                                      (Dialog closed and toast came back on main screen)

                    →                                     →

(Toast on Default screen of ES File Explorer)                            (No toast on dialog of the same screen)

(Toast came back as soon as dialog disappeared)

Commentary

The aforesaid solution didn't work on my device satisfactorily if the app remained in recent list (but OP is not concerned with it) and you happen to open it again.
You can get rid of app (and inverse) context based profiles if you use a string in  step 9 in place of %Catch like com.estrongs.android.pop/.view.FileExplorerActivity (Main activity of ES File Explorer). The solution will be reduced to two steps. :D

However, I would like things to be automated here, so why bother especially when you want to select multiple apps for the toast!

What else?

Every device more or less has a keylayout under /system/usr/keylayout. In my device the generic layout is named as Generic.kl. The relevant key is mentioned at

key 158 BACK    WAKE_DROPPED

If you put # in front of it and restart the device then the back key would be disabled. To remain at safe side, I swapped it with Meny key (key 139).

This swapping can be very beneficial in Tasker. Unfortuntaley, the changes take effect only at next reboot which is very counterproductive for our goal. Let me know if it can be done without a reboot!
Xposed Additions(requires Xposed Framework) can remap or disable the Back key et al, but it has no explicitly callable activities (relevant to the goal) which can be utilized by other apps. Also, it doesn't even seem to store a database or a preference file. So I couldn't use it with Tasker to achieve the goal.
Secure Settings (another Xposed module) has an option named Kill back button but it seems to be available for Custom ROMs and so, I couldn't test it. Some folks say it does work and I too saw the plugin useful for the goal. Check it out if you've a custom ROM.

I'm open to Ideas here!


unable to connect laptop to cisco vpn when laptop is using tablet internet connection I am facing an unusal problem. I tried searching but seems no earlier post is here addressing my problem.

I am using 3G mobile data connection(SIM card) in my samsung galaxy tab 2. As you know android Jelly Bean has the feature of sharing the tablet's data connection via wifi tethering/hotspot. Now: I can connect to the internet easily from my acer laptop(windows 7) via the wifi tethering of my tablet. However, when i try to connect my laptop to my office vpn(cisco) using cisco vpn client, i get the error that the client is not able to connect to the vpn server. But if i connect my laptop to the internet via bluetooth modem of my nokia c7, then vpn connection is easily established.

Is it something with the wifi tethering technology? Please help. The tablet itself can connect to vpn server using vpncilla for android.

Please suggest.

The problem is that whereas the bluetooth connection functions as a bridge network device, Wifi tethering creates a NAT which may prevent some functionality. See if enabling Transparent Tunneling or IPSEC over UDP on the client help. Since tethering doesn't support port forwarding, you can't use PAT on the device.


Why are my "Sleep" settings disabled? Under 'Settings - > Display', my 'Sleep' option is disabled and locked at 30 seconds (which is terrible). I have a 'Work Profile' on the phone, but this is not happening to others at the company, so this appears to be a local issue.

What could be causing this and how can I re-enable my sleep settings? It seems some other setting is affecting the sleep setting, but I can't find what it would be.

I'd manually activated the 'Battery'->'Power Saving' mode, which was overriding the 'Sleep' settings. It would be nice if the 'Sleep' settings had told me this, but there you go.


Using Gmail app on a public WiFi Does official Gmail app use a secure connection?

This post above discussing whatever Gmail using a secure connection, but is it relevant to a public WiFi connection? Or in public WiFi, is there a chance for hacker to steal your data even with the fact Gmail using a secure connection?

The GMail application is now a general email application. You can set it up to talk to any email account. There are two important cases:

You use the GMail application with a GMail account, for example: my.user.name@gmail.com. In this case, Google only allows secure connections.
You access a non-GMail account using the GMail application. This may be encrypted or unencrypted depending on the configuration of server and client. You can configure this to be unencrypted, though any decent mail provider now should only allow secure connections.

Attackers will not be able to read your data unless they can generate a valid certificate that matches your mail server address or can otherwise compromise the TLS connection. This is not impossible, but if your server and your client are up to date on security patches, this is not something you have to worry about on public wifi.


Purchase cancelled from Google Play Store, but verification fee deducted Yesterday I was trying to purchase an app from the Play Store. So I added my card details to the dialog window that appeared, and Google deducted a small sum from my A/C (Rs.51 INR), which I know, is for the purpose of verification of my card. But the problem is, the app which I was trying to purchase says the transaction was cancelled. Here's the transaction log from Google Payments:

Sep 1 » Google has canceled this purchase.
Comments from Google: Your credit card ending in XXXX was declined.
Please select a different payment method.
Sep 1 » Your XXXX-XXXX was declined for this purchase.

If I entered wrong credentials, then why did the verification amount got successfully deducted?
Should I attempt to make the purchase again?

The verification fee is refunded to the account within 3-7 business days.

Check this for details.
Google Play deducted extra Rupee 50 after first-time Play Store purchase of an App/Game. Why is that?


Can an app save data on the SD card? I have noticed that when I remove an app, which is placed on the SD card, this also frees up space on the main storage. The space freed up corresponds to the "data", which an app stores. My question is, therefore, why does an app, which is placed on the SD card, still choose to store its data on the main storage? Is it because it is impossible not to, or lazyness on the part of the developer?

Apps can store data in both places, but the SD card has a FAT filesystem which does not support file permissions.  This means that a malicious app could erase or change app data very easily if the data was on the SD card.  As well, you can swap SD cards or format your card, and then the app would have "forgotten" all its settings and lost all the other data.  So it's a very good idea to put app data in the phone storage, where Android can manage access to the data and protect it.

On newer versions of Android, the SD card filesystem can be virtualized to enforce permissions.  Couple this with encryption, and the above issues go away.


Is it possible to replace the dock (but just the dock)? I have a HTC Desire HD and I like Sense (and the apps provided by HTC) a lot. But I really hate the default launcher (specifically the dock).

The problem is that if I change my launcher, I will lose the ability to use HTC Sense widgets. Is it possible to replace just the dock, but leave the rest of the launcher intact?

Unfortunately, No. The "dock" is part of the entire launcher and "home screens". They are, all the "same application". But there are widgets like most of the widgets that HTC Sense has. If you really don't like it that much, you should be able to find replacement widgets for the ones you like that work with other launchers like Launcher Pro, GO Launcher, or ADW Launcher, for example.


Importing contacts from Windows Phone 10 Trying to set up my new Galaxy S9+ today and I'm moving from a Lumia 950XL running Windows 10 Mobile - and for the life of me I can't get it to import my contacts.

The obvious solution would appear to be the Smart Switch app, however: I installed it on both devices, set the S9 to "receive" and connected the 950 to the Wifi network SS created, unfortunately it just sits on "Connecting.." on the 950-side (despite the S9 side claiming it's connected).

Other things I've tried:

Adding my One Drive account - Nope, no option to sync the contacts.
"Linking" the S9 to my Win10 laptop via Link My Phone - Nope, it shows as linked, shows up in my Microsoft Account when I log in there but no apparent way to sync anything.
Adding Microsoft account to Outlook - Nope, can't add it as it doesn't have mail associated with it.

What am I missing here?

After a few more failures where I tried exporting contacts as VCF and importing into my Google account (imported 9 out of 209 - no message to indicate why the remaining 200 didn't import) and trying to import the VCF direct onto the phone (failed completely with a message indicating the format was invalid) I eventually tried the Smart Switch app again, this time it prompted me to update it when I opened it so I did and this time it worked. It took a couple of hours but it seems to have worked ok.


How can I sync the Google keyboard's clipboard with Android's clipboard? How can I sync the Google keyboard's clipboard with Android's clipboard?

Google keyboard's clipboard:

Android's clipboard:

I use Samsung Galaxy S9 with Android S9.

The actions in these answer are from a Galaxy Note 8 which is nearly identical to your device. Unfortunately I do not know any way to sync them and as far as I know, it is not possible. However, I can explain this behavior.

The clipboard is a feature of the keyboard which is nothing but an application that registers itself as an Input Method with the android operating system.

What you are referring to as the android clipboard is actually the clipboard from the Samsung keyboard. This keyboard is better integrated with the Samsung environment. Here's how you can switch to the clipboard from the Samsung keyboard:

Long Press on the globe like button:

Click on the Samsung keyboard in the list that opens:

Find the clipboard icon from the options on the keyboard, possibly in the extended list that is visible upon clicking on the 3 dots:

Particularly in certain text boxes like the email compose section, this clipboard is disabled for some reason:

Which is why you cannot use this clipboard everywhere even when you longpress in the area to bring up the clipboard shortcut.

To switch back to Google's keyboard, you can bring down the notification area and click on the change keyboard button:

However; since these are 2 different applications; there seems to be no way to synchronize them since the clipboard feature is probably not universally standardized.


how do I get Google Play back I need help re-installing Google Play

I don't know how to. I have tried turning off my phone, but it doesn't work. I want to download Temple Run 2, but I can't because I don't have Google Play. I am hopeless.

Because you don't have Google play it is safe to assume that you are rooted. In this case you can just flash a "gapps" package from the internet.

Or, you could also install Google Play from the internet (via downloading the .apk)
It should auto update if its not the latest version.
You can find an .apk here:
http://www.apkmirror.com/apk/google-inc/google-play-services/

You may also be able to install Google Play Services from the Play Store.
Link: https://play.google.com/store/apps/details?id=com.google.android.gms&hl=en


formatted tab 3 10.1 and cant install android from twrp got a problem with my samsung tab3 10.1 (5200), installed twrp and rooted the device and after that i formatted it in twrp to install a fresh android on an empty tablet. But install couldn't work , the installer couldn't make directories data and others so the install did not work ( took about 2 minutes) but at the end it says succesfull.
It cant boot past samsung logo because i think nothing really installed.
Anyone has an idea to try and install in another way ?
I'm trying to instal cwm now but says md5 hash invalid and same with the twrp file which is on the device.

already found the problem guys, after the format  it sayd you best reboot the bootloader  so i did that and then it could read and write, it's up and running without the latest offcial update that crashed a lot.
rooted and deodexed whatever that means.
grtz


Google Music's cover art, song name, pause and play don't appear in my notifications I have a Razr Maxx HD on Verizon and noticed that unlike my friends' Androids, when I play music using Google Music, the album art, song name, and pause/play notification isn't present.

In fact, if I start a track using Google Music and then go Home, the music keeps playing, but there's not "headphone" icon in the collapsed notification area, and so the only way to get back to that track is to go to Google Music or click on the cover art in the widget.

Any idea how I can get Google Music to show up in my notifications when a track is playing?

After WEEKS of having this problem, I figured this out.  In System -> Apps, under the Google Play Music app, I had "Show Notifications" set to not display.  Doh!


Apps spamming my log I've been looking at my log recently for more development of android applications, and I've noticed my log is spammed with all sorts of information that I wouldn't considered needed to be logged.

Over time, I've notice my phone get slower. I've even noticed at this point, completely stock firmware with a number of apps from the Play Store, running music right now, and Eclipse can't even keep up with the log output on Verbose logging.

My question is related to this. Are the logs stored for a while that might cause space to gradually disappear? Is there a way to turn off some logging features as to not record to "disk" things like verbose, when apps don't even need it? I've always thought logging should be done if it's an error, not "just because". If it's debugging information, then the release version shouldn't log that much output (easily done with a simple variable switch). Am I wrong in this thinking?

Thanks in advanced!

Android logs are stored in an internal ring buffer.  As such, I don't see how even the overly verbose apps could slow the system down purely through logging.


Disable updates when at work? How can I disable various social apps from updating while I'm at work (where I work with my laptop anyway)? The main point is conserving battery. (I have HTC Desire HD)

I don't want to turn off wifi completely since I might want to work with the phone occasionally

The 'Power Control' widget has five buttons for turning various functions on and off - including one controlling updating of applications (the circular one with two arrows on it). You can add this widget by long pressing (press and hold) somewhere on your home screen, then selecting 'Widget' from the menu that pops up, then 'Power Control'. I believe that if you press the 'refresh' button to turn it off, it should stop applications updating automatically, but they can still be refreshed manually if needed.

The widget also has handy buttons for easily turning on and off wifi, bluetooth and gps, and changing screen brightness. It takes up a whole row on the home screen though, so you might need to make some room.

edit - the below image shows the power control widget with updating turned on, and all other functions turned off, taken from: HTC Desire review at android.marvinlee.net:


Accessibility Voice Control to Read a Navigate a Webpage I am using a Samsung Galaxy S10e and I would like to use my accessibility features to voice control my phone while driving. I would like to be able to navigate to a website and have the content read to me and use voice commands to give commands within the website like, "skip link" "Fill-out form" and "tap link." Does anyone know if this is possible with Android's built-in accessibility and if so how so I do it?

I am also willing to use an App if there are any out there that will allow me to voice control navigation and read content to me. Thank you so much for any help!

Android's built-in Accessibility really focuses on reading/speaking items on the screen and using gestures to move around.

For voice control, one possibility is Google's Voice Access app in the Play Store, and the intro tutorial does give a good example of the app's features, but there seems to be some problems with the form-filling (speech to text into a field) when I tried it just now. I also noticed that it uses small numbers for focus change which may not be desirable while driving.

Using an Accessibility app is pretty invasive from a permissions point of view so provided that you trust Google and can work around the current defects it is probably worth trying out.


Lenovo tab 3 7" TB3-710F Android 5.0.1 won't start after installing wrong TWRP Basically I wanted to root it and every TWRP I tried came up an error that the file was too big,. moments later I tried different versions..many other versions btw,, scaling down to the smallest in size was 2.0.1.2 I think..

Anyway, it got stuck in a bootloop for about 2 hours. Mind you the computer makes the beep everytime I connected it and reconnected, so I thought it's still alive. Now, it won't turn on and I've tried most of the method's to get it flashed but nothing even lights it up... brick

I have tried most XDA and Google without any possible fix.

Thanks for that really detailled answer, dear alecxs.. At first it didnt work because i had the wrong ROM , than i take the correct one , followed the tutorial really exactly from 1-20 and what should i say , i reanimated this Tablet which stucked in a bootloop a long while. Workes well now .. I struggled a little bit with Google Play Services which i cant update  but i kicked them after i rooted the tablet and reinstalled them manually again..

Thanks for this great tutorial


Android stops/pauses execution of my background script? Short version:
Why is my bash script (running in the background, started via SSHD) not running every ~30 seconds when it should? (NOTE: SSHD and the script are running as root!)

I have a script that I start using nohup bash script.sh & so that it runs in the background.
The script is supposed to check whether a specific app is connected using netstat and if not it automatically reconnects using am start and input keyevent. (This turns out to be irrelevant though).
I've noticed that even though the script should check every 30 seconds (roughly of course), sometimes it takes minutes to check. I couldn't really figure out why and it seemed completely random (note that the phone's screen is off most of the time and everything is running in the background.), so I made a testscript which is what the question should focus on for simplicity:
#!/bin/sh
while : ; do
    echo "$(date +'%Y-%m-%d %H:%M:%S')"
    sleep 30
done

That's it. Started via nohup bash script.sh & using SSHD. The script does nothing but print the current datetime and thanks to nohup writes it to a file. I left this running for a while and then wrote another script to check on the results and print the amount of seconds whenever it's above 30. Result:
134
127
115
127
88
113
116
99
110
116
54
44
70
75
62
82
94
68
429
62
81
126
144
39
467
71
62

This is from the output of a script that ran for only 4:20 hours, so quite a lot of times where execution must have been delayed, the sleep was longer than 30 seconds, or whatever is going on....
Can someone explain this? And is there a solution to this?
I suspect this might have something to do with memory or power management pausing the script but really it shouldn't happen and I would like my script to run in the background and to sleep for exactly 30 seconds and not be paused or delayed. In this testrun, the highest was 467 seconds, but the highest I've seen with the main script so far was a little over 20 minutes. This is rare, but 5-10 minutes of a delay happens a few times a day.

Android turns off some of CPUs and/or don't let apps use them when it's dozing. It's achieved through Linux kernel's Control Groups. One of the cgroups is cpuset that controls which CPU is assigned to which processes. Android creates multiple descendant cgroups in cpuset e.g. background, foreground, system-background, top-apps etc.

Apps are normally in background category which can use least no. of CPUs - usually one or two. Core native services like vold, zygote (and system_server), telephony services, and apps which run a foreground service (e.g. notification) or those exempted from Battery Optimization or those having privileges like allow-in-power-save are put in foreground group which can use CPUs even when device is in sleep mode.

So you need to add the script to foreground cgroup in order to keep it alive. From within script:

~# echo -n $$ >/dev/cpuset/foreground/tasks

Going even more aggressive, you can hold a wake lock so that device doesn't suspend:

~# echo -n my_script >/sys/power/wake_lock

Don't forget to release it (echo -n my_script >/sys/power/wake_unlock) after stopping the script.

Please note that both of these measures can adversely affect your battery performance, particularly the latter. Android's warning:

  Creating and holding wake locks can have a dramatic impact on the host device's battery life


How can I boot to a specific partition with ADB? If I have ADB access to device, how can I specify the boot partition and reboot. I tried with setprop but this failed,
#> setprop ro.boot.slot_suffix _b
libc: Unable to set property "ro.boot.slot_suffix" to "_b": error code: 0xb
setprop: failed to set property 'ro.boot.slot_suffix' to '_b'

Using bootctl
Though it requires adb root, one method to do this would be to use bootctl if available.
#> bootctl set-active-boot-slot SLOT
#> reboot

Note: SLOT is a number, you can find out the labels by looping through them and calling get-suffix for example this little shell script,
for slot in $(seq 0 $(expr $(bootctl get-number-slots) - 1)); do
  echo $slot: $(bootctl get-suffix $slot);
done;

Which will return the mapping,
0: _a
1: _b

See also: How can I tell whether I am booted into the A or B partition?


Ridiculous error on all google play store Using CM 10.1.3 I have a crazy problem. Whenever I update anything I get this error

  update for (insert Google app here) could not be downloaded due to an error (error while retrieving information from the server. [RPC:S-7:AEC-7 QNHM-TYSO-UNVHY])

It may also be worth telling you the very last 5 letters vary. It also happens to any new apps I attempt to install.

This error can have multiple causes. Some are explained on our sister site, in Error while retrieving information from the server RPC:s-7:AEC-0 in Google play?:

  turns out my credit card info on file needed updated to my new expiration date.

is one possibility. One more:

  RPC:AEC:0 error is known as CPU/RAM/Device/Identity failure.

  Go to settings >application > Play Store >Clear Data & Clear Cache.
  Go to accounts >Google >Remove account.
  Reboot device.
  Again Settings>Account >Google >Log In.

Another reason is explained on AndroidPIT (German): It could be problems with Google servers (same is, btw, reported by users in this thread on AndroidForums.Com). One user reported a work around that did it for him: He tried it at least 10 times on his Android device, without success. So he simply fired up the browser on his computer, and tried it from there -- which immediately worked.

For more details (and possible other solutions/work-arounds), just follow the other results from this Google search.


How to alter android opera lock screen news? How to alter android opera lock screen news?

When my android os7 is now unlocked there is the Opera browser lock screen news. How can one alter the content displayed there?

Find this apk "com.google.android.deskclock-3.0.0.apk" on some mirror that has "old" versions. It's the one with the black clock face, not the white, or light coloured one. Save the apk, and you can then always restore a good size clock widget to your home screen.

Careful, a number of these mirrors have tons of click-bait. apkmirror.com seems to be fine.  So Google search the apk.  Go to the apkmirror.com result.  Then click "DOWNLOAD APK".  NOW WAIT, it takes quite a few seconds, but the site does come back to ask where you want to save the file.

And do save the file, don't just install it, because the next "update" or "upgrade" from Google may overwrite the clock. Also, I suggest, save it to your SD card, so that, in the unlikely event, when you have to do a factory reset, the file is not lost.  Once saved on your device, you can install the apk.  Now you have to drag a widget to the home screen.  As widget you have a choice of circular face or digital.

BTW, this widget will also give you back the circular "time picker" for setting your alarm clock.


How can I block unknown contacts from sending messages in Whatsapp? Are there means of blocking unknown contacts from sending messages? Unknown contact here refers the time when someone sends you messages  (contacts displayed are in the form of letters, and are in similar digits like mobile phone). Unfortunately you cannot reply or save the contacts.

Are there means of blocking this,  only allowing messages from people in your contacts only?

When you receive an initial message from an unknown contact, you will have the option to Report Spam and Block.

If you just want to block the contact, simply tap on Menu Button > More > Block.

So, in other words, When you receive the message on WhatsApp from a number and that number is not yet in your contact, then WhatsApp will show BLOCK option at the top which should allows you to block that number from sending you FURTHER messages.

To block an existing contact on your Android phone, you can try below steps:

1.Open WhatsApp and go to your Chats screen.

2.Tap

Menu Button > Settings > Account > Privacy > Blocked Contacts

.
(This page displays all contacts that you have blocked)

3.Tap the Add blocked contacts icon in the top right.

You may Want to check FAQ for more details.


SuperOneClick freezes at "Running psneuter" while rooting. What can I do? I tried to root my new Samsung Galaxy S II today using the instructions in the CF-Root thread and in the videos provided by this guy on YouTube.

I was nearly across the finish line, but when I click the big "Root" button on SuperOneClick, it freezes at "Running psneuter" and won't go any further or shut down (without Task Manager intervention).

I've tried leaving it for > 10 mins, turning off all antivirus and I've tried 2 different SuperOneClick versions (1.9.1 and 1.7) to no avail.

Because of this, I'm pretty sure my root isn't going through properly. Mainly because when I check if my phone is rooted properly I can't get su access in shell.

Any ideas/thoughts about what to do?

According to an answer I got a thread I made at XDA Developers, it looks like the phone actually is rooted because the whole idea with the CF-Root Kernel I used is that it comes pre rooted (which makes me feel slightly sheepish!).


Benefits of skins as opposed to vanilla Android Has anyone seen any benefits to using skins such as MotoBlur and HTC Sense as opposed to "vanilla" Android like on the Nexus One?

I'm considering getting the Nexus S and this is part of my pre-purchase evaluation.

I wouldn't want to call MotoBlur or HTC Sense just "skins" -- they aren't a suite of visual enhancements, but an entire app suite that sits on top of the OS. They're full-fledged graphical user interfaces with additional custom apps, virtual keyboards, widgets, etc.

So, as to the benefits? I like Sense - its my major UI on the Incredible, but I've also used my wife's Aria. The Sense UI is cleaner and smoother (hardware speeds aside). The custom widgets are smoothly integrated and have more features. Other than the HTC mail and messaging apps having a possible memory leak issue [I replaced their use with K9 and Gmail, and Handcent], I've been pleased with Sense. A smooth, consistent user experience with the interface can make using it better. It's not the be-all end-all -- despite the recent MS WinMo7 commercials -- but it's nice.


How To Get Files Off a HTC M7 That Won't Stay On I have a HTC One M7 that I need to get all the (~1GB) files off. The problem is that the phone restarts after about 10-30sec, so I don't have time to manually copy the files.

Phone Info:

USB debugging is enabled
the phone is not rooted

The phone restarts even while fast charging and re-calibrating the battery did not help.

I then attempted to download the files to my computer while the phone was off/in recovery mode. The phone is detected in recovery mode on Windows, but I can't get any files off. I downloaded adb but it does not work in recovery mode.

I ran out of options so I was going to factory reset to fix the restarting bug, and then try to recover the data with an android recovery tool.

Since this is inherently risky, I was hoping that a better option to backup the phone would be provided.

P.S. Its not my phone. I know how to back up XD

So I modified this script to automate file transfer in between reboots:

#!/bin/sh

rfolder=/mnt/sdcard/DCIM/$1
lfolder=$2
homeDir=`pwd`
adb shell ls "$rfolder" > android.files

ls "$lfolder" -1 > local.files

rm -f update.files
touch update.files

while IFS=  read -r q; do
  # Remove non-printable characters (are not visible on console)
  l=$(echo ${q} | sed 's/[^[:print:]]//')
  # Populate files to update
  if ! grep -q "$l" local.files; then
    echo "$l" >> update.files
  fi
done

Its slow but it works


How to synchronize my smartphone to my Google account? Everytime I take photos with my smartphone, I want to synchronize it automatically to my Google account. How to achieve that ?

Hope the following instructions help ...

Open the 'Photos' app on your device
click on the 3 horizontal lines on the top left part of the screen(just before the search field)
Access 'Settings' option from the drawn up menu panel
You have the 'Backup & Sync' option at the beginning of the list.
Select that option and setup your backup account.

You have various other options ... you might want to look into each of those and choose one's that you require and you have setup your device to automatically sync photos.

Play around and look into the various settings ... it will reveal options you never thought existed ... improves the quality of your usage to the maximum.


Basic question about flashing nandroid backups I want to know that when we flash specific partition images (say system.img, data.img, cache.img, etc.), then how does the software know where exactly to put those partition bytes? For example, if I flash system.img, which CHS/LBA sector will it consider as beginning of that block? If it is based on the MBR/EBR1 tables, what will happen if I'm flashing the MBR/EBR1 too?

The reason I'm asking is that I want to change the partitioning in EBR1 slightly, so that more space is allocated to /data partition instead of /sdcard. I've got an old but good conditioned MediaTek (MTK-6577) based smart-phone called Karbonn-A30 which is great in build quality and almost every other aspect, but it only has 500MB of Internal Storage (/data partition in Linux lingo) which is not good enough for apps. Presently, the MBR and EBR1 partitions are thus:

$disktype MBR
--- MBR
Regular file, size 512 bytes
DOS/MBR partition map
Partition 1: 2.000 TiB (2199023255040 bytes, 4294967295 sectors from 1024)
  Type 0x05 (Extended)
Partition 2: 10 MiB (10485760 bytes, 20480 sectors from 18432)
  Type 0x83 (Linux)
Partition 3: 10 MiB (10485760 bytes, 20480 sectors from 38912)
  Type 0x83 (Linux)
Partition 4: 650 MiB (681574400 bytes, 1331200 sectors from 113152)
  Type 0x83 (Linux)

$disktype EBR1
--- EBR1
Regular file, size 512 bytes
DOS/MBR partition map
Partition 1: 376 MiB (394264576 bytes, 770048 sectors from 1443328)
  Type 0x83 (Linux)
Partition 2: 1.293 GiB (1388314624 bytes, 2711552 sectors from 2213376)
  Type 0x83 (Linux)
Partition 3: 1.998 TiB (2196501691904 bytes, 4290042367 sectors from 4924928)
  Type 0x83 (Linux)

Why this last partition which corresponds to /sdcard is left so large (1.998 TiB) is beyond my understanding! Since there is a good 2.5GB of space available on my actual /sdcard partition, I was thinking if I can alter the EBS1 and change the LBA addressing so that the third partition starts from 2097152 additional sectors (which comes to 1024MB or 1GB which is good enough for me), will it automatically increase my /data partition by 1GB and decrease the /sdcard by 1GB correspondingly? On XDA and other forums, I've read that people have successfully done this mod and achieved the change in partition sizes, but I first want to understand how it happens.

Since I have a MTK-6577 based phone and had to delve into repairing a broken partition table recently I thought I'd take a stab at answering this.

  I want to know that when we flash specific partition images (say
  system.img, data.img, cache.img, etc.), then how does the software
  know where exactly to put those partition bytes?

If you flash to known mount points /system, /data, /cache you not need to know about the underlying structure, simply is there enough space and it's in the correct format (e.g. ext4). The mount points are specified in vold.fstab.

However if you use a low level flashing tool such as SP Flash you will need to also modify the associated scatter file to the new layout of the partitions as it will access the memory addresses for the partitions directly.

An example filesystem mount points for the MT-6577 (copied from /tmp/recovery.log):

CWM-based Recovery v6.0.2.8
recovery filesystem table
=========================
  0 /tmp ramdisk (null) (null) 0
  1 /boot emmc /dev/bootimg (null) 0
  2 /cache ext4 /dev/block/mmcblk0p4 (null) 0
  3 /data ext4 /dev/block/mmcblk0p5 (null) 0
  4 /misc emmc /dev/misc (null) 0
  5 /recovery emmc /dev/recovery (null) 0
  6 /emmc vfat /dev/block/mmcblk0p6 (null) 0
  7 /system ext4 /dev/block/mmcblk0p3 (null) 0
  8 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 0
  9 /sd-ext auto /dev/block/mmcblk1p2 (null) 0

  Why this last partition which corresponds to /sdcard is left so large
  (1.998 TiB) is beyond my understanding

This is a result of using GPT vs older MBR partition tables. It is a special extended partition that is the maximum 32-bit address range (2TB). It allows loading the MBR to any device regardless of it's internal memory size. Then you have custom EBR1 (and EBR2) tailored for each model.

  I was thinking if I can alter the EBS1 and change the LBA addressing so that the third partition starts from 2097152 additional sectors (which comes to 1024MB or 1GB which is good enough for me), will it automatically increase my /data partition by 1GB and decrease the /sdcard by 1GB correspondingly

I am not entirely sure about the details of that.

Instead I used swapped the partition sizes of /data and /emmc with a EBR1 provided on xda-developers.com. Then in Android use Link2SD app which utilises a 2GB ext4 partition on the external sdcard and move large apps over.

Just thought I'd add that if things go spectacularly wrong, like it did originally for me, you can recover by using backups of the original MBR and ERB1 files for adb shell connecting to your phone in recovery mode.

Restore partition details:

dd if=/tmp/MBR of=/dev/block/mmcblk0
dd if=/tmp/EBR1 of=/dev/block/mmcblk0p1

Oh and to manually create a backup in the first place:

dd if=/dev/block/mmcblk0 of=/tmp/MBR bs=512 count=1
dd if=/dev/block/mmcblk0p1 of=/tmp/ERB1 bs=512 count=1

Mount an external sdcard from CWM and you can copy the file to/from /sdcard.


Play store uninstalled, Reinstalled not working I rooted my phone I accidentally deleted something that made my playstore shut down immediately. I tried everything I have found on the internet. Clear data / clear cache. Factory reset. Uninstalled and reinstalled. Im still getting unfortunately google has stopped. Looking for help. I did several back up nandriod titanium but I dont know how to install back ups. Please any help will be appreciated.

Depending on your device and ROM you can either reinstall your operating system (ROM) or you can reinstall the gApps (Google apps).

Normally the apps come in a flashable zip file that you can install (flash) via recovery (a secondary minimal operating system).

Depending on your device the ROM can come in a flashable zip file or a variety of other files (tar.gz, md5, etc...) so you will have to figure that one out.

You can download gapps for Android 4.4.4 here:
http://forum.xda-developers.com/showthread.php?t=2397942

When downloading gApps you will want to match the version up with your device so that they are compatible with it. E.G. You are running 4.1.2 so you will download the 4.1.x compatible gApps.

Hope this helps!


How do I speed up Android on Sony Ericsson Xperia X10 Mini? My first Android device is an Xperia X10 Mini. I've installed a custom ROM (miniCm7) and now my device is definitely 'cool'.

The only problem is that a lot of applications run in the background, slowing down the phone. Xperia x10 mini has a 600 MHz processor and only 256 MB RAM, so it can manage few applications altogether, despite they are applications I need (for example: WhatsApp, Facebook, Dropbox, and more).

How do I speed up and maintain it clean?

Applications don't run in the background, they're suspended and don't slow down the phone.  Services that run constantly might slow down the phone, and I believe Facebook and Dropbox both run services.  (See this answer for a bit more info on how Android manages resources.)

Your best option is to uninstall the apps you believe are causing issues.  Another thing you can do is install a custom kernel that will allow you to overclock the device (at the expense of battery life and assuming CM's kernel isn't overclockable), but that may not help very much.  Most phones with specs in that range don't run things all too well, which is how the manufacturer get people to spend more money I guess :P

See also: What are some general tips on improving overall performance of an Android phone?


Android Software or Device to present Application on Screen Well this is something that came to my mind, Does anyone know if there is a Device or a cable that i can plug to a DataShow so it is possible to present an Android Application live and fullscreen, doing all the tap and swipe events?

If not at least is there is something that its able to record a Screencast of an android application for presentation purpose  of course?

PD. BTW i did not found right tag for this question, so if someone can retag it it would be nice too :D

You might be able to connect an Android phone via the 3.5 mm headphone jack (using TV out), with a RCA cable if the project supports it, or some variation, of course.
Also, I think there are now tablets which have a HDMI output port (or some variation) which you can connect to a datashow (eventually with a VGA adapter).

When connected, what is projected is exactly what you see on your device.


Alternative file transfer clients I think most people will agree that the official file transfer client for OS X is painful to use. It seems to stagnate at version 1.0 and only offers the bare minimum.

Since my camera connection still isn’t fixed I unfortunately have to use it quite frequently.

Are there alternative clients that are better integrated into the operating system or are there any plans to make it obsolete (after all, neither Linux nor Windows require such a client, they can access the storage of the smartphone directly)?

To clarify, I’m not necessarily looking for more features but better integration. However, anything that makes it easier to use fits the bill.

If you want to go the wireless route I'd recommend Wi-Fi File Explorer pro.
Just make a Tethered WiFi network(or be on the same router) use the app on your phone to get a local IP and transfer all files directly. It needs no installation on your computer; just install it on your phone and use it.


Is there any way to Move applications in phone memory to SD Card? I'm using Samsung Galaxy fit GTS5670 running on Android 2.3.6.

After installing Whatsapp Messenger of 13.36 MB, it was installed to phone memory. I got a total of 180 MB internal storage, and just 3.3 MB left.

Is there any way to move Whatsapp from phone memory to SDCard?

If you have your phone rooted and secondary partition, you can use Link2SD.It's good alternative to use.


How do you see Memory usage in Android O? Prior to Android Oreo I could see Memory usage by going to Settings > Memory but this does not exist any more since upgrading to Android O. Is there any way to see this now or has it been removed completely?

Enable Developer Mode (see here), and go to System > Developer options > Memory


Any way to transfer file >4GB from PC to android tablet? I'm trying to get a very large file (97 GB-Wikipedia for Kiwix) from my PC onto a Micro SD card in my Android 10/Go edition tablet.
The problem is that the tablet doesn't seem to recognize an Exfat card; when I put it in, it wants to format it. If I format it for Portable Storage, it formats it as Fat32, so I can't transfer larger files.
I've seen some indications online that formatting it for Adaptive Storage allows bigger files, but the problem with that is that the adaptive SD doesn't show up in Windows file explorer, only the smaller internal storage.
I've tried downloading the file straight to the tablet, but android is again trying to download it to the smaller internal storage, so it gets stuck. When trying to change the download folder, chrome again only sees the small internal storage.
Any other ideas how I can get this file onto my 256GB adaptive storage sd?
Thanks in advance!

As Señor CMasMas has mentioned you need to format the SD card as ext4 and you will need root to be able to mount it on the android. You can access the ext4 partition on Windows with "Linux File Systems for Windows by Paragon Software" This program lets you mount the partition in windows and use it as a regular drive.
Here is how this can be done.

Format your SD card as ext4. You can partition it into 2 partitions and only format the 2nd one as ext4. This way you can still use the first partition normally on your device. I used Mini Tool Partition Wizard.
On your Android device, you need to mount the partition. I use Termux (terminal) to do this. You need root to be able to mount it.

Make a folder in your termux home folder where you will mount the partition. (eg. mkdir ext4).
Mount the partition to this folder. You need to find the device name. I have found in all my devices that it was /dev/block/mmcblk1p2 for my 2nd partition. (eg. mount /dev/block/mmcblk1p2 /data/data/com.termux/files/home/ext4-fs).

Once its mounted you can access it with Total Commander (and probably other file explorers as well) on the Android.
I have done this and am able to copy large files onto it.


HTC EVO 3D not appearing on Mac OSX adb I am having a funky issue connecting my HTC EVO 3D (Running 4.0.3) to my MacBook Pro (OSX 10.9.1). I have connected this phone using adb and Android Studio for development, using the same cord, same phone, and operating system on a different computer.

The EVO is in debug mode, tried swapping out cables, swapping ports, restarting computer multiple times, restarting phone etc. The phone will mount as a disk, but can not be discovered by adb in any connection mode.

This leaves me to believe that either my USB ports on my MacBook are messed up, which I have followed instructions to reseting my SMC and PRAM, which lead to nothing. So then I thought it was possibly a corrupt ADB, so I went ahead and reinstalled the Android SDK This lead to a few hours wasted, but was feeling confident this would solve my problems. Unfortunately it did not, does anyone have any suggestions?

Edit: To add to the confusion, I can get the EVO to mount as a storage device, and upload an apk for development, but this is not very helpful if I have to transfer the file manually every time I want to test.

After months of not being able to debug through ADB, I've figured it out. According to this answer on Stack Overflow, the program EasyTetherUSBEthernet can cause problems with ADB.

Running this in terminal, with a reboot fixed all my problems.

sudo kextunload -v /System/Library/Extensions/EasyTetherUSBEthernet.kextv

If you need to use EasyTetherUSBEthernet you can reload it using:

sudo kextload -v /System/Library/Extensions/EasyTetherUSBEthernet.kext


How to transfer a few text messages from one phone to another I had a Samsung Galaxy S3 which I used for some time.  After getting a Galaxy S7, I transferred all my text messages and other stuff to the new phone using Smart Switch.  However, last week I had to use the old phone again, and now I am wondering if there are any easy way to transfer the messages I send/received during that week to my new phone?  Possibly, if there is a way of transferring the messages one at a time (by Bluetooth or something) this would also be helpful, as it is not a large amount messages.

I tried to do it with Smart Switch, hoping it could somehow merge the messages from the two phones, but it would not sync messages.  Maybe because the new phone already had a lot.

Searching the internet I seemed only to find solutions for transferring everything from one phone to a new phone.

SMS backup and restore has

  Option to select which text conversations to backup or restore

Though it is manual and not by date . This should be fine in your case as you don't have too many

On the next screen you can select the messages manually and create a backup

Thanks to a acejavelin who pointed out that restoration can be done for a specific date range. Acejavelin further adds

  The restore process does a cleanup to remove duplicate messages


Activate Debugging on broken Nexus 7 My Nexus 7's touch screen is completely broken, I know I can manipulate the device using adb commands, but debugging mode isn't enabled on the devices. Is there anyway to enable debugging mode from a PC or any easy way that wont break any files, I would preferably like to just turn on debugging mode and not have to reset the device or anything, cheers!

With broken touch screen you won't be able to enable USB debugging mode using your PC.

Tried Solution:

I had tried the adb method but it doesn't ends well, however you can try to take a backup of your phone as described in Broken screen while debug mode was disabled. How can I re-enable adb?.

Well if you are going with my Solution No Need to Backup. Since Nexus 7 supports OTG (On the Go) connections, you can always connect your Mouse/Keyboard/Secondary Storages using your OTG Cable.

So try to Connect your Mouse using the OTG cable available for your device, then Go to your Settings and Enable USB Debugging mode.

That's all. Hope it will Help.


How to USB tether on a Samsung Galaxy Tab A? I want to USB tether my Samsung Galaxy Tab A (10 in) to my laptop so that I can use it as a second monitor via SpaceDesk in locations with crappy Wi-Fi. So this question will be about USB tethering, but if you know of a way to reliably use my tablet as a second monitor that doesn't require USB tethering, I'd love to hear it!

The tablet doesn't have cellular connectivity, and perhaps for that reason, USB tethering doesn't appear under Settings / Connections (or anywhere else that I can see). I'm looking for any practical way to enable it. This can involve rooting or installing a modded OS, although of course if there's a more straightforward way, I'd prefer that route.

You can enable usb tethering through adb shell. Root is needed in order to execute these commands:

After adb setup on your machine (if you haven't already setup adb, please see detailed instructions here: Download Minimal ADB and Fastboot Tool & Setup guide, perform these commands:

  The following commands call
  ConnectivityManager.setUsbTethering(boolean enable) in Android 4:

adb shell su -c service call connectivity 34 i32 1 turns on USB tethering.

adb shell su -c service call connectivity 34 i32 0 turns off USB tethering.

(For other Android versions replace 34 with the following setUsbTethering calling codes per Android version):

5.1.0: 30
6.0.1: 30
7.0.0: 33

Credits

Is it possible to USB tether an android device using adb through the terminal?


How to browse securely, anonymously and without blocks on Android? So here's your Average Joe at a coffee store, using the open Wifi on his shiny new Android phone. Obviously there are the same issues with using a laptop or any other device on an open network, including having the Hotspot owner as well as other users snooping on poor Joe's web traffic. What sorts of solutions exist for dear Joe?

Joe finishes his coffee and heads to work, and his work Wifi is set up with a proxy (with username and password authentication) to 'protect' (as well as monitor) their workers from such useful sites as Superuser when Joe would really like to utilize such sites. Of course, Joe is obedient and uses Proxydroid which does allow his browser access to his works' white listed sites, though he can only access sites using http connections, a further let down as Joe really does like to check his email and do some banking on his phone. Joe has tried solutions like Orbot, by Tor, though that doesn't seem to work. How can Joe get past these issues?

Obviously this is phrased in a rather happy-go-lucky manner, though certainly the first point is a serious issue for many Android users.
All comments are taken gratefully.

If Joe's device is rooted and Joe has a server (with full SSH access) running somewhere on internet, Joe should use SSH Tunnel app with socks proxy option checked (for dynamic port forwarding). There's no need to install VPN server or proxy server. There's no need to do complicated configurations on server. Plus, Joe's data will be secured inside powerful encrypted tunnel, too. With this method, Joe's data will be under his own control (There's no involvement of third-party services).


Shortcut to quickly kill an app I have Android 4.4.2, it's rooted.

There are some apps that I execute and don't shutdown and I have to kill them. I use GO TaskManager EX widget to get rid of them, but that requires me open its dialog, look for the app icon and click it to have it killed.

Is there an app or some command I can add to a shortcut, so that I just click its icon and that app is killed in case it's opened?

I have always felt the need for this and been using in KitKat and Marshmallow.

Since your device is rooted, it's easy. Install Gravity Box Xposed module and under Navigation bar tweaks → Custom key settings → Long press action (Kill foreground app)  and choose your Icon Style/Set custom image for the icon to sit always on your Navigation Bar. Simply press it to get rid of the unresponsive app

You see the icon on extreme left, below Yahoo mail


What are .patch files in Android I downloaded the PDroid source from the XNA forum and fount 3 files in it with the .patch extension. Could somebody please explain me what are files with this extension for? Ignore the fact that they are from the PDroid source since I think there are other projects using them. As I can see these files can be opened in text editor and there are some script lines in them but I don't know what they are for?

Patch files are not specifically to do with Android. They just represent a difference between two text files (or two folders of text files). They can be produced by the diff tool, or by a version control system, and the same change can be applied to files by the patch tool, or by a version control system.

Patch files are often used by programmers to communicate a change that should be applied to source code.


How can I disable "app is running in the background" notifications? I've a notification from Android system that I can only snooze, not remove permanently, about an app running in the background. It's specifically about Keepass2Android:

  Keepass2Android is running in the background

I know it's running in the background so I don't need to be reminded about it constantly. Most annoying is that it takes up unnecessary space.

Is there a way to disable this notification?

I am on Oreo 8.0.0 and couldn't find a setting for this so ended up using this Hide  "running in the background" Notification

I have several apps running in background and disabled them all using this app, as it serves no useful purpose for me to know

Auto Notification is another app that has this feature amongst other Tasker oriented features if you are interested.

I preferred the first one since I don't use Tasker

Edit: These are Bye the way notifications


Disable Google Play Ads in Notification Area? Possible Duplicate:
  Is this red star icon malware? How to get rid of it?

I'm not sure if everyone has experienced this annoying behavior, I often see ads in my notification area pointing to games in the market.
Is there any way to avoid this annoying feature I never asked for?

Here is what the ad looks like:

Airpush! A bloody nuisance they are.

Need to figure out which app did you install recently, that is the culprit. Uninstall it, let the developer know that airpush is disastrous and let them see their downloads drop!

If your handset is rooted, you might try Ad-Away to block those pesky adverts. And its open-source and available on Google Play.


Connecting an AVD with an android device I want to test an android application using WiFi-Direct, and i want to ask if i can connect an virtual device created with VirtualBox with my real device android ?  thanks in advance.

No you cannot connect an virtual device. Because Avd of pc is just simulator and doesnt have facility to such connections. You can check wifi in avd using internet connection of pc or VirtualBox but not to your real wifi.