text:
Keeping Samsung mobile phone cool in car while making a Zoom call
I have a Samsung Galaxy Note20 and sometimes make personal Zoom calls to friends in my car as I live with roommates. I live in the Seattle area, so during the warmer months, it'll get anywhere from 70 to 85 or even 90 degrees Fahrenheit. Today, it's about 70 degrees outside today and I got a notification on my phone that it was overheating, even though I had my car windows open.
I'm thinking I could put my cell phone in an insulated container, and then put that insulated container in a cooler with cold packs in it and use Bluetooth earphones for audio on a Zoom call.
Would that work? Or does anybody else have ideas about how to keep my mobile phone cool in my car while making a Zoom call?

A little bit cooling may help but I remember that someone tried the something similar and in the end caused damage go the phone because the cooled sensor was a little away from the heat spot of the phone so that the phone overheated but the sensor stayed cool and could not throttle the phone. But if I remember correctly in that case there was direct contact between the ice cold cooler packs and the phone. Without that direct contact it should be safe.

Wow, it's concerning that a top of the line Samsung phone can't even make Zoom calls without overheating.  70F is well within indoor room temperature, so frankly, that's really bad engineering by Samsung.

@RockPaperLz-MaskitorCasket
The outside air temperature was 70F but the car temperature was probably way higher.

Ah, I didn't realize you had the windows closed and the AC off.  Even still, if the interior temp was a full 15F above exterior (you would be sweating quite a bit in a stuffy vehicle at that temp, especially if there was significant humidity), 85F is well within the expected operating temperature range for a smartphone... and if it was a video call, the phone would be away from your head allowing it to cool.

Here's the answer to my own question. Luckily it's been cold enough in the Seattle area to make Zoom calls in my car and I sometimes turn the video off when my phone gets hot.
When the temperate gets hotter I'll turn the video on my phone off and listen with wireless earphones via Bluetooth.
To further cool off the phone (like if the temp gets up to 85 or 90 degrees Fahrenheit) I'll put small cold packs (using a flexible gel cold pack) in a large insulated water bottle (like Hydro Flask Oasis 128 fl. oz. Container - 1 gal.), put my phone in a thermal phone case (like PHOOZY Apollo Series Thermal Phone Case), and listen to the Zoom call with my camera off via wireless earphones using Bluetooth.
Hopefully this helps someone.


text:
Hex editing app data (e.g. game data)
My question is I am trying to do some hex editing for an Android game that I play (increasing the amount of coins/cash in my inventory), but I'm not sure exactly which file to open up.
I will attach a screenshot of what I get when I open a file with my hex editor (the program I use is Hex Editor Free).

Apps on Android are running inside a "sandbox" where they can do what they want but not affect other apps.
This means any app including your hex editor app is unable to modify other apps. Also the files you see in the path /storage/emulated/0 (also known as /sdcard) are only the "public" files of the app. The bigger part is usually stored in the app-private directory where only the app itself has access to (on a non-rooted device).
If the game developer was not complete idiot editing any file you can see in your hex editor has no effect on your in-game state.

source: Stack Exchange

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

sort: votes


text:
Google Drive stuck uploading files
Three days ago I was uploading 6 files to a Google Drive shared folder. It's not the first time I do that, but surely this time was different because not only the files weren't uploaded but also since then I have this notification

To fix it, I tried to

Click cancel.
Restart the phone.
Force stop the app in settings.

yet none of these options worked.

Try clearing cache of Google drive app (enable show system apps in app list from settings)

In order to solve it, I've uninstalled the app and installed it back again. That solved the problem

No need to reinstall it, just clear data from app settings.

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


text:
Reducing Tx_Power for mobile hotspot - hostapd.conf
I am using rooted Samsung J2 pro with Marshmallow 6.0.1. My mobile hotspot uses a lot of battery. And this battery usage is reported by Android OS process by Smart Manager.
I have reduced the tx_power manually from 4 to 1 in hostapd.conf located under /data/misc/wifi/hostapd.conf but it gets overwritten whenever I switch on the hotspot.
How can I make it permanent or is there a way to change tx_power through adb?


text:
Is there a reliable way to know which is the home dir of the phone?
I'm making a program for termux and i need to access to the home directory(where are the Downloads, Android, DCIM, etc directories).
The problem is that i know that not all the phones have the '/storage/emulated/0', for example an old phone of mine had '/sdcard' instead
Any help is appreciated :)

The answer is it depends on the phone... There is no real "home" directory like Linux, but kind of, and in some devices it's /sdcard, others /storage/emulated/0, and in many /sdcard is just a link to the storage path (my Pixel for example). I think almost all phones have /sdcard as a link to the correct location for compatibility with older apps, but I don't know how long that will continue to exist, maybe a long time maybe not... Google is fickle.

/data/data/com.termux/files/home or $(realpath $EXTERNAL_STORAGE)?

Read (completely and patiently) my answers to Is it reliable to save some app files in /storage/emulated/0/? and What is /storage/emulated/0/?.


text:
How to track the source for an non-notification daily alarm?
Pixel 4, Android 11.
Every day on 12PM an alarm sets off, but no notification.
Only restart can turn it off. How can I track it cause?

Have you checked logcat for entries at that time?

Which commands would you suggest? adb logcat *:W | grep "alarm' ?

Just catch everything and then carefully read all lines just before and after the time the alarm starts. If you do this two or three times hopefully one or two apps will always be active at that time.


text:
Is it possible to build an Android conformant calendar app which stores its data as shareable file?
Or is there already one?
I don't know Androids calendar infrastructure so maybe my question sounds a bit fuzzy.
I dislike (non self hosted) cloud services but I like the ability to share my calendar among devices (and even people). Since I'm not alone I wonder whether someone already built a calendar app which stores it's data (encrypted) in a way which can be shared via Syncthing, Sparkleshare, Dropbox, ...
This app would have to 'monitor' changes on this file in order to update itself, notify the user about changes and not overwrite changes 'from outside'.
So my question is actually two questions: is (are) there such apps already (and how are they called, so I can search myself) or is this possible in the first place (or why not?).

A typical combination would be a self-hosted Nextcloud + a CalDAV Android app (AFAIK the good one cost a few bucks)

You may find success in finding out if such a software exists by asking a well-written on-topic question on Software Recommendations SE: https://softwarerecs.stackexchange.com/


text:
How to hide Youtube homepage and sidebar?
I want to remove Suggestions in YouTube homepage and sidebar as it is distracting. In PC, there are extensions to remove this(like "YouTube rabbit hole" and "DF YouTube"). But how to do this in YouTube mobile app?

Have you tried NewPipe? https://f-droid.org/en/packages/org.schabi.newpipe/

@AbhinavPB I have fixed the link in Robert's comment. Try it again. It should load in English language. The app he mentioned can do what you want. I have set it up to not show me garbage called "Suggestions" whenever I open it. To be clear here, it is an app in itself. It doesn't change anything in your YouTube app per se.

@Firelord Thanks. But,It seems that you cannot upload videos with this app.I have a YouTube channel and i open YouTube to post my videos.That is when i get distracted. Anyway it's still usefull when watching videos...

Is there any way we can hide these in YouTube app itself?

@AbhinavPB unlikely, since it's YouTube's own app and we can only use what settings that Google provides.


text:
Is there a way to group notifications by app?
So, my phone is running MIUI 12.5(rooted if it matters) and some apps just push individual notifications so each notification I get, shows up in its own bubble instead of showing them all under a group of notifications for this same app.
It's really hard since it takes up all my screen and if I want to search for notifications from a certain app I have to go over all the other notifications from the other apps..
Is there a way to force notifications from the same app to be grouped together in my notification bar?
Thanks

There are lots of notification history/recent notification apps that do exactly this.

This works for me on Pixel 4a running stock Android 11 (YMMV on MIUI)
Download and install from Play Store Notifications Organizer  . App description includes

Organize notifications by app

Grant the permissions asked and optionally toggle unread badge count and tool bar fixed (not sure what this does but I enabled it).
On getting notifications, a tiny bell icon flashes in status bar and you see notifications by app in the notification bar (relevant portion of screen shot below)

You can access the notifications through the app also (for easy access, drop app widget to home screen)

Note that only 5 apps are supported (in the notification bar, while no such restrictions apply to app interface) , so you would need to add apps to exclusion list to exclude them.
P.S. The app is being well maintained with last update of June end. In case it doesn't work as advertised, maybe you should approach developer. I am not affiliated with it.

not very comfortable.. I'm looking for something that would replace the shading...

What do you mean by shading? In any case, I will let the answer be, it may help someone else, because it addresses the core concern of organization by app

by shading, I mean the menu of notification which rolls from top. There are applications which replace the shading with their own(like power shading for example) but none seem to force group by app..

Got it. But then, this requirement should have been a part of the question, especially a bounty one. If that was the case, I wouldn't have answered at all! Anyway, do post your solution if you get one and in future please make your question as complete as possible so that you get what you want and the time and effort of one who answers isn't wasted. Best

shortest possible working solution : switch to a stock android based custom ROM. Stock android by default behaves the way you're talking about

Are you sure? Twitter is pushing each tweet as individual notification, and they cannot be grouped by end-user, even on stock Pixel 3a.

pixel 3a stock isnt running aosp androd either : by 'stock' i meant AOSP


text:
Completely broken (unviewing-untouchable) android screen - (known) patternlock - no google account
After my mobile screen fell I was asking if there was someway to draw my android lock pattern, I precise, pattern, NOT PIN, by using a keyboard, maybe typing corresponding numbers on the numpad...
Up to 80% and more of my android screen is completely black and full of cracks, with big regions of it completely unresponsive, which is far enough to cancel the pattern immission out while using the few responsive parts in touchscreen. I tried to blindly input the pattern with a usb mouse connected via OTG, but this is really really impractical, up to the point the mobile has started a very annoying song everytime I input an incorrect pattern and every few seconds the screen would dim cancelling out what am doing.
Google account was disconnected, as well as usb debugging mode which was deactivated.
I noticed keys like enter, spacebar, shift, and other buttons are operative on the screen when I use a keyboard, which would be perfect for my case. PS: Maybe there is a way to mirror the screen to a tv AND use the mouse at the same time? Or even some external mousePAD with a pen that I can use to PRECISELY draw the pattern and unlock the screen?
Thank you everybody,
Have a good day.

there is no other way than drawing pattern with usb mouse. do some exercise on another device until you got a feeling for doing it blind. once device is unlocked you should be able to connect a bluetooth mouse, enable usb-debugging and remote access device via usb with scrcpy

also check broken-screen tag wiki


text:
Is there a way to root a locked Motorola phone?
Someone gave me their locked phone and I want to install a custom rom on it but it's not rooted and developer options aren't enabled. The phone model is Motorola Moto G6 Play.

What means "locked"? SIM locked, mobile network locked, screen locked, bootloader locked?

Locked like they forgot the password and don't know the email (it's a child)

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

Does this answer your question? Bootloader Unlock Question: Motorola

Does this answer your question? What are the various ways an android phone can be locked?


text:
Why does "tar -czh" produce a corrupt archive but "tar -ch | gzip" work fine?
I am trying to backup a directory from a phone over adb.
When using the following command I get an archive which is corrupt:
adb exec-out "tar -czh /sdcard/DCIM" > backup.tar.gz

But with the following command the archive is correct:
adb exec-out "tar -ch /sdcard/DCIM | gzip" > backup.tar.gz

The two tar files are 48.8mB with a difference of about 200kB. The corrupt archive is smaller.
I am using adb at the Windows command line. It is necessary to receive the output as compressed data to avoid newline conversions. Both commands should provide compressed data.
My question is specifically asking why these two commands which should be identical are producing a different result.
The phone is running LineageOS 14.1 and is connected to a computer running Windows 10.

Unwanted terminal characters (printing or non-printing) may get included in the output which corrupt the archive. Use stty raw or dos2unix. See details under ADB heading in my answer to https://android.stackexchange.com/a/208114/218526

Is there a way to disable stderr redirecting when using adb exec-out to avoid such problems?

Does this answer your question? ADB pull stops after first error

FWIW, I also tried both commands (1 folder containing 1 image file) and both files were deemed invalid archives by 7zip. Opening them with Notepad++ (yeah, not the best tool, but worked nevertheless) shown them as binary with no readable text/error output appended.

@alecxs The archive as described in the question that was not corrupt works fine and the images are well formed.

exec-out mixed up stdout and stderr
in 1st example the tar stderr message "removing leading '/' from member names" is redirected into target file
in 2nd example only tar stdout is piped to gzip
to avoid broken archive silent stderr see linked duplicate

*2nd gzip stdout + stderr still mixed (but there is no)


text:
Why does Kingo Root app need network access?
I installed the Kingo Root (aka KingoRoot) APK on my Android device and launched the app. My phone was on airplane mode and I saw the screen

Kingo ROOT
Please make sure your network connection is stable and try again.

What exactly beyond the app itself does the app need to root the device that requires network access?

thx but this is common sense, furthermore such rooting methods are long outdated meanwhile ;)

I once rooted a device using Kingo Root. It installed a ton of extremely sketchy and borderline malicious adware. Would not recommend. Use Magisk if you can unlock your bootloader.

I was following along with this guy's tutorial Windows--Android Acquisition using ADB, root, ncat and DD

Not sure entirely, but this may be the reason why

KingoRoot was banned from the XDA Developers forum along with vRoot in November 2013 due to concerns with the information collected by the app during the rooting process.
https://en.wikipedia.org/wiki/Kingo_Root

Ragnar (Retired Forum Moderator)
Nov 6, 2013 at 3:02 PM
Be aware that as of this moment XDA has deemed the Kingo root method and Vroot method are not allowed on XDA. There are concerns with the information which is collected during the root method by the exploit. It is not about a continuous malware which may affect your device but about important information shared about your device, serial numbers etc during the root process which could be huge securities issues.
You have all been warned
Thread closed. If you have any questions regarding this please contact myself or any other moderator via PM
https://forum.xda-developers.com/t/kingoapp.2503591/page-3

Another suggestion is server access is needed to cross reference your device to a list of possible exploits that can be employed on it...

Kingo root download exploit from their server
https://www.quora.com/What-things-exactly-does-Kingo-Root-do-for-rooting

And this guy highlights a bunch of app permissions, bolding the privacy oriented ones for offloading user data to a remote server

it has its own service running in background which maybe pushing your data to their servers
https://www.quora.com/Is-KingRoot-the-one-tap-Chinese-rooting-app-legit-and-safe/answer/Faiyyaz-Shaikh

It also installs adware lol


text:
What folders on Android besides /sdcard, com.android.. telephony and contacts should be backed up to preserve common data?
I want to wipe my phone but backup as much data as possible that is stored on the phone itself. I can restore applications but things such as photos, SMS text messages, and some contacts are store on the phone and not synced with Google.
I am using ADB to backup to copy the folders /sdcard, /data/user_de/0/com.android.providers.telephony, /data/user_de/0/com.android.providers.contacts.
Am I missing any Android or Google data that might be stored exclusively on the phone (excluding anything from the Google Play Store).
com.android.providers.telephony contains SMS text messages and com.android.providers.contacts contains any contacts that are on the phone that are not synced with Google.
I am using Lineage OS 14 (Android 7.1.2).

https://forum.xda-developers.com/showthread.php?t=3862763

some apps will store stuff in /data/media/obb and some apps using TEE keystore. also check /data/user/0


text:
How to receive email when missing or receiving call or sms?
I have a couple of phones with their own sim cards and provider (for many different reasons) and so, given I don't want to:

Hear different ringtones
Hear the same ringtones but multiplied
Monitor all of those different sim cards/phone
etc

I thought of knowing how to get/receive alerts through email when receiving or/and missing phone calls and (if possible) SMS...
Is there an application existing for this? or some sort of setup? I'm well aware of the reverse existing (eg: sending phone calls/SMS for email) but after searching for a while, I didn't find much if anything that would do the above.
Any advice/answer/feedback is welcome. I'm on the latest android (but I don't mind using the older version).

User [tag:automation] // with MacroDroid set up a macro with trigger :missed call and actions 1.send email 2. Send sms//configure your email in settings

That's Nice...How come I never heard of this before? Thanks!

This answer is somewhat related

Yeah, but don't think mine is a duplicate given this is mainly about "direct" phone calls (eg: without whatsapp etc) and sms notification through email..But it is somewhat related yeah @beeshyams

That was just to give some pointers (not a dupe) //In my first comment I addressed missed calls only //you can tackle sms similar way, I have  SMS portion set up on my phone for selected originators (Bank etc)


text:
What version of Cyanogenmod did the `Developer Option->Root access` become available?
I see many references online that describe this Root access option in the Developer options for cyanogenmod images like this screenshot from a CyanogenMod13 device

https://www.androidbeat.com/2016/03/how-to-enable-root-access-cyanogenmod-cm/
However I'm tinkering with this older device which may have predated that feature.
Cyanogen OS version
12.1-YOG4PAS2QL

Android version
5.1.1

A related question that could help find the answer is to figure out what would be the appropriate repo in the cyanogen github (https://github.com/CyanogenMod ) to search for the UI that renders this set of options to check when it was first introduced? Basically which repo does the Android GUI go by?

I'm guessing the settings options are part of the Home app in the Applications layer of the Android architecture?
https://www.tutorialspoint.com/android/android_architecture.htm

Found a direct UI hit at least with some resource strings in the last/mainline branch that checks out from the repo by default which is cm-14.1. It started by finding a repository that happened to have the words settings and app in its name was a very strong clue to start with. In the screenshot above you can see that the UI reads Root access and that is what we find verbatim in this resource file.
    <!-- Setting checkbox title for root access -->
    <string name="root_access">Root access</string>
    <string name="root_access_warning_title">Allow root access?</string>
    <string name="root_access_warning_message">Allowing apps to request root access is very dangerous and could compromise the security of your system!</string>
    <string name="root_access_none">Disabled</string>
    <string name="root_access_apps">Apps only</string>
    <string name="root_access_adb">ADB only</string>
    <string name="root_access_all">Apps and ADB</string>

https://github.com/CyanogenMod/android_packages_apps_Settings/blob/c585070fc70c88643ca6f568f8c4cab6d21144a8/res/values/cm_strings.xml#L31-L38
Running a blame on that block of text lead to this diff
https://github.com/CyanogenMod/android_packages_apps_Settings/commit/9c512949b5cf487703a75abc7a56d0d98df59e32
Going back to the branch that is installed on the device, or at least the closest stable matching variant, I do in fact find that root access resource string being present. I'm hoping there's something interfering that I can twiddle to bring that option to the forefront again because it's not showing up.
https://github.com/CyanogenMod/android_packages_apps_Settings/blob/55eb0ad11d3359dc17a846a789627eddb5a1322e/res/values/cm_strings.xml#L31-L38
Doing a blame on that version leads to this commit...

Root over ADB is now disabled by default on non-eng builds
Requires support in su binary and adbd
Root access can be configured to use ADB only, apps only, or all
https://github.com/CyanogenMod/android_packages_apps_Settings/commit/c39be56248000ac1c88909874b28a80f5370fb2a

Snooping around further in that diff, it looks like I may be out of luck, or apparently at the time it was decided that user builds do not get this feature, but engineering builds do.
    private boolean removeRootOptionsIfRequired() {
        // user builds don't get root, and eng always gets root

https://github.com/CyanogenMod/android_packages_apps_Settings/commit/c39be56248000ac1c88909874b28a80f5370fb2a#diff-946ea451d6a9ad72c2548d8212f10a0aa8ccff901c6cbedd874673404c0ccbbaR422
The logic is all predicated on the build of the OS
https://developer.android.com/reference/android/os/Build#IS_DEBUGGABLE
https://developer.android.com/reference/android/os/Build#TYPE
Might be completely out of luck here because that is not something that can be changed at runtime as far as I can tell. This is a compile-time/build-time baked in attribute :-(


text:
DNS name resolution for local hostnames does not work anymore after android 9 > 10 change
I use my android phone(s) as a wifi hotspot, clients get IPs from the 192.168.43.0/24 network.
Previously, when the phone was running android 9, internal name resolution for those clients worked fine, as those were configured to:
[root@laptop1 username]# cat /etc/dhclient.conf
send host-name = gethostname();

and nslookup laptop1 yielded 192.168.43.xxx on laptop2.
Now, after the change to android 10 (new phone), this no longer works.
It seems like it is because dnsmasq was replaced with something else in A10 (Hotspot mobile network tethering and DNS). How do I get the original behavior back? Thanks.
Rooting is not an option, unfortunately.

Unfortunately you cannot force/configure Android's new Java DHCP server to remember host names of DHCP clients for later name resolution by DNS server (which is dnsmasq). Explanation on how things work is in my answer to https://android.stackexchange.com/a/215878/218526

Did not find anything about new java dhcpd in android 10 on the page you've linked, unfortunately. To cut it short - a bugreport should be filed against A10 dhcpd, right? This is a clear regression from A9-. Thanks

Android stack exchange is not the right place to discuss Android's internal functioning of DHCP. See the source code for that: https://android.googlesource.com/platform/packages/modules/NetworkStack/+/refs/tags/android-11.0.0_r1/src/android/net/dhcp/DhcpServer.java. But the DHCP server is not configurable as I already stated. You can rebuild your ROM though, with modified source code. My answer linked above explains how DHCP/DNS works regarding local host name resolution. Knowing the inner details, in some cases, you can hack the standard functionality according to your needs.

Thanks for link to the dhcpd source! I'll check what could be done there..

https://issuetracker.google.com/u/1/issues/189684136


text:
Sony Xperia stuck in boot loop due to no free space
My partner has a Sony Xperia Z3 compact that has been complaining of low space (~16 MB free) for weeks before now finally refusing to boot and it has become stuck in a boot loop. I have tried a number of key combinations to try and get it into recovery mode but none have worked and I have read that Sony Xperias do not have this enabled. The phone is not rooted.
Is there anything I can do to get either free up some space to try and get it to boot or to get the data off the device or should I consult a specialist data recovery company?
Many thanks

Very often you need to hold power and volume key up or down simultaneously and for a long time like half a minute

@beeshyams Yes I've read that these buttons need to be pressed when the led flashes blue, but it never turns on at all before going into a boot loop

I would suggest you keep trying to push the buttons for long because in a boot loop situation, you will not always see those prescribed indicators that show up normally // This may not guarantee work but it did for me twice (two different devices in boot loop). No harm trying

Try to see if it will connect to ADB.. It is doubtful but worth a try. If adb devices detects the device then fastboot should be able to bring it out  of it. Otherwise lets just hope it inherited Android's legendarily short battery life.


text:
How to get Android 11 to trust a user root CA without a private key?
I'm trying to install a new user root CA certificate in DER form (.crt file) on Android 11, without much success. The previous (expired) CA certificate worked just fine from an earlier install on a previous Android version (I don't quite recall, probably 9 or 10), but the same procedure I used back then (Security > Encryption & Credentials > Install a certificate > CA certificate) now shows the following error message:

Private key required to install a certificate

The answer by Benedito Marques in this question works, but as the other commenters say this completely defeats the purpose of having a private CA with a private key. I do not want this key my device, do I have any solution?

You know that installing a user root CA certificate is useless as apps don't trust this CA by default?

Ah, did that change in Android 11? It used to be this way on previous versions, can you point me to the docs for that?

No that is not something new. All apps targeting Android 7+ (API level 24+) ignore all user CA certificates by default.

@Robert, This is also usefull in a case of establishing WiFi networking with WPA-Enterprise security via EAP-TLS. Without this flag (CA:True) is not possible to install, then select CA certificate in HotSpot properties.

@A.Petrov Establishing a connection to a WPA-Enterprise Wifi is done by the Android system not by an app. Therefore what I wrote is still true: installing a user certificate is useless for apps.

@Robert root topic is not pointed which purpose is target for the CA certificate. Android system is prevent to install CA certificate without an attribute mentioned in the topic answer.

This page pointed me to the right direction.
Android 11 can only install user-provided root CA certificates to contain the X.509v3 CA:true flag, which I suspect wasn't necessary before for some reason, and kept on working after the upgrade until I tried to install a new one because, presumably, the flag is not necessary to validate a TLS trust chain.

The following command can check if a certificate contains that flag (replace input format and filename by the one you are using).
$ openssl x509 -inform der -in cacert.crt -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            ....
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = **, O = ***
        ...
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:TRUE
        ...

If CA:TRUE is not present under X509x3 Basic Constraints, your root certificate is likely not going to work on Android 11.

In order to generate a simple self-signed CA root certificate for Android 11, these minimal steps worked for me, and can be customized for your own certificate:
$ echo 'basicConstraints=CA:true' > android_options.txt
$ openssl genrsa -out priv_and_pub.key 2048
$ openssl req -new -days 3650 -key priv_and_pub.key -out CA.pem
$ openssl x509 -req -days 3650 -in CA.pem -signkey priv_and_pub.key -extfile ./android_options.txt -out CA.crt
$ openssl x509 -inform PEM -outform DER -in CA.crt -out CA.der.crt

The CA.der.crt or CA.crt files can be installed by going to Settings > Security > Encryption & credentials > Install a certficate.
Once installed, it appears proprely in the User certificates list, and all apps that try to connect to sites using that CA root succeed.
This answer appears to build on the same foundations but is much more complete and will probably work on more platforms, but the one above should be a good minimal working example.

I am able to create a CA cert based on your instructions and install it on Android. But for some reason when I create a site certificate based on the CA and put it on the server, I get a TLS error: unknown certificate authority. Any ideas?  Would you mind showing how you generate a site cert using the CA you created above? thanks.

@teleclimber Good question, did you append the CA cert at the end of the server subcert? I usually do something like cat server.pem ca.pem > /etc/nginx/cert.pem.

Thanks for your answer F.X. I think the problem is FireFox doesn't consider the OS trusted CA certs. It works in Chrome.


text:
Samsung mini data recovery
I'm trying to do a data recovery on a Samsung mini that was dropped in water (I think). The phone won't boot past splash screen and developer access isn't enabled. The best idea I've come up with so far is to do a hard resent and then try to some data recovery software on the phone after it's reset.
I just wanted to try and double-check before I did something stupid?
Many thanks,
Niall

Samsung has built slot of "mini" devices. Which one are you talking about and how old is the device (or what Android version is installed)?

Hi, it's the gt-s5570. I'm not sure which android version it is but I'm fairly sure it's stock. Many thanks

Quite an old phone from 2011. It should run Android 2.3 at least device encryption shouldn't be a problem on this device as it so old. What data are you trying to recover?

There's a very small possibility that I've some bitcoin in a wallet app on there, probably not much but I thought I'd give it a punt

flash this zip from recovery mode https://forum.xda-developers.com/showthread.php?t=2595705

Great, I'll give that a try. Many thanks!


text:
Why does Windows think my phone has 52 GiB of internal disk space whereas my phone sees 64 GB?
From my phone:

From Windows 7 SP1 x64 Ultimate:

because Android is wrong. it mixes up phone storage (64 GiB) with Internal Storage (52 GiB)

The phone flash storage is divided into several partitions. One partition is read-only and reserved for Android OS itself and other system data. On Windows you only see the user data partition where apps and app data is stored on. And this partition is smaller than the full flash chip as the other space is occupied by the system.

Your phone is showing you the total amount of storage inside your device.  This includes a bunch of partitions containing the operating system, radio image, preloaded apps, bootloader, recovery, etc.  These partitions are read-only, and many aren't even accessible within the Android OS, so they aren't exposed when connected to Windows—there wouldn't be any way to say "actually there's more space but you can't use it."  What Windows sees is the user-accessible space it can read from and write to, which is smaller than the total storage in the device.


text:
Privacy effects of disabling notifications through Android settings
Assumption
My question assumes the following situation, that is what I could understand about Google's push notifications system. If I misunderstood anything, please correct me here.
When a web service wants to send a notification to a user who installed its app (client), it sends the notification content to Google's push notification server. The server then contacts the user's device instructing it to show the notification.
This system prevents user's device from continously checking for notification, that would cause battery drainage and other annoying side-effects. However, some privacy concerned people point out that it allows Google to access all the notification contents, including for example private messages.
Question
If I have an app (client) that manages* notifications on my device for a web service and doesn't have an option to disable them, the only way I can prevent them to be shown is through Android settings.
To my understanding, if I do so the web service (that doesn't know my Android settings) will still send notification contents to Google's server, thus allowing Google to know notification content, but the server won't send it to my device. So, disabling notifications through Android settings wouldn't have any effect on privacy. Is that right?
*I use the word "manage" because usually the notifications are shown if and only if the app is installed and it often has settings for them (sound selection, vibrate and so on); however, I don't know how much notifications depend on the app and how much on the system. Anyway, it looks to me that it is not very important for the question (but I might be wrong of course).

Are you sure the app sends notifications? The rest of your question is about receiving notifications. Are those notifications individual notifications or mass notifications (sent to a larger group)?

It's not the app which sends notification, it's the web service that sends notification to Firebase server which is then sent to the device. Then it is delivered to the app for processing which is when e2ee messages are decrypted. It's private if there's encryption. Silencing notification doesn't stop this process.

@Robert In fact the notification is sent from the web service (thanks to defalt for pointing that out) the app is a client for; I corrected the question. About individual vs mass notifications, if you mean if they are sent to one user only or to many users (e.g. WhatsApp private message vs WhatsApp message in a WhatsApp group) I'd like to understand the answer for both the situations.

No, I don't think WhatsApp groups have an own Firebase Push address. I was talking about messages sent to a large group of users (typically 100 to 100k).

@defalt From your comment I deduce that notification content can be e2e encrypted from the web service server to the user's device. Is that materially mandatory or can be either done or not on developers' choice?

@Robert Thanks for the clarification. I'd like to have a general overview of the thing, independently from the the number of users receiving the same notification (or if it is substantially different depending on the numbers, for the possible cases).

Encrypted notification content is not mandatory. Most notifications are public info. For e2ee messaging, the content is already encrypted by the sender.

Push messages - what do they contain
What data each app receives via Firebase push notifications can be very different.
Some apps receive the complete message content as Firebase push notification to the user's app. In such a case Google can of course see the complete message.
Apps that handle privacy related content should use push notifications not as data transmission system. Instead they use push notifications just as notification for the app that new data is available on their own WhatsApp/Signal/... server.
Therefore for messenger apps I would expect that the push notifications may just contain e.g. a number the app processes and then knows that new data is available on the server.
Disabling notifications for an app
Regarding the question what happens if you disable notifications of an app in settings this also depends on the app:
The app itself can check if you have enabled/disabled a certain push channel. Therefore it is possible for an app to disable the notifications on server side so that no push messages are sent at all if you have disabled notifications for that app.
However a lazy app developer may not implement such a check. In such a case I would assume that all notifications are sent as before but just ignored by your device.

Some apps send the complete message content as Firebase push notification to the user's app -- I'm confused. Is the former highlighted term "apps" something different than what we users know as "apps"? Because I feel like this "apps" term here denotes something other than Android apps. And this "apps" (it is a web app) uses Firebase to send messages to the user installed app.

@Firelord Correct, it is better to write "receive" then it doesn't matter what server back-end is used (even if this makes it a bit unprecise as notifications that contain the complete message can be displayed by Android itself without having to "wake" the app at all). From the user perspective only the app itself installed on the device is called "app" but from a developer perspective often the term "app" comprises also the used back-end servers.


text:
Meomo's path data
My phone has problem and I get the following error for many programs:

Now, I want to refactor my Android, But I need to save my Memo's information.
 Where are my Memo's information?
UPDATE:
I think my data exists on my disk, Because when I open my memos, I see the following data:

I found ShareMemo directory, But it doesn't contain of my information.

By "Memo", did you mean Samsung's Memo app? We have some questions related to it, perhaps some of them might help. Otherwise, please mention the device model and Android version.

Regarding your updates, apps' data are usually stored in Internal Storage that cannot be viewed without root access. Please refer to the duplicate question.

Do I have to root my cell phone?

If you attempt to root your device all of your data would be deleted. All you can do is to see if the app offers an export or backup option. Otherwise, see if it can be backed up using adb. Otherwise, you are out of luck.


text:
Can't verify SHA256 fingerprint using apksigner
Just wondering if anyone can help me with the apksigner command line tool. I have just installed 'android-sdk-build-tools r30.0.3-4' on my linux machine and have subsequently tried to run the command 'apksigner verify <appname.apk>' as demonstrated on the following page, under the examples section, https://developer.android.com/studio/command-line/apksigner#usage-verify.
However, when doing so, I get the following output:
/usr/bin/apksigner: line 97: exec: java: not found
Am I missing a specific java package or something? I already have js78 and nodejs installed and updated.
Any help much appreciated :)

apksigner requires an installed Java runtime. What you have is JavaScript. Java is to JavaScript as ham is to hamster. Therefore you need to install a recent Java Runtime (e.g. openjdk-jre-8 or openjdk-jre-11)


text:
Smartphone laggy and slow: when a factory reset is ineffective
First of all, I would like to say that I recognize how tiring it must be to read about people asking for help to solve problems all the time. I tried to not be that person... but here goes my story.
I have  Galaxy S6 (SM-G920i), 4.5 years old, that I used a lot, and always served me well (within its capabilities). It is running Samsung's stock Android 8.1.
However, two days ago, out of nowhere, he became excessively slow. It was very sudden: in a second I was reading some messages on WhatsApp, and in the next second the device was not responding, taking many seconds to answer any command from me.
I decided to restart it. But even that I couldn't. It was as if it didn't recognize that I was hitting the screen lock button. Then I forced a shutdown (I connected it to the charger, and held the power off + volume key).
After that, I turned it on again, but now the phone was stuck in the boot loop: taking 5 or 6 minutes to boot (screen with the Samsung logo) and as soon as it went to the lock screen, it restarted on its own.
I did a search on some specialized sites and forums, and the first recommendation was to "Wipe Cache" through the recovery mode. I was able to enter recovery mode, but I received the message "NO COMMAND" on a blue screen with the green android! Moments later, while I was searching about that new and unexpected error, the recovery screen finally appeared. I selected the option to clear the cache (Wipe Cache Partition), waited for completion, and then restarted the device... No success there! The problem persisted. Bootloop again.
The next recommended step now was to perform a factory reset. Against my will, I did. But, unfortunately, it did not solve the problem: the smartphone is still very slow, it is taking several minutes to boot up, it is taking 3 or 4 seconds to respond to simple commands (lock, unlock, scroll, etc...) and is exaggeratedly slow to open any application (simple as it may be, such as a calculator). Sometimes it hangs and gets hot (e.g. if I try to open the camera). Even in the safe mode, it behaves this way.
I am aware that this problem may be something related to the hardware since the storage units have a life cycle (although unlikely, it is possible that this occurred in less than 5 years). That said, I am also aware that the problem may not have a solution.
On the other hand, hope dies last: have you guys ever seen something similar, even on other devices? Am I missing something? Is there a path that I have not explored? Is it (soft or hard) bricked? Or, considering the facts, it is indeed a dying device?
Thank you for your time!
TL;DR: A Samsung Galaxy S6 with 4.5 years of use suddenly became laggy and unresponsive. "Wipe cache partition" and "Factory reset" were unable to restore device performance. Is there a solution?

I would start with a simple benchmark test that checks CPU and storage for speed. Hopefully this will help you to identify which of both components is the lagging part.

Good point! Do you have a benchmark app to recommend in specific?

Sorry, I don't have a recommendation. Usually I don't have any need for a benchmark on a smartphone and I never encountered a situation like yours.

I am passing by to post a possible solution to those who have similar issues.
Although I cannot say it is definitive/long-term (I did it only yesterday) the device is really much more responsive now, and the hangings and crashes seemed to disappear.
The steps were (without deep details):
In my computer:

Downloaded a stock ROM from a reliable source (mind the exact version);
Downloaded Odin v3.13;
Installed Samsung USB drivers;

In my Samsung S6:

Wipe Cache (recover mode), then reboot.
Started it in Download Mode.

After that, plug the USB cable between the phone and the PC, and flash the firmware using Odin.
I followed these steps. It may help someone too: https://www.youtube.com/watch?v=UEnm5TU5KMw
In my case, I needed a factory reset after the flashing because the new FW did not erase the data. Now everything seems fine. I wish I had discovered that before buying a new smartphone. However, no problem... I'll give this one to my father. :-)
Hope someone finds this useful.
See you guys!


text:
GPT repair on EDL Mode deleted all partitions and bricked the phone
How could I repair broken GPT on bricked Android?
GPT eMMC disk is not detected by the computer. In other words, the GPT disk is not detected normally because all its partitions have been deleted.

How to detect emmc-utils in EDL Mode? How do I fix GPT disk in EDL Mode?

you know you can't run lsblk on phone this way, don't you?


text:
Number of cpu cores change in my systrace output
I have 4 cores cpu on my device,
but each time I use this command line to genetrate a systrace file :
python C:/Users/BJI/AppData/Local/Android/Sdk/platform-tools/systrace/systrace.py freq idle -o C:/Users/BJI/Desktop/systrace

I get a different number of cores (2 or sometimes 1 core cpu),
is it only the number of active cores ?

you can check how many cpu<?> under  /sys/devices/system/cpu/
for example, If CPU has two cores, there should be
/sys/devices/system/cpu/cpu0

/sys/devices/system/cpu/cpu1

I have 4 cores, even in my power_profile.xml I get 4 cores cpu, but it is different for the systrace output, sometimes I get 2, other times I get 1 core ...

if there is no trace event happened on that core, the systrace won't show the cpu core.  there is a very common power saving strategy when you turn screen off, the system will unplug some cores to save power; BTW, Is there some IM groups we can chat with each others to share experience with android. for example, port android to a new arm device?

thank you for your help @kevin , I don't know if this helps but here [ https://community.arm.com/f ] is arm community  where you can find many forums


text:
MTP unlocked by default - How to lock it?
I have a Samsung j730f and currently I am using a custom ROM and if I plug my phone into a computer (even with the screen locked), I can access to my data.
Please help me: how can I lock the MTP?

Which custom ROM are you using? Check developer options for this setting.


text:
Looking for Android 7 stock ROM Moto G5S plus XT1804
I want to flash the official stock ROM that came with my Moto G5S plus phone XT1804 i.e. India build. I searched but so far could only find the Android 8 ROM.
Why am I looking for this? I updated my phone to Android 8.1 December 2018 update. After that VoLTE stopped working. I can access the internet, send SMSes but can't make or receive calls. The VoLTE provisioned option in Phone Information is greyed out. I think that if I downgrade to nougat I may be able to get back my VoLTE. I have flashed other roms, including custom roms, too but no luck so far.

be aware other partitions like persist dsp modem may have important role too, always flash full stock ROM + firmware. also check your IMEI https://forum.xda-developers.com/showthread.php?t=3782387


text:
How to disable kiosk mode or install new firmware on Android tablet running MLS/MAIC?
I am new to the Android programming world. I own an iQR70 device from MLS that is using -if I read well- the kiosk mode for its own application called MAIC (something like Amazon's Alexa, a virtual assistant).

The real pain with this device is that the application is buggy, does not get any updates, and overall does not work properly.
So, my questions are:

Is there any way to disable the kiosk mode and work with it as a normal tablet? Or desperately,
Can I install compatible firmware? I don't care for the data inside.

I tried to install a stock firmware "Version: MLS iQR70 – 7.0_MT8167_V1.0_20180111-B1" from https://firmware247.com/mls-iqr70-firmware/ using "Format all + Download" using MediaTek SP Flash Tool v5.2052.00 and now it does not power up. It doesn't even connect anymore with the SP Flash Tool.

Is the device completely dead? Is there any way to revive it? I have two of them, can I download/upload the firmware from the good one to the bad one?

unfortunately "format all + download" will erase secro persist and other important partitions. but the issue is probably flashed wrong preloader which bricked it completely (not sure about, preloader is for iqr-70 and should still work). disconnect battery and try again

@alecxs, so there is no chance to revive it anyway?

there is meta mode if you can figure out kcol0 test point https://forum.hovatek.com/thread-11802.html

@alecxs thank you, I will give it a try. Can you tell me please if I can quit/exit from the "kiosk mode" of the virtual assistant that comes with this tablet? In the other one I own, I have no access to anything but the virtual assistant. I can get in ADB mode but the device is not listed and I can use the fast mode which OEM unlock is not allowed. What are my options?

@alecxs This device does not have a battery at all but I formated also the preloader.... which as far as I understand is the connection with the hardware itself. The problem where is that SP Flash tool can not see the device anymore!!!

regarding adb: you can try to flash modified boot.img if it is signed AVBv1. check with AIK it will tell you during unpack. instructions

"format all + download" only erased EMMC_USER (not preloader EMMC_BOOT). if device does not have battery disconnect power supply, preloader works without any power source

@alecxs I already did, but I get no response using SP FLASH. I think its totally dead!!. I will try the hardware solution. Regarding adb, you said to flash the modified boot.img. It seems that the firmware I downloaded it was incorrect for this device. So can I download the original boot.img to my HD and modify it someway?

do a full read back of the working device https://android.stackexchange.com/q/203283

@alecxs ok I will try. The "bad" one using ONLY the USB cable does not respond to "ReadBack" command using SP Flash, which means only hardware intervention, am I right?

not sure, depends on what you mean with "respond". order is important. 1.) start read back 2.) connect usb cable. VCOM preloader drivers must pop up for ~1 second in windows device manager each time you connect

That's the correct order I followed, I tested also the good one and it worked immediately. The bad one does not respond to anything I tried so far.

maybe there is a battery inside you don't know?

@alecxs A small internal batter like CMOS for time/date? Yes, maybe but its a compact device that I didn't open as you can see in the attached photo.

I think the only way is to see whether there is a code or secret tap on the Android device to see whether there is a chance of entering the back end. There must be a way, or else it would be difficult.
I found an article that teaches how to revert back to the original firmware - but I guess it needs someone to send you the firmware in order to have access to it.

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - From Review

I found a way to escape from the MLS default app and use this device as a tablet. The process is easy and can be done in a couple of minutes:

While you set up the device, you are asked to connect to WiFi. When entering the password, a keyboard pops up. Long press on the spacebar and press "Voice".

Then a Voice prompt pops up with a settings gear on the left, click this and a new pop-up will appear.

On the top-right side, click Help & Feedback and Browser will open.

If you previously connected to WiFi, now you have a fully working browser (you don't need to be connected to the internet). In the browser's top-right corner, click the 3 dots and tap on "Share page".

A pop-up will appear with two options.

Long press on the Bluetooth icon and go to Bluetooth settings.

From there, if you swipe from the left, the setting navigation bar will appear.

Now you can unlock ADB debugging, etc.

Notes:

MLS MAIC 3D app is being used as a default launcher, so you need to sideload another launcher e.g. Discreet Launcher, and use that as the default app.

Make sure to disable Bot Tester, MLS Updater, Video Calls, and all other MLS-related apps.

Some things are broken e.g. downloading from the default browser crashes (use Bluetooth, USB sideloading, or another browser)

Recent button is disabled

Notification bar is disabled

There aren't any Google services - so no Play Store. I personally use F-Droid.

Congrats now you have a fully working Android tablet :)
Cheers

Thanks for the answer. I will try it with my working device and I will let you know :-)


text:
Root Android with no apps
I want to root my Android 11 on Samsung A72 without using any third part app. Is their a way?
I cannot find anything on google on duckduckgo that mentions a terminal or a manual root.

A rooted device needs at least an su binary and and typically an app that handles su requests, therefore rooting without e.g Magisk is not possible. But if you are referring to those only on ancient Android versions usable apps like Kingroot and so on, then it is possible. Just unlock the bootloader and install Magisk.

To piggy-back on @Robert's comment, Magisk is trusted and opensource, so there's no reason not to use it (AFAIK, stay away from SuperSU as it's no longer opensource as of a few yrs ago)


text:
How to kill Whatsapp process without it resurrecting after a time?
On my Xiaomi Mi A1 if I go to Apps & notifications > WhatsApp and tap "force stop", the app seems to stop. But hours later, WhatsApp is strangely on again and I start receiving messages.
If there is a way to safely kill the process associated with WhatsApp so the app does not start again, what is it?

Some phones have the possibility to limit certain apps from running in background. If your phone has such a feature you can prevent WhatsApp from running. Otherwise you could only uninstall or disable the while app (while keeping the user data).

Run adb shell appops set com.whatsapp RUN_IN_BACKGROUND ignore. Or if you prefer GUI over CLI you may use my open source app PMX.

Also see How do certain apps show new notifications when internet access is restricted to them?

@IrfanLatif wow that's pretty specific thanks :) How can I run this command though, I mean where should I type that?

https://android.stackexchange.com/questions/tagged/adb

https://duckduckgo.com/?t=ffab&q=how+ro+run+adb+shell+commands

Thank you very much :)


text:
Which "app" is responsible for "open with"
Which (app / piece of software) that is responsible for this function?
The dialogue box that asks for which app to use.
    - complete action using:
    - choose an app:
    - open with:
Is it a package?
Can I disable it?
I know there is "open by default" and "app preferences"
Where you can set the default app to open automatically for some files, links, etc.
But sometimes the dialogue doesn't show up for certain actions. Like trying to upload a file on a specific browser doesn't prompt the dialogue but instead goes automatically to camera. Which is super weird.
Would appreciate any thread of info.

Edit:
Screenshot
"uploading file to Microsoft form using Google Chrome"

It's an Android framework component: android/com.android.internal.app.ResolverActivity. Related answers: https://android.stackexchange.com/search?q=user%3A218526+Resolver+Activity

But e.g. in case of the image upload, an app does not have to use this framework component. The app can instead directly open a specific app.

Thanks Irfan for the answer and the link. I will read them well.

@Robert, ok so you mean choosing an app to open file or link uses that component. But uploading file it works like sending/sharing file and it directly chooses an app? I feel like I'm missing something. What decides which of the operations to happen?

@RooTenshi No I wrote the app developer can implement it this or that way.

@Robert, oh ok I see got it. I added an image in the question. Can you verify if it's from that component or not? That's if there is a way to tell visually like having "only once" choice in some dialogues.

The screenshot you've added is that of  ResolverActivity when it handles ACTION_OPEN_DOCUMENT. // There's also a android/com.android.internal.app.ChooserActivity which usually appears when the app uses ShareSheet instead of simple Intent Resolver. Share Sheet doesn't have "Just Once" and "Always" options.

Thanks again, Irfan. That was a great help! Now I understand more.


text:
Redmi 4 just switched off
I have redmi 4 which was working fine. But it is now switched off. When tried to switch on it shows mi logo then android logo and again switch off. It is bootloader is locked, non rooted and usb debugging not enabled. So not able to connect via adb to computer. But only able to reach fastboot and recovery. And when conneted to computer via usb and fastboot via command prompt detects and shows the serial number. I'm tring to do something in short. Otherwise flashing twrp and then os again is long route; tried but in vain. As well as tried some YouTube,Google,Chinese Mi software too. Any help is appreciated.

bootloader unlocked?

No bootloader is locked

you can't flash TWRP on locked bootloader. 'fastboot oem edl' should reboot phone in EDL mode. install Qualcomm HS-USB QDLoader 9008 Driver and flash ROM with MiFlash. if still not working the emmc is weared out and device is end of life

Tried fastboot oem edl  response is C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot oem edl ... **FAILED** (remote: device locked, oem edl is not allowed) finished. total time: 0.010s

use deep flash cable or try modified Fastboot_edl-v2.zip or use test point method

so you did flash in EDL mode?


text:
Battery drain while doze, CPU abort wakeups
I'm running Android 11, in a Moto G30.
I've noticed battery drains from 100% to 80% from 1am to 9am when I wake up. I decided to get a bugreport.zip using ADB and load it in Battery Historian.
Seems like at some point in the night, JobScheduler runs and finishes in a minute, but CPU stays on forever (even on full doze state). Reasons seem to be several Abort:Pending Wakeup Sources related to networking. At these point, battery discharge rate is ~2.5% per hour, whereas "normal" screen-off / doze rate is ~1.5%.
These are some screenshots, and here's the bugreport.zip

Here's the CPU wakeup sources list,

And here's a previous time when JobScheduler runs and CPU behaved well,

if you can renew the bugreport.zip download I'll have a look


text:
Huawei Media Pad T5 AGS-W19, usb tethering missing, please help!
As per manual, there is usb tethering under settings. Followed exact instructions, but the option of "usb tethering" doesn't exist even when searched. The only option is "USB" which is currently in MTP, tried PTP, Charge only, Midi, all does not give me "usb tethering".
Developer options, turned on USB debugging, "usb tethering" still missing.
Tried restarting, factory reset, changed usb cable, changed usb ports, changed computers, updated drivers on pc, all of which did nothing to give me "usb tethering" on my tablet. I have an exact LTE version of the tablet, it has "usb tethering". The wifi version as per wifi version manual indicates there is usb tethering.
Please help?

Could you quote the WiFi version of the manual? I could only find online manuals that say "Use USB to share mobile data: Use a USB cable to connect your device to a computer. Open Settings, go to Wireless & networks > Tethering & portable hotspot, and enable USB tethering to start sharing your mobile data." (emphasis mine) on page 64 and  "Mobile data is not supported on Wi-Fi only tablets" on page 63.

https://www.google.ca/url?sa=t&source=web&rct=j&url=https://images-eu.ssl-images-amazon.com/images/I/D1JVS3ciTbS.pdf&ved=2ahUKEwjrmPKP8KbwAhWIKzQIHZxlAhgQFjADegQIBRAC&usg=AOvVaw3KcPJFlinI9U7xq-fHseUw

The page number is different, but the text is the same. I could only infer that the USB tethering feature is not included in the WiFi-only tablet... at least from the UI, though maybe there's a hackable way to do it.

I don't see why the manual say there  is usb tethering and it isn't. I feel like there some options diabled. I searched online, and I see other tablets having same issues after certain system updates. Anyhow, suggestions on hackable way?

Try settings up adb and then run this adb command from your PC when the device is connected via usb: adb shell svc usb  setFunctions rndis. If your Windows PC still doesn't get Internet connectivity than USB tethering might not be supported at all on your device.


text:
Certain apps lose all internet connectivity until reboot
I have put off asking the question for some time because I know it is vague and terrible to debug so I welcome your help refining the question as well as potential solutions.
A range of certain apps will report no internet connectivity and get stuck in that state no matter how good my WiFi and/or mobile data connection or if I force stop and/or clear their cache. So far:

facebook
instagram
onedrive
toktok
aliexpress
whatsapp (i get the clock symbol)
viber

Normally only one of these at a time, sometimes two. Never all! (so not just general connectivity issues). I ignore them for a day or two and they never recover connectivity. Chrome is never affected (yet) and I still get push notifications for said apps.
I am technical and have pondered dodgy dns but apps get in this state on and off Wi-Fi which should mean different dns servers, not just a quirk on my home network. I don't use a mobile VPN. I do have a work profile. My phone is a standard build Samsung S10 that behaved normally for over a year until recently.
Drives me mad because all advice out there is for fixing general/global connectivity as people always complain about that and turn it off and on again is a good solution for any single app getting into a funky state but this feels dumb, like the OS is caching/blocking/blacklisting something and I kinda wanna blame samsung or put on a tin hat and blame the government... yeah I am mocking myself now :)
So, any suggestions?
Ahhh! I just had two messaging apps go quitely into this offline mode. Toggle wifi, nothing. Toggle flight mode, nothing. I restart and instantly these send and retrieve messages. If i cannot relay on my phone to communicate it is useless!

In my opinion it's more easy for you to troubleshoot the problem, instead of others making guesses for you. You can use Termux or adb shell to use ping, dig etc. to see if connectivity works normally. If luckily the Termux app also loses connectivity you'll get to the root cause very quickly. Or if root is available you can switch to one of affected apps' UID and do troubleshooting. Might be a problem in your routing table, IP settings or firewall rules, or a bug in kernel which removes an app's UID from 3003 group, or one of other usual problems faced on any Linux OS.

Yeah it really feels like I need to get out adb shell however I ping and dig would only help if I debug the specific APIs of the apps. I will consider if i am capable of this. And then what? I don't know how routing or firewall issues could occur on a non-rooted android phone though...? Essentially i think I am searching for anyone who has seen these symptoms on a phone before - has experienced this issue

Wild guess - try turning off battery optimization and see if it helps //I know it's not logical but just saying..

Valid guess. Battery optimisation is off and none of the affected apps are in Background usage limits > Sleeping or Deep sleeping apps

Update: It appears to have been a intermittent issue probably due to a particular OS version ... TL;DR keep your phone up to date and fingers crossed


text:
Device stuck in boot animation after reverting to LineageOS 17.1
I tried to update my OnePlus One to LineageOS 18.1, following my usual procedure:

do a full backup (boot, system, data excl. storage, cache) with TWRP
then flash the new image, along with the zip files Magisk and microG

As I then noticed that Android 11 breaks some of the apps I use, I decided to roll back the update by simply booting into recovery, restoring the backup and rebooting. However, this failed with the system being stuck in the boot animation for significantly above 10 minutes.
I then tried the following:

boot into TWRP
flash LineageOS 17.1 from the previous image I had installed (plus Magisk and microG)
restore my backup
wipe caches

Still no joy, I am still stuck in the boot animation.
Suspecting the upgrade had converted some app data in /sdcard/Android/data, I moved all app dirs starting with com.android or org.lineageos off the device. (The rest should be user app data. I do not have Google Play services installed.)
That still was not successful, I am still stuck in the startup sequence.
I have never (knowingly) encrypted any data on the device.
What gives? How can I find out where the device gets stuck, so I can hunt the error down? Wiping all user data is not an option.

i think the real reason was one must backup system_image instead of system because of avb/dm-verity

@alecxs There is no such option in TWRP on my device.

Everything that is in the backup is safe to wipe for a test (it can be restored later).
Therefore, rebuild the system step by step:

wipe system, data (excl. storage) and both caches
reinstall LineageOS 17.1
boot
if this works, return to recovery, install Magisk and reboot
if the device still boots successfully, restore data and retry
if the device still boots successfully, copy back app data to /sdcard/Android/data (possibly one by one, or in small batches rather than all at once) and retry
if the device still boots successfully, restore the system partition from backup and retry

If at some point the system no longer boots (i.e. gets stuck in the boot animation or similar), you can examine the step that broke it in more detail.
In my case, it seems the backup of the System partition was faulty and caused the system to hang on boot. Since this partition does not contain any user data, it is easy to rebuild if you still have the system image: Wipe the system partition, reinstall LOS 17.1 and Magisk, wipe cache and Dalvik, then reboot. That fixed it for me.


text:
Fine Bluetooth Volume Control
I connect my Pixel 3 to JBL Flip 4 via bluetooth. The volume rocker buttons don't increment the volume in equal installments, which is very noticeable at the lower volume range. I installed the Precise Volume app to get the actual numbers and it looks like the bump from 12% to 13% is barely noticeable (which is how it should be) whereas from 13% to 14% is quite significant (which is annoying, hence this post)
If I use the Flip 4 via an aux cable this isn't an issue as the two volume controls become decoupled - the speaker's volume buttons affect the speaker's volume without affecting the phone volume, and you can get much finer control over the volume with small, equal increments (leave phone on 5-10% and play with the speaker's volume until it sounds good)
Basically, I am interested in being able to make fine adjustments to the volume coming from a bluetooth speaker, but it looks like it's just a bluetooth limitation that I can do nothing about.
Can anybody comment on with any thoughts or workaround ideas (other than using aux)?
ps: the actual use case i am after is that i like listening to audiobooks at night, don't want to deal with a cable in bed, really want to find a fully wireless solution where I can set the volume exactly right, but I kind of feel blocked by the technology and don't see a way around it

Found the answer:
To decouple phone volume and speaker volume enable what's now called Disable absolute volume in developer options (looks like used to be called Disable max volume)
Taken from here

Well, I found that option but it did no difference at all. I have a charge 5 and a moto x4 btw. Is there any extra step that I have to follow?

This made all the difference in my case, very loud at the low end. Brilliant.

@user349394 try to unpair and pair again device.


text:
Emdoor EM TS809 Dead Boot - KCOLO point wanted to revive
Flashing with a bad firmware to this tablet became completely unresponsive and does not switch on. M/B marks report that is created from Emdoor and its model is EM TS809.
https://www.globalsources.com/Voice-activated-speaker/MT8167-EM-TS809_R70-1173578814p.htm#1173578814
I tried to revive it, by shorting GND and KCOLO joints and reflashing with SP Tools. Unfortunately, joints do not have descriptions so I tried every joint without voltage. None of them worked. Does anyone know if this M/B has KCOLO or just COLO/KOLO joint?

Hi, I'll just want to let you know that while this device is running Android, the core of the question looks more like an electrical engineering question than an Android one. While this community has a broad knowledge of the Android system, I'm not even sure they know about the detail of the underlying hardware, like a motherboard and its joint...

I suppose you have right, a member of this forum purposed to search for this solution

look for kpcol0 at page 7 (AA2) https://www.pigworld.pw/wp-content/uploads/2020/12/PCB-Design-Guidelines-for-MT8167.pdf kp=keypad col=column (n)=0 https://patents.google.com/patent/US20130162452

@alecxs thanks  alecxs, I will check it and I will let you know.

@alecs I just saw the PCB of the MT8167. Are you suggesting finding the pin of the KPCOL0 and Grounding it? If yes, this will be a little bit tricky since the IC has BGA  packaging, and it's pretty difficult to find the correct pin, but I will give it a try.

i suggest to follow the printed circuit track to some test point. of course it's tricky guesswork, but maybe it works the opposite way and you can track it down to the right corner of cpu (AA2), at least :)

@alecxs thanks I will do it !

I will give it a try :-)


text:
Unknown "keyhole gallery icon" sometimes appears on lock screen?
Sometimes on my lock screen, an icon with what looks like a keyhole and some sort of gallery-related image appears for a few seconds and then disappears. It happens randomly when I turn on the screen on my phone. It shows among the other notification icons in the middle of the lock screen, and it always disappears by itself after a few seconds even if I don't unlock the phone.

The phone is a Samsung Galaxy S10.
I can't find any settings or apps that seem related or that have this icon, and I can't find the icon when Googling either.

The mystery is solved - apparently it has something to do with the "dynamic wallpaper" feature.
I'll leave this answer here in case someone else sonders about this icon.


text:
Can I tweak an app's storage permission and allow it to write on the phone but deny read?
The example I'll use is with an internet browser app — let's say Opera. If I allow its storage permission, I can download files on my phone (write) but the app can read its storage as well (I verified this by hitting file:///storage/emulated/0/ in the pathbar and I could freely browse all files on my phone).
If I deny its storage permission, it can no longer access 0/ but it also cannot download files.
If the download directory is pre-determined by the user, can we force it to only write and not read, thus being able to download files, without risking leaking data from our files to the app? I'm guessing maybe through ADB or something?

No. android.permission.WRITE_EXTERNAL_STORAGE always implies READ_EXTERNAL_STORAGE. You can possibly devise some trick if your device is rooted. Note that an app's private directories in shared storage are always accessible to the app. Or they can ask the user to choose a directory (using SAF) whenever a file is to be downloaded. Privacy-friendly apps don't force the user to grant Storage permission in order to allow downloading a file.

I mean, I've tried with Opera, Firefox and Brave and all three request storage permission, in order to download a file. Question: Just to cross-reference, I went to my desktop and saw that yes there's all the other permissions — Location, Camera, Microphone, etc. — but not Storage as well. Why would it only be on mobile and not desktop as well? :/

Because your desktop might not be running Android. Every OS has it's own permission set to control access to resources.

Well, at the time of my reply, I had just checked my Mac OS desktop, but I just checked on my friend's Windows 10 laptop and it's also not supporting the option to disable storage access. I wonder if it's the same on Linux.

I think I failed to make my point in earlier comment. Storage permissions (READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE) are specific to Android. How would you find those on Mac, Windows or Linux. It's something specific to an Operating System, not a software.

Oh ok, now I see. So, I'm suspecting my only solution is to keep the storage permission disabled on my browser app, and find an open source file downloader app (with its equivalent storage permission enabled), for whenever I need to download files from the internet? Well, open source, or just an app that one deems as trustworthy enough to not leak data, anyway.


text:
My Lenovo tab 4 M 10 is frequently switching off its own. How can I resolve this issue?
Can anyone say how to resolve this?
Frequently it is turning off its own.

Considering the age of your tablet a bad battery would be a likely cause. You can check by connecting your tablet to a charger. If it does not power off when connected to the charger it is most likely the battery. or testing you should be able to enforce the "switch off"using e.g. a CPU benchmark app (increases power usage).

There can be many reasons behind it. May be phone's battery is damaged. Or may be there is a background process which is never ending so in order to restore control phone turns it's all functions off.
You should probably take backup of your data and reset it.


text:
There's some weird storage nonsense going on, as if part of an app's data is permanent on your phone?
So, when I want to free up some space, first yesterday it said WhatsApp was worth 207MB, and then today it said it was only worth 166MB, What's happening here?!

Go in-depth to learn how things work and never get frustrated :) See How disk space is used on Android device? and Where Android apps store data?

We can't tell how you are freeing the storage. If you are using any third party app then it will free the caches of whatsapp. In which case no one can say how much storage is used by your whatsapp cache. Whatsapp it self deletes some caches when there is no need of it. So, if it's cache then it's totally normal.
Other than that you should look into Whatsapp's media folder where all your images,audio,video and docs are stored.


text:
Htc desire 628 bootloop in recovery mode after flashing TWRP
I flashed my phone with twrp, tried to enter recovery mode through the bootloader, but now it's on endless boot, how can I fix that?
In download mode:
hTC download mode

*** UNLOCKED ***
htc_v36bml_uhl PVT S-ON
LK-1.01.0000
RADIO-UNKNOWN
OpenDSP-UNKNOWN
OS-1.16.401.1
Aug  2 2016, 19:11:15(788931)

[options here]

Detecting smart card...
Reboot to ftm mode failed due to NOT_FIND_SMART_IO

In bootloader:
*** Software status: Modified ***
*** Unlocked ***
HTC_V36BML 128 SHIP S-ON

CID-HTC__A07
LK-1.01.0000
OS-1.16.401.1

When i select to boot to recovery mode, appears message, which says 'This build is for development purposes only', after that's boot freezes. OEM and bootloader unlocked, USB debugging enabled

'This build is for development purposes only is shown by the bootloader. It is simply a notification that the bootloader has been unlocked and thus the system may be modified/compromised. This warning is important for people you buy a used phone.

flash working twrp (1, 2) and reboot straightforward into recovery right after flashing, otherwise your custom recovery will be replaced with stock recovery

@alecxs, tried to boot right after flashing, same thing:
Writing 'recovery'                                 (bootloader) HOSD CL#788931
(bootloader) start@1
(bootloader) recovery@100%
(bootloader) Update partition OK
(bootloader) end@Done
OKAY [  2.585s]
Finished. Total time: 3.067s
Sending 'boot.img' (11924 KB)                      OKAY [  1.477s]
Booting      <---- on this step boot freezes```

there is also downgrade protection S-ON must be S-OFF. try revolutionary, rumrunner or firewater


text:
Locked out of S-Color K60 Android
I recently purchased an Android phone that i sent to my mom. But my little brother put some gesture password and forgot it! My mother dont know the gesture, kid is unable to recall and starts weeping whenever asked about it. As far as i remember USB Debugging was never enabled. Below are the options i have given a try to.

Now when connected to my laptop, i am unable to detect the phone as it is in locked state (Detected but not accessible).
Tried the wipe data/factory reset option through Android system recovery <3e> menu and once rebooted, it again asks for the gesture key.
In Recovery mode, it shows apply update from ADB but unable to find TWRP recovery zip file for my device (S-Color K60)!
In Recovery mode, it shows apply update from sdcard, i tried sideloading Pattern-Password-disable.zip from xda, but it said Installing System Updates, then it said Error and later showed Installation aborted.
Tried calling from other number and click back button multiple times to get back to the same lock screen!
Tried going to Emergency call dial pad and click numbers randomly with no luck.
When connected to my laptop and run adb devices command, it shows List of devices attached but the list is Blank, however when i got to apply update from ADB on phone and try to list the devices connected, it gives a sideload menu on phone with a serial number followed by sideload on my cmd screen.

So after too much internet search i could succeed in unlocking the phone yet. Are there any other ways to unlock my phone?
Device Details:
S-Color K60 (Something i got at a cheap price tag, link below for reference only)
https://www.wins4.com/s-color?product_id=15718&page=2

When you perform a factory reset if can not ask for the gesture key afterwards because that gesture is saved in used data that is erased when performing a factory reset. It can ask for the Google password (Factory Reset Protection). If your device is not a used device and it really asks for the gesture key after a successful factory reset it is defect. In such a case give the device back and get your money back.


text:
How can I create a list of files in a folder with adb, including time stamps?
I'm a new adb user and am trying to build some automation with images from my Android. I've been able to connect, 'ls' and push/pull files. What I want to do is determine the most recent file(s) in the Camera folder on the phone and pull that one. Is there a way to do this?
My command in Win 10 is "adb ls /path-to/Camera", which produces a list with some numbers preceding the filenames, e.g.
000081f9 005145e2 607f4c6e 20210420_144934.jpg
000081f9 004430cb 607f4c7c 20210420_144949.jpg
000081f9 0031701e 6080d67e 20210421_185054.jpg
000081f9 003847b0 6080e058 20210421_193256.jpg

If I add 'shell' to that ("adb shell ls /path-to/Camera") I just get the filenames, though they're in 3 columns:
20201121_144842_HDR.jpg 20210311_155639.jpg     20210421_185054.jpg
20201121_144902.jpg     20210312_225720.jpg     20210421_193256.jpg
20201121_144911.jpg     20210312_230021.jpg     20210422_065438.jpg

Can I save the list to an array or hash with timestamps? Or figure a way to determine the most recent files?
Thanks, Scott

Have you tried adb shell ls -l /path-to/Camera? -l means "long", ie. with details. Which parameters ls supports depends on how your device's busybox/toybox binary was compiled; full parameters for your use case would be -latr (Long, All files, sorted by Time Reverse (i.e. newest one first)).

The easiest way I know is to use find command. Search for how to find recently created files using find command. Use that with adb. If for some reason your Android's find binary doesn't support some arguments, use busybox's find or better, termux.


text:
How to reduce the size of thumnails folder in Android?
How can I reduce/get rid of the thumbnails folder in Android that is created under DCIM>Camera. I'm aware of the fact that thumbnails are auto-generated and will be generated again even if I delete them. But the point is my device has 6 GiB worth of the thumbnails folder, I keep almost no images or videos, still, it takes up a significant chunk, I know it is to optimize the loading of images in some apps, still 6 GiB in a device which has 32 GiB storage? And the worst thing is it keeps growing, never comes down. Is there a realistic way to bring down that 6 GiB to under 2 GiB. I'm ready to repeat this process every week or so if needed, I just need some space on my device.

Have you tried to delete all files in the thumbnail folder?

Yes, no help, the files go away for sometime but no space is freed

How do you know that those thumbnail files take up so much space? May be the app displaying the free/used space does not update the data after deleting or the files in that folder are not the one that use up the space. Make sure to check the current free space using an app like DiskInfo.

Yes, I'm using diskinfo and file manager, they always show up 6 GiB for the thumnbails folder or 6.2 GiB for the whole DCIM folder as I only have 200 MB of photos, even those are pre-installed wallpapers. Another reason is, I have 24 GiB total, as 8 GiB is system reserved. I add space used by apps and other files and I get a maximum of 18, I basically get 18 GiB space in a 32 GiB phone because of this.

It does not matter how much flash your phone has. The only value that matters is the used and free values shown by DiskInfo app for the /data partition. All the other partitions are of no concern to you. You still have not answered how you know that the thumbnails take so much space. My recommendation, use adb shell to access the file-system. That is the only way to get the real view of the file-system.

Here's the output of df -h command  in the ADB shell.
/dev/block/dm-2          22G   16G  6.1G  73% /data
It shows 16 GiB used, my apps are only 10 GiB, so clearly, 6 GiB thumbnails


text:
How can I remove contacts from a phone without removing them from my Google account?
I have a 2nd phone (LG Stylo 6) that I will only use for some specific things & do not want all my contacts on it.  I hadn't realized sync was on when I entered my email. I shut sync off but when I go to remove contacts on the Stylo 6 I get a message "This contact will be removed from Google Contacts & all your synced devices."
I don't want to remove the contact from my Google contacts, I just want to remove it from this particular phone. Is this possible? Or do I have to come up with a new email for this phone so my Google contacts aren't effected?

This is not a good answer, but it's how I ended up doing it:
Settings > Accounts > Google > select account > Disable contacts sync
Then delete all the contacts by clicking selecting one for example and then on the three dots and select all -> delete.
Disclaimer -> do not sync the contacts again.
If you want to then you will have to go back to an older version by using the web view contacts.google.com


text:
Nexus 7 2013 WiFi (flo) freezes and/or bootloops when booting TWRP
I unlocked my Nexus 7 2013 WiFi (flo)'s bootloader and flashed the latest TWRP (3.5.1_9-0 at the time of writing), but now it freezes on the boot/splash screen and reboots after waiting. I can use adb shell to access it, in there I see errors like this repeated over and over:
<3>[  305.099060] EXT4-fs (mmcblk0p30): VFS: Can't find ext4 filesystem
<5>[  305.158416] type=1400 audit(1620032012.811:24): avc:  denied  { read } for  pid=172 co
<5>[  305.158416] type=1400 audit(1620032012.811:24): avc:  denied  { read } for  pid=172 comm="recovery" scontext=u:r:recovery:s0 tcontext=u:r:recovery:s0 tclass=netlink_kobject_uevent_socket permissive=1

What might I do to get TWRP working?

I want to preface this by saying that the following is what worked for me. I can't guarantee it will work for you, but I wanted to document it here for the future in case I need it again or someone else finds it useful. I take no responsibility the possibility of this messing up your device even worse or not doing anything at all. I don't really understand why this worked for me.

First of all, reboot the device so that you're freshly in the TWRP recovery when you start executing the commands. The device seems to randomly reboot when in this state and it wouldn't be nice if that happened while re-creating the partition, so give yourself as much time as possible.
You will need adb on your PC to follow these steps. Explaining how to acquire it is out of scope for this guide, but I'm sure you can find instructions for your operating system online.
Note that you should not include the $ and # when running the commands!
Once TWRP's splash screen appears on the device, quickly run this command on your PC:
$ adb shell

Make sure you start the adb server with the right permissions before you try this as starting it up takes some time.
Following that, run this (in the adb shell):
# mke2fs /dev/block/mmcblk0p30

This formats the userdata partition. Let this finish. For me, the device rebooted right after, but you may need to do it manually.
After the reboot, you should be booting back into Android assuming you have a working Android ROM on the device. If it seems to be stuck, wait a few minutes. If it still seems to be stuck, try giving the power button a short press. This worked for me for some reason. After this, set up the device, go into settings, enable USB debugging, and run this on your PC:
$ adb reboot bootloader

After this, flash TWRP 2.8.1.0 (Not sure whether this is necessary):
$ sudo fastboot flash recovery twrp-2.8.1.0-flo.img

Boot into it and observe it boot Android instead for some reason.
$ sudo fastboot reboot recovery

Reboot back into the "bootloader" (fastboot):
$ adb reboot bootloader

Now flash the latest TWRP again.
$ sudo fastboot flash recovery twrp-3.5.2_9-0-flo.img

And it should work. However, in my case, I have to re-flash TWRP after every boot of Android.
I'm not sure whether it is necessary to flash the older TWRP version for this to work, but I thought I'd include it just in case.

Credit goes to this forum post for giving me a vague outline on what to do: https://forum.xda-developers.com/t/q-flashed-twrp-and-now-cant-find-ext4-filesystem.3096502/ (archived version: https://web.archive.org/web/20210503093052/https://forum.xda-developers.com/t/q-flashed-twrp-and-now-cant-find-ext4-filesystem.3096502/)


text:
Deleted all SMS! - unrooted Android 8.0.0 - Recovery Options?
I was deleting 2 SMS messages, I did long press on the 1st until the blue tick appeared then selected the 2nd SMS. I then quickly went to the top 3 dots to select 'Delete' and the next thing I saw is blue ticks by every SMS and 'Deleting' message on the screen.
The screen refreshed and it was blank - all SMS messages deleted :-(
What are my options to recover them?
I have looked at apps like Fonedog & Dr Fone but after they connect they state root is required.
My phone details;
Model: Mi 5
Android version: 8.0.0 OPR1.170623.032
Android Security patch level: 2018-10-01
MIUI version: MIUI Global 10.2 Stable 10.2.2.0(0AAMIXM)
In Developer options:
OEM unlocking is greyed out but it says "Bootloader is already unlocked" underneath (see screenshot below)
Mi Unlock status says "Unlocked"

Phone has been left turned off.
If the bootloader is already unlocked - could I try to root the device (with low risk of data loss) then try Fonedog & Dr Fone recovery again?
When I first got the phone I tried Kingo-root and similar apps but they failed to root the device. I didn't take it any further at the time.
OR is there a way I can dump the internal memory flash (NAND?) to pc and use data recovery to find & restore my SMS?
Your help and suggestions greatly appreciated - I had some sentimental messages I would definitely like to recover. I have removed the SIM, turned off Wifi, turned on aircraft mode and phone is turned off unused.
Thank You.
Mark

fastboot boot twrp.img, get sql database, examine with hex editor. if messages still there change deleted-flag with some forensic tool

Thank you for your reply.
I am following the guide but am stuck at 'fastboot flash recovery twrp.img' - all I get is < waiting for device >. The phone is connected and rebooted into FASTBOOT with the bunny on the screen - but after 1-2 minutes it just restarts.
Before I tried the "adb devices" command and it lists 1 connected device.
What am I doing wrong?

UPDATE: Looks like I got the latest twrp working. I'm viewing the internal storage in file explorer but there is no /data/user_de/0/com.android.providers.telephony/databases/mmssms.db showing. What am I doing wrong now? Do I need to allow modifications at the first prompt?

Sorry I worked it out now. I've found the file - do I copy it off the phone to pc or is there something else I should be doing?  I did search for a twrp users guide but haven't yet found a detailled English one.- if you know of one a link would be great :-)

db has over 1400 id's & 600 threads (so looks good) all '1' in deleted column! I guess the next step is to get the deleted column changed back to 1 and copy the amended db back to the phone?

ok. I ran your metadata command and it returned: -rw-rw----    1    671744 Apr 23 14:48 u:object_r:radio_data_file:s0 - I have taken backups and renamed the original db/journal on the phone (so not visible to sys). I have copied the amended db to the phone.

How do I update the owner/permissions/secontext on new db file? In twrp file manager there is 'chmod 755' & 'chmod' button

'chown 1001.1001 mmssms.db; chmod 0660 mmssms.db; chcon u:object_r:radio_data_file:s0 mmssms.db;'

ok. Rebooted and the SMS screen is blank but in the search bar in grey it says '1054 messages' which is the number of rows in mmssms.db - if I search contact names & phrases it returns results! But selecting one just opens the new sms window with  at the top. I checked the folder and a journal file has been created.

try to connect with MyPhoneExplorer maybe it will read the modified database. or try another app like Textra. or maybe there are more flags in other tables


text:
Does `pm uninstall` also automatically execute `force-stop` and `clear` on a non-rooted device?
This is for non-rooted stock ROM's.
To get rid of one single app, I've been executing the following commands:
(Step 1) disable-user
(2) force-stop
(3) clear
(4) uninstall
(5) clear
Steps (1) and (2) first — otherwise, if I just execute (3) before them, the app will (more often than not) launch itself again and start accumulating app data.
At this point, I've achieved to make an app useless. It is not running (force stopped), it has no data saved (cleared) and will not launch itself without me knowing (disabled).
If I wish to take it further and entirely get rid of it, I can execute (4) to uninstall it.
Step (5), might seem redundant, but I tested myself several times on two different categories of apps. The first one is system apps (i.e., the Settings UI has the option to disable it greyed out) and the other is typical carrier bloatware (you can uninstall it from the UI yourself without ADB)
If you run steps (1)‐(5) on a system app, you will get "success" on all five. If you run all five on the carrier app, you will get "success" only in steps (1)-(4). In step (5), you will get "app is not found" (or some similar message) instead.
So I said, maybe an "uninstalled" system app is still accumulating app data, if I can run clear as many times as I wish after it's uninstalled and still get "success". Is that the case?
As far as just disabling is concerned, I have verified steps (1)-(3) are necessary. But when it comes to uninstalling instead, are they redundant?
(i.e., does a simple uninstall also automatically execute force-stop and clear?)

force-stop
Uninstalling an app always kills all related processes. Keeping them running doesn't make any sense and can end up in an app crash. Therefore Android kills the app process(es) before uninstalling it.
clear
Clear data and cache directories is enabled by default. It is just the opposite if you want to uninstall the app but keeping data and cache you have to add the option -k to the uninstall command.
clear an system app after uninstall
System aps are located on the system partition which is by default read-only. Thus uninstalling an system app is not possible on a non-rooted device.
If you execute uninstall on a system app only the installed app updates on the user partition are removed and the system app itself is set to disabled. Clearing the data of an disabled app is possible therefore you don't get an error.

Got it. So, to sum up, I wish to disable? Keep it as is; steps (1)-(3). Wish to uninstall? uninstall alone will suffice and it's safe to omit all other commands. And that is whether it's a system app, pre-installed carrier bloatware, or pretty much just any app I downloaded from the Play Store myself. Did I get it right?


text:
How can I enable VPN only for a specific app?
I want a spesific app to be only connected through a VPN all the time, while everything else remains normal and not connected through VPN. How can I achieve this?
Moto C Plus | Android 7 | Rooted.

The app you are using to create VPN must have per-app VPN feature enabled. Or with root privileges you can try to manipulate the routing table manually. Android makes use of UIDs and SOcket MARKs to filter apps from VPN.

I use Afwall+ with Orbot (per app VPN supported). In Orbot I enabled VPN access to my app of choice (XYZ app). In AFwall+, I enabled VPN interface along with wifi and mobile data. In whitelist/allowlist mode in AFwall+, I allowed my XYZ app to only use VPN. As a result, my XYZ app can only access internet when OrBot is running and is providing VPN service. Otherwise, it gets no internet access. Other apps works fine without VPN.

@Firelord Hi, can you show your screenshot for AFwall+? How to make app only use VPN?

@KellinStrook Hi. I no longer use AFWall+. It became unstable on my Android 10 after a while and I could not fix the problem with it.

ProtonVPN has a split tunneling function  and destination access/non-access.

The windows version have this feature. The android version does not. You can include an app but you can't single-out an app to be routed thru ProtonVPN.


text:
How to reflash Htc Desire 628 properly?
I tried to reflash my Htc Desire 628 using fastboot, but got following log:
PS D:\platform-tools> fastboot oem rebootRUU
OKAY [  0.042s]
Finished. Total time: 0.043s
PS D:\platform-tools> fastboot flash zip firm.zip
Invalid sparse file format at header magic
error: write_sparse_skip_chunk: don't care size 915918919 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 115920967 is not a multiple of the block size 4096
Sending sparse 'zip' 1/3 (781249 KB)               error: write_sparse_skip_chunk: don't care size 915918919 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 915918919 is not a multiple of the block size 4096
OKAY [ 36.254s]
Writing 'zip'                                      (bootloader) HOSD CL#788931
(bootloader) ERR lzipv2_init : Cannot open file /dev/fastboot_download_U
(bootloader) aJ4Bc
(bootloader) ERR [SD_UPDATE_ERR] update_fb_ZIP_buf: can not find ZIP hea
(bootloader) der
(bootloader) ERR [SD_UPDATE_ERR] sddownload failed: 22
(bootloader) ERR Update zip file failed.
(bootloader) ERR ZIP ERROR, exit read zip loop
(bootloader) ERR ZIP signature checking failed...
(bootloader) Update zip file OK
(bootloader) ERR ZIP ERROR CODE, 22
(bootloader) end@Done
FAILED (remote: '22: fail to flash via downloadzip')
fastboot: error: Command failed
PS D:\platform-tools> fastboot reboot
Rebooting                                          OKAY [  0.001s]
Finished. Total time: 0.008s

I took 2PVGIMG_V36BML_UHL_L51_DESIRE_SENSE70_HTC_Europe_1.16.401.1_Radio_0.1524V28P45.0504.0422_1_release_483251_signed_2_4_masud.zip
firmware from there:
http://forum.gsmdevelopers.com/htc-firmware-unified/11239-htc-desire-628-2pvgimg-v36bml-official-stock-roms-18-03-2017-updated.html
in download mode:
*** UNLOCKED ***
htc_v36bml_uhl PVT S-ON
LK-1.01.0000
RADIO-UNKNOWN
OpenDSP-UNKNOWN
OS-1.16.401.1
Aug  2 2016, 19:11:15(788931)

bootloader and OEM unlocked, usb debugging enabled, is there something else missing or it is a matter of firmware?
Update:
adb log:
PS D:\platform-tools> adb sideload firm.zip
Total xfer: 0.00x
PS D:\platform-tools>

in twrp:
Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Starting ADB sideload feature...
Installing zip file '/sideload/package.zip'
Invalid zip file format!

Update 2:
Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Installing zip file '/sdcard/firm.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
Zip file is corrupt!
Error installing zip file '/sdcard/firm.zip'
Updating partition details...
...done

Update 3:
handle_cota_install: install cwpkg to /ota/cwpg.zip
handle_cota_install: install cwprop to cota/cw.prop
Write host_mode error
handle_cota_install: Can't mount /sdcar, 1 times
handle_cota_install: Can't mount /sdcar, 2 times

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

HTC update.zip is encrypted and does not respect the standard file layout. META-INF is missing, content is:
info.bin
zip_0.zip
zip_1.zip
zip_2.zip
zip_3.zip
zip_4.zip
zip_5.zip
zip_6.zip

Therefore this file can only flashed from stock recovery.