title: Clearing default opening app

text:
# Question
Title: Clearing default opening app
Whenever i open .pdf file from file explorer it automatically opens with wps office but when wps office is unstalled it ask to choose app to open the pdf..How to make file explorer ask to choose program when i click on pdf file.I tried clearing default of all apps

# Answer
There are multiple ways to clear the default action app:

* you already noticed it gets cleared when the corresponding app is deleted
* same applies if you install another app that could perform the same action
* there's a menu in settings where you can clear the default without (un)installing an app. Unfortunately, it's hard to find. Before Android 7 it had an own menu entry in settings. Since Android 7, you need to go to *Settings › Apps,* tap the app's entry, and will find if it's set as default. With that option you can also made it the default, or remove it from being default.
> 0 votes

---
Tags: settings
---


# Question
Title: How long are call logs stored and is this configurable?
As far as I can tell, my OnePlus 3 has complete call logs for the past 6 months (last log 4-19-2018, today is 10-20-2018 which seems too much of a coincidence)

Logs are really useful but some calls I make only once a year so being able to keep (more) complete logs would be really useful.

Is this something that's configurable on Android? And, is there a way to sync this with my Google account so it's backed up even?

# Answer
> 1 votes
There is a limit of 500 entries for calls (incoming, outgoing and missed) in Android. How long will the call log last, go back in time or get filled depends on how often you call or are called.

If your device is rooted, you can install Unlimited CallLog for LP/MM/N, an Xposed module that extends the limit to an unlimited number like its name suggests for Android 5 to 7. For non rooted devices, a search via Google Play Store provides a list of apps that should also extend the limit.

Your device should have the ability to backup the call history; search for `Backup` in the Settings app. Some of the apps (see previous link) also provides for backup options.

Manage & restore your device backups in Google Drive

---
Tags: google-account, call-history, oxygenos
---


title: Sd card encryption forgotten password

text:
# Question
Title: Sd card encryption forgotten password
I've forgotten my password so I can't deactivate my encrypted SD card in my Samsung S9. Is there anything I can do please?

# Answer
> 0 votes
You haven't clearly mentioned what type of encryption it is... Anyway, I'll tell you a general solution. I'm not 100% sure if this will work. Also, this may not work if the SD card was used as adoptable storage at the time of mounting it on the S9. I'm also not sure if this will work if you have used Samsung Knox to encrypt it..

---

## **WARNING** : This method will completely erase any data you have on the SD card. I'm not responsible for any data loss. This will only give you your SD card back in a usable form.

• Insert the SD card into a Windows machine (preferably Windows 10) using an SD card reader.

• The system will automatically allot a drive letter to the SD card. It's in this step where the problem lies. Depending on the type of encryption, the system may or may not detect the SD card.

• If it detects the card, note the drive letter. Else if it doesn't detect the card, just simply follow these steps.

• Right click on the Start icon

• Select Disk Management

• If the card was detected earlier, it will display the SD card as *online* along with the drive letter. It will also list one (or more) partitions. There may be some listed as **Healthy Primary Partitions** and some other **Unallocated spaces**. If it hadn't detected the card, there is a possibility that it may display the the drive as just *unallocated space*.

• Even if there are no unallocated spaces, just right click on the Healthy partitions and click delete volume. Repeat this for all partitions in the SD card. If there are only unallocated spaces, right click on that space and then select **New Simple Volume**

• Then, all the partitions will combine together to form a single **Unallocated Space**

• Now, right click on the unallocated space and click on the **New Simple Volume** option.

• A new Simple Volume Wizard will pop up. Follow the prompts the wizard gives to create a new Simple Volume.

• Exit the Disk Management utility and eject the SD card .

That's it. If you're lucky, you'll be able to get the SD card back to life. Please don't blame me if this doesn't work. I'm just guessing it will. Sorry if this doesn't work...

---
Tags: external-sd
---


title: Application Permissions

text:
# Question
Title: Application Permissions
I note that with my Samsung S7 Edge now I have "Permission Monitor" as an option, which is great. Leaving out the whole root option (I don't want to risk it again, it was a $300 fix last time it 'broke') I am looking for a methodology to either:

* Allow me to globally **refuse** permissions to all applications or;
* Reset permission settings **each time** the application is used.

A typical use is I need Facebook (Yes, I know they have the data already...) to have access to photos for example. I enable it, and then never disable it. I want to limit (and this is basically **globally**) any applications capacity to interact with photos, videos and microphone.

* Samsung S7 Edge
* $10-30.00 budget for application
* Preferably not rooting, Android 7.0 (From memory)

# Answer
> 2 votes
Non-root third party permission managers have to rely on inbuilt appops permission manager. Because appops is not available for third-party apps but only the system apps, former usually resort to an hack.

I use App Ops - Permission Manager from *Xingchen and Rikka*, mostly because of its auto-apply template feature (the global restrictions you're looking for on all new installations). Furthermore, it also provides access to all permissions available under appops for any app, regardless whether the app requests access to such permission or not. It, however, doesn't "*reset permission settings each time the application is used*".

On first launch, the app would guide you how to setup adb to make the app work. The downside, not limited to this app but quite about every non-root third-party permission manager, is that if you reboot, you'd have to setup the adb hack again or your custom preferences for the apps would fail to work (note: the app itself would fail to work unless adb hack is setup again).

---
Tags: permissions
---


# Question
Title: Force Samsung s7 to bypass Pattern Lock and use Pin
My daughter has forgotten her pattern lock. She knows her PIN but it's not giving her that option, only the pattern lock screen.

Is there a way to get access to the PIN lock screen?

# Answer
> 7 votes
The first answer is 'No' as one can use only one type of screen passcode and you are using 'Pattern Lock' so it replaces your 'PIN lock' which you enabled last time.

> As I'm not sure of security settings of your device, i am assuming it that it may have previous facility from back days devices that uses first 'PIN'/'PASSWORD' and then additional is 'LOCK PATTERN'. If this is the case, try to draw wrong pattern 5 times if PIN is enabled as secondry passcode it would ask you to put your 'PIN'.

Last option would be factory reset your device as it will remove all the current locks.

**How to factory reset s7 ?**

1. Turn off your device.
2. Press and hold the Volume Up and Home buttons.
3. While continuing to hold volume up and home, press and hold the Power button until RECOVERY BOOTING appears in the upper-left then release all buttons.
4. Select Wipe data/factory reset option on screen by using your volume +/- key and power button to click option.
5. Confirm by pressing power button for 'Yes'.
6. Wait, let the system reset finish.
7. Now choose 'Reboot'.

Remember: Your device can ask for you to sign in with owner's google account(the account previously signed in before resetting device) as a FRP feature. So make sure you have credentials of your google account.

---
Tags: samsung-galaxy-s7
---


# Question
Title: Samsung S7 - Facebook Messenger Drains A Lot of Data
I have the fb messenger app on my phone which I use regularly, but in all the months I've used my phone, I've never surpassed 50 MB per month of data usage for that app.

About 2 weeks ago, I got the Nougat 7 update, and I believe ever since then (it started happening around the same time) my Messenger app has been draining data. Within a week, it used about 500 MB of background data.

Is there anyway I can fix this?

# Answer
> 3 votes
It's very bizzare that messenger using heavy data.

The possibilities are:

• May be you have shared a video to few contacts and it is using data!

• May be you have clicked a big video file and switch to another app(video is still loading and using data to finish it to the end of video). Or • Viewing videos frequently shared by someone.

If these things are excluded, it may be a bug.

• See playstore if there is an update.

Or try clearing Cache and Data and log in again then observe data usage.

---
Tags: 7.0-nougat, samsung-galaxy-s-7-edge, facebook-messenger
---


# Question
Title: How to install Messenger Lite on Samsung tablet
I'm want to install Facebook Messenger Lite on my non-rooted Samsung T-580 tablet with Nougat 7.0. There is a message saying:

"Your device isn't compatible with this version."

No more info is provided on why this happens. Why can't I install the application, and is there a way around it?

# Answer
You can install it from apkmirror choose your android version and it's done. If after installation app misbehave try to install a lower version of the app.

Remember: You may be asked to enable 'Unknown Sources' (to install apps that are downloaded outside of playstore).

To enable: • Open Settings • Security Settings

Under 'Security Settings' you will see this option.
> 3 votes

---
Tags: installation, facebook-messenger, compatibility
---


# Question
Title: Edit hosts file on android studio messed up my emulator
I had to edit my emulator' hosts file in order to connect to a local development environment. I have followed this steps:

Run the emulator:

```
~/Library/Android/sdk/tools/emulator -writable-system -avd Nexus_5_API_19

```

In another terminal/cmd prompt:

```
adb reboot

adb root

adb -s emulator-5554 remount

adb -s emulator-5554 pull /system/etc/hosts hosts

add the IP to host file

adb -s emulator-5554 push hosts /system/etc/hosts

adb reboot

```

Now whenever I try to start my emulator from AVD Manager it is not responding. I always have to start it with:

```
 ~/Library/Android/sdk/tools/emulator -writable-system -avd Nexus_5_API_19

```

I mention that I work from High Sierra.

Mention: I have tried with `adb` to make my emulator `rw` but it did not allow me to push my hosts file.

# Answer
> 1 votes
There is an other way to manipulate the /etc/hosts (You need a **Linux** machine )

Use the system.img which come from Google

# go to your Android SDK home

1. cd $ANDROID\_HOME

# find the right system.img for your emulator

2. sudo mount -w system-images/android-25/google\_apis/x86\_64/system.img

# edit the /etc/hosts

3. sudo vi /mnt/etc/hosts
4. sudo umount /mnt

Create an emulator (from Android Studio)

1. ASD Manager
2. → "Create Virtual Device"
3. → Nexus 5X
4. → Next
5. → Tab x86 Images
6. → Nougart - 25 - x86\_64
7. → Next
8. → "AVD Name" : "Nexus 5X API 25 with WLAN hosts"
9. → Finish

I have gone this way because **emulator -writable-system -avd xx** didn't work in my environment. Also mounting the system.img in my ~/.android/avd/xxxx directory didn't work anymore.

# Answer
> 1 votes
**Step by Step**

1. Don’t Create the AVD with **Google Play image.**
2. Use for example **Google APIs Intel x86 Atom System Image**.
3. Start the emulator with the following command…

```
emulator.exe –avd <avd name> -writable-system

```

For example:

```
    C:\Users\ilyas.mamun\AppData\Local\Android\Sdk\emulator>emulator.exe -avd Pixel_API_25 -writable-system

    emulator: WARNING: System image is writable
    HAX is working and emulator runs in fast virt mode.
    audio: Failed to create voice `goldfish_audio_in'
    qemu-system-i386.exe: warning: opening audio input failed
    audio: Failed to create voice `adc'

```
4. Root and Remount the AVD like the followings…

```
C:\Users\ilyas.mamun\AppData\Local\Android\Sdk\platform-tools>adb root

C:\Users\ilyas.mamun\AppData\Local\Android\Sdk\platform-tools>adb remount
remount succeeded

C:\Users\ilyas.mamun\AppData\Local\Android\Sdk\platform-tools>adb shell
eneric_x86:/ # cd system
generic_x86:/system # cd etc
generic_x86:/system/etc # cat hosts
127.0.0.1       localhost
::1             ip6-localhost

generic_x86:/system/etc # echo "192.168.1.181     sandbox.dmoney.com.bd" >> hosts
generic_x86:/system/etc # cat hosts

127.0.0.1       localhost
::1             ip6-localhost
192.168.1.181     sandbox.dmoney.com.bd
generic_x86:/system/etc #

```

# Answer
> 0 votes
Perhaps the reason you can't remount adb as root is you are using a production emulator image rather that a debug image see: ADB root is not working on emulator

To overcome this try rooting your avd as outlined here, then install a hosts editor to easily modify the hosts file. Try rebooting as usual as you still need to append with `-writable -system` for changes to persist.

This problem occurs because emulator from android studio has been changed and partition `/system` is **no longer writable between reboots**.

An alternative workaround will be to replace the original files in `<sdk_path>/system-images/android-xx/default/x86/system.img`.

* Copy the `system.img`: `cp /home/a/Android/Sdk/system-images/android-xx/default/x86/system.img ~/.android/avd/[avdname].avd/system-qemu.img`
* Put the new `system.img` in `.android/avd/avd name/`. Rename it to `system-qemu.img`, thus the emulator will use this new image instead of the original one, and this won't your other emulators.

---
Tags: android-emulator, hosts
---


# Question
Title: Paste YYYYMMDDHHMMSS timestamp anywhere (hotkey shortcut)
YYYYMMDDHHMMSS or YmdHis in PHP is the timestamp format used by Wayback Machine URL and the %A\_Now variable in AutoHotKey.

It looks like this: 20171223145921.

### How can I paste the timestamp of the current time anywhere?

Is there anything like AutoHotKey that can do the job?

# Answer
I'm not sure if there is anything like AutoHotKey in Android but it is possible to get the timestamp in that format for the current time on demand.

You'd need Tasker or any other app which can run a command.

Setup a task with these actions:

1. Code → Run Shell:
    * Command: `date "+%Y%m%d%H%M%S"`
    * Store Output In: `%date`
2. System → Set Clipboard → Text: `%date`
3. Now, exit the Tasker, go back to Home Screen, long press your home screen to add a widget and choose Task Shortcut → pick your newly created Task → assign an icon at the bottom. That's it.

Whenever you would press that icon on your home screen, the current date-time would be copied in your clipboard automatically in the supplied format. You just have to copy paste it wherever you want it. There can be other methods to run a Tasker task less disruptively, such as through quick settings, as mentioned here by Grayox96 on Reddit.
> 1 votes

---
Tags: keyboard, clock, text-input, text-editor
---


# Question
Title: Redmi Note 4. ADB pm uninstall some packages, Stuck in Reboot
So I wanted to remove some apps pre installed.

I connected to my `Redmi Note 4 ( Nougat )` via `adb shell`.

Used `pm uninstall -k --user 0 <name of package>`

Removed the following packages.

```
com.android.browser
com.android.email
com.google.android.apps.tachyon
com.google.android.music
com.google.android.play.games
com.google.android.videos
com.miui.cleanmaster
com.miui.cloudservice
com.miui.cloudservice.sysbase
com.miui.securitycenter
com.miui.weather2
com.mxtech.videoplayer.ad
com.xiaomi.mipicks
com.xiaomi.oversea.ecom
org.wordpress.android

```

According to me, I did not remove any system apps. However now when I Reboot I am **stuck at Reboot Screen (bootloop)** with `adb devices` showing as `connecting`

I am able to boot into **fastboot** mode. Dont know how to make use of that here. Also I have a Ubuntu machine, so I am not able to use official MI tools which are mostly for Window users

# Answer
> 0 votes
Flash a fastboot stock rom, fastboot rom even has a option to flash without wipe.

If you have a linux i could guide you further on how to do that.

---
Tags: adb, 7.0-nougat, 7.1-nougat, xiaomi-redmi-note-4g, redmi
---


title: How to stop ads showing up on screen

text:
# Question
Title: How to stop ads showing up on screen
The phone is showing ads on the bottom of screen as well as on the top of whole screen I tried deleting the recent apps i installed I also tried disabling "show app on top" Is there any third party app that can scan the phone

# Answer
Possible reasons:

• Checkout Games that you installed recently.

• Check if you installed any app related to *Wallpapers or lock screen* category.

Because as far as i know Samsung doesn't have internal settings to show these horrible ads which covers the screen and affect their User Experience.

*In previous cases 'Games' are at top which is causing these types of ads.*
> 3 votes

---
Tags: ads
---


# Question
Title: What does it mean for a corrupted photo to appear on my album?
So I decided to clear out some photo for storage and I pasted by this photo here, but it was corrupted:

The photo was actually took yesterday (12/25/18) but today I open to find it like this. I don't know how the image got to be like that, but I'm worried that it can be a virus or it can damage the phone in another way.

# Answer
I have faced this issue too and in my case i have transferred pictures from another device to my device and *Sharing Tool* (sharing app) was buggy and it corrupted some files.

So make sure if you transferred from another device.

Or

It could be possible if you have 'Auto Backup' enabled in any cloud storage. It also makes my image looks like yours and what i did uninstalled that app but images that are affected still not recovered.
> 2 votes

---
Tags: photos
---


# Question
Title: When you record a video at 60 fps, how can you play the video back at 24 fps?
I saw a friend shooting video at 60 fps and then playing the videos back at 24 fps. Seeing the 60 fps video playback at 24 fps was quite amazing and impressive (dramatic almost slow motion effect)!

He did all of this on what looked like an expensive DLSR device.

My question is:

**When you record a video at 60 fps, how can you play the video back at 24 fps?**

I tried to edit the video on my pixel 2 but there wasn't anything there for changing the fps. Maybe I will try VLC player.

# Answer
> 5 votes
Using VLC player:

* play the video
* tap the screen to bring up the controls
* click the three dots button
* click the"playback speed" button
* adjust to 45 - 50%
* done

It doesn't get you exactly the 24 fps but it's something!

I would love to have a way to export the video at 24fps. Or better video editing for built-in Android apps.

# Answer
> 3 votes
I personally use Cyberlink Power Directoron Android for doing this, you need to slow it down to around %45 and then export the video at 24 FPS

Export Steps with Power Director

1 - Select Save Video

2 - Select Save to Device

3 - Select Options

4 - Select Frame rate

5 - Select 24FPS

6 - Optional Bit rate

7 - Save

8 - Export

# Answer
> 1 votes
Frames get dropped, carried over as required. In effect the 60FPS is "strobed" to 24FPS. This is a common topic for home cinema buffs as 24FPS is a standard.

You need to transcode, an android device is not the best for this. Search for `Video Transcoder`, maybe have a look at Timbre.

Most people would upload to a workstation for anything serious or large.

---
Tags: video, media-player, editing
---


# Question
Title: Prevent application to make silently install file(s) or making changes
'Request Install Packages' let's say if an app has this permission ex- facebook(Check it in playstore head to facebook then 'app permissions' and click 'see more'. I used to read articles related to security threads to the device and while reading what this permission can bring to the device is look suspicious as it can trigger to install/make change to an existing app silently(without taking any permission from user).

> I have then checked many apps that i was going to install but this setting makes me think that it may include security issues. Isn't it ?

Is there any way to prevent making changes silently ? Can an antivirus prevent these changes to the device's app ?

Android Version: Nougat 7.0

# Answer
Request install will require the user to accept the install, this permission is probably used for two things on Facebook specifically

* Redirecting users to install Messenger
* Redirecting users to install Updates to Facebook

I understand your concern with allowing an application to install other applications without notification, but this is not possible, the permission only allows the application to redirect the user for installs, you still need to accept the installation.

You can prevent the application by using a permission manager, some of them recompile the application and completely disable the permissions, other use AppOpps to disable the permission.
> 0 votes

---
Tags: applications, security, permissions
---


# Question
Title: Google keyboard, no option to keep my word?
I took a leap from my Samsung Galaxy S4 to a Motorola Droid Turbo II with Android 6 installed. I love everything about this new phone and OS, EXCEPT...

On my S4, whenever I typed a word in that autocorrect wanted to change, it would show whatever I typed (my word) at the top left of the autocorrect bar, then it would show one or two options to the right.

Well, this new phone doesn't do that and it is frustrating!

I do NOT want to turn autocorrect off.

I do NOT want to turn "automatically insert autocorrect word when pressing space" off.

I simply want to see my word on the left, so that I can click it and tell autocorrect that this is the word I want to keep.

Why did this change?! How can I get this back!? I guess I use a lot of funny words or something but this is driving me up a wall.

Please help!

# Answer
> 5 votes
I am sure you are talking about two different things that are:

• Autocorrect (it will automatically replaces your word when hitting space.)

• Predictive Text/Suggestions (it just shows you different word you can use including which words you use previously.)

You should Turn off 'Autocorrect' and let 'Predictive Text/Suggestions' turned on.

---
Tags: keyboard
---


# Question
Title: I want to receive SMS in two different phones simultaneously
The messages sent to one phone meant for it only should also be received by the other phone. What is the way out?

# Answer
It's easy. You'll need to use an SMS Forwarding software, I'm not sure if you want it to be visible however...

If you would like to forward calls,

* Open Dialer
* Open Call Settings in Dialer
* Navigate to, and change the call forwarding number when unanswered.

If you want to forward SMS,

* Download an SMS Forwarding software
* Enable forwarding of incoming and outgoing sms or just incoming.
> 1 votes

# Answer
There is an app called Forward SMS texting w/ 2phones which allows you to forward SMS text messages & calls from one phone to another phone.

In order to use this app you need to also use the mysms SMS Text Messaging Sync app.
> 0 votes

---
Tags: applications, sms
---


# Question
Title: "One-click" root apps don't work anymore. Why not?
Years ago, it was easy to root any device. You installed KingRoot, KingoRoot, or a similar app. You hit the large "Root" button, and let the app do the rest. After 5 minutes or so, a green "Root Succeeded!" prompt would pop up. You could choose to keep the root app; or you could uninstall it and install a clean root manager app like SuperSU or Superuser.

* How do these apps work?
* Why don't they work anymore?
* If they do work, should I use them or not?

# Answer
I had this question a few months ago, and I found this answer through some research, so I thought to share my research in this site by answering my question, considering the fake information online. (For example, the official KingoRoot site says that it can root Android Oreo which is completely wrong information)

**How do the rooting apps work?**

There are quite a lot of rooting apps, KingRoot, KingoRoot, Z4Root, Root Genius, Universal Androot to name a few popular/used to be popular apps. All of them use exploits/vulnerabilities/loopholes in the Android OS to give themselves privileges reserved to the system apps or even the Android OS itself. And then they mount as read/write the directory named `/system` which houses the processes required to get the system running and the system apps, and place a binary named `su` in a place of the directory, namely `/system/bin/su`. If some app requires root, the app executes that binary, and you see a prompt whether to allow or decline root access.

The exploits/vulnerabilities that get discovered are given an CVEID, and then detailed in the CVE website, and fixed in the Android Security Bulletins. An example is the infamous DirtyC0W vulnerability which was given the CVEID `CVE-2016-5195`, which plagued and still plague the older Linux kernels. Almost all of the apps mentioned above exploit this vulnerability.

**Why are the rooting apps not working anymore?**

As referenced in the Bulletins above, Google fixes a series of issues in Android every month. So the scope of the vulnerabilities is highly decreasing. *All the vulnerabilities the rooting apps uses to date were fixed in the security patches somewhere around 2018 January*.

**But there can be issues some manufacturers forgot to patch! What about them?**

On Android 6.0.0 or newer, that will just cause the device to not boot anymore. To understand the reason for this, we have to look at a concept named *Chain of Trust*.

*Chain of Trust*, abbreviated CoT, is a security mechanism that was introduced to protect the Android OS from viruses and unauthorized modifications. It works like a chain of hardware and software, where each part verifies the next part. On a step-by-step basis:

1. When you power on the device, a hardware function (sometimes called Boot ROM) starts. The Boot ROM is burned into the hardware and cannot be changed.
2. The Boot ROM verifies the first software in the CoT, the bootloader which is a raw binary blob, sometimes called the preloader. (Also the Boot ROM sometimes loads and uses special custom partitions/binaries depending on the vendor) If the bootloader does not pass the verifications, the device shuts down. If it passes, the Boot ROM runs the bootloader.
3. The bootloader checks the options passed to it by the Boot ROM, and selects the appropriate boot mode. The usual boot modes which exist on almost every device are the normal Android boot, Recovery and Fastboot/Download.

*If the bootloader is locked* it verifies if the next part of CoT to run is intact, and if it is, the bootloader runs it. If it is not, it can shut down, reboot, or get stuck in a special bootloader mode depending on the device model.

*If the bootloader is unlocked* it does not verify the next part of CoT but directly loads it.

4. The next part is called the *boot partition*. It handles the way to boot the system itself. In Android versions on/newer than 6.0.0 (Lollipop), it also verifies if the system is intact, and if it is modified, it shuts down.

As mentioned first, these root apps exploit the vulnerabilities to modify `/system`, which is verified by the boot partition as mentioned in *Stage 4* above. So any modification will cause the device not to boot. This state is commonly referred to as a "soft-brick", which can only be fixed by a re-flash.

So the newer devices require the bootloader to be unlocked if you want to root your device. These devices are rooted by flashing a recovery with more options than the normal recovery (like TWRP, ClockWorkMod), usually referred to as a custom recovery, and using that to modify the boot partition (and disable the system verification). It is also possible to directly modify the boot partition without a custom recovery.

Some manufacturers give a way to unlock the bootloader, and some of them don't. The popular devices with locked bootloades (for an example US carrier locked Samsung S devices) tends to be exploited by the Android modding community.

**My device is still Android 5.1.1 or older! Should I use these to root?**

Most of those older devices are possible to root by the rooting apps. So, you could. Should you? That depends on your preferences. Root access grants the power over everything in the OS, and with root access, it usually doesn't take even a microsecond to make sure that your device won't ever boot again. It is very probable that the rooting apps ever won't do that, but, they could. Also, with root an app could access everything your device does, and everything it holds in its memory including your credit card information, passwords, etc. If that sounds like a serious privacy threat to you, maybe don't use the root apps. If you don't care about that, you can try them.

If you are savvy enough, there are the sources of almost all the exploits those root apps uses. You can try to search them up by CVEID, look for them in Git, compile and run them and try to get a root shell, and you will be able to install the `su` binary and the other dependencies yourself.

Also, KingoRoot has been known for sending highly sensitive data like IMEI and Serial Number to their servers. The chances are they will never use them, but, that's your decision in the end. And KingRoot is known for installing a backdoor in its SDK which allowed some apps to get root access unauthorized by the user.

**Conclusion**

The era of the rooting apps is long gone. The rooting apps doesn't work anymore and if you use them on newer Android versions you risk soft-bricking your device and probably losing all your data. If you use them on supported Android versions they would work most of the time, but there are privacy and security concerns you should consider before going on.

I hope my research would help someone in the future who gets the same problem as me. :)
> 30 votes

---
Tags: rooting, root-access, security, kingo
---


# Question
Title: How do I get return key back instead of emoji (Oreo)
I am trying to use messenger with the default Google keyboard on my stock Pixel1 using messenger. Somehow it got hosed and now instead of enter on the keyboard it shows an Emoji (in blue). If I hold down on the emoji I see the enter button but this isn't what I want. I want the enter button to be the default. I tried switching the keyboard to Dvorak and switching back. I have tried everything I can find.

How do I switch a stock Oreo device from having the emoji button to the enter button?

# Answer
1. Hold down the comma button
2. Select GBoard
3. Select Preferences
4. Make sure Show Emoji Switch Key is on.

Although this solves this issue I am not 100% convinced this was how I got to this problem. Is there a gesture or something that caused this to switch?

source
> 1 votes

# Answer
I have the same problem but until I can solve it, if you press the shift key for a second or so, the return key temporarily replaces the emoji.
> 0 votes

# Answer
you have to go to Settings, disable Dedicated emoji key, then for the button Access of emoji key over Enter key, do never opt to replace the enter key with the emoji key, your aim will invariably get fulfilled
> 0 votes

---
Tags: keyboard, 8.1-oreo
---


# Question
Title: WhatsApp : Stop auto download of voice messages
I need to stop auto downloading of voice messages in WhatsApp since it's wasting a lot of my mobile data.

When I go to `Settings > Chat Settings > Media Auto Download`, it shows a note `Voice messages are always downloaded automatically for the best communication experience.`

Is there any other way to disable this feature?

# Answer
You can restrict background data by going to android settings \> data usage \> wifi \> whatsapp and in the bottom you will see "restric app background data" just activate that and it will stop downloading in the background and it will somewhat solve your problem
> 0 votes

---
Tags: whatsapp-messenger
---


title: What apps are these notifications for?

text:
# Question
Title: What apps are these notifications for?
Does anyone know what apps the notifications at the top left of the screen are for? I was sent a screenshot and I'm curious.

# Answer
In newer Android versions you can **long-tap notifications** to reveal the app the notification came from.
> 0 votes

---
Tags: notification-bar, notification-icons
---


title: Gapps has stopped. How to fix?

text:
# Question
Title: Gapps has stopped. How to fix?
Good Morning. Yesterday I was excited to flash CyanogenMod 12.1 in my other Android device. The process was the same and I did everything correctly. Unfortunately, after flashing Google Apps, the system wouldn't stop showing pop-ups like "google app has stopped", "google services has stopped". Nothing about Gapps works, even the keyboard. I have tried to wipe data/factory reset, using CWM and reflashing CM12.1 ONLY, but it didn't work. The pop-ups are still there. Maybe there's some Gapps fragments in the system... Please, I would appreciate any possible help. Thanks

# Answer
> 0 votes
It is recommended to wipe dalvik/cache, factory reset before and after flashing anything in recovery.

So here are the steps to solve the problem

1. Enter CWM recovery mode
2. Wipe data/factory reset
3. Wipe Cache partition
4. Advanced \> Wipe Dalvik Cache
5. Flash Gapps for CM12.1
6. Wipe data/factory reset, Cache partition
7. Wipe Dalvik Cache
8. Reboot

# Answer
> 0 votes
A factory reset will not help,

You need to do a system wipe, then reflash CM 12.1 only and then flash gapps.

* Wipe old system
* Install new system from zip
* Install gapps package
* Wipe Dalvik & Cache
* Reboot

---
Tags: cyanogenmod, rom-flashing, popup
---


# Question
Title: How to hide bottom navigation bar in Youtube app?
I want to hide *bottom navigation bar* (not system wide navigation bar) or at least make it act like Chrome toolbar which shows/hides itself on scroll. I am blank on this as I couldn't find anything on hiding Bottom Navigation bar, except through programmatically.

This is what I'm talking about.

I'm using a rooted OnePlus 6 with stock Android 8.1 and Xposed Framework.

As for reason for wanting this: I'd prefer to have real screen estate show something dynamic from Youtube, as part of scrolling content. That bar is in my way of using view to its maximum size.

# Answer
The Xposed module L Tweaks supports the feature of removing the bottom navigation bar of Youtube and several other apps.

1. Install L Tweaks. After installing the module, open it, then click Google.
2. Google apps are listed with features that L Tweaks can enable/disable. Go to the bottom to find Youtube. Enable `Remove bottom bar`
3. Before opening Youtube, force stop it. Open Youtube, the bottom navigation bar will no longer be shown.
4. To access `Home`, `Trending`, and other options, swipe from the left as you do for Google .Play

The module is also available in Google Play Store and has other features.

**Note:** The device must be rooted, and have Xposed framework installed to use the module correctly.

**Disclaimer:** I am not related to the app's developer; I am just a user.
> 2 votes

# Answer
**Not possible.** There isn't yet any applications or xposed modules that can do that. I also researched regarding this.
> -1 votes

---
Tags: youtube, customization
---


# Question
Title: How to configure DNS properly while two LANs are running?
The device can't ping www.google.com but ping 8.8.8.8 is okay. My OS is Android 6.0.1, the kernel is 4.1.15

I've tried the resolv.conf and /etc/hosts. But these methods seem can not work on Android.

And I couldn't figure out what the exact problem is.

```
eth0      Link encap:Ethernet  HWaddr EE:DE:17:79:BB:42
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ecde:17ff:fe79:bb42/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:600 TX bytes:1166

eth1      Link encap:Ethernet  HWaddr 00:0E:C6:81:79:01
          inet addr:192.168.120.57  Bcast:192.168.121.255  Mask:255.255.254.0
          inet6 addr: fe80::20e:c6ff:fe81:7901/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41709 errors:0 dropped:0 overruns:0 frame:0
          TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2738793 TX bytes:8354

```

I closed the netd service so that it is able to configure eth0 and eth1 respectively.

Here is my IP rule

```
0:      from all lookup local
9998:   from all to 192.168.120.0/23 lookup 4
9999:   from all to 192.168.1.0/24 lookup 3
10000:  from all fwmark 0xc0000/0xd0000 lookup legacy_system
13000:  from all fwmark 0x10063/0x1ffff lookup local_network
15000:  from all fwmark 0x0/0x10000 lookup legacy_system
16000:  from all fwmark 0x0/0x10000 lookup legacy_network
17000:  from all fwmark 0x0/0x10000 lookup local_network
23000:  from all fwmark 0x0/0xffff uidrange 0-0 lookup main
32000:  from all unreachable

```

Here is a result of ping IP, you can see the response is fine.

```
root# ping 192.168.120.1
PING 192.168.120.1 (192.168.120.1) 56(84) bytes of data.
64 bytes from 192.168.120.1: icmp_seq=1 ttl=64 time=1.08 ms
64 bytes from 192.168.120.1: icmp_seq=2 ttl=64 time=0.986 ms
64 bytes from 192.168.120.1: icmp_seq=3 ttl=64 time=1.00 ms

root# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.718 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=0.420 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.403 ms

```

But ping google always returns unknown.

```
ping: unknown host www.google.com

```

I expect I could ping IP and URL in my case.

BTW, the DNS from eth0 192.168.1.245 and the DNS from eth1 is 8.8.8.8

# Answer
> 5 votes
I'll try to explain my understanding of DNS on Android. It will help you troubleshoot related problems and serve me as future notes.

# DNS

Domain Name Resolver has traditionally been a part of OS's C library (commonly called libc). `GNU libc` (which is most common on Linux distros) implements a complicated name resolution mechanism named NSS which can prioritize in what order database services like LDAP / NIS, local `files` (`/etc/hosts`) and `DNS` have to be used in order to resolve host / domain names. DNS resolver then reads `/etc/resolv.conf` to get the name server address which is to be queried.

Unlike `GNU libc`, Android's `Bionic libc` (which depends on `netd` for DNS) doesn't regard `/etc/resolv.conf` unless ANDROID\_CHANGES build variable is defined (only when libc++ is built as static library?). However /etc/hosts entries are valued by Android's resolver when resolving names.
But if you are using a statically compiled / linked binary with some other - such as `musl` or `uC` or `diet` \- libc, that must be reading `/etc/resolv.conf` to get Domain Name Server's IP address. Busybox ping is a common example.

# Android's DNS

Within Android's Java runtime environment, either a DHCP provided or manually set or hard coded DNS server is used. Properties `net.dns1` and `net.dns2` are set with values of DNS servers received from DHCP server (on Wi-Fi or Mobile Data) by `ConnectivityService` and then forwarded to `netd`. Starting with Android Oreo, these properties are no longer available through Android APIs, but only readable as `root` or `shell` \- once removed then re-added. So changing properties `net.dns*` using `setprop` only affects the programs (running with UID `0` or `2000`) that explicitly read these properties. One such example is meefik's busybox. Also there were some other DNS related properties set in good old days of `dhcpcd` which was the DHCP client up to Lollipop.

See some more details in How does Android OS do DNS name resolution?.

### Caching

DNS queries are cached on Android by `netd` as `NSCD` does on Linux distros to speed up name resolution. Android has a commandline tool `ndc` that could clear DNS cache but the command was removed in Android 7. Now it's possible to bypass caching by setting environment variable `ANDROID_DNS_MODE` which prevents Bionic libc from proxying back to `netd` service for cache lookup. See How to modify environment variables like PATH at startup? to set the variable globally.

### How to set DNS

As mentioned earlier, previously different methods used to change default Domain Name Servers on Android don't seem to work now. Setting name servers and/or search domain name through commandline:

```
~$ ndc resolver setnetdns <network_id> <domain> <DNS>

```

<sup>* Commands syntax is a bit different on older versions</sup>

Similarly `ndc tether dns set` works for `dnsmasq`. To get current network ID:

```
~$ dumpsys netd | grep 'Default network'

```

Clear set DNS servers:

```
~# ndc resolver clearnetdns <network_id>

```

However some apps may sometimes bypass Android's name resolution mechanism trying directly reach out to some nameserver, I have observed WhatsApp. Or the hard-coded value is used (may be when router is advertising the IPv6 DNS server). The only certain working option is `iptables DNAT`:

```
~# iptables -t nat -I OUTPUT -p udp --dport 53 -j DNAT --to 1.1.1.1:53

```

DNS servers can also be configured in Settings for Wi-Fi network. Android 9+ supports Private DNS / DNS over TLS (DoT) which sends encrypted DNS queries on port 853 as standardized in RFC7858.

Non-root solution which works for both Wi-Fi and Mobile data is to use VPN apps like Virtual Hosts or Personal DNS Filter which intercept DNS traffic and makes queries to configured upstream DNS server.

### Testing

To test what name server is being used by `connectivity` and `netd` services in Java runtime:

```
~# dumpsys connectivity | grep CONNECTED | grep -o 'DnsAddresses: \[[^ ]*'
~# dumpsys netd | grep -A2 'DNS servers:'

```

And those used by tethering forwarding DNS server:

```
~# ndc tether dns list
~# logcat -d -s TetherController,dnsmasq | grep -E 'update_dns|nameserver'

```

To see where the DNS queries are going, you may capture traffic destined for port 53:

```
~# iptables -I OUTPUT -m udp -p udp --dport 53 -j LOG --log-prefix 'DNS_QUERIES '
~# iptables -I OUTPUT -m tcp -p tcp --dport 53 -j LOG --log-prefix 'DNS_QUERIES '
~# dmesg -w | grep 'DNS_QUERIES'

```

Or

```
~# tcpdump -n -i any port 53

```

If the queries are not going to desired destination, there is some trouble with your DNS configuration, particularly if you use VPN. Please note that `iptables` and `tcpdump` (capturing on port `53`) won't work with Private DNS (port `853`). Dynamic nature of RPDB and routing tables (rt\_tables keeps on changing, main table is not used) accompanied by fwmark (SO\_MARK) make things complicated for manual control.

So if above mentioned steps don't work, there's nothing much you can do to fix DNS issues on Android devices. A Factory Reset or re-flashing of ROM may resolve the problem.

Additionally, if a local DNS server is provided by DHCP (server on Wi-Fi router), you may check if that's really listening on port 53:

```
~# nmap -e eth0 -sUT -p53 --script=dns-recursion 192.168.1.245

```

---
Tags: dns
---


# Question
Title: How to uninstall Google/Samsung apps properly?
I have a Galaxy A5 2016 and I would like to remove all Google apps for the sake of privacy. I have a rooted phone and it's running Samsung firmware.

I've tried simply uninstalling the apps with an uninstaller app, but when I had removed Google Play Store and Google Play Services some features such as WiFi and 4G stopped working. I know I can disable the apps in settings, but that doesn't achieve the goal of privacy that I have in mind, as the apps still continue to run in the background.

Is there a way to remove these Google apps and keep the phone in working condition?

# Answer
> 0 votes
Install a custom ROM from the relevant XDA forum https://forum.xda-developers.com/samsung-a-series. Make sure you choose one that doesn't have GApps installed by default e.g. lite edition of this one. Then you can install microG (open source reimplementation) selectively as you require for apps that do need Play Services.

I'm sure you could wrestle around with adb etc to get it working with your current setup but probably easier to start with a clean slate and make sure nothing is left behind if you are concerned about privacy.

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


# Question
Title: Cannot install any APK file due to "Out of Space" misleading error (plenty of space)
I know there are tons of questions about this, but I have tried many possible solutions to no avail. I believe the "Out of space" error is misleading...

I have a problem: **I cannot install any .apk file** no matter what I try... I can install apps using **Play Store** though. When I tap on an APK file in any file explorer, Android Package Installer launches. I tap the INSTALL button but I always got the following error:

> Out of space {AnyAPKApp} couldn't be installed. Free up some space and try again.

I have *plenty* of space, but even a tiny 248 KB APK won't install with the same argument...

This is the only problem I have with the ROM and it is very frustrating... First, the details of my case:

* *Device:* Samsung Galaxy Grand Prime+ SM-G532M, alias Galaxy J2 Prime (Xtreme detects my device as *Model Number:* SM-G950F)
* *Android:* 6.0.1
* *ROM:* Xtreme Ultimate V6.0 (15.07.2018)
* *TWRP:* 3.0.2-0
* *Magisk:* v17.1
* *Magisk Manager:* 6.0.1 (151)
* *Storage:* Adoptable
* *Internal storage:* 7.02 GB used of 8.00 GB
* *SD card:* 9.09 GB used of 14.70 GB
* *Root Essentials "View storage used":* 9759/15787 MB (62%)
* *DiskUsage analysis:* /system = 2.94 GiB; Free space 1.61 GiB

I've already done my homework and tried all of the following to no avail:

1. Move all movable apps to SD
2. Enable Adoptable storage
3. Wipe *Dalvik / ART Cache* and *Cache* partitions with TWRP
4. Full clean with *SD Maid PRO*
5. Force move apps to SD using *SD Maid PRO*
6. Uninstall *Google Play Services* and *Google Play Store* updates
7. Overcome *unauthorized device* issue while using ADB
8. Trying to install APK using ADB (e.g. adb install someApp.apk). I got: `Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]`
9. Delete `/data/log` contents as suggested here
10. Attempt to install in `Safe Mode`
11. Using Termux and the `df` command, I got the following output and there is free space in each partition:
12. Using `pm install test.apk` in a terminal emulator (*Termux*) I got `[INSTALL_FAILED_INVALID_URI]`. Using full path `pm install /storage/emulated/0/Download/test.apk` I got the same error: `Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]`

The problem still remains. I think this is not really related to the full storage device error, I have plenty and the error seems misleading. It has to be something else... I gave as much info as I thought it was useful. If more is needed, just tell me to share it.

I hope you can give me some advice to try to overcome this annoying issue.

*P.S. I'll add more attempts to my list as I try them.*

# Answer
> 0 votes
What are the permissions on the directories where the software will be installed (and the directories leading up to the installation directory)?

Do the application(s) you are using to install the APK's have the install software right denied? With LineageOS, this is handled by Privacy Guard. I use X-plore: try installing it (from Play Store) and see if you can install with it. With LineageOS, you would be prompted to allow X-plore to install software. (It may request root privilege too.) Perhaps you inadvertently denied the privilege earlier to your other programs (though you mention trying with adb)?

My suggestion is to backup and try reformatting the sdcard (or better yet use a new one) with the default filesystem using the built-in system utility. On my phone, this is handled by System Preferences -\> Storage (I believe). Don't make any further changes, and try to install the APK's.

---
Tags: internal-storage, custom-roms, installation, insufficient-memory, apk
---


# Question
Title: Transferring files applications via USB on Mac
I have Nexus 5 and I'm using the Android File Transfer as explained on Google's official support: Transfer files between your computer and Android device.

However, after either copying zip archives or creating new folders in the file transfer window with my Nexus 5 connected via USB, I do not see the changes reflected on the device.

What am I missing?

# Answer
> 0 votes
Assume you are using the android File transfer program from http://www.android.com/filetransfer as that is the best way to transfer files on OSX.

If you just drag files into that directory it opens by default, the files might not show. On the "Android File Transfer" App choose the "Download" directory which is the best place to store a file, then drag files into that directory. This directory is accessible by all programs that have access to the internal storage.

# Answer
> 0 votes
Better solution is Handshake

can use both WIFI or USB.

---
Tags: nexus-5, file-transfer, macos
---


# Question
Title: Can the Play Store (in /system/priv-app/) be reinstalled with a newer version?
Tapping on the build number in the Play Store doesn't really update it anymore on my device; I have no idea why. I've been trying to sideload the apk which just installs the newer version into /data/app/ but after several reboots i still don't see the newer version.

So yes, is it possible that I just delete the one from the /system/priv-app/ and push the newer version in it?

Strangely, other Google apps that didn't come preinstalled just fails to install through the rom's old Play Store (version 5.5.12)and just comes up with a "-504" error. The same happens when trying to update preinstalled ones.

My phone is on stock Android 5.0 from the manufacturer rooted with SuperSU 2.82.

# Answer
> 0 votes
Yes and No, it depends on the version of thd play store and the Google play services, both usually work together and can not work with the wrong version, so try to replace both apps...

You should use OGapps ( Open Google Apps ) , it's designed for custom ROMs.

You might have problems with the version designed only for DATA installations, and may need an alternative app from another custom ROM that is the same version.

# Answer
> 0 votes
Okay so, apparently Google has been blocking "uncertified" devices from installing and updating Google Apps, but they provided a way to somehow "whitelist" devices running custom roms and modified stock roms.

This enables the aforementioned devices to still install and update GApps, but in the Play Store they still appear uncertified.

My Lenovo A7000 Plus unfortunately got caught in this particularly new Google scheme because I've recently flashed a more recent pre-rooted stock rom for my Lenovo device and added it to Google's whitelist. Now I can install and update my Google apps, but Play Store stayed outdated.

Even though my Google Play Services *has* updated in the background itself, Play Store remained untouched. Somehow the only problem here is that I wasn't aware of this beforehand.

Also, here are some things I was speculating about:

* some users have reported being uncertified even when running stock roms with unlocked bootloaders.
* the GSF (Google Services Framework) ID used in whitelisting the device changes every factory reset/wipe and thus at every reset the whitelist process must be done again
* This new policy seems like one of the stepping stones to Google adapting Apple's system...

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


title: 4G Connection not working properly

text:
# Question
Title: 4G Connection not working properly
A month or so ago, when I turned Mobile Data on the device did not connect to the Internet. I thought that it is a temporary issue with the carrier but it is still not working.

**Details of the issue:**

1. It doesn't display anything on the bar icon (on status bar) which shows the network connectivity.
2. I could connect to 4G using a workaround. When I disable 4G in connection settings, it successfully connects to 3G. (and shows H+ in the bar icon) When I turn on 4G again it successfully connects to 4G and shows 4G in the bar icon.
3. In `System --> About Phone --> Status --> Network` it shows `Mobile Network: Disconnected` even though Mobile Data is on.

I tried pulling out and putting in the SIM card, switching SIM slots. I can't try the SIM card with an another phone, or an another SIM card with my phone as I don't have access for either for the time being.

Why is this happening? Is this an issue on carrier end or my phone? (it is still on warranty)

My device is Huawei P Smart+ running Android 8.1 (EMUI 8.2). Thank you!

# Answer
I took the SIM card to a carrier outlet, and they said that it is a damaged SIM card and replaced it. Thanks @Izzy for the helpful comment! :)
> 1 votes

---
Tags: mobile-data, carriers
---


# Question
Title: "No calendars have been synchronized with this device."
I'm running Android 9 and I'm trying to add an event in Calendar. Upon clicking the circular button with a plus sign, a message saying `No calendars have been synchronized with this device.`. I don't want to synchronize the calendar on my phone with anything, be it a Google account, my carrier, or anyone. Is there anyway around this? I never had this problem on my previous Android phone or on my Android tablet.

# Answer
@maleb so I have the same issue but I guess the work around is in the app setting or widget hold down the calendar icon and two options appear rather; than new event (give synch loop feedback) click new reminder and you should be able to add your event.
> 2 votes

---
Tags: calendar, google-pixel, 9.0-pie
---


# Question
Title: What values to set in Static IP Settings of Wi-Fi when changing DNS?
I have nearly the same problem as Set Open DNS in Android 5.0.1 and the answer helped me.

Although I just want to change the DNS for blocking porn, what values for the following fields should I enter?

* IP Address
* Gateway
* Network Prefix Length

I have HTC mobile with 5.1 Android version.

# Answer
You should use OpenDNS Family shield which blocks porn and malicious websites.

```
Dns1: 208.67.222.123
Dns2: 208.67.220.123

```

If your ISP blocks other DNS's, try a secure connection (use Port 443):

```
Dns1: 208.67.222.123:443
Dns2: 208.67.220.123:443

```

If you're phone has root access I recommend using a paid app called OverrideDNS which encrypts your DNS queries like DNSCrypt and makes you forget about all DNS issues that you might have, it also works on cellular data.
> 3 votes

# Answer
To answer this, we need to understand some basics of networking and particularly how Internet Protocol works. This is a brief description of each field:

## IP Address:

This is the base of modern day networking. Every device recognizes other device (on same network or on other network) by its address, called IP Address. Usually IP addresses are assigned by DHCP server running on a network e.g. the one that runs on a Wi-Fi router. DHCP server assigns a unique IP from the available pool to each device that connects.
So you need to get this value from your router. When configuring IP statically, you may use the same IP that was already assigned to your device when connected as DHCP client. However you should also configure router to assign that specific IP only to your device again when the lease is expired.

## Gateway:

Gateways are special IP addresses that serve as the entry and exit points when the router directs traffic from one network to the other. On one side of Wi-Fi router is the local/private network to which all of your mobile phones and PC's are connected. While on the other side there is internet; the public network. So your router has two gateways; the public IP assigned to your router by ISP and the second one is usually the first IP of private network. So if 192.168.1.0 is the network address of you local network and - say - 192.168.1.15 is the IP address assigned to your phone, 192.168.1.1 should be the gateway.

## Network Prefix Length:

This basically defines the maximum number of IP addresses (hosts) a network can have. A 24-bit netmask (255.255.255.0) length means the network can have maximum 254 hosts (232 - 24 \- 2). First (192.168.1.0) is the network address and last (192.168.1.255) is the broadcast address. Remaining (192.168.1.1 to 192.168.1.254) can be assigned to hosts, including gateway.

Following is the DHCP settings of the Wi-Fi router my phone is connected to.

---

**Further Reading:**
> 0 votes

---
Tags: wi-fi, networking, dns, ip-address, gateway
---


# Question
Title: How to store system app's settings on /system partition?
I have a system app, and I need that both the application itself and its settings shall be in `/system` partition.

I can change the application to be in system by moving from `/data/app` to `/system/app`.

Yet, I see that the configuration/settings are still saved somewhere in `/data` (not sure where).

Is it possible to change it to be in `/system`? If yes, how?

Thanks.

# Answer
> 0 votes
You can't. Configurations / settings / cache / databases of every app (system or user) are stored on `/data` or in `/sdcard/Android/` for some apps. That's why `/system` partition is of limited size as compared to `/data`. Android works that way. Apps aren't built to read and write settings to `/system` partition as it holds a read-only filesystem, only changed during OTA updates. A read-write `/system` partition won't fit into Verified Boot mechanism implemented by Android for security and to prevent malware attacks.

**Further reading:** Android Partitions and Filesystems

---
Tags: rooting, root-access, system
---


# Question
Title: Why chmod gives "Operation not permitted" error?
I try to execute `chmod` on a file with Termux, but it sends back an error which I'm unable to solve.
My phone is not rooted. If you can help me I would be most grateful to you for this! Here is the command and the error:

```
$ chmod +x /sdcard/meta-install.sh
chmod: changing permissions of 'meta-install.sh': Operation not permitted

```

Thanks!

# Answer
Android does not allow you to create executable files within the `sdcard` (internal storage, mounted in userspace) partition without root.

A workaround would be to execute the file as `bash meta-install.sh`, assuming it is a bash file. (Alternatively `sh meta-install.sh` to run it using `sh` as the shell).
> 3 votes

# Answer
Filesystem on Android's internal memory (called External Storage) is `SDCardFS` (successor of FUSE) which imposes a mask mode (fix permissions) on all files and directories. It's an emulated/virtual filesystem, not the real one. You can only change permissions with `chmod` from `/data/media/` which is the real filesystem (ext4 or f2fs). But `/data/media/` is only accessible to root user.

**Further Reading:**

**Related:**
> 1 votes

---
Tags: linux, permissions, shell
---


title: Sound volume randomly changes

text:
# Question
Title: Sound volume randomly changes
I'll be listening to music or a podcast, when for no reason that I can tell, the sound will sometimes change. Fortunately, it seems to always go down, not get super loud and blow out my ears.

This happens in any and every audio program, so I don't think it's app specific.

I'm using Android 4.0.4 on a Samsung Galaxy S2. The phone is rooted.

How do I prevent the sound from making random adjustments?

# Answer
> 0 votes
This problem went away after I installed a kernel and ROM that was developed more specifically for my particular phone, the SC-02C.

The lesson learned was to be really sure before rooting or upgrading that one is working with the exact right ROM and kernel.

# Answer
> 1 votes
Many others have had this problem and have overcome it by loading the Persist app from Google Play:

> Audio management made easy - Persist puts you in complete control of your audio with a variety of volume controls and settings.
>
> * Presets
> * **Volume Locker - Prevent volume changes**
> * Silent and vibrate modes
>
> ...

# Answer
> 0 votes
I have a Samsung 42" volume uncontrollable and the red power light flickers. This might not be for everyone, before replacing it with a new one I sprayed the on-off switch for a few days. Each day it improved now I have no problem. Sonny

# Answer
> 0 votes
Had problem with volume changing sporadically and interrupted by Google doing voice search.

After trying to shut down Google searches, etc., And failing, ended up switching earbuds to newer pair. That seemed to work.

Still would like option to shut off Google, maybe in another release of android. None of the soluions offered worked with my phone and android 7.

---
Tags: audio
---


title: Move apps manually to system

text:
# Question
Title: Move apps manually to system
Hi just wanna ask if there's a way to properly install or move apps to /system manually in which the app that being said installed will be considered as system app? It seems that my phone is denying my request to install or move app from internal storage to system. I'm using a archos 55 diamond selfie. I've tried to move a certain app installer to /system/app but it doesn't solve the problem. Thanks allot.

# Answer
Installing apps on the system partition is not possible without root. Rooting can also not be enough if you are running a device that has a newer android version, where selinux is enabled and enforcing.

You need to make sure you do the following before being able to install apps to system:

1. Bootloader unlock (if needed)
2. Root
3. Mount /system as RW
4. Copy apk file to /system/app (or priv-app) (depending on the OS version)
5. Remount /system as RO or reboot

You might also be able to do it through recovery, but at that point you need to run a custom one, as TWRP, the only difference being that you don't need root at this point.
> 0 votes

---
Tags: system-apps
---


title: How to root android one without pc?

text:
# Question
Title: How to root android one without pc?
When i try to root my spice dream uno mi 498 without pc with kingroot it give me the error aboveplease prefer another app or give the solution I am begging please!

Device: spice dream uno (android one) App: king root.apk Problem: not rooting Problem description: failed to root

# Answer
You will need to use a PC Please have a look at this question recently asked, it brings clarity to the causes of a failure.
Why don't root apps work anymore ?

So after you understand that, you can unlock your bootloader and install a custom recovery, then flash a Systemless root like SuperSU or Magisk

Please follow the complete guide for your device .. Unlock Bootloader - Install CWM - Root with SuperSU guides
> 1 votes

# Answer
OK, I've looked high and low, and this is all I could find...

WORST METHOD Try using KingRoot v7.3 or above ...

BEST METHOD From mobilespecs.net/

**What are the dangers of getting root access?**

1. canceled the warranty
2. you will not receive updates over Wi-Fi
3. in some cases, the procedure for obtaining root access threatens the failure of your device (but most of the gadget can be revived).

**To gain root via "Framaroot"**

1. Download the latest version from the page "Framaroot".
2. Install the program from the downloaded apk-file to your device.
3. Run the utility. In that case, if the device is supported by the program, on the main screen you will see a drop-down list of possible actions, which include options for the removal and root. In addition, below there is one or more exploits titles that are available for use.
4. Tapnite one of the available exploits and tooltip will appear after a few seconds, describing the results of his work. If one method does not work, try another. Sometimes it happens that in the preparation of the superuser "Framaroot" crash randomly. In this case, simply restart the program and try again.
5. Once you get a hint that the device successfully root, you must restart the device.

I'm not sure if that is device specific however..

Other's say try Towelroot, KingoRoot etc..

You could try to use some sort of Universal Signature to sign an update package and the apply the update using the default OTA firmware via SD Card Update, but I'm sure that the universal signature vulnerability or whatever they called it, has been patched now.
> 0 votes

---
Tags: root-access, stock-android
---


# Question
Title: SystemUI.apk and framework-res.apk causes bootloop after being modified
Hi I'm using a stock LineageOS rom specifically android Pie (LineageOS 16) and I've been modifying system applications, such as SystemUI, framework, gallery, sms etc. before (on samsung ROMS) and so far I haven't got any problem aside from forgetting to set the correct permissions on each apk.

Though when I switched to LineageOS, it seems that I can't simply modify the framework and systemui. I tried the usual way of decompiling and compiling an apk using apktool, then, to sign the apk with its previous/original key, I use the files from the "original" folder in the decompiled apk then build the apk again. Somehow, when I try to replace the apk in my phone, set the correct permissions, and reboot, it will result to bootloop.

Did I miss anything? Do i need to sign it with another key? Do I need to disable signature-check on my Android?

# Answer
> 0 votes
Signing won't work by just copying the files from the original folder. You could try building the ROM yourself then you'd have the signatures, but I believe there's a much better solution that I've described below.

If you're modifying things that are in `res/` and `assets/` overlays are most definitely the way to go. They don't require any signature tricks and they can be easily added/removed without you having to even touch the SystemUI or framework. You can use `cmd overlay` to `enable` and `disable` them easily. Building the overlays isn't really easy, so you'd have to get some knowledge related to `aapt` in order to understand how to build them, or you could use a theme engine like Substratum. There's a template that you can modify and you can manage the overlays within the app.

# Answer
> 0 votes
**If you're EXTREMELY SURE you know what you're doing, and you are an experienced APK Modder.**

Try using the Application LuckyPatcher

I'm sure you'll find it if you look around in your own time.

This software can disable package signature verification and patch your entire system to allow such things as downgrading software by disabling the version check etc... This software is designed by hacker's as far as I know, so please do not blame me for any problems.

This information is provided as-is without any guarantees, by using this information you agree to take full responsibility and/or liability for any damages, injury or any other consequences that may result from using this information.

You can try not signing the apk at all, this has worked many times for many people. You need to remove all signature parts in the APK.

---
Tags: boot-loop, apk, system-apps, 9.0-pie
---


# Question
Title: How to fix a phone stuck at firmware update screen?
My phone was dead so I plugged it in to charge. I attempted to turn it on and saw:

> Firmware Update
>
> Do not unplug the USB connection until the process is complete.

This was all it showed and now it's frozen. It does not power on or off. It's been stuck at 6% for 8 hrs now. I have no battery to take out.

What can I do?

# Answer
It may be an update to your device, but it sounds unusual because no device is allowed to update its firmware when the device battery is running below 30% anyhow, unless you clicked on `Update Now` button that time, and plugged it into charging.

1. If it's an update, wait some time as you told your device is dead that means system has downloaded that file before turned off. So it will automatically install its firmware.
2. In the worst case, you may need to install a very new firmware manually but before continue to install new firmware try this:

• Press `Power` \+ `Volume up` \+ `Home` simultaneously until Samsung logo appears.

• It may take time to show up recovery menu. In recovery menu you will see option as `Reboot`.

• Press `Home` button by going to reboot option through `Volume up` button.

If this was a temporary problem, you could use your device now.

***Or***

If the screen is still stuck to showing `Firmware Update`, the solution could be to update it by yourself. To update go through this article: How to update the firmware on any Samsung phone? by xda-developers.

**Please keep in mind, manually updating Firmware may erase your whole data.**
> 5 votes

---
Tags: samsung, boot
---


# Question
Title: change notification sound for Google Keep
Is there a way/user settings which allows assigning a specific RING/Notification sound for Reminders in Google Keep application?

It seems like there is no Settings for this feature provided in the app itself.

My requirement is to have common ring tone for all reminders in Google Keep...No need for separate ring tone for each reminder.

Is this possible?

# Answer
The UI is not clear in this case, but you can actually change this in the Android Application Notification settings for the Keep app.

**(On Android 9):** Go to Settings \> Apps and Notifications \> Keep notes \> Notifications. Then you have to tap on each of the Notification Categories individually (e.g. Others, Reminders, Shared notes). As mentioned, from the UI it does not appear these Notification Categories are tappable but they are. You can then set various parameters for that Notification Category such as sound, notification dot, display behavior, ...

**More info:** How to use notification channels on Android Oreo
> 1 votes

---
Tags: notifications, audio, google-keep
---


# Question
Title: How to add app shortcuts to home screen on the Note 9
Whenever I go to my app drawer I tap "add to home screen" to a specific app.

Instead of adding to my home screen it creates a new page. Now I have a home screen and an extra page with only one app and lots of space.

How can I go to my app drawer, add an app to my home screen and avoid this problem? Below is my home screen before adding a new shortcut. It should normally add on top of these apps but instead it just creates a page to the right with the app by itself.

# Answer
First, check if your time and weather widget are taking too much space.

To check: long press on that particular widget and you will see how much of space it is taking.

If you are using two different widgets for time and weather, it's recommended to use one by choosing it from:

* Tap *Widgets* from lower settings appearing on your screen,
* Right swipe widgets to see more,
* Choose *Weather* from widgets and choose widget as I am using in above pic, and it uses less space.

You can also change your *App screen grid* by going to *Home Screen Settings* on the lower right of the screen (as appears in your uploaded picture).

Now, choose from menu.

To add new shortcuts it is very useful that you do it by long pressing on any app from App drawer, dragging it and releasing it whereever you want to place that app.

Note: you can only put apps on the blank space of your Home Screen. To check space you have to long press widgets (that are on your home screen, such as Clock, Weather widget, Google Search, etc.)
> 6 votes

# Answer
Instead of choosing "Add to Home Screen" simply keep holding the app you wish to create a shortcut for and it will not make a new screen.
> 2 votes

# Answer
Check the settings, it might throw it onto a new page by default. Or you could circumvent it by putting them all onto one page and deleting the extra page that it creates.
> 0 votes

# Answer
I had that too. Problem is that the little weather report on top right of your screen is actually taking up the whole space. There is no more room for icons. Double tap or long press - I forget, the weather section and you'll see that you can crop it smaller. Another row or two of icons will then fit on your hone screen. Good luck to all.
> 0 votes

---
Tags: home-screen-shortcuts
---


# Question
Title: How to bypass the Goggle account password request on a Z353VL ZtE flip phone both touch screen and hard keys
So I have this old ZTE and I can't find a way to bypass the frp I looked all over online and nothing for the touchscreen hard button model like this I just bypassed a galaxy s7 running oreo for a friend so I thought for sure this phone would have a bypass that you can do using the phone itself

# Answer
> 0 votes
I used this method on a old vodafone device i had a long time ago, almost certain its was a Zte. Ok when promted to connect with wi fi, you first connect to your network, then type any name in ad alternative network connection, tap and hold the name u just typed. You wil get a option to share, on the share screen tap and hold gmail, the "app info" screen will pop up, here you select notifications, go to the last option witch is "more settings", on that screen select the sub menu and go to "manage accounts"

Ok now you should be in your normal settings menu, here you need to open chrome to download files to help you finnish the process, depending the version of Android you have, there are various ways to do this, Mine was a kitkat simply go to applications and launch chrome. There is a way with the google app to launch chrome too, tap and hold the google app in the device manager the "app info" screen will appear again go to "notifications" and select "more settings" open the "manage card history" and select chrome. There are many sites and apps with will assist you from here,

---
Tags: stock-android
---


# Question
Title: Should a certificate be installed when a browser offers to install it?
I was accessing my internet banking site, and I found my browser asking to install some certificates noted some extensions of certificate.

Do I need to install certificate to access the site safely or can I access it ignoring the suggestion of installing certificate?

Do certificates help more in secure browsing?

# Answer
Yes, your bank wants to establish a secure connection to you. To make sure that the connection is secure, a set of certificates must be installed on both your client and the bank's servers. If the website that you blurred out is correct, then installing the certificates is perfectly safe.

TL;DR: **press Install to access your bank securely.**
> 5 votes

---
Tags: security, chrome-for-android, internet
---


# Question
Title: How to connect to Android through SSH over 3G/4G public IP?
I am having an Android device and I want to connect in via 3G/4G and I am getting connection refused.

Any ideas how to do that?

# Answer
> 19 votes
If you have a working SSH server running on Android device, you can connect to it on local/private network without any issues (after proper authentication setup obviously). Same may hold true for public network (internet) if your phone has a true public IP address (I don't think that happens on earth). However, when you need to cross networks i.e. traversing gateways and routers, there is Network Address Translation involved. You won't be able to access your device from internet if your SSH server can't be exposed to a public IP address.

---

**WHAT IS NAT AND PAT?**
In simple words, NAT is the translation of source IP from private address to public - routable; what they call it - address when an IP packet is leaving the router, so that packet could be sent back with identifiable IP address. Inverse happens when response for same packet is received back at router. It would mean mapping private IP of every host (phone, PC etc.) on local network to a unique public IP. But in usual cases, we just have one public IP assigned by ISP. So Port Address Translation comes in action. PAT translates every local IP address to same public IP address but with a unique port.

**WHAT IS CGNAT?**
To address the problem of IP Address Shortage, Internet Service Providers also perform NAT, called Carrier Grade NAT. It means that IP address assigned by ISP to you isn't either a public but private IP address. This is a definite situation with Mobile Data i.e. on 3G/4G but less common with DSL connections.
If the IP assigned to your phone by ISP (you can check by `ip address | grep inet` command) is different from the one shown here, you are behind a CGNAT. Similarly for Wi-Fi router, IP address appearing under PPP Connection Settings should match with the public IP.

**DYNAMIC IP ADDRESS:**
In order to maximum utilize the available pool of IP addresses, ISP's mostly assign dynamic IP address even when there is no CGNAT. So the public IP keeps on changing on daily, weekly, monthly or randomly basis, depending on the ISP's policy.

---

IPv6 is the upcoming protocol which won't need NAT and every network host on earth would be able to have a unique IP address.

---

**SOLUTION:**
Now coming to your question:

* If there is no CGNAT, we can tackle the problem of DSL/3G/4G router's NAT by setting up Port Forwarding. But this option doesn't work if:

+ There is more than one hosts on local network that listen on same port (22 in case of ssh).
    + ISP firewalls don't allow you to receive incoming connections.
    + ISP locks you out of your router's Port Forwarding section or a 3G/4G router doesn't have a Port Forwarding settings at all.
* Problem of Dynamic IP can be worked around by signing up a DDNS service. It assigns you a domain name that always resolves to your current public IP. DynuDNS is a free service that works perfect for me. You will have to install their software on your phone or PC to keep them updated of your public IP.
* As far as CGNAT is concerned:
    + You can opt to buy a static public IP if your ISP provides this service but the price isn't "hearing friendly" in most cases.
    + Sign up for a service that lets you configure Port Forwarding on public VPN. There are free (for one port forwarding) solutions like portmap.io as well if you are not afraid of your traffic being sniffed :) Another specialized solution is ngrok that uses HTTP, TLS and TCP tunnels.
    + Setup a SSH (slower) or VPN (faster) tunnel from your phone to a personal server.
        - For best security and privacy, setup a self-owned server. You may use your broadband connection (if that has a public IP) for this purpose or may ask some friend to offer you this service.
        - Buy some trustworthy cloud VPS solution like AWS to host your personal SSH/VPN server. Setup is a bit technical but guides (, ) are available.

---

If you go with last option (setup a personal SSH or VPN server with public/static/dedicated IP address), follow the steps below to forward a specific port from SSH/VPN server to your phone:

* **SSH:**

With an SSH server setup, you can create `Reverse Port Forwarding` tunnel from your phone. Note that you can't forward remote server's (default SSH) port 22 to your phone's port 22 if you are connecting to the server on same port.

Make sure `GatewayPorts yes` and `AllowTcpForwarding yes` are set in `sshd_config` on server, so that sshd allows port forwarding and accepts connections from public. Now on your phone create a reverse tunnel:

```
~$ ssh -NTR 2222:localhost:22 <server_user>@<server_ip>

```

You can make `ssh` tunnel persistent using autossh or some app like `ConnectBot` if you want.

For further options see this answer.
* **VPN:**

From your phone connect to the VPN server using a VPN app. When on a Virtual Private Network (VPN), both server and phone become part of a local network, so just apply `iptables DNAT` to forward the specific port to your phone's IP:

```
~# iptables -t nat -I PREROUTING -p tcp --dport 2222 -j DNAT --to <phone_ip>:22

```

IP Forwarding is also required on server, which has probably been already set up during VPN server configuration:

```
~# echo 1 >/proc/sys/net/ipv4/ip_forward
~# iptables -I FORWARD -d <phone_ip> -j ACCEPT
~# iptables -I FORWARD -s <phone_ip> -j ACCEPT

```

Now you can `ssh` from any host on internet to your phone:

```
~$ ssh <phone_user>@<server_ip> -p 2222

```

You'll be logged in to your phone after authentication.

---

I explained here the SSH example. In the same way you can run any other server on your phone and forward its port from SSH/VPN server (with public IP) to your phone (with no public IP) so that your server becomes accessible from internet.

---

**RELATED:**

---
Tags: networking, ssh
---


title: Unlock lg ls777

text:
# Question
Title: Unlock lg ls777
I have a boost mobile lg stylo 3 that i want to unlock to use on the T-Mobile network. What are the steps to unlock it from boost to be usable on another network?

# Answer
> 0 votes
It's usually a simple call to your mobile service provider... On Optus it was free, however I'm not sure anymore, many providers ask for a fee to unlock the handset, usually under $100 AUD in Australia, Around $80 in my experience...

1. Ring your provider
2. Request a Service Unlock ( Provider Unlock ) I can't remember the name, just explain that you would like to use another provider's SIM card, they'll know what you mean.
3. They'll ask for you to pay a fee ( if required by the provider )
4. You usually call a specific number, and enter the code they give you ... The method may have changed but your provider will identify the needed steps on your specific device..

Usually the unlock code is unique to the IMEI number of your device, so be prepared and get everything ready... You can grab the IMEI number ( usually the first step ) by calling \*#06#

---
Tags: lg, sim-unlocking, lg-g-stylo
---


title: Huawei File Safe Stuck/not working

text:
# Question
Title: Huawei File Safe Stuck/not working
I have created a safe on the SD using the files app on my Huawei P20 Lite. It worked fine, until I decided to create a second one. Now, it no longer asks for my fingerprint, but for my password. After entering it, it brings me to a safe selection screen. Selecting the one that is in use does nothing. Selecting the other one brings me back to the password entry screen after which the process repeats. I have tried deleting all but one safe from the SD card, and resetting the password. Both methods do nothing. Creating a new safe lets me add files to it until I exit at which point the process repeats.

Q: *How do I enter a safe or reset it entirely so I can create a new one?*

# Answer
> 1 votes
Unless someone figures something else, here are my findings:

* Huawei will let you create multiple safes. However, doing so will cause you to enter an infinite loop of login screens that you cannot "exit" to enter either safe.
* The only way to fix this is to delete the `.File_SafeBox` folder from the root of your SD card.
* All files will be destroyed.

---
Tags: encryption, restore, huawei, files
---


# Question
Title: MP3 Used to play in WhatsApp, now Podcast Addict wants to play it
Because my front mic don't work, I have to create an MP3 from the back mic, and send it in a Whatsapp message. Sometimes I would click it to play it back myself.
It played in Whatsapp just fine. Then I installed Podcast addict and now when I click on the MP3 in Whatsapp, it opens Podcast addict and wants to play there. I could not find where permissions got changed. I want to keep Podcast Addict, but I want an MP3 that is in Whatsapp to play in Whatsapp.

Any ideas would be appreciated. Thanks

# Answer
> 0 votes
Go to the newly installed apps preference in settings, their will be a "set to default" kind of section. Reset this for the new app.

This will reset defaults without removing the app, now you can open mp3 in your preferred application.

---
Tags: whatsapp-messenger, permissions, mp3
---


title: Galaxy J3 Wi-Fi issues (Android 8.0.0)

text:
# Question
Title: Galaxy J3 Wi-Fi issues (Android 8.0.0)
Expected functionality: Wi-Fi works.

Actual functionality: Wi-Fi sometimes connects and works fine. Other times, it will say "Internet connection may not be available." Sometimes it will say "Connected." but then the Internet won't actually work. It's not the signal range because there are 3 or 4 bars. My laptop in the same room connects to the Internet via Wi-Fi correctly.

I have tried: Resetting network settings, Setting static information and not DHCP.

It's a brand new phone.

# Answer
> 0 votes
Most probably this will be because of service providers issue, not from your phone.

I have seen this kind of behaviour mostly from jio network in India. And all other network providers also now a days having this network glitches because of many criteria like tight fights in business, many changes in telecom regulations etc.,

Suggestion that I can give is place your phone in some good position where signal is best. And you can ask your neighbors with same network if they are having internet speed issue.

---
Tags: wi-fi
---


# Question
Title: Android Read recent SMS messages from command line
I have recently broken my Android's screen. (Again)

Its a T-Mobile G2

Trying to keep up with my busy technology related life is hard enough without losing my link with everyone.

I have rooted the phone and have the USB Debugging already turned on.

Does anyone know how I would check my recent SMS Messaged from the adb shell so I can keep up with work while i save up to get a new phone or a replacement screen.

Thanks for anyone that has any information regarding this.

# EDIT

Response to eldarerathis

```
C:\android-sdk\platform-tools>adb shell
$ cd /data/data/com.android.providers.telephony/databases
cd /data/data/com.android.providers.telephony/databases
$ sqlite3 mmssms.db
sqlite3 mmssms.db
sqlite3: permission denied
$

```

cant chmod the file. do you know actually where it is ?

```
$ chmod +x sqlite3
chmod +x sqlite3
Bad mode
$

```

su leaves me with only basic commands

```
$ su
su
# cd /data/data/com.android.providers.telephony/databases
cd /data/data/com.android.providers.telephony/databases
# sqlite3 mmssms.db
sqlite3 mmssms.db
sqlite3: not found
#

```

# Corrected

sqlite was not installed

```
C:\android-sdk\platform-tools>adb shell
$ cd /data/data/com.android.providers.telephony/databases
cd /data/data/com.android.providers.telephony/databases
$ sqlite3 mmssms.db
sqlite3 mmssms.db
SQLite version 3.6.22
Enter ".help" for instructions
sqlite>

```

Also to Access the database I needed to be root.

```
C:\android-sdk\platform-tools>adb shell
$ su
# cd /data/data/com.android.providers.telephony/databases
cd /data/data/com.android.providers.telephony/databases
# sqlite3 mmssms.db
sqlite3 mmssms.db
SQLite version 3.6.22
Enter ".help" for instructions
sqlite>

```

Thanks a lot eldarerathis

This Link Helped

# Answer
> 10 votes
This is really ugly, but you can read them from the command line by using `sqlite3` to view the database entries. You'll probably need to dig up a binary for this unless you have a custom ROM installed. There are some instructions for installing said binary in this Stack Overflow question, and SuperOneClick comes packaged with it (a copy of the binary itself can be found here).

If you do need to install the binary, use `mount` (with no parameters) to determine where your `/system` partition is physically located (mine is `/dev/block/mtdblock3`, for example). Then follow the instructions in the first link above, and start by remounting it in read/write mode with the command:

```
mount -o rw,remount /your/system/partition /system

```

Once you have `sqlite3` you'll want to open an `adb shell`, switch to root with `su`, and then do the following:

```
# cd /data/data
cd /data/data
# cd com.android.providers.telephony/databases ***
cd com.android.providers.telephony/databases
# sqlite3 mmssms.db
sqlite3 mmssms.db
SQLite version 3.7.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> SELECT * FROM sms WHERE read=0;

```

This will pull up all of the rows from the table for all of the unread messages. The columns in the table are defined thusly (so you can trim the `SELECT`):

```
CREATE TABLE sms (_id INTEGER PRIMARY KEY,thread_id INTEGER,address TEXT,
  person INTEGER,date INTEGER,protocol INTEGER,read INTEGER DEFAULT 0,
  status INTEGER DEFAULT -1,type INTEGER,reply_path_present INTEGER,
  subject TEXT,body TEXT,service_center TEXT,locked INTEGER DEFAULT 0,
  error_code INTEGER DEFAULT 0,seen INTEGER DEFAULT 0);

```

\***Note for the marked line: this may be slightly different depending on your device and version of Android which is why I have included this `cd` command separately. I *think* it used to be `com.android.providers/telephony/databases` on older devices but I don't quite remember. Use `ls` to look around for the proper pathing here.

---

Alternatively, you could try copying the .db file onto your SD card (or pulling it with `adb pull`) and then reading it on your computer with sqlite.

# Answer
> 3 votes
Thanks to the beautiful hint above from eldarerathis, I just do

```
DB=/data/data/com.android.providers.telephony/databases/mmssms.db
echo 'select address,body from sms;' | ./sqlite3 -csv $DB

```

to read my SMSes from my root prompt.

Since I didn't have sqlite3, I first had to download it with

```
curl http://dl.dropbox.com/u/16958605/sqlite3
chmod a+x sqlite3

```

Or see SQLite3 installer on Google Play (if you don't trust the dropbox source).

# Answer
> 1 votes
In case you're interested in more details than just sender and message (as in this answer), I've just found a nice article on the topic: Read SMS directly from Sqlite database in Android. Also see: The message data structure.

Even better, take a look at Github: **ANDROID-SMS** is a tool written in Python which *recovers all SMS messages and organizes them into SMS Conversations with statistics provided.* It *also recovers all MMS messages and organizes them into MMS Conversations, with the respective files.* I've not tried it (yet) myself (just found it a few minutes ago), but it sounds pretty neat.

Of course, this program doesn't work on the Android device directly – but instead on your computer (where it requires Python 2.7 with SQLite3 for Python). So you will need to first pull the database from the device. All required steps are described on the project's Github main page.

# Answer
> 0 votes
Another solution I invented utilizes an app on the phone that reacts on SMS and saves it to a file that you can read with ADB.

* Install any Tasker-like app, I made it with E-Robot
* Create new command
* Add event `Contact=>SMS`
* Add action `Memory=>Write file`, there you can save SMS to a new file every time or to the same one with separator. Anyway save it to /sdcard or any path accessible via ADB.
* Monitor that path with ADB and read SMS contents.

---
Tags: sms, adb, command-line, broken-screen, sqlite
---


# Question
Title: Restricting an app to only send internet traffic but not receive that back?
Is there a way or app to restrict some apps on my Android, or the whole device, to only send internet data packets but not receive them back?

I want to confuse a game app by doing this. It restricts me to have only two games simultaneously. But I want to suppress this behavior by opening game in normal way, blocking incoming traffic and then sending three or more requests to start a game. The app errors, but after restarting, all three or more games will start.

I have a rooted phone.

# Answer
It's possible, but far from easy to achieve. There are multiple approaches we can use to block (or at least try to block) incoming traffic.

But blocking one way traffic doesn't make sense in most cases. An app sending TCP packets but not receiving back responses will consider itself disconnected from internet. However, you may try for your particular case if it works.

***Note:*** *All of below discussed methods need root access.*

## UID BASED BLOCKING:

Android uses Linux kernel which has a builtin firewall `netfilter` that can be used to filter network traffic. There is an `iptables` module named `owner` that filters traffic based on its UID / GID. Every app on Android is a UNIX user and has a unique UID.

But the problem is that `owner` module is only valid for outgoing traffic i.e. the packets generated locally. IP packets coming from some other machine don't carry owner information with them. So the owner module applied to incoming traffic should fail or it should give a warning as explained here. To measure per-app incoming / outgoing network usage, Android patched kernel to include `qtaguid` module. But `iptables` wasn't patched to use the module from command-line. Also see related details in How to view network traffic requested by app?.

However `owner` module works for some of the incoming TCP packets received back with TCP Flags, which may block incoming traffic fully or partially:

```
# iptables -I INPUT -m owner --uid-owner <APP_UID> -j DROP

```

<sup>* To remove the rule, replace `-I` with `-D`</sup>

Probably the reason is that same TCP packets are returned back for Handshake and Bye but I'm not sure about that. However be ensured that it doesn't work for 100% TCP/UDP traffic. See escaped traffic:

```
# iptables -I INPUT -j LOG --log-uid --log-prefix 'INCOMING '
# dmesg -w |  grep INCOMING | grep -vE 'IN=lo|=5353|=1900|ICMP' | grep -v UID=

```

Some firewall apps block outbound traffic using VPN on Android. VpnService API also makes use of `UIDs` and `SOcket_MARKs` to control traffic in routing table / RPDB, just before leaving the device.

## PORT BASED BLOCKING:

More certain and complex ways of blocking incoming traffic rely on watching all the network sockets being created and deleted. A socket is a combination of IP address and port.

To get some basic idea of this approach, let's take example of Firefox app on my phone, with UID 10081:

```
# ss -4tuapne | awk '/uid:10081/ { print $5,$1,$2,$7.$8 }'
192.168.1.11:39910 tcp ESTAB users:(("mozilla.firefox",pid=22370,fd=163)) uid:10081
...
...
# iptables -I INPUT -p tcp --dport 39910 -j DROP

```

This will block all incoming traffic to port 39910 being used by Firefox app. But this approach is not practical because creation and deletion of sockets is taking place at such a high pace that even in native code some packets would be missed. And at the next moment the same port will be assigned to some other app's socket. This seems only possible if the local port is fixed, but for normal apps, random system selected available (TCP / UDP) port is being used for socket creation (can be controlled with ip\_local\_port\_range).

You can find some more details View network traffic requested by app.

## IP BASED BLOCKING:

This methods works best if you know the source IP address of packets. Find all servers your app is trying to connect on internet (e.g. by blocking app for outgoing traffic) and block them using `iptables` source IP filtering, if they are not a hundred in number and they don't keep on changing frequently:

```
# iptables -I INPUT -p tcp -s <IP_ADDR> -j DROP

```
> 4 votes

---
Tags: networking, internet, data-monitoring, firewall, iptables
---