text:
Cannot install ip webcam app on Nexus 6p
I'm trying to re-purpose my Nexus 6p as a webcam. I wanted to install ip webcam on it, but the app store is is telling me that my device is not compatible. On the play store the ip webcam app listing states that Android 4.0 and up is the minimum required (https://play.google.com/store/apps/details?id=com.pas.webcam&hl=en). My Nexus 6p is running Android 8.1.0. It seems like it should be compatible and should be able to install ip webcam, but still it does not let me.
Any ideas why this might be and suggestions to try?

Try clearing space on your mobile by deleting big files or apps. Less free space can prevent installation // Is this isn't the case try sideloading

One thing I forgot to mention was this phone was stuck in a drawer for over a year. Ended up I had to update all of the apps in the play store and I guess some system app was also updated along the way. after that it installed fine.


text:
Force app to stay active
My phone has very low memory (2 GB of ram) and thus any app that is running in background is automatically closed after a minute or so. It appears in the task manager but when I open it, the app doesn't resume but rather starts up again.
However, apps like zoom or WhatsApp calls are not subject to the same background limit.
My question is, can I force other apps to stay active as well?

I have seen this question https://android.stackexchange.com/questions/18736/keep-the-home-launcher-from-being-killed but it doesn't seem to answer how to do it for non OS tasks

source: Stack Exchange

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

sort: votes


text:
Xiaomi Mi A3 - not booting - fastboot erase userdata
I’m a noob.
I follow a guide in the forum xda-developers to root my Xiaomi Mi A3
I executed the command:
fastboot erase userdata

After executing the command, I realized that I had deleted the partition.
Now the Device is only booting in to Fastboot.
How can i fix this?

Please edit your question and include the link to the guide you were using.

Sorry, cannot finde the trade anymore. fastboot erase userdata is the only command i executed except the command to unlock the bootloader.

But you wrote I realized that I had deleted the partition. so when did you delete it (note erasing just means deleting data not deleting the partition)?

fastboot erase will erase the whole partition, you must recreate file system with fastboot format:ext4 userdata (or f2fs)

use latest standalone platform-tools (no need for full sdk)

Thanks for the answers.

btw don't use flash_all.bat that will probably re-lock bootloader. download fastboot variant for your ROM version and flash only necessary partitions http://xiaomifirmwareupdater.com/archive/miui/laurel

Hello Teso. Unlike forums, our site allows the post author to edit their post to make changes - whether for removing content or adding one. Therefore, you don't have to make additional posts below. And so, please use "post your answer" button below only when you have an answer to post. :)

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


text:
Why do cell phones don't really turn off (unless battery removed)?
I've known this for a long time.
A quick google confirms that many people think the same.
Basically, that when shutting down a cell phone, the antenna still communicates with the tower. Triangulation will still work, as well as some other stuff.
Only when the battery removed, is a cell phone "really" shut down.
Not that I care but it's interesting to know why!
If possible, please provide primary sources - it's time to shut all the myths around this down!
Update, the following question has been suggested:
What is the fastest way to shutdown unrooted Android phone?
Obviously, this is semantically NOT equal.
The answer there, despite being a very detailed answer, does not provide the reason WHY the baseband processor remains ON.
For a technological feature to exist on perhaps Billions of devices, there must be a need for that... Especially since it drains battery and costs cellular tower bandwidth.

How would anything someone writes here change what you think? If you want a prove you have to do it yourself: Buy a Software Defined radio (SDR) and capture the GSM/UMTS/LTE frequencies used by your phone when it is shut down.

I don't understand your comment. I asked for a primary source on "why do cell phones don't really turn off" - do you mean that I am wrong and they actually do? Basically, I would like to know why - like, it costs battery, it costs bandwidth with the tower... If there's a reason, surely there's someone with the technical knowledge to explain, maybe refer to a document...

In Android everything radio related is a subsystem that operates inpdependent of the main OS. Usually this subsystem is shut down when you shut down Android. There might be some devices that do not shut down the radio subsystem completely but in my opinion this is more a bug than a "spy feature". The only subsystem that should run when the device is off is the real-time clock.

I think your main problem is the definition of "shut down". Shut down is when you press the power button for 2 sec and then select "Shutdown". Your  definition of "shut down" seem to be more like "shut down the display (switch the display off)"

yeah, I had a feeling that asking this question might make me look like some NSA-paranoid or 5G-hypochondriac... I didn't mean it this way! Have you never heard the same? That cell phones keep talking to the tower when shut down?

nah, I mean shut-down as in: press the power button for 2 sec and then select "Shutdown"

Does this answer your question? What is the fastest way to shutdown unrooted Android phone?

@IrfanLatif Thanks for the dig-up :) It does confirm that I am not the only guy thinking the baseband processor continues to work even when the phone is shut down! I just wished to know why? What would be a reason to want to keep the baseband processor up despite the user requesting to shut down?

why depends on who is asked. i have my own opinion (and i don't believe baseband is necessary for alarm clock)

@alecxs I respectfully disagree. Why does my Diesel car have a DPF? Because it emits toxins and the DPF reduces this pollution. I can refer you to the DPF patent and the reasoning behind it. I find it hard to believe a function like keeping the BB processor alive, has no technical reason... If you were inferring to espionage, that's a reason too, although I think there would be at least a "fake" reason for us to chew on!

just because you find it hard to believe doesn't force such reason exist. but good luck finding one anyway

so, you mean that about a million of bugs were fixed in the making of the cell phone as we know it today... And nobody noticed that the radio chip is still on despite the CPU shutdown? Despite draining the battery? Despite being a regular security risk for hackers and deep state to exploit?

no, you said. i would say it is willingly designed (and specified)

@alecxs again referring to espionage? I mean, I believe that is very much a possibility. Just in case you were not referring to espionage, would love to hear your reason

espionage implies that you are person of interest, i wouldn't use that as synonym for tracking. we do not mark birds with rings because we are interested in this individuals. it's all about the data. i assume commercial interests as origin, political interests as consequences of technical availability. think tanks can predict general possibilities years before a concrete usage case occurs. google maps live traffic or corona warn app are just two examples how that data can be used. telephony carriers cooperate with police since cell phones exist

A telephone that is not in contact with the local cell phone tower cannot detect an incoming call.  When someone places a call to your phone,  you probably want to get notified that your phone is ringing, even if you have hit the power button.  The power button turns off the display,  but doesn't actually shut down the phone.
Being in communication with the tower uses some battery power.  It's quite low,  but it isn't zero.
This is true for a smart phone, and also for a dumb phone.  A cell phone of 20 years ago also used battery to maintain contact with the tower.
Addendum:  When I tap the OFF button on my phone,  it goes into Standby mode.  The screen goes dark, and I have to enter a password before using it again, mostly.  But it still can accept incoming calls, and it alerts me when one comes in.  When I go through the POWER OFF procedure,  and somebody calls my number,  they receive a notice from the phone company that my phone cannot be located.  I do not know whether baseband operations are still drawing current.

poor wording on my part.  By "turned the phone off" I meant  "hit the power button".  This doesn't reall turn the phone off.  Will fix.

question is about completely turned off phone, not about just display/stand-by. baseband is active as soon as sim card and battery is inserted, no matter if phone is on or off (not even sim pin is necessary)


text:
Enable Magisk Hide on Magisk 20.4
Magisk 20.4 release notes say

Please be aware that MagiskHide is no longer enabled by default

(Emphasis supplied)
Default probably means there is a workaround to enable it but I couldn't find a way to do it or find anything on searching
Edit:Enabling Magisk Hide in Menu does not reveal the settings option to select apps for applying hide
How do I do that ? (Please don't suggest installing earlier versions, which I may well do, if I don't find a way )

Does the "Magisk Hide" option remain active once enabled?

Yes it does @Robert

You can find the option to enable "Magisk Hide" in the settings of Magisk app:

Afterwards the side menu has a new entry:

@beeshyams If I enable Magisk Hide the settings side menu gets a new entry.


text:
Is there any way to turn an Android device into a Google Home speaker and thus add it to a speaker group in Google Home?
In Google Home, there is this feature called "speaker groups" which allows you to play the same music simultaneously on several speakers, in several rooms in the home, etc.
I use this to play music in my entire home. However, there are still some rooms to which I would like to add speakers.
AFAIK, only Google Home speakers and Chromecast devices can be added to speaker groups at the moment.
I could go out and buy even more Google Home devices, but I have some spare Android devices and good speakers to hook them up to, so I figure that would be cheaper, better (in terms of sound), and environmentally friendlier.
So basically, to be clear: I want to have an Android phone hooked up to a speaker behave pretty much like a Google Home, and play audio in a room. I want to be able to add it to my speaker group for the entire apartment, so that it can play music along with my real Google Home/Nest/Chromecast devices, in sync with them.
It seems that there previously was an app that made an Android device emulate a Chromecast. That app was called CheapCast, but it now seems to have been taken down.
I also found an app that did let me receive Chromecast on my Android, but it did not show up in the Google Home app so that it could be added to a speaker group.
Is there any way to achieve this? I can use root, Xposed Framework, Magisk modules, custom ROMs, or whatever is needed.
The Android devices I have lying around are running Android 9.

@beeshyams Yeah you can convert a phone to a bluetooth speaker, but that will not automatically allow them to be added to a speaker group in Google Home. Simultaneous playback is the goal here.

With the upcoming update, it says speakers with Google assistants can be added to Nest. Maybe your Android devices qualify?

@beeshyams Sounds interesting, we can always hope!


text:
How to install Ubuntu-Touch on Xiaomi Mi A3
H!@all
I would like to install the Ubuntu-Touch on my Xiaomi Mi A3
How to start, were to download, how to flash?

The Xiaomi Mi A3 is on the list of supported devices and a link to Github from where you can (I suspect) download the source code.
The Ubports-installer is not working for the Xiaomi Mi A3 (no install script).
So I download the source code lunecrash-master.zip

Did i do everything right?
How to proceed?

Als-Lunecrash-20200605-2206.zip, dtbo.img, Installation


text:
Can I clear user data in gallery?
I've a One plus 5T and I need to take a lot of videos on my phone and even though I keep deleting them and cleaning my phone regularly the storage always seems to be full.
Apparently, my user data in gallery is taking up a lot of space, I was wondering if clearing this would also mean I'm deleting all the photos? This is the only biggest chunk that will free up a lot of space.

On one plus 7, I noticed that deleted videos aren't permanently deleted, so I use this app and I see deleted videos on "recycle bin" and deleting from the app clears up space. Try that

Thank you. I just hope my data doesn't get deleted!

It won't if you only clear recyclable bin - you can see the files in it too and take a decision


text:
Samsung Galaxy A21s
On my new Samsung Galaxy A21s I am trying to get it to open on the homepage every time I switch it on.
Presently, if I am on gmail and switch it off, and then turn it on it goes back to gmail.
What I want is that it always open in the homepage.
I unsuccessfully have tried to find a way to do this on internet.
Looking forward to your comments,
Regards, Mohan

"Switch on" means for you just switching on the display or do you mean booting up the phone?

By homepage and switch off/on if you mean home screen and sleep and resume your device, than use an automation app such as MacroDroid or Tasker. Very easy. You probably didn't get this answer because you are using incorrect terms for your objective.


text:
My Smartphone doesn't allow moving my apps to the external SDcard
So, my smartphone aren't allowing me to move the apps installed to the external SDcard (32GB).
Follow a list with the things which I've already did:

I've upgrade the Android system for your lastest version.
I also already formated my external SDcard. Regarding with that one, it's reading/writing files and folders absolutely normal.
I've already enabled the option "Force allow apps on external" on the "Developer options" section.
I also tried to move other apps beyond Telegram. For example: VLC and some games.

Smartphone Model: Samsung Galaxy A01
Android Version: 10

formatted as [adoptable-storage]?

There aren't that option. There are only the "Format" option

unfortunately, some vendors decided to disable that feature in gui (performance reasons?) but you still can try to format your MicroSD Card as adoptable-storage from adb shell command line

How to adopt SD card as internal storage on Samsung devices?

How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?


text:
Bluetooth devices keep hijacking the other device's connection on Google Pixel 2
On my Pixel 2 running Android 10, in the Bluetooth settings, there are several devices listed under Previously Connected Devices. My Bluetooth headphones are at the top of the list while my car's Bluetooth is at the bottom of the list.
I often listen to music on my headphones while walking to my car. When I start my car, my car's Bluetooth pairs with my phone and hijacks the audio so that it begins playing through my car's speakers.
Is there a way to establish connection priority with Bluetooth on Android so that if a higher priority device is already connected, then a lower priority device won't steal the connection?
Or is there a way to turn off auto-connect for some Bluetooth devices? After reading this, I assume that there is not: https://support.google.com/android/thread/41125271?hl=en
I'd like to keep my car as a paired device if possible so that if I ever do want to play music through my car speakers, I can manually re-connect to my car without having to pair first.

You might wish to disconnect your car from your device. I had to do this with one car (now gone) and I do not connect my phone anymore.

For the last part you can try automation with MacroDroid app, see this —haven't tested


text:
how can installing a custom recovery such as TWRP lead to a device going into a bootloop
I see a large number of posts stating that users ended up with their device going into a bootloop after flashing TWRP.
If TWRP is flashed to the /recovery/ partition, how is it possible for the device to go into a bootlop during a normal start up?

when altered a partition, that fails to pass the dm-verity sanity check

what relation does dm-verity have with android verified boot?

dm-verity is verified boot (at runtime) while AVB is verification of partitions (during flash or boot)

is there any relation between unlocking the bootloader and dm-verity or AVB?

that are three different pieces in the chain of trust, but it all goes hand in hand

so dm-verify needs to be disabled via adb first prior to installing a custom recovery or else the device will boot loop?

you can flash custom recovery and install disable_dm-verity.zip or no-verity-opt-encrypt.zip or magisk.zip to disable dm-verity. if AVB is problem for custom recovery, you can flash empty vbmeta.img to disable AVB

Does this answer your question? What creating bootloop when flashing TWRP?


text:
Different device compatibility depending on account
I am using the google play store website (play.google.com) on my Android device.  I have 2 accounts.
With one account, the app says "This app is compatible with your device".
But, when I switch accounts and go to the app page again, I get the error "You don't have any devices".
Device compatibility should not dependent on the account, right?  What is going on here, and how do I fix it?

Check on https://play.google.com/settings to see which devices are registered on each account. Device compatibility can be either related to the device spec (e.g. Android version, CPU architecture, etc.) and non-device spec (e.g. current country based on registered payment methods).

Is the second Google account registered on your device and usable in PlayStore app on the device? A lot of apps are only available for certain devices, a certain carrier or a certain country.


text:
Whatsapp backup for new and old chats
I recently accidentally deleted a chat in Whatsapp for Android 7.0 "Nougat". I know if you uninstall and reinstall the app, you can download the backup containing these old messages. Now my problem is, this certain contact messaged me again after deleting the chat, so if I use the uninstall method, I lose all the chats from after the deleted ones. If I say "backup now" as to keep the new messages, it will delete the old backed up messages and only keep the new ones. Is there any way I can have my bread buttered on both sides and get my old messages back while still keeping the new ones?
Thanks in advance.

No. Unless your device is rooted and you merge both databases, which is complicated and results in varying success!//mail yourself those chats from the contact and keep it safe. You have a record that can be used though not in chat format. //Delete and restore account  with old backup as usual

If these messages are important, you can root your phone in order to restore them.
There are many methods to root Android 7 to use at your own risk.
WhatsApp make a backup of the messages database each day at 2:00 AM, these databases are stored encrypted in /sdcard/WhatsApp/Databases/. The key used to encrypt the backup is stored in /data/data/com.whatsapp/files/key which can be accessed only if you have root privileges.
To restore your previous messages:

root your phone
enable USB debugging
dump the encrypted databases

adb shell pull /sdcard/WhatsApp/Databases/

dump the key

adb shell pull /data/data/com.whatsapp/files/key

use this python script to decrypt the encrypted databases:

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

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

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


text:
ad blocker w/ vpn, or vpn with ad blocker?
Simply, (S10e no root) does a ad blockers vpn do the same as a vpn app like cyberghost? Installed adlock then wondered if there VPN being focused on blocking ads would lack in hiding traffic etc. Would it be better to get a vpn with ad blocker. I apologize if this question is simple but could not find a streight answer. Privacy would be the main thing I would like to accomplish but ad lock worked very well would I be OK keeping ad lock in the privacy dept.

VPN based ad blocker apps only use Android's VPN API (not a real VPN protocol) so that traffic goes through them before leaving the device. They filter out the malign domains/IP addresses (listed in a downloaded or user-provided hosts file) and let the rest of the traffic go out as it is. Actual VPN apps also use Android's VPN API but they encrypt the traffic with a secure protocol (like OpenVPN), may add some more obfuscation, and then send the traffic to some VPN server, which forwards it towards the actual destination. Some apps may combine the both functionalities.

Relevant comment: https://android.stackexchange.com/questions/228642/using-vpn-to-proxy-all-data-to-a-remote-ssh-gateway#comment298980_228642

Most VPN based ad blocker Blokada don't work like traditional VPN systems, instead the VPN server is located on the same Android device. Outside of your device the traffic is just normal Internet traffic exactly as it would be without VPN based ad blocker.
The VPN based ad blocker uses the VPN system only for redirecting the traffic into the app for being able to filter the traffic. On unrooted devices the VPN system is the only way to get access to the traffic of other apps, therefore the Android VPN-client is used.
On regular VPN systems the VPN server (endpoint) is located on a server somewhere on the Internet. If the VPN is active all traffic that leaves your device is encapsulated (protected + encrypted) in a VPN data connection that is sent to the VPN server and there the data is unpacked and sent to the original server. Therefore the traffic that leaves your device is totally different and because of the additional server in-between the latency can increase depending on where the VPN server is located.
Of course it is possible to add ad blocking features to a traditional VPN.

+1 To add, if your device is rooted some Ad blocking apps that create a server as explained can also be routed through a VPN app. I have this set up Adguard +Solid soft VPN. Solid soft VPN takes care of the encryption portion (though that also has some Ad blocking features)

@beeshyams Thanks I've looked into root for my unlocked S10e snapdragon as I understand it can't be rooted at this time. If you have different info plz share.

@Twillie I am not aware of Samsung rooting issues but I do hear that they can be tough, so you must be right


text:
How to backup data from recovery screen?
I am using Color OS 7 (Realme UI) on Realme 2 Pro. The phone is booted in recovery mode and I cannot start it normally.
I have some data (other than Contacts, SMS and Photos) which I would like to take a backup of.
Is it possible to take backup of data, perhaps by inserting a MicroSD card and copying the data from phone storage to that card or could I connect it to PC to take data backup?
Software: https://www.realme.com/in/support/software-update (Realme 2 Pro, Realme UI v1.0)
I am thinking to download the file to an SD card and try installing it from there. Will the data be lost if done so?
P.S: The bootloader is locked, I did not install TWRP also.

for RMX1801 there is TWRP or Orange Fox available, for RMX1807 you can find Red Wolf or R2X2 (unfortunately none of that comes with encryption support) so you are left with ColorOS recovery (which maybe can flashed from EDL mode)

maybe related: https://c.realme.com/in/post-details/1135432471341432832 and https://piunikaweb.com/2019/06/04/realme-shares-workarounds-for-realme-2-pro-bootloop-problem-after-android-pie-coloros-6-update


text:
How to download video from Youtube, FramaTube, Media CCC or mp3 from SoundCloud?
I'm using Mi 5, I want to download hot trend videos from Youtube, FramaTube or video conferences from Mediaccc and then make the tiktok video for fun. How to reach this?
Also, sometimes I want to listen Youtube music or offline video while screen off. I found some answers but it is not working. Anyone can suggest me?

Try this
HBTube. It allows to play Youtube background, download video, audio from multi platforms. No Ads when watching videos. You can visit HBTube Online to see more detail.
Good luck!

Hello. Are you affiliated with this app? If so, please disclose the affiliation.

Thanks you. Just tried this app. Exactly which I want to find. Very good!


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

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

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

consider physical reason (loose sim tray)

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

svc data disable


text:
Flashing TWRP.img on Xiaomi Mi A3 to root the device does not work
Working on Ubuntu 20.04. I want to root my device to uninstall some apps (.apk) and possibly also install Ubuntu Touch. I want to uninstall almost all Google apps because I don't have a Google account and I don't want to. Without a Google account, you cannot use most Google applications (Gmail, YouTube, Drive...).
A few months ago when I bought the device, I unlocked the bootloader, but I didn't have time to root it. Now I want to root it.
I followed these TWRP for Xiaomi Mi A3 instructions and cannot flash or boot the TWRP.img.

I downloaded: twrp-installer-3.4.0-0-laurel_sprout.zip and twrp-3.4.0-0-laurel_sprout.img renamed it to twrp.img and twrp-installer.zip.
I copied the files to the device in /sdcard

adb devices
adb push ~/Downloads/twrp.img /sdcard
adb push ~/Downloads/twrp-installer.zip /sdcard
adb reboot-bootloader

fastboot devices

fastboot flashing unlock
...
FAILED (remote:         Device already : unlocked!)
finished. total time: 0.000s

fastboot flashing unlock_critical
...
OKAY [  0.026s]
finished. total time: 0.026s

fastboot flashing get_unlock_ability
...
(bootloader) get_unlock_ability: 1
OKAY [  0.000s]
finished. total time: 0.000s

fastboot boot twrp.img
downloading 'boot.img'...
OKAY [  1.174s]
booting...
FAILED (remote: unknown command)
finished. total time: 1.175s

fastboot flash recovery twrp.img
target reported max download size of 804261888 bytes
sending 'recovery' (39892 KB)...
OKAY [  1.172s]
writing 'recovery'...
FAILED (remote: (recovery_a) No such partition)
finished. total time: 1.174s

Did I do something wrong? How can I root the device?
To recover the device follow this instructions: https://c.mi.com/oc/miuidownload/detail?guide=2
--EDIT--
fastboot getvar current-slot
current-slot: a
finished. total time: 0.002s

fastboot --set-active=b
Setting current slot to 'b'...
OKAY [  0.039s]
finished. total time: 0.039s

fastboot flash boot twrp.img
target reported max download size of 804261888 bytes
sending 'boot_b' (39892 KB)...
OKAY [  1.181s]
writing 'boot_b'...
OKAY [  0.207s]
finished. total time: 1.388s

Press and hold volume up button on device and enter the command fastboot reboot
Back in Fastboot

fastboot --set-active=a
Setting current slot to 'a'...
OKAY [  0.039s]
finished. total time: 0.039s

Press and hold volume up button on device and enter the command fastboot reboot

Do not press any key boots in Android-OS

Are you trying to root? If so you need Magisk, see instructions. Just by flashing TWRP, you are only changing recovery from stock to custom //XDA is the best place to read up on such things and you'd need to do that first

** the same path where you have adb and fastboot** I do not understand that.
Does this mean that I should switch to the /home/USER/Downloads/ folder?

I can't answer that. You'd better ask in XDA

I followed the guide and now my device only starts in Fasboot-mode. No longer boots normally in Android-OS. No problem I can fix it but it didn't work.

I am sorry but I can't help

try TWRP 3.3.1-2... same thing

@alecxs, I downloaded the MIUI10. On which partition should I flash it? To the boot, recovery or... ?

No images inside the .zip care_map.txt, compatibility, compatibility.zip, META-INF  payload.bin, payload_properties.txt

Let us continue this discussion in chat.

If your active slot is A, change it to active slot B. Then flash twrp.img and reboot the phone while pressing the volume key "+". Now you are in the recovery and you have to reinstall it in slot A. For doing this, change the active slot to A and press install, and select again twrp.img.


text:
how to identify on command line terminal emulator apps and packages that have active network connections
I tried this using an app and I am able to identify most apps and their  network connections however there are certain apps listed as  '?' so apparently it is not able to identify a package name I would like to know how I can get this information on command line using termux or any other emulator. I am magiskaly  rooted on an Android 10   phone
also would like to get a list of apps that can modify contacts and then revoke modification of contacts from certain apps by command line

and on command line how do I force kill an app I mean I can use the hang -9 Signal ....but I am sure there must be a more gentle package-level way of force stopping an app title the equivalent of getting inside the app property on gui and clicking that force stop button

also delete the cache on command line

what I want to do is write a `batch` script that will overwrite certain app specific files that the app keeps resetting every time and then force stop and clear `cache` and restart the app

If you mean by network connection the applications that has "android.permission.INTERNET" permission, then run this shell script:

for package in $(pm list packages -3 | cut -f2 -d":"); do
dumpsys package $package | grep "android.permission.INTERNET: granted=true" > /dev/null && echo $package
done;

If you want to list all applications that are connected to internet:

netstat -tuplna

That will list all application that has an established connection

If you want for each App an their mobile data usage:

for package in $(pm list packages | cut -f2 -d":"); do echo $package; pm dump $package | grep  "Mobile network"; done;

To kill an App:

am force-stop PACKAGE_NAME

Clear cache:

pm clear PACKAGE_NAME

Good Morning  thanks for responding I actually extended the question with some other related subs as well if you have a chance to respond to those .....will then gladly ✅ this off.


text:
Can i root my Sm-G970u1? (snapdragon)
I recently bought a unlocked S10e g970u1 thinking I would be able to root. All info I have seen says this can't be done if has snapdragon, which mine is. I have AT&T now but as I understand it the carrier is not the issue in this case so changing the Sim card wouldn't make a difference. I'm no expert here and appreciate the help.

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

Note that by rooting as far as I know you will permanently disable the Knox security feature for this device and hence all apps that rely on Knox will no longer work.


text:
Moto G8 plus - Android 9 - no support for sms message restore from Google backup - how do I manually access these messages?
I need to restore a Moto G8 plus running Android 9, turns out according to the carrier the crucial messages app does not support restoring SMS. Can I debug and manually access these messages? If so how?

MyPhoneExplorer

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

You can try the app mentioned here to backup and see on PC. To restore you can use one of many SMS apps that are available


text:
Android prevent brightness from dropping below some percentage
I had the following situation. In my phone I might accidentally drop the brightness to 0.  .When that happened I could not do anything. I had a hard time unlocking my lock-screen using a pin code. I had to use some flashlight to be able to unlock my phone and reset the brightness. Now in order to prevent this in the future I want to set a threshold (lets say 30%) that the brightness will not drop below that threshold. Is that even possible?

The minimum brightness mode is as far as I know a fixed value that can't be changed on an unrooted device. A too dark brightness is very rare, usually it is the other way around. I would recommend to prepare your device: enable developer options and ADB plus authenticate a PC by connecting it. For entering the pin use a simple USB keyboard that works blind and after unlocking you should be able to set the screen brightness via ADB.

Apps like this allow you to set brightness level

You can use ADB to setup the brightness:
adb shell settings put screen_brightness 255
the value can be between 0 and 255.


text:
Android 9 Pie where are SMS stored please? What is the path to the SMS database?
Android 9 where are SMS stored please? What is the path?

/data/user_de/0/com.android.providers.telephony/databases/mmssms.db

Here is my current path:
/moto g(8) plus/Internal shared storage/Android/data
I cannot see anything at the moment with user_de

Internal storage /storage/emulated/0 is just a view of /data/media/0 - as you can see that is a subdirectory of /data - for that you need root access

Right it's a moto G8 plus. Wondering what the easiest way to root is, sorry about this but need help

rooting requires unlocking bootloader (which performes factory reset)

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

As mentioned by @alecxs, the sms are stored in the database: "
/data/user_de/0/com.android.providers.telephony/databases/mmssms.db" which need root privileges to access it or edit it.
If you don't have root access, you can interact with the table sms in this database using ADB:
list all SMS
adb shell content query --uri content://sms

list SMS from +2121212121
adb shell content query --uri content://sms --projection address:date:date_sent:body --where 'address=+2121212121'


text:
Save file as PDF using Microsoft Word's app
I have a .docx file that would like to save as .pdf.

If I click in the three dots in the upper right

And clicking the Save As doesn't allow to change from .docx to .pdf

The way I managed to do up to this was to click Share As PDF and send to my email. Then, from there, download it. But surely there must have an easier option. Also this method didn't work all the time.

Instead of clicking Save As, click Print. Then, in the top there's a dropdown from where it's possible to select Save As PDF.

Then click in the yellow circle with the download icon and the text PDF and select where you want the file to be saved. That's it.


text:
using fastboot to turn on Pocophone F1
My power button is broken internally, I can't press it to turn on my phone. How should I turn it back on? This is what I do and fail:
Holding volume down and plugging cable I get the fastboot logo, I run Command on SDK.
I enter> fastboot devices (it gives me the device number)
I enter> fastboot reboot OR fastboot boot OR fastboot continue
Everytime I get this error:
Rebooting                                          FAILED (Write to device failed (Unknown error))
fastboot: error: Command failed
Using PowerShell on SDK folder or using minimal fastboot I get no error BUT just like before my phone says "press any key to shut down." instead of booting to OS.
What should I do? Thank you (also tell if there's another way to turn it on)

have you installed adb?

The Windows command fastboot has to be installed. The preferred source is the Android SDK, but there are also minimal installations that contain just adb and fastboot.

Robert, I did download fastboot and ran PowerShell by Shift+RightClicking in the downloaded folder. (it has no installation file or copy root)

why are you using powershell?

I installed minimal adb and fastboot installer, android SDK  and 15 seconds adb installer. Yet everytime I command reboot my phone says press any key to shut down instead of booting to OS. I use everything cmd, powershell, minimal...

I edited my situation in the post, please help me fix it.

use cmd.exe and standalone platform-tools https://android.stackexchange.com/a/221384


text:
Which files does `adb backup -apk -shared -all -f <filename> back up?
I wanted to back up everything on my phone: call logs, messages, whatsapp texts, photos, videos, screenshots, screen video captures, recordings, app data... and everything else, before selling my phone. So, basically, data-wise, I wan't to create a clone of the (entire) current state of my phone. I don't necessarily wan't to restore all of it on my new phone, but I want to be able to access the stuff that I backed-up on my computer later, when needed...I saw a few answers on this site, but they don't answer my questions fully.

Is the command line adb backup -apk -shared -all -f <filename> well-suited to my purpose?
My phone has 32G capacity, but the backup file generated is only 5.3G. How do I know that the backup completed properly and contains all the data I wanted?
Are there ways to do the backup over a network (WAN) using ADB, instead of having to depend on the USB debugging mode.

Does this answer your question? How to fully backup non-rooted devices?

Does this answer your question? Transfer Android app with offline data to NEW PHONE without ROOT

Answers:

No,  adb backup will only backup the applications that has Backup option enabled.
It depends on which data
Yes, you use can connect to ADB over TCP (https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp).

Details

List applications that probably can be backed up:

adb shell
for package in $(pm list packages -3 | cut -f2 -d":"); do
dumpsys package $package | grep "ALLOW_BACKUP" > /dev/null  && echo $package;
done

Probably: WhatsApp has ALLOW_BACKUP flag but cannot be backed up with ADB.

Verify the backup:

To verify the application has been backed up successfully, you can use the Android backup extractor tool.

Storage backup:

adb pull /storage

Backup SMS:

adb pull content query --uri content://sms

Backup contacts:

adb shell content query --uri content://com.android.contacts/data

Note that adb is not encrypted or protected at all (security equivalent to telnet). Therefore using it over a WAN connection is not recommended. I would recommend to only use it within a private WPA2/3 secured Wifi network.

Note that -shared includes shared storage (SD card contents), so your point 1 is a bit incomplete. But you're correct: apps can opt-out of backup and thus would not be included.


text:
USB-C port not working as a host to use with USB OTG or HDMI adapter
I have a Samsung Galaxy A9 which I'm trying to connect to an external HDMI display by the means of a commonly-found USB-C to HDMI adapter like this one. Connecting the USB-C input "lights up" the adapter, and Android shows the adapter as charging, but it does not work with multiple HDMI cables and monitors.
After searching everywhere with no avail, I noticed that the notification area shows that adapter - briefly - connects and disconnects multiple times before it disconnects permanently (while still showing that the adapter is being charged).
Some screenshots:

Here the USB connector is shown connected (it disconnects soon afterwards, but I couldn't get a good shot of it) and charging.

Now the device has "disconnected" (I presume?) yet still charging.
I also tried forcing the phone to act as a host of the connection in the settings, but that also fails.

How can I enable USB OTG in my device (if it's not already enabled)? I take that the device should be able to do this screen sharing since it was produced in 2018, and I've seen older devices in videos performing it just as well. What can I do to fix this USB error and enable other things (such as a USB hub or a keyboard) to be used together with the phone?
Similar questions to this one are very old and not quite close, so that's why I'm asking again.
Many thanks, feedback is appreciated.

Common USB-C to HDMI/DisplayPort adapters require that the USB-C source port contains a DisplayPort signal on the USB-C alternate mode connector pins. Currently the list of smartphones that support a DisplayPort signal via alternate alternate mode is not very long. I found this list: https://en.everybodywiki.com/List_of_devices_with_video_output_over_USB-C

Thanks, Robert, this helps. I already see my phone isn't on the list (my mistake, perhaps), but that doesn't explain the other side of the question about the USB interface itself.
Perhaps I should "activate it" somehow? Or is there a similar list for USB OTG support?

It turns out that my device is not HDMI-compatible and will not transmit over that adapter (or any other, apparently).
Props to Robert for finding a (generic?) listing over here:
https://en.everybodywiki.com/List_of_devices_with_video_output_over_USB-C
(In case anybody else is googling this and can't find a solution, I highly recommend checking your device against the list above.)
Whereas at first I was a little skeptic of this insight, buying a USB-C to USB-A adapter and testing out with other devices like a USB mouse or keyboard confirmed that the port itself has no issue - it's the HDMI output that has a problem.
I'll look into alternatives on how to cast my screen in another way.


text:
Security of Solid Explorer Hash
I am not sure if this is the right place to ask, but how secure is checking file hash with Solid Explorer for Android?
I don't have computer access so it's my only option.
Does anyone know if it's a bad idea like if it collects file data that way or uploads it to a database, or does it literally just calculate the hash and nothing more so it's safe to use?
I've never done it before so I'm lost.
This is for my files not to compare files.
Actually are Google play store hash apps safe at all?
I'm aware sites are not as they can be collected into a data base and out in the open, but are the appstore apps secure?

PlayStore is not Fort Nox. Google tries to prevent the worst but they can't guarantee security of any app. If you just want to generate the hash of a file a smaller simpler app is usually better as it is harder to hide something in a smaller app. Anyway if you just want to calculate some file hashes I recommend to use an app from F-Droid store, e.g. Hash Droid. All apps in this store are open source directly built from source by the store itself.

I understand, thank you, but now my bigger question is does hashing a file upload it's contents at all when it has to calculate?

Sorry but the question in your last comment is formulated in a way that I don't understand what you are asking.

Sorry, when you calculate the hash of a file, does it expose the actual file contents to the program/application? I'm asking because the file contents determine the hash number, correct? Does it read the file contents?

Computers don't use magic, hence if you want to compute the hash of a file the file must be read from the first to the last byte. There is no other way to calculate a hash. Therefore Hash Droid app is perfect because it is very simple and has no permission at all, no internet, bluetooth, or whatever connection can't be opened by this app.

If you're okay with Linux command line, you could use Termux. You could check checksums for wg, to check md5sum, you could use md5sum nameofapp.apk. There's also sha256sum, sha512sum and more if you want to check that out as well.


text:
Can contact information from my lock screen be available without a password on startup?
I just got a Samsung Galaxy S9 with Android 10. In my current configuration, I have observed this rough state machine as it starts up.

The Settings > Lock screen > Contact information is a great feature. However, I see no way to ever see that message in any of the grey states without the password. Is it possible to configure Android so that the contact information is accessible from any state, or at least from powered-off or out-of-battery, without disabling all security features?

https://www.gihosoft.com/android-recovery/add-emergency-info-android-lock-screen.html

Looks like your device uses full disk encryption (FDE). For that encryption Google decided to use a seperate miniOS for entering the boot password. Therefore this miniOS is independent of the main OS and can't be configured at all (except for the required password). Therefore your lock screen info is not available in this mode. Modern devices use a different encryption mode (FBE) where the device directly boots Android up to the lock screen. Changing the encryption mode is only possible with root and a custom ROM.

@Robert Android 10 forces FBE

@alecxs If the device comes with Android 10 FBE is the default. But the S9 was upgraded to Android 10 and as far as I remember the encryption type does not change on an upgrade.

It came with 10; this makes a lot of sense, but is a bit wierd. I could presumably make an emergency call, which I think connects with my cell carrier, something much more difficult then simply modifying a local text field?

i am using android 7 and i can reach emergency information as submenu from emergency dialer

@alecxs so "emergency call," contrary to implications, does not phone 911 instantly? I can press this safely?

@alecxs That is only relevant for the initial Android version a device is launched with. Galaxy S9 was launched with Android 8 and upgraded to 10. See Samsung statement on FBD/FDE

in my country 911 is not a valid number

@Robert thx for clarifying! looks like Samsung is "violating" android guidelines (and a proof that indeed android 10 is able to run on FDE)

@Neil pressing "emergency call" button will show the dialer where the user can input any emergency number (not only 911, but also 110 or other valid emergency numbers on the user's country), or additionally accessing emergency info.

The July 1, 2020 security update also adds the contact info in the state "Your phone is encryted . . . " Simply downloading and installing this 1GB update makes all of the state machine blue.


text:
The phone is stuck in download mode and gives error verifying vbmeta image. The device is a205f samsung
The phone had magisk pre installed and I tried to flash a stock rom and after that I manually locked the bootloader from the download mode. Phone is stuck on download mode, odin unable to flash any firmware. It just gives re partition fail error. Device is A205F. Please help?

with locked bootloader you can only flash official ROM from Odin or Heimdall, congratulation to your first brick https://gsmxt.com/rom-combination-galaxy-a20-sm-a205

I had this exact thing happen to me on a Galaxy S20 FE. @alecxs How can I flash official ROM from Odin when Odin unable to flash any firmware?

@hdsenevi try to flash vbmeta_samsung.img from Heimdall, then try Odin again. post your solution as answer

you should extract ap file and out recovery.img.lz4 and change it to recovery.img.tar,at first flash pit file then  flash recovery.img.tar (uncheck reboot) then go to recovery and reset factory your device. it works for me.


text:
How to install TWRP or any custom recovery for a device that's not listed?
My phone is Tecno Camon 15 Pro, and I cannot find any custom recovery for my device. (e.g. TWRP, OrangeFox, Pitch Black, or others). How do I install a custom recovery on this or any such device for which it's not available?
There are tutorials like https://kitikus.com/how-to-install-twrp-custom-recovery-on-tecno-camon-15-pro/, but I am too afraid to try as I have bricked my device once before. Or do I have to accept the fact that it's not possible for devices not listed there?

If your device is not listed u can port a recovery from a device having same chipset like mediatek mt6582 if anything went wrong phone will boot loop so make sure to have a stock recovery and Rom image in pc

The problem is if u want to Install custom Roms and they aren't available then u have to build from sources at own

try to port TWRP from Camon 12 (Helio P35 is most likely just a overclocked Helio P22)

Its not available for Camon 12 either

You have to extract the stock ROM first and then port TWRP for your device.
You can follow this or this guide.

Your post mainly consists of external links. If the linked web pages go down or the URL changes then your answer will be useless. Therefore always quote the important info from external sites when linking them.


text:
How Do We Set the Default Camera App in Android 11?
In Android 11 Beta 3, Google is blocking the ability for third-party camera apps to handle photo/video requests on behalf of other apps. Interested developers can read the release notes for the rationale behind this change.
However, there is one odd sentence in that explanation:

A user can set a third party camera app as the default camera app.

Here is the "Default apps" screen in Settings:

I don't see "Camera" on there. And if I search for "default" in Settings, I do not see an option for setting the default camera app.
So... how do we set the default camera app in Android 11?

I am on Android 11 (Pixel 4a) and was searching to do this and I recalled this question (had posted an answer and deleted, not being correct) . Here's the answer from Android 11 Changelog — Full List of All 50+ New Features

You Can't Change the Default Camera
To prevent malicious apps from capturing your location, Google has removed the ability to set a third-party camera app as default. You can continue to use the third-party app as usual, but if an app requests to use the camera app, it will use the preinstalled one. But the change isn't as dramatic as it sounds — you can still use the cameras that are built into apps such as Snapchat and set shortcuts to third-party apps.

As Andrew said in comments(now deleted)
, the release notes do not include that sentence to the effect that third party apps can be set as default camera app.


text:
Information about transactional SMS
*this is not a coding query, rather a how stuff works question *
I am working on a project for which I will 'receive' a huge number(say 1000/day or more) of transactional SMS (transactional SMS means those that have OTP etc, ones that are sent because I asked for it, unlike promotional SMS which comes unasked!). I want to receive them on my android mobile itself. Please answer these if you know:
1.If I keep deleting the SMSes and never let the memory get full, then, can I receive any number of those SMSes per day? By the way, what is the max number of messages that can be stored at once in a mobile inbox?
2.what if the queue has become of say 1000 pending SMS, what will happen, will senders server get terminate the queue/get hanged or send them one by one? I read such queued SMSes will be sent in bunches, like 10 at a time, then an interval, then next 10 and a longer interval and so on; if so, how long is that interval then?
3.Lastly, what about the transactional messages that are failed to be received? Will the sms server resend it at some later time? Or it's gone!
Answer as much as you can, these are very bad ques I know! Thanks for your time! :)

Did you try to find information yourself? And please edit your question - 2 and 3 are not Android specifica dn hove nothing to do with android.

i have had huge performance problems with stock sms app (the way how database is read) until i found a (payed) sms app which can handle 100.000 sms smooth

I mentioned by @Άνδρας the questions 2 and 3 are not related to Android.
For the first question, I suggest two methods:

Android App:

you can use an Android App that use Alarm Manager which will be executed once a day or every hour to clean up the SMS database using Content Provider.

ADB solutions:

content delete --uri content://sms --where "date>EPOCH_TIME"

where: EPOCH_TIME is 13 digit epoch time (milliseconds)
The command will delete all messages received after EPOCH_TIME


text:
I accidentally started the download/install process for the Android 11 beta, can I cancel it?
I have two Pixel phones on Android 10. Yesterday I joined the Android Beta program to get Android 11, with the intention to try Android 11 on one phone and keep the other on Android 10. I started the download/install process on one phone. Today, I wanted to check on the progress of the Android 11 update process, went to settings and saw that an update was available. Thinking that maybe it timed out and I just needed to try again, I chose to download/install the update.
Immediately after it started, I checked which phone I was looking at, and was horrified to find it was the other phone, the one I wanted to keep on Android 10. So I wanted to cancel the process on this phone, but there is no cancel button. Since the UI didn't provide the option, I thought I'd try killing the processes on the phone.
crosshatch:/ # ps -A | grep update
u0_a64       10143   893 4987920  48108 SyS_epoll_wait      0 S com.google.android.configupdater
root         10773     1   44184   5808 SyS_epoll_wait      0 S update_engine
crosshatch:/ # kill -9 10143

This killed com.google.android.configupdater, but update_engine refused to die. Every time I tried killing update_engine, a new one would pop up.
When I went back to the system update screen, though, it mercifully indicated that the download was paused. BUT it only presented an option to Resume, NOT to cancel.

Even then, this reprieve was short lived, as it soon automatically chose to Resume, without receiving any indication from me that I wanted to do that.
I have now turned off the phone while trying to figure out how to keep it on Android 10.
I see that in some cases, after the download is complete, the user will be given a final chance to decide whether to proceed. Is this true for the update to Android 11? And as the question in that link asks, can I choose to just delete the download instead? Or is there even some way to cancel the download in progress? I'm nervous about letting it complete and then maybe deciding for me that I want to proceed rather than selecting "Later".
Update
The other phone that I had intended to try Android 11 with, after the "download and install" process, did not give me a chance specify "Later" or "Cancel". So I can't just wait and cancel it, but may need to find some way to reset the "download and install" process while it is happening. Meanwhile I'm buying time by keeping the Android 10 phone off most of the time.
Update 2
I also did consider downgrading to Android 10 once Android 11 is installed, e.g., following this guide, but it seems troublesome and potentially risky. Would much prefer some way to stop the present download/install of Android 11.

can you clear data of that package (configupdater)?

@alecxs Good idea, tried with pm clear com.google.android.configupdater, and it said success. When I go to system, it shows "Update available" (good, data was cleared, I guess?) but then I go to view it (which previously gave the choice to download/install), and it shows again that it is in the process of downloading the update. And the update_engine process is still there, and still auto restarts when killed.

please note bootloader version has downgrade protection which cannot by-passed in any way. you need to find the responsible package to clear. a factory reset will be more effective

@alecxs Thanks, good to know. Would prefer to cancel the download/install rather than let it complete and downgrade later.

guess the update is scheduled somewhere local, but consider they could have scheduled remotely too, maybe via bonded google account or via device serialno? in that case it might retry update even after factory reset (speculation)

be aware google doesn't offer any solution to unbrick unbootable device other than fastboot mode. therefore on google devices it is highly recommended to unlock bootloader (besides warranty period)

I kept my android 10 phone off for some time. Finally, now that Android 11 is official, I found that the phone is still on Android 10, and now it only provides an option to upgrade to Android 11, but has not forcibly upgraded my phone.
So I guess one answer to my question would have been: Just wait till Android 11 comes out of beta, and then the download process for Android 11 beta would automatically stop.


text:
How can I re-flash stock firmware for my Nokia 6.1?
I've developed an issue since the last Android 10 OS update where the phone doesn't charge unless it's in 'USB Controlled by device' mode, which it usually fails to switch to. I'd like to try flashing stock firmware to it, as resetting to factory default didn't fix the issue.
I've tried downloading a stock firmware file and using the recovery mode option to install from SD card, but alas the timestamp on the file was older than the current OS, and so it refused to downgrade.
Since I'm a complete newbie to the android hacking world, I'm looking for an easy to understand solution to install a fresh stock firmware / ROM (not sure what the nomenclature difference is) or failing that, backing up the existing firmware and re-installing that. Naturally, the phone isn't rooted nor is the bootloader unlocked etc, nor do I currently know how to do those things.
Any assistance would be much appreciated.

Warning: Before flashing, always make sure that you have the correct tools, ROMs, etc. because you can brick your phone if things don't go as expected.
I found at least 2 threads from xda-developers. Before you start, your bootloader must be unlocked.
From the first thread:

Install the OST tool.
Replace the EXE file in the program files with the patch file you downloaded.
Delete the Onlineupdatetoolexe.config file. If you don't do this, the program will not start correctly.
Put phone into download mode ( either by powering it off, pluging into USB cable and immediately hold power and volume down. Or if you can boot into android with ADB debugging, just do a adb reboot bootloader.
Pick firmware file and click next.

From the second thread:

Download Nokia-SDM660-Tool.zip & Copy Nokia-Tool.exe
Download latest HOME BREW Stock Rom And extract in one Folder and name it as STOCK ROM
Now add Nokia-Tool.exe in to that respective STOCK ROM Folder
Now connect phone to pc
Go to download mode
Now Open Nokia-Tool.exe
Now select Button according to your Phone code
Example Iam Using Nokia 6.1 Plus & My phone code DRG & so i will choose [ DRG B2N CTL PL2 ] same option for 6.1 , 7.1 & 7+ but for 7.2 & 6.2 users choose [DDV SLD]
i will click on [ DRG B2N CTL PL2} According to my phone as i explained in point no.8
wait for 10 min Tool will flash the rom & your phone reboots to system.
So finally this is what the exact standard method to flash stock rom on Your devices

Important: Read the linked threads (and others). If there are steps that you don't understand, ask the authors questions so they can guide you throough the process.
Nokia 6.1 (2018) ROMs, Kernels, Recoveries, & Other Development


text:
How to restore deleted text messages from an galaxy s9 phone
I only touched the one text message I wanted to delete and all of my text messages got deleted from my galaxy S9 phone from the default text message app. I really need to restore those messages because many of them contained data I texted to myself that i need. I was told by reading online that when you first delete the message they go to some kind of cloud that is inactive until enough data comes through to permanently erase them. How do I access those. My phone shows only a back up of messages stopping in June or July but i need all of them including the newest texts I made this past month August as well. What do I do?

Do any of these answered questions help you out? If not, is your device rooted? Are you using any kind of backup software?

sqlite databases do not actually delete data immediately, it is just marked as deleted. unfortunately you can't have access to raw database, your data is lost https://android.stackexchange.com/q/228746


text:
How to restore a particular app's data from Google Drive backup?
I have hard reset my android phone and I have restored it from a backup in Google drive which was taken 2 days ago. Some of the apps are installed.
There are however some system apps whose data is not restored.
I can see from the Backup that there was about 750KB of data for system app which can be restored. But it is not restored.
The app has no option to restore data from Google drive backup  also.
I have also tried Google Takeout (for Google Drive) bit it did not give me the Android backup data.
Question
How to restore a particular app's data from Google drive?
Also, is it possible to download the Google drive backup data on PC or to some storage and try to extract it?
Can I restore it on any emulator like Genymotion to get the data?

The applications that was not restored does not allow backup (android:allowBackup="false"). Which mean that your backup will not contain these applications even after restoring in another device.
You can check that by following these steps:

Install one of the concerned Apps in your new device
Enable USB Debugging
Run this command (using ADB):

adb shell dumpsys package concerend.app.package | grep flags

Where concerend.app.package is the package name of the installed App.
If ALLOW_BACKUP exist in the command's result then probably the application can be backed up. Else, the application cannot be backed up and it will explain why it was not restored.


text:
Google Weather's notifications show weather in F°
I'm using a Samsung Galaxy A30s. The following is what I see in my notification panel - 70° in Peniche, Portugal

Clicking in it, I'll get the following screen which has the number for the weather correct

Clicking in the three dots, I can see that the weather is selected to show in Celcius

How can this be fixed?

I've gone to Settings, searched for the term "Weather" and got the following

Clicking in it could see that it was defined here as Fahrenheit. Changing it to Celsius solved the problem

See it working


text:
Why is it possible to backup the rom images from mediatek devices using third party (open source) tools such as SP flash tool unlike Google Pixel?
When running Linux i am able to use SP flash tool to do a readback from my mediatek device and do a full backup of the rom images while the device is in preloader mode, without the use of any additional USB drivers.
Yet this is not possible with Google Pixel.
Is this perhaps due to Mediatek going out of their way and adding support for their devices during the development of the mainline linux kernel and Google dont?

Mediatek is very strong in the market of custom Android based devices for non-smartphones (Android on IoT and other embedded devices). I would assume that the possibility to read and write images from "outside" of the device is a convenience method added by Mediatek for simply device development as it reduces the possibility to brick your device.

But why does why does Linux not need additional USB drivers to do this, whereas in windows we need Mediatek's VCOM drivers?

On Windows you always need (USB) drivers for a device even if windows already contains the driver binaries (INF file maps USB-ID to driver). Linux contains alreayd a large number of generic drivers. But such questions are off-topic here as it does not have anything to do with Android.

Cross posting: https://unix.stackexchange.com/q/605563/262728

it is simply not true that linux does not need drivers. linux is just smarter than windows and handles it's drivers itself. linux just doesn't ask for drivers, but it use drivers anyway
new mediatek devices are accessable from preloader only with proper secure boot download agent (DA_SWSEC.bin) and authentification file (auth_sv5.auth). that files are vendor and device specific. even with proper files SP Flash Tool is not able to read back whole EMMC, there are forbidden partitions which can't be accessed. Lenovo devices are a good example
for qualcomm devices it is quite same, there we have EDL mode available instead where we can read raw partitions from device only with proper factory loader (firehose programmer). again that files are vendor and device specific
the fact that you can't read data from google pixel is that HTC hasn't released/leaked firehose programmer for google devices
while google may have that file internally, it seems they are not interested in unbricking, the official install method rely on fastboot only. once a device becomes bricked, it is not possible to unbrick (on locked bootloader). so the official solution for bricked google devices is a replacement device. that's why i personally recommend every google device should be bootloader unlocked on initial setup (my opinion)

How does i find out if a device has secure boot enabled as i have tried to check for this when starting the device in recovery mode but it doesnt mention anything regarding secure boot?

fastboot getvar secure returns if the bootloader is locked/unlocked, is that right? I thought a device specific DA file is required to flash images onto the device regardless if the bootloader is locked or unlocked.

yes secure boot is independent from bootloader status. but you can flash from fastboot mode without DA on unlocked bootloader, secure boot DA concerns SP Flash Tool in preloader mode only. fastboot getvar unlocked returns the bootloader status. fastboot getvar secure returns the secure boot status. fastboot getvar all returns all information

https://blog.hovatek.com/so-whats-all-this-talk-about-meditek-secure-boot-and-da-files

Does using a universal download agent allow the user to readback parts of the eMMC and just not the forbidden partitions, or would the user completely not be able to do a readback of anything ?

Regarding the firehose programmer, is there a reason why HTC would leak as oppose to releasing it officially?

I would have thought when a multinational corporation like HTC (which would typically have rigorous security systems in place) leaks something like a firehose programmer, it would be fully intentional to make lives for the users of their devices easier when they use it to unbrick them?

but their economic strategy is planned obsolescence and they are not interested in making lives easier

fastboot getvar sec_boot

If secure boot is disabled on a mediatek device, does a DA file or an Authentication file serve any purpose or only the scatter file is used to read and write from and to the device using SP Flash tool?


text:
How to disable amazon **pop up** notification

I am using the new Moto One fusion plus.
The notification only appears as a pop up and doesn't not appear in the notification bar. I have been annoyed by the notification and have even uninstalled the amazon app from my phone, yet the notification appears very frequently. (The notification is something an Amazon ad but other times it is something else but an ad)
It did not appear in the first 2 weeks of me using the new phone, but has been constantly bugging me from the past few days.
Any help in knowledge of how to disable it will be highly appreciated.
ps: the most annoying this is the loud sound and vibration the phone makes when kept on my table  when I am focusing on something else

Looks more like a message from malware trying to redirect you to a phishing site for entering your Amazon credentials. I assume you should be able to identify the app using the way described here: https://android.stackexchange.com/questions/127769/determine-which-app-is-drawing-on-top-of-other-apps

When this notification appears don't click on it just press recent tab button maybe it appear as any app else you can disable android service from system app as this method works for me


text:
Is it possible to enable USB Debugging (Install via USB) on Redmi phone without signing into Xiaomi account?
I am trying to debug an android app using my Redmi S2 phone (android 8.1) but there is a problem. Even though I can enable USB Debugging in developer options, I am unable to enable "Install via USB" option. It asks for a Xiaomi account which I don't have (and don't want to open).
As per this one year old reddit thread, its possible but not without rooting. Mine is a relatively new phone and I don't want to root it just yet. Is there any other trivial way to enable the Install via USB option?
EDIT
My question differs from the linked one in that I don't want to root my phone or sign into a Mi Account to enable "install via USB". I'm looking for a solution that doesn't involve these workarounds.

Looks like there was a new answer on the duplicate not requiring rooting nor sign in. Consider checking that, or otherwise following that question to be notified for future answers.

@AndrewT thanks for the inputs. I tried but that solution didn't work for my phone, I'll follow that thread for future posts.


text:
How can I rephrase: adb shell "pm block com.sec.knox.bridge" to work in an Android 10 phone?
Hope I am asking the right kind of question. I recently gained from my father a brand new phone his company gave him shortly before his retirement. They gave it to him knowing he was leaving and were trying to be nice. However the phone was still attached to the security settings of the company, including being tied to a Intune Company Portal app, I believe via Knox. Long story short I managed to uninstall that app after eventually being able to revoke its admin app permissions (previously it kept reinstalling itself). I am now trying to put the final nail in the coffin to make sure it can't come back to haunt me.
I have managed to connect my s10 to ADB on my computer and a site I found that helped me with some of the above gave a list of commands to remove Knox. They all follow the format in the title, which to repeat here is
adb shell "pm block com.sec.knox.bridge"
however the return is Unknown command: block
I imagine this was a fix for a previous version using old nomenclature. So my question is how do I correct the above syntax for that statement to do its job?
Cheers,
Shane

Hello. It is a good thing to always mention the link from where you are trying to follow the instructions so that we can evaluate and advise you whether the instructions are correct or not. For example, that pm block command is way, way too old. It is supposed to work only for Android Kitkat versions. Replace it with pm hide or pm disable --user 0 followed by the package name. Do know that all of this would work as long as you don't do a factory reset. Once you reset, you'd have to repeat the cycle.

Thank you for the insight! I will post more succinctly next time. The source for this particular solution is here and links to this for those command lines. I will attempt those commands and report back, cheers!

Further information regarding pm block, pm hide, and pm disable: pm hide VS pm disable — the identity crisis

As mentioned by @Firelord, use pm disable --user 0 instead of pm block. pm block is deprecated (not exist of new versions of pm). if you have an error with disable then the application still device admin or the package name is not com.sec.knox.bridge.
Check if the App is device admin
adb shell dumpsys device_policy | grep knox

If the command output a result, then the application still device admin.
To be sure that the package name is com.sec.knox.bridge:
adb shell pm list packages | grep knox


text:
What is com.mgoogle.android.gms?
While checking the installed packages in my device through adb. I found two packages, com.google.android.gms and com.mgoogle.android.gms. I know the former is related to Google Play Serivces.
What is com.mgoogle.android.gms and its significance?
Should I remove it?

Based on quick research of the package name com.mgoogle.android.gms, looks like it is a MicroG package used by YouTube Vanced.
The installation of this package is suggested by the official YouTube Vanced for non-root users if they want to add and login with a Google account.

Download & Install MicroG!
Download and install MicroG for YouTube Vanced in order to be able to connect your google account with YouTube.
If you don't install MicroG package, "add account" button will not work.

The renaming of the package is to prevent any conflicts with existing Google services.


text:
Any way to force change an Android device screenshot folder location / destination?
Is there any way to force an Android device to change it's screenshots file folder / destination location?

Like ADB command or something?
Something that is native and permanent?
Something that isn't app based (I don't like PinSync and FolderSync as those are battery hogs too)

Specifically for my Samsung Android device. Samsung infamously add their Screenshots folder inside DCIM > Screenshots, instead of what supposed to be in Pictures > Screenshots on virtually all their Android devices ever shipped. Despite users asking for this change, the problem still exist today.
I don't like this experience because of these such experiences :

Photo Backup services like Google Photos or OneDrive auto backups your Screenshots too.
I believe Screenshots in the cloud should be a manual backup. Not all of them are so important to be wasting your cloud storage
Especially if your device has the Volume button on the right side, and Power on the left side, which makes accidentally screenshotting very easy.
Literally your Photo Roll will be littered by accidental screenshots.

Some OEMs Android OS have their manual Screenshot folder location changing on their Settings apps, but not Samsung's One UI. And apps such as Google Photos doesn't support specific folder syncing yet. They only annoyingly support parent folders for now.
But if possible, I'm asking for a universal solution to this. That will work to any device / OEM. I don't like rooting, but if that's the only solution you know of, please tell me.
I'm sick and tired of this. Please help me.

You could use this to sync the folder to copy the contents to another folder and delete at source. You could use an automation app to run this every half hour or on pressing volume /power buttons (if that works for you)

Unless the location is stored as a configuration in a file/DB/anythine else, it probably needs root access to really force-move the location (instead of copying/syncing), since the location is possibly baked into the system when the OS is built.

@beeshyams Sorry man, but I just said I don't wanna use PinSync. As those apps usually gets shut down on Battery restrictions of each OEMs. As well as automation apps. Not native as well. Google Photos backup process is usually real time, so before they get moved to another folder, they're already backed up.

@AndrewT. I see. Do you have any knowledge where this configuration might be? Rooted or not rooted?
And I indeed needed to be rooted, how can I do it?
If you do not know, do you any places where it might be useful to ask help to modify these?

Possibly an app built on inotify API, running continuously a foreground service to watch filesystem changes. Or if the OEM's battery optimization is aggressive enough to kill even foreground services, then the same API using root. E.g. busybox inotifyd. That won't be killed for sure.

The screenshot save directory is hard coded in AOSP source code: https://github.com/aosp-mirror/platform_frameworks_base/blob/a4ddee215e41ea232340c14ef92d6e9f290e5174/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java#L348-L349


text:
How can I access the internal storage on a device with adopted storage
For my tablet I have TWRP on it and it can't access the sd card as it is encrypted. I need to put some files on it to flash with TWRP. How can I access it? I have magisk so I can do root options

you can adb push some small files to /cache partition (or memory /tmp)


text:
Install driver in android os
I recently bought a wifi adapter(Astrum NA150) which is not supported by linux out-of-the-box. But in the cd there are drivers for win,mac,linux and android. They also have makefile. But as i know make is not supported by android.How can i install them.
Link to the drivers:
http://astrumworld.com/Downloads/drivers/NA150_driver.zip

This is about Ethernet detection. But I am trying to install driver.

See the second point in my answer: kernel configuration. There's no concept of Windows-like driver installation on Linux, and hence Android.

Ok. I am just a novice programer. Can you link me to a detailed guide on kernel building and driver. (Beginer friendly)

Seeing all that codes making me dizzy!!!

Kernel building is the smaller problem. The bigger one is the availability of kernel source code for your Android device. Deal with that first. // Btw, development related questions are off-topic here.

It's android x86 on pc.

Shouldn't code be universal for pc.

I want to add drivers to phoenix os or prime os


text:
How to connect Bluetooth keyboard + bt mouse to Android smartphone to work in parallel?
re.:
How to send carriage return + newline from Bluetooth keyboard connected to Android smartphone running shell emulator ?
followed answer links to similar questions
like
How to create a newline on keyboard
and
shift key + enter key pressed
just moves cursor in terminal mode one space to the right
on another, mini bluetoth keyboard, entering Fn + Esc did the new line trick, only once
Shift+Space opens the locked phone and Enter pressed, opens Shell Terminal Emulator
but another Enter press does nothing
upper left "Esc+ Enter pressed, escape Terminal, so Enter button works fine (new keyboard)
Not sure if External Keyboard Helper Demo could help me to test keyboard layout .

entering Fn + Space on a small bluetooth keyboard I can switch between opened application: Shell Terminal Emulator vs. Bluetooth settings

read question, comments and answer
Enter key is different from Carriage Return (CR)
https://unix.stackexchange.com/questions/349214/enter-key-is-different-from-carriage-return-cr
still not a solution but a good approach

first part solved, looking for a solution on how to connect multiple bluetooth devices to Android -
Windows XP came with such bluetooth software hub application/ drivers
to work with bluetooth mouse + bluetooth keyboard in parallel

Problem solved.
Another Shell Terminal application from Play store supports Enter key.
Only keyboard by Logitech is supported since ASCII keys input mismatch for mini keyboard


text:
Can't load certain sites on phone over Wi-Fi
When my phone is connected to Wi-Fi, certain sites won't load, especially https://www.nytimes.com/; Chrome's progress indicator shows a little bit of progress, but never gets past that. Other sites are fine.
Various notes:

If I turn off Wi-Fi while it's in this state, I get ERR_CONNECTION_ABORTED ("This site can't be reached"). So my assumption is that the progress indicator's little bit of progress is just because of successful DNS lookup, not because it's actually managed to connect to the site.
This issue is specific to phone + Wi-Fi:

This issue does not occur when I disconnect from Wi-Fi and let my phone use mobile data.
This issue does not occur on my laptop (which uses the same Wi-Fi network).
This issue occurs on both my own Wi-Fi network and my sister's; but we both have the same ISP, so that may not be a fully independent test.
This issue occurs in both Chrome and Firefox, and seems to affect other apps that connect to those sites.

But, interestingly:

In the case of NYTimes.com, it seems to bear some relation to cookies, in that it works in incognito mode until I log in. But logging out does not fix it (perhaps because it leaves other cookies?).
Twitter (https://mobile.twitter.com/) sometimes loads successfully (albeit slowly), sometimes not. Twitter has a lot of local storage stuff (it shows some of its page boilerplate even when I have no Internet at all), so I'm guessing that this has to do with dynamically choosing different backends, some of which I can connect to and some not? (But that's just a guess.)

This is pretty consistently the case. The only exception I can remember is that the first time I tried loading NYTimes.com in incognito mode, it worked immediately afterward outside incognito mode as well.
This has been the case for about a day and a half.
I tried changing DNS settings (first to use Google Private DNS, then to use Cloudflare); no effect.
I'm running Android version 9, moto x4, google_fi.

To anyone who might be coming across this question in the future with the same issue: I still don't know what the issue was, but it suddenly resolved itself yesterday (about four days after it started). All the affected sites are OK again now.

Addendum: the issue recurred from 2020-09-30 to 2020-10-09, with the same symptoms as before. So, although the issue eventually resolved itself both times, I'm still seeking understanding and a solution.


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

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

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

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


text:
Why is the Android Go's performance better?
The Android Go's official site says faster launch time, extra space for media! Sounds good, but it's for an entry-level device, with 1GB RAM or less, why it still get better performance?
Wish someone can give more details to understand what's the reality of Android Go.

For entry level devices full Android is too heavy. Hence smaller Android go performs better on such devices. But you should consider that a lot of apps are also heavy and may therefore not perform well on Android go devices.

Android Go is an Android configuration specifically built for low RAM devices.
As stated in the official Android Developer documentation, it employs many optimizations mainly focused on memory management.
Android Go has a particular characteristic of having ro.config.low_ram set to true on build.prop to indicate the low RAM configuration. Apps then can retrieve it by calling ActivityManager.isLowRamDevice(), while the system can directly call the hidden ActivityManager.isLowRamDeviceStatic() if they need to modify their behavior, mainly to put some restrictions on features that are considered memory-intensive.
Some system services may be disabled, such as (but not limited to):

Display over other apps
Do not Disturb
Notification access
Picture-in-picture
VR helper services
Zen mode

According to the commit on Pixel Experience/AOSP.
and many other changes in the system's behavior (that can be browsed on the Android Code Search linked above, under the "Cross references" tab on the bottom).
To answer "why it gets better performance", while there are some optimizations done, it also sacrifices features for performance. This, together with Google's "Go" apps collection that is built specifically to reduce memory and space usage, makes the device runs better compared to running the full-fledged Android.
However, while Android Go also provides Play Store to install 3rd-party apps, note that those apps may not have been optimized for low RAM configuration and might suffer performance worse than when running on mid-end/high-end devices (this is more of an issue of hardware spec than Android Go though).


text:
How to solve the audio problem in Zoom Cloud Meeting for Android TV
I have an audio problem running Zoom for Android on TV Box. Details below:

I have successfully installed Zoom for Android on a TV Box which is then connected to a Samsung QLED TV. I also attached a Logitech camera to the TV Box.
I joined a Zoom meeting hosted by another account. The video function works OK. The host can see my video and I can see the host video on TV.
However, the audio is not working. There is no audio from the TV speaker (I already selected "call over the Internet" on the TV Box app) and there is an error message flashing on the host screen "XXXX is connected to audio but cannot hear you". I then connected a Logitech headset to the TV Box. There is no audio on the headset either, but no error message this time.
I have verified that both the TV box and the headset works well on Skype. Without a headset, I can hear Skype callers on TV speakers. With a headset, I can speak on the microphone and the caller on the other side can hear me, and I can hear the other caller from the headphone.
The TV box is X96Q using Allwinner H313 chipset. The software version is Android 10.

Is there any workaround?

OK. I solved this problem by try and error myself.
In summary, you need a microphone present to enable Zoom audio communication.
I have tested 2 TV Boxes, one with Android 10, another with Android 8.0.1. The microphone I used is Logitech H310 headset with microphone.
The details are as following:

[Edited on 8/27/2020] There are 2 USB 2.0 ports on TV Box. One is Master, where you can plug USB headset and microphone into. The other is slave which is used for PC debugging and local upgrade. You cannot use the slave USB port for microphone. Unfortunately, there is no mark on the box, so you have to try it yourself.
Test the microphone is working on TV Box. I use Skype to test.
Open Zoom.
(For Android 8.0.1 only, it is strange) Click join meeting, scroll down to find "Do not connect to audio). It is unselected by default, click it to make it selected.
Join a meeting.
Click the participant, you should see yourself with a microphone icon. If you cannot see the microphone icon, you can unplug the usb microphone and plug it again.
Once you can see the microphone icon for yourself, click the "join audio" and click  "call over Internet". Then you will see the "join audio" disappear and a microphone icon on the bottom left with "mute".
Now you will be able to hear the sound on your headset. And you can speak over the microphone.
(For Android 10, it is also strange) If you unplug and plug microphone after you already connected to Zoom by microphone. You can see a prompt saying "USB audio AV is plugged in..." and ask "Yes" or "No". If you click No this time, it will say "connect by default channel". Then you can hear the voice communication through both the TV speaker and the headset.
(For Android 8.0.1) I can hear the voice communication on headset, but I still cannot make the speaker to work.

I will mark this one as answer to myself.


text:
Is it possible to get a statistic of the most used colors on a smartphone screen?
I would like to know for all rgb colors how much time a color is active on screen for all pixels and if it is possible to do it without the need to record the screen.

Tried this? It claims to export colors to CSV//Explaining why you want to do this in the question by [edit]ing would help

Do you mean for an instance of time, or for a specific duration? I don't think Android stores this kind of stats. Also, each app/website may have a different color theme, so I'm still not sure what you are trying to achieve?


text:
How to instantly wipe an Android phone in case of arrest?
A Belarusian friend asked me this, but I can't find anything on my own. Protesters in Belarus are beaten once arrested until they give up the pin code to the phone.
So, if he could give a pin code that would immediately trigger phone reset to factory settings, or erase data, or even show a dummy profile, that would at least protect their family and contacts and limit the extent of accusations.
It would be nice if the phone could be used afterwords. Protesters may be given their belongings back after detention, and having a working phone is an advantage if they land in a hospital or just outside the detention center with none to pick them up.
So far I suspect that to have this functionality one has to fork Android or LineageOS. Is there already such a fork?
Why Android? Because back in Belarus, iPhone is much less popular than in the US or EU.

Does this answer your question? How to make a complete factory reset, without anyone being able to retrieve my data?

*2767*3855# if it works (given that all codes don't work on all devices). You could Google for your device specific codes. Phone will be usable but all data would be lost and you would need to set it up again//But this is not a PIN code as you are asking. This needs to be dialled from your key pad after opening the phone

https://coolblindtech.com/how-to-disable-fingerprint-and-facial-recognition-on-your-phone

maybe not very helpful but related, android has lockdown mode

in germany it is common sense to leave mobiles at home when participating protests (for tracking reasons)

One thing coming close to this is Ripple (also available at Play Store but only in an older version). It sends a "panic event" to all supporting apps which then act with what you configured there (deleting data, uninstalling themselves, whatever). In the past there were other apps which e.g. triggered a factory-reset when you entered the wrong pin more than X times, but they're all gone unfortunately.

Frame challenge: might it be easier to buy a "burner" and bring that to protests? That way you still have a phone if you need to call someone, but you can avoid putting any data on it that you'd be concerned about the authorities seeing.

@Kat On a burner phone, you need Telegram and a few channels and groups to follow the events, which is a red flag anyway.

i wonder how revolutions was possible before cell phone aeon


text:
Nokia 7 plus network issues
I bought a used Nokia 7 plus not long ago and it worked perfectly at first.
But recently I have been encountering multiple problems concerning the mobile network connection of my phone.  Those include:

I am unable to get a connection to the network in spots where I get a connection using another phone (so the problem is definitely unrelated to my network service provider)
If I do get a connection the mobile data doesn't work or is very weak
Sometimes the phone claims to have a 4g connection to the internet but I can't even to a simple google search

What's weird is that this problem is not consistent, so sometimes I do manage to connect to a network and even to the internet...
Is this a software related problem or is my network card faulty?
If the latter shouuld be the case, would replacing the network card fix my problem?
Any help regarding my problem would be highly appreciated.

As I said, the problem is unrelated to my network provider as my current SIM card works perfectly on other phones...

See if the behavior persists in safe mode (Google how to put your device in safe mode). If it behaves normally, it points to some installed app creating trouble

Network problems like those you have encountered are very unlikely to be caused by the SIM card. More likely is a hardware or software problem of the phone itself.

@beeshyams thanks for the recommendation; but the problem persists even in safe mode. It has to be hardware related then. Do you think replacing the network card would solve my problems?

I am not qualified to recommend. It's best you take it to a service center. The first thing they do is ask you to factory reset, so back up your important data. You may as well do that yourself and test to see if it makes a difference //Bottom line - go to qualified folks who can get to the root of problem


text:
Is there a way to know when an audio was recorded
I recently received an audio on whatsapp and I am pretty much sure that its not altered.Is there a way to know when was that audio recorded in the senders phone.
Edit:It is a voice call conversation.

No. Unless the name itself has a time stamp like in the case of recorded telephone calls, which by default are time stamped (though that can be changed)

Its actually a vooce call conversation

This is independent of Android, but you can try checking the metadata of the file (perhaps there's an Android app for this, but I don't know) and see if the created date is stored. Otherwise, there's no way.


text:
LectureNotes: "Cannot create custom app directory, will use default app directory!"
I use LectureNotes on my Samsung Galaxy Tab A (2016); my device has Android 8.1.0.  I want to store files from the app on my external SD card, but keep getting the error in the title.  Here's what I've done:

I gave the app storage permissions.
Navigated to Settings > Storage > App directory setup.
Enter /storage/0000-0000/LectureNotes/ in the custom app directory.

I keep getting the error Cannot create custom app directory, will use default app directory!, and can't figure out why this is.  Surfing the web and this site yields solutions which do not work on my device (e.g. ).
What am I doing wrong?  Should I be using a different path?

Note: I'm friendly with Linux, but a novice with the Android file system.  In answers, please provide (1) a solution to my problem, (2) an explanation, and (3) an explanation of why I'm running into this problem (if it's not too much trouble).  Thanks in advance!

Write access to the external sdcard requires to use a special API by the app. And you have to grant access to the app explicitly (or in detail the has to request permission and you have to select the correct folder and grant it to the app). When you first encounter this it is very confusing.

@Robert Does this mean I can't accomplish this from outside the app?  I.e. Something has to be changed in the app's source code?

Regarding the permission I am not sure that may be possible via adb, too, but the permission is useless unless the app uses the Storage Access Framework to write the files. Only using SAF you can write files to the external ad-card. The only alternative would be to modify some system settings and allow every app full sd-card access (requires rooted device).


text:
How to launch an activity in lockscreen mode via adb
I have locked my android device using pattern/pin.
I want to launch activity from lockscreen itself via adb command.
Is there anyway to achieve it?
Example:
Say I have an app with activity name com.example.myactivity
When the device is not locked, I am able to launch it using:
adb shell am start -a com.sample.app/com.example.myactivity
But when I lock the device using pattern/pin from settings menu:
I am not able to launch the same app using below command:
adb shell am start -a com.sample.app/com.example.myactivity

Are you sure that the is not launched? It may be launched in background of the lock screen.

I seconded Robert's comment. I'm afraid even if it's opened in the background, the code cannot be run due to the activity lifecycle.

@robert: I could see the activity when I unlock the screen after launching activity in lockscreen. But it is not getting visible in lockscreen. Is there anyway to make it visible in lockscreen in adb rooted device .

Your app needs to be  programmed in a way to allow its activity to be shown over  lock screen. See https://developer.android.com/reference/android/R.attr#showWhenLocked and https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)


text:
is a way to disable auto connect to wifi that don't need password?
it is really annoying that my mobile phone will auto connect to wifi that don't need password such as those ones in shopping center, most of time they need you to fill up a form to register first before access granted, and I have to turn off wifi for this reason. Then when I go home, sometimes I forget to turn wifi back on and waste my moble plan data usage, is a way to fix this issue? I can't believe that Android doesn't have a mechanism to only connect to wifi you have previously provide password?

AFAIK the behavior regarding unprotected Wifi had been changes in the evolution of Android. Which Android version do you use?

You can use ADB to disable it:
adb shell settings put global wifi_scan_always_enabled 0
adb shell settings put global network_avoid_bad_wifi 1