# Question
Title: Process "irq/288-wcd9xxx" draining battery, how to stop it?
I'm using a Fairphone 2 with Fairphone open OS, under Android 7, (build-number: `fp2_sibon-userdebug 7.1.2 19.11.2 sibon-24df0be9`), up to date. My battery loses systematically 50% to 90% overnight, and after having tried all sorts of things to stop it, my brother checked in a terminal (using Termux) with the `top` command which processes were using the CPU. A process named `irq/288-wcd9xxx` uses 15-20% of the CPU permanently, which could explain why my battery simply dies in 12 hours. Here's a screenshot of what I get.

As `kill` or `kill -9` has absolutely no effect on it (it seems to work when running the command, but the process is still there afterwards), does anyone have any idea about what it is, and how to kill it, or stop it?

**EDIT:**

Thank you Irfan Latif for your detailed answer, my brother and me started having a look into this, and for the moment, not much improvement:

The command `grep -rI $(readlink /proc/$(pgrep -f irq/288-wcd9xxx)/exe) /*/etc/init/ /init.*.rc` indeed doesn't yield any output, and ppid is 2, so as you thought, it appears to be a kernel thread.
(We still had a look at the `getprop | grep init.svc.` list, and tried stopping `audiod` just to see, but it didn't change anything.)

As this phone is a Fairphone (modular phone), we can remove the suspect hardware and reboot to see if it changes anything (suggestion by this fairphone thread I posted too, actually already saying it's a "kernel process", hadn't understood the implications: It's hardware interrupts coming from the audio codec).
But removing hardware didn't appear to change anything either, maybe swapping will work (my brother has the same phone ‒with a different android version‒, we'll try next time we meet), but at this stage we doubt it.

Last, we will try soon your suggestions to control the CPU usage of the process, maybe it will be a temporary fix, but this now seems to my brother to need a full system re-installation, as from the moment we did the installation (the standard fairphone open OS install), the battery always appeared to be excessively draining.

P.S. Another process, `irq/195-ngd_sli`, seems to be eating up as well 5 to 7% permanently. We hadn't paid much attention to it, but it seems now just as abnormal; we'll dig this too.

# Answer
`irq` looks something about hardware interrupts and `wcd9xxx` is a series of Qualcomm Aqstic audio codecs. So apparently `irq/288-wcd9xxx` process is running to support audio functionality on your device. The executable must be closed source binary blob, so there's nothing you can do to fix it, except (if already fixed by somebody, or) upgrading / downgrading the ROM or stopping the service.

> As `kill` or `kill -9` has absolutely no effect on it (it seems to work when running the command, but the process is still there afterwards), does anyone have any idea about what it is, and how to kill it, or stop it?

The process must be running as a native service defined by hardware / SoC vendor in some `init`'s `.rc` file. So it will keep on restarting if killed. In order to properly stop the service you need to find its name. First get executable path from PID and then find service by searching through all `.rc` files:

```
~# grep -rI $(readlink /proc/$(pgrep -f irq/288-wcd9xxx)/exe) /*/etc/init/ /init.*.rc

```

You can confirm the same service name by looking at `running` status in `getprop | grep init.svc.` command. To stop the service use any of these commands:

```
~# stop <service_name>
~# setprop ctl.stop <service_name>

```

This needs to be repeated on every reboot. Or you may edit the related `.rc` file to remove the service.

If it results in something not working, another possibility is to try controlling its CPU usage by applying some limitation e.g. `cgroups` (if kernel supports).

**EDIT:**

I just noticed that a file name cannot have a slash (`/`). So `irq/288-wcd9xxx` must be a kernel thread for interrupt handling. It's not evident but you can check its parent PID (`ppid` must be `2`) and also no memory allocation (`0K`) indicates that it's not a userspace process. So the problem is with your audio hardware or in-kernel driver (see this answer). In latter case again an updated kernel from OEM would fix the problem.

A workaround can be to control CPU usage of real-time process using `chrt`: `chrt -r -p 1 $(pgrep -f irq/288-wcd9xxx)` or `chrt -f -p 1 $(pgrep -f irq/288-wcd9xxx)` or `renice` or `cgroups` (if kernel supports): `cpu` or `cpuset`.
> 1 votes

---
Tags: battery, battery-life, processes, services
---


# Question
Title: Insufficent rights for npm install in Termux on Android
I'm trying to install a `Node.js` module in a folder, for example, `/data/data/com.termux/files/home/storage/shared/documents/projects/code/js/test-npm`, from Termux on rooted Android 6 running `npm install`. Installation starts, but never succeeds, throwing errors and warnings like `npm ERR! cb() never called!` and `WARN tar EPERM: operation not permitted, futime`.

Which permissions should I grant to `npm` and how?

**Update 1:** tried running `npm install` in `/storage/emulated/0/Documents/projects/code/js/test-npm`, got the same errors. Termux has Storage access permission in Android installed apps manager.

# Answer
**`WARN tar EPERM: operation not permitted, futime`** indicates that `futime` syscall (used to change file last access and modification times) fails with error: `EPERM`. From `utime` manpage :

> **EPERM** ... the caller's effective UID does not match the owner of the file ...

That seems to be the reason of failure. You are using path: `/data/data/com.termux/files/home/storage/shared/` which is actually `/sdcard/`  (symlink to `/storage/emulated/0/`). It's not an actual filesystem but an emulated  view of underlying filesystem (`ext4` or `f2fs`). It has fixed permissions and doesn't support many features of Linux filesystems including symlinks and `ioctls` like `FS_IOC_FIEMAP` .

Due to fixed permissions all directories and files in `/sdcard/` are always owned by user `root` (UID `0`). So while trying to change file's timestamp, `Operation not permitted` is returned. `touch` command however uses `utimensat`  which has different permissions requirements.

So to avoid this problem, you should not use emulated filesystem. Termux `$HOME` directory is on `ext4` or `f2fs`, so it's a good place to save files. Use e.g. `/data/data/com.termux/files/home/npm-test` directory.

From comments:

> But is it possible to somehow create a link inside `$HOME` to another location, which will grant all the rights that Termux has for `$HOME` for all the subfolders of this distant location?

No it's not possible on non-rooted phone. Apps can write only to their private directories in internal storage (which is `/data/data/com.termux` for Termux) and in shared storage (`/sdcard/Android/data/com.termux`). Apps with `Storage` permission granted can read and write to whole `/sdcard/`. There is no other place on device where apps can save files . With SELinux `disabled` or `permissive`, it's possible to write to a sub-directory created (with `adb shell`) in `/data/local/tmp`, but it's not intended use of this directory.

---

**LINKS:**

`utime` manpage
How do I access `$HOME/storage` outside of Termux (with a file explorer)?
What is `/storage/emulated/0/`?
How can I make a symlink inside `/storage/emulated/0`?
How to change the modified date of a file without root?
Where Android apps store data?
> 5 votes

---
Tags: 6.0-marshmallow, permissions, termux
---


# Question
Title: MHL only works for a few minutes on Galaxy S4
I picked up an HML-to-HDMI adapter, and an adapter to get it working on my Galaxy S4. When I first plug it into a TV, everything is great! I can get a picture and sound on my TV in the expected resolutions.

After a few minutes, TV reports "no signal". If I unplug the cable from either the TV end or the phone end, the phone reports the HDMI cable disconnected. Plugging it back in on both ends, the phone reports that the HDMI cable is connected. However, I still don't see anything on the TV.

Rebooting the phone (via holding the power button and choosing restart) does not resolve the issue. If I plug the phone into a power source or USB port, and then switch back to the MHL adapter, it starts to work again.

This problem has occurred with multiple TVs.

I have a couple theories:

* Some sort of power management shuts off the video output after a few minutes. (Note that I can be playing video and the phone screen stays on while TV reports no signal.)
* An error condition with the interface that requires it to reset.

Any thoughts on how to fix this? Am I the only one with this problem? If so, I suppose I could have a funky adapter.

# Answer
I purchased 3 cheap MHL cables, same problem than you. This is the red one. 2 cables disconnect all the time, one works perfectly. The problem is the crappy cable.
> 1 votes

# Answer
I have used the Rocket Fish MHL-to-HDMI without issue in the past on a Note 4. Your MHL adapter should have come with an additional input port in USB Micro formfactor. Try plugging this into a power source as an auxilary power supplement, and see if the issue persists. If you need to output to multiple displays, you may need to daisy chain another adapter onto the current one to supply adequate power to the peripherals.
> 1 votes

---
Tags: samsung-galaxy-s-4, mhl
---


# Question
Title: Moving WhatsApp to new phone without changing number
Not sure if this has been asked before. I would like to move my WhatsApp installation and chats to my new phone and I would like to keep the same number associated with it, but I don't want to move the SIM with the old number into the new phone.

Everything I have read online about moving WhatsApp to new phone seems to apply only to one of two options, taking the old SIM into the new phone, or changing the number on the account to match the SIM in the new phone.

I know this is possible because I have seen French people using WhatsApp with their old French number from years back, but when I call them on their local number, that rings the phone on which the installation sits (not dual SIM)

# Answer
Bro, it's actually easy! You don't need to remove your old sim and fit into your new phone. I have added the steps for you

**First** Backup all the data and chat history to google drive from the chats section in settings in whatsapp.

> Whatsapp\>\>:\>\>Settings\>\>Chats\>\>Chat Backup

**Second** After backing up all the data install whatsapp on the new phone. Then verify your old phone number by getting the otp on your old phone and you will get a option for restoring your data from Google drive.

=\>After restoring the data you will get most of the messages back on your new phone!

Yes, I have written "most of the" not "all of the". It's because not all your data gets backed-up. The data which you have downloaded on the old phone will normally gets backed-up with the chat.

To back up all the data I will recommend first downloading all the things and stuffs which you have received from others and then start backing up in your old phone!

(Or) alternatively there are many applications which can do all these things without any sort of manual uploading and downloading. You can search for them on the web and playstore (or appstore)!
> 0 votes

---
Tags: whatsapp-messenger, data-transfer
---


# Question
Title: Bootloop after installing GApps in Lineage OS
I installed Lineage OS 16.0 on my Moto x4 using TWRP. I reboot and installed GApps. While installing there were no errors. But then after restart the Phone it stays in start sequence and after ca. 10 min it goes back to TWRP. When I only install Lineage OS it works fine, but without GApps. So I tried a few variations of combine these versions:

TWRP: twrp-3.3.1-0-payton, twrp-3.3.0-1-payton

Lineage OS: lineage-16.0-20200219-nightly-payton-signed, lineage-16.0-20200223-nightly-payton-signed

GApps: open\_gapps-arm64-9.0-pico-2020019, open\_gapps-arm64-9.0-pico-2020028, open\_gapps-arm64-9.0-pico-20191017

Can you please help me? Did someone know what I am missing or doing wrong?

Edit:

I found that I start in Slot A and installed Lineage there, but after reboot I am in Slot B but installing GApps works without shown error beside that main problem. When I go back to slot A and install GApps there it breaks with error code 64.

# Answer
Whenever I used LineageOS 16 I had to use the "other" recommended GApps package by LineageOS.
The so called "**MindTheGapps**" package.

See here: https://wiki.lineageos.org/gapps.html

MindTheGapps link: http://downloads.codefi.re/jdcteam/javelinanddart/gapps
Mirror: http://downloads.codefi.re/jdcteam/javelinanddart/gapps

I realize they list OpenGApps there as well but for me, only MindTheGapps worked fine.
Ps.: LOS 17 never had this issue on the other hand. The phone I was using is a OnePlus 7 Pro.
> 0 votes

---
Tags: twrp, lineageos, gapps
---


# Question
Title: SMS starts with "ACTA" sent without my consent
On 26-Feb-2020 at 4.24 PM IST, an unknown SMS has been sent from my Redmi 7A Android phone without my consent to a completely unknown number. It starts with "ACTA" and then contains some encoded data. It's all either encrypted or garbage. I have no clue what this is and I can not infer anything from this.

>

All apps before installation are scanned by a built-in security check. I have run a security scan on my phone and nothing suspicious was found except needing to update MIUI. No app was installed on that day and I do not download any unknown apk's from unknown sites. All apps have always been installed from Google Play Store.

The number does not exist in my contact list and has never ever been dialed from or any call received on this phone. TrueCaller site reports that number as a spam number from India.

Could someone explain this?

# Answer
> 4 votes
According to quick research, **the "ACTA" SMS is used by ICICI Bank for a verification/activation message on their mobile apps (e.g. iMobile)**.

From Mi Community - Unable to activate icici i-mobile app on my POCOFONE F1,

> Post #10
>
> Solved after the solution given by the online imobile team. During the activation process, **you get some random text message (ACTA \*** which need to be sent for verification) , you copy the entire text and send the same to 9215676766 instead of +91222208888 (icici server number which is usually busy)**. This sms need to be sent within 90 seconds and jump back to imobile app and proceed with the activation by setting 4 digit pin and grid value verification. \[...\]
>
> <sup>(Emphasis added)</sup>

Also, thanks to the OP's confirmation on the comment thread,

> I then called ICICI Bank customer care and the representative has confirmed that this number (*ed. +9184220...*) belongs to their iMobile servers and the message is some kind of legit verification message required by the app to function properly. Earlier I must have clicked 'Allow this app to send SMS' so the whole process happened automatically.

---
Tags: sms, spam
---


# Question
Title: How to permanently disable mobile data on a rooted Android device?
Hi guys I was hoping for some guidance on disabling my mobile data on my rooted Android. I've tried locating a file do delete with ES explorer, but I'm honestly unsure if there is such a separate file to disable the data and keep my call function on. Any help at all would be much appreciated. Thanks.

# Answer
I would use your phone's test page to disable it... It's like disabling an adapter on a computer are its devices software it will still look like it's on but you can change your way you speak to your tower from like 5 seconds 10 seconds 30 seconds and disabled or immediate. I use phone dialer to pull up the test page `*#*#4636#*#*`
> 1 votes

---
Tags: root-access, internet
---


# Question
Title: How can I launch AVD Manager without opening or creating a project in Android Studio?
Sometimes I just want to open the AVD Manager GUI that is reachable from Android Studio's Tools menu, but without having to start Android Studio and creating or opening a project.

How can I do this?

# Answer
While it doesn't seem possible to get around having to start Android Studio, it is possible to start the AVD Manager without creating or opening a project.

On the launch screen that opens when no project is open in Android Studio, the AVD Manager is available under the Configure menu.
> 2 votes

---
Tags: avd-manager, android-studio
---


# Question
Title: Creating a backup with adb results in 41 byte file
I have an old droid RAZR Maxx (4.1.2) that I decided I want to root, but I want to make a backup first just in case. I've followed instructions from this site:

How To Create a Full Android Phone or Tablet Backup Without Rooting or Unlocking Your Device

My command was this:

```
adb backup -apk -shared -all -f c:\backup.ab

```

The resulting `backup.ab file` on the C: drive was only 41 bytes and, when opened in a hex editor, appears to only be the header of the backup file. I'm wondering what I'm doing wrong here, I've googled but can't find anything that helps. Any suggestions?

Edit: This is not a duplicate of the suggested a topic linked by beeshyams. That topic explains why the user couldn't back up one *single* app's files, I'm trying to back up everything. I don't care if I don't get SMS included in that backup because it's an old phone, I'm not using it to text, but there are other apps and settings that *should* back up without issue.

# Answer
Found solution here, worked for me:

https://docs.j7k6.org/android-adb-backup-41-bytes-549-bytes-bug-fix/

> Appearantly the adb backup command stopped working for older Android devices in recent versions of the Android Debug Bridge. When invoking a backup with adb, the backup process is started but stops immediately, leaving a local backup.ab file with a filesize of only 49 bytes (549 bytes when the backup is encrypted with a password). This bug is well known, but hasn’t been fixed at least until recently (version 1.0.39). To fix this behaviour, download the last working version of the adb executable (1.0.31) and invoke the backup with this. The executables for all platforms can be downloaded at Mozilla.

https://archive.mozilla.org/pub/labs/android-tools/

```
adb-1.0.31-linux.zip    479K    09-Sep-2015 18:44
adb-1.0.31-linux64.zip  455K    09-Sep-2015 18:44
adb-1.0.31-mac.zip  433K    09-Sep-2015 18:44
adb-1.0.31-windows.zip  474K    09-Sep-2015 18:44

```

Download, unzip, run unzipped adb:

(linux, mac)

```
./adb devices
./adb backup -apk -shared -all -f backup-file.adb

```

(win)

```
adb devices
adb backup -apk -shared -all -f backup-file.adb

```

Enjoy! ;)
> 9 votes

# Answer
You should not try to backup the "entire" phone with adb, because it's plenty of bugs. My recommendation is to backup apps one by one and avoid the '-shared' flag because backup of shared storage is broken. Just copy and paste to a memory card of use ftp server to upload to your computer those things from internal sdcard.

Again: backup one app at a time and check for .ab file size so it's not "empty". It will be empty when the unencrypted backup has 41, 47 or 49 byte size. If encrypted will be 549 byte size for empty.

Latest adb is 1.0.41

Note also that some apps don't allow adb backup, and other even if allow it don't "store" anything on there because of app policy. Examples are apps which use cloud services like Google, etc.
> 1 votes

---
Tags: adb, backup, motorola-droid-razr
---


# Question
Title: How does one restore data to phone from Google drive?
I backup my data from my Android phone to Google Drive. I then performed a full factory reset. I was given the option to exchange data with another phone, but not restore from Google Drive.

When I go to Google Drive from the app, I'm able to see the backup. I can view the files, but the only option I'm given is to delete them.

Is there something I'm missing? Why can't you restore incrementally from Google Drive? And how do I get my data back without having to do another factory restore? Finally, why wasn't I given that option when I perform the factory restore?

# Answer
> 0 votes
Here's a real-life case on someone who'd gotten Google Backup to restore indirectly without root: screenshot

As I recall, a manual trigger for the G Backup restore function was planned for the Pixel series, but this was over a year ago that I'd read about that so I'm not sure what became of that; at that time, an ADB command existed to trigger such behavior, but I'm unsure what the prerequisites and/or limitations are.

My post here also briefly touches on G Backup and other methods I'd explored to solve my own issue with restoring a backup file's data. Note that there is versioning requirement for the standard restoration method(s) to work, i.e., you can only restore onto a device running the same or higher of Android (if even then).

Finally, here is a guide I wrote (and fixes) for an Android game, but the same functionality can be applied to more general usages as well.

---
Tags: restore, google-drive, google-backup
---


# Question
Title: Is it possible to use an app to disable the power button from switching the phone off?
Is it possible to have an android application such that if the user starts it the phone will not switch off by pressing the side button? It means the only means to switch off it will be remove the battery, and taking all sort of permission from user is not an issue here.

# Answer
> 2 votes
No, it's not possible. The functionality to turn off the device if the power button is held down is at a very low level of the system, so that even if Android gets into some broken state, the user can still switch the device off to prevent it overheating. This is especially important on devices without a removable battery!

Only replacing the kernel with a custom-built one can disable the power button completely. This may or may not be possible depending on what device you're targeting and whether all the drivers and kernel source for that device are available.

# Answer
> 0 votes
It is possible to disable or even change what hardware keys do even without an app.

In my case I just commented out (added a # at beginning of) the lines starting with POWER in the `/system/usr/keylayout/Generic.kl` file

(with root and rw access to /system . To access /system as rw just use this command: `mount -o remount,rw /system`)

and rebooted the device. After this my physical power button doesn't work anymore. I tested this more by making my physical home button type the letter a in the same way.

(You can get an idea what changes can be made by reading that file. MEDIA\_PLAY , CAMERA , CALL , CONTACTS , BRIGTHESS and more are all there. I suppose that in the same way it is possible to change what virtual keys (like virtual keyboard keys) do).

---
Tags: buttons, power-on
---


title: How do I empty trash bin on phone?

text:
# Question
Title: How do I empty trash bin on phone?
Please help. When photos and videos ef is are deleted, where do they go? I'd like to delete everything in my " trash", as my storage is always full. Thank you.

# Answer
Android does not have the concept of trash bin or recycle (unlike windows).

When you delete a file, it is not actually deleted but the space it occupied is marked as free and therefore can be used to store data (that's why file recovery is possible using apps).

So, your storage being always full is not because of files in trash. It can be for a bunch of other reasons like remnants of uninstalled apps, system logs, duplicates etc. I would suggest you use this app SD Maid to clean your phone. Pro version allows you to schedule cleaning.

I have no affiliation with the app and recommend it strongly
> 1 votes

---
Tags: storage, ram, delete
---


# Question
Title: How to flash Official ROM on SAMSUNG GALAXY S6 EDGE
I was offered a Samsung Galaxy S6 Edge a few months ago and I discovered over time that applications installed themselves on my phone and performed operations in the background and my ins such as activate the microphone , play music or send sms. I tried several factory values reset but nothing changes, each time I have the internet connection activated they reinstall completely. This has the effect of heating my phone and reducing the life of the battery.

So I decided to flash my phone with an Official ROM that I did on SamMobile But when I launched the flash with Odin and my phone in download mode the operation failed!

I haven't been able to solve this problem for months already that's why I come here to ask for your help.

when the flash fails, my phone displays the error "SECURE CHECK FAIL: (BOOTLOADER)

I would like to make some clarifications: \- my phone is an SM-G925F (This is what is written behind it is also what is displayed in the settings) \- In download mode I rather see Product: name SM-G925L \- in the developer option, I don't find the "Unlock OEM" button \- When I click on "Software update" in my phone, nothing happens \- I don't know if it's important to specify it but I live in Cameroon

I need help please!

# Answer
> 0 votes
I flashed an SM-G925L and it worked except that the SM-G925L that I found on SamMobile was all designed for South Korea and for LG U+ So every time I turn on my samsung a beautiful LG logo is displayed but everything works correctly and I got rid of malware!

# Answer
> 0 votes
It looks like you Galaxy S6 Edge may have been rooted as I see current binary and system status are indicated as custom and that would explain not being able to OTA update. I also know that some unlocked refurbished phone replace motherboards as long as the hardware fits. Its my understanding that what is displayed in the download mode, i,n this case "G925L", will be the correct variant when choosing the proper firmware.
I've rooted every Samsung I have ever owned and have never had the issues you described prior to factory reset. It is my humble option that your phone may have been compromise and suggest your change all your password accounts. It would be easier is you did this after a successful boot rather than before as you'll face Google FRP lock. Good luck

---
Tags: samsung, rom
---


# Question
Title: Can online games from websites be played in Android?
My nephew and I were playing an old Atari videogame from a website on the PC. He has an Android phone and asked me if he could play it on that. I went to the site on Google Chrome and the game loaded fullscreen correctly, but we don't have any idea how the keyboard keys from the PC can be triggered from the phone's screen, if this is possible.

Is this possible? Can online games from websites be played on Android?

# Answer
> 2 votes
Can online games from websites be played in Android? Simply answered, yes. Online browser based games are designed to be OS agnostic and work on any hardware using standard software. That said, because of Android and device limitations, it is with some caveats as you are discovering with things like controls, and in some cases web browser plug-ins, or things like Flash, may not work because of the browser(s) available for Android.

That said, in your specific instance where keyboard controls are required, it might not be possible to play the game without some kind of external device like a keyboard or mouse, which most Android devices support via Bluetooth and some via USB-OTG.

---
Tags: chrome-for-android, browser
---


# Question
Title: How can I access the data for the Android calendar app on my phone?
I have been using the Calendar app on my android phone, and I want to access the data for this app so that I can export it. I cannot find a "com.android.calendar" folder, nor can I find any file or directory with "calendar" anywhere in the name. Where would I find it?

Here's why I want the data: Although the android calendar app "syncs" with my Google calendar account (as in, events on my google calendar appear on my phone), any events that I added through the app on the mobile device do not get uploaded to my Google calendar. After a while, I realized that I should use the "Google Calendar" app instead of the default "Calendar" app that came with the phone. But I would like to export the events from the android calendar to my Google calendar. Is there an easy way to export the data from the Android calendar app to the Google calendar? It appears that at least one other person has had this problem.

I have a Samsung Galaxy S4 mini with android version 4.4.2.

# Answer
Most likely, you don't have root access. If you've that, look into `/data/data`.

The folder you're looking for is at `/data/data/com.android.calendar/` but the stuff you need is under `/data/data/com.android.providers.calendar`.

Hope it helps!
> 1 votes

# Answer
For rootless extraction, you'll need to rely on ADB Backup or other natively supported option (Google Backup, Samsung Smart Switch, etc.). On my Samsung Note 8, assuming the Calendar app has the same `manifest.xml` flags, AllowBackup flag is present, which means you can use ADB to perform the application backup and restore. (Note: there are many guides here on ASU regarding ADB's usage, you can also check XDA for further guidance).
> 0 votes

---
Tags: 4.4-kitkat, calendar, samsung-galaxy-s-4-mini, app-data
---


# Question
Title: USB connection unreliable while tethering
Device: Galaxy Nexus
Android: CyangenMod 11.0 (Android 4.4.4)

The IT department of my company doesn't support access of Mac devices to its network, but it does for Android devices. So I would like to connect my macbook (Mac OS X 10.9.4) to the internet by tethering my phone's Wi-Fi connection. Bluetooth tethering is reliable, but rather slow (max 200KB/s download speed, in reality it is rather something like 80KB/s).

So, I tried to use the USB tethering with the help of HoRNDIS (release 5), which is magnitudes faster (22MB/s) than Bluetooth tethering. However after a while (some minutes), the connection is lost. To restore it, I have to unplug the USB cable, plug it in again and retick the checkbox 'USB tethering' on the 'Tethering & portable hotspot' page in the 'Wireless & Network' settings.

In order to solve this problem, I tried the following:

* Enable 'Android debug mode' & 'ADB over Network'
* Screen always on

Unfortunately, these attempts didn't work.

Does anyone have a similar problem or workaround?

# Answer
> 1 votes
I faced similar lost internet connection issues with galaxy y tethering. Had to unplug and plug in the cable; again select tethering. However, i noticed that orientation of the cable just outside the socket mattered. There is room for movement even after usb is plugged in the phone. In this instance, when i so arranged that the usb cable is as lateral as possible to the phone midline(had to use anatomy); there was no lost connection.

# Answer
> 0 votes
Make sure that you disconnect the other network connections / Ethernet while USB thether... I just went through 5 days of page hangs, and then I switched my ADSL box (it was disconnected anyway) and it put the tether on a new network name called network 5 and all the pages come through now.

---
Tags: cyanogenmod, usb, tethering, macos, bluetooth-tethering
---


# Question
Title: What is needed to run ELF binaries compiled from android APKs? (understanding android internals)
I'm trying to understand how Android works internally. Before ART, it used Dalvik to run java code. I guess it created a Dalkiv process in 'Linux' kernel which was simply a VM that ran the dex bytecode.

For ART, the dex bytecode is compiled into instructions in the processor's architecture (happens during the installation process). This compiled dex bytecode is stored into an ELF binary. So it's somethig that 'Linux' kernel can understand.

So suppose I wanted to run this ELF binary on Linux. Besides `ashmem` and `binder` kernel modules, what more would I need? Which libraries do this ELF binary require? Is this ELF binary simply launched as a linux process?

I tried reading anbox.io source code, but I couldn't understand how it launched an ELF binary from an APK. Maybe understanding what it's required to run it will make me understand anbox.io's source code better.

I also found https://android.googlesource.com/platform/art/+/refs/heads/master/runtime/ but I don't know where to begin. What is /runtime? Is it a program, a library? Is Android Runtime something that is linked together with the ELF binary generated from dex bytecode?

# Answer
> 6 votes
> What is needed to run ELF binaries compiled from Android APKs?

A simple hello world app which does nothing except printing **Hello World!** (no animations, no sounds, no menus), running on Android 9 device:

* Opens `30+` files, anonymous inodes and UNIX sockets explicitly.
* Shares `500+` memory-mapped files from `/data`, `/system`, `/vendor` and `/dev`.
* Communicates, at least, to Surface Flinger (through Window Manager in `system_server`) to display something on screen. There can possibly be more IPCs (Binders or others).
* Needs Activity Manager, Package Manager and possibly other services running in `system_server` which manage app's classes related to activity creation and permissions.
* Needs `zygote` process running to fork VMs for `system_server` and the app itself.

So all of these requirements must be fulfilled to run ELF binary (shared object: `/data/app/com.ravipatel.helloworld.test-*/oat/arm64/base.odex`) compiled from APK.

As a comparison, a hello world Java program compiled with GCJ dynamically links to less than 5 libraries. While a similar C program (statically linked) has no runtime dependencies except the required architecture.

> I guess it created a Dalkiv process in 'Linux' kernel which was simply a VM that ran the `dex` bytecode.

No. Dalvik wasn't a Kernel-based Virtual Machine (KVM; if that's what you mean). Both Dalvik and ART are Process VMs which run in userspace.

> For ART, the dex bytecode is compiled into instructions in the processor's architecture (happens during the installation process).

It's profile-guided, rarely happens during the installation process.

> What is `/runtime`? Is it a program, a library?

Runtime is an environment in which programs written in a specific language run. ART is a runtime for Java. It mainly consists of native executable binaries / shared libraries (including a VM / interpreter / JIT compiler and OAT compiler) and standard Java class libraries (mostly in the from of `.jar` files) saved in `/system`.

Other well-known example is Java Runtime Environment (JRE) by Oracle/Sun which is found on mostly PCs.

> Is Android Runtime something that is linked together with the ELF binary generated from `dex` bytecode?

Correct.

> Is this ELF binary simply launched as a Linux process?

No. The ELF binary compiled from `.dex` file in APK is not an executable but a shared object. So it needs to be loaded in memory along with other dependencies by some other process, which is ART (VM).

> So suppose I wanted to run this ELF binary on Linux. Besides `ashmem` and `binder` kernel modules, what more would I need? Which libraries do this ELF binary require?

First of all you cannot run the ELF binary on a non-Android Linux system because the binary is not a statically linked executable. But even if it is, there are even bigger constraints, particularly Android's hardware abstraction. `binders` and `ashmem` are IPC mechanisms. They make sense only if the processes to whom the app wants to communicate also exist, which is not the case. With Linux based Java SDKs it's relatively easy to achieve.

---

**RELATED:**

---
Tags: linux, kernel
---


# Question
Title: Is there any virtualization software that will run under Android on an x86 device?
I have an Android device (Dell Venue 8) which runs on an Intel x86 CPU, and I was wondering if there was any application like VirtualBox or VMware that could run a 32-Bit Linux distro, Windows XP 32-Bit, etc, via Virtualization. I'm aware of various emulation software like Qemu and Bochs, but I wanted something that could directly virtualize instead of emulating, since both the host device and the Guest OS are of the same architecture.

# Answer
> 2 votes
I found myself stumbling in the general vicinity of these forums with some similar questions and decided to share some info on the off chance any other wandering curious computer enthusiast happens to walk on by.

**Method #1: EMULATION**

A kid managed to get XP running on Android using the tools you mentioned at the beginning. You can see in his comments how there was a significant performance loss. One of the key issues here is an inability to translate drivers. There will also be a lot of bottlenecking that occurs when you sneak in some unsupported stuff.

**Method #2: ROOTING AND FLASHING**

It required gaining root, unlocking the bootloader, and flashing a custom recovery, among other many other things. I managed to get multiboot from ARM-supported OS's Ubuntu Touch, Cyanogen, and stock. I could probably throw Windows 10 on it if I wanted to.

**Method #3: KERNEL VIRTUALIZATION**

https://www.linux-kvm.org/page/Main\_Page

Assuming your hardware supports virtualization, KVM is an option for back-end stuff if you don't need a GUI.

**Method #4: BAREMETAL HYPERVISOR**

There is a white paper on it, but I can't post the link because of my new account, so here is a copy of the conclusion:

> Virtualizing a modern mobile platform involves dealing with devices such as camera, compass, gps, etc, for which PV frontend and backend drivers do not exist today. If only one VM needs access to one of these devices at a time, you can simply assign the device to the VM, remapping the corresponding MMIO regions and interrupts. If multiple VMs need access to the device simultaneously, you have to write a new pair of PV frontend and backend drivers. Fortunately many open source implementations of PV frontends and backends for different class of devices already exist in Linux and other operating systems. Something similar is likely to already exist. The difficulty of writing a new pair of PV frontends and backends increases with the complexity of the device you are trying to share. If the device is simple, such as the compass, writing the new pair of drivers is going to very easy. If the device is complex, such as a 3d graphic accelerator, writing the new pair of frontends and backends is going to be difficult.

Here is another paper on the KVM/ARM dynamic:

https://web.archive.org/web/20210118182924/https://systems.cs.columbia.edu/archive/pub/2014/03/kvm-arm-the-design-and-implementation-of-the-linux-arm-hypervisor/

Seems as though for now we are stuck with what the software developers are willing to write for us, or with what we are willing to write for ourselves. These systems were meant to be largely proprietary, some frustration is to be expected I suppose.

# Answer
> 1 votes
You could try LinuxonAndroid.

# Answer
> 0 votes
Rooting the phone gives the opportunity to boot several Linux distros. In theory, you should be able to do it with **Linux Deploy** or similar tools.

However, even without rooting, you will be able to execute Linux binaries & even simulate a Linux distribution. There is a tool called **Termux** on Google Play Store. But I don't know whether it is available for x86 devices yet. (There are alternatives that too won't require rooting: GNURoot Debian & a bunch of GNURoot Apps by Corbin Champion, Debian No-root, etc.) These are available for ARM Devices and I think they are available for x86 also.

However, if not available, you can do it with a decent time for hacking & a good terminal emulator app. See Proot-me on GitHub - A user-space implementation of chroot that can create fake rootfs where you can install native binaries, using busybox which provides **dpkg & rpm**.

Terminal emulators are known to work with simple, small binaries like busybox. However, PRoot is how the above-said non-root apps implement Linux package management. Therefore, even if these apps are not available for your platform, it is not very hard for a geek within you to set up a native Linux environment with package management on any platform.

*Note: to execute binaries from a terminal shell, it will be necessary to append the `$path` variable.*

# Answer
> 0 votes
Apart from all the options mentioned, one can also try using the **UserLand** app.

The app is available on Google Play Store for easy download. It has an easy setup for Ubuntu. Users do not need to have root access to be able to use this app, so that's an advantage here.

For further info, one can go to their product page: https://userland.tech/

# Answer
> -2 votes
Virtualization is now possible on Android, thanks to several upgrades and patches to the SDK. Currently, there is an app that offers virtualization on Android by running multiple "same apps" on a single phone named Parallel. It works without manipulating the system files and without root access.

---
Tags: virtualization
---


# Question
Title: What is 02 in the magisk patched vbmeta.img?
According to the Additional Info given for rooting the Android device that doesn't have ramdisk but can be rooted via recovery: we need an `empty vbmeta.img` and I am trying to check what it actually contains. I understand the hex that removed the verification flags from the `original vbmeta.img` and the hex for `avbtool 1.1.0` but there is a hex `00 02` at `00000070` which I didn't get why it is there.

Does anybody can explain this?

# Answer
According to this piece of source code by Intel, there is an `uint32_t` starting at position`0x78` (120) and ending at `0x7b` (124). This location is marked as "flags from the AvbVBMetaImageFlags enumeration", which "must be set to zero if the vbmeta image is not a top-level image".

On to the enumeration itself. `AvbVBMetaImageFlags` is defined in the same file and the flag set by Magisk is `0x00000002` (2). From the source, we see that the corresponding value, therein expressed as `1 << 1`, is called `AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED`, which is quite self-explanatory.

In short, Magisk is modifying that value knowingly, in order to disable a verification that would likely prevent your device from booting a modified image.
> 6 votes

---
Tags: rooting, root-access, selinux, magisk, systemless-root
---


# Question
Title: Multiple Google Accounts contacts Syncing
I have 2 google accounts lets say 'me@gmail.com' and 'work@gmail.com'

Personal email has 500 contact of my friends and family. Work email has 1100 business contacts.

I share the work emails contact list across 5/6 different people/PC's/mobiles etc. and keep the personal one for my phone only.

Can anybody find a way that my android phone can display/sync me@ contacts whilst JUST displaying work@ contacts?

Whenever I add accounts/sync etc. both lists merge and everybody using the work email suddenly has access to my personal contacts?

Tried quite a few fixes but Android always syncs everything.

# Answer
> 1 votes
I'm not fully understanding the request. You want your phone to display/sync @me contacts, but *only* display the work@ contacts without syncing them? That's not a distinction that exists. The only way to display them is to sync them to your phone. That's the method by which they reach your phone.

Are you asking for it to not sync *changes* back from the phone to the work@ account? The only way to ensure that is, simply, not to make any changes to the work@ account contacts. Don't add anything to them, and don't edit them. The only things that sync back up to the cloud are things you change.

Syncing two different accounts (me@ and work@) will **not** merge the contacts. It will merge your view **of** those contacts, so that locally on your phone you see only one list of contacts aggregated from both sources, but if you go onto your computer, or work@ Gmail web interface, it will not contain all the contacts you synced to your phone from your me@ account. They're kept entirely walled off from each other. I have easily five or six Google accounts at any one time on my device, some Gmail, some Google Apps, and NONE of the contacts cross-pollinate. In fact I wish there was a way to make them do so, as it would be useful for me to have all of my contacts in a couple of those accounts for various purposes. But the moment I log into the web interface for one of my less common ones, I have zero access to any of the contacts in my primary one, and vice versa. So there should be zero problem here, just possibly the perception of one.

The only way to get the contacts from one into the other would be to manually export them from one account and import them into another. Or, presumably, use some sort of third-party app that might produce the same result.

Assuming my answers above don't clear up the issue, and there's still a problem, can you clarify a couple things for me?

1. What specific phone do you have?
2. Are you using the built-in Android function for adding these Google accounts, and not some third-party app to manage them?
3. Do you have any sort of unusual backup apps you use on the phone for contacts?

# Answer
> 0 votes
I'm researching a similar issue. The root of our problems is how tightly google accounts are integrated across the apps on Android phones. I just learned Android has the concept of "users". Like a computer or server, you can log out of your personal user and log in to the work user. I believe this functionality was added in Android version 8 or 9.

Previously, I used `Settings -> Google -> Add Account` and I didn't want the mess of all my google accounts on my phone. Like your problem with contacts, it also means notifications and prompting from maps and gmail for my work account. And my multiple other gmail accounts I haven't given up on.

Now, I "added a new user" to my phone. Once added, when switching to this user the first time, they go through the full process of setting up the phone. You can switch users by swiping down with 2 fingers. Next to the settings gear icon is a user head. Tap that to switch users. To add a user the menu is `Settings -> System -> Advanced -> Multiple Users`

I did all this so I could add work's Google Prompt popup to my phone. I do not know yet if I'm using the phone as my personal account if the work's google account will "Is this you" popup or not. Plus there are rare times I simply need to see work's email. Additional users lets me have work on my phone but my normal user experience isn't littered with work-account related stuff all the time.

---

Complete side note: If you only need 2FA on a phone for a not-my-own-google-account, "just use the Authenticaor app". To do this, download `Google Authenticator`, try to add your new account, then on your pre-existing computer, go to the 2-Step Verification page and click on Authenticator App to get a QR code to scan. Then you don't need work's Google Account on your phone at all.

---
Tags: sync, google-account, google-contacts
---


# Question
Title: Samsung Galaxy J5 J500F Bricked - How to unbrick?
I have a rooted Samsung Galaxy J500F. Trying to get more storage, I moved all of the system files to the sd card and now the phone won't turn on. The PC will not recognize the phone (no ding, no device manager detect).

Not able to get into recovery mode. Im not able to charge the battery either.

How to recover a phone in this condition? I used two JIG's (one I bought and one I made) it didn't work.

I have downloaded the firmware but I can't flash the phone (or can I?).

# Answer
If you moved the `/system` file elsewhere, then your device is *bricked* (moving `/system` files to create space doesn't help as that space is not available to user for data)

Having done this without realising the implications, it is unlikely you would be able to flash stock ROM on your own. It's best you take it to service centre where it may be resurrected using ODIN /JTAG tool
> 1 votes

# Answer
You would still be able to boot it into download (ODIN) mode, Just press and hold `Vol` \+ `Power key` buttons until you see the download mode. After that connect it to your PC and run Odin and flash your stock-rom.
> 1 votes

# Answer
I'm sorry, but you can't repair your Device. The Folder "/system" gives the ability for your Smartphone. Without it, you can't use it. Just like the System32 on Windows, removing it causes BSOD (Blue screen of Death).

I recommend you to take into a really smart repair shop and the motherboard needs to be probably replaced. If you don't want that, then try to flash the stock rom (yes, it deletes Root too but try SP Flash Tool and ODIN).
> 0 votes

---
Tags: unbricking, samsung-galaxy-j5
---


# Question
Title: How to delete unsent message from google hangouts?
I accidentaly sent a confidental message to an incorrect contact. Fortunately, I could react in time, and I turned off my phone before it could be sent.

I opened my google hangout from the web, and I see that the message was not sent. (It was a big picture, whose upload was broken by the poweroff.)

However, now if I turn my phone on, the message will be sent.

I believe, my only way to delete the message, if

* I ban the phone from my home wifi,
* I remove the SIM card from it,
* I turn on the phone,
* I uninstall google hangouts,
* Re-enable my home wifi,
* Reinstall google hangouts.

However, doing these is problematic.

Does a quicker way exist for that?

# Answer
> 1 votes
If a message was not sent yet, long tapping on the message reveals a menu. This menu has an option "do not send" (or similar). Clicking it, the message will be removed.

After the message was sent, there is no way to rollback - the remote side will be able to see it.

Text messages are sent practically on the spot, thus this option has only a little relevance. However, images send on google hangouts might have an enough long upload time to break their upload.

In the case of such accident, I think it is still the best to turn the phone off on the spot, then block its all possible network access (sim + wifi), and then solve the problem offline.

---
Tags: google-hangouts
---


# Question
Title: How to make an Android smartphone actually go to sleep?
When I turn the screen off on an Android smartphone, I want battery life to be conserved. Thus, I don't want any third-party apps running in the background, and I don't want the device periodically turning on WiFi (or connecting via 2G/3G/4G/5G).

I set up a test Android Samsung smartphone running Android Nougat, and installed just 25 popular apps. I set all 25 apps to "Always Sleeping" in Settings. I then let the device sit for 8 hours with the screen turned off. During those 8 hours, the Android device connected to a WiFi router 59 times and transmitted/received data each time.

I don't want to turn on Airplane Mode, because I still want the device to be able to receive and log incoming phone calls.

Is there a way to accomplish this with Android (on a non-rooted device)?

# Answer
As discussed in comments

* You want to make sure that the device enters doze mode *quickly* and disconnect wifi / mobile data when the screen is off. Aeroplane mode is not an option because you need to be able to make /receive calls.
* You can achieve that by Naptime app:

> * Naptime lowers your device's power consumption while the display is off by empowering Android's built-in doze power saving functionality.
> * Faster idle means less power being consumed uneccessarily. By default doze can take a while to kick in so Naptime just speeds-up that process automagically for you.
> * It can also automatically disable W-iFi, mobile data, location & bluetooth as soon as doze kicks in.

In addition, Naptime can also help in enabling doze while in motion (phone in your pocket and you are walking).

It requires root but for unrooted devices it works with elevated privileges through `adb` commands given in app instructions.

This is a one time process and *need not* be applied on reboot (AFAIR).

You can identify such apps and decide on suitable alternatives.

* As a second line of defense, in case you aren't happy with Naptime, try, Greenify is another useful app that can come in handy to tame troublesome apps. This works with unrooted devices with `adb` privileged permissions. Alternatively, you have an open source app Brevent that works as well but `adb` privileged permissions are required after a reboot. IMHO, with improved Android battery management in recent versions, you may not need this line of defense at all.
* Also see this for more Disable autostart on boot and restrict background execution
> 1 votes

# Answer
I do it by disconnecting from data, WiFi & Bluetooth, then turning on airplane mode & power off.

Can also go to the dialer pad and dial `*#*#4636#*#*` (star-pound-star-pound-4636-pound-star-pound-star), tap phone information and scroll down to enable radios, and move the selector to the off position.
> -1 votes

---
Tags: wi-fi, battery, battery-life, standby, sleep
---


# Question
Title: Bluetooth next track without next button
I have only three buttons on my **Bluetooth** helmet: `VOL+` `VOL-` `ON` (which is on/pairing button and it might drop the call as well)

Would be nice if the Bluetooth controls were configurable in such a way I could skip to next track with the `ON` button or with a combination of volume buttons (E.G. double press `VOL+`) my players support **Bluetooth** controls, but I presume they work with the standard `NEXT` button.

Is there a way to achieve this with **Android 6**?

EDIT: In my case it will never work as the device is not sending ANY event to the phone, but the question might be useful for others in similar scenario.

# Answer
Maybe I'm a bit late to the party. I have a bluetooth headset with only three buttons too. BUT, if I long press the volume up button, it generates a `next track` event, and the volume down button generates a `previous track` event.

Sadly I could not figure out how to remap these events (I would like to take a photo instead of next track event).
> 0 votes

---
Tags: 6.0-marshmallow, huawei, music-player
---


# Question
Title: What are meanings of 3 dimensions of smart phone?
What are the three dimensions of a smartphone referring to?

Forexample As shown highlighted in attached snapshot , size is also highlighted and dimensions are also highlighted

# Answer
> 1 votes
The three dimensions are height, width, and thickness (depth) respectively. Size is the size of the display (screen) measured diagonally.

---
Tags: screen, hardware
---


# Question
Title: How to revoke root permission to an app in adb?
I think I have got a scam app in my device. I granted it root access and then whenever I open an app it,the scame app closes the app. Please help me I am stuck in here. Aah my head is aching.

# Answer
Well, does the ADB shell have root access? If so, all you need to do is access the ADB shell via a computer (I assume, that you know how to do that already, since you asked that you'd like to solve it specifically through ADB) and type in the following command: `pm revoke *scamming apps package name here* android.permission.ACCESS_SUPERUSER` This will revoke the root permission of the app. You might wanna revoke more of it's permission if you want to easily uninstall it, though.
> 0 votes

# Answer
Open Settings. Then Apps. hit the top 3 dots on top screen to show system apps. then scroll all the way to the bottom of the apps list ,you may or may not see a app you do not know or a weird app with no name, if so delete this app right away it is a virus. Usually you have to do this is the app in question is not coming up in the normal app list.
> -1 votes

---
Tags: applications, adb, root-access
---


# Question
Title: Turn off Snapchat camera sound in Android
Whenever I take a picture with the front camera on Snapchat on my Xiaomi Mi Max 2, it makes a loud fake camera shutter sound.

I have tried putting the phone on mute/do not disturb and having the ringer volume, alarm volume, and media volume off, and it still makes the sound. I have gone into the camera app settings and turned off the camera sounds, which works for my default camera app (I can take pictures on it with no sound) but it still makes the sound on Snapchat.

Does anyone know how to disable this sound? I'd be surprised if Snapchat made its own camera shutter sound which isn't mutable, surely it just uses the device's settings and sounds, right?

# Answer
If you have Snapchat alpha enabled, turning on flash or night mode will disable the shutter sound.

To enable Snapchat alpha right now in the new update, you have to open the Snapchat map and search Bermuda. You'll find a ghost that can enable alpha mode.
> 0 votes

# Answer
Easy solution - just press the moon icon on the top right corner of the screen on Snapchat to turn on Snapchat night mode and leave it on.
> 0 votes

# Answer
After a lot of struggle, I found a solution. It might not be a permanent one but for now it works. Just download an older version where the sound is not in the app yet.
> 0 votes

# Answer
First of all, Snapchat will access your mobile camera application because it has the permission given by the developers, one thing you can stop this by the following statements.

Go to Setting - Apps - Snapchat - then click on the launch button - then go to running apps - then just choose Snapchat and select stop. By this, you can stop the service of this app.
> -1 votes

# Answer
Go to your Camera app → open Settings, and turn off Camera sound. Because Snapchat uses the Xiaomi's Camera, it inherits this setting.
> -1 votes

# Answer
Snapchat doesn't directly use Xiaomi camera. It takes a screenshot of what happens on the screen through the camera. It doesn't actually take a 'photo'. I read it in an article. Try comparing Snapchat photos with camera photos with Xiaomi phone. The difference is absurd.

Snapchat doesn't want to make so many configurations for every Android phone that is getting pushed out on the market. Different resolutions, screen ratios, camera, etc., so they made a standard for probably all non-flagship phones I think. I got Mi Mix 1, this one is affected by this standard.
> -1 votes

# Answer
It's because of the rear camera.

Switch it to the front camera on your phone so when your app opens, it shows you on the app screen. And now there's no more sound when you open or close your app, as long as you are using the front camera and always set it back to open the front camera on your phone.
> -1 votes

---
Tags: audio, camera, snapchat
---


# Question
Title: How to quickly understand the Android UI
I have experience with Windows, the MacOS, the iPad and Linux UI's like KDE. I have not used an Android device however so I do not really understand how it works and compares. My general understanding is that it is similar to Gnome-like Linux interfaces, but I guess there must be some differences since Android has a layer of Java, the Dalvik/ART virtual machine, between the Linux kernel and the UI elements.

I have read the Android developer overview to the UI but that has not really helped me understand how the UI operates from a workflow basis.

Obviously I could just buy an Android tablet and use it for a few months, but I am hoping there is some way for me to understand the Android UI and how it differs from other major UIs. How can I get this knowledge?

# Answer
On **Linux** OSes kernel starts `init` which starts `getty` which starts `login` process on virtual console(s). There a user can login on CLI and a shell (like `bash`) is opened for command execution. In windowing system, `init` starts a Display Server like Xorg or Wayland and `login` is replaced with a graphical Display Manager like SDDM or GDM which asks for user credential on GUI. After authentication a Desktop Environment e.g. KDE or GNOME is started which starts its Window Manager and shows components like Desktop, Task Bar / Panel, Widgets, Notifications, and windows of applications such as a File Explorer, Web Browser, Terminal Emulator etc.

**Android** is primarily designed for a single user, so there's no concept of CLI login. In fact virtual terminals/consoles are disabled in kernel by default. `init` \- after starting all native services including Surface Flinger (Android's Display Server) - starts a service named `zygote` which is a special process to fork Java-like Virtual Machines. Android's core framework (`system_server`) and all apps run in separate instances of VMs. `system_server` starts apps which are configured to run on boot, including many system apps.

So what we see after the boot animation ends is **System UI** app. This app is responsible for showing lock screen, status bar, notifications etc. `system_server` has 100+ Java services running inside it including Activity Manager, Permissions Manager and Window Manager. WM communicates with Surface Flinger to draw surfaces on screen as requested by `system_server` and apps. Another core component we see is a **Home** or **Launcher** app which is somewhat like a Desktop. It shows, at least, icons of all installed apps and forwards the request to `system_server` for launching/showing the app when we tap an app icon. So everything we see on an Android device is an app.
> 5 votes

# Answer
Only by using Android device.

If you don't want to buy a tablet or phone, just install Android emulator like Genymotion, Bluestacks or a classic emulator from Android SDK, but none of these would give you the great experience as using and playing with real device.

You can also watch many tutorials like Android Development for Beginners which provides you a some useful information, but no direct experience

I'm saying this not only as a Android fan, but also as experienced Android Developer
> 1 votes

---
Tags: linux, user-interface
---


# Question
Title: Playstore not downloading or updating anything
My playstore is not working from my device. Whenever trying to download or update, it just shows 'waiting for downalod' and that loading bar spins forever around the app logo. No i do not have any connection issues. My internet is strong enough, and to check, I have used other wifi and also cellular data. I have tried already clearing data, disabling and enabling, restarting, reset settings etc. Please help!

# Answer
> 0 votes
If you tried clearing the app data and restarting yet it's not working. Perhaps did you check 'App download preference' in the setting? Once I set it to 'Over Wi-Fi only'. And later even after changing it back to 'Over any network' it kept saying 'waiting for download'.

And if it's regional issue, try checking it with a VPN. But before trying it with VPN, force close Play Store and clear the data.

# Answer
> 0 votes
I had the exact same problem (which happened suddenly and without me changing anything) after a Google Libraries update. It persisted for some time and after a couple of Google Libraries updates it was fixed and now everything is updating normally.

I had tried to clear caches, reset Google Play etc. but nothing had worked. I suppose this is a bug in Google services.

---
Tags: applications, google-play-store, 6.0-marshmallow
---


# Question
Title: How to disable flash messages from telecom carrier?
I am having a Nokia 6.1 Plus running on Android 10.

I am facing this trouble while activating my bank on Google Pay. While the activation process, an SMS is sent. Then this flash message is shown regarding my SMS balance from the operator.

(Click to enlarge)

While this message is shown, the system gets out of context Google Pay. In return, Google Pay says this.

(Click to enlarge)

I am irritated by this, sending or receiving money is trouble.

# Answer
These Class 0 messages are also called *flash messages*, that can be disabled by :

> * Open SIM toolkit application and tap on Airtel Now! service. Now click on Start / Stop and select Stop to deactivate flash SMS completely.
> * In addition, you can also message STOP ANOW to 58234 to request the service deactivation.
> 1 votes

---
Tags: sms
---


# Question
Title: Lock screen without using physical button Android 10
I am looking for a good way to lock the screen on my phone without using a physical button (the botton is on the edge of dying so I am preserving it for turning the phone on).

I would like to lock the phone by movement or tapping somewhere on the touch screen.

(I prefer it if this can be done without using external apps but if necessary I prefer free ones without ads.)

The f-Droid app FLock seems like it would have been ideal, but it crashes before I even have the chance to test it ().

# Answer
There's a built-in option that comes with Android 10 which allows you to lock the screen without using the bottom.

In your phone settings, go to "Accessibility" and enable "accessibility menu".

This will now put an icon on the the right side of your navigation bar. Pressing on the icon will bring up a menu, with one of the options as "lock screen". Pressing on that will lock your screen just like pressing the power button would. You also have the option to power off the phone in that same menu.

See screenshot below.
> 7 votes

# Answer
The app Lock works but a downside is that afterwards the phone cannot be unlocked using a fingerprint, only using the pattern. (Also it is not available from within other apps. So a movement activated solution would be better.)
> 1 votes

---
Tags: lock-screens
---


# Question
Title: How to shutdown android via ssh command?
Is there any toolbox or app that will support issuing shutdown command via ssh to a rooted android smartphone? Note that I'm not asking how to **restart** Android via command line (remotely) – but to really shut it down / turn it off.

# Answer
> 3 votes
> reboot -p

was mentioned here which works for me on a rooted device. But someone mentioned here (see comments as well) that it's a bit harsh to simply shutdown without notice. So try something like this:

```
su -c 'am broadcast android.intent.action.ACTION_SHUTDOWN && sleep 5 && reboot -p'

```

# Answer
> 1 votes
For me with an Android 4 device `reboot` doesn’t have a `-p` option, but there’s an alternative:

```
su -c "am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN"

```

This is what’s used by Android as well, see AndroidManifest.xml.

If you want to perform a more graceful shutdown broadcast `ACTION_SHUTDOWN` first, e.g.:

```
su -c "am broadcast android.intent.action.ACTION_SHUTDOWN && sleep 5 && am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN"

```

---
Tags: ssh
---


# Question
Title: Desktop/homepage shortcut to send pre-built email in one click
I'm trying to set up a way to send a pre-defined gmail email to a pre-defined recipient with a single tap from the home screen. Essentially, I'm going to use emails to trigger macro events on another device, and as I will be regularly sending these emails, (sometimes multiple times per day), I do not want to have to continuously recreate them manually. I want something like Compose Email Shortcut, only I would like the recipient, subject and body to all be filled in already and for the email to be sent as soon as the shortcut is pressed. Email Yourself is the closest thing I could find to this, but that app is rather expensive for what should be a pretty basic function, and it still requires the user to press send after the shortcut is pressed.

Any help/advice appreciated...

# Answer
> 1 votes
Automation is the preferred option. Many apps are available. I prefer using MacroDroid , since it is free (upto 5 macros and you need only one macro for your need) and easy to learn.

* Give the app all permissions it asks for and from Settings →Email settings, enter your Gmail account details.
* Create a macro as shown below (use **+** to add triggers /actions). In the send mail action fill in details of recipient and the text of mail. In pop up action enter text that you want to be displayed when you create a widget (explained in next step). Save the macro with any name.

(click to enlarge)

* From the widgets drawer of your launcher drag and drop *MacroDroid Shortcut* widget on top your screen. On the menu that opens up, assign it to the macro you saved.

Tap the shortcut to send the mail. I've tested and it works fine.

(click to enlarge)

You may edit the icon of widget to a custom one and add more bells and whistles by way of adding a sound action, scheduling to send mail at fixed times /days, or whatever you want ( endless possibilities) later

---
Tags: gmail, email, automation, home-screen-shortcuts
---


title: Where is the wallpaper image saved?

text:
# Question
Title: Where is the wallpaper image saved?
I had an image from a website which I set as my wallpaper inside the browser. I am wondering now where I can find the image in the file system, because I can't find it online anymore. I am rooted.

# Answer
I'm not sure if it's the same on older systems, but on ICS it appears to save directly to `/data/data/com.android.settings/files/wallpaper`. I set mine from the browser, pulled that file, then changed it to a .png extension and *voilà* \- it was the image I had set.

It also appears that this file simply gets overwritten when you change your wallpaper, so I don't see a way to recover one once it's changed unless you have a copy of the image somewhere else.

This also appears to be where it's saved on CyanogenMod 7, so it's possible that this is the "standard" location (certainly a good place to check, at least).
> 16 votes

# Answer
I was annoyed by the exact same problem, so I have programmed an app that automatically saves your wallpapers and your live wallpapers too. It makes it easy to revert to a previous wallpaper. It is called Wallpaper Saver, by Appdictive, and it's free in the Play Store. (It does not require root access.)
> 28 votes

# Answer
In Android 7.0, it's located in `/data/system/users/0`. You'll have to use a file explorer to rename it to a jpg or whatever it is. The folder also contains your lockscreen wallpaper so that's a plus.
> 9 votes

# Answer
This is a slight twist on the original question's context but may be useful to some who land here...

The location of the **stock wallpapers** is in an apk file that you should find on your device at `/system/framework/framework-res.apk`. Pull that file to your computer and then browse its internals. A search for a file with `wallpaper` in its name should prove fruitful.

The apk also contains other goodies such as stock icons.
> 2 votes

# Answer
You can use Root Browser, ES File Explorer, or other root folder browsers for this. Go to the root path using Root Browser (or ES File Explorer), and then:

```
data/data/com.cmcm.locker/cache/Volley/dat

```

When you try to open it, it won't open. To open it:

1. Copy the images with high size (maybe more than 80 KB since they got a quality) and paste them into a folder that is not in a root directory. (Just copy it to your "Downloads" folder or to your SD card)
2. Rename it. But when you do this, don't forget the ".jpg" at the end of the name you type. E.g. If I rename it to, "Sukkoth.jpg"
3. Open it using Gallery or any image viewer app.
> 1 votes

# Answer
In Android 7.1.2, I found them here, but they do not have an extension:

```
/data/data/com.android.wallpaperbackup/files
    wallpaper-lock-stage
    wallpaper-stage

```

and here too as suggested on SiriusXM's answer:

```
/data/system/users/0
   wallpaper
   wallpaper_lock
   wallpaper_lock_orig
   wallpaper_orig

```

Image extension can simply be added to those files.
> 1 votes

# Answer
in Android 9 (my S10+), wallpapers (lock & regular) are stored in:

```
/storage/emulated/0/Android/data/com.android.systemui/files/backupwallpapers/

```
> 1 votes

# Answer
I found my wallpaper in the location `\Internal Storage\WhatsApp\Media\WallPaper` after a search for "wallpaper" in Windows Explorer after connecting the phone to the computer.
> 0 votes

# Answer
Try here: `Internal Storage/Android/data/com.android.systemui` under internal storage.
> -2 votes

---
Tags: files, images, wallpaper
---


# Question
Title: How to stop Android from switching between Wifi APs automatically?
I have several WiFi APs for different purposes. One is for printing, one is for smart devices with access to the internet, another for devices with no access to the internet for security concerns, and some others like repeaters, guest APs or streaming devices. Android 7 always switches between these APs without asking for permission. The only time it asks for confirmation is when switching from WiFi to mobile data. Using the wrong AP, is not only annoying but has unwanted consequences. Any idea how to stop Android from such nonsense move?

Ps: there is no smart wifi option but wifi plus which is off. Ps2: Imagine an app does not have access to the AP or internet it needs or when setting up a device and the WiFi is switched to another AP or connecting to a server with the wrong IP, just because Android decides it wants to use a different WiFi AP.

# Answer
> 1 votes
In Android 7.0, you can actually disable wifi auto-reconnect. Go to Wifi Settings, then tap on one of the AP. Uncheck the Auto-reconnect.

# Answer
> 0 votes
I had that issue. I have 2 APs and my phone keeps switching between the 2. What I did was made the phone "forget" the APs I DON'T usually use the phone with. Can't connect to an AP you don't have a password for, right? Works like a charm.

# Answer
> 0 votes
I have found reference to this command to disable the automatic internet connectivity test, and some reports of it working. I cant test it though. You need a rooted handset. I don't have one and currently can't... you first need to su, then....

```
settings put global captive_portal_detection_enabled 0

```

I've actually put in a technical request to Nikon as my camera suffers the same issue. I can no longer download from it. I'll let you know if I get any joy!

---
Tags: wi-fi, 7.0-nougat
---


# Question
Title: How to use mobile data (hotspot) and calls at the same time?
I have a Huawei Honor 8X running Android 9 and it is pretty new - probably a year or so old. I am currently running it dual-SIM - one for my telephone number and one for mobile data. I am doing this as my telephone contract is pretty cheap, and the data contract is genuinely unlimited 4G. All phone operations default to one SIM, all data operations default to the other.

I have noticed that my phone wifi hotspot stops working when I am on an inbound or outbound telephone call. This is becoming a bit frustrating as sometimes I need to access something on the web while speaking to someone. I have done a bit of research on the web, and found that some phones prioritise voice data over internet data, but that situation may be changing on newer phones (presumably as network bandwidths generally improve).

My situation is a bit different in that I expect I have two modems (one per SIM card) and so even if this restriction still applies to phones with one card, I hope I might be exempt because I am running two.

Of course my ideal situation would be to cancel the voice contract and use data/voice on one contract. However I am happy to maintain both in the phone if I can get if that is the only way it will work. If this is considered hard to do these days - even with a modern phone - I can transfer the data card to a dongle and carry that separately.

I am in the UK.

# Answer
Going by your problem I suspected that your device is *Dual SIM Dual Standby*, which was confirmed by GSM Arena.

What this means is that you can use only *one SIM at a time* be it for data or voice unlike *Dual SIM Dual Active* phones where you can use both SIMs *simultaneously* for voice /data. Also the user manual which can be downloaded from here does not mention Dual SIM Dual Active.

So, contrary to your expectations you have only one modem and hence the behavior you experience.

Only solution is to use one SIM that has both voice and data plans since your device supports VoLTE (see user manual). Be aware that if you use both SIMs on 4G/VoLTE, only one will work on 4G and the other on 2G
> 3 votes

---
Tags: mobile-data, wifi-hotspot, dual-sim
---


# Question
Title: Preventing your device from vibrating whenever it gains or loses its mobile network connection
I've been using a Moto G (2nd generation) running Android 6.0 "Marshmallow". I was playing with the settings, and changed some setting. Now, every time the phone loses or regains cellular service — for example, when I'm in the basement, or when I enable or disable airplane mode — the phone vibrates two or three times. The vibration is noisy and annoying. What can I do to prevent it from happening?

# Answer
I found a relevant CrackBerry.com forum post by Kathy Mansfield. The post guided me towards a solution that works.

* Open the Phone app.
* Press the three-dots icon in the top-right-hand corner of the app.
* Tap "Settings".
* Tap "Calls".
* Tap "Voicemail".
* Uncheck the "Vibrate" option.

The forum poster explains:

> If you have a pending notification, like a voicemail message you've not retrieved, you'll see the icon for the message. Every time your service is lost and regained, it will vibrate because of the voicemail notification. I suppose it thinks the notification is new. ...
>
> Alternatively, you could just clear the ... voicemail message and hence the notification.
> 1 votes

---
Tags: 6.0-marshmallow, notifications, vibration, motorola-moto-g2, voicemail
---


# Question
Title: disabling sideloading APK'S via disabling the packageinstaller
i have a moto x4 running on lineage OS ver. 16 that i wanna disable installation of APK'S, so after searching online i found that deleting or disabling the packageinstaller (via debloater or adb pm commands) will disable the option of installing APK'S, the issue is that it seems that if the packageinstaller is disabled then the phone cannot boot (probably the system needs the packageinstaller) and it will tell me to make a data wipe and a factory reset, so my question is as follows is it possible to disable the packageinstaller that it should not allow installation of new apps but still be enabled so the phone can boot?, or is there another way of blocking the installation of new apps?

thanks in advance

# Answer
> 1 votes
This question offers itself to a variety of approaches, because it seems that you are relying to an unknown extent on your user's lack of dev savvy.

A) Simplest: if your user is not an android tech, and you have no app store installed on the device, why assume that they know what an apk is and where to obtain one?

B) however, if you think that thats too simple , you can disable unknown sources and hide the setting from the user, (that should work on a reg phone, though not sure about lineage OS.) `adb shell pm uninstall -k --user 0 com.android.settings.<settingName>` to disable a particular setting has been known to work on some devices, you can try it on the package manager as well, as it does not remove the apk from the phone just de-registers, though a factory reset will return the setting, and you'd have to look into preventing the user from performing factory resets.

there are many approaches that would offer a similiar level of protection.

C) Therefore, (if you think a non-dev user will figure that out,) it seems that parental control apps and/or app managers would be the most complete basic level protection.

D) you can get super deep and play around with the OS - possibly recompile the package manager app.

in summary: at the end of the day android requires pm in order to function properly. the packageinstaller app that comes preloaded with your firmware is only one of the many ways to install apks on your device because it is only a UI for a native android functionality which doesnt disappear when the package installer app is removed. to fully and irreversably disable this functionality in a way that only very experienced dev cannot circumvent is a very complicated job. However an app manager or parental control solution can usually offer near complete security from an average user.

---
Tags: adb, installation, apk
---


# Question
Title: How to stop Stock ROM overwriting the Custom Recovery?
I was trying to flash a Custom Recovery (TWRP) on my Friend's phone (Realme 3).

It was officialy supported by TWRP and was listed on their website so I downloaded the Custom Recovery. Then I unlocked the bootloader of his phone but yes a strange thing happened there:

After it asked for pressing the volume button to be pressed it unlocked the bootloader – but after that there was option "Select boot type". It had three options: Boot to Bootloader, Boot to recovery and last Normal boot. Further there was a arrow on the bootloader option. And there were some instructions something like volume up for select and volume down to move.

But I tried every button but the arrow was stuck on the bootloader option. So I connected it to my device and used the "fastboot reboot" command to restart the device. After restarting at the realme logo it was saying "You are unlocked you cannot be trusted". But after that it booted normally and the phone was Factory Reset.

After this in the Developer options the OEM unlocking was grayed out saying Bootloader is unlocked. Ok so we were successful in unlocking the bootloader.

After that I pasted the twrp img file in the platform tools directory and put the command adb reboot bootloader and after the device was in bootloader I used the command `fastboot flash recovery name.img` to flash the recovery. It said sending and then writing in my terminal.

After that I used the command `fastboot reboot` and the the key combinations (`power`+`volume` `down`) for the device which used to get into recovery for that phone – but this time, instead of going into recovery, it was in the bootloader.

So again I tried `fastboot reboot` command and this pressing the `power`+`volume up` but the phone booted normally. So this time I tried `adb reboot recovery` – but it booted into stock recovery. So again I tried flashing the recovery and tried using fastboot reboot recovery but it didn't work.

And yes I know that after flashing the custom recovery the phone should first boot into the recovery but as I said neither the key combinations nor the fastboot reboot recovery command so what can I do to prevent the system from overwriting?

# Answer
Ok I was able to install the TWRP Recovery using my device's stock recovery's install method... And it worked!!!!
> -1 votes

---
Tags: recovery-mode, twrp
---


# Question
Title: Repair IMEI of a rooted Motorola Moto E4
I have rooted my Motorola Moto E4 (XT1765, MetroPCS, Qualcomm processor - Not MTK) on Android 7.1.1 with Magisk. Now I want to repair its IMEI.

I've tried Miracle Thunder and many other tools, but nothing worked. When I try the Miracle Thunder tool to repair IMEI, after a restart, the baseband becomes null or unable to check IMEI.

Can you please suggest a method to repair its IMEI?

# Answer
> 0 votes
To resolve null baseband, flash the same baseband files:

```
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot reboot

```

---
Tags: motorola, imei
---


title: Whatsapp theme suddenly turned dark

text:
# Question
Title: Whatsapp theme suddenly turned dark
I was chatting on whatsapp, then I didn't look at my phone for 5 seconds, and when I looked back I saw that it turned dark theme with a wall paper

Why?

And now I can not get it back to previous theme, even if I select default theme or light theme etc. How to return to previous theme? I was using default. I had not changed any setting for theme or Wallpaper

I use latest version of android (I guess) , and my phone is Samsung Galaxy S9

# Answer
As suggested in comments, I looked at my phone settings and it was in dark setting. Whatsapp likely upgraded in the background to default theme so it automatically turned dark (latest version of WhatsApp does that).

To revert to light theme, from chat settings, change it to light theme. If it doesn't change, clearing cache and rebooting may help
> 2 votes

---
Tags: whatsapp-messenger, themes, dark-mode
---


# Question
Title: Samsung J5 stuck in boot loop after factory reset
* Phone was rooted and working fine
* I did a factory reset

Now, it seems to just boot into the Samsung animating logo that does not go away...

I'm able to boot into the recovery mode and view the logs. which has logs of:

```
couldn't find any tzdata when looking for localtime
...
can't open /dev/tt0: No such file or directory
...
no adf devices

```

Any chance to salvage this?

# Answer
flash the same stock boot.img. its in BL\_J500xxxxxx. extract from it or flash the whole BL\_J500xxxxx. for extraction use 7zip, then right click on the boot.img \> add to archive make boot.tar flash it in AP, using odin
> 0 votes

---
Tags: boot-loop, boot
---


# Question
Title: Disable info popups on YouTube app ("ⓘ")
When viewing videos with the YouTube app, constant info message popups during playback shows. Videos that show those info popups show a white circle with the letter 'i'.

Is there a way to disable that?

# Answer
> 1 votes
If you insist on using the official YouTube app, I'm unaware of any way to do what you want.

# Your options

The best workaround is to use a different app to watch YouTube.

* Lately, I've been using m.youtube.com inside **Google Chrome**. In my experience, m.youtube.com is unable to display info popups. (It's also unable to display end cards.) Alternatively, you can use:
    + **another web browser**, such as Firefox for Android; or
    + any of the numerous dedicated **third-party YouTube clients** available in the Google Play store.

# Bonus tip

Firefox for Android lets you install extensions, such as uBlock Origin. If you do install uBlock Origin, know that it includes an 'element picker' feature. This feature lets you hide selected parts of your favorite websites. For example, you can use it to hide all recommendations, or all comments, on the YouTube website.

---
Tags: youtube, ads, content-filter
---


# Question
Title: How can I emulate pressing another application's Quick Settings tile?
I'd like to programatically press another application's Quick Settings Tile, e.g. from the shell or Tasker.

---

In this particular case, I'd like to press ProtonVPN's tile in order to automate connecting and disconnecting.

After tearing apart the app, I found that I could reliably disconnect the VPN with:

```
su root -c am start-foreground-service -n com.protonvpn.android/org.strongswan.android.logic.CharonVpnService -a android.net.VpnService.DISCONNECT

```

I can sometimes connect with:

```
su root -c am start-foreground-service -n com.protonvpn.android/org.strongswan.android.logic.CharonVpnService -a android.net.VpnService

```

However, this is not very reliable as it's an internal mechanism that bypasses much of what the app does in the process of properly establishing a Quick Connect connection.

If there's an intent that will simulate what occurs when an app's tile is pressed, it should provide a much cleaner solution.

In this instance, the app has the service `com.protonvpn.android.components.QuickTileService` and an intent action filter of `android.service.quicksettings.action.QS_TILE` however I'm at a loss for where to go from there.

# Answer
# In brief

### Automating an already visible Quick Settings tile

```
# Click on a TileService of the specified component
cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent

# You may need to expand the status bar to show the quick settings
# before it'll apply.  Not sure why.
cmd statusbar expand-settings
sleep 0.25 # 250 ms or shorter may be enough
cmd statusbar collapse

```

### Adding a Quick Settings tile and removing it after clicking

```
# Expand, add tile, wait for it to initialize
cmd statusbar expand-settings
cmd statusbar add-tile com.package.name/.service.QuickSettingsTileComponent
sleep 0.20

# Click tile, wait for it to react
cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent
sleep 0.35

# Remove tile, collapse
cmd statusbar remove-tile com.package.name/.service.QuickSettingsTileComponent
cmd statusbar collapse

```

# Guided walkthrough

## Finding package name and component

*Skip this if you already know how to find the QuickSettings Tile service.*

1. Install an application like apps\_Packages Info \[F-Droid\] to browse through the list of installed apps and all services.
2. Find the application whose tile you want to toggle and open the application details by tapping on it

* *Example: `Digital Wellbeing` is `com.google.android.apps.wellbeing`*
3. Expand the `Services` dropdown in the application detail page
4. Find the tile service, which will have the permission `android.permission.BIND_QUICK_SETTINGS_TILE`, then note down the component name

* *Example: `Bedtime mode` (formerly `Grayscale`) QS tile is `.screen.ui.GrayscaleTileService`*
5. Make note of the full package name and component name, and fill out the command below:

```
cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent

```

*Example 1: to toggle `Digital Wellbeing`'s `Bedtime mode` (formerly `Grayscale`) QS tile…*

```
cmd statusbar click-tile com.google.android.apps.wellbeing/.screen.ui.GrayscaleTileService

```

*Example 2: to toggle `Digital Wellbeing`'s `Focus Mode` QS tile…*

```
cmd statusbar click-tile com.google.android.apps.wellbeing/.focusmode.quicksettings.FocusModeTileService

```

## Automating the Quick Settings tile

On some versions of Android, toggling the Quick Settings tile via `click-tile` won't apply until the Quick Settings section is expanded. As soon as the Quick Settings section is revealed, it'll work, even if the tile itself is placed on a secondary page of quick settings tiles (e.g. page 2).

This works even when the screen is locked if the QS tile doesn't require unlocking to toggle. However, the display must be on.

Try without expanding the Quick Settings section first, and if that doesn't work, try the expanding method instead.

### General steps

**If the Quick Settings tile is already added…**

1. Turn on screen if it's off
2. Expand Quick Settings via `cmd statusbar expand-settings`
    * This might not be needed for you - try without first
3. Run `cmd statusbar click-tile [component]` command discovered above
4. Wait a short delay, e.g. `250 ms`
5. Optionally, close status bar via `cmd statusbar collapse`
6. Optionally, turn screen off if it wasn't already on

**If you don't want to keep the Quick Settings tile around…**

1. Turn on screen if it's off
2. Expand Quick Settings via `cmd statusbar expand-settings`
    * As before, this might not be needed - try without first
3. Add the Quick Settings tile via `cmd statusbar add-tile [component]`
4. Wait a short delay, e.g. `200 ms`
5. Run `cmd statusbar click-tile [component]` command discovered above
6. Wait a short delay, e.g. `350 ms`
7. Run `cmd statusbar remove-tile [component]`
8. Optionally, close status bar via `cmd statusbar collapse`
9. Optionally, turn screen off if it wasn't already on

### Example shell script (with Tasker counterpart)

**If the Quick Settings tile is already added…**

```
# Wake up device
input keyevent KEYCODE_WAKEUP
#
# Tasker: Add Action -> Display -> Turn On

# Expand the Quick Settings section of the status bar
cmd statusbar expand-settings
#
# Tasker: Add Action -> Code -> Run Shell, copy above

# Click on a TileService of the specified component
cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent
#
# Tasker: Add Action -> Code -> Run Shell, copy above, check "Use Root"

# Wait for click to register, 350 ms or shorter may be enough
sleep 0.35
#
# Tasker: Add Action -> Task -> Wait, then set delay to 350 ms

# Optional: collapse status bar
# This won't work when on the lockscreen, but turning the screen off
# also collapses the status bar for you.
cmd statusbar collapse
#
# Tasker: Add Action -> Code -> Run Shell, copy above

# Optional: put device to sleep
# (Up to you: only turn off if the screen wasn't already on.)
input keyevent KEYCODE_POWER
#
# Tasker: Add Action -> Display -> Turn Off, enabling "Lock"

```

**If you don't want to keep the Quick Settings tile around…**

```
# Wake up device
input keyevent KEYCODE_WAKEUP
#
# Tasker: Add Action -> Display -> Turn On

# Expand the Quick Settings section of the status bar
cmd statusbar expand-settings
#
# Tasker: Add Action -> Code -> Run Shell, copy above

# Add the TileService of the specified component, click on it, then
# remove it
# 'sleep' gives time for the tile to initialize and the click to
# register, 200 ms or shorter may be enough
cmd statusbar add-tile com.package.name/.service.QuickSettingsTileComponent
sleep 0.20
cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent
sleep 0.35
cmd statusbar remove-tile com.package.name/.service.QuickSettingsTileComponent
#
# Tasker: Add Action -> Code -> Run Shell, copy above, check "Use Root"

# No need to wait for click to register, waiting was done above

# Optional: collapse status bar
# This won't work when on the lockscreen, but turning the screen off
# also collapses the status bar for you.
cmd statusbar collapse
#
# Tasker: Add Action -> Code -> Run Shell, copy above

# Optional: put device to sleep
# (Up to you: only turn off if the screen wasn't already on.)
input keyevent KEYCODE_POWER
#
# Tasker: Add Action -> Display -> Turn Off, enabling "Lock"

```

### NOTE: root or ADB is required!

If you are using an automation app rather than `adb shell`, `cmd statusbar add-tile/click-tile/remove-tile` must be run with root or via e.g. ADB WiFi actions.

The other `cmd statusbar` commands may be run without root.

Tasker/etc have non-root options for waking the screen and putting it to sleep.

### Other details

`cmd statusbar click-tile` appears to have been added with Android 7.0, so this should work ever since custom quick setting tiles were officially added to Android.

I've not found any way to *read* the Quick Settings tile state, e.g. active/on or inactive/off. To work around this, I've checked `logcat` and app notifications via `dumpsys notification` to see what's running or paused.

I've also not found out how to toggle the built-in Android System Quick Settings tiles; fortunately, most of them appear to be achievable via other means (secure settings, service calls, etc).
> 5 votes

# Answer
I'm stepping out of my comfort zone with this one, but seeing as no one else has had any input, I thought I may as well mention it for you to test:

1. Go to G Play Market and install Nova Launcher.
2. Skip all the setup and go straight to the Home screen with Nova as the default launcher (since you're just testing functionality at this point)
3. Long press your background and select `Widgets`, then scroll down to Nova Launcher and find the "Activity" widget (for me it's the second widget); long-press then drag to an empty space on Home Screen
4. Once you let go to set the widget, an overlay prompt will come into focus and start loading. Depending on your device and the number of apps installed, this may take a minute or two, so don't be alarmed. Once it finishes loading, scroll down to your app and locate the activity thread you're looking for and select it (you can long-press them one by one to test the function as well, it will return you back to the previous overlay prompt **if** the thread didn't cause a crash...if it does, you'll have to restart from step 3.

I always thought it was a neat function but never got around to testing what it was capable of doing. Hope this works out for you!

NOTE: I am enrolled in the Beta and have the Prime (paid) version, so I'm not sure if that might affect this specific function or not. You can likely purchase for testing and request a refund if necessary.
> 1 votes

---
Tags: tasker, automation, vpn, intents
---


# Question
Title: want to replace cwm recovery with twrp on lenovo k3 note
I want to replace cwm recovery with the twrp recovery on my lenovo k3 note. Can anyone share the step by step procedure to do this?

# Answer
I have flashed CWM to TWRP by using a App called "Rashr". You should make your K3-Note root condition because Rashr needed root permission and put your unzipped TWRP image file into SD card open Rashr flash recovery image directly! It is a easy way to change recovery from CWM to TWRP.
> 0 votes

# Answer
* Download and install ADB
* Download your K3 Note Recovery https://mega.nz/#F!RwEHyDYA!afI2c2A\_hI8jHJ9MvjPauw \<- here
* connect your phone in fastboot mode
* Check for your phone with cmd in administrator mode

**1. fastboot devices**
* If yes then flash your recovery

**2. fastboot flash recovery 'filename.img'**

Ta-Da your CWM recovery will be replaced with TWRP

**note: sometimes you need to replace "recovery" in the second command with "boot"**

I had the above problem with my Sony Xperia M2 dual Did this and replaced my CWM recovery With TWRP 3.x
> 0 votes

---
Tags: clockworkmod-recovery, twrp, lenovo
---


# Question
Title: Internet fast when sharing via hotspot or tethering but slow on the device itself
Yes, I didn't get that backwards. And all I found is "slow tethering", even here this was never asked before. So, here I am!

Internet is slow on the device, but fast for other devices connected to it. It doesn't look like the fault of some software I'm using (browser, openvpn)

Soooo how in the world? And how in the world do I fix it?

Model: Doogee T5. OS 6.0, Nothing is changed, no root.

# Answer
So, I have discovered the cause of this problem... the darn chinese brick is riddled with vendor's own poorly written system level adware. It constantly opens connections to it's servers which turns into a DoS attack on the device itself, akin to shooting your neighbor's house with a bazooka through your own door's keyhole. The device's own network gateway is differerent from the gateways for wifi and bluetooth hotspots, so those are unaffected.

Installing a firewall app solves the issue.
> 1 votes

# Answer
Chances are that internet is not slow but it might be that the servers of the apps or sites that you use on phone are not responding that quickly

To identify the problem use your phone's internet in pc by tethering and try downloading a file that you think is giving full or expected download speed, when done just remember the speed and copy link of this download to phone , now try to download this very same file from android from ADM and add new download by pasting that link and start download ( make sure you turn off tethering before this and all other apps that use internet are not running to get best speeds ) let the download run for few minutes to make sure it reaches stable speed and than compare both the pc speed and this android speed and do report back
> 0 votes

---
Tags: connection-issues, mobile-network, tethering
---