# Question
Title: Cannot connect to a data connection on Sprint HTC One M8
Firstly, I am running CyanogenMod 12.1 on my HTC One M8, but this is an issue I also experienced running stock Android (e.g. Lollipop).

The issue I am experiencing is that my device appears to be unable to reconnect or "get back" on the Sprint data network. For example, yesterday, I was in NYC (obviously somewhere that should and is covered), but I was unable to get a data connection anywhere in the city. I was only able to send SMS (*not* send/receive MMS) and make voice calls.

In the past, when I had this issue on Sprint, being the helpful individuals they are, they told me to restore my phone and reinstall Android. I did that, which helped for a while, but it wasn't long before I ran into the same issue on stock Android. After a while, the issue seemed to "resolve" itself magically. I never found out why or how.

More recently, I rooted my phone and installed CyanogenMod 12.1 on my M8, and I am running into the exact same issue I had before. Ideally, I don't want to have to restore my phone again, because not only do I not think this is the "fix-all", but it seemed like Sprint's lazy answer for not wanting to actually troubleshoot my device.

This is becoming increasingly apparent when I travel as I am unable to get GPS directions, send MMS messages, or do anything over data like normal when I'm off of a WiFi network. Despite having "bars" on my screen, CM will display a small "!" over my data icon, which I assume is an indicator that it is unable to connect to the mobile network in some way.

Is there anything I can do to better troubleshoot my mobile data connection?

# Answer
> 0 votes
The same thing happened to me after I rooted and installed CM.

I seem to have just solved it by going into the Access Point Names menu, opening the 3 dot drop down menu and selecting "Reset to Default" and rebooting the phone. I then went back into said menu, clicked the add (+) button and entered a new APN with the settings as follows:

```
Name        : Sprint
APN         : cinet.spcs
MMSC        : http://mms.sprintpcs.com/servlets/mms
MMS Proxy   : 68.28.31.7 6
MMS Port    : 80
MMC         : 234
MNC         : 15
APN Type    : Internet + MMS
APN Protocol: IPv4

```

I left every other field blank, saved it, selected it from the previous menu and restarted. Everything seems fine now, I've got full LTE where I had sporadic 3G (mosty no signal) in this same spot just moments before. Granted it's only been an hour so time will tell.

Source (and steps for some models): 4GTricks - Sprint APN Settings For Android, Samsung Galaxy, HTC One, Xperia, Motorola Moto, LG G1

# Answer
> 0 votes
Don't know if my solution will work for anyone else. I added an APN, but got no radio button to choose that APN. I then added the same APN again, and the second one sprouted a radio button to select it, and it started working. I have NO idea why. I also had the message that there were too many (0) APNs and I should delete some, and the message that the SIM was non-Verizon SIM. This just points out that trying odd things sometimes works.

---
Tags: cyanogenmod, mobile-data, data-connection, htc-one, sprint
---


# Question
Title: Iam using android emulator but i can't access root, su is not working for root in adb shell
In this image i have given the screenshot of my command prompt,anyone know this please explain how access root in android emulator

# Answer
From your screenshot, I can't actually tell which image your are trying to boot. You could actually try running Google APIs Intel images as opposed to Google Play images. As discussed in the linked question you could also utilise an older ramdisk.img.

Alternatively just push the su binary, if you want wide-access root for any app you install on your emulator.
> 0 votes

---
Tags: root-access, android-emulator, google-pixel-2
---


# Question
Title: How to change the browser of a web-shortcut?
An incompatibility between F-Droid's current version of IceCat and Android 8, makes it that I can't `Add to home screen` from IceCat (well, I can, but it doesn't do anything other than jump back to Trebuchet).

How can I create a web-shortcut to IceCat in that case?

I figured I could create a web shortcut with another browser, but it seems those shortcuts are "bound" to their original browser, so even though IceCat is my default browser, the web shortcut opens up in another browser.

Maybe another way to ask this, is: how to create a web shortcut which is not specific to any browser, so when I click it I get asked which browser to use.

# Answer
> 1 votes
Try Website Shortcut. Open the app, paste the link of the website/webpage, then click on create shortcut. It will fetch the icon from the website for you.

On the home screen, click on the shortcut, you will be prompted to choose a browser. After selecting your browser, I advise to select "Just once" to allow the selection of other browsers if needed.

The disadvantage of the app is that if you remove it, the shortcuts will also be removed.

**Disclaimer:** I am not related to the app's developer.

**EDIT:** Below his the response I received from the app's developer as to why the source code is unavailable. He has given his authorisation to show the screenshot of his response.

---
Tags: lineageos, home-screen-shortcuts, 8.1-oreo, trebuchet
---


# Question
Title: How to find local IP when connected to VPN?
I have connected an android device to a VPN using the native Android VPN client feature. I need to know the IP the device has been assigned on the VPN subnet, but I can't find it on any Android menu nor with any tool.

# Answer
Android's VPN uses TUN interface on OSI Layer 3. So you can find what IP is assigned to that interface using Android's built-in command `ip`. From any terminal app or `adb shell`:

```
~$ ip addr | awk '/inet.*tun/ {print $2}'

```
> 1 votes

---
Tags: networking, vpn, ip-address
---


# Question
Title: How do I change the country/region in Google Play Store?
I live in Israel. My Google Play is set to USA. I want to change it to Israel. The need to change that had arisen when I tried setting up Family Link on my kid's phone, which fails due to" country setting being different on parent and child phones". Sure enough, his country is set correctly in Google Play settings.

How can I change mine when the account-\>country and profile setting appears unchangeable?

Edited for clarification: I have never lived in the US and don't recall setting the country to US. I have no US based payment methods defined , but I do have Israeli payment method defined and used.

# Answer
> 1 votes
You have good instructions here: https://support.google.com/googleplay/answer/7431675?hl=en . But since this is Google you need to add payment method.

Change your Google Play country If you move to a new country you may want to change your Google Play country. Your Google Play country determines what content you see in the store. The apps, games, and other content in the Store can vary by country.

You can only change your Play country once per year. So if you change your country, you won’t be able to change it back for 1 year. When you change your country, you won’t be able to use your Google Play balance that you have in your old country in your new country. Change your Google Play country To change your country, you need to set up a new country in Google Play. To set up a new country, you must be in that country and have a payment method from the new country.

On your Android phone or tablet, open the Google Play Store Google Play. Tap Menu Menu and then Account and then Country and profiles. Tap the country where you want to add an account. Follow the onscreen instructions to add a payment method to that country. The first payment method must be from the country you’re adding a profile for. Once you create the profile you can add payment methods from other countries. This creates a new Google Payments profile linked to the new country. The Google Play Store will automatically change to the new country. It can take up to 24 hours to change.

If that is not working: Fix problems changing your Google Play country If you can't change your Google Play country or don't see the option to, try the following:

Clear your cache and data On your phone or tablet, open the Settings app Settings app. Tap Apps & notifications and then See all apps. Scroll down and tap Google Play Store Google Play. Tap Storage and then Clear cache. Tap Clear storage and then OK. Check if your app is updated Open the Google Play Store app Google Play. Tap Menu Menu and then My apps & games. Games with an update available are labeled "Update." You can also search for a specific game. Tap Update.

---
Tags: google-play-store, google-family-link
---


# Question
Title: How to move apps from internal to external storage?
I'm trying to move with Lucky Patcher (also with app2sd and Samsung stock app) some apps from internal to external storage, but everytime with every apps movable I got this message:

```
java.lang.IllegalArgumentException: New installs into ASEC containers no longer supported

```

I have a Samsung Galaxy S7 with Android 8.0 and root.

Do you now why this happens? Maybe, Android 8.0 doesn't allow anymore this?

# Answer
Native `app2sd` method - which placed encrypted `.asec` files in `.android_secure` folder on external SD card - was available only up to Android 5. For details see Why root cannot access “.android\_secure” directory on external SD card?

Starting with Marshmallow, the native method of moving apps to external SD card works only if SD card is formatted as `Adoptable Storage` (, ):

> ASEC containers have been deprecated since MNC, which is when we introduced the "adoptable storage" feature. Adoptable storage is a much better user experience, since we move both the APK and private app data together as a single unit.

* MNC is *Macadamia Nut Cookie*; code name for Android Marshmallow (6.x).
And:

> new installs into ASEC containers are no longer supported; use adoptable storage instead.

Adoptable Storage is a Full Disk Encrypted SD card, completely managed by `vold`, not visible to user as external SD card. See here how it differs from traditional Portable Storage. You can format SD card as partially Adoptable and partially Portable too.

Like the pre-Marshmallow `app2sd` phenomenon (), apps only with `installLocation` set to `preferExternal` or `auto` in app's `manifest` are moveable:

> Apps can be placed on adopted storage media only when the developer has indicated support through the `android:installLocation` attribute.

For apps with install location `auto`, default install location (set using `pm set-install-location`) decides where app will be installed. See this answer for details.

If you want to move all apps, use a third party solution like `Apps2SD` or `Link2SD`.

**PS:**
An even better approach is to move `/data/media` instead of apps. Create an extra partition on external SD card and `on post-fs-data` mount it to `/data/media` using an `init.d` script or Android's `init` service. Other bigger directories `/data/app` or `/data/data` can also be moved in the same way.

If you want to keep files encrypted on external SD card, this can be achieved through native methods `dm-crypt` (Android's `FDE`) for block device encryption, `ecryptfs` for stacked filesystem encryption, or third party solution like `EncFS` for stacked encryption. New native method of filesystem encryption `fscrypt` (Android's `FBE`) may also work, but I haven't tried. See details in this answer.

---

**RELATED:**
> 5 votes

---
Tags: internal-storage, app2sd, lucky-patcher
---


title: Pass through ODIN MODE

text:
# Question
Title: Pass through ODIN MODE
I have a Samsung J3 6 (2016), I'm trying to hard reset (PIN loss).

I found out that I should hold `Volume Up`+`Power`+`Home` for several seconds. Then I am warned that downloading a costum OS might be dangerous, I continue by press `Volume Up`.

I finally get stuck with a big droid and "*Downloading...* Do not turn off target !!" and also

```
ODIN MODE
SECURE DOWNLOAD: ENABLE
MOM DOWNLOAD BLOCK: 0
PRODUCT NAME: SM-J320FN
CURREN BIN: Samsung Official
SYSTEM STATUS: Official
FAP LOCK: ON
USB Init Start!
USB core reset done!

```

It's the same screen since 6 hours, is there a way to make the download complete?

# Answer
This happend to me on J3 2017, I left it for more than 48 hours but nothing. Then phone batery ran out, so phone reseted and firmware was deleted. I needed to download new firmware with Odin to phone from https://www.sammobile.com/firmwares/. It took me 8 hours too download it, becaose that site has Premium with normal download speed, but you need to pay for it.

ODIN DOWNLOAD Put file in Odin and start downloading. That process will fail hidden(it should fail) and you need to make a last step manulay. Link for official Sammobile tutorial :https://www.sammobile.com/forum/threads/35929-SOLVED-firmware-flashing-FAIL-after-hidden-img

I do not know if is this going to help you, but you can reset phone with this method to a state before you start this. And if you do everything good you wont loose your data.

And for PIN reset you can just make hard reset :Volume Up + Home + Power button for a couple of seconds and navigate with Volume button to hard reset. It will wipe all of your data to factory settings(if you have Samsung Acc. backup everything will be safe), including PIN code, but you need to input your gmail pasword (if you have gmail on phone) to unlock it,or phone will be locked.
> 1 votes

---
Tags: samsung-galaxy-s-3, factory-reset, hard-reset
---


# Question
Title: Should I get A1 or A2 spec'd Micro SD card for my phone?
I'm currently running with Samsung EVO Micro SD card in my phone (GT-i9195 or `serranoltexx`) in *Adoptable storage* mode.

I'm looking for a faster card to improve performance. I was about to get Sandisk Extreme A2 card for my phone.

However, I found the official pages about A1 and A2 class by SD Association. According to the official documentation,

A1:

> The Application Performance Class 1 (A1) was defined by SD Physical 5.1 specification.

A2:

> The Application Performance Class 2 (A2) is defined by SD Physical 6.0 specification. It makes SD memory card much higher performance than A1 performance by using functions of Command Queuing and Cache.

Note that A2 uses extra tricks to achieve better performance, especially Command Queuing (A2 spec'd cards have minimum support of `2` for Command Queuing depth).

**I'm looking for a card that has as low latency as possible for a single read. Should I get A1 spec'd card instead of A2** because even though A2 has higher random access "minimum" IOPS, it may only get it with QD32 queues? I'm looking for a good random 4K read QD1.

I wish storage manufacturers specified random 4K read QD1 performance. It seems that only storage with manufacturer published numbers is Intel Optane series where those numbers don't look too bad.

**Update:** more information:

Another document on the official site explains A2 features a bit more:

**Command Queue:**

> The new CQ mechanism allows the SD memory card to accept several commands in a series (without their associated data) and execute them (with the data) whenever the memory card is ready. It contributes mainly to random read performance.

Note that this clearly uses "random read performance" as *average IOPS*, not the maximum time for any given read operation.

**Cache function:**

> In order to overcome the relatively limited write speed operation of flash memory, the Cache function allows the card to accumulate the data accepted by the host in a high-speed memory (e.g., RAM\[)\] \[...\] Data loss is allowed if the data is not moved to non-volatile storage.

So... high *write IOPS* is allowed to be writing to card internal RAM and data loss is acceptable? The OS can already do exactly the same thing with higher performance!

**Self-Maintenance:**

> Card-initiated operation allows the SD memory card to perform internal maintenance operations while the host bus is idle. When a new command is received, the card must ensure that new command is serviced without violating SD standard timing (Read Command, 100 milliseconds; Write Command, 250 milliseconds).

And if card has entered "card initiated self-maintenance" mode (which A2 card is allowed to enter any time no commands are in the queue) the effective read IOPS may go down to `10` and effective write IOPS may go down to `4`.

I think A2 spec has way too huge tolerances for bad performance. Calling the above as "**minimum** 4K read: 4000 IOPS" and "**minimum** 4K write: 2000 IOPS" is a lie.

<sub>(I'm wondering if I should get Sandisk Extreme A1 card when those are still available on the market. Samsung EVO+ cards have nice performance in benchmarks, too, but if I've understood correctly those are meant for non-application usage and have worse wear leveling algorithm than Sandisk Extreme cards. The same thing with Sandisk Ultra cards - they don't last having the same sectors written repeatedly.)</sub>

# Answer
TL;DR: **Get an A1 card** unless you know for sure that your workload greatly benefits from Command Queuing (CQ) and your host hardware supports CQ.

**Long answer:**

After looking around a lot it seems that the A2 specification *could* allow better performance but actual hardware implementations are slow enough that A1 is better choice nowadays (year 2019).

Thomas Kaiser has collected info about A1 and A2 rated SD cards and says

> **Application Performance Class 1 (A1)**
>
> This performance class requires at least 1500/500 read/write IOPS (IO operations per second) with a 4k blocksize (small data chunks) and at least 10 MB/s sustained sequential write performance. **No special host requirements are needed, the card simply has to exceed the performance requirements on its own.**

and

> **Application Performance Class 2 (A2)**
>
> A2 promises even better performance with 4000/2000 read/write IOPS minimum but there's a problem since as outlined by the SD Association A2 cards show "much higher performance than A1 performance by using functions of Command Queuing and Cache".
>
> Cache and Command Queuing require host (driver) support since **the host needs to activate those new features first**. The cache feature on A2 rated cards **makes use of volatile RAM on the card \[...\] involving the risk of data losses** \[...\]

Another user wrote about real world performance between Sandisk Extreme A1 and A2 cards:

> I did some searching online and found a few other SD card benchmark results where **A2 cards performed worse than A1 cards**, so my results seemed to be what others were finding as well.
>
> \[...\] A2 cards not only require special hardware and/or software for maximum performance, they actually perform WORSE than A1 cards without it
>
> \[...\] \[Sandisk fine print about A2 cards\]: Up to 160MB/s read speeds, engineered with **proprietary technology** to reach speeds beyond UHS-I 104MB/s, requires compatible devices capable of reaching such speeds
>
> \[...\] As far as I can find, **the only "compatible device" is the SanDisk Mobilemate USB 3.0 micro SD card reader**

James A. Chambers has tested A1 and A2 cards with Raspberry Pi:

> A2 is not supported by Raspberry Pi yet (or almost anything else really) so **A1 is the important mark to hit**.

So the current status seems to be that A1 is strictly about card hardware speed and A2 is about card + host hardware/firmware/software solution. The only bit about A2 which *in fact* could improve performance is Command Queuing (CQ) which allows card to process *some* requests slower and still allow higher average troughput even for small I/O operations. And if you care about worst case latency (QD1) then any queuing is never worth it so you do not even want this feature.

However, it seems that with current hardware (year 2019) of A2 cards the *latency for any single request* has been increased from A1 cards. I guess this is caused by too slow embedded processors inside the cards that try to do a bit too much. The firmware is probably optimized for benchmark throughput (the card can handle lots of requests in paraller but execute each request a bit slower) and as a result, the latency for any single request has gone up. As a result, if your host device doesn't support CQ feature of A2 cards, you get the worst of two worlds: the latency will go up *and* overall throughput will suffer.

In the end, if your host does not support A2 feature, get an A1 card. And if you care about QD1 performance, get an A1 card even if your host hardware/firmware + software does support all the A2 features.

According to latest benchmarks **I would recommend either SanDisk Extreme A1 cards or A-Data Premier A1 cards**. According to StorageReview benchmark, the **A-Data Premier A1 card has highest random 4K performance: 2971 IOPS for 4K read, 1190 IOPS for 4K write**. The SanDisk Extreme A1 cards is better known, though, so it may be a safer bet. The SanDisk Extreme A1 is already hard to find because SanDisk prefers to sell A2 variants now especially for bigger flash sizes.

I wouldn't be surprised if current crop of A2 cards were *cheaper* to manufacture than A1 cards because the manufacturers can use lesser spec'd internal processor to achieve the A2 minimum random access performance thanks to more buffering and queuing. I can only wish more benchmarking sites would focus on request latency over throughput.
> 6 votes

---
Tags: sd-card, performance
---


# Question
Title: Today I read that flash write performance diminishes with use. I'm a heavy user. Should I change my behavior?
## My phone

I own a phone with gigabytes of built-in flash memory. My phone also includes a physical MicroSD card slot. I don't own a MicroSD card to put in the slot, and have never bothered buying one, but am not opposed to the idea of buying one.

I perhaps make heavier use of my phone's flash memory than most people.

* I run a freeware sleep tracker app most nights, all night long. It has many features. Its most storage-intensive feature? It records sound for at least part of every night.
* I have Debian Linux installed on my phone as well (even though the phone is not rooted). I launch Debian when desired using an app named GNURoot Debian. Debian Linux is normally stored on an SSD designed to handle an enormous number of write cycles, or on a hard drive which can also handle numerous write cycles — not on a smartphone flash memory chip.
* I have perhaps a hundred apps installed, and the Google Play store automatically updates some of them from time to time.
* I make heavy use of a game which was designed for use on Windows and Linux, but has been ported to Android. Every time I move between floors of the game world, the game saves some information to disk. I suspect that, in practice, it rewrites at least part of the game's save file.

## The problem

David Cary has more than 10,000 reputation points on Electrical Engineering Stack Exchange. In one post there, Mr. Cary writes:

> Flash memory has relatively quick read times but much longer write times. For example, with a Numonyx M25P80-VMW6G 75MHz 8 Mbit serial flash, reading a sector of data (at 75 MHz) requires 7 milliseconds, while erasing and writing new data to a sector is typically 0.6 seconds (max 3 seconds).
>
> In other words, writing this flash memory typically takes 85 times as long as reading, and in the worst case writing a sector takes over 400 times as long as reading. (That's not even taken into account the inefficiencies of partial-sector updating).
>
> In my experience, the time it takes to erase and rewrite a particular sector of flash continues to increase with each erase/rewrite cycle, but read times stay constant.

I don't know that much about hardware, but let's assume that Mr. Cary's experience will be true for my phone too.

## My question

I don't like spending money unnecessarily, and it sometimes takes me great effort to choose a phone to buy. When I buy a phone, I like to treat it well and to keep on using it for five to ten years or more — unless it breaks so badly that this becomes absolutely impossible.

Certain operations on my phone are annoyingly slow, such as Debian Linux automatic software update checks (`apt-get update`) and others. I don't know whether or not they're slow because of the time it takes to write to flash or because of other reasons.

Anyway, assuming that the issue which Mr. Cary has raised above is a real issue, should I worry about it? Should I change my behavior because of it — for example, by moving GNURoot Debian from the phone's built-in flash memory to a MicroSD card inserted into the correct slot?

## Note

I have left this question mostly device-agnostic. This is because I'd like to apply what I learn both to the device which I own and any other Android devices which I may buy in the future.

## Related

# Answer
As a user, and not a developer, this is not an effect you should concern yourself with. For operations like disk defragmentation or use of flash memory as virtual memory, the sustained high disk write rates can wear out flash memory quickly. But "normal" usage by a human will not produce enough writes to create a wear issue.

Let's take the sleep app as an example and estimate how many writes this will cause on a wear-leveled disk. Suppose the app collects 128 kilobit / second audio to store uncompressed and runs and collects audio at all times for 5 years. (128 kilobits / second) * (128 bytes / kilobit) * (5 years) * (365 days / year) * (24 hours / day) * (60 minutes / hour) * (60 seconds / minute) ~= 5.17 * 10^11 bytes. On a wear leveled disk of 1 GB ~= 10^9 bytes, this will be (5.17 * 10^11) / (10^9) ~= 517 cycles over the 5 years, which is well below the expected 100,000 cycles for current flash memory.

Also, note that almost all SSDs are currently built from flash memory, so there is no significant difference between the storage for your Android phone and that in a consumer SSD for a laptop/desktop in terms of expected aging issues.

---

**EDIT**

If you are really worried about this, I would benchmark your storage performance. I don't think it is a good assumption that erase/write operations take 0.6 seconds; your flash memory is not the same as that used in the example figures.

This empirical evaluation of flash memory gives actual figures for degradation. The magnitude of the effect is not that large for cycles in the low thousands.
> 3 votes

# Answer
I would say it depends on your hardware. For example, some Samsung devices (e.g. Note 4) are known to have eMMC flash chip that is prone to fail if too much data is written during the lifetime of the phone. I had to replace eMMC (the motherboard in practice) of my Samsung S4 Mini LTE due it failed after being written too much over time.

However, most phone hardware has too slow SD card writer for your use case, even if you get the best A1 class cards (for more information about A1 vs A2 cards for Android usage, see Should I get A1 or A2 spec'd Micro SD card for my phone?). The major problem you have is the usage of `apt` within the Debian installation. The `apt` usage is problematic because `apt` tries really hard to keep your system fully functional even in case of power loss during any update. As a result, it is really really `sync` happy and will wait for permanent storage to confirm all writes every so often before continuing.

If you can accept the possibility of losing your Debian environment due out of battery situation, you can mount your debian partition `noatime,async,nobarrier` and your performance should improve.
> 0 votes

---
Tags: linux, hardware, storage, performance
---


# Question
Title: How can I change the icon, icon name that lays under the icon, notification name, and notification icon for an Android app?
I'm running Android 5.1.

I'd like to change the icon for a few apps on my device.

I'd also like to change the app name both on the desktop and on the notification window that the OS makes pop up when those apps push notifications to my device.

Lastly, I'd like to change the notification icon that appears at the very top of my screen when a notification is pushed.

How can I do this?

I think I need to take the app, somehow "unzip" it and get the APK for it, change the image files and text files that carry those pieces of data, "re-zip" it, and finally reinstall it.

Is this correct?

How do I accomplish my goal?

Thanks.

# Answer
> 0 votes
You need an apk editor. With it you can edit app,so change icons etc.,but you also need to change JSON file becaose app need to know which file it need to use. After you edit app, you need to sign it, most app editors do it automaticly. And then install like update over app. But there is a problem. Some apps will after update return to original settings. And some will give you notice that app is edited and forbid you from using it. So all dependent on app. You did not specify your device manufacter, but if you have Samsung you can change icons of most apps in Samsung Theme app(some thems can change app icon design and notification iconand you can also download only app icon design).

If you only want to "edit" app you need to be vety carefully to not ruin app completly. Good Luck.

---
Tags: applications, 5.1-lollipop, apk
---


# Question
Title: Does my Galaxy S6 have an unlocked bootloader?
I want to install the Resurrection Remix custom ROM on my SM-G920I (Australian Version). Before I start doing anything, I need to make sure that the bootloader is unlocked, so I don't brick my phone.

To find out the state of my bootloader, I tried doing a few things that I read online. First, having a look at download mode, by holding home, power and volume down on startup. It instead goes to "Odin Mode" and lists these items.

```
ODIN MODE
PRODUCT NAME: SM-G920I
CURRENT BINARY: Samsung Official
SYSTEM STATUS: Official
REACTIVATION LOCK: OFF
SECURE DOWNLOAD: Enabled
KNOX WARRANTY VOID: 0 (0x0000)
RP SWREV: B:4 K:2 S:2

```

Do any of these items tell me about the bootloader?

I then tried using the ADB and fastboot method. Fastboot refused to work for me, saying no devices found. I later found out that Samsung devices do not have a fastboot mode at all.

Lastly, I tried just going to Developer Options and enabling "Allow OEM Unlock", but this feature was nowhere to be found on my device.

How am I able to check if my bootloader is unlocked, so I can root and flash a custom ROM on my device?

# Answer
Most if not all non-US-carrier Samsung devices come with unlocked/unlockable bootloader; those without the "OEM Unlock" switch are simply unlocked by default. Just proceed with flashing TWRP or whatever ops you need to do next.
> 0 votes

---
Tags: root-access, custom-roms, bootloader, bootloader-lock
---


# Question
Title: How to remove telegram's secondary account
Telegram has multiple accounts feature and you can follow the guide here on how to enable it.

The problem is I can add a new account, but can't find any button or option to remove it.

# Answer
> 2 votes
1. Open that account.
2. Go to Settings.
3. Tap on three dots in the upper right corner.
4. Log out.

---
Tags: telegram
---


# Question
Title: What are the "Window animation scale", "Transition animation scale" and "Animator duration scale" settings in android developer settings?
I have seen many posts suggesting to turn them off, i have them turned off and notice quicker transitions, no animations, etc. But in some places it is weird to see no animation.

I googled the terms to try to find what they meant, but could only find the above suggestions. Could someone explain what effects each setting has?

# Answer
> 3 votes
All 3 of these are set to 1.0× by default ; you don't need to turn them off, just cut the values in half and set them all to 0.5 for noticeable snappier performance.

As for what each one does specifically and using my Galaxy S8+ to test them ᎓

**Window animation scale** controls *pop-up window opening and closing animation speed,* such as the pop-up you get with the various speeds you can choose when you select this option.

**Transition animation scale** controls *app window opening and closing animation speed,*

**Animator duration scale** controls *app switching animation speed.*

If you use your phone's stock launcher, one of these — likely the middle one — will also affect homescreen-to-homescreen transition animation speed ; on my phone I use Nova Launcher and homescreen animation speed is adjustable within Nova itself, and is unaffected by any of the above developer options.

---
Tags: settings, developer-options
---


# Question
Title: I can't unlock bootloader on fly fron linux
My OS is **majaro linux**.
My phone is **fly nimbus 8**.

I tried to unlock bootloader on it.
I followed the instruction.
First I go to the **Dev mod** then enable **OEM unlock** and **USB debugging**.
Second I typed:

> adb devices

output:

```
List of devices attached
56090913288827  device

```

Then I typed:

> adb reboot-bootloader

It became like this:

Then I checked again:

> fastboot devices

output:

```
56090913288827  fastboot

```

It seems all works out good! But then I entered:

> sudo fastboot oem unlock

And then nothing. I mean absolutely nothing: it does not throw an error, not answers, not completes.
By the way, the phone does the same - absolutely nothing!
if I plug off the device it writes:

```
FAILED (Status read failed (No such device))
fastboot: error: Command failed

```

I tried it already ten more times but it doesn't want to work!

Does anyone know what the problem?
Did somebody have the experience in flash the **fly**(in particular **nimbus 8**)?
I'll de be waiting for an answer!
Thanks!

# Answer
> 0 votes
I found out what the matter!
**Fly nimbus 8** delivers in two kinds: with **MTK** and with **spreadtrum**!
In my case it was with **spreadtrum**.

---
Tags: fastboot, bootloader
---


title: Link2sd pkg error

text:
# Question
Title: Link2sd pkg error
I have problem with Link2sd app. When i'm trying to move any app to sd card following error appears. Any ideas how to fix it?

Samsung galaxy J3, 5.1.1 Android

# Answer
> 1 votes
fixed, solution for the future;

Just open Link2Sd and convert the system app to user app by clicking on the app, then click on the three dots on the top-right corner, then select Converto to user app. After that you have to restart and then you can move to sd, or link if you want to.

---
Tags: root-access, link2sd
---


# Question
Title: Phone stuck in bootloop and recovery not working
TLDR: I wanted to root my LG G6 (H780) so I unlocked the bootloader, flashed TWRP, then SuperSU and now it's stuck in a bootloop and the recovery isn't working.

Unlocking the bootloader itself was as easy and gave me zero problems. Flashing TWRP was also easy however I did initially have a problem with it: it asked for a password to decrypt the storage even though (afaik) I had turned the encryption off. After some searching I found out that this might be a bug with the version that I used so I found a more up to date one for my phone. This time it didn't ask me for a password and I was even able to flash SuperSU. After flashing SuperSU I wanted to reboot my phone, and it's now stuck in a bootloop. If I try to go into recovery I get the 2 prompt that ask you if you are sure you want to delete all user data but after that, it just goes back into the bootloop.

I was wondering if anyone has any idea if there is even anything that I can do. I can't get it into recovery so I can't even use ADB (afaik). Thanks for your help.

I have seen other similar questions about this but I believe they are specifically for that phone.

# Answer
I managed to start Download mode and use LG Bridge as shown in this video.

I wanted to try this before, but I wasn't able to get into Download mode. The time window to hold volume up and plug in the cable it pretty small.
> 0 votes

---
Tags: boot-loop, unbricking, lg-g6
---


# Question
Title: How can you open a URI from the command line?
I recently started playing with the app called 'Automate'. The starting block for each Automate flow provides a URI. Can this URI be used to initiate a flow? Can I accomplish this from the command line? Specifically, I would like to call Automate flows from within a Termux environment. I assume this can be done with `am start ...` but I haven't had any luck trying different commands (and I have successfully used `am` from within Termux before, so I don't think that's an issue). I have very limited knowledge of Android intents.

I tried running `am start -d content://rest-of-uri` and I received a prompt asking which app to open, I chose Automate and the notification appeared for a second but the flow didn't run.

# Answer
> 1 votes
As shown here, you can use these commands:

```
am start -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1

```

or

```
am start -a com.llamalab.automate.intent.action.START_FLOW -d content://com.llamalab.automate.provider/flows/13/statements/1 -n com.llamalab.automate/.StartServiceReceiver

```

Replace `content://com.llamalab.automate.provider/flows/13/statements/1` with your flow URI.

The first command worked for me while the second was giving an error in Termux and `result=0` in Terminal Emulator.

---
Tags: terminal, termux, automate
---


title: Google play infinite login loop

text:
# Question
Title: Google play infinite login loop
I recently changed my Google password, but now when I open Google Play and Gmail, it prompts me for my password and won't accept it. It works in the YouTube app only. I've tried rebooting, but this has been going on for about a week, so I don't think its a google server issue.

Device: NVidia Shield with Android 5.0.1

# Answer
Just remove your Google account from accounts and add it again. I also had this problem, but removing&adding it again solved it instantly.

It will sync with Gmail, Contacts again, so you should have no problems
> 3 votes

# Answer
ITS YOUR PHONE! It's not a Google issue, as I'd suspected. No amount of adding and replacing google accounts will work. I've been battling this issue for a year and doing everything everyone/anyone suggests to no avail. Except resetting phone to factory defaults... that was too scary so I didn't do that. I recently had to replace my phone for a faulty internal (non-replaceable) battery, and HELLO the new phone allows me to sign in without any issues. It's a miracle. BTW, old phone is HTC One M9, and Verizon replacement phone is a Samsung Galaxy s7 (new is s9, don't care, it works). The problem is with your phone.
> 1 votes

# Answer
You go to apps and clear data and cache from Google apps in Google play / Google services and services framework and remove any accounts currently on Android. Then go to backup in settings and add account this backup rout re login to account without loop
> 0 votes

# Answer
None of the above worked for me. Removing the account is not always going to work if you've synced your device more than once due to such things as a re-flash or a re-build of the device. In my case it was a *HTC One A9* phone. I recently had to reflash my phone and I stupidly added two accounts to my phone instead of leaving it as a *single account*, but I was able to use Google apps (gmail, drive, etc) using multiple accounts. Go figure. So I did this:

* Go to your device Settings
* Don't go to Google option, but to Accounts and Sync
* Click on an account
* Click the three dots on the top-right
* Delete or Remove the account. Do this for every account you may have there.
* Re-boot the phone/device
* Re-add your primary Google account that you want associated with the device for Google Play, Google Services, etc...
* Make sure everything is ok. Now for the final steps
* Go to Settings on your phone again
* This time go to Google option -\> Accounts
* You may be asked to verify who you are again. Do that. I had to recover my security codes for cases when you loose your password
* Now your Google account should show you the usual Google Account options - Home | Personal Info | Data & Personalisation etc etc

You should be ok from there. Just don't add another G account to the device. Only add them through the G apps.
> 0 votes

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


title: Install another Settings app?

text:
# Question
Title: Install another Settings app?
Is it possible to install a different settings app than the one my phone came with? Specifically, I'd like the official Google one.

# Answer
> 1 votes
There's an alternative method here if what you're looking for is greater control and access to settings not available through the default settings UI: Settings Database Editor

Word of warning: you can possibly brick your phone if you don't know what you're doing, so proceed with caution, back up your data, and thoroughly research any customization.

Through this app, you can directly access and modify the db values for your various device settings. This doesn't necessarily require root (might depend on device model & OS version), as you can grant some of the permissions through an ADB command.

EDIT: fixed link.

# Answer
> 0 votes
A Galaxy S3 is to highly customised by Samsung that you can't install a stock settings app. It will corrupt/brick your phone if you try so.

However you maybe could install the settings app of a galaxy s4 mini because it is almost the same. But I am not sure. **do it at your own risk**

Hope my answer helped.

---
Tags: settings, installation
---


# Question
Title: How to maintain 1 char at a time when holding down delete?
After about 2 seconds or so quickly deleting 1 char at a time holding down delete turns into quickly delete entire words or sentences at a time. To avoid this I end up having to:

press for about 1 second then let go

press for about 1 second then let go

press for about 1 second then let go

Is there a way to change the behavior to maintain only 1 char at a time no matter how long you hold it down? Maybe have another key delete entire words or sentences at a time. This is using the Samsung keyboard, is there another keyboard that'll allow this?

# Answer
> 1 votes
This is a 'feature' of Samsung's keyboard, default on Samsung android phones. I did look at Samsung's settings and did not see the ability to alter this. Use another keyboard to fix, which I did, such as Gboard by Google.

While I do like the ability quickly delete word by word also, that should be provided by a another key, not shared with the character by character key.

---
Tags: keyboard
---


# Question
Title: DeX mode not starting after Android security update
After recent two Android security updates, Samsung Galaxy Note 8 plugged into a DeX station is unable to detect it and therefore it is not offering the notification which allows to turn on the external monitor or going to DeX options.

Attached keyboard and mouse via USB ports on Dex Station still work fine with the phone as it is. Only the DeX mode recognition seems to be gone.

What I did try:

* An advice to plug the phone into DeX Station unplugged from the power and the re-attached the power cable but it did not help the DeX recognition.
* A troubleshooter from Samsung. Update was completed, no change.
* Trying the device elsewhere with a Galaxy S9 phone. It worked normally.

# Answer
### It was an HDMI connectivity issue.

If there is a connectivity issue to an external monitor, for example HDMI cable is detached or damaged, the DeX Station behaves exactly as described above. Everything in DeX Station seems to be working except of the external monitor which remains blank and also there is no DeX item among notifications.

My assumption that the external monitor will start working *after* the DeX notification is clicked was wrong. The monitor should always produce the image from the phone when the phone is on. Only then the DEX notification follows on the phone.
> 0 votes

---
Tags: 9.0-pie, samsung-galaxy-note-8, samsung-dex
---


# Question
Title: How to use Private DNS on Android Pie for tethering?
Is it possible to use Private DNS on my laptop that is connected to WiFi shared by my Android Pie smartphone with configured Private DNS?

I tried visiting https://1.1.1.1/help from my phone and it says DNS over TLS is used, but when I visit from my laptop it tells me that it uses plain unsecure DNS.

# Answer
> 2 votes
DNS has traditionally been part of `libc`. Android's `Bionic libc` depends on `netd` for traditional DNS as well as Private DNS (`DoT`) implementation. See this answer for more details.
Since every app runs in its own stance of Virtual Machine (ART) forked by `zygote`, so when an app creates a new connection to a remote hostname, DNS queries are made by the VM on behalf of the app, which makes use of DNS resolution in native code. So the whole thing is handled by Java runtime.

When using tethering, a DNS server needs to be run on Android device which listens to DNS queries received from connected hosts. These queries are then resolved as per configuration of DNS server. `dnsmasq` is current implementation of `DHCP`/`DNS` server on Android up to Pie. It's a native daemon, which receives `nameservers` from `TetherController` (a part of `netd`) or `/etc/resolv.conf` (if `no-resolv` argument is not passed) or `/etc/dnsmasq.conf` (using `server=` option).

So `dnsmasq` works independently and doesn't depend on `libc` or `netd` for DNS resolution. In other case if the tethered device is using some other public nameserver and not `dnsmasq`, the DNS queries are forwarded to internet as per routing policy and NAT rules. In each case the queries don't pass through Private DNS.

That said, you can use third party solution for encrypted DNS. Go for a robust solution: dnscrypt-proxy on rooted device. See this answer for an advanced setup.
Or use some VPN app like this. But VPN doesn't redirect hotspot traffic through VPN network as far as I have tested on Pie ROM. You have to modify routing table and forwarding rules. This works for me:

```
~# iptables -t mangle -I PREROUTING -i wlan0 -p udp --dport 53 -j MARK --set-mark 2
~# ip rule add fwmark 2 lookup 5000
~# ip route add default dev tun0 table 5000
~# iptables -I FORWARD -o wlan0 -i tun0 -j ACCEPT
~# iptables -I FORWARD -i wlan0 -o tun0 -j ACCEPT

```

Additionally `NAT`ing might also be needed for some situations. So it seems there isn't a non-root solution.

**PS:**
Most probably Android Q will have `DoT` on tethering too because `dnsmasq` is being replaced with a DHCP service inside Java runtime.

**RELATED:** How to share VPN connection with devices on hotspot?

---
Tags: tethering, 9.0-pie, wifi-tethering, dns
---


# Question
Title: Install APK from ADB and bypassing the prompt on Redmi
Device = Redmi 5 Plus.

I have 250 apps as a `.bak` created by PC app. But the cheater PC app is asking for premium to restore it now. So, I can extract the `.bak` and find my apps.

I wanted to batch install those apks. I tried `adb install apkname.apk` to check if it works. But the phone keeps prompting me to accept the install and countdown starts, or else it will auto deny after countdown finishes. I've also tried 3rd-party app like ApkInstaller but it's the same.

I read many articles and they say it works without prompt. So, why am I getting this issue? How to bypass this prompt automatically?

# Answer
> 1 votes
In addition to `adb install`, you can directly use `package manager` from `adb shell` to install apps. Place `.apk` files in `/data/local/tmp` and make sure files are readable, SELinux context must be `u:object_r:shell_data_file:s0`. Now:

```
~$ cd /data/local/tmp
~$ ls *.apk | xargs -I {} pm install '{}'

```

Another simple root solution is to use some file explorer e.g. MiXplorer to batch install apps. Select all `.apk` files and tap on `Install` from menu.

---
Tags: adb, backup, installation, apk, xiaomi
---


# Question
Title: How to tell if an SD Card is already internal storage?
I have a Nokia 6.1, and Android One phone, running Pie. Is there any way to tell if my SD card is already formatted for internal storage?

Thanks

# Answer
When you go to settings\>device maintenance\>storage (it might be a different path for you I'm running 8.0) does it list your inserted SD card? If not then it's not available.
> 0 votes

# Answer
Do `df | grep /mnt/expand` on a terminal app or `adb shell`. If you see a `dm-crypt` virtual volume like `/dev/block/dm-1` mounted on `/mnt/expand/[UUID]` and additionally `/mnt/expand/[UUID]` is mounted at `/storage/media`, then your external SD card is adopted as internal storage.

Otherwise it's `/data/media` mounted on `/storage/emulated`, and your SD card is mounted as Portable Storage.

**RELATED**: What is /storage/emulated/0?
> 0 votes

---
Tags: internal-storage, 9.0-pie
---


# Question
Title: Get alarm alert when receiving an email from specific sender
Is there an app or setting in gmail where I can get alarmed for urgent email based on the sender.

From googling, it seems Gmail had a setting to set a ringtone for specific label, but this feature has been discontinued and no longer available in the newest version.

# Answer
You are correct Gmail no longer allows to select individual sounds for labels. If messages from a particular sender are way too important to miss, then create a filter for that sender using Gmail via the browser not the app. Select a message from the sender, then on the right, click on the 3-dots and select "Filter similar messages". At the bottom, select "Create filter with this search". Tick "Apply the label", then select "Choose Label" followed by "New label". Give you label a name and click OK. After creating the label, click on "Create Filter".

Open the Gmail app, go to Settings, select the account you have just created the filter and label from, if Notifications is not selected, then select it. Click on "Manage Labels", select the label you created for the sender, enable "Label notifications" and "Notify for every message".

Go back and **Disable notifications for the other labels**.

It is the only way for now to get notifications for that sender only until the ability to select ringtones for labels is restored.
> 1 votes

---
Tags: email, tasker, alarm
---


# Question
Title: How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?
Galaxy S5 running LineageOS 16 (Android 9).

I'm having issues with running out of storage space, even though I have 128GB external SD card, merged with the internal storage. Is there a way to create a symlink from the internal memory to the external SD card, even though they are technically merged and aren't identified as separate storage locations within Android as a result?

I've never made symlinks on Android so I'd appreciate some pointers or resources on that as well.

# Answer
> 5 votes
First of all, symlinks don't work on Android's emulated storage. A workaround is to use ***bind mounts*** instead. See this answer for details.

But ***with Adoptable Storage you don't need to***:

* Create symlink to external SD card
* Manually move data to external SD card
* Bind mount a directory from external SD card

Because what you see as `/sdcard` or `/storage/emulated/0` should already be on Adoptable SD Card.

When you format external SD card as ***Adoptable Storage***, it's mounted at `/mnt/expand/[UUID]`, which holds a file hierarchy very similar to `/data` partition, like `/data/app`, `/data/data` and `/data/media` etc. When you ***migrate your data*** to newly created Adoptable Storage, data from `/data/media/` is moved to `/mnt/expand/[UUID]/media/` and the later is now emulated and bind mounted at `/storage/emulated` (which apps see).

You can check this by executing `df` or `mount` command on a terminal app or `adb shell`.

**Without Adoptable Storage:**

```
~$ df --output=source,target
Filesystem                  Mounted on
/dev/block/dm-0             /data
/data/media                 /storage/emulated
/dev/block/vold/public:8,1  /mnt/media_rw/[UUID]

```

* `dm-0` is FDE encrypted `userdata` partition, `vold` public volume is external SD card or USB drive.

**Before moving data:**

```
~$ df --output=source,target
Filesystem                  Mounted on
/dev/block/dm-0             /data
/data/media                 /storage/emulated
/dev/block/dm-1             /mnt/expand/[UUID]

```

* `dm-1` is FDE encrypted Adoptable SD card.

**After moving data:**

```
~$ df --output=source,target
Filesystem                  Mounted on
/dev/block/dm-0             /data
/dev/block/dm-1             /mnt/expand/[UUID]
/mnt/expand/[UUID]/media    /storage/emulated

```

* Actually `/data/media` or `/mnt/expand/[UUID]/media` is emulated to `/mnt/runtime/[default|read|write]/emulated` which is bind mounted to `/storage/emulated`.

You can only ***move apps (along with their data) to Adoptable Storage*** which have `installLocation` set to `preferExternal` or `auto` by app developer. In case of `auto`, default install location (set using `pm set-install-location`) decides where app will be installed. See this answer for details.

If you want more free space, replace large directories (like `/data/media`, `/data/app` and `/data/data`) with mounts (or bind-mounts) from partitions (or directories) on external SD card. However (DAC and MAC) permissions should be taken care of, otherwise apps (or even OS) may break.

---

**RELATED:**

---
Tags: external-sd, storage, insufficient-memory, internal-sd, adoptable-storage
---


# Question
Title: How can I use Gmail's canned responses on my phone?
I frequently use canned responses in Gmail on my computer but it doesn't seem to be accessible on my phone. Are there any workarounds or solutions that allow me to use this feature on my phone as well?

# Answer
> 1 votes
As of July 2019, the features is not available for Gmail app but you can use it when using a browser on your phone and requesting the desktop version.

You are left with 3 possible solutions:

1. Create draft messages that you can then copy and paste for new messages.
2. Enable "Smart Reply" in the Settings of the Gmail app for the account you are using. Then hope that you will get good suggestions when replying to messages.
3. Use Canned Responses for GMail. It purports:
> GMail canned responses are very handy on a full featured web browser but when it comes to mobile - it's almost impossible to import your canned responses in an email message. With Canned Responses for GMail you will be able to do it in 2 taps. A swipe and a tap actually :)

---
Tags: gmail
---


# Question
Title: Does Google have a record of my fingerprints from the Android devices?
My phone has a fingerprint scanner. I notice on the Google Play Store, it has the option to verify your identity with a fingerprint scan instead of typing in the password when making a purchase.

Does this mean Google has a record of your fingerprints? When is this record made, when you first enable the screen lock with your fingerprint?

# Answer
> 2 votes
No, your fingerprint data never leaves your device.

> Your fingerprint data is stored securely and never leaves your Pixel or Nexus phone. Your fingerprint data isn't shared with Google or any apps on your device. Apps are notified only whether your fingerprint was verified.

Source

*Source is from Nexus/Pixel support pages hence why it mentions them specifically. The same should apply for other devices however)*

# Answer
> 1 votes
When you activate the fingerprint authentication for any third-party app, what it does is that it asks your Android system to initialize the fingerprint hardware which checks for your fingerprint. And if it matches, it passes that information back to the system and then to the app. The only information that the app gets is that the scan was successful. Your fingerprint never finds a way into the app.

---
Tags: google-play-store, google, privacy, fingerprint
---


# Question
Title: Can't Access internet through laptop wifi in my xperia u
I was able to create a hotspot through Connectify software in my laptop, but when i connect my phone to it ,it shows i am connected but i am not able to access the internet. Is there any option that should be enabled on phone?

# Answer
Here's a useful post from XDA-Developers website: refer to this link.

**Configuring laptop/pc**

1. First, you need to create an adhoc network: Open network and sharing center on control panel click on manage wireless networks then add , a windows is shown, select create an ad hoc network click on next then input a network name(for example name it 015) then choose the security type (you can select either open or WEP) then check the box save this network
2. Now reopen network and sharing center on control panel then change adapter settings. Right click on your internet network and click on properties then select the tab sharing and check the "allow other network users to connect through this computer's internet connection" (choose wireless network, if multiple networks are shown). check also the "allow other network users to control or disable the shared internet connection" next click on setting and check all items..
3. Right click on wireless network connection and double click on "internet protocol version 4(tcp/ipv4)" on the new window select use the following ip address 192.168.137.1 and subnet mask 255.255.255.0 now activate your new adhoc network (if not already) go to the network icon next to the clock and select it and connect. Congratulation your laptop/pc is now configured .

---

**Configuring the android device :**

Now, we will configure the android device to make it able to access this new adhoc network

1. Go to setting on the menu of your device
2. then wireless and networks then wi-fi settings then activate wi-fi . Right click and choose advanced. Check the "Use static IP"and fill in :

* ip address: 192.168.137.5 (for example)
    * Gateway : 192.168.137.1
    * Netmask : 255.255.255.0
    * DNS 1: 192.168.137.1
    * DNS 2 : 172.168.137.1
3. right click and save. Finally, click on the adhoc network (and input password if you use WEP security) then connect.
4. If you encounter problems connecting ,try to disable then to reactivate wifi, else reboot your android device.
> 1 votes

# Answer
after the successfully connected internet to your laptop install and run this software "Virtual Router Plus" and shared connected connection then search for the wifi in any device u can access it by entering correct key.
> 0 votes

# Answer
You need administrator for this.

* Start your hotspot using "Connectify" or "Virtual Router" (which is better IMO as it doesn't shutdown all 30 min like Connectify Free Version)
* Go to network and sharing center on the control panel on your laptop and press on "change adapter settings"
* Right-Click the adapter you are using to connect to the internet and press on the "sharing"-tab.
* Check "Allow other Users in the Network to use this connection as internet connection"
* Select your hotspot network and press okay.
* Restart your hotspot and connect your phone.

You're good to go.
> 0 votes

---
Tags: connection-issues, reverse-tether
---


title: Can't boot into system or recovery

text:
# Question
Title: Can't boot into system or recovery
I had the Pixel Experience ROM on `Redmi Note 7 Pro` which got an OTA update and after the update was installed it got stuck on the boot logo of the phone, the usual keys for recovery mode don't work. Reinstalling the recovery through `fastboot flash` and `fastboot boot` gives the same result. Sometimes it shows warning: `Your phone is destroyed press power button to turn off`.

How can I recover from this? This is the ROM that was installed through OTA.

# Answer
You can try to boot directly into recovery instead of flashing image: `fastboot boot recovery.img`

If it doesn't work, go for flashing factory firmware in `bootloader` or Emergency Download mode. Here are the detailed instructions for Xiaomi devices.
> 2 votes

---
Tags: recovery-mode, twrp, fastboot, unbricking, rom
---


# Question
Title: How to load kernel module with Magisk root but without custom kernel?
I am having a really hard time finding anything about this on Google which is not from 2011. I have a Samsung Galaxy S10+. I have rooted it with Magisk **without** TWRP, i.e. no custom recovery or custom kernel. I want OTA updates without having to delete everything on my phone just to update, that is why I use Magisk without TWRP.

What I need is drivers for my WiFi adapter `TP-Link TL-WN7220`. I know that to be able to install a driver into the kernel, that means a custom kernel and then you would not be able to have OTA updates which defeats the above purpose.

My question is, is there a way to load a driver, even if it is temporary like loading a kernel module on Linux? On Linux this does not require a reboot, can this be done similarly on Android, so I will keep my stock kernel but still be able to run the WiFi adapter?

# Answer
> 2 votes
> I know that to be able to install a driver into the kernel, that means a custom kernel and then you would not be able to have OTA updates which defeats the above purpose.

You can't have OTA updates with Magisk installed because flashing Magisk modifies `boot` partition in which kernel binary lives. Before OTA update, you will have to uninstall Magisk which will restore original `boot.img`, backed up in `/data`. So at the moment you can do whatever you want with kernel. That will be reversed with Magisk uninstall.

> is there a way to load a driver, even if it is temporary like loading a kernel module on Linux?

Yes you can load kernel modules just as you do on Linux. But for that you have to rebuild kernel with the required module, or it should be compatible with installed kernel if built separately.

The installed kernel should be built with `CONFIG_MODULES=y` in order to load modules. Make sure the version of kernel source code tree or that of header files match with installed kernel version. Otherwise dependencies may break resulting in `Unknown symbol in module` type of errors. Also, if kernel is signed (`CONFIG_MODULE_SIG_FORCE`), modules must be signed with the same key to avoid `required keys not available` error.

---
Tags: root-access, kernel, magisk
---


# Question
Title: Is it possible to add a driver to my kernel without flashing a new kernel?
Is it possible to load a driver as a kernel module into my Galaxy S10, Magisk rooted without having to build a new kernel and flash it?

# Answer
Drivers are built as kernel modules i.e. `.ko` files which can be loaded with `modprobe` but for that you have to rebuild kernel with the required module, or it should be compatible with installed kernel if built separately.

The installed kernel should be built with `CONFIG_MODULES=y` in order to load modules. Make sure the version of kernel source code tree or that of header files match with installed kernel version. Otherwise dependencies may break resulting in `Unknown symbol in module` type of errors. Also, if kernel is signed (`CONFIG_MODULE_SIG_FORCE`), modules must be signed with the same key to avoid `required keys not available` error.
> 1 votes

---
Tags: kernel
---


# Question
Title: How to root Android using CF-Auto Root Solution
How to root using CF- auto root? How to use Odin with it?

# Answer
> 1 votes
When you decide to root your Android usually you have to pick a proper rooting solution next. Otherwise, you have to face a lot of problems. In the worst-case, you might have a bricked mobile phone or tablet instead of a rooted one. So in this article, I'm going to talk about one of the best rooting tools if you have a Samsung smartphone or a tablet. We are going to root it using CF Auto Root through download Odin.

**Preparations before Root Android**

So this an invention of the famous XDA developer Chainfire. The exploit is working for more than 300 common Android devices. But today we are gonna focus on Samsung. If you want to work with this you better check the compatible list which is available in the XDA Developers forum. It usually unlocks the bootloader first. So make sure to keep backups unless you will lose your data. And the other special fact is that Samsung drivers are only compatible with Windows. So you should have a Windows PC for the task.

**Android Rooting for Samsung**

* First, you have to make sure to install proper drivers. Check this link out and you will be able to download them. You just have to extract the zip and launch the .exe.
* The next step is to download the correct CF-Auto-Root file. There are many. So to find your compatible version check the model Number and the Android version. And then click the download.
* Make a new folder and extract the downloaded zip file there. The file should be located in the hard drive.
* Then put your smartphone or the tablet into the download mode. Volume down button, home button, and power button will help to do this. Press and hold it simultaneously.
* Now connect it with the windows computer using a USB cable.
* Now browse to the folder that has extracted the content of the downloaded zip file. On there you will see a .exe file with a name ODIN. Right-click on that select to run it as an Administrator
* Once Odin is running it will detect the device.
* In the interface "ID:COM" field should be turned to blue.

* Click the AP button and keep the rest unchanged.
* Again you have to browse to that exact same place that has extracted the content and select CF-Auto-Root.rar.md5 file. Then click Open
* When the log tab displays a message saying "Leave CS" click the start.
* Now the rooting process has been started.
* When its finished the device will reboot back to Android.

*Wrap Up*

*So this is an almighty process of rooting your Android Operating System using CF-Auto-Root and Samsung Odin. It is safe and pretty easy compared to some other tools. So if you want to check the root status you should download the root checker.*

---
Tags: applications
---


# Question
Title: Is there a way to set up a firewall on mobile hotspot to block incoming connections?
I've been using the Android mobile hotspot to get an Internet connection while traveling. The stock hotspot is fine for my laptop which is firewalled, but there are a few devices (smart TV, game system, etc) which are not at all secure to put onto an open network.

I want to have a firewall on my mobile hotspot (for blocking all external traffic except return traffic). Is there any way, including app for that? Preferably open source but even paid is fine. My Android isn't rooted, so I would prefer a solution that doesn't require rooting my phone (if possible).

Just in case you might think NAT provides adequate firewalling for security, read here. TLDR; NAT is not a security layer.

I've already tried searching for this here, but I only found a question from someone trying to filter IP addresses that was never answered. None of the hotspots I found in the Play store offered any port blocking features.

I should mention that I have reason to believe my carrier's NAT does not block incoming connections. That reason being that running a web server on my phone using NodeJS in Termux will be accessible over the Internet.

# Answer
> 1 votes
> I want to have a firewall on my mobile hotspot (for blocking all external traffic except return traffic). Is there an app for that?

No, apps can't do it. It's something at lower level, apps aren't that privileged. VPN apps are a workaround for outgoing connections (because of possible filtering based on `UIDs` and `SOcket_MARKs`), but not for incoming connections.

> My Android isn't rooted, so I would prefer a solution that doesn't require rooting my phone (if possible).

Not possible without root (AFAIK), but with root it's simple; thanks to Linux kernel. Since Android uses default policy `ACCEPT`, drop any unwanted packets:

```
~# iptables -I INPUT -i rmnet_data1 -m conntrack ! --ctstate ESTABLISHED,RELATED -j DROP
~# iptables -I FORWARD -i rmnet_data1 -m conntrack ! --ctstate ESTABLISHED,RELATED -j DROP

```

First rule will allow only return traffic for Android device, second for tethered hosts. Replace `rmnet_data1` with whatever interface your Mobile Data is using. I hope you won't want to block incoming connections from WiFi interface (`wlan0`) to let hotspot work.
Note that `iptables` rules on Android are dynamic, `netd` keeps on updating them with network changes. So better use these rules with some app like AFWall+.

---

I'm not an expert but as per my understanding, open ports make sense only when you have a public IP, preferably static, as is the case with fixed line broadband connections and special SIM cards with fixed public IP service. Mobile Network Operators (I assume you are connected to Mobile Data) always do Carrier Grade NAT (sometimes double NAT), basically to address the problem of IPv4 Address Shortage, but it also serves additional interests. They run e.g. transparent caching proxy servers and DNS servers behind this NAT to minimize load on internet bandwidth and to improve performance by reducing latency. When you are behind CGN:

* Your public IP changes e.g. when you move.
* Private IP you get (usually 10.x.x.x) is assigned by MNO's DHCP server, so it keeps on changing e.g. when the lease expires or when you reconnect.
* Even if you get a fixed private IP, your ISP/MNO should forward ports from public IP to your private IP, which they don't. Because there could possibly be hundreds and thousands of customers wishing to forward the same port from same public IP to their devices.

So keeping incoming ports open in this setup serves no purpose except making the MNO's network vulnerable to attacks. And therefore most of the MNOs block incoming connections on all (or under `1024` or at least commonly used) ports. But it can't be tested because of CGN, which - as a side effect - is an additional layer of security, though not a firewall. You have a private IP, not routable on internet, no one can access you from outside, this should be considered security, more or less. That's why VoIP connections are always initiated from clients by letting the `STUN` server know where they are. And we have to go for solutions like this to accept incoming connections behind NAT.

> there are a few devices (smart TV, game system, etc) which are not at all secure to put onto an open network.

Additionally your Android device is also doing NAT on traffic coming from tethered hosts. And there's no `DMZ`, `UPnP` or normal `Port Forwarding` set up on your Android device. It's another protection layer.

> I have reason to believe my carrier's NAT does not block incoming connections

It would be really knowledgeable if you share how did you conclude this. However if you are sure that their NAT can be traversed/bypassed easily without any support from client side, or if you don't have trust on MNO or their firewalls, do consider setting up a strong firewall.

Common users are more focused on the apps installed on the phone; they are the actual spies. They collect personal data, leak information, do analytics, user profiling, tracking and targeted advertisement. So an outgoing firewall is of much importance.
Complicated firewall solutions for incoming connections are required on servers with listening ports. Android devices don't run servers (usually), except a local `DHCP`/`DNS` server (`dnsmasq`) for hotspot. If you run any services which accept connections from internet, it's another valid reason to setup firewall.

---
Tags: security, mobile-data, wifi-hotspot, firewall
---


# Question
Title: Block internet access before firewall starts at boot
I have an old Android phone with Ice Cream Sandwich and DroidWall as a firewall, which makes sure that apps can't use the 3G unless I enable it for that app. DroidWall starts on boot but there is a very brief time before it starts when any app can use the internet.

What I would like to do is stop all incoming and outgoing internet access until DroidWall automatically runs on boot to put the firewall rules in place. DroidWall allows running a script when it starts so conceivably I could undo the block-everything rules when it starts. The phone is rooted but doesn't have a `/etc/init.d/`.

Basically I want to make sure there is not even a second that traffic can get out before the firewall. 3G is expensive but I need it so I can't turn it off.

# Answer
> 1 votes
Things have changed, DroidWall is no more maintained, rooting techniques have to be changed with Android 5 and 6 releases; particularly SELinux has to be taken care of, and there is always `init.d` support available with Magisk. But the question still stands valid.

Android depends on Linux kernel's builtin firewall which can be controlled with `iptables`. Default policy is `ACCEPT` which can be set to `DROP` on boot, unless all rules are loaded. This can be done with a simple `init.d` script or directly from Android's `init` services:

```
# /system/etc/init/firewall_policy.rc

on post-fs-data
    exec u:r:magisk:s0 -- /system/bin/iptables -P OUTPUT DROP

```

After boot, set policy back to `ACCEPT`. AFWall+ does this automatically.

---
Tags: internet, mobile-network, 3g, firewall, init.d
---


title: How can I block incoming connections?

text:
# Question
Title: How can I block incoming connections?
I've been looking for a firewall app for Android for a couple hours now and all I could find is apps that only let me block **outgoing** connections (for specific apps). Is there any way to set which **incoming** connections and on which ports should be allowed/denied (something like Inbound Rules in Windows Firewall)? I'm OK with with the app requiring root.

# Answer
If you don't mind with the solution not being an app, then you can use iptables. They are included in the AOSP kernel. You can access them by downloading a terminal app off of the app store. You might however need root for this.

The usage of iptables on android should be same as the ones on desktop Linux, so you can look up some GNU manual for it.
> 1 votes

# Answer
It's simple to achieve with `iptables`; thanks to Linux kernel. Since Android uses default policy `ACCEPT`, drop any unwanted packets. For instance you want to allow port `22` and block all others:

```
~# iptables -N MYCHAIN
~# iptables -I INPUT -j MYCHAIN
~# iptables -A MYCHAIN -i lo -j RETURN
~# iptables -A MYCHAIN -p tcp ! --dport 22 -m conntrack ! --ctstate ESTABLISHED,RELATED -j DROP
~# iptables -I FORWARD -j DROP

```

This will also block incoming connections from tethered devices on hotspot network. You can exclude those, see this: Is There A Mobile Hotspot App With A Firewall to Block Incoming Connections?
> 1 votes

---
Tags: security, networking, firewall
---


# Question
Title: How can I block all incoming connections to my phone?
Ok, so *maybe* I'm just a lil paranoid lately, but I'm trying to block any - and **ALL** \- connections to my phone. PERIOD. I have the paid version of Android Firewall.

If I select Black list from the drop down box and check WiFi, Data, Roam, VPN, LAN, & Input Chain for (Any Application) will that accomplish the goal I'm getting at?

# Answer
> 2 votes
I don't know how Android Firewall app worked, but it's simple to achieve with `iptables`; thanks to Linux kernel. Since Android uses default policy `ACCEPT`, drop any unwanted packets:

```
~# iptables -I INPUT ! -i lo -m conntrack ! --ctstate ESTABLISHED,RELATED -j DROP
~# iptables -I FORWARD -j DROP

```

This will also block incoming connections from tethered devices on hotspot network. You can exclude those, see this: Is There A Mobile Hotspot App With A Firewall to Block Incoming Connections?

# Answer
> -1 votes
Also you can put your phone in airplane mode. you will still be able to access wifi, but all other connections will be terminated. Just leave wifi off and your good to go.

# Answer
> -3 votes
1. All Android Firewall apps BLOCK ALL Outgoing data automatically when the app is enabled as a default action. The Firewall DOES NOT disrupt or block any incoming data into your device. ONLY outgoing data are Blocked. Basically, no data leaves your device when the Firewall is enabled; the Firewall app then informs you what app tried to connect outbound. It is then up to you if you will ALLOW such a connection the next time, OR choose to RESET the connection then ALLOW. OR BLOCK the outbound data connection wherein the DATA sent by the app will be dropped by the VPN sinkhole (for NoRoot Firewall apps), thus fooling the app who attempted for an outbound connection that the data was "sent".
2. You can use Airplane Mode to Block All IN/OUT connections, and isolate your device from all radio traffic. Though each type of phone or device, brand, version of Android, have different ways to achieve True Airplane Mode action. You can enable Airplane Mode, take out batteries (believe you me) usually gives you true isolation. But when the battery is integrated on the device then it's a bit tricky; You should then first go to SETTINGS/WIRELESS NETWORKS/SIM CARDS and Deactivate the SIM Card or Cards if there are two; THEN proceed to Enable Airplane Mode for better isolation.

\*you can try to scan your area with your device using another android device by using Bluetooth Firewall app and check. In my case, my Lenovo Tab3 730 was picked up by an Android phone running BTFW app even when Airplane Mode was Enabled !!!

So there has to be a TRUE Airplane Mode state for each and every Android device.

3. You can download compatible apps that will lockdown WiFi, and Bluetooth to secure any attempt by the Android device to try to connect by other ways because in the Android system, when you disable Mobile Data Connection, WiFi /Bluetooth will AutoStart.

Such apps include Device Control by Expert Systems Co. and D-Vasive app by D-Vasive Inc. In my opinion, these apps WITH the Airplane Mode coupled as above, might be overkill, but I presented the answer, hopefully on the level of your concern reading your question, if not the size of the TinFoilHats we are wearing?

Sincerely,

---
Tags: security, privacy, firewall
---


title: How to modify wpa_supplicant.conf

text:
# Question
Title: How to modify wpa_supplicant.conf
I would like to modify the `wpa_supplicant.conf` file. However if I do it, the file sets itself back to its previous version (even if I modify the file with one single character), and I have no idea where that sort of backup is stored nor if what I'm doing wrong.

I have tried to modify the file by copying it to a W7 PC and using notepad++, also with an SSH app with root rights granted. Same result. (have done the `chown wifi:wifi` thing too)

The system is a LineageOS with Android 7.1.2.

Disable wi-fi →modify file → re-enable wi-fi and also reverse.

# Answer
The reason is that Android uses it's own management classes to read/write `wpa_supplicant.conf` in conjunction with networkHistory.txt file.

The `WifiConfigStore` in the Android framework does not write entries in `wpa_supplicant` if not found in networkHistory.txt

I've had success by first adding the network in networkHistory.txt before adding the network via `wpa_cli`.

However, in general, the usage of `wpa_cli` in Android is broken by the behavior of `WifiConfigStore`.
> 2 votes

# Answer
Had the same issue on LinageOS 14.1

A work around is to overwrite `wpa_supplicant.conf` on **Recovery Mode**.

I used `adb shell` but it may be possible to use TWRP's file manager.

Don't know if needed, but before overwriting I replaced the header of my backup conf with the the current one.
> 1 votes

# Answer
I believe the file also needs to belong to user "system" and group "wifi". Depending on how the edit/copy was made, one may also need something of this sort:

```
   chmod 660 /data/misc/wifi/wpa_supplicant.conf
   chown system:wifi /data/misc/wifi/wpa_supplicant.conf

```
> 0 votes

---
Tags: wi-fi, 7.0-nougat
---


title: WhatsApp still shows deleted contacts

text:
# Question
Title: WhatsApp still shows deleted contacts
* I got my new Android phone.
* I added my personal GMail account to the Gmail app which synced my ~100 personal contacts from Google.
* I installed WhatsApp.
* I installed Outlook for Android.
* I added my work mail account and did not uncheck "sync contacts" before first sync.
* Only after I saw the ~100k work contacts in my phone I disabled "sync contacts" for my work email and as far as I see, all work contacts were correctly removed from the Android contact list.
* However, in WhatsApp some of them (presumably those with a mobile number and WhatsApp) are still visible.
* I tried the "Refresh list" option in WhatsApp, but they are still visible.
* Also, there are no chats with these "contacts", since the contacts only got onto my phone by accident and they don't have my mobile number.
* It seems I am not the only one.

Why are they still visible in WhatsApp and how can I get rid of them?

# Answer
> 2 votes
Even I had the same problem. I removed all the contacts from my phone address book but it would still show in my Whatsapp. Finally I figured it, though the phone address too does not show the contacts, if auto sync is on, it will still show. In my Phone, I went to Phonebook → Open Account settings → and turned off Auto Sync. That worked. Hope it helps.

# Answer
> 2 votes
I had the same problem. A deleted Android contact showing in WhatsApp (and in Signal too!), WhatsApp refresh method not working, etc. After digging around a bit, the solution was to uninstall Signal. That got rid of WhatsApp contact too. Now I have to reinstall Signal...

---
Tags: whatsapp-messenger
---


# Question
Title: How long does it take for a new version of an app to reach users?
I know that when a new version of an app is published to the Play Store, users do not all see it immediately. This is understandable; even Google probably doesn't want its servers being hammered when a popular app is updated.

I thought the delay was on the order of days, but now I suspect it's much longer than that. I turned off automatic updates because I like to be aware of when apps are updated in case a new bug is introduced. I check for updates every couple of days. It's not uncommon to see that an app was updated two or three weeks ago, when no such update was visible to me two days ago.

Can it really take three weeks for users to see updated versions of apps?

# Answer
As far as my experience goes, as the release-manager for a popular app, once I roll out an update to 100%, I see the maximum adoption to the new version within 3-4 days.

Given we publish updates weekly and the app has a respectable penetration, YMMV.
> 2 votes

# Answer
I guess it depends on how the developer targets the audience . If the developer chooses to do a staged rollout

> You can release an app update to production using a staged rollout. With a staged rollout, your update reaches **only** a percentage of your users, which you can increase over time.

(Emphasis Supplied)

For more details see the link

It's best to contact the developer and check
> 1 votes

---
Tags: google-play-store, updates
---


title: Really strange battery issue?

text:
# Question
Title: Really strange battery issue?
So, I don't have a picture, but my Android phones batter is on the fritz. At first it just started draining quickly so i checked if I had any apps that where draining it quickly but I didn't have anything out of the normal, the highest thing that was draining it was the Android systems which was 6%. I didn't think much off it since it is an older model and was thinking maybe the battery was just getting old and draining quicker. I just put it on the charger and brought it up to 100%. I took it off the charger and started watching YouTube which I knew drained it quickly but then something weird started happening. It went from 100% and instantly dropped to 1%. Thinking it was just a glitch I turned off the screen then turned it back on and it was at 90%. I went back to watching YouTube. Next thing I knew I looked back at the battery and it said 24%. I was confused and so i started to watch the battery, it drained normally for about a minute then started changing like this 58%,20%, 80%, 1%, 100%, and just all over, its been doing this for about three days now and I'm honestly not sure what's going on. I'm wondering if there something wrong with my battery or if this is just some strange phone glitch?

# Answer
> 0 votes
Go to Settings\>Developer Options\>Running Services and check to see if something you don't recognize is using a bunch of processing power.

If yes, you've probably got a virus.

Otherwise, a factory reset could fix the issue.

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


# Question
Title: Importing contacts from Nokia C1-01 to Android
I'm trying to import my contacts from an old Nokia C1-01 to my new Android Motorola G6 Play. How can I do this?

So far I've tried a Bluetooth connection (connected but couldn't transfer the contacts).

And I've saved my contacts to the Nokia SIM card, but it is the micro-SIM format and I don't think it will fit in the Motorola G6 Play. Should I cut it to size with a sim card cutter?

I can access the contacts in the phone using the Nokia PC Suite and make a backup of my phone. I can also export the contacts into a CSV. It is combining the first and last name into the "Last Name" field, so I can manually fix this in a spreadsheet and then probably import it into the new phone using Gmail. I'm following the advice from this question.

# Answer
As long as you don't have to cut anything but the plastic around the actual chip, it won't hurt anything to give it a try.

The last time I had a really old phone, I just went over to the nearest cell phone providers store and they transferred over the contacts for me.
> 0 votes

---
Tags: data-transfer
---


title: SELinux temporary set to permissive

text:
# Question
Title: SELinux temporary set to permissive
I am using a Galaxy s10+, rooted with magisk, no custom ROM, no custom kernel and no custom recovery. The rooting is heavily limited because of the SELinux enforce mode. Actually, no root command in termux works because of SELinux. I do not want to disable SELinux permanently for security reasons. What I want is something similar to the command "setenforce 0". This does not work on my phone however, and I think it could be KNOX related. It gives no errors but the output of "getenforce" is still enforced.

Is there a way to set SELinux to permissive mode only temporarily until next reboot on rooted Samsung galaxy s10+ with magisk, everything stock?

The linked duplicate is what i already tried, and it also says it does not work after 2015.

# Answer
I almost literally did the same thing.. I went after an LG K30 Premier Pro and comes down to SElinux. I did mine to prove you can "Root" a phone without deactivating the bootloader. Still having hard time cause without deactive it either says your not rooted or it does say it and the phone inner programs send you an email and tell you they are going into hidding inside a FireStick . pretry. Funny really. .. Ok herwnis the email com.lge.software.cliptray Version: null (0) SD Maid

Version: 4.14.27 (41427) Device

Fingerprint: lge/cv3\_lao\_com/cv3:8.1.0/OPM1.171019.026/19155140321d4:user/release-keys
> -1 votes

---
Tags: rooting, selinux, magisk, samsung-knox, samsung-galaxy-s-10
---


title: Always require PIN to unlock device

text:
# Question
Title: Always require PIN to unlock device
Is there any way to always require the user to enter the PIN (instead of fingerprint) to unlock the device?

It seems that as soon as you add a fingerprint to the phone, now it no longer requires the PIN to unlock, just the fingerprint.

# Answer
You can try Next Lock Screen. During the initial settings, give the app the required permissions. Open the app, make sure that "Enable Next Screen Lock" is on. Click on Screen Lock, then "Next screen lock". Set a Pin for the app (preferably different from the PIN of your phone). Go back then, click on "Fingerprint lock" and turn it off.

**Important:** Don't disable the phone fingerprints that you set in Settings -\> Security.

The app will work the following manner. If you enter your fingerprint first, then you will be required to enter the app's PIN.If you enter the app's PIN first, then you will be required to enter either the phone's PIN or your fingerprint.

**Note:** The app is no longer on the Play Store. I don't know if Microsoft will bring it back in the future.
> 0 votes

---
Tags: security, 8.0-oreo, motorola, fingerprint
---


title: Undo "Disable autofill for [app]"

text:
# Question
Title: Undo "Disable autofill for [app]"
I am referring to the system-wide password autofill feature that was introduced in Oreo. In one app, I accidentally fat-fingered the prompt; instead of pressing "Fill with \[autofill service\]," I pressed "Disable autofill for \[app\]." How can I undo this? I want to be able to use autofill with that app again.

These did not fix the problem:

* Changing the autofill service to Google and then back
* Uninstalling and reinstalling the app in which I want to use autofill

# Answer
Long tap the username field, tap the three dots next to "Paste" and select autofill. There will be an option "Enable autofill for " where you can re-enable it.

Tried on Android P
> 7 votes

---
Tags: settings, auto-fill
---


# Question
Title: How to connect two phones via SSH with a central SSH server?
I have two phones `A` and `B` which use Mobile Data. I would like to connect from phone `A` to phone `B`, the latter has an SSH server running on port `8022`. The central SSH server is running on AWS and has an Elastic IP. Phone `A` can connect to AWS Server directly at port `22`, so can phone `B`.

AWS Server configuration:

```
GatewayPorts yes
TCP forward yes
Password Authentication Yes

```

Further, I have forwarded port `9099` on the AWS SSH server to local port `8022` on phone `B`:

```
~$ ssh -NR 9099:localhost:8022 user@Remoteip

```

By running `netstat -tpln` on the AWS SSH server, I can see that `9099` is in listening mode.

But when I ssh from phone `A` into the AWS server at port `9099`, it says timed out.

# Answer
What I have understood from your question:

You have two phones `A` and `B`, which are connected to internet through Mobile Data. Phone `B` has a SSH server running, listening on port `8022`. You want to login from phone `A` to phone `B`, but since the later doesn't have a public IP, you want to create a reverse SSH tunnel from phone `B` to another SSH server running on AWS cloud, listening on port `22`. In this way you want that all traffic received on port `9099` on AWS SSH server should be forwarded to port `8022` on phone `B`, so that phone `A` can access it on internet.

If I understood correctly, the simplest thing you have to do is:

* On AWS run a SSH server, which is listening on port `22`. Since you are able to login to this server from both phones `A` and `B`, I think you have done it correctly. Let's say your login user here is `server_user` and IP address is `server_ip`.

You need two additional keywords in `/etc/ssh/sshd_config`, should look like this exactly (no extra spaces):

```
# /etc/ssh/sshd_config

AllowTcpForwarding yes
GatewayPorts yes

```

After changing configuration, don't forget to restart server.

+ First parameter ensures that port forwarding is allowed i.e. you'll be able to create tunnel.
    + Second parameter ensures that the reverse tunnel will listen on all network interfaces, and not only the local (`loopback`) interface on AWS server.
* On phone `B` run a SSH server, which is listening on port `8022`, let's say your login userame is `phone_user` (Termux's SSHD requires no username).

Do test if you can login to this server. For instance create hotspot on phone `A` or `B` or connect both to some third WiFi network. Now login from phone `A` to phone `B`. If it doesn't work, troubleshoot the problem, most likely with password / key authentication.
* On phone `B` create a reverse tunnel i.e. forward AWS SSH server's port `9099` to phone `B`'s (local) port `8022`:

```
~$ ssh -NR 9099:localhost:8022 server_user@server_ip

```

This can be done on Termux or use some GUI app like `ConnectBot`.

To test if the the tunnel works correctly, on AWS server:

```
~$ ssh phone_user@localhost -p 9099

```

It should login you to phone `B`.
* On phone `A`, login to phone `B` through AWS SSH server:

```
~$ ssh phone_user@server_ip -p 9099

```

If it doesn't work, repeat the steps.

**RELATED:**
> 2 votes

---
Tags: ssh, remote-access
---


# Question
Title: Can we make a Vpn server run on Android?
Can we make a Vpn server run on Android. Can applications do this? If yes, which protocols are supported and is this a good idea to use such apps? If not, what are some issues that we may face?

# Answer
Yes we can run VPN server on Android, but not without root. Stock Android doesn't support VPN servers, even many protocols aren't supported as client too, so you have to install third party apps. There are apps like `Servers Ultimate` which offer VPN server, but I haven't tested. CLI keeps life simple:

* Build openvpn static binary and copy to `/system/bin`.
* Create a basic server configuration file:

```
### /etc/openvpn/server.conf

# basic configuration
port 69
proto udp
dev tun
mode server
tls-server
keepalive 10 120

# dynamic IP pool
server 10.8.0.0 255.255.255.0

# send RESTART command to clients if tunnel is restarted (UDP)
explicit-exit-notify 1

# configure like a "traditional" broadcast-based network
topology subnet
push "topology subnet"

# send all traffic from client to VPN
push "redirect-gateway def1 bypass-dhcp"

# DNS nameservers
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"

# certificates and keys to use
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
tls-crypt tc.key

# cipher algorithm to use for encryption
cipher AES-256-CBC

# log files
log /data/media/0/openvpn.log
status /data/media/0/openvpn-status.log
verb 3

# do not recreate TUN interface on reset (SIGUSR1)
persist-tun

# do not reread key files on reset (SIGUSR1)
persist-key

```
* Create server keys and certificates. `tc.key` can be created by executing `openvpn --genkey --secret tc.key`.
`ca.crt`, `server.key`, `server.crt` and `dh2048.pem` are built using EasyRSA. It can be done easily on a Linux/Windows PC, on Android it rquires some extra effort:

```
~$ easyrsa init-pki
~$ easyrsa build-ca
~$ easyrsa build-server-full server nopass
~$ easyrsa gen-dh

```
* Copy configuration file, certificates and keys to `/etc/openvpn/` and set permissions:

```
~# chmod 0600 /etc/openvpn/{ca.crt,dh2048.pem,server.crt,server.key,tc.key}
~# chmod 0644 /etc/openvpn/server.conf
~# chmod 0755 /system/bin/openvpn
~# chown -R 0.0 /etc/openvpn /system/bin/openvpn

```
* In the same way build client key and certificate using EasyRSA:

```
~$ easyrsa --days=30 build-client-full client nopass

```

Copy the contents of `ca.cert`, `client.key`, `client.crt` and `tc.key` to client configuration file. Also add public IP address of Android device if want to connect from internet or local (WiFi/hotspot) IP address:

```
### client.ovpn

client
dev tun
auth-nocache
verb 3

remote-cert-tls server
cipher AES-256-CBC

pull
resolv-retry infinite

remote <IP_ADDRESS> 69 udp
nobind
connect-retry 5 5
connect-timeout 10

# only for Windows
#block-outside-dns

<ca> INSERT_HERE </ca>
<cert> INSERT_HERE </cert>
<key> INSERT_HERE </key>
<tls-crypt> INSERT_HERE </tls-crypt>

```
* Android ignores `main` table at all, create custom rule and insert routes:

```
~# ip rule add table 5000 priority 5000
~# ip route add 10.8.0.0/24 dev tun0 table 5000
~# ip route add 192.168.43.0/24 dev wlan0 table 5000
~# ip route add default dev rmnet_data1 table 5000

```

Where `rmnet_data1` is the interface connecting to Mobile Data and `wlan0` is WiFi or hotspot. Adjust interface names and network addresses according to your device.

Setup forwarding and source NAT:

```
~# echo -n 1 >/proc/sys/net/ipv4/ip_forward
~# iptables -I FORWARD -i tun+ -j ACCEPT
~# iptables -I FORWARD -o tun+ -j ACCEPT
~# iptables -t nat -I POSTROUTING -o rmnet_data1 -j MASQUERADE

```
* Run server, but first make a minor adjustment due to difference in Android vs. Linux:

```
~# mkdir /dev/net
~# ln -s /dev/tun /dev/net/tun

~# openvpn --cd /etc/openvpn/ --config server.conf

```

Import the `client.ovpn` in any OpenVPN client app (on Android / Windows / Linux) and connect.

You can do advanced configuration on server, run it as an Android `init` service, or what ever you want.

---

**RELATED:**
> 4 votes

---
Tags: networking, vpn, openvpn
---


# Question
Title: How to move data to a bigger SD card (internal storage)?
I have a Moto G5 with Android 8.1. My 128 Gb micro sd card is formatted as internal, and I want to replace it with a bigger one (and I want to still use it as an internal storage). Is it any way I can migrate my data to the new memory card?

# Answer
Your new memory card will be wiped anyway when you insert it into your phone for the first time. So I would recommend copying the data to the new memory card after you insert it. You can copy it using OTG or via computer.
> -1 votes

---
Tags: 8.1-oreo, internal-sd, motorola-moto-g5
---


# Question
Title: What's the correct stock ROM for my unlocked Moto E5 Play?
So I was working on backing up my phone after installing TWRP so that I could restore it if it had an issue, but it had an issue. It thinks its decrypted and I can't get it to boot, wiping does seemingly nothing.

My next step to troubleshoot is to reflash a stock ROM, but here's the thing: I bought my phone unlocked with no carrier.

```
$ fastboot getvar product
product: james

```

According to the fastboot menu, I have the XT1921-2, which according to Motorola's documentation, is the Cricket Wireless variant, which seems to have ROMs here: https://mirrors.lolinet.com/firmware/moto/james/official/Cricket/

I don't want the Cricket Wireless ROM, and my device is not subsidized (as indicated by the filenames), it's wholly owned and hasn't ever really been used to connect to a network. Which ROM am I supposed to use to restore my device?

# Answer
I've figured it out. Besides the carrier-specific ROMs, Motorola has a "retail channel", called RETUS (Retail - US, I believe).

This is not tied to any carrier, and you can match the factory version by comparing with what you get here:

```
# fastboot getvar ro.build.fingerprint
(bootloader) ro.build.fingerprint[0]: motorola/james/james:8.0.0/OPP27.9
(bootloader) ro.build.fingerprint[1]: 1-121/42:user/release-keys

```

Combine the two lines, and we have

```
motorola/james/james:8.0.0/OPP27.91-121/42:user/release-keys

```
> 1 votes

---
Tags: rom-flashing, twrp, stock-rom
---