# Question
Title: How to add SELinux policy on a user-debug ROM that has `split` policy scheme?
I have a Sony device that supports `treble` and is a `system-as-root` and `A/B` device. It has a user-debug ROM installed on it so, its adb shell is rooted.

I have disabled `dm-verity` using `adb disable-verity` after running `adb root` and `adb remount` commands.

As documented here, this device also has `split` policies at `/system/etc/selinux`(the 'plat' portion of the policy) and `/vendor/etc/selinux`(the 'nonplat' portion of the policy).

I am trying to run `test.sh` using following init script:

```
#/etc/init/m_daemon.rc

# define service, use executable here if script not needed
service m_daemon /system/xbin/test.sh

    # don't start unless explicitly asked to
    disabled

    # Use `seclabel u:r:magisk:s0` to run with unrestricted SELinux context to avoid avc denials
    # can also use "u:r:su:s0" on userdebug / eng builds if no Magisk.
    # It's required if SELinux is enforcing and service needs access
    # to some system resources not allowed by default sepolicy
    # seclabel u:object_r:qlogd_exec:s0
    seclabel u:r:su:s0

# start the service when the boot is completed
on property:sys.boot_completed=1
    # Use it to start the service
    start m_daemon

```

`/system/xbin/test.sh` file has the following contents:

```
#!/system/bin/sh
echo `date` > /sdcard/test

```

When the device reboot then it fails to run with the following error:

> 202.932913 / 11-26 20:21:04.074 audit: type=1400 audit(1574763664.074:213): avc: denied { transition } for pid=8534 comm="init" path="/system/xbin/test.sh" dev="sda24" ino=8150 scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process permissive=0
>
> 202.933268 / 11-26 20:21:04.074 init: cannot execve('/system/xbin/test.sh'): Permission denied

To fix it, I have used `sepolicy-inject` and run the following commands:

```
sepolicy-inject -s init -t su -c process -p transition -P /sys/fs/selinux/policy -l
sepolicy-inject -s init -t su -c process -p noatsecure -P /sys/fs/selinux/policy -l
sepolicy-inject -s init -t su -c process -p rlimitinh -P /sys/fs/selinux/policy -l
sepolicy-inject -s init -t su -c process -p siginh -P /sys/fs/selinux/policy -l

```

but these needs to be run again after reboot.

So, I have tried to patch `precompiled_sepolicy` using following commands:

```
sepolicy-inject -s init -t su -c process -p transition -P /vendor/etc/selinux/precompiled_sepolicy -l
sepolicy-inject -s init -t su -c process -p noatsecure -P /vendor/etc/selinux/precompiled_sepolicy -l
sepolicy-inject -s init -t su -c process -p rlimitinh -P /vendor/etc/selinux/precompiled_sepolicy -l
sepolicy-inject -s init -t su -c process -p siginh -P /vendor/etc/selinux/precompiled_sepolicy -l

```

but the policies are not injected: neither live nor after reboot.

To test, I am just checking the date in `/sdcard/test` file.

So, I just want to know:

* Why patching `precompiled_policy` didn't work?
* Where to patch the required policies using rooted adb shell that should persist after a reboot?

# Answer
To patch the policies, do the following:

1. Change the value in `/system/etc/selinux/plat_and_mapping_sepolicy.cil.sha256` OR empty this file.
2. Inject required policies in `/system/etc/selinux/plat_sepolicy.cil`
3. "Loading compiled SELinux policy" should show in logs and the init service will run fine.
> 1 votes

# Answer
As I believe the answer answer your questions, here is a shameless copy/paste of my answer to this question:

*Note that this answer will focus solely on Android 9 to 13 and Treble devices.*

If we want to know how to modify the SELinux policies, I believe it is good to first understand how the policies are loaded in the first place.

**SELinux in the boot process**

At an early stage of the Android boot process and after mounting most of the partitions, `init` will attempt to load the SELinux policies from a monolithic sepolicy file found at either `/odm/etc/selinux/precompiled_sepolicy` or `/vendor/etc/selinux/precompiled_sepolicy`. If `init` notices that the device is updated out of sync, `init` will instead recompile the SELinux policies based on `.cil` files that can be found on several locations.

You can find all the details in the comments of the init/selinux.cpp source file and by looking at the implementation, but here is a summary of the exact steps taken by `init`:

1. Find the sepolicy file to use:
    * if `/odm/etc/selinux/precompiled_sepolicy` exists, use it as the sepolicy file to use
    * else, if `/vendor/etc/selinux/precompiled_sepolicy` exists, use it as the sepolicy file to use
    * else if neither of the above exists, stop here, recompile the policies based on the `.cil` files and load the newly compiled sepolicy file.
2. Check if device was updated out of sync:
    * Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.plat_sepolicy_and_mapping.sha256` and `/system/etc/selinux/plat_sepolicy_and_mapping.sha256`
    * Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256` and `/system_ext/etc/selinux/system_ext_sepolicy_and_mapping.sha256`
    * Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.product_sepolicy_and_mapping.sha256` and `/product/etc/selinux/product_sepolicy_and_mapping.sha256`
    * (On Android 13) Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.apex_sepolicy.sha256` and `/dev/selinux/apex_sepolicy.sha256`
    * if any of the above pair of files do not match, stop here, recompile the policies based on the `.cil` files and load the newly compiled sepolicy file.
3. If everything is ok, load the precompiled sepolicy file (`/odm/etc/selinux/precompiled_sepolicy` or `/vendor/etc/selinux/precompiled_sepolicy`)

The compilation of the policies based on the `.cil` files is as follows:

1. Get the latest version of the policies that are compatible with the `vendor` version (`/vendor/etc/selinux/plat_sepolicy_vers.txt`, note that `init` does not look at the file in the `/odm` partition)
2. Gather the `.cil` files to compile:
    * `/system/etc/selinux/mapping/{vendor_version}.cil`
    * `/system/etc/selinux/mapping/{vendor_version}.compat.cil`
    * `/system_ext/etc/selinux/system_ext_sepolicy.cil`
    * `/system_ext/etc/selinux/mapping/{vendor_version}.cil`
    * `/product/etc/selinux/product_sepolicy.cil`
    * `/product/etc/selinux/mapping/{vendor_version}.cil`
    * `/vendor/etc/selinux/plat_pub_versioned.cil`
    * `/vendor/etc/selinux/vendor_sepolicy.cil` or if it does not exist: `/vendor/etc/selinux/nonplat_sepolicy.cil`
    * `/odm/etc/selinux/odm_sepolicy.cil`
3. Compile the above files with `secilc` to `/dev/sepolicy.XXXXXX`
4. Load policies from `/dev/sepolicy.XXXXXX`

**Modifying SELinux policies permantently**

Now that we understand how `init` loads the policies, it is easy to see how one could permanently add new policies to the system:

* Directly add the policies to `/odm/etc/selinux/precompiled_sepolicy` or `/vendor/etc/selinux/precompiled_sepolicy` with `sepolicy-inject`:
```
sepolicy-inject -s su -t system_file -c file -p entrypoint -P /vendor/etc/selinux/precompiled_sepolicy -o /vendor/etc/selinux/precompiled_sepolicy

```
* Make `init` thinks the device is updated out of sync (By modifying one of the above `.sha256` files, or deleting the precompiled sepolicy files) and modify one of the above `.cil` files

Note that in both cases, you will need to have a read-write access to the partition you want to modify (`/vendor`, `/odm`, and/or `/system`). These partitions are normally mounted as read-only, so you will have to either:

* Remount them as read-write if you have root access (either because your device is rooted, or using `adb root` on a `userdebug` Android build)
* Boot in recovery mode, mount the partitions as read-write and modify them in recovery

If you do not want to have to remount the partitions every time you want to change the SELinux policies, you can add some SELinux rules to allow `init` to load new policies, thereby resolving the chicken and egg problem (as mentioned in this excellent answer) you had with your `init` script. You can find which SELinux rules are needed by searching for SELinux violations (avc errors) in the device logs on startup:

```
adb logcat | grep avc

```

With this, you will be able to have an `init` script that loads new policies with `sepolicy-inject`.
> 0 votes

---
Tags: root-access, selinux, init.d
---


# Question
Title: How to configure a radius server for WLAN (PEAP) in Android12?
After having upgraded my mobile phone from Android 8 to Android 12 I realized that the WLAN settings are different. Specifically I find no way to configure a radius server for the domain when using 802.1x EAP (PEAP).

Why can't I enter a radius server for the domain any more?

# Answer
There never was a "RADIUS server" field in Android, and there could not have been, as the client device does not speak RADIUS in the first place and cannot influence the server that will be used – it's the access points that relay the EAP messages from clients over RADIUS (or over a different protocol, or even implements EAP internally, as hostapd might do).

What Android *did* have was the "Domain" field which is used for verifying the PEAP server certificate's CN/SAN, and this field still exists in Android 12 – although it only appears after you select something from the "CA certificates" dropdown (e.g. "Use system certificates" if your network uses public web CAs for PEAP):

The "Domain" field is used like wpa\_supplicant's `domain_suffix_match=` and accepts a suffix for the certificate's CN/SAN, e.g. a SAN of "radius1.example.com" would be matched either by the exact `radius1.example.com` or by the suffix `example.com`.
> 1 votes

---
Tags: wi-fi
---


# Question
Title: How to select ASCII characters, using a Samsung keyboard?
On my computer, I regularly type French, German and other characters, using their ASCII code, such as:

* ± : ASCII code 177
* Ç : ASCII code 199
* œ : ASCII code 156
* ß : ASCII code 223

On a computer, this is fairly simple, using the following keyboard shortcuts:`Alt+0177`, `Alt+0199`, `Alt+0156` and `Alt+0223`.

How can I type those characters on a Samsung Galaxy smartphone, using the standard Samsung keyboard?

# Answer
On Samsung, you need to hold down the character associated with it. For example, if you want to input Ç on the keyboard, hold down the regular c, and a display of special variants of c will be shown. Guide your finger to the special character while holding the screen and let go when it highlights the character or when your finger is touching it.

Boom, you have your character. As for characters like ß which are on their own and aren't special variants like Ç, use the letter that sounds like it. ß is pronounced like "sh" or "ss", so hold s and select ß.
> 1 votes

---
Tags: keyboard, samsung-galaxy-s-6
---


# Question
Title: Chrome and Firefox cannot add specific URL to home screen
I'm using Chrome and Firefox on Android 10. I need to add a link to my home screen and I can't find a way to add the specific link.

I know that I can do the following:

1. Go to the URL
2. Tap the overflow (3-dot) menu
3. Add to home screen

However, if I navigate to a specific URL **within** some sites, like Weather Underground (https://www.wunderground.com/) and follow the above process, it doesn't add the specific URL, it adds `www.wunderground.com` and doesn't seem to give me any way to edit that URL to reference the specific subpage (e.g. `www.wunderground.com/my/specific/url`).

Why, and how to solve this?

# Answer
> 7 votes
### tl;dr

Using the browsers' "Add to Home Screen" (A2HS) feature may not open the expected link due to the browsers trying to comply with the standard of Progressive Web Application (PWA). Try other approaches instead, like **using app widgets or 3rd-party apps altogether (examples below)**.

### Progressive Web Application (PWA), Manifest file, and Add to Home Screen (A2HS)

To put it simply, PWA is an advanced web app that follows some rules. One of them is having a manifest file.

> In order to call a Web App a PWA, technically speaking it should have the following features: Secure contexts (**HTTPS**), one or more Service Workers, and a manifest file.

A2HS is a browser feature to "install" a web app based on the configuration in the manifest file, which is linked on the header tag.

```
<head>
   ...
   <link rel="manifest" href="link_to_manifest_file">
   ...
</head>

```

One of the required fields in the manifest file is `start_url` that will be loaded when opening the "app".

> The `start_url` member is a string that represents the start URL of the web application — the prefered URL that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen).

If `start_url` is invalid, it *may* return the document URL instead (i.e. the exact URL when the page is added to the home screen). However, since the manifest file is configured by the web developer, it might be difficult for end-users to modify/override this value.

In short, when a user adds a web page to the home screen, the browser will check if there is a manifest file, and if there is, it will try to use its value.

### Some examples...

* Wikimedia (including Wikipedia, Gamepedia, and possibly other wikis) has a mobile front-end extension that will *only* add the manifest file to the mobile view with `start_url` always pointing to the Main Page.

The manifest file:

```
<link rel="manifest" href="/w/api.php?action=webapp-manifest">
```

The content of the manifest file:

```
{"name":"Wikipedia","orientation":"portrait","dir":"ltr","lang":"en","display":"browser","theme_color":"#eaecf0","background_color":"#fff","start_url":"/wiki/Main_Page","icons":[{"src":"/static/apple-touch/wikipedia.png","sizes":"160x160","type":"image/png"}]}

```

This is why adding the desktop version works (and depending on the browser's configuration, it will redirect to the mobile view automatically), but adding the mobile view always returns to the Main Page instead.
* Weather Underground always sets the manifest file regardless if it is viewed on desktop or mobile.

The manifest file:

```
<link rel="manifest" href="bundle-next/manifest.webmanifest">
```

Containing `"start_url": "/",` which is basically the domain itself.

### Solutions and/or workarounds

* Some sites only have a manifest file on mobile view, using desktop mode may mitigate this issue
* Some apps may allow opening an exact URL. Tasker has "Browse URL" task and users can also add an app widget on the home screen as a shortcut to that task
* Some 3rd-party apps can create a home screen shortcut to a URL
* Changing user agent *may* work (e.g. by using XPrivacyLua as mentioned by user beeshyams in the chat room). According to the documentation,

> **Note:** The `start_url` member is purely advisory, and a user agent may ignore it or allow the user to alter it at install time or afterwards.
* (Idea, untested) strip the `<link rel="manifest" href="link_to_manifest_file">` tag (e.g. using "ad" blockers) from the HTML when the page is loaded.

# Answer
> 2 votes
A solution that works for me:

1. shorten the link with some website like Bitly com
2. turn off the internet access
3. paste a shoterned link to your browser and try to reach it
4. unavailable internet will give you a time to add this "proxy" page to your home screen

Now I have a link, not an in-browser application.

# Answer
> 1 votes
Thanks to the link from @Andrew T, this well-reviewed Android app seems perfect for linking to any website (or even Action within an Android app):

https://play.google.com/store/apps/details?id=rk.android.app.shortcutmaker

Just tried it and it did exactly what I wanted with no fuss and some nice options.

---
Tags: chrome-for-android, browser, home-screen-shortcuts, firefox-for-android, hyperlinks
---


# Question
Title: Recording Microsoft Teams meeting on Android smartphone
I'm wondering if there is a way to record Microsoft Teams meetings with a smartphone; I'm using a Motorola Moto G6 Play and the record button doesn't appear.

I tried with a screen recorder, but Android doesn't allow you to record internal audio unless you root your smartphone (in this case the warranty goes away).

# Answer
> 0 votes
To view the recording button after joining a meeting, click the 3-dot then on the list that appears, you should be able "Start recording". Clicking it will start recording the meeting just like on the desktop app.

# Answer
> 0 votes
**Possible causes -**

1. Hopefully the reason is not this one, but anyways; an answer on Quora reads:

> If you are trying to record in a private team channel, then you cannot record the meeting, as the team owner ideally disables the recording option for security purposes.

2. Another answer:

> This is an issue with the version of your teams. You can check for system or app updates and then try recording again.

3. Another:

> Teams meeting recordings are currently disabled for customers whose Teams data is stored in-country, if Microsoft Stream is not available in that country. A new admin setting will allow customers to turn on meeting recordings if Microsoft Stream data residency is not yet in country.

You can try clearing app cache, app data, reinstalling and updating your app if an update is available. Else, with the technical restrictions you have, I find it difficult for myself to cook a solution.

I'd always prefer going root. I know your warranty will terminate if you root the device; plus no point in potentially soft-bricking a smooth-running device just to have been able to record meetings. But rooting offers you so many tweaks that given a choice, I'd surely make the bargain. I think there are ways to **delete the flash record from a device too**; so there **should** be some way to keep the warranty intact

# Answer
> 0 votes
A solution is to open Microsoft Teams in the browser and here the record button is accessible.

# Answer
> 0 votes
For any reason, when we are not able to use App specific record feature, we can use generic recorders available for android. I use XRecorder on android phone, it works great! We can record android screen with audio.

# Answer
> 0 votes
Most smartphone manufacturers have screen recorders built-in these days.

If you want also want to record the video, on Samsung devices, you can use the Screen Recorder : https://www.samsung.com/au/support/mobile-devices/using-screen-recorder/

For other manufacturers, you should be able to find the steps required to record, by googling, for example : "Google Pixel screen recording"

Another option is to use another phone (or a tablet) to record it. Most phones have a built-in app to record audio such as Samsung Voice Recorder.

---
Tags: video-recording, audio-recording, microsoft-teams
---


# Question
Title: Prevent app from using in-app purchases?
I installed an app and it has a subscription for the pro version in-app.

It automatically selects the account and shows the added cards in the subscription popup window

I cannot change the payment account, I guess it grabs the account from Google Pay installed on my phone which I use for everyday payments.

I don't like it, I don't like when some arbitrary app that I don't trust has access to my payment profile by default, and I like to disable such possibility for the app. Is there a way?

I don't understand where this possibility comes from, I didn't grant any payment permissions for the app.

Is this permission inherent for any app and I can't disable it?

Answering future questions: I **tried** to install this app from another account like suggested here, I **tried** to reinstall, and I even installed this app from APK in the end. No result. It still points to the same payment account, I guess it was saved from the first time in the very beginning when I installed the app from it.

# Answer
> 2 votes
For an in-app purchase the app that has the in-app purchases cooperates with Google Play Store app. In that process the app does not get access to the payment info, that is all handled by Google Play Store app.

According to what I know this is what happens when a user performs an in-app purchase:

Preparation: When publishing the app the app developer registers all possible in-app purchases at Google so Google knows exactly for what app what in-app purchases are possible.

On user side the following steps are preformed:

1. The app shows a button to perform an in-app purchase.
2. If the user clicks on that button some Google provided code inside the app is triggered that contacts GooglePlay Store app. In that communication Play Store verifies that the app is genuine (app signature is checked). Then the information about the selected in-app purchase package is sent to Play Store app. Also an "obfuscated user name" (the unique identifier of your user account within that app) is sent so that app can later identify for which account a successful subscription has been bought.
3. Google Play Store app takes over and shows the purchase dialog like your second screen shot.
4. If the user confirms the subscription in Google Play Store purchase dialog, payment will be performed an Google backend issues a purchase token that is send to the Play Store and for that forwarded to the app you made the purchase for. In that token the previously mentioned obfuscated user name is included and the data what in-app purchase was purchased.

---
Tags: google-play-store, in-app-purchase, google-pay
---


# Question
Title: How to display and enable extra symbols on standard keyboard?
When switching from Huawei's Android 8.0 to Oppo's Android 12 I noticed a keyboard problem that I'm unable to solve.

First, here is how the keyboard on Android 8.0 looked like:

Then, here is how the keyboard on Android 12 looks like:

You see that on the "old" keyboard there are additional symbols above the letters (like `'` on `c` that is not displayed on the new keyboard. However it's not just that the symbol isn't displayed, it's also not available on long-press of `c`.

So my simple question is: *How can I get the "old layout" on my new phone?*

# Answer
**Assuming both are Gboard, the feature is called "Long press for symbols" and unrelated to the Android versions.**

Steps to change the setting:

1. Open Gboard's Settings (the cog-wheel icon on the keyboard)
    * Or alternatively from Android Settings - System - Languages & input - On-screen keyboard - Gboard (adjust the step according to each manufacturer's customization)
2. Select "Preferences"
3. Scroll down to "Key press" and toggle the "Long press for symbols" switch.
> 2 votes

---
Tags: keyboard, android-12, oppo-coloros
---


# Question
Title: Exploring options for customizing SeLinux policy ( SePolicy to enable bind-mounting ) , including kernel recompilation
As I realized `selinux for Android` is more than tad bit different creature than what I can get done on Linux . I need `SeLinux` policy to be modified so I can `bind mount` my folders. Unless that happens I dont want to root my phone. The below was when I temp `magisk rooted` my Samsing M20 in `permissive`
Here are the issues I encountered trying to achieve the above.
-- `AVC denials` aren't logged into my `Logcat`. Why is that ? and should I be looking at some other file to get these. If they are disabled how can that be reversed. This is a Samsung Exynos Chipset.

```
    root@m20lte:/ # logcat -d | grep -i AVC
06-23 03:38:03.046  4392 19898 I OMXMaster: makeComponentInstance(OMX.Exynos.AVC.Encoder) in android.hardwar process
06-23 03:38:03.112 12145 12164 I ACodec  : [OMX.Exynos.AVC.Encoder] Now Loaded
06-23 03:38:03.128 12145 12164 I ACodec  : setupAVCEncoderParame

```

--- Can I just modify the Sepolicy file at or entire \`kernel\` needs to be \`recompiled\`
```
/sys/fs/selinux/policy

```

. How many files need to change for a modfied custom `SePolicy` to be in effect

-- If changing `Sepolicy` isn't that simple & you need to `recompile` the `Sepolicy` in `kernel`. How do I go about doing that and before re-compile how do I test that it works for my goal

Here is what i did.

--- I pulled up the `SePolicy` which was in `binary` and ran it through sepolicy command on linux . No luck.

```
mnt/sda2 # sepolicy -P policy
Traceback (most recent call last):
  File "/usr/bin/sepolicy", line 692, in <module>
    args.func(args)
AttributeError: 'Namespace' object has no attribute 'func'

```

-- before that obviously I tried a low hanging fruit given by this guide where I tried using `bindfs` with various `userids and grouoids` including the ones exemplied in the post but I still got errors. `AVC errors` not being logged I can figure our what caused these

# Answer
> --- Can I just modify the Sepolicy file at or entire `kernel` needs to be `recompiled`
>
> ```
> /sys/fs/selinux/policy
>
> ```
>
> . How many files need to change for a modfied custom SePolicy to be in effect

First of all, if your device is rooted with Magisk, you can use Magisk's `supolicy` to add SELinux rules to your device.

If your device is not rooted with Magisk, it is still possible to 'simply' modify the sepolicy file to add new SELinux rules that will be loaded by `init` on startup of the device.

The file that you will have to modify to achieve this is `/vendor/etc/selinux/precompiled_sepolicy` (or `/odm/etc/selinux/precompiled_sepolicy` if it exists).

You can use tools such as `sepolicy-inject` to add your custom SELinux rules to the file.

Note that since the file is located on the `/vendor` partition, you will need to have read-write access to it. This can be achieved by remounting it if your device is rooted, or through recovery with a custom recovery image (such as TWRP).

Another option, if you do not need the policies to be permanent, is to directly load your policies with `sepolicy-inject`. Note that for this option, you need to have a rooted device, or have a SELinux context which would allow you to load policies (this would typically require you to add custom rules in the first place).

If you want more details on how the SELinux policies are loaded and how to modify them, take a look at this answer.

After that, all you need is to figure out which SELinux rules would be needed for your case, which you can find by grepping for avc errors in logcat. I am afraid however that I do not know right away why those avc errors are not showing in your logs.

Hope this helps!
> 1 votes

---
Tags: root-access, file-system, selinux, emulators, bind-mount
---


# Question
Title: Android Emulator Performance is Extremely Unstable
First of all, hopefully this is the right place to post this type of question - if it isn't, do let me know.

I have a relatively new PC with 16 GB RAM, 10th Gen Core i3, 4 physical and 4 virtual cores (hyperthreading), I do not have an SSD. It runs Linux Mint and uses the KVM.

The first year or so after buying my computer, the emulator worked great - it was fast and I was having a great time working on my apps.

A couple of weeks ago, I realized that the emulator would occassionally become slower (around 50-60 percent, to be exact) for around a minute or two, before then becoming very fast for around 1-3 minutes.

It's very strange, it goes like so:

* Boot up emulator
* Starts off blazingly fast
* 2 minutes later it suddenly drops by around 50-60 percent in speed for around 1-2 minutes
* Becomes blazingly fast again for some time

Here is my emulator configuration stats:

(I sometimes use AOSP emulators, but in this case I will just give an example of the Google API emulator.)

This is incredibly frustrating - I use the emulator so many times, and I have a relatively new PC.

PC info:

```
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i3-10105 CPU @ 3.70GHz
    CPU family:          6
    Model:               165
    Thread(s) per core:  2
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            3
    CPU max MHz:         4400.0000
    CPU min MHz:         800.0000
    BogoMIPS:            7399.70
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mc
                         a cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
                         ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art
                          arch_perfmon pebs bts rep_good nopl xtopology nonstop_
                         tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cp
                         l vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1
                          sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsav
                         e avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault
                          epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced
                         tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase t
                         sc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed a
                         dx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsa
                         ves dtherm ida arat pln pts hwp hwp_notify hwp_act_wind
                         ow hwp_epp md_clear flush_l1d arch_capabilities
Virtualization features:
  Virtualization:        VT-x
Caches (sum of all):
  L1d:                   128 KiB (4 instances)
  L1i:                   128 KiB (4 instances)
  L2:                    1 MiB (4 instances)
  L3:                    6 MiB (1 instance)
NUMA:
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-7
Vulnerabilities:
  Itlb multihit:         KVM: Mitigation: Split huge pages
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT vulnerable
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
                          and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer
                          sanitization
  Spectre v2:            Mitigation; Enhanced IBRS, IBPB conditional, RSB fillin
                         g
  Srbds:                 Mitigation; Microcode
  Tsx async abort:       Not affected

```

Things I've tried:

* allocate more RAM to the emu (5 GB and 8 GB) it actually felt slower and more incosistent with more ram
* turn off other programs
* different tweaks (none of which worked)

I am looking for help as to how I can improve the emulator speed, as it feels as though you need some sort of NASA computer or 32 GB RAM Core i9 12th generation with an RTX 3090 these days to actually get **consistent** QEMU performance - very frustrating!

Any help would be appreciated -- the only fault I can think of with my PC is that I'm using a HDD, which may or may not be the root cause of this issue.

# Answer
> 0 votes
You are looking for a bottleneck. So you need to understand your software first and what it does. In games your would check GPU or CPU for bottlenecks, for instance.

Your i3 only has 4 cores, just because it's new, doesn't mean it's good. For decent developing, this is way to little. This will be a bottleneck. A HD in 2022 for developing is a desastre. An AVD can get 15 gigs big over time. Your poor old HD has to read and copy all that to ram, partially. Upgrade to SSD.

Do the following:

* Triple check you updated the emulator from within AS
* create a new device, don't modify any settings, they are usually fine.
* open two consoles and run "atop" in one ( bottleneck detection cpu + storage) and "htop" (multi threading cpu , memory overview) in the other. Get familiar with those tools.
* now start the fresh and new emulator device from AS and wait until it's fully booted and did it's software update checks( the Google image will try to update all its internal apps once it's online!)
* monitor htop + atop during all this and also once you run your app.

If the HD is the bottleneck (atop shows it in red) try to disable hibernating / snapshots inside AVD settings. The emulator stores snapshots constantly by default.This is fine for fast SSD, but might be slower with hd. (Guessing)

If your cpu is the bottleneck, there's hardly anything you can do. The best solution then would be to plug in a hardware Android device via USB and use the computer only for Android studio. In short not run the emulator at all. That's how I do it on my backup laptop (also a weak Intel i3). I upgraded my main to an AMD Ryzen 9 5900X. That has 12 cores,24 threads. Just to give you an idea what people use for developing. Good luck

---
Tags: android-emulator, performance, emulators, android-studio
---


# Question
Title: Why was my launcher setup reset after inserting a SIM card?
I have a new phone, and I started to "customize" it while still using my old one. When I felt the phone is ready for switch-over, I inserted the SIM card from the old phone.

That worked, but after opening the MMS sent by the provider, it caused some app to be installed without my explicit consent. A moment later I realized that my launcher configuration was reset to default: All my icons and folders that I had placed and created before were gone!

* Is that usual for Android 12 (Oppo's "Color OS" 12.1), or is it unusual?
* Is there any chance to get my setup of the launcher back?

I was thinking whether removing the SIM card again would restore my launcher, but then I though: Better ask here!

# Answer
As I found out, the provider's "Welcome" app installed itself as "launcher" without Android asking me for permissions to do so (how did they manage that?). Also it did not just reset the start screen, but also changed some display options regarding that status bar.
> 0 votes

---
Tags: settings, sim-card, launcher, android-12, oppo-coloros
---


# Question
Title: SIM card cannot be detected, cannot open "SIM Card Manager"
The SIM Card Manager on the Settings cannot be opened. The SIM, contacts, and messages also cannot be detected on my cp. Even the mobile data can't connect. It says "Insert SIM card", but the SIM card is already inserted.

What is the reason for this?

# Answer
Some possibilities:

* The SIM card is defective
* The SIM is inserted the wrong way
* The tiny metallic connectors of the SIM card plug are deformed (this is my personal experience)
> 0 votes

# Answer
I had had a case when inserting a newer SIM into an older phone: It seems the voltages were not compatible, and the older phone did not detect the SIM. (Unfortunately the contract of the last SIM that had worked had expired in the meantime)
> 0 votes

---
Tags: settings, sim-card
---


title: bootloop in Ulefone Armor 8 pro

text:
# Question
Title: bootloop in Ulefone Armor 8 pro
I've installed successfully TWRP recovery, but after installing Magick, in order to root it, I have a bootloop, with this message:

> Your device has been unlocked and can’t be trusted. Your device will boot in 5 seconds

I cannot enter recovery mode any more. Only I can enter in fastboot mode, and issue fastboot commands.

I've tried to restore the recovery partition with the original one:

```
fastboot flash boot recovery.img

```

but even though the flashing terminates with success, I cannot access recovery.

I've downloaded the stock ROM for my Armor 8 Pro, but the SPMultiPortDownloadProject doesn't recognize my phone, when I hit the Scan button. It does recognize the scatter file from the stock ROM.

I've tried unsuccessfully other tools like mtpclient, and SP Flash Tool.

The solutions here don't help, as my phone isn't recognized: https://forum.xda-developers.com/t/armor-7-ulefone-twrp-and-roms.4116603/

The phone uses MediaTek chipset (MT6771 Helio P60 (12 nm)), and I've installed the MediaTek USB VCOM drivers.

Specs of the phone

**UPDATE**: I'm using Linux and Windows 10 in Virtual Box. I've made accesible the USB device to VirtualBox.

Only when activating `fastboot`, I can see the device with the `lsusb` utility in Linux.

When trying to switch on the phone, also there is a 2 or 3 second period of USB port visibility, but this isn't enough.

```
Bus 003 Device 028: ID 0e8d:201c MediaTek Inc. Android

```

Additional info I've found useful:

# Answer
I don't like this solution, but I've sent it to external repair service.
> 0 votes

---
Tags: rooting, unbricking
---


# Question
Title: Why does YouTube change my lock screen wallpaper and how do I prevent that?
When I'm watching YouTube videos on my phone, and then lock my phone, my wallpaper is replaced by the thumbnail of the video I was watching.

Removing YouTube from the recent applications screen does not change that. I don't get why that would be useful, and it certainly looks ugly.

Where can I disable that?

# Answer
I found that swiping away the YouTube mini player in the notifications area clears its picture on the lock screen.

The notification survives closing YouTube and swiping the app away from the apps list, but it can be swiped away itself.

But I wish it didn't happen at all.
> 0 votes

---
Tags: lock-screens, youtube
---


# Question
Title: Is it safe to give accessibility permission to an app?
So I use the app from Cleanbrowsing and gave the accessibility permission to it and saw that it can view my screen, action and inputs, perform actions and control the display.

Is this app even safe to use?

# Answer
**It always depends on how trusted the app is.**

As for why the accessibility service (which this permission is about) has such powerful control, it is because *the original purpose is to help people control their device more easily.* Taken from the official Android documentation on Accessibility service,

> An accessibility service is an application that provides user interface enhancements to assist users with disabilities, or who may temporarily be unable to fully interact with a device.

Example of accessibility services:

* TalkBack: eyes-free control of your device, by viewing the screen and intercepting the user's action to read out the content.
* Voice Access: control your device with spoken commands, by viewing the screen and performing actions with voice commands.
* Switch Access: interact with your Android device using one or more switches instead of the touchscreen, by viewing the screen and performing actions using button switches or face gestures.

However, developers also found unusual ways of using Android accessibility services, as explained by Maksym Dybarskyi:

> \[...\] there are several ways of unusual usage of accessibility services. I wrote ‘unusual’ because all these scenarios are different from the original purpose of accessibility services.

Automation apps like Tasker, MacroDroid, and Automate have their own "accessibility services" to allow more features that are otherwise restricted by the system (e.g. intercept action on buttons, take screenshots, etc.)

---

As for CleanBrowser, the documentation claimed,

> Advanced functionality includes *removing the users ability to uninstall the app*. \[...\] *it makes use of the Accessibility API to prevent the user from uninstalling the \[app\]*,

<sup>(Emphasis added)</sup>
> 6 votes

---
Tags: applications, security, permissions, privacy, accessibility
---


# Question
Title: Removing myself from a shared Google Drive to free up space on my Android
I was given access to a shared drive with a huge library of videos, documents, etc., and installed it on my Android. I no longer need access and it is using a huge amount of space.

How do I remove the drive from my phone, the data it's taking up on my drive but leave the files intact for others?

# Answer
> 0 votes
As Andrew mentioned, the files are not normally stored on your device. Unless you have marked them offline, in which case uncheck each one.

A faster and more certain method is follows (steps will differ slightly from model to model)

1. Go to Settings
2. Select Apps
3. Select Google Drive
4. Select Storage
5. You can see how much space it uses.
6. Definitely, **Clear Cache**
7. If the value for **Data** is high then **Clear Data** as well.

---
Tags: google-drive
---


# Question
Title: How long and where Android 10 keeps phone logs
I found my phone logs in `com.google.android.dialer/databases/annotated_call_log.db`. It covers only 4 months period. Is there other phone logs in Android 10?

# Answer
> 0 votes
Found it here `/data/data/com.android.providers.contacts/databases/calllog.db`. At least 18 months history.

---
Tags: calls, call-history
---


# Question
Title: Unknown alarm appearing and disappearing at random time on the lock screen
The issue: There has recently (once again) appeared a random "alarm" notification which displays as an alarm clock icon followed by a random time located in the upper left corner of my lock screen. The time on this alarm changes randomly throughout the day and is always a peculiar random time (e.g. 9:42, 3:14, 6:06) rather than something I would set in an application.

I say "once again" because this happened on my Pixel 4a and now my Pixel 6. I even wiped and reinstalled the OS from the factory image via adb tools. There are no apps installed that aren't from the Play Store and nothing, in my opinion, that is considered fringe or questionable.

Why is this seemingly innocuous alarm clock an issue? It seems to be some kind of upcoming alarm which is causing my overnight DND to become disabled, thus causing notifications for spam and other emails and texts to ring through and WAKE ME UP!! It's basically a form of torture.

I've reported this to Google support many times and (unsurprisingly) they've told me to reset to factory defaults to get rid of it rather than actually figure out what's causing it. I'm fed up and would like to know if it's possible to use the available adb tools (or something else) to debug this thing on my lock screen. If I can at least find out what application it's from then I can make an informed decision about how to resolve it.

# Answer
Credit to @wbogacz. It was actually the ISS tracking app. It notifies you when the space station will be overhead in case you want to look up and see it. This is where the ghost alarm was coming from.
> 2 votes

---
Tags: lock-screens, alarm
---


# Question
Title: How can I write in a HDD on windows that I can read later on a Nokia Streaming Box 8000 (android TV)
I just bought a Nokia Android TV with a super nice USB A 3.0 port (that was the main reason to choose it) where I want to plug my external 2.5' 2TB hdd with all my movies and music and such.

BUT, when I plug it in and the thing recognises the unit, it looks "empty". Ok, i assume the file system is not readable. I format the unit there so I make sure the HDD is readable byt the Android TV. After format I unplug it and go to my laptop to re-copy all my stuff... my laptop sees the unit, but doesn't mount it: it's under "My PC" -\> Manage -\> Disk manager but cannot assign a letter to it.

I format it then with FAT32 that I've read is readable by android and copy some movies, go back to the Nokia thing, connect it, and again not readable...

I am sure there is an easy way I'm missing here. Is there any FS that's accesible from both technologies? I've even installed WSD in my windows and I have kind of a "mount" access now but really don't know how to use it to see the unit in my explorer :) thanks for any help!

# Answer
> 0 votes
There is a possibility for the disk to have not enough power. Check volts and amps required.

# Answer
> 0 votes
With Nokia Streaming box, like probably any other Android (I guess), you need to select a program - such as VLC - to read the data (movie, etc) USB stick or external disk. This works for me.

---
Tags: file-system, android-tv, nokia
---


title: Gabb Plus sim card locked

text:
# Question
Title: Gabb Plus sim card locked
My Gabb phone's sim card got locked. It's my only phone, so I can't call or text any number. I don't know my PUK code, which it requires to unlock. How would I unlock it?

Thanks in advance.

# Answer
> 0 votes
Contact your service provider and it should work.

Or, you can look at the sim card box (if you got one) and it will say.

---
Tags: sim-card, sim-unlocking, gabb
---


# Question
Title: How to stop Google's Play Store from auto-updating itself (without rooting)?
I have a problem with my tab. With the new version of Play Store, My tablet PC keeps restarting. So, I restored Google Play to the Factory Default. Soon after, it updated itself, causing the device to restart repeatedly when in standby. I am running 4.1.1 on my Karbonn ST10. I, at the time of posting the question, do not have any intention to root the tab.

Thanks, Oxylibrium.

# Answer
> 1 votes
Go to Setting--\> Data Usage

under the usage graph there is list of apps with usage specified on right side.

Go to Google Play and at the below you will find Option ***Restrict Background Data*** click on that check box..

and here you go.

Though you cant install any apps from Play store with these setting, but you can always enable background data whenever needed.

# Answer
> 0 votes
This is pretty simple solution for Android 7 (1GB/8GB (sys 4 + usr 4)) system. Wifi started to clog and some apps to misbehave because of shortage of RAM and/or RAM cache. The user storage free space was only 100 MB.

1. Disable apps autoupdate in Play Store.
2. Uninstall updates for Google App and Google Play Store.
3. In the new (old) Google Play Store disable apps autoupdate again.
4. If Play Store/Google App starts to update itself cancel it.
5. Find or record a "dummy" video of about 50 MB
6. Copy that video to user storage as many times as needed to leave about 200 MB free space.
7. Android cleans about 100 MB of user storage to enable at least one of the bloated apps to autoupdate.
8. Cancel the autoupdate if needed and fill the extra space with 2 additional copies of your dummy video.
9. Free space is now about 200 MB again, but there is no room for cleaning anything any more.
10. Android gives up and your phone works fine. There is much more free RAM because the Google App and Google Play Store are the factory versions (with some "missing" features, of course). There is enough RAM cache because user storage free space is about 200 MB (hold it on that level by adding/removing copies of your dummy video if needed).

# Answer
> -2 votes
Your phone must be rooted to try the following steps:

1. Go to `data/app/`.
2. Enter the command `chattr +i /data/app/com.android.vending-1.apk` (this is partial info and you need to Google for more) .

---
Tags: google-play-store, application-autoupdate
---


# Question
Title: Can't do ethernet tethering while (wireless) charging the phone
I have a Google Pixel 4 XL with Android 12 stock OS, and I'd like to use it for ethernet tethering (for devices not supporting wifi). I'd also like to concurrently keep this type of tethering enabled and charge the phone when needed. However, because I can't charge it via USB-C cable while already connected to a RJ45 cable (though I'm using an adapter), I thought wireless charging, since it is supported, could solve the problem. But unfortunately it disables and blocks tethering until I put the phone off the wireless pad and re-plug the adapter. Is there a way to fix this (through Developer Options or else)?

# Answer
Instead of wireless charging, you could try an USB-C adapter with an Ethernet *and* a PD (power delivery) port. So you can have LAN while charging at the same time. There's an ever increasing number of available products for these. Most of them also have USB-A ports in them. Be aware that incessant charging is bad for long term battery life.
> 1 votes

---
Tags: tethering, usb-tethering, wireless-charging
---


# Question
Title: I can neither add new contact to Google account nor sync contacts
My ASUS ZE554KL (Android 8.0) lost its ability to sync contacts. And when I add a new contact it offers to sync with: device, SIM and that's it. Below there was a list of my Google accounts, but now there's only "Add account" as if I don't have any.

upd. Added new Google account to the device, then tried to add new contaсts, no change in the end.

# Answer
> -1 votes
It might be because Google no longer supports Android 8.0 Oreo, according to Lifewire Android Version Guide

---
Tags: contacts, sync, google-account
---


# Question
Title: How to enable 'install unknown apps' on Samsung mobile device?
My Samsung device is running on **Android 10, One UI 2.0**. I want to install apps using apk file via non-official platforms (the app is not published on Google Play, Galaxy Store). But it won't let me.

*Settings \> Biometrics and security \> Install unknown apps*,

All the listed apps there (e.g. Google Chrome, File Manager) are disabled by default and greyed out, stating:

> Installing apps from this source may put your phone and data at risk.

I googled a little, this forum discussed about the exactly same problem I am facing. One user there said that disabling admin apps can help. I went to

*Settings \> Biometrics and security \> Other security settings \> Device admin apps*,

I see 5 listed apps (I think most Samsung device is sharing the same, except the Outlook's one because I installed Outlook).

I click into one, this shows up and *'deactivate'* is greyed out as well. None of them can be deactivated.

I have absolutely no idea how to solve this. As previously when I was using Huawei device, I had no issue like this, system won't stop me from enable it. As far as I can tell from Google results, there are Samsung device users facing the **exactly** same issue. Official forum and YouTube are useless, solution given is just tell you where to find the settings, or just demonstrate you how to enable it without issue like this meanwhile under comment section people complaint about this issue, there was no solution. Send help. I apologize in advance if I posted the wrong question on the wrong forum category.

# Answer
What worked 4 me once was sending the .apk file from an email app n opening it up there. Not sure why or how that happened
> 0 votes

---
Tags: samsung, security, android-10
---


# Question
Title: How can I stop applications and services from running?
When my phone starts up there are several application/services running in the background that I would rather not. And when I press the Home button while using an app, that app usually goes into the background without exiting. How can I stop these apps from running?

# Answer
# First Things First

You may have some misconceptions about how Android works and what's really happening when a service is running or an app is in the background. See also: Do I really need to install a task manager?

Most apps (e.g., ones you launch manually) have their current Activity put into the background when you switch to another app or the homescreen. Activities consume some memory, so that you can go back to the app and pick up where you left off. Activities are usually not able to run computations in the background, so no CPU or battery is used for them. If battery life or CPU performance is your concern, you don't need to worry about these apps! You don't need to worry about memory, either; Android will automatically kill the app and free the memory if the system is running low.

If the app in background is running a service, that may be a different story. Well-designed services spend most of their time sleeping, waking up for the occasional check (new social media notifications, for example). However, poorly designed services may run more often or perform syncing operations that you don't want, affecting battery life and your data usage. If you've got a rogue service you may want to try one of the solutions below.

# Solutions

If you're sure you want to make this app stop at all costs, you can try these methods.

### **Uninstall**

When an app does something you don't like, whether running in the background on startup or something else, your first option is to uninstall it. Problem solved! You can remove system apps if you have root, most easily with Titanium Backup, but be careful to remove only carrier bloatware and not critical system apps.

However, if you want to be able to use that app then this is not an option: keep reading.

### **Ping the Developer**

Some of the greatest daemons that come with Android are services that run in background for no reason or when a simple interval check with Android's AlarmManager would be sufficient. We need to kill them all with fire, and not by ignoring them. Everything that does not involve a fix by the developer is just a hack that will result in other negative side effects. If you contact the developer with your problem, they can fix the app and you can go on using it normally. That's a win for everyone involved.

### **Manually Killing Apps**

First, note that many apps will close completely if you Back out of them rather than using the Home button.

If you are running Ice Cream Sandwich or Jelly Bean, you can go into Settings, hit Applications, and manually shut down the app by tabbing over to the running apps. Alternatively you can hit the Recent Applications button and swipe them off the screen to close them. In older versions of Android there may be a built-in Task Manager added by the manufacturer to accomplish the same thing, or you can download a task manager app to do so. For services, look at `Settings -> Applications -> Services`.

**WARNING:** Do *not* use automatic task killers! Automatic task killers run in the background (exactly what you don't want) and kill apps whenever they start. Most of the time this makes things worse, because apps often consume more resources when they're starting up compared to when they're sitting idle. Services that run automatically and are restarted by the system will be killed over and over, wasting your battery. Similarly, apps that receive system events known as Intents (such as network coverage and connectivity changes) will be killed every time they start up to receive an event. Nothing good can come of it.

A possible exception is automatic tasks that execute only when you, the user, perform a specific action. In essence, they're just making manual task management easier for you. An app like Tasker or Llama can be used to end activities when you switch apps, for example, ensuring they don't stay around in the background. Instructions for Llama:

> Create a new `Event`. Add the condition called `Active App`, and choose the status `App stopped or in background`. Choose the app you want to focus on. Next, add an `Action`. Select `Kill Application (root privileges)`, then select your app again.
>
> Now, whenever you leave the app, Llama will kill it.

### **Editing Autostarts and Intents**

As mentioned above, some applications may start when they receive Intents (system events). By using an app like Permissions Denied you can alter which permissions apps can request, which in turn limits which events they can receive. Or you can use an app like Autostarts (paid app) to edit specifically which Intents will be sent to which apps. For both solutions, you'll need root access.

Other options:

(Autostarts source code is also available here: https://github.com/miracle2k/android-autostarts)

**WARNING:** This can cause apps to stop working or inhibit *wanted* functionality. Proceed with caution, especially with critical system apps.

### **Freezing Apps**

You can use an app like Titanium Backup or App Quarantine to complete freeze apps so that they can't run at all. If you want to use them you have to un-freeze them first.

**WARNING:** Do *not* do this with critical system apps! Your device may fail to boot.

### **Put Apps into Hibernation**

Greenify (require Android 4.0+ and ROOT privilege) use a different approach called "Hibernation", from traditional "Freezing".

You can safely hibernate any non-system app you do not want it to run stealthily (via persistent services, broadcast receivers, alarms and so on), effectively equivalent to "freezing", while still keep all its entrances (launcher icon, sharing target, etc) and fully functional when you explictly run it, without the need to un-freeze it first.

**WARNING:** Do *not* hibernatize alarm clock apps, instant messaging apps, and other apps whose basic functionality relies on background mechanism (timer, system events, "push", etc) to work.

# The Bottom Line

Android is designed to take care of app management for you. In all but the most extreme cases you shouldn't need to worry about it. When there is a problem, we advise you to go for the simplest solution — uninstalling. All other solutions are hacks around what Android is designed to do. Maybe one day Android will have official support for managing services but, until then, be careful.
> 67 votes

# Answer
## Preventing app auto start after device reboot on Android 13+

Since Android 13 Google added a possibility to prevent apps from automatically starting after a device reboot:

> If the user places your app in the "restricted" state for background battery usage while your app targets Android 13, the system doesn't deliver the BOOT\_COMPLETED broadcast or the LOCKED\_BOOT\_COMPLETED broadcast until the app is started for other reasons. 1

This means that if an user restricts background battery usage for an app it can not directly start after a device reboot. But that require your phone to run Android 13 or newer (and that the manufacturer has taken over that feature from AOSP) and also the app has to target Android 13 or newer.

To enable the battery restricted mode open Android Settings -\> Apps (applist), select an app, open it's battery settings and change it to "restricted"
> 3 votes

---
Tags: applications, boot, task-management, services, auto-start
---


# Question
Title: Connect with Wi-Fi WPS PBC on rooted Android 12
Please note that I am totally aware that WPS is not secure, however, I still want to use it.

My phone is a rooted Samsung S20FE running Android 12.

I am looking for a way to connect to a Wi-Fi network accepting WPS PBC (push button) connections, since Google decided to remove this feature from Android. There are dozens of apps on the Play store which implement WPS PIN connections: https://play.google.com/store/search?q=wps%20wifi&c=apps&gl=us

All these apps propose usual pins, custom ones, null one, brut force, but I spent a lot of time reading descriptions and trying them, none propose the PBC feature !

I also checked on F-Droid, "WPS" request does not return anything.

Is there an app that allows to do that? Even if I have to download source code myself and run it from a terminal application?

Why all these apps are not implementing PBC? Is it prevented by the OS, even with a rooted phone, or are all these apps banned from the store?

# Answer
> 0 votes
Well, answering to myself:

I could find a python script running with Termux running a PBC session: https://github.com/drygdryg/OneShot#termux

I could install it with the installer script, I also had to install `openssl` with: `pkg install openssl`.

I finally used Termux:Widget and API to run a wrap script from the main screen and copy the PSK to the clipboard:

```
#!/bin/bash

cd ~

while true; do

    echo
    echo Launching OneShot in PBC mode

    sudo python3 ~/OneShot/oneshot.py -i wlan0 --pbc | tee wps.tmp

    if grep 'WPA PSK' wps.tmp ; then

        ssid=$( grep 'AP SSID:' wps.tmp | tail -1 )
        psk=$( grep 'WPA PSK:' wps.tmp | tail -1 )

        psk=${psk:14:-1}
        ssid=${ssid:14:-1}

        while true ; do
            sel=$(termux-dialog sheet -v "Copy SSID: $ssid,Copy PWD: $psk,Retry,Exit" | awk '/index/ {print $2}')

            case $sel in
            0)  termux-clipboard-set $ssid
                ;;

            1)  termux-clipboard-set $psk
                ;;

            2)  rm -f wps.tmp
                break
                ;;

            3)  rm -f wps.tmp
                am startservice -a com.termux.service_stop com.termux/.app.TermuxService
                #exit
                ;;
            esac

        done
    else
        echo
        echo "NOT FOUND, retrying..."
        sleep 3
    fi

done

```

---
Tags: wi-fi
---


# Question
Title: Android Market - Want to see Best Applications
Is there any way to see "Top Best (i.e. Top 10/50/100, etc.) applications" in Android Market as we are looking in AppStore ?

I means to say which applications/Games are famous amongst the people as "Angry Bird" is famous game in Appstore, applications may have either higher ratings or higher viewer, how do i come to know about applications in android market?

# Answer
The web Market and the Honeycomb tablet Market app now have a whole set of pages listing the "Top X Apps" for a whole set of definitions of "Top". I can't see any way to get to all of these categories in the current Gingerbread phone version of the Market app, presumably they have less screen room to show all of these different views.

Here are some direct links to the web Market's pages, if you're on a tablet most of these should show up as links on the Market app's home page:

## Apps

## Games

## Apps & Games Combined

To directly answer your question I would guess that most of the "famous" and "must-have" apps and games would show up in the "Trending" and "Editors' Choice" areas.
> 3 votes

# Answer
Appbrain.com allows you to view the android market and which apps are most popular, most downloaded, hottest... all within different time frames.
> 7 votes

# Answer
If you go into the Market on your phone, then navigate down to a category (*e.g.*, games | Arcade & Action) there are three tabs: Top paid, Top free, Just in (*i.e.*, new)

I don't know what they use for their algorithm beyond the star ratings, nor if it varies from how things are presented on the official Market website, but it does appear to be offering the top-rated/popular apps in each category.
> 2 votes

# Answer
The answers above work, however I want to add another fact. All those results are limited based on your accounts "country setting".

If you want to see for instance, the **app overview for Germany**, modify the URL like this:

https://play.google.com/store/apps?hl=de&gl=de

There you can still navigate, top, free, bestseller based on the country parameter

**Top Charts, Games, New Zealand:**

https://play.google.com/store/games?hl=en&gl=nz

where "hl" would be language in ISO language code ( works on all Google sites btw) and "gl" is the country you want to load
> 0 votes

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


# Question
Title: How can I prevent an app from interrupting audio playback of some other app?
I am using Duolingo to practice Japanese, and I'd be able to practice a lot more if I could actually do this while listening to music. Right now, when you get to the next question, it turns down the volume for all other apps, reads the question, and restores the volume again. This is annoying enough that it makes listening to music while practicing practically impossible for me.

Preferably I'd like to mute Duolingo altogether, but I'd settle for it not lowering the volume for other apps (NewPipe is what I usually use to listen to music, and which I want to keep playing at the same volume).

I saw this other question: how to have two applications play sound simultaneously?, from six years ago, which seems somewhat related, but which doesn't apply to NewPipe, and probably wouldn't apply anymore anyways, given the age of the question.

How can I achieve this? (I have a rooted phone, which might help, IDK).

# Answer
> 17 votes
You can set `TAKE_AUDIO_FOCUS` permission of that app to `ignore`:

```
appops set <PKG_NAME> TAKE_AUDIO_FOCUS ignore

```

Using Permission Manager X (PMX) this can be done conveniently for any app:

Disclosure: I'm the author of PMX.

# Answer
> 3 votes
If you have a Samsung phone then Sound Assistant has a `Multi Sound` option that can allow specific applications to be able to play audio at the same time as other applications.

Once you toggle it on then you will be able to select apps that can play audio regardless of whether another application is playing.

# Answer
> 0 votes
It's not the best solution but if you use YouTube music, y-music (which integrates with youtube music) has the option to ignore audio focus and so can play uninterrupted in the background with duolingo, which worked really well for me :)

---
Tags: applications, root-access, audio, music
---


title: Realme C15 stuck on bootloop

text:
# Question
Title: Realme C15 stuck on bootloop
I know this is stupid, but I was trying to install LineageOS to my device using TWRP, while following a tutorial. The os successfully installed, yet my phone boots to TWRP repeatedly. Because I was so desperate, I accidentally flashed the os to the recovery. As a result, the phone infinitely restarts on its own. I can't execute adb/fastboot commands on the device anymore. I felt very sorry for myself. Is there any workaround to this? My phone model is Realme C15 RMX2180

# Answer
> 0 votes
You should be able to boot into fastboot mode by holding the volume up and power keys (as is for Realme C20) or some other key combination different from the one for recovery. Then you have to flash a recovery image (TWRP or the stock one) using fastboot, and I guess you know what to do from there

---
Tags: rom-flashing, twrp, realme
---


title: Lync 2010 Problems - Android 11

text:
# Question
Title: Lync 2010 Problems - Android 11
I have installed Lync 2010 Mobile on my Samsung Galaxy A12 mobile phone. When I try to connect, it says "the Server Fails a Connection".

I set all required DNS server settings in my Windows Server 2012R2 DNS Server. Set the WIFI DNS to the Windows Server 2012R2. I installed the Mobility Service in the Server 2008 R2 Lync 2010 Server. Still, it will not work.

I **think** I read somewhere that you can change server settings by holding the Home button. Although that opens Google Assistant.

Can anyone please try to help me?

# Answer
> 0 votes
No idea, but maybe you've read to hold the options/multi-tasking button — it's an ancient way to open a context menu that nowadays is found under the three-dots button in UI.

---
Tags: applications, internet, android-11
---


# Question
Title: Accessibility and elderly people: Google backups preventing deletions by "helping" users
I have a disability and the person I share a home with helps me carry out since daily tasks every day. In order to enable this, I give this person my phone's password and get this person to manage several things on my behalf on my phone.

However, sometimes this person deletes my files. I haven't managed to convince this person not to do this. The excuse they use is often that what I write is stuff against this person or stuff that is a waste of time or of no importance.

In order to prevent me from losing my stuff, I would like to at least be able to back up my Google keep notes, and perhaps my Google drive stuff, to another Google account, such that only I have the password to this account.

However, I don't know whether there's an easy way to transfer everything to another account leaving what's there in place.

I have started emailing myself my WhatsApp conversations so that they don't get deleted, but sometimes stuff from my Google mail is deleted as well, and I would like to copy that to a second account as well.

It would be nice if Google offered another no-delete mirroring account.

How can I achieve what I am looking for.

I am sure there are order lone people with disabilities or old people out there who share this very same problem.

It would be nice if there were a way to do what I'm looking for, perhaps even a way backed up by Google.

I am using Google services on my Android phone. If this post is more suited for Super User stack exchange, then please migrate my post.

Thanks.

# Answer
I'm not sure this is the kind of thing you are looking for, but dfndr antivirus has a app lock feature. With this, you can choose some apps (let's say, whatsapp and your private e-mail) and put a different password/unlocking code, blocking the access from undesired users. I usually use it for banks - If my phone gets robbed, it is at least another step the thief needs to breach to reach out my money - but you can assign any app to it.

This is their page, on how to add apps to the app lock. I hope it helps you.

Also, I found this other app which seems to do the same thing - without having a whole antivirus attached to it. I didn't use it, but it seems to work...
> 0 votes

# Answer
Maybe your phone supports setting up multiple users. If that's so — you can setup a different user account with different password and install only the needed applications there. Then, the new account's password is shared with that person, and your main one is kept secret.

The other way is "app pinning". On some devices, you can enable this feature which lets you pin the application to the screen — it will disallow quitting or minimizing the application until the password is entered. This way, you can open the app yourself, pin it, and give it to the person. This way, you can keep your password a secret and don't allow the person to do anything other than what you asked for.

In the end, I believe you should really insist on that person not invading your life this way — it is toxic and destructive.
> 0 votes

---
Tags: gmail, google-account, google, accessibility, inbox-by-gmail
---


title: How to start service 'package' with ADB

text:
# Question
Title: How to start service 'package' with ADB
Using adb, I uninstalled some system apps on my device. Sadly, I uninstalled something important, and now the device is in a bootloop.

During boot there is a window of time which I'm able to login with adb. But when I try to reinstall the system apps:

```
adb shell cmd package install-existing --user 0 com.xyzname

```

I get this error:

```
Can't find service: package

```

I used to be able to run install/uninstall commands in this bootup window, but now the service 'package' isn't being started.

I tried looking up how to run services with adb, and I found some commands using `am`, but nothing pertaining to specifically running 'package'.

I need to get service 'package' to run. Begging for help here.

# Answer
> 1 votes
I had the same error and finally got it to work by adding `su -c`.

For your case, it should be:

```
adb shell su -c cmd package install-existing --user 0 com.xyzname

```

---
Tags: adb, system-apps, services
---


title: Determine ABI of installed app

text:
# Question
Title: Determine ABI of installed app
For a particular installed app (in my case, `com.android.chrome`), is there a way to tell which ABI is being used (e.g., `arm64-v8a`)?

I know I could launch the app and run `file` on `/proc/<PID>/exe` but I'm wondering if there's a way to do this by examining the app itself.

# Answer
> 5 votes
Modern apps installed from Google Play Store consist of multiple APK files (also known as split APK files). If the app contains native `.so` files those files are usually packed per-ABI (e.g. `armeabi-v7a` `arm64-v8a` `x86` or `x86_64`) and only the matching ABI file is downloaded and installed.

Therefore for some apps you can check the installed ABI by listing all APK files that belong to an app:

```
adb shell pm path <packagename>

```

Example:

```
package:/data/app/.../com.example.app-SO6ebvL9yDViMlHkHQ6NPw==/base.apk
package:/data/app/.../com.example.app-SO6ebvL9yDViMlHkHQ6NPw==/split_config.arm64_v8a.apk
package:/data/app/.../com.example.app-SO6ebvL9yDViMlHkHQ6NPw==/split_config.xxhdpi.apk

```

If the APK list contains an entry that ends with `arm64_v8a.apk` and no other APK file contains in it's file-name an other ABI name then you know that the `arm64_v8a` ABI version is installed and used.

Unfortunately this can only work for split APKs. And even for some split APK apps it doesn't work for an unknown reason - `com.android.chrome` is one of those apps that is a split app with platform dependent so files but none of the APK files have an indicator in the file-name which ABI is installed.

# Answer
> 4 votes
To add to @Robert's reply, if the application has no native libraries, it means it is platform independent, so you can get the ABI from `adb shell getprop ro.product.cpu.abi`.

In the other case, suppose you have a phone with `arm64-v8a` and `com.android.chrome` only has a native library for `armeabi-v7a`, you can run `adb shell pm dump <packagename> | grep primaryCpuAbi` and get the app's ABI.

Example:

```
$ adb shell pm dump com.android.chrome | grep primaryCpuAbi

    primaryCpuAbi=armeabi-v7a

$ adb shell pm dump com.example.platform.independent | grep primaryCpuAbi

    primaryCpuAbi=null

```

You can also try `adb shell pm dump <packagename> | grep -A 3 "Dexopt state:"`

Example `arm`:

```
Dexopt state:
  [com.example.nativelib]
    path: /data/app/~~ThisIsAnExampleAAAAAAA==/com.example.nativelib-ThisIsAnExampleAAAAAAA==/base.apk
      arm: [status=quicken] [reason=bg-dexopt]

```

Example `arm64`:

```
Dexopt state:
  [com.android.dialer]
    path: /system/product/priv-app/Dialer/Dialer.apk
      arm64: [status=speed-profile] [reason=bg-dexopt]

```

---
Tags: applications
---


# Question
Title: Is there a way to switch sound media from headphones to speakers?
The headphone jack suffered a wear that is causing the device to understand that there is a headphone connected (even if it doesn't exist), I've tried to do all the correct cleanings possible but it didn't fix it.

Notifications play perfectly on the speaker but media don't.

Is there any app or method to make this switch manually?

# Answer
It seems the easiest way to go is to use an app, like Disable Headphone Fix Earphone for example, to disable the headphone jack and make your audio only output from where you want.

My first instinct was to look at your audio profiles and disable it that way, but that way may not be as simple as it sounds possibly requiring you to put your device into "developer mode" to be able to access certain features your device may or may not have depending on your version of Android.
> 1 votes

---
Tags: audio, headphone-jack
---


title: Enable Dark Screen on Samsung

text:
# Question
Title: Enable Dark Screen on Samsung
I'd like to try out the dark screen mode on my Galaxy J7 max but the option has been greyed out and I was wondering why. Any clues? This option is found under Accessibility\>Vision

# Answer
> 1 votes
1. Make sure that your device is updated to at least Android 10.
2. Slide down the notification and settings shade.
3. Depending on how you've organized your system settings in the pulldown menu, you may need to swipe over a screen to see the dark mode setting (it has a moon icon).

# Answer
> 0 votes
If you turn on the talk back feature, dark screen will work but if you turn talk back off, dark screen stops working. I think this is because it was only made for the purpose of privacy for people who have bad vision and need talk back.

---
Tags: samsung, accessibility
---


# Question
Title: Is there a way to change the voice of the workout guide in Samsung Health?
It was a British lady with a lovely voice, and now it’s a US-American lady with a voice that frankly doesn’t appeal to me. I don’t see a way to change it, though. The phone’s language is set to British English.

# Answer
You have to install the voice package to the app and choose it. For example, if I Google search "Samsung TTS" I get a result for Samsung TTS Australian English Default voice 1 that I can install via the galaxy store. It's then just a matter of going to Settings, Controls, Language and input, Text-to-Speech options... then choose the voice you want.

Your probably after the Samsung TTS UK English Default voice 1
> 1 votes

---
Tags: languages
---


# Question
Title: How to use the camera in WSA in apps that don't support front camera?
I've been trying to get an app to work on WSA (Windows Services for Android) but it needs a back camera, the only options I found Googling were either involving root (which is something I prefer to avoid in that case) or unsupported in the Android version (and probably won't work in that case wither).
What can I do to use the camera on such apps?

# Answer
> 2 votes
I thought about that when I used an external USB camera, the Windows camera app treated it as a front camera and treated the built in one as a back facing camera, so I stopped WSA from the WSA settings, connected the external camera and started the app, sure thing, I could use my front camera in the app.
It treated it as a back camera.

---
Tags: camera, front-camera, wsa
---


# Question
Title: How to flash boot partition from the phone itself?
I already have Magisk installed by patching `boot_b` — the current boot partition. Therefore I have root privilege and can access it through the `su` command in Termux. The issue is that when I update LineageOS through OTA, it also updates the boot image, so I lose Magisk every time I update. And so, I need a computer to install it back every time I update (that is, every week or so).

I'm trying to get away with installing Magisk from the phone right after the update while I'm still on the rooted partition.

I've successfully extracted the updated `boot_a` partition using `cp /dev/block/by-name/boot_a /data/data/com.termux/files/home/storage/documents/boot_a.img`, patched it though Magisk, and now I'm trying to flash the patched image back with `dd if=/data/data/com.termux/files/home/storage/downloads/magisk_patched-25200_FyF2V.img of=/dev/block/by-name/boot_a`

But it says that operation is not permitted and refuses to do the thing:

```
dd: /dev/block/by-name/boot_a: write error: Operation not permitted
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.002583 s, 0 B/s

```

I find it strange since there are posts (, ) where people managed to do the same.

Again, I'm running the command in a root shell given by `su`. And, as you can see, the files' permissions are set to `rw` for the `root` owner:

```
# ls -l /dev/block/by-name/boot_a /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root       21 1970-07-16 15:34 /dev/block/by-name/boot_a -> /dev/block/mmcblk0p38
brw------- 1 root root 259,   6 2022-08-31 22:02 /dev/block/mmcblk0p38
# whoami
root

```

I've also set SELinux to `permissive` just in case, but it didn't help either:

```
# getenforce
Permissive

```

I've also found a great story in two questions (, ) from someone with a somewhat similar problem, and they determined it was the lack of some linux capabilities that stopped them from chrooting. So, I've also tried to find if I lack some "capability" to `dd`, and it seems I indeed don't have any capabilities on the `toybox` binary, which provides `dd`. Although, I have all 38 capabilities for the current process (the shell):

```
# ls -l `which dd`
lrwxrwxrwx 1 root root 6 1970-07-16 15:34 /system/bin/dd -> toybox
# getcap /system/bin/dd
# getcap /system/bin/toybox
# getcap /dev/block/by-name/boot_a
# getcap /dev/block/mmcblk0p38
# cat /proc/self/status | grep Cap
CapInh: 0000000000000000
CapPrm: 0000003fffffffff
CapEff: 0000003fffffffff
CapBnd: 0000003fffffffff
CapAmb: 0000000000000000
[ThisOneRan@PC]$ capsh --decode=0000003fffffffff
0x0000003fffffffff=cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
# cat /proc/sys/kernel/cap_last_cap
37

```

So, I've tried to set `cap_dac_override` for the `/system/bin/toybox` binary, but couldn't — it is read-only:

```
# setcap cap_dac_override+ep /system/bin/toybox
Failed to set capabilities on file `/system/bin/toybox' (Read-only file system)

```

Form running `mount | grep system` it turns out that not the `system` itself is mounted, but... Magisk's `system_root` bloack device to eash individual binary and stuff. So, I have remounted toybox as `rw`:

```
# mount | grep toybox
/dev/DBScy/.magisk/block/system_root on /system/bin/toybox type ext4 (ro,seclabel,relatime)
# mount -o remount,rw /dev/DBScy/.magisk/block/system_root /system/bin/toybox
# mount | grep toybox
/dev/DBScy/.magisk/block/system_root on /system/bin/toybox type ext4 (rw,seclabel,relatime)

```

This allowed me to `setcap` all capabilities:

```
# setcap all+ep /system/bin/toybox
# getcap /system/bin/toybox
/system/bin/toybox =ep

```

But even with this, I'm still not permitted to flash the boot image:

```
# dd if=/data/data/com.termux/files/home/storage/downloads/magisk_patched-25200_FyF2V.img of=/dev/block/by-name/boot_a
dd: /dev/block/by-name/boot_a: write error: Operation not permitted
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.001446 s, 0 B/s
# dd if=/data/data/com.termux/files/home/storage/downloads/magisk_patched-25200_FyF2V.img of=/dev/block/mmcblk0p38
dd: /dev/block/mmcblk0p38: write error: Operation not permitted
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000779 s, 0 B/s

```

At this point I've no idea what else to try, or where my obvios mistake could be, so please help me figure it out. Thanks in advance!

# Answer
Strange, but after a reboot to the same prefix, it allowed me to flash it without any "capabilities" and with enforcing SELinux. And everything worked perfectly as intended. I've no idea what caused it to not work on the first try, maybe I had to restart the shell?

Anyway, to boot into the same prefix on the next re/boot, you should set the active boot slot using `bootctl set-active-boot-slot `bootctl get-current-slot``
> 0 votes

---
Tags: rom-flashing, boot, terminal, magisk, termux
---


# Question
Title: SMS/call works when LTE is on but without it, it does not work. Why?
I recently removed my SIM and put it back in again. From then on my SIM does SMS and calls only when I turn on LTE in the mobile network section.

Even if internet is off it works with LTE. Why did this happen? What would happen if I put the SIM in another cell phone?

In my cellphone both call and SMS are gray and not active. Even if LTE is on they are off, but I do get SMS/call. What could be the problem?

# Answer
I am sure the others will help better, but in my opinion try to: set the network to automatically scan / choose available networks. Maybe the area lacks basic 2G / GSM signal? Or there is an issue with the phone / network provider. Just a few hints. Restarting the phone always helps.
> 0 votes

---
Tags: 4g
---


# Question
Title: How do I reflash both partitions of a Google Pixel 6 Pro device in one go?
How do I reflash both partitions of a Google Pixel 6 Pro device in one go?

If I follow the instructions at https://developers.google.com/android/images, I have to:

1. reflash the first, default partition (a or b) using flash-all.bat
2. return to the bootloader (which means either (A) turning the device off after it automatically reboots and booting back into the bootloader using the hardware buttons or (B) doing a "false setup" of the device (after it automatically reboots) and returning to the bootloader via Android's Developer Options screen and the `adb reboot bootloader` command
3. set the inactive partition to the active partition using `fastboot set_active a` or `fastboot set_active b`
4. reflash the second, remaining partition using flash-all.bat

Is there a way to combine these reflashing steps to make reflashing both partitions less troublesome?

(Note: My goal with reflashing both partitions instead of one is to eliminate malware, so simply nuking and regenerating both partitions from scratch would also be a workable solution, but I don't know how to do that either.)

# Answer
If you want to make a minimalistic effort and don't have much experience to modify your flash-all.bat script, just do this.

1. Run flash-all.bat on your existing boot slot.
2. Reboot the phone to fastboot on other slot:

`fastboot set_active other` (sets the currently inactive slot as active i.e. a =\> b or b =\> a)

`fastboot reboot-bootloader` (reboots the phone to bootloader/fastboot. If this does not work, then try `fastboot reboot bootloader`)
3. Rerun flash-all.bat; This time, it will flash your other slot.

Alternatively, depending on your experience and skill, you can embed the slot change and reboot-bootloader into the flash all script and then call the flash commands again. However, I think that the above steps will do the work without you needing time and effort to modify the flash sequence.
> 0 votes

---
Tags: adb, rom-flashing, google-pixel, google-pixel-6
---


# Question
Title: What is the difference between "USB-C to HDMI Adapter" and "MHL"?
When I search if Samsung Galaxy S8 supports MHL or not, I am getting crazy.

50% of online articles say S8 does not support MHL including mhltech.org link and technipages

Another 50% of online articles say S8 supports MHL.

It obviously supports **USB-C to HDMI Adapter** which is only one side with Type-C port and another side with HDMI port cable.

If S8 does NOT support **MHL**, what is the difference between "USB-C to HDMI Adapter" and "MHL"?

Does "USB-C to HDMI Adapter" have worse video output than "MHL"?

Thanks a lot.

# Answer
> 0 votes
It seems to me that Samsung in all their infinite wisdom decided people needed a DEX Station to put their S8 into to achieve this purpose, to push their own devices/accessories instead of someone else's.

---
Tags: hdmi, video-streaming, mhl
---


# Question
Title: Factory reset when enabling and disabling OEM Unlock in one session?
I accidentally enabled "OEM Unlock" on my old Pixel 3a. I instantly disabled "OEM Unlock" again. Will the phone forcefully factory reset when I reboot?

# Answer
I've finally decided to restart my phone. Robert was right, no factory reset has happened.
> 1 votes

---
Tags: factory-reset, bootloader-lock, google-pixel
---


# Question
Title: Android Phone's Homescreen Shortcut to File on OneDrive
I would like to put a shortcut on my Android phone's homescreen to a Word document file on OneDrive. When I touch the shortcut, the Microsoft Word app should open and allow for editing the file. If I save in Word, then the document should be uploaded to OneDrive online storage.

The OneDrive app allows me to put a shortcut (widget) to a folder but not a file. ES File Explorer allows me to put a shortcut to a file stored locally on the phone but not on a file stored on OneDrive.

I figure I need to download an app. Which app will work?

This question is similar except it is for Google Drive.

# Answer
It is possible to add a shortcut to your desired document on the Android Home Screen. To do this however, you have to have the Microsoft Office Apps, like Word and Excell installed. Then open Word and locate your document either locally or in One Drive. Click the three dots next to the document and select add to Home Screen.
> 1 votes

# Answer
Sure you can. Add a widget and select the folder you want, then Pin it.

**Source:** 10 Tricks to Make Yourself a OneDrive Master
> 2 votes

# Answer
Here is an all-purpose Shortcut Maker app.

After installing the app, go to Widgets by long-tapping the home screen and click on shortcut maker. Then add the required file from Onedrive.
> 1 votes

# Answer
If you have the Microsoft Edge browser then you get good integration with Office apps.

1. Get the url for the document by sharing it with some app or other.
2. Open the url in Edge.
3. Click the 'add to device' button.
> 1 votes

---
Tags: home-screen-shortcuts, onedrive
---


# Question
Title: Lenovo M8 Tab - how to auto hide 3 buttons navigation bar in Chrome fullscreen
I have selected 3 buttons navigation as System navigation in Settings on Lenovo M8 Tab with Android 10. Now I need it to hide automatically when not in use so that it is not visible in fulscreen Chrome. It was possible before on other tablets or lower versions. Is that somehow possible now?

# Answer
Only updated the Chrome and the problem went away, the 3 buttons navigation now hides automatically in fullscreen.
> 0 votes

---
Tags: tablet, lenovo, navigation-bar
---


# Question
Title: Google keep: Copying image from one note to another
I am using Google keep on an Android 11 device.

I am wondering how I can copy an image in Google keep from one Google keep note to another.

How can I do this?

I'm asking because I received an image via WhatsApp and could not share it to a specific already existing Google keep note but had to share it to new Google keep note.

So, I shared it to a new Google keep note.

However, when I selected the image by long pressing on it in Google keep, and then selected copy from the three dots in the upper right hand corner I could copy it, but then did not find the way of pasting it to the other note that already contained images there.

Thank you for your help

# Answer
> 2 votes
There is a possible workaround if you use Gboard as it can paste copied images.

1. Launch Google Keep and open the shared note (with image) you just saved. Copy the image.
2. Open the note where the copied image should be pasted. Press on the note to open Gboard, then paste the image.

---
Tags: images, copy-paste, google-keep, copying
---


# Question
Title: Get file from our app on a customer's device
I work for a company that developed an Android app, but since then the guys that wrote it have left. I am a beginner when it comes to Android development.

We have a situation where our customer has used the app and has data, but something has happened and the data can't be uploaded from the app (which it normally should do). The customer says the data is expensive and critical. We believe a database table has been corrupted.

I attempted to give them a build of the app which would download the file with the data, but when the link is tapped it gives the error "net::ERR\_ACCESS\_DENIED" because the file is in the app's protected storage (file:///data/user/0/com.mycompany.myapp/files/projects/projectname/data.sqlite).

I really am shooting in the dark as to what could be done to retrieve the file. Any suggestions?

Our app has `allowBackup=true` and `targetSdkVersion=31` in it's AndroidManifest.xml and the app is running on Android 12.

# Answer
My first thought was that when backup is allowed you should be able to extract the file using `adb backup` command. Unfortunately that no longer only works on Android since about 12 for apps that have a targetSDKVersion of 31 or newer.

Therefore there is only one way to get the file through a new app version:

My recommended way would be to implement a new feature into your app that allows to export the data from the app-private directory and save it e.g. to the "sdcard" section of Android.

Alternatively you could try to implement a totally new app that uses the same packageName/applicationId and the same APK signature key. The `versionCode` in AndroidManifest.xml must be higher than any version you have ever released. That new app only needs to have one button to start the copy process of the important database to the sdcard section. This app can then be installed manually as update so that the app-internal data is kept and can then be exported.
> 0 votes

---
Tags: applications, internal-storage, file-system, permissions
---


# Question
Title: What percentage of devices have each of the Android versions?
We're starting out with some Android development in our company, and I'm working out which Android versions we should support.

In one of Google's videos from 27th May 2010 (22:34 minutes in) there is a pie chart showing roughly a third of users each for Android 1.5, 1.6 and 2.1.

Does anyone have a more up-to-date source for the percentages of active Android devices with each version of the platform?

# Answer
Check out Official Android Developer's Dashboards.

**Data as of September, 2017** 1

| Version | Codename | Distribution |
| --- | --- | --- |
| 2.3.3-2.3.7 | Gingerbread | 0.6% |
| 4.0.3-4.0.4 | Ice Cream Sandwich | 0.6% |
| 4.1.x | Jelly Bean | 2.4% |
| 4.2.x |  | 3.5% |
| 4.3 |  | 1.0% |
| 4.4 | KitKat | 15.1% |
| 5.0 | Lollipop | 7.1% |
| 5.1 |  | 21.7% |
| 6.0 | Marshmallow | 32.2% |
| 7.0 | Nougat | 14.2% |
| 7.1 |  | 1.6% |

---

1 Data collected during a 7-day period ending on September 11, 2016. Any versions with less than 0.1% distribution are not shown. (Note: Beginning in September 2013, devices running versions older than Android 2.3.3 do not appear in this data because those devices do not support the new Google Play Store app. As of August 2013, devices with versions lower than 2.2 accounted for about 1% of all devices.)
> 81 votes

# Answer
As the Google dashboards page has stopped giving version percentages for some time, years to my memory, I thought I'd give an updated answer to this salient issue. First off, when you create a new project, on the screen where you enter your minimum sdk among other items there is a 'help me choose' link which will bring you to a list of android version use percentages, info similar to that given in the old dashboard pie chart. Also similar to the old dashboard chart, it is terribly obsolete.

Websites with current use version info include https://www.appbrain.com/stats/top-android-sdk-versions, https://gs.statcounter.com/os-version-market-share/android/mobile-tablet/worldwide, and https://apilevels.com/. The latter appears to give the most current numbers.

```
 Android Studio Chart - Obsolete

```

```
 apilevels.com - Current as of Jan 6 2022 on this writing Jan 23

```

I use the Pareto Principle, that roughly 80% of consequences come from 20% of causes, in determining the percentage of devices to support. In this case, 80% of the issues (and potential 1 star ratings) come from the bottom 20% of android API levels. I found this out the hard way starting out. My minSdkVersion is now 28, which still covers the top 78.4% of android versions according to apilevels. Coincidentally, android tends to support only the top 80% of API levels, so that could be another metric for the 80/20 maxim. Oreo is no longer supported.
> 3 votes

# Answer
Here's the latest from Android Studio. It appears to have been last updated on Aug 4th of 2022:
> 1 votes

---
Tags: android-versions
---