text:
If a user debug build comes with adb root access by default, does it contain the su binary?
If an Android user debug build comes with adb root access by default, does it contain the su binary to achieve this?
If not, is it any different from rooting your phone?

adbd doesn't use su binary but latter is shipped with debug builds (if not explicitly removed by ROM developer). However this su is entitely different than the one we get when we root the device. Details here: What special privileges “/system/xbin/su” does have w.r.t. root access?. Also related: Why “adb root” does nothing?

So that explains why im seeing the su binary within the xbin directory. I was wondering what that was.So when a device becomes rooted using a conventional method like Magisk and grants an app root access, to run root shell commands, does it use the adb daemon to an extent?

Not at all. Magisk runs its own daemon. See How Magisk works?

No, adb does not require a su binary to get root permissions.
On a regular build, it is just the other way around: adbd is started by the Android system itself with root permissions. Up to a certain point, it uses these root permissions (open port and so on), and then adbd drops the root permissions.
On an Android user debug build, it comes with adb root access. adbd does not drop the root permissions, hence every command executed via adb is also executed with root permissions.

So when someone "roots" their device using the su binary , does it just enable them to run adbd using root permissions? And does the using su binary provide root permissions anywhere else that a userdebug build does not?

@RameshJoshi adbd and su are totally independent from each other. Each of them does not use the other on it's own.  On a rooted device (where adbddoes not run in root mode) however you can inside the shell provided via adb (adb shell) execute commands with root permissions via su but that is a different topic because in this case you as the user use su, the adb shell is just the "stage" you are working on.

I just built a userdebug version of AOSP 10.0 for my Pixel 4 XL; it does contain an su binary in /system/xbin/su.
It differs from what many mean by "rooting" in that it doesn't let you actually run su from on the phone itself (say, within Termux). It can only be executed by root or a member of the shell group, which is what is used while running an adb shell session. However, it still is a way to run things as root; it merely requires an adb connection to do so.
If your USB cable doesn't carry data or your USB port is broken/faulty, you wouldn't be able to run things as root anymore (unless you had already set up adb on the device to run over TCP).
I later put Magisk on my otherwise-AOSP ROM and now have two su binaries; the Magisk one is installed in /sbin/su. Magisk's /sbin/su will let me run things as root without an adb connection active.


text:
Android 11 root process shows "no valid slot to boot" after flashing patched.img
This is the first time I've rooted a phone. I have a Google pixel 4a, running Android 11. I use Ubuntu 20.04 and have a limited knowledge of the command line.
I followed the process at this xda-link fairly smoothly until the last step before confirming root.
After extracting the stock boot.img, patching it with magisk manager, and running the command:
Fastboot flash boot magisk_patched.img
The Google logo pops up for about 10 seconds and then kicks me back out to fastboot mode. The "reason" displayed on the fastboot menu screen after this says:
No valid slot to boot
Im lost as to why this is happening, and I cant seem to find many people with similar issues. Which leads me to believe that I've missed something simple. Thank you for any insight, it is greatly appreciated.

that guide is far from complete... no mention of flashing right slot.. also encryption will break because no words about you must set preserve force encryption in advanced settings before patching..

I am thinking of buying this phone and did some reading. Firstly, On Android 11 most people suggest that you use the canary version of Magisk (search in Github), though some recent reports say beta Magisk version works. Secondly, it is easier for you to pick up the already patched boot image made using canary Magisk from here//Make sure you pick the right boot image // If it works for you, please self answer.

source: Stack Exchange

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

sort: votes


text:
Why can't I delete a folder in /config/sdcardfs as root (Termux)?
I'm looking to delete a folder that is in /config/sdcardfs. My device is rooted and I'm trying as superuser. I still get the results operation not permitted.
What do I need to do to get the permission to do this.
I have tried to do sudo rm -rf name-of-folder with no success.
I have also tried to do it after running tsu (Termux's version of su). No success.
P.S.
I haven't had any issues deleting in other places even in places I need root permission (for example in the /data folder.

configfs is kernel's virtual filesystem like sysfs. What's inside them aren't actual files but kernel intrrfaces to userspace, to provide some info or make configurations. You can't simply delete them. Instead build the kernel with the said filesystem disabled. // What are you trying to achieve by deleting sdcardfs? It's one of Android's core components. External storage (/sdcard as well as physically external SD cards, USB drives etc.) functionality entirely depends on it. And most probably device will bootloop when vold is unable to emulate filesystems.

I'm trying to delete a folder residing in the /config/sdcardfs folder. There seems to be a folder left there from an app that isn't installed on my device anymore that I want to get rid of.

SHORT ANSWER
You don't need to delete anything in /config. What appear inside the directory aren't actual files. They are cleared and repopulated on device restart.
You can't delete /config/sdcardfs directory. SDCard FileSystem (sdcardfs) is a core OS component. Your device (or at least storage) won't be usable without sdcardfs properly configured.
DETAILS
Android is based on Linux kernel. Kernel is the backbone of OS which handles hardware components and many other core functionalities. The other part of OS: userspace talks to kernel space through different mechanisms like syscalls, sockets and virtual filesystems. procfs, sysfs and configfs are common virtual/pseudo filesystems i.e. they live in RAM. Kernel exports information about processes, hardware devices, and drivers etc. to user space through virtual files in these filesystems.
/proc and /sys are mostly read-only, except a few interfaces to which userspace can write some values in order to make configurations. configfs (which is mounted at /config on Android devices) is relatively a new addition to Linux kernel. It allows userspace to make relatively bigger kernel configurations by creating large number of virtual files in sub-directories under /config.
Android uses configfs at least for two purposes:

External storage permissions management
Setting USB gadget modes

In order to make file sharing among apps possible, Android sets fixed permissions on files in external storage (be it physically internal or external). To achieve this, at start, Android used FUSE for filesystem emulation, then sdcardfs replaced it. For more details see my answer to What is /storage/emulated/0/? and Android's Storage Journey, in particular the concept of synthesized permissions.
So it's the Android OS which creates and deletes virtual files in /config/sdcardfs/ in order to let kernel know which permissions to enforce on which files/directories in external storage (/sdcard as well as physically external SD cards, USB drives etc).
Additionally Android uses sdcardfs to assign three GIDs: AID_MEDIA_AUDIO (1055), AID_MEDIA_VIDEO (1056) and AID_MEDIA_IMAGE (1057) to media files by providing their relevant list of file extensions in /config/sdcardfs/extensions/. It's to quickly categorize files without scanning all of them. See some details in this answer.
So deleting something in /config/sdcardfs (and in kernel's other virtual filesystems as well) doesn't make sense if you don't know what you are doing. That would do no good except breaking storage functionality on your device.

Thanks for the detailed answer, this helped me understand more of what is going on.

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


text:
How goes The Guardian make (multi-) coloured notification icons?
The election notifications have a red and blue notification icon which remains coloured even in the notification bar (while other icons are monochrome to fit with custom themes).
I thought android no longer allows this? How did the devs go about it?


text:
Why downloading updates in android ask wifi connection rather than mobile data?
Why did downloading updates in android ask wifi connection rather than mobile data?

The size of update package is generally large so it by default uses only wifi rather than mobile data so that no money is deducted in case the mobile data is exhausted or there is no data plan.
In old devices
Go to setings --> About device --> software updates.
Here you disable the option download software updates via WiFi and enable , automatically download software updates or select manually update.
In new devices
If you're using a new device after clicking on check for updates ,you'll get a alert or popup showing what's the latest update, in most of the cases you will find a checkbox ticked against download using WiFi only, just disable the check box. If this is not the case then on the screen where you download the updates there should be three dots in upper right corner, you will be sure to find the option to change data usage preference there.


text:
how to fastboot mode without Enable USB Debugging?
I have a cellphone which I can't get access to the system, so Enable USB Debugging is not a option here. I need to factory reset this phone or upload a fresh firmeware to make it functional again, I figure it out that the way to do it is through Fastboot.
So, is there a way to unlock Fastboot mode in this phone without having to Enable USB Debugging?
Meizu Pro 6 Plus

you probably mean bootloader unlocking without enable OEM unlocking (usb-debugging is not related to fastboot). the answer is no. but you can use different official flash tools (if available) depending on chipset (Exynos, Qualcomm or Mediatek, all three possible for Meizu) or if you know google play account password (FRP lock) do a factory reset from recovery mode

Hey @alecxs I just checked here, the chipset for this meizu is Exynos 8890 Octa (14 nm)! What flash tools would you reccomend?

i am not aware of any flash tool. check meizu support or try samsung tools like heimdall/odin or maybe check that thread https://forum.xda-developers.com/meizu-pro-5/how-to/tutorial-restore-hard-bricked-lost-t3838461

If all your looking for is to Factory Reset then you can do that with fastboot without unlocking the bootloader.

@Sruly no, you can't do anything from fastboot if bootloader is locked. the only possible factory reset is 'fastboot flashing unlock' but that most likely requires OEM unlocking (not sure about android version)

security hole on fastboot https://forum.xda-developers.com/smartwatch/moto-360/unlocking-bootloader-marshmallow-t3669098

@alecxs Thanks for your effort in trying to help me out, I've read all of those links you've sent me and I couldn't make it work... The solution would be MRT dongle, but this tool costs more than a new motherboard, and in my country (Brazil), that tool is not very common... I've tried a cracked one but it didn't work. Hahahaha Anyways, thanks for your insights!!


text:
How to start the kiwi browser always incognito mode?
I want to start the kiwi browser always in incognito mode.
How can i do it ?
I know there is a option to click on incognito mode, But I want it to start with incognito mode.

The method might not be optimal but it works for me.

Open the app drawer, Long press on Kiwi browser icon.
Two choices will appear: New tab and New Incognito tab. Long press on New Incognito tab to create a shortcut.
Optional: If you there is a Kiwi browser on your home screen, delete it. Edit the shortcut name from Incognito tab to Kiwi Browser if your launcher allows it.

Caveats: If you open Kiwi Browser from the app drawer,  it will open a new tab not a new incognito tab.


text:
Dialer that shows nickname instead of Firstname Lastname
I am desperately looking for a way that would show Mom instead of Jane Doe when I receive a call. Right now, Google Contacts app allows to search by word mom but it's not shown in Dialer/SMS/WhatsApp etc
UPD: I was advised True Phone Dialer & Contacts & Call Recorder but I don't see much configurable settings for the requested feature


text:
Compress a video for android using ffmpeg
I'm trying to compress a video to send it around in a messenger. Normally I would use something like
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

but if I send it around in a messenger app like telegram afterwards, I can only watch it on my PC but not my smartphone (I tested different devices) although the codec is said to be supported: https://developer.android.com/guide/topics/media/media-formats
What is the best way to compress a video for messengers in mobile devices?

The solution may be just to reconfigure (install) ffmpeg with x265 headers by setting --enable-libx265 for build as in the documentation
However keep in mind that x265 encoding/decoding is still relatively new and is not implemented/present well enough in Android devices unless you have a newer/branded device*.
(hw support, optimizations)
*generally speaking. - even 2017's Galaxy S8 has built-in HEVC support even in official camera app


text:
Android Game stuck on downloading resources on OnePlus 6 / OxygenOS 10.3.6
Recently a game I have been following since day one got an update and my OnePlus seems to have a problem downloading the resources of the update.
Here is a screenshot of the game:

As an aspiring developer myself I would like to know what causes such an issue and what the possible fixes are?
I'm from Bulgaria, tried 2.4G WiFi, 5G WiFi, mobile data, reinstalling, phone has more than 100GB free storage.
Thanks in advance!

Does it show an error in [tag:logcat]?

How can I access it and see?


text:
How to disable apps from using "keep screen on"
Some apps use FLAG_KEEP_SCREEN_ON to stop the screen from turning off -- is there a way as a user to override this (would be useful when going to sleep)


text:
Scroll problem with mouse and my tablet android
I  have a HUAWEI MediaPad M5 Lite 10 tablet I use it with a mouse connected to USB thanks to this adapter.
For some time with my mouse, I can no longer scroll through the pages of browsers like Firefox or Chrome.
Rather than scrolling the text from top to bottom or vice versa, it selects the text for me!
I can no longer also do a copy / paste in the web pages, it selects but without displaying "copy / paste" I reset my tablet but it doesn't change anything.
I have tried with a bluetooth mouse and have the same problem.
The funny thing is that when I take control of my tablet with my computer and with teamviewer I use my computer mouse! Well it works.
I can scroll web pages through my computer. An idea ? Thank you

To encourage people to answer your question, they first need to read it all.  I encourage you to make your post more readable.  For starters, you may want to familiarize yourself with the benefits of using paragraphs.

I'm relaunching the subject because I'm not no answer


text:
Device says bootloader unlocked but OEM unlock option can enabled and disabled?
I have a Redmi Note 3 (INDIAN VARIANT Kenzo/Snapdragon variant running on Marshmellow 6.0.1 with MIUI Global 10.2) on which I performed an bootloader unlocking procedure via the tool XiaoMiTool V2 from xda since the official method kept denying me for some reason
I also want to let you know that during the procedure i left the oem unlocking option disabled and ran the tool
So after the device's bootloader was unlocked (ss attached)

I noticed that the OEM unlocking option was still active (meaning I can flip the button and it will just ask for the pass and warn me and enable the option: again ss attached)

So my question is is my device properly unlocked? OR Did I mess up with procedure ?
I know i could dial *#*#7378423#*#* (which doesn't work in miui devices) or using fastboot method mentioned here- but the problem is that my device's usb port is damaged in a way that charging works but MTP or any other option doesn't (Yeah I tried multiple usb cables, brought a brand new from official store and multiple devices) or is there any app to do that ?
EDIT :
Okay now I tried by adjusting the chord into the port and running fastboot getvar unlocked(ss attached)

Now what does this mean ? Is it still locked ?
I would really thankful if someone can help

I haven't tried this myself. See if this helps How to Execute ADB Commands over WiFi without USB or Root. according to this site you can connect to your device with adb fastboot via Wi-Fi. Good Luck

this can't work. you can't authorize RSA-key without usb-cable. btw that is adb only, not related to fastboot

As I said I haven't tried but the site claims you can  connect. BTW according to that site you can run adb reboot bootloader to boot into fastboot.

I am not sure I understand the question... In most devices (not all) the OEM Unlock toggle becomes unusable once the device is unlocked, in other devices it just does nothing but what you show. Your device is either locked or unlocked, there is no in-between or "properly" unlocked. The OEM Unlocking toggle only says if you can unlock or not, once it the device is unlocked, it does not actually perform any lock/unlock function, and once a device is unlocked it has no function.

OEM unlocking should affect FRP it will disable FRP as far as it concerns the google play account. but be aware on Xiaomi devices the only way to disable FRP completely is remove MI account from device

@acejavelin that's confusion all about my device says its bootloader is unlocked but the option is not disabled (or grayed out)

The confusion is your understanding of what the "OEM Unlocking" switch is... It is just a toggle that allows you to unlock the bootloader and It has no other function and does not lock or unlock anything, and once the bootloader is actually unlocked, it does nothing and it's current setting is not relevant to any functionality. In most other devices I am familiar with (Pixel and Motorola devices), once the bootloader is unlocked this switch is grayed out and cannot be changed, but it seems Redmi didn't exactly implement it that way.

@Sruly thank you for your insight on wireless adb (which to say i had no view of ) but as alecxs mentioned RSA fingerprinting (which in i revoked coz i used multiple device ) is required and fastboot doesn't work without cable connection can you suggest any app ?

@acejavelin P.S I forgot to mention that i didn't enable this option (Allow oem unlock) while i was unlocking

Whether you toggled the setting or not, it had to be off in order for you to actually perform the unlock in the bootloader with fastboot. After you are unlocked it serves no purpose and the setting is not relevant. If you devices USB port is damaged, how did you unlock it? The actual unlocking process must be done via your computer with fastboot. I don't know how much more I can add to this conversation, I have given the answer multiple times.

@acejavelin i recently saw multiple Redmi unlocking procedure for the same device and all them had toggled the switch & as for the port it wasn't damaged when i did procedure (my device's screen was cracked during that time) and i gave it for repair after which it was damaged also pls see the post below

OEM lock 'has to be off' mean OEM unlock 'enabled' + MiUnlock 'enabled' (for Xiaomi devices) as acejavelin already stated

It would be good if you enable the Allow OEM unlocking option before proceeding to unlock bootloader
I tried by adjusting the chord into the port and running fastboot getvar unlocked which gave no value meaning the device is still locked (ss attached)
Even though it says nothing (unlocked : YES etc), I did switch the toggle on for Allow OEM unlocking before proceeding to flash just to be on a safer side and successfully flashed twrp recovery and carbonrom and the device is running well

Does this answer your question – or was it rather meant as an additional detail of the question? In the former case I don't get it – in the latter you should rather edit your question and put it there ;)


text:
Where Did Pocket Go?
I lost Pocket and other options in Android Chrome share...

How do I get them back?  Apologies, as I think I'm missing something obvious and I'm being stupid.

It's a default feature in Firefox but in chrome you need to add it as an extension
see here

Could you explain what you mean by "adding it as an extension", since Chrome for Android doesn't support browser extensions?

Yes the fact that there is no support for pocket in chrome running in android but it's available for desktop based chrome browser (for performance reasons as GOOGLE says) this means that you need to switch to Firefox browser which has pocket integrated in it

So I had never added the functionality as an extension, but I found out that what I was looking for "folded away".  It turns out that if you "scroll right", there is a "More" horizontal ellipse, and I found Pocket under that.  Why it's hidden away when it's the only share I use, is a mystery to me.


text:
Move the pointer and control it with the head
My name is Stéphane. I am disabled (quadriplegic).
I have a Mac Os 10.15.7 computer where I can move my mouse pointer with my head with this system and with my webcam.
Is there a way with Android to use the webcam to move the cursor?
Thank you.

Welcome Stéphane! Although I am not personally aware of such a system, I imagine at least one does exist. Accessibility functionality on Android is fairly advanced, and I have a hunch a system exactly like what you describe is available. I'm sorry I can't be of more help in that regards.
As a possible simple alternative, years ago a quadriplegic colleague of mine was a computer programmer at a very prominent tech company.  He would strap a pencil-like device to his forehead using a specially-designed headband and write computer programs.  Instead of a pencil tip, the tip of the device was more like an eraser.  Back then, there were no touch screens, so he would be pressing physical keyboard keys.  I wonder if something similar would work for you, but with a tip that works with touchscreens.
Another quadriplegic friend had short 10-15cm (4-6") arms that were rounded at the ends. At the ends of each (or just one... I don't exactly recall) small appendage, was a small ~1cm cavity in which he could attach tools, including a similar pencil-like device (with an eraser-like tip) which he used to type.  He even drove a customized vehicle (a large van that had a wheelchair lift).
I don't know, but maybe some of the above gives you ideas!
I also have a hunch that organizations that help quadriplegics and paraplegics would have good resources for exactly the type of system about which you inquire.  I know that for people with very limited vision or blindness that there are some amazing organizations that help locate (and possibly help fund) obtaining tools like you describe to help accommodate their needs.  I imagine (and hope) similar organizations exist for quadriplegics and paraplegics.
In summary, I hope someone else here will be able to offer you a more specific answer to you question, but in the meantime, that at least a little bit of what I wrote will be of help to you.


text:
Let's Encrypt: Is there a workaround for the 2021 SSL "cutoff" for pre-7.1.1 Android devices?
In January 2021 all devices with Android prior to 7.1.1 will not be able to connect to HTTPS servers using Let's Encrypt certificate (Let's Encrypt blog post explaining the details)
Is there any workaround that's system-wide (i.e. all apps, not just a single app, like using Firefox) for the SSL certificate expiration on Jan 11th 2021? Assume that one has root access to their device, and that upgrading to a newer device is not an option.

Update 2023-07-11
By the current schedule, Let's Encrypt cross signing will end on September the 30th 2024. After this date Android 7.1 stock devices will become more or less useless for Internet surfing as all Let's encrypt based certificates will be considered untrusted and the connection will not be established.
Update 2020-12-21
Let's Encrypt has delayed the new root CA certificate for 3 years:

We’re happy to announce that we have developed a way for older Android
devices to retain their ability to visit sites that use Let’s Encrypt
certificates after our cross-signed intermediates expire. We are no
longer planning any changes in January that may cause compatibility
issues for Let’s Encrypt subscribers.
A recurring theme in our posts about our upcoming chain switch has
been our concern over the effects on users of Android operating
systems prior to 7.1.1, whose devices don’t trust our ISRG Root X1.
Thanks to some innovative thinking from our community and our
wonderful partners at IdenTrust, we now have a solution that allows us
to maintain wide compatibility. Critical to our mission as a nonprofit
is to help create a more secure and privacy-respecting Web for as many
people as possible. This work brings us closer to that goal.
IdenTrust has agreed to issue a 3-year cross-sign for our ISRG Root X1
from their DST Root CA X3. The new cross-sign will be somewhat novel
because it extends beyond the expiration of DST Root CA X3. This
solution works because Android intentionally does not enforce the
expiration dates of certificates used as trust anchors. ISRG and
IdenTrust reached out to our auditors and root programs to review this
plan and ensure there weren’t any compliance concerns.
As such, we will be able to provide subscribers with a chain which
contains both ISRG Root X1 and DST Root CA X3, ensuring uninterrupted
service to all users and avoiding the potential breakage we have been
concerned about.
We will not be performing our previously-planned chain switch on
January 11th, 2021. Instead, we will be switching to provide this new
chain by default in late January or early February. The transition
should have no impact on Let’s Encrypt subscribers, much like our
switch to our R3 intermediate earlier this month.

Extending Android Device Compatibility for Let's Encrypt Certificates
Installing new Let's Encrypt root CA certificates
If your device is running Android 5 and before or is rooted you can install the missing root CA certificates yourself. As far as I know the following two certificates have to be added:

ISRG Root X1
ISRG Root X2

On Android 5 and before you can simply install them as "user certificate". Note that this automatically forces you to use a lock screen with pattern/PIN or password lock.
Older rooted devices
On older Android devices that are rooted you can add the new Let's encrypt root CA certificates to the system certificate store /system/etc/security/cacerts.bks.
To do so download this file to a computer and use KeyStore Explorer to add the Let's encrypt root CA certificate files and save it. Then write back the cacerts.bks to your Android device.
Newer rooted devices
On newer, rooted devices the easiest way is if the device is rooted via Magisk, then you can install the two certificates as user certificates and then move them to the system store using the  Magisk Module Move Certificates.
If Magisk and the mentioned module is not available you can still install the certificates as user certificates and move them manually to the system store.
The installation process is very similar as shown in the installation tutorial for the mitmproxy root-ca certificate.
The followings section shows the certificate hash values for the Let's encrypt certificates:
openssl x509 -inform PEM -subject_hash_old -in isrgrootx1.pem | head -1
6187b673

openssl x509 -inform PEM -subject_hash_old -in isrg-root-x2.pem | head -1
8794b4e3

Also make sure that the copied certificate file has the correct permissions:
chmod 644 /system/etc/security/cacerts/6187b673.0
chmod 644 /system/etc/security/cacerts/8794b4e3.0

Once you have installed the certificates you should be able to browse (without a security warning) to the following location: https://valid-isrgrootx1.letsencrypt.org/

In my case (https://android.stackexchange.com/q/242440/196632) I've got the ISRG Root X1 automatically in user installed certificates, without any action from me. It is as if it has self-installed itself. How was it possible?


text:
Possible to purchase (buy) an Android app from the Google Play store web site without installing it on any device?
Is it possible to purchase (buy) an Android app from the Google Play store web site without causing that app to be automatically installed on a device?

As far as I know there is no way to buy an app without selecting a device and triggering automatic installation on that device. If the device is offline as far as I know the installation will be performed the next time it comes online.
The only workaround would be to add the Google account on a device, enable Airplane mode, remove the account and reboot the device. Then the device is still listed in Google Play Store for a few months and can be used to buy apps but they will never be installed as the devices comes never online again.
A similar option are "virtual devices" devices that do not exist in reality (or as emulator) but are registered in PlayStore. App download tools like Raccoon are capable of creating such virtual devices. But if those devices are not used for a time they also loose functionality.

I'm glad you knew exactly what I am talking about.  Your trick is very clever, and might come in handy.  Any idea what triggers Google to eventually de-list the device from the Google account?

@RockPaperLz-MaskitorCasket Basically I assume that there are commands in the PlayStore app communication with Google that "refresh" a device registration at Google. But I am not sure which exact command(s) are responsible for the refresh, as it takes months before you get the result this is pretty difficult to test.

Thanks Robert.  I also appreciate your "virtual devices" tip.  I'm going to look into that, because I also could use something like that for another project.

Do you know the cost of Raccoon and DummyDroid (which seems to be required to create a virtual device)? According to an issue report on the Raccoon GitHub repo link you provided, there is a hidden cost that is not appropriately disclosed: https://github.com/onyxbits/Raccoon/issues/57

In light of the above, do you know any other projects besides Raccoon/DummyDroid that can create virtual devices?

@RockPaperLz-MaskitorCasket Just click the "please buy" link and you end up here:  https://billing.onyxbits.de I don't use raccoon and dummydroid so I don't know how good it works. But based on my experience such virtual devices need to be refreshed periodically, otherwise they lose their properties after a few weeks.

Thanks Robert.  That link answers my question.  For some reason, I'm not seeing "please buy" anywhere on the GitHub page or the Raccoon website.  So the link you provided is extra helpful.  I'm still looking for something simple that just creates a virtual Android device without all the extra bells and whistles (or the need to install a JRE), so if you come across one, I'm interested.


text:
Friends phone keeps rebooting & other problems
A friends phone keeps rebooting, & when it does it resets their theme to the default theme. A couple times it has gotten stuck on the bootscreen requiring a battery pull to fix it. Just now after opening google photos which they have been using for a long time without any problems a popup suddenly appeared asking for permissions to access photos & wouldn't allow access with clicking allow. The phone is a Galaxy On5.

The phone is pretty old and has only 1.5GB RAM. For modern apps this not much. Make sure to disable everything that costs unnecessary RAM like animated background, high-res background image, lots of widgets. Also think about using more "light" apps (Google, Facebook and others provide "light" editions that work better on older devices).

I just had to factory reset it using the recovery (hold volume down+power+home). For light apps Hermit is good.

^ volume up+power+home.


text:
Cannot rate some installed apps on Google Play Store
It looks like I can rate some apps on Google Play store and cannot for some other ones while both are installed on my smartphone.
Here are two examples.

InShot app is installed on my phone. But, Google Play Store does not list it under Installed tab. And it is not allowing me to rate or review this app.

Kinemaster app is listed under Installed tab and I can give it rating.

I tried all the solutions in the question Cannot rate apps on Google Play. But, these aren't working.
This issue exists with quite a few of the apps on my device. So, why isn't Google Play Store allowing me to rate some installed apps? Is there any solution?
EDIT: From this Google Play thread, it looks like many people faced the same issue.

Also happening with my application also,
I am not sure but I checked it's happening on my company email, Google has an algorithm in which you can't rate your company app OR you can not rate the app with an organization account but with my personal account I can rate it.

I think Google is purposely screening our reviews, I've seen apps where every review read claims the app is a scam but still has a 4.5-star rating. I have come across maybe 10 apps that have over 50k downloads but no reviews and even though, I found the app to be nothing but a scam ADWARE, and didn't work, Google would not allow me to leave a review.

I think one of the big problems with the Google ecosystem, and the Google Play store in particular, is that (like Amazon), it is plagued by fake reviews by scammers.  And, like Amazon, Google does not take sufficient action to deal with the scammers.  What happened when you tried to leave the review for Google Play store app that was obviously a scam?

F-Droid (https://f-droid.org) is a well regarded source for quality open-source apps.  Unlike Google, they have an effective system in place for preventing scam software.  And unlike Google, which is worth over a trillion USD, F-Droid operates on a shoestring budget.  That should tell you quite a bit about the priorities and values of the questionable people at Google vs. the good people at F-Droid.


text:
Android WIFI Hotspot
Does anyone know where android save the details (Mac, etc.) of devices that connected to my phone ?! (When my device is used as a  mobile hotsop)

On my device it's /data/misc/wifi/WifiConfigStore.xml
You will need root to access it.

Hello. In my OnePlus 6 running Android 10, in that file all I get to see are the MAC entries of the WiFi/hotspot devices my device has ever connected to. On the other hand, OP is asking the details of the devices connected to his own Android hotspot. Can you mention whether you are able to get this information in that file too, and in which Android version and device?


text:
Stop the keyboard from suggesting words from all downloaded languages
I recently installed 4 languages on Samsung Galaxy S10+. To my surprise, regardless of the language I choose to write in (= scroll to), it seems to suggest words in all 4 of them simultaneously.

It seems like the system has got all 4 mixed up or together.
Any ideas on why and how to fix this?

You don't specify that you're using the native Samsung keyboard, but it looks as though you are from the screenshot. If you go into the keyboard settings, under "More typing options," there should be a setting for "Multilanguage text prediction," which you can disable.


text:
How can I upgrade my "obsolete" Pixel to a current/secure version of Android?
I have a first-gen Google Pixel.  It came with Android 9 (Oreo), then after I'd had it a while, upgraded itself to 10 (Pie).  Just about the time Android 11 (Q?) came out, I was notified that Google would no longer supply updates (not even security updates, it seems) for my phone -- then not yet quite two years old.
Sure, most people buy a new phone as soon as the purchase agreement runs out on their old one.  I, however, bought the Pixel originally with the idea that, if I was going to spend $750 for a phone, I'd make it as future resistant as possible.  I bought the best camera, fastest processor, and largest storage (128 GB) that I could find, which is how I wound up with a Pixel (Apple wasn't in contention, because Apple).
Now, however, I have to choose between buying a new Pixel 4a (for less than half what I paid for my original Pixel), essentially the same phone I have but with very slightly upgraded specs (camera hardware supports longer exposures, CPU is slightly faster), in order to get two years of updates on a new Android version, buying a Pixel 5 or something else to get a significant hardware upgrade (and paying as much as I did originally) -- or continuing to carry and use my original Pixel, which still works fine, holds charge well, and is nowhere even vaguely close to full.
The only reason I have to think about this is that I'm apparently no longer eligible for security updates, meaning there's the possibility that a flaw that's been fixed for years in newer versions might let someone take control of my phone, steal my photos and storeds passwords, take over my email, etc.
Is there a way to upgrade manually, legally, with a non-rooted phone, and have the upgraded system work correctly with my hardware (camera etc.)?
The phone is on Verizon, if that matters (not sure why it would, but not sure it wouldn't).

The Pixel 4a might have similar specs, but on hardware and system level the devices are totally different. Nearly every chip installed in a phone needs it's specific driver and frameworks. Smartphones may have specs like PCs but they are embedded devices and embedded devices require much more maintenance for updates and upgrades. But I agree that 2 years for the first Pixel and even 3 years for the recent devices is not much time.

To close voter -- I've edited to remove the potentially opinion-based "why" portion and concentrate on "is there a way to get back to current/secure Android?"

That looks like an answer, @Robert.

You could install LineageOS for Pixel 1 (sailfish).
However as Google does not provide updated kernels (and drivers) the updates will only affect problems in the Android system itself.
The disadvantage is that the whole system is no longer genuine regarding Android SafetyNet check so that certain apps (especially payment/banking apps) may refuse to work.

So, to clarify -- I'll be getting up to date Android core, but stuck with 2019 hardware drivers forever -- and that may cause high security software to fail?  This sounds more and more like "buy or die" extortion...


text:
How can I use another phone's camera in place of my camera?
Ok, the problem is my camera's protective glass cover has wore down and now some dust has entered, causing the camera's output to become blurred. This is causing me a lot of issues currently, especially when I need to scan some QR code. For example, now I can't login to WhatsApp on my PC, cuz I need to scan their QR code with my phone.
What I want is, use another phone's camera instead of my phone's camera, just like the DroidCam functionality, where you use your phone's camera instead of your PC's camera. Are there any apps designed for this purpose?

Related: https://android.stackexchange.com/q/145020/218526

Here's my suggestions:

Firstly: If your phone has a front-facing camera, use that.
Secondly: grab a can of air duster and spray the rear-facing camera out( if this clears it up, then find a crystal clear tape and cover it. Or get a case that covers it.)
Lastly: I'm taking the assumption that you do have another phone. If so, just take the photo and transfer(via bluetooth, text, cloud, etc.) it.

Hope something helps.
T.Swain

I don't think it is possible to use the front camera to scan the WhatsApp Web QR code. Same for the last solution - it is not possible to select a photo from the gallery instead of scanning the QR code. I will try the second solution.

For your question, I recommend using an external camera that is plugged into the USB port of your phone camera. But for other phone 'camera mirroring' applications I have not found it, but it can be made. Just like you said, it works like the DroidCam application. Or using other means such as USB Debugging, WiFi and Bluetooth connection, or using IP (such as Video Call).

What do you mean by USB port? My phone does not have one.


text:
Dialogs of Apps don't show
I am running stock Android 7.1.1 on a Moto Z Play.
Recently I noticed that popup dialogs from apps running in the background or also in the foreground don't show automatically any more.
So, e.g. I have the apps Reminder with Alarm and Automate.
"Reminder with Alarm" has an option to show reminders as full-screen alarms with sound and Automate allows me to create widgets that, when pressed, should show a popup with a selection.
Both apps have the "Draw over other apps" permission enabled.
What happens instead of the popups being shown is that I only get a notification and when I press that notification the popup is shown.
I tried reinstalling these apps and also all other apps that reasonably could influence that behaviour. How can I further debug what is prohibiting those popups being shown?


text:
How to clear the Android file chooser history?
When using many different Android apps, a native file chooser is displayed to allow the user to select a file to process.
For example, in the well-regarded Privacy Browser web browser, visiting the VirusTotal website and then pressing the Choose file button on that site will invoke this file chooser GUI.
I noticed, on Samsung Android Nougat devices, many of the files listed in the Downloads folder were deleted over a year ago, but are still being presented as current options by the file chooser.
How can one clear the history of this native file chooser?
When clearing it, are there any undesirable side-effects?

If you press the "choose file" button on my system the app chooser opens and if I select the "Files" app it starts with the recently used files history. Is that what you are talking about?

@Robert I think so. Except I don't get any app chooser... it goes directly to the file chooser.  The file chooser has no About menuitem, or any indication if it is from Google or Samsung.  Carefully going through all apps in Settings > Apps (with system apps shown) does not immediately reveal what is actually providing that file chooser GUI.

@Robert Also, going to Settings > Apps > Default Apps > Set as Default (with Show system apps enabled) shows nothing that I find relevant, which is odd.

How to remove file from “Recent Files” on android 10?

@IrfanLatif I just finished reading your linked answer. Thanks. I tried clearing the cache for com.android.documentsui, but doing so (unsurprisingly) had no effect. I'm thinking of clearing its data next. Will doing so result in any data loss of stored files?

@IrfanLatif I went ahead and took a chance and cleared data for com.android.documentsui.  It had no effect either.  Perhaps a reboot after doing that will make a difference.

@RockPaperLz-MaskitorCasket As Irfan wrote in the linked answer the recent files list is not populated by the com.android.documentsui app itself, instead it is the system-wide Media Provider.

Thanks. I drilled down to several linked answers within the linked answer, and lost sight of that important fact.  That Android media scanner/provider has been problematic since the early days of Android.  When you clear its cache and data, is any data on the device lost?

No data is deleted but index database is cleared. See the heading Solution in my answer: https://android.stackexchange.com/a/209119/218526

@IrfanLatif Thank you. Why does a media scanner app need to be run afterwards? Won't the database get recreated automatically after a few hours? (Also the media scanner linked in the Solutions section hasn't been updated since KitKat... is it still a good choice?)

com.android.providers.media.MediaScannerService hasn't been changed since KitKat. So the app should work on new releases too. The same service is called on every boot by com.android.providers.media.MediaScannerReceiver. Details in the same answer.

@IrfanLatif Thank you Irfan.  Interestingly, I tried deleting the cache and data for com.android.providers.downloads and com.android.providers.downloads.ui before doing anything with the media scanner, and it resolved the issue.  I'm surprised it worked, as I didn't touch the media scanner.


text:
Intermittent scrambled panels when browsing on Chrome for Android 7.0
The client has intermittent scrambled panels when browsing on Chrome for Android 7.0. They display randomly as pages are loaded.

Image resized. Click for the full image.
The phone in use is LG K8 (2017)
Is this simply a breakdown in hardware or could there be a security issue?

I think this is happening because of a hardware issue. perhaps the screen's IC is broken

Recently started having the same issue, and I'm not the only one, according to Google search. Seems to be a software issue with Chrome. The only solution so far has been to install Chrome beta version


text:
Huawei mate 20 lite bootloader-unlock doesn't work due to FRP
I've got two huawei mate 20 lites in front of me, and I have the bootloader codes to unlock them.
But when I use adb fastboot to unlock them I get the message "Cannot unlock bootloader, you need to unlock FRP first" not with those exact words, but something like that.
How can I unlock the bootloader with the codes that i have without entering the phones settings to enable usb debugging? I feel like I've scanned the whole internet by now. Thank you!

Welcome to Android Enthusiasts! Maybe our frp tag wiki and answered questions tagged frp are good starting points?

https://youtube.com/watch?v=cNOlGTg0fMw

have you enabled allow OEM bootloader unlocking in settings, it is in dev options
Here's some steps:
(optional, to enable dev options):
settings >> about phone >> (tap build no. 7 times)
enable oem unlocking:
settings >> system >> advanced >> developer options >> allow oem unlocking(turn it on)
Screenshot:

(mine is disabled as I have a unlocked bootloader)

The problem is that my friend whom i'm trying to help unlock the bootloader for, forgot/lost his google account. The only code / password he has for the phone is the bootloader code! I don't know what to do here! Is it impossible since i cant get into the settings?

I can't reach settings. I'm locked out of the phone, we thought we could unlock bootloader without using settings? Like with ADB? But in ADB it tells us to unlock FRP first but we cant reach settings we forgot the codes for the phone!


text:
Regen default.prop
So there is this settop box in india, called airtel internet tv(codename ganesa) It's gone 2 years with no updates, stuck on android 6. it has no usb adb but does have wireless adb. got root using dirtycow and updated default.prop to this:
before
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.hardware=ganesa
ro.product.board=ganesa
ro.adb.secure=1
ro.secure=0
security.perf_harden=1
ro.allow.mock.location=0
ro.debuggable=0
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
#
# BOOTIMAGE_BUILD_PROPERTIES
#
ro.bootimage.build.date=Tue Jul 16 04:42:11 UTC 2019
ro.bootimage.build.date.utc=1563252131
ro.bootimage.build.fingerprint=airtel/ganesa/ganesa:6.0.1/MUE91/06.02.73:user/release-keys
persist.sys.usb.config=none

after
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.hardware=ganesa
ro.product.board=ganesa
ro.adb.secure=0
ro.secure=1
security.perf_harden=1
ro.allow.mock.location=0
ro.debuggable=1
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
#
# BOOTIMAGE_BUILD_PROPERTIES
#
ro.bootimage.build.date=Tue Jul 16 04:42:11 UTC 2019
ro.bootimage.build.date.utc=1563252131
ro.bootimage.build.fingerprint=airtel/ganesa/ganesa:6.0.1/MUE91/06.02.73:user/release-keys
persist.sys.usb.config=none

After a quick reboot wifi adb went rip, I dont have a male-to-male usb cable rn, but can quickly make one if it is the only option!
So I would want to regen stock default.prop
Many thanks!

I made a male to male cable at the end and connected it, connected and restored default.prop .
:)


text:
Google pay scanning credit card without camera permission
I have Google Pay installed on my phone. I have denied camera permission for every single app (except for "Settings" app which I am unable to deny Camera permission) on my phone.
When I try to add payment method on Google Pay app, Google Pay app is able to use my phone camera to scan credit card without camera permission. How is this possible?

Is it a system app? Came with the phone? In which case it has elevated privileges

It's a Google app. Letting you "play" with its permissions often is "window dressing". I've seen it more than once that it seemed to have no effect. There's always Google Play Services on your device, which is a system app and thus… see what @beeshyams wrote. Unless of course you'd have a Google-free device. But that you'd not use Google Pay.

@beeshyams It came with the phone but I doubt it is a system app. I am able to uninstall Google Pay and reinstall it from play store.

@Izzy I am looking for something more technical. How does Google app access Camera API without getting java.lang.SecurityException due to lack of camera permission? Do they use a different set of APIs that regular app developer has no access to? If the camera functionality comes from Google Play Services and Google Pay merely invoke Google Play services, is it possible for a regular app to invoke this functionality from Google Play Services as well (as a proof of concept for e.g.)?

It's closed source, so hard to look inside. But yes, there are parts of APIs only available to system apps, or apps signed with the same key. This I suspect in several situations (like Google apps re-enabling themselves despite of having been explicitly disabled by the user, for example).

I have seen multiple different Google apps give themselves permissions after the user has denied them permission.  However, in those cases, you can see Google has given their apps permissions behind your back.  This case seems a bit different as the OP seems to be indicating that the permission is still denied, but the Google app is able to use the camera.

@RockPaperLz-MaskitorCasket correct, the permission still remain denied yet Google Pay is still able to access camera function.

Thank you for confirming.  That's downright horrible, and I actually wonder if it is illegal in some jurisdictions.  That's a huge privacy violation.

Can you provide the output of the command adb shell appops get com.google.android.apps.walletnfcrel and adb shell appops query-op CAMERA allow ?

In addition, try using Google Pay again. If you still see it being able to use your camera despite being denied to do so, log/note the current time and than share the output of these two commands along with saved timestamp. adb shell dumpsys appops --op CAMERA and adb shell dumpsys appops --package com.google.android.apps.walletnfcrel

Google Pay is not available in my country, so I can't really test it. That said, is the scanning done directly in Google Pay app (like a partial window for scanning QR), or a different full-screen page/activity? The first one shouldn't happen without camera permission, but the second one might hint at utilizing an external app/service for the camera.

@Firelord Great advice! com.google.android.apps.walletnfcrel is not listed for adb shell appops query-op CAMERA allow, I assume this means that camera functionality is denied for com.google.android.apps.walletnfcrel. Using adb shell dumpsys appops --op CAMERA, I see that only com.google.android.gms is utilizing camera at the timestamp when I scan credit card using Google Pay.
com.google.android.gms has camera permission enabled. Google Pay scan credit card function cease to work when camera permission for com.google.android.gms is denied.

Okay. What does this command shows: adb shell 'dumpsys package com.google.android.gms | sed -n "/Shared users/,/install permissions/p"'

@Firelord
  SharedUser [com.google.uid.shared] (cb42841):
    userId=10025
    Packages
      PackageSetting{3271bb9 com.google.android.gsf/10025}
      PackageSetting{8096980 com.google.android.gms/10025}
    install permissions:

That is a dead end for me. I think we have to try Andrew's approach now. My suggestion is to find out what activity ends up in foreground when your Google Pay is scanning a credit card.

@Firelord I hope all the comments here are never deleted as they are quite valuable.  Your comments, especially, are very helpful and educational.  Perhaps some of them can even be included in an eventual answer.

@Firelord I did a adb shell dumpsys activity and got some info. The card scanning is from SecuredCreditCardOcrActivity in com.google.android.gms. I think we have answered my question. Feel free to create an answer for this and I will accept it.

Not really a part of this question but I am curious about the mechanism to start com.google.android.gms SecuredCreditCardOcrActivity. I am guessing it is using either a BroadcastReceiver or via explicit Intent. Is it possible for a non google app to start SecuredCreditCardOcrActivity by replicating the same mechanism?

May I know the last activity's name on Google Pay before it delegates to SecuredCreditCardOcrActivity? I'm trying to "debug" the APK using Android Studio (not really full reverse-engineering) and see if I can get some hints from there, or maybe you can see from the logcat how it fires the Intent?

@AndrewT. The task stack is com.google.android.apps.walletnfcrel/com.google.commerce.tapandpay.android.cardlist.CardListActivity -> com.google.android.gms/.tapandpay.tokenization.TokenizePanActivity -> com.google.android.gms/.tapandpay.tokenization.AddNewCardForTokenizationActivity -> com.google.android.gms/.wallet.im.ImRootActivity -> com.google.android.gms/.ocr.SecuredCreditCardOcrActivity with SecuredCreditCardOcrActivity being the top most activity. I am guessing we only have to start TokenizePanActivity and com.google.android.gms will take it from there.


text:
On Whatsapp can I know if I am in someone's contact list based on the "security code" messages?
Can I know if someone has me in their contacts based on the security code messages that are sent when there is a change or is that based on whether I have them in my contacts?
I want to know if someone still has me in their contacts, I have their number saved and when I opened the chat I saw the list of security code changes from their side going back 4 years or so (most recent one from this year). Does this mean they still have my number saved or is that because I have theirs?

If you are able to see that other contacts' Security Code Change Notification, it means that you are they have you as a contact as.

These codes are unique to each chat and can be compared between people in each chat to verify that the messages you send to the chat are end-to-end encrypted.

If you have never communicated with a contact, there won't be any security codes exchanged between both of you. Meaning that you won't see changes that happened when they reinstall, update the app or change numbers.

At times, the security codes used in end-to-end encryption might change. This can happen because you or your contact reinstalled WhatsApp or changed phones.


text:
Why I can't remove directory using mv?
So I want to use bindfs that require the mounted directory to be empty. Then I'm trying to move WhatsApp (Internal storage) contents to external SD card
sdcard="/mnt/media_rw/6DE8-1BC6/"
mv /data/media/0/WhatsApp/* /data/media/0/WhatsApp/.* $sdcard/WhatsApp/

But then mv outputting this
mv: can't remove '/data/media/0/WhatsApp/.Shared': Is a directory
mv: can't remove '/data/media/0/WhatsApp/.StickerThumbs': Is a directory
mv: can't remove '/data/media/0/WhatsApp/.Thumbs': Is a directory
mv: can't remove '/data/media/0/WhatsApp/.trash': Is a directory
mv: can't remove '/data/media/0/WhatsApp/Backups': Is a directory
mv: can't remove '/data/media/0/WhatsApp/Databases': Is a directory
mv: can't remove '/data/media/0/WhatsApp/Media': Is a directory

What is happening here?
Maybe I should use this instead?
cp -r /data/media/0/WhatsApp/* $sdcard/WhatsApp/
cp -r /data/media/0/WhatsApp/.* $sdcard/WhatsApp/
rm -rf /data/media/0/WhatsApp/

I'm running this using init.d

instead of copy you can create hard links with cp -al (if $sdcard is on same file system). another method is piping two tar commands
together https://unix.stackexchange.com/q/127712

I don't think fat filesystem support links. How I pipe tar?

tar : Unknown option Bf :(

'tar -c /sdcard/WhatsApp | tar -xC $sdcard && find /sdcard/WhatsApp -mindepth 1 -delete'


text:
How can I allow my partner to find my device?
When I lose my device (or think I did) I would like my partner to be able to locate it. However, I cannot find any such setting in the "Find my Device" app.
Is there maybe an alternative application that allows this?

Google: Be ready to find a lost Android device

It's a bit of a workaround, but I use the Automate app to turn the ringer volume up to maximum when my phone receives an SMS with a specific text from my partner's phone. Then she can ring my phone and it's easy to find.

you must add the account of your partner on the devices and then open Find my Device app and login whit that account on the app and give some permissions, sorry i don't comment  instead of answer because it is not complete the answer but i don't have that privilege jet  ! :P I hope it helps  !


text:
How to permanently delete data on an android phone including images videos and etc..?
I have and android phone and I usually delete images and also delete them from trash . But I always can recover deleted items by using third party recovery apps like diskdigger and all deleted files can be recovered by doing this way .
I was wondering If there is a way to delete anything on my phone permanently which cant be recovered ?

I don't know if your phone it's rooted or if you know terminal but rm it is a badass delete command even in Linux it is really hard to get information from, deleted whit rm but not impossible if you want to don't have to factory reset your phone for delete something you can over write on it, like delete it whit
rm -rf myfolder/to/delete

okay and then over write the space left on the device like
dd if=/dev/zero of=/sdcard/some_file_name.txt bs=1024 MiB=space_left_on_megabites

this will create a file of the size of the space left on where you want to overwrite the sd or the internal storage you must be really carefully whit the dd command  "space_left_on_megabites" it is the amount of megabytes left on the device if you have 6 gb it must be MiB=6000 etc..
you will get the notification of running out of space on the device don't worry you would get it back
ones the dd command finish it will take some time it's writing whit zeros on all the space left, then you delete the /sdcard/some_file_name.txt whit rm
rm -rf /sdcard/some_file_name.txt

then you have wipe ones you available space if you what to make it harder you must repeat the process like 5 times and then it will be really really impossible to recover it! but whit one time does app you mention it wont be available to get it back


text:
How to make phone vibrate in DnD (Do not Disturb) mode
Pretty simple question, I have a Lenovo P2 running Android 7. Instead of a phone being entirely quiet I would like it to vibrate for each call/sms/notification. The reason I need DnD to do this because I can schedule DnD to turn on and off whenever I need whereas I need to change silent/vibrate manually and I am prone to forgetting to do this when required. Seems like a pretty basic function so how would I do this? I've already been nearly everywhere in Settings.


text:
Google Play Store without payment
Can I use Play Store with no credit/debit card, or PayPal or code to redeem. I have no intent of paying anything, what I want is free, so I don't want to put cards online. Is there a way to do this?

You don't have to do anything. Google accounts without payment info work right after creation.
The only negative on a non-pay account is that in Google Play Store if you download an app from time to time you get a nag screen about "Completing your account set-up" where you can specify your payment data, but there is always an option to Skip this dialog without negative effect (see sample screen-shot below).

This answer doesn't show a skip option

@StephaniePowers Have you noticed the big large Skip button on the left side on the bottom?


text:
Pair and Connect to a BLE device from inside an app behaves differently on Pixel 3a and 4a
After migrating from a Pixel 3a to a Pixel 4a (both running Android 11), re-connecting the GoPlus (a BLE accessory) in Pokémon GO now requires two more actions, first a notification "Pairing request" where I need to click "Pair & Connect" and then I need to press "Pair" on a popup in the middle of the screen "Pair with Pokémon GO Plus" (where I can decide if I want to share contacts and call history). Unfortunately, Niantic un-pairs the device after one hour, so when you want to reconnect, it is no longer paired in Android.
This is the exact same app running on the exact same version of Android, but on a device "one generation" newer. It seems strange that there would be a difference in how this works?
Is there some kind of permission I can grant Pokémon GO with "pm grant" from an ADB shell, or some other setting I can change, to just allow Pokémon GO-initiated pair and connects to BLE-accessories without user interaction?
("dumpsys package com.nianticlabs.pokemongo" shows that both devices already include android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN under "requested permissions").

Actually it is not strange, in the 3A the GoPlus was paired on Android 10 initially, so it's properties carried over after the upgrade 11 and everything stayed the same as long as it was not completely removed from the device. Once you went to the 4A, it was a new connection on 11. I literally deal with the same thing going from a 3A XL to a 4A.

Reading what you wrote, I think you are saying that something was "saved" about this BLE device, that does not exist on the new phone. That sounds logical - but my question is, what exactly is that, and how can I create/save the same information, from scratch, in Android 11, so I can get back the old behaviour. If the answer is "you can't", it would be nice if someone had pointers to where I can read more details about this change in android 11 and understand it better...


text:
TWRP tells me: adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
❯ adb sideload lineage-17.1-20201108-nightly-guacamole-signed.zip
* daemon not running; starting now at tcp:5037
* daemon started successfully
adb: sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information

This is because TWRP doesn't support sideloading on the One Plus 7 Pro. From the official port page

If you don't download the zip file to your device first for any reason, you will need to adb push the zip to the device because MTP is not currently working on the OnePlus 7 Pro in TWRP. If you are unable to use adb, you can also use a USB stick with an OTG cable, if you have those handy.

udev permissions problem is a generic one arising due to unknown USB VID/PID: https://android.stackexchange.com/q/144966/218526. It doesn't always indicate that sideloading isn't supported. That's a device-specific case.


text:
How can I tell whether I am booted into the A or B partition?
Android can install to an A or a B partition. This seems to be a default these days. How can I tell which one I am booted into using adb?
I am using LineageOS 17.1.

The right-most way (bootctl)
The command to provide this information is bootctl. As root (having run adb root), you can use this like this,
$ adb shell bootctl get-current-slot

Note this is the slot's number, you resolve that to the letter with,
$ adb shell 'bootctl get-suffix $(bootctl get-current-slot)'

See also: How can I boot to a specific partition with ADB?, which also uses bootctl
Using getvar
$ adb shell /bin/getprop ro.boot.slot_suffix
_b

From fastboot
$ fastboot getvar all

And find in the output: (bootloader) current-slot: a
Other ways
From /proc/bootloader_log
This command from adb shell
$ grep -i 'DEBUG: boot_' /proc/bootloader_log

Or like this,
adb shell "grep -i 'DEBUG: boot_' /proc/bootloader_log"

It return output like this,
avb_slot_verify.c:325: DEBUG: boot_b: Loading entire partition.

I believe that's in reference to the b partition that it's booting from.
From /proc/cmdline
You can also parse this out of /proc/cmdline
$ adb shell 'cat /proc/cmdline | tr " " "\n" | grep -i slot'
androidboot.slot_suffix=_b


text:
How can I change the partition (slot) that LineageOS Recovery targets?
If I boot into LinageOS Recovery, how can I tell what slot to target when I use adb sideload?


text:
Restore functionality to press home button to go to home screen
On my Samsung Galaxy A3 (2017) with Android 8, I used to be able to press the home button to directly go to the home screen.
Some configuration must have changed because now when I press the home button, it only activates the screen but doesn't take me to the home screen.
I need to press the home button to activate the screen and then swipe to go the home screen.
Anyone can help me restore the previous functionality?

Did the old behavior you mention (go to the home screen) occur when the screen was on, off, or both?

When it was off. I would press Home button once to enable screen and then a second time to show the pin lock screen. Once entered the PIN, it would take me directly to the home screen.


text:
syslog shows a bunch of FF messages
When I run dmesg I see a bunch of these errors,
FF SUSPEND INT                  0 ?\x09
FF WAKEUP                       0 ?\x09
FF GAD SUS                      0 ?\x09

What do these mean? Is this normal?

Which process throws these errors?

@IrfanLatif I haven't the slighest idea, that's why I'm asking. =/

Does that appear in logcat (other than kernel buffer)?

@IrfanLatif I found the source of the error and answered below.

The OnePlus 7 Pro port is named "guacamole". You can find the source code at LineageOS/android_device_oneplus_guacamole. You may want to search for the error here, but if you can't find it check inside the setup-makefile.sh, you'll find the line,
export DEVICE_COMMON=sm8150-common

That means the kernel's source code is located LineageOS/android_kernel_oneplus_sm8150. You can also find this link on the in the documentation page for the port under "kernel link".
If you do a search in the LineageOS/android_kernel_oneplus_sm8150 repository for "GAD SUS" in that repository you'll find the source of this error which is drivers/usb/dwc3/gadget.c:3654. So the problem is in USB Dual Role Device, which is an ASIC driver described as,

The Synopsys DesignWare® USB 3.0 Dual-Role Device (DRD) Controller is a set of synthesizable soft IP that ASIC/FPGA designers can use to implement a complete USB 3.0 DRD for 5 Gbps speeds. The USB 3.0 DRD Controller is compliant with the specifications for SuperSpeed, High-Speed, Full-Speed, and Low-Speed USB speeds. Optimizing development time and minimizing engineering risk, the DesignWare USB 3.0 DRD Controller helps designers bring their host and peripheral designs to market faster for wired and wireless applications such as smart phones, tablets, TVs, set-top boxes, cameras, modems, game consoles, PCs, and telecommunications equipment. In addition, the IP is silicon proven in design process nodes from 180-nm to 7-nm.


text:
Samsung Galaxy S6 Lite Tablet Pen: Palm Rejection in Android
I recently bought the Samsung Galaxy S6 Lite Tablet (Android). It has an S Pen included which works great and I get palm rejection with the in built Samsung app and also in Squid.
But when I use other popular apps such as Adobe pdf viewer, or zoom or Evernote the palm rejection does not seem to work.
Any idea if there's a fix for this?
Further more, the S Pen does not need to be charged (unlike say the Apple pencil); just curious how the active palm rejection etc. works if the pen is indeed passive and not active?

Not sure if they have any software incorporated that can do the palm detection.
However, you can use an hand glove (buy one or make a DIY from an old sock) to prevent your palm to be detected as input.
Hope that this can help you somehow.


text:
Can't install any apps that were previously saved on SD card
Recently my SD card stopped working and all apps that were saved to the SD card were obviously gone however the problem is while the phone, LG G6, still works and I'm able to install apps through Google play store I can't install any of the apps that were previously saved on that SD card. I've tried all the troubleshooting options, except resetting my phone, I don't want to lose what's left on my phone. The SD card was removed as soon as it became a problem, with it in the phone wouldn't work at all. Any suggestions?

consider 1:1 clone with gddrescue that way you may get all your data back from broken MicroSD card https://android.stackexchange.com/q/222394

if you don't want to recover MicroSD card you must forgetting sdcard in settings. be aware that will delete encryption key and sdcard is not recoverable anymore. make sure you forget the right one or you will lose more data again


text:
TRRS compatibility, pinout. How does TRRS work?
After 16 hours of searching, I could not find comprehensive answers to the following questions:
What's the modern PC, Android and Apple pinout standard inside the 3.5mm TRRS female socket? Is it CTIA? Is it the same for all modern headphones/headsets/earphones with TRRS male plugs?
Or do some PC, Android and Apple device sockets and earphone plugs have a different pinout configuration?
Are there known incompatible plug/socket or M/F TRRS brands or products?
Are the Iphone headsets/earphones fully compatible with PC and Android? And vice versa?
What exactly happens when a headset TRRS plug is fully inserted into a socket? Does it automatically disconnect/disable the PC's speakers and microphone and connect/enable those of the headset?
Do external headsets/earphones with TRRS male plugs require new drivers to work properly with PCs? [never, sometimes, in most cases, often, always]

Some information here


text:
Is there alternative to the Shred utility for Android?
There is such utility for Linux systems called shred. It writes files with random values several times and then also can write it with zeroes (to hide overwriting) and delete them so that files couldn't be restored.
Is there something trustful like this for Android (preferably not proprietary, but libre software)?

Overwriting data in the "flash age" is next to useless as wear leveling redirects the written data to a new flash cell.

https://unix.stackexchange.com/q/602498 instead of /dev/zero you can use /dev/urandom (but as Robert said it's pointless) https://android.stackexchange.com/q/231098

@Robert ok, what to do to destroy data: overwrite the whole flash memory with the other files?

@RS As long as the flash memory has no spare section overwriting all free space should work. But be careful Android does not like it if the user data partition is fully used. Therefore better keep some KB free.

Flash storage devices are very likely to have some over-provisioning space left for garbage collection, weal leveling and performance. And also there are scores of partitions other than /data on a common Android device. So even if you overwrite (or ERASE / TRIM / DISCARD) the whole /data partition (including its filesystem), you cannot clean the whole flash storage chip. But overwriting a file with random data is usually enough for common users. It makes the recovery of file from filesystem level impossible. Recovery from flash chip isn't very easy, it's usually done in forensic labs only.

@RS can you give us example how you deleted and successful recovered some file on your android device?

@alexcs I deleted a photo by trash button in picture viewing application (Gallery). Then installed some application from Google Play, it scanned memory and then it showed huge amount of deleted images, including the one I was looking for.

@Irfan Latif so if I edit a photo, like spoil it with a brush and then delete it, it's going to work? Edited (spoiled) image only can be recovered, right?

that files actually were never deleted. you most likely just 'restored' existing files from com.android.gallery3d/files/.trashcan or com.android.gallery3d/cache - recovery of deleted files isn't that easy (especially on FBE encryption it's not possible at all)

@alecxs there is no /files, there was cache with some strange files (not jpgs) and I deleted all files in the cache, then data recovery app still restored all photos (deep scan). This one: https://play.google.com/store/apps/details?id=com.i8dudata.imgrecover.free

@Irfan Latif ok, then what's going on (see comment above)?

made some test with the app - it is definitely related to gallery and not actually restoring deleted files. instead it finds thumbnails of previously viewed pictures. i made some screenshot and deleted from gallery. deep scan did find the screenshot. then i cleared gallery app data. second run deep scan did not find the screenshot anymore (my phone is not encrypted)

@alecxs thank you very much, what to do if I have no /files ?

on my samsung tablet android 10 i have noticed in stock file manager there is a trash enabled by default - i have disabled now

i can imagine the locations of thumbnails are endless. basically you need such app with option to delete results. if your device is rooted you can try to find such locations and delete files manually. if you don't ask for single files, of course a simple factory reset is sufficient


text:
How to easily access and browse 100GB of photos of the local network's NAS?
I don't use Google Photos, iCloud photos or any other (distant) cloud photos storage service.
All my 100 GB photos are stored on a hard drive connected on a NAS of my home router (of course, I have backup on other disks distant from home, etc. but that's another off-topic question...).
From my Android phone, how to easily browse the photos of my local network's NAS? With thumbnails, etc. like most photo browsers.

NB: my NAS is a DIY-NAS made with a Raspberry Pi, with a SMB Samba server, but I can easily install another server on this Raspberry Pi if needed.

Mount SMB if your device is rooted. Otherwise use some file explorer with SMB implementation. Try rclone on both sides if you want something very simple: https://android.stackexchange.com/a/225612/218526. Mount NFS if you want something complicated: https://android.stackexchange.com/a/201191/218526. May also try SSHFS.

@IrfanLatif I'm not rooted. I have tried an Explorer with SMB implementation, it works. But it's probably not the best to browse thousands of images, to be able to "swipe right" to go to the next image, to see thumbnails, etc. Do you have any idea about an app that would be nice for that?


text:
Is it safe to use an old mobile phone as modem / router for Wifi?
(Related to A phone as a home 4G modem/router?)
I was wondering if it is plausible and safe to keep an old phone charging all the time with a sim card in order to use it as a modem/router for Wifi.
I thought about this idea in order to have a low-cost Wifi for an alarm system. However, my mother is afraid the mobile phone, if left all day charging and running, might explode and start a fire. Is it possible this would happen?

Does this answer your question? Does mobile hotspot have security vulnerabilities in older phones?

I have seen a lot blown up batteries because of charging 24/7 but to my experience batteries usually do explode very very rarely. Usually such batteries are physically damaged.

@IrfanLatif I was more worried about physical safety (a fire hazard), rather than security vulnerabilities.

Interesting idea. Your mother's concerns are valid for the simple reason that it's not the designed usage to be on charge 24 by 7 (they are meant to be used in mobile mode). If you are comfortable with rooting a device, look for a device that supports battery idle mode and keep it on charge as explained here

Further, in light of heating concerns, read this, if you plan to use mobile phone without battery


text:
How to sync a folder on Google drive to android
My workflow is as follows:

Photos/videos from my camera's SD card are processed on a PC.
Final photos/videos are auto synced between a folder on the PC and Google Drive using Backup and Sync.
Photos/videos are downloaded from google drive android app to phone.
Photos/videos are used from phone on apps.

I have to do step 3 manually. Is there a way for my phone to download photos/videos from Google drive in the background so that they are available in the Gallery app when I need them.
Phone used: Samsung Note 10

Run rclone sync as a scheduled task.

Yes. I use Folder Sync for a very similar workflow. It works fine and I have it running on two devices. Additionally, you can setup up automation for scheduled sync.

FolderSync enables simple sync to cloud based storage to and from local folders

Autosync for Google Drive is another alternative

I don't use Google Drive. I use Pcloud


text:
Getting "CANNOT LINK EXECUTABLE "inotifywait": library "libnotifytools.so" not found. " when tyring to run a script that uses the inotifywait binary
The script is here: https://github.com/Magisk-Modules-Repo/com.piyushgarg.rclone/blob/master/binary/syncd.sh
The code that I do not believe is working is this:
while true; do
    if [[ ! -e ${SYNC_PENDING} ]]; then
        ${HOME}/inotifywait "/storage/emulated/${PROFILE}/${SYNCDIR}" -e modify,create,moved_to,close_write -q >> /dev/null 2>&1 && touch ${SYNC_PENDING}
    fi

When I execute the inotifywait binary as a standalone, I get this message:

CANNOT LINK EXECUTABLE "inotifywait": library "libnotifytools.so" not found.

Does this indicate that I am missing a library? How can I solve the issue?

looks like a typo, try a symlink libnotifytools.so -> libinotifytools.so

You can manually use busybox inotifyd or inotifywait from commandline: https://android.stackexchange.com/a/209585/218526. Here is the statically linked inotifywait binary for aarch64: https://androidfilehost.com/?fid=10763459528675584729


text:
How can I boot to a specific partition with ADB?
If I have ADB access to device, how can I specify the boot partition and reboot. I tried with setprop but this failed,
#> setprop ro.boot.slot_suffix _b
libc: Unable to set property "ro.boot.slot_suffix" to "_b": error code: 0xb
setprop: failed to set property 'ro.boot.slot_suffix' to '_b'

Using bootctl
Though it requires adb root, one method to do this would be to use bootctl if available.
#> bootctl set-active-boot-slot SLOT
#> reboot

Note: SLOT is a number, you can find out the labels by looping through them and calling get-suffix for example this little shell script,
for slot in $(seq 0 $(expr $(bootctl get-number-slots) - 1)); do
  echo $slot: $(bootctl get-suffix $slot);
done;

Which will return the mapping,
0: _a
1: _b

See also: How can I tell whether I am booted into the A or B partition?


text:
Flashing GApps from Recovery, getting Error Code: 20
When I try to flash GApps right after flashing LineageOS with TWRP I get,
Updater process ended with ERROR: 20
Error installing zip file '/sdcard/open_gapps-arm64-10.0-micro-20201114.zip

What is the cause of this problem, how can I fix it?

This is because you can't flash Open GApps right after flashing LineageOS. You must reboot back into the recovery TWRP, and flash the application after that.
From the Official Instruction, which support only LineageOS Recovery

(Optionally): If you want to install any additional add-ons, click Advanced, then Reboot to Recovery, then when your device reboots, click Apply Update, then Apply from ADB, then adb sideload filename.zip those packages in sequence.

But this is no different for TWRP. You can find people here in the bug reports for Open GApps that have the same problem.


text:
Flashing stockrom on a "Lenovo Tab4 8 Plus" in EDL Mode
I have tried to install TWRP and LineageOS on my "lenovo Tab4 8 Plus" and it didn't go well.
Now I have a broken device... no function, only connected with PC and its a Qualcomm Device in a Diagnosis Mode, or when I change the Driver its Qualcomm HS-USB Qloader 9008. How ever I change the driver or try all possible tools like MiFlash, QFil or Lenovo Rescue and Smart Assistant it doesn't all help and no flashing possible. Do guys have any Idea what could be wrong?
I thank you all.

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

I tried exactly thsát with Linux... problem is I have this Case:
Option 2: You cannot access your Android system (almost bricked)
I can't boot in fastboot cause I have only EDL mode and bye the way I don't get that short vibration... I have tried all the stuff I found and this one is my last hope cause Linux and it could be the same problem. How do I get in fastboot mode to upload the twrp.img File with a device in EDL mode?
Thanks for helping me out of this dillema...

you don't need fastboot or TWRP if your device is already in EDL mode just skip to Flash your device

adb reboot edl
error: no devices/emulators found

Thanks again. I think my problme is, that the device is not in EDL mode, it is in a diagnostic mode. All I try to get in EDL mode doens't work. As I know its Volume Up and connect Cable...

in that case you need to figure out test point method. watch on yt how to open your device without damaging display. once it's open search for golden dots on platine. touch with fingers while connecting usb-cable (sometimes that's enough)

or search for EDL in TWRP support thread (page 49: 'turn the device completely off. Press both volume buttons at the same time (even if it's a rocker, it'll work), and only then plug in the USB cable')

Hi everyone. I wish you guys first of all best health :)
Unfortunatly I couldn't get this device in EDL mode via buttons... I had to open it... but I do not see or know which pins I have to connect... any ideas wich "test points"?
Would it maybe work when I buy a special USB kabel?

you can try DIY cable http://xiaomitips.com/guide/miui-deep-flash-engineering-cable-solution-to-non-edl-device

also ask in forums gsmdevelopers.com or gsmhosting.com or the above xda-developers.com and search for telegram support


text:
Device Not booting into Odin mode
I have an sm-g350h and when I try booting into Odin mode, It comes back to the normal mode.
I power off my phone and press home + volume down + power.
It boots into the stock os.

adb reboot bootloader should work

The command worked!


text:
App can't see wide angle camera in xiaomi redmi note 9
I have Xiaomi Redmi Note 9. With standard Camera app I can make video using wide angle camera (x0.6). But using DJI Mimo, A Better Camera or Filmic pro I can use only my standard camera (x1.0). Can I fix it somehow?

As far as I know such "special cameras" are often not accessible via Android's standard camera API, hence each app needs to be adapted for your device to be able to use e.g. the wide angle camera. This require a lot of effort so not every camera app developer does this.
Therefore the answer is: You can't fix this on your own, only the developer of the camera app can adapt the app to make it work.


text:
Error: No browser on device. What are you doing?
I am using Android 10. Samsung One UI 2.0.
I have installed: google-chrome, firefox in my android. But, when I click on external url on various apps, I get this error very often: No browser on device. What are you doing?. And on the other times I don't get this error.
How can I resolve this issue? Any suggestions?

@Robert

May be the error message is not about your web browser but about the "WebView component", this is the web browser component that can be used by other apps e.g. to display web pages. This WebView can be provided by a web browser app like Chrome or a special WebView app. Check Settings -> Development menu which app is selected to provide the "WebView implementation" (not sure if this is the exact name).

@Robert I did what you said. Please see the question I have updated it with the screenshot.

WebView looks good, that does seem to be an issue. Then it might be that an app has somehow captured the default "Browser app". You can try resetting the default apps as shown here: https://www.samsung.com/au/support/mobile-devices/reset-default-apps/

@Robert I did what you said. The default browser was already defined as Firefox. I have reset the settings. Would let you know if it occurs again.


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

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

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

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


text:
How to build Android-x86 with VirtualBox guest OS integrations
Androidx86.org says that to use 3D acceleration for my Android-x86 virtual machine, I have to install Linux guest additions. I would like to know how to do that.
I am using a

Ubuntu 20.10 (64-bit)
Intel Core i5 4th gen (@3.1 GHz)
NVIDIA GeForce GT 730
Oracle VM VirtualBox 6.1

I don't think the guest additions that come with VirtualBox can be installed on Android-x86, the list of supported OS can be seen here: https://www.virtualbox.org/manual/ch04.html#additions-linux Therefore you would have to compile a custom kernel(module) https://www.android-x86.org/documentation/customize_kernel.html In my opinion you should just start with VBoxVGA VM setting.

@Robert The vm does not perform well without 3d acceleration.I would like to know how to customise the kernel to include vbox guest os integrations.Or obtain a prebuilt image

To use GPU acceleration for android x86 vm it's easier if you use qemu.Check this out(the method i used and this video are not fully same.i used the latest version)
Linux exclusive-Feel free to comment your questions

Install the following build dependencies(no need to build for arch linux read below) usingsudo apt install -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev libsdl1.2-dev ninja-build

cd into directory you want to download and build qemu(if you use arch linux you don't have to build qemu.just use the package in official repository.also it is not necessary to add your user to kvm group.it just works.)
Download latest qemu sources using git clone https://git.qemu.org/git/qemu.git
run cd qemu
run ./configure --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --target-list=x86_64-softmmu --enable-kvm --enable-gtk
run make
run sudo adduser yourusername kvm
run sudo chmod 666 /dev/kvm
run sudo touch /lib/udev/rules.d/99-kvm.rules
add line KERNEL=="kvm", GROUP="kvm", MODE="0666" to 99-kvm.rules
you can do that by sudo gedit /lib/udev/rules.d/99-kvm.rules and pasting the line then saving.
run sudo apt install qemu-utils
cd to the directory where you want create the virtual hard disk.
qemu-img create -f qcow2 Android.img 10G
10G refers to size of hard disk drive,in this case 10 Gigabytes.
Download androidx89.(latest kernel version performed better for me or was it just a placebo?)
cd to directory were u git cloned qemu
cd to directory qemu/build/x86_64-softmmu/ ie cd qemu/build/x86_64-softmmu/
run

qemu-system-x86_64 -boot d \
    -enable-kvm \
    -smp 2 \
    -cdrom "/path/to/android/iso" \
    -name linuz \
    -device virtio-vga,virgl=on,xres=1280,yres=720 \
    -cpu host \
    -device AC97 \
    -m 2048 \
    -display sdl,gl=on \
    -drive file=/path/to/android/Android.img,if=virtio \
    -object rng-random,id=rng0,filename=/dev/urandom \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-keyboard \
    -boot menu=off \
    -device virtio-tablet \
    -machine type=q35 \
    -serial mon:stdio \
    -net nic -net user,hostfwd=tcp::4444-:5555

smp refers to number of cpu cores given to the virtual machine. -m refers to ram allocated.in this case 2048 megabytes.you can use -display gtk,gl=on also but display gtk does not work nvidia proprietary drivers for some reason.
Use arrow keys to navigate and enter to select.do as follows
Select Installation

Select create/modify partition

dont use gpt

Select new

select primary

press enter

select write and type yes .then select quit

select the partition we just created

select ext4

select yes to format

select yes to install grub

select yes to make /system read write (recommended)

Once all operations are over u can boot into android.
To boot directly to hard disk use

qemu-system-x86_64 -boot c \
    -enable-kvm \
    -smp 2 \
    -name linuz \
    -device virtio-vga,virgl=on,xres=1280,yres=720 \
    -cpu host \
    -device AC97 \
    -m 2048 \
    -display sdl,gl=on \
    -drive file=/path/to/android/Android.img,if=virtio \
    -object rng-random,id=rng0,filename=/dev/urandom \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-keyboard \
    -boot menu=off \
    -device virtio-tablet \
    -machine type=q35 \
    -serial mon:stdio \
    -net nic -net user,hostfwd=tcp::4444-:5555

to use adb use adb connect localhost:4444
if arm translator does not install automatically do this

instructions to manually install native bridge

Download this file(http://dl.android-x86.org/houdini.php?v=9_y) in your vm.9 refers to android version if you have a previous version change it accordingly.or you can check it here

change the name of the file according to the version of android in my case houdini9_y.sfs.move that file to system/etc/ it can be done using terminal or root browser.

using terminal type mv /sdcard/Download/houdini9_y.sfs /system/etc if you are not comfortable with this method use a root browser app.

now got to terminal emulator type su (if you get a prompt asking weather to give superuser access say yes forever)
then type system/bin/enable_nativebridge
You might get some errors but they are safe to ignore i suppose.(i got two errors but arm translators worked)
Go to settings androidx86-options enable native bridge

Setting up tap networking
For better guest-host integrations i use a tap network.
sudo ip link add name br0 type bridge
sudo ip addr flush enp3s0
sudo ip link set enp3s0 master br0
sudo ip tuntap add mode tap name tap0 user yourusername
sudo ip link set tap0 master br0
sudo ip link set enp3s0 up
sudo ip link set tap0 up
sudo ip link set br0 up
sudo dhclient -v br0

replace enp3so with your network interface.use the following to command to launch the emulator
qemu-system-x86_64 -boot c \
    -enable-kvm \
    -smp 2 \
    -name linuz \
    -device virtio-vga,virgl=on,xres=1280,yres=720 \
    -cpu host \
    -device AC97 \
    -m 2048 \
    -display sdl,gl=on \
    -drive file=/path/to/imgfile,if=virtio \
    -object rng-random,id=rng0,filename=/dev/urandom \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-keyboard \
    -boot menu=off \
    -device virtio-tablet \
    -machine type=q35 \
    -serial mon:stdio \
    -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no \
    -device virtio-net-pci,netdev=mynet0,mac=51:55:00:a1:11:32

Nice tutorial, but after compiling and configuration I always get this error: qemu-system-x86_64: -device virtio-vga,virgl=on,xres=1280,yres=720: Property 'virtio-vga.virgl' not found I'm on Debian 11. When I omit the virgl parameter it runs, however not sure if with 3d accel. Thanks

@masscream Try virtio-vga-gl,xres=1280,yres=720

Many thanks! Had to replace -device virtio-vga,virgl=on,xres=1280,yres=720 \\  with -device virtio-vga-gl,xres=1280,yres=720 \\  and it works perfectly, awesome performance on Ubuntu 22.04 LTS / i5-6600 and AMD RX550. (Set 4 cores and 6GB RAM for Android).


text:
How to use "Automate" Android App to have newly taken photo is saved into DCIM/whatever folder not DCIM/Camera folder?
I've installed "Automate" Android App which I thought that I can use it easily.
But it turned out I don't understand at all on how to use it.
I've read a simple tutorial on how to create "Hello World" with this app, but I can't find any where else a tutorial on how to do the things I want with this app.
I've read the "Automate" documentation, but I still don't understand at all.
My Android Camera phone will directly put the taken photo into DCIM/Camera folder.  So what I want is :

A. Either "automate" the newly taken photo into DCIM/whatever folder
B. Or "automate" to move the newly taken photo from DCIM/Camera folder into DCIM/whatever folder.

I've read in this site a question which is similar to mine :
How can I save taken photos and recorded videos out of DCIM folder?
But the question is about external-sd card and the answer is using Tasker App.
So if it's possible to do it with Automate App, I wonder how do I do it.
Any kind of respond would be greatly appreciated.
Thank you in advanced.

Please when writing an answer do it in the answers section, not inside the question itself. You are allowed to answer your own questions.

@Robert, I am sorry... I thought if it's still not solved yet then it's still a question, not the answer. Anyway I will move it as the answer although actually it's still my same question.

Both the Camera and Take picture blocks has a Destination path input argument field, click it and choose directory and filename where the picture will be saved.

Hi... thank you for the answer, ballzak. I've tried it but still no luck. If you don't mind please have a look on my edited question. Thank you once again.

This is what I did:
Create a new Flow Beginning.

Inside the Flow Beginning, I just fill the Title and let the rest at default.

Then I add the "Camera" block and connect it with the "Flow Beginning"

Inside the "Camera" I check the "Show window directly if possible" and the rest at default.

After I start the Flow, the Camera App launch, so I shot one photo, then check the DCIM folder.

Inside the DCIM folder, there is "Automate" folder which I think it was automatically created when I run the Flow.

But the photo I took is still inside the DCIM/Camera folder. The DCIM/Automate folder is empty.

So, within the Camera block, I change the Destination Path to DCIM/Automate folder

I start the Flow, take one picture, then check the DCIM folder.
No luck. The photo is still saved into DCIM/Camera folder. The DCIM/Automate folder still empty.

Next try, I remove the "Camera" block, then put the "Take Picture" block.
Inside the "Take Picture" block, I put the Path Destination to DCIM/Automate folder. Once I start the Flow, the Camera App didn't launch, but funny thing is when I check the DCIM/Automate folder, the picture is there. So, it seems the "Take Picture" block run the Camera App in the background.

Next try, I have the flow like this : Flow beginning ---> Camera (with DCIM/Automate folder as the destination path) ---> Take Picture (also with DCIM/Automate folder as the destination path). Then I start the flow and take a picture. No luck. The photo is still saved to DCIM/Camera folder not to DCIM/Automate folder).

I don't know what else to do.
I hope someone can enlighten me :).

The default Camera app on your device, Samsung maybe, probably doesn't support the Android standard of supplying a destination file. The Take picture block doesn't rely on the Camera app, so it has no such problem.

Oh I see. Thank you balzak for your explanation.