# Question
Title: ADB backup creates 0-byte file; prompts for current backup password even though I never set one; "Failed to set password" for Desktop backup password
# The problem:

Every time I run ADB backup, I get a message near the bottom of the home screen saying `Backup starting...`, followed by a message saying `Backup finished` *a few seconds later* despite the fact that I'm using 17 GB of device memory, and the resultant backup file is created with a size of 0 bytes. I receive no error messages, no feedback whatsoever indicating *that* anything is wrong, let alone *what* is wrong. It appears to work, but way too quickly, and the backup file is empty.

# The process:

1. I confirm that the device is recognized by ADB using the `adb devices` command, and receive the following output:

```
List of devices attached
8e1f368a        device

```
2. I issue the ADB backup command (details to follow).
3. I get the following message at the command prompt:

```
Now unlock your device and confirm the backup operation.

```

...and the following prompt on the phone:

It makes no difference what I do here (details to follow).
4. I tap the `Back up my data` button (bottom right corner).
5. The phone returns to the home screen and shows me the `Backup starting...` message, then the `Backup finished` message a few seconds later. A 0-byte file is created, named either the default **backup.ab** or whatever I specified with the **-f** switch.

# The ADB backup command (used in step 2):

I've tried multiple combinations of options, ranging from as simple as

```
adb backup -all

```

to things like

```
adb backup -all -apk -s 8e1f368a -f 'C:\Data Files\PDA\Backups\ADB\GalaxyS4_20140919.ab'

```

I also tried adding the `-nosystem` switch after reading this and this, which indicate that trying to include a system backup on an unrooted device may result in a 0-byte file, and that this switch must be used. It makes no difference, the process still completes in a matter of seconds and I still get a 0-byte file.

# The "Full backup" password prompt (step 3):

I'm quite sure I have never set a backup password before. I've never had the occasion to set this password or access this setting in any way before. However, I have tried all of the following:

* Leaving both passwords blank
* Leaving the "current backup password" blank and entering a new password in the second box
* Entering the current screen lock PIN and all PINs I've ever used in the past as the "current backup password".
* Entering every password I can think of that I would have ever used for anything on this device

*In all cases the behavior is exactly the same as described in step 5.* I get no errors or any kind of indication that anything is wrong or that my passwords are invalid, and no hint as to whether it's actually expecting a current password or whether that field should be left blank. (The screen shot in this answer and several other support forums I've looked at seems to imply that the "current backup password" box wouldn't be displayed if there's no current password, but that's just an inference; nothing makes it clear whether a current password is actually required.)

I suspect that the password it's prompting for might be the "Desktop backup password" set in Developer options:

I have never set that password before. If I try to set one, I get a message saying `Failed to set backup password.`

In searching for information about this error, I've encountered at least one other case in which someone who was having this problem said this was preventing him from using ADB backup, but he wasn't specific about what happens when he tries to use ADB backup.

Most people who received this message having never set the password before say that the solution was to leave the current password blank, but I tried that in the first place and it didn't work. I found a question by another person who encountered this problem and was sure he hadn't set the password before. Unfortunately it doesn't look like he ever got a solution or even an explanation.

Regardless of whether ADB is looking for the "Desktop backup password" or the ADB encryption password is something separate, it boggles my mind why ADB would require you to enter a previous password in order to initiate a new backup. I'm not trying to restore, overwrite, or in any way access previously encrypted data, so even if an encryption password for a backup *had* previously been set, I can't imagine why anyone would think it's a good idea to prevent you from backing up your device if you don't remember what password you used to encrypt backups in the past.

# Additional information:

**Model:** Samsung Galaxy S4 SCH-I545
**Kernel version:** 3.4.0
**OS version:** 4.4.2
**Android SDK Tools version:** 1.16
USB debugging is enabled.

Note that my reason for using ADB backup is to take a full backup of my phone to be on the safe side before rooting it\* so I can use nandroid backup tools such as Titanium backup. So, any suggestion involving rooting my phone would be a Catch-22, not a solution. Needless to say, a factory reset is also not a solution, since it would defeat the entire purpose of performing the backup.

The phone *is* set up to sync with my company's Exchange servers, and there are some policies enforced by the server. I had thought that the device was encrypted when I first set up the sync with company account, but apparently it isn't currently encrypted. In fact, that's what set this chain of events in motion: I'm getting a message telling me that I need to encrypt the device in order to continue to connect to company servers. I want to take a nandroid backup before encrypting, which requires rooting, and I want to use ADB backup before rooting.

---

<sub>* Yes, I'm aware that Towelroot is purported to be safe, but I'd rather not take chances, and I'd like to resolve or at least understand this problem in case related issues come up in the future.</sub>

# Answer
# Short Answer

Try using an earlier version of adb. 1.0.32 did not work for me, but 1.0.31 did.

# Long Answer

I just encountered this issue on a Nexus 5 running CyanogenMod 11 (based on Android 4.4) using the current version of the Platform Tools and ADB (Android Debug Bridge version 1.0.32 Revision eac51f2bb6a8-android).

Using `adb logcat` to watch the device logs, I noticed that after invoking `adb backup -apk -obb -shared -all -nosystem` there were some suspicious log entries:

```
V/BackupManagerService(  811): Requesting full backup: apks=false obb=false shared=false all=false pkgs=[Ljava.lang.String;@4181ffc8
W/BackupManagerService(  811): Unknown package  '-apk' '-obb' '-shared' '-all' '-nosystem', skipping

```

Where it appears that the device is interpreting the command-line options as non-option arguments, and producing an error because they are not installed package names. This made me suspect the adb protocol or the command/service invocation options had changed on the device relative to the host, so I tried an older version of adb and voilà, it worked.

I did a bit of digging and came across a change to Use escape\_arg in "adb backup", which now causes all arguments to be single-quoted when invoking `/system/bin/bu backup`. This explains the behavior and the single-quoted arguments in the log message. However, it does not seem to match the time at which you encountered the error. It would also suggest the issue to be much more widespread than it appears to be. So I am hesitant to call this the cause, but it may a good starting point for further investigation.
> 33 votes

# Answer
Building on kevenoid's answer, it may depend on what version of adb is running on the phone.

You can find out what version the phone is running natively by doing the following:

First find out what version you are running on your desktop

```
adb version

```

Then open the shell on your phone

```
adb shell

```

Once the shell is open then you can run

```
adb version

```

Then exit the shell by running

```
exit

```

I found that my phone was running version 1.0.31 and not 1.0.32 (it is a samsung note 2)

I tried using quotes or escape characters like Hunter showed but none of those worked from the windows command line. However downgrading did fix the incompatibility issue between the two versions.

I was able to find the older version following the instructions here: https://stackoverflow.com/a/23022718/1741542

The download link I used was:
http://dl-ssl.google.com/android/repository/platform-tools\_r20-windows.zip

Other platforms:
> 16 votes

# Answer
The other answers about the command arguments being quoted is accurate. I've found that if you escape the spaces between the arguments, it works.

Like this: `adb backup -apk\ -shared\ -all\ -system`
> 10 votes

# Answer
None of the workarounds worked for me here, and I don't want to downgrade my SDK tools. Here's what I came up with: skip `adb backup` on the computer and go straight to device via `adb shell`.

```
$adb version
Android Debug Bridge version 1.0.35
Revision fc2a139a55f5-android

$ adb shell
shell@jflte:/ $ bu 1 backup -apk app.package.name > /sdcard/backup.ab
shell@jflte:/ $ exit

$adb pull /sdcard/backup.ab
[100%] /sdcard/backup.ab

```

This calls `/system/bin/bu` and dumps the backup file onto STDOUT (File descriptor #1). Parameters are the same `adb backup <params>` -\> `bu 1 backup <params>`. The output is redirected to a file on the device and then can be pulled like any file.

The only drawback is that you can't do a full backup if your device is more than half full. This can be worked around if you have an external SdCard slot. `bu` can write there even on Android 4.4.2, because it is a system app. `/mnt/extSdCard/backup.ab` worked the same for me as `/sdcard`.
> 7 votes

# Answer
*sigh* I'm really sorry if this is the case, and you seem to be careful judging by your screenshots and command lines, but I discovered to my chagrin the same symptoms and thought I'd post just in case future discoverers make it here. It turns out that adb is *very* picky about single vs. double dashes in its options. For me, double dashes reproduced this case exactly: same prompt on the phone, same 0 byte file. Single dashes *even though there are long argument names* worked like a charm.

In case it matters, my phone is a Samsung Galazy Note 2 AT&T SGH-i317 running Android 5.1/Cyanogenmod 12.1.
> 4 votes

# Answer
You need to execute the adb backup command on adb version 1.0.31.

For windows i did:

Log:

$ adb backup -apk -obb -shared -all -system -f bckp.ab

adb server is out of date. killing...

* daemon started successfully *

Now unlock your device and confirm the backup operation.

...then set everything back to normal.
> 2 votes

# Answer
OK, this is how I fixed mine.

I tried Hunter Perrin's solution:

```
adb backup -apk\ -shared\ -all\ -system

```

But it just returned immediately with no error, no backup screen on the phone.

Through trial and error this worked for me:

```
adb backup -all\

```
> 1 votes

# Answer
I think I have a solution for those using 1.0.32:

**enter a password when prompted on the android screen**

Despite the fact that it says it will use the default password if you enter none, I believe it doesn't and adb 1.0.32 perhaps does not allow the creation of unencrypted backups.

Entering a password worked for me, then I ended up using "Android Backup Extractor" (Warning Sourceforge) and "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy" to extract it into a tar file.
> 1 votes

# Answer
I ran into the inverse problem: 1.0.31 with a newer phone (Android 7) fails too. 1.0.31 uses : as separator when passing arguments to the phone. As `adb logcat -s BackupManagerService` shows, the newer adb on the phone can't handle the old style either: `02-19 01:59:44.330 1100 9830 W BackupManagerService: Unknown package com.gameloft.android.ANMP.GloftPOHM:-apk, skipping` Fortunately, the newer adb accepts spaces as separator too, so enclosing the arguments within double quotes works, e.g.: `adb.exe backup "com.gameloft.android.ANMP.GloftPOHM -apk" -f game-backup.ab`
> 1 votes

# Answer
For me it was that the package name had been changed, so `adb backup` wasn't finding it and was creating an empty backup file, *without reporting any error*. `adb logcat` showed the error. Once I updated the package name, `adb backup` succeeded.

This was using ADB version 1.0.41, with a desktop backup password enabled.
> 1 votes

---
Tags: adb, 4.4-kitkat, backup, samsung-galaxy-s-4
---


# Question
Title: How to change the encryption key on (rooted) Android 9?
In Android 6, you could change the disk encryption key using the `vdc` command with

```
vdc cryptfs changepw NEWPW

```

In Android 9, you get a message, that raw commands are no longer supported.

During rooting and installing Lineage OS 16 and installing different stuff, I got different PIN and encryption keys. This means, that when I change the lockscreen PIN, the encryption key is no longer changed.

In principle, this is what I wanted to achieve, but the problem is that I currently do not know how to change the encryption key at all. I would like to have a rather short lockscreen pin and a longer encryption key, that I can change from time to time. On Android 6 this was no problem on the shell and with different Apps, but the Apps seem to depend on the vdc command as well.

I already tried to change the lockscreen PIN back to the current encryption password in the hope, that the next change of the PIN then would change the encryption as well, because I thought maybe the encryption was not changed because the new API needs a correct old password before changing the key to the new password. But this did not work as well.

Is there any App, command line tool or function in Lineage OS 16, that can change the encryption key?

# Answer
> 1 votes
I was able to set an encryption password again, be removing the lockscreen by removing some files related to the lockscreen and then setting a new passphrase. To use a different lockscreen password then, you need to restore the original files.

Source on XDA: https://forum.xda-developers.com/showpost.php?p=78699812&postcount=58

> As a workaround on Android Pie, you can do the following (on your own risk):
>
> 1. set the desired password for the screen lock
> 2. backup lockscreen files:
>     1. all files under /data/system\_de/0/spblob/
>     2. files containing "\_synthetic\_password\_" in /data/misc/keystore/user\_0/
>     3. /data/system/locksettings.db
> 3. set the desired password for the device encryption
> 4. restore / replace all lockscreen files
>
> If something went wrong, sqlite into /data/system/locksettings.db and set the values of sp-handle and lockscreen.password\_type to 0 to reset the screen lock.

Afterwards I enabled the lockscreen using the settings app and used the current boot password as password. When changing the lockscreen, the boot password was changed as well.

To have separate lockscreen and boot passwords again, you can either restore the previous files, or remove the new ones and set a fresh lockscreen password, that does not overwrite the encryption key.

# Answer
> 2 votes
I don't think is documented anywhere the syntax but looking at this code https://review.lineageos.org/c/LineageOS/android\_system\_vold/+/258179 I was able to set a different password. Initially I used a PIN for unlocking, so the command to run on a terminal on lineageos 17.1 as root is:

```
vdc cryptfs changepw TYPEOFNEWPASSWORD OLDPASSWORD NEWPASSWORD

```

Where type of password can be:

* password
* pin
* pattern

---
Tags: encryption, 9.0-pie
---


# Question
Title: How to set restricted user as default user on reboot?
We would like to have an already added restricted user account be the default when we restart our Samsung SM-T580 tablets.

At current we have 2 accounts installed, Admin and User The User is a user with restricted access.

The tablets are rooted

Hope that someone has a solution for our question

# Answer
> 3 votes
I am suggesting two solutions. Both of them require root access, and both were tested on a OnePlus 6 running Android 10.

# Solution #1

Have the following script (let's call it *switch-user.sh*) run during boot but after the user has entered device decryption credentials (PIN/password)

```
#!/system/bin/sh

while true; do
        flag=`/system/bin/getprop vold.fbe.decrypted`
        if [ $flag ]; then
                sleep 1;
                /system/bin/am switch-user USER_ID          # replace USER_ID term with restricted user's id
                exit;
        else
                sleep 1;
        fi
done

```

What this script does is to continuously check (with a delay of 1 second) whether the user has decrypted the device or not. If yes, switch to the restricted user after one second, or continue to recheck. Since my restricted user's User Id is `10`, I used 10 as `USER_ID` in it. Change it to whatever User Id your restricted user has. See my answer here if you need help in finding out the User Id.

**Note**: In the above script I am checking for the value of the property `vold.fbe.decrypted` which works for my OnePlus 6 running Android 10. Your device may or may not have the same property. You can hunt for the relevant property by looking into the output of the command `adb shell 'getprop | grep vold'`. Alternatively, see if `sys.user.0.ce_available` property is available in your Android version.

Next thing to do is to put that script into a location in your Android from where the system would execute it on its own during boot. Since I use Magisk, I placed that *switch-user.sh* script into the directory `/data/adb/service.d` (see Magisk's Boot Scripts section for further information on it) and **added executable permission to it** using the command:

```
adb shell su -c 'chmod +x /data/adb/service.d/switch-user.sh'

```

If you do not use Magisk, you can take the help from the answers at How can I run a script on boot?

Restart the device to see if your script works. In my case, whenever I enter my PIN to decrypt the device, than within two-three seconds the system automatically switches to my restricted user.

---

# Solution #2

If you don't want the hassle of injecting a script into boot process you can setup an automation app which would switch the Android to your restricted user once it receives BOOT\_COMPLETED broadcast, or in other words, do something during startup.

I can suggest Tasker and MacroDroid as I have tried them and they worked on Genymotion with Android 6.0 and on a OnePlus 6 with Android 10. You can try any app which can run a command/script on startup.

## Tasker

For Tasker, the profile and the task should be this:

**Profile**: *Event → Device Boot*

**Task**: *Code → Run Shell:*

* *Command*: `su 2000 -c am switch-user USER_ID`
* tick *Use Root*
* leave the rest of the settings untouched

Make sure to replace `USER_ID` there with the actual user id of the restricted user.

## MacroDroid

For MacroDroid, the Macro should be this:

**Trigger**: *Device Events → Device Boot*

**Action**: *Applications → Shell Script:*

* tick *Rooted*
* Enter the following command in "*Enter script*" field: `su 2000 -c am switch-user USER_ID`
* leave the rest of the settings untouched

Make sure to replace `USER_ID` there with the actual user id of the restricted user. See my answer here if you need help in finding out the User Id.

**Note:** because many apps would be competing to run their XYZ things during startup, you might notice a delay of a couple of seconds before user switching takes place.

# Answer
> 1 votes
I suggest to add an App that will start at every system start to switch to a secondary user. The method require a version of Android 10 minimum.

Let's suppose that the secondary user is not admin and it's the only secondary user.

## Source code:

**Manifest.xml**

```
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.switchuser">

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <receiver android:name="com.example.switchuser.BootReceiver"
            tools:ignore="Instantiatable"
            android:enabled="true"
            android:exported="true"
            android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
            <intent-filter>
                <category android:name="android.intent.category.DEFAULT" />
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.ACTION_BOOT_COMPLETED" />
                <action android:name="android.intent.action.REBOOT" />
                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
                <action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".AppAdminReceiver"
            android:permission="android.permission.BIND_DEVICE_ADMIN">
            <meta-data
                android:name="android.app.device_admin"
                android:resource="@xml/device_admin_receiver" />

            <intent-filter>
                <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
            </intent-filter>
        </receiver>
    </application>

</manifest>

```

**res/xml/device\_admin\_receiver.xml**

```
<?xml version="1.0" encoding="utf-8"?>
<device-admin xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-policies>
        <limit-password />
        <watch-login />
        <reset-password />
        <force-lock />
        <wipe-data />
        <expire-password />
        <encrypted-storage />
        <disable-camera />
        <disable-keyguard-features />
    </uses-policies>
</device-admin>

```

**MainActivity.java**

```
package com.example.switchuser;

import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.os.UserHandle;
import android.view.View;

import android.view.Menu;
import android.view.MenuItem;

import java.util.List;

public class MainActivity extends AppCompatActivity {
    public static final int RESULT_ENABLE = 11;
    private ComponentName compName;
    private DevicePolicyManager manager;
    @RequiresApi(api = Build.VERSION_CODES.P)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        FloatingActionButton fab = findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });

        compName = new ComponentName(this, AppAdminReceiver.class);

        Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
        intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, compName);
        intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, "Explain why we need this permission");
        startActivityForResult(intent, RESULT_ENABLE);

        manager = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);

        # Get list of secondary users
        List<UserHandle> listUsers = manager.getSecondaryUsers(compName);

        #Switch to the first secondary user in the list
        manager.switchUser(compName, listUsers.get(0));

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

```

**AppAdminReceiver.java**

```
package com.example.switchuser;

import android.app.admin.DeviceAdminReceiver;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;;
import android.widget.Toast;

import androidx.annotation.RequiresApi;

public class AppAdminReceiver extends DeviceAdminReceiver {

    private static final String TAG = "AppAdminReceiver";
    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    @Override
    public void onProfileProvisioningComplete(Context context, Intent intent) {
        // Enable the profile
        DevicePolicyManager manager =
                (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);

        ComponentName componentName = this.getComponentName(context);

        manager.setProfileName(componentName, "SwitchUser");

        manager.setLockTaskPackages(componentName, new String[]{"com.example.switchuser"});
    }

    /**
     * @return A newly instantiated {@link ComponentName} for this
     * DeviceAdminReceiver.
     */
    public static ComponentName getComponentName(Context context) {
        return new ComponentName(context.getApplicationContext(), AppAdminReceiver.class);
    }

    @Override
    public void onEnabled(Context context, Intent intent) {
        Toast.makeText(context, "Device Admin : enabled", Toast.LENGTH_SHORT).show();
    }

    @Override
    public void onDisabled(Context context, Intent intent) {
        Toast.makeText(context, "Device Admin : disabled", Toast.LENGTH_SHORT).show();
    }
}

```

**BootReceiver.java**

```
package com.example.switchuser;

import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.UserHandle;

import androidx.annotation.RequiresApi;

import java.util.List;

public class BootReceiver extends BroadcastReceiver {

    private static final String TAG = "Boot Receiver";
    private ComponentName compName;
    private DevicePolicyManager manager;

    @RequiresApi(api = Build.VERSION_CODES.P)
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent != null) {
            if (intent.getAction().equalsIgnoreCase(
                    Intent.ACTION_BOOT_COMPLETED)) {

                compName = new ComponentName(context, AppAdminReceiver.class);

                manager = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);

                List<UserHandle> listUsers = manager.getSecondaryUsers(compName);

                manager.switchUser(compName, listUsers.get(0));
            }
        }
    }
}

```

To enable the application as Device Owner in order have permissions to change the user, we need to use ADB:

```
adb root
adb shell dpm set-device-owner com.example.switchuser/.AppAdminReceiver

```

# User restriction

In order to harden the user you can:

1. Dump `/data/system/users/10.xml` where 10 is the id of the user. The file looks like this:

```
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<user id="10" serialNumber="10" flags="16" created="1598034338552" lastLoggedIn="1598035769294" lastLoggedInFingerprint="Android/sdk_phone_x86_64/generic_x86_64:10/QPP6.190730.005.B1/5775370:userdebug/test-keys" icon="/data/system/users/10/photo.png" profileBadge="0">
    <name>New user</name>
    <restrictions no_sms="true" no_outgoing_calls="true" />
</user>

```
2. Add more restrictions. The list of restrictions can be founded on UserManager Documentation
3. push the changes

```
adb push 10.xml /data/system/users/10.xml

```

# Reboot

Once the device start the application switch the user to the secondary user.

# Tests

The app was tested on AVD (Android Virtual Device)

Source code on github

---
Tags: reboot, restricted-profiles
---


title: Zoom app won't cast audio via Miracast

text:
# Question
Title: Zoom app won't cast audio via Miracast
I have a Huawei Mate 20 Lite that uses Miracast for screen mirroring. So far I've been successfully able to share Zoom video calls to my TV, but the audio stubbornly refuses to share to the TV.

I've also shared Facebook Live calls and casting Facebook Live will send both audio and video successfully.

Any idea on Android settings to check for?

# Answer
> 0 votes
This article https://support.google.com/chromecast/thread/41716778?hl=en may answer your question indirectly.

I have similar problem on TV Box. Skype works but Zoom has no audio. I have posted question in this forum.

I guess that one solution is to route the "call over internet" to HDMI. I am doing research on how to do it now.

---
Tags: audio, huawei, miracast, zoom-cloud-meetings
---


# Question
Title: Cannot install ip webcam app on Nexus 6p
I'm trying to re-purpose my Nexus 6p as a webcam. I wanted to install ip webcam on it, but the app store is is telling me that my device is not compatible. On the play store the ip webcam app listing states that Android 4.0 and up is the minimum required (https://play.google.com/store/apps/details?id=com.pas.webcam&hl=en). My Nexus 6p is running Android 8.1.0. It seems like it should be compatible and should be able to install ip webcam, but still it does not let me.

Any ideas why this might be and suggestions to try?

# Answer
One thing I forgot to mention was this phone was stuck in a drawer for over a year. Ended up I had to update all of the apps in the play store and I guess some system app was also updated along the way. after that it installed fine.
> 0 votes

---
Tags: 8.1-oreo, nexus-6p, webcam
---


# Question
Title: Why is the Android Go's performance better?
The Android Go's official site says faster launch time, extra space for media! Sounds good, but it's for an entry-level device, with 1GB RAM or less, why it still get better performance?

Wish someone can give more details to understand what's the reality of Android Go.

# Answer
**Android Go is an Android configuration specifically built for low RAM devices**.

As stated in the official Android Developer documentation, **it employs many optimizations mainly focused on memory management.**

Android Go has *a particular characteristic* of having `ro.config.low_ram` set to `true` on `build.prop` to indicate the low RAM configuration. Apps then can retrieve it by calling `ActivityManager.isLowRamDevice()`, while the system can directly call the hidden `ActivityManager.isLowRamDeviceStatic()` if they need to modify their behavior, mainly to *put some restrictions on features that are considered memory-intensive*.

Some system services may be disabled, such as (but not limited to):

According to the commit on Pixel Experience/AOSP.

and many other changes in the system's behavior (that can be browsed on the Android Code Search linked above, under the "Cross references" tab on the bottom).

To answer "why it gets better performance", while there are some optimizations done, **it also sacrifices features for performance**. This, together with Google's "Go" apps collection that is built specifically to reduce memory and space usage, makes the device runs better *compared to running the full-fledged Android*.

However, while Android Go also provides Play Store to install 3rd-party apps, note that *those apps may not have been optimized for low RAM configuration and might suffer performance worse than when running on mid-end/high-end devices* (this is more of an issue of hardware spec than Android Go though).
> 3 votes

---
Tags: android-go
---


# Question
Title: How to fix "Notification access is not available" on Android Go?
I have a TECNO Spark 2 running on Android 8.1 Oreo (**Go Edition**). Every time I try to install apps that require notification access, it says that the feature is not available.

How to fix it?

# Answer
> 2 votes
**Currently, the only known solution is to revert to the full-fledged Android (may need root access)**.

There have been many reports regarding the issue:

Due to the restriction that is put on Android Go, the notification access is disabled (for more information: Why is the Android Go's performance better?)

The only known solution is to revert to the full-fledged Android: Disable Android Go?

---
Tags: notifications, permissions, android-go
---


# Question
Title: is a way to disable auto connect to wifi that don't need password?
it is really annoying that my mobile phone will auto connect to wifi that don't need password such as those ones in shopping center, most of time they need you to fill up a form to register first before access granted, and I have to turn off wifi for this reason. Then when I go home, sometimes I forget to turn wifi back on and waste my moble plan data usage, is a way to fix this issue? I can't believe that Android doesn't have a mechanism to only connect to wifi you have previously provide password?

# Answer
You can use ADB to disable it:

```
adb shell settings put global wifi_scan_always_enabled 0
adb shell settings put global network_avoid_bad_wifi 1

```
> 0 votes

---
Tags: wi-fi, wifi-hotspot
---


# Question
Title: How to connect Bluetooth keyboard + bt mouse to Android smartphone to work in parallel?
re.: How to send carriage return + newline from Bluetooth keyboard connected to Android smartphone running shell emulator ?

followed answer links to similar questions like How to create a newline on keyboard

and

shift key + enter key pressed just moves cursor in terminal mode one space to the right

on another, mini bluetoth keyboard, entering Fn + Esc did the new line trick, only once

Shift+Space opens the locked phone and Enter pressed, opens Shell Terminal Emulator

but another Enter press does nothing

upper left "Esc+ Enter pressed, escape Terminal, so Enter button works fine (new keyboard)

Not sure if External Keyboard Helper Demo could help me to test keyboard layout .

# Answer
Problem solved. Another Shell Terminal application from Play store supports Enter key. Only keyboard by Logitech is supported since ASCII keys input mismatch for mini keyboard
> 0 votes

---
Tags: terminal, external-keyboard
---


# Question
Title: Could a Play Store family plan block apps abroad on my Google account
**Background:**

I have a problem with region-blocked apps.

After moving abroad I must download region-specific banking and eid apps and after changing my Play Store Region, paying methods, clearing cache, and memory I still can't access the applications I need.

Interestingly, when I log my old university e-mail on Play Store I can access all the apps I need even though this Google account has no Paying methods and not even a registered address.

**Question:**

Is the account I want to use having its access deferred because of a Google Music Family Plan subscription from the country I travelled from.

Even if I'm not the Family Plan manager could this payment block apps where I am now?

# Answer
> 2 votes
Apparently yes.

Google family subscription can cause your Play Store to not recognize a new area you are in. I suppose it has to do with certain group permissions such as sharing Play Store settings and app versions.

Anyway, after quiting the Google family group I was in, my Play Store showed the apps I needed.

---
Tags: applications, google-play-store, localization
---


# Question
Title: My android keeps telling me my lock password is wrong but it's correct
After rebooting my rooted, unencrypted, android phone, the lock screen keeps telling me my password is wrong. But I am very sure that the password is correct. Because I input this password once per day. I have adb debug enabled and I can connect this phone to computer, what can I do now? I don't want to reset my phone, that will lose my data. Thanks a lot.

PS: Another weird thing is even if it keeps telling me my password is wrong, after attempting this correct password many times (more than 30 times, I didn't count), there is no password failure attempts warning at all.

# Answer
I found a working method in XDA article 1 and XDA article 2. It's lucky that my android phone is rooted, so I can simply remove the key files and reboot :

```
adb devices
adb shell
su
rm /data/system/*.key
rm /data/system/locksettings.db
rm /data/system/locksettings.db-wal
rm /data/system/locksettings.db-shm

```

One more thing which bothered me is I have no ideas what the problem really is at the beginning. I did see some online questoins regarding the same issue such as link, but so far, no one can provide a logic explanation about this issue.
> 1 votes

---
Tags: security, lock-screens, locked-out
---


# Question
Title: device boots into recovery every time I reboot, probably because playing with a system app
Today I removed chrome browser that was a system app. At first unintentionally my hand tapped on "integrate updated system app into rom" (titanium backup app) and my immediate attempts to cancel it failed, and chrome icon changed to android robot. Then without any restart I uninstalled it using titanium backup, so that icon got disappeared.

I used my phone for a couple of hours until I attached it to the charger and turned it off. Now every time I reboot, it boots into recovery (twrp 3.0.2).

My phone is Sm-J510F with official android 7.1.1 and it's rooted.

Is there any hope I can boot into system without factory reset?

# Answer
> 0 votes
There can be several possibilities so let's check step by step

1. check whether your volume kye is not pressed ( what happens if your device has fallen down by the volume side there are chances that the volume button would have got pressed.

2.if the 1st is not your problem then try checking your Rom setting if your device is rooted. there are chances that while flashing custom rom your rom would have been not flashed properly so the device gets into a loop and is not able to load your rom.

3. if not rooted, then there are chances that the problem is with your rom.

**solution** Try hard resetting your device this may fix it. or reinstalling your device rom. some time while restoring the device can also cause this problem. so I would suggest checking your rom once. if still, the problem persists comment down will try some other fix. *wish you luck..*

---
Tags: samsung, recovery-mode, boot, titanium-backup
---


# Question
Title: What can I do to slow down battery degradation of portable power bank for my Android phone?
I just got Inland USB-A 5,200mAh Power Bank w/ LED Indicators for my android phone. It has a one-year warrantee, which seems to tell that its battery might degrade significantly after one year of uses.

The power bank came fully charged. I don't have a plan of using it sometime soon, except for something unexpectedly, and will just set it aside for weeks or even months. I was wondering how to slow down battery degradation as much as possible?

For example:

* In what percentage of charge shall I leave it, when I set it aside? Emptily, fully charged, or somewhere between?
* Does its battery degradation depend on how many times it has been discharged and then charged, and how often it has been ?

# Answer
> 1 votes
Power banks too have the same type of batteries as Android devices (Li-Ion or Li-Po) so the answers covering points you raised are :

> In what percentage of charge shall I leave it, when I set it aside? Emptily, fully charged, or somewhere between?

**40%** is the best for storage

Quoting from this answer

> > When the phone is marketed, manufacturers, typically charge the battery to around 40% as you may have noticed. This is good for battery longevity and ensures battery degradation does not occur on storage. See BU-702: How to Store Batteries for better understanding

> Does its battery degradation depend on how many times it has been discharged and then charged, and how often it has been ?

Quoting from this answer

> > **Yes**. The more you use the battery , more the number of discharge cycles ( which covers both charging and discharging as explained earlier) and drop in battery capacity... (see answer for graphs and picture)

Now, the unasked part, charging while in use, see this answer

> > charge when the battery drops to 50% and stop charging at 80 or 90%.

You may want to look at hardware solution for the last point.

---
Tags: battery, charging, battery-life
---


# Question
Title: Is it possible to add widgets available in home screen on lock screen (on rooted phone)?
I am using android 9 on Samsung device, is there is any way to add widgets available in home screen on lock screen (on rooted phone) and able to use them without opening lock screen ?

# Answer
> 1 votes
It is possible with and GravityBox module.

**Note:** Gravitybox doesn't go well with heavily modded UI like Samsung, Huawei etc. So check the XDA thread, for your device specific issues and fixes. It may or not work.

* Installation instructions for EdXposed (though it's for Android 10, it is applicable for Android 9 too as far as installation of EdXposed is concerned). Note that some Samsung, Huawei devices also have issues in installing EdXposed and you may need to try alternatives (YAHFA /Sandhook)
* Download & install GravityBox from XDA thread
* In the GravityBox menu Lockscreen (first menu option) →Shortcuts, select the apps you want displayed on lock screen
* Test by tapping the widget, opening the screen lock. Your application should be launched. Unlike Phone and Camera options that are usually found on lock screen and can be launched directly without unlocking device, you need to unlock device to access the app launch. If you want the behavior to mimic phone /camera, you will need to disable lock screen

---
Tags: applications, root-access, lock-screen-widgets
---


# Question
Title: Does Android update and Google services still work on Huawei P30 Pro?
It's one of the best smartphone in the market, with all the top specs, is it a bad time to buy it in 2020 given the fact of US Government bans?

I am concerned about Google services and future Android updates. Can anyone provide some insight on these matters?

# Answer
The situation is fluid and likely to change but, based on available information :

# It looks safe to buy

> Note that the P30 was announced **before** Huawei was put on the US trade blocklist (aka its 'entity list'), and therefore **continues to have full access to Google apps, services and security updates**.

> (entity list)... prevented Google from licensing Google Mobile Services (GMS) for new Huawei device models made available **after May 16, 2019**.

# Caveats

* From the same XDA blog

> As we explained last week Huawei **won’t** receive support from Google if any **changes** they make to their future software builds **break compatibility with Google apps**.

* **SafetyNet status-unknown**

> We reached out to Huawei, though, to clarify if the company can continue to implement GMS into software updates for its existing devices indefinitely without collaboration from Google, and also to find out if existing devices will continue to pass SafetyNet Attestation following an update

(Emphasis added in quotes)

I suggest you keep a track of the XDA blog which is frequently updated and take a decision, if these inputs don't suffice.
> 2 votes

---
Tags: updates, huawei, google-play-services
---


# Question
Title: How do I change default search provider in Firefox?
I have been using All the Internet on my computer and now I want to make it my main search provider in Firefox on my Galaxy S20.

Does anyone know how to change your main search provider so it would now be alltheinternet.com ? I would love to be able to have it on both my computer and on my phone.

# Answer
You can manually add a search provider to Firefox this way:

1. Open Firefox app
2. Click on the 3-dots-menu (in the new Firefox version in the lower right corner:

3. Select `Settings`
4. Select `Search`
5. Select `Add search engine`
6. Select the option `Other` and enter the following values:

* Name: `All the Internet` (adapt to your preferences)
* Search string: `https://www.alltheinternet.com/?q=%s`

7. Save the entered values using the check mark in the top right corner
8. Mark the entry "All the Internet" in he search engine list as default search engine.
> 1 votes

# Answer
You can configure a different/custom search engine as follows:

1. Open Firefox
2. Click on the 3-dots-symbol (top right corner)
3. Click "Settings"
4. Click "Search"
5. Select another search engine as standard (by just clicking on it) or add a custom one (which is the last possible action in the list of available options)
> 0 votes

---
Tags: samsung, firefox-for-android
---


# Question
Title: How can I get gmail notifications to start working on a Samsung Galaxy S10+?
Got a new samsung s10 plus phone and I dont see Gmail notifications. Notifications dont show up anywhere irrespective of being on wifi or phone data.

Things I have done so far :

* Battery optimisation turned off for Gmail
* Adaptive battery - cycled between all available modes.
* Notifications turned on for Gmail (Settings -\> Notifications)
* All gmail app notifications turned on within the app (Gmail -\> Settings -\> Notifications)
* "special access" \> optimize battery usage \> turn of the gmail app (which I believe is the battery optimisation option anyway)
* S10 settings \> Apps \> GMail \> Mobile Data and enabled "Allow background data usage" and "Allow app while data saver is on"

The phone has the latest software and is up to date. I have followed the discussions on the top 5 google results of "gmail notifications not working on S10 plus" and haven't been able to find a solution. I am hoping I can find some help here.

# Answer
> 1 votes
I had the same problem with my new s10, and the clear data didn't work.

I had to dig in the settings to find it out that when turning the power save mode, it disables the auto syncronization.

You can manually turn sync back in the setting menu when you swipe down from the top. and preserve the power save mode.

Such easy thing but it left me several days without notifications.

Hopefully helps, and saves someone else's time.

---
Tags: samsung, notifications, gmail, samsung-galaxy-s-10
---


# Question
Title: How to solve the audio problem in Zoom Cloud Meeting for Android TV
I have an audio problem running Zoom for Android on TV Box. Details below:

1. I have successfully installed Zoom for Android on a TV Box which is then connected to a Samsung QLED TV. I also attached a Logitech camera to the TV Box.
2. I joined a Zoom meeting hosted by another account. The video function works OK. The host can see my video and I can see the host video on TV.
3. However, the audio is not working. There is no audio from the TV speaker (I already selected "call over the Internet" on the TV Box app) and there is an error message flashing on the host screen "XXXX is connected to audio but cannot hear you". I then connected a Logitech headset to the TV Box. There is no audio on the headset either, but no error message this time.
4. I have verified that both the TV box and the headset works well on Skype. Without a headset, I can hear Skype callers on TV speakers. With a headset, I can speak on the microphone and the caller on the other side can hear me, and I can hear the other caller from the headphone.
5. The TV box is X96Q using Allwinner H313 chipset. The software version is Android 10.

Is there any workaround?

# Answer
> 0 votes
OK. I solved this problem by try and error myself.

In summary, you need a microphone present to enable Zoom audio communication.

I have tested 2 TV Boxes, one with Android 10, another with Android 8.0.1. The microphone I used is Logitech H310 headset with microphone.

The details are as following:

1. \[Edited on 8/27/2020\] There are 2 USB 2.0 ports on TV Box. One is Master, where you can plug USB headset and microphone into. The other is slave which is used for PC debugging and local upgrade. You cannot use the slave USB port for microphone. Unfortunately, there is no mark on the box, so you have to try it yourself.
2. Test the microphone is working on TV Box. I use Skype to test.
3. Open Zoom.
4. (For Android 8.0.1 only, it is strange) Click join meeting, scroll down to find "Do not connect to audio). It is unselected by default, click it to make it selected.
5. Join a meeting.
6. Click the participant, you should see yourself with a microphone icon. If you cannot see the microphone icon, you can unplug the usb microphone and plug it again.
7. Once you can see the microphone icon for yourself, click the "join audio" and click "call over Internet". Then you will see the "join audio" disappear and a microphone icon on the bottom left with "mute".
8. Now you will be able to hear the sound on your headset. And you can speak over the microphone.
9. (For Android 10, it is also strange) If you unplug and plug microphone after you already connected to Zoom by microphone. You can see a prompt saying "USB audio AV is plugged in..." and ask "Yes" or "No". If you click No this time, it will say "connect by default channel". Then you can hear the voice communication through both the TV speaker and the headset.
10. (For Android 8.0.1) I can hear the voice communication on headset, but I still cannot make the speaker to work.

I will mark this one as answer to myself.

---
Tags: audio, android-tv, video-calling, zoom-cloud-meetings
---


# Question
Title: Can contact information from my lock screen be available without a password on startup?
I just got a Samsung Galaxy S9 with Android 10. In my current configuration, I have observed this rough state machine as it starts up.

The `Settings > Lock screen > Contact information` is a great feature. However, I see no way to ever see that message in any of the grey states without the password. Is it possible to configure Android so that the contact information is accessible from any state, or at least from powered-off or out-of-battery, without disabling all security features?

# Answer
> 0 votes
The July 1, 2020 security update also adds the contact info in the state "Your phone is encryted . . . " Simply downloading and installing this 1GB update makes all of the state machine blue.

---
Tags: lock-screens, boot, samsung-galaxy-s-9
---


# Question
Title: Bluetooth consistently turning itself off
I'm having issue where my bluetooth will occasionally turn off. This is an issue because I have a smartwatch that connects with bluetooth.

My SO also has a smartwatch, but doesn't have this issue. I noticed in my battery usage that Bluetooth shows up as an entry in my phone, but does not on my SO.

When I tap on bluetooth, there is an option for 'Adjust Power Use'. It's apparently set to 'Turn off bluetooth when not in use.' I can tap on this option, but all it does it take my to the Bluetooth pairing screen, which doesn't seem to have any way to change the option. I also do not have battery saver mode on. There's a variety of things that are battery optimized, but my list of apps matches my SO's phone as well, so I don't think that's an issue either.

Clearly I don't want my bluetooth to turn off, otherwise it makes my watch kind of useless. Does anyone have any ideas on how to fix the issue?

# Answer
> 0 votes
So if you go into BATTERY\> : MENU\> BATTERY OPTIMIZATION\> and change "NOT OPTIMIZED" to "ALL APPS", you can then select each app or service you want "NOT OPTIMIZED". Try Bluetooth Midi and Bluetooth Sharing to set Not Optimized.

# Answer
> 0 votes
My phone had this problem, and I narrowed down the problem to be caused by the Fitbit app syncing to my Versa watch.

The "problem" was actually just a mis-configuration in Fitbit app related to the the bluetooth sync options.

---
Tags: bluetooth, nexus-6
---


# Question
Title: Does TWRP backup all apps and data, as opposed to ADB?
I need to backup every single user installed app, beyond system apps.

I have heard that `adb backup` will only backup some of these apps (the ones which allows it). Although, I'm not sure if this is the case with TWRP. **Is it?**

I want to make sure that when I restore, I won't have to download apps and configure them, again. **If TWRP can't achive this, what can I do, alternatively?**

---

Currently, I am running this command to backup with TWRP:

`adb backup -f data.ab --twrp compress data system`

**Do I need to include any other partition?**

# Answer
> 2 votes
The user @beeshyams, answered correctly, in the comments. However, this person did not want to answer, directly.

Here's the answer:

> ADB will not backup a lot of things.

> TWRP will backup all apps and data except `/data/media` unless you use this or Magisk module "TWRP helper".

> TWRP is far more reliable in backing up than using adb to backup.

> TWRP will also backup apps and their config. Have a look at our nandroid tag, it's questions and read the tag wiki.

> Back up all partitions. It's while restoring you may skip partitions depending on what you are trying to do.

> I wouldn't do ADB because: a) it won't backup everything; b) I don't know much about it; C) why bother when there is a proven solution in my view?

**UPDATES**

1. @alecxs says:

> It's better to keep one single partition per backup.ab file because some older TWRP have issues with restoring.

---
Tags: adb, backup, twrp
---


title: How to create a newline on keyboard

text:
# Question
Title: How to create a newline on keyboard
I would like to know how to create a newline on the current android keyboard (for example in a sms). And if it could be entered - would it be displayed?

**Edit:** If you've got Android 4.1.

It is just below the delete button.

**Edit2 :** For Android 2.X it still is the question, where to find it.

# Answer
> 17 votes
Simply press the `enter/return` button in your key board. It is located at the right botton corner of your keyboard.

In some cases, this button sends the SMS *(or submit applications, in cases of forms in websites)* If your device does that, simply hit enter/return button while holding the `shift button` or the `upside arrow`

Hope this helps.

# Answer
> 3 votes
I finally found a solution. So I was facing the problem in WhatsApp and my new line button was replaced by the enter key, so I went to the setting and I turned off the option " send messages with enter key" and voila, my new line button is here.

# Answer
> 0 votes
Press the shift key or the key to change letters from lovercase to uppercase and the Emoji button should change to a Return key.

# Answer
> 0 votes
My dear friends,

this is an old question but there is still no answer, since I have connected 2 bluetooth keyboards to my Android smartphone running Shell Terminal Emulator and none of the above, suggested solutions, entered a new line

I will try https://play.google.com/store/apps/details?id=com.apedroid.hwkeyboardhelperdemo since keyboard mappings can be edited and customized

My search for a ready solution, called: mapping MS Windows keyboard for use in Linux Shell failed to give results.

follow-up 1

I got it. Installed another Shell Emulator and Enter key started to work as Send + NewLine from bluetooth keyboard for iPad by Logitech, called Ultrathin Keyboard Cover.

Another, mini keyboard, supporting bluetooth, failed to work, mismatching the keys pressed vs. characters seen on display in Shell Terminal

---
Tags: keyboard, special-chars
---


# Question
Title: How to control the volume of an android device from a pc
I want to ask if there is a quick way to control my android devices volume from my pc. All solutions I find in Google are the otherway round. So does anybody has an idea?

Thank you in advance

# Answer
I am proud to announce that I have just published an application on Google Play Store and Github to address this exact problem.

It is (and will remain) free, without ads, and open source.

It will let you control the sound volume of your Android device remotely, easily, from any device that has a web browser (this includes PC or iPhone per example) and is connected to the same local network (Wifi).

You can get it :

on Google Play Store : Web Remote Volume Control

on GitHub : tanaka42/androidapp-webremotevolumecontrol

Some times ago, I did land on this stackexchange question when searching how to control volume remotely easily. I did try the Vysor+SliderWidget solution, it did work, but I was not happy with that. Moreover that solution did not include iPhone as the remote controller. So I have built this app for myself, but finally I have decided to make it public.

If it can be useful to even a single person, I will be very happy.

EDIT : my app now has more than 150 users located all around the world : I am very happy :D
> 9 votes

# Answer
You can try a remote control app that would allow you to control anything on your android phone from your computer. If you are okay with this approach you can try app called Vysor - Android control on PC.
> 1 votes

# Answer
I found a free workaround: on your android device where you want the volume to be changed, install tasker and pushbullet. Also install pushbullet on your device that you want to use as your remote (this can also be a computer or ios device). Simple configure pushbullet on both devices so you can push notifications to each other. Then open tasker and make a new profile \> event \> filter on 'push' \> 'receive a push' \> configuration \> filter on text: 1 \> new task \> media volume to 1. Repeat this for text: 2 \> media volume: 2 etc. Send 2 and tasker will set your media volume to 2. If testing its good to know that sometimes tasker needs a restart before changes are made. Let me know if this works for you.
> 1 votes

# Answer
I use an application called Vysor for this. Install it to your pc (allow USB debugging from your mobile phone) and you can control your phone from it as long as it is connected to your pc or mac.

You get 1 ad every half an hour but it is the best app that I have found so far.
> 0 votes

# Answer
The thing is: you'll need a desktop app that will communicate to your Android app via TCP/IP or Bluetooth (BluetoothAdapter) which will control the entire volume of the mobile.
> -1 votes

---
Tags: remote-control, volume
---


# Question
Title: How can I configure Telegram to open links using Opera Browser instead of Chrome?
My Android is v6, but answers for any other modern version are OK too.

# Answer
> 3 votes
Install Better open with, reset all defaults and use that to select the Telegram link to show an option to open with other browsers ( I don't have Opera installed but you can see other browsers in the screenshot below). You can set it by "always open with" or give you the choice to select (it has a timer option for selection)

click to enlarge

---
Tags: default-applications, telegram
---


# Question
Title: How to play one-channel audio in both headphones?
I would like to have exactly the opposite of this question, or this.

Some audio documentaries on youtube that I want to listen to with an old-style (wired, non-bluetooth) headset have only one channel audio. That is, I hear audio in just one ear.

Is there a way to hear the sound in both headphones while playing that? (That would improve the experience, the voices are not always clear, etc.) — I mean, maybe there is an app that has a setting for that.

## **NOTA BENE**:

I am referring to **wire** headphones here, **not** bluetooth. The device is Xiaomi A2 phone running Android 10.

---

EDIT after comments:

Opening the audio file in Audacity, I see this:

Although Mediainfo says 2 channels:

# Answer
> 1 votes
Two of the comments made by @AndrewT have suggested to me the good solution:

> true mono audio shouldn't be a problem when played on stereo speaker (it will play the same waveform on both left & right channel)

and

> the audio source is actually stereo, but the audio is only recorded on 1 channel

As the youtube audio in question is not a mono but a stereo with just one channel (Audacity was right, Mediainfo was wrong), a solution is exactly the one that initially seemed to me the opposite of what I wanted: ***rendering the file as mono — and thus, playing it through both headphones***.

This solution works on Android 10, the setting is under Accessibility, *Audio& on-screen text*.

---
Tags: audio, headphones, headset
---


title: Safe to share boot partition?

text:
# Question
Title: Safe to share boot partition?
On XDA, at times I see users requesting for boot partitions of a particular version of stock ROM and some people helping out by uploading and linking them.

I am not sure if it is a good practice, mainly because

a) it may contain sensitive information

b) it may create problems for the recipient, if they use it as John Wu creator of Magisk mentioned in the context of patching boot images

I searched around for answers, but no luck. To localize the problem consider that the question relates to devices with A/B Partitions, while a broader answer is welcome

# Answer
the tweet doesn't explain the reason but it is unrelated to security. it is not 'safe' to patch a foreign boot.img regarding the functionality of Magisk because of the following reason:

Magisk Manager assumes

* cpu architecture
* encryption type
* encryption state
* dm-verity

read from host device is equal target device, it does the patches according to host specifications (where Magisk Manager is currently running, regardless of the origin of boot.img

while this is bad practise, i want to contradict because it will cause issues only in rare corner cases and is (most likely) 'safe' to patch a foreign boot.img
> 1 votes

---
Tags: security, boot, partitions
---


title: Installing magisk with Android 11

text:
# Question
Title: Installing magisk with Android 11
Is there a problem with, or something missing from, the steps at this guide for installing Magisk on Android 11?

Specifically, in step 13, it says to flash the patched boot image (patched by Magisk Manager) to the phone, with

```
fastboot flash boot patched_magisk.img

```

followed by

```
fastboot reboot

```

And then to verify root in step 14 by checking in the Magisk Manager app. But doesn't step 13 reset the phone, so the installed apps like Magisk Manager are also gone?

# Answer
> 3 votes
Certainly not. It's safe

All that you are doing in this step is to

* Check if your device is recognized in fastboot mode by `fastboot devices`
* Replace the boot image by the patched boot image on your computer by `fastboot flash boot xxx.img`.
* `fastboot reboot` will boot you into OS where you can verify root as next step recommends.

This the normal way of rooting using patched images and will not affect your installed apps. See Magisk official documentation

---
Tags: magisk, android-11
---


# Question
Title: How to switch(not only on or off) the mobile data and wifi using adb?
First main question:

is it possible to switch(not only on or off) the state of the mobile data and wifi using adb? (for example for wifi: if you don't know the state of the wifi now. you send several commands and then you are sure that the wifi state changed.) if this is not possible then the question is how to find out the state of wifi and mobile data using adb?

second:

is it possible to switch the state of the wifi-hotspot and the usb-modem via abd?

**what can I do:**

I'm use

```
adb shell svc data enable/disable
adb shell svc wifi enable/disable

```

To turn on/of wifi and mobile data. But I don't know a way to switch the state with one command like "adb shell svc data toggle". Maybe there is a command that returns the state of the Wi-Fi or mobile data? Like `adb shell svc data state`. and it returns "on" or "off". is there a way to switch it when the phone is locked?

I also use such commands to switch the wifi-hotspot and usb-modem (unlike first two commands above the screen may be off, but the phone must be unlocked):

```
adb shell am start -n com.android.settings/.TetherSettings
adb shell input keyevent 20
adb shell input keyevent 20
adb shell input keyevent 20
adb shell input keyevent 66

```

first line opens the settings page. keyevent 20 - simulates key press `down`, keyevent 66 - `enter`. it's for usb-modem. for wifi-hotspot i use same first line,key20 key66 key20 key66.

i have samsung a50(android 10) and ubuntu 20. the modem state switching bash script is located at /usr/local/bin so I can run it from the console just by writing the filename.

# Answer
> 7 votes
**get state:**

```
adb shell settings get global airplane_mode_on
# 0|1 -  dis/en abled

adb shell settings get global mobile_data
# 0|1 - dis/en abled

adb shell settings get global wifi_on
# 0|1 - dis/en abled

adb shell settings get global bluetooth_on
# 2|1 - dis/en abled

adb shell settings get global cell_on
# 2|1 - dis/en abled

```

**change state:**

```
airplane
  enable
    adb shell settings put global airplane_mode_on 1
    adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
  disable
    adb shell settings put global airplane_mode_on 0
    adb shell am broadcast -a android.intent.action.AIRPLANE_MODE

mobile data
    adb shell svc data enable
    adb shell svc data disable

wifi
    adb shell svc wifi enable
    adb shell svc wifi disable

bluetooth
  eanable
    adb shell settings put global bluetooth_disabled_profiles 1
  disable
    adb shell settings put global bluetooth_disabled_profiles 0

```

**to toggle** use bash script that checks state and then switch on/off like:

```
#!/bin/bash
function toggle_data {
    if [[ $(adb shell settings get global mobile_data) == "1" ]]; then
        adb shell svc data disable
    else
        adb shell svc data enable; fi
}
function toggle_wifi {
    if [[ $(adb shell settings get global wifi_on) == "1" ]]; then
        adb shell svc wifi disable
    else
        adb shell svc wifi enable; fi
}
toggle_wifi
toggle_data
exit 0;

```

# Answer
> 3 votes
By knowing the *state* I suppose you meant whether at X point of time the Wi-Fi or mobile data is enabled or disabled. This information can be obtained from the dump of *connectivity* service.

Run this command to get the status of mobile data and Wi-Fi:

```
adb shell dumpsys connectivity | sed -e '/[0-9] NetworkAgentInfo.*CONNECTED/p' -e '/Tether state:/,/Hardware offload:/p' -n

```

Example output:

```
  1 NetworkAgentInfo [**WIFI** () - 178] CONNECTED/CONNECTED
  5 NetworkAgentInfo [**MOBILE** (LTE) - 191] CONNECTED/CONNECTED
Tether state:
  **rndis**0 - **TetheredState** - lastError = 0
  **wlan**0 - AvailableState - lastError = 0
  Upstream wanted: true
  Current upstream interface(s): [rmnet_data1]
Hardware offload:

```

Here:

* **WIFI** means device is connected to a Wi-FI
* **MOBILE** means mobile data is enabled
* **rndis** is interface name of USB tethering
* **wlan** is interface name of Wi-Fi hotspot
* **TetheredState** means tethering for the respective interface is enabled

In your output:

* if **WIFI** term with *CONNECTED* status is missing, than device is not connected to a Wi-FI
* if **MOBILE** term with *CONNECTED* status is missing, than mobile device is disabled
* if **TetheredState** is shown for rndis or wlan or both, than respectively, it means USB tethering and Wi-Fi hotspot is/are enabled.

---

To **check whether Wi-Fi radio is enabled or disabled**, run this command:

```
adb shell dumpsys wifi | sed -n 1p

```

Example output if Wi-Fi is enabled:

```
Wi-Fi is **enabled**

```

`enabled` would shows as `disabled` if Wi-Fi radio is disabled.

---

Similarly, to **check if cellular radio has telecom network access**, or if it is disabled, run this command:

```
adb shell dumpsys telephony.registry | grep mServiceState | grep -o "mDataRegState=[()0-9A-Z_]*"

```

Example output:

```
mDataRegState=0(**IN_SERVICE**)
mDataRegState=0(**IN_SERVICE**)

```

Here:

* **IN\_SERVICE** means your cellular radio or radios (if multiple SIM cards are supported) is connected to a network.
* **OUT\_OF\_SERVICE** would mean not connected to telecom's network
* **POWER\_OFF** would mean device is in Airplane mode.

---

Combining all these information would help your fully ascertain:

* the state of Wi-Fi radio and its connectivity
* the state of cellular radio and its internet connectivity
* the state of USB and Wi-Fi tethering

---

Now, you already know how to enable/disable mobile data, USB tethering, and Wi-Fi using *svc* utility. While I don't know how to *easily* turn on hotspot, disabling the hotspot is pretty easy. First, enable the Wi-Fi using svc, and then disable it with svc too.

The aforesaid two commands should be sufficient to ascertain the connected status of mobile data, Wi-Fi, Wi-Fi hotspot, and USB tethering.

**Note:** this solution was tested on a OnePlus 6 running Android 10.

# Answer
> 2 votes
Mobile data:

```
adb shell settings get global mobile_data
adb shell settings get global mobile_data_always_on

```

Wifi:

```
adb shell settings get global wifi_on

```

Airplane mode:

```
adb shell settings get global airplane_mode_on

```

---
Tags: wi-fi, adb, mobile-data, wifi-hotspot, usb-modem
---


# Question
Title: I can't access my phone after a factory reset, because the Gboard doesn't work!
After doing a factory reset on my Huawei p9 lite because it was missing a lot of features like the calculator, alarm, notes and even Bluetooth. After it asks me to log in my linked google account, I can't type my email because the Gboard doesn't work, it shows up the microphone and it doesn't even want to listen to my voice!

# Answer
install latest platform-tools
download service ROM according to your phone model
connect usb-cable and enter fastboot mode (Vol Dn + Power)
install usb-drivers
flash the common partitions only

```
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash cust cust.img
fastboot flash vendor vendor.img
fastboot flash product product.img
fastboot flash version version.img
fastboot format:ext4 cache
fastboot format:ext4 userdata

```
> 1 votes

---
Tags: recovery-mode, google
---


# Question
Title: WhatsApp showing different value for used storage on app info and in-app settings
In my Samsung Galaxy S9, WhatsApp is showing that it uses 37.89GB of internal storage when I checked the app info.

Due to that, my phone's data is getting full and all the other apps are getting hung due to less storage space left in my mobile phone.

When I checked the WhatsApp 'Settings' -\> 'Data and storage usage' it shows only 195.1MB of data has been stored for WhatsApp.

From where the 37.89GB of data is being shown in the app info on my phone?

**Please note:** I don't want to delete my WhatsApp and reinstall it to fix this issue because I don't want to lose my WhatsApp messages, and I can't take the backup also because there is no more space left on my mobile to take the backup.

# Answer
The storage usage which you saw in the device settings page (App info), includes cached data too. Click on the **Storage** in the **App info** page of WhatsApp. There you will find a **Clear cache** button. Click on that.

**Side note:** WhatsApp's data storage information only shows the storage usage by multimedia and messages. Besides those things, WhatsApp also stores its settings, multimedia that you have shared with others, and downloaded statuses. So, you cannot rely much on the information which is shown as **Storage usage** in WhatsApp. If you want to know more about the real storage usage, open up a file manager and browse the **WhatsApp** folder inside the primary storage. See these screenshots and note the differences (114 MB vs 12 MB):
> 0 votes

---
Tags: whatsapp-messenger, internal-storage, storage, insufficient-memory
---


# Question
Title: Keep phone screen lock unlocked until lock it manually
The Lock Screen uses two timers. The first timer is the "Sleep" timer which turns off the device display to extend battery life.

The second timer called the "Automatic lock" timer turns on security features like pin, pattern, password or face unlock and protects the device from unknown users.

screenshot (click image for larger variant)

So I want that,

1. My phone do not get locked when the screen go off until I lock it manually( i.e. by power key). By default 30min is the max. time when the screen get off but the phone do not get locked on lock screen.
2. How to manually turn off screen without locking the phone (because if i use power key i will need to enter pin or password).(second one is not so important I just to know is there is a way instead of just relying on screen timeout)

**Note:** Device is Samsung j7 nxt, Android 9.0 rooted and Magisk and Edxposed Manager installed.

My device do not support face unlock and fingerprint unlock. I use shared wifi, so that cannot be used for smart lock. I do not have Wi-Fi at home I use phone data and there is some issue with my Bluetooth Unable to connect my bluetooth to pc or otherphone.

The only way to achieve this thing is through increasing time in lock automatically.

# Answer
> 2 votes
Difficult part of this situation is that OP doesn't have access to conventional smart unlock methods like Faceunlock, Wifi, Bluetooth, Location fence. So the solution has to depend on using system (OS) properties. That brings a **caveat**, it may *not* run on all devices. It runs fine on my OnePlus 7,with Oxygen OS, Android 10.

* I prefer using MacroDroid for automation , since it is *free* (upto 5 macros) and easy to learn. To understand how MacroDroid works, see answer here (Not affiliated to any app). Credits to this solution go to user pr3jker who uploaded his template in two macros (accessible from the templates section of app). This is a no-frill, bare bone macro improvised from those and can be improved upon to meet specific needs. The good part is this meets *both requirements* asked by OP. You need two macros.
* First Macro (unlock w/o PIN)
* **Triggers:**

1. Screen Off
2. Empty Trigger

* **Action**

System Setting → Secure → Setting Key, enter `lock_screen_lock_after_timeout` (copy paste sometimes adds invisible characters, so key it in) → Value enter 86400 (or 86400000 on Android 10 as it uses mlliseconds iso. seconds) make sure it is integer selected → OK and name, save the macro

**Logic:** When the screen goes off (depending on the sleep time you set in your device) or when called by another macro (empty trigger) the actual lock screen period is extended to 24 hours (86400 seconds). Effectively, you are setting sleep time to 24 hours, irrespective of the system sleep time setting (Your screen will go off as per the system sleep time but actually it is 24 hours) . So, when you press the `power` key to unlock, it does so *without* needing to enter PIN.

To test, set system sleep time to 15 seconds, let the screen fade and go off, unlock device by `power` key press (**Don't** lock device by `power` key, let the screen go off)

* Second Macro (to toggle the first macro)
* **Trigger:** Empty Trigger
* **Action** Enable /Disable Macro → from the drop down menu choose the first macro → Toggle Macro → OK, name and save the macro

Go to the widgets section of your launcher, locate MacroDroid shortcut widget and drop it on home screen and assign the second macro to it.

When you click the widget, the first macro is disabled and on next click it is enabled. You can add corresponding text warnings or audio feed back on toggling, since disabling Key guard (PIN) is a security risk and you agree that you are consciously doing it. For example, another action can be added in the second macro, lF Macro enabled (first one) pop up message and audio warning so that you are aware of zero Key guard security.

**Note:** Disabling the macro only ensures that it is not triggered again but the previous values will hold - for example, if you set it for 24 hours and disable it after 2 hours, the behavior will persist for another 22 hours. So, either set the time period short or see the template macro for remedy. Like I said, it's a bare bone macro in the answer.

---

Since you have EdXposed installed, you may want to install Xposed edge module and map gestures to the second macro (choose shortcut and then MacroDroid shortcut as action). This is what I did since I am mostly at home and don't really need to lock my device and with a gesture enable key guard when stepping out.

---
Tags: root-access, lock-screens, 9.0-pie
---


# Question
Title: Can i run GTA Vice City on Android-x86 PC?
Recently i have installed Android-x86 on my Lenovo laptop and i want to install and play GTA vice city there. My OS in android 4.4.2. 4 GB ram and 3 GB swap memory 2.4 Ghz quadcore intel i3 processor and nvidia 1 GB video card

# Answer
> 1 votes
Depends. It may have some graphical issues considering drivers and probably a few other compatibility problems. The most major spike is the drivers here. If they work and are compatible with game, your game will run. Else it wont (I suspect graphical glitches). Honestly, its almost impossible to judge like that with just that much information provided so that leaves you with only ability to try it and see if it works.

But that aside, how do you plan on playing it? Even if you have/had touch screen I can barely imagine how its possible to play it.

Bottomline-\> You can test it. Although I do have doubts in mind that you will be able to play it (not only due to hardware and drivers, but also due to control mechanics).

# Answer
> 1 votes
I can't tell for sure since the official compatible devices is so limited

> **Phones** : Motorola Atrix, Motorola Atrix HD, Motorola Atrix 4G, Motorola Photon, HTC Rezound, HTC One X, HTC One X+, Samsung Galaxy Nexus, Samsung Galaxy Note, Samsung Galaxy Note 2, Samsung Galaxy R, Samsung Epic 4G, Samsung Galaxy S2, Samsung Galaxy S3, Google Nexus 4, Sony Xperia Play, Sony Xperia Sola, Sony Xperia S / P / T & TL, Sony Walkman Z Series Media Player
>
> **tablettes** : Acer Iconia, Asus Eee Pad Transformer Prime, Asus Transformer Pad TF300T, Asus Transformer Pad Infinity 700, Motorola Xoom, Samsung Galaxy Tab 7.0 / 7.7 / 8.9 & 10.1, Samsung Galaxy Note 10.1, Sony Tablet S, Sony Tablet P, Sony Xperia Tablet S, Toshiba Thrive, Toshiba Regza, Google Nexus 7, Google Nexus 10, Fujitsu Stylistic 10.1

Source

but if you enter the play store from your laptop (under the android x86 OS) and you can find and install the GTA vice city app it should work just fine if not you can ask for a refund.

# Answer
> 0 votes
Most of the games as you said Temple Run which did not run in your case so as with my prime os when I downloaded it from play store is designed for ARM processor, whereas our PCs have x86 processor{ so is the name android x86}. Just go to apkdl.in and search the game you can change the type to x86 there or just search it typing x86 in the google. Hope u'll find it.

---
Tags: android-x86
---


# Question
Title: How to disable the developer option in Chrome for Android?
I have enabled developer options accidentally by clicking on **Settings \> About Chrome \> Application Version** 7 times.

I didn't find any option to disable this developer options. How to disable this?

# Answer
> 3 votes
The flag to show Developer options is stored on Chrome's shared preferences under the `developer` key, which can only be accessed with root access.

As shown on the source code:

1. AboutChromeSettings: tapping the Application Version 7 times calls `DeveloperSettings.setDeveloperSettingsEnabled()`
2. DeveloperSettings: writes the boolean value `true` to `ChromePreferenceKeys.SETTINGS_DEVELOPER_ENABLED`
3. ChromePreferenceKeys: `SETTINGS_DEVELOPER_ENABLED` refers to the `developer` key in the shared preferences

To reset the flag:

* **With root access**

Users can overwrite the value on the shared preferences directly

1. Browse to `/data/data/com.android.chrome/shared_prefs/`
    2. Open `com.android.chrome_preferences.xml`
    3. Search the line `<boolean name="developer" value="true" />`
    4. Change the value to `"false"`
    5. Save the change
* **Without root access**

Users can only use Android Settings' "Clear data" to reset the flag. **Note that this will also reset all Chrome's settings**.

---
Tags: chrome-for-android, developer-options
---


# Question
Title: USB Drivers for Dragon Touch E70 (or how to install an APK from PC on this device?)
I purchased a Dragon Touch E70 tablet from Tablet Express. I am developing an app, but I cannot get Eclipse to detect the device. I can't find where to download drivers for this device either. Any ideas, or other ways to get the app on my tablet for testing?

# Answer
I had a similar issue using a DragonTouch K10 and found this question - The issue I discovered I was having was that I needed to enable developer tools on the device. I went to Settings\>System\>About Tablet, then tapped the Build number 7 times to turn them on. Then my SDK was able to detect it with the drivers I had installed.
> 0 votes

---
Tags: installation, tablet, apk, usb-drivers
---


# Question
Title: Is there a way to write/ run custom scripts in the background on my phone?
What I have in mind is pretty simple. I want to write a small script for simple file managing, and I would like for it to be run automatically like once a day. I have some coding experience under my belt so the actual implementation won't really be a problem. What I'm actually confused about is if the Android platform has any features that would make executing the routines viable.

The bulk of the coding I do day-to-day is Python, but I could get used to Java or Kotlin's syntax in a couple days if necessary, and from there its just really simple logic. Considering that Android is really just Linux at the core, I imagine it would be possible to have it run a couple lines of code automatically everyday at a set time, as I have done on my linux machine a couple of times.

I'm pretty much a complete newbie when it comes to fiddling with Android's workings, so if anyone has done anything like what I'm attempting or knows about relevant documentation, some guidance would be much appreciated.

# Answer
**No**

On a non-rooted device, files are generally considered private to apps (think each app as a userid and you don't have sudo). Apps and their data are meant to be isolated from each other in the increasingly privacy focused mobile world.

As you have programming experience, here is the Android Developer documentation on data storage and you will note the different types such as media and "documents" using the Storage Access Framework. Add on Adoptable Storage for SD cards and you get experienced non-Android developers asking questions like What's the current status of Internal vs External vs Removable vs Adoptable Storage on Android?. Regardless, if your "predetermined folder" is a system one, without root you won't have access either.

The above SO question link to blog posts by Commonsware regarding the Android storage situation: internal storage, external storage, and removable storage as viewed from a developer perspective. Writing an app to interact with all of these storage types would be off-topic here in Android Enthusiasts but reading them gives context on how not like command line/shell Linux that Android has been and is becoming.
> 0 votes

---
Tags: automation, scripts
---


# Question
Title: How can I configure Android so that all Internet traffic goes through a VPN and is blocked if the VPN isn't activated, without rooting Android?
How can I configure Android so that all Internet traffic goes through a VPN and is blocked if the VPN isn't activated, without rooting Android?

# Answer
> 1 votes
This is Always-on VPN, which is a stock feature since Android 7 (root not needed). You will see the "Always-on" & “Block connections without VPN", options in VPN settings.

If you are looking to have this feature on pre-Andoid 7 devices, you need to look for VPN apps that offer this. For example, this app offers this feature by name of "Kill Switch"

---

On Android 10 with AnyConnect VPN: Settings → Connections → More connection settings → Select the VPN client → Enable "Always-on VPN" and "Block connections without VPN":

---
Tags: security, privacy, internet, vpn, android-10
---


title: Use GCC compiler in Termux?

text:
# Question
Title: Use GCC compiler in Termux?
I don't like the default C compiler `clang` provided by Termux. Is there a way I can get GNU GCC in my Termux environment?

# Answer
Another way to get gcc would be to add the community repo hosted by its-pointless at https://github.com/its-pointless/its-pointless.github.io. Sources are (more or less) available at https://github.com/its-pointless/gcc\_termux.

Other popular packages available includes numpy and scipy.

More information about this and other community repositories can be found in the termux wiki.

To add this particular repository to your termux environment, run:

```
# Get some needed tools. coreutils for mkdir command, gnugp for the signing key, and apt-transport-https to actually connect to the repo
apt-get update
apt-get  --assume-yes upgrade
apt-get  --assume-yes install coreutils gnupg2 apt-transport-https wget
# Make the sources.list.d directory
mkdir $PREFIX/etc/apt/sources.list.d
# Write the needed source file - Added Missing "> character on line below
echo "deb [trusted=yes] https://its-pointless.github.io/files/ termux extras" > $PREFIX/etc/apt/sources.list.d/pointless.list
# Download signing key from https://its-pointless.github.io/pointless.gpg
wget https://its-pointless.github.io/pointless.gpg
apt-key add pointless.gpg
# Update apt
apt update

```

(instructions taken from https://github.com/its-pointless/its-pointless.github.io/blob/master/setup-pointless-repo.sh)
> 7 votes

# Answer
This is a very interesting solution.

First download GCC for C4droid from Google Play.

Go find its apk under `/data/app/com.n0n3m4.gcc4droid-#`, take the APK and extract `/assets/gcc.zip`. Now extract `gcc.zip` to

```
/data/data/com.termux/files/usr/libexec

```

Apply `chmod -R 644` to the whole folder and `chmod -R 755` to `ARCH/bin`, `bin` and `libexec`. Link gcc programs to `$PREFIX/bin` and you'll be able to use GCC instead of Clang. Remember to add `-pie` when compiling executables.
> 4 votes

# Answer
Install Arch Linux in Termux PRoot to get a full Linux development environment. See https://sdrausty.github.io/TermuxArch/docs/install for installation instructions. Use `pacman -S base base-devel` to install the developer's environment which includes GCC.
> 1 votes

# Answer
I created termux repo with gcc 10.2.0, there how to install https://cctools.info/index.php/Termux\_repository\_with\_cctools\_packages\_(gcc\_with\_fortran\_support\_etc)

Add cctools packages public key:

```
wget -O - https://cctools.info/public.key | apt-key add -

```

Create a new repository list:

```
echo "deb https://cctools.info termux cctools" > $PREFIX/etc/apt/sources.list.d/cctools.list

```

Update packages lists:

```
apt update

```

Install the package gcc-cctools(it will install binutils-cctools automatically):

```
apt install gcc-cctools

```

Install the NDK package for your android architecture, use the latest one, for example for aarch64:

```
apt install ndk-sysroot-cctools-api-26-aarch64

```

To show all ndk sysroots for aarch64:

```
apt search ndk-sysroot-cctools | grep aarch64

```

Add directory with new compilers to PATH:

```
export PATH=$PREFIX/../cctools-toolchain/bin:$PATH

```

Check it:

```
gcc -v

```
> 1 votes

---
Tags: termux
---


# Question
Title: How can I auto rotate in Samsung Galaxy?
Coming from a Huawei P9 Lite, I recently moved to a Samsung Galaxy A30s.

While on my other phone it had an Auto rotate icon, I can't find one at the moment.

I've gone to Settings and searched for the term "rotate" but no results were found.

So, when I'm on a webpage

And rotate it, notice that it appears a new icon in the bottom right

And I need to click in it to actually rotate

During the first days, this was kind of ok, but now I'm tired of having to click always in that icon and waiting for it to appear (sometimes even requiring to do the rotation movement multiple times).

# Answer
Where it says "Portrait", clicking in it changes to "Auto rotate"

and then auto-rotation gets active.

Notice that if the phone is rotated using the method mentioned in the question, then one won't see "Portrait" but "Landscape"
> 0 votes

---
Tags: samsung, auto-rotation
---


# Question
Title: How to hide WhatsApp messages notifications
How can I hide WhatsApp messages in notification panel? I don't want to see incoming message preview on my notification panel.

What utility can let me do this?

# Answer
> 1 votes
Go to settings \> Apps \> Whatsapp And Uncheck 'show notifications'.

# Answer
> 0 votes
Hiding Whatsapp messages of targeted contacts is not possible, but if you want to you can hide all incoming message on Whatsapp and activate them again if you have some private time for yourself. Just download Mobiwol and block Whatsapp on it. Messages for you will not be delivered, but you can open Whatsapp. If you have the phone to yourself just unblock Whatsapp and you will receive all messages sent to you in the meantime. I hope this was helpful.

# Answer
> 0 votes
I hope the following image helps you ... once u get to the settings, click notification then u should see this:

# Answer
> -1 votes
If you go to *Settings › Sounds & Notifications › Application Notifications,* you can define which apps are permitted to send notifications to your notification area. Look for the *WhatsApp* entry there, and turn it off – and you should be rid of WA notifications, while all others continue to work as intended.

---
Tags: 4.4-kitkat, whatsapp-messenger, notification-bar
---


# Question
Title: How do you set your Android smartphone not to switch to the web browser app each time you click on a link?
I'm using Firefox in my android smartphone instead of Chrome (Chrome app is not installed), but I think that it applies the same anyways. In the past when I clicked on a link (from emails, or other apps, etc.), I got a message that said that a new tab was opened in Firefox but the system didn't switch automatically to the Firefox app. I continue clicking on links and then when I was done and I opened Firefox and all the tabs were opened for me. Recently Firefox for android was updated and after the update when I click on a link the system automatically switch to Firefox. How can I set back the system so it doesn't switch to the web browser app each time I click on a link?

Regards.

# Answer
The tab queue is sadly gone from the new Firefox. There is a feature request here but it's ignored: https://github.com/mozilla-mobile/fenix/issues/470#issue-409774110

You can uninstall the new Firefox and then install the old version's apk from here: https://www.apkmirror.com/apk/mozilla/firefox/firefox-68-11-0-release/
> 1 votes

---
Tags: applications, firefox-for-android, hyperlinks
---


# Question
Title: Add a built-in app to Fire Kids profile?
I have a bunch of Fire tablets for my kids and we are using the FreeTime locked profiles for them. I can download 3rd-party apps and then share them on my kids profiles. But I can't do this with the built-in apps, like Clock. Do you know how I can do this?

I've chatted with Amazon support and they were no help. Here are the Amazon instructions for more details on how this works for 3rd-party apps: https://www.amazon.com/gp/help/customer/display.html?nodeId=202119930

# Answer
At least as a substitute for the Clock app, this app seems to be good, allowing multiple alarms. Plus it is Fire compatible and free: https://www.amazon.com/MacroPinch-Alarm-Clock/dp/B00EPG51Z4
> 0 votes

---
Tags: amazon-kindle-fire, amazon-appstore, amazon-kindle-fire-hd
---


# Question
Title: google pixel 2 phone rear camera not working suddenly
i am using **google-pixel 2** phone since 2017. phone not able to start camera app and app getting crashed when i tried to open rear camera . **front camera is working fine** .i contacted google support team they said that try to clear app cache and data. i cleared camera app cache,data but no luck. how do i get my phone rear camera to working condition ? pleas help me out to get it working. thanks

# Answer
> 0 votes
> Before downgrade to the stable version of android you've to keepfew things in mind.
>
> * **You've to backup your data *(because flashing erase your data permanently)***
> * **You've to download the stable image file of your device**
> * **You've to download Android SDK Tools *(don't have to download Android Studio, Command Line Tools will be enough to get your jobs done)***

Now the process of flashing into stable version will take some time and follow the rules below.

**1. Turn your developers mode on (by clicking the phone's build number multiple tiles). 2. Enable USB debugging, unlock OEM and then connect your phone with you PC. 3. Unzip the SDK Tools and then open command promt inside that folder. 4. Unzip the image's zip file into the SDK Tools' folder. 5. Unlock your phone's bootloader, and accept the unlocking by clicking the volume up button of your phone. 6. Go to the fastboot mode and then flash all the image files using "flash-all" command. 7. After successfully flashing to the stable version don't forget to lock the bootloader (if you don't do experimental stuffs then it'll be better to keep the bootloader locked). 8. Set your phone up.**

And now everything will work fine and will be stable after setting up your phone with your credentials.

---
Tags: google-pixel-2, google-camera
---


# Question
Title: How to install Samsung apps on non-Samsung devices and make them run?
I really need Samsung Voice Recorder to work on my OnePlus 7 Pro, but it doesn't work. Samsung limits it to only Samsung devices.

I tried the APK but it doesn't work.

Anyway to run it on other non-Samsung devices?

# Answer
Samsung devices have not only just a GUI that is a little bit different but the changes Samsung makes go deeper. This goes down to the available libraries and APIs an app can use. They add proprietary features and libraries and if a Samsung specific app uses those features you simply can't install it on a non-Samsung phone unless you have heavily modified the ROM.

The app "Samsung Voice Recorder" is a Samsung specific app that only works on Samsung devices.

I have checked version v21.1.06.11 as provided by ApkPure. This app defines in it's AndroidManifest.xml that it requires the following Samsung specific features:

```
<uses-feature android:name="com.samsung.android.feature.resopt" android:required="false"/>
<uses-feature android:name="com.samsung.feature.device_category_phone"/>
<uses-feature android:name="com.samsung.android.api.version.2801"/>
<uses-feature android:name="com.samsung.feature.samsung_experience_mobile"/>

```

Only one of those features is optionally (require=false) but the other three are mandatory.

Note that features are device/ROM specific features, you can't just pretend that your device has those features. Therefore to make this app work on non-Samsung phones you would have build a custom ROM that includes these features (usually special Java/DEX libraries plus the native libraries and potential device drivers, ...).
> 1 votes

---
Tags: applications, samsung
---


# Question
Title: How to show chat head facebook android manually?
The new version of Facebook Messenger show a chat head when new messages arrived.

When closed, I don't know how to show the chat head unless waiting for the next message to come

# Answer
A free app called Notification Shortcuts gives you the ability to set up a permanent notification that will open an app you specify when you select the notification.

You can set up multiple shortcuts and can even set up toggles for wifi, bluetooth, etc, if you want.

The downside to this is that when you receive a message, you'll have a *second* notification from the chat app itself. But since the facebook chat app lacks an option to set up a permanent notification, this 3rd-party app is the next best solution.
> 1 votes

# Answer
With the new update to Facebook app now, the chat head is opened whenever I start my chat with a friend.

Note that if we want to use the old way of chatting via Facebook, we would use the Facebook Messenger app.
> 1 votes

# Answer
Open messenger then click on the chat head you wanna open. Click i for info. Click 3 dot on the upper right corner then click "open chat head".
> 1 votes

# Answer
Open messenger then click on the chat head you wanna create shortcut for. Click i for info. Click 3 dot on the upper right corner then click "Create shortcut". This will create shortcut on your home screen, that will open chathead for this conversation.
> 0 votes

---
Tags: facebook, chat
---