# Question
Title: How do I make my kid’s Android phone ring even if silenced when I call him?
Sometimes my kids forget to put their phones on ring mode and then I can’t reach them. I’m looking for a solution that will unmute their Galaxy S7 when my or my wife call them.

# Answer
It might not be applicable if your kids are older, but my kid just got his first phone and I manage it with Google Family Link. Even when the phone is on silent I can make it play a sound and get him to answer a call or message. It's worked out really well for me, the one thing I don't know is if you can have more than one family device managers to manage the family's devices. It might be worth checking out at least.

I can also use it for managing screen time restrictions and other parental controls that I really felt were missing in cheap, stock Android phones.
> 1 votes

---
Tags: audio, calls, silent-mode, parental-control
---


# Question
Title: Unknown "________ would like to send a message to 45567" notification
I keep getting these random SMS permission notifications. The app or service requesting to send the message is always changing.

* Pixel 2 XL on Android 9 on Freedom Mobile in Canada.
* Play Protect and Malwarebytes don't detect any malicious apps.

How do I determine what's causing this?

# Answer
Looks like this is an issue **specific to Freedom Mobile users** happening since May 9, 2019. Possibly caused by a software update from Freedom around that time, it appears to **affect Google Phone (beta) users with Visual Voicemail enabled.**

---

### Background

There is a thread on Google's official support for Pixel Phone, which mentions the same issue about some multiple random processes requesting permission to send an SMS to 45567 on multiple setups:

* Device model: Pixel 2, Pixel 2 XL, Pixel 3, Pixel 3 XL,
* Android version: Pie, Q (beta)
* Process name: com.android.sdm.plugin, Connectivity manager, Oemdmtrigger, com.qualcomm.data, uceShimService, Phone and Messaging St..., Modem Service, SDMService, \[etc.\]
* Software update: After the May security patch, or after an update to "Carrier Services" and "Actions Services" but before the May security patch.

### Temporary fix/workaround

As per Matthew Naugler Klassen's post, the (temporary) fix is to disable Visual Voicemail in Google's Phone app:

1. Open **Phone** app
2. Open **Settings**
3. Under **Voicemail**, disable **Visual Voicemail**

### Additional Remarks

Freedom Mobile seems to aware and has acknowledged the issue, promising to escalate it and deliver the fix as soon as possible.
> 2 votes

---
Tags: notifications, sms
---


title: Direct HDMI output at the start up?

text:
# Question
Title: Direct HDMI output at the start up?
I have an Android 6.0.1 Vibe P1 Turbo with literally dead screen(I closed the phone months ago and did a complete disassembly).

What I want to do is get the phone output the screen through USB right when it starts up. I was thinking about octopus micro USB with USB A legs and attach both a mouse and an "USB to HDMI converter" to connect it to the dumb LCD TV (1366X768 PAL) and backup data to the Google Drive and shut down the phone for good.

Will I be able to do it? Or I have to open the phone first which makes it impossible? Can you give me an things to have and a tutorial?

The phone has pattern lock

# Answer
> 1 votes
USB to HDMI converters require special driver. I never heard of an Android device supporting such a converter. The typical way to connect a Android device to a TV is using Wifi and screen cast technology.

There are some device that support MHL (re-use the USB-Port for a HDMI connection) but the number of device that support this is not very high and depends on the used chip in the phone. Anyway the USB port would be blocked in such a case and can't be used for USB devices.

Edit: Based on the additional info your provided (unlock possible, touch still works) the following may work:

1. Unlock the phone and connect it via USB to a PC. You should get access to your sd-card folder.
2. Use the screenshot feature to get the current screen content.
3. Open the screenshot on the connected PC
4. Try to tap on the position of the function you want to execute
5. Goto step 2

Using this you should be able to "use" your device in a very very basic way. Therefore what ever you want to to with it (e.g. exporting data) might be possible this way.

---
Tags: 6.0-marshmallow, usb, hdmi
---


# Question
Title: How do I bring back the Spotify lock screen controls?
I accidentally permanently dismissed the play/pause/skip controls for the Spotify app on my lock screen. I've looked all over trying to find how to bring them back to no avail. How is it done?

# Answer
There's a setting in the spotify app. From the spotify home page on your phone, open the settings (top right) and enable "Device Broadcast Status".
> 0 votes

---
Tags: lock-screens
---


# Question
Title: Receive whatsapp notification only between a certain time
I want to receive all WhatsApp messages only between 11-12 p.m everyday.How to do this? Can tasker app help in this.Or a script which can be used. Also please note that only messages should be queued but video/audio calls should function all day.

# Answer
WhatsApp messages could not be stopped while they are coming from the app's data system.

> In other words, we can't stop WhatsApp from receiving new messages while we have an active internet connection.

One possible solution could be blocking the "New Messages" notifications coming from the WhatsApp application. Maybe, we will require some code to do this but it is yet possible.

> WhatsApp send notifications to alert the users regarding new messages. We could intercept these messages and block them for some time interval and also store them for later.

If the user can see notifications only in a specific interval of time, then we only know that new messages have arrived only at that specific time interval.

Hope this helps.
> -1 votes

---
Tags: whatsapp-messenger, tasker
---


# Question
Title: Is it okay to use USB 3.0 cable with USB 2.0 wall adapter?
I bought an LG Optimus One phone a long time ago. The phone came with a USB 2.0 cable + wall adapter.

3 months ago, I bought a Galaxy Note 3. The phone came with a USB 3.0 cable + wall adapter. The wall adapter stopped working, however the 3.0 cable still works. (When I connect my Note 3 to the computer using the 3.0 cable, it works. But when I try charging my Note 3 using a wall outlet, it doesn't work).

My question is:

Since the wall adapter which came with my Note 3 stopped working but the 3.0 cable still works, is it okay if I charge my Note 3 with the USB 3.0 cable while the 3.0 cable is plugged into the wall adapter which my LG Optimus One came with?

Note: I didn't try it yet because I was afraid it might ruin the 3.0 cable.

# Answer
> 3 votes
USB devices are designed to use a wide variety of voltages ranging from 500mA to 1500mA and have been standardized for quite some time. You can generally plug any USB device into any USB cable and into any USB port, and nothing will blow up. Using a more powerful charger should speed up battery charging, while using a less powerful one will just charge slower. A good resource for this topic can be found here.

As noted in that article, the only real concern is when charging an older phone with a newer charger, as the battery might not be able to handle the higher current. In your cause your using an older charger with a new phone, so your all good.

# Answer
> 0 votes
nullmem gave an excellent answer, but I'd like to add that it's **NOT** ok to plug use any USB-C cable.

USB-C was created exactly to resolve the kind of issues nullmem describes in his answer -- different chargers supply different currents, and different devices can accept different maximum currents.

The USB-C spec tries to negotiate the highest safe amount of current that the device trying to charge can accept, that the device supplying the power can provide, and that the cable can carry. To know this, the cable has to be intelligent. Several low-grade cables not only don't respect the specification but have faulty wiring, and this has been widely reported since it made nerd news when a Google engineer fried their Chromebook port using a faulty cable.

See the excellent USB-C guide here and the USB-C peripheral test spreadsheet (cables, chargers, etc) here.

---
Tags: charging, samsung-galaxy-note-3, lg-optimus-one
---


# Question
Title: Troubleshoot fastboot error 'remote: ' command not defined
> Device: iMX 7ULP evaluation kit
>
> Platform-tools: r28.0.3
>
> Image: O8.1.0\_1.4.0\_ANDROID\_TOOL\_7ULP\_GA (ARM 32 Android 8.1)

I used the image provided by nxp website on the device. Then I tried unlocking it.

According to a tutorial, I used `adb` to bring the system in bootloader via

```
> ./adb reboot bootloader

```

The device goes to the splash screen and stop there (Not sure if that's how it should be). `adb` does not recognize the device anymore and `fastboot` fails on any command as fowllows

```
> ./fastboot.exe oem unlock
                                FAILED (remote: ' unlock device failed.')
fastboot: error: Command failed

```

```
> ./fastboot oem device-info
                                FAILED (remote: ' command not defined')
fastboot: error: Command failed

```

```
> ./fastboot flashing unlock
                                FAILED (remote: ' unlock device failed.')
fastboot: error: Command failed

```

How can I troubleshoot that and unlock the device?

# Answer
> 1 votes
I found the problem eventually.

In the `developer options`, there is an option `OEM unlocking` which must be allowed. Otherwise `fastboot` fails.

---
Tags: fastboot, bootloader, 8.1-oreo, bootloader-lock
---


# Question
Title: Will android background execution limitation issue affect Android notifications in 8.1 + devices?
Recently i have updated my device from 7.0 to 8.1 .

Will android background execution limitation issue affect Android notifications in 8.1 + devices?

Some of the app's notifications are not showing after the update ? IS this due to background execution limit ?

# Answer
Android 8.0 Oreo ( API level 26 ) introduced two major background limits in order to preserve the device's battery life and RAM resources.

* **Background Service Limitations**: After Android 8.0, apps which go into the background have restrictions on the use of Services. It introduces the concepts of foreground and background Services. Foreground services are visible to the users and have no restrictions imposed.

According to the docs,

> While an app is in the foreground, it can create and run both foreground and background services freely.

Also, the system maintains a whitelist. The apps listed over the Whitelist have full access to create background services. The docs also mention that,

> To migrate to Android 8.0 (API level 26), the developer replaces the background service with a scheduled job, which is launched periodically, queries the server, then quits.

* **Broadcast Limitations**: From Android 8.0, `BroadcastReceiver` can only be instantiated at runtime and not in the app's manifest. This reduces the system's load as the app only uses the component when required.

The problem is described in the docs,

> If an app registers to receive broadcasts, the app's receiver consumes resources every time the broadcast is sent. This can cause problems if too many apps register to receive broadcasts based on system events; a system event that triggers a broadcast can cause all of those apps to consume resources in rapid succession, impairing the user experience.

**Now, your question,**

> Some of the app's notifications are not showing after the update? IS this due to background execution limit?

There can be the following problems based on the limitations described above:

1. The app's developer hasn't optimized the app for Android 8.0 changes.
2. The app does not make the use of Android Services wisely and therefore gets eliminated by the system.
3. The `BroadcastReceiver` hasn't been initialized properly as required and therefore is not operational and could not update the app content.
4. Some other underlying change to which the app is not optimized.

Hope this helps.
> 1 votes

---
Tags: 8.1-oreo, push-notifications
---


# Question
Title: Compass needle deflected when near off smartphone
It puzzles me that a compass needle is deflected when I bring it near (~ 2 cm above the screen) my turned off Android smartphone, which can only mean there is still a electric current inside it. Surprisingly, the deflection is the same with the phone turned on. What may be the reason behind it?

I could yet not verify whether the same happens with other mobile phones.

# Answer
Smartphones and tablets have magnets.

Speakers & microphones have magnets needed to operate. There is a magnet for the vibration motor.

There may be magnets used to align wireless charging points.

See this video about magnetic paper which shows some examples of where magnets placed within electronic devices:

Physics Girl - How Magnet Paper Works feat. MKBHD
> 0 votes

---
Tags: shutdown
---


# Question
Title: Where is the MTP and PTP option in Android 9?
Where is the MTP and PTP option in Android 9?

I checked

where is the option to enable MTP?

and it's not there.

I have a Moto G7 Power. I don't know if that makes a difference.

I see there is a command line option How Do I change from PTP to MTP mode? Cannot find options in settings

But i'm looking for the GUI option

I think they moved it from settiings..storage. as it was there on an old phone.
I tried tapping build number 7 times, I can't see developer options.

# Answer
an answer from barlop https://stackoverflow.com/questions/16596877/android-studio-doesnt-see-device/18515360#18515360 mentions that it's now in developer options

i can see developer options now, (And FWIW I turned on USB debugging). but they moved the sectoin to MTP from the 'input' section of developer options to elsewhere

To find the USB options now, there is a search within developer options, search for USB. Now it comes under "default USB configuration"

and you see USB controlled by, or USB preferences.. And it's there

**update 2020** And if PTP is listed but not MTP, then maybe what android may refer to as "File transfer" is the same as MTP. See my comment PTP but not MTP , this link https://www.xda-developers.com/install-adb-windows-macos-linux/ says "file transfer (MTP)” mode" which suggests to me that they may be the same. And BTW to install adb you probably also need the driver from the android sdk as mentioned https://windowsreport.com/windows-unable-install-adb-interface/ so you don't get a yellow exclamation mark for adb under "other devices" in device manager.
> 1 votes

---
Tags: motorola-moto-g, mtp
---


# Question
Title: Turn screen off without Android sleeping
Is there any way to quickly toggle the screen off without making Android sleep?

For example, I sometimes like to use the Calm app when I sleep. But it keeps the screen on all the time. When I just use that app for 10 minutes, it's great that it keeps the screen on; but if I'm sleeping for hours, I would like the app to keep on running (playing sounds) and turn the screen off.

How can this be done?

# Answer
> 7 votes
Credit goes to Firelord for the basic method. Here is a time-delay shell script that turns off the backlight for my device, and apparently others' as well.

Create a file named "lcdoff" and copy the following into it:

```
#!/system/bin/sh
if [ -z "$1" ]; then
    echo "usage: `basename $0` delay"
    exit
fi
su -c 'echo getsu > /dev/null'
echo "Tap power button 2x quickly to restore"
sleep $1
su -c 'echo 0 > /sys/class/leds/lcd-backlight/brightness'

```

Make sure:

* The device is rooted.
* The script permissions are set to executable, e.g. by `chmod 755 lcdoff`.
* The script is located in `/system/bin` (scripts cannot be executed from `/storage`).

Then open a terminal app and enter `lcdoff 10`, to turn off the screen after a 10-second delay, `lcdoff 30` for a 30-second delay, etc. To ensure that the processor stays on, simply enable the Android developer option "Stay Awake". **Edit:** Stay Awake only works while plugged into a power source -- see this answer for an alternative.

If you don't want to type the command in a terminal, you can launch the script as a custom action in:

* Total Commander
* Tasker
* Xposed Additions
* your app of choice

# Answer
> 3 votes
I had some trouble with the accepted answer as I'm not hugely familiar with shell scripting on Android/Unix/Linux so I thought I'd add my experience here for anyone in a similar boat.

To get this working with Tasker or similar the line you need is:

```
echo 0 > /sys/class/leds/lcd-backlight/brightness

```

For tasker put this in the 'command' field with 'Use Root' enabled, works like a charm. To disable simply switch the zero out for a 1, ergo:

```
echo 1 > /sys/class/leds/lcd-backlight/brightness

```

or lock and unlock the device.

So to answer your question about quickly toggling this behavior. Assign each of the above commands to a tasker task, then you can make use of the new long-press intercept in the latest tasker version to toggle the screen on and off without putting the device to sleep. Alternatively you can assign the command to a profile which triggers when your conditions are met.

---
Tags: battery-life, screen, power-on, standby, sleep
---


title: Downgrade Android OS from Android Pie

text:
# Question
Title: Downgrade Android OS from Android Pie
One of our devices had the OS upgraded to Android Pie. How do I identify the time and date that the update occurred? Is there a way to downgrade the OS back to the Android version from which it was upgraded?

# Answer
> 0 votes
> How do I identify the time and date that the update occurred?

1. Open your device's Settings app.
2. Click on "Software Update"
3. You will see a "Last Update" entry at the bottom e.g. The last update was installed on xxxx x, xxxx at xx:xx PM.

> Is there a way to downgrade the OS back to the Android version from which it was upgraded?

The short answer is 'Yes.' The long answer: This is a very complex process that is typically not encouraged by vendors or manufacturers so you won't be getting support from them. You also run the risk of losing data, permanently losing use of your device (bricking), losing warranty, amongst other issues. I would respectfully suggest that this may be more than you should be taking on. You will find it very challenging and unless you find a site in your native language, you are apt to miss some small (or large) detail or nuance.

Having said that there is a very active community of users who do this sort of thing. You might want to hop over to XDA Developers Forum for Xiaomi devices and see what you dig up, but I would be very cautious about what you do and whose advice you take.

---
Tags: downgrade
---


# Question
Title: How to unlock screen with Bluetooth keyboard
I can wake up the screen of my Android device by hitting almost any key on my bluetooth keyboard. But all I see are my notifications, I can't actually unlock the screen. How do I get the thing to come up that lets me enter the numbers of my PIN to unlock my screen? Is there a setting somewhere that I a missing that would allow me to just start typing my PIN instead of ignoring what I type?

I'm running stock Android 8.1 on a Google phone.

# Answer
I had the same issue... two parts to my solution... \- set Smartlock to unlock phone when BT keyboard connects \- then any key wakes to Notifications screen... then 'space-tab' key combination opens the phone to current android screen... found by trial and error!
> 4 votes

---
Tags: 8.1-oreo
---


# Question
Title: How to force Google Photos to sync photos to the cloud?
I just took a picture with my phone and a few seconds later I refreshed Google Photos on my computer and the picture was there. But then I took a second picture and five minutes of refreshing later the picture is still not there! This has basically ruined what I was trying to do, as I was relying on being able to quickly download pictures between shots.

I was on WiFi the whole time. There was less than one minute between the first and second picture. I don't see any indications that anything is uploading or that anything failed. I have looked in both the Google Photos app and the web site looking for anything to force a sync and haven't found anything except for "Back up all" which did nothing.

How can I force my phone to sync to the cloud immediately? In the Photos app the new image already appears, but on my PC only the first picture I took showed up.

# Answer
> 8 votes
Here is what I have found to work most reliably on my phone, which is a stock (not rooted) Samsung Galaxy Note 8 (Android version 9). I found this out via other posts on stack exchange, but I forget where.

After I take a series of photos on my phone using its camera app, I switch over to the Google photos app, and inside that app I select one or more of the photos and create a shared album. That is not enough to sync to the cloud however. To force the phone to sync and upload all the files to cloud, you have to actually share it, or just click on the create link icon. In order for that to work, it forces the phone to have to upload all of the selected photos into Google photos. This works out just fine for me, because I usually want to get a share link to the items that I am taking a record of, anyway

# Answer
> 6 votes
In Google Photos app select Assistant and then you can choose (or view the current backup status/progress) to force backup photos. Be sure to set the different image maps to cloud: the folder will then contain a blue cloud icon with an arrow in it.

# Answer
> 2 votes
In Android 6 / Marshmallow, go to Settings -\> Personal -\> Google -\> Google Photos Backup, and click Backup all, this started the backup straight away for me. There are lots of other options on that screen that may help, I found that somehow the Backup option at the top of the screen had been set to off.

# Answer
> 1 votes
I fix this problem by restarting the phone and starting the Google Photos app after restart whenever I miss a photo just taken. This way synchronization always starts for me after starting the Google Photos app.

# Answer
> 1 votes
Go to the settings in Google Photos. There is an option to back up photos only while the phone is being charged. Disable this and the photos should backup immediately.

# Answer
> 1 votes
Restarting the phone is the simplest solution to this occasional problem.

# Answer
> 0 votes
If using Chromebook and the photos are in an album. Select ALBUM, then click the download cloud icon (upper right). I had used this procedure in Shared Albums, but only a few pictures entered the library. When I used the above procedure, they all jumped in.

# Answer
> -1 votes
In Photos, select the photos and choose "Backup now" from the menu.

---
Tags: sync, google-photos
---


# Question
Title: how to replace android system.apk with one custom made version of it
I have created a copy of one of the main system apps(android system.apk) in which i have replaced some files to improve graphical view of my phone. is there any way to replace the two files or any other way to make changes directly to the application installed? any advise will be appreciated.

# Answer
> 0 votes
You can copy the new apk file directly on the folder where the old apk is located. I advise to copy it via recovery. If both apks have the same name, just replace the old one. If not, rename the new apk to have the same name as the old then replace it.

When you finish will need to clear the cache to avoid mixing up the old data with the new.

**Important:** Before processing with the copy/change operation, Do a **backup** of the old folder. It will be helpful to restore the old apk if things go wrong.

---
Tags: system-apps
---


# Question
Title: How to change the name of Firefox desktop shortcut icon to website?
I long press the icon but only delete action exists there of the icon. I press it but it goes to Firefox. I create another one but it does not allow me to rename the icon.

OS: Oreo 8.0
Phone: Oneplus 3T

# Answer
> 0 votes
*A bochur*'s differential solution

> I haven't used Firefox, but in chrome when you add to homescreen then it gives you the option to rename it. After you save it, there is no option to change the name. So i suggest you save it again with the new name

# Answer
> 0 votes
Ditto on above answer, for me Chrome offers the option but my other browser (Samsung) does not. Other sites say Android OS itself does not offer renaming of icons, so renaming icons must be done by an app.

---
Tags: home-screen-shortcuts, firefox-for-android, app-icons, 8.0-oreo, usability
---


# Question
Title: Is there a way to enter recovery mode without using home and volume keys?
I have a **Samsung** device and i need to use the **Android recovery mode** for some reason.As for **Samsung**, i have to use the **volume-down** and **home key** to enter **recovery mode**

But the problem is, my **home key** is broken and as a result, I can't use the normal way to enter **recovery mode**.

I can use **ADB** to do that with my **PC** but i can't do that every time when i need.

**So, is there a way to do that without using the home key?**

> Note: My phone is **not rooted** and i know that i can change the **recovery mode entering configuration** easily if i **root** my phone but i don't want to **root** my phone.

# Answer
> -1 votes
If your device boots fully, `adb reboot recovery` should take you there. However, if your device is rooted, then you can use Quick Reboot in the Play Store will get the job done.

UPDATE: Due to a change in the question, the answer would be that this is not possible without root access or being able to use the buttons on the phone.

# Answer
> -1 votes

---
Tags: rooting, samsung, recovery-mode, home-button, volume-buttons
---


# Question
Title: I cannot open or play songs with anything but Files (default file explorer on Android One)
I have a new Nokia 3.1. After putting in and formatting an SD card, I copied a tonne of music to it (in `/Music` in the root folder). These are m4a and mp3 files. It seems only default apps can see and play music - although not very effectively since I don't want to pay or use the internet to *listen to my own collection*.

Every music player app I get (Musicolet, Pulsar, etc.) will not find the music automatically; will not find it when forced to rescan; will not play it when it is sent to the app via Files.

'Files' and 'Google Play' will see and play the files. Musicolet (the only one out of 10 different apps) will *scan the files*, pick up that they're all there - and then not update the music library or show anything.

I've tried clearing temporary storage, uninstalling/reinstalling music player apps, restarting the phone - the same story.

What is going on?

# Answer
> 0 votes
Android uses a media database ("Android MediaStore Database") which is used by most apps. If the file has not been indexed by the database or is unknown to the database it doesn't exists for the apps.

If you have copied a "tonne of music" this database may be a bit overloaded by indexing all the uploaded music files (or may be even crashed).

Therefore I would first wait a while and then re-check if the media files are now visible in the player apps. If after some hours the files are still not visible, reboot the device. This usually triggers a re-scan of the media files.

Furthermore the actions I presented at the end of this answer also can be applied in your case.

---
Tags: applications, external-sd, music-player, media-files
---


# Question
Title: How to turn off ultra power saving mode that was enabled for Huawei Android while it was on low power?
My Huawei Android was on low power and it proposed to turn on ultra power saving mode. I accepted it. Now I have connected the phone to the charger but I can not enable other power modes. I am going to `"Settings - Device - Power Saving"` and there 3 modes are presented to me: 1) Ultra; 2) Smart; 3) Normal. The Ultra mode is enabled and I can not enable the other modes. When I try to enable other modes, the message appears and nothing happens:

```
This function can not be used in ultra power saving mode

```

So - is there way back to the normal power saving mode? I tried to Google this and some suggest to reset the phone to the factory settings. It is something incredible. There should be simple way out of this!? Why the ultra power saving mode is so protected?

# Answer
Simple restart of the phone automatically brought me back to the normal power saving mode. It was that simple. That is why, possibly, no further explanation is given on the net about turn of the ultra power saving mode.
> 0 votes

---
Tags: battery, huawei, power-options
---


# Question
Title: What is Firebase App Indexing Under Google Services Settings
Where do all these data go?

Is this a privacy issue?

Here it is. It's very intrusive !

# Answer
> 0 votes
Firebase allows developers to mobile and web apps that provide a database, analytics, cloud messaging, authentication and more without the need of sever side functionality. It belongs to Google.

From Connect to Firebase:

> Firebase is a mobile platform that helps you quickly develop high-quality apps, grow your user base, and earn more money. Firebase is made up of complementary features that you can mix-and-match to fit your needs, with Google Analytics for Firebase at the core.

The indexing is the database collecting apps' information that will later be analyzed (apps that installed on the device that use Firebase API): user interactions with the app, what they click, see, etc.

> Where do all these data go ?

They are stored on Google cloud stores.

> Is this a privacy issue ?

Yes, it can be a privacy issue when the apps using the Firebase API collect too much information that are not related to the app's main purpose. Don't give too much permissions to apps. If necessary, write to the developers to ask why they need certain permissions for their app(s) (if they did not list or elaborate on their Google Play Store page).

Firebase documentations are found here.

---
Tags: privacy
---


# Question
Title: Stream Live Video from Android to RTMP Server
I'm working on an Android RAT (Remote Administration Tool) project as a course project. I want to add live video stream feature to the RAT. I've searched for different ways and find out three different ways:

1. Captures video from service, then upload the video
2. Streams video from camera in a local web server inside Android application (such as https://github.com/darshanrn/SpyCam)
3. Ant Media which is exactly the suitable solution which encodes the video and transfer as a live stream (https://github.com/ant-media/LiveVideoBroadcaster)

But the problem is that Ant Broadcaster needs an activity to preview the camera, however as it is described HERE (https://github.com/sprimgupta/Secret-Video-Recorder) it is possible to record video from a service without previewing.

I wonder how to make video stream inside service using Ant Broadcaster?

Ant Media connects a service to an activity and then broadcast the video: https://github.com/ant-media/LiveVideoBroadcaster/blob/master/liveVideoBroadcasterSDK/src/main/java/io/antmedia/android/broadcaster/LiveVideoBroadcaster.java

# Answer
> 0 votes
Finally I could create a live hidden camera library which takes a context and start streaming. The library code and release information is at:

https://github.com/mirsamantajbakhsh/LiveHiddenCamera

Here is a demonstration:

---
Tags: camera, streaming, video-recording, video-streaming, hidden
---


# Question
Title: Root Huawei Honor 9 Lite without screen access
Is there a way to root the device without access to the screen itself (which is broken). All methods I've seen require access of device to allow rooting etc. I need some hack into the device, whilst connected to Mac or pc - need some pointers to info about that etc.

thanks in advance (finally got time to figure this out after a year of it being on a shelf) Charlie

# Answer
> 0 votes
In short - No, there isn't

Assuming you have previously unlocked bootloader (with unlock code from Huawei, which they don't provide anymore), there is still the encryption problem.

But your bootloader is locked, that means there is no hack into data partition.

In case you get TWRP booting from fastboot (which you don't), you could root /system and enable USB-debugging from TWRP, then remote control the device with scrcpy

---
Tags: root-access, huawei
---


# Question
Title: Is it possible to direct all audio output, including music output, to a Bluetooth headset?
I am able to make and receive calls from my Samsung ACE S5830 phone using a Bluetooth device. However, when I play MP3 songs on my phone, the output does not play through the Bluetooth mono headset; it just directly plays from the phone's speakers.

Is there a way to direct all audio output to the Bluetooth mono headset?

# Answer
I did some googling and stumbled across this post on androidforums.com which has some suggestions:

1. There are several apps which appear to provide this functionality. BTmono is the only free one I found that isn't limited to a certain length of time. It requires Android 2.2+. There are several other similar apps that you can also see at that link.
2. This person posted a trick which looks like it works without the use of an additional app:

> 1. I went to the phone and dialed '\**' (2 stars) which creates a 'p' for pause. Then press call. This enables the headset without actually placing a call.
> 2. After this I started doggcatcher (or other audio / video player) and it played through the headset. Everything went through the headset after this point.
> 3. In order to stop playback to my headset I just called my voicemail and hung up. At that point, audio was routed back to the speaker.
>
> EDIT: I have found that it only works when my ringer volume is off or on vibrate. Also, the media volume needs to be turned up separately -- Either from the settings control or prior to performing the 'p' call. The volume rocker only controls the Bluetooth call volume after the bluetooth headset is active.
> 16 votes

# Answer
Generally, audio apps use the media channel, which will be played over Bluetooth if your Bluetooth device supports that A2DP profile.

Check the specs on your headset to see if it supports A2DP -- if it does, please edit your question to include additional information on the music app you use and the make and model of your headset.
> 8 votes

# Answer
If

1. You want to hear music on your bluetooth device
2. Your bluetooth device pairs perfectly with your android phone.
3. It works only with calls, media still plays on your device speakers.

BTMono is a great tool that suits your requirement. It will allow you to simply turn ON media streaming and you are good to go.

Remember that it is free and you need to restart the app after every phone call. This feature can be unlocked in the pro version which is just $1 :D
> 4 votes

# Answer
Try Mono Bluetooth Router. Its free version has more feautures than BTMono.
> 3 votes

# Answer
You can also try my application to direct non-call audio to BT. Here's is my github link: https://github.com/sauravpradhan/AnySound2BT
> 1 votes

# Answer
Just wanted to throw it out there for anyone wanting to know that BTmono worked like a charm for my HTC Desire S with android 2.3.3 and my Plantronics Explorer 210! Extremely easy interface for BTmono too.
> 0 votes

# Answer
I used BTmono so I could use a Komodo (aka KMD) Bluetooth ear piece, as headphones. Worked perfectly.

The volume buttons controlled the ear piece, and if I hit one of the volume buttons, the phone says "Bluetooth In-Call Volume (volume bar)". So... I say try that one out...
> 0 votes

# Answer
lol i remember i have an old moto rizr z3 using stereo headphones, but, by default when you listen to music, it uses mono sound for some reason. There is an option in the options menu to switch to stereo but sorry this is not android and i only have stereo headphones
> 0 votes

---
Tags: bluetooth, music, bluetooth-audio, headset, bluetooth-hsp
---


# Question
Title: app or widget or other solution for turning just cellular radio off/on
I recently acquired an umidigi one with android 8.1 oreo naked/stock image in place and voice over wifi as well as voice over lte support.

When device is in location with wifi connection, which is most of the time, i want quick way to disable cellular radio to force a voice \[ and text \] over wifi connection to be established and to conserve battery power that would be otherwise expended on the cellular radio at these times.

Currently i am accomplishing this by selecting airplane mode and then re-enabling wifi to leave me with just cellular radio turned off thus forcing the voice \[ and text \] over wifi connection to be setup. Its a cumbersome two step process and a three step process if i also want bluetooth radio enabled at these times.

Its unfortunate that the drop down menu "mobile option" doesn't turn off cellular radio voice as well as data services instead of just mobile data services.

Also would be nice to have a configuration option that would tell phone to establish voice \[ and text \] over wifi if wifi connection is present and only resort to voice over lte or 3g/2g gsm connection in the event that wifi is not present as opposed to now where it does the reverse and only uses voice \[ and text \] over wifi when cellular options are not available.

# Answer
Well you can always use Tasker.

More information on how to use tasker at: https://tasker.joaoapps.com/userguide/en/index.html
> 1 votes

---
Tags: mobile-network, cellular-radio
---


title: Adb pull - access denied

text:
# Question
Title: Adb pull - access denied
I want copy all files(including system files), but when I enter adb pull /

i get this:

I tried entering adb root but that does nothing.

Is there any fix to this? Else any other way to copy all files(including files like /data) to my pc?

PS:I have rooted my phone(OnePlus 6t) and have twrp and magisk.

Thanks

# Answer
To (re-)enable `adb root` you have to modify your `prop.default` file. This file was traditionally named `default.prop` and stored inside the ramdisk of `boot.img` \- however, for system-as-root devices it is inside `/vendor`.

change the line `ro.build.type=eng` into:

```
ro.build.type=userdebug

```

from the Magisk Troubleshoot Wiki:

> **ADB cannot run as root in production builds**
>
> If you're having issues running the ADB root command after installing Magisk this is because of MagiskHide setting a few prop values to known "safe" values. You can get ADB root working again by turning of MagiskHide and rebooting, but if you need MagiskHide for some app or service this could quickly become annoying.
>
> A more convenient solution is to reset `ro.build.type` and `ro.debuggable` to their original values (`userdebug` and `1` respectively). This can be done by using the Magisk resetprop tool (see the Magisk Documentation for details), either by running it directly in a terminal emulator, in a late\_start service boot script, or by using the MagiskHide Props Config Magisk module's "Edit MagiskHide props" function.
> 2 votes

---
Tags: adb
---


# Question
Title: 2019: Can Google Assistant send a message from lock screen?
I'm looking for a way to allow Google Assistant's speech-to-text to send a message while phone is locked, preferably only to certain contacts and without being able to read past messages.

I've googled and all solutions seem no longer valid.

# Answer
Yes you can, by using smartlock.

It should be located under security and lock screen.

Click on smart lock then voice match and turn on: Access with voice match And lock screen personal results.

However this may let you read earlier messages and will not restrain it to only selected contacts
> 1 votes

---
Tags: sms, lock-screens, 9.0-pie, hands-free
---


# Question
Title: Accidentally deleted Google Play Services, now no Google supported app works
I accidentally deleted Google Play Services after rooting my phone . Now I'm not able to open any Google supported apps , can't open my Gmail. It says:

> Google play service which some of your applications rely on, is not supported by your device. Please contact your manufacturer for assistance.

I downloaded Google Play Services from XDA also but it's not working.

Can anybody tell me how can I can correct this problem? I'm using Lenovo A3000 tablet.

# Answer
First, you can install Google Play Services APK, which you can find in the xda-forums. This should normally work.

If nothing else works, you can do a Factory Reset. Unfortunatly, this will delete your Data on the Phone, so i recommend making a Backup.

**EDIT:**

Go to https://play.google.com/store/apps/details?id=com.google.android.gms with your PC, log in, click install, and choose your phone.
> 0 votes

# Answer
There is absolutely nothing to worry about this issue. All you need to do is the following:

1. Find and Download Google Play Services APK (Pure APK File)
2. Copy the file in your mobile phone memory
3. Click on the APK file that you copied to your smart phone

After some time it will install Google Play Services on your mobile phone.
> 0 votes

---
Tags: google-play-services, lenovo-a3000
---


# Question
Title: Remote control of Android from PC or another Android device
Is there a way s.t.:

* Whenever SMS with specific keywords are received, that those are then forwarded through SMS to another mobile ?
* Or, whenever SMS with specific keywords are received, that those are then forwarded through one's configured gmail account, to another gmail account ?
* Whenever the battery of the phone falls below a certain threshold, SMS or email is sent to another mobile ?
* One could change settings (such as enable/disable mobile-data or location) for an Android device, remotely by sending it an SMS with certain pattern ?

Of course, when this service is being setup on the target device the device owner explicitly authorizes such change.

The usecase is where the target mobile device (Android phone) is operated by someone who is in the 2nd stage of Alzheimer's disease, stays in another part of the country. The above facility if possible would help providing some remote assistance to the person, and help sort out any issues they may have with banks and other establishments.

# Answer
> 2 votes
Yes this did used to be possible, it is still possible but it requires more on the target device these days.

On below Android 5.0 , it was easy to do what you're saying, however it started to become apparent very quickly that the majority of people did not use this for its intended purpose...

For example, you could previously check on elderly people's movement's around the house to help ensure they're safe... however people would use these features on their partner's to "see" if they're Cheating for example..

It was seen as a serious violation of peoples privacy, and therefore certain measures have been implemented since above Android 4.4.

The new measures are, • 1 single SMS application is aloud to recognise OutGoing SMS, Incoming SMS is not restricted because of SMS Verification or ( 2FA ) ..

• Real Time Permission Acceptance

• OnBoot restrictions on some devices

You did used to have Full Control over Android 4.4+ .. You could even have the application hidden with another name and icon, and Only launchable by dialing a phone number.

. Yes you can still bypass everything, but it is very annoying to do.. . You would need a permission acceptance screen to accept All permissions on the first start... An OnBoot listener to start the service On Boot... and also you would need to be running as a Device Administrator to Toggle things like Airplane Mode..

The wide selections make the application very obvious to the user, so as long as you are the user on both device's, you should not have any problems.

Using applications like • SMS Forwarder • SMS Controller • Tasker and others..

I have attempted building this myself, however it has very limited control.

You can also use this Pre-Built SMS Control App..

It is released under MIT License, so you could modify it to do what you want.

SMS Control - F-droid.org

---
Tags: sms, automation, remote-control, remote-access
---


title: Encryption unsuccessful

text:
# Question
Title: Encryption unsuccessful
I am a senior citizen with very limited tech knowledge. I woke up this AM with the encryption unsuccessful error notice on my Android. I have been searching all these sites for help and cannot understand the "lingo". (bootloop, twrp, etc.) Can someone tell me EXACTLY what to do? Should I just push the "reset phone" button? What will happen then? Will I really lose everything? By "losing everything" what does that mean? Can I still make phone calls, see my pictures, play games?

# Answer
> 1 votes
This is caused by an attempt to Encrypt the Data partition failing.

Usually it fails from corrupt storage, and also from power loss.. did you unplug it while the encryption was in progress ?

The Wipe Everything option refers to everything that is specifically stored on the devices internal storage and data partition.

The SIM Card contacts will not be removed, however the device's locally stored contacts will be deleted.

The Files, ( photo's, documents etc.. ) that are stored on the External SD Card, will also Not be wiped, however any photo's taken and stored to the infernal storage will be wiped in the process.

No you will NOT lose access to features like calling, it will only remove the personal files you have created.

It should say "Factory Reset" to clarify what happens, but the warning is very basic and designed just to show you a problem occurred while encrypting.

---
Tags: applications
---


# Question
Title: Android Marshmallow keeps moving apps to internal storage after update
I have a 32Gb SD card as adopted storage in my phone with Android M. It should be considered as the default installation storage for apps, as I have migrated the data to it.

However, I still experience the annoying situation of having to manually move apps back to SD card every time they update (as in Lollipop). Actually it's even worse because the migration systematically fails at the first try saying "Couldn't move app. Internal error". The second try always works. I guess data from the new version clashes with data already in SD card from previous version, and it's deleted when error message pops up, so at second try there's no conflict.

How can I fix this? I'd like to get apps updated directly to SD card, which is how supposedly adopted storage should be working.

# Answer
> 1 votes
From Google:

> Apps can be placed on adopted storage media only when the developer has indicated support through the android:installLocation attribute.

The problem is that some apps that deny this support can be forcibly moved anyways, which it sounds like you're doing when you ignore that error and try the process again. From reddit:

> I have seen screenshots (see this post by Austin Pinto on eyes-free google group, where that device running Marshmallow IS allowing moving all apps (though still excluding system and built-in apps). That is, it is violating the developer's preference for where the app should be installed.

So when the app updates, the Play Store is simply following exactly where the app tells it to be installed.

So, your options are:

* Stop moving those apps
* Ask the developers to add support for this feature
* Stop updating those apps

# Answer
> 0 votes
I am using a Motorola G⁶ and before this all started happening, it was working PERFECTLY fine up until I got several error messages saying that certain applications stopped working. Then, I had to uninstall and reinstall all those applications. Then, some of my Microsoft applications started acting up as well, and those happen to be the ones I can move. They were in the Secure Digital card before, but after awhile, they were gone because of that error. Please let me know when someone has a solution to this.

---
Tags: google-play-store, 6.0-marshmallow, app2sd, adoptable-storage
---


# Question
Title: Battery was once swollen, but is now normal
My tablet (specs below) has a swollen battery, but is now normal (back to its normal size).

It was swollen many years ago, so I just left it. Now, I just found it and it is now unenlarged.

I don't find anything about it in the internet upon searching about it. The device also doesn't have a removable battery.

I am worried that if I charge it, it will explode.

Is it safe to charge and use now?

> Device: Samsung Galaxy Tab 3 10.1 GT-P5210
>
> Android: 4.4 Kitkat

# Answer
> -1 votes
> Technically, this is just an update of what happened to my device, but this can also be the answer to my question: *"Is it safe to charge and use now?"*

---

We took the device to a repair store. They tried to charge the battery, but the battery won't charge. Also, the battery didn't explode when it is charging.

They opened the back of it, and they saw that the battery is still a little bit swollen.

They said that the cause of this is leaving the device for a long period of time, just like what I said in my question:

> *It was swollen many years ago, so I just left it. Now, I just found it and it is now unenlarged.*

They also said that we should replace the battery to use it.

---

So, to answer my question:

**1. Is it safe to charge?**

* Probably yes? They charged it, but nothing happened. I just don't know if it will explode if I charge it for a longer period of time.

**2. Is it safe to use now?**

* Well, this doesn't make any sense as the device doesn't have power for it to run. But, if I already replaced the battery, then yes, it is safe to use.

---
Tags: battery
---


# Question
Title: How to disable the google app in android 8.1.0?
I have been looking for the option using the google app itself, but when selecting the settings button inside, it does nothing, only stays in the same screen without the options in the second and third panel. So I dont know how to delete the bar on the main screen.

**UPDATE**
Besides the method that changes the launcher (that I havent tested yet), all the methods suggesting to disable google app or google search does not work because it does not uninstall or force the stop of the google app/google search inside the installed apps. So the idea its changed to how to disable google app in oreo 8.1.0.

# Answer
Click and hold on the bar and drag it toward the the trashbin or remove text.

If that does not work then check out this article https://www.androidpit.com/how-to-remove-the-google-search-bar-from-your-android-homescreen
> 1 votes

---
Tags: applications, google, 8.0-oreo, 8.1-oreo
---


# Question
Title: Android Q Desktop Mode - control secondary display
I tried new **Desktop Mode** on Android Q Beta 3. The problem is that I'm not able to move mouse pointer to second display, so I don't have any way to use Desktop Mode.

`Google Pixel XL`, display is `ASUS ZenScreen MB16AC`, connected throught HUB via DisplayLink presenter (with USB-A)

*Question:* **How to move mouse pointer to secondary display?**

# Answer
> 0 votes
You should keep in mind that Android Q with it's Desktop Mode is still very much in beta and not a finished product at all.

There's still lots of bugs and problems with it.

The best you can do is wait for the official release later this year.

---
Tags: external-display, mouse, android-beta-program, android-10
---


# Question
Title: Edit Word documents in Google Drive on Android
Whenever I search for a Word document in Google Drive on the Android app I can view it in Google Docs. I can also open it with Word, but then it tells me that this is a read-only version and I cannot edit it.

Is there a way around this? It works on OneDrive, but I really can't find a way to edit my Word documents in Google Drive. Using other apps is Ok for me, but I am not rooted.

# Answer
> 1 votes
> **Edit files using Office Compatibility Mode (OCM)**
>
> To open and edit Office files, you can use Office Compatibility Mode (OCM). With OCM, you can open and edit Office files in Drive, the Docs, Sheets, and Slides homescreens & apps, and Gmail.
>
> On your mobile device, OCM is automatically included with the Docs, Sheets, and Slides apps.
>
> When you open an Office file in one of the apps, you'll be able to edit it.

Source: https://support.google.com/docs/answer/6055139

**A bit of extra info:** Opening a Word document on Android just so you can read it is incredibly simple. Since Android natively supports opening .doc and .docx files, all you have to do is click on the file to open your Word document.

1. Find the file you want to open.
2. Tap to open the file – if prompted, open it in Google Drive or Google Docs if you have them installed already.
3. You’re now able to read the document.
4. To edit it, tap the small pencil icon in the bottom right – now you’ll be editing the file.
5. If you’d rather not use Google Drive or Google Docs, download Microsoft Office Word for Android and use that instead.

# Answer
> 1 votes
Google has provided an extremely useful apps that are compatible with Google Drive:

1. Google Docs for Management of Word Documents
2. Google Sheets for Excel file management
3. Google Slides for Powerpoint

Editing a document that is present on Google Drive is very easy with these apps. You can do the following to solve this problem:

1. Install Google Docs
2. Go to Google Drive
3. Open the required document using Google Docs

---
Tags: google-drive
---


title: How to find unused applications

text:
# Question
Title: How to find unused applications
I want to uninstall unused applications.

BTW : I don't have goople playstore installed nor use a google account, I use yalp or aurora stores to install applications.

How can I find the unused applications that are installed on my smartphone ?

# Answer
Android since 5.0/6.0 contains an integrated app usage statistics system. It tracks which app is used when and how long.

The data collected by this system can be accessed by every app with the correct permissions - therefore you can find a lot of apps that are able to display the app usage of your device.

Based on this information you can easily find out which app(s) you have not used for a certain period of time.
> 2 votes

---
Tags: applications
---


# Question
Title: Should I be worried about a security breach if Google Maps incorrectly shows that I drove over 650 miles from home?
I was shocked to discover that this past month Google Maps shows that I was home one day, drove from a neighboring location over 650 miles to Chicago the next day, and was home the following day.

**Could this indicate that someone cloned my phone?**

I know that inaccuracies can occur locally, but 650 miles? And Google Maps even shows the route that I allegedly took.

*I searched for similar questions. Either they did not address this particular question or they were tagged as having already having been answered. If someone thinks that this question has already been answered, then please have the courtesy of providing a link in the comments.*

# Answer
> 1 votes
In my case, the solution was to turn off location services on my Android tablet. Google Maps was using my ISP to guess my location.

Although I was in Alabama, my ISP was reporting my location as Chicago, so Google Maps assumed that since I was in Alabama one day (according to my cell) and in Chicago the next (according to my Android tablet), then I must have driven to Chicago (even though my cell was still in Alabama). Then it produced a likely route that I would have taken. Note that I seldom use my Android tablet and that the Chicago thing occurred when I first turned it on after changing ISPs.

This is the best explanation I can come up with.

So if your location service comes from your ISP rather than your cell provider, make sure that your ISP gives an accurate location for you.

---
Tags: google-maps
---


title: How to use Android Auto in Poland?

text:
# Question
Title: How to use Android Auto in Poland?
Has anyone managed to successfully use Android Auto with any car based in Poland?

My Motorola Moto Z2 Play fails completely when I am trying to connect it to my Toyota Aygo 2018+ (tried many good quality USB cables): Android Auto shutdowns itself automatically after about 0.5 second and car's display shows "Unrecognized device".

After reading some stuff in the Internet and contacting Motorola and Toyota support it turned out the entire thing doesn't work, because I don't have Android Auto application installed on my phone and I don't have it installed, because it is not available in Poland.

Yet, I've heard and read some stories about people here, in Poland, able to use Android Auto without any problems. Does anyone have any idea, how this was accomplished?

The only idea that comes to my mind is that these people somehow managed to force-install Android Auto on their phones, somehow omitting Google Play store limitations (i.e. unavailability of this application in Poland).

# Answer
> 2 votes
You can download the apk from apkmirror.com and then manually install it.

---
Tags: android-auto, motorola-moto-z2-play
---


# Question
Title: Keep android phone off until I press combination of volume + power
I'm using Asus Zenfone Max Pro M2 running on android pie.

My problem is there's kid at my home and he play with phone though it is protected with pattern he start all options from navigation bar or power off phone.

> First I want to block notification bar completely I won't it scrollable.
>
> Second I want kid prevent from turning phone switch off.

So how can I make my phone won't wake up or screen on until I do something special?

# Answer
Your best and only bet is to root the phone. There may be an xposed package that will be able to give you the functionality you want. Look into the Magisk platform. I wasn't able to find a package for it but that does not mean it doesn't exist.

As far as on startup or shut down, what you described is impossible. That's controlled by the phone bootloader and cannot be changed. Attempting to do so can destroy the phone permanently.

Note that any of these procedures **will** void your warranty.
> -1 votes

---
Tags: stock-android
---


# Question
Title: How can I open and edit large text documents on my Android device?
I have a Galaxy Tab 10.1, rooted, running Android 5.1, that I'd like to use for editing simple text files. By "text file", I mean they are plain text documents, with a `.txt` extension. I do not need to edit `.doc`, `.pdf`, `odt`, or any other format.

I have seen this answer, and I have also tried a couple different apps, such as Jota, Turbo Editor, and others. They work fine for very small documents, but I have one text document that is about 300kB, and they all slow down and crash when I try to edit this file. Other files I have that are not quite as large seem to slow down just about any text editor, so it seems pretty clear there is a correlation between how big a document is and whether or not an Android text editor can handle it.

I'm confused as to why this is such a hard thing to do. I have games that I play on my various devices that seem to reference much larger resources and require more processing and RAM, so why should a simple text document under a megabyte be hard to work with?

In any case, is there a way I can edit a plain text document up to 500kB in size on my tablet device?

# Answer
> 1 votes
I'd suggest using ES file Explorer. I has a editor built-in that works pretty well for txt files. I have also tested with a file that's more than 900kb and worked fine.

Hope it helps!

# Answer
> 1 votes
I've been using QuickEdit and it works well. I just tested it by feeding a 1.5MB file (logcat output; 15995 lines) on a two year old device having a ridiculously slow external SD card. It took 1-10 seconds to load that file (this app loads the file completely) but after that things were smooth. You can edit wherever you want and saving took a second only.

The answer by dlh80 is also a good alternative. ES Note editor is a swift text viewer with bare bone editing feature. It is swift because it loads the file's content on-the-fly i.e. as soon as you scroll down to bottom the next page would load into the memory. It also means that if you decide to edit the file then you can only edit the file up to the point where you've scrolled.

If you've a word processor or a full-fledged office file reader app then you can give it a try as well. E.g. WPS Office opened that file quite easily but was sluggish in editing it. That may be the result of device's present condition.

# Answer
> 1 votes
I have tried many android text editor applications for opening and editing "relatively" large files (100 - 500kB), e.g:
\- Jota
\- QuickEdit(Lots of ads)
\- Simple Text Editor
\- Coastline
\- 920 Text Editor
\- Ted
\- TextWarrior

From my research and testing TextWarrior Has been able to open/read and edit large text files faster than any of the other ones, with Simple Text Editor and Coastline following right behind.

Others are more full-featured (Jota and 920) but they are quite slow. Ted is simply not meant for large text files, and QuickEdit is hard to work with given the large number of ads.

A couple of tips:
\- Use the lightest virtual keyboard (e.g. swipe slows down the editor) to increase editing speed.
\- Disable heavy-processing helpful features features to increase speed.

One little Cons (potential for improvement) about TextWarrior:
\- It seems the scroll bar can not be dragged which makes it a bit difficult when navigating large text files, but navigating via line numbers seems to get the job done.

Hope this helps.

# Answer
> 0 votes
DroidVim immediately opened and edited a 30 MB file smoothly. I also think Termux will have options like nano.

Vim is an excellent editor for any system, imho. Just read a cheat sheet before running it. "i" for insert, "esc" gives command mode and ":wq" saves and exits etc. Most people here know that.

Google Play Store also had an editor with a dark ("hacker style") interface that read any file blockwise. It had a large image to pull in the slidebar. Can not find it now, though.

---
Tags: applications
---


# Question
Title: Packet capture on Android x86, any ideas?
how can I run packet capture on my virtual machine (VMware-android 4.3)?

tried more and more to do, facing the same run-time error : "Unfortunately, packet capture has stopped".

just to note that my host machine internet connection is based on Mobile USB tethering by PdaNet application.

# Answer
> 0 votes
The most reputable software I am aware of would be WireShark. The software is open-source and they have detailed documentation on their wiki and docs page, as well as free online tools. For the full list of downloads available -- including 3rd party builds -- go to this download page instead of the default one.

---
Tags: android-x86
---


title: Device does not boot

text:
# Question
Title: Device does not boot
I have a OnePlus 6T i disabled my magisk hide and rebooted but it gets stuck in the animation of a red dot and two white dots revolving around it after sometime it boots in twrp.

i have uninstall.zip for magisk but the names on my sdcard are weird and when i try just putting the magisk uninstall via mtp among the crypted files using my pc it says "this device has either stopped working or been disconnected"

sideloading modules says magisk not installed

thanks

# Answer
You could also wipe data via TWRP.

This had happened to me as well, just select reboot in TWRP, then change current slot to `a` and then click system.
> 0 votes

---
Tags: root-access, twrp, magisk
---


# Question
Title: Plugging phone into laptop charges laptop instead of phone
When I plug my father's Xiaomi 5X into my MacBook Pro, it shows up as a charger on the MacBook and I don't get the usual USB options on the phone. Tried it on two Macs with same result. Also tried my Pixel 2 with the same cable and that worked as expected.

Is there some setting in either the phone or laptop that I can change to make it recognise the phone for what it is?

# Answer
> 7 votes
This is called PD charging. There should be a setting in connection dialog. Also there should be the same options in Developer Settings

---
Tags: usb, charging, macos
---


title: How to Disable Screen Rotation Icon

text:
# Question
Title: How to Disable Screen Rotation Icon
I lock my screen rotation to portrait, and I have my navigation bar hidden to provide more screen real estate.

With the navigation bar hidden, I have come to experience the rotation icon appear in the bottom right corner just above the virtual keyboard enter/submit key. As it would typically be displayed in the navigation bar, it has its separate icon when it is hidden.

This is a problem because even when the icon is invisible, it blocks the touch to the vk key, albeit a tiny sliver of the edge still able to be pressed.

Is there a way that I can retain the hidden navigation bar and disable the rotation icon?

Additional information: My phone is stock, not rooted.

**Edit**

As of software update G965FXXU2CSB3/G965FOXM2CSB3/G965FXXU2CSB3, this is no longer an issue. However, I would still like to know how to disable the icon from appearing.

# Answer
There is indeed a way to disable it by ADB.

* Setup ADB on your PC/Mac.
* Enable USB debugging on your android
* Connect your device to the PC/Mac
* Run following command in shell/terminal:

> adb shell settings put secure show\_rotation\_suggestions 0
> 6 votes

# Answer
Or you could do it the easy way.... I just figured it out with a lightbulb moment turning my flashlight brightness down
> 9 votes

# Answer
Unless Google or Samsung bring out an update to give you the option to disable it, the icon can't be disabled.
> -1 votes

---
Tags: 9.0-pie, samsung-galaxy-s-9
---


title: Where to get old LineageOS ROMs?

text:
# Question
Title: Where to get old LineageOS ROMs?
I have a few old devices which I want to put on LineageOS. This time it's about a **Samsung Galaxy S4 mini** (GT-I9195, serranoltexx). But the official LineageOS website shows them as not supported anymore.

You basically are required to build the ROM for yourself, but this is beyond my knowledge and commitment.

I already have flashed successfully exactly such a device with LineageOS in the past, but do not have the ZIP around anymore.

**Why does LineageOS not keep the latest versions of their ROM's around for download? Where to get a trustworthy copy?**

Note: The same happened with cyanogenmod earlier. The did not store older ROM's too.

Note2: These devices were still on sale on recycling shops recently.

# Answer
> 5 votes
To answer the question (getting old builds) directly - there are people who foresaw the need and stashed some of the builds elsewhere: , .

As for the reason to it, it's right in their FAQ. The main reason would be to save bandwidth/storage, since the project is a non-profit.

# Answer
> 2 votes
You can try XDA-Developers to download Lineage OS for your device. But the ROMs posted are not official versions and might not always work as smoothly as the official. The version posted on the link is Lineage OS 16.

---
Tags: custom-roms, lineageos
---


# Question
Title: How do I know my Samsung S8+ Model SM-G955FD is Exynos and Snapdragon?
I want to root my S8+. I found two type of TWRP recovery file Exynos and Snapdragon for my SM-G955FD.I wanted to know which one is suitable for my mobile?

# Answer
> 1 votes
The model number unambiguously determines the device's core configuration - if it says G955F(D) everywhere on the device (especially in Download Mode, which AFAIK can't be faked), then you can be sure that it's an Exynos variant.

Boot into Download Mode with the key combo VOL- + BIXBY + POWER, and you'll be greeted with a screen like below, where the model number will be shown after "PRODUCT NAME".

EDIT: For a more detailed breakdown of all S8+ models (full specs), check out this list from PhoneDB: Samsung Dream 2 ("Dream 2" is the development codename of S8+)

---
Tags: twrp
---


# Question
Title: Mobile internet doesn't work on browsers with VPN turned off, but it works in some apps, and works via Wi-Fi in all apps
I cannot use any browser with VPN turned off using mobile internet, but I can use other apps, such as BBC or Viber. I also can access the internet via Wi-Fi with VPN turned off. I have resetted APN settings many times, but it will not work. I cannot turned off proxy because there is no such an option. The proxy section is blank. When I fill in the blank with some random letters, and then blank it again, the internet begins to work, and after a few searches on the browser stops. Actually, when I change some other sections of APN the internet starts working, but then stops. Tell me please what is wrong. I am clueless about whether or not the problem is with the tablet or the mobile data provider. Because when I put a SIM card from a different provider into my tablet, it worked. And when I put my SIM card into another device, it also worked in that device. I called the company for help. They say that my APN settings was out of order. They sent me new ones. That also didn't solve the problem I have even resetted the tablet to factory settings. To my chagrin, it hasn't worked.

# Answer
> 0 votes
Navigate to settings\>system\>reset options click on "Reset Wi\_fi, mobile & bluetooth.

This will however reset your your phone network settings

I had experienced a similar situation and this was the only solution that worked for me.

Did this work for you?

---
Tags: internet
---


# Question
Title: Mi 9 (M1902F1G) running MIUI 10.2.15.0 issue with fitness trackers
I'm seeing issues with my new phone that it's not keeping the GPS enabled when fitness trackers are running.

E.g. a bike ride consists of a straight line between the start and end location.

I've tried Ghostracer and Strava and both seems to be having the same issues.

I've tried switching the "Battery Saver" setting for both apps to "No restrictions" (they were both previously on "Battery saver (recommended)"), but that makes no difference.

Anyone else with the same issue or ideally a fix?

# Answer
> 0 votes
Problem seems to be with the "Use Adaptive Battery" feature.

I'd guess it's not clever enough to differentiate between an app not being used very often, and an app being used after being recently installed.

---
Tags: gps, xiaomi, gps-tracking, miui-10
---


# Question
Title: Page up and page down in web pages and elsewhere
I can't figure out a usable way of scrolling page by page. I'm using Android 4.1 (stock Android from Google). I have root access if needed. I want this especially in the default browser, but a solution that works in all applications would be better.

I've found three ways to scroll down by one page.

* Set my finger down at the bottom of the page, drag it to the top in a vertical line, raise my finger. This is clumsy because it requires a long finger gesture.
* A flicking motion in the up direction. This is clumsy because it requires flicking by the exact amount, otherwise the text scrolls by more or less than one page. I just can't manage that much precision.
* A sufficiently forceful flicking motion, then set my finger down when the text has reached the point where I want it to be. This requires more finger strength than I would like and a lot of visual concentration; my finger-eye coordination is nowhere near enough to succeed with reasonably high probability.

Given how common the “page down” task is, there must be a better way that I'm missing. What is it?

# Answer
You can use LMT Launcher's PIE navigation feature to achieve your objective. LMT wouldn't replace your current home launcher which means you can rest assured that your home screen would stay untouched.

Let's come to business. Here is the XDA thread about LMT Launcher. It's a **freeware** app and needs to be sideloaded into the system (not available on Play Store). Make sure that Unknown Sources is enabled before you try installing its APK.

It can be activated along the edges of the screen (I prefer at bottom) like this:

(Click image to enlarge; Source: Droid Life)

This navigation is called PIE and each of the blue section is referred as a pie.

# How does it help?

You can configure a pie to execute a script. The script would be nothing more than:

```
su; input touchscreen swipe X1 Y1 X2 Y2

```

where the X1, Y1 and X2, Y2 coordinates can be obtained from my answer here (see step 1 or step 2 under **Instructions for Tasker and Xposed Additions** there).

You can also configure a pie to execute a KeyEvent. The keycode for **Page Up** and **Page Down** are 92 and 93 respectively. See more keycodes here.

# Usage Instructions

1. Launch LMT launcher and activate it.
2. Go to **Pie → Pie Item 1 → Script** and enter:

```
su; input touchscreen swipe X1 Y1 X2 Y2

```

Replace the coordinates with the one you produced as ideal to simulate **Scroll Down**.
3. Configure another pie in the manner noted above but interchange the coordinates to `X2 Y2 X1 Y1` to simulate **Scroll Up**.
4. In place of **Script** you may select **Key** option and enter the keycode you want to be executed.
5. Under **Settings** tab you can configure the settings of navigation system such as the place where you want the bar to show up, size of PIE's inner/outer radius, its color and so on.

(Click image to enlarge)

---

I tested my solution successfully on CM12. Here is a short ripped video (~6MB) showing the answer in action.
> 4 votes

# Answer
The old but good question. Answering it to myself, I came up with using MacroDroid alone for this. At least now volume up/down scrolls one page in Chrome. The method might be applied either to another program or to other options inside MacroDroid, for example buttons on screen:

* Trigger: Volume Up/Down, might reguire giving MacroDroid accessebility permissions.
* Action: Gesture \[300 ms, 500, 1850-\> 500,340\]. My device has 1980 pixel height, so this values should be adjusted to the device/application.
* Constraint: Chrome appliction in foreground. Other application often also might be used for this macro, but different screen layout might prevent from working correctly. For example, Quora has a toolbar at the bottom of the page, so I will probably need to create a separate macro for it.
> 3 votes

# Answer
Hacker's Keyboard has Page Up/Down keys which default browser and Chrome handles properly. You can even make it appear outside of input context with "Use permanent notification" option. That doesn't help much since having keyboard open all the time is a bit absurd, but proves the point that an app for having global Page Up/Down could exist.

PS. Dolphin browser also has an option for mapping Volume Up/Down to scroll by page and that's what I'm trying to use right now.
> 1 votes

# Answer
Nobody brought up a physical keyboard. So that.

If you have root access, Tasker can do down button presses even without auto-input. This is still relevant for Android 4.4.4. I could get this to send a page down button, but it has peculiar triggers, like headset volume or media buttons.

The Button Savior (Root) app is promising, but I don't have a rooted device. Did not go anywhere with this, because it seems to not send the keystrokes to the active app.

Firelord's Aug 25 solution is better.
> 1 votes

# Answer
It isn't available in the Stock Android Browser or not even in Chrome. But UC Browser provides this functinality of scrolling exactly one page at a time. You can use the "Scroll Buttons" or "Tap to scroll" or the "Volume keys" feature by installing UC Browser for Android. In the UC browser Settings page you can do configure the scroll style and it resembles the same `Page Up` & `Page Down` key actions like we do in our desktop keyboards.

**Scroll Buttons:** A virtual Page Up and Page Down arrow buttons are added at the right hand side of a webpage.

**Tap to scroll:** You can either tap at the top half of the screen or th bottom half of the screen to exactly scroll one screen page at a time.

**Volume Keys:** You can also use your volume rocker keys to scroll the screen page one by one. Pressing the Volume down scrolls the page once downwards and pressing Volume up scroll the page once upwards.

For enabling this feature,

* Install UC browser - Surf it Fast from the Play Store
* Goto Settings \> Browsing Settings \> Scroll Options
* Either set it to "Scroll Buttons" or "Tap to scroll" or "Volume buttons" \> Press Ok
* Now open any scrollable webpage and do the desired action based on your scroll settings. For example:
    1. If you've enabled "Tap to Scroll", then click at the bottom half of the screen to scroll down by one screen page(similar to Page Down key).
    2. Similiarly you can scroll to the top by tapping once at the top half of the screen on any scrollable webpage.

Screenshot - UCBrowser Scroll Settings (Click to enlarge image)

***Note:*** *You can also enable all the three options at once. But I recommend to use the "Scroll Buttons" option as it is easy to use and works fine for all pages. In Tap to scroll, clicking link will open the links and will not scroll the page up/down. So tap an area where there are no links available.*
> 1 votes

# Answer
The need of using an Xposed module can be removed from my answer here. We can use Tasker and a very useful plugin named AutoInput to simulate page up/down using Volume keys.

# Instructions

1. Install both the apps.
2. Go to **Settings → Accessibility** and enable **Services** for both **Tasker** and **AutoInput**.
3. Launch Tasker. Under **Tasks**, create a task named **Scroll Up**.
4. Create following actions in that task (`A` implies an action):

* A1:

    + **Plugin → AutoInput → Modes → Configuration → Key Suppress → Enable → Keys** → scroll to select **Volume Up**
        + **Timeout**: None

    We're suppressing the Volume Key so that you don't end up with system ringer volume dialog with a slider when you press that key.
    * A2:

    + **Code → Run Shell**:
        + **Command**: `input touchscreen swipe X2 Y2 X1 Y1` or `input keyevent 92`

        If you choose the former command, then use my answer to get the coordinates.
        + Check **Use Root**
5. Create another task named **Scroll Down**.
6. Create following actions in that task:

* A1:

    + **Plugin → AutoInput → Modes → Configuration → Key Suppress → Enable → Keys** → scroll to select **Volume Down**
        + **Timeout**: None
    * A2:

    + **Code → Run Shell**:
        + **Command**: `input touchscreen swipe X1 Y1 X2 Y2` or `input keyevent 93`
        + Check **Use Root**
7. Under **Profiles** tab, create two profiles named **Autoinput Up Key** and **Autoinput Down Key**.
8. Link the tasks **Scroll Up** in **Autoinput Up Key** and **Scroll Down** in **Autoinput Down Key** profile.
9. Create a third task named **Launch Profiles** and create following actions in it:

* A1:

    + **Tasker → Profile Status** → choose using lens icon **Autoinput Up Key**
        + **Set**: On
    * A2:

    + **Tasker → Profile Status** → choose using lens icon **Autoinput Down Key**
        + **Set**: On
10. Create the final task named **Kill Profiles** and create the identical actions of step 10. Change **Set** from `On` to `Off` in both actions for this step. We need this task so that the custom actions meant for Volume keys doesn't affect other apps where the keys should function as normal.
11. Create a profile based on application context and select an app of your choice, such as Chrome.
12. Link **Launch Profiles** task in Chrome profile.
13. Link **Kill Profiles** as an exit task in Chrome profile.

You may now launch Chrome. Use Volume Up/Down to find that they would not change the ringer volume but would scroll up/down the page you've opened up in Chrome. Switch to another app not selected in above steps or close Chrome and those hardware keys would function as normal.

---

**Note:** It's not butter smooth as my linked answer but it's not sluggish either. If you're not comfortable with Xposed framework or modules then this answer would help for sure.

We're good to go!
> 1 votes

# Answer
UC Browser has two kinds of tap scrolling. You can configure it to scroll up if you hit a non-link portion in the upper half of the screen or vice versa to scroll down. You can also elect to display two arrow buttons (that you can drag around the screen so you can position them to your liking) for tap to scroll.

You can get it here: https://play.google.com/store/apps/details?id=com.UCMobile.intl

Note: As I write this, the UC Browser HD (specifically for tablets) does NOT have this capability.
> 0 votes

# Answer
Tasker allows creation of Scenes. We can use scenes to create virtual buttons on the screen which can work as navigational keys to scroll up/down/left/right on the screen.

This answer would make good use of all of my earlier answers written on this page. It goes without saying that root access would be needed than.

(Some mundane scenes I created; click image to enlarge)

(Excuse the drawing because I'm no good in it and neither I've tasted the power of scenes yet. Nevertheless, you can see how they are acting as navigational keys.)

# Instructions for creating Scenes

1. Install and launch Tasker
2. Go to **Scenes** tab and create a new scene named **Nav Buttons**.
3. See Image 1, 2, 3, 4, 5. **Note** that you need not to bother about where the scene would show up on the screen since we would configure it later. Simply decide how much space your Scene should be taking on the screen.
4. Under **Tap** create an action that you want to execute when the associated element is touched. You may choose to select an already existing task which may page up or swipe down the displayed app's page. See my answer here to know how to create swipe up/down tasks or see this answer to see KeyEvents which can do page up/down.
5. **Optional**: If you want to destroy the scene from inside the scene then you may consider adding an action under **Long Tap** to kill the scene or the app.

* Scene can be destroyed using the action **Scene → Destroy Scene →** select the Scene using lens icon.
    * Alternatively, if you decide to create an app from this Scene (later on the app creation part) then create the action **Code → Run Shell**,

    + **Command**: `am force-stop <PKG_NAME>`

        Create a unique `<PKG_NAME>`, such as `com.user.android.se` and keep it noted somewhere since we would need it in app creation.
        + Check **Use Root**
6. See Image 8, 9, 10, 11.

(Click image to enlarge; hover to know details)

---

Now, at this point **we have multiple choices to proceed with the scene**. You may,

1. Continue to use Tasker and create a profile where you want the scene to show up,
2. Use LMT Launcher's PIE navigation to use the Tasker shortcut in a pie. See my answer here to know how to use LMT Launcher. This approach would allow you to show/hide the scene at your will, at any place in system, and doesn't need a Tasker profile to work.
3. Use Xposed Additions Pro or AutoInput or QuickClick to show/hide that scene based on a Volume key press. See my answer for Xposed Additions Pro's usage or try AutoInput using this answer.
4. Use an app like GMD Gesture Control to show/hide the scene based on screen gestures. The freedom is same as one granted for LMT Launcher. See this answer to know its usage.
5. You can use some automation apps like MacroDroid to show/hide the scene if they allow launching a Tasker shortcut (I know, why bother doing that, but wait for more!)

# Or

You may use Tasker App Factory to transform a task into a full-fledged standalone app (read: **Tasker independent**) which can be sideloaded into system just like any other app and would work as if you're executing a task using Tasker itself.

The good part is that app creation using Tasker and Tasker App Factory is legal, so one can distribute it at his/her own will.

You want more! Right. **The biggest hurdle of depending upon commercial apps is pretty much solved in this particular case.** If you do not own or do not want to buy Tasker but a person known to you has it, then you may kindly request that person to create an app for you. You may stick to the basic approach needed for navigational buttons mentioned in the current answer or give a chance to your own imagination.

Also, one more goodie. You can use that new app with any of the five options that I've listed for a Tasker scene. **I've successfully tested all of them.**

# Create an app from a task in Tasker

1. Install Tasker App Factory
2. Under **Tasks** tab touch and hold your task entry and tap the three dotted line → **Export → As App**.
3. Create a unique package name for the app, such as `com.unique.package.name`.

**Note** that if you completed **Long Tap** step during Scene creation then you must use the same package name here.
4. You would see app creation detail. Try the icons at the bottom. The Android icon would initiate sideloading the newly created app using Android's Package Installer.

The app, once created, would be saved under `Tasker/factory/kids/` which is located in your default storage.

Also, the name of the app (seen in launcher after installation) and its icon would be same as the name of the Task and icon you selected in the task creation under Tasker.

---

I've created a demo app based on the current answer, hosted on my Google Drive. Find it here. The permissions it require are:

(Superuser permission isn't listed but is definitely required.)

(App icon made by Freepik from Flaticon, is licensed under CC BY 3.0)

There's is a slight problem here. While I was able to successfully test my app independently on my secondary Lollipop ROMs on the same device with same resolution, the app didn't work satisfactorily on my other but low resolution device. Oh well, what can I do!
> 0 votes

---
Tags: browser, user-interface
---


title: How does Magisk work?

text:
# Question
Title: How does Magisk work?
Magisk is known as a “systemless” root method. It’s essentially a way to modify the system without actually modifying it. Modifications are stored safely in the boot partition instead of modifying the real system files.

I have looked around but did not find a sufficient explanation as to how it actually works. How is the root access gained and maintained? What exactly is the role of the boot partition and if it integrates with the system partition how it does it?

A really detailed description of how it works lacks from everywhere I searched so it would be really highly appreciated.

# Answer
> 63 votes
Most part of your question is covered in Magisk Documentation. I will quote one of my previous answers to a different question, with some *unnecessary* details :)

**PREREQUISITES:**

To have a comprehensive understanding of how Magisk works, one must have basic understanding of:

* Discretionary Access Control (DAC)
* User identifiers (`[ESR]UID`), `set-user-ID`
* Linux Capabilities (process and file) which provide a fine-grained control over superuser permissions
* Mandatory Access Control (MAC)
* SELinux on Android
* Mount namespaces, Android's usage of namespaces for Storage Permissions
* Bind mount
* Android boot process, partitions and filesystems
* Android `init` services (the very first process started by kernel)
* \*.rc files
* Structure of `boot` partition (kernel + DTB + ramdisk), Device Tree Blobs, DM-Verity (Android Verified Boot), Full Disk Encryption / File Based Encryption (FDE/FBE) etc.

**WHAT IS ROOT?**

Gaining root privileges means to run a process (usually shell) with UID zero (0) and all of the Linux capabilities so that the privileged process can bypass all kernel permission checks.
Superuser privileges are gained usually by executing a binary which has either:

This is how `su` and `sudo` work on Linux in traditional UNIX DAC. Non-privileged users execute these binaries to get root rights.

This is the less common method used.

In both cases the calling process must have all capabilities in its Bounding Set (one of the 5 capabilities categories a process can have) to have real root privileges.

**HOW ANDROID RESTRICTS ROOT ACCESS?**

Up to Android 4.3, one could simply execute a `set-user-ID-root` `su` binary to elevate its permissions to root user. However there were a number of Security Enhancements in Android 4.3 which broke this behavior:

* Android switched to file capabilities instead of relying on `set-user-ID` type of security vulnerabilities. A more secure mechanism: Ambient capabilities has also been introduced in Android Oreo.
* System daemons and services can make use of file capabilities to gain process capabilities (see under Transformation of capabilities during execve) but apps can't do that either because application code is executed by `zygote` with process control attribute `NO_NEW_PRIVS`, ignoring `set-user-ID` as well as file capabilities. SUID is also ignored by mounting `/system` and `/data` with `nosuid` option for all apps.
* UID can be switched only if calling process has SETUID/SETGID capability in its Bounding set. But Android apps are made to run with all capabilities already dropped in all sets using process control attribute `CAPBSET_DROP`.
* Starting with Oreo, apps' ability to change UID/GID has been further suppressed by blocking certain syscalls using seccomp filters.

Since the standalone `su` binaries stopped working with the release of Jelly Bean, a transition was made to su daemon mode. This daemon is launched during boot which handles all superuser requests made by applications when they execute the special `su` binary (). `install-recovery.sh` (located under `/system/bin/` or `/system/etc/`) which is executed by a pre-installed init service `flash_recovery` (useless for adventurers; updates recovery after an OTA installation) was used to launch this SU daemon on boot.

The next major challenge was faced when SELinux was set strictly `enforcing` with the release of Android 5.0. flash\_recovery service was added to a restricted SELinux context: `u:r:install_recovery:s0` which stopped the *unadulterated* access to system. Even the UID 0 was bound to perform a very limited set of tasks on device. So the only viable option was to start a new service with unrestricted *SUPER CONTEXT* by patching the SELinux policy. That's what was done (temporarily for Lollipop (, ) and then permanently for Marshmallow) and that's what Magisk does.

**HOW MAGISK WORKS?**

Flashing Magisk usually requires a device with unlocked bootloader so that `boot.img` could be dynamically modified from custom recovery () or a pre-modified `boot.img` () could be flashed/booted e.g. from `fastboot`.
As a side note, it's possible to start Magisk on a running ROM if you somehow get root privileges using some exploit in OS (). However most of such security vulnerabilities have been fixed over time ().
Also due to some vulnerabilities at SoC level (such as Qualcomm's EDL mode), locked bootloader can be hacked to load modified boot / recovery image breaking the Chain of Trust. However these are only exceptions.

Once the device boots from patched `boot.img`, a fully privileged Magisk daemon (with UID: 0, full capabilities and unrestricted SELinux context) runs from the very start of booting process. When an app needs root access, it executes Magisk's `(/sbin/)su` binary (worldly accessible by DAC and MAC) which doesn't change UID/GID on its own, but just connects to the daemon through a UNIX socket () and asks to provide the requesting app a root shell with all capabilities. In order to interact with user to grant/deny `su` requests from apps, the daemon is hooked with the `Magisk Manager` app that can display user interface prompts. A database (`/data/adb/magisk.db`) of granted/denied permissions is built by the daemon for future use.

**Booting Process:**
Android kernel starts `init` with SELinux in `permissive` mode on boot (with a few exceptions). `init` loads `/sepolicy` (or split policy) before starting any services/daemons/processes, sets it `enforcing` and then switches to its own context. From here afterwards, even `init` isn't allowed by policy to revert back to permissive mode (, 10). Neither the policy can be modified even by root user (11). Therefore Magisk replaces `/init` file with a custom `init` which patches the SELinux policy rules with *SUPER CONTEXT* (`u:r:magisk:s0`) and defines the service to launch Magisk daemon with this context. Then the original `init` is executed to continue booting process (12).

**Systemless Working:**
Since the `init` file is built in `boot.img`, modifying it is unavoidable and `/system` modification becomes unnecessary. That's where the `systemless` term was coined (13, 14). Main concern was to *make OTAs easier - re-flashing the `boot` image (and recovery) is less hassle than re-flashing `system`*. Block-Based OTA on a modified `/system` partition will fail because it *enables the use of `dm-verity` to cryptographically sign the `system` partition*.

**System-as-root:**
On newer devices using system-as-root kernel doesn't load `ramdisk` from `boot` but from `system`. So `[system.img]/init` needs to be replaced with Magisk's `init`. Also Magisk modifies `/init.rc` and places its own files in `/root` and `/sbin`. It means `system.img` is to be modified, but Magisk's approach is not to touch `system` partition.

On `A/B` devices during normal boot `skip_initramfs` option is passed from bootloader in kernel cmdline as `boot.img` contains `ramdisk` for recovery. So Magisk patches kernel binary to always ignore `skip_initramfs` i.e. boot in recovery, and places Magisk `init` binary in recovery `ramdisk` inside `boot.img`. On boot when kernel boots to recovery, if there's no `skip_initramfs` i.e. user intentionally booted to recovery, then Magisk `init` simply executes recovery `init`. Otherwise `system.img` is mounted at `/system_root` by Magisk `init`, contents of `ramdisk` are then copied to `/` cleaning everything previously existing, files are added/modified in rootfs `/`, `/system_root/system` is bind-mounted to `/system`, and finally `[/system]/init` is executed (15, 16).

However things have again changed with Q, now `/system` is mounted at `/` but the files to be added/modified like `/init`, `/init.rc` and `/sbin` are overlaid with bind mounts (17).

On `non-A/B` `system-as-root` devices, Magisk needs to be installed to recovery `ramdisk` in order to retain systemless approach because `boot.img` contains no `ramdisk` (18).

**Modules:**
An additional benefit of `systemless` approach is the usage of `Magisk Modules`. If you want to place some binaries under `/system/*bin/` or modify some configuration files (like `hosts` or `dnsmasq.conf`) or some libraries / framework files (such as required by mods like `XPOSED`) in `/system` or `/vendor`, you can do that without actually touching the partition by making use of Magic Mount (based on bind mounts). Magisk supports adding as well removing files by overlaying them.

**MagiskHide:** (19), removed in v24.0 (64)
Another challenge was to hide the presence of Magisk so that apps won't be able to know if the device is rooted. Many apps don't like rooted devices and may stop working. Google was one of the major affectees, so they introduced **SafetyNet** as a part of Play Protect which runs as a GMS (Play Services) process and tells apps (including their own `Google Pay`) and hence their developers that *the device is currently in a non-tampered state* (20).

Rooting is one of the many possible tempered states, others being un-Verified Boot, unlocked bootloader, CTS non-certification, custom ROM, debuggable build, `permissive` SELinux, ADB turned on, some *bad* properties, presence of Lucky Patcher, Xposed etc. Magisk uses some tricks to make sure that most of these tests always pass, though apps can make use of other Android APIs or read some files directly. Some modules provide additional obfuscation.

Other than hiding its presence from Google's SafeyNet, Magisk also lets users hide root (`su` binary and any other Magisk related files) from any app, again making using of bind mounts and mount namespaces. For this, `zygote` has to be continuously watched for newly forked apps' VMs.

However it's a tough task to really hide rooted device from apps as new techniques evolve to detect Magisk's presence, mainly from `/proc` or other filesystems. So a number of *quirks are done to properly support hiding modifications from detection*. Magisk tries to remove all traces of its presence during booting process (21).

---

Magisk also supports:

That's a brief description of Magisk's currently offered features (AFAIK).

---

**FURTHER READING:**

# Answer
> 7 votes
Magisk provides root access by providing a working "root" binary mounted at `/sbin/magisk`. Any application that tries to run this binary will bring up Magisk to grant them root access, which is in turn managed and maintained by the Magisk Manager application.

The `/boot` partition is a separate partition that stores some data required to boot the system. It includes initialization of some very low-level mechanisms like the Linux kernel, device drivers, file systems etc, before the upper-layer Android OS is brought up. It is separated in a way such that Linux-level stuff is stored in it while Android-level stuff (SystemUI, Settings etc.) is stored in the `/system` partition. **Modifying `/boot` does not count as modifying `/system`**, the latter of which is what DM-verity and AVB usually checks.

And Magisk patches and integrates itself into **the `/boot` partition**, so it doesn't touch the system partition at all. It uses a technique called "a bind mount" to change the content of system files that other programs see, without actually modifying the underlying filesystem beneath the system partition (so "real" files are left intact).

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


# Question
Title: Copy Album Art from One Song to Rest of Album
I'm uploading music and Google auto-detects some of the artwork, but not all of it. Is there a way to copy the detected artwork to all of the songs in the album?

# Answer
> 0 votes
Easy! 1. Select album with missing or incorrect cover art 2. Goto iTunes or other music app that contains that album with your desired cover, select or right click edit, select cover and drag to your desktop (or copy and paste on desktop) 3. Go back to google album with missing cover, right click and select edit, in the edit screen select the up arrow in the cover section and select the cover you placed on desktop, then save edit screen and voila: the cover is where it belongs, hurray! 4. This way associates all tracks with the same cover, easy! Cheers

---
Tags: google-play-music
---