# Question
Title: How to remove an app that is a persistent device administrator
I received a Samsung GS5 as part of a program from Samsung in exchange for their recording device statistics through an app I installed. The program is over, and I have been notified that the app can be removed, but whenever I try to uninstall it I'm told that the app is a device administrator and therefore can not be removed.

I tried to remove the administrator status from the app (it's called Samsung Insights) but the option is greyed out. Does anyone have another method of removing admin status or uninstalling apps that have admin status?

# Answer
Go into your phone's Settings and open Security. From there, tap Device administrators, and you should be able to turn it off from there.
> 1 votes

# Answer
From Task manager go to downloads and click to uninstall. That should again lead you to device manager option of manage device admin apps and it may be possible now to see the option not greyed out

Another option if rooted, is to delete folder named after the app in /data /data. Next, search for apk file in device /system, delete it and reboot

If this doesn't work you could try uninstall through Titanium
> 1 votes

# Answer
That app is using the Samsung Knox api, which cannot be disabled by you. You need to reach whoever installed it and ask him to enable you permission to deactivate device admin. Another option would be wipe, if that is not locked too. You can check that by going into Setting - Backup and reset. If its grayed out, there is nothing you can do.

AS EXTRA, i can say the samsung api can lock device admin removal, factory reset from system and recovery and also flash through download mode and also safe mode.

I am using the same api in some of my apps and i know what that means. I cannot show now the link to it as Chrome is freezing on mobile. Will do when i get to my pc.

LE:

public boolean setAdminRemovable (boolean removable)

Usage An administrator can set their removable status. If set to true, the user can remove the administrator through the Settings application. If set to false, the user cannot remove the administrator through the Settings application.

https://seap.samsung.com/api-references/android-standard/reference/android/app/enterprise/EnterpriseDeviceManager.html#setAdminRemovable(boolean)
> 1 votes

# Answer
IF you can not deactivate a device administrator boot into safe mode. And try it I am pretty sure it will work and then you can uninstall it.
> 0 votes

# Answer
I had the same issue on a 7s edge with the latest Nougat update. Fixed the issue by resetting all settings. After that everything worked fine. No need for factory reset.
> 0 votes

# Answer
Samsung Insights app is required to participate in the Samsung Insights program (latest equipment at a 50% discount, etc).

You normally run it for 6-months to a year. At that point, you have a Contact Support link you can press. If you've run the app long enough to qualify for deactivation, it'll provide you with an e-mail link. Click on it, go to your mail program, and send the message out.

They should send you back a code you can input to deactivate.
> 0 votes

---
Tags: samsung-galaxy-s-5, device-administrator
---


# Question
Title: Give use to Android phone with broken screen
I have an BLÜ Pure XR with a broken screen (completely black) which I'm trying to put to some use (security camera perhaps), however, since I can't access the phone at all, I'm not able to turn on USB Debugging, and all strategies I've found online (including putting the phone in ClockWork mode, which I seem to have done successfully) using ADB yield "Permission denied" errors in one form or another (`mount: Permission denied`, `adbd cannot run as root in production builds`, `...java.lang.NullPointerException: Attempt to invoke interface method 'android.os.IBinder android.os.IServiceManager.getService(java.lang.String)' on a null object reference...`, etc).

I say I've successfully put the phone in ClockWork mode because if I connect it to my PC via USB and I run `adb devices` shows me a device in the list, and some of the errors I get include "BLÜ Pure XR" in their contents so it seems to be somewhat successfully connected.

Am I attempting to do something impossible?

# Answer
This will work only if the touch still works

1. Plug your phone to your pc
2. Unlock your phone
3. Perform the key combination which takes a screenshot
4. Explore the files of your phone where your screenshots are located
5. See where you are at
6. Tap on the screen blindli trying to click on the icon you want to click
7. Rinse and repeat from step 3
> 0 votes

# Answer
In case even your touch does not work, I believe the only way to do so is an iterative process using UI Automator viewer and writing an UI Android test that navigates throughout the settings, enabling usb debugging as final goal.

UI Automator will be useful to collect the resource ids (menu items ids, textviews ids, dialog buttons ids, ui widgets ids etc) the instrumented test should click.

Hope this helps.
> 0 votes

---
Tags: adb
---


# Question
Title: Can I install Android using Android studio on any supporting devices?
I have a Samsung phone. I don't know anything about installing Android and about Android Studio.

Can I install Android on it using Android Studio?

# Answer
> 2 votes
Android Studio is purely for developing Android apps. hence you can only build Android apps, install them on a device or emulator and you can run/debug it.

Android Studio has no functionality for flashing Android system images or "installing Android" on a device.

---
Tags: installation, operating-system, android-studio
---


# Question
Title: Factory reset protection (FRP) verification
I have a Samsung phone with Android 6.0.1. I'd like to know if the FRP is activated. I've been searching on the web for instructions on how to do this. So far I've found instructions requiring the user to actually factory reset the phone. Is there a way to verify if FRP is on (and activate it if not) without having to factory reset the phone?

My phone is secured with a pin number.

# Answer
According to Samsung support, FRP is automatically enabled when you set up at least one Google account. If you still want to check it's status manually, you will need to enter **Download mode**. To do this:

* turn off your phone and wait about 10 seconds
* hold Volume Down, Home and Power buttons simultaneously until you see a warning
* press Volume Up to continue.

After doing these steps, some text should appear on the screen, including "FRP LOCK" or something like that. There you can check whether protection is enabled or not.

**Important:** to exit download mode, you will need to hold the power button for more than 10 seconds, or if that doesn't help just pull the battery.

---

Please note that FRP can be easily disabled by flashing new ROM without GApps, but if your bootloader is locked that's not an issue.
> 1 votes

# Answer
The factory protection lock should be always enabled as long as you have a password,pin or fingerprint lock on the phone
> 0 votes

---
Tags: security, factory-reset, anti-theft
---


# Question
Title: What factors could cause a massive spike / drop in bitrate?
I'm seeing a graph of one of my Android application's bitrates during a video stream, and I'm not sure what to make of it:

Relevant Info:

* This is a single application's bitrate over the duration of a video call
* The video call starts off perfectly fine, but suddenly degrades.
* This graph repeatedly shows up for different users, different devices, different locations, different networks, etc.
* In this specific case, packet loss is minimal, latency is also minimal, access point strength is 5ghz.
* The duration of this graph is 30 minutes, start to finish, but the drop occurs at 4-7 mins, every time.
* The device supports WiFi 802.11 a/b/g/n/ac – 2.4GHz and 5GHz
* Line of sight to the WiFi router does not appear to be an issue.

What types of things affect bitrate? What other information can I gather to help understand this? Does Android potentially throttle things like WiFi connectivity due to resource constraints, overheating, etc?

I have to assume it's something that my software is doing, but there's nothing obvious that I can see...

Thank you.

# Answer
> 1 votes
Bitrate is an average. As with any average, it is greatly affected by the size of the window it is averaged over. On average the temperature where I live is around 70 degrees F. But some days it’s 30 and some days it’s 120. But the average is 70. If you do daily readings you will see spikes. If you do monthly reading, you will see a sin wave, if you do yearly readings, the line will be pretty flat (not factoring in climate change).

Individual frame sizes vary massively depending on information density, motion, scene detection, and minimum key frame intervals. It’s a function of how video compression works and completely normal.

Research how video compression works. Specificity I/P/B frames and it will make sense.

Also note that available bandwidth changes very rapidly. Especially on wireless networks. And many video conferencing software will adapt to keep the call working.

---
Tags: wi-fi, streaming
---


# Question
Title: Where can I find the bootanimation.zip in the Evolution X Custom ROM?
So, I wanted to replace the stock boot animation that comes with Evolution X since it is kind of boring, but the problem was that I couldn't find the `/system/media/` directory in any root browser or even the file manager built within TWRP. I just need to know where I can find the `bootanimation.zip` file in Evolution X, and if there are any further steps required to change it other than just backing up the original boot animation and replacing it.

Specifics: I'm running the latest official build of Evolution X for `zerofltexx` (Samsung Galaxy S6) with MagiskRoot and a few Magisk Modules.

# Answer
> 0 votes
Try to do a search in the root explorer.you will get the location System/product/media Thanks -redminote5pro -evolutionx 4.3

---
Tags: custom-roms, customization, boot-animation
---


title: Samsung J1 Ace cant enter recovery mode

text:
# Question
Title: Samsung J1 Ace cant enter recovery mode
My phone J1 Ace is stuck on boot logo with red signal. I can't go to the recovery mode to flash. What can I do now?

# Answer
Please press power button for 30 -45 second Or remove battery
> 0 votes

---
Tags: wi-fi, samsung, recovery-mode, factory-reset, samsung-galaxy-j1
---


# Question
Title: I want to customise my phone to forward SMS messages automatically
My goal is that I want to customise my own Android phone to automatically forward text messages from user defined phone numbers onto other user defined phone numbers. I tried updating a very simple app to do this:

https://github.com/EnixCoda/SMS-Forward

However I found that once I had updated to newer Android versions, the app started up and allowed me to set a forwarding number, but did not actually forward the SMS (I used my phone in USB debugger mode). The SMSReceiver class did not get the message that an SMS had arrived I found when I debugged it. I read more, and it seems that only the default SMS app is allowed to have anything to do with text messages. So now, I want to start from the source code of the stock/default SMS app that comes with Android so that I can add the features I am interested in to it.

I'm open to different approaches, but I don't want to download a crapware app with ads or pay nagging.

Doing a little more research, I found that Signal can handle SMS messages, but it seems like quite a big and complicated app.

Any advice appreciated!

# Answer
> 3 votes
You can try to create the following flow with Automate and test if it accomplishes it.

1. Create a new flow by pressing on the + button
2. Press again on the + button, search for SMS. Select "SMS received" block
3. Press the "SMS received" block. Enter the phone number of the sender. Click on "Subscription ID" and select your SIM card (Network provider). On the Message box, enter the name of a variable, for example `msg`. Click on Save.
4. Press the + button. Select the "SMS send" block. Press it. Enter the phone of the contact you want the SMS to. Set the Sim card (network provider) under "Subscription Id". on the Message box, press on fx to enable it, then enter the variable create during step 3. In this case, enter `msg`. Click on Save
5. Link the blocks as seen on the first image below, then press back.
6. Give the flow a name and enable "send and view messages". Give the requested permission, then press Start.

When an SMS is received from the sender whose number you entered on step 3, it will be immediately sent to the contact number entered in step 4. The log on the second image shows that an SMS was received then sent (forwarded).

**Note:** You should be able to add more number during step 3 and 4 by enabling fx. But I have not tested it. Or, you can add more SMS received and SMS send blocks in parallel for each number.

**Disclaimer:** I am just a user of the app.

---
Tags: sms, automation
---


# Question
Title: In Twrp recovery mode touch screen is not working on redmi y2
I wanted to root my redmi y2 device. I have unlocked my bootloader and successfully flashed Twrp recovery from adb however it's touch screen is not working, probably because my device doesn't supports touch screen in recovery mode as it also uses volume keys to navigate in it's stock recovery.

Is there any other custom recovery which uses volume and power keys to navigate or can I give command from adb or anything else to flash magisk in recovery mode with my pc only or just any other method to root my phone.

I have already wasted hours and hours serching on the web to resolve the issue, also I have tried different versions of Twrp but again no luck. Please help me out, thanking you in advance.

# Answer
Orange fox recovery should be flashed in case if you are using MIUI 11. Link to that can be found here. For MIUI 9 and 10 users this TWRP is working fine.
> 1 votes

---
Tags: adb, rooting, twrp, redmi
---


# Question
Title: Can't create folder on device using mac Android File Transfer app
When trying to create folder on Samsung Galaxy TAB 2 using the **Android File Transfer** app from my mac computer, I get an error alert:

> Could not connect to device. Try reconnecting or restarting your device".

What could be the reason of this problem?

# Answer
> 1 votes
I had the same symptoms. Neither reconnecting nor restarting my device helped. It turns out that there was already a folder with the same name as the one I was trying to create, and I just hadn't noticed it. So, Android File Transfer was giving me an incorrect error message.

# Answer
> 0 votes
I had the same problem and a reboot did the trick for me.

---
Tags: storage, file-transfer, macos, samsung-galaxy-tab-2-7
---


# Question
Title: Tablet Touch Screen partially unresponsive
I have an Android Tablet with Android 4.1.1, some days ago, the screen started to have random touches around the top of the screen, and sometimes, the top of the screen was unresponsive.
After a factory reset, the problem wasn't solved, but now the top of the screen had stopped being sensitive... I opened the tablet and cleaned the screen.
Now it stopped the random touches (Sometimes they happen again), but the screen still doesn't respond, what do I do?

# Answer
I know this is a low tech answer but I've had this happen before, normally due to screen smudge from fingers or liquid splash/residue on the screen.

Give the screen a good clean (use cloth from a pair of glasses) and see if the problem persists. Failing that, shutdown, remove the battery, and leave it for 5 minutes just in case it's a charge/capacitance issue.
> 1 votes

# Answer
I have the exact same problem. Physically squeezing or lightly tapping the back (not the screen) of the problem area is a good temporary fix if you still have to use the device everyday. Still searching for a permanent fix in my case because most I've tried aren't working.
> 1 votes

---
Tags: touchscreen
---


# Question
Title: How do I get rid of the search suggestions in Chrome?
I want to remove these suggestions on chrome for android, but I cannot find how to do it anywhere. Can someone help me with this?

Once I type a letter the normal suggestions appear. I just don't want to see all these recent searches I made.

# Answer
Those are suggestions that you can turn off.

1. Go to the Chrome menu on the browser toolbar.
2. Click Settings.
3. Click Show advanced settings (on the bottom)
4. In the Privacy section, deselect the "Use a prediction service to help complete searches and URLs typed in the address bar" checkbox.
> 1 votes

---
Tags: chrome-for-android, search
---


# Question
Title: How to disable power button triple tap emergency call feature?
I'm using a OnePlus 6 (Magisk; systemless Xposed, stock ROM at Android 8.1.0). One of the features that constantly irritates me is the accidental dialing of emergency number. The system by-default looks for triple power button tap and automatically dials Emergency number (112). I read on XDA here that this is a feature specific to India and Indian SIMs, and I also bought this in India and use an Indian SIM. Other regional users, per some threads of OnePlus subreddit and OnePlus forums, do not have this problem and can customize the shortcut from Camera app or under Settings app, while I cannot.

I found this YouTube video but the recommended solution does not work because the Emergency Info app in my system doesn't have the activity used in the video. That app only has these two activities which only leads to editing Emergency specific user details:

```
.view.ViewInfoActivity
.edit.EditInfoActivity

```

How do I change this behavior? I'm looking to prevent emergency number dial on triple power button tap, and if possible, customization of that double power button tap to Camera launch. Furthermore, if possible, please provide a non-root based solution.

# Answer
In Android Pie in OnePlus 6 you can now access the activity shown in the video via Settings → Security & lock screen → Emergency Rescue.

<sub>(Image sourced from OnePlus Forums)</sub>
> 2 votes

# Answer
I used and found that the service GestureLauncherService (a sub-service of SystemService) actively looks for the triple power button tap and takes action accordingly. While I couldn't find such sub-service through GUI (Running services), `dumpsys` and `cmd` commands, I did notice this line in the logcat's output:

```
[ 11-15 21:21:27.368  1292: 1825 I/ActivityManager ]
START u0 {act=android.intent.action.CALL_PRIVILEGED dat=tel:xxx flg=0x10000000 cmp=com.android.server.telecom/.PrivilegedCallActivity} from uid 1000 pid 1292

```

I cross-checked it with `adb shell dumpsys activity recents` and found that `PrivilegedCallActivity` is the activity that shows up when the number is dialed.

So, while I can't prevent the gesture service, I can prevent the number being dialed successfully. I immediately disabled the component `PrivilegedCallActivity` of the package `com.android.server.telecom` (Call Management app) using adb (**requires root**) like this:

```
adb shell su -c 'pm disable com.android.server.telecom/.PrivilegedCallActivity'

```

One can also use an app to disable that activity. From henceforth, that triple power button tap wouldn't make the call.

**Note**: disabling that activity does not prevent Emergency calls (both to user provided emergency contacts and country specific emergency numbers) from taking place from Emergency dialer at lock screen because that uses a different activity. It is just that the system cannot dial the emergency number without user's explicit consent on the dialer, anymore.
> 0 votes

# Answer
For those uncomfortable with disabling a component of a critical system app, as recommended here, they can use a solution which is safe and tested by others already.

At XDA, kashayapha1994 found this hack:

```
adb shell settings put global emergency_affordance_needed 0

```

That enables the quick capture shortcut setting in stock Camera app and in Settings app automatically. This also prevents dialing emergency number because system always fires the Camera app at double button press when the shortcut is enabled.

However, the hack doesn't survive a reboot, so anirudhnyg at XDA came up with a Magisk module (**requires a rooted device**) to automatically apply the aforesaid hack *et al*. Download it from the aforementioned link, install it and reboot. That's it.

You can also choose to apply that hack at boot using any app which can run a command/script at boot, such as Tasker, MacroDroid, Xposed Edge. Do note that all such apps would require root access or being set as Device Owner such as SecureTask (**doesn't require root**).
> 0 votes

# Answer
For Asus Zenfone max pro m2 Android 9 devices below works

```
pm disable com.android.server.telecom/.EmergencyCallActivity

```

as below does not work

```
adb shell settings put global emergency_affordance_needed 0

```
> 0 votes

---
Tags: emergency-calls, oneplus-6
---


# Question
Title: How do I get a USB stick with an adapter to work with an Android phone (rather than a tablet)?
I have a USB stick that lights up when it is plugged in. I have attached it to laptops and tablets (with adapters), and it lights up and works well. When I attach it to cell phones (through the same adapter that I do with tablets), it does not light up. Is there a setting to enable the Android 7.x phone to give power to the attached devices (the way Android tablets do)?

Update: My phone does not support OTG.

# Answer
> -1 votes
How to set the default USB behavior in Android 10

When you plug something into your Android device, it will behave in accordance with how you have configured the action. With Android 10, you have five options:

1. **File transfer/Android Auto**: Transfer files to and from PC/Android or open Android Auto.
2. **USB tethering**: Behave as an external network interface for the PC.
3. **MIDI**: Used when connecting your phone to a MIDI device (such as a digital keyboard).
4. **PTP**: When connected, your device will appear to the PC as a digital camera.
5. **No data transfer**: No action taken.

Steps to change the default USB dehaviour in Android 10:

First, you are going to want to enable Developer options

1. Open Settings. Tap About Phone.
2. Scroll down to the bottom.
3. Tap Build Number (seven times) until you are informed that Developer Options have been enabled.

Now that you have Developer Options enabled, you can set the default USB behaviour.

1. Navigate to the developer options: (**System \> advanced \> developer options**, may differ from device to device)
2. Within Developer options, navigate to (in my case) **Networking \> `Default USB configuration`**

---
Tags: usb, usb-on-the-go
---


# Question
Title: Android Phone Off State and Boot process - Does Android consume power when switched off?
I am curious about the "turned off" state and the boot process after that in details. I found some good articles on this topic like this one: http://www.lieberbiber.de/2015/07/05/mediatek-details-little-kernel/ but it's still not completely clear to me what's the exact process.

I know that the basic boot sequence is:

* Boot ROM
* Preloader
* Little kernel (LK)
* And then it may split into going to:
    + Download mode (in case of a Samsung device for example)
    + Fastboot mode or
    + Recovery or
    + Normal boot (starting Android boot itself)

But is the phone really off when we turn it off and the battery is inserted? I know that Android is really shut down but is the phone completely off regarding the software level? As the article linked above says, the little kernel is doing the charging animation, or selects the next boot image when pressing the keys (recovery, fastboot, normal boot, etc).

So my question is: when the phone is off and we press the power button is it the hardware which starts the boot really from zero (from the boot rom) or at this point the phone has already been finished with processing the boot rom, the preloader and loading the little kernel as well which is watching the key press events?

It's not clear to me because I checked the source code of the little kernel as well and there are some keyboard ckecking routines for example to enter to recovery mode.

Thanks in advance!

Cheers!

# Answer
# Clarification

You're asking different things in each part of the post. The title asks "*Does Android consume power when switched off?*" but the latter part of the post asks "*which is watching the key press events?*", with a few different questions in between, which adds further distractions and confusions to the possible answerers...

Anyhow, I guess it all boils down to: "**Once an Android phone is turned off, what wakes it up to start a process in each appropriate situations?**".

# Backgrounds

To answer this, I'll have to take you to even lower level of an electronic device: `hardware`.
You may argue,

> *"What are you talking about?! A hardware is nothing when there's no software! Something HAS to be there watching the button input and I'm simply asking what that could be"*.

Be patient, please. Well get there soon.

> *"But...!"*

Believe me. Besides, you might need to remind yourself of the definition of 'software' and 'hardware' now, since we're about to dive deep into such a low level.

I wonder whether you've ever played with an `Arduino`, those little boards that get clicky button inputs and put flashy LED outputs. A chip working as the brain in one of these devices\* is called an 'MCU', or a 'microcontroller'. A computer - including Android devices - is equipped with a few of these. Every firmware/ROM chips, BIOS chips, or any programmable ICs is likely another microcontroller.

# Simple Answer

These MCUs are quite simple compared to CPUs, but more robust and energy-efficient. For this reason, MCUs are often used to aid CPUs to set things up for them. How do they work? Essentially, they behave just according to how a firmware is programmed inside the ROM.

"Ha, so it's simply the Boot ROM, isn't it? You could have just said so!" Well, you'll have to know a bit more to understand better to get an answer for each of your oh-so-many questions.

# Deeper Explanation

The keywords are `interrupt` and `sleep mode` (the terminology of the latter may vary).

## (Wrong) Example

The firmware could be coded in a way that the chip would constantly be looking at the external inputs. However, this is not the ideal way. The chip will have to retrieve the state of a button, compare whether it's `on` or `off`, and then count up to 50ms or so to simply wait. Now back to retrieving the state, and so on. The poweroff state could last hours, days, or even years - all the while unbeknownst to the poor little chip is whether the moment for it to shine again would ever come...

Sorry, that was a little bit disturbing. The existential crisis is not the only problem though, if that helps. Even if the chip were to be actively working, each glancing costs valuable resource as well!

## Interrupt

`Interrupt` works the other way round. It's more like giving a notification to the main computational part. An MCU with the capability, essentially every modern one, is prepared with a procedure where they could push away & forget whatever they were up to before, execute a specific function to respond to the interrupt signal, and then get back to the task they were doing before. This way, an MCU doesn't have to actively, repeatedly compute a retrieval & comparison set. In the case of a typical Android device, you could assign interrupt for `[power applied/removed on the charger pin]`, `[power applied/removed on the charger pin]` and `[power button pressed]`.

## Sleep Mode

You may ask,

> *"Okay, sooo... now that MCU doesn't have to be burdened with that, it could happily sleep?"*

HA! No.

...well yes. MCU could just sleep there.

Actually what I want to remark here is that, don't quote me on this but, what they sip when they sleep should be comparable to self discharge of a battery. At this point, there's so little software involved here that I would say those running at this point are all purely implemented in the hardware - but that's just my opinion and I don't consider myself expert enough to get you necessarily convinced.

# Closure

So, basically, when in the poweroff state, Boot ROM is *barely* running that battery consumption is minuscule. When awakened, all it has to do is to call `Preloader` and/or to tell `LK` about what happened. I'm not sure of even deeper details; I have no idea but I'm willing to say it should be implementation dependent.

# Clear Ups

I guess at this point, your main question should be answered.
Followings are answers to your other questions.

> Does **Android** consume power when switched off?

**No**.
It is not any part of the Android OS ("Normal boot", you said) that consumes power.

> Does Android **consume power** when switched off?

**Yes** but barely.
Note that there could be additional power consumption to run other parts, notably RTC (Real Time Clock) module.

> But is the phone really off when we turn it off and the battery is inserted? I know that Android is really shut down but is the phone completely off regarding the software level?

**No** but almost.

> when the phone is off and we press the power button is it the hardware which starts the boot really from zero (from the boot rom) or at this point the phone has already been finished with processing the boot rom, the preloader and loading the little kernel as well which is watching the key press events?

More like **former**.
Except Boot ROM is constantly running but barely.

Hope you got better idea about how everything works now!

\*Note: Most Arduino boards have two MCUs, one in the center and the other to control the USB interface.
> 0 votes

---
Tags: boot, power-on
---


# Question
Title: How to allow a call recorder app access to call logs?
# How to allow a call recorder app access to call logs?

Since Android 9 (pie) Google Play has forbidden apps that are not the primary telephony app to access the call logs. The other problem seem to be that the phone recording call quality especially of the party on the other end has seemed to be severely degraded since the prior Android version.

For context, read Google Play Store Changes SMS and Call Log Policy.

Related post: Access the call-log to complement what has been banned by policy

# Answer
> 0 votes
# Accessibility App Connectors allow access to phone call information

Android 9 (pie) app that keeps track of call details without access to call logs:
Call Recorder - Cube ACR

**Call Recorder - Cube ACR provides:**
(a) The date and time of the call.
(b) The duration of the call.
(c) The size of the recording in bytes.
(d) The phone number or the name of the person (if in contacts).
(e) Incoming or Outgoing call.
It uses Accessibility App Connectors to get access to this data.

This answer will only work for developers of Android apps, yet works quite well in this case. It doesn't provide access to the actual call logs but it does provide access to the same information. Accessibility App Connectors allow the underlying program to "see' the data that is on the display screen and be notified of events such as placing or receiving a phone call.

The following Google Play app is an example of an app that uses this method. It records the Contact name or the phone number of all phone calls and it does this on Android 9 (Pie) without rooting the phone.

Call Recorder - Cube ACR

The above app has an app connector that lets it access the current phone number and display either the contact name or the phone number if the number is not in the phone contacts. The recorded call quality in speaker phone mode seems pretty good. **This app does not require rooting the phone.**

Because of the above Google Play policy change it may be the case that every phone call recorder app on Google play always has poor quality unless in speaker phone mode. The quality of many of them even in speaker phone mode seems degraded for the other caller. I tested about a dozen of the most popular apps for recording quality. This one may be the best of the twelve. I still have to run some more tests to make sure.

There is a big difference when tested on someone's voicemail message and when tested with an actual person on the other end. Quite often (even in speaker phone mode) the person on the other end is at only half the volume.

# Answer
> 2 votes
You can't unless your device is rooted or if you are running Android 8 or earlier

---

Details

**Call logs**

Thanks to Irfan who commented

> On Android 9+ an app can read call logs only if it holds `READ_CALL_LOG` permission, which is intended to be granted only to the apps registered as default phone app (on Android 10+ it also requires whitelisting restricted permissions during app installation). Additionally apps published on Play Store cannot hold `READ_CALL_LOG` permission if they aren't capable of being used as default phone app which includes call recording apps.
>
> For the same reason some call recording and other apps which need to access call logs or ongoing call's phone number publish two different versions of their apps; one on Play Store (without `READ_CALL_LOG` permission) and the other with the said permission.

**Call recording**

* Android has blocked call recording from Android 9 onwards (country specfic) . This has been resisted by several users as you can see in the issue tracker.
* Only silver lining is that at some point of time it may be restored in future versions as mentioned in the issue tracker

> Our development team has been adding call recording APIs on their road map. Its something that we would like to address in a future version of Android. However due to the security and privacy implications of such APIs it is not something we can deliver for the Q release.

* Without root, you cannot overcome these limitations - poor quality of recording, one sided recording, caller identity not being tagged (as in the related question which you linked). You can see these complaints in the latest reviews of the app you linked.
* Side loading an older APK isn't going to help if you are on Android 9 or above, since OS itself is blocking it. Some call recorders like Boldbeast have made Magisk modules to overcome these limitations. On OnePlus devices, you can similarly record using a Magisk module.
* If you don't want to root your phone, star the issue tracker and hope that call recording and maybe access to call logs is restored in future versions

---
Tags: call-recording
---


# Question
Title: Need help unbricking my Google Pixel (sailfish)
I was trying to downgrade my phone from android 10 to android 7.1 (stock firmware). I have done this before and it always worked, except this time the flash-all.bat tool stopped while extracting the system image. I tried switching USB ports, running the commands myself and this is when it stopped working: I flashed the bootloader, restarted it into the bootloader but it tried booting to system and failed. Now it's hard bricked. I did not lock the bootloader.

After I did some digging I found out I can use an EDL cable to force it into QEDL mode. However, i have never done this before and saw in YouTube videos that you need a processor specific .mbn file. I cannot find them anywhere so far (there was an arabic website with no download link to their unbricking tool).

**TL;DR - My phone hard bricked with the bootloader unlocked and I need help on flashing Qualcomm MSM8996 Pro SoC firmware. My PC still detects it as Qualcomm HS-USB QDloader 9008.**

# Answer
I found this tutorial, but it needs the firehose programmer file, which I can't find anywhere, not for sailfish (https://www.leakite.com/collection-qualcomm-emmc-programmer-files/) Here's the link, in case anyone needs it: https://www.youtube.com/watch?v=z90cQ1whiSE . If you find it, please reply to this and I'll add it. Good luck!

**Part 2:**

So I finally found out about "Driver Binaries", files Google provides on their site, although no instructions are provided. I downloaded both of the files for 7.1.0 nde and ran the .sh file. Read the agreement and typed "I AGREE", after which the shell created a folder called vendor. Inside are `BoardConfigPartial.mk`, `device-partial.mk` and "proprietary" folder.

From what I searched, these are Makefile extensions to build the actual firmware, and all source code is stored in the proprietary folder found earlier. There seems to be a rampatch `.img` and a dedicated `msm8996_camera.xml`, and even more interestingly, another folder called `lib64` which contains `gps.default.so`, `libwifi-hal-qcom.so`. Lots of files inside but I'm not going to go into details. The purpose of this comment is to let anyone more experienced with compiling and building software from raw code hopefully compile all of this into a single flashable `.mbn`.
> 1 votes

---
Tags: unbricking, google-pixel
---


# Question
Title: JIO VoLTE is not working with Moto G5 plus
I am trying from so many days to enable VoLTE on MOTO G5 PLUS but VoLTE is not working in any of the SIM slots. The current Android version is Nougat.

Can somebody help me how can I enable VoLTE option on my phone? It is really frustrating that I need to use some third party app to make a call on 4G network.

# Answer
> 1 votes
This could pe possible if *VoLTE or HD calling* is not enabled under sim card settings. Make sure you have turned it on.

It might be possible that your current network didn't working properly on VoLTE.

# Answer
> 0 votes
Have you checked if the **Enhanced 4G LTE Mode** option in the Mobile Network option in the Settings is enabled? If it is not enabled, then you need to check this option, then it will work fine.

If you do not find an option such as Enhanced VoLTE, then try to change the SIM card to a different slot (it will be better if Jio SIM is in the first slot) and restart the phone and check again if such an option appears. If you do not find the option again, then try to clear the cache partition the method is seen here in the link here.

If you still do not find any solution, then you can finally try the solution below. First, you need to have ADB drivers installed on your PC and you need to enable developer options and debug mode on the phone. Then try using the following commands as below in command prompt (cmd if you using Windows system) or Terminal (if you are using Ubuntu)

1. `adb reboot bootloader` (useful to start bootloader of the phone)
2. `fastboot erase modemst1`
3. `fastboot erase modemst2`
4. Press the lock key to start the phone from bootloader mode

---
Tags: 7.0-nougat, motorola-moto-g
---


# Question
Title: Android virtual keyboard app that support physical keyboard language and layout change
Apparently on many Android phones on Android OS 7+ there is no option to change external physical keyboard language/layout without going into device settings.

Is there a good virtual keyboard, which also supports changing layout/language for the attached physical keyboard on wide range of devices?

Solutions that I found:

* Dedicated keyboard app for typing with physical keyboard. Popular recommendation is https://play.google.com/store/apps/details?id=com.apedroid.hwkeyboardhelper&hl=ru. There are other options like Logitech Keyboard Plus app on Google Play. This is inconvinient, as you have to switch between input method every time you plug the physical keyboard.
* Install two keyboards for every language you want to support. Assign proper layouts for them in the settings. Switch between keyboards with Command + Space. This is a kludge and inconvinience.

A few additional points:

* SwiftKey does not support this feature. Changing language with the globe icon does not affect what you type on physical keyboard at the moment of writing this question. See https://support.swiftkey.com/hc/en-us/articles/201591341-How-to-use-SwiftKey-with-physical-external-Bluetooth-keyboards-on-Android . Same with Google Keyboard at least on One Plus 3 and Xiaomi MI5 with latest OS updates.
* There are multiple threads suggesting to add several language in physical keyboard settings. However most of them are for Anrdoid 5-6, where keyboard layout switch with Ctrl-Space appeared to be standard feature in most ROMs. It appears that this is no longer the case.

# Answer
> 0 votes
The following software have independent physical keyboard layouts not tied to the OS layout in any way.

1. **ruKeyboard software**. It's a software+hardware keyboard initially made for Android smartphones with qwerty keyboard. It supports Android 2.3-9 and allows to add your own software and hardware layouts for different languages (you need to modify the XML files inside apk, but it's not that hard). It's abandoned and not open source, but still works fine. Software and physical keyboard layout switching is independent. You can configure your own switching combination on physical keyboard.
2. **AnySoftKeyboard** is what you can call a modern alternative to ruKeyboard. It's a software keyboard with support for physical keyboards. You can define your own layouts just as in ruKeyboard, by editing xml files inside the apk. Layout swithing is unified: if you switch the layout on software keyboard, it would switch on hardware keyboard as well. It's open source.

---
Tags: keyboard, external-keyboard
---


# Question
Title: Does LineageOS allow us to install apps via Google Play?
Someone told me we can't install Google apps after installing LineageOS and it doesn't support Google Play.

What is the truth behind this? Can I access Google Play in LineageOS?

# Answer
LineageOS is Open Source OS. Google apps like Play Store, Gmail, Maps etc are proprietary Google products and cannot be bundled with LineageOS due to licencing issues.

However, you can always download these **G**oogle **A**pps **P**ackages (Gapps) to run with LineageOS. These come in different flavors, starting with minimal Google services to full fledged suite of Google Apps . For more details see LineageOS Wiki. Related Which version of Gapps to install for Lineage?

So, LineageOS by itself does not have Google Play but by installing Gapps of your choice, you can have Google Play and other Google apps of your choice.
> 16 votes

---
Tags: google-play-store, lineageos, google-apps
---


# Question
Title: How does Battery Management System work (at the hardware-interface level) ? And how is idle self-discharging of batteries handled?
I came across the following when I was reading up about fully drained batteries in phones:

> *If the phone is OFF for a month, then it is probable that the battery has gone down to a point that the BMS has shut it down. The BMS won't allow you to charge the battery because, in its own assessment, the battery is dead. Best way to test this case is to have another same phone with a good battery (or just a new battery altogether), detach the cable from that and test on yours.*

Referring to the above, do Android phones have their BMS as part of their bootloader or kernel? Or is it a part of the Power IC itself?

Are there any safety mechanisms related to booting up a device with fully drained batteries? If so, why?
(Came across something similar)

> *I've had difficulties with phones in the past after batteries have fully discharged - eg the Moto G5 had some battery protection "feature" that stopped it starting up if it thought the battery was fully discharged - it was a bit over sensitive so would sometimes assume the phone was fully discharged when it wasn't. Try leaving it on charge for 24 hours or so then holding down the power button for for at least 20 seconds with it still on charge.*

# Answer
*Battery Management System* is a very broad term that covers battery charging /discharging/monitoring / power IC /responding to critical events like shutting down on low battery level / User Interface actions (increasing CPU speed when user touches screen - *touch boost*) and many other things.

* Your first quote is only instance of management system where the battery voltage has fallen to a very low level, and a protection circuit kicks in and prevents further charging. This protection mechanism is mandatory

> To prevent the battery from over-discharging, a control circuit cuts off the current path at about 2.20V/cell.

* Booting up from a fully drained battery, is not permitted, since it would only further drain the battery. Booting consumes a lot of power and doing so on an already drained battery can lead to irreversible damage to the battery. And what's the point of booting up, if the device can't be used thereafter?

There are ways to overcome these problems but it is best left to qualified technicians to handle it. There are many questions on this site dealing with such situations.

As you would guess from the first paragraph, this being a complex system, it is dealt at a *low level*, meaning at a *kernel* level with proprietary hardware interfaces. Related Where are the battery capacity files located?
> 1 votes

---
Tags: battery, charging, battery-life
---


title: Xiaomi source code

text:
# Question
Title: Xiaomi source code
Does anyone know where I can find the source code of Xiaomi. I don't mean only the kernel code like this here, but the whole code for their OS just like I can get it from here for Android in general.

# Answer
> 1 votes
You won't find it

OEMs are *forced* to reveal kernel code because they use Linux kernel code suitably modified (see licenses) . Rest is proprietary. They are not obliged to share and on the contrary, it is guarded so that competitors do not take advantage of their features

---
Tags: xiaomi, open-source
---


# Question
Title: I forgot the email i used to register on my Samsung S6 edge+ mobile
I forgot the email i used to register on my Samsung S6 edge+ mobile, it does not allow to use the phone without entering the registered email, Is there any way to find the email account.

# Answer
> 0 votes
Get the originall bill to prove your ownership , contact customer support with IMEI of your device and tell them your problem

---
Tags: samsung, samsung-galaxy-s-6-edge+
---


# Question
Title: How to use Android sdk to flash android system images
Can I use android sdk to flash a system image to a device? If yes, how to do?

Device: Samsung galaxy note3

Model:SM-N9000

Can I install an Android generic system image?.

# Answer
> 3 votes
The Android SDK contains `fastboot` for flashing images. But Samsung devices are usually not flashable via fastboot.

Instead you need a software named `Odin` or for Linux an "Odin clone" named `Heimdall` exists that can AFAIR also flash firmware images on Samsung devices.

For flashing an "Android generic system image" the current firmware of a device has to be compliant to Googles "Project Treble". There are apps in the Google Play Store that claim to be able to check if a device is "Project Treble" compatible. But I don't have any experience how accurate those apps are.

---
Tags: rom-flashing, android-sdk
---


# Question
Title: How can I install flashable zips in Android-x86
I have recently started running Android-x86 version `6.0-RC1` on my iMac, and I am considering making it on of my several daily drivers. There is one major issue however that is casting some doubt: I cannot seem to find a way to install flashable zip files. I have looked into a custom recovery, however apparently the directory structure of Android-x86 is too different from that of its mobile-device counterpart to run or even install one directly. I have attempted to use Chainfire's FlashFire, however it unsurprisingly does not work for similar reasons to the last method.

I've read on a very short conversation in the XDA-Developers forum discussing this topic that a recovery would be relatively unnecessary because "you could simply use a lightweight Linux distro as a recovery". I am assuming from the wording that you would do this by booting a small Linux distro on the same machine, mounting the main image for Android-x86, extracting the flashable zip and running the install script contained within, however I am entirely unsure as to whether or not this method would work in practice, as I cannot find any more info on it.

I need the ability to flash a flashable zip file as it is the only way as of current aside from using a custom recovery to install the Xposed framework on android, upon which I rely heavily for everything from personal conveniences to more manually configurable security functions to ease of development. Given Android-x86's inherent compatibility with virtually anything compiled to run on an Intel Atom or Celeron based android device the lack of Xposed is the one factor stopping me from being able to attempt custom ROM development, as well as starting to port several already under development projects that have been until now exclusive to BSD/Debian distros over to rooted Intel based android devices.

UPDATE: I've managed to mount the Android-x86 fs from a live GParted CD, and chroot to it, but when running  `flash-script.sh`  it starts the installer, and output the following error log:

```
******************************
Xposed framework installer zip
******************************
-Mounting /system and /vendor read-write
/tmp/META-INF/com/google/android/flash-script.sh[102]: can't create /dev/null: No such file or directory
/tmp/META-INF/com/google/android/flash-script.sh[103]: can't create /dev/null: No such file or directory
/tmp/META-INF/com/google/android/flash-script.sh[104]: mount: not found
/tmp/META-INF/com/google/android/flash-script.sh[105]: can't create /dev/null: No such file or directory
-Checking Environment
/tmp/META-INF/com/google/android/flash-script.sh[112]: head: not found
/tmp/META-INF/com/google/android/flash-script.sh[112]: sed: not found
/tmp/META-INF/com/google/android/flash-script.sh[114]: cut: not found
*Continues till line 121*
 Xposed version:
! Wrong platform: arm
! This file is for:
! Please download the correct package
! for your platform/ROM

```

Now I'm assuming the reason this happened is that the Linux version I'm using is too lightweight and doesn't include the required programmes, however that does not explain the fact that the error log reports the system as ARM and claims the x86 version is incorrect for my platform given that I'm running a copy of Android-x86, so if anyone has insight, please supply!

# Answer
> 3 votes
This is caused by the install script incorrectly detecting your platform as ARM.

In order to fix this issue, which is specific to the Xposed ZIP file, you must ~~hack~~ edit **flash-script.sh**.

Search for:

```
if [ -z $XVALID ]; then
  echo "! Please download the correct package"
  echo "! for your platform/ROM!"
  exit 1
fi

```

Comment out the `exit` command, by adding a `#` before it.
At least in the current version of Xposed (v86), this is **line 162** of the **flash-script.sh** file.

The resulting block will be:

```
if [ -z $XVALID ]; then
  echo "! Please download the correct package"
  echo "! for your platform/ROM!"
  #exit 1
fi

```

Source: How to Install Xposed on MEmu Lollipop Beta

**\[Edit\]** Since you are having a great deal of trouble, I'm going to provide detailed fool-proof steps for successfully installing Xposed on Android-x86:

1. Download Xposed ***to your computer***
2. Extract the contents of the compressed file somewhere
3. From your file manager (Finder | Windows Explorer | Nemo | Some other), open the directory where the file contents have been extracted to and browse to: `META-INF` \ `com` \ `google` \ `android`
4. Select the entire contents of this directory and `Control` \+ `C`
5. Go back to the directory containing the resulting files (same as Step 3) and then `Control` \+ `V`
6. Among the files you have just copied is `flash-script.sh`. Now you must edit this file with a text editor of your choice, according to the previous part of this answer.
7. Save and close the file. *Make sure it is actually saved*.
8. Make a new `.zip` file with the updated contents, including of course the `flash-script.sh` file which you have edited.
9. Send this *new* (make sure!) `zip` file to your **Android-x86** environment with a method of your choice. ADB, e-mail to yourself, some anonymous temporary file upload service, etc.
10. From Android-x86, extract the contents of this new `zip` file.
11. Launch Terminal Emulator.
12. Type in `su` and hit `Enter`
13. If you are asked for Super User privilege, **confirm** (i.e. hit "Allow")
14. Type `sh "flash-script.sh"` and hit `Enter`
15. Reboot your phone and launch the Xposed APK to confirm whether it's been successfully installed.

# Answer
> 0 votes
Why can't you unzip the file on Windows and simply do

```
adb push apk\purenexus-gapps-mm-mr1-x86-leanback-20160202-signed\system\. /system

```

# Answer
> 0 votes
I was also looking for something like a custom recovery for android-x86. But, it seems to be quite unnecessary for android-x86 in the way they are as in mobile phones.

Gladly i found something related called `GearLock`. Also found a bunch of flashable kernels and some other good stuff. Surprisingly it got some sort of recovery mode and flashable zip support.

Leaving the link below in case it sounds interesting.

https://supreme-gamers.com/resources/gearlock-custom-recovery-replacement-for-android-x86.40

---
Tags: android-x86, zip, x86-processors
---


# Question
Title: Enough space, downloads most of the app, then says not enough space
So I'm trying to install a little game called Xcom: Enemy Within, Google Play store downloads most of the App- I'd say 99% at least...then it gives me an error and says there's not enough memory- I have about 338 MB left after that.

MORESO- I have an external mini SD card that I want to put this on but it won't allow me to download directly to it.(Which- I must say is a dumb design oversight that...well the ability to do that has been around since Windows XP guys come on) so long-term it isn't going to be that big of an issue. What can I do?

# Answer
> 0 votes
Try clearing Play Store's cache and data and see if that helps. To do this, goto

`*Settings > Apps (or Manage Applications)*`

Swipe to `All`

Then tap on Google Play Store\> Clear Data Reboot and try the download once again.

# Answer
> 0 votes
Actually almost every good game these days requires an additional file, which is probably used by the developers to store some data on the phone and also to probably unpack all the compressed files. Try having at least 1 GB of your memory free and retry the download, it should not have any issues

# Answer
> 0 votes
When this happens to me I just delete some.of the android apps your phone comes with that you never use like the music app and video app, duo the weather app then download it. Then I move the file to my sd card havent found one good app for this that isn't virus free or doesnt slow your phone down. Hopefully this either helps or you already currently do this.

---
Tags: google-play-store, insufficient-memory
---


# Question
Title: Vodafone VFD 100 android 5.0 phone shows "no command" on recovery mode
I have a problem with my android 5.0 Vodafone VFD 100 phone. So it restarted on its own, and then showed the message “Android is starting, optimizing app x of y” (not the first time). There were 19 apps in total and it got stuck on app number 11. I got impatient and since restarting it brought me to the same place, I removed the battery while it was optimizing apps. Now it won’t boot thereafter. I have tried several suggestions to no avail. When I switch to recovery mode, it displays “no command” on a blank screen after “input language=\> English” after choosing the language. Please help as soon as possible since I’m currently stuck. Regards.

# Answer
You should flash a custom recovery, then reboot your phone in recovery. And then in the recovery, wipe the Dalvik-cache.
> 1 votes

---
Tags: 5.0-lollipop, recovery-mode
---


title: Bootloader frozen on Nexus 10

text:
# Question
Title: Bootloader frozen on Nexus 10
My Nexus 10s bootloader is stuck, it keeps saying "Downloading... Do not turn off target!!" and fastboot commands have no affect on it. I also can't use the volume rocker to boot into recovery or reboot the bootloader. If I try to boot it shows the Google logo and then the android boot-animation, which continues on indefinetly.

When this happend I was trying to flash the new system image onto it. I had already unlocked the bootloader without problems, but it may have been accidentaly disconected while running the flash-all script.

Can I restet my bootloader or flash android in a different way?

# Answer
> 1 votes
You need to hold Power until it shutsdown, then you need to hold Power and Volume - and + until you see the fastboot screen

---
Tags: boot-loop, fastboot, bootloader
---


title: ADB connect to device with Python

text:
# Question
Title: ADB connect to device with Python
Can I connect to an Android device for the first time with python adb, in USB debug mode, without having to manually allow the connection?

This is my code from python adb library:

```
signer = sign_cryptography.CryptographySigner(
            op.expanduser('~/.android/adbkey'))
        # Connect to the device
        device = adb_commands.AdbCommands()
        device.ConnectDevice(port_path=None, serial=deviceIP, rsa_keys=[signer])

```

When I call this piece of code, it opens the pop up message with "Allow USB debugging ..." on the device. Is there a way to go around this pop up?

# Answer
> 2 votes
This popup is there for security reasons and can't be bypassed without system manipulation (root required).

Without that dialog an Android device would be once the user activated ADB wide open to anyone who connects to the device via USB. Therefore since Android 4.2 if I remember correctly Google added the RSA based authentication on ADB level to avoid unauthorized data access via ADB.

---
Tags: adb, python
---


# Question
Title: Open links to particular domain with particular app
I use a browser as my default, but wish that links to certain domains be opened *by default* with another browser. For example if an app has a button that opens a website it normally opens it in the default browser. For most situations this is fine, but there a few exceptions I would like to change the browser the site opens in.

Is it possible to set "rules" for default app per domain?

# Answer
> 1 votes
Strictly speaking this is not an answer but a good workaround. My take on the issue is NOT to set a default browser in Settings. Whenever I click on a link I get the pop-up asking me to choose the browser/app to use. Like that, I can choose to open the links with the browser more appropriate for my needs.

# Answer
> 1 votes
AFAIK stock Android itself doesn't have any such feature. But it totally depends on the app you are using to open other links. Apps can open certain links with other apps/browsers. For instance browsers (like Firefox) can open `facebook` and `youtube` links in their respective apps if installed. Also it depends on the app which you want to open for a certain domain (if it accepts URL forwarded by other apps). It depends on intent-filters an app declares in its `AndroidManifest.xml` file. For little more details on this see this answer.

---
Tags: default-applications
---


# Question
Title: How do I run 2 Android phones on a PC simultaneously so that DroidCam on one phone & TC games screen mirror on another phone?
I have 2 Android phones and I want to connect both of them to my PC via USB cables like this:

1. Motorola Moto G3 5.1.1 (Lollipop) goes to the DroidCam app to use as a webcam.
2. Samsung S4 Zoom (KitKat) goes to mirror screen Android to PC app called "TC games" for screen share and controlling my phone from my PC.

Right now, I have Universal ADB Driver installed on PC and I can't run both programs at the same time. This message pops up when I use DroidCam at the same time with Tc games: "adb server is out of date. Killing...".

How can I connect Motorola to DroidCam as a default, and TC games to Samsung and run both of them at the same time without any problem?

# Answer
> 0 votes
Applications like DroidCam or Scrcpy that require adb to work often include an own version of adb. For DroidCam you can see it in the sub-directory `adb` the three files that belong to adb:

* adb.exe
* AdbWinApi.dll
* AdbWinUsbApi.dll

However adb is designed to be present one time on a system because when it starts it remains loaded invisible in the background.

Now if a program has it's own adb version it prefers this versions and therefore when it starts it's own adb version the previous adb daemon running background is killed and replaced with the different adb version.

In your case the message `adb server is out of date.` additionally indicates that you have two different versions of adb installed and the newer version kills the older version that was already running (old version = out of date version).

Some programs like Scrcpy allow to specify via environment variable where `adb.exe` is located so that you can redirect it to one adb versions that is available on your system. I am not sure if DroidCam also supports such an environment variable.

But in any way you should "equalize" all adb versions you have installed:

1. Search your system where it has `adb.exe` installed
2. On each found `adb.exe` execute `adb.exe --version` and identify the newest version (the version installed with Android Studio shows at the moment `Android Debug Bridge version 1.0.41 - Version 30.0.2-6538114`
3. From the newest adb version copy the three files `adb.exe`, `AdbWinApi.dll` and `AdbWinUsbApi.dll` to the other locations `adb.exe` was found overwriting the existing files.

This should at least solve your problem that the adb versions installed have a different version.

---
Tags: adb, usb, remote-control, webcam, screen-mirroring
---


# Question
Title: Simplest way to transfer files from PC to Android device (wireless)
What's the simplest way to transfer files (often around 100 MB) from PC to Android device, **with wireless connexion** ?

Should I use an application for this?

*Remark 1 : I want to set "wifi=off" after the file transfer is done, because I never use it except for the file transfer. Moreover I really would like to do a direct transfer PC -\> Android device ; no Dropbox or similar tool.*

*Remark 2 : I have a Samsung Galaxy 3.6 Player YP-GS1CB (limited to Android 2.x as far as I know)*

*Remark 3 : If possible, I would like to be able to see the Android device's microSD card filesystem from computer, access to subdirectories, copy files there, etc. Would a FTP server on the Android device be a good way to do it ? If so, with which app?*

# Answer
> 3 votes
Airdroid can perform file transfers and it runs on 2.2 and above.

All features:

* SMS: send and receive individual or group messages.
* Apps: Import and export .apk files.
* Files: Manage files on Android and transferring files between Android and computer.
* Photos: View and manage photos on Android and transferring photos between Android and computer.
* Music & Videos: Play and manage music & videos on Android and transferring them between Android and computer.
* Ringtones: Set music as ringtone and export any ringtone.
* Contacts: View and edit all the contacts.
* Screenshot: View the real time screen of Android devices, take static screenshots. (root required)
* Camera: See through the lens of both front and back camera, also supports flashlight.
* URL: Push url to Android and open automatically open it with Android browser.
* Clipboard: Share clipboard content between Android and computer.

# Answer
> 1 votes
I've been looking around for ages after an adequate solution and was frustrated to find no official apps that provide this functionality.

Link to PC changed everything.
It's a Microsoft app that allows you to use your phone from your PC. It supports a wide variety of features, including screen-casting, file-transfer by drag and drop, send and receive messages and phone calls and more.

I might sound like Microsoft's salesman but I have no affiliation whatsoever, I'm just a fan of this app that made life so easier for me.

# Answer
> -1 votes
I developed WiFi FTP Server, which should solve your problem. I would recommend that you put the phone in wifi-tether mode and then transfer files.

---
Tags: applications, wi-fi, file-transfer, ftp
---


# Question
Title: How to flash a custom recovery with heimdall (without touching the main system)?
The first recommended step in the installation of CyanogenMod on Samsung Galaxy S is flashing a custom recovery like ClockworkMod or the one from Replicant with a command like:

```
heimdall flash --kernel path/to/recovery.img

```

Now I feel that the instructions might be misleading:

I have done the first step wanting just to have a custom recovery mode, without proceeding to replacing the main OS on the device.

It seems I have done that wrong, because the device now always boots into the recovery mode.

What would be the correct heimdall command to just install a custom recovery system without touching the main system?

# Answer
It depends on your PIT partition file.

Before you do anything using heimdall, print the partition table of your phone.

```
sudo heimdall print-pit

```

The output of the file is the location assigned to each partition. For example on my Galaxy S3, I have something like this:

```
--- Entry #20 ---
Binary Type: 0 (AP)
Device Type: 2 (MMC)
Identifier: 19
Attributes: 5 (Read/Write)
Update Attributes: 1 (FOTA)
Partition Block Size/Offset: 491520
Partition Block Count: 32768
File Offset (Obsolete): 0
File Size (Obsolete): 0
Partition Name: Kernel2
Flash Filename: recovery.img
FOTA Filename:

```

Now this tells me 3 main things:

* Name the flash file: `recovery.img`
* Location of the identifier `19`
* And finally the name of the recovery partition `Kernel2`

**What does this means?**

This means if I want to flash a recovery image I should use either the identifier 19, or the name Kernel2.

```
sudo heimdall flash --19 any-type-of-recovery.img

```

or

```
sudo heimdall flash --Kernel2 any-type-of-recovery.img

```

**Bottom Line:** Look at the pit file to figure out where to flash your recovery.

Cheers, Mel
> 16 votes

# Answer
One effective way with Heimdall is to just run

`sudo heimdall flash --RECOVERY twrp.img`

Worked for me on an S3 AT&T

Then when phone reboots, go into recovery via

`adb reboot recovery`
> 4 votes

# Answer
I do not know the partition mapping of the SGS, so my only suggestion would be to use the GUI (heimdall-frontend) and select the recovery partition only. As of restoration of the original system, my suggestion is to reflash the original ROM without touching /data. But backup it first using an advanced custom recovery like this one if possible: http://forum.xda-developers.com/showthread.php?t=2201860 (the key feature is custom backup/restore)
> 1 votes

# Answer
```
heimdall flash --Recovery /Path/recovery.img --Kernel /Path/recovery.img

```

Replicant OS Recovery install
> 0 votes

---
Tags: samsung-galaxy-s, rom-flashing, recovery-mode, heimdall
---


# Question
Title: How to unlock my device after locking with Google's “Find My Device”?
I now have my phone (Xiaomi Redmi 4), but it's locked from Google's "Find My Device". Everyone keeps talking about a password option in Find My Device, but nothing like that exists! How do I unlock my phone without erasing the data? Here's all I see on Google's Find My Device:

# Answer
> 1 votes
I managed to solve this, so for future readers:

* I went to emergency and pressed back(this brought up the phone lock screen with the pattern option). Rebooting seems to also bring up the lock screen temporarily.
* I managed to enter the lock-screen pattern correctly from muscle memory(even though it didn't seem to work all the times I had tried before). I believe if you enter it incorrectly enough times, it'll let you enter your google account info to reset the password, but I never got to that point.
* After the phone unlocked I changed my default password and all seems good now.

I'm still not sure why google wouldn't let me set a temporary password. God help anyone that doesn't remember their original one.

---
Tags: xiaomi, locked-out, find-my-device
---


# Question
Title: Prevent bloatware which gets reinstalled from starting
I had a problem with this app (I found on a package with the same name on Google Play, but I doubt it's the same thing) which kept getting installed all by itself again and again, and once istalled, it would start using my limited 3G internet traffic. My phone is not rooted and installing apps from unknown sources is forbidden. A scan with Malwarebytes doesn't detect anything.

From this I deduced that the offending app is somehow bundled by the manufacturer, so I won't be able to get rid of it without rooting (which I don't plan to do). Since uninstalling it didn't help as the app would get reinstalled, I figured I strip it of all permissions and forbid it to use background data. So far this solves my immediate problem with 3G traffic consumption.

However, I see that the app still gets started, consuming RAM (second entry in the list on a freshly booted phone, right after "Android OS") and creating storage data and cache objects. Is there anything I can do to prevent the app from getting started?

Edit: I have tried `adb shell pm uninstall --user 0 com.freshmenu` which indeed removes the package, but it gets reinstalled after a while. I have tried to search for `installer` in `adb shell pm list packages -i com.freshmenu`, and it's indeed set to `null`, so I could not discover the offender responsible for reinstalling. I have run `adb shell dumpsys package` to discover which apps have `REQUEST_INSTALL_PACKAGES` permission. There are 4 of them, and they don't look suspicious:

* com.whatsapp (installer=com.android.vending)
* android (installer=null)
* com.google.android.apps.docs (installer=com.android.vending)
* com.android.chrome (installer=com.android.vending)

There are 5 more apps having `INSTALL_PACKAGES` permission:

* com.android.vending (installer=com.android.vending)
* android (installer=null)
* com.mediatek.datatransfer (installer=null)
* com.google.android.packageinstaller (installer=null)
* com.android.managedprovisioning (installer=null)

# Answer
> 1 votes
After a rather long exchange in the comments, it was discovered that installing a dummy package with the same name as the bloatware helps, by making the bloatware installation silently fail.

@Firelord was nice enough to make a dummy package for me, future readers could make their own packages with Tasker \+ Tasker App Factory plugin. Those who don't need Tasker and don't want to pay for it should be able to grab a 7-day free trial here.

# Answer
> 0 votes
I'm of the never unlock an Android Device page.

I use the Applications tab, go in and disable as much of the bloatware I can. Clean/clear the cache. That strips them down to least objectionable. Some you can't disable, but you can reset to factory settings & uninstall all updates. It again saves some space.

I've had an 8gb phone, on Android 6.x. It sucked big time, & I could barely get the most needed Google Apps installed & updated. The HTC & US Cellular bloat-scheize was worthless!

---
Tags: 6.0-marshmallow, permissions, bloatware
---


# Question
Title: How can I install Google play services on Android 2.2?
I have an unbranded tablet running android 2.2.

I was trying to develop an application using gcm and wanted to test it on the tablet. But somehow SERVICE\_NOT\_AVAILABLE error was coming. I then came to know that for android devices having version less than 4.2.2 , google play services has to be installed in the device for GCM to work.

Firstly, i tried to search for Google Play Services on PlayStore app. No result was shown. So instead i tried searching for it on phone's browser. So when i saw the link on browser, a popup appeared asking for whether to open with browser or Playstore. I chose playstore and the link opened. Which was kinda surprising because no result was shown earlier when searching through Playstore.

Secondly, when i tried to install the app it gave an error saying that Incompatible with other applications(s) using the sameshared user ID.

So, this means i cant test GCM on my device. Any advice ?

Thanks in advance :)

# Answer
> 2 votes
I've just found the Google Play Services on the Play Store, here. Try opening this link on a desktop webbrowser and login into your Google account, then your tablet must be registered to your account, right? If it has any restrictions, the restriction will be shown to you when you try to hit install.

# Answer
> 0 votes
I don't remember what version was original in 2.2 Froyo.

Here is a nice article listing all Android Versions, Support levels, and Features! I stand corrected, according to the info in the article below, on Android 4.x.

On March 6, 2012, the Google Play store was announced, merging the Android Market, Google Music, and the Google eBookstore. This update rolled out to devices running Android 2.2 or later.

https://www.lifewire.com/android-versions-4173277

I believe it's time for more than a 2G phone. Sorry. A phone that old has so little RAM, few than the factory-installed apps could be installed anyway. I still stand by my "old phone" comments.

good luck!

---
Tags: google-play-store, google-play-services
---


# Question
Title: Is Google Voice susceptible to hacking like regular MMS or Whatsapp messages?
I have been using Google voice in a public facing way so as to reduce the chance of receiving malware messages over SMS/MMS or Whatsapp.

But is it just as susceptible for someone to be able to sneak something in over a GVoice MMS or SMS?

I am worried because I received a photo from an unsolicited phone. Is there a chance that having clicked on that photo (which just enlarged and presented information about itself) compromised my phone? For context:

# Answer
Google Voice, aka Hangouts, is fully encrypted point to point. If you've posted anywhere with your Gmail account, you could have a message pushed to you. Unless you have OS 6-10 you'll need an "anti-spam" app HIYA is a very good one. The newer OS have been given the ability to flag calls & SMS - MSMs as spam. Good luck.
> 0 votes

---
Tags: security, sms, malware, mms, google-voice
---


# Question
Title: What does an Android-encrypted SD card do/look like on PC
Long story short - my Galaxy Active S8 apparently got wet inside, and stopped working (although I think I can revive). I've let the Samsung microSD card for almost 24 hours, and as it's simply a card I believe the data should be easily retrievable as I've had SD cards get wet before, but would work after drying.

However, when I put the microSD card in my PC, doesn't show up in the Windows Explorer like normal. I don't see an additional drive pop up at all.

I can't remember if I encrypted my card or not. So, I'm hoping I did, and that's why it's not appearing as mounted on my PC. What would an encrypted SD Card do, or look like, when inserted in a computer? Would it appear as a drive, but prevent any access - or would it simply not show up at all?

# Answer
You could look at it with gparted in Linux. If it's toast, it is.
Give it a try ... it is the standard partition mounting gui tool in Linux.

Else take it to a repair center from your Phone Service Provider. Give them a try.
> 0 votes

---
Tags: external-sd, encryption
---


# Question
Title: How can I download a torrent to the SD card using BitTorrent?
How can I download a torrent to the SD card using BitTorrent?

I tried to go to Settings -\> Default Download Folder, but I can't see to be allowed to browse to the SD storage location (see error below when I click on the back arrow):

I use BitTorrent.

# Answer
> 1 votes
Saving to SD card isn't officially supported - this is not documented in the support (at least, I couldn't find it) but it's mentioned in reply to user review (user name - Sujeet)

---
Tags: sd-card, downloading, bittorrent
---


# Question
Title: How do we verify that a phone call is going through WiFi?
# How do we verify that a phone call is going through WiFi?

I am hoping that there is some special little icon like this one:

Cricket wireless is my provider and my phone is a Motorola moto g7 SUPRA.

My carrier does support WiFi calling. I spent an hour on the phone with them trying to answer the question the above question. The device also supports WiFi calling and reports that WiFi calling has been correctly activated

Our local cell towers went down today so I wanted to have another way to make phone calls that did not depend on an active cell tower. I set up WiFi calling on my phone and it confirmed that it was set up correctly and enabled. The WiFi also indicated that it was connected. It is a very strong connection because it is only ten feet way and direct line-of-sight.

After I did this I still experienced the same issues that I had because of the bad cell tower. This would seem to indicate that the phone calls were not going through WiFi.

# Answer
> You can test whether Wi-Fi calling is working by activating Airplane mode, then turning just Wi-Fi back on, and connecting to your home Wi-Fi network. The icon should appear in your notification bar and you’ll be able to make or receive calls. Testing WiFi Phone Calling

I tried this and it worked. I turned my WiFi router off and because I was still in airplane mode phone calls did not work. This proves that the above advice is correct.
> 1 votes

# Answer
I'm using a Pixel 3 XL, I've not "seen" any top menu icon or place to know if my phone is using 802.11 protocols for a call.

The only way I know to easily force a TCP/IP 802.11 protocol is to use Google Hangouts. You can dial any phone number from there for free.

I have 2 "Google Phone Numbers" but I've not seen/dug for the information on how to receive calls on those numbers.
> 0 votes

---
Tags: wi-fi, calls
---


title: Running sh script non rooted

text:
# Question
Title: Running sh script non rooted
I am not a developer and I have an application that I need to run on my Samsung 10+ which uses a plugin developed for the app to receive sensor data from a separate android device via Bluetooth connection. The Samsung 10+ is typically connected to the sensor via the Bluetooth MAC address. As the sensor data is received it is displayed on a map overlay on the Samsung. I don't have the actual sensor, as I don't need it for my purposes, but I have a script which can be run which is supposed to output representative data so that when I connect the two devices I should see the data displayed. What I need help with is identifying how you actually run a script on an android if you are not a superuser. Thanks for any assistance.

# Answer
For executing scripts there are two possibilities:

## Via Android Debug Bridge (adb)

ADB is usually used when the device is connected via USB to a PC. But for trusted Wifis there is a also a possibility to run ADB over Wifi (but the connection is play-text like terinal which may lead to security problems, therefore the limitation to trused Wifis). Then you can execute a script that is e.g. saved in `/data/local`

## Use an app like Termux

Apps like Termux provide an environment similar to a Linux distribution with packet manager and execution environment. You don't need a connected PC. However as Termux is an app the Android permission system applies you may get a problem accessing the Bluetooth hardware as Termux as far as I remember does not requests the Bluetooth permissions on installation.
> 1 votes

---
Tags: applications, rooting, bluetooth, mac-address
---


# Question
Title: Disable vibrations for notifications on Xiaomi Mi A3
I have a Xiaomi Mi A3 on Android 9. I want to disable the vibration when a notification arrives for all apps.

I did not know that by disabling notifications, I won't be able to receive calls since notifications for the calls also did not appear, only the ringtone played, and upon unlocking the phone there was no display of who was calling.

Somehow I enabled notification for all apps but it is vibrating each time.

How do I disable vibrations for notifications like messages on Telegram, Facebook, WhatsApp?

# Answer
You wont find any vibration settings to change in *Sound settings.* You will have go for *Settings › Accessibility › Vibration&Haptic › Notification* to turn off vibration.
> 1 votes

---
Tags: notifications, 9.0-pie, xiaomi, vibration
---


# Question
Title: "Moisture has been detected" even after 2 weeks, also in safe mode
Two weeks ago my Samsung Galaxy S10e got a bit wet while in my pocket under heavy rain. The phone did not *go inside water*, but it was pretty wet.

Since then, I got this message from time to time when charging:

> Unplug charger
> Moisture has been detected. Unplug the charger and wait until both the charger and USB port are dry.

1. Yesterday, I could not even charge my phone once, because the message appeared every single time I tried.
2. I let the phone at the output my air conditioner in dehumidifier mode for the whole night.
3. Still the same problem.
4. I tried with 3 different USB cables, and also 3 different power sources.
5. The charger port looks perfectly clean.
6. I don't have a wireless charger.
7. The message (and vibration) appears even in safe mode and in Emergency mode, and also when the phone is off.

In recovery mode the message does not appear, but the phone does not charge (when I left the phone in recovery mode for one hour, the battery went from 53% to 48%, even though the USB cable was connected).

I believe that the message is erroneous, I can't see how moisture could subsist after two weeks and a night of dehumidification. How can I fix the problem?

I live in Japan, where outside air humidity is high, maybe that's a factor?
My phone is rooted, if that can help.

# Answer
A few more weeks and the message disappeared.

I guess some part of the phone was still humid despite all of that drying.

Conclusion: Let you phone dry as long as it takes.
> 0 votes

---
Tags: charging, samsung-galaxy-s-10
---


# Question
Title: Is there a way to mirror my screen to a PC with sound?
I just want to make app reviews in video. Some of these app's eventually will be games, so if I can mirror video to my PC and capture the audio at the same time it would be great. So, my question is : Is there a way to mirror my screen to a PC with sound?

# Answer
install "Scrcpy" in linux / need to start adb connection first either usb or over the IP.
> 1 votes

# Answer
Download third party software **Wondershare MirroGo**. It works great (Not promoting).
Some instructions to follow:-
\- You can download Mirror Go from Here
\- After downloading and installing, Enable your phone's USB debugging, see here - How to enable USB Debugging.
\- Simply connect your phone with USB and accept the adb authorization request pop-ups on screen and you're done.
Main advantages of this software is that:
\- You can render your phone's screen on Desktop/Laptop.
\- You can play games/movies/songs through MirrorGo.
\- You can control your phone via MirrorGo through Mouse/Keyboard.
\- You can record your screen via MirrorGo during the live view of your phone in your laptop/desktop.
You can Also use MirroGo with MobileGO ( an advanced software to backup your whole phone with one click and tons of features and works for Iphone too).
> 0 votes

---
Tags: screen-sharing, audio-recording, screencast
---


title: Get number of SMS notification

text:
# Question
Title: Get number of SMS notification
Some services use SMS notifications. Examples would be Amazon and others for 2FA, some banks for TAN services and so on. Today I received an **phising attempt via SMS** for a bank account. It contained a shortlink (no, I didn't open it). I called the bank to notify them about those attempts and wanted to hand over the number, so they can try to take the account at its origin down. The **problem** was: I could not retrieve the number.

* The device runs on Android v10.
* Normally you can look up contact details by clicking on the senders name on top. This does not work for this kind of notifications.
* It's not a *Flash SMS*. It's stored in the inbox permanently.

*Note:* I know this question sounds basic, but neither me nor other colleagues I ask (who also work in tech), could find out *anything* about this … not even an approach to take. So I thought to ask at the collective brain of technology: StackExchange.

# Answer
> 0 votes
Some SMS dont have number but only have header names like sms from google

You can google that header name to find source or since you have reported banks contact ISP they will easily identify who sent you phishing msg to you

---
Tags: sms
---


# Question
Title: Open attachment that contains forwarded email (MIME type message/rfc822)
When I forward an email with Mutt from my laptop, Mutt adds the forwarded email as an attachment with MIME type "message/rfc822".

Unfortunately, Android's stock email client "com.android.email" version 8.1.0 displays the received email like this:

Two things are wrong with that:

* It doesn't show the forwarded email's content.
* It doesn't show the content of the non-forwarded email, the body of the email I wrote in Mutt.

The email displays properly when using K-9 Mail.

Is there a way to make the email app show the email and its attachment?

---

I'm on a Samsung Galaxy J5 running LineageOS.

# Answer
> 1 votes
Gmail cannot support this as I understand from FairEmail discussion on XDA (outlook mail client has related limitations).

There is a workaround, in case one is willing to have the forwarded email as text and not attachment.

OP had set `mime_forward` because they wanted to forward attachments per default . If this is unset as per mutt documentation (to `ask-no` or `ask-yes`), the forwarded email is just text (not a `message/rfc822`) and the stock email app shows it fine as confirmed by them.

---
Tags: stock-email-app, attachments
---


title: COVID-19 contact tracing API stats?

text:
# Question
Title: COVID-19 contact tracing API stats?
Is there a way to see how many unique contact tracing IDs my phone has registered via BLE?

# Answer
> 3 votes
**Nope.**

As part of the joint Apple/Google initiative, a great deal of emphasis is placed on the privacy of the data. Authorized Covid-19 Exposure Notification Apps are the only ones that can use the API. Even the Apps themselves have no way of asking such a question.

On Android the Google Play Service is the one sending out identifiers and recording nearby identifiers.

From **Architecture** section of the documentation:

https://developers.google.com/android/exposure-notifications/exposure-notifications-api

Google Play Services:

* Manages daily random keys
* Manages Bluetooth broadcast and collection
* Identifies whether the user was in close contact with a confirmed case
* Presents permission requests to user for scanning/reading beacons and submitting user keys on diagnosis.

The Exposure Notification App submits a set of suspect identifiers (presumably from a secure medical source, i.e. those who have tested positive) into the Google Play Service API and that returns a risk score on that identifier.

You as a user won't know anything beyond what the app will tell you and the app is limited to the data in `ExposureSummary`/`ExposureInformation` or `ExposureWindow` as found in the Exposure Notification API data structure documentation. Wether all of the detail in available in exposure datasets is presented to the user is determined by the App authors presumably in conjunction with local health authorities.

---
Tags: google-play-services
---


# Question
Title: Jellybean 4.2 Auto-Download and Display file
I'm looking to mount a cheap 7" android on my wall to display current tasks, events and household requirements. Does android 4.2 have a built-in tool that can download a file from a server every 5 minutes and display it on screen? I know it must have rsync but I'm not sure about the displaying information

# Answer
> 1 votes
To do it myself I would sure put what you need for **rsync or scp** in a **shell file** and put the command in cron:

```
Shell : crontab -e
Write : */5 * * * * /home/bly/get_newest_stuff.sh

```

You didn't mention what you want to display... videos, images, text, run loader for a running presentation program.

At least you can open images with ImageMagick.

```
# display whatever.jpg

```

# Answer
> 1 votes
There's no built-in tool to do this - why would there be? - but there are several apps available depending on exactly what kind of information you want to show and how you want it displayed. For example, you could do worse than my app **Showr**, which is a home screen widget. You tell it the web address of an image file, or an RSS feed with images, and how often to update it, and it updates the image and displays it on your home screen. It's a **free** download from Google Play. My users often use it to display information like weather maps and charts, as well as more fun things like webcams, photo blogs, and logos or pictures of things or people they like.

You might also use home screen widgets for other kinds of information. For example, if the events you want to display are in a Google calendar (or can be imported into it from an iCal file or similar), then the Google calendar app can display upcoming events in a list on the home screen.

There's quite a few task list apps too, and they usually have home screen widgets and push capabilities, so if you add or complete a task from your phone, the list on the wall updates automatically. Remember the Milk is one such, which I use, but you have to pay a subscription for unlimited syncing.

---
Tags: 4.2-jelly-bean, sync
---


title: Galaxy S7EDGE Random Reboots

text:
# Question
Title: Galaxy S7EDGE Random Reboots
Two months back from now I installed LightROM oreo, it was fine then but after two months it started to get slow. So I decided to flash pie or Q rom, but from my previous experience whenever I install a pie or Q port of note or some else model it started to get hot or lag. This time I for some reason thought, lets try NOUGAT but it ended up horribly as my phone now keeps on restarting and rom is either not flashed. It stucked in bootloop so I flashed stock rom with REPARTITION OPTION checked in Odin with pit file. Tried every trick in the book that I knew of but it keeps on restarting, meaning if I go to recovery(TWRP flashed via Odin from AP tab) it restarts after couple of moments or became hang in recovery mode. In OS mode keeps restarting after every couple of moments. I have attached the `last_kmsg` file.
last\_kmsg file

**What things I have tried;**
Flashing BL separately.
Flashing CP separately.
Flashing them together.
Trying old TWRP versions.
Using moro TWRP.

MODEL

* ***SM-G935FD***

CSC By default XSG(UAE) changed to PAK(Pakistan).

I posted the same question in xda but didn't get any response so far. I have seen few errors in `last_kmsg` but can't figure out what they are.

EDIT: got hold of logcat during random reboot logcat.txt

# Answer
**SOLVED** it by myself; So the problem was with recovery partition size, now when I installed nougat rom it tried to install bootloader and modem and somehow messed up recovery partition, samsung phones has a restriction for that meaning you can't downgrade either your **Binary** or **Kernel** via *odin* or any other flashing tool for that matter. Not even with twrp, sometime back I also tried another nougat rom but that had an option of if you want to upgrade but this ROM just tried to do without prior asking and it wasn't also mentioned in the OP. So how did I figured it out after three days is by going through `last_kmsg` and `logcat`.

**This is a guide for only for Samsung phones**

How did I solve it is by doing the following things in order;

* Download latest or same binary version of your device firmware. Mine at this time is 8 (B=8. K=7), you can find it by going into download mode (by pressing **HOME + VOL-Down + POWER Button**) and looking on top left corner after few lines.
* Select all the files BL,CP,AP,CSC, and Home USER DATA and then go to second tab in odin check following options: **NAND Erase, Re Partition and F.Reset Time**, uncheck all other like auto reboot and everything else.
* Now plug in your Phone (assuming you have already installed USB Drivers) and click start/flash.
* After it is done, reboot your phone again into download mode by holding HOME+VOLDOWN+POWER key first it shutdowns then it reboots again into Download Mode.
* Now reset odin by clicking on reset button or closing and reopening it, then load TWRP .tar file in **AP** Tab and check all the previous flags except *NAND Erase* and choose your **PIT** file. Google this for your Phone and Carrier. Inmy case it is **PAK** and is bundled with **XSG(UAE)** OMC.
* After recovery is flashed, reboot to recovery mode by pressing HOME+VOLUP+POWER key and go to Wipe\>format and after that flash your phone's specific mods/zips like DM-Verity disabler and any other. Now you have your stock ROM, install Magisk/SuperSU or flash any other custom ROM.

Now the problems that can be solved by this way are if you have messed up your Boot Loader by trying some boot-splash or boot-animation mod (Do all the same things explained above except load your BL\*.tar.md5 file at BL tab not AP tab and same goes for modem(cp) at CP Tab), messed up recovery partition by trying to flash old rom after upgrading your Binary or any other partition related problem.
> 2 votes

---
Tags: kernel
---


title: App resource usage over time

text:
# Question
Title: App resource usage over time
Looking for a way to collect resource usage (processor, at least) on unrooted OS for running apps over time. This last part is crucial, since there are *numerous* apps presenting *current* usage for running applications, but i’m yet to find one which can generate statistics, collected by running in the background, for used apps over a period of time. Basically my question is a duplicate of this one, but it was last active in 2012 and also never really got an answer for realtime statistics collection.

# Answer
From the developer of 3C Toolbox Pro in XDA

> * 3C Task Recorder, whether rooted or not, it can collect CPU, memory and network usage . It creates a CSV file that you can easily use from a PC.

> * If non rooted, you will need 3C Companion PC app to enable memory usage and improved CPU stats.

* Recording options in screen shots below (some of them paid)

* I don't use the recorder. The pro version of Toolbox linked at top is far more versatile and has tons of features (there is a free version too with less features). If you are interested only in usage, the recorder should suffice. Screenshots from 3C Toolbox

**Edit**

OP confirms

> Task Recorder works great and could actually unrootedly track random access memory usage for me even without its companion.
> 3 votes

---
Tags: applications, 6.0-marshmallow, resource-monitoring
---


title: What is MIUI optimization?

text:
# Question
Title: What is MIUI optimization?
In MIUI (an Android ROM), there is an option in developer settings called MIUI optimization. When this option is enabled, an app can't be installed via USB (i.e. from Android Studio).

What is the purpose of this option? And if this option is disabled, will it negatively impact the phone's performance?

# Answer
> 8 votes
According to this thread, this feature (**Turn On MIUI Optimization**)

> enables a plethora of MIUI based settings & optimizations as per the guidelines set by the MIUI developers.

**It helps to load the app and the app data in parallel reducing load times and ensuring a slicker user experience.**

However, this setting can sometimes cause a variety of issues on non-MIUI based apps such as Google Apps & Apps from Google Playstore. Users have recommended disabling the feature if you rely on Google Play Store for apps & services or use Global Stable or Global Beta MIUI ROMs.

Here is a summary of observable changes when this feature is turned on or off:

**With the MIUI Optimization Enabled, some users reported the following issues**

> * Cannot set third-party launcher like Nova, Apex or Google Now launcher.
> * Wallpaper cannot be set using in-built options via custom launchers.
> * Occasional lags, stutters or freezes while scrolling web-pages & long lists.
> * Custom apps set as default restore to default MIUI apps on reboot. (Only on MIUI China ROMs)
> * Cannot set accessibility services on reboot.
> * Background apps cannot sync data.
> * Music players stop playing after sometime.
> * UI Animations are not synced properly.

**After turning off MIUI optimization**

> * Above issues may get solved.
> * Settings → Data Usage → Graph changes to AOSP style.
> * Settings → Battery & Performance → Battery Use → Graph changes to AOSP style.
> * Settings → Installed Apps → All → Documents → It will not be disabled after every reboot.
> * Settings → Additional Settings → Buttons → Settings may get reset.
> * No OTA update notifications. Enable it to receive the OTA updates.

# Answer
> 3 votes
In addition to @xavier\_fakerat's answer, note that the "MIUI Optimizations" prevent the installers of various applications from launching correctly even on the phone itself, rather than over-USB. If you get unexpected "Installation failed" messages (not taking about Google Play Store; I never use that) - it might be a conflict between the installer and the MIUI optimization mechanism.

---
Tags: installation, usb-debugging, miui, developer-options
---


# Question
Title: Does android keeps a system log about location and networks?
I'm working together with the local authorities to try to identify where a phone was during the last few days. Some pictures were taken but GPS was turned off. Is there any clue that we could get from the local logs about the location of such images, like available networks? If so, where should we look at?

Device using: Android 8.0

# Answer
> 2 votes
By default Android does not save any local logs, even the `logcat` log is just a ring buffer that contains only the last log elements that fit into the log buffer (often this buffer has ~65KB). Typically such abuffer is overwritten after a few hours, if the device use not used it may last up to one or two days but that is very device specific. Some devices log dozens of messages per minute even in Air-plane mode without any app active.

First you should check if the location services are activated at all. If they are not activated there is a high chance that they aware deactivated all the time and hence no app was able to access any location.

As far as I know Android itself does not record data on available or used mobile network bases or Wifi access points. Only if Google location services are activated such data is collected and uploaded to Google.

If you have support of the local authorities the easiest way would be to contact the mobile network provider the used SIM-card is from and use their log which antennas were used in the specified time span.

---
Tags: geolocation, gps
---