Commands run on terminal but throw errors in shell script I created a .sh script which sets app permissions on Android devices.
If I push the script on /sdcard and run it through adb shell with command sh ./test.sh, the following error occurs on each permission:

Bad argument: java.lang.IllegalArgumentException: Unknown permission: android.permission.WRITE_EXTERNAL_STORAGE

Here is my Script:

#!/bin/bash
pm grant com.android.camera2 android.permission.RECORD_AUDIO
pm grant com.android.camera2 android.permission.CAMERA
pm grant com.android.camera2 android.permission.ACCESS_FINE_LOCATION
pm grant com.android.camera2 android.permission.WRITE_EXTERNAL_STORAGE
pm grant com.android.camera2 android.permission.READ_EXTERNAL_STORAGE

pm grant com.android.chrome android.permission.CAMERA
pm grant com.android.chrome android.permission.ACCESS_FINE_LOCATION
pm grant com.android.chrome android.permission.WRITE_EXTERNAL_STORAGE
pm grant com.android.chrome android.permission.READ_EXTERNAL_STORAGE
pm grant com.android.chrome android.permission.RECORD_AUDIO

So every time the same command for different permissions and different apps. If I'm using these commands manually on adb shell it works.

I don't have root permissions and the device OS is Android 8.1.0

Apparently there seems no reason for this, except the possible problem with line endings which often happens. On *NIX operating systems (including Android), lines end with Line Feed (LF; \n or 0x0A) while on DOS/Windows with Carriage Return + Line Feed (CRLF; \r\n or 0x0D0x0A). On Mac, only CR is the end-of-line marker. So some text editors may encode wrong line breaks in shell scripts:

~$ cat -v /sdcard/test.sh
#!/bin/bash^M
^M
pm grant com.termux android.permission.WRITE_EXTERNAL_STORAGE^M

Here ^M is the visual representation of CR, which can be fixed with dos2unix, sed or tr utility:

~$ dos2unix /sdcard/test.sh
~$ cat -v /sdcard/test.sh
#!/bin/bash

pm grant com.termux android.permission.WRITE_EXTERNAL_STORAGE

Now the problem should be resolved.


Prevent apps opening links in Chrome Custom Tabs (i.e. open in default browser directly) Not long ago, Google added a new feature called Chrome Custom Tabs since Chrome 45 on Android JellyBean or later.

What are Chrome Custom Tabs?
App developers face a choice when a user taps a URL to either launch a browser, or build their own in-app browser using WebViews.
Both options present challenges — launching the browser is a heavy context switch that isn't customizable, while WebViews don't share state with the browser and add maintenance overhead.
Chrome Custom Tabs give apps more control over their web experience, and make transitions between native and web content more seamless without having to resort to a WebView.
When will this be available?
As of Chrome 45, Chrome Custom Tabs is now generally available to all users of Chrome, on all of Chrome's supported Android versions (Jellybean onwards).

Google has integrated this feature on some of their apps (e.g. Google+, Google Search) and now, 3rd-party apps can also use it (e.g. Twitter, Stack Exchange).
While some apps provide setting to enable/disable it (e.g. Google Search), others don't seem to be possible to disable this. I know I can still open the link in Chrome by tapping the overflow menu (3-dots on top-right) and select Open in Chrome. However, it'd be preferable if it can be disabled on specific apps.
So, my question is: is it possible to disable this feature, preferably on selective apps? (by disable, I mean to open the link directly in default browser, or prompt user to choose a browser)
Note: I'm open to all suggestions, including root solutions, or even uninstalling Chrome in the worst case scenario. However, more practical answers are preferred.

The Custom Tabs help page says:

What happens if the user doesn’t have a recent version of Chrome installed?
Custom Tabs uses an ACTION_VIEW Intent with key Extras to customize the UI. This means that by default the page willopen in the system browser, or the user's default browser.
If the user has Chrome installed and it is the default browser, it will automatically pick up the EXTRAS and present a customized UI. It is also possible for another browser to use the Intent extras to provide a similar customized interface.

That means, if you make some other browser the default one (this can be done via Settings > Apps > Cog menu > Default Apps), any app trying to open a Custom Tab will open the link in that browser instead.
Update: That also means, it's possible to write a "manager" app that presents itself as a browser (handles ACTION_VIEW intent), and on receiving this intent checks whether it has Custom Tabs-related EXTRAS, and depending on some logic opens a browser of your choice using an explicit intent (where the desired app package name is explicitly specified).


Showing date of alarm in top tray On my Zenfone AR with Android 7.0, I am annoyed that the alarm notifications show the time of the next alarm, but not the day. In the example below, I have an alarm set for 06:00 two days from now, but looking at this screen, it looks to me as if the alarm would be set for tomorrow morning. There's no way to check what day I will be woken up early other than going into the alarm app and checking my list of alarms there.

Is there any way to change this? (The same thing goes for the lock screen.)

I found a workaround: using the Shortcutter app for custom QuickSetting tiles, it's possible to add a "next alarm" icon (and several other tweaks too).


My Lenovo tab 4 M 10 is frequently switching off its own. How can I resolve this issue? Can anyone say how to resolve this?
Frequently it is turning off its own.

There can be many reasons behind it. May be phone's battery is damaged. Or may be there is a background process which is never ending so in order to restore control phone turns it's all functions off.
You should probably take backup of your data and reset it.


Do you know other Android keypad commands (dialer codes)? There a lots of differents keypad commands in Android. Which one do you know ?

Some of them are listed here :

*#*#checkin#*#*  Phones home to check for updates.

*#*#info#*#* - Enters a detailed phone information menu.

*#*#1472365#*#* : Access to the GPS config menu (useful for patching Galaxy S GPS failure)

This page has a good listing of keypad commands.

Here is the post:

*#*#4636#*#*

This code can be used to get some interesting information about your phone and battery. It shows following 4 menus on screen:

Phone information
Battery information
Battery history
Usage statistics

*#*#7780#*#*

This code can be used for a factory data reset. It'll remove following things:

Google account settings stored in your phone
System and application data and settings
Downloaded applications

It'll NOT remove:

Current system software and bundled applications
SD card files e.g. photos, music files, etc.

PS: Once you give this code, you get a prompt screen asking you to click on "Reset phone" button. So you get a chance to cancel your operation.

*2767*3855#

Think before you give this code. This code is used for factory format. It'll remove all files and settings including the internal memory storage. It'll also reinstall the phone firmware.

PS: Once you give this code, there is no way to cancel the operation unless you remove the battery from the phone. So think twice before giving this code.

*#*#34971539#*#*

This code is used to get information about phone camera. It shows following 4 menus:

Update camera firmware in image (Don't try this option)
Update camera firmware in SD card
Get camera firmware version
Get firmware update count

WARNING: Never use the first option otherwise your phone camera will stop working and you'll need to take your phone to service center to reinstall camera firmware.

*#*#7594#*#*

This one is my favorite one. This code can be used to change the "End Call / Power" button action in your phone. Be default, if you long press the button, it shows a screen asking you to select any option from Silent mode, Airplane mode and Power off.

You can change this action using this code. You can enable direct power off on this button so you don't need to waste your time in selecting the option.

*#*#273283*255*663282*#*#*

This code opens a File copy screen where you can backup your media files e.g. Images, Sound, Video and Voice memo.

*#*#197328640#*#*

This code can be used to enter into Service mode. You can run various tests and change settings in the service mode.

WLAN, GPS and Bluetooth Test Codes:

*#*#232339#*#* OR *#*#526#*#* OR *#*#528#*#* - WLAN test (Use "Menu" button to start various tests)

*#*#232338#*#* - Shows WiFi MAC address

*#*#1472365#*#* - GPS test

*#*#1575#*#* - Another GPS test

*#*#232331#*#* - Bluetooth test

*#*#232337#*# - Shows Bluetooth device address

*#*#8255#*#*

This code can be used to launch GTalk Service Monitor.

Codes to get Firmware version information:

*#*#4986*2650468#*#* - PDA, Phone, H/W, RFCallDate

*#*#1234#*#* - PDA and Phone

*#*#1111#*#* - FTA SW Version

*#*#2222#*#* - FTA HW Version

*#*#44336#*#* - PDA, Phone, CSC, Build Time, Changelist number

Codes to launch various Factory Tests:

*#*#0283#*#* - Packet Loopback

*#*#0*#*#* - LCD test

*#*#0673#*#* OR *#*#0289#*#* - Melody test

*#*#0842#*#* - Device test (Vibration test and BackLight test)

*#*#2663#*#* - Touch screen version

*#*#2664#*#* - Touch screen test

*#*#0588#*#* - Proximity sensor test

*#*#3264#*#* - RAM version


How to improve the security on my Android phone? When I use Android in business I have some secret data on my phone. So if I lose my phone this can easily be stolen.

Is there any way I can secure my phone? E.g. adding password for unlocking it. Any recommendations? apps? or best-practice?

You should also be able to add a lock-pattern that makes it slightly-more-difficult to open the phone


Afwall+ Android Firewall for multiuser Hi guys After rooting my andoid phone to prevent excessive data usage by Android  system and installed AFWall+ that is based on iptables.
U have two users on device both account are handled by me by this It is easier to separte work and home profile separetly
AFWall works as supposed in owner mode but on switching   user Apps are not able to work (browsing,load pics do chats all stuff related to internet) but on again switching to owner mode I am able to browse internet

Go to Preferences/Experimental in Afwall+ (I am currently using v3.1.0), and enable Multi-user support!

Source: Android Island work profile apps and AFWall


Text messaging Force Close issues after OS upgrade I upgraded my Samsung Galaxy S GT I 9000 to Android 2.2 yesterday...but I just can't open my messages...it says Force Close every time I try...any solutions??

If not, how can I downgrade to the original 2.1 Eclair?

Try clearing the cache of the Messaging app.

From the home screen:

Menu | Settings | Applications | Manage applications | All | Messaging | Clear cache

If that doesn't work, I'd try the following, in this order:

Force Stop
Restart the phone (off then on)
Clear data (will likely lose your SMS messages)


Add Permissions to Installed App I am having problems with 2 apps, QPython3 and SL4A.

I want to read my contacts from QPython3 and my user dictionary from SL4A.

The 2 apps do not have the relevant permissions.

Is there any way to add permissions to an installed app?

My phone is a rooted Nexus 5 running Kit-Kat.

Thank you

You cannot add permissions to an installed app - they have to be declared in its Manifest before uploading to Google Play.


Will Android tablets have issues if they are always on? I plan on using an Android tablet in an always-on scenario (a fancy self-coded alarm clock, but this would apply to numerous uses).  Is there any problems with keeping an Android tablet on and charging all the time?  Is this likely to cause screen issues?

OLED screen are very bad for burn in and colour leaking (even worse that plasma screens in alot of cases) en.wikipedia.org/wiki/Screen_burn-in
and so leaving them on the same screen for some time would not be a good idea
You might also find the general life of the device shortened because of the hardware being used all the time, but unless you are putting the device under stress im sure it would be fine.
The battery would likely weaken over time as well due to the constant charging


Is there a widget that allows for speed dialing? Is there a widget that would allow me to have, for instance, 9-10 names so I can call them quickly? Maybe 10 icons associated with 10 names/numbers?

In android you can create a shortcut to do that:

Long press on home screen, a menu will pop up with title "Add to Home";
From there choose "shortcut" -> "Person";
Choose the person you want and then select the default action like call or message. For you it will be call.

You'll see the icon of that person on the home screen upon pressing which will make the call to that person.


Unable to combine desktop icons into a folder on Android 7.0 Asus Zenpad 3s 10 I have previously put an app icon over another (on this Asus Zenpad 3S 10) and a folder was created with both of them inside. Then I was able to put other icons over that folder and they also went inside of it.

However, I now am unable to combine icons into a folder. If I move an icon I want to combine into a folder over another app icon, the other app moves away. It doesn't matter how many times I move one app icon over another, the one I am hovering another app icon over, always goes quickly right or left. Is there some alternate way to combine app icons that doesn't have a bug?

Just got mine today and had the same problem. It took a bit of fidgeting, but I figured it out. Drag one of the desired icons to the static toolbar at the bottom and then drag whatever remaining icons you wish to group into that first icon. You kind of have to release immediately so it stays in that "folder" you created. This worked for me, so I hope it works for you.


Marshmallow Time Drift bug I was planning to flash a custom Marshmallow ROM on my Samsung Note 2 and use it for some tests in which keeping accurate time (error of a minute either way is fine, not more). This report This Android 6.0 bug might make you late for your next appointment makes me reconsider. It says

  The drift is quite small and can't really be noticed under direct observation, but user comments on the Google issue have suggested that a delay of up to 15 minutes can be accumulated over a period of 12 hours – just enough to miss that all important meeting or be late for an exam.

Temporary fixes as suggested in the link (below) do not suit me, since the phone would be unattended during testing I plan

  Users have also figured out a couple of temporary fixes. One is to simply restart your headset, forcing it to sync the time with the network, while another instructs to manually switch over form 4G to 3G

I have not found any reports of this on the ROM developer site or here but Clock sync/clock running slow issue log reports this

My question: Has anyone observed it and how bad is it? (Even if not measured)

Android 6.0.1 apparently fixes the issue. I'm running it on my Nexus, so I can't say about custom ROMs, but it should be fixed in 6.0.1 based ROMs.

The bug was detected by me in 6.0 first because my alarm rang 21 minutes late. It was about a week after I bought the phone. A reboot fixed the time, and since I've upgraded to 6.0.1, I haven't seen an issue with time.


Android 4.4 on Galaxy S I9000 stuck at boot with ART I recently updated my Samsung Galaxy S-I9000 to Android 4.4 KitKat, It was successfully updated and KitKat worked fine until I decided to try using the ART RunTime instead of Dalvik.

When I changed runtime to ART and rebooted the phone it never started up. I see the Samsung Galaxy S I9000 logo and then comes the running CyanogenMod circle which never stops. I let it work for more than four hours and it was not fixed.

Note: Once when rebooted for changing runtime phone was powered off. Charged and resumed the process, the same result.
I also tried installing cm11 update once again, no change.

If there's a way I can fix this issue, I would be grateful to know how. Thanks in advance.

UPDATE[FIX]: I wiped everything, Including Dalvik cache, partition cache and data, then tried installing the ROM, problem fixed. And screw ART for now, it needs some time to get stable and ready for everyday usage. I'll just stick with dalvik.
I couldn't respond faster due to my noob account restrictions.

As "ART" versus "Dalvik" is a setting the user can switch, a factory-reset should restore its previous (default) state – in this case, revert it to "Dalvik". Reportedly, the following steps solved the issue in this case:

Complete wipe, including Dalvik Cache and data (can be done from recovery-mode, and is equivalent to a factory-reset)
Re-flashing the ROM (IMHO an optional step, as the previous one should suffice)

Remark: There's a good reason that switch is a little hidden; ART is still "experimental", and not intended for "everyday use". It was placed with the developer's options just to give developers a way to already test their apps for compatibility.


Google play store wallet It charged me a amount of 50 does it take a single time or for every purchase and y is this money taken and will I get the amount back and if there any one with the return of the money

When you charge your wallet with a fixed amount, you are charged once, then all the future purchases are paid with the credit that you already have.

If you have an issue with an app and ask for a refund, then the money goes back to your available credit.


How to set SELinux to Permissive Since installing XtreStoLite 3.1.1, SELinux is set to Enforcing (when I try to boot into TWRP recovery). I tried setting it to permissive (Enforcing = 0) using a terminal emulator (the phone is rooted), but to no effect. It would appear that this is preventing me from booting to TWRP to install Aroma.

Any ideas?

(FYI, SELinux Mode Changer didn't work)

If SELinux Mode Changer doesn't work, and you are properly rooted, then your kernel likely isn't compiled with permissive mode and was compiled with the flag EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true which doesn't allow permissive mode to be set in anyway.

You will need to get the kernel source from the manufacturer, which should be available if they are honoring the GPL license, and in the file ~/android/kernel/security/selinux/Makefile

Find the line of code that says:

EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true

and change the value of it to false and recompile the kernel and make a zImage and flash it to boot.

Example Source for reference

That being said, TWRP should support SELinux Enforce, just never EVER run a fix permissions


Cannot flash Qualcomm with Stock Image (Lenovo Tab M10 TB-X605L LTE, Android 8 Oreo) Background

I’ve bought a brand new Lenovo Tab M10 TB-X605L LTE. It’s for my grandma, so that she can video-call her great-grandchildren during the Corona crises, and I learned that I require to have Android 8 Oreo on it, as Teamviewer Host has to run on it and start automatically (my grandma is almost 90 years and she can operate a toaster, but not a tablet). Unfortunately, I’ve upgraded to Android 9 Pie, which by design doesn’t support Teamviewer host.

Problem

I need to get back to Android 8 Oreo, but I almost bricked my Lenovo Tab M10 by trying to do so. I’ve already spent a few days and read/tried tons of instructions/suggestions/forum discussions, and I’m completely stuck. I would really enjoy some help or the decisive tip – and especially my grandmother would really enjoy seeing her four great-grandchildren after three weeks of quarantine.

Log files

indicate that the Qualcomm chip doesn't accept the download

LSMA: [LMSA_Recovery] Shell Resp: Status=status_flash_download_failed
QFIL: ERROR: function: sahara_rx_data:237 Unable to read packet header. Only read 0 bytes.

This works

I managed to get a M10 TB-X605L stock ROM Android 8 Oreo: https://www.techswizz.com/lenovo-tab-tb-x605l-stock-rom-firmware-flash-file/
XML files contained: rawprogram_unsparse.xml, patch0.xml, rawprogram0.xml.bak,
I can reboot to fastflash mode (reboot and hold Volume-Down), and I can use ADB and Fastboot.
I can install TWRP recovery mode (by flashing recovery.img) and start/use TWRP (reboot and hold Volume-Up+Down).
I I’ve unlocked the bootloader.
I have installed the Qualcomm_USB_Driver_v1.0 and the tablet gets a COM port (can be seen in Device Manager).

This doesn’t work

General

I cannot boot in normal mode (device stops or constantly reboots when I try).
I managed to install Magisk (in TWRP), but the devices still can’t boot in normal mode afterwards, so I cannot start Magisk.

Lenovo Moto Smart Assistant (LSMA)

I can start it, download the stock image. When I try to flash the device, the progress bar jumps to 33% immediately, and after a few seconds a “FAIL” button appears without any further information.
Fastboot
I can flash boot.img and recovery.img, but system.img is splitted in system_1.img, system_2.img, etc., and when I connect these files with packsparseimg.exe, the resulting system.img seems to be invalid (devices doesn’t start).

QFIL

I can see the devices on the COM Port. I can load rawprogram_unsparse.xml and patch0.xml.
When the device comes online, I try to hit Download immediately, and I either get the following error:
ERROR: function: sahara_rx_data:237 Unable to read packet header. Only read 0 bytes.
ERROR: function: sahara_main:924 Sahara protocol error
ERROR: function: main:303 Uploading  Image using Sahara protocol failed
Download Fail:Sahara Fail:QSaharaServer Fail:Process fail
or it says the device is not in EDL mode (which is easy to fix by booting in EDL mode from TWRP, but then the sahara error comes up).

QPST

I can connect the phone via QPST Configuration (COM3, Q/QCPP-XXX (Sarah Download), USB)-
When I open the “eMMC Software Download app”, I can open the Sahara XML file rawprogram_unsparse.xml – I hope, that’s the right one.
When I “Load XML def…”, I don’t know which xml file to open:
rawprogram_unsparse.xml and rawprogram0.xml.bak show an error  “Document error on element type ‘raw program’ and name/value ‘true’”.
Patch0.xml shows no error, but I think it’s the wrong file for “Load XML def”.
Dowloading with “Patch0.xml” leads to an error “Timeout waiting for device”
QcomDLoader.exe (1.3.2.0)
I can load the stock image directory (by pressing the appropriate "Load" button), and set the settings (eMMC programmer: prog_emmc_firehose_8953_lite.mbn, Raw program: rawprogram_unsparse.xml, patch0: patch0.xml).
When I press ‘Start’ the Step/Status “Sahara/Flashing” appears for 5 seconds, followed by messages “failed.

Any help or suggestion is highly appreciated.

Solution (for flashing Qualcomm based Android devices)
This seems to be an easy, fast and reproducable solution for flashing Qualcomm based Android devices (tablets, mobile phones), so it should not be limited to my device type. You should espacially read on if you have troubles with flashing an Qualcomm based Android device with tools like QcomDloader, QFIL, eMMC Software Download.
As I had troubles on Windows, so I switched to Linux, and it worked like a charm. The point is that Windows under certain circumstances seems to block some port communication.
tl;dr
Instead of Windows, use a Linux system with the Qualcomm USB flashing tool to flash your device.
Requirements
You will need

a stock image from the manufacturer (or any other image you like) for your device; I've found mine here
a Linux based system (eg. a Raspberry PI with Rasbian installed)
Required Tool: ADB and Fastboot (download and installation instruction below)
Required Tool: Qualcomm USB flashing tool for Linux by ndechesne, tonyMakkiel and ric96 (can be downloaded here)
Recommended tool: TWRP
your device, a free USB port and an appropriate USB cable (no special flashing cable required).

Furthermore, it could be possible that you have to be able to unlock your the bootloader if your device. I'm not sure about that, as I had unlocked my tablet before I found the working solution.
Step-by-step approach
Backup your device
Make a complete and reliable backup of your android device first.
Write down your serial number
My had device lost its serial number after flashing. I don't know if this has any further impact - I didn't recognize on. Maybe you should take a note of your serial number before flashing your device.
Unzip your image file
You need to unzip the image file. You should get many files, including

a *.mbn file (mine was `prog_emmc_firehose_8953_ddr.mbn`)
a *.xml file that contains information on how the image is the be assembled - mine was `rawprogram_unsparse.xml`)
a *.xml file that contains information on how the image has to be patched - mine was `patch0.xml`)

All of this files have the suit the chip type of your Android device - I highly recommend not trying this with files that were compiled for other chips.
Preparation on your Linux device
I've setup up my Raspberry PI 3B+ from scratch with Raspbian.
Install ADB and Fastboot on it:
sudo apt-get install android-tools-adb android-tools-fastboot
Download Qualcomm USB flashing tool for Linux:
git clone https://git.linaro.org/landing-teams/working/qualcomm/qdl.git
Change to the new qdl directory
cd qdl
and compile the software:
make
Return to the previous directory:
cd ..
Stop the Modem Manager (I've found this in one instruction - didn't do anything as I hadn't had it installed)
sudo systemctl stop ModemManager
Get ready to reboot your device in EDL mode
Option 1: You can still access your Android system
Connect your Android devices to your Linux system using the USB cable.
Start your Android device normally. Enable the developer options:

Open the Settings screen, scroll down to the bottom, and tap About phone or About tablet.
Scroll down to the bottom of the About screen and find the Build number.
Tap the Build number field seven times to enable Developer Options. Tap a few times and you'll see a toast notification with a countdown that reads "You are now X steps way from being a developer."
When you're done, you'll see the message "You are now a developer!"
Tap the Back button and you'll see the Developer options menu just above the "About Phone" section in Settings.
To enable USB Debugging, you’ll need to jump into the Developer options menu, scroll down to the Debugging section, and enable the "USB Debugging" slider.
Android will prompt you to allow USB debugging (unless you had already granted access for your Linux system before). Check "Always allow from this computer" and tab "OK".

Go back to your Linux system, and check to connection:
adb devices
If the daemon is not running, it will be started.
You should see your device as (single) entry in the device list. Otherwise check the device, the connection and the settings again.
Go on to Unlock bootloader below.
Option 2: You cannot access your Android system (almost bricked)
Android devices have key combinations that allow you to boot them in different modes. Please check on the internet how to boot your device in the EDL Mode (Emergency Download Mode). For my device it's

press and hold `on off key` for about 20 seconds, release it
press and hold `vol up key`
press and hold `on off key` (still hold the `vol up key`)
wait for a short vibration
release the `vol up key` first
release the 'on off key`

Be careful, it make a diffence whether an USB cable is connected or not. Connecting the USB cable can have the same effect as pressing the power key.
Getting into the right boot mode can really be a mess. That's why it's the easiest way to work with TWRP (Team Win Recovery Project).
To do so, download the latest version of TWRP. You need a the appropriate img file for your device (for my device: twrp_x605f.img).
Reboot your device in fastboot mode (as described by the manufacturer of your device). For my device it's

press and hold `on off key` for about 20 seconds, release it
press and hold `vol down key`
press and hold `on off key` (still hold the `vol up key`)
wait for a short vibration
release the `vol up key` first
release the 'on off key`

On success, the device will show 'fastboot mode' in the corner.
Connect your device with the USB cable and check the connection:
fastboot devices
You should see your device as (single) entry in the device list. Otherwise check the device, the connection and try to reboot in fastboot mode again.
Make sure your TWRP image file is in the current directory. Install it by typing
fastboot flash recovery <TWRP image file> (replace  with the actual file name)
Reboot your device in recovery mode (as described by the manufacturer of your device). For my device it's

press and hold `on off key` for about 20 seconds, release it
press and hold `vol up+down keys`
press and hold `on off key` (still hold the `vol up key`)
wait for a short vibration
release the `vol up+down keys` first
release the `on off key`

On success, TWRP will start. OK, it took my two to three attempts to get there, but it helps a lot as you can reboot precisely in the mode you need from the TWRP Reboot menu.

System boots to your system.
Recovery boots back to TWRP (or your recovery menu).
Bootloader boots to fastboot mode.
EDL boots to EDL.

Unlock bootloader (not sure if this is required - you can try it and skip this)
Having done that, unlock your bootloader. To do so, boot your device in fastboot mode

by using the key combination, see above OR
by typing `adb reboot bootloader` (when the device is connected and the Android system is running or TWRP is running), see above

Type
fastboot flashing unlock
and
fastboot oem unlock-go
Flash your device
Reboot your device to the Android system or to TWRP.
Prepare the flashing command (in one line) and do not hit enter yet
./qdl --debug --storage emmc --include '<path to the unzipped firmware files>' '<path to the unzipped firmware files>/<mbn file>' '<path to the unzipped firmware files>/rawprogram_unsparse.xml' '<path to the unzipped firmware files>/patch0.xml'
For me, that was (in one line) and do not hit enter yet
./qdl --debug --storage emmc --include 'TB-X605L_USER_S000020_20180921_Q00020_ROW' 'TB-X605L_USER_S000020_20180921_Q00020_ROW/prog_emmc_firehose_8953_ddr.mbn' 'TB-X605L_USER_S000020_20180921_Q00020_ROW/rawprogram_unsparse.xml' '/TB-X605L_USER_S000020_20180921_Q00020_ROW/patch0.xml'
Open another command prompt, and prepare the reboot EDL command
adb reboot edl
Now, enjoy the following:

Run the flashing command (as prepared above), it should stop with the message 'Waiting for EDL device'
Run the reboot command from the second command prompt (as prepared above).

Note that you can of course enter the EDL mode in any other way - but as some instructions say that you have only a couple of seconds to start EDL mode, before the flashing is aborted.
The --debug option obviously isn't necessary, but you see much more action, and the flashing takes about 10 to 20 minutes.
Enjoy your unbricked devices!
PS: The documentation of the solution took a lot of time, and I'm a beginner here. I'm pretty sure that the description and formatting could be improved. I'd find it helpful if you give me hints as comments on how I could improve the description of the answer (instead of possibly downvoting it). Thanks!


Why does controlling CPU frequency require root access? According to this answer one of the programs that requires root access is SetCPU that can lower the CPU frequency when the phone is not used thus prolong battery life.

I don't get one thing - why does that require root? What could be the harm in reducing the CPU frequency?

If have to disagree with Sparx, if you change the CPU frequency via the supported methods that every modern CPU provides, changing it, even in a fast sequence, doesn't affect stability. I would even rule out hardware damage, because of the sophisticated security mechanisms in modern CPUs (overheat protection, etc.).

Why can only root set the frequency and the frequency governor? Well, first because it's Linux that only allows root to do so. Second, I think that it's because the average user shouldn't care about. It's the system that decides which frequency is the best in the current situation. It does so automatically, without user intervention and it does the job good under Android (IMHO). While thinks like SetCPU can prolong battery life, it also can shorten it, if it's done wrong. The question here is: Do you believe that a 3rd party App does better battery management than the one that the manufacturer of the device? In certain cases sure, but not always.


Can back up / restore for a hard reset on Galaxy Note be done using Samsung Kies? My Galaxy Note seems to have gone pretty sluggish and i guess one option is to hard reset / format my phone. I have been browsing this forum and now know how to do the reset and that it is very important to back up the data safely. My specific questions are:

Can the backup / restore function of KIES do the trick? My phone is not rooted nor do i want to root it. KIES because i have been using it and am not sure about titanium or mybackup.
During the back up should i include account information and settings too? Most posts advise NOT to backup system settings/data but i suppose account info is different? (Sorry i'm a little lost in this field)
I hope the phone will be back to normal functioning after the reset (i mean, it may or may not remove the lags etc but it wont harm either will it?)

The KIES backup/restore function should work, as you are not rooting, upgrading or changing ROMs.  However, it can be a little flakey, so be prepared for this to not work and to lose your system and app settings.
See 1.
A reset certainly won't harm it.  However, lags are likely to be due to one of your apps misbehaving, so a backup/restore will likely put you right back in the same boat you're in now.


SD can't mount and mmc0: error -110 whilst initialising MMC card dmesg error My android device (Samsung Galaxy S with cwm) stop mounting properly the internal SD card to /sdcard/ mountpoint: normal boot fails and cwm recovery says "Can't mount sdcard" while trying.

Through adb shell terminal, I've seen that mmc* devices are not recognized at all

shell@android:/ $ cat /proc/partitions
major minor  #blocks  name

  31        0       7680 mtdblock0
  31        1       7680 mtdblock1
  31        2     256000 mtdblock2
  31        3      17920 mtdblock3
  31        4      12800 mtdblock4
  31        5      16384 mtdblock5
  31        6     176128 mtdblock6
  31        7      11264 mtdblock7

shell@android:/ $ dmesg | grep mmc
<6>[    0.000000] sclk_mmc: source is mout_mpll (6), rate is 51307692
<6>[    0.000000] sclk_mmc: source is mout_mpll (6), rate is 47642857
<6>[    0.000000] sclk_mmc: source is mout_mpll (6), rate is 47642857
<6>[    0.000000] sclk_mmc: source is mout_mpll (6), rate is 47642857
<6>[    3.073948] s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133400000 Hz)
<6>[    3.074154] s3c-sdhci s3c-sdhci.0: clock source 2: sclk_mmc (51307692 Hz)
<6>[    3.075282] mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
<6>[    3.075468] s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133400000 Hz)
<6>[    3.075675] s3c-sdhci s3c-sdhci.1: clock source 2: sclk_mmc (47642857 Hz)
<6>[    3.075966] mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
<6>[    3.076208] s3c-sdhci s3c-sdhci.2: clock source 0: hsmmc (133400000 Hz)
<6>[    3.076413] s3c-sdhci s3c-sdhci.2: clock source 2: sclk_mmc (47642857 Hz)
<6>[    3.076671] mmc2: SDHCI controller on samsung-hsmmc [s3c-sdhci.2] using ADMA
<3>[    4.682865] mmc0: error -110 whilst initialising MMC card
<3>[    6.288432] mmc0: error -110 whilst initialising MMC card
<3>[    7.897690] mmc0: error -110 whilst initialising MMC card
<4>[    7.959521] mmc1: queuing unknown CIS tuple 0x80 (50 bytes)
<4>[    7.971173] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
<4>[    8.009624] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
<6>[    8.022843] mmc1: new SDIO card at address 0001
<4>[    8.062894] bcmsdh_sdmmc: probe of mmc1:0001:3 failed with error -110

Is it an hardware problem or can I try to fix? Thanks.

mmc0: error -110 whilst initialising MMC card

This means that the internal SD card has failed.

The common workaround for this is to install Android to an external SD card. I can't comment on the Samsung Galaxy S, but I am currently doing this for a Samsung Galaxy Tab using the following instructions: http://forum.gsmhosting.com/vbb/f606/internal-sdcard-damaged-1471227/

Hopefully you can find some instructions specific to your phone.


Need for Secondary Contact Storage Space accessible only for CallerId The contacts storage in android is pretty much standardised and is unified among all apps, and accessible depending on the permission level.

However, I need a way to store some contacts which should not be in the standard contact storage space, because it is accessible by all the messaging apps and there is no way to hide contacts from selectively appearing in them, other that deleting the contact.

But, deleting them altogether makes it difficult to identify them during an incoming call.

So, I want to have a way to save contacts that can be avoided from being accessed by all apps, but I should be able to identify them on an incoming call.

How can this be done? Any app or storing in csv file... Any suggestion please?

Please note that any caller identification apps which are cloud based, is not the option I am looking for. I want to accomplish this for contacts I know and have saved only.

I came up with a solution for this myself. Instead of writing a complete android app, I found out that Automate itself has SQLite function blocks. So I just wrote a flow to accomplish this and it can be found at

http://llamalab.com/automate/community/flows/17889

Preview of that flow:

Preview of that flow (click to enlarge)


Where is the scheduled message option? I've upgraded my Galaxy Note II to Android 4.3 and if I open the menu when writing an SMS there is no scheduled message option anymore. Where is it gone?

Other users have also reported that this feature has disappeared.

One alternative would be to use SMS Scheduler, or GO SMS Pro (my fave SMS app).


Would Samsung Galaxy Note II battery work on Samsung Galaxy Note? Would Samsung Galaxy Note II battery work on Samsung Galaxy Note?
Would it fit and would the 3100mAh be a problem because the original of the Note is only 2500mAh?

It won't fit, The Note 2 batteries are physically larger than the Note 1's battery slots. Your best bet is finding a good third-party extended battery.


Unable to find Android WebView in Google Play store A recent Chromium blog post contains a screenshot of a Google Play store page for the "Android System WebView".

I am unable to find this page. I have tried searching the Play Store on my Nexus 7 2013 device (which has Lollipop on it). Interestingly, this page does not seem to exist on the web at all:

Update

Android System WebView's update is now released for public. Still, if you want to get (beta) update earlier, then continue reading:

As the article says,

  If you're making use of the WebView in your app, becoming a beta channel tester will give you an early start with new APIs as well as the chance to test your app before the WebView rolls out to your users.

  The first version offered in the beta channel will be based on Chrome 40 and you can find a full list of changes on the chromium blog entry.

  To become a beta tester, join the community which will enable you to sign up for the Beta program; you'll then be able to install the beta version of the WebView via the Play Store. If you find any bugs, please file them on the Chromium issue tracker.

(Emphasis mine)

As of current, the WebView is based on Chrome 37, while the beta channel offers Chrome 40. Also, currently there is no update publicly available, hence the Play Store link displaying "Not Found". To be able to see page (and update the WebView), you have to join beta channel testing. The guide as provided on the Google+ community:

  Join WebView Beta Channel community on Google+.
  Sign up as a tester via this link.
  Go to the Play Store page and ensure your devices are updated with the latest version.


Regex Caller ID (match suffix) I get calls from a queue from my phone provider. The phone provider distinguishes these calls by adding a suffix.

12345678

becomes

1234567801

I would like to make a contact with a phone number which matches all numbers matching the suffixed numbers in order to have an at a glance recognition of queue calls, as opposed to direct calls.

Is there any way to achieve this? Can it be done with tasker?

I don't know about any app that would allow creating a contact with wildcard or regex but you can consider Tasker to execute a particular action as a recognition of those particular numbers.

Profile: State → Phone → Call

Type: Incoming
Number: *01

* is the wildcard here which would  match anything. 01 is the suffix you want at the end of the number.

How you want to recognize those numbers is up to you. Under a task you can show a:

Toast: Alert → Flash
Notification: Alert → Notify
Popup: Alert → Popup
May be, a Scene like this:

(Click image to enlarge)


How to secure personal data on a factory reset tablet with broken microUSB port? I recently sold a Nexus 7 (1st generation 2012 model) online after performing a factory reset. Today, I learned that factory resetting does not completely erase your data. I am very paranoid about selling this tablet now. I read that the best thing to do is to encrypt your data and then do a factory reset. Am I correct to assume that if I've already done the reset that won't help?

If encryption is still a solution in my case, then I have a further problem: the microUSB port is broken, the device will not charge and is not detected when plugged into my computer. You can't perform the encryption without a fully charged battery, so that no longer seems like an option for me.

Given that I've already sold the tablet and am expected to ship it out on Tuesday, is there anything I can do at this point to assuage my fears of personal data theft?

If the battery lasts long enough, you can use a tool to perform a Secure Wipe. As you've already factory-reset the device, one that cares to sanitize free/empty space should suffice, such as Secure Eraser or the free version of iShredder.

What those apps do is overwriting empty space with random patterns (or just zeros, or just ones) – so all a potential "restorer" can find afterwards is garbage.

If your battery gives up inmidst of the process, you've got at least something sanitized – and cannot do anything about the rest anyway. Still better than nothing I'd say, so I'd give it a try.


Android Terminal error (file 64-Bit ELF) So, I need to have the program 'objdump' on my phone thought I can just copy it from my Linux box to my phone and everything will be fine. But after I copied it with adb in the terminal it says

sh: /system/bin/objdump: not executable: 64-bit ELF file

What I have tried:

chmod 755 /system/bin/objdump

But that doesn't seem to fix the problem. Please help.

One cannot just reuse the same binaries on both a computer and a mobile device, as the processors of the abovementioned are likely to differ.

In your case, you are trying to run an objdump binary compiled for a 64-bit processor on a device which is most certainly powered by an ARM processor. The processor of your Android device cannot understand the instructions used within the binary, and thus rejects the file.

In order to ultimately run the binary, you need to obtain its source code, discern your Android device's processor architecture and build objdump from source against the given architecture.


Is there a way to prevent applications from updating when running on battery I know you can restrict applications to update on Wi-Fi only.
Can you achieve the same thing with "update when charging on sector only" too?

There is no way to do this, except to only select to manually update apps, and them update them when you have your charger connected.

There is no way to automatically restrict them.


Connected by Telegram appearing in phone contact Does a contact on an android phone contacts list that shows a Telegram app symbol by it and says "Connected via Telegram" mean it is someone who is chatting on telegram or just someone who also has telegram? None of the other contacts show this

The symbols that appear under 'connected via' are there to show you, where the contact is saved.

So if a number is saved on your Google account, it will show a Google symbol.

Being that apps like WhatsApp and Telegram, sync your contact list and use that for their app, therefore it will show 'connected via' telegram, because you are using that contact in telegram.

In short, when it says 'connected via' it just means that the app in question is using this number. And not that you have ever contacted the person.


How to turn off flashlight when the phone rings? I have LG G3 with Android 4.4.2. When the phone rings or when I get a message, the flashlight will turn on.

How to turn it off?

This setting should be found in Settings -> Accessibility -> Flash alerts. It's primarily used to notify people who are hard of hearing about calls and messages.

Source: Sprint's LG G3 User Guide


As a Google Voice number user, what app should I use for texting now? Google has decided to push hangouts for enterprise, or something, and now there's a big obnoxious message that takes up half the Hangouts app whenever I open it into the "conversations" view.

I use a google voice number for all my calls and texting in the US (calls to my google voice number are forwarded to whatever local carrier number I have at the time, texts are done over Data but appear to be from my google voice number to whoever gets a message from me). I wish to maintain this paradigm.

In compliance with Google's indecisiveness, I tried switching over to the Android "Google Voice" app, but none of my 2+ years of conversation history on Hangouts is available there. So, I would like to, as seamlessly as possible, continue to text using my Google Voice number using whatever app Google has decided I should be using now.

Which app should I use for texting now, and how can I port my Hangouts conversation history to that app? Bonus points if I can use that app on desktop (via browser or otherwise) to text from my Google Voice number (as I could with Hangouts).

Hangouts still works for texting to and from Google Voice only, and I don't think that is supposed to go away (at least not anytime soon)... it doesn't work as your default SIM carrier's SMS/MMS app anymore. I use it daily and just updated yesterday and it still works with the Google Voice number.

I had the Google Voice app installed, but saw no advantage to it over Hangouts so I continue to use Hangouts and the Hangouts Dialer app and have had no issues so far. That may change later, but for the foreseeable future it is working with Google Voice only.

  Google Voice users will also be affected, but not as much as
  Hangouts-only users. The rule only applies to messages sent and
  received with your carrier phone number—all SMS messages sent with
  your Google Voice number will remain unaffected. "For SMS users using
  Google Voice on Hangouts on Android Google Voice users who also send
  carrier SMS messages will need to choose another default messaging
  app. Their Google Voice messages will be unaffected and will still be
  available in Google Hangouts," the e-mail states. "For Google Voice
  users on Hangouts on Android Google Voice users who do not use carrier
  SMS, text messaging will not be affected and no notification will be
  shown."
  - Source


How well do animated GIFs work on the Asus Eee Pad Transformer? I'm looking at buying the Asus Eee Pad Transformer. Before I do, though, I want to see how my Tumblr experience will be on it. What I'm specifically worried about is animated GIFs. When I browse Tumblr on say my iPod Touch or Droid, sometimes GIFs work, sometimes they just don't. I played around with an iPad 1 a while ago and it also had trouble playing some GIFs.

I'm wondering if anyone has any experience with the Eee Pad and if it has these same problems with playing animated GIFs?

So I couldn't wait and went out and bought one. Turns out GIFs work relatively well. All of them animate. However, too heavy a page can really bog down performance. Tumblr, for instance, only works well if I turn off unlimited scrolling. With only one or two GIFs on the page, they animate well. With a large page, GIFs will animate, but slowly while skipping some frames.

All in all, it's a usable experience.


How to copy the current URL in Chrome? I was sure in the version prior to 18.0 you could fiddle around and long press on the URL in the address bar and get a menu to copy the current URL.

I just updated Chrome, now if I long press it I just get the magnifying glass which is incredibly frustrating. How can I copy the current URL to the clipboard in the Chrome browser?

Chrome 18.0.1025469
Android 4.0.4
Sony Xperia P

Turns out I was doing it wrong (well at least on my my ROM).

You need to perform two double-taps.

Double tap the URL. The first tap will select all of the URL and the second will deselect it and give you the text cursor and that little text selection tab helper thing.
Double tap the URL again to bring up the menu.

Or you can just keep quickly tapping until the copy menu appears. I find this whole process to be a bit unusual.

Other people are saying that they can long press to copy, so not sure if the above is specific to Sony ROMs.


Nexus 6P Heating Issues I have a Nexus 6P 64 GB which is just 4 months old. I feel that the phone is getting hot more than normal, mainly the display. When I do browsing say for 10-15 mins or shoot videos (4K) 2-3 mins or take HDR photos 10-15 photos in succession, the phone gets hot from every nook and corner. My local service center is not very high tech. The only solution they suggested is to flash the OS. I do not to what extent this is going to help. I did nt buy the phone from Google Store but from other online partners in India.  I sought help of people around here or users of Nexus 6P about their experience.

Thanks.

I recently bought a nexus 6p myself and upgraded it to Nougat (Android 7.0).
It burns like a stove after playing 10 minutes of any 3D games (in my case, Walking Dead: No man's land), and that's both before and after the system update.
I think the following article explains the reason pretty well, it's all about the processor:
http://www.androidheadlines.com/2015/10/huawei-nexus-6p-good-bad-ugly.html

I tried wrapping an ice pack with a towel under my phone while using it and it helped a lot.
I'm not sure if that's good idea though because people say that it will definitely cause condensation inside the device and void the warranty.


Help on fixing “unfortunately the process com android systemui has stopped” on galaxy S3 NOTE Every time I  press the home button to get out of an app: meaning that the app is running in the background, then press the home button again to swipe away or close the app the message, "unfortunately the process com android systemui has stopped" , appears and I get sent to lock screen. I haven't done anything to my phone before this message kept appearing. I didn't touch any files, download games, or do anything risky to the phone. Is there a way to fix it? If there is please help.

I have the same problem as you have. It has appeared yesterday. After I have tried all the suggestions found on the internet and none got results, I came to the conclusion that this is a new issue. I reset my device to factory settings more than a few times. With the fresh installed os the problem disappeared. After syncing all the apps from google account got me to the same error. I have followed which application fresh installed got me to the same problem. I saw a relation between google application https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox and this error. I have uninstalled it and yes that was the reason. But this is not really the solution as I don't have access to a lot of stuff without google app.


SMS thread retrieval Possible Duplicate:
  Is there a way to recover a deleted sms?

I hope I am able to get this resolved as this is very important.  Eventually, I have a Samsung Galaxy S and I have been keeping all the texts that my x and I have been exchanging and I accidentally deleted the whole thread.  Is there anyway to recover that one thread of the texts?

This is a trick matter, since it depends on where are your SMS being saved. If you have saved the information on your mobile phone SD card, its possible to recover them since the files on every SD Card don't get erased immediately.

When a file gets deleted from an SD Card, the space occupied by that file get marked as vacant so allow subsequent files are written on that spot. So, unless the space already been overwritten by new data, your deleted SMS thread is still there and can be retrieved.

Lets go step by step:

Requirements:

You will need an SD card Reader and an SD card Data Recovery software.

Memory card Reader

  A memory card reader is a device, typically having a USB interface, for accessing the data on a memory card such as a CompactFlash (CF), Secure Digital (SD) or MultiMediaCard (MMC). Most card readers also offer write capability, and together with the card, this can function as a pen drive.

SD card Data Recovery

  Card Data Recovery is professional digital photo recovery software to recover deleted files.
  The software has two versions: Card Data Recovery for Windows and Card Data Recovery for Mac.

It was intended to recover photos and other file types, but actually, you can use it to recovery any deleted file.

Download the trial version and install it.

Recovering:

Remove the SD Card from your phone.
Put the SD Card in Card Reader and connect it to the USB port of your computer.
Run Card Data Recovery:

The SD Card will appear on the drives list, under "Removable media".

Select by clicking it. Once selected and orange arrow will appear.
At the right side, you see a big button labelled "ALL", press it (a green tick will be present on the upper right corner of the button).
At the bottom, press the gray Scan button to start the scanning process on your SD Card.

A message saying "Scanning, please wait..." will appear, wait until it finish.

When the scanning is completed, the program presents you with the recovered files:

select what you need to recover.
Press Recover to start the recovering process.

If your SMS's are there, buy the application ($24.95) in order to finish the recovery process.

Other recovery applications

DiskInternals Uneraser
iCare Data Recovery

Recomendations

Perform a regular backup of your phone contents to your computer. It comes handy when having to restore deleted stuff from your phone.

Android SMS Backup: Export Android SMS to Computer


Is there a way to prevent a user from deleting apps on android? Suppose I install app X for purpose A. I don't want to simply be able to uninstall the app. How do I prevent myself from uninstalling an app on android?

I would suggest installing Smart AppLock (App Protector). You can password protect apps from being uninstalled using this app.


LineageOS / bardockpro / recent LineageOS installation package do not work I have been happily using and occasionally upgrading a bardockpro device for many months.

However, in summer 2019 the device stopped booting into upgrades that were released after July. The most recent build that works, insofar as I know, is the 20190710 nightly build.

Since then occasionally I tried newer builds - never successfully. I habve also flashed stock rom. and then retried recent lineageos builds. No success.

The problem, in my reading of an issue  is that the device is not critically unlocked. Therefore not all parts can effectively can be flashed.

so, one question was: how to
get

Device critical unlocked: false

to

Device critical unlocked: true

?

However, my reading of the issue was misleading - and this was not the question. The question was way less specific: how to get the device working with the updated builds?

Well, the solution emerged in a conversation in the German Android-Hilfe. The solution was to

flash an older Stock ROM version.
let the Stock ROM update itself, and in that process, seemingly, get all the partitions "right".

Afterwards I was able to install recent Lineage OS builds following the standard installation instructions.


Auto boot when charger connected (for HTC Magic) I want to let Android OS to boot automatically when the charger connected (for HTC Magic) without pressing power button
I found this guide:

Complete boot when charging
If your phone only gets one of those ugly battery symbols when a charger is connected to a powered off phone this is because the init process is interrupted by /system/bin/chargemon. That file is a binary ARM program, I replaced it with a simple script containing only a single line:
echo skipping chargemon
The file was created and installed with the following steps:
echo "echo skipping chargemon" > chargemon.script

adb pull /system/bin/chargemon chargemon.backup

adb push chargemon.script  /sqlite_stmt_journals

adb shell

$ cd /sqlite_stmt_journals
$ su
# mount -o remount,rw /dev/block/mtdblock0 /system
# cat chargemon.script > /system/bin/chargemon
# chmod 755 /system/bin/chargemon
# reboot -p

When the command su is given above, it might have to be acknowledged in a dialog on the phone screen.
The final command reboot -p shuts down the phone. As the USB cable is still connected it will power on again, and if everything has gone fine the phone will complete its boot process without halting with any battery symbol.

But I can't find "chargemon" in System/bin

I got it working - auto boot when charger is plugged in - on my HTC Desire 200. There is no playlpm/lpm/idot/chargemon on these HTC devices. Fortunately there is something similar, /system/bin/zchgd.
This is a service that takes care for the charging animation. On this specific device, the charging animation is played even though the phone is powered on (on the lockscreen), it is also played when the phone is powered off while it's on a charger. (BTW: the images for the animation can be found at /system/media/zchrgd.)

As I found out, the zchgd service is started differently when the phone is powered off or on. I just grep through the init scripts, in my case /init.gtou.rc:

service zchgd_offmode /system/bin/zchgd -pseudooffmode
    user root
    group root graphics
    disabled

service zchgd_onmode /system/bin/zchgd -onmode
    user root
    group root graphics

on property:dev.zcharge=true
    start zchgd_onmode

on property:dev.zcharge=false
    stop zchgd_onmode

So, I created a fake zchgd service, a simple sh script that replaces the original service.

Steps:

adb shell
su
mount -o rw,remount,rw /system
cd /system/bin
ls -l zchgd*
mv zchgd zchgd_original
touch zchgd
vi zchgd # <- insert content
chmod 0755 zchgd
chown root.shell zchgd
ls -l zchgd*

Content of my fake service:

#!/system/bin/sh

log -p v -t "zchgdwrapper"  "Starting fake zchgd service; args='$@'"

if [ "$#" -eq 1 ]; then
    case $1 in
    -pseudooffmode)
        log -p v -t "zchgdwrapper"  "PseudoOffMode service"
        while true; do
           sleep 60
           enabled=$(cat /sys/class/power_supply/battery/charging_enabled)
           log -p v -t "zchgdwrapper"  "Checking battery charging enabled; enabled='$enabled'"
           if [ "$enabled" -gt 0 ]; then
               log -p v -t "zchgdwrapper"  "Going to magic-reboot"
               su -c "echo 1 > /proc/sys/kernel/sysrq"
               su -c "echo b > /proc/sysrq-trigger"
               ret=$?
               log -p v -t "zchgdwrapper"  "Magic-reboot issued ret='$ret'"
               sleep 120
               exit 0
           fi
        done
    ;;
    -onmode)
        log -p v -t "zchgdwrapper"  "OnMode service"
        while true; do
          log -p v -t "zchgdwrapper"  "Sleeping beauty"
          sleep 3600
        done
    ;;
    esac
fi

log -p v -t "zchgdwrapper"  "Not gonna happen - starting the original service"
/system/bin/zchgd_original $@
exit $?

When the service is stared with -pseudooffmode argument, then it checks the battery status periodically
(every minute in my case). If the phone is being charged or the battery is full then it will automatically
restart the phone. I could not use /system/bin/reboot, I got permission errors, even though I had them... So I restart it with a hack, that two echo lines.
The -onmode is there only because, I don't want to see the charging animation even if my phone is powered on.

You can debug the script with adb logcat -s zchgdwrapper. I hope this was helpful!

IMPORTANT

For this to work, you MUST enable Settings/Power/Fast boot option. It won't work if it is disabled, I think without the fast boot option another firmware is booted, but not sure about that.

Also I have this config in SuperSU#, I don't think it is necessary but, here it is:

Default Acces < Grant
Enable su during boot
Trust system user

Further info: https://github.com/tomicooler/htcdesire200autoboot


Why doesn't my Android 7.0 smartphone have Ambient display? I'm trying to figure out why my Android smartphone isn't showing notification on the lock screen when I receive a new Skype message. After some researchings, I found that it seems to have something to do with a featured called "Ambient display".

As this article explains, Ambient display is a feature introduced on Lollipop (Android 5.0) and above, and it wakes the device and light up the display for a few seconds when new notifications arrive.

My Android version is Nougat (Android 7.0) so it is supposed to have Ambient display. But after I followed the instruction of that article and went to Setting > Display, I cannot find any option called Ambient display.

Why doesn't my Android 7.0 smartphone have Ambient display?

== Edit ==

My device is CAT S41.

Your device doesn't have it as per the manual you can download from here
But it does the Ambient  light sensor as mentioned here

Reasons for not enabling it are best known to OEM and you can ascertain from them and also request for inclusion in future updates (unlikely they would heed your request)

Edit

As suspected it doesn't support. Chat screenshots


Why chrome shows video in android device, but opera does not? Opera has built-in proxy and presser of traffic - it is very useful for me. But opera, instead of to show a video, downloads it. It isn't I want.
How can I (without root and with android 4.3) learn opera to show a video as well as chrome does?

If you disable the Off-road mode in Opera then it plays the video rather than downloading it.


HTC Desire 820 dual sim root failed I tried to root my mobile phone HTC desire 820 Dual sim.

I unlocked boot loader, flashed TWRP2.8 but none of Super SU could root my phone (Android version 6.0.1).

Recently been to HTC service center to replace battery. They mentioned that if we change battery for unlocked phone, phone may not work.

How to remove TWRP and get my phone back to early setting and lock it?

I guess you couldn't root phone probably because phone use lz4 format (I just guess) or you was doing something wrong. However, that what they said is bullshit, what battety has to do with that if bootloader is unlocked? Maybe they said they WON'T fix it if bootloader is unlocked because unlocking bootloader is way to lose warranity? To get your stock recovery back you'll have to flash stock firmware, you have a guide for that on their site, if not then there is guide on xda. And to lock bootloader that is not possible not fully because you can relock bootloader (command is I think "fastboot oem relock" or something like that), in that case bootloader state would return 'relocked' so even than they will know that you played around.


See YouTube videos in Anaglyph mode How to see a YouTube video in Anaglyph mode from a non-3D Android device? I am not able to enable Anaglyph mode from the YouTube application.

If you download Dolphin browser, add the Desktop toggles add-on you should be able to view it as a normal webpage (make sure to enable desktop toggles and delete the "m." in the url)


Sony Xperia Z locked screen, no internet connection, does not connect to computer I have a bit of an issue with my old Sony Xperia Z phone. A couple of months ago I lent it to a friend (now ex friend) who decided she would change the pattern lock. When she returned the phone she did tell me the pattern, but as I now have a new phone I had no need to use it so after a while I forgot what it was (so did she). As well as that she lost the sim tray so I am unable to put in a sim card. This means I have no internet connection so unable to use the 'Forgot your pattern?' option.

When I connect it to my computer it isn't even recognised.

I have looked at so many pages trying to help people with the same issue and finally gave up on the idea of restoring all my pictures etc.

However, I now want to sell it and even the Factory/Hard Reset does not work.

Can anyone help me with how to factory reset it please? I am going out of my mind about this. I do not understand how difficult it can be to reset your phone...

All your help will be much appreciated.

Thanks in advance.

Katie

You gonna need to boot into recovery mod follow this steps

Switch off your Xperia Z first
Switch it back on and the time when you see your phone’s LED
notification light turn Pink! (or any other color) — start pressing
either the Volume UP or Volume Down key a couple of times to make
your phone boot into recovery mode
Once you’re in recovery mode. Use Volume buttons to navigate Up and
Down between options and Power button to select an option in
recovery.

navigate to the factory reset and click on power button.


Can update.zip update-script be used to copy build.prop to an SD card? I made the unfortunate mistake of lowering the dalvik heapsize to 64m and now my tablet is stuck in a bootloop . I've tried to make my own update.zip (including signed ones) and all fail to load in recovery mode, saying "Installation Aborted".

Is there any way to use update.zip to pull build.prop from the device? My computer does not find it on ADB so this is my only option.

**Edit:
I've now got a copy of the original build.prop from the stock ROM. I'm now having trouble getting that back on to the device, as it keeps halting at the extract section. I'm wondering if there is something wrong with the permissions I'm using or do I need to specify in the updater-script to delete build.prop?

mount("ext4", "EMMC", "/dev/block/mmcblk0p6", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0644, "/system/build.prop");
show_progress(0.100000, 0);
unmount("/system");

Since my recovery doesn't show output for ui_print(); I've used show_progress(); to see how much of the code gets run. It successfully mounts and runs anything, except extracting the package, where it just hangs up and says "Installation Aborted".

I fixed the problem by backing up using the stock recovery, then reflashing the factory firmware. I then went back into stock recovery and restored my user data.

The reason why it wouldn't accept my update.zip files is because they weren't signed by Archos.


Can a faulty Micro-USB cable cause damage to your device? Hardware damage caused by USB Type-C cables by drawing too much power has been widely reported:

https://www.howtogeek.com/240777/watch-out-how-to-buy-a-usb-type-c-cable-that-wont-damage-your-devices/
http://www.theverge.com/2016/2/4/10916264/usb-c-russian-roulette-power-cords
http://www.pcworld.com/article/3002064/computers-accessories/beware-bad-usb-c-cables-google-engineer-warnswhile-naming-names.html
http://gizmodo.com/cheap-usb-c-cables-could-kill-your-phone-or-laptop-1757115350
http://www.androidcentral.com/usb-c-problem-isnt-going-away-anytime-soon

Is Micro-USB affected?

Root of the problem is non adherence to standards and not type C as a class of faulty cables.

The damage caused specifically relates to :

poor adherence of standards to the extent of being non standard
Using a wrongly rated resistor by one plus
in their products, which fried other devices connected to such cables

Benson Leung is a Google Engineer who carries out extensive testing of practically anything related to type C, which you can read on his Google Plus

If you use any non standard product, you always run the risk of damage / poor performance. This is equally true of micro USB cables, though I haven't come across such bad press for micro USB ( barring chargers of spurious quality)


Watch my local tv on my Android device I have a somewhat fancy tv that supports an external wi-fi module. If you connect that to the tv, you'll be able to stream media from a pc or other compatible device. At which point I thought, is there a way to consume that stream with an Android device?

I have searched google play, there's a fair amount of tv apps that are just shortcuts to some online tv websites. I don't want that, the idea is to watch exactly what I have on my tv, turning my phone into a portable tv.

What I imagine is a server box connected to the tv cable that streams it over WiFi, and then there's an app on my phone that consumes the stream.

I understand that may involve a combination of software and hardware that would need to be purchased. Happy with that, just can't figure what it would be. Have done my Google homework to no avail.

Please advice if there's a solution for that, or whether it's feasible at all.

It sounds as though you are using your TV as a media renderer for a media server (hosted on your PC or other computer device).

If that is the case, then yes, it is possible to use your android device as a media renderer for a media server. Download MediaHouse UPnP / DLNA Browser and a video player with a codec that supports your video file-types (VPlayer Video Player is the best that I've found).

If you instead meant that you wanted to stream the content provided to you from your TV service provider, then that is a bit more complicated. Generally, they do not allow this since they want you to pay some odd sum of money for an additional renderer that they own.

The process would go soemthing like this (if not otherwise allowed):

Use some kind of capturing device to record (temporarily or permenently) the video content transmitted through an appropriate cable (HDMI for example). You would theoretically need to split the signal or re-route it.
Then configure a media server on your PC to stream the recorded content.

This would not provide a stream however which would have to be in a protocol like MJPEG to work as an actual "stream". You would need something akin to an ethernet based capture card that provided a video stream over IP.


What exactly happens to a multi-core CPU when a device goes into deep sleep? What exactly happens to a multi-core CPU when a device goes into deep sleep? Do all cores go to sleep or do the cores keep running at the lowest frequency?

For a layman's answer, while in sleep or deep sleep mode, the MC is instructed to turn off all non essential subsystem like the sensors in your device and run only the critical subroutines in a single core at the lowest frequency possible.

If you want the technical answer go here


Droid - what won't function properly on device if I disable background data usage for google play store? I just upgraded to a new droid razor maxx from an older version.  With the older version I never went over my 150 mb of data.  Since I received the new phone Google Play Store is eating up my data and I went over my limit within 3 days.

Why does google play eat up all my data using mostly "background" usage, when I am not even accessing it?

What won't function properly on device if I disable background data usage for google play store?

I have done that months ago for the very same reason, so I can tell from my own experience:

you will no longer receive update notifications while on mobile data (naturally)
no apps will auto-update while on mobile data (again, naturally)

Both is what you want. I encountered no more restrictions. Update notifications coming in as soon as the device is connected to any WiFi, updates I either do on WiFi only.

What I didn't try is to force an update/install while on mobile data. In theory, this should work as long as you keep the app in foreground – but the installation will stall as soon as you switch to another app (as then Google Play no longer is the "foreground app"). But that's the theory only, as I've never tested it.


If using dual sim on Huawei P20 Pro would changing sims show in either Google Activity or Huawei Data Download I have a Huawei P20 Pro with dual sim capability. If I used (signed into) the second sim with another Google account, would My Google Activity on the Google account of the first sim show the switch, backwards and forwards, between the two sims? OR if not.. Would the switch be shown on the Huawei download data for my phone, if at all?

Google accounts are independent of the SIM card, you just need Internet for accessing Google. If this happens on your device with SIM1, SIM2 or Wifi is irrelevant to Google.

Note: Usually in dual-SIM Smartphone only one SIM can be active for Internet access at a time.


How to make default application in android? I need to add one of my app to my android such that even if it is fully formatted it remains within the android as the default installed app. Can i get help regarding it. I have my android rooted.

The term you mentioned 'Default app' means i assume you want to make your app as 'System app'. If your phone is rooted successfully you can do this with numerous methods.

File Explorer method
If you have a file explorer with root permission granted (ex. ES File explorer etc), it is very easy.

Just obtain an 'APK' file of your app.
Copy the APK file. Navigate to '/system/app'.  paste it under '/system/app' folder.
Long press 'APK' to change its properties. Under permissions property, click on change and set it to rw- r-- r--. ( Thats user: read and write, group: read only and other: read only. Thats it! Reboot your device.

ADB method
Same can be done with the help of ADB. You just have to copy and paste your Apps APK file under '/system/app' folder.

To do this, connect your device to your pc and make sure you have ADB drivers are installed correctly. Also enable the usb debugging.
Open command prompt and type:
adb shell
su
cd /data/app
mv 'your_app name' /system/app/'your_app_name'. Replace 'your_app_name' with obviously name of your application without quotes.
Again exit shell and reboot.

Apps method
This is most simple method. There are many apps available to do this task. One popular app is 'Titanium Backup'. But as per my knowledge 'convert to system app' feature is paid version only. So i prefer one of above method only.

  Tip: do the tricks only if you know what you are doing and you are familiar with android file system at your own risk.


SuperSU binaries won't install to my HTC One M8 I am following this guide to root my HTC One M8. I just need root, I don't need a custom ROM.

I have gotten to step 7 (weaksauce). I can install weaksauce fine and it roots my device (at least, it says it roots it).

However, when I try to run SuperSU (downloaded from the Android market, latest version) it says The SU binary needs to be updated. Continue? It says this in my notification bar as well. I click Continue and it says Installing, please wait. If you see this message for more than five minutes please restart and try again. After about 30 seconds, it says Installation failed ! Please reboot and try again.

I've tried it multiple times with all forms of rebooting (adb reboot, holding power button, etc) as well as a factory reset (which put me back down to 4.2.2), however it keeps giving me this error.

I have had this issue and there are 3 ways to try to get around this.

You will need a custom recovery to attempt 1. or you can use Odin alternatively for 2. below. The superSU binaries are often (but not always) installed via recovery and the app itself gives this option.

When superSU asks you to update the binaries, rather than select 'Normal' select 'Recovery' and see if it can install that way.
Flash superSU.zip directly in your recovery or Odin. Here is the link to Chainfire's latest version. I have tried this myself and it fixed the issue for me on a number of devices.
Install an alternative super user app from the market. (This can be messy, and you need to ensure superSU is completely removed)


Radio without the headset Is it possible to hear the radio without connecting the headset?

I know the headset acts as an antenna.

However, it would be great if I can just put the phone on the coffee table and listen to the radio without being physically connected to it via a headset.

I am using Samsung Galaxy 2.

No. Your earphone is used as an antenna. But, If your phone has a built-in radio app, connect your earphone, open the app and turn loudspeaker.


Weather Calendar No Longer Syncing I have the standard Weather calendar added to Google Calendar, and I can see the weather for today on goocal in my desktop browser just fine.

I noticed that the weather was no longer showing up on my calendar.  It was showing the weather for last week - Mon-Tue-Wed, but there was no entries for this week.
So I deleted the weather calendar completely.  Verified it was no longer showing up on my Android.  Then I added it back again.  Now I can (still) see it on my desktop in the browser, but in Android the calendar no longer shows up at all.  The Weather calendar is quite definitely selected as "Synce, Visible" in the calendar settings.  I also tried another calendar app that uses the Google Calendar database (Business Calendar); again, the Weather calendar is selected to be shown, but it does not show up.

Before you ask why I don't just use the weather widget, to be honest I don't particularly care about the weather, I just like having something on my calendar every day - it makes it more obvious in "Agenda" view that I have nothing going on today

UPDATE: I just tried the "Day of the Year" calendar and that shows up just fine.  My speculation is that the weather calendar requires your current location, and that's the source of the problem.  I'd rather see the weather, which is at least marginally useful, than the day of the year though.

Well the answer seems to be to use Weather Underground's iCal subscription.  It shows up and it gives you more complete weather info.  Only downside- it doesn't automatically pick up your location, it's hardcoded to a specific location.


CSipSimple: Making calls through OpenVPN I have an Asterisk server configured at home. It works well, and I am able to make calls to other devices internally over LAN or Wi-Fi - as well as outbound to a VoIP provider. I use CSipSimple as the client on Android (and Jitsi on my Ubuntu laptop).

I have also configured an OpenVPN server, which is also working as expected for both Ubuntu and Android devices. I can ping, ssh, etc across it.

I want to be able to make a call to a LAN or Wi-Fi client at home, over the OpenVPN connection from my Android phone using CSipSimple (I haven't allowed Asterisk clients to register from the Internet, only from the LAN subnet).

CSipSimple is able to register and make calls - but I cannot hear any incoming audio on my phone. The call info shows no packets coming in. Calls over OpenVPN using Jitsi on Ubuntu work properly, but CSipSimple on Android does not work.

The audio cannot be heard because CSipSimple by default advertises the Internet-facing IP address of the phone, not the OpenVPN address. This means the control messages get through (hence one can make calls), but the audio stream is routed out through the Internet and not over the VPN.

Change to Expert mode

To change this, the CSipSimple account "wizard" needs to be changed to "Expert". Assuming you already have the account registered, long-press on the account in the CSipSimple account manager view, and press "Choose Wizard". Then select "Expert" from the "Generic wizards" option.

Change NAT settings

Long-press again on the account name, and select "Modify Account" - there will be many more options than with the basic wizard.

Under the "NAT Traversal" section of the settings, enable "Allow SDP NAT rewrite" - this will tell CSipSimple to use the same address it uses for the control messages and for the audio stream.

Note: this assumes that you are able to place calls, but cannot hear the audio. If you cannot register to Asterisk at all (or whichever SIP server you are using), then it is likely that the VPN is not correctly configured.


After factory-reset, account services permanently crash (no setup possible) It reboot smoothly. It started already doing the setup. But if you click NEXT there is box popping out, showing this stuffs:

Unfortunately, Samsung account has stopped
Unfortunately, Google account Manager has stopped

So, I cannot continue doing the setup. Because, even you click the OK button and click again the NEXT buttom it come back again.

What happen to my samsung galaxy S3? Can you please help me?

I had the same problem recently.  The phone was constantly reporting Google Play Services and many others as having stopped.  A hard-reset left me unable to complete the initial setup, as the account manager kept stopping too.  My S3 was stock standard, not rooted or running any custom firmware.  I was able to fix the problem, and I'd like to share my solution.

Download Samsung's "Kies" software.  Searching the samsung.com site pointed me to Version 2, but once installed the software self-updated to Version 3.1.  A restart was required after installing (I'm on Mac, but I understand with will work on Windows too).
Power on the phone.  Start Samsung Kies software.  Without touching the screen, I connected the USB cable to my computer.
Tools > Firmware upgrade and initialisation
I was warned that the current firmware was already installed, but chose to proceed anyway.  The current firmware was downloaded and installed on the phone, which took around 20 minutes.

After restarting the phone, I was able to complete the setup process without any errors.  The OS now appears to be working correctly (Android KitKat 4.4.4).  If I had to guess, I'd suggest it was some older versions of my network's own customisation that was incompatible with recent Play Store Services updates.  Interestingly, my phone now has less added software (only 2 extra apps I can see) and seems to run better than it did originally.

I hope this info helps others too.


Messaging apps don't receive messages when on wifi with screen locked I have a galaxy s5 phone running on android 5.0. In home and in office, when I'm connected to wifi network and the screen is locked (sleep), whatsaap doesn't receive any message until I unlock the screen. I don't use so many apps so I can't confirm if this is the case with other applications or not, however, I might have experienced the same problem with email app as well.

Keep Wi-Fi on during sleep is set to Always, I don't have any power management application or any particular settings. I checked Whatsapp faq and they suggested checking priority notification, which I don't use. Searching the web suggests clearing cache and data which doesn't solve the problem.

Any workaround?

Edit:

I have observed my phone behavior and noted that other applications (e.g., hangouts) show act the same. Furthermore, I noted another fact that might shed some light: Say I unlock my screen and after several seconds my apps start to notify me about some messages. But time-stamp of these messages aren't for this moment but rather [e.g.] half an hour ago when they were suppose to be delivered.

Edit2:

I have cleared the cache/datafiles, updated the app etc. I would highly applicate if you submit answers that do not suggest these generic (and almost always non functional) workarounds. Thanks.

I think your issue is related to the OS ,as discussed in this forum
Link ,maybe a new update from Samsung might fix this issue.You should contact Samsung service ,some guy exchanged his Samsung S6 over this issue as mentioned in the discussion


Can I connect existing USB mouse and keyboard and VGA monitor to my Nexus 6 I guess question title sums it all. I have USB mouse, keyboard and VGA monitor. I am ready to buy couple of new adapters/cables. Will it be possible to connect all things up to my Nexus 6. I was thinking to do following:

Buy Micro USB to USB 3.0 Hub something like this
Buy USB 3.0 to VGA cable something like this
Connect Hub to phone
Connect mouse and keyboard to hub
Connect USB3.0-to-VGA cable to hub
Connect monitor to USB3.0-to-VGA cable

Will this even work?

A plug-and-play USB keyboard and mouse should work fine with your phone.

The Motorola Nexus 6 does not support video out of its microUSB port with any adapter/protocol.

You could cast video from the phone to a Google Chromecast ($35 MSRP) HDMI dongle, and then purchase an active HDMI female to VGA male cable/adapter to connect the Chromecast to your monitor - but note that the Chromecast and phone would need to be on the same WiFi network, and there is slight latency in wireless casting that you wouldn't get with a video cable.


Connecting phone contacts with facebook contacts, sync.me can't find right one I've got a phone contact named Dave T. On Facebook his name is David Tiger. Sync.me can't find him for some reason, though it normally does work. I think it has to do with Dave vs David how can I fix this? What I really want is the picture beside the contact.

I've got Xperia Z2 running Lollipop.

As I've read, this is because of new FB restrictions (which are changed quite frequently), which don't allow SyncMe (or any other app) to use the FB friends list.

What you can do is to try to perform more operations on FB with this contact, so that other ways that the apps (like SyncMe) use to get the friends list will succeed. Maybe tagging in photos is enough.


App showing battery charge based on its voltage I have a xt894 with Android 4.3.

I bought an extended 3800mAh battery (Mugen) but the droid doesnt recognize it properly.

I tested a couple of battery manager apps, but I dint find what I am looking for.

I would like to know the name of an app that shows the current battery charge based on its voltage

There is no app that does that, and there never will be, because it is impossible. The voltage of a battery does not tell you how much charge a battery has, nor does any other characteristic of the battery. Battery voltage does drop as capacity drops, but the voltage drop is a function of the percentage of charge, not amount of charge.

It is impossible to directly determine the amount of charge in a battery at a given point in time, by voltage or any other means. Battery capacity tests can only be conducted by spending the battery charge, and measuring it as it is used up. The test doesn't tell you how much charge the battery currently had at any given point in time; it tells you at the end how much charge the battery had at the beginning. I suppose a smart aleck might say that at the end of the test you know how much charge the battery has at that point in time, because that charge is zero. However, you're still not determining that by measuring the charge directly; you're measuring the current, and inferring zero charge based on zero current.

It should theoretically be possible to design an app that estimates capacity by conducting a drain test, but I haven’t been able to find such an app. Maybe that’s because it would be a major pain to run the test. The test would need to start with the battery fully charged and run until it is fully drained, and in order for the test to be accurate you would need to leave the device idle for the duration of the test.

The best method I can think of to estimate battery capacity is to compare the drain rate of the stock battery (or any other battery whose specs you trust as a baseline) to the drain rate of the battery you want to measure, under circumstances that are as similar as possible.

I'm not sure exactly how Android measures the battery percentage. I've read in unofficial sources that it's supposedly based on current and/or voltage, but I've also read that due to the nearly flat voltage vs. charge percentage curve, voltage is not sufficient for determining the charge percentage of lithium ion batteries, and other characteristics need to be used, possibly in combination. In any case, I recommend starting the test from the same percentage charge for both batteries and near the middle of the range, due to the fact that some of the characteristics that can be used to estimate charge percentage (such as the voltage) have a non-linear relationship to the charge percentage, and the curve tends to be flattest near the middle.

Step by step:

Insert the reference battery (whose capacity rating you trust) and power up the device.
Set the timer for 1 hour, or some amount of time during which you expect that the battery will drain at least 20% but no more than 50%. You it to be enough to produce granular results where rounding errors won’t significantly throw it off, but no so much that you’ve almost depleted the battery and entered the steep part of the voltage curve.
To reduce the number of variables that can impact the power drain, run the test after a restart, turn off all network connections (airplane mode), and make sure the screen brightness is constant (by disabling automatic adjustment and screen timeout, or making sure the screen is off for the duration of the test. Running a high drain app can help get more significant results more quickly. However, to ensure that you’re reproducing the same drain rate for both batteries, choose an app with a constant rate of power usage (such as an LED flashlight app). Don’t run any other apps or interact with the device for the duration of the test.
Drain it to 75%. The moment it reaches 75%, start the timer.
When time runs out, check the battery percentage.
Power off, and repeat the test using the extended battery, (make sure you use the same charger and same amount of time, of course).
Divide the change in percentage for the extended battery by the change in percentage for the baseline battery and multiply by the baseline battery’s capacity.

For example, running my Galaxy S4 for one hour, in airplane mode with the LED flashlight, on, the screen brightness at maximum, and the timer app displayed, starting from 75% charge, the stock battery drains to 39%, and my Deep Stretch DPS430 extended battery drains to 52%. The stock battery’s capacity is 2600 mAh. So, to estimate the extended battery’s capacity based on how its drain compares to the stock battery:

(75 - 39) / (75 - 52) * 2600 = 4070

To my surprise, that was actually pretty close to the stated capacity of 4280 mAh (keeping in mind that the test isn’t perfect, and is subject to rounding errors. In this case rounding errors could throw off the results by up to ~110 in either direction, so the actual result really should be stated as “approximately 3960 to 4180 mAh”.)


Security question incoming calls I've got an Nokia 6 with Pie! How do I stop others from answering my calls, or more correct, how do I stop incoming calls from opening my phone?? Everytime there's an incoming call, all security settings are set aside, and anyone can answer or have access to my phone.

You can use Incoming Call Lock. When you start the app:

  This application will protect your phone's Incoming call to be picked by some one else. This application will not allow any one to see the caller's number, name or any other details as the password input screen will be up on the screen.

Give the necessary permission.
Set a pin or pattern to unlock the phone when people call.
Enable the lock.

When you receive a call, before answering, you will need to enter a pin or pattern.

Note: In the settings, you can fine tune how the app should work. You can block all incoming calls or some, allow to view the number that is calling or not, etc.

Important: @Izzy has pointed in the comments that the app has severe privacy issues due to several trackers incorporated to the apps that may transmit your data to 3rd parties. Plus some permissions look suspicious. See his comments below.

Disclalimer: I am just a current/former user of the app(s).


System images do not show up in SDK Manager When I try to create a new AVD, I get the error that there is no system image available. A quick search on the internet tells me that I should download it via the SDK manager, but no system images are showing up in the list.

As well, I get an error that it cannot fetch information from two .xml files. Does this have anything to do with the system images?

There may be the proxy problem. Go to the option under tools and enter the Http proxy and port no.


Edit phone number associated with device / SIM On my device, when I check the phone number through Settings > About Phone > Status > SIM Status, the phone number is incorrect. I ported my number over when I took out a new contract so I guess this is the number originally associated with the SIM. Is there any way to change this?

EDIT: Device is a Nexus 6P running M 6.0.1, no root.

A SIM contains multiple phonebook sections. One of them stores your SIM contacts. Another section contains "My Numbers" (MSISDN) with a max capacity of 3 numbers, usually.

Unfortunately, my phones are too new to access "My Numbers", and my phones that are old enough (2005) to edit them are out of reach.

Fortunately, I had a spare SIM800 development board lying around. I hooked it up to my Arduino and started issuing AT commands.

Here's my conversation with my SIM card:

AT               <-- Check if we are live and communicating with the SIM

OK

AT+CNUM?         <-- Get own number

ERROR            <-- CNUM failed, we don't have an "own" number

at+cpbs="ON"     <-- Switch to "ON" phonebook: MSISDN (SIM own numbers)

OK

at+cpbs?         <-- Get capacity of current phonebook

+CPBS: "ON",0,3  <-- Notice that there's no stored number (0 out of 3)

OK

at+cpbw=,"+639950001234"    <-- Saving my number

OK

at+cpbs?          <-- Get capacity of current phonebook

+CPBS: "ON",1,3   <-- Number saved (now consuming 1 out of 3 slots)

OK

at+cnum           <-- Get own number

+CNUM: ,"+639950001234",145,,4    <-- CNUM OK

OK

AT

OK

Unplugged, then returned SIM to phone. After that, my phone now shows my number +639950001234 instead of "Unknown".


How to install Google Play services on an Android 7.0 emulator? I have the stable version of Android N Preview SDK released last month. The emulators are working perfectly but there is no Gapps available for Android N and there is no way I have found to install Google Play Services in the Android N emulators.

Can someone please assist me with installing Google Play Services and/or Gapps on an Android N emulator?

I would suggest using OpenGApps and ADB, but there's probably a better solution.


How to fix mount errors when trying to mount the raw image that converted from android sparse image? I have sparse.img image with the following properties:

$ file sparse.img
sparse.img: Android sparse image, version: 1.0, Total of 2512896 4096-byte output blocks in 60 input chunks.

I want to see its contents so

I have converted it into raw image.
Created a new directory
Trying to mount the raw image on to the directory

using the following commands:

$ simg2img sparse.img sparse_raw.img
$ mkdir raw
$ sudo mount -t ext4 -o loop sparse_raw.img raw

First two commands run fine and I can see sparse_raw.img generated of size larger than sparse.img.

Last command failed with an error:

  wrong fs type, bad option, bad superblock on /dev/loop27, missing codepage or helper program, or other error.

I think that may be the sparse_raw.img is not an ext4 image but how can I sure about it?

I have tried to mount it as

ext2, ext3 or without -t
without -o loop
but nothing works.

Please suggest a way to fix it.

The file system might not be in the beginning of the raw partition image.
First you need to convert the image from sparse to raw, using either simg2img or sparse_img_to_ext4.py.
Then, you need to find the beginning of the actual partition, binwalk is my favorite tool for that:
$ binwalk super.raw.img

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
1048576       0x100000        Linux EXT filesystem, rev 3.0, ext2 filesystem data, UUID=8f83745e-c212-5aab-a776-4aeed9fad9fa, volume name "/"
[...many many irrlevant hits...]

Now you can mount the file system using the first offset from the binwalk output:
sudo mount super.raw.img -t ext4 -o ro,loop,offset=0x100000 /media/super/


Do I need CFs auto root If I can install TWRP recovery? I am about to try and root my Samsung galaxy note 4 and install TWRP recovery. I want to avoid any conflicting issues so I would like to know If I need to use CFs auto root first and then install TWRP recovery, or if I can just install TWRP recovery and root with that. Also is v3.10.0 the latest Odin version?

Also, will rooting and installing a custom recovery affect any phone features?

First install CF Auto-Root and then TWRP recovery because CF Auto-Root flashes your stock recovery after rooting.

Odin 3.10.0 seems to be the latest (the last time I flashed with version 3.09).
Rooting may or may not be recognized by some banking or enterprise software as a malicious firmware modification and will make them unable to run, but luckily there are Xposed modules like RootCloak that will hide root from those apps.


How to remove No SIM found notification (Android 7.1.1 Nougat) I bought a new phone with Android 7.1.1 Nougat unlocked from Verizon. Since I bought it unlocked, I get a notification that says

  No SIM found, Tap for more information.

It really irritates me because it takes up screen real-estate and I sometimes tap on it by accident. Is there any way to get rid of this notification? (Also the icon on the left side with a SIM card with a strike through it.) Thanks!

If you put the phone into Airplane Mode, it'll stop looking for a SIM card and the notification should go away. Of course this also disables Wifi put you can enable Wifi while it is still in Airplane Mode.