# Question
Title: Notification bar content and scroll down
When I swipe the notification bar down, I get a bunch of "**items**", roughly one for each notification (email, weather, news &c). How are these items called? How do I control their verbosity?

Specifically, the "item" corresponding to Google Podcasts used to be "big" and contain the control buttons (stop, ff &c) and now I need to touch a tiny down arrow to get those buttons. How do I get back the whole thing?

# Answer
> 0 votes
If I'm not wrong, you want all those buttons etc of those notifications to be available without clicking an extra tiny down arrow. You can maybe change the app's notification priorities under notification settings. See if that works.

If it doesn't there's nothing much you can do. Its a decision made to make a more compact User Interface as far as I know.

---
Tags: screen, notification-bar, home-screen
---


# Question
Title: How to enter safe mode on an HTC Desire w/CyanogenMod stuck in boot loop?
I have an HTC Desire with CyanogenMod 7 installed. After ignoring the low storage warning for a couple of months, it finally crashed and since then is stuck in the dreaded boot loop. I am able to enter a shell using `adb shell`, and I freed some space (~30M) in the internal memory but to no avail.

After reading about how people solved this problem, a promising way seems to be to enter “safe mode“, then find out which app might cause the boot process to fail and remove it.

I found instructions for the HTC Desire to enter safe mode (turn it on, then keep menu button pressed), but this only let me enter the CyanogenMod recovery menu. My explanation for this is that this behavior is a difference from the stock firmware which most similar question apply to.

I did read the boot loop tag wiki, I naturally want to keep my personal data and settings, and factory-resetting the phone is not a desired option.

# Answer
Because I came to this thread from a search, I'd like to share what I found elsewhere:

After powering on the phone, once a logo pops up, press and hold both volume buttons for a very long time. On my Pixel 6 Pro, I must've held them for about 20 seconds through the initial google logo and then on the progress bar logo, and then the phone vibrated, I let go, it continued to boot for another 10 seconds or so, and ended up in safe mode. Maybe holding on for longer is necessary if your phone doesn't give you some type of feedback like that.
> 0 votes

---
Tags: cyanogenmod, htc-desire, boot-loop, safe-mode
---


# Question
Title: My Android 12 can resolve hostnames but can't connect directly to IP adress?
I'm facing a weird behavior when using mobile data. My Sony Xperia 5 mark II on Android 12 with Magisk root can connect to the Internet if I connect to the URL. However if I try to connect directly to the IP address, it doesn't work (network unreachable according to my web browser).

This seems to be system-wide: For instance I can `ping google.com` but I can't `ping 8.8.8.8` (or whatever IP is behind google.com). I can also connect to my own VPN server using Wireguard if I set the "host server" with my own .fr domain but not with my VPN server's IP.

I don't unterstand at all this issue. I tried cleaning arp table, DNS cache,... When I disable Magisk the issue isn't solved either. I don't especially know when it started...

Do you have any clue ? Thanks

# Answer
> 1 votes
Okay problem solved. Default APN for my carrier (Orange France) was uneditable and allowed only IPV6 connection. Orange's APN settings shown on their site mentioned IPV4 only which wasn't working at all. Adding an APN with IPV4/IPV6 stacking is the way to go. Thanks for your help.

---
Tags: mobile-network, dns
---


# Question
Title: How to access files transferred to device using SimpleSSHD?
I am using SimpleSSHD and doing `scp` to transfer files from my computer to my Redmi phone.

My question is that after I have copied files to `data/user/0/org.galexander.sshd/files`, how do I access them, such as with a File Manager?

# Answer
> 1 votes
Don't ever copy files out of `/sdcard/`, for this task you should leave the files where they are. In order to copy files using SimpleSSHD, simply connect and copy: assuming you've left the default port of `2222` you can do this,

## SCP File Transfer

```
host=192.168.1.228
scp -r "scp://root@${host}:2222//sdcard/DCIM/OpenCamera" .

```

## RSYNC over SSH File Transfer

```
host=192.168.1.228
rsync --progress -ave 'ssh -p 2222' "root@${host}:/sdcard/DCIM/OpenCamera" .

```

# Answer
> 0 votes
On my phone the mountpoint of the external SD card is not `/sdcard/`, but `/storage/XXXX-XXXX/`.

e.g.:

```
HWVNS-H:/data/data/org.galexander.sshd/files $ ls -la /storage/C42F-10F5/
total 480
drwxrwx---   16 root     everybod     32768 Jan  1  1970 .
drwxr-xr-x    5 root     root           100 Feb 25 08:56 ..
drwxrwx---    5 root     everybod     32768 Dec 22  2020 Android
drwxrwx---    4 root     everybod     32768 Nov 22 16:36 DCIM
...

```

---
Tags: file-transfer, ssh
---


title: Enable and disable system apps via ADB

text:
# Question
Title: Enable and disable system apps via ADB
Is there any adb command to enable/disable a system app?

Thanks

# Answer
> 94 votes
Yes. The command is `pm disable <package name>`. You must be root in order to do this:

Open shell and get root:

```
PC> adb shell
shell@hammerhead:/ $ su

```

List all enabled apps, filter by "calculator":

```
root@hammerhead:/ # pm list packages -e | grep 'calculator'
package:com.android.calculator2

```

Disable app:

```
root@hammerhead:/ # pm disable com.android.calculator2
Package com.android.calculator2 new state: disabled

```

List all disabled apps:

```
root@hammerhead:/ # pm list packages -d
package:com.android.calculator2
package:com.google.android.apps.inputmethod.hindi
package:jp.co.omronsoft.iwnnime.ml
package:com.google.android.inputmethod.pinyin
package:com.google.android.inputmethod.korean
package:com.google.earth
root@hammerhead:/ #

```

Some other things worth noting:

1. In my testing, apps disabled in this manner disappear completely from the Settings \> Apps list. They do not even seem to be displayed in the "Disabled" tab
2. You can re-enable apps with `pm enable <package name>`. In fact, this seems to be the *only* way to re-enable them, in my experience.

# Answer
> 23 votes
This should work regardless whether the app is a system app or a third-party app (user installed).

---

See my answer at Determine the package name of your app to get the package name of the concerned app and use  *shell* to execute these commands (**requires root access**):

```
adb shell
su
pm disable PACKAGE              # disables the app and hides it in Settings -> Applications
pm hide PACKAGE                 # alternative; for Android Lollipop and above
cmd package suspend PACKAGE     # alternative; package remains visible in Launcher and Settings app but cannot be used; a feature of Device Administration

```

`PACKAGE` refers to package name of the app

To reinstate the app, replace *disable* with *enable*, *hide* with *unhide*, and *suspend* with *unsuspend* in the said command and execute it with root privilege.

If you've Android KitKat or above and **do not have root access**, use in PC to execute this command:

```
adb shell pm block PACKAGE         # for Android KitKat
adb shell pm hide  PACKAGE         # for Android Lollipop only
adb shell pm disable-user PACKAGE  # alternative to `pm hide`; for Android Lollipop and above; this works just like disabling an app through Settings app

```

To reinstate the app:

```
adb shell pm unblock PACKAGE   # for Android KitKat
adb shell pm unhide PACKAGE    # for Android Lollipop and only if you used `pm hide` earlier
adb shell pm enable PACKAGE    # for Android Lollipop and above

```

Changes would take place immediately.

# Answer
> 11 votes
Further to the answer by @eldarerathis, you can disable an app for a specific user. I used this method to remove some apps from a restricted user that weren't listed on the user settings screen. All commands from an `adb shell`. Root access is required to make the changes.

First, get the user's id:

```
$ pm list users
Users:
  UserInfo{0:Alice:13} running
  UserInfo{11:Bob:18} running

```

Then

```
$ pm disable --user 11 com.cyanogenmod.filemanager
Package com.cyanogenmod.filemanager new state: disabled-user

```

To re-enable

```
# pm enable --user 11 com.cyanogenmod.filemanager

```

In this example, Alice can use the file manager but Bob cannot.

You can do a similar thing with `hide` instead of `disable`. I am not sure which is best, but see this answer. The converse of `hide` is `unhide` (a reboot may be needed to effect `unhide`).

You can list packages with `pm list packages --user 11`. Give `-e` to list enabled packages or `-d` if you want to see disabled ones. There would appear to be no filter for hidden packages.

FWIW: *I tried the above on Lollipop with CM 12.1 on an Amazon Fire (KFFOWI).*

# Answer
> 3 votes
I wanted to disable the playstore on Vivo phone because my niece always installs multiple gigabytes of games. For some of you this might work, no root is required.

To disable playstore:

```
$ adb shell pm uninstall --user 0 -k com.android.vending
Success

```

This uninstalls the app. But there's also a way to restore the app:

```
$ adb shell pm install-existing com.android.vending
Package com.android.vending installed for user: 0

```

Of course, playstore is an example. This should work for most system apps. From the PC, you can directly run this, or if you're in an ADB shell, run the command after `adb shell`.

You can use `adb shell pm list packages`, pipe that to grep to search for the package easily.

**Note** that this uninstalls the app, the -k flag should keep the data. But in my case **all data was purged/deleted**. So there might be **data loss** during the process of uninstallation of system apps.

---
Tags: adb, system-apps
---


# Question
Title: Android device showing up as two devices (offline and device) in ADB
Connecting my device to my PC and checking for connected device show the same device twice.

```
C:\Program Files (x86)\Minimal ADB and Fastboot>adb devices
List of devices attached
21e8ed64090d7ece        offline
21e8ed64090d7ece        device

```

Original screenshot of ADB indicating device as both connected and offline

Running any command results in ADB spitting out an error:

`error: more than one device/emulator`

What do I do?

Device: Samsung S9 (SM-G960F) (starlte) (Exynos)
Android version: 12 (Arrow OS)
Build number: SQ1D.220205.004

# Answer
One of these solutions must work

1. `adb kill-server` then trying adb commands again
2. `adb kill-server` then turn ON and OFF usb debugging under dev options and trying adb commands again
3. Possible solution 1 and 2 but do a reboot too
4. **Trying a different USB port in your computer**
5. Trying a different data cable
> 0 votes

---
Tags: adb
---


# Question
Title: how to stop google's phone app of being auto allowed to display over the apps?
i have a poco x3 nfc with arrowsOs android 11. I use google's vanilla phone app as my default phone app. I don't want to have a bubble when minimizing my phone app. for this, i go to app info \> display over the other apps and disable it. but for some reason after some time (absurdly random periods, from seconds to hours) the app always returns to be allowed to display over the other apps. i would like to understand if this is mandatory or if it's optional, how can i disable it

# Answer
If you have root access, make Google Dialer a user app. Currently it is in system/priv-app.
> 0 votes

---
Tags: settings, system-apps
---


# Question
Title: Handcent Next SMS just flagged by Play Protect -- what's going on?
I've been using **Handcent Next SMS** app for many years. A few moments ago, the Playstore's Play Protect just disabled the app on my phone saying the following:

> This app is fake. It tries to take over your device or steal your data.

The webpage for the app comes up blank now:

To my knowledge, 10,000s of people have been using this app for many years.

**Did something just change?**

Anybody have more information about this sudden change/situation??

# Answer
**The Handcent Next SMS app was flagged by Play Protect and taken down from the Play Store on March 26 due to embedding a malicious 3rd-party library and returned on March 30 with an updated, clean version.**

---

### Timeline

On March 26, according user223149 while attempting to reply to this question,

> Got this answer from support:
>
> > Our app Handcent Next SMS has been misidentified as malware by Google, we are in talks with Google to get our app back to play store. \[...\]

Around 1 hour later, this was later confirmed on the official Handcent website, Twitter account, and Facebook Page,

> Our app Handcent Next SMS has been misidentified as malware by Google, we are in talks with Google to get our app back to play store. \[...\]

User 'WildBSinTX' on Reddit sent an email to Handcent support and got a reply,

> I got a reply this morning with an explanation and an attachment with v9.9.9.
>
> \*Security patch to fix a potential threat
> \*Other fixes to make sure it's in a good safe state
>
> I installed it, and so far, so good.
>
> \[...\]

Meanwhile, on March 28, Handcent posted an update to the same channels.

Official site

> We have resolved the issue, together with Google. The app will return to the play store soon. \[...\]

Twitter

> We have resolved the issue, together with Google. It usually takes one day or two. \[...\]. It’s safer and good to go now.

Facebook

> We have resolved the issue, together with Google. The app will return to the play store soon. It usually takes one day or two. \[...\]. It’s safer and good to go now.

**On March 30, the app was back on the Play Store with v9.9.9.1.**

The official site also mentions,

> We are pleased to announce that Handcent Next SMS is back to the Google Play . \[...\]

Handcent also followed up on their social media on March 31.

Twitter

> Next SMS is now back on the play store, you could go to the play store and install it. \[...\]

Facebook

> Next SMS is now back on the play store, you could go to the play store and install it. \[...\]

Those who sent an email might also receive a follow-up reply mentioning the app version on the Play Store,

> Next SMS is now back on the play store, you could go to the play store and install it 9.9.9.1. \[...\]

---

### Cause

I decided to send an email to Handcent Support and received the v9.9.9 APK file, then also downloaded the APK for v9.9.9.1 after it was published on the Play Store. After decompiling and comparing the content with v9.9.8.6 and v9.9.8.5, one noticeable thing is the removal of `coelib.c.couluslibrary` since v9.9.9 (including v9.9.9.1 from the Play Store).

AppCensus published a blog article written by Joel Reardon on April 6, titled The Curious Case of Coulus Coelib. It explained what and how this library worked in detail. Quoting a relevant part about this specific incident,

> ### Disclosure
>
> The following table are the apps that we confirmed communicating with `mobile.measurelib.com`. We reported this issue to Google on October 20th, 2021 along with this list of apps. **They investigated it and removed these and other apps containing the SDK from the Play Store.** \[...\]
>
> | App Name | Privacy Policy | Installations | phone | email | IMEI | GPS | router SSID | router MAC |
> | --- | --- | --- | --- | --- | --- | --- | --- | --- |
> | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] |
> | Handcent Next SMS-Text w/ MMS | link | 1 million+ | no | yes | yes | no | yes | yes |
> | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] | \[...\] |

<sup>(Emphasis added)</sup>

An article from Android Police published on April 7, titled Google crackdown kicks a bunch of data-stealing malware off the Play Store also stated,

> Still, there is some hope for those who have lost income streams from Google's ban. The company may allow some apps to return — as long as they delete the Measurement Systems code. The first few are in fact already back.
> 13 votes

# Answer
Since I did not uninstall the app after the high-risk warning, I was able to go to Play Protect and enable the app. Then I went into settings for the app and changed the permissions to allow for usage of apps that aren't on the Play Store. I also changed the setting where Play Protect wouldn't scan Handcent. Once I restarted, everything was back.
> 3 votes

---
Tags: applications, google-play-store, handcent-sms, play-protect
---


# Question
Title: Is TWRP available for Samsung Galaxy Note 1 (GT-N7000, GT-N7000B)? Otherwise, what recovery can I use?
I was browsing https://twrp.me/Devices/ wondering if TWRP is available for Samsung Galaxy Note 1 (GT-N7000, or GT-N7000B in my specific case).

Only the T-Mobile (quincytmo) and AT&T (quincyatt) versions are listed there, which seems strange to me as the international version should be more common.

Am I doing something wrong, or is TWRP not available for the GT-N7000? If so, what should I use instead?

# Answer
> 1 votes
PhilZ Recovery is a CWM-based recovery with touch support. I used that one. It even has signed zips, so you can flash it from stock recovery.

# Answer
> 1 votes
On the TWRP website itself, it says that **TWRP cannot support the N7000**, because it does not have a separately bootable partition. I just found that statement after struggling and failing for an eternity to flash TWRP on my old N7000. The flashing itself always finishes without error, but afterwards the device still boots into the same old stock recovery. Apparently, it simply cannot work. ☹

> The Samsung Galaxy Note 1 n7000 model will NEVER receive official TWRP support. The n7000 does not have a separately bootable recovery partition. Instead, you are stuck with whatever recovery is included in your ROM or kernel or boot image. You may find TWRP included in some ROMs, kernels, or boot images, especially if you can find OmniROM for your device.

https://twrp.me/samsung/samsunggalaxynoten7000.html

---
Tags: recovery-mode, twrp, samsung-galaxy-note
---


# Question
Title: Manually upgrade Magisk on Samsung Galaxy S10 without losing data
I had a working Samsung Galaxy S10 which was already rooted with Magisk (v20.\*). Due to a Magisk update (v24.1), my root got broken... So I need the manual way.

I successfully patched the stock "recovery.img" through the Magisk "Select and Patch a file" method since the "Direct Install" is not working anymore for some reason I don't understand ("Installation Failed. Unable to detect target image"). The official website recommends flashing the "recovery.img" through "fastboot". But then I discovered fastboot is not available for Samsung phones. So I need to use Odin. But Odin is not accepting \*.img files.

I do not want to lose my current Android installation because it's very customised. But I need my root back. I searched and searched for days for a working solution to manage this. So this request is my last hope as I can really not find a way to manage this.

How can I safely flash this "magisk\_patched" "recovery.img" to my "Samsung S10" without wiping any data? And does this Magisk patched "recovery.img" contain my existing TWRP recovery? Or do I need to reinstall it after the upgrade? I remember when I first rooted my phone, it was quite complicated to do this since the Samsung Galaxy S10 does not have a ramdisk, so the recovery partition is shared with TWRP and the Magisk su.

Does anyone have any good advice on how to manage this without losing my data (and Android 10 installation)? Magisk delivered me a 6.2GB "magisk\_patched-24300\_8m9cQ.tar" file, but I'm scared to flash it through Odin as I don't want to lose my data on my "512GB SD card" internal storage.

I know this is a complicated situation but any help would be highly appreciated as I really don't know what to do anymore to manage this.

# Answer
After some great help from @alecxs I managed to fix the problem, without losing any data, all the googled tutorials tell to use fastboot, which is not available for Samsung devices, so this is the guide for `Samsung S10` users who have a working twrp recovery installed but are unable to preform the automatic update from within the Magisk Manager app. (of course you need adb and developer mode enabled on your phone)

* first of all, for just in case, make a backup of all your partitions in twrp, also make a backup of your personal data stored in /sdcard
* in twrp, use the following adb commands to get an image from boot, recovery and vbmeta partitions from a terminal window on your computer:

`adb pull /dev/block/platform/13d60000.ufs/by-name/boot *:\Magisk\Unpatched\boot.img`

`adb pull /dev/block/platform/13d60000.ufs/by-name/recovery *:\Magisk\Unpatched\recovery.img`

`adb pull /dev/block/platform/13d60000.ufs/by-name/vbmeta *:\Magisk\Unpatched\vbmeta.img`
* make a `tar` archive of these 3 images (you can use 7zip for this)
* boot back into Android, transfer the tar to your phone, start MagiskManager, next to Magisk, tap Install... with Options, be sure `Recovery Mode` is checked (since Magisk on Samsung S10 starts it deamon trough recovery as there is no ramdisk), tap Next, `Select and Patch a File`, select the tar, and let Magisc do its Magic.
* check the log file, if it says: `Magisk patched boot image detected` you're good to go...
* go find the `magisk_patched*.tar` in your ~/Download, copy it to your computer, extract the tarred images to a folder on your computer, for example: `*:\Magisk\Patched\`, remove the '.img' suffix from the three image files as adb can only manage them without the '.img' suffix!
* boot back into twrp recovery, connect your phone trough usb and transfer the MagiskPatched images back to your phone trough the following adb commands:

`adb push *:\Magisk\Patched\boot /dev/block/platform/13d60000.ufs/by-name/boot`

`adb push *:\Magisk\Patched\recovery /dev/block/platform/13d60000.ufs/by-name/recovery`

`adb push *:\Magisk\Patched\vbmeta /dev/block/platform/13d60000.ufs/by-name/vbmeta`
* now, very important, delete the old Magisk configuration by removing the /data/adb directory, from within twrp terminal: `rm -r /data/adb`
* wipe the cache partition from the twrp gui (advanced wipe)
* boot back into Android and start the Magisk Manager app, it will tell you it needs to do some additional configuration and reboot your device... (if this step gives an error you did not succesfully delete the /data/adb folder)
* once your device is rebooted, you'll have your root back!
* have a good bottle of wine and reconfigure your Magisk settings/modules in Magisk Manager.
* enjoy to be the owner of your own device again!
> 2 votes

---
Tags: samsung, root-access, updates, magisk
---


# Question
Title: Stop videos from readjusting phone volume on play
Samsung Galaxy S10e

If the volume is set to vibrate (all the way down), then a video is started, the video will automatically bring the volume back up to about 70%. How can this behavior be disabled? I would like to watch videos on mute without getting a blast of noise at the first second while I scramble to get the volume back down again.

# Answer
> 1 votes
On Android, there are separate volume channels for ringtone + notification, media, alarm. etc.

> * Media volume: Music, videos, games, other media
> * Call volume: Volume of the other person during a call
> * Ring volume: Phone calls, notifications
> * Alarm volume

When you set the volume to vibrate, most likely it only sets ringtone + notification to vibrate but doesn't change other volume channels. This is because pressing the volume up/down button will only change the volume for the active audio stream.

> By default, pressing the volume control modifies the volume of the active audio stream. If your app isn't currently playing anything, hitting the volume keys adjusts the music volume (or the ringer volume before Android 9).

To watch the video on mute, you need to manually adjust the volume for media to 0 too.

---
Tags: video, volume-control, volume, samsung-galaxy-s-10
---


# Question
Title: How can I convert an apk file into an ultra-zip apk without affecting the executability of the android app?
I found out that when I zip the apk with ultra level zip compressor, the file size was effectively reduced. Why didnot developer let that compressed version out like js.minify? How to convert those apk file to ultra zip apk file?

# Answer
APK files are usually only compressed using the compression setting "fast" (fastest (de)compression, only small space gained by compression). As far as I know this is for historical reasons.

The first Android device were pretty slow and app installation time was already talking a lot of time. Therefore I assume Google decided to build all the Android developer tools in a way that the compression is focused of maximum speed and not on APK minimum size. As Google does not really have to care about size of cloud storage or bandwidth of network traffic this was the best solution.

For that reason most Android build tools still only use the fast compression.

Modern APK files e.g. generated by Google use a higher compression so the gain should be not that high anymore. But this depends on the app and who you got the APK file.

Furthermore there are certain APK options which enforce that all the native libraries (`.so` files) have to stay unencrypted, if the app declares  `android:extractNativeLibs="false`. Effectively this will save space in the end as the native libraries are not extracted from the APK file, instead they are directly used within the APK file, which means you only need to save it once on your device instead of two times (one time compressed in the APK, one time extracted).

There are articles that describe how to recompress an APK file. Please be aware that these articles are very old and do no longer work with recent APK fiels and devices. This is because of the APK signature v2 and v3 that do not only sign the decompressed content of the APK file (as v1 did) but instead they sign the APK file as a whole. So any modification to the APK file even if it does not affect the content (like adding a ZIP comment) will destroy the contained APK v2/v3 signature. As the v1 signature contains the info that there is a v2 signature all devices capable of checking a v2 signature will also reject such a modified APK file.

Conclusion: On some APK file you could save some additional space by recompressing them but in nearly all cases it will today destroy the APK signature so it is not really an option.
> 1 votes

---
Tags: compression
---


# Question
Title: Force links to open in the app, not the default browser
For example, I get an email from Pinterest with interesting links for the week. When I click a pin, it opens in Chrome and not in the Pinterest app. This happens with a few apps and was wondering if there's a way to "open link with" type of feature.

Is it possible to force the links to open in their respective application and not in the default browser (e.g. Chrome)?

# Answer
> 13 votes
Apps can request that links be opened using the app, using an API called an "intent filter".

If the app has the correct intent filter, you will be prompted to open the link using that app, and the app will then do something with it.

This *has* to be coded in by the app developer, and there is no way to implement it yourself unless you decompile the app and add it in.

An example of an app that does this is the Google+ app.

# Answer
> 6 votes
This helper app makes Facebook, Twitter, Instagram, GitHub, and Goodreads links open in their apps instead of the browser: Open Link in App

It doesn't yet support Pinterest, but if you're technical, it's easy to add new apps, and doesn't require writing code! Details in the GitHub repo.

# Answer
> 2 votes
If the links were opening in Chrome by default, all I had to do was, go to Settings -\> Apps -\> Set as default, choose the Chrome app and hit `Clear defaults`.

Next time when I clicked the link, the phone asked me to `Open with` with only two options: Chrome & Samsung Internet Browser. When I choose Chrome then `Just once`, once again the `Open with` came up but this time with 3 options: Pinterest, Chrome & Samsung Internet Browser. I chose Pinterest followed by `Always` and that is it.

Not sure why but this worked.

# Answer
> 1 votes
If you can get the APK, then you can open it in JADX \[1\]:

```
jadx-gui com.pinterest-10098030.apk

```

and check the `Androidmanifest.xml` file:

```
<intent-filter android:autoVerify="true">
   <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
   <action android:name="android.intent.action.VIEW"/>
   <category android:name="android.intent.category.DEFAULT"/>
   <category android:name="android.intent.category.BROWSABLE"/>
   <data android:scheme="https"/>
   <data android:scheme="http"/>
   <data android:host="www.pinterest.com"/>
   <data android:host="post.pinterest.com"/>
   <data android:host="pin.it"/>
   <!-- ... -->
</intent-filter>

```

So only link with those host will get noticed by the app. In addition, some apps also filter on the path:

```
<intent-filter android:label="@string/app_name" android:autoVerify="true">
   <data android:scheme="https" android:host="www.pbs.org"/>
   <data android:pathPattern="/video/.*/"/>
</intent-filter>

```

Finally, if you have `adb`, you can use it like this:

```
adb shell am start -d https://www.pbs.org/video/american-horses-i5v309/

```
1. https://github.com/skylot/jadx

# Answer
> 0 votes
In general, you can't do it. The reason behind the links opening in a browser is that they use the same protocols of normal web links. So if the particular app is *not* a browser, the links have to be opened with a browser app.

But you may have seen some links (particularly links to Android apps on the market) can be opened with the Android Market/Google Play Store app. This is possible because those links use `market://` in their links rather than typical `http://`

If you need to confirm it, try clearing the defaults of your Chrome browser. It will make you choose an app to open a link when you click them. This will give you an **open link with** option (of course, to use the browser apps)

To do this, go to `Settings -> Apps` and select the Chrome app. Scroll to the bottom and find a clear defaults button and click it.

# Answer
> -1 votes
JUST REMOVE http:// or https:// bofore URL and Enjoy!

---
Tags: hyperlinks
---


# Question
Title: Why does Google Drive for Android say "Failed to open the document"?
Periodically, when I try to use Google Drive for Android, it will show the list of documents, and when I click one, it says:

"Failed to open the document. / Unable to open the document. Please make sure you are connected to the Internet and have permission to open the document and try again. / Cancel / Open in browser"

I had the problem Tuesday and couldn't open any documents; by Wednesday it was normal again; today it's back and I can't open any documents. The app is the newest version and has not released any upgrades in the meantime, so I'm thinking it may be caused by the server. Is that plausible? Is there a fix?

I am using Cyanogenmod 10 (Android 4.1.2) on a Samsung Captivate.

\[More info: When I choose "Open in browser" it does open in the browser. But it still doesn't open in the Google Drive app.\]

# Answer
> 2 votes
After months of mysery, I found the solution: go to docs app (instead of the drive app): if it says you need an update you are lucky as this solved my problem.

# Answer
> 1 votes
Google Docs requires an active Internet connection, when that error happens try testing whether you can access Internet on the browser.

You can alternatively make a document available offline in the preview document screen, you still won't be able to edit it but it will be still be readable.

# Answer
> 1 votes
Go to the following link being signed in with your google account:

https://www.google.com/settings/security/lesssecureapps

Then, Turn on the less secure apps and your are good to go.

# Answer
> 0 votes
similar problem

> Used to have the same problem. In my case, google drive was trying to open the document using Sheets app, but the Sheets app was allowed to access documents only via WiFi connection. Go to Sheets/Setings and uncheck "Transfer files only over Wi-Fi" checkbox. Be aware, that similar "Transfer files only over Wi-Fi" checkbox is also in Drive app, but this affects only Drive app, not the Sheets app.

In this case, go to Drive/Setings and uncheck "Transfer files only over Wi-Fi" checkbox.

# Answer
> 0 votes
In Google Play, update Google Docs. Looks like they fixed a bug causing the same error message. Worked for me on my Nexus 9 after this issue cropped up a few days ago.

# Answer
> 0 votes
Just open google drive in your apps and update it... worked for me

# Answer
> 0 votes
I looked at each of the earlier suggestions, and they each were either irrelevant for me or did not work.

Luckily, what worked for me on my Pixel 3 running Android 12 was simply to restart the device.

Then I was once again able to open the single problematic Google Doc.

---
Tags: google-drive
---


# Question
Title: E1001: Failed to update System image latest Onplus 5T and other
I downloaded the latest LineageOS for my latest Device, from Dumplings SF.

firmware, recovery, vendor files.

What I get all the time is that error message "E1001: Failed to update system image" and that he can't mount the vendor partition.

Any ideas ? PS: I can't even flash back to latest Oneplus ROM (or even older roms)....

Update: Meanwhile I use TWRP from "cheeseburgerdumplings" for 8.1 on what lineageOS and the "/vendor" partition is no more tried to be mounted. What I figure out as well, is that if I go with adbs command to know if the filesystem is encrypted or not:

```
adb shell getprop ro.crypto.state

```

tells me "encrypted"

Now the big question, which filesystems are encrypted, all ? And which partition or FS does not have to be encrpyted?

Here is the "recovery.log": https://pastebin.com/raw/tKMStdSF

Screenshot:

# Answer
I faced the same issue and solved it by setting the settings flag `Unmount System before installing a ZIP` to false. This is not documented or recommended anywhere, however.

For me, it was LineageOS+MicroG image serrano3gxx. If someone else finds this to solve this error, please leave a note so we can report it accordingly.
> 1 votes

# Answer
Solved!

Update to the latest official Oneplus 5T Oxygen OS, and use the official recovery and image, and everything goes without any problems.

Update must be done in "offline update mode", as online update server is no more available.
> 0 votes

---
Tags: twrp, lineageos, oneplus-5, oneplus-5t
---


# Question
Title: File attributes on Android (Linux): Any way to make a file fully writable but not deleteable?
I tried `chattr` with the `+a` (`+i` is even more restrictive), but it immediately caused app panic aka "app has stopped". What I want to do is make a file & folder undeletable.

You can perform any kind of `rw` function (add a.k.a. append, delete some data inside, update) but **`rm file/folder` (file deletion) is not allowed until that attribute is reset** so that the app continues to run as normal.

Is that possible or asking for too much? Pardon my lack of surf searching. I'd imagine this to be in the *wish list* of many so it won't harm framing this languishing wish as a question.

# Answer
> 1 votes
You don't need to use any fancy ACLs or attributes for this. Just make the file writable and the directory that it's in read-only. This works because deleting a file only checks for write permission on the parent directory, and completely ignores permissions on the file itself.

---
Tags: adb, root-access, file-system, linux, storage
---


# Question
Title: Any way to disable notifications' sound when screen is on? On Stock Android
Is there any reasonable way to disable all android notification sounds (only) when your screen is on, but keeping them working when screen is off?

By 'stock' I mean a Pixel (3) device.

Rationale: If my screen is on, *it means I'm actually actively **looking at it***. I turned it on, and if I'm not looking at it anymore, I'd lock (turn off) it again, or the auto turn-off timer will do that for me, preferably in the shortest amount of time possible, saving battery.

The nature of notifications, as the name imply is to **notify**. If I'm looking at the screen, I don't need an annoying audio cue as well to notify me of anything: I will **see** the visual cue.

**I've already been notified.**

The default behaviour seems rather dumb and unthoughtful to me, and it's beyond me why they wouldn't give such an alternative option.

I've encountered this option on a custom ROM I've used on my OnePlus 3T before, and it was a blessing.

As such, is there a way to fix this (IMHO, terrible design flaw)?

# Answer
So I've tried the app dingless, and it totally works, even on my Galaxy A52s (Android 12). You can even customize it to not vibrate at all, driving mode and a lot more.
> 0 votes

---
Tags: notifications, audio, customization, android-10
---


# Question
Title: Opening .memo files from Samsung default memo app
I have `.memo` files on my PC from the default memo app on a previously owned Samsung phone. When opened in Notepad, the files do not contain plain text. How can I recover the contents of the memos?

# Answer
By using VLC player or downloading Samsung Note for PC as mentioned here

Related methods mentioned here for export - see Husni's answer of zip file solution and others

How can I export Samsung memos?
> 2 votes

# Answer
I wrote my own "memo2txt" converter in Python. Here is the script (first you'll need to install Python libs using pip):

```
import os
import re
import glob
import zipfile
import xmltodict
from datetime import datetime

MEMO_PATH = r'i:\MY\PROGRAMMING\AndroidMemoExtracter\MemoFiles'
RESULTS_PATH = r'i:\MY\PROGRAMMING\AndroidMemoExtracter\Results'

memos = glob.glob(MEMO_PATH + '\*.memo')

for i, memo in enumerate(memos):
    print('{}/{} - {}'.format(i+1, len(memos), memo))

    try:
        # Extract *.memo file and read the content
        archive = zipfile.ZipFile(memo, 'r')
        memo_content = archive.read('memo_content.xml').decode('utf-8')
        cleanr = re.compile('&.*?;')
        memo_content = re.sub(cleanr, '', memo_content)
        memo_content = xmltodict.parse(memo_content)
        text = memo_content['memo']['contents']['content']

        # Generate filename from memo timestamp
        timestamp = int(memo_content['memo']['header']['meta'][2]['@createdTime'][:10])
        date = datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H-%M-%S')
        file_name = '{}.txt'.format(date)

        # Save file as a *.txt
        with open(os.path.join(RESULTS_PATH, file_name), 'w', encoding='utf-8') as file:
            file.write(text)

    except zipfile.BadZipFile:
        continue

```
> 2 votes

# Answer
inspired by beeshyams, here's my version ...

on my Samsung J3, the memos are in an MTP drive somwhere like ...

`SAMSUNG Android/Phone/ShareMemo/*.memo`

the source xml looks something like this:

```
<?xml version="1.0" encoding="UTF-8"?>
<memo Version="1.0">
<header>
<meta title="==PROGRAMMING=="/>
<meta favourite="false"/>
<meta uuid="85f94ab2-77a8-XXXXXXXXXXXXXXX"/>
<meta createdTime="1551038092051"/>
</header>
<contents>
<content><p value="memo2" >=====</p><p>https://medium.freecodecamp.org/</p><p>=====</p>
</content>
</contents>
</memo>

```

I run this xslt transform over it ...

```
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

     <xsl:variable name="s1">
      <!--  https://float-middle.com/how-to-put-cdata-into-script-tag-in-xslt/  -->
      <![CDATA[
       //https://stackoverflow.com/questions/847185/convert-a-unix-timestamp-to-time-in-javascript
       //https://stackoverflow.com/questions/5292372/how-to-pass-parameters-to-a-script-tag
       var ts = document.currentScript.getAttribute('timestamp')
       document.write(""+ts+":   "+Date(ts).toLocaleString());
     ]]>
     </xsl:variable>

     <xsl:template match="/">
       <html lang="en_UK">
          <head>
           <style>
            body {background-color: powderblue;}
            #title {color: red; font-size: 300%;}
            .content {color: green;}
          </style>
          <meta charset="UTF-8"/>
           <title>
            <xsl:apply-templates select="memo/header/meta[@title]"/>
           </title>
         </head>
         <body>

          <span id='title'>
           <xsl:apply-templates select="memo/header/meta[@title]"/>
          </span>

          <xsl:text disable-output-escaping="yes">
           <![CDATA[ — ]]>
          </xsl:text>

          <span id='created'>
           <xsl:apply-templates select="memo/header/meta[@createdTime]"/>
          </span>

          <div class='content'>
           <xsl:apply-templates select="memo/contents"/>
          </div>

         </body>
       </html>
     </xsl:template>

     <!-- ============================================ -->

     <xsl:template match="memo/header/meta[@title]">
      <xsl:apply-templates select="@title"/>
     </xsl:template>

     <xsl:template match="@title">
      <xsl:value-of select="."/>
      <xsl:if test="string-length(.)=0">...</xsl:if>
     </xsl:template>

     <!-- ============================================ -->

     <xsl:template match="memo/header/meta[@createdTime]">
      <script type="text/javascript">
       <xsl:attribute name="timestamp">
        <xsl:value-of select="@createdTime" />
       </xsl:attribute>

       <!--  https://float-middle.com/how-to-put-cdata-into-script-tag-in-xslt/ -->
       <xsl:text disable-output-escaping="yes">
        /* <![CDATA[ */
       </xsl:text>
         <xsl:value-of select="$s1" disable-output-escaping="yes"/>
       <xsl:text disable-output-escaping="yes">
        /* ]]> */
       </xsl:text>
      </script>
     </xsl:template>

     <xsl:template match="@createdTime">
      <xsl:value-of select="."/>
     </xsl:template>

     <!-- ============================================ -->

     <xsl:template match="memo/contents">
      <xsl:value-of select="content" disable-output-escaping="yes"/>
      <xsl:if test="string-length(content)=0">...</xsl:if>
     </xsl:template>

 </xsl:stylesheet>

```

using lxml from python..

```
import os
import glob
import zipfile
from lxml import etree

import sys

if len(sys.argv) < 3:
    print('python3 convert_memos.py <memo-dir>  <html-dir>')
    sys.exit()

MEMO_PATH = os.path.join(sys.argv[1], '')
HTML_PATH = os.path.join(sys.argv[2], '')

xslt_src = '''[see xml above]'''

memos = glob.glob(MEMO_PATH + '*.memo')

for i, memo in enumerate(memos):

    try:

        archive = zipfile.ZipFile(memo, 'r')
        src = archive.read('memo_content.xml').decode('utf-8')

        xslt = etree.XML(xslt_src)
        xml = etree.XML(str.encode(src))
        transform = etree.XSLT(xslt)
        result = transform(xml)
        root = result.getroot()

        html = etree.tostring(root, pretty_print=True).decode('utf-8')

        filename = '{}.html'.format(os.path.basename(memo))
        filename = os.path.join(HTML_PATH, filename)

        with open(filename, 'w', encoding='utf-8') as file:
            file.write('<!DOCTYPE html>')
            file.write(html)

    except Exception as e:
        print(e)

```

outputs something like ..

```
<!DOCTYPE html>
<html lang="en_UK">
  <head>
    <style>
            body {background-color: powderblue;}
            #title {color: red; font-size: 300%;}
            .content {color: green;}
          </style>
    <meta charset="UTF-8"/>
    <title>==PROGRAMMING==</title>
  </head>
  <body>
   <span id="title">
        ==PROGRAMMING==
   </span>
    —
   <span id="created">
    <script type="text/javascript" timestamp="1551038092051">
     /* <![CDATA[ */
      var ts = document.currentScript.getAttribute('timestamp')
      document.write(""+ts+":   "+Date(ts).toLocaleString());
     /* ]]> */
    </script>
   </span>
   <div class="content">
       <p value="memo2" >=====</p>
       <p>https://medium.freecodecamp.org/</p>
       <p>=====</p>
   </div>
 </body>
</html>

```
> 1 votes

# Answer
I am forking @Alderven 's version to import the media files, and convert the emojis to proper UTF-8 characters. That way they are easy to import to Notable (on the Linux desktop) and sync back to Markor (on android). I posted this on my Github https://github.com/morciej/memo2html -- feel free to use.
> 1 votes

---
Tags: samsung, files
---


# Question
Title: How can I allow incoming calls to only vibrate when I have Do Not Disturb turned on?
Currently, Do Not Disturb fully disables incoming calls, or only shows a silent notification. How can I just make it cause calls to vibrate when I have Do Not Disturb turned on?

**My real goal:**

I do deep-thinking work as a software developer. I need 4+ hr blocks of time undisturbed so I can do deep work. I'd like to start each work day by turning on "Do Not Disturb" mode for 8 hrs, but I need to still be notified of calls--just via vibrate is all so it's less-intrusive, in case it's a doctor's office, the car repair person fixing my brakes, my wife with an important message, etc.

My phone is Google Pixel 5 with Android 12.

# Answer
### Comprompise: make phone calls less startling by having them vibrate, then slowly raise the ringer volume from 0% to 100% over ~5 seconds

Here is an alternative I just discovered which may meet my need: ie: do *not* turn "Do Not Disturb" on. Instead, do the following:

(the below was translated from French to English, since my phone is in French, so your wording may differ slightly--leave a comment)

**Settings --\> Sound & vibration --\> Vibration & haptics --\> Vibrate for calls --\> Vibrate, then progressive ring**

With this set, the phone vibrates a couple times when a call comes in, and then slowly raises the volume of the ringer up from 0 to 100% over like 5 seconds. This is *so* much more gentle and less distressing to my deep-thinking mind while I'm in the middle of something, and it gives me a chance to press a button to ignore the call before it gets loud, rather than startling me out of nowhere enough I lose my train of thought.

It's not quite what I was looking for, but this solution is an okay compromise for now.
> 2 votes

---
Tags: calls, vibration, do-not-disturb
---


# Question
Title: Android no more lets me remove google account
I used to select a google account each time I needed to add an app from google play. Then I would remove the account afterward. It is no longer possible. Are you aware of any changes on Android? I have android 6.0.1 phone Samsung SM-J510FN.

# Answer
> 1 votes
I too was able to remove my primary Google account until recently. When removing it, it used to warn me about device protection features would no longer work or something like that but it would let me continue after entering my phone's PIN. Google account was no longer listed in Settings -\> Accounts.

But recently I've gotten the same message and screenshots above. It seems a recent update to Google Play Services is the cause of this. The solution that worked for me was Settings -\> Application Manager -\> Google Play Services -\> More (top-right corner of Application info screen) -\> Uninstall updates. Then tap uninstall (and/or "yes" or "ok"... I forget the exact prompts).

You should then be able to remove your Google account as described above. (This worked for me, anyway.) The caveat is most of your Google apps (and some non-Google apps) will complain that they won't run unless you update Google play services. (Which, if you do, puts you back in the same spot with removing your Google account. Resistance is futile, eh?) Most apps did still work correctly for me (they'll pop up a notification which you should be able to clear) but a few did not such as Youtube.

Android 6.0.1, Samsung SM-S320VL, non-rooted

# Answer
> 0 votes
I remember that after an upgrade on android os I was then able to remove it.

---
Tags: 6.0-marshmallow, google-account
---


# Question
Title: How to set screen resolution and density in /system/build.prop?
I want to automate the creation of virtual android devices (using Android x86 and QEMU/KVM on Linux), the device settings includes screen resolution and density. The common way to set these settings is through `adb shell wm size` and `adb shell wm density` but it requires the device to be running, while changing `/system/build.prop` doesn't, I can mount the virtual disk and make changes there.

# Answer
Since you are open to modifying virtual disk you can edit the file `settings_global.xml` located under `/data/system/users/0/` directory. Among other things, look for these two keys in that file:

* `display_size_forced`
* `display_density_forced`

These keys correspond to `wm size WxH` and `wm density DPI` respectively. Change their values to your desirable `WidthxHeight` and `density`.

Save it. That's it.
> 2 votes

---
Tags: android-x86
---


# Question
Title: How can I take a screenshot of the notification bar dropdown?
Sometimes I get a notification in the notification bar, I pull it down, and then I want to take a screenshot. I press the power button to make the screenshot, a menu appears to either shutdown, restart or make a screenshot. When this popup menu appears, the pulldown menu disappears. I've tried another screenshot app, but that didn't work either.

**How can I take a screenshot of the notification pulldown menu?**

# Answer
I don't think you can, but there's a workaround I came up with. Using the screen recorder, make a short video where you scroll down the notifications bar. Once the notification you want to screencap is in frame, end the recording, play the video, pause it, and then take a screenshot.
> 1 votes

# Answer
You just have press and hold volume down and home key for some time
> 4 votes

---
Tags: notification-bar, screenshots
---


title: Why LSPosed slows down screenshot take?

text:
# Question
Title: Why LSPosed slows down screenshot take?
My phone is Samsung Galaxy M20 (OneUI 2.0 - Android 10) and I use the latest Magisk v24.3 (24300). After installing LSPosed, my phone takes screenshots more slowly.

Why? Is possible to fix this? If possible, how?

# Answer
> 1 votes
LSPosed uses Zygisk or Riru for injection interface.

There is no solution for Riru because if your LSPosed is using Riru, update Magisk to the latest version. Enable Zygisk (Beta) feature in Magisk Manager. Then download the Zygisk version of LSPosed from the GitHub repo, and install it.

Main Solution:

1. Enable DenyList in 'Magisk Manager \> Settings'
2. Select SystemUI with its subprocesses.

This operation will revert all Magisk modifications for SystemUI and the problem will be solved!

---
Tags: android-10, magisk, screenshots, samsung-one-ui, lsposed
---


title: List of ADB settable permissions

text:
# Question
Title: List of ADB settable permissions
I am searching for a list of permissions that can be set with adb.

I could just iterate through all permissions and ignore the failed ones but i'd rather filter out the ones that i know can't be set before hand.

# Answer
You can grant or revoke only runtime permissions (introduced in Android 6 with protection level: `dangerous`) - either from CLI (`adb shell`) or GUI (Settings). From package manager help:

```
~$ pm
...
  grant [--user USER_ID] PACKAGE PERMISSION
  revoke [--user USER_ID] PACKAGE PERMISSION
    These commands either grant or revoke permissions to apps.  The permissions
    must be declared as used in the app's manifest, be runtime permissions
    (protection level dangerous), and the app targeting SDK greater than Lollipop MR1.
...

```

To get a list of all on-device `dangerous` permissions:

```
~$ pm list permissions -g -d | awk -F: '/permission:/ {print $2}'

```

Or get directly from Android source. This list excludes any dangerous permissions defined by non-AOSP packages e.g. those provided by Google Play Services. `wget` is a busybox applet, or get a static binary:

```
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/res/AndroidManifest.xml | grep -E 'protectionLevel=|<permission android:name=' | grep -B1 'protectionLevel=.*dangerous' | awk -F'"' '/permission/ {print $2}'

```

Or to avoid any wrong results, pre-format `.xml` (you need to get `xmllint` or similar tool):

```
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/res/AndroidManifest.xml | xmllint --format - | grep 'protectionLevel=.*dangerous' | grep -o 'permission android:name=[^ ]*' | cut -d'"' -f2

```

---

In addition to `dangerous` permissions, it's also possible to `grant` or `deny` or `ignore` some of the special permissions shown under:
**Settings → Apps & Notifications → Advanced → Special App Access**.
These are not managed directly by package manager, but `appops` \- a secondary permissions control framework. These are `signature` level permissions which can be granted only to system apps otherwise. On Android 9:

```
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/res/AndroidManifest.xml | grep -E 'protectionLevel=|<permission android:name=' | grep -B1 'protectionLevel=.*appop' | awk -F'"' '/permission/ {print $2}'
android.permission.MANAGE_IPSEC_TUNNELS
android.permission.SYSTEM_ALERT_WINDOW
android.permission.WRITE_SETTINGS
android.permission.REQUEST_INSTALL_PACKAGES
android.permission.PACKAGE_USAGE_STATS
android.permission.ACCESS_NOTIFICATIONS
android.permission.INSTANT_APP_FOREGROUND_SERVICE

```

Their corresponding `appops` operations have similar names with minor differences. Also some OPs depend on other OPs. To get a complete list of operations you can read or set through command-line:

```
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/java/android/app/AppOpsManager.java | awk '/int OP_/ {print $5}'

```

For details on how to use `appops` see examples of `VIBRATE`, `REQUEST_INSTALL_PACKAGES`, `COARSE_LOCATION`/`FINE_LOCATION` and `BOOT_COMPLETED`/`RUN_IN_BACKGROUND`.
> 11 votes

# Answer
To get a list of all permissions available system-wide, use

`adb shell pm list permissions`

That will give you a full list of what permissions are available to be given/rejected on that device, including permissions defined by the manufacturer or by apps installed on the device.

To get a list of the permissions applicable to a specific app, use

`adb shell appops get <PackageName>`

That will give you a list of the permissions that that particular app may request, including whether or not the permission has been granted.

You can then use

`adb shell appops set <PackageName> <PermissionName> ignore`

or `adb shell appops set <PackageName> <PermissionName> allow`

to either deny or allow that permission for that app.
> 5 votes

---
Tags: permissions
---


# Question
Title: Samsung SM-T395 showing phone layouts for many apps after updating to Android 9
A Samsung SM-T395 tablet just upgraded to Android 9. It seems to now think that the layout is a phone instead of a tablet. It has stopped allowing split screen layouts for some apps. It is a small tablet, but is there any way to change a setting so it thinks it is a tablet again?

# Answer
> 1 votes
We found that Android 9 has a 'Screen Zoom' setting. The upgrade set it to 'Medium', but setting it to 'Small' and the layouts worked fine.

---
Tags: tablet
---


# Question
Title: Google Apps (YouTube, Play Store e t c) stopped working, tried fixing it and made it worse, not I can't even make a backup to wipe the system
Mi 9 SE, MIUI 12.5 (Android 11)

Ok, so 3 days ago I had an issue where the YouTube app, when started, was loading the feed infinitely, I decided to go to Play Store and update google services, but the Play Store wouldn't load past the triangle logo.

I've downloaded the external apk and tried installing that, no result with "app not installed" message.

Next, I've tried deleting the Google Play Services (com....gms) and installing them again, but they wouldn't show up in the app list.

Next, I tried to flash the MIUI with ADB without wiping the storage, done that successfully but that didn't change anything.

I'm now trying to at least backup my photos via ADB and re-flash the MIUI with a full wipe. But even the com.android.backupconfirm window won't load for me to launch the backup process...

Please help.

# Answer
Ok, I fixed it =)

pulled out the storage with adb and re-flashed the MIUI

Peace!
> 0 votes

---
Tags: google-play-services, miui
---


title: Open keyboard in Android recovery mode

text:
# Question
Title: Open keyboard in Android recovery mode
So I am taking the CompTIA A+ certification courses and on one of the sections about radio firmware, they say after placing `Update.zip` in the root of the SD card to boot into recovery then press Alt+S and let the update finish.

The only way I know how would be to use the up and down volume keys and choose Update from Sd Card then press power.

I could only find the following reference to using Alt+S, it is a guide from the XDA Developers website from 2009:

> **\[GUIDE\] Fastboot for Noobs**
>
> **Fastboot**
>
> Things you need:
>
> New SPL - Download
> New Radio - Download
> Your Current ROM - CyanogenMod 3.6
> SD Card Reader
> Rooted G1 Phone
> Computer
> USB Cable
> Patience
>
> ---
>
> **Install Radio FIRST**
>
> Download the Radio Update
> Rename it to update.zip
> Remove your SD Card from your phone and place it in your SD Card Reader
> Put the update.zip at the root of your SDcard (root = not in any folder)
> Insert your sdcard back into the phone
> Turn off your phone (Hold power and press Power Off)
> Hold the Home button and then press the power button (Keep holding power)
> You will now enter recovery
> **Open up your keyboard and press Alt-S**
> Let it finish the update
> When done reboot by pressing Home and Back
> You should be able to access your Home screen (If its stuck on the Google G1 screen dont panic, just remove your battery for now)

My question would be: HOW would I open the keyboard in recovery mode? I tried a keyboard connected via OTG cable and could get it to move up and down and select, but Alt+S did nothing.

Now full disclosure, I DID NOT have any `Update.zip` on my SD card. I was assuming I would get an error. The only device I have available at this time is my Samsung Galaxy S20 and I can't find the right file for my firmware.

Is this process outdated? Does it require that phone be rooted with a custom recovery? Without more info, the first sentence of this post makes no sense. If anyone can shed a light on this would be great.

# Answer
The instruction "boot into recovery then press Alt+S and let the update finish." is strange I have never seen a stock recovery ROM with a possibility to activate an on-screen keyboard. The second problem is that on-screen keyboards usually do not contain an `Alt` key.

The only explanation is that the instruction does not refer to the on-screen keyboard:

In the early days of Android there were a few phones like the Google G1 (alias HTC Dream) which had built-in hardware keyboard:

It seems like the manual for firmware update was written for such a device as the instruction does only make sense in case there is a hardware keyboard available.

Because of the amazing success of the iPhone and it's pure touch screen based UI Android phones with hardware keyboards were only present before 2010 like the HTC Dream (2008) or Motorola Droid/Milestone "Stone" (2009). Later nearly all Android phones only had a touch screen with on-screen keyboard (with a very few exceptions like the BlackBerry KeyOne (2017) \- but those devices were never a commercial success).

As your manual can only work for phones with a hardware keyboard it can be considered historical and no longer relevant. Seems like the people responsible for keeping the question up-to-date have missed this question for a long time.
> 2 votes

---
Tags: recovery-mode, keyboard
---


# Question
Title: How to stop Samsung S7 from wanting to update Android version?
I'm using my old Samsung S7 to test apps (that I develop) on Android 8.0.0 (Oreo).

But every time I come back to my phone the below screen (Program Update) appears and the phone wants to do an system update of Android to a newer version.

**How can I remove the downloaded system update from my Samsung S7?**

**And how can I stop my Samsung S7 from wanting to update Android in the future?**

Program Update:

System Info:

System Update Settings:

# Answer
It's not possible unless you root your Samsung S7.
> 1 votes

---
Tags: updates, settings, 8.0-oreo, operating-system, samsung-galaxy-s7
---


# Question
Title: How do phones from non-famous brands usually update their version of Android?
Stuff like 11T Pro or i13 Pro Max are just examples of Android phones that don't have any famous brand. My question is, how do these phones usually allow us to update?

Is the updating mechanism something in Android itself and is done from Google's servers? Similar to how Microsoft Windows updates itself regardless of which PC hardware we use?

# Answer
Compared to a PC the update process is a bit different, because Google does not provide binary updates for devices (only modern devices load some system apps via Google Play Store but these system apps only cover a small part of the OS).

Google Android devices always load their updates from a site operated by the phone manufacturer. Google is in the update process only involved at two points:

1. Google provides the security and/feature updates in source code form, which are then compiled and integrated by the phone manufacturer into their device fimware.
2. After everything is ready for an update Google gets the update an proves if it is compliant to a large list for rules each device and firmware have to satisfy. If the update passes all test the manufacturer gets the OK from Google and can then provide the update on their servers.

How long, how often or if a device gets updates at all depends on the phone manufacturer. The general rule is that the cheaper the phone the less updates you will get. For the extra cheap section on AliExpress or similar sites this means you are lucky if you get an update at all.
> 3 votes

---
Tags: updates
---


# Question
Title: Why does the use of symlinks in /system gradually erode available space?
I am working on a routine for swapping dictionaries on an e-reader (Nook Simple Touch--Android 2.1). I've got the shell commands nailed down and have constructed an app using Tasker. It all works great except that after a few dictionary changes the amount of available space in /system (where the dictionary databases are) decreases to the point that the stock dictionaries cannot be restored to their original place.

I start by moving the stock databases from their default location to a directory where all the dictionaries will be stored. One option is in /data/media and the other on the sdcard. Both appear to work fine. Once those are out of the way, symlinks are created to replace them, referring to databases in the dictionary storage directories. This is the general sequence in terms of shell commands:

```
adb shell ln -s "'/data/media/B&N Downloads/Dictionary/en-de.db'" /system/media/reference/basewords.db
adb shell ln -s "'/data/media/B&N Downloads/Dictionary/inflect-de.db'" /system/media/reference/inflectedwords.db

```

or, for the /sdcard storage option:

```
adb shell ln -s "/sdcard/Dictionary/en-de.db" /system/media/reference/basewords.db
adb shell ln -s "/sdcard/Dictionary/inflect-de.db" /system/media/reference/inflectedwords.db

```

These changes require a reboot to take effect.

To remove the symlinks in preparation for a different dictionary or before restoring the stock dictionary to its proper place:

```
adb shell rm /system/media/reference/basewords.db
adb shell rm /system/media/reference/inflectedwords.db

```

As I say, it all works fine except for the disappearance of available space in /system to the eventual point that you cannot restore the original dictionary.

Before doing any of this stuff I typically have about 80% of /system used. There should be about 55 mb still available (that's with the stock dictionaries in place). But after several dictionary swaps I show about 89% full and down to around 30 mb available. Restoration of the stock dictionaries requires about 57 mb available space.

I've looked through /system trying to find something "new" that is taking up space but have not been able to find anything.

I've never seen this issue addressed anywhere. I'd be grateful for some input.

# Answer
Thanks to the comment from alecxs and additional research in that vein, I have arrived at a solution for at least my instance.

It is stated elsewhere that removing files which are being used by running processes will cause a loss of available inodes. Although I can't claim to understand all the inode nuances, this made me look at the background processes on the e-reader. One, com.bn.nook.reader.activites, has its tendrils in the dictionary. I therefore tried:

adb shell pidof com.bn.nook.reader.activities

This returns a four-digit number which I use as:

adb shell kill \[pid\]

Then I proceed to do my operations with the database files, including moving, deleting, creating symlinks, deleting symlinks, restoring the original files, etc.

It all works with only the expected changes in /system available space at each juncture. No data appears to be lost by killing the background process and the reader function starts up right away when a book is accessed with the new dictionary immediately accessible, no reboot required (a bonus).

So before every change from the Dictionary Management app I just get the pid and kill the background process. Works like a charm!

Thanks again, alecxs!
> 1 votes

---
Tags: adb, file-system, insufficient-memory, file-management
---


title: How do I change the AndroidID?

text:
# Question
Title: How do I change the AndroidID?
My Android ID has changed since a factory reset. Now some apps/services don't work. Besides using Titanium Backup, how can I restore/change back to the previous Android ID? I already know what the ID is.

Android 7 | Rooted

# Answer
For those who may not know this: Android ID is an unique ID to each device. It is used to identify your device for market downloads, specific gaming applications that needs to identify your device (so that they know it's a device that was used to pay for the application) and such.

If you don’t have a rooted device, then it would be a little difficult to change the device ID. You’ll have to fully format your device data to change your Android phone’s device ID. As the device ID is generated when you first set up the device, resetting the phone will change the Android device ID automatically.

If you have a rooted device, then changing the device ID is just a two-tap process. You can use any reliable Android device ID changer app and it will change the device ID with a random one with just two taps. the app I used before is **"Device ID Changer by Silver Lab"** but it's no longer available in google play but you can find it by searching in google. the package name is: **com.silverlab.app.deviceidchanger.free**

hope it helps.
> 0 votes

---
Tags: root-access, factory-reset, titanium-backup, android-id
---


title: Unlocking bootloader for Vivo Y12

text:
# Question
Title: Unlocking bootloader for Vivo Y12
I have enabled OEM unlock and USB debug from settings. I am using Vivo fastboot tool. And after entering the fastboot menu, I tried the code `fastboot bbk unlock_vivo`.

```
C:\Users\dell\Desktop\vivo_fastboot_for_windows>fastboot devices
MNFM7PSSGM75SKBY        fastboot

C:\Users\dell\Desktop\vivo_fastboot_for_windows>fastboot bbk unlock_vivo
...
FAILED (remote:  unclock fail.)
finished. total time: 0.004s

```

I tried various solutions on the internet but couldn't find one.

Please someone help me.

# Answer
> 1 votes
Vivo devices with a Mediatek chipset don't allow anyone to unlock the bootloaders. The Qualcomm device's bootloaders can be unlocked by the unofficial EDL method discussed by XDA Developers. Sadly, my device is also based on the Mediatek chipset.

Please be patient until the Vivo developers officially release any method to unlock the bootloaders.

# Answer
> -1 votes
Try this. I see on the system to unlock the bootloader, there is this command. Remember to type one by one.

```
fastboot flashing unlock
fastboot flashing unlock_critical
fastboot flashing get_unlock_ability

```

The problem is that even though I want to try it, there is no laptop or PC at home.

---
Tags: adb, fastboot, bootloader, bootloader-lock, vivo
---


# Question
Title: Does Android have a "router setup page" when acting as a wireless or wired hotspot?
I can edit all the crucial aspects of my hotspot/router within the setup options for the hotspot/router configuration.

I am confused as to how the DHCP works when using up the Android phone as a wireless hotspot/router and wanted to figure that out.

One of my attempts to get this information for myself was to try and navigate to `192.168.6.1` via a web browser - this is, of course, the phone's IP address. I was hoping to see some sort of router setup page as you would normally see when configuring a normal ethernet wired/wireless router via a web browser, but unfortunately, there was no such page.

I did some research and found out that you can get some basic information about the phone's IP configuration by downloading a terminal emulator and running a few basic \*nix flavored commands.

I was looking for something more - a GUI would be excellent, but I'll take any suggestions on how to access the phone's routing configuration specs.

Is there any sort of "router setup page" that I can access when I enable my wireless hotspot on my Android phone?

# Answer
> 3 votes
The Android builtin wifi tethering is designed to use 192.168.43.1/24 as the server, with netd handling the tethering, using dnsmasq. First DNS range is 192.168.42.1-254 and and 2nd DNS range is 192.168.43.1-254.

Netd is not easy to change. It requires a socket to communicate with it, and that socket is taken when android starts tethering. But going through the source files for Tethering.java (I used Froyo) we see:

```
// usb client will be provided 192.168.42.129
private static final String USB_NEAR_IFACE_ADDR      = "192.168.42.129";
private static final String USB_NETMASK              = "255.255.255.0";

// FYI - the default wifi is 192.168.43.1 and 255.255.255.0

private String[] mDhcpRange;
private static final String DHCP_DEFAULT_RANGE1_START = "192.168.42.2";
private static final String DHCP_DEFAULT_RANGE1_STOP  = "192.168.42.254";
private static final String DHCP_DEFAULT_RANGE2_START = "192.168.43.2";
private static final String DHCP_DEFAULT_RANGE2_STOP  = "192.168.43.254";

```

And Later on we see those ranges used, **AS BACKUPS**.

```
    mDhcpRange = context.getResources().getStringArray(
            com.android.internal.R.array.config_tether_dhcp_range);
    if ((mDhcpRange.length == 0) || (mDhcpRange.length % 2 ==1)) {
        mDhcpRange = new String[4];
        mDhcpRange[0] = DHCP_DEFAULT_RANGE1_START;
        mDhcpRange[1] = DHCP_DEFAULT_RANGE1_STOP;
        mDhcpRange[2] = DHCP_DEFAULT_RANGE2_START;
        mDhcpRange[3] = DHCP_DEFAULT_RANGE2_STOP;
    }

```

The main source for the dhcp ranges is not the hardcoded 42 and 43, but read from array.config\_tether\_dhcp\_range, an internal string array. But it is currently empty.

You could edit the android framework. On my phone, it is /system/framework/framework-res.apk. There are a **ton** of tutorials online for editing framework-res.apk, from simple strings to full theming. Find one for your phone and android version.

Main thing you want to change is the /res/values/arrays.xml

Look for `<array name="config_tether_dhcp_range" />`

Change to:

```
<string-array name="config_tether_dhcp_range">
     <item>192.168.x.y</item>
     <item>192.168.x.z</item>
</string-array>

```

compile/zip/sign as needed (follow a tutorial), then reinstall.

If you want more than one range, just copy the two items over and over. You always need to provide a start and a stop for each range. Try to keep it in the same /24, ie 192.168.50.5 and 192.168.50.99 or whatever. You can confirm it is working with `busybox ps | grep dnsmasq` or if you don't have busybox `ps dnsmasq` then use the pid in `cat /proc/pid/cmdline`. You should get (or similar):

> /system/bin/dnsmasq --no-daemon --no-poll -no-resolv --dhcp-range=192.168.50.5,192.168.50.99,1h

FWIW, my WIFI tethering uses the default dnsmasq ranges, yet my computer was assigned 192.168.43.147/24 and gateway 192.168.43.1/24. Not sure why yours defaulted to a 42.x address.

# Answer
> 0 votes
FWIW, using "Ethernet Tethering" on my Samsung S20, My attached device gets a 192.168.13.200/24 address and a 192.168.13.25 gateway.

Interestingly, my "Net Analyzer" app shows my phone's external IP as 172.58.200.200 and an internal IP of 33.15.32.108/28.

How many routers are there in my phone...?

---
Tags: networking, wifi-hotspot
---


# Question
Title: How do I send a YouTube video from my desktop to my Android tablet?
Apps such as YouTube and Netflix use the X protcol to conect to smart TVs so you can send (a link to) the video you're watching to the TV, and it starts playing on the TV right away. I'm looking for something like the reverse of this: if I've started watching a video on the YouTube website on my Ubuntu PC, I'd like to have that start playing on my tablet (e.g. so I can take it with me to the kitchen as I cook). Ideally, it should start playing on the tablet at the same point I was at on the website.

The simplest workaround I can think of would be to use the "Watch later" playlist to save the video, and then open it on the tablet. That's quite long-winded, and I'm hoping there's something easier.

# Answer
Hi after googling today in 2022, I find this useful project: https://github.com/pdf/kdeconnect-chrome-extension

It's an extension for chrome/firefox and a binary, It let you push links to phone/tablet and opens browser if no handler defined, or app, e.g.: youtube.

I tested in Vivaldi/Brave and a Amazon Fire 10, works flawlessly.

* NOTE: You must have installed "KDE Connect" in both sides, PC (Windows and Linux) and Android,It might work on Apple devices, I didn't test on those. This KDE connect browser extension is like a plugin for KDE Connect and is not part of the original project.
> 1 votes

# Answer
This page suggests that, if you run Firefox on both desktop and mobile, you can sync tabs between the two. I should note that I haven't done it myself, but I use Chrome on both my devices and the feature works great for me.
> 0 votes

---
Tags: linux, youtube
---


# Question
Title: Getting a timeout error when trying to reach Yahoo mail through all apps. That's the only site with an issue. Samsung s20 fe 5g 1ui4.0
Received a replacement s20fe last week and haven't been able to reach Yahoo mail since. It times out or returns a 'This page isn't working' message. Can't even get through with the Yahoo mail app.

No problems reaching any other site or service. The only problem is getting to Yahoo, with any app.

# Answer
> 0 votes
AT&T sent an OTA that resolved the issue.

---
Tags: yahoo-mail, samsung-galaxy-s-20
---


# Question
Title: Who is the "shell" user during ADB session?
In the Android environment, who is this "shell" user that I'm SSH-ing through ADB, as I attempt to see how much I could do with my Amazon Fire 10 tablet?

Said user's level seems very, very client-level, yet I get the impression it is the same administrator user directly calling the commands to facilitate the installation of the packages.

How does it work within the Android system?

# Answer
> 4 votes
`shell` is a special user (with UID 2000). Its privileges are controlled by mapping its UID with a dummy system app (with package name `com.android.shell`). All permissions which are granted by the Android framework to the app are also granted to the `shell` user. These include some `signature`-level manifest permissions which the normal user apps cannot have.

`shell` user does not and can not do the app installation. It just forwards the request to the related services running in the Android framework (`system_server` process) which then performs the installation as explained here.

---
Tags: adb, shell
---


# Question
Title: How do I switch profiles in Chrome for Android?
Is there any way to switch Chrome profiles while using the Chrome mobile phone app?

# Answer
There is no way to change Chrome profiles on Android/iOS as per Google Chrome Help here.

**But**, you can use apps like *Parallel Space* to have multiple chrome profiles.
> 10 votes

# Answer
The only option for the time of writing this answer is to install addtional Chrome app from the above list: Chrome Stable, Beta, Dev, and Canary and login with a different google account
> 6 votes

# Answer
I figured out how to do it. Go to settings on your android phone, Then select Chrome and "Clear All Data".

When you switch on Chrome again, you can find an option to select a Primary account. Then you can select the account you want.
> 5 votes

# Answer
I ran into this problem. I was able to solve it by downloading the Chrome Beta app from the Play store.

You can then sign into one account via the beta app, and leave the other signed into the regular Chrome instance.
> 2 votes

# Answer
To supplement Amrita's answer, you do:

1. Open Android phone settings.
2. Go to **Apps**.
3. Find and select **Chrome** to open *App info*.
4. Click on **Storage** to view *storage details*.
5. Click on **Manage Storage** to manage the storage.
6. Click on **Clear all data** to wipe account details from the browser.
7. Relaunch Chrome, Accept & Continue.
8. Select desired account from the drop-down and click **Yes, I'm in**.
> 1 votes

# Answer
There is supposed to be:

If you open Chrome on Android, Menu, Settings, and select your account.

But this just takes you on an endless loop.

I wish changing your user on the phone settings would also change all your apps to log in as that user.
> 0 votes

# Answer
Ugh. The closest I got was removing the account I didn't currently want to use, but then it took some finagling to get the account I wanted to use working properly. Very frustrating.
> 0 votes

---
Tags: chrome-for-android, profiles
---


# Question
Title: Finding shutdown event in Android bug reports
My Phone which runs on Android 11 has been crashing frequently. This happens randomly - while attending a call or playing a video.

I have tried to report it to my manufacturer multiple times to no avail. So, I decided to take and analyse the Android bug report in order to understand what is causing the issue. The bug report generates a zip file - which consists of a txt file containing logs.

Is there any generic message which is logged by Android before initiating a shutdown? Or is there any other way - any bug report analysis tool in which I can isolate the events around the crash?

# Answer
> 0 votes
You could link your phone to Android Studio. It has a logcat display that shows exceptions from everything, not just your app. If your phone resets while connected, you'll have a running log of everything up to the reset. In Android 11, it natively supports wireless ADB so you can do this wirelessly.

---
Tags: logging, shutdown, bug-report-feature
---


# Question
Title: Cannot find Telegram folder on Android 11
I have a Samsung A52S 5G with Android 11 installed on it. I have installed Telegram messaging app and have downloaded some files from groups.

In my old phone, I could find in the File Manager the Telegram folder with all the files downloaded through the app. Now, in this phone I cannot find the Telegram folder anywhere. This makes it difficult for managing the files especially the ones downloaded from groups.

Does anyone have any idea on where Telegram is saving the files in my phone?

# Answer
> 4 votes
These are stored in `/storage/emulated/0/Android/data/org.telegram.messenger/files/Telegram`.

You can't access them because of scoped storage introduced in Android 11,for improving data privacy. If your device is rooted, you can access using a rooted file explorer

# Answer
> 2 votes
you can access scoped storage without having to root, use x-plore app. and just approve permissions when asked

---
Tags: samsung, android-11, telegram
---


# Question
Title: How to disable wipe my phone option on ADM for me and for anyone else who have access to my account
So, I recently recalled how my account was compromised years ago, and the hacker proceeded to delete two of my old devices. It was frustrating because not only was my account gone, but so was all of my data on my phone. I'm sure it has something to do with Google's ADM service. I looked through the options and discovered the toggle to keep the device from being deleted.

Now that I've remembered the incident, I'm becoming quite paranoid since I don't want to lose all of my data again without notice. So I went back up to the toggle and looked for it again, but there was nothing there. I looked on Google for a solution and the only one I found was to either delete my Google account or disable ADM for all of my accounts, which would be awful if I forgot where I put my phone.

I've already gone through my settings and discovered that disabling ADM's admin privilege prevents it from erasing my phone, though I'm not sure if it works or not because I obviously don't want to test it out.

Is there a way to merely disable the wiping and keep the rest? Is disabling ADM's admin privileges sufficient?

To avoid being hacked, I know I can safeguard my accounts using 2FA and strong passwords (which I have already done). However, mistakes do happen, and I'd rather be safe than sorry.

# Answer
I dont like asking Google to help me remember anything, but I still find myself using their oh so accessible tools. However, ADM is completely unnecessry. Your phone's settings should have the ability to help find it already present. As for backing up your data, there are a number of alternatives available. You could even back it up to your own pc if you like: https://www.google.com/url?q=https://www.lifewire.com/how-to-backup-android-phone-to-pc-4769775&sa=U&ved=2ahUKEwiysd7HmIb3AhUHSjABHe3CBt0QFXoECAoQAg&usg=AOvVaw2rWroggBCcCt4El2ucjDn4. You just have to decide what feels right for you.

Unless you are a programmer well-versed in cyber security, you're going to have to rely on someone else to do the heavy lifting. It really just comes down to trusting whatever source you choose.
> 0 votes

---
Tags: 8.1-oreo, android-device-manager
---


# Question
Title: Howto downgrade any app to the previous version without losing data on android oreo?
Howto downgrade any app to the previous version without losing data on android 8.1 ?

EDIT 0 : Nota Bene : Here, Fairemail is given as an example, my question is not app specific but Android specific. I'm actually asking how to downgrade any app to it's **previous release** having already downloaded the apk.

Here is the information of the package eu.faircode.email I want to push to downgrade :

```
$ du -h eu.faircode.email_1036.apk
13M eu.faircode.email_1036.apk
$ aapt2 dump badging eu.faircode.email_1036.apk | egrep '^$|package|[s]dkVersion:|application-label:|native-code:'
package: name='eu.faircode.email' versionCode='1036' versionName='1.1036' platformBuildVersionName='' platformBuildVersionCode='' compileSdkVersion='29' compileSdkVersionCodename='10'
sdkVersion:'21'
application-label:'FairEmail'
native-code: 'arm64-v8a' 'armeabi-v7a' 'x86' 'x86_64'

```

I tried to reinstall this app without data-loss :

```
$ adb install -r -d eu.faircode.email_1036.apk
Performing Streamed Install
adb: failed to install eu.faircode.email_1036.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

```

but it didn't work, so I tried the un-installation of this app without data loss and it worked :

```
$ adb uninstall -k eu.faircode.email
The -k option uninstalls the application while retaining the data/cache.
At the moment, there is no way to remove the remaining data.
You will have to reinstall the application with the same signature, and fully uninstall it.
If you truly wish to continue, execute 'adb shell cmd package uninstall -k'.
$ adb shell cmd package uninstall -k eu.faircode.email
Success

```

But then the installation of `eu.faircode.email_1036.apk` didn't :

```
$ adb install eu.faircode.email_1036.apk
Performing Streamed Install
adb: failed to install eu.faircode.email_1036.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
$ adb install -d eu.faircode.email_1036.apk
Performing Streamed Install
adb: failed to install eu.faircode.email_1036.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
$ echo $?
1

```

It seems `adb install -d` is only use-able with debuggable packages only according to this :

```
$ adb | grep downgrade
      -d: allow version code downgrade (debuggable packages only)

```

Can you help me ?

# Answer
What you want is not possible and for a good reason: updated data structures (files, database, etc) are often incompatible with old app versions. This is why you can downgrade debuggable packages (for development purposes) only.

If you have a problem with FairEmail, please report it in this forum:

https://forum.xda-developers.com/android/apps-games/source-email-t3824168
> 3 votes

# Answer
If your device is rooted, there's a work-around (apply at your own risk – as Marcel correctly pointed out, there's a reason why it's made close to impossible):

1. install
2. backup the app you want to downgrade
3. uninstall the app you want to downgrade (completely, i.e. app & data)
4. install the older version
5. use Titanium Backup to restore *data only*

This worked for me in several cases. No guarantees however: if the newer version changed structures in its databases/configuration, you will end up with an unstable app – and later updates might fail (in those cases, use TiBu to restore the *full backup* you made originally – so make sure to keep that one safe).
> 2 votes

# Answer
Nokia TA-1041, android 8.0.0.

Android Debug Bridge version 1.0.39 Version 1:8.1.0+r23-5ubuntu2

Ubuntu 20.04.3 LTS x86\_64 Kernel: 5.13.0-40-generic

I actually met a similar problem, when downgrading the WeChat from 8.0.18 to 7.0.21. I tried `adb install -r -d` and `adb install -r -t -d`, both of them does not work, with the error \[INSTALL\_FAILED\_VERSION\_DOWNGRADE\].
However, I tried this method, it works. https://moreless.medium.com/how-to-downgrade-an-android-app-without-losing-chat-history-afea00141601

1. `adb shell cmd package uninstall -k <package>`  to uninstall package.
2. `adb reboot` to reboot your phone.
3. `adb install <package_apk_file.apk>`  to install a lower version app.

Note that the reboot is very important, this step could not be avoided. I actually tried `adb shell cmd package uninstall -k` before reading the page above. But as long as I do not reboot, the lower version could not be installed, with the error \[INSTALL\_FAILED\_VERSION\_DOWNGRADE\].
Additionally, https://blog.csdn.net/u012852597/article/details/108814434 from this article, it seems that you could also try to copy the apk file to '/data/local/tmp/' and install the apk.
> 0 votes

---
Tags: adb, 8.0-oreo, 8.1-oreo, downgrade
---


# Question
Title: How to share Android "Reverse-tethered" internet via Android WiFi?
Before going into main question, we do know that :

Now the question is :

"Is there a way to share the reverse-tethered internet (as we known connected via `usb0` interface) via "Android WiFi Hotspot?"

To make it easier, here's the schema:

Schema of my setup (click image for larger variant)

\*Additional Notes :

* Actually I don't give a limit which version of the Android (so if it's just compatible in higher version e.g. 4.2, it's okay for me), but I prefer it works on 2.3.x (Gingerbread)
* Some explanations of how to make APN (Infrastructure Mode) on Android (just like Wireless Router/\[`netsh wlan hostednetwork`\] on Windows 7/8) might be really helpful too.
* And also some explanations about how to masquerade (internet sharing) between two interfaces in Android. (such as ICS in Windows or Masquerade/iptables thingy in Linux-based)

# Answer
I managed to make it work. Here is an "OSI-like" diagram of my setup, if it makes sense:

```
 ____________________   ______________________________    ____________
|   LinuxVM <----+  |  |                              |  |            |
|  VirtualBox    |  |  |                              |  |            |
| Windows7(host) |  |  | +--> AndroidPhone <-------+  |  | +-->Laptop |
|  (USB)         +-------+   (USB)  (wifi-HotSpot) +-------+   (wifi) |
|___________________|  |______________________________|  |____________|

```

The script is located at the XDA forum: http://forum.xda-developers.com/showpost.php?p=50236807&postcount=9

```
## 0.a. Connect android-phone to PC through USB.
## 0.b Enable Settings|...|Tethering
##  (so that the device gets detected by the PC's kernel, you should see the following with 'dmsg':
##         [    3.976599] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:00:0b.0-1, RNDIS device, 4e:d5:8c:7b:4f:5a
## Enable Settings|...|Wifi-Hotspot

## Setup usb reverse-tethering.
#  from: http://forum.xda-developers.com/show....php?t=2287494
#
#  Yours device might be 'rndis0' or something else.  Check by just typing 'netcfg'.
#
netcfg usb0 dhcp
busybox route add default gw 10.42.0.1 dev usb0

## Disable mobile-data.
#
busybox ifconfig rmnet_usb0  0.0.0.0

## Masquerade through USB.
#
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
iptables -P FORWARD ACCEPT

## Set DNS (if neccessary, ie google's 8.8.4.4).
#
setprop net.dns1 XX.YY.ZZ.WW

```
> 5 votes

# Answer
I made a tool special for that use case: tetherspot

This script simplifies reverse USB tethering with WiFi hotspot on **non-rooted** Android devices

The main idea is to use

* Gnirehtet on PC to start reverse USB tethering via VPN and `adb`
* Proxy server on Android to route WiFi hotspot traffic to VPN
> 1 votes

---
Tags: wi-fi, networking, internet, tethering
---


# Question
Title: How can I remove an app icon located in the lower row in my Pixel 6's home screen?
How can I remove an app icon located in the lower row in my Pixel 6's home screen?

Example:

# Answer
> 0 votes
As Morrison Chang commented, one can tap and hold the icon and drag off/upward from the "shortcut bar", which sometimes reveals a "remove" option. The "remove" option doesn't work for me, but if one can tap and hold the icon a second time, it then reveals a "Don't suggest app" option, which worked for me.

Demo: https://www.youtube.com/shorts/Zg0OCC0ocQQ

"Don't suggest app" option:

To undo it: Press and hold the home screen, then choose home settings, then suggestions, then blocked apps (source).

---
Tags: home-screen-shortcuts, google-pixel-6
---


title: Can't select CA certificate

text:
# Question
Title: Can't select CA certificate
Even after installing a CA certificate, I am not able to select it in the network configuration. I just get this message "CA certificate must be selected" but I can't find where I can do it.

How can I select the certificate I have just installed?

# Answer
I had the same issue, how do you select the certificate when there is no dropdown or input field?

Well, this is insanely counterintuitive (at least for me), in order to pick the correct certificate for WiFi, you need to install it first. Assuming you have your cert file, you need to copy it to the 'Internal memory' folder on your phone. It is very important, otherwise, you will not see the certificate later on.

Now go to Settings -\> "Security" -\> "Encryption & credentials" -\> "Install a certificate" -\> "Wi-Fi certificate" and select your certificate. Enter name and install it. Now it will be available from the dropdown in WiFi connection menu.
> 2 votes

---
Tags: android-11, certificates
---


title: Can you record video to external drive?

text:
# Question
Title: Can you record video to external drive?
If I connect an external ssd drive to the phone, it can browse its file system and write to it. Is there an app (or a setting) that allows me to record video directly to this external drive? The use case is shooting longer videos without stopping to transfer files.

# Answer
> 1 votes
Yes. The "Open Camera" free software app from the F-Droid store lets you select the directory to save files.

I have just tried it with connecting a usb3 ssd with otg, and saved a video onto it.

https://f-droid.org/en/packages/net.sourceforge.opencamera/

---
Tags: external-sd, storage, video-recording
---


# Question
Title: How to setup whatsapp account on second sim without alerting whatsapp contacts of first sim?
My phone is Samsung F41 Galaxy. It allows to use dual sim.

But I don't want to merge two whatsapp accounts of dual sim. So how to setup whatsapp account on second sim **without alerting whatsapp contacts of first sim**?

Second sim is for **office purpose**.

# Answer
> 1 votes
You can use the "Insular" from F-Droid.

https://f-droid.org/en/packages/com.oasisfeng.island.fdroid/

It activates the Android feature called "Work Profile", (which is essentially a different user account), and lets you install app copies into it. You can control what data are shared between those two profiles.

In principle, that is also doable with console command `pm` , but is much more tedious.

Also, there is a feature of certain ROMs, such as OnePlus, which has this feature built in. (But it uses a different user ID, so you can have three copies of an app within a single GUI, one default, one in Insular, and one in an OnePlus "parallel app".)

The downside of this is that TWRP backups (nandroid) will not work. You can use Titanium Backup, or just do the backups manually.

---
Tags: samsung, whatsapp-messenger, dual-sim
---


title: Why can't I run adb via udev?

text:
# Question
Title: Why can't I run adb via udev?
I am writing a bash script that will run upon plugging my Android 6.0.1 phone into my Ubuntu 16.04 laptop. I am stuck at the point where the script runs fine when I execute it manually from a terminal session, but it fails when I try to have it automatically run via a udev rule.

The content of /etc/udev/rules.d/99-android.rules is:

```
ACTION=="add", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860",MODE="0666", RUN+="/data/personal/backup/backup_galaxya5_start"

```

The content of /data/personal/backup/backup\_galaxya5\_start is:

```
#!/bin/bash
sudo -u marc echo /data/personal/backup/backup_galaxya5 | at now

```

The content of /data/personal/backup/backup\_galaxya5 is a whole heap of things, but it essentially boils down to:

```
adb start-server
adb push /data/download/rsync4android/rsync.bin /data/local/tmp/rsync >> "$LOGFILE"
adb shell chmod 755 /data/local/tmp/rsync >> "$LOGFILE"
adb shell 'exec >/data/local/tmp/rsyncd.conf && echo address = 127.0.0.1 && echo port = 1873 && echo "[root]" && echo path = / && echo use chroot = false && echo read only = false' >> "$LOGFILE"
adb shell /data/local/tmp/rsync --daemon --no-detach --config=/data/local/tmp/rsyncd.conf --log-file=/proc/self/fd/2 & >> "$LOGFILE"
adb forward tcp:6010 tcp:1873
rsync -av --exclude .thumbnails/ "rsync://localhost:6010/root/sdcard/DCIM/" "$TARGETDIR" > "$RSYNCLOGFILE"

```

As I said, running this when the phone is plugged in from a terminal works without any problems. However, when I plug the phone in to have the script run automatically, the following happens:

1. The udev rule picks up the fact that the phone was plugged in and executes /data/personal/backup/backup\_galaxya5\_start.
2. That file uses the at command the schedule the actual backup script to run.
3. The actual backup script runs and starts the adb server.
4. The backup script is then unable to copy the rsync.bin file to the phone.
5. The subsequent adb commands are failing as well.

At some point I even changed the script to pickup the failed "adb push" command and then do a "adb kill-server", however this also did not help.

I would like to know what I am missing in order to make this script work when called from the udev rule.

# Answer
> 1 votes
I've given a try to http://www.joescat.com/linux/android\_rules.html but it failed to start adb server, don't know why

In "/etc/udev/rules.d/51-android.rules":

```
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee7", ACTION=="add", RUN+="/usr/bin/rehtet"

```

/usr/bin/rehtet (nohup and & and disown won't work, "at now" work):

```
#!/bin/bash
echo "/usr/bin/adb shell ls >/tmp/rehadb.log" | at now

```

And the last 3 lines in the rehadb.log showed:

```
...
socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(5037), sin_addr=inet_addr("127.0.0.1")}, 16

```

Finally, I fixed it (maybe there are bad side effects):

```
edit "/lib/systemd/system/systemd-udevd.service", change "IPAddressDeny=any" into "IPAddressDeny="
run "systemctl daemon-reload"   "service udev restart"
to enable udev script (gnirehtet / adb) to access 127.0.0.1:5037

```

# Answer
> 1 votes
You might try adding `adb wait-for-device` after `adb start-server` in the file `/data/personal/backup/backup_galaxya5`. I have found that the script gets run by `udev` before the `adb` deamon can get started. Adding `adb wait-for-device` blocks until `adb` is up and your device is registered.

---
Tags: 6.0-marshmallow, adb, linux
---