text:
Android browser's desktop mode not really the same as PC desktop
Is there any way to make the Android browser browses in true desktop mode, i.e. viewing the same layout as a desktop computer?
I know in Firefox, I can click on "request desktop site" in the menu, and some similar functions in Chrome.   However, neither of these modes brings me the same experience as I have on a desktop computer.  For example, Gmail has a menu item "filter messages like this", which is missing in "request desktop site" mode, and similarly for many other websites.
I understand the UI differences such as mouse vs. touchscreen.  What I mean is to emulate a desktop screen mode.  For example, a virtual screen size to mimic a desktop monitor (I can swipe the touchscreen to move the viewport, and can even enlarge/shrink the viewport with two-finger gestures).  A touch emulates the mouse's left button click.  No mouse right button is acceptable, since most functions should be able to work by just left click.  (Remember Apple Mac desktop might even go with a one-button mouse).
The problem is, that what they think as "optimized for mobile" might not be what the user thinks/wants, such as the removal of some functions.
I don't need "mobile optimize".  Just the browser to mimic desktop one to the maximum extent, and I want to visit the website in Desktop Mode, as if I connect it from a desktop computer.
Some websites provide a "full site" button to do this.  But why can't I pretend myself as a desktop computer in the first place? How on earth does the server identify the browser as an Android browser, even in the "desktop mode"?
Note that this question may seem a duplicate as Bypassing mobile detectability from the browser. But I do express the problem in a more general/broader perspective.

There are various ways of creating responsive web pages.
The developer can ask the browser to tell whether it is Windows OS, Android, iPhone, or whichever browser it is, etc.
Secondly, most often, responsive design is implemented based on the width available to the browser window. To learn more, you can search the web or try for yourself as I explain below:
In the Firefox browser on PC, go to menu -> Web Developer -> Toggle tools or press Ctrl + Shift + I

Now click on the button on the left of the three dots. You can change the size of the page to see how it looks on browsers of different sizes.

Hope this helps.

to add on to this - chrome has a similar "responsive view" feature, but it also has an option to "show rulers", so you can see exactly where each browser width breakpoint will be hit

Try Firefox for Android with a User Agent spoofing addon.
You may also need some addon to lie about the viewport dimensions.
I don't know what exactly the best option to do so is, so I hope these links help point you in the right direction.

https://www.google.com/search?q=firefox+android+fake+device+width
https://addons.mozilla.org/en-GB/android/addon/uaswitcher/
https://addons.mozilla.org/en-GB/firefox/addon/chameleon-ext/

This is a great idea! You don't need an addon to fake the viewport dimensions, though. That's the main thing that "Request Desktop Site" does.

Ahhh, I see! I had wondered how that 'request' actually worked.

You cannot, unless the site is optimized for mobile by design
Two factors distinguish and also limit mobile website compared to desktop:

Touch screen interface
Smaller display area

What most websites do (cost being the main reason I guess) is to make a site mobile compatible meaning that a site can be viewed on mobile but all functions or navigation as on desktop are not available (as in your example).
To make the controls or navigation of website as on true desktop mode, the site needs to be mobile optimized. Unless this done, you cannot have the same experience as on true desktop mode. This requires Responsive Web Design (which also doesn't guarantee full functionality) ,  and is off topic for this site - you can Google about it and here is some information from sister SE sites

Responsive web design Vs Separate website for Mobile
Optimizing website for
mobile devices

How on earth does the server identify the browser an android browser, even in the "desktop mode"?

User Agent information which is shared by all browsers (barring privacy oriented browsers but if you use such browsers, you may face other issues YMMV)

The best solution I've found, which works for the Gmail filter problem, is using Firefox Beta or Nightly and then setting the devPixelsPerPx setting to 1 as per this SO thread, as well as turning on desktop mode.


text:
Bluetooth media buttons don't work when phone is locked
I have bluetooth headphones (Anker) which include a play/pause button. This button only works when the phone (Nokia 3.1) is unlocked.
How can I enable bluetooth media buttons to work when the screen is locked?

Is this behaviour noticed for a particular app you are using to play music? Maybe that app is getting dozed - try removing that app from battery optimization

How? I can't see per-app stuff in the battery section of the settings

I am on Android 10. You need to locate battery optimization in settings -  similar to this https://www.techrepublic.com/article/how-to-remove-android-apps-from-the-battery-optimization-list/

This is better - https://dontkillmyapp.com/

Also if you are using any battery saving apps, disable or uninstall them

source: Stack Exchange

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

sort: votes


text:
Forcing a minimal font size on Android Chrome without any exceptions
Is it possible to truly, no ifs or buts, force a minimal font size on Android 9, Chrome 78?
Yes, it may break the layout, but that's another problem. I don't even get that far to get Chrome consistently apply text zoom and not to run in certain situations where it refuses to increase the font size.
An example website would be this one: with accessibility options you easily get the font size of the text outside of the beige boxes scaled, but the text inside of the beige boxes simply stays small.

Question is for Chrome ,  my answer of Firefox is not relevant, hence deleted

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


text:
Permanently Enable Wi-Fi On a Smartwatch
I bought a children android smartwatch, MyKi Junior, running Android 4.2, which is intended for the specific purposes of parenting. I found out that it has a wifi chip that is usually used for detection of the watches' position (for safe zone). I was able to access the settings and connect to ADB. Every time I'm enabling the wifi, it gets automatically disabled. As a result, I only see a glimpse of the available networks. I surmised that there is an internal application that automatically turns off the wifi but I cannot figure out which of the many it is.
My question is if there is an ADB command that can enable the wifi permanently or any other way to enable wifi and bypass the automatic disable.

As you don't even tell use the exact device model name of the watch I doubt that anybody will be able to help you.

Good point. I will add this info.


text:
Is it possible to encrypt system partition with custom rom?
I have galaxy s9 and i wanted to have lineageos rom.
So i unlocked bootloader and wiped stock firmware of galaxy s9.And then i installed lineageos 15.1 with twrp 3.2.3-0
Then i encrypted phone. I was thinking that by encryption device in adition to data patition, system partion also being encrypted. now i found that just data partition will encrypt and system partition will not encrypt.
so is there any way to protect system partition? in other words is there any way to encrypt system partition?
sorry  for poor english...
thanks
UPDATE :
sorry, It is possible that i am wrong or i don't understand what you mean but
I found from link below Boot verification occures when stock rom is installed and and bootloader is locked. but in my case bootloader is unlocked and therefore verifying not occures.
So i think there is no official way to check integrity of system partition and i should do another things like start a daemon in init.rc for verifying system partition or etc.
Is it true ?
And i should say i put an third-party app in system/app in twrp after mounting system partition and after restart it worked successfully.
Android boot flow

The purpose of encryption is to prevent "private" data from being accessed by unauthorised entities. Anything outside the data partition is public information so it is not a  sensible thing to do to encrypt the whole ROM. Know that encryption doesn't ensure that integrity of the data would remain protected.  If your primary purpose is to ensure integrity of your ROM, see https://source.android.com/security/verifiedboot

... and /system, /vendor, /odm, /product are read-only partitions protected by dm-verity - a very robust in-kernel framework - to avoid any changes to core OS.

Nearly duplicate of If /system partition is never encrypted (even in "full-disk" encryption), how is it protected?

Boot verification (VB or AVB) is a long chain of trust; locked bootloader and dm-verity are part of it. You can't retain it fully on rooted devices but most of the times dm-verity can be retained to make sure some malware cannot harm your OS. It's also a requirement for OTA updates to work (usually on stock ROMs). Bind mounts (Magisk modules) can then be used to system-less-ly modify /system. However as you mentioned you have modified /system partition, dm-verity is for sure disabled.

Android does not encrypt system partition as there is no confidential data on the /system. There are only standard ROM files which are already available in public domain.
The encryption should only apply to the userdata partition /data or SD Card (if mounted as internal storage). Moreover /system is mounted as read-only. So, nothing can be tampered there.


text:
Firefox add-on is shown beside search box on desktop, but where is it on Android?
I installed Search by Image Firefox add-on. But I can't see the extension button that we see next to search box on desktop version.
Where do I find it?

In case someone is looking for developing add-ons for firefox on Android see this https://webapps.stackexchange.com/a/137578/199004

Firefox add-ons for Android by default do not appear next to the search box, unless the add-on has an option to show it there.
You need to tap the 3 dot (⋮) menu to reveal them. They could be separately listed as with this example or shown under the add-ons (blue circle with arrow)
.

(Click to enlarge)


text:
Undo Factory Reset on oneplus
My Kid has been playing with my phone while it was on lock screen, my kid did not have the access code but somehow don't ask my how he somehow managed to factory reset my onePlus 6T.
I googled and found a few commercial programs all promising to solve the issue I tried one gihasoft, but when I try to connect my oneplus to my macbook it fails with "ftp or mtp must be enabled", and I cant find those settings.
Is there anything I can do to restore my device? I'm also quite shocked to learn that it can be factory reset that easy.

It the software accesses the device via MTP then it is most likely useless as you can't recover anything via MTP (unless there is an exploit that allows you to gain root access via MTP which was the case for a few older Samsung devices with a very specific software version).

The 6T is encrypted by default, so a factory reset also resets the encryption key. Your files are not going to be recoverable even if you had direct read/write access to the storage chip.

it is a security feature to wipe your data automatically after x attempts of wrong screenlock pattern. besides this you should keep away radio emmissions from childs brain. forget the commercial programs, encrypted files are lost forever (without the key) https://android.stackexchange.com/a/214496/218526

Many Android phones can be booted into a recovery mode and factory reset from there. In the case of the 6T you power it off then hold down volume up at the same time as pressing the power button. That boots it into recovery mode, and from there the phone can be reset by selecting the appropriate option. Your child must have managed this without meaning to.
There isn't any way of retrieving the data from the phone. OnePlus or the FBI might be able to do it but there's no way for you or I to do it. However if you go back through the setup and choose the option to restore your data from Google you will get back anything that has been backed up to the cloud.
Reading the data from a factory reset phone would be a serious security flaw. It would mean anyone who stole your phone could reset it to wipe your phone lock then read your data off the phone.


text:
Keep playlist always in shuffle
I am using the default android music player and I tend to always play playlists in shuffle mode. I find it unintuitive though that I cannot set a playlist to play in shuffle by default, I need to manually select shuffle each time. Is there a setting that I have overlooked or otherwise how can I do this? Happy to use another music player but I have tried many of the popular ones and they appear to have the same issue.

Going by the name, this may work https://play.google.com/store/apps/details?id=com.HIGStudio.REALShufflePlayer

Tried this out but it doesn't have anything different to the default music player. Yes it is random but you still can't set it per playlist. Kept crashing on me as well

I found one solution to this, will leave this in case someone has a better one. Basically by adding the full music widget to the homepage you can easily toggle the global shuffle setting and play a playlist from the same place. This doesn't let you set it per playlist but since you don't need to keep pressing shuffle each time you play it works similarly. Closest I have found so far.


text:
Call settings will pop-up when I open a pdf
So dear clever IT friends here is the thing. I am helping a nice old grandma. She has a Huawei tablet, android in it. The silly device asked when she opened a pdf file "which program would you like to use to open it". She is a nice 80 years old granny and thought she has to go with settings. So she went for it. Now when you try open any pdf file the "call settings will" pop-up instead the pdf file itself.
Any idea how I can find the path to add adobe to pdf files?

Easier solution:
Hi, the easiest solution is to uninstall and re-install the PDF viewer app from that tablet. Android starts prompting how to open that file as soon as it notices that there are new apps which can handle that file type.
Since you mentioned Adobe Reader, please uninstall it and then install it again from the Play Store. The prompt to select which app to open the PDF with will return. There you can set Adobe as the default to avoid problems in the future.
Appropriate solution:
I am keeping this as a second choice because the Android version is unknown and different OEMs can have a slightly different settings page and slightly different names for each setting item. Still, here we go:

Open Settings app.
Open Apps and Notifications (Or Apps, or something similar which conveys the same meaning).
Tap on All Apps (Can also be See all apps or not exist at all, just choose the option which takes you to the full list of apps)
Scroll down and locate the Settings app. Tap on it.
Scroll and select Advanced > Open by Default.
Finally tap on the Clear all defaults button.

This will remove the default handler for PDF files and Android should once again start offering the choice.


text:
Is there a way to change the system date/time settings to a non-Gregorian calendar, e.g. Hijri, Jewish?
Is there a way to change the internal Android system calendar to a completely different one?

No - Individual Apps have to implement and support the different calendars.
Internally the Android System kernel really only knows about UNIX Timestamp. If you change the date/time manually without any network, you'll be changing that value.
It is up to the Android Framework or third party developers to support the various calendars.
From the beginning of Android there has been the Gregorian Calendar class and only with Android 7.0 (Android API 24) and later have additional calendars like Islamic and Chinese been available within the Android Framework. You can see the other calendars available to developers in the Internationalization Base Calendar Class
Regardless, Android developers would have to add in their own code to support different calendars and related issues with the complexity of date/time math.
So sadly you'll have to check each app that you use to see if it has the internationalization capabilities you want.
If you wanted to change the screen lock/status bar/notification shade calendar information, that would probably be a Custom ROM which would expose the Calendar type to use in those fields.


text:
Why is the global mobile data usage higher than the sum over all the applications?
On my Samsung Galaxy Note10+, the mobile data usage shown via the settings is much higher than the sum of the amounts (given below the global one and the graph) over all the applications. Why?
For instance, on 2020-01-01, it shows 10.20 MB, but the individual amounts for the applications are 576 + 386 + 362 + 283 + 65.12 + 53.13 + 44.76 + 34.35 + 24.85 + 21.33 + 16.96 + 13.56 + 10.25 + 9.48 + 9.45 + 8.91 + 5.41 + 3.54 in KB and 878 + 311 + 179 in B, which gives only about 1.9 MB.
EDIT: This seems to be a bug since after sending a big mail (several hundreds of KB) with K-9 Mail, the global data usage increased as expected, but the data usage corresponding to K-9 Mail is still 179 bytes only!

Aside, I stopped using K9 - use FairEmail, which is far superior in every way and actively maintained

Many Samsung S10/Note10 users are affected by this issue as this can be seen in this thread. So, this is a bug, and there's nothing one can do, except waiting.


text:
Is it legal to invite a friend to my Google family
I would like to invite a friend to my Google family cause there is a song or two she would like to listen to and I am thinking about buying a few movies on that Google account too so I am wondering if I can do that legally without getting into trouble with the law

Oh, and I forgot to mention I bought the two songs with Google play rewards credits


text:
Understanding Secure Enclave (or equivalent) - Samsung S8+ SM-955F
I'm trying to understand the limits of the Secure Enclave (or equivalent, I'm not certain what its called) on the Samsung S8+
Specifically, does the secure enclave include any features related to time between attempts to access it?
I am asking as my partner has forgotten their pattern lock and is desperate to get certain data on her phone, and the timeout is now up to 30 minutes per guess.   I'm wondering if there are practical ways to bypass this timeout, or better yet brute-force or circumvent the password.  (Unfortunately her phone is registered to Google so "Find my Phone" works, but not Samsung, which appears to mean she can't reset the password without a factory reset)

Secure equivalent is iPhone term. It's Knox for Samsung. From "find my phone" you should have an option to reset your password. Not being registered with Samsung should actually make it easier IMO-though I haven't used Samsung phones for long

Also this https://android.stackexchange.com/q/197232/131553

@beeshyams - thank you for these comments - both useful (I had the misapprehension Knox was a "tamper fuse" which blew if you toggled your bootloader or somesuch.)

What you refer to is correct and a part of Knox. Were you able to reset pass word

@beeshyams thank you - no, as of yet my wife has had no luck guessing the passphrase, and I have found no alternative methods with merit (all the software that promises to do this that I have found are - when you ask them specifically - unable to do so!  I suspect they are all variants of the same tool)


text:
How to erase unsued space so that dumping userdata partition creates a sparse file of small size?
When I create a gzip image of userdata partition (/dev/block/mmcblk0p29) it creates huge 6.8GB image, previously it was 350MB.
Is it possible through command-line to erase or wipe or delete space on userdata partition? I want to keep small compact compressed gzip or shadow images of clean unrooted and rooted partition on various dates and times.
I tried the following commands but nothing worked for me:

fastboot erase userdata
rm -r /data/*.*
rm -r /sdcard/*.*

Still image is 6.8GB.

dd if=/dev/zero if=/dev/block/platform/7824900.sdhci/by-name/userdata bs=8192
dd if=/dev/urandom of=/dev/block/platform/7824900.sdhci/by-name/userdata bs=8192

/dev/zero and /dev/urandom not found in device.

newfs
iShredder 3 app
Secure Eraser app
Andro Shredder or Disk Sanitizer

But how will I format in unrooted while working in the Android userdata partition?

Any adb shell command to clear, format or zero fill

This is a Q&A site, not a troubleshooting forum. Comments are not for extended discussion; this conversation has been moved to chat. To the asker: please [edit] the question according to the comment feedback to focus on a single, answerable issue.

@IrfanLatif kindly post the comments in chat as answer so i can vote and accept it  as this question you edited and explained and gave me answers for trim and zero fill and e2image that all worked a greatful thanks to you for all your  efforts and precious advice

I guess your real purpose of this question is not what the headline suggests - secure erase your data - but instead you want to have a full backup of userdata including /data/media (downvote if I am wrong).
You have some options, most require additional binaries which you can copy to /cache partition or permanently integrate into your twrp /sbin:

e2image (thx @IrfanLatif)
make twrp backup of /data to internal storage and just adb pull -a /sdcard afterwards, which you can zip without worry about file permissions
just create tar.gz instead of img.gz with gnu tar (with --selinux --xattrs -p flags)
create empty disk image and copy all (mke2fs + busybox cp -ac) then compress img with gz (requires much disk space and underlying non-fat32 file system type)
permanent tweak for twrp

(I will improve this answer when I have time)

yes purpose is image backup userdata partition problem  its creating image including empty space deleted data  i want clear it first  ... e2image is  not found in system/bin kindly tell way to install in android.....twrp backup tried  but  dont copy media and all other files.........tar.gz with --selinux flag works in android 7 and i am using  android lolipop 5.1.1 ......empty disk image and copy all (mke2fs + busybox cp -acv) then compress img with gz takes too much time .. and its recompressing is a lengthy procedure..... tweaking twrp i havent tried yet will try to see it...

i am pretty sure the gnu tar binary i have compiled is backwards compatible - if not, download for your platform open_gapps.zip

i founded a command for  trimming the  device partition  directly  after unmounting it   is it  a safe  a command  e2fsck -E discard /dev/block/mmcblk0p29 (userdata partition block)


text:
HDR option grayed out on Samsung A50 camera

I can not turn on HDR. It is grayed out. I tried all modes front and rear camera and it is always Grayed out and I cant turn It on. I am using a Samsung Galaxy A50 that I recently bought and Samsung live chat support was not helpful. I am on the latest software.

According to a forum entry HDR only works with an aspect ratio other than 3:4 and a resolution below 25MP.

As @Robert said in the above comment, I have switched from 3:4H (25 megapixels) to 3:4. And HDR now works.

I had the same problem when I was in the photo mode of the camera. After I switched to video mode and then went to the setting, then I could toggle the auto HDR.


text:
Open Google Docs in Browser
I'm using Samsung Dex on a Note 9 and would like to open Google Docs in Chrome (or any other browser) instead of the Google Docs app.
Otherwise I can't use certain plug-ins like reference managers.
I tried uninstalling docs, tried different browsers, tried to change the default action for Google docs links and tried to activate the desktop mode where possible but I still couldn't access the desktop mode of Google Docs that I would see on Windows. I'd be grateful for any help.

You can use this for most Google apps not just Google Docs

Install Firefox
Install Google Shortcut add-on. Tap the 3 dots (⋮) menu to reveal the side bar →Add-ons→Google Shortcut. Tap to open →options. From the left pane tap Google Docs and it will appear on the right pane.

(Click to enlarge screen shots )

Open a new tab and from 3 dots menu locate App Launcher (see screen shot).

Tap on App Launcher to reveal Google Docs icon. Tap on that to see your docs and open them!

Thanks for the detailed answer. I could get Google Docs to work on Dex that way, the only problem is that the UI is very large on Dex.

Dex is the desktop environment for Samsung phones for working with an external display. I'm trying to scale the GUI, not the font. Anyway, I found out that I can also launch Google Docs in the browser if I use Chrome (not any other browser) in desktop mode. The GUI looks fine there.


text:
How to make Gcam work on POCO F1
I have tried many different APK's available online on my POCO F1, but none seems working fine. Can someone provide me the best GCam links for POCO F1?

The best resource for all Gcam links for POCO F1 is available under XDA forums which are listed under https://www.celsoazevedo.com
Please make sure you read and follow the instructions properly before downloading and installing it on your android device.
When you choose the APK to download, make sure your Android OS version is compatible with the APK version to be installed.


text:
Android Verified Boot and generation of vbmeta image
I'm in the process of unofficial device bring up, and I'm stuck unable to progress due to Android Verified Boot.
As per specification, Android Verified Boot can be disabled with the --disable-verity and --disable-verification flags. The device I'm working with does not conform to specifications and hence is unable to disable Android Verified Boot. One of the solutions is to build a vbmeta image myself which will then be used to verify my custom generated boot image.
The question at hand is how to properly generate such an image. The documentation on the topic is exceedingly scarce and looking up similar community-made files with a hex editor yields little in terms of information for me. As mentioned here, I should be able to generate one with the avbtool, which I did, very likely wrongly, as it still refuses to even flash it via fastboot. The only way I've found of allowing such a thing is to flash a blank vbmeta image, which in terms fails to verify the kernel and fails.

from my understanding the flags you mentioned are only used during fastboot to allow flash modified partition, not for disable
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.bin
github.com

In this page there is a section called 'Disabling verified boot' that mentions a commands to create an empty vbmeta.img that can be used to disable verified boot : https://wiki.postmarketos.org/wiki/Android_Verified_Boot_(AVB)
That command is,
$ avbtool make_vbmeta_image --flags 2 --padding_size 4096 --output vbmeta_disabled.img

To ensure this, I searched for 'make_vbmeta_image' in AOSP repositories and found a similar command in here.
I have an Android Q AOSP source tree with me. So I used avbtool from it to create an empty vbmeta image by issuing following commands.
$ cd <aosp_root_dir>
$ ./external/avb/avbtool make_vbmeta_image --flag 2 --padding_size 4096 --output ./vbmeta_disabled.img
$ ls -l ./vbmeta_disabled.img

As instructed here, to flash vbmeta image you can first boot your device to fastboot mode, unlock device's bootloader, and use following command.
$ fastboot --disable-verification flash vbmeta vbmeta_disabled.img

Accepted as correct answer as it answers the main question "How to generate vbmeta image". The secondary question of my device not implementing the disable flags still remains but I guess I'll open a new question for it specifically. Thanks

Is this img device platform related? what if I use  other one created img, without build aosp myself.

@yurenchen afaik it doesn't matter but it may differ on device model

@alecxs thanks, I use the  avbtool.py (choice tool version according to device android version),
it works well.
https://android.googlesource.com/platform/external/avb/+/master/avbtool.py


text:
Why is the Verizon Cloud app generating Instabug text files in my File Manager Documents folder every time I start up my phone?
I am getting a lot of text files in my File Manager's Documents folder. I used the Properties option on the file to see that it is an Instabug file. The path shows VCast.
After searching for various terms, I discovered that VCast is from Verizon, which is my carrier. But, I cannot find an App on phone for VCast or any information online about it or why I am getting these text files.

Additional information:
After using the online chat option at Verizon I found out this information:
VChat is used in streaming videos and music. I use the Hoopla app to play TV shows. It seems like these text files are generated when I play a TV show.
The Verizon rep I chatted with suggested to scan with an antivirus app. I already use one. I tried another. That didn't work.

Additional information:
There were two more text files in my Documents folder this morning. So, this is not resolved. I didn't run any videos or play any music last night or this morning. The text file's date and time were for last night when I had my phone on briefly and for today with the time I started up my phone.

Well, it appears that the culprit app is the VERIZON CLOUD APP.
I went to the Instabug website. I was thinking of actually sending them a message because the path shows their software name. But, I found this article. It appears that Verizon uses Instabug, and the person interviewed for the article is Mohammad Hariri, DMTS for Verizon’s Communications and Cloud division. So, I thought I would try disabling the Verizon Cloud and and IT WORKED!!! I have turned my phone on and off three times. I don't get the text files!
https://instabug.com/customers/verizon
So, now the question is: How can someone in charge of that Verizon Cloud app look at this issue?
Extra: I reinstalled the Verizon Cloud and instantly got a text message in that Documents folder.


text:
Packet forwarding between USB Tethering and Wifi on Android
I have Toshiba notebook with embedded wifi adapter 2.4Ghz, desktop without embedded wifi adapter and Samsung Galaxy smartphone with Mobile HotSpot feature also on 2.4Ghz. Smartphone is connected to Internet through mobile operator. I need provide internet access for notebook and desktop through smartphone and combine them in network, so I will be able to ping notebook from desktop and vice versa.
I have bought TP-Link Archer T1U usb wifi adapter for my desktop and found that it supports only 5Ghz bandwidth. Yeah.. shit happens. But also I have old rooted Samsung Galaxy SM-T211 tablet with USB Tethering feature. So I   switch on Mobile HotSpot on smartphone and connect notebook to smartphone through wifi. Then I connect tablet to smartphone also through wifi. Finally I switch on USB Tethering feature on tablet and connect desktop to it through usb cable. Network schema is shown below.

All devices have internet access. Seems good, except I can't ping desktop(192.168.42.56) from notebook(192.168.43.24).
Forgot to mention, I use ArchLinux on both desktop and notebook.

There's is a similar question and I was thinking about answering that for quite some time. It's good that you have come up with a well explained solution. I suggest you move the answer part from this question to an answer to that question, and leave only the question part here (it's a Q/A site).

yeah, it has sense. What if I divide Q and A parts here and post link to this question in thread you mentioned?

duplicate questions are discouraged and highly likely to be closed. So better answer to previously existing question.

@Irfan Latif, ok, thanks

I have found the solution.
First, I add routing for 192.168.52.0/24 net via 192.168.53.224(tablet) on notebook:
$ sudo ip route add 192.168.42.0/24 via 192.168.43.224 dev wlp5s0

Second, flush all the chains in ip table on tablet through Android Terminal Emulator. Tablet is rooted, so it is not a big problem:
$ su
# iptables -F

That is all. Now notebook can ping desktop and vice versa.


text:
Access HCI bluetooth log from Samsung s8
I have enabled the developer setting "Enable Bluetooth HCI snoop log", toggled the Bluetooth setting and restarted the phone. I have not being able to find the log files anywhere and was wondering how to access them.

Usually it should be created here: /sdcard/btsnoop_hci.log.


text:
How to reset the USB Mode selection after accidentally selecting 'Always' instead of 'Just Once'?
I have an LG-H700. When I plug it in to a computer it typically would should a pop-up asking which type of USB connection mode I want to use. This pop-up would have two buttons "Always" and "Just Once" along with a list of modes including charging and MTP. But not including anything like "Always Ask".
I accidentally clicked on the always button once and now I can't figure out how to get it to reset back to asking every time the device is plugged in.
How do I clear the default USB mode setting so that it will ask each time the device is plugged in?'

Usually there is an option in the Android Developer settings for changing the default USB mode.

@Robert There is Select USB Configuration in there. When I click it I get a pop-up with all of the various types and a cancel button. But there is no setting for "always ask" or anything like that. And when I change this setting it seems to be only temporary until the device is unplugged / re-plugged. The entry in the notification bar on the other hand does save if I choose always again. Though I trying to get it back to asking every time.

Try revoking USB authorization and then connect again. Maybe you get that option back

@beeshyams gave it a shot clearing the authorizations and then reconnecting but still it won't show the dialog on plug in any more.


text:
there is an internal problem with your device
When I install my custom kernel i got this message after reboot.
The phone working normal no kernel panic or etc.
system/build.prop
vendor/build.prop

https://github.com/LineageOS/android_vendor_lineage/commit/27180809c594cf6beeaeb206cced6fa42c086517 apparently that commit fixes it I have the same issue on a phone I made a kernel for, which I don't own.  Will know sometime tomorrow if it works.


text:
Double letters when using keyboard via OTG cable
I want to figure out where the problem is. Unfortunately, didn't find enough information to solve this. Android 6.0.

It seems that restarting Tab solved the issue.


text:
I'm on a WhatsApp call and the person can hear my audio from YouTube etc
I'm using earphones and the person can hear my YouTube videos etc playing. Even blocked out the microphone. It seems the audio is being routed through the call. Any suggestions to stop this from happening?

Try blocking "permit drawing over other apps" in YT permissions !


text:
How does Backup to Google Drive work?
What apps and apps data is backed up? Some apps may use large amounts of storage, how does android decide what to backup?


text:
How to move 7GB ext4 partition on external SD card to 30GB partition on another SD card?
I had rooted my Android Lollipop 5.1.1  phone and installed Link2SD and linked installed apps on ext4 7GB 2nd partition of external SD card of 16GB size . The apps installed occupied 6.5GB space and I am getting low space now. I got 64GB external SD card and want to dedicate 30GB.
I created image of 7GB 2nd partition of external SD card through following command:
dd bs=4k count= if=/dev/block/mmcblk1p2 | gzip -5 -c > /storage/sdcard1/sdcard2root.img.gz

Now whats the way to clone this image to a 30GB partition?

note that (gzip) compression only works on /dev/block/dm-0 (but not actually on /dev/block/mmcblk0p30) because of encryption

It's easy to achieve on a Linux PC:

Attach both SD cards to PC.
Dump 2nd partition from old SD card to new one. It's also possible directly from Android device. See Creating Partition Dump.
Resize filesystem size to 30GB (the new partition size) using resize2fs.

COPY WHOLE FILESYSTEM:
The above approach works on Android too if you are able to attach new SD card through USB OTG SD card reader, while the old one is inside phone.
Or you can do it in 2 steps, as you are already trying:

Create partition dump:
~# gzip -9ck /dev/block/mmcblk1p2 >/storage/sdcard1/sdcard2root.img.gz

You can use dd or cat or even cp. Make sure you have enough space on primary external (physically internal) storage to save dumped (and optionally compressed) image of SD card's 2nd partition.
Compression is useful only with sparseness. To avoid copying freed filesystem blocks (of deleted files) use e2image -rap. Or discard logical to physical block mapping using fstrim (on mounted filesystem) or e2fsck -E discard, and drop page cache using sync; echo -n 1 >/proc/sys/vm/drop_caches.
Insert new SD card and do partitioning using parted or gdisk or fdisk.
Write partition image to new SD card:
~# gzip -dck /storage/sdcard1/sdcard2root.img.gz >/dev/block/mmcblk1p2

Maximize filesystem size to partition size:
~# resize2fs /dev/block/mmcblk1p2

COPY FILESYSTEM CONTENTS:
Another method is to only copy/move filesystem contents (files, directories etc.) and not the whole filesystem structure. But files' metadata needs to be preserved, or things may break (since the partition is to be mounted inside /data). It includes timestamps, permission mode, owner, group and extended attributes, particularly SELinux contexts. Some executable binaries (in /system) might also have file capabilities set (saved as extended attributes) but that's usually not required for user data. Other metadata like ACLs (also saved as extended attributes) and file attributes (inode flags) are not generally used on Android devices.
On Linux tools like rsync (or even cp) can preserve the required metadata. For reference see this and this answer. On Android (to move the contents in 2 steps) tar is a good choice:
~$ cd /path/to/old_sdcard/mountpoint/
~$ tar --create --preserve-permissions --selinux --verbose --gzip --file=/storage/sdcard1/sdcard2root.tar.gz .

Insert new SD card, do partitioning (if required), and create filesystem using mkfs.ext4 (by default it takes whole partition). To restore backup:
~$ cd /path/to/new_sdcard/mountpoint/
~$ tar --extract --preserve-permissions --selinux --verbose --gunzip --file=/storage/sdcard1/sdcard2root.tar.gz

thanx for answering  i will  try it  and let you know i have windows  so i cant try  linx option but will try  e2image or dd commands thanx a lot again

Android tar binary doesn’t have selinux option. So is busybox.

@KhurshidAlam https://forum.xda-developers.com/t/exe-static-linux-binaries-for-arm-android-cryptsetup-encfs-f2fs-tools-testdisk-photorec.3709380/page-8#post-79825447

@IrfanLatif Thanks. But how do you install those ? Adb push /system/bin ? Wouldn’t it overwrite existing  ?


text:
How to create and use multiple partitions on external SD card with different filesystems (Ext4, exFAT, NTFS)?
I want to create 4 partitions on external MicroSDcard through ADB shell commands, not on Windows or Linux. Also want to show all partitions in Android GUI (SETTINGS > STORAGE > SDCARD)  and make them usable for all apps and file explorers.

Dedicated first partition exFAT or NTFS  or FAT32 (whichever Android permits and gives optimum performance) to store apps, photos and media.
Second partition ext4, dedicated to applications linked through Link2SD. Or I want some applications or auto scripts or tools or commands to set the apps mainfest to always install on SD card.
Third partition ext4 or NTFS or exFAT, dedicated for auto recording random backups or shadow images of partitions for different time, if possible through commands, scripts or apps like Titanium backup or others.
Fourth partition ext4 or NTFS or exFAT, dedicating for Virtual memory
(as we do for pagefile.sys in Windows or Linux swap partition).

If I format 1st partition with ext4, exFAT or NTFS, Android OS doesn't show it in SETTINGS > STORAGE> SDCARD > PARTITIONS and asks to mount or erase the partitions.
Now to limit and specify the questions:

Can SD card have 4 partitions and will Android and SD card support it?
Examples of commands to partition in Android; fdisk or parted or the best one.
Is it necessary in Android that 1st partition should be FAT32? Or can we make it exFAT or NTFS to which Android Apps2SD and others apps can download?
Can we force mount command in some startup boot init file to mount all four partitions?
Will this mounting show the partitions in Settings and device file manager?
Or can we view these partitions through ES File Manager or Solid Explorer or Root Manager and take their backups too?

Please guide me through the safe, secure, best and feasible method and procedure which does not damage the device hardware or SD card.

formatting or partitioning? interactive commands like fdisk or one-liners?

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

A few points on four partitions:

Dedicated first partition exFAT or NTFS or FAT32 (whichever Android permits and gives optimum performance) to store apps, photos and media.

For apps consider Application Class but that's expensive. Others will exert performance penalty more or less. On filesystem selection, the biggest downside with FAT32 is its 4GB maximum file size limit. Also it doesn't have some built-in phenomenon to deal with growing fragmentation which may reduce performance over time. You can find many online resources on pros and cons of FAT32 and exFAT. Also see the MS's official Filesystem Functionality Comparison.

Is it necessary in Android that 1st partition should be FAT32?

Not necessary if your device supports other filesystems. FAT32 is Android's default for secondary external storage (SD cards and USB drives) since the start days. Since SDXC cards (32GB+) come pre-formatted with exFAT (though not a technical limit), many OEMs add exFAT support to their devices. However exFAT was closed-source until recently, so it's not part of stock Android (except some limited addition in Android 9). But now it's very likely to be added to Android's kernel source. See some relevant details in this answer.
So check if your kernel supports exFAT: grep exfat /proc/filesystems. NTFS is still closed-source and doesn't have a stable in-kernel open-source driver. However it's possible to mount exFAT and NTFS using FUSE drivers. In each case vold must support the filesystem.

Or can we make it exFAT or NTFS to which Android Apps2SD and others apps can download?

Irrespective of filesystem, all apps don't have write access to external SD card unless you make some changes to ROM. See details in How to save files to external SD card? and Android's Storage Journey.
There are apps available to move unsupported apps to SD card. Or you can manually (bind) mount a SD card partition (or directory) inside /data. Surely you need ext4 (or f2fs on new devices) for this purpose (to enforce UNIX permissions). But it doesn't necessarily needs to be a partition, you can place a loop file on first partition.
Trying to modify app's manifest (or asking how to do so) can be considered unethical or illegal.
You don't need a dedicated partition to store backups. Instead first partition can be used.
If you want to use whole partition for swap, that doesn't need a filesystem (but mkswap). If you want to create swap file instead (which isn't a bad idea), again you can use first partition for that. However using external SD card for swap is not always a good idea. From zram commit to mainstream kernel:

embedded systems normally are reluctant to use eMMC or SDCard as swap because there is wear-leveling.
  ...
  Although we have real storage as swap, it was a problem, too.  Because it sometime ends up making system very unresponsive caused by slow swap storage performance.

Android supports swap with zram back-end (which creates a compressed block device within RAM) since Android 4.4. Android's OOM killers (old in-kernel lowmemorykiller and new userspace lmkd) do take swap into account. If your kernel supports ZRAM, using external SD card for SWAP is not recommended. It can worsen the performance and will kill the SD card very soon due to increased I/O operations.

If I format 1st partition with ext4, exFAT or NTFS, Android OS doesn't show it in SETTINGS > STORAGE> SDCARD > PARTITIONS and asks to mount or erase the partitions.

It can be due to unsupported filesystem (see explanation above) or multiple partitions (see explanation below). However if a partition is manually mounted with proper permissions, apps are able to read/write files there. You may use sdcardfs or FUSE to emulate the filesystem for fixed permissions. But this way Android framework is unaware of mounted filesystem and Android apps won't be notified of new storage. Neither you can manage the mounted storage from device Settings.

Can SD card have 4 partitions and will Android and SD card support it?

Android kernel by-default supports GPT which can have up to 128 partitions. MBR also supports 4 primary (or more logical) partitions (inside extended partition). Generally there is no technical limit but Android's userspace may mount only first partition, or may not recognize multi-partitioned SD card at all e.g. due to unknown partition type including Linux (0x83). Though vold supports multiple partitions before Android 6 too, you need to define FUSE (sdcard) init services, add entries to fstab, configure storage in framework-res.apk etc. If mounting multiple partitions doesn't work without these changes, you need to mount (additional or all) partitions manually (or rebuild your ROM with modified code).

Will this mounting show the partitions in Settings and device file manager?

No. See explanation above. Not sure what you mean by "device file manager".

Or can we view these partitions through ES File Manager or Solid Explorer or Root Manager and take their backups too?

Yes and no; depends on how, where and with what filesystem permissions you mounted the filesystem. See explanation above. Not sure what you mean by "take their backups too".

Examples of commands to partition in Android; fdisk or parted or the best one.

Partitioning works alike on all OSes. There's a long list of CLI and GUI tools and you'll find hundreds of tutorials online. Assuming that your SD card is enumerated as mmcblk1 and you want to create first partition of 32GB while leaving the rest for second, a one liner on Android can be:
~# sgdisk -Z -n 0:0:+32G -n 0:0:0 -p /dev/block/mmcblk1

See sgdisk manpage for explanation and more options. If needed use partx -uv /dev/block/mmcblk1 to update kernel of partition table changes, or simply reinsert SD card.
After partitioning use mkfs.fat/mkfs.exfat/mkfs.ntfs/mkfs.ext4 to create filesystem. All tools are available for Linux and work on Android as well.

Can we force mount command in some startup boot init file to mount all four partitions?

Yes. Create an init service or init.d script. See details in How to run an executable on boot?

thx for pointing out the swap nonsense!

@IrfanLatif thanks a lot for elaborated and explained answer to each part of question highly obliged with efforts and greatness thanks a lot

just partitioning and formatting from adb shell (needs to be umount)
(for doing this in recovery, delete all strings /data/local and su -c from command list)
adb push parted /data/local/tmp
adb shell chmod 0755 /data/local/tmp/parted
adb shell su -c "export PATH=$PATH:/data/local/tmp"
adb shell su -c "parted /dev/block/mmcblk1 mktable msdos"
adb shell su -c "parted /dev/block/mmcblk1 mkpart primary 1048576B 31914983423B"
adb shell su -c "mke2fs /dev/block/mmcblk1p1 -t ext4"
adb shell su -c "parted /dev/block/mmcblk1 unit B print"

download link for parted

and relatively newer version here: https://forum.xda-developers.com/showpost.php?p=74679798&postcount=1


text:
How to use an external sdcard as internal in Android Lolipop 5.1.1?
I have seen option of making external sd card to internal in android 6 mobile phones but i have  android lolipop  5.1.1 how can i  make it adoptable or get that option is it feasable to get that option i found  some commands  but that command is not found in my /system/bin even after rooting to
sm has-adoptable

sm set -force- adoptable true

/sbin/sh: sm: not found

can i find some sm binary and use it ..i tried but my  phone got problem

You can't. That feature was only introduced with Android 6 and doesn't exist before that.

have you considered installing custom rom (if any)?

Duplicate of android improve internal storage

@irfanlatif not its not duplicate bcoz i want to confirm that in andorid lolipop 5.1.1  is it possible to  use sm command and weather this adaptable feature is with  android 5.11

@alecx i am cureently trying alternative options like link2sd install location or swapping storage before  any  customized rom bcoz  i think its  risky to load custom rom  and dont know whether custom rom is available for my phone or not

@Androidquery if you make a quick web search you'll get hundreds of results discussing Adoptable storage was introduced in Android 6. Storage Manager (sm) is deeply integrated with other parts of Android code. It's not a standalone command, so can't be used independently. That's explained in the accepted answer to linked question.

@Irfanlatif it was not clearly said in any posts that it will not work  so i confirmed it with this post becoz once trying  sm command my  android  had been crashed i have to recover it from images so confirming before trying again ... thanx irfan

Does this answer your question? Partition MicroSD card to exFat and Ext 4 for link2sd?

sm is actually not a binary, it is a shell script for java program which does not exist/work on 5.1-lollipop
# Script to start "sm" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/sm.jar
exec app_process $base/bin com.android.commands.sm.Sm "$@"

to answer the headline
a completely another solution for rooted devices only:
you can mount ext4 disk image (or ext4 partition) with same permissions like /data
(mount script example)
/su/su.d/40sdextimg start-up script with executable permissions
#!/system/bin/sh
until grep -qw /data/sdext2 /proc/mounts
  do
    mount -t ext4 -o loop,rw,nosuid,nodev,noatime /storage/31D1-1308/data.sdext2.img /data/sdext2
    sleep 1
done &

then you can move apps and create symbolic links
(that's what Link2SD does)
mkdir /data/sdext2/com.textra-1
mv /data/app/com.textra-1/base.apk /data/sdext2/com.textra-1/
ln -s /data/sdext2/com.textra-1/base.apk /data/app/com.textra-1/base.apk

or bind mount whole folder
(assuming 2nd partition is mounted /data/sdext2)
mkdir /data/sdext2/media
chmod 0770 /data/sdext2/media
chown 1023.1023 /data/sdext2/media
chcon u:object_r:media_rw_data_file:s0 /data/sdext2/media
mv /data/media/. /data/sdext2/media
mount -o bind /data/sdext2/media /data/media

it's of course easier, moving whole folders is possible with same command. on per-app-selection is what Link2SD provides, for better performance and stability one should avoid moving critical apps to external sd as much as possible. i recommend moving apk only

@alecx will these scripts to start  sm to shell will work on android lolipop 5.1.1  as previously  i  pushed sm and sm.jar file downloaded from a site of different device and tried it   gave java class error  then ABORTED  error crashed the android and i had to recover through  system and other  images...will this  work and not damage the phone or os again.... as irfanlatif commented  that adoptable storgae has been introduced and work on only Android 6.0 and above

@IrfanLatif An even simple approach is to mount SD card 2nd partition (or a loop file from first partition) directly to /data/app (or /data/data or /data/media). No extra steps required. But this should be..... kindly modify the script and tell me detailed  steps to this  simple approach  script

@Androidquery just install Link2SD

@Androidquery as suggested by alecxs go with Link2SD. Setting up manually requires some advanced skills you may not feel comfortable with.

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

create some file on your MicroSD Card with dd + mke2fs (see link) 2. create mount script in '/su/su.d' (see above example '40sdextimg') 3. create empty folder '/data/sdext2' (mount point for Link2SD) 4. reboot and check Link2SD storage info (invite me to some chat if you need more help)


text:
Call barring in Android
Is call barring is a native Android feature? I mean blocking of outgoing calls.
In some Android articles I see the screenshots where call barring is present in settings but in recent Android versions I don't see it.
In what Android release it appeared and since what it became deprecated (or not)?

Edit: Based on OP's clarification in comments and subsequent search - Call Barring refers to both incoming and outgoing calls being blocked whereas Call blocking/Number blocking refers to only incoming calls being blocked.
To answer OP's question

Call barring is not a standard Android OS feature.

Call barring seems to be Samsung OEM specific. See call barring - Samsung community. It also includes roaming calls

Thanks to Andrew's inputs in comments

call barring is usually available on most phones (e.g. OPPO R11
, Huawei P10
, and even on older feature phones), but the service is linked directly to the SIM provider. That's why it also asks for the code before changing the settings.

Section below is retained for reference, just in case this confusion arises again

Number blocking was introduced in Android 7 and it is not depreciated AFAIK. I have been using close to stock devices(Moto, Android One) and found this feature, usually in the SMS & phone apps. I am currently on Android 10 with Oxygen OS which is considered close to stock and this feature is present
Extracts below

The default SMS app, the default phone app, and carrier apps can read from and write to the blocked-number list. The list is not accessible to other apps....
Additionally, carrier app integration through Android means that carriers can read the blocked numbers list on the device and perform service-side blocking for the user in order to stop unwanted calls and texts from reaching the user through any medium, such as a VOIP endpoint or forwarding phones

The article you linked pre-dates Android 7 and mentions specifically that it is not a standard Android feature and goes on to give examples of OEM implementation. See Implementing Block Phone Numbers which says

Before N, Android users had to rely on downloaded apps to restrict calls and texts from bothersome phone numbers. Many of those apps either do not work as desired or provide a less-than ideal experience because there are no proper APIs for blocking calls and messages.

However, call barring also allows blocking outgoing calls, as highlighted in my article, whilst standard Android framework you describe doesn't allow this. Am I correct?

If it is OEM implementation of barring, do you probably know which vendor it belongs to? Can you suggest it from screenshots or from your personal experience?

Interesting point you made. I think you are right in most dictionaries barring is defined/highlighted as outgoing call blocking (1, 2) and hence is my question and main point of interest. Incoming blocking is a standard feature and implemented by all vendors, outgoing is not.

AFAIK... call barring is usually available on most phones (e.g. OPPO R11, Huawei P10, Sony Xperia X, and even on older feature phones), but the service is linked directly to the SIM provider. That's why it also asks for the code before changing the settings.

but the service is linked directly to the SIM provider yes, I am aware of carrier's barring, but the question was not about settings menu for enabling carrier barring, but about own independent implementation without subscription for additional carrier services. In my country they are not free

@Suncatcher Sorry I am not aware of how to do that. Thanks for accepting


text:
How to activate 'Do not disturb' when connected to a specific Bluetooth device
I want to benefit from Androids "Do not disturb"-feature while driving. My idea is to activate the "Do not disturb"-feature, when my phone connects to my cars bluetooth. If enabled no notifications would appear which is a huge advantage for me because this results in less distractions while driving.
"Do not disturb"-feature is already configured properly. If manually activated I do not get any distracting notifications. My question is how to automatically activate the feature when a bluetooth connection is established.
I'm using a Oneplus 6 with Android 10. My car does not support Android Auto.
Bonus points for solutions that don't require to install further apps. Unfortunately I think that is not possible right now.

As you guessed, you need an extra app and in this case automation app.
MacroDroid is easy to learn and free up to 5 macros. You need one macro
Trigger
Bluetooth event → Device connected → your car device
Action
Priority mode/Do not disturb → select one of the options -  Allow priority notifications or Block all
Name and save the macro

You would need to manually disable DND mode once you are out of your car BT range or create another macro where the trigger would be BT event → Device disconnected and in the action whatever you wish, likely allow all

You can test this with any BT device like ear phones –


text:
How can I make personal documents on my external SD card visible to the Kindle app?
I have a tablet running Android 9, with the latest version of the Kindle app. (The tablet is a Galaxy Tab A (8.0", 2019), but that shouldn't matter.) It's not rooted.
In the Amazon Kindle app, I've enabled "Download to SD Card" (which causes books I've bought from Amazon to be stored on the external SD card) and "Show Personal Documents in Library".
The latter option makes *.mobi files I've copied into the "Books" folder in "Internal Storage" to be visible in my Kindle library. The path to the folder is /storage/emulated/0/Books.
The external SD card is visible as /storage/0000-0000. Copying *.mobi files into /storage/0000-0000/Books doesn't make them visible to the Kindle app.
Is there a way to copy my own *.mobi file (not purchased from Amazon) to a folder on my external SD card so I can read them with the Kindle app? I'm guessing there's a particular directory path, but a Google search has not revealed what it is.
(I know I can install books by emailing them to myname_blah@kindle.com, but I'm looking for a way to just copy the files to the device.)

@beeshyams No, it's not rooted.

Without root you can't AFAIK. Storage location is configured on Ext. SD but you would need to access the app folder (which is in the folder path above) and you can't do that without root

@beeshyams: If that's the case, then I'd say it's a flaw, or at least a missing feature, in the Kindle app. If it lets me use the Books folder on the internal file system to store and read personal mobi documents, why shouldn't it let me do something similar on an external SD card? With no external SD, Kindle can read books stored either in its own application-specific folder or in the Books folder.

Well there's an alternative using Dropbox https://www.lifewire.com/load-non-amazon-books-kindle-1616647

@beeshyams: It looks like that just lets you copy files from Dropbox to internal storage.

How do you copy the files into the Books folder? Via adb or MTP? If you use adb make sure you can see the file via MTP, if not reboot the device or use an sd-card refresher. because if the file is not visible via MTP it most likely is also invisible to the Kindle app.

@Robert: I use scp under termux. I think I have visibility to everything on the SD card. An ideal answer would be "copy the files to this directory on the SD card. My guess is that the Kindle app just doesn't have that feature.

@KeithThompson If you copy it via SCP the file may be not recognized by the Media Service and therefore invisible to MTP and apps that rely on the file list provided by the Media Service. Therefore you may encounter a similar problem as in this question.

@Robert: I'm not using MTP. I can copy *.mobi files to /storage/emulated/0/Books (on internal storage) and the Kindle app automatically recognizes them. I'm looking for a similar directory on my "external" SD card that the Kindle app will also recognize. Does the Kindle app depend on MTP to find files?

@KeithThompson That you don't use MTP may be the problem! As a Linux user you assume you understand how Android works, but sometimes you would be surprised how different some things like listing files is done on Android. Apps usually don't use the file-system listing but the database provided by the Media Service. Therefore that a file is in the file-system does not necessarily means that an app can see the file! That is why I was asking you to copy a mobi file using MTP instead for a test.

@Robert: I just plugged the tablet into my Windows laptop with a USB cable. The internal and external file systems were visible from Windows. I presume it was using MTP, but I can't confirm that. I was able to copy a .mobi file into the Books directory on the external SD card. It was visible to the file manager on the tablet, but didn't show up in my Kindle library. If I copy another .mobi file into the Books directory on the tablet's internal storage, it does appear in my Kindle library.


text:
Why isn't my internal storage usage going down after adopting an SD card?
I have an Honor 5X running LineageOS, and I'm trying to use an external SD card as adoptable storage. After migrating my data, my internal shared storage usage does not go down. Specifically, "Music & audio" shows up as 6.9 GB on both the internal shared storage and the SD card. There's also an unusual "-6.1GB" under "Other" when I look at the storage usage for the SD card.

I don't know if it's relevant, but the "Music" directory is being watched by Syncthing. Is there something I did wrong in setting this up?

Run df -h on some terminal emulator app to get actual space usage. Related: How disk space is used on Android device? and How to free Internal Storage by moving data to Adoptable Storage?.

The comment from Irfan Latif pointed me in the right direction. My "Music" directory was still on /data/media/0 as well as the adopted mount. I deleted it from /data/media/0, the directory still shows up in /storage/emulated/0, and the usage summary makes sense now. Down to half usage.


text:
How to get Google Photos to recognize External SD drive
I have connected an external SD card via a USB connector to my phone in order to have more space for recording video.  However, Google Photos does not seem to recognize it - it does not show up in Device Folders, and I cannot figure out how to make it show up.
In this support thread from last year it is stated that "if the device is running Android 6.0 and above then the external SD card may be merged into internal memory and in this case it will backup all of your photos including your SD card."  I am running Android 9, and 9 > 6, so this should work.
When I check if the SD card is merged with internal it is marked as "Portable storage," meaning that the SD card is set as external storage.  However, it goes on to say that "you should have received a pop-up notification when the external SD card was detected. The notification gives you 2 options: Eject or Setup."  The notification does not give me the option to "Setup", instead it only gives me the option to "Explore". That brings up some kind of file explorer from which I cannot find any options to merge storage.
It goes in to say that you can "choose which folders on your phone to back up" by "Select Settings > Back up & sync. Touch "Choose folders to back up..." and select the folders you want to back up."  But in the "Back up & sync" part of Google Photos, there is no "Choose folders to back up..."  The closest I can see if "Back up device folders" which takes me to a list of already discovered folders, which does not include the SD card.
How do I get Photos to recognize the external USB drive?

Sorry, you can't do it the way you intend to.

Google photos can back up to Ext.SD, only if the card is treated as internal storage. In your case the SD card is not treated as a part of device memory (portable) .
Adoptable-storage is applicable only if the card is actually mounted on the device and not when connected via USB connector.

See adoptable-storage wiki
for more details.
See Google help which explains how the adaptable storage can be used for this purpose (read also the linked blog of Android pit)

What you can do, is to use apps like Folder Sync or  Auto Sync for Google drive and set up sync to your Ext.SD in a manner that the selected contents of your Drive are backed up on your SD and deleted from GDrive. This can be set up on schedule or on demand

Well I guess I bought the USB adapter for nothing then - namely to save wear and tear on the internet flash... :-(


text:
If I use Type-C OTG usb HUB + micro Type-B adapter from Type-C, will OTG work through that adapter?
If I use Type-C OTG usb HUB + micro Type-B adapter which goes from Type-C, will OTG work through that adapter? I mean, like this + this.

With USB-C OTG has become much simpler as you don't need special OTG hardware anymore. Therefore I don't see a reason why this should not work.

I just edited the 1st link. Now I put link with Type-C HUB. I mean, that I have devices with both B and C type, so I want to be able to use usb C type hub with B compatible devices also and asking if it should work through that adapter. I want hub because I want to be able to charge my device while using mouse with keyboard

Does your phone have an USB-C or Micro-USB port? What I said is for a phone with USB-C port.

I have few devices which are with C and Micro and I want to be able to use both devices with the same HUB.

Please answer my question about the USB port of your phone as it makes a significant difference.

I recently ordered a phone with C Type but I often use OTG cable with tablet which is Micro

There is no general answer, USB-C OTG is totally different from Micro USB OTG. Therefore please ask for one of them but not for both. The solution for the one may work for the other but that is not for sure.

Actually I see no problem of buying two different HUBs for both devices and I don't think that exist a different way. Everywhere I see adapters like https://www.amazon.com/Duttek-Adapter-Converter-Charging-Silver-OTG/dp/B06X9M6T99 or https://www.amazon.co.uk/Female-Adapter-Charging-Converter-Camera-TypeC-Male-Micro/dp/B07BBCS5JT which has included in description that charging and OTG can't be used at the same time, so this is not acceptable for me.


text:
Can OTG HUB charge with connected charger more than 0.5A?
I saw a video somewhere where man says that OTG HUB charges only 0.5A. Is there any superior OTG HUB which can charge more than 0.5A?

Use an active hub with own power supply. The 0.5A come from the fact that a micro USB OTG port only provides this much of power. As power can not be taken from the air the hub is limited to this amount. Using a phone with USB-C port may also an option if the phone supports USB power delivery. AFAIK in this case the hub could ask the phone if it provides more than the 0.5A.

depends on protocol of charged device, not charging device. you can connect external charger https://electronics.stackexchange.com/q/177788

@Robert What do you, mean "Use active hub with own power supply"? I already have USB HUB with power supply but I think it charges 0.5A when power supply is connected, because when connected my tablet to USB HUB, it discharges when screen is on.

The hub only powers the USB client devices connected to the hub, not the tablet (sub master). This is the way defined by the USB spec. Some devices may violate the spec (power also on uplink), but of course they don't advertise this and I am not sure if the tablet would accept the power this way. A powering hub is only defined in the USB-C standard (and this does not work with adapters to micro-usb!).

@Robert So every device that supports USB-PD can be using OTG and be charging simultaneusly at least at 0.5A?

I am not sure, but at least charging via USB PD have to be supported by the phone for that. I don't think that all devices can do so.

It's strange how difficult is to find information about some things. Thank you.

The multifunctional USB OTG Host Hub Adapter Cable is compatible with all tablets and cellphones with OTG function. While it is promoted to OTG mode and charging mode can work simultaneously, in fact this is not possible (except for some listed devices)

Do you mean, I can't charge, even with 0.5A on any device which supports OTG?

If it's only for some devices, can I test my device using Active USB HUB with OTG adapter and data transfer/charging cable connected to tablet? If yes, my device isn't charging in that way, so it isn't supported?

No you can't charge at all (@Robert already stated)

Thank you for stopping of buying potentially useless thing. Do you know any of these lists? I'm not able to find any.


text:
/data/system/packages.xml does not update after install/uninstall of apps. Is that expected?
I am using a android board with a custom ROM based on Android 4.4.2. I was trying to override a /system/priv-app/ app by installing an updated version in normal partition.
While testing I realised that the override only stays till reboot.So I started digging into AOSP source which is when I came across the call to disableSystemPackageLPw which in turn calls writeLPr.
If writeLPr goes through I expect to see my package listed in the "/data/system/packages.xml" file. However that is not the case here and hence I suspect that to be the root cause.
It would be great to know view on expected usage of packages.xml from the community users to confirm the same.

i don't believe this. where does system get old apk from after you replaced?

As @alecxs said that should not happen because the new apk is immediately saved to /data/app on update. Settings might be cached for some time. Try clearing app's data after update. Or force write pm's cached data: dumpsys package write.

@alecxs The old apk is still in /system/priv-app. Based on what I read in PackageManager scan code. It scans the files system for paths /system/priv-app, /system/app, /vendor/app and /data/app for registering installed packages after boot. Since system/priv-app gets scanned first the old apk gets the oackage registered and the apk in /data is treated as duplicate. I get a log saying Skipping duplicate package in logcat  from "PackageManager" tag,

@IrfanLatif I tried out another android board. There I could verify that packages.xml had two entries for my package; one with tag  and another with . On this android board my update is retained after boot as expected. And I also do not see the Skipping Duplicate log. So overall I have come to a conclusion it is ROM specific problem.

i misread question. thought you did overwrite apk in /system/priv-app

the duplicate may caused by different apk signature

@alecxs I was able to get through to the person maintaining the ROM. packages.xml not having that entry was the root cause. Thanks

As per stock android code. (AOSP) packages.xml needs to have the entry for installed packages for retaining any fancy priv-app kind of configuration/overrides/updates that we do.


text:
Compatibility Feasibility Speed and use of High Capacity MicroSd Card for adaptable swapping and linking apps?
I want purchase a new high capacity (64GB or  128GB)  high speed (100Mbps 170Mbps 250 MBps) MicroSdcard for Swapping/Adoptable /linking apps through Link2SD/ portable (adoptable) storage
so i want to confirm compatibility feasibility speed  performance my external sdcard slot/tray/reader/chip/hardware should have according to my device and  Android lolipop 5.1.1 support.
High capacity MicroSd card comes with pre-formatted extfat file system but my mobile  manufacturer technical specification of mobile device says it supports up to 128gb and fat32 file system
There are many  available sdcards Micro
i want to know that type (SDHC SDXC) UHs speed Class (UHSI UHS II) Video Speed Class  (v10 v30 v60 V90)  and App performance class (A10)  Speed of (90 Mbps 100Mbps 170Mbps 250MBps) its confusing which  will  be compatible feasible and best for adaptable swap  and give optimum performance for the purpose.
secondly there is not use of  extra speed or video class card if Device or Android supports works on less speed.
Before purchasing to decide i want to confirm and check my device and understand clarify  following  questions and queries to decide  which card will be compatible for my android lolipop 5.1.1 OS and device:-

Can high capacity exfat be forced  to  used (through mounting
it inboot init)  in android or phone through mount commands
without damaging phone Android os  or SDcards protocols and will all
apps/ os file manager support it if yes then
                              *-kindly tell me commands for it.*

if not then can high capacity card be formatted to Fat32 if yes
then how can i format and will the card give the same performance
speed performance as  in exfat to fat32 without damaging phone
android OS and  SdCard
                                 *-kindly tell me commands for it*

In android Lolipop 5.1.1 file system (ext4) whats the block size
it use  to write or read on external sdcard  is it 512 bytes/ 4096
(4kB) /8096 (8KB) /512Kb /512bytes how to check  or it depends on
which  filesystem the sdcard is formatted with then  what block size
it writes individualy in filesystems  of  fat32, exfat, ntfs and
ext4

kindly tell me command  tools script or apps to check and confirm on
my device

In android lolipop 5.1.1 file system of ext4 APPS and FILES  how
it write means sequentially or randomly
         -kindly tell me command tools script or apps  to check and
          confirm on my device

is there method or any adb shell android Command or script or apps
of hardware info or bench marking apps through which we can check
test to  know  device mobiles external Sdcard *SLOTS/READER/CHIP/HARDWARE** optimum hardware compatibility :-
a) for type of device compatible microSD cards (SDHC / SDXC)
                 *- kindly tell me commands for testing it*

b) Type of  file system supported  or mounted OR FORCED TO BE MOUNTED
  allowed/permitted  on externalsd card and can it be modified or changed
                          *- kindly tell me commands for testing it*

c) maximum Practical capacity supported microSD in the device and can
  it be forcebly be  extended ie. 128gb or  more we can force by
  partitioning the card to multiple partitions or increasing the size
                          *- kindly tell me commands for testing it*

d) UHS speed Class (UHSI UHS II) compatible
                         *- kindly tell me commands for testing it*

e) Video Speed Class  (v10 v30 v60 V90) compatible
                         *- kindly tell me commands for testing it*

f) App performance class (A1) compatible
                         *- kindly tell me commands for testing it*

g) Maximum sequential read speed compatible (90 Mbps 100Mbps 170Mbps
    250MBps)
                         *- kindly tell me commands for testing it*

h) minimum/Maximum sequential write speed compatible
                         *- kindly tell me commands for testing it*

i) minimum/ Maximum random read/write  speed compatible
                              - kindly tell me commands for testing it
for  suggestions  I have pre-tested through androbench app
a)  internal memory of my device through writing 64Mb file  to /data/
   (ext4 partition mounted)  (64Mb file used for testing)
sequential  read 128 MB/s

sequential write 12 MB/s

random read 10.93 Mb/s  2800.4 IOPS (4KB)

random write 3.9 Mb p/s  996.31 IOPS (4KB)

is there any restriction in device or android should we need to match
externalsd speed performance with internal sd  as we have     we can use
external sdcard as internal either by swapping/adoptable /linking  or it
will work in more or less performance to
b) External memory of HP SHDHC Class 10 16GB (still i want to switch over to
high capacity card) of my device through writing 64Mb file  /external_sd/
(fat32  partition mounted)(64 MB File)
sequential  read 35.56 MB/s (printed 95MB/s)

sequential write 8.6 MB/s

random read 4.36 Mb/s  1117.58 IOPS (4KB)

random write 0.53 Mb p/s  136.38 IOPS (4KB)

Hp printed  95MB/s  but result is 35.5MB/s now its  device result,fat32
file system result  or sdcard  performance result don't know how to
differentiate  it .
                    *- kindly tell me commands for testing it*

how to find device external mircro sdcard slot/chip/hardware/reader speed and other  information asked above

Your device is very old, which most likely means that it does not have exfat support.
Compatibility should not be a problem, as every card and reader are usually compatible with each other, as long as SDXC cards are supported by your device.
And for adoptable storage the bulk transfer speed is not that important (as long as you don't record videos or often copy/download large files). I would focus on A1/A2 rating which is designed to measure application usage (randomly reading/writing a number of small files).
I would also focus on reliability because if the sd-card dies all data on your device will be non-accessible/gone.
Anyway in your old device the sd-card will not work very fast. Even in modern devices the sd-card reader is not able to make use of the modern very fast transfer modes.
In general the micro-sd card is way slower (independent what card you use) than the internal flash, because the integrated card reader is slow.

in brief  how can we check test and see  the integrated card reader specification of the devices through any app benchmarking tool or any command

how can we precheck  reliability of Externalsd card. and integrated card reader

@Androidquery SD-card reader capabilities: read the technical specification of the phone and if you don't find there something on the reader you can't (only guess it from the transfer speed you measure). Anyway just assume the worst so you don't get disappointed. Also the reliability can't be really checked. Buy branded product of a brand that also produces flash memory (like e.g. SanDisk, Samsung, ..). And make sure to check if you did not bought a forged product (test the disk using h2testw or a similar tool if it really has the claimed capacity).

robert as a2 feature is available with  UHSII or UHSIII cards integrated reader detect  (on low speed low performance ) or not because they are expensive and if  dosnt get detected even then it will be wastage  on old phones as  some site i readed  that it needs some special voltage of 3.99 thats what i want to know that if purchase some card and later on it didnt detetcted then it will be problem

currently no known UHS-II smartphones or tablets. the Galaxy S10 is UHS-I only. you are fine with any Class 10 SDXC


text:
How to Connect a MIDI Keyboard in Bluestacks android
Is there a way to recognise and use a USB MIDI keyboard (Akai mpk mini) with Bluestacks (Android VM for Windows)?
My Android devices recognise the MIDI keyboard correctly but Bluestacks does not.

I don't have any experience in using a USB MIDI keyboard on Android, but I remember on some Android devices (possibly Android 6.0 Marshmallow and above), the Developer options allow changing the USB configuration to MIDI. Also, could you [edit] and mention what you have tried to let us know and prevent suggesting the same attempts?

In my android phone it works correctly, in bluestacks vm it doesn't...

found a solution yet?

no i havent, but i use my phone and tablet with it


text:
How to change Google Play country without adding payment method
I live in European Union in country where some apps like Cortana and Google assistant are not avaiable. Now I am in Italy, and I will stay for few weeks if that is relevant,  so how can I change my country without adding payment method. I really do not whant to share some data with Google.
So, I deleted cache and data of Google Play and Play Services. And now I am unable to install any app in Play store, because  Google is forcing me to add payment method.

You cannot change your region without adding a payment method from that region.
However, you can simply create a new google account and pick the region you like.
Additionally, if you added a payment method to the same account, you would lose any balance currency you might have in your account. It also takes a few business days to switch completely.
I currently live in the EU on a student visa and I had a similar problem. So I also resorted to making a new account because I frequently need apps from both locales.

Source: Change your Google Play country
Unfortunately, you cannot.
Relevant extracts

To change your country, you need to set up a new country in Google Play. To set up a new country, you must be in that country and have a payment method from the new country.

(Emphasis added)
Now, you have two problems :

By clearing cache and data, you have ensured that you change your country (as explained in the source)
Your stay in Italy is only for few weeks.

You can only change your Play country once per year. So if you change your country, you won’t be able to change it back for 1 year

To sum it up, you have lost your old country information, you have to set
up new country information and if you do that you can revert to your old country after one year
There is no way out from this awkward situation AFAIK... I feel sorry

Completely ridiculous what Google is doing here... Tip: Use a VPN to at least pretend to be in the country you need.


text:
Firefox's "stop loading X" button. Where is similar function in Chrome for Android?
I'm using Firefox newest update and Chrome newest update on my cheap walmart LG phone. For certiain web browsing puposes I find it handy to use the "stop loading X" button on the immediate right hand of the address bar in Firefox.   On my home computer I find that the ESC keyboard button suits my needs for Chrome to stop the page from loading.  How can I perform a similar stop-loading-page in Chrome for Android on my phone?
There are only two links I've found on the web that address this. Both suggest that there ought to be an X icon to the immediate LEFT of the address bar in Chrome that appears while the page is loading that allows one to stop page.  But it is not there, anywhere, on my Chrome page on my phone.
This is very frustrating.  Nor can I find any apps or extensions to add such a function.
Any help here would be highly appreciated!
Thanks, in advance.

You can access this button from Chrome's menu while the page is still loading. When you would tap the three dots line the reload button would change to X button as long as the site loads.


text:
Android large empty storage marked as full (new phone)
So I purchased this brand new X27 Plus with 64Gb storage, the phone shows 63Gb of free space when checking but I keep getting "your storage is full" errors.
When I plug it as MTP on my computer it actually shows the 64Gb disk as used space while it's empty. When I plug it as USB storage, it divides it as a full 1.25Go G: disk and an unreachable H: disk. I tried to access it with "DIR/A h:-s" and get "the device is not ready".
Any ideas of what's going on and how to get this working ?

Isn't it encrypted?

I added the screenshots, sorry I have nearly 0 skill in such field, I can't tell if it's encrypted or not

@Phil your device looks to have 4GB storage, not 64GB. Can you share output of adb shell df -h and adb shell ls /dev/block? Also adb shell blkid if it works.

@Phil troubleshooting fastboot problems is not directly related to your original question. It's better to leave the question on-topic or edit it to reflect your new queries. Asking unrelated questions in a single question is against rules.

I doubt that these screenshots show a X27 Plus device running on Android 9. This looks like some custom ROM running an old (Android 4? - because of the USB storage option which was removed on later versions) version. Adding the strange difference of shown and actual flash memory available I would assume that you bought a forged device.

Do not unlock the bootloader because you will lose warranty.
Check the following command to proof it's a fake X27 plus or install this app
adb shell cat /proc/partitions

Claim the phone to the seller and get your money back

according to your fastboot screenshot it is a mt6572_v1 (old SoC model). phone is fake

Wow thanks, that's exactly my phone, the app reveiled the true specs and I've been refunded, thank you for all your time !


text:
My device has files listed as other in one of my old file explorers but I could not access them they are eating my internal memory
Does anyone know how to get rid of these files they will not show up at all not even to anti-virus software but they are using all internal memory I clear up within minutes

Comments are not for extended discussion; this conversation has been moved to chat.


text:
DNS queries are cached permanently, how to reliably clear DNS cache on Android 7+?
Is there a reliable, reproducible way to clear DNS cache on Android Nougat 7.0?
I know there is at least one other question like this but that one was from 8 years ago and I hope I can ask again and see what people are doing these days.
To explain a bit more my setup:
I am testing a simple web page loading in Chrome browser with Wireshark packet capture to see the DNS requests. I am also running dnsmasq on my LAN and have mapped my webpages name: mymovies to the correct IP address of the machine on my LAN that the web server is on. So http://mymovies should work and it does load.
The DNS lookups initially start with the DHCP server appending the DNS suffix (.home) so in the packet trace I see a DNS request for mymovies.home which fails because I don't have an IP address mapping for that in dnsmasq.conf. So a second DNS lookup for just mymovies appears and is successful.
Mostly I find that subsequent DNS lookups are always just for mymovies and never again for mymovies.home no matter what I try to clear the DNS cache:

I am testing over WiFi with a Moto G5 running Android 7.0 and it is rooted so I can run commands from within adb shell to the OS.
I have tried lots of things like:

Closing down Chrome browser and starting it up again.
chrome://net-internals/#dns to clear host cache and flushing the sockets too
Settings > Apps > Chrome > Storage > Clear Cache
ndc resolver clearnetdns wlan0

The only thing that seemed to work for me was turning the phone off and on again. After restart I opened http://mymovies in Chrome on the phone. The page loaded and in the Wireshark trace I see the first DNS request for mymovies.home which fails as usual followed by a DNS request for mymovies that succeeds. I then closed down that tab and opened a new one and loaded the page again.. I did this twice. Each time now I see a dns request for mymovies only.. it doesn't even try mymovies.home.
I restarted dnsmasq server and the first DNS lookup after that was for mymovies.home followed by a lookup for mymovies. But since then the DNS lookups are now only ever for mymovies. This is despite restarting the dnsmasq server a few times and trying the four so-called DNS cache clearing steps listed above.
But to confuse the matters, I tried the trick of switching into and back out of Airplane Mode. Now when I load my little test web page a few times it doesn't seem to cache at all anymore? Loading the webpage always initially gives a DNS look up for mymovies.home which fails then a lookup for mymovies that succeeds. Even after restarting the phone the DNS lookups have now stopped caching completely and it firstly tries mymovies.home every time!
I think this caching behavior is normal and expected but I'd just like a way to clear that cache so it goes back to trying mymovies.home without me having to restart the phone.
I'm not sure if the IPv6 has anything to do with things? In my router I have specified the IP address of the Raspberry Pi on my LAN that dnsmasq is running on so the router directs DNS requests to it.
I don't want the page to stop caching OR to always cache. I just want to be able to clear the DNS cache in a predictable manner so I can make the DNS request for mymovies.home appear once followed by the expected DNS caching.

HOW DNS QUERY AND CACHING WORKS?

Mostly I find that subsequent DNS lookups are always just for mymovies and never again for mymovies.home

NOTE: Just to make sure, check that .home search domain is set:
~$ dumpsys netd | grep 'search domains:'
        search domains: home

This behavior is due to Negative DNS Caching. The question is not explicitly about Android but more about the understanding of how DNS works. In short:

When you type mymovies in a web browser (assuming that the browser doesn't cache DNS), Android's DNS resolver checks domain <--> IP mapping in local cache (netd) and /etc/hosts. Then it makes a query (for A record) to the IP address of DNS server it received from DHCP (or you set manually), which is dnsmasq in your case. As standard is to append suffix first, so mymovies.home is queried first. See details in How does Android OS do DNS name resolution?
dnsmasq checks static mapping in hosts and dnsmasq.conf file. If no result found, it forwards query to upstream DNS server, whatever configured in dnsmasq.conf or /etc/resolv.conf (or whatever mechanism the system uses) - say 1.1.1.1.
After receiving a successful or failed response, dnsmasq answers the client (Android phone) along with Time To Live (TTL) value.
Neither dnsmasq nor 1.1.1.1 is able to resolve mymovies.home because .home is not a known Top Level Domain Name (TLD) to any authoritative server. So a NXDOMAIN response ("which means that the queried domain name does not exist in the DNS") is returned by root server (or some intermediate recursive caching server). Response includes an SOA record with high TTL (and SOA.MINIMUM field) value - say 5 hours.
dnsmasq caches the NXDOMAIN response with 5 hours expiry and forwards the same to Android.
Android's resolver caches the same for 5 hours, but that time may get doubled in some situations; see some explanation here. Also How long does negative DNS caching typically last?.
Android's resolver makes another query for (A RR of) mymovies, which succeeds at dnsmasq and is returned with a smaller TTL which must be 0 in your case (see option --local-ttl in dnsmasq man).

So Android's resolver will make next query for mymovies.home after 5 hours, and for mymovies after 0 seconds. If you want that mymovies.home should be tried again sooner, define a static mapping, which can possibly be --address=/mymovies.home/ to get NXDOMAIN from dnsmasq with no TTL. Or to have some fun, setup NXDOMAIN Redirection locally.

DNS TROUBLESHOOTING:
I'll suggest you to simplify your setup. You don't necessarily need Wireshark, just use --log-queries option to see how dnsmasq responds to queries. Also once get rid of cache COMPLETELY on Android and DNS server. But note that you may still end up getting a cached response from some recursive non-iterative server, like if your ISP does DNS interception.

I have tried lots of things like:

chrome://net-internals/#dns to clear host cache and flushing the sockets too

Clearing browser's DNS cache doesn't clear OS's system-wide cache (maintained by netd), though both need to be cleared. Better try testing with some native tool (like dig or nslookup) which doesn't rely on system's resolver and doesn't do caching itself. On Termux, for instance:
~$ dig mymovies @<dnsmasq_IP>
;; ->>HEADER<<- opcode: QUERY, status: NOERROR
;; ANSWER SECTION:
mymovies.com.       0   IN  A   192.168.1.124

~$ dig mymovies.home @<dnsmasq_IP>
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN
;; AUTHORITY SECTION:
.           10678   IN  SOA a.root-servers.net. nstld.verisign-grs.com. 2020010901 1800 900 604800 86400

Note NOERROR response and the TTL (0) of positive answer, while NXDOMAIN response, TTL (10678) and SOA.MINIMUM (86400) of negative answer.

Even after restarting the phone the DNS lookups have now stopped caching completely and it firstly tries mymovies.home every time!

However on the very next query (dig mymovies.home @<dnsmasq_IP>), there would be no AUTHORITY SECTION. It's because SOA RR (the source of negative TTL) is not cached (as per RR format): "SOA records are always distributed with a zero TTL to prohibit caching". But dnsmasq is doing negative caching (see option --no-negcache), so this time it's responding with NXDOMAIN from its own cache, but with no TTL.
That's why if you clear cache on Android, it then keeps on querying mymovies as well as mymovies.home because both are not being cached on Android due to zero TTL, unless you restart dnsmasq or 10678 seconds pass. To verify, send SIGUSR1 to dnsmasq and see in log the expiry time against mymovies.home cache entry. However some other DNS servers may behave differently.

CLEARING DNS CACHE:

ndc resolver clearnetdns wlan0

This command clears DNS server, not DNS cache. See How to configure DNS properly?.

Is there a reliable, reproducible way to clear DNS cache on Android Nougat 7.0?

Yes, but not a straightforward command-line method. From the perspective of negative caching, we don't have anything like unbound-control flush_negative on Android. ndc resolver flushnet <network_ID> was removed in Android 7, though flushDnsCache still exists. Neither we can call _resolv_flush_cache_for_net from command-line. Services network_management and netd_listener also don't provide any such method.

However setResolverConfiguration (part of netd service) states: "Flushes the cache as needed (i.e. when the servers ... change)". This can also be called using ndc:

~$ ndc resolver clearnetdns <network_ID>
~$ ndc resolver setnetdns <network_ID> home <dmsmasq_IP>
```
* network_ID can be obtained using dumpsys netd | grep Default
So the cache should be cleared with DNS server reset. Additionally sending broadcast android.intent.action.CLEAR_DNS_CACHE (flushVmDnsCache) might also be required to clear DVM's cache (or kill the apps). A simple explanation can be found here.
But I'm not sure if this method works on all Android releases.

Turning Wi-Fi OFF and ON (or Airplane Mode) must work as network_ID is destroyed and a new one is created.
Or restart the networking / caching daemon (netd). This also restarts dependent services (including zygote), so causes a soft reboot and kills all running apps:

~# setprop ctl.restart netd
```

There's also a hack to bypass / disable DNS caching entirely using environment variable ANDROID_DNS_MODE=local. But it also disables search domains (.home suffix in your case).

Let us continue this discussion in chat.

great explanation. unfortunately I don't have root access. and don't want to as the applications (like banking apps) refuse to work on rooted phones and I don't want 2 devices just because android is rude. anyway: restarting, airplane mode switching networks: my local dns server is listed but don't get a request - frustrating. i begin to hate dns caching especially because there is no easy way for the user to bypass the cache (at least for next request).

Why do you need a rooted device? // Cache not cleared even after reboot doesn't make much sense. Might be a case of encrypted DNS.


text:
Stop Google Maps from loading location photos/thumbnails
Google Maps automatically shows photos when searching for places, but this uses a lot of data on mobile networks. Is there any way to block the loading of images?

You have to completely disable location features on the Camera else wise it shows the same.
There is nothing like separate Settings for disabling this thing in Google Maps.