text:
Disable Bluetooth discoverability in Redmi 6 / MIUI 11
Is it possible to completely turn of the ability of my Redmi 6 (using MIUI 11 currently) to being discovered via Bluetooth by other devices? If yes, then how to achieve this?
Things I've tried or read so far:

No corresponding system option (NFUI clone on my Neffos X9 still has it)
This answer that is reported to not work under MIUI 10 so won't work most likely under MIUI 11
Turning off Bluetooth Scanning (turned off, no effect, device still discoverable)
Using Bluetooth Settings 3rd party application

I had the biggest faith in last option (Bluetooth Settings app), but it fails completely under Readmi 6 / MIUI 11. Not only Bluetooth discoverability is turned on again when phone is restarted or Bluetooth is enabled, as it is written here.
It is also turned on again when any paired device connects to it or when Bluetooth Settings app is reopened again. So this is a completely false pathway.

Found the "[Tools] MIUI Bluetooth Discovery App" thread in Mi Community. It lead me to Bluetooth Visibility Fix app which seems to be working as expected under MIUI 11 / Readmi 6 phone.
There's some work when start using it:

It is a  system service that needs special permissions to auto-start,
It didn't work ("restarted" itself to "Visible to all") for first 2-3 times then it suddenly started to work.

But after some time it does seems to be resolving the issue in question and turning off Bluetooth discoverability permanently.
In case the Bluetooth Visibility Fix app is not working for you itself, the "[Tools] MIUI Bluetooth Discovery App" article also mentions some user-contributed app, available as direct .apk file download under above link. Consider it as an alternative.


text:
a lot of heavy .txt files in my android. is it safe to delete them to free up memory?
There are lots of text documents in my android phone with over 1 mb size. they are typically named with time stamp like "20200419_11". is it safe to delete them? will it enhance my storage space

Depends on the content, though usually they are just log files to help debugging the app/system, and safe to delete as users.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Is it possible to have manageable encryption when using TWRP/unlocked bootloader and modified ROM?
Every single piece of information I've come across warns me about issues with sane encryption when using custom recovery, unlocked bootloader and non-stock ROM (as in modified, not community AOSP based). Since I need following things:

ability to back-up/restore data from the recovery if needed
root, which means I have to flash things manually after flashing ROM
ability to flash/update the ROM (since this is the only way, OTA wont work in my setup)

I can live without the 1st, but there is no way to let go of the rest 2. If I enable encryption I wont have access to data from recovery or rather I will have access to encrypted data. This isnt the problem normally until I need to flash over updated ROM or swap ROM - now there is an issue because encryption key will change.
There is also no point to have password-locked TWRP since with unlocked bootloader it is easy to sideload new one.
Does the headache-less solution for power-users exist?

(2) The encryption is password and system based. Some TWRP versions can access the encrypted user data after supplied with the correct password (3) I don't see any problem in flashing a new ROM as the system partition is not encrypted, only your data partition is.

What would be the password? How would it know which encryption method is used?

@Kirikan the same password you set in ROM. TWRP supports FDE as well as FBE on mostly devices. Decryption process is based on AOSP code and even supports hardware-backed encryption, if applicable to the device.

TWRP has issues with encryption, try Orange Fox Recovery instead. don't install Universal DM-Verity ForceEncrypt Disabler that will result in fingerprint not working

@alecxs I had to use Force DMVerify-Encrypt inside the TWRP advanced settings itself to be able to install different region ROM. Right now when I try to cope any file form /data/ it just says using default password and copies with 0 issues. How would I switch to encryption mode without screwing things up?

you are mixing up dm-verity with encryption. it seems MIUI 11 is running android 9 with plain old FDE encryption with no passphrase at all (using default_password)

although the Universal DM-Verity ForceEncrypt Disabler claims that forceencrypt can be disabled, it does destroy encryption completely (due to some combatibility changes regarding FBE android 10) for FDE no-verity-opt-encrypt is recommended instead as it does what it should

Okay, I'm confused, how come it uses default passphrase if I have set up PIN?

encryption is independent and your device stays encrypted without any screenlock at all. if your login credentials would be part of encryption TWRP would ask you for pin/pattern (not the case for lot xiaomi devices) https://android.stackexchange.com/q/17292

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to get checksum for the running firmware?
I have seen other questions and answers that say given a new phone shipped from a retailer, it is only possible to verify the integrity of the firmware by comparing checksums.
However, I'm not sure how to get the checksum of the currently running firmware on my device. Is this even possible? I may have misinterpreted the other advice as comparing checksums for downloaded images, but I am specifically looking to check the firmware that came loaded on the phone against a valid source before re-imaging it if that's what I decide to do. Hoping for generic advice, but manufacturer is LG if it matters. Please suggest tools and process.
Final note: The phone has been used since it was received, so if there is a way to capture the pre-loaded firmware, I want to make sure it is not affected by any software/user option changes that would be made after the device setup was complete. I'm guessing I want to get a checksum of the current software version, so not sure if I have to make an image first and if that firmware image that is created would be static.

Related How do I verify my firmware is legitimate?

You can get the checksum of a file. On Android the OS isn't a file,so the concept of checksum doesn't hold. You can instead use SafetyNet Checker


text:
Resetting SIM card connection without rebooting phone
Sometimes my phone (running LineageOS 14.1 / Nougat 7.1) will lose proper SIM card access, showing a "No SIM card" or "Invalid card" message and not allowing any cellular network accesses anymore. This is always resolved by a reboot.
However, I would prefer to only reset the SIM card access without rebooting the whole phone. Is this possible anyhow? Ideally programmatically?
I tried to switch flight mode off and on using /system/bin/settings put... and /system/bin/am broadcast..., but the issue persists when I do so.

Hello. Why are you trying to switch Airplane mode using command line when you could just do it using settings app or through quick settings toggle button for it? Identify whether Airplane mode actually solves the problem or not. If it does, only than proceed towards a command line approach, otherwise time and efforts would be spent in a wrong direction.

Since I read that it matters how long the airplane mode is switched on, it seemed appropriate to test it using a script containing the three steps (turn on, wait, turn off). I guess it's a matter of taste, but I'm a command-line type of person...

consider physical reason (loose sim tray)

@alecxs: A physical reason seems indeed likely since the issues did not occur with another SIM card I tried. Still, I'm curious whether a full reboot can be avoided on android phones.

svc data disable


text:
How to record video from an Android phone directly to a cloud?
Perilous times...
I have to be able to record/stream a video through my Android, just like anyone does to its local storage, but instead, directly to a file somewhere on the cloud. What's most important to me is, if while recording a video the recording stops, there's a guarantee that's what's been recorded till the last seconds is already in the cloud, and is a playable file.
Realtime playable streaming is not essential. I want to make sure that while I'm recording a video I know that most of the video is already on the cloud, and the video extends while the Android phone is in the recording state.
What are the solutions to this?
Ideally, I want to be able to record to a shared directory on the google drive.

Maybe something like YouTube/Facebook live? Never tried it, but I'd imagine that you are able to record privately and even if the video stops, what has been recorded will be saved.

as for YouTube Live, there's currently a requirement for at least 1000 subs to have to be able to live stream on mobile

Ok what about some security camera app that uses the phone camera? Dunno about the quality, but still might be a possiblity


text:
Physical Bluetooth Keyboard is not able to access to chats (Whatsapp, Telegram) in Android 10
I have a very strange situation that I have not found yet something in the internet that could lead me to solve this issue.
I paired my physical bluetooth keyboard (Keychron K2) with my phone (Huawei P30 Lite with Android EMUI Version 10.0.0 which I think is Android 10) and I have found the way to control almost everything, but when I access to a chat application like WhatsApp, I am able to select the available chats in the application but when I type Enter to go into selected chat, it does not go to that chat, it highlights the chat like it was selected but not with the intention to go into it...
If I leave the enter pressed, this will show me available options/actions that I could use with that specific chat like delete the conversation, pin message, etc. This behavior occurs also with Telegram.
Is there any body with some hints regarding how I could be able to access to an specific chat selected to start chatting with my keyboard without having to use the native touchscreen control to start using the application?
Thank you!

I don't think that is possible with a physical keyboard yet. I tried every key and many combinations too.. failed..
Then i tried remapping the key(one and only relevant function available is select/enter which does not work for selecting chats).. failed again..
I downloaded a physical keyboard helper(nothing helpful in it).. it failed too..
I think you'll have to tap the chats on the phone everytime you want to open any from the app.. OR you can create chat shortcuts on homescreen but that will be too weary adding every contact and messing up your homescreen.
An efficient solution will be to use a cursor (controlled from keyboard)

a cursor would not be nearly enough, because many things happen on android through gestures. ideal solution would probably be some way to trigger a list of possible actions on current screen, and pick one. including moving the screen around, which could be the most complicated one (to accelerate scrolling, for instance). at least we would have the END button as an advantage. :D but there's currently a couple of good enough solutions i'm using... i'll post an answer.

@cregox I admire your effort. But the keyboard does the rest job done except opening the chats.. So in my opinion a cursor would be enough to just open the chat. This will be the most simple solution to this i guess

you can use key mapper app (free and open source) to map a bunch of functions, including tapping the screen.
or you can get termux and do everything from CLI. (warning: might be a huge learning curve ahead)
both options are very tech-savy, in exponential quantities, but they mostly work for your case (and mine, i use both).
as i said on the other comment, still looking for the ideal solution (that should be possible) of getting a list of every possible action on screen after pressing some trigger button. something a bit like ctrl+alt+m on termux.
sadly, almost every single app are really not made to work well with keyboard, but luckily a lot of them are simple enough that they do work anyway (like delta chat).


text:
Android 9.0 not showing SSID - Chrysler Uconnect
Recently I bought a Chrysler Pacifica 2019 which has Uconnect 8.4 and built in WiFi. I also bought couple android 9.0 headrest monitor. When I am trying to connect the android devices it doesn’t show the Uconnect WiFi SSID. But it shows my home WiFi and can connect. My iPhone can connect to Uconnect car wifi. The Uconnect WiFi had WPA2 security and my hobe had WPA2 PSK. Please assist.

sure you are talking about WiFi (not bluetooth)? 2.4 GHz or 5 GHz channel incompatibility (wrong country)? beacon interval too low?

Yes I am sure and I am in USA

Seems like issue with Android go edition. Not sure where to get an answer


text:
Side effects of Android CarrierConfig reporting a foreign network as ”not roaming”
Android has a system app, CarrierConfig, which sets certain network parameters based on the carrier which supplied the currently inserted SIM card. Among others, the CarrierConfig app can tell Android that certain networks (identified by the MCC/MNC pair) should not be considered roaming even though the MCC/MNC differs from that on the SIM. (See this answer to a previous question of mine for details on its inner workings.)
I am wondering if this mechanism can be used for EU roaming. As of last year, EU carriers can no longer charge roaming fees for use on other EU networks, as long as the majority of usage is in the “home state” of the SIM card, or the subscriber can demonstrate some ties with that state (e.g. residence, work, study or family).
The idea would then be: for every EU carrier, insert a list of all EU MCCs into its list of non-roaming networks (omitting the MNC makes it a catch-all for every network with that MCC).
As I understand the mechanism, the effect would be that, with a SIM from an EU carrier, the phone would then assume to be on its home network. Roaming restrictions (such as disabling mobile data) would then only apply outside the EU. For example, if I disabled data roaming, my phone would still have data connectivity in Austria, France and Italy but not in Switzerland.
I suggested this to the LineageOS folks the other day and was told this was not going to happen, as in their opinion EU roaming is still roaming and such a rule would break it. Unfortunately they did not elaborate on that, so I don’t know if there’s some undesirable side effect I’m missing.
The only side effect of the “EU-to-EU = not roaming” ruleset that I can see is that the user can no longer make settings à la “use data services on network 232-07 only, but not on other networks even in the EU”. Whether this constitutes a relevant use case is debatable.
Is there anything else I have missed (i.e. functionality this change will break)?

I can not add a comment in your question because I have not the neccesary score to do it. So, the only way is doing a new answer
As I explain you in the other question you could add to any network, any other network of other country for that it do not behave like a roaming.
I am going to explain my point of view about the problem to develop this feature. It is true that although roaming in europe is free depends on some factors as you said, for example:

As of last year, EU carriers can no longer charge roaming fees for use on other EU networks, as long as the majority of usage is in the “home state” of the SIM card, or the subscriber can demonstrate some ties with that state (e.g. residence, work, study or family).

If LineageOs develop this feature and for example you have a French SIM and you live in Italy, there will come a time when the French operator will start charging a plus for the roaming.
And it could be a problem, because if the user have not activated data roaming, the user won't know that the operator could do that.
The user need to know that it is possible that the roaming may produce an extra cost on your bill.
It is possible that you has a French SIM because you are french, and you live in Italy because your work is in Italy, and you could think, "Ok, the European single market should allow me to use the same SIM in different countries at no cost" and that was the original idea of the end of roaming.
But some operators (the big carriers) complained that people could buy SIMs in countries with cheaper rates to use them in countries with higher rates.
So, summarizing, I think that it is possible the feature that you want (technically talking) but it is not recommended.


text:
Android 10 custom dialer killed by the system
I have an oukitel wp5 running android 10. I want to replace the stock call manager (dialer). I have tried several, including the one I have already used on my android 6 phone, but none seems to work.
When started, they work for a while, but after some idle time they seem to be killed by the system. After that no app is there to react to the incoming call. There is only ringing, but no notification about the caller, nothing. Until the app is manually started.
Of course, they are set as default call manager, they get every permission they are asking for. I have checked that they are also excluded from battery optimisation.
Where to check, what to set to kepp it in the background?

When the app is running, from recents (where you see all running apps), press on the phone app and see if you can "lock" it, so that it's always in memory // Do you have many apps running? If yes, this could be the reason too// If your device is rooted, you can make the phone app a system app// You can try logging to see if it reveals reason (see the tag wiki, also Play Store has non root logger apps)

Have you excluded your custom dialer from "battery optimization" (see settings -> battery)? Depending how aggressive the device manufacturer has implemented battery saving killing or stopping an app when in background can be caused by the battery optimizer.

@Robert, yes, I have checked it was excluded up front.

@beeshyams How can I "lock" it?

Could you add a logcat information?

It depends on your device and Android version .  Google for that. Please add device to your question. On my One Plus 7 , I get an option to lock from 3 dots menu on top right ( Android 10)

@beeshyams The phone model is already in the question: oukitel wp5

Sorry. missed that. IDK how it can be locked on that


text:
Block URLs on Android Chrome?
I'd like to block particular URLs on Android Chrome.
I've tried BlockSite, but the experience is poor - the page still loads for several seconds before the block dialog appears.
Is there any better way to block URLs?

Apps that use local blocking technology via VPN can totally block certain servers. Usually such apps are designed to block ad-servers but I assume that there is also a possibility to block using a custom server list. One example for such an app is Blokada. Note that such ad-blocking apps are usually not to be found in Google Play Store.

Thanks, that's very helpful, I'll give it a go and report back!

I'm surprised, even shocked that in 2023 I cannot block a URL on my Android device without a third-party tool. What on Earth are the development managers doing? It seems iPhone provides this functionality straight out-of-the-box.


text:
Are there any smartctl similar tools to detect (eMMC/Nand) storage flash failure in advance on non-rooted android?
So far, I have two android phones which become kinda brick due to storage failure.
One phone suddenly missed many apps and files one day. And another one does not accept correct lock password one day.
When I try to look into mobie phone storage related topics, I am surprised that so litte info I can find.
I can not even find an app to tell what my phone's storage type and model are. I tried the famous AIDA64, it doesn't really give me anything about my flash drive. I can not even know if it's a NOR, NAND or eMMC.
I have some/many mobiles and some are rooted and some are non-rooted. I am wondering if I can find a general solution to detect flash drive failure in advance so that I can backup properly before it failed to boot and lose data. (I use smartd/smartctl on desktop OS for this purpose)
From my bad experiences, I really don't have any trust on mobile phone storage anymore. I have some other mobiles/pads/tablets broken too without knowinig what the real problem is. I guess they might be due to flash drive failutre as well.
Thank you very much for your help.

Related https://android.stackexchange.com/a/214029/131553

@beeshyams just read it. Thanks for the info.

Does this answer your question? Is it possible to know the wear level information of a phone, like SSD have with SMART?

@IrfanLatif Thank you very much for the reference. That is the closest information I ever found online. But it doesn't answer my question because the solution provided in that question requires rooted device. But I have put non-rooted device explicitly in the questoin title.


text:
When do apps need storage permission?
I thought that each app can always freely manage its directory in /Android folder. AFAIK code is in app/ and data in obb/ folders.
But many apps (e.g. games) display a message about needing local storage permission to download additional data.
Why do many apps need to ask for the generic storage permission - the one that says Files, folders, photo, video?
Are there some restrictions on the data an app can use without asking permission?
Just to clarify: I am NOT asking about file/photo manager apps, for them it is understandable that they need to see the whole filesystem.
Btw i found 2 possible duplicates, but their answers seem to contradict each other: 1 2
Does the storage permission allow reading the whole Internal storage? Or only the FAT-formatted external SD card?

What for an app needs storage permission depends on the Android version on-device (and the one targeted by the app). READ_EXTERNAL_STORAGE gives access to all data on your external and internal SD cards, but not to device storage, on "lower versions". Things look a bit different with the Storage Access Framework added in 5.1, and will change again with "scoped storage" on Android 11+…

As Izzy said, it's version dependent. See this//@Izzy, I think you made a typo, in 11,it's package visibility

@Izzy - Is there a quick summary on what is the status in Android 11?

@sancho.sReinstateMonicaCellio only roughly. With Android 11, the concept of scoped storage was made mandatory, adding another layer. Full storage access is only permitted to few app categories (such as file explorers) on PlayStore (other sources may permit it generally for distribution; any app can request it, but Google simply might not let it into PlayStore then).

Storage permission is needed by apps that will read/write files onto the storage especially files accessible by the user.


text:
Unlock codes inactive
Why don't the Android secret codes work for any of my android devices, I have two s7 edge phones and two s9 phones with the straight talk wireless unlimited plan, the phones came from Verizon wireless and were transferred over, any reason why?
s9 just downloaded the latest firmware, It didn't work before or after.
 Testing Menu. *#*#4636#*#*

 Factory Restore. *#*#7780#*#*

 Camera Information. *#*#34971539#*#*

 Display Info about device. *#*#4636#*#*

 Backup all media files. *#*#273283*255*663282*#*#*

 Completely Wipe device, install stock firmware. *2767*3855#

 Wireless LAN Test. ...

Because Samsung disabled them, and they don't use the stock Android phone app which interprets them, so they would have to build support in for the codes. In some cases, Samsung devices use proprietary special codes, but about the only one that I know that works is *#06# which is pretty generic to display your IMEI number.

@acejavelin that one don't even work for me, you say they're disabled but there's various articles and videos on the web of them working on s9/s9+

Perhaps in international or unlocked versions... But there are also several articles out there talking about how the codes do not work. You can always get the app Hidden Menus from the Play Store which can bypass the dialer and talk directly to the framework to open these menus (apps).

This app gives you codes specific to your device ; some may need root to be launched


text:
why is my Samsung tablet listed as a modem?
Exactly what the title says.
It happens when I boot to the bootloader, while my T295 is connected to my PC via USB cable.
How do I fix it?


text:
How to resize SD card using terminal? and create a new partition on it?
I don't have SD card reader for my computer, so maybe I could do it directly from termux instead.
How to resize SD card without losing data? And make new EXT4 partition.
(parted) p:
Disk /dev/block/mmcblk1: 63.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  63.9GB  63.9GB  primary               lba

See sgdisk example here: https://android.stackexchange.com/a/220042/218526

Related: How to move 7GB ext4 partition on external SD card to 30GB partition on another SD card?


text:
Cannot restore TWRP Backup because it cannot mount internal storage after reboot
I don't set pin/password for my device.
The first time I use TWRP, it cannot mount internal storage. So I go ahead and wipe the storage. This allows internal storage to mount and I can create NAndroid backup for my phone.
Then I restart the phone and go through the setup process from beginning.
Then I restart into recovery (TWRP) again, it asks for the encryption password again. So I in effect cannot see what's on my internal storage and cannot see how can I ever restore such backup I made earlier.
What did I do wrong? How can I backup and restore using TWRP without setting pin/password for my device?
(For the record, set 0000 as lock screen PIN and use it as decryption password doesn't work for me)

From TWRP Options check if storage is mounted or not, the second tile. You probably did that but it is not clear from the question

either TWRP is able to decrypt or you must format userdata partition each time


text:
Bind command on ADB to Android Emulator problem
im sorry.. im new here.. i don't know where to start. i want to run some command in emulator (android). im running certain apps, and i need it to run and not to be detectable in emulator instead as android mobile. The problem is, this command suppose to bind certain file, but its not bind.. maybe the bind command is wrong. see below script/command
@echo off

adb.exe kill-server
adb.exe start-server
adb.exe devices
adb root
adb remount

adb shell sleep 2

adb shell am start com.abc.im /com.abcgames.ab1.SplashActivity filter

adb shell sleep 3
adb shell pidof com.abc.im

adb shell sleep 6
adb shell for i in $(pidof com.abc.im | awk '{print $1}'); do mount --bind /proc/2/maps /proc/$i/maps; done

above if full command that i write on batch file (*.bat)
my question is in this particular command below
for i in $(pidof com.abc.im | awk '{print $1}'); do mount --bind /proc/2/maps /proc/$i/maps; done

its not working. can anybody help me correct it?
p.s - sory for my poor english...  TQ

Are you sure all those commands really finished successfully? adb root and adb remount require a rooted device/emulator with a special adb version installed. Therefore usually on recent device/emulators these commands will fail.

yes. its rooted emulator. is the bind command right? i suspect the command is missing something or syntax wrong or else.. can help me?

is this command right?
for i in $(pidof com.abc.ig) | awk '{print $1}' | do mount --bind /$i /proc/$i/maps; done


text:
Change Device Name on Family Link Device
I'm wondering how to change a device name for a device/account supervised by Family Link.
I've changed the actual device name in the devices settings but the device name that shows up in Google / GooglePlay / FamilyLink is controlled by Google Play. To change THAT name you need to do it on the settings page of Google Play. This only works on the Google Play website. If I try to access the supervised account via a browser it says this account must access play through the app only. I assume this is because store restriction can really only be handled through the controlled app?. Either way the device list is not available in the play app and thus there is no where to rename the device.
Any advice? Is there anyway I could access the web version of the settings page through the play app?

It seems that you're able to rename the device from Find My Device page. Log in with your child's account on a web browser and then modify the device name.


text:
Realme 5 (android 10) trying to boot into fastboot mode
I can't boot into fastboot mode, no key combination works, I also tried with adb command 'adb reboot bootloader' then fastboot logo flashes for a second and it boots into system!
I contacted Realme customer executive and they said there is no fastboot on this device!!!
What does that mean?
Is there any work around?

Power off your phone first, then press volume up+ power or volume down +power and it'll boot into fast mode. If not, try vol up/down + home + power button. See if any of these works

"there is no fastboot mode on this device" means fastboot mode is disabled intentionally. nothing you can do

https://c.realme.com/in/post-details/1184729509568446464


text:
My phone turned off while i was recording audio. How do I recover the file?
I recently was recording audio (an interview) by using the native Voice app on my Samsung Galaxy S6. I paused the recording without having the time to save it. My phone turned off automatically and then restarted (it happens sometimes).
When I tried to go back into the app, the file was missing. I searched in the audio files folder, to no avail. I'm under the impression that the file must be somewhere even though it was not saved, because I see that there is a difference between the remaining space on my hdd before and after the recording (which corresponds to approximately 150Mb).
I downloaded several recovery apps off of the Google Store, but I wasn't lucky.
Has anyone experienced something similar and if yes, did you find a solution?
Thanks!

Can you find a LOST.DIR folder in your internal storage? Corrupted or orphaned files are often stored in that folder..
There's a problem though..  they’re renamed with seemingly random strings of numbers and any file suffixes are stripped. Download a lost.dir file viewer or something and you're good to go..
HOPE IT HELPSSS...


text:
RQT_CLOSE when flashing TWRP into Samsung Galaxy A8 (2018) with Odin
I am trying to flash TWRP into my Samsung Galaxy A8 (2018) based on official instructions from:
https://forum.xda-developers.com/galaxy-a8-2018/samsung-galaxy-a8-2018-roms-kernels-recoveries--other-development/recovery-twrp-3-2-2-0-galaxy-a8-2018-t3818201
I have followed the instructions carefully and repeated several times. I initially tried things on linux with adb and heimdall, however heimdall was failing to flash, so I returned back to the exact Windows instructions using Odin3 v3.13.1. When I try to flash twrp-3.4.0-0-jackpotlte.img.tar into my Samsung Galaxy A8 (2018) aka SM-A530F, Odin fails consistently with this log:
<ID:0/006> Added!!
<ID:0/006> Odin engine v(ID:3.1301)..
<ID:0/006> File analysis..
<ID:0/006> Total Binary size: 35 M
<ID:0/006> SetupConnection..
<ID:0/006> Initialzation..
<ID:0/006> Get PIT for mapping..
<ID:0/006> Firmware update start..
<ID:0/006> NAND Write Start!!
<ID:0/006> SingleDownload.
<ID:0/006> recovery.img
<ID:0/006> RQT_CLOSE !!
<ID:0/006>
<ID:0/006> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
<ID:0/006> Removed!!

I believe my phone is not RMM locked because I see Developer Options in my settings. I tried the process with OEM unlocking enabled and disabled in my phone Dev Options. No success yet.
I googled the issue for a few hours, however people mostly report seeing RQT_CLOSE when phone is RMM locked, which I believe is not my case. Maybe this is related to the recent Android update I installed yesterday.
Phone software:
Android 9
Baseband version: A530FXXUECTH1
Kernel version:
 - 4.4.111-19323942
 - #1 Mon Aug 3 15:36:52 KST 2020
Build number: PPR1.180610.011.A530FXXUECTH2
Security patch level: August 1,2020
Security software verion:
 - ASKS v3.1.1 Rlease 20200120
 - ADP v3.0 Releasae 20191001
 - SMR Aug-2020 Release 1

What does RQT_CLOSE actually mean? Could you please help investigate?

try going to the official twrp website and download an older version such as 3.5.2-- worked for me perfectly


text:
why DAC isn't sufficient for Android that it needs MAC(selinux)
I learned that each app is assigned a separate UID so that a rogue app cannot access other apps data and system sensetive data and files.
What's problem with this that they have to use MAC(selinux)

Because DAC is discretionary, and it's up to the discretion of the user/uid (humans in case of Linux distros, apps in case of Android) to enforce or relax the access policy (to files, processes, sockets etc.). MAC is mandatory, so the access policy set by administrator / program developer (in case of Linux distro) or Google / OEM / ROM developer (in case of Android) is mandatory. And humans/apps (or some malware code running in their name) cannot modify it to break the desired security model. Question isn't specific to Android. You'll find better answers in Linux forums


text:
How can I backup apps while in Safe Mode?
My phone is stuck on boot problem and I was recommended to wipe it all. However I still manage to get into Safe Mode.
My question: how can I backup my apps while in safe mode? No need to backup all apps, just a few important ones (among others: Kiwi Browser, Daylio [Journaling app], Swipetimes [time tracker], Sleep for Android, Expense Manager).
I already use the Android default backup but it seems like it only backup Google apps. I unfortunately do not use Helium or Titanium Backup.
My phone is not rooted. Any help?

You can only use adb in this case, and there is no guarantee you would be able to backup all the apps you want to backup. See https://android.stackexchange.com/questions/28296/how-to-fully-backup-non-rooted-devices?rq=1

@Firelord I'm fine with contacts, calendars, etc. I'm more concerned with things like sleep log or browser history or currently opened tabs. AFAIK those are hidden within directories accessible only through roots. Can the solution there backup those too?

Can you try using adb backup?

@TipzTeam how can I know they are fully backed?

for some apps they don't backup, like the WearOS app


text:
Block non-contact callers
I was wondering if there was a way to block all non-contact callers on my Samsung Galaxy A20 operating system Android 10. I have been through the settings and the only option I have is block contacts or block unknown callers I'm not sure if that just means private calls or non-contact collars. I'm unable to find a solution on YouTube so I'm hoping somebody on here can help.

Does this answer your question? Block calls for everyone except for contacts

One way that I know how to do this is though Android's Do Not Disturb feature.
You basically keep your phone in "do not disturb" mode always, then manually set who is allowed to interrupt you.
Some of the options for who can interrupt you are:

Conversations:

All conversations
Priority conversations. To choose
which conversations are priority conversations, tap Settings.
None

Calls:

Anyone, contacts or starred contacts
Repeat callers. To let a
call through if the same person calls twice in 15 minutes, turn on
Allow repeat callers.

Messages:

Anyone, contacts or starred contacts
None
Reminders
Events

Basically, this is essentially a white-list approach as opposed to a black-list approach.
There may be third-party apps that can accomplish what you are asking, but the above is a stock built-in to Android option for you.

I use an Android app called Calls Blacklist. Settings - Blocking - Unknown Numbers (Block all numbers except Contacts)

Hello. Can you provide link for this app?


text:
unable to see music files in any player app
This is a seemingly common problem and I viewed the dozen suggested posts before posting this but none of that helped since it was mainly things I already tried.
50 GB worth of MP3s in /sdcard/Music
I can see all those files in various file browsing apps and terminal emulators but no music player app can see them. I tried three different players already. They can see music files in Download directory but not in Music. There was a .nomedia file in there but I deleted it days ago and re-scanned media multiple times and rebooted multiple times.
I had all this music in the same location on my last phone Pixel 3 Android 9 but then got a new phone Pixel 5 Android 11, moved all the files onto it, just via file copy from Windows, but player apps can't see them. It's almost as if that .nomedia file was still in there, totally invisible to me.

.nomedia files are not always visible. Try this app to scan and remove those //Next step, from your settings, show system apps and then locate media storage delete it's data (you won't lose anything), reboot, wait for a while and check //Other possible causes - windows file copy (does not Pixel 5 copy these files over using the transfer function with the cable provided)?;//

It could be the mandatory SAF restrictions at play, in which case you would need to find a player updated to 11

See this, may help

@beeshyams, looking at that last Google link, it says that Music, Photos, and Videos except for hidden folders. My Music folder was certainly not hidden and it didn't get copied, I had to copy manually and even then, apps can't see the contents of that folder.

Did you try the app + suggestion in first comment?

Tried the app, it never finished the search for .nomedia files, even hours later. Media Storage shows 67 GB of User Data and 0 Cache but both "clear" buttons are grayed out. Other files were copied from old phone to new but not Music, that remained empty so I copied using file transfer from Windows.

That's very strange to me. No idea why it takes so long. I have used this on two devices across Android versions but was never a problem. All the best for a solution

I was thinking about this and it's really strange that the app isn't working. Try using app mentioned here and clean up everything that a free version offers. Next, try with that  media scanner app

@beeshyams, I did a bit more troubleshooting and found that if I download a song, even from my own Google Drive, it is immediately seen by all music apps. I can then move the file from Downloads to Music using some file management app and that song is still seen in the new location. But I can't sideload the files, they have to be downloaded. Moving sideloaded files from Music to Downloads doesn't make them visible to music apps. Their original entry point makes a difference.


text:
adb appops command error trying to disable vibration for a specific app in Android 10
Referring to this excellent Q&A:
How to determine which app is causing vibration?
I opened an adb shell and ran:
for pkg in $(pm list packages | sed 's/package://')
do
    echo "$pkg $(appops get $pkg VIBRATE)" | grep 'time=+[0-9]*s'
done

which resulted in:
tesmath.calcy VIBRATE: allow; time=+11s553ms ago; duration=-18585d23h50m2s991ms

I then ran:
appops set tesmath.calcy VIBRATE ignore

but it resulted in the error:
appops set tesmath.calcy VIBRATE: inaccessible or not found

How can the app initiate vibrations but yet this adb command doesn't successfully disable them in my Android 10 device?

In Android 10, once the user sets "Deny" or "Allow only while using" in the system, the settings in App Ops will never take effect (because uid mode set by the system is used first).

So maybe enable vibrations again in App's Notification Settings and then try again with ADB?

Edit: tried that, no change, however, turning off notifications entirely and turning them back on (leaving vibrations off) did work. Strange


text:
How can I save my google play account? My old email is being closed and I can't find a way to add a new one
I have attempted to add an alternate email, but it says I don't have permission. This is an old work email that is being closed. I am trying to save my google play account, but can't find a way to transfer it to a new email. Let me reiterate that it says I don't have permission to add an alternate email.

Log in to gmail in your android device using the account you want to use in play store and turn on sync. This may add the account to the play store.

@bashBedlam The Link you've attached again points to this post. Kindly correct it


text:
droid explorer can't recognise sdk directory
droid explorer can't recognise sdk directory

That is the SDK directory, it's what Android Studio shows under file..project structure. C:\Users\User\AppData\Local\Android\Sdk

The Android SDK has changed a lot during the last years. I would assume DroidExplorer needs an update to detect it, therefore you should post this as an issue on the Droid Explorer project.

@alecxs I don't mind supporting users that have problems using Droid Explorer - if it works at all. But if Droid Explorer does not recognize the Android SDK this requires changes on the source code of Droid Explorer itself which is out of scope of this site.

Does this answer your question? How to get started with Droid Explorer

@Robert  thanks, though no it doesn't solve it, see my comment that I just posted on the answer posted there

As I wrote in my comment to alecxs I suspect that Droid Explorer requires an update to reflect the new layout of the Android SDK. May be the issue you have created changes something.


text:
How to decrypt a phone in bootloop mode
I have an encrypted android running LineageOS 15. When it said that there was an OTA update, I choose to download and install this new update. In the first moment it seemed to be alright but when the phone restarted itself the recovery (TWRP) appeared again... and again...
It is in a bootloop mode and there is nothing I can do without loss my data and I can't do nothing to copy my date due to the full disk encryption.
The encryption was made, I think, with the fingerprint and even if it was done with a password I cannot decrypt the entire disk (with the command adb shell twrp decrypt) because my TWRP version doesn't support the decryption.

As you TWRP installed you can simply download and install an older version of LineageOS and check if it solves the bootloop.

I think the bootloop was caused by the full disc encryption... since my twrp version (for huawei p8 lite 2017) doesn't support decryption, neither with the last version it can't read the system and data partitions

I had same problem and I'll write tips how i fixed this situation.
You can fix it by just dirty-flash any rom.
Flash any rom by using external storage or by adb sideload(Advanced -> ADB Sideload -> Run "adb sideload ROM-FILENAME.zip")
You will see lock screen after reboot.After login,you can decrypt data in TWRP.
If you see some error/crash after android bootup due to dirty-flash,install magisk and create backup by Migrate and restore it after clear data.

This can get complicated easily. Dirty flashing was alright before encryption became a common thing. Since encryption became common dirty flashing can easily result in a failed boot (past experience with a Redmi and a OnePlus device). So we have a situation where a successful boot is already failing, and dirty flash solved nothing. The easiest thing to do is to somehow get a encryption-supported recovery to boot, decrypt data, extract it into PC, and reset data partition.

I fixed my encrypted Redmi Note8(MIUI) by this method.TWRP(and other recoveries too) couldn't decrypt data and no backup.Then I dirty-flashed Custom ROM(Treble GSI) and boot it up.After first login,I succesed to restore my data again.

Searching a lot over the web I saw this question and by reading the entire post, and in particularly this answer https://android.stackexchange.com/a/176124/77853 I brought back my phone to life and without losing anything !
What I had to do was (as suggested in the answer) repair the /data partition plus the /system partition !

(FDE) full disk encryption does not encrypt any other partitions than userdata partition. (TWRP >  Wipe > Advance Wipe > Data > Repair File System) cannot fix anything on encrypted partition and is strongly not recommend for userdata (except you are fine with data loss) - in fact it only can work on /system because system partition is not encrypted at all

Hey you could have downloaded the lower version of twrp. My phone also went into bootloop when i flashed twrp version 3 but when i flashed version 2 it worked perfectly. But anyway since you have found the solution ,to anyone who reads this answer you must first flash lower versions of twrp.

I tried with the last one and it didn't work.... How could it work with a older one ? The issue was that the entire disk was encrypted, system and data partions as well... And, in my opinion, installing the new versione of Lineage wasn't possible because it can't read the files, unless you decrypt the phone (from android's settings) before flash the update...


text:
my mobile data is not working after i reseted my sumsung galaxy note 3
I wanted to format and reset my Samsung galaxy note 3 and I did a factory reset but after that my phone is having a hard time to identify the network provider(took a very long time to sign into the network automatically) and the mobile data is not working. I tried making it on airplane mode and then restarting it multiple times but it is still the same. please let me know if you have any suggestions and thanks in advance.

Usually after booting up the first time you should get a configuration SMS from your provider. This SMS can be delayed, just wait for about an hour leaving the phone connected to the mobile network. Or check the web page of your mobile network provider on the APN settings you have to configure. Then you could do this manually.

Reset network setting again. Manually enter APN setting. For that
Go to setting / connection  / mobile network / Access point name. Manually enter apn details.
Turn off data saver. Go to setting / connection / data usage / data saver.
Make sure you have good network signal. Other wise reinsert sim.
Update mobile software.
Make sure data roaming is off. setting /connections  mobile network / data roaming.
Temporary remove from network and again reconnect to network.


text:
Reliability of Type C vs. micro-USB vs. SD card
I don't use cloud services. I just manually backup my phone using a rotation of a few SD cards I own, and when I have access to a family computer, I transfer what's in those cards to the computer, in order to "double" backup.
(Not the best approach but works fine for me.)
A few years ago (pre-type-C being the norm), I tried to depart from SD cards (just for convenience, so that I wouldn't have to remove and insert them to/from my SIM tray all the time) and gave some flash drives and external HD's (via an OTG micro-USB cable) a chance, as they're more "plug and play".
Me being careful in general with my equipment and their cables, and always mindful about properly ejecting flash/hard drives, it's safe to say I've almost never experienced corrupted files on a computer.
But that wasn't the case on my phone. I tried both flash and hard drives (even with an externally powered OTG cable) and I'd encounter some corrupted files after moving them back and forth.
So I just figured micro-USB might be unreliable for this purpose and I went back to using SD cards.
Has type C been any different? Other than transfer speed (which is not my biggest concern) is it more reliable than micro-USB?
In terms of reliability alone where does it rank between micro-USB and SD cards? Am I better off with my SD cards as it is, or type C is reliable enough, for me to quit SD cards and start using it instead?
Like I said, type C's transfer speed is less important than reliability, but it's tempting nonetheless.

USB-C has multiple advantages, however speed is usually not one of it. Unless you buy a high-end smartphone the USB-C port usually operates with USB 2.0 speed. But that is device specific, hence check it out what USB transfer speed is supported by your device.
However from my USB-C has from my perspective the following advantages:

Easier handling (easier to plug-in, reversability)
Because of the easier plug-in the chance to break the USB-port soldering is lower - broken USB-ports because of inserted too often too much force is a common problem
I am not 100% sure but I would assume that the durability of an USB-C port is higher than micro-USB when it comes to plug cycles
For USB-C- USB sticks you don't need an adapter (however considering 2. an adapter cable also has advantages compared to a large USB-C stick - the smaller the stick/plug the lower the force that can be applied orthogonally to the USB-plug (because of the leverage).

On the other had you have to consider that micro-SD card slots are usually not designed for may insert/eject cycles. Therefore I would be carefully when regularly use if for inserting an card for backup purposes. An Micro-USB or USB-C port is usually designed for way more plug cycles.
Production quality of Micro-USB plugs and connectors
I don't know if this is a problem of cheap devices only but it seems to me like the quality for Micro-USB plugs and connectors is often terrible. At the moment I have devices and cables that are all "Micro-USB" but some Micro USB connectors are so tight that not all of my cables fit (e.g. a Nokia 2.2 phone) and on other devices the standard Micro USB cables are so loose that the plug pops out if I move the device a few centimetre (not that we are talking about brand new devices, not old device that has been plugged/unplugged hundred of times, an example: TP-Link TL-WR902AC AC750 mini router). Therefore I even got to a point where I categorize my Micro USB devices and cables into three sub-categories: thin, normal and wide.
Another problem of Micro-USB pugs is that not every plug fits regarding it's length.

That was very informative. Have you encountered file corruption with type C?

@AndysCafe1879 The USB connector only has an impact on the file integrity if it fits so badly that you have a loose connection or if the USB connector is defect because of the broken soldering and therefore causes a loose connection. See also the last paragraph about the quality of Micro USB I have added.

I mean, I don't see how the quality of the ports/cables is the real issue with me encountering file corruption. Back then I had a Samsung S6 (with genuine peripherals) and now an S9. I'd expect the built quality is as good as it gets with these flagships. The flash/hard drives were also working flawlessly on my computer. Are you sure file corruption is attributed to hardware (i.e., USB ports/peripherals) and not to software (poor programming for transfers on Android)?

File system mount and unmount are standard functions of Linux. Samsung heavily modifies Android but I would assume that those Linux parts remain unmodified. Therefore software problems are nothing I would expect.

Can you elaborate further on "On the other had you have to consider that micro-SD card slots are usually not designed for may insert/eject cycles."? ___ I haven't heard that before. What's the issue with SD cards and their longevity? Do I damage them every time I insert/remove them? I'd expect they're durable, the oldest one I use is several years old.

@AndysCafe1879 In general every plug, every card and every connector is getting "damaged" by inserting/remove operations. How often a card or plug can be used depends on the thickness of the connector conductive material (see e.g. https://photo.stackexchange.com/a/77278/94508). When it comes to micro-sd card readers the reader type (how you insert the card) makes a big difference. On some models the chance to accidentally damage something when inserting a card is present.

I see. I researched for ways to move from wires altogether and found that wireless external HD's exist (I wasn't aware). Do you have any experience with them? [ e.g., https://www.amazon.com/dp/B01MTQVD28/ ] I looked up online a little bit and their reliability is questionable (when compared to their wired equivalents) but I'm suspecting it's GOT to be more reliable than my OTG/micro-USB experience (from a few years back). Otherwise, only option I see, is to just stick to SD cards and just remember to often check their connectors and how damaged they are at a given time.


text:
Does 'Battery Protection Mode' turn on automatically?
I'm the founder of a company that deploys Android tablets into a hospital
Making sure our tablets are plugged in is really important to us. When devices get unplugged we alert hospital staff to plug them back in.
Devices are showing up unplugged when they’re plugged in, reducing staff confidence in us.
What we know..

Patients occasionally unplug cords to charge their phones
We had a bunch of low quality cords that were falling out. We replaced most of them yesterday
We’ve observed devices not charging when plugged in: the charging light flicks on, then immediately off after being plugged in
We have not changed any default battery settings
The problems have been mostly limited to a couple of devices
Our MDM solution (Esper) shows us battery level graphs that level off at 60%

.. we suspect that like ‘battery protection mode’ is being enabled automatically somehow
Some (potentially) useful context

Devices: Lenovo M8s running Android 9
Devices are in kiosk mode running our single (low battery use) app with screens

Using a tablet with plugged-in USB cord will destroy the USB charging port in no time because of the leverage effect of the USB plug. Therefore I would strongly recommend to use USB cables that work like Apple's magsafe - if the force is too high the magnetic connection breaks and the cable disconnects from the device.

I got a response from our support contact at Esper. This is apparently a Lenovo feature.

Lenovo "Battery Protection Mode" will be automatically enabled if the device is continually charging for around 7 days.
This is a feature designed by Lenovo to reduce excessive battery heat and degradation.
While plugged in the device will stay at a charge level of about 60%, and will slightly vary at times but should dip no lower than 50%.

Thanks for the initiative and self-answering! Apparently, yes, this is a Lenovo feature: HowTo enable Battery Protection Mode - Smart Tab. The "7-day automatically" is good to know since looks like it's not documented anywhere.


text:
How to boot in recover with Acer DA220HQL
I would like to ask if there is any step by step guide to follow in order to get into boot recovery mode (Acer DA220HQL running Android 4.0.4). Additionally is there any specific version of TWRP suitable for this device?
Your help would be convenient to me!
Regards

https://forum.xda-developers.com/t/root-and-custom-cwm-recovery-for-vsd220.2164736

have you installed this TWRP successfully?

Thanks for your helpful posts. Since there is no custom Rom for this specific model, it is pointless. In case you could find a suitable custom rom, I would be delighted and of course expect your additional help of how to safely install it step by step. Regards and happy New Year.

i wouldn't say pointless as you at least are able to root and customize the current Android 4.0.4 little. i am also running stock ROM on my two devices, just rooted and extended storage with external MicroSD Card


text:
My pixel 3xl wont charge when I plug it in. I have to plug and unplug it a zillion times. I tried cleaning it
My pixel 3xl wont charge when I plug it in. I have to plug and unplug it a zillion times. I tried cleaning the port, different cables, different chargers. No joy. I can use the wireless charger, but it's slow. Plugging and unplugging it, and waggling does eventually start it charging, but takes ages to find the exact orientation so it charges. Do I need to buy a new phone???

I had this problem for like 18 months. It started happening after cycling in the rain a few times. Anyway, I finally found the solution last week. Never seen the solution anywhere else. It's so easy in the end. Very easy:

simply plug the cable in. no wiggling or anything. It probably won't charge yet. I mean, if it does, then you're good. but if it doesn't ...
go to 'settings'
go to 'connected devices'
find usb, and change from 'controlled by other device', to 'controlled by this device'
if you are lucky, your phone will start charging :)

I mean, this worked for a bit, until the motherboard broke entirely, from water damage lol :P


text:
Storage Booster - Disable duplicate image scan
I have a Samsung Galaxy A5 with Android 8.0.0.
Occasionally I get a notification that Android found many duplicate images:

It says: "Storage-Booster. Duplicate image found. There are 2549 duplicate images on your phone."
Most of them are images sent or received by messenger apps but sometimes it also detects similar images as duplicate, in rare cases even totally different images.
I don't want to delete any duplicated images for multiple reasons:

I don't want to delete the original image, neither want the image in the messenger become unavailable
I don't want to delete just similar or even totally different images
They only occupy around 1 GB and I have plenty of free space on my SD card.

Is there a way to completely disable the duplicate image scan? I also expect it to draw a lot of energy when regularly comparing thousands of images in the background.

I don't know details on the image comparison in Samsung devices but commonly similarity is computer by a formula that assigns each picture In the media database one value. And "duplicates" are those that share the same number. That avoids comparing thousands of images and requires only a bit computation when the picture is taken or saved. Power usage for query the media database for finding similar images is neglectible. May be Samsung schedules those computations to be done while charging.


text:
Is there a way to capture HTTP requests from an installed Play Store app?
I'm developing a search aggregator service so I'd like to get the endpoint of some of the stores that, currently, doesn't expose their API. So I'd like to now if there's a way to do this with my cellphone.

Use a rooted device with Magisk for sniffing and a PC with a proxy like mitmproxy, Fiddler, Charles... On the device you can install the proxy as system certificate or alternatively use https unpinned und trusting solutions like frida/objection or simply the edXposed module + trustMeAlready module.

This might be weird, but sometimes submitting the APK to Virus Total may reveal some URLs as "Interesting Strings" (e.g. the analysis of a random APK).

Sure solution can be an out-of-android one: install a https eavesdropping proxy. It requires a root certificate, that you should install into your android, somehow. Well, some apps, if they really want to, will be able to detect that you eavesdrop them and stop communicating on this reason, but it won't happen too often.

Yes, you can do it on your phone alone. I use HttpCanary App with root access. It works without root as well but only a few apps that don't use certificate pinning.

App is not available (anymore) and doesn't seem to be maintained since 2019 on GitHub.


text:
stream audio from multiple android smartphones to pc or directly to an earphone and to listen
I would like to know if it is possible to achieve a setup in which I'm able to listen to multiple android phones via streaming audio to pc which may be streamed through usb or via bluetooth.
Or if there is an alternative through transmitting to a device and just connecting that device with some earphones and I would be able to hear all devices at the same time?
Here is the overall picture of this last solution


text:
What algorithm does Android used to translate touchscreen events to scancodes?
I have been debating someone recently about whether physical keyboards are faster than touchscreen keyboards. I have a lot of CS knowledge, but not a lot of Android knowledge. Therefore, during this debate, I have been reading up on how the Android system processes touchscreen events into keyboard events[1]. At this point, my understanding is this:

With a physical keyboard, the keyboard hardware itself can send a scancode that can be translated to an actual keycode at the kernal level through a simple lookup.
With a touchscreen, the hardware device is sending an X/Y position (along with some other data, but not a scancode), which then needs to usually be translated into a scancode by a previously exported virtual key map file. Then that scancode can be translated as expected.

This translation can happen either at the driver level or the software level. I cannot find any source code for driver level, but I found this Java file[2] which seems to do the translation at the software level. However, its implementation is absolutely not what I would expect. It seems as though the virtual key map file is loaded into memory as an ArrayList, where the VirtualKey is a simple static class with some helper methods. Essentially, the VirtualKey class has the bounding box and can determine if a given X/Y point would fall into that bounding box. When the system is checking a virtual key (findVirtualKey, line 786), it simply iterates through the list and uses a helper method to linearly search for the relevant key (it doesn't even bother to precompute the math on the bounding box, allowing it to happen each time).
Am I looking at the wrong place to understand the algorithm used in my phone's virtual key translation? I genuinely expected some kind of spatial data structure like a QuadTree. Is the dumb linear search on an arraylist more effective in practice despite the presumably terrible Big Oh? Have people tested the runtimes? Does anyone know where I can read more about this?
[1] https://source.android.com/devices/input/touch-devices
[2] https://android.googlesource.com/platform/frameworks/base/+/f0e697839a7de4eb080430fd83d44c0b436fdc88/services/java/com/android/server/KeyInputQueue.java

Android itself does not translate any key codes at all from display based keyboards. That is the job of the active keyboard app. You should better check the AOSP keyboard app.

Other than perhaps a difficulty in typing on a small virtual keyboard, dumb linear search is fine as long as the user cannot type more than 100 characters per second though..? Has this become a real problem?


text:
Contact with 2 phone numbers - how to distinguish between them on WhatsApp?
I have what I would think must be quite a common situation - a friend has 2 phones, one for work and one for personal, and I've created a single android (google) contact with the both phone numbers in, identified appropriately.
However, WhatsApp displays this as 2 contacts with the same name and no way of distinguishing between them. If I want to add them to a group I have to guess which one it is, then go into the group and select them, then I can view more details to see if I've picked the right one.
Is there any easier way to distinguish between them in WhatsApp?

Just save them as a separate contacts? Solves everything at minimal fuss.


text:
Ring tone super-quiet on Galaxy S9+
I am having a problem with my ringtone on my Galaxy S9+.
Suddenly, my ringtone has become extremely soft - as if it was on the lowest possible setting (except mute).
However, it is on the highest, so it's definitely not a problem with the setting.
It is not a problem with the speaker because I hear well during calls or watching videos.
Furthermore, when I select the ringtone to change it, the sample play is perfect.
It is only when someone tries to phone that the problem occurs.
I have tried restarting the phone, going into safe made and many other things and can't seem to solve the problem.
It's almost as if it thinks it is sending the ringing to my air-pods. However, the bluetooth is turned off so it is definitely not connected.
Until recently it was only intermittent but now it is happening all the time.
It also happens with incoming WhatsApp calls.
I am using an mp3 for my ringtone but it happens also with build-in tones.
Software Information:
Android 10
Baseband version: G965FXXU8DTC5
Kernel Version: 4.9.118-18339721
Build: QP1A.190711.020.G965FXXU8DTC5

As suggested I am posting how it was "resolved".
Went to Samsung and it turns out that the bottom speaker isn't working.
That's why it is so weak. The fact that it works from time to time probably means that the problem corrosion or something similar.
This also explains two other problems I have had that I thought were unconnected:
The "beep" when plugged in (as I mentioned in the question)
The fact than when I am speaker lift at to my ear I can no longer hear the call. I guess that the sound then comes out only the bottom speaker.
Edit:
It turns out that it rings when flat on a surface only. It seems that when it is vertical it tries to ring from the top and bottom whereas when flat it only rings from the top.


text:
How do I copy the entire system root to an SD Card or USB Flash Drive?
I am trying to make a direct 1:1 clone of my Android 9 system. I have the device rooted and I am running 'Terminal Emulator' as super user. Now, if I am in the root directory (IE: ":/ #") and I feed it a "cp" command like this "cp / /storage/external_sd" I get an error saying "skipped dir 'storage/external_sd//' Cross Device link".
Note, I cannot use 'ADB' because my Android device is a USB host only and I'd need to reverse engineer the circuit board to find the solder points to allow me to connect as a client so I'm trying to do it via the software on the device itself.
Reason I am trying to clone the system is because I am trying to find a particular splash logo which comes up when the device has power, but I'll need to reverse the files once I have them dumped to see which one contains it exactly.
Thanks.

NOTE: "cp -a -v / /storage/external_sd" has worked, but I am getting "Operation not permitted" errors on most files. I assume some simply cannot be copied so the best method would be trying to get 'ADB' to work and do a full image backup.

You can edit your question at any time. For adding new info you therefore don't have to use the comments...

If the logo is displayed at a very early stage it might be located in the bootloader (changeable via hboot/fastboot) or the system/kernel image. Then you won't find it in the file-system.

Do you have any reference links on how to edit the hboot/bootloader logo on power up?

Nothing useful in English just google for splashscreen hboot and splashscreen fastboot.

Note that by cping to external_sd will NOT get you an "exact clone" – but a broken copy, as all permissions will be lost. external_sd uses a FAT style file system which doesn't support much POSIX. So you'd better use something that can take care of that, like: tar czf /storage/<disk>/system.tar.gz /. Further, as you see "operation not permitted": are you sure you run as root?

As Izzy mentioned, simply copying using cp is no way a workable way for backup/restore. All you get are the contents of mounted filesystems including /data, /system and /vendor (if applicable). Also there are a number of (usually more than a dozen) kernel's virtual filesystems (like /proc and /sys) mounted in rootfs or in subdirectories like /mnt and /storage. Backing up volatile/virtual filesystems isn't needed and would certainly throw errors. Instead you should dump whole partitions if needed.

As Robert said, splash screen at very early boot stage is shown by bootloaders. Usually there's a dedicated raw partition (usually named splash or something similar) to hold the image file(s) in very specific format which is not always editable. After kernel and init are loaded during boot process, a boot animation from /system/media/ is displayed until zygote and apps are up. Usually OEMs replace the stock boot animation with their own.

Correct, I'm trying to replace the bootloader image. Not the boot animation after the kernel and init are called. I ran the command df but unfortunately this only shows mounted partitions and even so, I don't see anything named splash (or anything similar).

@t0rxe df is meant to show mounted filesystems. For all other partitions in your flash storage (e.g. eMMC or UMS) you need to look at your partition table using some partitioning tool. Some basic concepts about partitions and filesystems on Android devices: Android Device Partitions and Filesystems

Okay, I managed to hack it out and get a custom bootloader image in (more info: https://android.stackexchange.com/questions/224916/change-android-bootloader-splash-screen-image)


text:
Stuck in Fastboot after deleting almost all the content in my phone (Xiaomi Mi 9T)
So I was trying to install Lineage OS (the unofficial version), because I think it works better with my phone. I already did that before, and I am not a newbie... But what I did today shows the contrary.
I downloaded everything on my PC and did a backup, and then I factory resetted my phone. After that, I activated the developer options and then the USB debugging and then I went straight into TWRP (I already flashed, I had a working, unlocked, MIUI ROM) and formatted almost everything (System, Data, Vender, etc, but not the USB option). I did something similar last time without any problems, so I thought this would be like the last time. But it wasn't.
After I did that, it sent me into Fastboot mode (kind of expected that), but when I tried entering some commands into the ADB console (like fastboot devices, or adb devices) it did nothing. The thing is, I tested it on my PC, and those commands were supposed to be working. I had the drivers and everything. I also tried to just flash back into the MIUI ROM (with the MIUI Flash tool), and it did nothing (it found my phone when I replugged it into my PC, but only for 3 seconds. Tried flashing and it didn't work). Also, I can't go into Recovery mode, it just sends me back into Fastboot mode.
I believe it's because of USB debugging not remembering my PC, even though I selected it to remember the PC. Also, I think the OEM is still unlocked, it has no reason to be locked as I did not enter any of those commands, I just... deleted my phone...
Any help?

https://android.stackexchange.com/q/224717

https://xiaomifirmwareupdater.com/archive/miui/davinci

The PC doesn't detect the device. I can't flash anything on it...

usb-debugging (adb) is not required for flashing. while in fastboot mode install proper usb-drivers. or use linux without drivers at all. download fastboot ROM and flash boot + system + vendor from fastboot. or boot into EDL mode and flash from QPST

Yep, it was a driver problem after all. Sorry for my misinformation, apparently the laptop I use doesn't have the drivers for fastboot (I think). I thought it would be like my last laptop which automatically had all the fastboot commands working as intended, so it never went through my head that it would be something with my laptop.
Thank you for helping me! Have a good day!


text:
How to get raindrop.io to open youtube videos in youtube vanced instead of the official app?
Is there a way to make apps open to specific apps we choose always?

On Android 8.1.0 (and higher?) this is also accessible from Settings -> Apps & Notifications -> Default Apps -> App Links where it seems to list all apps that can open links.


text:
Cannot create, move or delete files or folders on android phone's SD card even after write only attribute is removed
When my old 16 Gb microSD card I used in my LGE V10 (h900) running Android 6 failed, I bought a new card; opting for a Sansdisk 64Gb microSD card. But since I inserted the card, I have not been able to write, edit or delete anything on card using my phone. I can do so readily by plugging my phone into my Win10 computer through USB, but when I try to access the card with any apps whatsoever except the built-in file manager app, and try to do any sort of write-related functions on it, they always fail.
Most commonly, I've tried to create folders on the SD card, but every time, I get the message "Folder failed to be created".
I first noticed the problem when I tried to set the SD card as the backup save location for SUPER BACKUP. Trying to select the root of the SD card, or any other folder that was added by formatting the card similarly fails, and even adding an extra folder using the built-in file manager didn't allow me to set that as the save folder for SUPER BACKUP.
So, I tried accessing it using ES FILE EXPLORER. It could read the card, but I could not move any files or folders onto it using ES, nor could I create any files or folders on it, or delete existing files or folders on it.
As per advice online, I downloaded the FX File Explorer App, and it recognized that my SD card was write only, and I used FX own auto-function to grant Write access to it, and the process seemed to run properly, and it recognizes my SD card as -RW, but whenever I try to move, create or delete anything on the SD card, I get the "folder was not created" error (or whatever I was trying to do).
I tried using FX to remove the write permission, then restarted the phone, and had it give write access to the SD card anew, and again, the process seemed to work without problems, but I still could not write to the SD Card using FX or ES.
I tried Unmounting the card, turning off the phone, extracting the card, cleaning the terminals with an erased and cleaned out the slot on my phone with canned air. Still couldn't write to the SD card.
I tried using the Storage Settings function to reformat the card. Still nothing. Again, I tried unmounting it, and reinserting it, but I still couldn't write to it.
Now, for some screwy reason, WIN10 won't assign the V10 a drive letter when I plug it in to the computer, so I couldn't use any fix that required targeting a drive or volume, so I ordered USB 3.0 SD Card reader, and plugged the card directly into the computer. There, I tried several so-called "fixes" I found online

I used an elevated Command Prompt to use DISKPART to remove the WriteOnly attribute from the card (which is seemed to do), but upon plugging it into my phone, it still wouldn't let me create folders or files, move files or folders onto it or delete files or folders from it, giving me the same "failed" error.

I used Diskpart to again try removing the WriteOnly attribute from it, targeting it both by first Disk number, and then by Volume number, then cleared the card, created a new partition and formatted it from DISKPART. That, as some might suspect, ran me into the problem with cards over 32Gb not being able to be formatted with FAT32 by DISKPART. I downloaded the GUI version of the Fat32Format utility, and after removing write only and clearing it card, I used it to format the card and return it to my phone. Still couldn't write to it.

I used DISKPART again to try formatting it as NTFS, but my phone read that as corrupt, so I formatted it on the phone, making it exFAT, but still no access, even after using FX Write Access granting function on it again.

I tried using the Write Protect removal function of EASEUS TOOLS M BETA. At first, it read it as not having any write protection, but I ran the tool, and it apparently put write protection onto it. I then used the tool again to remove the write protection. Still no write access from my phone.

The card is brand new; it's from a reputable mainstream card company (Sansdisk), bought from Amazon.ca (not one of their subcontractor companies).

I've tried writing to the SD card with other file managers, including "FileExplorer", ASTRO and even Sandisk Memory Zone, but I simply cannot write to it.

Every other solution I've come across requires root, and it is impossible to root a LGE V10 from AT&T. They've locked the boot loader for some stupid reason, and the only TOT file I've found to use LGUP to root it with only has Android 5 on it, and the damned phone won't let me upload a TOT file that downgrades Android from 6 to 5.
I don't live in the US, so I can't access AT&T servers to try to get an upgrade to my version of Android. Needless to say, I'm never going to buy a phone that AT&T provides ever again, but unfortunately, buying a new equivalent phone is not something I can afford, and the phone is still working great otherwise.
The only other thing that I can think of that might possibly have a remote chance of causing it was the fact that I recently changed mobile providers, requiring me to change my SIM card from a KOODO one to a PUBLIC MOBILE one, but I'm not sure how that could have messed up accessing the SD card; they're separate sockets, despite the fact that they're situated next to each other in the battery compartment.
Can anyone help with this? It's frustrating beyond all belief.

I had a similar problem. You have to make your phone format the card for you to use it. The card can then also be read by your pc. Format the card by windows, it can be that your phone can't make heads or tails of it. This is a security feature on android with a mismatched id or something... So I would go into the partition software on windows, remove all partitions, get to your phone, and tell it to initialize the card.

If your card is formatted with the wrong file system your phone will either have read-only access or no access. Try formatting the card in the phone.

First of all you should use the Windows PC you have and perform a test of the sd-card if it is not forged (claims to have a larger size than it actually has flash chips). A very good test program for Windows is h2testw. The download page is German, but the tool itself also has English language.

It's not forged; SD Insight App confirmed it.
I tried formatting it on the phone, as I mentioned above. Didn't work
The card isn't dead; it's brand new.
As I mentioned above; I wiped the partitions and created new ones, cleared the card and tried formatting it in FAT32, using a utility that creates small enough allocation segments to get past the "can't format a card larger that 32Gb with FAT32. I've also tried formatting it as exFAT and NFTS; No good.

How to save files to external SD card on a non-rooted Android?

it's a unkown problem nobody has solved yet https://android.stackexchange.com/q/221269


text:
Restore local WhatsApp backup after factory reset
The phone is a Samsung J7 Prime. Lately, the memory was getting full and this ended up in causing Google Play Services to stop working and crashed Google Play Store which was not available anymore. Tried cleaning and increasing the available memory and following Google guides to get back to normal to no avail. Last resort was to factory reset. I made sure to use Samsung Smart Switch and Cloud Backup after doing a local WhatsApp backup since Google Drive wasn't accessible anymore. After the reset, the shock was that the local WhatsApp backup files were all gone. Tried using several recovery software but all failed to see the deleted backup files or any deleted file for that matter. I also read that file recovery needs rooting which is not something I'm keen on doing this as the phone is not mine. What are my options at this stage and is there any possibility to get back the deleted backup files? This happened yesterday late evening and the phone hasn't been used much since.
P.S. Samsung Cloud Storage sucks as it requires 2FA and to sign in requires an SMS which is not being received (that's another issue that I'm not addressing here) and I'm not even sure if the backup files were copied to this storage in the first place.

https://android.stackexchange.com/q/208106

you are left with official restoring options, recover deleted files from device is impossible for multiple reasons

What do you mean by official restoring options? Are you referring to the methods listed in the linked post?

No, i am referring to WhatsApp-restoring-options

The only available options at this point are restoring any last backup from google drive or rooting(which needs unlocked bootloader) your phone to recover files.


text:
I was running an AVD on Android Studio and I got the following 2 errors. What do they mean?
Error number 1:
Emulator: E0809 05:21:56.677723102 2704 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1596930716.677712232","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}

Error number 2:
Emulator: KVM: injection failed, MSI lost (Operation not permitted)

The AVD works fine otherwise with no issues, I was just worried why I was getting these errors. I was not compiling an app or anything while running the AVD. The first error appeared when I started the AVD and the second error appeared upon shutting it down.
I get two other messages that don't seem to be errors but I am including them anyway (both of these below appear upon closing the AVD. Only the first error appears when the AVD is started):
Emulator: Process finished with exit code 0

Emulator: deleteSnapshot: for default_boot

The AVD is running Android Q (API level 29) x86_64 image with Google APIs and the device I am virtualizing is Pixel 3
Here are my PC specs:
16 gigs of RAM

16 Gbs of RAM
Intel i3-8100 CPU
Linux Kubuntu
120 gig SSD (that Linux installed on)
1TB HDD and another 240 GB ssd for Windows (unncessary info I think but I included it anyway)

Error in the emulator log are nothing unusual. If everything works you can ignore them.

@Robert you sure?


text:
Is Android's system recovery a firmware thing or Android thing? Can factory reset be prevented?
I'm researching on how to protect my phone from being able to be reseted by thieves. Doing some research online I figured out that the main method of putting a stolen phone to work again is to do a factory reset through rebooting and using some combinations of volume + power buttons to activate the factory reset.
I'd like to know how this reset works. I've seen that on a Moto G 2nd gen, it had options like 'factory reset' or 'recover from SD card'.
First of all, this program, let's call program A that starts when you press the volume + power is running from firmware or kernel? Can it be erased?
I'd guess it's firmware, but it'll only accept a new system from an SD card if it's signed. So, the option a thief would use is the factory reset.
Supposing that I cannot block the program A from running and neither modifying it to supress the factory reset option, is it possible that I can make it factory reset to a custom OS, not the installed one? This custom OS could not work or have some monitoring programs.

Android recovery is a part of OS. If key combo is used to do a factory reset,  factory rest protection kicks in and the thief can't use the device in most devices (I am assuming locked bootloader or unrooted device or no custom recovery is installed.

You cannot have two OS 's running on unrooted Android phone

https://android.stackexchange.com/q/219561
https://android.stackexchange.com/q/220268
https://android.stackexchange.com/q/229462
https://android.stackexchange.com/q/220648
https://android.stackexchange.com/q/127739

someone else please post another answer about certain possibilities to prevent factory reset via 3rd party MDM device management software (for some samsung devices it is even possible to disable Odin/Download mode completely)

Android recovery is part of boot.img located in /boot partition. Hold key press signal for bootloader and recovery mode are hardcoded in android bootloader (ABL). ABL listens to keypress signal and boots bootloader or recovery mode. In Qualcomm Snapdragon devices, if ABL is corrupted, then Qualcomm's Extended Bootloader (XBL) fallsback to EDL mode for flashing device partitions.
See the bootflow of device with Qualcomm's SoC:

In this image, it shows kernel boots recovery which is not the case anymore. In A/B slots, recovery is part of boot.img so it can be directly booted by ABL.
Android has weak implemented physical security. Someone with physical access can access bootloader and recovery mode by hard restart of the device and pressing key combinations. Hard restart is hardwired to the SoC. By pressing power button for 15 seconds, SoC reboots and this feature is independent of the OS but reboot policy like hold press delay timer is hardcoded in firmware of SoC.
If factory reset protection (FRP) has no unpatched vulnerabilities, it will prevent reuse of stolen device after factory reset without authenticating your account. But OEMs implement it poorly and its bypassing methods become quickly available.
A good security design is when an unauthorised person shouldn't even have authorisation to factory reset the device. Android 8+ devices are fully capable of authentication for bootloader mode and recovery mode. Modern android devices are equipped with TEE which wakes on boot and in Qualcomm devices, it is awaken by XBL. TEE can perform biometric authentication or can use PIN authentication of screen lock even if the host OS is not loaded yet. Why AOSP and OEMs are not enforcing it doesn't have a justifying execuse.
Whether your bootloader is locked or unlocked, there's no anti-erasure protection. But atleast with bootloader locked, fully patched FRP can't be bypassed.

https://lineageos.org/engineering/Qualcomm-Firmware

that's egg hen dilemma. you can't do modifications on locked bootloader. unlocked bootloader allows thief to do everything he like
Your data is protected of being stolen (by encryption, and encryption key is wiped on factory reset). Your device is protected against re-using by thief as long as FRP factory reset protection is enabled (and you have bonded google play account). It doesn't protect your data from erasing and factory reset is still possible, but thief requires your google password in order to use the phone again. unlocking bootloader will disable FRP
after factory reset, as long as FRP is activated, thief cannot finish initial setup, therefore can't enable OEM unlocking in developers options and has no availbility to unlock bootloader. however certain hacks are possible to by-pass FRP, but that doesn't concern your data security
the more interesting is overcome encryption - as long as your lock screen credentials are part of encryption, your data is secure. But if your device is running FDE encryption with default_password, attack (on locked bootloader) is possible for devices where OEMs leaked programmers/tools for raw access

https://blog.elcomsoft.com/2018/05/demystifying-android-physical-acquisition


text:
How to adb pull on galaxy s1 i9000 please?
How to adb pull on galaxy s1 i9000 please?
I need to install TWRP but no s1 i9000 (classic ) version was ever made due to lack of a certain recovery partition structure on s1 .
But it is available on S1 Blaze and S1 Fascination which were newer but lower in specs.
Clockworkmod for XXJJVQ Baseband version of i9000 is in many places as a notworking link on forums.
Anybody have Clockworkmod for s1 i9000 XXJJVQ please ?
Or a workaround to make partition image on s1 i9000 ?
I recorded a very important proof today and the file was not saved.

https://forum.xda-developers.com/t/2015-10-09-cwm-6-0-5-1-philz-touch-6-59-0-libtouch_gui-1-42.2201860


text:
Android UI lags / shutters
I often see strange/unexpected slowdown in Android UI irrespective of the device I use. UI suddenly skips frames and all graphical transitions seems to run at a very low frame rate (I would say in the range of 10 fps) and with severe lag. After some time it can sometime recover, but not always: the only guaranteed method to return at full speed is to reboot the device.
It seems strange, because:

it happen on any device I own, but with different absolute effect (ie: on a Mi A2 Lite it is much more visible than on a Oneplus 6T or Mi 10T Pro)
closing all application does not alleviate the slowness/lagging
when it recover, I did nothing fancy at all (maybe I simply locket/unlocked it).

The OEMs who are only after UIs to an extent of madness, trying to be unique, ultimately lose in performance. Don't know who tells them that the users only want elegance. Try custom ROMs.

@IrfanLatif I don't think it is a case of excessive customization: the Mi A2 Lite has Android One, which uses the Google launcher (as the Pixel phones). Something similar can be said for the OnePlus 6T, which uses a near-stock AOSP launcher.

I own a Mi A2 Lite. The problem occurred after Android 10 update. Turning off animations in Dev Options seems to give a bit relief. Lag problem is common in Xiaomi devices. What I observed is that their focus is majorly on UI, not on HAL development and resolving hardware/software compatibility issues.

Not to pass a subjective call but I have owned MiA1, OP7 and this does occasionally happen. I agree with @IrfanLatif that they focus on the "bling value" more and therefore his point


text:
I want to unlock my Samsung a70 without factory reset
My son played with my phone and changed my password and I don't know what is it. I have tried for several months but nothing worked.
Can you please help me because my phone contains important images and files that I want to save.

give it back to your son and let him play with, hopefully one day he remember

no he is small and he can't remember because he did random

obviously he was smart enough to watch you unlocking, remembering the unlock code, navigating to settings - security - screen lock - successfully inputting unlock code - typing new "random" password - repeating new "random" password exactly again - and confirming the change


text:
Why can't I link contacts? (Moto G Stylus)
I just started to use a Moto G Stylus. I copied my contacts over, and several contacts are linked (like Gmail, Signal, WhatsApp, Exchange, etc.). This is how I had it on my previous phone and is as it should be.
However, I can't create new links -- neither completely new links, nor adding contacts to already linked contacts. The only things I can do is display the links of already linked contacts and unlink them.
Does anybody know what I could do to be able to link contacts? Is this a limitation of this specific dialer?
The odd thing is that the Verizon help for this phone mentions the "Link" feature (https://www.verizon.com/support/knowledge-base-230168/), but the Motorola help page for the Contact app doesn't (https://support.motorola.com/us/en/solution/MS149789). I got my phone through Google Fi, FWIW.
(Note that I'm not talking about merging contacts. Merging only works within a given account; linking contacts is provided specifically to be able to link contacts from different accounts into a single entry in the contact list.)

Try a different contact app?

@beeshyams: That's what I'm doing. So far I've tried Simpler Caller ID and Drupe, and neither has the link feature. Do you have any suggestions?

Not particularly.....

In the meantime, I have found out that the dialer of this phone really can't link contacts. What a bummer... I thought this was a basic functionality of all but the most basic phones. (Well, maybe it is, and this phone is just one of the most basic ones.)
In any case, be prepared to add a 3rd party dialer to the bill if you're thinking of buying this phone from anywhere but Verizon.
From Motorola:

The :Link" feature that you've mentioned is only available for Verizon specific phones, so a Moto G Stylus that is purchased from Verizon would work with that feature.


text:
Endless reboots after adb remount on Docker Android 10 emulator
I'm trying to remount the system partition of an Android docker emulator (stable v.30.2.5 x86_64). I use the official docker scripts from the Google docker scripts page. According to the official documentation remounting the system partition can be done with the adb remount /system command so I tried that out but got stuck in a endless reboot of the emulator. I did the following:

Start the docker Android emulator with ./run.sh f47fab55785d -writable-system
Connect the device with adb: adb connect
Root the emulator: adb root
Remount the system partition:
adb remount /
Disabling verity for /system
Using overlayfs for /system
Now reboot your device for settings to take effect
remount succeeded

Reboot: adb reboot

All the commands seem to work as expected and the emulator starts to reboot. However, the emulator gets stuck in an endless loop after some seconds (see logs).

In the logs I see two errors but I don't understand what's causing the reboot. Does anyone know what's causing this endless reboots and how I can remount the system partition?
kernel: [   11.379317] init: [libfs_mgr]check_fs(): mount(/dev/block/pci/pci0000:00/0000:00:06.0/by-name/metadata,/metadata,ext4)=-1: No such file or directory

kernel: [   13.506403] cfg80211: failed to load regulatory.db

regulatory.db seems to be the database where for each country in the world the allowed Wifi frequencies are stored in. Based on the provided log you did not cleanly shut-down the emulator file-system. May be something got corrupted in the file-system and thus this database got corrupted.

If I stop the container and start again the emulator starts normally again but does not mount the system partition in read/write. Since I used adb reboot it should reboot with the normal routine.

I don't have much docker experience but from what I know restarting a  docker image means loosing all changes. My advice: just use the Android emulator without docker unless you are an Docker expert and exactly know what you are doing.

If I could go without docker I would do it, but in this case it is a must to use it.


text:
How do I connect an external WiFi device to the USB port of my Android phone?
I cannot find any android drivers that will allow me to connect an external WiFi thumb drive to the USB port of my phone. Then I intend to interface to the USB through the external WiFi device using WiFi Direct.  I do not want to root my phone so does anyone know of a way to connect these devices?

You need to rebuild your kernel with the driver added for the Wi-Fi adapter you want to connect over OTG.

Thank you Irfan.  I was looking for a solution that does not require rooting.

Yeah that's what I meant that what you are looking for isn't possible.

Irfan, I thought the driver would go on the external device, not the mobile. Windows comes with USB drivers to interface to mobiles..I was hoping there was an external WiFi thumb drive that would allow addition of a similar driver but instead of Windows it would be in Python or whatever the thumb drive was capable of running.  I guess that would require that there are USB drivers available for non Windows devices.

The concept of drivers is different on Windows and Linux. Android is based on the latter. Linux kernel usually already includes a larger number of hardware drivers than a Windows system. But mobile devices have limited hardware resources, so Android uses a minified Linux kernel. If your kernel doesn't have the driver of your desired WiFi adapter already built-in, you need to rebuild the kernel. Or at least load the driver as a kernel module (if luckily available). In both cases root privileges are must (which are always available on desktop systems, be it Windows or Linux).


text:
AVD adb push gapps
i try to get gapps working on my avd. I already use a google api image, but anyway the store is missing. Every tutorial tells me to push open gapps via adb:
https://medium.com/@dai_shi/installing-google-play-services-on-an-android-studio-emulator-fffceb2c28a1
But i have the problem, that system is not writable. I already tried various solutions like this one:
adb push not working on /system, read only
Finally i think this can be the solution: https://stackoverflow.com/questions/49426174/cannot-push-to-android-emulator-because-of-read-only-file-system/49427040
But my problem now is, that the emulator only shows a black screen when i use the -writable-system option. Otherwise it starts fine.
Can someone help me to get the store apk installed on my virtual device?

do you have any cmd line access while on black screen? i guess -writable-system is requirement (which is according to your linked researches only available API < 28)

adb says device offline. But it's API 29. So maybe this is the problem

i tried with API 27, it's still the same. Screen remains black
emulator: WARNING: System image is writable
Failed to open /qemu.conf, err: 2
Windows Hypervisor Platform accelerator is operational```

https://stackoverflow.com/questions/50604060/android-emulator-with-hyper-v

https://stackoverflow.com/questions/25241380/it-seems-too-many-emulator-instances-are-running-on-this-machine-aborting

i tried the solutions, but non worked @alecxs
emulator: WARNING: System image is writable
emulator: WARNING: Your AVD has been configured with an in-guest renderer, but the system image does not support guest rendering.Falling back to 'swiftshader_indirect' mode.
emulator: ERROR: VkCommonOperations.cpp:541: Failed to create Vulkan instance.
Failed to open /qemu.conf, err: 2
Windows Hypervisor Platform accelerator is operational