text:
How reliable are waterproof phones?
I want to have a waterproof phone that I can realiably wear when I am windsurfing.
During a session it might get wet and might sink for a few centimeters for a couple of seconds from time to time.
I bought a refurbished Huawei P20 Pro for the purpose, IP67 waterproof.
I had watched videos on Youtube where it would be under 1.5 meters water for 15 minutes and still be working fine.
After a short session on the water with this phone, where it got wet but never sunk, the next day the phone was dead forever with water damage.
I imagined that, being refurbished, it might have been hacked by the previous owner.
I got my money back and bought the same phone again, also refurbished.
This one was really new, in the box with all the gadgets.
I took it on a session, this time in a cheap "waterproof" pocket.
At the end of the session, there was some moist in the pocket.
Next day the phone was dead forever. Again.
Was this hacked too? I don't think so.
I got my money back and bought a refurbished Samsung S9, which is waterproof IP68.
Now. I am not going to bring it with me on the water until I am sure it will survive.
I could buy a IP68 protection for it but wouldn't it be overkill and actually nonsense (IP68 + IP68 = IP68) and maybe still let water in?
Are these videos on Youtube realistic?
Maybe 10 minutes after the video the phone becomes useless.
Are the IP67 and IP68 certifications reliable for general public phones?
I am sure they are when it concerns professional equipment.
Thanks for your thoughts

Note that all water-resistant/waterproof specifications are for as far as I defined know tap water only. Salty sea water or chlorined pool water is never considered as "water" in the IPxy specifications (because of the additional damage caused by salt/chlorine).

@Robert good point. My sessions are in freshwate but  I should buy a waterproof pocket anyway.

buy a cheap rugged phone

I have a fair amount of experience using and testing IP68 waterpoof phones.  Here are my experiences.
I personally have had quite a bit of success with them in several different types of environments.  When getting a new one, here's what I do before I put any data on it:

I charge it up and turn it on.  I make sure it works before testing.
I set the display to go off after 5 minutes.  I set an alarm with both sound and the buzzer to go on in 10 minutes.  This will ensure the speaker and buzzer work underwater, and will also provide a little agitation.
With the device turned on, I place it in a tall glass of fresh water for 30 minutes.  I want the glass to be tall to increase the water pressure.  A flower vase works well.  The device's display will shut off after 5 minutes, as expected.
With the device still wet, I turn it back on, and test it.  The speakers may temporarily sound horrible; I find this to be normal on some models.
Now, I place it under a water faucet turned up to a flow rate in which I would wash my hands.  I wash it under that pressure at all angles for several minutes and at various non-extreme temperatures.
Repeat step 4.
I let it sit overnight.
Repeat step 4.
I place it in the bottom of a tub as deep as I can, but within the manufacturer's specifications.  I try to agitate it as much as reasonably possible, often using a long stick or with a long piece of string or dental floss attached.  Then I let it sit in the water up to the duration specified by the manufacturer.
Repeat step 4.
I dry it with a cloth and vigorously shake it to remove some of the water within ports.
Repeat step 4.

I have yet to test a device that hasn't survived these basic tests.
At this point, I repeat the above steps with the type and temperature of water to which it will be exposed during real-world use.  I do this knowing that it may invalidate a weak warranty by a manufacturer that does not have confidence in their products.
I have only found a few minor downsides to waterproof devices:

Often, after being wet, the speakers sound really bad.  I typically have to wait for them to dry completely.  If I need good quality audio before then, I'll play loud music to use the air pressure created by the sound waves to help extricate the water.
Charging and data transfer are often risky/impossible until the device is completely dry.  Depending on environmental factors, this may take anywhere from 30 minutes to 12+ hours.  I've learned not to plug it in for as long as possible after being wet, to reduce fire risk or shorting a circuit.  When I do finally plug it in, I keep an eye on it, and I don't let it charge unless someone can supervise it (and therefore cannot be asleep).  I've learned to not attempt any data transfer via cable for at least a day, if I can wait.
Any ports are the hardest thing to get dry.  I haven't tried them yet, but I'm researching buying some little rubber port covers to hopefully help with this issue.  I am concerned that they will all fall out and get lost on the fist use.
It's often hard to find waterproof phones with easily replaceable batteries and microSD slots.
Repairs can be harder to perform yourself or more expensive for a technician to perform.

I have spoken to repair shops who state that they get waterproof devices that weren't nearly as waterproof as the manufacturer claimed.  Because of this warning, I tend not to intentionally push the limits of the waterproofness once the device has data on it.  Remember that increasing water pressure due to turbulence is similar to increasing water pressure due to depth.
If I'm going to be in extreme conditions, I place my waterproof phone inside a clear waterproof bag (which also has a rugged lanyard, which I have reinforced).
Overall, I highly recommend waterproof devices.  Just test them well before use, and make sure you backup your data frequently.  As we say in rock climbing, "never climb higher than you are willing to fall".
If you do have to return a device due to a waterproofing failure, please do your best to ensure the manufacturer doesn't just offload it to a refurbisher who will then sell it to an unsuspecting person who will not be aware of the device's previous failures.  No one wants that to happen to them, so let's work together to make sure it doesn't happen to others.

Thank you for you thorough answer. Were all the phones IP68? From your answer I understand that you would wait for the wet phone to get dry before starting to use all of its functionalities again. So I should probably not let my phone get wet intentionally. Did you test a S9?

@qwlice You're welcome.  Yes, all were IP68.  I use the phones when wet, except for making physical electric or data connections.  Also, the speaker(s) may not work well when wet, but I find it actually helps to use them when after being wet to eliminate some of the moisture (point speakers down to let gravity assist).  I have never tested an S9, but I'm considering purchasing one.  My experiences with Samsung support & warranty service have been exceptionally poor (surprisingly bad, and very time consuming), but if the phone works well, support or service would hopefully not be needed.


text:
Android phone is turned off at 52% battery
I have got a Samsung Galaxy Grand Neo Plus with Android 4.4.4. When the phone reaches the 52%, it turns off and I can't turn on it again because the battery is at 0%!
I think this could help: When I charge it completely, the phone turns off (as I've said, when the battery is at 52%), BUT, when I charge it by... 60%, it pass the 52%.
EDIT
The problem was the battery. The solution was buy a new one.

I would start by  holding all three physical buttons for a full 3 minutes (phone switched off) to fix battery logic problem.  this resets the battery logic on some phones and how the battery talks to the software to let it know how much power it has based on the voltage. After that start the phone (may take some restarts ) and charge the phone
Next, eliminate Battery Problem by changing battery

A) Battery lived it's life. If the battery is removable, borrow a battery if possible and see the behaviour. Check if it is bulged. Easy way for this is to keep the battery on a flat surface and try to spin it. If it "spins", it is due to battery bulging and changing battery is indicated
B) Battery has a chip that provides phone health and condition to device. Based on this information, device takes actions such as stopping the charge, LED notifications to show battery charged etc. Changing battery will also rule out possibility of this chip having gone bad

Fix OS problem. Fuel Guage drivers ( part of software in your device) corrupted. To rule this out, i suggest back up your data and with your recovery wipe clean all Cache and system and flash stock ROM (requires root). If not rooted, try a factory reset (deletes data, so back up before this). Our else if Kies supports reflashing ROM, do that. If the problem continues, it is likely that it is not a driver corruption issue.
Fix Hardware problem of device Hardware of battery charging chip gone bad. Less probability and best handled by service center

Getting to the root of the problem takes time and I would proceed in the order suggested. All the best and do post the conclusion, it may help others having similar problem with your device make

Hi beeshyams, as you have said, I proceeded in the order you have suggested. Trying the first option, I wasn't able to start the phone. Is that normal?

Phone shouldn't start...normal...

Hi beeshyams and thanks! You solved my problem =) The trouble was the battery. I went to buy a new one yesterday and the problem was gone! Thank you very much (I'm gonna edit the question to write the solution)

Glad to hear that and that I could help

What exactly happened when you tried to fix the battery logic...asking to learn

source: Stack Exchange

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

sort: votes


text:
Unable to root Falcon running CM13 (6.0.1)
I have always run the nightly cyanogenmod builds as I've never found any major bugs. My device was rooted when running CM12, and since, I've received an update to CM13 through the inbuilt updater. However, I have noticed that since updating, I cannot get root access and have tried (multiple times/ways) to reroot my device, and I have not been able to.
Should I be able to root my device, or is this some feature of CM13 that I am as of yet unaware of?
If you want build.prop or any other information, please just ask. Thanks!
PS. The methods I've tried:

http://www.android.gs/root-moto-g-any-android-firmware/ (using a rooting boot.img)
http://forum.xda-developers.com/showthread.php?t=2639583 (Philz Touch)
Using Clockworkmod Recovery to install root ("Root access lost, fix root (/system/xbin/su)" dialog)
Clean wipe and reinstall of the latest CM13 nightly

EDIT: Yes, I've enabled root access in Developer Options (to both apps and ADB) and yet when apps request root access, no dialog shows up and they just fail. I've tried root checkers, I tried to install CWM using the app rather than flashing through fastboot... Neither worked.

Have you gone into your settings and enabled root access? It has changed in CM13. It should be in the developer settings now, I believe, but there is no longer a Superuser application. It's all integrated into their permission management system.

I agree with eldarerathis. I recently tested a CM 13.0 build and that was the way to go for root access.

This is weird.. Did you try flashing SuperSU.zip from custom recovery like Philz or CWM or TWRP?? That should really work. I don't think we need a customized boot image for rooting CM13.

No... I'll try it, thanks. And the boot image was to make the su executable, I'm pretty sure. It didn't overwrite my boot image, I just booted off it once (as per the instructions).

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


text:
How to remove the Ubuntu Touch kernel at startup?
I have tried the latest Ubuntu Touch on Nexus 5, but it was useless because an exential app doesn't work with Anbox.
So i want to try an Lineage 18.1 unofficial image.
I have installed the image with no problems.
But I cannot remove/erase the ubuntu kernel at start.
I have tried those commands
fastboot flash bootloader android/roms/twrp-3.3.1-0-hammerhead.img
Sending 'bootloader' (13290 KB)                    OKAY [  0.640s]
Writing 'bootloader'                               FAILED (remote: 'invalid bootloader image
')
fastboot: error: Command failed

fastboot flash recovery2 android/roms/twrp-3.3.1-0-hammerhead.img
Sending 'recovery2' (13290 KB)                     OKAY [  0.640s]
Writing 'recovery2'                                FAILED (remote: 'partition table doesn't exist')
fastboot: error: Command failed

fastboot erase bootloader
Erasing 'bootloader'                               FAILED (remote: 'Partition table doesn't exist
')
fastboot: error: Command failed

How to remove the kernel at startup?

you are mixing up bootloader with boot (which is dangerous). furthermore you are mixing up boot with recovery. bootloader is proprietary and is not changed in any way from ubuntu touch

Does this answer your question? What is the difference between aboot and boot?

Thanks for the info, so Ubuntu touch has modify the application bootloader?

So a correct title can be "boot" instead of bootloader?

Solution found, works on Linux. The phone in example in Nexus 5 so you had to adapt to YOUR phone.
WARNING: , I am not responsible for any kind of damage to your phone, follow this solution at your own risk.
Connect the phone to usb port of a Linux pc, called "host", all commands must be run from this pc.
a)Download the factory image for Nexus 5 then connect the phone to pc WARNING: IS FOR NEXUS 5 HAMMERHEAD, you MUST select another image if use another phone.
ensure this command return the right thing
fastboot device

b)then extract the zip image, enter in the dir created and run
sh flash-all.sh

from the computer host
It will reboot in the factory image of Android 4(sic!) and then you can install Ubuntu touch or a "free" Android rom.

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


text:
What is a "Download Agent" and what is it for?
I've seen this phrase referenced in the context of MediaTek devices. I don't know what it is. It's been brought up in conversations about flashing the preloader when the preloader is wiped or corrupt, usually with some file called MTK_AllInOne_DA.bin. it also appears that is signed, too, from what I can gather from online discussions involving it. Is it signature-checked by the boot ROM?

Its a file used in flashing roms (or parts of the rom) for example for the SP Flash Tools. This file has info in it that tells the tool how to flash to the device.
You don't flash the DA file so it wouldn't be checked by the boot ROM. But what you are flashing would be checked.
Check out SP Flash Tool

But it is loaded by the boot ROM, so the simple fact that it doesn't get flashed to the device means nothing.

As far as I know the DA file doesn't get loaded by the ROM it only is used in the flash tool to know how to communicate with  the device.

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


text:
Backing up a partition to desktop with adb and pv
I had once found a fast method to backup device partitions to a computer using adb and pv (provided by a TWRP temporary boot image). pv ran on the Android device and was called using adb, specifically, I think, using adb exec-out. cat might have been involved. dd was not used, I'm 85% sure of that, because I need/needed to see the copy progress.
I am unable to find it now. What was it?

Isn't pv a tool uses for monitoring progress, how can you backup a partition using that tool? Also if you intend to pipe the data from Android to the host PC using adb shell you will recognize that this will change the transferred data (net lines). Better use adb exec-out.

See "CREATING PARTITION DUMP" heading in this answer: https://android.stackexchange.com/a/208114/218526

@Robert "Monitoring progress" is vague. I've mostly seen pv $A $B to copy one partition to another or to a file while displaying the operation's progress, which I need to see to know that a copy operation hasn't stalled. I probably did use adb exec-out instead of adb shell.

@IrfanLatif Your linked answer uses dd which is inefficient and does not display the progress.

@Melab I've just counted. I described 7 methods there to create a partition dump. Seems like you are in a hurry. So what you can do is open the linked answer, press Ctrl + F in your browser, and type " pv " without quotation marks. The search results will quickly lead you to 2 commands in which I've used pv. None of the both uses dd. // Btw I hope you are aware of dd status=progress .... If not, please read here. Also see pv to correct your understanding of how it works.

'adb pull -p /dev/block/dm-0' will give you progress bar


text:
A Lot of .so files (1268 files) are seen in default storage in my android phone
I have Lenovo A390, rooted and installed a custom ROM. I have been using this ROM for 4 months but recently I am seeing these lib files. Refer the sample screenshot. It keep generating after using sometime.
Default storage or junk files saved in SD card Home directory - /mnt/sdcard
Please let me know if any other info needed and tell me how to get rid of these files permanently. Also phone started responding slow and I am maintaining 50% free space in both SD card and phone storage.
Custom ROM - http://www.needrom.com/download/a390-xperia-v5-0-honami-z2/

Have you tried googling some of the file names? A quick check shows some of these related to GAPPS Google Apps Minimal Edition. Has this been recently installed?

What is "default storage"? In which path/directory do you see those files? What custom ROM have you installed? Which Android version?

.so files are native shared libraries used by some apps. If you remove them, the offended apps won't work properly. Also, they don't make your phone slow. The cause of your device slowing down is not these files.

where are those .so files located ? on sdcard ? in /data partition ? and did u use link2SD ?

@wbogacz I didn't try googling the file names and also I didn't install google related apps recently.

@AndrewT. After clearing these files, I am not seeing any change in phone behavior. Common Issue I face before/after file removal is - Slow response. Example - Dial screen takes 15 to 45 secs  to show up.

@Whereismymind That much of a lag can't be caused by .so files. They are just libraries. Still, you haven't told the exact location of those files within your phone.

@SarpSTA - I have updated in summary "Default storage or junk files saved in SD card Home directory - /mnt/sdcard "


text:
How to prevent child from calling friends?
Even when the phone is locked to the maximum extent (bedtime on Google Family Link / Huawei parental controls), the child able to call friends. This is not what I want, especially during nights.
I have spent a lot of time looking for a solution. This seems like something easy to implement (even locking the whole dialer app), however it looks like one would have to root the device to achieve this.
I found one trail, MMGuardian, that claims to allow contacts white list, but this is paid software and I'm looking for a free solution.
There is a Google topic about this, on which a lot of people voted.
How come such a seemingly obvious functionality is not available?

I haven't been able to test this (due to a lack of that setting on my daughter's card), but it seems one can achieve it by setting FDN (fixed dialing number) - a SIM setting, though changing it doesn't seem very easy comparing to other parental controls.

Fixed Dialing Number (FDN) is a service mode of a GSM mobile phone's SIM card. Numbers are added to the FDN list, and when activated, FDN restricts outgoing calls to only those numbers listed, or to numbers with certain prefixes. A notable exception is that emergency calls to 000, 112, 911, 999 and the like are exempt. Incoming calls are not blocked by FDN.
One practical application of FDN is for parents to restrict the phone numbers their children can dial. The SIM card's PIN2 must be entered beforehand or when applying such settings.


text:
Receive HTML MMS messages
Background
I have recently switched to Android from iOS and have run into a problem regarding receiving MMS messages on the phone.
Previously on iPhone, I was able to receive HTML MMS messages by sending them base64 encoded with the following MIME headers:
Content-Type: text/html; charset=UTF-8;
Content-Transfer-Encoding: base64;
Content-Disposition: inline; filename="html.html";

These would come in as HTML files which would thus be interpreted by iOS's built in browser upon clicking them.

On Android, sending the same messages with the same identical MIME headers results in essential HTML code being stripped out such as the <style> tags around inline CSS and the like, yet header levels (h1, h2, h3) are appropriately headers within the message, and numerous other strange behaviors.
I should note that on Android, the message comes in clear text form (except for the strange headers thing and hyperlinks), almost not even interpreting the HTML and furthermore stripping out some tags.
This is the behavior in multiple messaging apps including the new Google Messenger app.
So, to sum up... Android:

Interprets the HTML code as plain text (for the most part)
Interprets headers and hyperlinks (UPDATE: does not interpret hyperlinks) within the mostly plain text results
Displays a limited amount of plain text

Question
Is there a way to receive an HTML MMS message so that it can be interpreted in full by a browser on Android?

authors: نورالله سعدی


text:
How to allow google to save & sync wifi passwords?
My Galaxy S7 is not saving wifi passwords. I think the reason behind this is that I refused google to sync wifi passwords with my account. I searched for a way to enable that feature. I'm supposed to open the Settings app, click on "Google" and change the Networking settings. The problem is that there's no "Networking" option in the "Google" section.
I can't root my phone because it's still on a warranty period so most solutions suggested on this question-board don't apply to my case.
I tried to clear the cache of the Google Backup Transport, but it doesn't have any data to clear (0.00B of internal storage used).
Passwords are lost only after disabling and enabling wifi. If the wifi is turned on all the time, I can reconnect to my wireless network without the need to enter a password.

Are you trying to sync wifi passwords between your devices, or are you trying to make them save locally on your S7?

Go to Settings->Google->Smart Lock for Passwords and make sure everything is on.

I think the option you are looking for is now in Backup menu in Settings. Try searching for "backup" and "back up". Screenshot:

After enabling it you also need to select your primary backup account (search for "Backup" this time if you don't see it).

That explained it pretty well, thank you. Unfortunately it didn't solve the problem - wifi passwords are still lost after turning off the wifi. Looks like I've ran into the XY problem.


text:
Samsung S7 Oreo upgrade decreased screenshots quality
I did this week the Oreo upgrade on my Samsung S7 device. When I'm now taking a screenshot, the file is in JPG instead of PNG and the quality is just terrible.
I really need to revert back to the higher quality screenshots, I'm publishing crops of the screenshots on my own website. I simply cannot bring to my users such bad image quality.
Had a look to the Advanced settings parameters, but nothing I can change except something called "Smart capture" which seems not related to my problem.
To demonstrate what I mean, here is a 100x100 pixel crop from Android 8 version and from Android 7 version. The left part of the image is the bad quality screenshot from Oreo, the right part is what I had before the system upgrade.

I don't care about the JPG or PNG format, but the quality is mandatory.
Any hints to set the quality back to the original ?
Can anyone tell me if this "nice" feature is something from Oreo or from Samsung Experience 9.0 which came with the Oreo upgrade ? I suspect the latter (would lead me to stock Android if this is the case).
Thanks in advance !


text:
How to enable USB debugging from TWRP recovery
I have a android device with dead screen. I have installed TWRP recovery for adb interactions while in recovery. I have lineage os 16.0 (Android 9) on my device. I want to access the device screen via using scrcpy. But I don't have developer mode enabled meaning USB debugging is not enabled.
How do I enable USB debugging while in TWRP recovery?
Host device will be windows PC with ADB installed.
I have seen some online guide as in how to push RSA key. from https://stackoverflow.com/questions/30178911/how-to-authorize-and-accept-adb-rsa-key-with-broken-touch-screen-on-android. It says I should use
cd ~/.android then
adb push adbkey.pub /data/misc/adb/adb_keys
Is this still applied in Android 9 or lineage os 16.0? Since this guide is little dated.
Note: I search for simmilar topic and all the answers are about how to back up the phone not how to enable USB debugging. This is not what I want. All I want to know is how to enable USB debugging through editting files while in recovery adb.

https://android.stackexchange.com/q/213116 add entry in /data/local.prop. before using scrcpy delete other adb.exe which comes bundled (or set environment variable 'ADB=path/to/adb.exe'). concatenate files 'cat adbkey.pub >> adb_keys' instead of adb push


text:
Viber on Android - transfer backup from Huawei to Samsung phone
on my old Huawei phone I backed up Viber data (chat history and media) via Viber's Settings/Account/Backup feature. On Huawei there was only the option to backup to Huawei cloud (no option to backup to Google Drive).
Now, I have installed Viber on my other phone (Samsung S21) and there is no restore option in Viber because it is only expecting the backup to be on Google Drive.
Is there any way I can transfer this manually?


text:
ADB Reboot Failed: -1 When using "adb reboot bootloader". (Infocus M530)
I have an Old Infocus M530 (Mediatek 6595) running on Android 4.4.2 (KK) (Which i believe is made by Foxconn), I've been trying to make some Custom Recoveries for this device for quite some time and i always end up leaving it because of this problem that I've been having for about a year now. This device just doesn't reboot into bootloader/fastboot.
I tried "adb reboot bootloader" and adb gives "reboot failed: -1", tried "adb reboot fastboot" then the device just reboots normally back to system.
Also this device uses a program called "SUTL" to flash it's stock firmware which i have used numerous times since I've bricked it by removing several apps via root. (I gained root via Kingoroot). The firmware image(archive) also can't be extracted via 7Zip or similiar programs because it probably have some modified or custom header.
Tho this device works fine i can't seem to get the bootloader unlocked on it. I can't even pull images of partitions via adb shell it gives me "Permission denied" error.
So all i wanted to know at the moment is how can i unlock it's bootloader so i can pull some system images. Thanks.

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


text:
Can't reinstall an app uninstalled through ADB
I recently got a Huawei P30 and used adb to remove some preinstalled apps I didn't want to use. I went a bit too far and removed the system gallery app (com.android.gallery3d) which turns out to be problematic for multiple things, such as opening taken pictures directly from the camera app.
I've tried reinstalling it but I'm facing multiple issues:

When trying to install the APK that's still on the phone in /system/priv-app/Gallery2, I get a INSTALL_PARSE_FAILED_NO_CERTIFICATES error. The full error:

Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl30820468.tmp/base.apk: /data/app/vmdl30820468.tmp/base.apk: File res/drawable-xxxhdpi-v4/img_patten_7.jpg in manifest does not exist]

When trying to install a version I found online, I get a INSTALL_FAILED_VERSION_DOWNGRADE, which is odd as the app is supposed to be uninstalled. It doesn't appear in pm list packages, however running dumpsys package com.android.gallery3d does give a result, and the version is indeed more recent than the one I'm trying to install (9.1.1.309 vs 9.0.15.355). Using the -d flag when installing doesn't help as it's not a debug app. I couldn't find a more recent version online.

Is there a way to reinstall this app that doesn't involve a factory reset? Alternatively, is there a way to install a different version of it? It seems like com.android.gallery3d is a generic package name, I wouldn't be against having the "stock" Android one.

When the APK is still in /system/priv-app/*, the app isn't uninstalled. Are you sure you didn't just disable it? What command did you use to uninstall via ADB?

I used adb uninstall -k --user 0 com.android.gallery3d. Trying to run it again results in a not installed for 0 error (with or without the -k flag). Not specifying the user also gives an error, DELETE_FAILED_INTERNAL_ERROR

That only uninstalled it for that one user, but leaves the APK there (theoretically, a second user could still run it). Have you tried adb shell "pm install -r <package.apk>" (replacing <package.apk>by the path to the installed APK file) or, if you have it on your PC,adb install -r ? The important thing is the -r` (re-install even if its there).

The -r flag doesn't help, same issues with both methods (apk left on the device and the one I downloaded)

That's ugly. Just guessing: what happens when you introduce the --user 0 here as well? Then it can neither claim a wrong version nor that it's already there. If that doesn't work either, please try pm default-state app.name (taken from this XDA post). I've never had that situation.

Specifying --user 0 when installing didn't help. I added the full error to the question when trying with the app on the phone as it doesn't seem to be related with the current state of the app but rather with the apk itself. pm defaul-state says Package com.android.gallery3d new state: default but doesn't seem to have any effect (app still isn't visible anywhere, even after rebooting the phone)

Can you please upload the APK that resides in /system/priv-app/Gallery2 somewhere and share the link with us? I want to try if this could be a problem with the APK.

Sure: https://send.firefox.com/download/69b457af2b74203a/#N9qa8vc7beaD67xCnc_lDQ (expires after 7 days or 100 downloads, I can reupload it if needed). Note that this APK is the one that was already residing in the phone, not the one I downloaded. I just tried signing it but I get the same error as before (INSTALL_PARSE_FAILED_NO_CERTIFICATES because a file is missing in res/drawables...). I also tried bumping the downloaded one's version code using apktool and signing it myself but I get rejected as the signature isn't the same as the "existing" version.

@Jukurrpa looks like your problem is the same as: Reinstall System app which is uninstalled for the current user? Unfortunately, that is not solved there either, and overlaps with what I asked you to try here (Firelord pointed me to that one, thanks again!)

Wow thanks for the link to this question, adb shell cmd package install-existing com.android.gallery3d worked! I wasn't aware of that command. Could you post this as an answer so I can accept it?

Great! And thanks for reporting back. Now that you confirmed, I've made that an answer. Though the comment chain here now is obsolete for you I suggest we leave it stay. All those "possibilities" might come in handy for someone else. Enjoy!

The solution can be found in the question Reinstall System app which is uninstalled for the current user? (which is unanswered):
adb shell cmd package install-existing com.android.gallery3d

Note this doesn't work in Android 5 (hence the other question), as the cmd command was only added later (I don't remember exactly when, but it's available in Android 7 at least).

And you can uninstall it with adb shell cmd package uninstall com.android.gallery3d


text:
Rooting "Redmi Pad SE" with Magisk (MIUI 14, Android 13)
How to root Redmi Pad SE with Magisk (MIUI 14, Android 13)?
There are many guides out there, but doing it with boot.img doesn't work.
Some of the guides are specific to Redmi Pad SE, but they are really copies where the device name has changed but the instructions are the same for all devices.

I wrote this guide for anyone with "Redmi Pad SE" (a tablet) which comes with "MIUI 14" and "Android 13".
In Settings > About Tablet you have the MIUI and Android versions.

Take note of them.

In my case:
MIUI 1.0.3 TMUEUXM
Android 13 tkq1.221114.001

Note: The device came with MIUI 1.0.1 but the ROM versions available online where for 1.0.2 and 1.0.3, so I upgraded it from within MIUI/Android. As you will see later, you will need to download the ROM/Firmware.
Update 2024-08-21: "Seems to be working (also) for HyperOS 1.0.2.0" -- Vi0

Requirement
First, you need to request the bootloader to be unlocked as soon as possible, because you will have to wait 7 days until it can be done.
https://www.miui.com/unlock/index_en.html
https://en.miui.com/unlock/download_en.html
The program provided by Xiaomi is for Windows and it says it will wipe out any data you had inside the Android device.
If you see that something is failing in the connection with the device, click on options. There is a section to Install drivers into Windows.
After the 7 days, unlock the device and continue.

The official instructions to install Magisk are here
https://topjohnwu.github.io/Magisk/install.html
However, as described here
https://aiomobilestuff.com/root-android-13-via-magisk-patched-init_boot-boot/#comment-149823
for devices that come originally with "Android 13", the process is slightly different. In particular, you will work with init_boot.img and NOT with boot.img

1: Install Android SDK (Windows)
or
1: Install adb and fastboot (Linux)
# sudo apt install adb fastboot

2: Enable USB Debugging and OEM Unlocking
Clicking on MIUI version several times you will enable 'Developer mode' (see the image above).
Then under Settings > Additional Settings you will find 'Developer options'

There are many places describing how to Enable USB Debugging. I won't go into that.

3: Extract Stock init_boot.img
This is very unclear on the official instructions. It just says "If your device has boot ramdisk, get a copy of the boot.img (or init_boot.img if exists)."
Well, google for your MIUI version ("MIUI 1.0.3 TMUEUXM" in this case) and you will find repositories for the firmware that you have installed.
In my case I got it from 2 different sources and compared that the results were identical.
(You may find something different)
They were called
miui_XUNEEAGlobal_V14.0.3.0.TMUEUXM_f8cfc20eb5_13
miui-blockota-xun_eea_global-V14.0.2.0.TMUEUXM-V14.0.3.0.TMUEUXM-ecc1df367d-13.0

You can just unzip it, but then you need to extract the payload.
For that I used payload-dumper-go from https://github.com/ssut/payload-dumper-go
Find inside the decompressed payload the init_boot.img
Optional: I compared that file from both firmwares to verify they are identical. For that you can use md5sum or similar.

4: Install Magisk App on Android
Get the latest APK from its official web ( https://github.com/topjohnwu/Magisk/releases ), NOT from Play Store.

5: Patch the init_boot.img with Magisk and flash it
All the adb / fastboot commands below are to be run from a PC. There are ways to root Android without PC but I haven't tested it.
# With the Tablet in normal mode and powered on (well charged).
# Copy the init_boot to Android
$ adb push init_boot.img  /sdcard/Download/

Proceed to patch that file within Magisk. This is explained in many places.
IMPORTANT NOTE ABOUT FUTURE UPDATES OF MIUI:
[updated 2024-02] If you accept any of the MIUI OS updates, your rooted init_boot will be replaced by the update, your tablet will stop being rooted (the apps that need a rooted device will stop working properly) and you will have to repeat the steps from here.  Although one could argue that it should be from point 3 to be fully correct. I just did it from here (I didn't care about the changes made by the update) and it went well (may not be always like that, be warned).
END OF IMPORTANT NOTE ABOUT FUTURE UPDATES OF MIUI
# Get the patched file from Android to PC
$ adb pull /sdcard/Download/magisk_patched-<something_here>.img

# Reboot Android into fastboot
$ adb reboot bootloader

# Flash the patched img from PC into Android
# This is the part that is different for devices that came with Android 13.
$ fastboot flash init_boot magisk_patched-<something_here>.img

# Reboot Android
$ fastboot reboot

Done.
Now Magisk should say that it is installed.

is this applicable on redmi pad se android 14 (hyper os 1.0.2.0)?

I don't know. But feel free to let me know if you find out.

Seems to be working for HyperOS 1.0.2.0.

It works on redmi pad se 11' bought in 2024
I patched boot.img first  (I replaced init_boot.img by boot.img in adb command) and flashed it, magisk was not working.
I patched init_boot.img second, but I kept the adb boot.img command so boot failed.
I patched init_boot.img third and changed command to adb init_boot.img it booted and magisk worked


text:
How can I calibrate the tilting sensor on Android
I have an Android mobile which seems to be of Samsung, or at least a clone thereof. I got it for my wife as a present, so I don't really know which one. Under the battery pack it says "Model: 19502"
when I look through the menus there are absolutely no identifications as to which it is and the settings only allow rather high level stuff, like setting background images, and similar, but nothing system relevant.
When I play games I noticed that the tilt is not correct, so I installed "App Sensor Box" which allows me to test the sensors. It shows a board with a ball on it, and I can see that the ball rolls off when I keep it balanced. Unfortunately this app doesn't allow me to calibrate it, so I wanted to know if such an app exists, or what I can do to calibrate it, because there are not setting to trigger this. The apps I found on Play Store all seem to just read, but don't change it.

It's a tough one to answer, as I'm not sure what version of Android you are running, and you have stated it may be a clone.
Method 1:
Open "Settings"
Find "Motion" and tap on it
Scroll down the menu and tap on "Sensitivity Setting"
Open "Gyroscope calibration"
Place device on a level surface and tap Calibrate
Method 2:
Download 'G-Sensor' from the Samsung Apps store pre-installed on your device.  Here is a weblink.
Method 3:
Download  Bubble Level  from the Google Play store, this has a calibration option also.

There are no settings as far as I can see, which is very annoying. I try the other suggestions and report back then. Thanks!

I didn't think there would be settings, that seems to have disappeared on newer versions of Android. Don't forget to put the phone on something perfectly level before calibrating. If none of the above work, I'll see what else I can dig up!

Thanks! That worked perfectly with that Bubble Level App. Exactly what I was looking for. :)

For German Users, you should look for "Wasserwaage" in the Play Store.

Glad to hear it!

I don't know about method 1 (never owned an Android device with a calibration setting menu, and I got quite a number of them...), but method 2 and method 3 are bound not to work. Unless they are leveraging some root-access feature, there's no single functionality in the Android api that allow to calibrate the sensors (and all apps claiming otherwise are fads)

Looks like Bubble Level uses accelerometer instead of Gyro

All mobile device compasses and magnetometers are constantly gathering data and recalibrating themselves. The best way to calibrate them is to provide them with enough data of the magnetic field around them. You do this by rotating your phone by 360º around all 3 axis. Essentially this is what all apps ask you to do. There is no api neither on android or on iOS because this is done by the hardware and there is no need to interfere with it, just give it enough data by pointing your phone at all possible directions. I'd gladly post an answer but I don't have enough reputation yet.

@KonstantinosGaitanis: I wish... I can't count the number of times I turned and flipped my device going through a dozen fake 'callibrate accelerometer' apps. Still getting into 'portrait' requires to set it completely vertically, and the 'bubble level' app shows it thinks it's flat, when it's roughly 45 degrees from flat. Tilt minimally sideways, goes into 'portrait' Set it on a flat surface and the screen flips upside-down.

Referring to the first answer ...
Method 1 - There is no calibration setting on my Samsung Galaxy S5.
Method 2 - Search the Google Play Store for "Accelerometer Calibration Free" for a specific calibration app, the link in the older answer is dead.
Method 3 - "Bubble Level" works fine and coped with portrait and landscape orientation OK and has a simple calibration option
Additional Method 4 - Search for "Just a Compass" on the Google Play Store for a very detailed compass with a calibration option
Additional Method 5 - Use the calibration option in Google Maps.
Open the Google Maps app, wait for the blue device location icon to show. Tap the location icon to bring up more information about your location. At the bottom there is the “Calibrate Compass” button.


text:
Android devices getting slower over time
At work we have a bunch of Casio handheld android terminals (DT-X400). They do not have any connectivity to the internet (so no updates), almost all apps are disabled except for those we use for work. We used them for about a year, and recently got a few more.
When we started using the new ones, we discovered that they perform a way, way better:

no lag;
navigating within applications is fast and smooth;

while the others feels sluggish:

it takes few minutes to boot up;
often it lags while doing simple actions, like scrolling on small lists;
opening apps takes a long time (> 30 seconds for calculator) - when you click on the app icon it looks like it freezes, then after a while screen goes black and after few more seconds app opens up.

The new ones performs a lot better when doing same tasks.
They are all the same model, hardware is the same, drivers versions on every device are also the same. All of these terminals runs Android 8.1.
I tried clearing memory, disabling all the apps I can, later did a factory reset, but performance did not improved.
So my questions are:

What can cause such slowdowns of android devices?
Is there any way to improve performance, without getting root access?

Update:
As of the suggestions in the question comments, I have tried swapping bateries from the new devices to the old ones and also powering them completely off. Neither option showed any performance improvements.
I am also aware about aging flash memory, after the weekend I will try to run some test on both devices to compare memory performance and update my question with the results and methods used.

Do you keep the devices always on or do you shutdown them when not in use? How good is the battery of the old devices compared to the new devices? When it comes to performance slowdown because of hardware only flash memory (flash memory can get slower it it is written to very often) and defect cooling system because of physical defects (e.g. by bending the device) come into my mind.

@Robert Devices are always on, for few of them we have bought new batteries two months earlier, and they hold the charges pretty good. Still, as they are easily changeable I will try putting the new ones into the old devices just in case it is causing problems.
As for the memory - it may be, the one app we use has a SQLite database that is often written. Also, the app creates about 20 .txt files every day with an average size of 20KB. Maybe there is way to check it?
As for the physical defects, the devices only have some scratches but there is no visible physical damages.

Then may be you should try to shut down them for a few minutes. I recently had to learn that it sometime makes a big difference between rebooting a device and shutdown and later turn it on again (internally some chips get a "hard reboot" as they are not powered anymore). Not sure if it makes a difference but worth a try.

Thanks for the advice, I will try shutting them down completely. Later I will post the results.

After powering two of the devices off for 10 minutes, and taking batteries out nothing have changed.

Does this answer your question? Why a phone gets slower as time passes?

@beeshyams Thanks for the link, it explains about TRIM support (which in my case is supported) and about aging flash memory (which I believe is causing my problem). But I still hope somebody can suggest other possible causes or tips for improving devices performance.


text:
How to flash AOSP 11 on to Redmi 6A?
I've successfully compiled aosp_arm64 and now I'd like to know how to flash it on to my device.
I couldn't do it with command fastboot flashall -w as it outputs this:
--------------------------------------------
Bootloader Version...: cactus-0deb5cf-20191022185025-20200508231234
Baseband Version.....: MOLY.LR12A.R2.MP.V66.P18
Serial Number........: 0f70e4b47d2b
--------------------------------------------
Checking 'product'                                 FAILED

Device product is 'cactus'.
Update requires ''.

fastboot: error: requirements not met!

I'm guessing I need to flash images individually, but I'm really unsure what to do.

AOSP will most likely not work because AOSP is not a generic distribution like RedHat or Fedora. If you want to build a ROM yourself you first need a device tree matching your device. As your device is most likely Treble compliant you could try a Generic System Image (GSI). Besides that I would recommend to learn more about Android and it's specialties.


text:
How to uninstall gmail app on android without root
I'm looking for a way to remove the preinstalled Gmail app (not account, I meant the app itself). My web searches yield methods to remove gmail account, not the app. Just to add, I had managed to finish the default android setup/installation (when the phone was 1st activated after purchase) by using a non-gmail account. It worked just fine til today (almost 1 year).
Gmail/Gmaps/Photos/Other G-Apps is just another app in android. Just quite puzzled why it can't be uninstalled just like any other app. I'd prefer a non-root removal solution if possible.
If it is not, appreciate if you can include a way to 'undo' the root after the app removal. Terminal based or debug mode solution are still acceptable as long as the phone can still be switched back to 'non-root' mode later. Fyi, I'd prefer the phone to operate in 'non-root' whenever possible as a (tiny) phone cybersecurity effort.
p/s : This post share a method to disable it.. but not (afaik) uninstall.

adb shell pm uninstall --user 0 com.google.android.gm. See What are the differences between a system app and user app?.

Install Platform-tools on your computer (google if don't know how to)
Enable Developer Options on your phone (google if don't know how to)
Then enable USB debugging in developer options
Then give the command
adb shell pm uninstall --user 0 com.google.android.gm

I just learnt : shell (run emulator console command) pm (package manager) uninstall (removes package) --user (what's this means/for?) com.google.android.gm (target app) | off all the reference I had encountered, non explains the info for --userunder pm uninstall   command |my ref | Thanks a lot for the great assist, really appreciate it. ( :

@p.phidot --user 0 implies admin user on your phone. For example, if you have multiple users, --user 1 implies the second user. SO here, uninstallling an app for --user 0 implies removing it for admin user or rather the first user on the device

oic.. thanks @karthiknair.. got it.


text:
Is there a way that I can "share" images by sending them to an HTTP endpoint?
I want to make some hacky prototypes where I use my phone to collect data and then process it with a regular program. For this I want to share images with an HTTP endpoint written by me to execute arbitrary code.
Is there an application that supports a "share to HTTP endpoint" feature?
Research
This thread talks about Tasker, https://groups.google.com/g/tasker/c/lI82IrDMq9k?pli=1, but it also talks about custom app manifests, which make me think this might be quite a lot of work.

Http is just a protocol that can be used in various ways, what you need is a combination of app and server which work together. The main question remains with who you want to share the images? Something like a online gallery you want to give access to someone? Dropbox and other file-sync tools have the feature to share files and folders with other users.

Well... I want to share the images with myself. Or specifically a program written by me that accepts files send over HTTP and does things with them.
I am actually thinking of feeding the files into mechanical turk.

I would use Dropbox for sharing. Just place the files to be sent to the server in a special folder in your Dropbox account and install Dropbox client on the server that automatically syncs that folder and processes all incoming files. Dropbox sharing has the advantage that you are getting a secure authentication system so no-one else can inject files to your server. And the file upload can even get interrupted without problem.

That seems like a reasonable solution, assuming that dropbox has some sort of event system to tell me when a new file arrives. The other thing I had thought of was some sort of whatsapp chatbot.  I was thinking of adding a random number to the URL (and using https) for security, but that works too.


text:
Android 10: How can I switch to external loudspeakers during a call (the screen is black and locked and nothing happens if I plug the loudspeakers)?
I have a Motorola "moto e" phone running Android 10.
Unlike in the case of my old Windows Phone when, during a call, it was enough to plug the 3.5 mm jack with 3 contacts of my external loudspeakers into that phone and the sound switched immediately to the loudspeakers, in the situation of this "moto e" the loudspeakers receive no sound if their jack is plugged during a call.
I guess that, while talking with somebody, when the screen is black and locked, I can activate somehow the screen of the "moto e" and, by setting something, direct the sound to the external wired loudspeakers or to a Bluetooth wireless speaker. How can I reactivate the screen and do the above mentioned settings?
(In most cases, the screen of the phone has to go black and be disabled by the proximity sensors because in 80% of the time I use the phone with its internal speaker.)

Incoming call screens.

For activation of screen, try moving the phone away from your face (out of proximity sensor range); If it doesn't light up, press the power button, if the screen is locked, unlock and try connecting to BT speakers //not seamless but worth a try

@beeshyams , During a call, once going black, the screen stays like this even if I put it face up on the table. I had the idea to press the volume or power button but I was afraid that the call would end. Unfortunately, I can not do experiments during calls because most of them, 99%, come from people I do not know well and if something happens and the call ends they might believe that I closed the phone on purpose. There should be somewhere on the net some clear instructions regarding how I can activate the external loudspeaker, wired or Bluetooth. I can not find these instructions.


text:
Can I give an app the permission to see my calls without allowing to read all my notifications?
I bought one of these cheap smartwatches (Xiaomi Mi Band 4c). To use it, I need to install the Xiaomi Wear app.
I really like the option to notify me when I get a call. This way I keep my phone in silent during work. But the app demands a Super Permission to read all my notifications. This would include bank transactions, personal whatsapp message, etc.
I don't trust Xiaomi that much to give them all that data. Does anyone would have a workaround? I want the app to be able to read my calls but not my notification.
You can see the description in: Settings -> Apps -> Advanced -> Special Apps Access -> Notification access -> select any app.
PS: I do have root access on the phone.

If you use a bank who's notifications can be accessed that way - CHANGE BANKS NOW!!

Further you might wish to give Gadgetbridge a try. The app is fully FOSS and does not even have network access, so it won't "call home". It's available via F-Droid, a place where you get only FOSS apps. So count this comment as 2 recommendations in 1 :) And you then can most likely ditch that Xiaomi app. I'm using Gadgetbridge for years and am quite happy with it.

https://github.com/mirfatif/PermissionManagerX/blob/master/README.md

If the app refuses to work without having "Notification Access", I don't think you can do anything about it. Stop using the app and go for a privacy friendly alternative as Izzy suggested. // @alecxs Notification Access is not a (manifest or AppOp) permission. So it cannot be revoked, unfortunately. Enabled notification listener apps are saved in /data/system/notification_policy.xml and Secure Settings.


text:
Using a Partitioned drive on an Android TV
I've got a partitioned drive - A USB drive, where i've got 2 of the partitions formatted ext3, one of the partitions as a FAT32, and the last one as FAT12. I wanted to access the FAT32 partition using an Android TV, however, the TV gives an error message "Unrecognised USB". Is there a way I could access individual partitions using the TV?
(PS: It is a MI TV)

Are you sure the HDD works at all when connected to MI TV? Such devices usually don't provide much power so the HDD may fail to start because of insufficient power. Use an active powered USB hub in between or HDDs with own power supply to avoid such problems.

@Robert, sorry, forgot to mention, I'm using a USB drive. Btw, when you mentioned HDD, I just remembered that my TV seems to support Partitioned HDD disks just fine. This is really wierd. However all the partitions on that HDD were FAT32, so I think that could be the difference.

android only provides 1st partition, repartitioning should work

@alecxs, The TV simply tells me the drive format cannot be understood, Does not even gives me the first partition :(  ... Android is a linux, it must be able to recognise and read ext3, which is the first partition. And in the case I mentioned in my initial comment, it perfectly recognised all of the partitions. I'm bit disinclined to repartition the drive, since it'll need me to reconfigure certain extra things as well.

@alecxs So, Is repartitioning, the only way?

Does this answer your question? How would you use your ext4 formatted thumb drive via OTG on Android?

@alecxs, The linked question didn't help :( Root access isn't there, I checked using adb.

@alecxs, sorry for the incredibly late reply; here is the screenshot: https://imgur.com/5NLIKa4.png

should be possible to root with this tool
https://forum.xda-developers.com/t/3786991

@alecxs, I know I'm being really picky, but I don't want to root TV either. I'll try repartitioning my drive.


text:
How to safely delete/destroy data from a bricked phone?
I have a "Xiaomi Redmi Note 8 Pro".
My phone is bricked beyond repair (as far as I can tell).
I want to safely delete all data before I throw it away.
Can I drill a hole in somewhere?
I do not what to risk my health by short-circuiting the battery or something like that.
Edit:
My lock screen has 4 digits.

Typically you will find a tear-down videos for each phone model so you can so you can estimate which component is located where in the phone.

https://closingtheloop.eu

Does this answer your question? Wipe data from dead Android phone

Might you explain "bricked beyond repair" it could be the most ecologically way trying to repair and do a factory reset. Also you can learn about data recovery. If you know the pin and cannot recover data, who else could? Indeed the right pin is the only gate to recover data, there is no other way. This user harshly wanted back his data and badly failed on gatekeeper (spoiler: it turned into 480 seconds timeout between bruteforce attempts, see chat) https://android.stackexchange.com/q/239189

Unless you have a means to power the device on and wipe the data properly, you need to physically destroy it. The data lives inside an eMMC chip which is conceptually just a SD card soldered to the motherboard. It will not be damaged by salt water (suggested in another answer) or other means that do not physically break the chip into tiny bits. Unless you understand how it works well enough to judge what would destroy it, just assume most things don't.
Pry the phone open, remove the battery, then destroy the rest of the phone physically in a trash compactor or whatever.

Option 1)
In case the phone still boots in recovery mode (usually hold Vol Up and Power-on) and you have root access you could run the command:
dd if=/dev/null of=/dev/block/by-name/userdata

This will put 0x00 to all your userdata.
As you said, the risk of drilling the battery with a drill is too high.
Option 2)
If there is no power at all, you have to open the device to find the main board and destroy it. And it's a little complicated process because you have to put heat on the screen to unglue it from the back part. And then just remove the main board and put holes on every shield you find.
Option 3)
I have seen many phones been destroyed by a professional company. What they did was to put the phone into salt water for about 30 minutes. It makes all boards completely unusable.
If you're just a regular user (not a public person) option 3 should be enough. But if you are really, really worried about your data getting in wrogn hands, I would say option 2 is better.

Option 4) just keep it as is, because data is already secure by login credentials, encryption and bootloader lock

"What they did was to put the phone into salt water for about 30 minutes. It makes all boards completely unusable." <-- this does NOT securely delete anything. The data is inside the eMMC chip (essentially a SD card soldered to the motherboard) and will not be harmed at all by salt water.


text:
WeChat app keeps auto-opening on phone unlock
Since this morning, whenever I open and unlock my phone, it buzzes quickly upon unlock and opens the Wechat app, even though I have force closed it and cleared the cache. I have also restarted my phone and tried turning off notifications. Neither has changed the issue.
I'm on a Samsung Galaxy S20, have not installed any new apps to my knowledge since this behavior started happening. Googling the issue, a lot of folks mentioned a virus through a blank app causing similar behavior, but I was unable to find it. I ran Kaspersky and it didn't detect a virus.
Is this an app setting, a Wechat issue or do I have a virus?

Just figured it out myself but if you have a wallet phone and a chip card, the NFC is what's triggering wechat to come up. Try turning off NFC and see if it helps.

Turning off NFC will probably solve it, but that kind of defeats the purpose of having NFC in the first place.
In my case, I thought it might be helpful to add my credit card to my digital wallet in the event it falls out of my phone case. It was very annoying to find out that Wechat kept launching, attempting to read my credit card as a bus pass or something stupid like that, especially when I had never given WeChat permission to use NFC. Unfortunately for us, WeChat has permission by default.
This suggestion might help, although I was unable to find the settings options recommended in
Wechat Keeps Reading My Credit Card when I unlock my Phone
"Settings -> Apps -> Special App Access -> Launch Via NFC and disable WeChat there."
I was unable to find the "Launch Via NFC" option in my Android settings, but you can disable NFC inside of WeChat by going to Settings -> General -> Enable NFC.


text:
how to positively locate focus in quick settings using external keyboard to enable screen mirroring (screen black recovery)
I want to use an external keyboard to navigate the quick settings menu blind to turn on Screen mirroring (aka Smart View). I can enter this menu using Win-Q but getting a known focus or selecting Smart View is the next step.
A Samsung Galaxy S6 is fully operational except it has a black screen (dropped by the kids). External mouse and keyboard are working fine and if I can just press the smart view icon on the Quick Settings the screen will mirror and I'll have full control.
I am testing using the keyboard on my own identical phone so I can do it blind on the affected phone.
Most usefully, Win-Q directly opens Quick Settings. Also of interest is Win-N which gives a visually identical result but with a different focus (somewhere in the notifications obvs).
But, after pressing Win-Q focus seems to be a bit random. Sometimes it's under the screen brightness, sometimes it's the Settings icon itself. Direction arrows work fine to navigate, as does tab. Typing alpha (W for Wi-Fi) unfortunately seems to not move focus (wouldn't that be perfect). For the purposes of working blind I'd like to know where focus is absolutely, even if it's just a starting point.
Is there a keyboard input I can use after Win-Q to either:

ideally, select the Smart View icon, or the Smart View text. Is there way to type "S" to do this? or
less ideally but still useful, set focus to, say, the top left icon (wireless on this phone)?

Or is there some previous action such that pressing Win-Q gives a known focus (such as power cycling the phone)?
Unavailable alternatives:

debugging is not enabled
MHL is in theory not supported by the phone; I don't have a cable to try it

I was searching for quick settings images of Galaxy S6 and at the time it only displays 10 quick settings. So to make it work, I believe you must had previously added "Screen Cast" in the list of 10 items.
I guess your best shot is to find the correct combination of arrows and enter.
I tested here and typing "S" don't do anything on quick settings.
I have a galaxy A70 (which is much newer, I know) but the starting point is a search button. To go to start a screencast I did the steps:

Win-Q
Down (3 times) - to get to quick settings
Right (2 times) -> Enter - to go the second column of the second page of quick settings and selecting it
Down -> Enter -> Enter - to select the first device found and confirm you want to cast

I also remember that holding home key was a shortcut to call google assistant. Have you tried that?

Thanks. On the working phone, Win-Q "usually" dumps me on Samsung smart things and Up x 2 gets me to wifi. But sometimes focus is on the settings icon, and moving from there is weird, but easy enough with vision. I was hoping there was a way to explicitly select Smart View, or explicitly select the top left setting icon (wifi for me). In our environment there will be only one device to cast to, so simply enabling smart view will auto-select that and done. If I activate google assistant and say "enable smart view" google dutifully reads me Samsung's instructions instead of doing it.


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

The Phone app handles it, so it depends on the app, not the device or Android version.

Found it here /data/data/com.android.providers.contacts/databases/calllog.db. At least 18 months history.

Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.


text:
Cannot make backup or do a factory reset on Samsung Galaxy A40
I need to make a backup on Samsung Galaxy A40 to factory reset my phone because I'm having a problem with it. I cannot log in. Every time I log in, it gets stuck at "Starting Android". If I turn my phone on/off normally, it gets an absurd timeout. Removing my SIM card doesn't change anything. For that, I cannot fully restart it because you need to log in for that, and I need my stuff before I reset it. I also cannot use the volume down button because it's broken and the ADB is not authorized.
EDIT:
There is no way to do it in my case there are a few tricks that can help someone else though:

If you cannot restart your phone because you are logged out do the following; remove SIM card tray and put it back in, when you can put the PIN in for the SIM card hold the power button.
If you cannot come in the recovery menu with your volume down do; restart your A40 (tap the restart button twice) then keep holding [power+volume up] until the recovery menu shows up.
Are you stuck at "Starting Android" and cant do anything; swipe down from the top, where your notifacations and flash light are in the upper right corner is a settings cog, press that an you get to the settings menu note that not everything works in there!


text:
Remove FRP after Hard Reset Hyundai Tablet
This is my first post. I've a big problem. In my job, we've tablets Hyundai Koral 10x2, for any reason someone did a hard reset from factory mode and now we can't pass the screen google account 'cause the person what did the hard reset forgot the mail & pass. So, anyone know how can i remove FRP? I have not found anything on youtube or google
Tablet Data from Android Recovery:
Hyundai/Koral_10x2/HT10004X16
8.1.0/OPM6.171019.030.E1/101345

i can't use adb commands, from sdcard i can't install apps 'cause always shows error: Signature verification failed. Error 21.
any solution? please
UPDATE
Things what i do to solve the problem:

1st method: changing language to pyckknñ, insert new wifi network, long press in space key, press in green letter, click in green button, click in option with rigth row, click in three points (up|rith) press in second option, open in Switch, now in the video show a shared button this not see in my tablet (shared option is'nt visible like the video) if i touch the video, this show a shared button after i press shared this open YouTube Go at this point all looks good but YouTube Go show: please login in your google account and when i try to do it, same error: this device was sinchronized with another account. tutorial link

2nd method: same like 1st but in this case, i search delete or disable apps android in section tutorial link i open the result, i click in the first link, this shows me a settings apps, i down and open youtube settings, click in first option, this open new screen, click in last option this try to open youtube but this close and show error that youtube go has stopped.

3rd method: in google account long press in @ key but this not shows me a settings option.

4th method: like first method but using TalkBack tutorial link

5th method: triyng in google account long press in word and press search in google but this no appear in the device link

Does this answer your question? How to bypass "Verify your account" (Factory Reset Protection)

Unfortunately not work to me @beeshyams

i've update the question with the thing what i try to solve my problem @alecxs

rkflashtool can dump firmware off device and write single partition/offset. It is therefore capable for erase FRP partition. this documentation might help to figure out usage.
There are maybe easier methods for example talkback method which is pretty generic (check youtube)

can you edit your post with an example or a tutorial with vieo? sorry, i don't understand correclty the documentation

only someone with RockChip device could do that

oh, ah, okey. I need use linux to do that, right? (Sorry, i don't very good with this things, basically i'm new)

create pendrive with rufus or unetbootin


text:
Google Wi-Fi Assistant VPN
I have a Google Nexus 5, running 6.0.1.
I'm trying to figure out how to reconnect to the network I'm on through the Google Wi-Fi Assistant VPN.
Today is the first time I ever used it, because I got a notification for it. I went through the steps to turn it on and it worked great. I then got curious, wondering if I could get around the WebSense blocks (security crap) at work by using the Wi-Fi Assistant VPN.
To do this I had to turn the Wi-Fi Assistant VPN off for a moment. After I tested to see that using the VPN does indeed allow me to get around the security block, I can't seem to get it to use the VPN again.
I go into Settings -> Google -> Networking -> Enable Wi-Fi Assistant, but I never get the question in the notification area asking if I wanted to allow Wi-Fi assistant to connect through the VPN.
So now I'm connected to my network like normal, but it's missing the key icon and it does not say Connected, via Wi-Fi assistant.
Is there a way I can manually do this?
Update: The Google VPN was not working because the network is password protected, rather than an open network. I'm not sure what caused the VPN to connect when I initially enabled it. The answer below describes how to reconnect to an open network to start using the Google VPN.

If you want to use the VPN, the documentation suggests

If you'd already connected to the network manually, you can "forget" the network. Wi-Fi assistant will then re-connect automatically.

because

Wi-Fi assistant doesn't connect to networks to which you've already connected manually.

I forgot I had this question up. I've assumed that it isn't working because the Wi-Fi network is not open. I tried to forget the network and reconnect at the time, but it didn't work. I don't know why it connected with the VPN in the first place. It must have been a glitch or something. Assuming the network is open, your method would work.


text:
Debugging an app from the Google Play Store?
Is it possible to use USB debugging on an app that is not yours, and was downloaded from the Google Play Store?
I don't really need any in-depth information, I just want to be able to see general errors that may be occurring.
I'm basically trying to debug a scrolling issue in my US Bank app on my own because their response is terrible, slow, and I've done redundant "troubleshooting" steps.
The phone I have is a Google Nexus 5 running Android 6.0.1, which is not rooted.

If your device is rooted, you should be able to read the logcat from any app (given that errors are thrown). Otherwise, there is nothing stopping you from using USB debugging; given that you have the source code, you can even put in brakepoints given the app is compiled with debugging enabled.

@GiantTree That was an important step I forgot to add. My device is not rooted. And I don't have the source code, since it's an app I downloaded from the Google Play Store. I can try plugging it in and reading logcat when I get home tonight.

The issue is: an app can only read its own log, so you could only read the log of the adb daemon (which certainly doesn't tell you anything). This was changed some time ago to prevent the leakage of private information through logs.

Have you seen: http://www.curious-creature.com/docs/android-performance-case-study-1.html and you could try to see if its network issue via a MITM proxy like Charles/wireshark.

@MorrisonChang no I have not, but that is a good find. I'll give it a shot tonight. It's unfortunate that I have to take this debugging into my own hands. I first reported the problem seven days ago when the app updated. The help I've received consists of: clear cache, make sure your data is on, reboot device, uninstall and reinstall the app. Create trouble ticket New person, "have you tried to uninstall the app and reinstall it? Have you rebooted the device?" ..........

The problem with bank apps is that they have to follow their internal release protocols/security reviews. So even if internally its been fixed, unless the problem a serious bug (leaking credentials/app broken et al.) and not just janky UI, few will put their necks out for a hot patch release.

@GiantTree: The restriction regarding logcat you mentioned only applies to apps. If you adb logcat from a PC you see logcat from every app.

On an unrooted phone you can enable the Android Debug Bridge.
When the phone is connected to your PC and the smartphone is unlocked you can log in via adb from the PC and see the logcat output of the app you want to monitor.
If this is helpful for you depends on the app (some apps do log anything) and what you want to achieve.

I had a scrolling problem too. I factory reset the phone then reinstalled the us bank app then worked fine.  I believe it was a config type error when  transferring to the new phone. I have a Galaxy 3 android v6.

They got back to me and said they started receiving numerous reports. They still haven't pushed an update. I'm going to refrain from a reset though

Let me get it to point directly, if u don't have the source code ,you cannot read the error log messages .

I wish this were true! When I'm trying to debug my own app the log is full of every other app's log spam.


text:
[re]mount the internal sdcard on the Huawei U8836D (G500 Pro) please?
Good day
re: Huawei U8836D (G500 Pro)   ICS
It is an old phone now I realise, however until I [ignorantly] ruined it yesterday mine was going strong.
As I understand, it has ~1GB of RAM and a ~4GB in-built SD card....I think. There is the external SD card slot, where I have had an 8GB card in.
The internal card ,as I call it, used to show up in the storage details screen until I stupidly repartitioned it following link2sd article(s), in the hope I could 'expand' the available space.
The internal card does not now show up in the storage details and appears not to be mounted (is that the correct term).
I am not confident on android, but can get around ADB, linux etc reasonably ok. Rather than start to dump extra info right now, please let me know what I need to provide as I/we go along.
Therefore, I would really appreciate if some knowledgeable kind soul will spare some time and guide me through getting each storage area back and working as it should please ?  - if that all makes sense.
Thank you.

continue after the reply post (my apologies if this is not the correct way to add more details):
Thank you for the reply. I am a bit puzzled.
I have removed the external card - as for one i was getting a 'low space' message which has ceased now it is out and for another reason, to remove its affects on the output to the system tools just leaving the phone and its internal storage however that is.
Now, when I connect phone  with USB to linux, I was able to fdisk the device listed in /dev, but the print showed its size at a little over 2Gb.  I was then able to format the one primary partition to vfat and reboot successfully.
Yet when using adb shell and running mount and df, there is no info reported on the existence of that 2Gb vfat partition. Under /dev/block on the phone, there is only the mmcblk0 entry and its associated parts 1 to 6 (im not familiar with this structure so sorry for being vague). If I fdisk that mmcblk0 the print displays a size of just under 4GB. I'm not sure what that all means yet (need to try find some articles on how android uses storage).
My question now, is with the phone connected in adb shell, can I safely repartition that mmcblk0 (removing the I presume the boot time setup partitions of type id's 5 and 83) into 2 partitions of types 83 and 0b, reboot and the machine will sort itself out accordingly using those?
If not, how do I get the 2Gb of that 4Gb showing up to use, as 'storage menu option' from the android ics menu doesn't show it, file manager app doesnt show it etc (even link2sd cant see it)  ?
I am making progress even if I seem to be wafting about in the air :-)

On Linux, GParted can allow you to view the partitions. You probably formatted it to some ext, which is not supported by the file manager, but is supported by Link2SD. That is normal, the internal storage isn't supposed to show up if it has been repartitioned for Link2SD. In case you want to revert, use GParted or whatever to reformat the internal SD to fat32 and you're good to go.

If this is an okay answer, please let me know, I'll make it one.

I am not very familiar with Linux, but you should try going through the block device codes to get a clue as to the correct partition, and then manually mount it as I suggested.

Since you are okay with Linux and ADB, let me first clarify 2 things:

Repartitioning the internal SD for Link2SD specifically as per the guide will partition it with a filesystem like ext2/ext3/ext4, which will cause partition to be recognized as system and not show up in most file managers. Some file managers, like ES File Explorer, may allow you to access it through the /mnt namespace, if it was mounted, or as some block device in /dev if not. Link2SD on first startup detects this partition by running some variant of the mount command and adding a mount-at-boot for this partition to init.rc and/or vold.fstab, and makes its permissions so that it isn't easily accessible even by the system.
This not showing up is intended behaviour, but you will find the partition under Link2SD's partition options as "SD card Partition 2" or some such.

Now, if you want to go back to using that internal storage for something, you would have to repartition the internal SD again, using GParted or some such software or Linux which recognizes an ext filesystem.
You will have to:

Find the correct partition for Link2SD.
Format it to FAT32, and set it as active and primary.
On device, mount the partition's block device (mmcblk0p6 in your case) as /mnt/sdcard0 and add this in init.rcand/or vold.fstab (Follow this and this answer).

For you the command to enter in vold.fstab will be
dev_mount sdcard /mnt/sdcard auto SDCARD=/dev/mmcblk0p6
And reboot. It should work. Format this position to FAT32, not VFAT, to avoid useless errors about "read only filesystem".
I'm not providing the commands here as you are familiar with Linux, and in this case on Android it's similar (a root shell through ADB).

thank you, i have added to my original question following your reply. Sorry if this is not the correct way - i am not familiar with the format of this question/answer setup.

It's all right, you are allowed to edit your question as it does not invalidate any existing answer.

well...I'm glad I did not do a repartition on the mmcblk0; that looks like it could be fatal  :-).  Any way, I think the vfat partition is /dev/block/mmcblk0p6  (using fdisk on that device).  I need to create a mount point under /mnt (e.g. /mnt/sdextra), but I keep getting 'read only file system' and I cannot find a way to resolve this. Please will you advise how to best edit the init.rc to insert the dev_mount line ?

You'll actually have to edit vold.fstab . also, I said to format to fat32, not vfat

fat32, yes you did!  My view was vfat formating (as in mkfs.vfat) on linux was F32 sized. I will check it again. I realise it will have to go in vold.fstab, but I wanted to ensure a mount point was available - at the moment there appears to be sdcard and sdcard2 set up by the init process.  I'll have a go for one of those to see if it works first. Thank you.

just before I continue....  the internal card appears to be  /dev/block/mmcblk0. In /dev/block there are  mmcblk0, mmcblk0boot0,mmcblk0boot1 and mmcblk0p1..p6.  If I fdisk and 'p' on mmcblk0p6 it shows mmcblk0p6p1 as the fat32 partition. Is it this mmcblk0p6p1 that needs mounting?   Incidentally, there is a dir /dev/block/vold and in it are the 179:0..6   and then a 179:96 and 179:97...this 97 one is shown in the output from mount when the external sdcard in....how do these relate ?  (i'll go read too). Thanks.

Don't you have something left over for the internal SD card? You repartitioned 2gb of 4gb, could you like extend the remaining internal SD partition over the repartitioned volume after deleting it?

I know that my problem is that i am just not familiar enough with the structure that this rom sets up when it boots.   I will have to take some time to get a bit more knowledgeable and try understand a bit more what's going on.  You have been so kind to help and what you have provided has been useful.  I will perhaps return once I have got a better understanding of how each bit is setup etc.

yes i will accept it.   by the way, i have sorted the problem....and it seems you maybe right about the format....i tried using mkdosfs -F 32 on the device itself and that brought the partition to life  (mkfs.vfat -F 32 via linux did not). Also, I applied it to the /dev/block/vold/179:6 and seems like its all back in order.  If nothing else, I have learnt something from all this :-).  Thank you.


text:
I found apps that I have not installed. How can I investigate this?
There are 6 apps on my phone that I haven't explicitly or implicitly installed.
Most likely they were installed today, as they happened to get on the first screen/page, so I immediately noticed them.
Of course I didn't use the web/desktop Play Store to install them. And chances of the phone being unlocked in my pocket and installs 6 apps by mistake are none.
What is even more suspicious is that when I go to to Play Store, the apps show (install) button instead of (open), as if Play Store couldn't detects that they are installed.
How can I investigate this?

HUAWEI Mate 10 pro
Model BLA-L29
EMUI version 9
Android version 9
Non-rooted

The applications are:

Asphalt Nitro_com.gameloft.android.GloftANPH
Assassin's Creed Unity
Arno's Chronicles_com.playwing.acu.huawei Dragon
Mania_com.gameloft.android.GloftPDMF
Kingdoms_com.gameloft.android.GloftDMKF Spider-Man Ultimate
Power_com.gameloft.android.GloftSMIF

I extracted them with an APK extractor.

The fact these apps show as not installed in the play store is very telling... they were not installed via the Play Store at all but from a 3rd party source. This likely means you have some kind of malware on your device. I would immediately backup all important data and factory reset your device, then only install apps directly from the Play Store afterwards. If you need some apps that are not available in the Play Store, turn on Unknown Sources, install the app, then disable Unknown Sources immediately afterwards.

Actually, in Android 9 this is an app level permission now. Look in Settings - Apps & Notifications, Special app access, Install Unknown Apps, and see what apps are listed as Allowed, if any are, you had to specifically give that app permission to install a 3rd party app. Often this is Chrome. I really don't like the new Android 8+ system for doing this, it has some dangerous potential because once you grant permission to install a 3rd party app, that app has permission to do so forever unless you turn it off manually... For Chrome, or any browser, that could be disastrous.

You were right, Chrome was allowed, among some other apps. Is there any way to verify that those apps were installed by Chrome? And most importantly, there should be no harm if the apps are not opened, or opened without getting any permissions. Right?

And I don't remember being prompted by Chrome to install any app. Being allowed to install apps, doesn't mean that they are allowed to do it without my confirmation?

There is no way to verify what app(s) Chrome installed, but there is also no way an app can get this permission unless you allow it manually. The pop-up window is a system prompt, it can't really be misinterpreted unless you chose not to read it. Some apps would legitimately require this permission, like alternative app stores, and in some cases Chrome as well if you have to install apps that are not in the Play Store (some of GSAM's extensions and XDA Labs come to mind).

One option would be to look at your Chrome downloads for any "apk" file, that is an Android application. If there are any, it would also tell you what site it was downloaded from.

What are the applications in question ?


text:
Boost sound volume on my MXQ Android box where Audio Boost apps don't work
This is MXQ Pro 4k box on Amlogic S905 chip.
It is embarrassingly quiet when playing through the AV jack with some good active speakers attached. My Ubuntu laptop is able to play loud on those speakers. The MXQ Box itself is able to play loud via the HDMI when connected to a regular TV.
I suspect Android thinks it's headphones attached to the AV jack and halves the volume to save my ears. But actually it's good speakers and I want it loud.
Volume boost programs don't work. One of them - "Volume Booster GOODEV" - splashed a baloon saying something like "Loudness Enhancer Effect" is unavailable to the app.
So I went redeye and started exploring the files on the device.
/system/etc/audio_effects.conf mentions the loudness enhancer twice, the .so file is in place at the path mentioned, looks ok to my ignorant view:
libraries: {
......
  loudness_enhancer {
    path /system/lib/soundfx/libldnhncr.so
  }
}
.....
effects: {
  loudness_enhancer {
    library loudness_enhancer
    uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c
  }
}

So I thought I am unable to give the Goodev app and plethora of other equalizers access to the effects, and started to dig more.
I somehow managed to add "volume steps" in the build.prop:
ro.config.media_vol_steps=16

unfortunately that didn't make the speakers any louder.
Is there a ro.config.media_vol_max_db anywhere? How do people know what magic letters to spell in the config?...
Okay, then I've googled about the mixer_paths.xml that allows people to boost the voulmes of their phones from some default 84 mystery units to 100... unfortunately, this is how my mixer_paths.xml file looks like:
<mixer>
  <!-- dummy xml conf, do nothing here -->
  <path name="speaker">
  </path>

  <path name="headphone">
  </path>

  <path name="main_mic">
  </path>

  <path name="headset-mic">
  </path>
</mixer>

Question: what should I try next?
The firmware looks a little like this if you want to really dig in
https://mega.nz/file/l1x0GLDY#p3hs8aZxIAMM5LwIOtfpyis_w7C7XPQgYYBevGxkAmc
the board looks like this
https://ds-blobs-3.cdn.devapps.ru/8413380.jpg
Add: There are some ALSA artifacts in the filesystem, too: /usr/share/alsa/alsa.conf and ../pcm/default.conf

I haven't ever fiddled with an android box, so this may be a stupid suggestion - obviously device is rooted (seeing what you tried), so why not install ViPER4Android (V4a) on it? // Be warned that V4a installation on a normal Android phone can vary from being easy to make you pull your hair out//Google XDA and other sources for the appropriate V4a for the Android version running on the box and you can tweak not only loudness, bass etc but it is only limited by the skill you have and your taste

@beeshyams, I'm trying but I'm having difficulties even finding an appropriate apk to download (nothing in Google Play, many links are dead or kinda sus)

What is the Android version? Check on the Telegram group here (I downloaded from here for Android 12 but it may work for you too but better to ask in the group) https://t.me/ViPER4AndroidFX

it's 5.1.1, the cpu can't bear any newer. it was collecting dust on the shelf because I gave up a couple of years ago to boost the volume... Will try the link (doesn't download from the web telegram for some reason)

I've seen this link but it doesn't work for me - server doesn't ping: Name or service not known. Tor tried too to no avail. Another link mentioned in the thread - https://zackptg5.com/android.php#viper - has some "magisk" zip which I only have to figure out what to do with. Thank you a lot for helping! I think I will eventually manage to try it. However there they say that you have to switch off some MusicFX - I do have one, and their functions seem duplicating. so I'm wondering if I'm able to increase the volume with some existing tool also

This may help https://forum.xda-developers.com/t/guide-how-to-make-viper4android-work-on-5-0-x-lollipop.3018961/

Let us continue this discussion in chat.

I already feel uncomfortable to borrow so much of your time for this, especially with me not really wanting to become an android hacker for just wanting to increase the volume of some chinese box. But if I dive into it (I already see the requirement to switch off the MusicFX and everything) I will ask you for some minor details in chat, thank you!


text:
I'm looking for the scatter file for MT6771v/c
I'm looking to flash a stock ROM onto my phone but the SP Flash tool says it's invalid. My phone's chip is MT6771V/C. My phone is currently on Android 10.
The internet (this link, for example) has scatter files named MT6771T_Android_scatter, MT6771_Android_scatter 8.1 and MT6771_Android_scatter 9.0 and I'm not sure which one to use.
I tried making a scatter file using the MTK droid tools but the only that showed up when I clicked on the "Block Map" button is [1, bmtpool, 0000000000, 0000000000, 0]

Does this answer your question? Backup/dump kernel image (and full ROM) without root for Mediatek Devices

MTK droid tools is outdated, use Wwr_MTK


text:
How to Run Captive Portal Server on Android Device using Hotspot SoftAp and DHCP options
Goal:
I want to run a web server that provides a Captive portal service on an Android Device, using the native Android Soft AP/Hotspot, Termux, NodeJs, and the "new" way to detect captive portals using a DHCP option: Captive-Portal Identification in DHCP and Router Advertisements (RAs),.
Approach:
I want to add an option on the DHCP handshake of my Android Device Soft AP as specified in the RFC, Apple and Android official forums.
(the old way to create a captive portal was to intercept and controll all DNS or HTTP requests of each device conected to the AccessPoint, but in order to do it I need to ROOT my Device and install a DNS server or change the IP tables, and I dont want to do it becouse is very similar of what I already did that on a RaspberryPi)
Current State:
Im able to run a local Http Server running Nodejs in Termux app on an NOT ROOTED Android device,I want to know if it is posible to ADD THAT SIMPLE DHCP OPTION to the Android DHCP native handshake, maybe creating an APP and using the wifi-softap-tethering utilities or changing some kind of DHCP config file in some location like /etc/dhcp/dhcp.conf to add the option.
If adding a DHCP option is not posible Im gonna change the IP tables or run a DNS server and intercept the trafic to provide the Captive Portal Detection as the OLD fashion way.
Previous Attempts:
I was able to create a captive portal using DNSMASQ and HOSTAPD on a RaspberryPi, I suppose that I can do the same on MY Android device, but I want to USe the "modern Way" using DHCP captive portal options.
Unknowns

Where is the configuration of the local Android DHCP?, is it hardcoded in the source code or it exists in a /system/{some-dhcp-func}/dhcp.conf file?
Is it posible to add a DHCP option to the native Android Soft AP functionality?
Can I use or extend some offical Class of Android apk and create my app to add the DHCP Option in the Handshake?
Do I really need to root my device, install a DNS server and intercept all the DNS /HTTP trafic to provide the captive portal functionality?

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.


text:
Stay connected to specific Wifi which has no internet
I have a Nexus 5 with Marshmallow and another device with a built-in 5.8Ghz WiFi which is used for transfering videos from it. When I connect to this WiFi it keeps telling me, that it has no internet connection and thus obviously disconnecting automatically to find a better one. How do I keep the connection?
Some things I already tried:

set the freq to 5Ghz only
delete all the other known Wifis
manually add the wifi

Unless the connection is stable, I cannot connect to the device with its corresponding app. Are there any apps which could achieve that?
EDIT:
Logcat prints the following when the device disconnects:
12-23 20:29:09.368: D/IpReachabilityMonitor(777): clear: iface{wlan0/21}, v{4}, ntable=[]
12-23 20:29:09.377: I/wpa_supplicant(4270): wlan0: CTRL-EVENT-DISCONNECTED bssid=00:e0:5d:91:1b:ec reason=3 locally_generated=1
12-23 20:29:09.381: D/WifiStateMachine(777): WifiStateMachine: Leaving Connected state

What I found out so far, is that this might be a kernel problem. However, I have not found any references to android in this case.

Related: How can I stop Lollipop ignoring my wifi network? / Disable Internet access detection of WiFi networks? / Phone uses 3G even when connected to WiFi

Thanks for the hints. The adb shell removed the exclamation mark and I do not get any notifications about the missing internet connection anymore. However, the connection is still being dropped after a short period. It stays connected approx. 10 to 30 seconds and then disconnects. It reconnects, however the video transfer is interrupted. Any ideas?

Hey Denis, this is annoying as hell. When I tell my device to stay on one connection, I expect it to respect my wishes, not play the "Me thinks me smarter than U dumb user" card.

I now also checked the wifi with a Samsung Galaxy S5 device and it is working like charme there. I have no idea whats wrong with the stock android.

I found a possible solution for my problem.
I simply set the DHCP settings to static, give the devices an appropriate IP and Gateway, and left the DNS preset as it is (8.8.8.8) by following these instructions: Is it possible to assign a static IP address without a DNS?
Afterwards it still complains about the missing internet connection, but this time it keeps the connection.
I tested it on both my Nexus 5 and Nexus 9, and it seems to work.

finally found this, I was about to put internet in the router, then only allow ICMP ping requests and block all other internet requests so that the client devices keep connected, I assumed if the clients have access to ICMP ping they won't show internet missing

Android is preset in SU global settings to drop a WIFI that has no internet connection. Even if you select to 'stay connected', it is fickle and may still drop the connection; and each time the cycle repeats, the connection will be lost. But the command to drop Wifi with no internet can be changed in the SU global settings (a bit like Bios on a computer).
Why is this set to disconnect now there are so many WIFI devices that are not internet connected, cameras, drones, alarms, clean networks etc., and the phone owner has no control of the connection because of a background command in the android OS.
If you are competent to use ADB and fast boot this shell command works on marshmallow:
type su to enter super user mode (likely needs a rooted device). Then type the following command:
settings put global captive_portal_detection_enabled 0

It disables the "drop wifi if no internet connection" function.