# Question
Title: How to power off Samsung A6 without screen
The screen on my Galaxy A6 is dead. Until I possibly get it repaired, I would like to shutdown the phone, mainly to stop the alarm which I cannot turn off without the screen.

I have seen plenty of instructions on how to force it to reboot (power + vol. down), and on how to hard reset it. But that is not what I want. I just want to turn the phone off.

(it would be easy if I could remove the battery, but that is not possible either, and I didn't think of checking that before buying that thing...)

# Answer
> 0 votes
You can take out the battery, as shown here:

https://www.youtube.com/watch?v=oVl9EGJdTHE

if you are willing to DIY

(You might need to go that route anyway, if you plan to replace the screen yourself -- which is probably much cheaper and faster than using a repair shop)

P.S. Actually, it's probably best to let the battery drain before opening the phone, but I'm not sure.

# Answer
> 0 votes
To shutdown a device with debugging enabled, run:

```
adb shell reboot -p

```

---
Tags: samsung, samsung-galaxy-a5
---


# Question
Title: Automatically turn off bluetooth discoverability
Bluetooth discoverability is meant to be active only when in the Bluetooth settings. But somehow Xiaomi MIUI changed that so it is always active. Is there some tool that will turn off the Bluetooth discoverability automatically? So whenever Bluetooth is activated, phone restarts or similar it will turn off discoverability?

There are tools like Bluetooth Settings but whenever the phone is rebooted or Bluetooth is restarted the discoverability is activated again.

Maybe there is something like Macrodroid (did not find an option in there) that could do this?

//edit: as comments cannot hold only few characters I am adding my unfiltered log output here that is written when I change the settings via the above tool (only lines that are not clearly from something else/repeating).

```
[ 11-01 23:41:57.281 23646:23646 D/BluetoothAdapter ]
enable(): BT already enabled!

[ 11-01 23:41:57.288   666:  666 D/vendor.qti.bluetooth@1.0-ibs_handler ]
SerialClockVote: vote for UART CLK ON

[ 11-01 23:41:57.289  1925: 2052 D/AdapterProperties ]
Discoverable Timeout:120

[ 11-01 23:41:57.289   666:  666 D/vendor.qti.bluetooth@1.0-wake_lock ]
Acquire wakelock is acquired

[ 11-01 23:41:57.289   666:  666 I/vendor.qti.bluetooth@1.0-ibs_handler ]
DeviceWakeUp: Writing IBS_WAKE_IND

[ 11-01 23:41:57.290  1925: 2052 D/AdapterProperties ]
Scan Mode:20

[ 11-01 23:41:57.293   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Received IBS_WAKE_ACK: 0xFC

[ 11-01 23:41:57.294   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD

[ 11-01 23:41:57.294   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Writing IBS_WAKE_ACK

[ 11-01 23:41:57.298 25175:25175 V//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1006: remote_handle_open: Successfully opened handle 0xffffffff for '":;./\createstaticpd:sensorspd on domain 0

[ 11-01 23:41:57.337   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE

[ 11-01 23:41:57.339 25175:25175 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:989: Error 0xfffffffb: remote_handle_open_domain: dynamic loading failed for chre_slpi on domain 0 (dlerror unknown error)

[ 11-01 23:41:57.339 25175:25175 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0x2c: remote_handle_invoke failed for handle 0xffffffff, method 5 on domain 0 (sc 0x5020000)

[ 11-01 23:41:57.339 25175:25175 E/CHRE     ]
Failed to deliver timestamp message from host to CHRE: 44

[ 11-01 23:41:57.379 25175:25176 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:989: Error 0xfffffffb: remote_handle_open_domain: dynamic loading failed for chre_slpi on domain 0 (dlerror unknown error)

[ 11-01 23:41:57.379 25175:25176 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0x2c: remote_handle_invoke failed for handle 0xffffffff, method 2 on domain 0 (sc 0x2000000)

[ 11-01 23:41:57.379 25175:25176 E/CHRE     ]
Failed to initialize reverse monitor on SLPI: 44

[ 11-01 23:41:57.379 25175:25176 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1925: Error 4b: adsp current process handle failed. domain 0

[ 11-01 23:41:57.381 25175:25176 V//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1006: remote_handle_open: Successfully opened handle 0xfbc6d8c0 for adsp_current_process on domain 0

[ 11-01 23:41:57.383 25175:25176 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1925: Error 4b: adsp current process handle failed. domain 0

[ 11-01 23:41:57.386 25175:25176 I/chatty   ]
uid=1000(system) chre identical 1 line

[ 11-01 23:41:57.389 25175:25176 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1925: Error 4b: adsp current process handle failed. domain 0

[ 11-01 23:41:57.416 25175:25175 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:989: Error 0xfffffffb: remote_handle_open_domain: dynamic loading failed for chre_slpi on domain 0 (dlerror segment 0 failed hash verification(0x0 B))

[ 11-01 23:41:57.416 25175:25175 D//vendor/bin/chre ]
vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:925: Error 0x2c: remote_handle_invoke failed for handle 0xffffffff, method 0 on domain 0 (sc 0x0)

[ 11-01 23:41:57.416 25175:25175 E/CHRE     ]
Failed to start CHRE on SLPI: 44

[ 11-01 23:41:58.297   666: 2648 I/vendor.qti.bluetooth@1.0-ibs_handler ]
DeviceSleep: TX Awake, Sending SLEEP_IND

[ 11-01 23:41:58.297   666: 2648 D/vendor.qti.bluetooth@1.0-ibs_handler ]
SerialClockVote: vote for UART CLK OFF

[ 11-01 23:41:58.300 23646:23646 E/bcr      ]
run

[ 11-01 23:41:58.302 23646:23646 D/BluetoothAdapter ]
enable(): BT already enabled!

[ 11-01 23:41:58.332 23646:23646 W/IInputConnectionWrapper ]
getTextBeforeCursor on inactive InputConnection

[ 11-01 23:41:58.343 23646:23646 W/IInputConnectionWrapper ]
getSelectedText on inactive InputConnection

[ 11-01 23:41:58.345 23646:23646 W/IInputConnectionWrapper ]
getTextAfterCursor on inactive InputConnection

[ 11-01 23:41:58.356 23646:23646 W/IInputConnectionWrapper ]
getCursorCapsMode on inactive InputConnection

[ 11-01 23:41:58.367 23646:23646 W/IInputConnectionWrapper ]
beginBatchEdit on inactive InputConnection

[ 11-01 23:41:58.367 23646:23646 W/IInputConnectionWrapper ]
endBatchEdit on inactive InputConnection

[ 11-01 23:41:58.380  1941: 1941 I/KeyboardViewUtil ]
systemKeyboardHeightRatio:1.000000; userKeyboardHeightRatio:1.000000.

[ 11-01 23:41:58.382  1941: 1941 I/AndroidIME ]
LatinIme.onDeactivate()

[ 11-01 23:41:58.383  1941: 1941 I/AndroidIME ]
LatinIme.onActivate() : EditorInfo = Package = by4a.bluetoothsettings : Type = Text : Learning = Disable : Suggestion = Show : AutoCorrection = Enable : Microphone = Show : NoPersonalizedLearning = Disable

[ 11-01 23:41:58.383  1941: 1941 I/Delight5Facilitator ]
initializeForIme() : Locale = [de], layout = qwertz

[ 11-01 23:41:58.400  1941: 1941 W/KeyboardModeManager ]
setInputView() : inputView = com.google.android.apps.inputmethod.libs.framework.core.InputView{9975614 V.E...... ......ID 0,0-1080,2135}

[ 11-01 23:41:58.400  1941: 1941 I/ConversationToQueryExtension ]
Conv2Query not enabled due to current app [by4a.bluetoothsettings] not in whitelist

[ 11-01 23:41:58.400  1941: 1941 I/ConversationToQueryExtension ]
onActivate() : Disabled by unsupported host app

[ 11-01 23:41:58.407  1941:24909 I/FederatedC2QExtension ]
Already registered manifest.

[ 11-01 23:41:58.407  1941:24909 I/FederatedC2QExtension ]
model for de/glowg_click_20190522 is not yet available

[ 11-01 23:41:58.407  1941:24909 I/FederatedC2QExtension ]
requesting model 'federated_conv2query_triggering_de_glowg_click_20190522'

[ 11-01 23:41:58.408  1941:24909 I/FederatedC2QExtension ]
no valid model for inferencing found, switching to baseline.

[ 11-01 23:41:58.411  1941: 3426 I/SP       ]
Syncing federatedc2q (20190522) with slices: [], metadata: false

[ 11-01 23:41:58.413  1941: 3426 I/SP       ]
Sync for federatedc2q succeeded in 4 ms: no changes

[ 11-01 23:41:58.413  1941: 3426 W/SP       ]
isDirectory returned false while listing files for /data/user/0/com.google.android.inputmethod.latin/files/superpacks/federatedc2q

[ 11-01 23:41:58.413  1941: 3426 I/SP       ]
GC for 'federatedc2q' (10) with ttl of 0 ms took 0 ms (0/0/0)

[ 11-01 23:41:58.414  1941: 3426 I/FederatedC2QExtension ]
Got no packs for locale: de

[ 11-01 23:41:58.447  1459: 4999 D/CompatibilityInfo ]
mCompatibilityFlags - 0

[ 11-01 23:41:58.447  1459: 4999 D/CompatibilityInfo ]
applicationDensity - 440

[ 11-01 23:41:58.447  1459: 4999 D/CompatibilityInfo ]
applicationScale - 1.0

[ 11-01 23:41:58.447   666: 2440 D/vendor.qti.bluetooth@1.0-wake_lock ]
Release wakelock is released

[ 11-01 23:41:58.460  1459: 4999 D/CompatibilityInfo ]
mCompatibilityFlags - 0

[ 11-01 23:41:58.460  1459: 4999 D/CompatibilityInfo ]
applicationDensity - 440

[ 11-01 23:41:58.460  1459: 4999 D/CompatibilityInfo ]
applicationScale - 1.0

[ 11-01 23:41:58.708   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD

[ 11-01 23:41:58.709   666: 2642 D/vendor.qti.bluetooth@1.0-ibs_handler ]
SerialClockVote: vote for UART CLK ON

[ 11-01 23:41:58.713   666: 2642 D/vendor.qti.bluetooth@1.0-wake_lock ]
Acquire wakelock is acquired

[ 11-01 23:41:58.713   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Writing IBS_WAKE_ACK

[ 11-01 23:41:58.734  1459: 1543 D/CompatibilityInfo ]
mCompatibilityFlags - 0

[ 11-01 23:41:58.734  1459: 1543 D/CompatibilityInfo ]
applicationDensity - 440

[ 11-01 23:41:58.734  1459: 1543 D/CompatibilityInfo ]
applicationScale - 1.0

[ 11-01 23:41:58.755   666: 2642 I/vendor.qti.bluetooth@1.0-ibs_handler ]
ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE

[ 11-01 23:41:58.755   666: 2642 D/vendor.qti.bluetooth@1.0-ibs_handler ]
SerialClockVote: vote for UART CLK OFF

[ 11-01 23:41:58.797  1459: 2397 D/CompatibilityInfo ]
mCompatibilityFlags - 0

[ 11-01 23:41:58.797  1459: 2397 D/CompatibilityInfo ]
applicationDensity - 440

[ 11-01 23:41:58.797  1459: 2397 D/CompatibilityInfo ]
applicationScale - 1.0

[ 11-01 23:41:58.905   666: 2440 D/vendor.qti.bluetooth@1.0-wake_lock ]
Release wakelock is released

[ 11-01 23:41:58.980  1459: 1469 I/system_server ]
NativeAlloc concurrent copying GC freed 160321(7MB) AllocSpace objects, 30(1272KB) LOS objects, 36% free, 41MB/65MB, paused 276us total 182.281ms

[ 11-01 23:41:59.527  5981: 5981 I/PowerKeeperBackgroundService ]
onStartCommand()

```

# Answer
> 2 votes
In my OnePlus 6 running Android 9.0, changing the value for the system key (for Settings) `bluetooth_default_scan_mode` toggles the discoverability of bluetooth. Value `21` to disable, `23` to enable.

MacroDroid has a trigger named *System Settings* under *Device Settings* category, and after selecting *System* in the list there, you can set the key-value. Unfortunately, for some reason I didn't investigate into, MacroDroid failed to work in this case. In turn, I resorted to Tasker which also allows changing custom settings.

In Tasker, the action under a task should be: Settings → Custom Setting:

* Type: System
* Name: *bluetooth\_default\_scan\_mode* or pick a related one using lens icon and test it out
* Value: 21 or 23 or whatever you found

Save the task and assign it to a profile of your liking. A profile is a trigger in MacroDroid terms.

---

I used to find out the key-value corresponding to the discoverability of bluetooth. You can use it if you fail to find the key-value for your device. Here's what I did:

```
adb logcat  SettingsProvider:V *:S -v long   # to find the key
adb settings get system KEY                  # to obtain the value of the key. You would have to get the value for both cases

```

---
Tags: bluetooth, miui
---


# Question
Title: How much RAM should I allow an app to use, and how much should I always leave free?
I have a chess app on my 2012 Nexus 7 (running stock Android 4.3, with a few small background services) that allows me to set the size of an internal hash table used by the chess engine. Larger hash tables increase the performance of the chess engine, but it is ultimately limited by the RAM available on the tablet. Typically, the Settings app indicates that around 450-500 MB of RAM is free.

How much memory should I allow the app to use, and how much should I leave free for the system? As I don't want to change this setting too often, can I rely on this amount of memory being available every time I use the app? (Note that the amount of memory used must always be a power of 2.)

The other questions and answers I've read haven't really answered this question, so I don't believe this is a duplicate.

# Answer
> 4 votes
If you've read around, then you'll already have read that the idea of "free RAM" is a bit of a nonsense for Android. PC operating systems take an app out of RAM as soon as you quit it, which leaves empty space that the PC probably has to spend power on filling again afterwards - probably with the same app next time you run it. Android tries to avoid this waste by leaving apps in memory after you stop using them or after they finish running, so that they're ready to run again next time. If it needs more RAM for an app, only then does it get rid of these *cached processes*.

Android will first get rid of cached processes, based on how soon it thinks it's going to need them again. If it still needs more RAM for the foreground activity, it'll get rid of background *services* (which sync your email etc. but aren't directly visible). If it still needs more RAM, it'll get rid of activities that are directly accessible but aren't currently visible, such as the launcher, the activity you'll go back to when you press *back* (maybe even in the same app as the activity that's running), or the greyed-out activity that's partly visible behind a dialog. This way, even if you have no free RAM, Android can free up quite a lot of RAM for the foreground activity: all the RAM on the device, except that needed by Android itself.

I suggest to work out the best setting using trial and error. Without more knowledge of the app, I can't predict the effect of having the setting too low: perhaps the AI will make worse moves, or take longer to decide. If the setting is too high, you'll notice that when you leave the chess game you have to wait for the previous app to launch: this is particularly noticeable when it's the launcher, and you get a spinning progress indicator instead of the list of apps.

If this were one of my apps, I'd consider this a bug. It's bad form to give the user a setting with no way to know what value to set. The app has more information about how much RAM the device has and can make available than you do: it should decide itself.

# Answer
> 0 votes
If an Android app provides a way to configure the amount of RAM used to trade RAM for lower CPU requirements the only way to decide the "correct" amount is to try different values and scale the value down if the whole system gets too slow.

As explained by Dan Hulme, Android will automatically close apps until the foreground app gets the RAM it needs. If your chess app eats nearly all the memory, the whole system will get slow because it will be constantly closing apps and restarting apps to e.g. check if you have new mail and to check if you have new facebook notifications - when RAM is low both cannot be done in paraller but both apps will repeatedly do their thing so Android will end up stopping and starting those apps all the time. Note that stopping and starting apps eats lots of battery even if you didn't have visible performance problems.

Note that the correct setting depends on the other apps you're running on your device. I'd start with 100 MB and test the performance. Then test 50 MB and 200 MB and see if either value makes the chess program faster without slowing down the overall system performance.

---
Tags: nexus-7, ram
---


# Question
Title: Error after error in booting and in recovery mood
My tablet brand is ASUS and its android's version is 5.0.1. It shows many error likes `Unfortunately com.android.setings has stopped`, `Unfortunately UI has stopped`, `Unfortunately Launcher has stopped` frequently. Sometimes when I restart it, it doesn't show my desktop. Also its reset to factory doesn't works properly (it just reset the time of tablet).

I have cleared the cache and data of `setting` but errors persists.

So I decided to `recover` my android. After holding power button and + volume, I chose `recover` option and it got to the recovery page. after 5-7 seconds the error appeared with death android icon and just the word "error" as its caption.

> How to recover my android? what files I need? What is the adb?

Please note that my (android of) tablet is not longer supported by ASUS Inc. Also I have reset my android to factory setting 1 month ago successfully.

# Answer
I have downloaded My tablet driver from ASUS website and then the following `ADB` command in boot menu resolved the problem completely. (notice that it removes user data I think!)

```
adb sideload <filename>

```
> 0 votes

---
Tags: recovery-mode, installation, system-error
---


# Question
Title: Quick charge adapter on not supported devices
The adapter which comes with my new phone has `Qualcomm Quick Charge 3.0` label on it. The output reads: `5V-3A / 9V-2A / 12V-1.5A`. Is it safe to use it with my old phones? For example, if I have a very dated phone which only takes 5V-0.5A, will the adapter outputs 12V and fries it? And what would happen if I use that adapter with devices supporting fast charging technologies from other companies: `USB-PD` from USB-IF, `Pump Express` from Mediatek, `VOOC` from Oppo, and `SuperCharge` from Huawei?

# Answer
> 0 votes
* > Is it safe to use it with my old phones?

It is safe. See what happens if you plug a non QC 2.0 device into a QC 2.0 charger?

* > And what would happen if I use that adapter with devices supporting fast charging technologies from other companies.

They all are *proprietary* technologies which vary in terms of what is changed to charge fast - Voltage, Current or both, apart from other factors. Details obviously are not in public domain. Therefore, they are not *guaranteed* to work on devices using other technologies, so one cannot predict whether it works or not.

OEM's don't recommend such practices. YMMV

---
Tags: charging
---


# Question
Title: How to get fast charging diagnostics information
I want to find out what type of Fast Charging is supported by different combinations of Android device, cable and charger.

I have a variety of devices, from different manufacturers and with different Android versions; a selection of USB chargers with different rated voltage and current outputs; and a miscellany of USB cables and adaptors. I want to work out which ones to use to get the fastest charge rate for each. Also, I would like to be able to decide which new chargers/powerbanks to buy for best compatibility. I understand that there are various different methods of Fast Charging (as explained at battery - How does fast charging work?). Unfortunately, the documentation supplied with my devices is pretty sparse.

Is there some way (an app, diagnostic screen, API call, etc.) that I can get my devices to tell me some of the following:

* Which fast charging standard(s) does the Android device support (e.g. Qualcom Quick Charge 2.0, USB Power Delivery 3.0, etc.)?
* Which fast charging standard(s) does the connected charger support?
* What standard is actually in use?

Alternatively, are there any good rules for inferring what standard is in use from the current being drawn?

I have seen various apps that display the charging current, but the ones I have tried haven't displayed information about the standard being used.

This question is similar to How do I know that a charger is a Turbo Charger for my Moto, but I want to know about the supported standards, not just "am I fast charging?". Also, I would like some way of interrogating the hardware, rather than having to google the specs for each device and charger separately. For clarity, I am only interested in wired USB charging, not wireless.

# Answer
> 1 votes
AFAIK, no, it's not possible. Reasons :

* Android only tells you the levels at which the device is considered to be charging normally or fast charging. This was based initially on current and now on power in watts. See Andrew's answer and also my answer there.
* There are at least 5 *proprietary* fast charging technologies and obviously all details are not made public. Recognizing the device, the type of charging is a complex interplay between battery, charger and OS and is charging technology specific (whether current or voltage or a combination of both is used to charge fast) . The device may /may not recognize and notify if a different technology charger is used.
* Even within the same technology, there can be variations; for example Qualcomm 2.0 increases current while Qualcomm 3.0 increases power (product of current and voltage).

IMO your mission would need you to have rooted devices, see the levels at which charging normally or rapidly is determined (first bullet point) and determine, if you can, from the system files what type of technology is used. It's easier to Google. To the best of my knowledge, there is no app that can help ( I may be wrong here, haven't updated myself)

---
Tags: charging
---


# Question
Title: Google apps (Gmail, Maps, Play) don't work when on data connection (Android - Pocophone F1)
lately and seemingly out of nowhere my phone has stopped updating Gmail when on data, even when I manually try to synch. Google Maps and Play also won't work, although everything else does, like Reddit or Chrome. When on WiFi, no problems whatsoever.

I am using a Xiaomi Pocophone F1, running MIUI Global 10.3.8 / Android 9 PKQ1.180729.001.

This has been going on for weeks. So far I have tried erasing the affected apps' cache to no avail, and removed my Google Account from my device. When I tried this last step and tried to sign back in, I got a message saying "There was a problem communicating with Google servers.", so it didn't help either.

Any help would be hugely appreciated as I feel like this is way beyond my capabilities!

# Answer
I followed several online troubleshooting guides for similar problems but nothing worked. In the end, I had to resort to a factory reset, and that sure fixed it.
> 0 votes

---
Tags: google-account
---


# Question
Title: Dropbox app not installed, but there is log activity in /data/system/dropbox
I don't have Dropbox app installed nor DropBox account, but whilst checking log files I've found that there is a `/data/system/dropbox` directory with log files from, I think, the last time I rebooted my phone.

Why might this present? Is it possibly symptomatic of some kind of malware?

# Answer
> 21 votes
`/data/system/dropbox` is not part of the cloud storage provider "Dropbox". It is part of the Android OS DropBoxManager (not related at all to "Dropbox", just happen to have the same name).

This puts data from application crashes and kernel logs and such in this log directory. I know the market app uses this directory (See #4) as well, probably to report application crashes.

You could probably remove the data in this directory, but do **not** delete the directory and you may see logcat errors from parts of the OS/Apps looking for specific files in this directory.

I deleted everything from this folder and rebooted my device afterward, I had no issues with any applications, and it actually freed up some space on the device.

# Answer
> 4 votes
As already answered, what you find in this folder are logs for events or crashes of the Android system. You could open those with a text editor and try to figure things out. All can be safely deleted, but the directory will get populated again as time goes by.

```
settings put global dropbox_max_files 9

```

If you are rooted (or via `adb shell` \- thanks @Irfan Latif) you can issue the command above to limit dropbox files in that dir to 9 (or any other number you prefer). You will only see only latest n events, older get overwritten.

For me, 9 is a good compromise that let me see i.e. latest app crash event, without filling that dir with hundreds of small files. You will not run into any issues by setting that to 0, but you will not be able to see potential errors/crashes (silent or not) in apps that could be worth investigating and fixing.

---
Tags: logging, dropbox, malware
---


# Question
Title: How much privileged GMS Core is in the Android Stack?
The GMS Core has a ton of capabilities and doesn't seem to perform like a typical application (as in an Application living in the 'Applications' layer shown below). I would assume it would have more privileges and potentially live in the Android Framework layer or the same place as the 'Core Libraries' mention. However, I noticed a `u0_a12` UID (not `root` or `system`) was attached to the `com.google.android.gms` process indicating that it's a user owned application. Can someone elaborate on this a little?

# Answer
> 7 votes
Android reserves UID range 10000 to 19999 for apps - user, system or framework. `u0_a12` doesn't indicate a user owned application, it simply means UID `10012` which can be assigned to any app. On Android every app is assigned a unique non-zero UID. No app can run with root privileges, including system apps.

UID 0 (root) is the privileged user in Discretionary Access Control (DAC) but be noted that even a process running with UID 0 can be non-privileged or one with non-zero UID can be privileged. Refer to Linux capabilities, particularly Ambient Capabilities.

However Android's Java framework doesn't rely directly on DAC very much, it has its own privilege control mechanism through permissions e.g. Storage, Camera, Internet etc. Manifest permissions have different Protection Levels. Some are granted without asking user, some others require user's approval to be granted or denied and some are reserved only for system use. For more details please see this answer.

Google Mobile Services (GMS) make use of both; application layer and some features only available to framework/system/privileged apps. For instance Play Services has `android.permission.INTERNET` which is granted to every app that requests for it. But it also has `android.permission.READ_LOGS` () which has protection level `signature|privileged` and can't be granted to user installed apps. Similarly GMS Core has unrestricted internet access even in *Data Saver* and *Battery Saver* modes () which is also possible only for framework apps.

---

**RELATED:**

---
Tags: google-play-store, google-apps
---


# Question
Title: How to determine if my phone supports AndroidOne?
The HTC U11 Life got my attention when I saw **androidone** printed on its back. Now I got one, but this one doesn't have the **androidone** print on its back. Are there two versions of the phone, one to support **androidone** and another that doesn't?

Is there a setting I can check that would clearly tell me whether my phone supports **androidone** or not?

It came with Android 8.0.0 and it says there are no Software updates available...

**Update:** According to the HTC website there are indeed two versions of the phone: one such and another with a (T-Mobile) suffix. Upon booting the phone there is a T-Mobile screen, thus it looks like I’ve got the T-Mobile version. The question remains though: is this version of the phone not part of the android one program?

# Answer
There is indeed a variant of the HTC U11 Life that does not have the Android One branding:

> the American variant of the same phone does not have the Android One branding

The answer to my question should therefore be: if it isn't labeled **androidone** on the rear, it's not in the Android One program.

I will generously assume that the vendor, who marketed the phone with Android One, was also confused by the HTC marketing strategy for this phone. They can take it back though.
> 0 votes

# Answer
This article states that:

> Android One is a Google-devised programme for hardware manufacturers making smartphones. Being part of Android One - and labelled as such on the rear of the phone - brings with it a guarantee that it's a solid and stable version of Android that's not loaded with other apps, services and bloatware. Essentially, it's a stock Android experience.

Your device is an Android One as shown here, here and here.

> With Android One, your device will receive up to two years of upgrades to the latest version of Android.

In North America, it was released with Android 7.1. It came already installed with Android 8 in some parts of the world of the world and is upgradable to Android 9.

> Is there a setting I can check that would clearly tell me whether my phone supports androidone or not?

There is no such setting.
> 2 votes

---
Tags: htc, android-one
---


title: /sdcard/alt_autocycle - what is it?

text:
# Question
Title: /sdcard/alt_autocycle - what is it?
I have an empty folder called `/sdcard/alt_autocycle`.

1. What creates it?
2. What is it used for?
3. Can I delete it?

# Answer
> 2 votes
This folder is created by CQA-Test. It has a service called com.motorola.motocit.alt.altautocycle

---
Tags: file-system
---


# Question
Title: Writing 'partition' Failed (remote failure) error, when flashing from fastboot
A couple of days ago, I got an error on my phone (Motorola Razr HD xt925) saying that it cannot load the home screen. So, I restarted it in order to resolve the issue. However, it didn't reboot and since then it has been stuck in the Motorola logo.

* I tried to do recovery or factory reset, but all the options lead to the same Motorola logo with no luck.
* The only option that is working is **AP Fastboot**. I managed to unlock the bootloader by getting an unlock code from Motorola's website and using the **mfastboot** command. So I assume that the fastboot command is working since it detects the devices; however, I couldn't make ADB command to work since it give the error: 'device not found'.
* Anyway, the second step is to flash the phone. According to this question, I should be able to do that. However, when I am running the command `fastboot flash partition gpt.bin`, I am getting the following result:

```
(bootloader) Variable not supported!
target max-download-size: 30MB
sending 'partition' (32 KB)...
OKAY [  0.022s]
writing 'partition'...
FAILED (remote failure)
finished. total time: 0.154s

```

I have been searching for days to solve this problem, but nothing yet! I don't know which part I am doing wrong.

# Answer
Use Motorola root toolkit. From here, give a try to mfastboot-v2, then post your results.
> 1 votes

# Answer
This step is not necessary just leave it and continue other steps if more steps fails then you should use your lastly updated ROM version... You can't flash lollipop ROM on marshmallow bootloader...flash stock marshmallow ROM or your current rom using mfastboot v2...
> 0 votes

# Answer
The Remote failure is simply causing for flashing an old/incompatible gpt.bin file.
> 0 votes

---
Tags: fastboot, system-error, motorola-droid-razr
---


# Question
Title: Are Android updates signed with Google's private key or other signing techniques?
I noticed that Android pops automatically for new updates and patches.

Are these updates signed so that the device knows it's from the official publisher and not from some server spoofer?

# Answer
> 2 votes
## WHO SIGNS ANDROID PLATFORM COMPONENTS?

As explained very well in @MechMK1's answer, Google is the main contributor to AOSP development. But AOSP isn't the only software on Android devices, there are a number of hardware specific pieces of code. Above all there is kernel (based on AOSP's common kernel source), but that must be open-source due to GPL, so OEMs/SoC vendors are bound to release source code. However other parts, particularly userspace HALs which include a large part of hardware drivers, and the bootloader firmware which is loaded prior to kernel in boot chain are completely closed-source in most cases (intellectual property of OEM/SoC vendor). So the software on Android devices we know of is at least AOSP + kernel + HALs + bootloaders (and other SoC firmware).

OEMs get a copy of AOSP release from Google free of cost (theoretically; in actual they are bound in contracts), add their proprietary code which may also unnecessarily replace AOSP code (e.g. to change visuals) and add new apps/features, build the ROM and release that with device (or as OTA update package later on). The keys - which are used to sign system/framework apps and update package afterwards - are built/defined during ROM compiling process which is carried out by OEM, so OEM owns private keys. This ensures that core components of OS don't get any future updates from untrusted source. Mostly OEMs also add Google's proprietary Play Services and other apps (GMS) already signed with Google's private keys so that those get updates directly from Google.

## ANDROID ONE:

Android One program was slightly different in the beginning. A quote from For the next five billion: Android One:

> *"To help ensure a consistent experience, Android One devices will receive the latest versions of Android directly from Google."*

But their vision of pure Android on devices with strict hardware requirements wasn't appealing to OEMs, so within a year they had to tweak Android One strategy and the plan switched to:

> *"Android One phones receive the latest version of Android from Google’s hardware partners. Google’s partners send updates based on their schedule - trying to get them to you as soon as possible."*

<sup>* Quoted from Google's update support page, now removed.</sup>

The long story short, OTA updates - whether related to hardware or to Android framework - come from OEMs. They build it and sign it with their keys. Google signs either OTA updates only for their own devices (e.g. Pixel), or the proprietary apps (e.g. Play Store) just like any app developer.

Also for A/B updates:

> *"For devices using Google's OTA infrastructure, the system changes are all in AOSP, and the client code is provided by Google Play services. OEMs not using Google's OTA infrastructure will be able to reuse the AOSP system code but will need to supply their own client."*

AOSP's System Update APIs (`update_engine`) by-default use Google's root CA (`/system/etc/security/cacerts_google`) to establish `https` connection with (Omaha?) update server. But OEMs are free to modify the code. In each case OTA client app, system daemon and update server are managed by OEM.

## VERIFIED BOOT:

On production devices `release key` is used to sign the update `.zip` file and possibly some apps as well. Its public key pair is saved on device in `/system/etc/security/otacerts.zip`, used to verify the cryptographic signature of update package. But additionally there is another signing mechanism available on many devices since Android 5, that is **Verified Boot** (`dm-verity`). OEMs use RSA key pair as a part of (A)VB mechanism. Private key is used to cryptographically sign the hash tree of whole `/system` partition, while public key (`/verity_key`) is stored in ramdisk (inside `boot.img` on non-SAR devices) or kernel's system keyring, which verifies the integrity of `dm-verity` mapping table (metablock) appended after last filesystem block at the end of `/system` partition. `dm-verity` table (hash tree) in turn verifies whole `/system` partition by matching hashes. This is to protect `/system` from any unintended modification by malware or user e.g. by mounting R/W.

During block-based OTA update a binary patch is applied to whole `system` partition block device file. This patch is generated by taking a binary difference between old and updated `system.img`. Updated table must be signed by the same private key owned by original ROM developer, otherwise `dm-verity` would fail. In the same way `dm-verity` protects `/vendor` and `/odm` partitions. `boot` and `recovery` are signed by another key, either manually provided or built with application bootloader or saved to some other secure location. So it's only the OEM who ensures this chain of trust during boot process, creates all of the keys initially and later on signs and sends OTA updates.

# Answer
> 3 votes
> Are updates digitally signed before being shipped?

Yes, updates are cryptographically signed by the publisher. This is to ensure the integrity of the update, both from unintentional corruption during the transmission, and willful manipulation from an attacker.

> Who signs the updates? Is it Google?

That depends on who publishes updates for your phone. If you own a Nexus or Pixel phone, then the update is likely published and signed by Google.

Other manufacturers, such as Samsung for instance, modify Android before shipping it. This may include their own system applications, their own launchers, etc.. In such cases, the manufacturer is the publisher of the update and thus responsible for signing it.

> But isn't Google the one who develops Android?

It's not Google alone, it's the OHA \- Google just happens to be their most prominent member. Furthermore, Android is Open Source, meaning that contributions come from many different companies and individuals, not just Google.

---
Tags: device-firmware, updates
---


title: Setup VPN access through SSH

text:
# Question
Title: Setup VPN access through SSH
I have a Samsung S4 with last kitkat update. I would like to set it up so that I can access my University services. For that, when I use my laptop, I just set up a ssh tunnel like:

```
ssh -D 8081 -f -C -q -N work_machine.edu

```

I wonder if this can be done in android and how, or if there is any app for doing this. I had a look to some VPN apps but found anything useful.

# Answer
The command you typed just does dynamic port forwarding through SSH connection. That's equivalent to SOCKS5 proxy. But you need to redirect your traffic towards this tunnel using VPN or `iptables`. Latter requires root access.

One such free and open-source app which makes use of VPN is SocksDroid. SSH tunnel can be created using some GUI or CLI app like Termux. For more options see How to set up a socks5 with Android cli?
> 0 votes

---
Tags: ssh, vpn
---


# Question
Title: How to install EdXposed on Android 10 without triggering safety net
Further to this question What are the alternatives for Xposed framework on Pie? Preferably without triggering Safety Net?

**How does one install EdXposed on Android 10?**

**Notes:**

1. This is a self answered question consolidating information from several threads on XDA / Github and my experience on Oneplus 7 to give a helpful start to that dying breed who like to install modules . Edxposed is still in beta and Android 10 is recently released, so there would be many changes to this answer in future. Since I do not intend to update this answer with developments, others are welcome to add and modify. Moderators are welcome to make this a community wiki if warranted.
2. Answer is generic in nature and for issues relating to installation / modules you are better off asking in respective device/module threads in XDA.

# Answer
> 16 votes
is de facto dead , the last update being more than two years ago and that too for Oreo and there is no news of further updates.

EdXposed , being open source is a preferred alternative for me and hence this answer. EdXposed *officially supports Android 10* (Incidentally,some Xposed modules were working in earlier versions of EdXposed too) .

**Pre-requisites** (need to be updated from sources or as prompted by EdXPosed manager).

**Installation**

* Obviously you have a rooted device running Android 10, with Magisk installed.
* Install Riru-core module first.
* YAHFA or Sandhook drivers. YAHFA is relatively slower but stable by most accounts compared to Sandhook. You would need to check XDA for what works best for your device/Android version. For me, it has been YAHFA on my earlier and current device. These can be installed directly if using Magisk 20.2 plus

**Note:** Prior to 29 February 20,YAHFA /Sandhook modules available on Magisk repo required patched drivers / custom Magisk. This was a little tedious and the process is at the end of the answer, retained for history and not applicable anymore (hence strike through text)

* Reboot, install EdXPosed manager , add Android 10 ready modules and profit!

**Does it pass Safety Net?**:  ~~**Yes**~~

**Edit:** Not anymore. Please see Magisk will fail Safety-Net hereafter. Why?

**Notes**

* Xposed module development isn't what it used to be so there are only a few Android 10 ready Xposed modules. The ones I care for and Android 10 ready are:

```
* [XPrivacy Lua](https://forum.xda-developers.com/xposed/modules/xprivacylua6-0-android-privacy-manager-t3730663). This works beautifully with the same module that worked on earlier Android versions.

```
* Ill advised as it may be, one may be tempted to try other modules too. If they work, please update here. But if they don't work and create freezes, reboots , system lags (pretty common symptoms), you need to disable those modules without a nuclear . To do that you have two methods available:

1. Magisk Manager for Recovery Mode (mm). This module can be installed directly from Magisk but *it will not work* because it hasn't been updated to support Magisk versions beyond 19. You need to boot into TWRP (if TWRP is not permanently installed) and sideload the module. Next,from the recovery terminal run  `mm or sh /sdcard/mm` and disable all modules or the offending module and reboot.

2. Grant shell privileges to Magisk (this would have security implications, I guess) . Source

> The best way is to grant shell su privileges with magisk in advanced by doing `adb shell` then `su` . Magisk will then ask to grant root to shell and you can use it even while bootlooping. If you were to bootloop you'd then run `adb shell` then `touch /data/adb/modules/riru_edxposed_sandhook/disable` (or YAHFA )

3. There is a tool on XDA that may help (not tried by me).
4. From Ronan's comments (thanks)

> Don't forget that if a module does boot loop you, you can delete the EdXposed module via TWRP. Just go to the file manager and head to `data/adb/.magisk/modules`

* Other tips as mentioned here may be useful.

Happy Xposing !

Screenshots from OnePlus7 running stock Android 10 (Click to enlarge)

\[\]\[1\] \[\]\[2\] \[\]\[3\] \[\]\[4\] \[1\]: https://i.stack.imgur.com/hNmZ4.jpg \[2\]: https://i.stack.imgur.com/BOMNC.jpg \[3\]: https://i.stack.imgur.com/EUTtM.jpg \[4\]: https://i.stack.imgur.com/seTc8.jpg

---

---

Text below is redundant but retained for context

~~Now, comes the tricky part. As you can see in the official support for 10 release, these drivers **cannot** be directly installed through Magisk (by going to Magisk downloads, pressing **+** and flashing the zip). These require some *sepolicy* changes to be done:~~

~~1. Through Magisk once the request (PR) is accepted by Magisk developer , in which case the drivers hosted on Magisk modules should work. This was hoped with the latest release of Magisk today , but it didn't happen. Update 15/12/19 likely to be officially supported soon

or
2. *Custom Magisk build* links are hosted here. From Magisk settings , the update channel needs to be changed to "custom" and the link at custom update channel pasted there. This would prompt an update request and once you accept it, you have the custom build installed. I was wary of going this route fearing possible complications and also because PR as mentioned above was not accepted by Magisk developer.

or
~~4. ~~Using drivers that have the *sepolicy* changes incorporated in the drivers themselves , instead of Magisk side. At the moment, you can find here . This hopefully would be a temporary arrangement and the first option of changes being incorporated in Magisk itself materializes soon (you can add your voice for support in the PR~~  :)

---

---
Tags: xposed-framework, magisk, safety-net, oneplus-7, edxposed
---


# Question
Title: How reliable age certification at Google Play is?
So far I've been trusting in PEGI certifications nearly as in bible.

Today, I found Alchademy game, which has **PEGI 3** age certification, but deeply in the game's desc you can find something like this:

> This game is not intended for children and may have some content that is inappropriate for children under the age of 13.

Please, explain, what am I missing? How can a game pass PEGI 3 certification with such a note?

Based on above, I come with the conclusion that PEGI certifications at Google Play are completely worthless and when deciding whether particular app is or isn't applicable for my children, I must always dig description or -- the best -- install and play the game myself.

If that's truth then what is the reason in fouling people with that whole PEGI stuff at all?

# Answer
> 2 votes
**Disclaimer:** I don't develop Android apps so my answer might be lacking. I hope our residents developers will provide more clarifications if necessary.

According to Content ratings for apps & games, The rating of an app is done by independent 3rd-parties not Google. The app's developer fill a rating questionnaire, then independent 3rd parties rate it:

> To receive a rating for each of your apps and games, you fill out a rating questionnaire on the Play Console about the nature of your apps’ content and receive a content rating from multiple rating authorities. Since they are independent third party rating authorities, each rating authority uses their own methodology to assign your ratings (see Rating authorities & descriptions below). The ratings assigned to your app displayed on Google Play are determined by your questionnaire responses.

It is possible based on the last sentence that the responses to the rating questionnaire prompted the rating agencies to rate the app PEGI 3 while the developer(s) state(s) even on their own website that:

> This game is not intended for children and may have some content that is inappropriate for children under the age of 13

Thus, the app should be rated PEGI 12. As a comparison, the game is rated +9 on the Appstore.

The rating can be inconsistent as shown here where keyboard apps with the same content are not rated the same:

> The Fleksy app, which has been on the Play Store for around eight years at this point — and per Play Store install stats has had more than 5M downloads to date — was PEGI 3 rating until earlier this month. But then Google stepped in and forced the team to up the rating to 12.

---

> That’s not the end of the saga, though. Google’s Play Store team is still not happy with the regional age rating for Fleksy — and wants to push the rating even higher — claiming, in a subsequent email, that “your app contains mature content (e.g. emoji) and should have higher rating”.
>
> Now, to be crystal clear, Google’s own Gboard app also contains the middle finger emoji. We are 100% sure of this because we double-checked…

In the case, of the link article above, it was Google that forced the rating change not independent 3rd parties. After the developers complained to International Age Rating Coalition, the rating was then restored. It shows that Google can manipulate the rating.

# Answer
> 1 votes
While *Reddy Lutonadio*'s answer actually fulfils the subject, I'd like to add my own, since I have received an answer and clarification from the creators of the game in question:

> We understand the confusion that this can create, we place the information corresponding to the app, but in the case of the App rating, we have no control over it, this because Google assigns it automatically after some questions.

Based on above, I think we can clearly say that Google Play's age rating are pretty much worthless.

---
Tags: google-play-store
---


# Question
Title: I don't know how these files got in my photos
I get photos saved in a folder named files, I don't know the people in the pictures . there not photos I took ! How could they have gotten into my phone? and details show /storage/emulated/0/Android/data/com.littleengine.wordpal/files/ .......plz help.

# Answer
This seems to be the Data asociated to an app called World Wars maybe some other (you can google "com.littleengine.wordpal" to know what aplication is, that is the package name), it's possible those photos are there because are saved data from gameplays or other players avatars, in this case there is not too much to worry about, except for the space of course. If you don't trust the source of the application i recommento to uninstall it, but if you installed it from the Play Store there are almost sure not problem at all. Anyway, if there is not such application like World Wars or any other, find that folder with the pics and delete it, there'll no be problem, if the folder appears again, consider to install an antivirus or something
> 3 votes

---
Tags: file-system
---


# Question
Title: How to disable Enter SIM card PIN window under Android 9?
hello see the picture.

I took my smartphone with me and the battery was empty. When I recharged the device I got this typical SIM card message. Enter the PIN.

but unfortunately I didn't know the PIN anymore and couldn't use the device. how can I deactivate it under Android 9? without removing the SIM card from the sim card slot?

Under iOS system I can restart the device. just hold down the POWER button and activate the flight mode. then the "Enter SIM PIN" screen is gone.

Here's a little guide to what happened with me and it's not conveniently solved in Android system:

1. insert one or 2 SIM cards into my Android device. Because not always my PIN notice, I have on the Android device in password manager app. The PIN is stored.
2. go to friends or shop. sometimes it can happen that i am not always at home. and my android device has no more battery and device goes out.
3. when I turn on the Android device
4. the "Enter SIM PIN" screen appears
5. now you don't want to enter SIM PIN or forgot it.
6. unfortunately i can't access my password manager app because the "Enter SIM PIN" screen blocks the android home screen. You get stuck.

in this case I have to go home or ask people if they have a needle so I can remove the SIM card from the device.

I tested with Android 9 and compared it with iOS 10.

Can somebody test if Android 10 fixes it?

I still have a slight reminder that it can deactivate this "Enter SIM PIN" screen in Android 2 via flight mode, just as it can in iOS.

# Answer
> 0 votes
It depends of your device but usually you can find that settings under: Settings-\>Security&Location(or privacy, it depends)-\>Advanced (this is some times)-\>Sim card lock-\>Then sisable Lock Sim card option

---
Tags: sim-card, android-versions, dual-sim
---


# Question
Title: How to add multiple "Forwarding routes" to stock VPN client?
I am in need of adding two specific routes to the "Forwarding routes" section of the stock VPN client. How can I accomplish that?

Lets say I need to add `1.0.0.0/24` & `255.0.0.0/24`. I have tried adding them every way I can think of and I am unable to save as soon as I try to add the second route.
EG:

```
1.0.0.0/24
255.0.0.0/24
1.0.0.0/24 255.0.0.0/24
1.0.0.0/24,255.0.0.0/24
1.0.0.0/24:255.0.0.0/24
1.0.0.0/24;255.0.0.0/24
1.0.0.0/24255.0.0.0/24
1.0.0.0/24&255.0.0.0/24
1.0.0.0/24 & 255.0.0.0/24

```

None of these options worked.

I know that I can use `0.0.0.0/0` but I don't want ALL of my traffic to go via the VPN as the VPN doesn't provide internet connectivity & is just used to gain access to specific equipment.

If this is not possible with the stock app, is there any other solution?

# Answer
> 0 votes
I think you are talking about PPTP / L2TP / IPSec VPN configuration in Settings:

I haven't used that, but according to this source a space between routes should work:

> *"In the Forwarding routes box, enter X.X.X.X/X - optionally, you can also enter Y.Y.Y.Y/Y Z.Z.Z.Z/Z (put a space between each entry)."*

So this should work:

```
1.0.0.0/24 255.0.0.0/24

```

If it doesn't, I'm afraid rooting is the only way. Then you can modify routing policy (`ip rule show`) and kernel routing table (`ip route show table all`) as per your requirements.

---
Tags: vpn
---


# Question
Title: ssh to termux server disconnects after X seconds
I upgraded `termux` recently.

When I do:

```
ssh phone

```

it disconnects after 44 seconds. It disconnects even if there is activity in the session (eg. `ping google.com`).

If I am active in `termux` using the phone, then `ssh` does not disconnect. So it seems Android is killing the `ssh` connection. `tcpdump` confirms that and shows a reset packet is sent from the phone killing the connection:

```
13:30:37.093254 IP 192.168.1.122.2222 > 192.168.1.129.41938: Flags [R.], seq 4542, ack 5622, win 396, options [nop,nop,TS val 3374991 ecr 3768615485], length 0

```

Before upgrading `termux` this did not happen. So something happened during the upgrade that caused this to happen.

I have tried both to click `acquire wakelock` and `release wakelock`. Neither helped.

I have tried both to click `allow` and `don't allow` in Battery Optimization for Termux. Neither helped.

As a workaround I can connect USB. Then Android does not disconnect the `ssh`-connection. This makes me think the disconnection is deliberate and related to power saving.

How can I make Android not kill the `ssh` connection?

# Answer
> 2 votes
Thanks to @IrfanLatif I looked at battery options again.

And my phone was in Power Saving mode. When I disabled that, everything worked - whether Termux is running in the foreground or not.

So the problem was not related to the upgrade of Termux.

---
Tags: termux
---


title: How to project screen in android x86

text:
# Question
Title: How to project screen in android x86
I have installed Windows as well as android x86 on my laptop. Everything was just fine until the LCD of my Laptop was not broken. Now with broken screen I use Specific key combination to project my screen to an external monitor. This feature works fine with Windows but the key-combination does not work for android x86. Monitor does not even detect a signal from laptop. Is there any trick to project the screen in android with parent screen broken?

# Answer
> 0 votes
Just find your grub configuration file of android-x86 operating system and add **`video=LVDS-1:d`** to the end.

This will enable external monitor connected through HDMI port and disable primary monitor after boot. You can also add command for resolution which suits your external monitor but this is not necessary.

# Answer
> -1 votes
You want to have a multi display android config. cf:

Configuring Display Settings

source TileUtils.java

source SuggestionParser.java

App Shortcuts

UI Shortcuts

---
Tags: screen, android-x86, android-pc
---


# Question
Title: My Android YouTube App won't play certain codecs but plays others just fine
The Android YouTube app on my phone won't play any video with the vp09.00.51.08.01.01.01.01 codec, which seems to be every main stream, popular video.

My Android YouTube app will play videos with avc1.4d401e (134), which tend to be obscure low view videos. The only way I know how to check the codec is to look up the video from a desktop browser, right click the video and click "stats for nerds".

There are no errors shown in the app. The screen simply shows black and the audio plays normal.

YouTube works fine in the phone's browser, but not the app. I've uninstalled, reinstalled, cleared the cache, restarted the phone, and several combinations of all the above and can't get my YouTube app to work right.

Is there a way to update the codecs, or some other insight how to resolve the problem?

Edit:

The phone is a Korean model LG v20 F800L, so what Hax0 says makes perfect sense. I'm testing his answer now.

# Answer
You did not mention the device you are using. Your device does not seem to have license/support to play the VP9 codec in its HW codecs.

* One workaround is to tricking the YouTube app that you are using a different device which has license for VP9 codecs (Most recent devices does). Unfortunately you need to Root your device to achieve this because it required to modify System Build.prop file or use Xposed modules.
* Other option is to use third party or modded YouTube apps like Vanced Youtube which has option to Force VP9 codecs. Use google to download this.
> 1 votes

# Answer
Delete the app then Go into settings and allow unrecognised apps and it should work?
> -1 votes

---
Tags: video, youtube, video-streaming
---


# Question
Title: Any way to find the list of webpages I added to homescreen from Chrome Android?
I had to disable Chrome Android on my phone today due to an unrelated software install issue. In the process, all the webpages I had added to my homescreen on my S8 phone from Chrome Android disappeared.

Is there somewhere I can find a history of all the pages I added to my homescreen? There were like 18 pages and I can't remember them.

# Answer
Unfortunately, the information you are looking for is simply lost. The shortcuts that a user adds to the homescreen are saved inside the default home launcher's data directory. Typically, it is a database (named launcher.db or similar to it), usually within a table often named "favorites".

I checked the relevant database (for Nova Launcher) after adding some Chrome shortcuts to the homescreen, and then disabled Chrome, and then checked again. The relevant entries were no longer there, and they were also not restored when I enabled the app again.

Unless your default launcher was provisioned to be backed up by Google and was indeed backed up recently, or if you manually backed it up (highly unlikely), it would be futile to proceed in this direction any further.
> 4 votes

---
Tags: chrome-for-android, browser, samsung-galaxy-s-8
---


title: How can I reset MIUI 11 features?

text:
# Question
Title: How can I reset MIUI 11 features?
I turned off MIUI optimization and some features were lost and I can't retrieve them after I turn it on again.

# Answer
> 1 votes
You need to enable Developer options on your MI device. To unblock the developer options,

1. Go to Settings \>About, find the MIUI version and tap 7 times continuously.
2. You could see a message “You have enabled developer option” once you have successfully done that.
3. To access developer options, Goto Settings \> Additional settings \> Developer options.
4. Now scroll down till the end to see the option to toggle MIUI Optimization. You’ll need to restart the device once you enable the option.

* Even though it is just a toggle which we enable, it causes the way which the system behaves, in turn changes the way many apps behave.

Source

---
Tags: xiaomi, miui, redmi
---


# Question
Title: How to fix: only official released binaries are allowed to be flashed(recovery) on device / FAIL! (Auth) on Odin3 v3.13?
I have Samsung S10 5G(Qualcomm) device. This device has unlocked bootloader but it is not rooted yet.

I am trying to learn Unpack-Modify-Pack the ROM images.

Currently, I have VZW stock ROM available for this device and I can flash it successfully using Odin3 v3.13.

After flashing this ROM, I have tried to modify system and recovery using `tar`, `lz4`, `simg2img`, `mount`, `tune2fs` and `md5` tools available on my Ubuntu 18.

When I have tried to flash different tar files then the result is as following:

**Success Attempts**: If I will not modify anything and flash the **Ap.tar** containing any of the following file:

1. **system.img.ext4.lz4**
2. **system.img.ext4**
3. **recovery.img.lz4**
4. **recovery.img**

**Fail Attempts**: If I will just modify the `init.rc` file by writing a simple comment at the end of this file and flash the **AP.tar** containing any of the following file(which contain modified raw image at last level of its folder hierarchy):

1. **system.img.ext4.lz4** which contains a modified **system.img.ext4**.
2. **system.img.ext4**
3. **recovery.img.lz4** which contains a modified **system.img**.
4. **recovery.img**

When **Odin3 v3.13** failed to flash the above modified files then it give below errors:

1. For AP.tar containing LZ4 file: **FAIL! LZ4 is invalid**
    * The device has no impact of this error and it stay in download mode.
2. For AP.tar containing ext4 or img file: **FAIL! (Auth)**
    * In this case the device display **Only official released binaries are allowed to be flashed(recovery)** or **Only official released binaries are allowed to be flashed(system)**

Please give your suggestions on:

1. This device is secure by **Knox** from Samsung. Is it causing this error?
2. If yes, is there any way to disable it in the VZW zip?
3. If no, what is the actual problem and how can I resolve it?

# Answer
For LZ4 compression: `lz4 -B6 --content-size system.img.ext4 system.img.ext4.lz4` command can be used to make a valid Odin Flashable file.

To Fix **"FAIL! (Auth)"**, we need to truncate the `vbmeta.img` file and remove the signature from the `boot.img`. The detail is mentioned on Magisk install guide under Instructions section.
> 3 votes

---
Tags: root-access, rom-flashing, selinux, samsung-knox, aosp
---


# Question
Title: What is a "synthetic password" and how is it used by Android?
On a first-generation Pixel that is running Pie, in `locksettings.db` there is a field named `sp-handle` that contains a 64-bit value. `sp` is an abbreviation for "synthetic password". Under `/data/system_de/0/spblob` there are three files:

* `0000000000000000.handle`
* `XXXXXXXXXXXXXXXX.pwd`
* `XXXXXXXXXXXXXXXX.secdis`
* `XXXXXXXXXXXXXXXX.spblob`

`XXXXXXXXXXXXXXXX` is the lowercase hexadecimal representation of the aforementioned 64-bit value. (I actually have several sets of `pwd`/`secdis`/`spblob` (some missing the `spblob` or the `secdis` file—I cannot remember which) presumably due to my attempts to get TWRP to decrypt my Pixel.) There are also files under `/data/misc/keystore/user_0` named `1000_USRSKEY_synthetic_password_XXXXXXXXXXXXXXXX` and `.1000_chr_USRSKEY_synthetic_password_XXXXXXXXXXXXXXXX`.

These "synthetic passwords" are mentioned and used in TWRP and `SyntheticPasswordManager.java`. They are used in decryption, but I can't tell *how* they are used in it or if they are also used in password authentication. Are they used to decrypt `/data/misc/vold/user_keys/ce/0/current/encrypted_key` (which I'm told is used in file-based encryption)? What are the purpose of the `.pwd`, `.secdis`, and `.spblob` files? Are the files `gatekeeper.*.key` used in deriving synthetic passwords?

### Update

This paper from Qualcomm goes into greater detail on "synthetic passwords" than the source code, but it doesn't answer the more important questions like:

* What is the purpose of and what is inside of `XXXXXXXXXXXXXXXX.spblob`?
* What is the purpose of and what is inside of `XXXXXXXXXXXXXXXX.pwd`? What is the purpose of and what is inside of `XXXXXXXXXXXXXXXX.secdis`?
* Is the authentication token used in decrypting the CE key?

# Answer
First, you need to understand, two gatekeeper enrollment processes are involved in synthetic passwords.

Here is the process:

1. Generate a synthetic password, it's just a random number
2. Use a real password to enroll a fake ID and get SID (secure\_id)
3. Use keystore to generate an AES key, bound it to SID, and use it to encrypt a synthetic password
4. Use a synthetic password to enroll the real user ID.

So you will see, in order to unlock a real user, you need to know a synthetic password. However it's encrypted by the keystore, so you need the real password to unlock the keystore first.

To understand it, you need to first understand how the gatekeeper works (e.g. What is secure\_id? How does it work?). That's another topic.

* `00000000000.handle`: return value of gatekeeper first enroll by synthetic password derived password.
* `handle.pwd`: second gatekeeper enroll by real password with a fake user ID (e.g. user\_id + 10000).
* `handle.secdis`: Actually a random number. Used to encrypt the synthetic password.
* `handle.spblob`: encrypted synthetic password
* `/data/misc/keystore/user_0/XXX`: keystore key. Used for encrypting synthetic passwords.
> 5 votes

---
Tags: security, encryption
---


# Question
Title: While pushing to git using Termux, it crashes while compressing files
I am pushing large number of files to git from android using Terrmux.

```
git push origin master

```

There is no issue pushing up to 40 files of around 1.5 MB. But when number of files is larger, Termux simply crashes while compressing the files.

Any Idea how can this be avoided?

# Answer
It is possible that you don't have enough free disk space for the compression.

(Termux resides in the local storage and not on the SD card, so you'd need to check your device's free space.)
> 1 votes

---
Tags: terminal, termux
---


# Question
Title: How to boot system-as-root device always as rooted?
I have a Samsung S10 5G device that is actually a `system-as-root` device. I have rooted it by following the instructions given here.

As the `system-as-root` devices have no `ramdisk` in `boot.img` but in `recovery.img` so, I have to always boot the device with a recovery combination to get the root access.

Is there any way to achieve the root on a normal reboot?

I have a full ROM image of the device so, I believe there should be some way. Please share your thoughts.

# Answer
If you go through **How Magisk works** and **How to manually root a phone** it would be easy for you to figure out why it's impossible to achieve what you are looking for.

`init` is the very first process started by kernel, which at its early stage sets SELinux `enforcing` (if it's not already `enforcing`). Before that happens, we need to modify SELinux policy so that it doesn't restrict the root daemon (`magiskd`) from running. Also `init.rc` needs to be patched to inject `magiskd` service.

A simple option is to patch `/sepolicy` and modify `/init.rc` when rooting the device and save the files on device. But on `system-as-root` devices both files are on `system.img` (and possibly `vendor.img`), not on `boot.img`. So modifying them would break "**systemless**" approach and other related things, in particular `dm-verity` and OTAs.

Another option is to run a process even before `init` which patches SELinux policy and changes `init.rc` on the go. And the easy way to achieve this is to replace original `init` file with Magisk `init` so that kernel executes the latter. However on SAR devices `init` is also on `system.img`, so we can't replace it. But we can always boot to recovery mode which does have a `ramdisk` where Magisk's `init` can be placed and executed before any other process. On `A/B` SAR devices recovery `ramdisk` is in `boot.img`, so Magisk always boots to recovery by forcing kernel to ignore `skip_initramfs` cmdline parameter received from bootloader.

> Is there any way to achieve the root on a normal reboot?

On **non-A/B SAR devices (like yours)** there is no `ramdisk` in `boot.img`, so the only option to retain systemless approach is to place Magisk `init` in recovery `ramdisk` on `recovery` partition, and **always boot to recovery mode**. From there `system.img` is mounted at `/system_root` by Magisk `init`, contents of `ramdisk` are then copied to `/` cleaning everything previously existing, files are added / modified in rootfs `/`, `/system_root/system` is bind-mounted to `/system`, and finally `[/system]/init` is executed for normal boot.

However things have changed with Android 10, now `system.img` is mounted at `/` but the files to be added / modified like `/init.rc` and `/sbin` are overlaid with bind mounts as tweeted by Magisk developer.
> 4 votes

---
Tags: samsung, root-access, rom-flashing, aosp, systemless-root
---


# Question
Title: How to make SELinux permissive with `systemless-root` on a `system-as-root device`?
I have a Samsung S10 5G device that is actually a `system-as-root` device. I have rooted it by following the instructions given here.

As the `system-as-root` devices have no `ramdisk` in `boot.img` but in `recovery.img` so, I have to always boot the device with a recovery combination to get the root access.

I have an app that requires some SELinux policies to work. I have injected them with the help of `sepolicy-inject` using following commands:

```
    sepolicy-inject -s init -t su -c process -p transition -l
    sepolicy-inject -s su -t system_file -c file -p entrypoint -l
    sepolicy-inject -s init -t su -c process -p rlimitinh -l
    sepolicy-inject -s init -t su -c process -p siginh -l
    sepolicy-inject -s su -t shell_exec -c file -p read -l
    sepolicy-inject -s su -t shell_exec -c file -p execute -l
    sepolicy-inject -s su -t shell_exec -c file -p getattr  -l
    sepolicy-inject -s su -t vendor_toolbox_exec -c file -p execute_no_trans -l
    sepolicy-inject -s init -t su -c process -p noatsecure -l
    sepolicy-inject -s su -t toolbox_exec -c file -p getattr -l
    sepolicy-inject -s su -t toolbox_exec -c file -p execute -l
    sepolicy-inject -s su -t system_file -c file -p execute_no_trans -l
    sepolicy-inject -s su -t storage_file -c dir -p search -l
    sepolicy-inject -s su -t storage_file -c lnk_file -p read -l
    sepolicy-inject -s su -t tmpfs -c dir -p search -l
    sepolicy-inject -s su -t mnt_user_file -c dir -p search -l
    sepolicy-inject -s su -t mnt_user_file -c lnk_file -p read -l
    sepolicy-inject -s su -t sdcardfs -c dir -p search -l
    sepolicy-inject -s su -t sdcardfs -c file -p append -l
    sepolicy-inject -s su -t toolbox_exec -c file -p read -l
    sepolicy-inject -s su -t toolbox_exec -c file -p open -l
    sepolicy-inject -s su -t sdcardfs -c file -p read -l
    sepolicy-inject -s su -t sdcardfs -c file -p write -l
    sepolicy-inject -s su -t sdcardfs -c file -p open -l
    sepolicy-inject -s su -t media_rw_data_file -c file -p read -l
    sepolicy-inject -s su -t media_rw_data_file -c file -p write -l
    sepolicy-inject -s su -t media_rw_data_file -c file -p open -l
    sepolicy-inject -s su -t media_rw_data_file -c file -p append -l

```

but after reboot, I need to run this command again as they are not persistent. I don't want to use a key combination on the device to use my app on the root mode of the device. So, I am searching for any way to inject them permanently.

I can think of the following solutions:

* Modify `init.rc` file of `system.img` to run these commands but when I have tried to modify `init.rc` with just adding a comment and flashed it on the device then that comment is lost. Don't know what happens. I have flashed it with all Odin files and within AP file. This AP file is patched by Magisk.
* Change the SELinux from enforcing to permissive. I am not sure how can I do it with either **root access** or **Modified ROM Flashing**.

Any suggestion?

# Answer
> I am searching for any way to inject them permanently.

As explained in my answer to your previous question: How to make SELinux injected rules persistent without unpacking-packing boot.img? you need to modify SELinux policy file in order to inject rules permanently.

Policy could either be monolithic (pre-compiled `sepolicy` file on `initramfs` or `/system` or `/vendor`) or split.

In latter case it can be either pre-compiled SEPolicy (`/vendor/etc/selinux/precompiled_sepolicy`) or you need to compile it from `.cil` files in `/system/etc/selinux/` and `/vendor/etc/selinux/` using SEPolicy compiler (`/system/bin/secilc`).

In former case the hashes of both platform and non-platform policies (`/system/etc/selinux/plat_and_mapping_sepolicy.cil.sha256` and `/vendor/etc/selinux/precompiled_sepolicy.plat_and_mapping.sha256`) must match, otherwise `init` won't load it.

In either case you can't retain systemless approach.

> Modify `init.rc` file of `system.img` to run these commands but when I have tried to modify `init.rc` with just adding a comment and flashed it on the device then that comment is lost.

As explained in my answer to your previous question: How to boot system-as-root device always as rooted? on rooted SAR device `system.img` is mounted at `/system_root` by Magisk `init`, contents of `ramdisk` are then copied to `/` cleaning everything previously existing, files are added / modified in rootfs `/`, `/system_root/system` is bind-mounted to `/system`, and finally `[/system]/init` is executed for normal boot. So you need to edit `/system_root/init.rc` for permanent changes. Please note that modifying `system.img` (or `vendor.img`) would break `dm-verity` and OTAs.

> Change the SELinux from enforcing to permissive. I am not sure how can I do it with either **root access** or **Modified ROM Flashing**.

SELinux is set `enforcing` by `init` (if it's not already `enforcing`), so you need to modify `init` source. Or on `userdebug` ROMs pass `androidboot.selinux=permissive` kernel command-line parameter. For details see What sepolicy context will allow any other context to access it?

With root access just execute the following in any `.rc` file:

```
on property:sys.boot_completed=1
    exec u:r:magisk:s0 -- /system/bin/setenforce 0

```

For details see How to fix SELinux “avc: denied” errors?
> 1 votes

---
Tags: root-access, rom-flashing, linux, aosp, systemless-root
---


# Question
Title: init: cannot execve('/system/bin/custom.sh'): Permission denied
I have a rooted system-as-root Samsung Device and I am trying to run an init service which runs `custom.sh` script using `u:r:su:s0` SELinux context.

```
# define service, use executable here if script not needed
service custom /system/bin/custom.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:r:su:s0

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

```

As per my understanding, the rules for transition from `init` context to `su` context is not defined so, I should get `avc: denial` error.

But, I am getting permission denied error as following:

> init: cannot execve('/system/bin/custom.sh'): Permission denied

I have checked the permission of `custom.sh` file and it is as following:

> -r-xr-xr-- 1 root root 153 2019-11-04 13:25 /system/custom.sh

Please suggest what is happening here and how can I fix it?

# Answer
As evident from `init` source code:

```
...
static bool ExpandArgsAndExecv(const std::vector<std::string>& args) {
    ...
    return execv(c_strings[0], c_strings.data()) == 0;
}
...
        if (!ExpandArgsAndExecv(args_)) {
            PLOG(ERROR) << "cannot execve('" << args_[0] << "')";
        }

```

For whatever reason if `init` fails to execute the script `custom.sh` (i.e. syscall `execve` returns non-zero exit code), you will get `cannot execve` error. `Permission denied (EACCES)` is returned by `execve` in multiple situations e.g. unable to read file path, no `+x` permission on binary or filesystem mounted with `noexec`. Inability to `read`|`open`|`execute` script or make context transition is returned as `EACCES`.

Also `cannot execve` is logged by `init` but `avc: denied` is logged by SELinux subsystem through `audit` subsystem or kernel logging. You should get both errors in `dmesg` or `logcat -b events` or `logcat -b kernel`. If you don't, may be there is a `dontaudit` rule defined for source or target or both contexts.

> Please suggest what is happening here and how can I fix it?

As explained in my answer to your previous question: How to run an Android init service with superuser SELinux context? define SELinux rules to allow `init` read / execute `custom.sh` script and make transition to `u:r:su:s0`.
> 5 votes

---
Tags: rooting, rom-flashing, linux, aosp, systemless-root
---


# Question
Title: How to fix "dmesg: klogctl: Permission denied" for normal user on Android?
I have a rooted Samsung device(system-as-root). When I open `adb shell` and run the `dmesg` then it behaves differently for `su` and `normal user`. It throws

> dmesg: klogctl: Permission denied

error when I run it without `su` shell.

Please suggest how can I fix this?

# Answer
`dmesg` calls C library's `klogctl` wrapper function for kernel's `syslog` syscall which reads kernel's ring buffer by accessing `/dev/kmsg` character device. `adb shell dmesg` returns permissions denied error because `adbd` which runs with context `u:r:shell:s0` is not allowed by SELinux to read kernel log. You need to explicitly allow it (**requires root**):

```
~# supolicy --live 'allow shell kernel system syslog_read'

```

If property `ro.logd.kernel` is set to `true` (default on `debuggable` builds), Android's logging daemon (`logd`) writes kernel messages to a separate buffer named `kernel`, which can be read using `logcat` (**doesn't require root**):

```
~$ logcat -b kernel

```
> 2 votes

---
Tags: rooting, samsung, linux, aosp, systemless-root
---


# Question
Title: How to use "/etc/hosts" file as only DNS on Android?
On my Android-based device I need to block access to all websites except ones are in a whitelist. I know that on desktop Windows I can list allowed hosts in the hosts file and then switch the DNS in the network adapter from automatically obtained to `127.0.0.1`. And now I can access only websites from the hosts file.

I've tried the same thing by adding allowed hosts in the `system/etc/hosts` file on Android and then I've added the line

```
new_domain_name_servers="127.0.0.1 $new_domain_name_servers"

```

to the beggining of the file `/etc/dhcpcd/dhcpcd-hooks/20-dns.conf` as described by the link.

And then I've restarted my device.

But I still can access all websites, so the solution doesn't work. And even if I just add a website to be resolved as 127.0.0.1 in the hosts file and clear browser cache, the website is still opened.

**PS:** I'm interested only in a solution which could be done on rooted device only (Android 4.0.4)

# Answer
> 2 votes
Add allowed hosts to `/etc/hosts` and define these firewall rules to block any outgoing DNS queries on standard UDP port `53`:

```
~# iptables -I OUTPUT -p udp --dport 53 -j REJECT

```

<sup>* May also use less rude `DROP` target in place of `REJECT`</sup>

To be on safe side also block TCP port:

```
~# iptables -I OUTPUT -p tcp --dport 53 -j REJECT

```

`iptables` is part of stock Android releases. You need to add these rules on every boot. Use `init.d` script or define `init` service: How to run an executable on boot?

---
Tags: internet, dns, hosts
---


title: Can't add icons to home screen

text:
# Question
Title: Can't add icons to home screen
I have an ASUS ZenPad 3S 10 (Z500M, model P027) and I can't add any shortcut icon from the app drawer to the home screen by pressing and dragging.

I know I used to have this option, but now something has changed and prevented it.

# Answer
The issue might be that the launcher layout is locked. Try to remove or replace an icon already present in launcher and if you can't move the icon, then most likely the layout is locked.

To turn off the option, the ways are different in different launchers, try going to launcher settings and find option to lock the desktop layout or something similar and turn it off.
> 1 votes

# Answer
Thanks to everyone, I did not know that it is an app that launches Android out of the root; now I do.

After researching several launcher apps, I got enough understanding to look for the launcher for my tablet. I found it under default apps and it is actually part of the onboard software apps, i.e. resident and native to the hardware, that can not be uninstalled but it has two levels/layers and one of those levels put the app's icon on the bottom drawer so that it can be accessed as I was looking for.
> 0 votes

---
Tags: launcher, home-screen-shortcuts, home-screen, app-icons
---


# Question
Title: how to add a custom lock for the recovery and/or bootloader?
Unlocking the bootloader and/or the recovery is very popular discussion across many devices. But doing so exposes a very obvious and inevitable **issue with security**!

An unlocked recovery means that no matter how secure you make your android lock screen, someone can easily reset phone to restore the phone to a fully functional (and lockless/insecure) state and the worst part, they don't have to erase your data(meaning they can access all your personal files and folders)!

It is almost hilarious! In fact if the phone supports insertion of external SD cards, you can even flash your own software into the phone and maybe bypass the lock screen without wiping any data.

For example: One possible loophole is using the 'Tasker' app which has a feature that can temporarily disable the keyguard. And the best part is that Tasker can be flashed using the recovery!

**So is there any method by which I could add a security measure that prevents complete access to my recovery and/or boot loader that will make my phone less *insecure*?!**

**Expected answer:** Method by which a custom pin/password must be entered before entering the bootloader/recovery. So that my bootloader/recovery is still technically unlocked but simply requires authentication to use (this also ensures that conventional unlocking methods won't work as the phone is not really locked!). This also means that one does not have to lose root access to ensure security!

# Answer
> 4 votes
Even if it would be doable, consider a few things making it extremely unlikely:

1. in that early stage, the touchscreen is not yet initialized – so how would you input your PIN/password/pattern to unlock the bootloader *before* firing up the custom recovery?
2. another risk introduced this way: if you break your display, you are effectively knocked-out: even if the problem described above could be worked around, that work-around would be rendered useless at this place.

True, there are things like touch-based custom recoveries. So technically, that would be the place to make it possible: Once the recovery is initialized, it could ask for a code to unlock before offering its real services. This might even include a "fallback mode" for a broken screen using e.g. shake-patterns (accelerometer-based) or NFC (if applyable). But that's nothing we can solve here at this site: you will have to contact the resp. developers for this ( and/or , to name two examples).

# Answer
> 6 votes
Encrypt your filesystem. You'll need to enter a password or PIN on every boot to decrypt it, so as soon as the device is rebooted none of your personal data will be readable. TWRP even supports encrypted filesystems (it prompts you for your password when it starts as well, I think). If your device is at least 4.2.2 then you can even leave ADB on; they'd need to unlock the screen to add their computer to the whitelist, so they can't push apps or read data there either. You'll be able to have root, a custom bootloader, ADB enabled, and still have a relatively secure device.

# Answer
> 2 votes
I recently wiped my phone to factory after I had rooted the phone and got rid of the bloatware I did not want. (Forgot the passcode) I thought I would have to root my phone again and then get rid of factory installed bloatware....again. I was pleasantly surprised to find both that the root was intact AND the bloatware was still gone. Also, my superuser app was still intact. It should have been gone, but was converted into a system APP and so was not wiped during the reset. That got me thinking along a similar line to your question.

What would happen if you were to imbed the Passcode/Pin data into the system data. You could not gain access to the phone by merely wiping it as the pass/PIN data would still be on the phone after the wipe. Of course that would mean that forgetting your pass/pin would effectively brick your phone.

Of course you could just keep ALL of your data on the SDCard and encrypt it there withan app. Then it wouldn't matter if someone flashed your phone and got access because (s)he could not access your sensitive data without BOTH the encryption app AND the app specific pass/pin.

# Answer
> 1 votes
couple of things.

1. Go ahead and download the latest version of TWRP and google the UI.zip file that adds the password to custom recovery.
2. download Cerberus app, it's the best anti theft app out there that allows you to lock, track, back up, wipe, remote call, signal flare, force GPS and wifi, and more. From the app lock the powermenu from the lock screen to refrain people from turning it off. Create a TON of rules, gps flares when the phone is powered on and off, SIM card information when the SIM is changed and a signal flare, auto passwords when the sim card is changed, ect.
3. use a 6x6 pattern password or an actual password
4. Use an applock system, CM security it great, set it to lock all settings and sensitive apps that could make you vulnerable in the event you lose your phone, set it to lock every 3 minutes. Once you unlock one app it unlocks them all (but for only 3 minutes).
5. TURN OFF ADB DEBUGGING IF YOU ARE NOT USING IT! ALL of this work is useless if you don't, the LAST thing you want is for someone to sideload another ROM and screw you.

That should do it!

# Answer
> 0 votes
The only option to be secure is a false off from xposed, locked bootloader and having second phone to make quick emergency call. It's not windows, you can't protect bios with password. I quess.

# Answer
> 0 votes
It is possible, say you have TWRP installed, if you encrypt the device, it will ask for the password before you can mount/change any partition

# Answer
> 0 votes
It's not secure but, I just removed certain menu options from the recovery screen in the AOSP source code. It at least prevents a novice or someone without a PC from wiping your device.

---
Tags: security, lock-screens, recovery-mode, bootloader
---


title: How to remove a persistent malware?

text:
# Question
Title: How to remove a persistent malware?
My Samsung Note 8 has gotten very weird lately. I get programs I never have installed, and when I try to reboot/reset my device with no backup they still come up after I'm finished with the reboot.

I also have in my "SIM" 2 cards, but I only have 1? And I can't access number. It also shows 2 different IMEIs.

The programs with weird names have all the permissions in my device. Some of them I can't delete, and some can't force stop, and they start running after some time.

Facebook was already installed when I did a reboot and the programs started coming in. I have a secure file on my phone. But this program has permission to everything.

How do I get rid of this problem? Do I root my phone? Can some of you guys please help me with this? This is making me a little paranoid.

Some of the programs:

* Dagger
* Customrabsclient
* flexbox
* istrumentzip
* OpenCenus
* rxandroid2
* agera
* customclient

I have used many anti-viruses like McAfee, Bitdefender, etc. I have factory reset my computer 2 times, but nothing changes. I have now downloaded AFWall+ to try to stop all these files, but I want to delete them all.

And when I check root manager it says that my phone is not rooted in the proper way. I never ever have rooted this phone.

# Answer
> 0 votes
If bloatware (pre-installed system apps) is your concern, then I wouldn't recommended rooting just for that purpose. If your Note 8 is out of warranty, then rooting wouldn't be a problem. But still, if only uninstalling the pre-installed system apps is all you want, then you can use ADB to get rid of them, once and for all.

A few months ago I published a guide on my blog to do the same for the S10 series. Although, the method is generic and will work on an Android device. I have owned the Note 8 and moved to the S10e this year. Can confirm that it works flawlessly on the Note 8 too.

Here is the link: https://www.thecustomdroid.com/uninstall-samsung-galaxy-s10-bloatware-guide/

In case the above link goes down, here are the exact steps you'd need to perform:

1. First of all, download and install Android SDK platform-tools (This includes adb.exe, which you will need) on your PC.
2. Make sure USB debugging is enabled on your device.
3. Connect it to the PC using the USB cable.
4. Launch a command prompt window inside the same folder where the SDK platform-tools are installed.
5. Initiate the ADB shell using the following command:`adb shell`
6. Now, find the packages of the app that you want to uninstall using: `pm list packages -f microsoft`
7. Here "mircrosoft" is the keyword. You can replace it with the name of the app, you want to uninstall and it will enlist all the related package names to the app.
8. Then use the following command to uninstall all those packages: `pm uninstall -k --user 0 app-package-name`
9. Make sure that you replace "app-package-name" with the exact name of the app package that you want to uninstall.
10. Repeat the previous command for every package that you want to uninstall.

Voila! All the undesired pre-installed system apps will be gone.

---
Tags: malware, uninstallation
---


# Question
Title: Google pay wont work unless phone is unlocked even for small payments
I have a Samsung Note 9 (Android version 9) and Google Pay installed and configured. It works on stores like Costa for payments under £35 **only when phone is unlocked**

As per https://support.google.com/pay/answer/7644132?hl=en "No unlock needed for smaller payments"

Does anyone know why this is the case? I'd like that no unlocking is required for small payments.

# Answer
It turns out this may be a problem with the official Samsung phone clear view folding cover explained in https://www.samsung.com/uk/smartphones/galaxy-note9/accessories/

When the fold is closed I cannot use it. If I open the fold then even if the phone is locked I can use Google Pay. Removing the foldable cover altogether also works!
> 2 votes

# Answer
Not sure if they've recently updated the support answer on your link or not but it's clear you can't always pay with a locked phone even for smaller payments.

> To make most purchases in stores, you need to unlock your phone. You won't need to unlock it for **certain** small payments.
>
> **Important: You can only make a limited amount of locked transactions before your phone will ask you to unlock it**.

Personally, I have to unlock my Pixel 3A even when the payment is as small as £2.
> 0 votes

---
Tags: google-pay
---


# Question
Title: How to I undo deleted shortcut from chrome new tab in android?
Currently my android google chrome new tab looks as follows,

It used to show twitter as well. I made the mistake of long pressing twitter icon and removing it. Since then I'm seeing times of India shortcut, as seen in the above image. I've visited twitter multiple times after that, but looks like chrome is brining it back. On desktop, I can use `Edit shortcut` and change the url. But how do I do similar thing in android?

**Note**: I'm on Android 10 (Oxygen OS v10.0.1). I don't have root access.

# Answer
If you have root access, open the file `/data/data/com.android.chrome/app_chrome/Default/Top Sites` in an Sqlite editor. In the table top\_sites, you would find many columns. The relevant colums are url and rank. Rank starts from 0. Chrome for Android show only top 8 ranks as top sites on new tab page.

If your twitter row/entry is not there already, than add it and make sure to give it a rank between 0-7. Further make sure that no other row conflicts with your specified rank. At last, make sure you do all of this when Chrome is force-stopped using Settings app.

This, however, does not guarantee that the changes would persist for long. As you would interact with Twitter and other sites in the future, Chrome would tweak the ranks again per the interaction it analyses and processes.

Tested on Chrome for Android v76.0.3809.132.
> 2 votes

---
Tags: chrome-for-android, oxygenos, android-10
---


# Question
Title: "Print" option not showing up in share menu
For quite a while now the print option does not show up under the share menu, as if the share action seems to be missing its share action. After a while of searching with my google-fu, I have been unable to come up with a working solution, with the two things coming up is: \- Check in your share menu - *If it was there then I wouldn't be looking for an answer* \- There isn't any fix - *yet*

**Objectives:**

* Get Print share action working/shown in Google Chrome
* Get Print share action working/shown in any share menu (when applicable)

**(Un-)Usefull Info:**

Android Version: 5.1.1

Device: Samsung xCover3 (SM-G388f)

Chrome version (Stable): 55.0.2883.91

Chrome Flags Enabled(Chrome://flags):

* `#enable-media-document-download-button`
* `#show-saved-copy`
* `#enable-downloads-ui`
* `#offline-pages-sharing`
* `#enable-ntp-download-suggestions`

Imgur Album Illustrating my point: http://imgur.com/a/cCxza

I believe the item disappeared front the share menu after rooting. I have then during that time and now reflashed the firmware and rest the device (for reasons not related to this). I can verify that printing works (I can print from Gmail, and the print APK is still enabled/installed.

Hopefully I've given enough of a picture/details to help narrow down the cause of the problem, and hopefully we will be able to get a fix.

# Answer
It could be that in Android 10, they changed the print icon and moved its location. They also used the same icon several times over. To be sure it is the correct icon, you'll need to read the text under the icon.
> 4 votes

# Answer
I was able to figure it out.

I just open `chrome://flags` and reset it to defaults as I didn't find anything with the word 'print'.

And, it worked, I am able to print as I could before.
> 2 votes

# Answer
Try a soft reset. Press & hold the power + volume-down buttons together and hold for 12-15 seconds. The print icon should then reappear in the Chrome menu.

Thanks & shout out to Tim at Mequon, WI, Verizon store.
> 1 votes

# Answer
For my Android phone connection with my HP printer, I just installed the HP Plugin from Google Play Store and it is now shown in the share option. So, simply click the print button, select your printer, and it is working.
> -1 votes

# Answer
You need to check the print spooler (Samsung system app) in app settings. Enable it, if it's disabled.
> -1 votes

---
Tags: chrome-for-android, share-menu, menu, printing
---


# Question
Title: What is the file path of a sd card when it is formatted as internal?
I know that sd cards formatted as "portable" will be located in `/storage/sdcard<1,0>/` but where would a sd card be mounted or located when it is formatted as internal?

# Answer
> 0 votes
It would be located in the `/mnt` partition under the `expand` folder. For example mine is located:

> /mnt/expand/ee031623-1634-40d1-9f9f-902d68eceaee/

---
Tags: sd-card, internal-sd
---


# Question
Title: how to install custom recovery without pc
I want to install custom recovery in intex aqua y2 pro without pc to avoid accidents. i have downloaded the cwm (touch)custom recovery.img(4mb) and the stock recovery (6mb) can i flash it through mobile uncle tools without bricking it Please Answer

# Answer
It is possible, but doing so could be **even more dangerous** than doing the traditional PC flashing way. Flashing it through **ADB is much easier and way less dangerous**. If you have not already tried flashing the phone, try using ADB. Also, **avoid apps like Kingoroot or Kingroot**, they are proven as spyware by the community.
Have fun flashing your phone!
It's **way easier than you think**
Good Luck,
Joe.
> 0 votes

# Answer
You need to Root your Phone to Install Recovery without PC using this Following Apps : \- **Kingroot** \- **Kingoroot** \- **Towelroot** \- **Framaroot** \- **Iroot** Choose the one that successfully Root your Phone

Then install Flashify and grant Root Permission, then select Costum Recovery and Select the recovery.img file and flash it
> -1 votes

---
Tags: recovery-mode
---


# Question
Title: Access chats from old deactivated phone number
My sim card with my old number has been deactivated. A new user uses my old number. Does the user have access to my old chats if he or she chooses Yes to back up old chats or storage?

# Answer
> 1 votes
Whatsapp backups are either stored locally (on you device), on your own Google Drive account if you are using Android or on iCloud if you're using an iPhone.

In order to restore a backup you must be using the same phone number and the same Google/Apple login, so you can rest assured that the new owner of your old number does not have access to your old backups.

If you want to be doubly sure and you use Android, you can log on to Google drive and find your Backups folder. In there you should see a file named "WhatsApp YourOldNumber backup", you can delete this if you want.

I don't own an iPhone but I imagine the iCloud backup would be stored in a similar fashion.

---
Tags: whatsapp-messenger, privacy
---