text:
Permission denied reading /dev/block/mmcblk0p4 as root
I will list my main objective first, dependencies after. If there is a better path to my goal, please show me the way....

I want to install Lollipop on my HTC One S. (Or a later version, if one is compatible with the One S, Google Play Services included.)
For this I need HBOOT 2.16
For this I need S-OFF
For this I need Super cid: 11111111

(Phew, what a hassle!)
I am working up from the bottom of this list: the instructions for Super cid begin
adb shell
su
dd if=/dev/block/mmcblk0p4 of=/sdcard/mmcblk0p4

This gives me a permission denied error. Here is the full contents of the shell:
#> adb shell
shell@ville:/ $ su
255|shell@ville:/ $ dd if=/dev/block/mmcblk0p4 of=/sdcard/mmcblk0p4
/dev/block/mmcblk0p4: cannot open for read: Permission denied
1|shell@ville:/ $ ls -al /dev/block/mmcblk0p4
brw------- root     root     179,   4 2017-02-28 20:35 mmcblk0p4
shell@ville:/ $

I find it odd that su seems to change the user to 255 and the failure of dd seems to change the user to 1, but what do I know?
Why is this permission error happening and how do I fix it?
The phone currently runs Cyanogenmod.

Sure you got root? $ dd if=/dev/block/mmcblk0p4 of=/sdcard/mmcblk0p4 suggests you've run this command as ordinary user (note the $ at the start; for root this would have been a #). Hint: In developer settings, you need to enable root for ADB.


text:
How to run Android in Virtualbox on Linux?
For days I try to get Android 5 or higher running inside Virtualbox on Linux (here: Mint 18.1), without success. At best, I get past the boot menu (Grub), the system switches to graphics mode, and I see the pulsating "Android": After a few seconds, disk access ceases, and the VM hangs with 100% CPU load.
I've searched the web up and down, and tried all the tricks I could find: increasing RAM to 2G, video memory to 128M, CPU count to 2. Switching the VM from "Linux (other)" to "BSD", trying 64bit and 32bit images (the 64bit images even get stuck at a black screen before the pulsating "Android" letters), the latter in 64bit and 32bit VMs, from the Android-x86 project via RemixOS to Phoenix, Android 5.1 to 7 – nothing gives.
Where's the trick?
Please don't point me to those numerous guides based on Virtualbox running on Windows. I've followed a bunch of them without luck. Nor do I want to use QEMU for that (draws in too many dependencies I don't want to install), or Genymotion etc (where I'd have to register). I'm interested in help from those who've got it running fine in Virtualbox on Linux.
I've also seen similar questions here and followed the advice from their answers:

Android x86 Marshmallow not booting on Virtualbox and VMware Workstation
adding vga=834 nomodeset xforcevesa to the kernel options just caused the hang happen even earlier. The other advices I already had followed. The .vdi taken from OSBoxes had the same issues.
other questions are either not for Virtualbox, or concerning pre-Lolliop. As the linked question above shows, the problem seems also to be present with VMWare.

How did you get it to run?

Note in between: I might soon be able to self-answer, but first need to verify and, if possible, improve: I meanwhile managed to fully boot an ISO with RemixOS, using "FreeBSD 64bit" for that 32bit image. The boot just took AGES to complete (about 15min before the pulsing "RemixOS" text got replaced by the welcome screen). It might be that's the first boot only, and after installing it to "disk" and having that running once, the next boot is faster. As soon as I find time, I'll dig deeper – and then will remove this paragraph and post an answer instead.

VMware doesn't work with android x86 or Phoenix OS either

@LiamWilliam thought so (see last bullet point). The only Android I was able to get running in a VM here so far was 4.x (more than a year ago), which is insufficient for my purpose. I'd need Android 6 and 7, though 5.1 would be better than nothing. But lower versions wouldn't be sufficient.

Like this?

@Firelord Looks like you did it! Instructions? The settings (lower right frame) seem to be the same as mine. What ISO did you use? Which specific settings adjust? I've tried the 6.0 ISO from the Android-x86 project (64 and 32bit) without success. If you say your installation was "standard", then the distribution must be the difference (you're on Slackware, I'm on Mint) – and I'd have to migrate my question to U&L. My VM settings are in the question text. What are your differences?

This helps?, though Mint version is different

@beeshyams Please read the question again. I don't ask how to install Virtualbox on Mint (that would be off-topic here), but Android inside that Virtualbox :) So no, that does not help. Virtualbox is installed and working fine (I have a few other VMs in there).

are you adding a bounty to this question or should me?

@LiamWilliam See the last paragraph in my question: before I can put a bounty, I first need to verify that. Currently I lack the time to play with this (especially with each boot taking that long) – but of course I'll finally follow it up and, if my above assumption does not work out, definitely will bounty the question. But ATM I couldn't award the bounty as I lack the time for verification.

Got an update to this, @Izzy?

@SiXandSeven8ths unfortunately no. Found no time yet to play with it again. Too many other open cases …

Was just wondering, came across this and found it interesting yet unsolved.... :)

I was able to install Android-x86 on my Debian 9 box with no real problem.   Following are my system details, the articles I followed, commands I used and lastly the settings info of the VM itself.
System:

Chassis: desktop
Desktop Environment: Gnome 3.22.2
Operating System: Debian GNU/Linux 9.1 (stretch)
Kernel: Linux 4.9.0-3-amd64
Architecture: x86-64
Processor: Intel Core i5-4570S CPU @ 2.90GHz × 4
Processor supports HW virtualization: yes
Processor supports PAE: yes
Processor supports long mode: yes
Processor supports nested paging: yes
Memory: 15.4 GiB   Graphics: Intel® Haswell Desktop
Disk: 1.1 TB

First I installed VirtualBox 5.1:

$ cd /etc/apt/sources.list.d
$ sudo touch virtualbox.list
$ sudo nano virtualbox.list

In nano I typed:
 deb http://download.virtualbox.org/virtualbox/debian stretch contrib
Then to save and exit nano editor:
ctrl+o
ctrl+x
Then to get keys, update repos and install VB.

$ cd ~/Keys
$ curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc
$ sudo apt-key add oracle_vbox_2016.asc
$ sudo apt-get update
$ sudo apt-get install virtualbox-5.1

Then I set about installing Android-x86:
First I downloaded Android-x86 6.0-r3 (the third stable release of marshmallow-x86) from here. Then I followed this article: "How to Install Android in VirtualBox"
by Cameron Summerson, dated June 29th, 2017.  The only snag I ran into was for mouse support.
The suggestion here didn't work for me but it might work for someone else.
So then I tried the discussion here which instructed to turn off VM which in my case is  "Android" and try the command:
$ VBoxManage modifyvm Android --mouse ps2
After turning Android VM back on, I had mouse support.
These are the VM's settings info as retrieved by CLI command:

$ VBoxManage showvminfo Android --details

Name:            Android
Groups:          /
Guest OS:        Linux 2.6 / 3.x / 4.x (64-bit)
UUID:            a8a28a18-2d9a-4aff-872c-890d72ec9e8f
Config file:     /home/shine/VirtualBox VMs/Android/Android.vbox
Snapshot folder: /home/shine/VirtualBox VMs/Android/Snapshots
Log folder:      /home/shine/VirtualBox VMs/Android/Logs
Hardware UUID:   a8a28a18-2d9a-4aff-872c-890d72ec9e8f
Memory size:     6020MB
Page Fusion:     off
VRAM size:       48MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  4
PAE:             off
Long Mode:       on
Triple Fault Reset: off
APIC:            on
X2APIC:          on
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             UTC
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State:           running (since 2017-08-04T02:01:58.782000000)
Monitor count:   1
3D Acceleration: on
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE (1, 0): Empty
SATA (0, 0): /home/shine/VirtualBox VMs/Android/Android.vdi (UUID: a111cb34-b24f-4b38-ac32-bc33428f8b55)
NIC 1:           MAC: 080027D5FAC2, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: PulseAudio, Controller: AC97, Codec: AD1980)
Clipboard Mode:  disabled
Drag and drop Mode: disabled
Session name:    GUI/Qt
Video mode:      1024x768x32 at 0,0 enabled
VRDE:            disabled
USB:             enabled
EHCI:            disabled
XHCI:            disabled
USB Device Filters:

Available remote USB devices:

Currently Attached USB Devices:

Bandwidth groups:
Shared folders:
Name: 'shine', Host path: '/home/shine' (machine mapping), writable
VRDE Connection:    not active
Clients so far:     0
Video capturing:    not active
Capture screens:    0
Capture file:       /home/shine/VirtualBox VMs/Android/Android.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25
Guest:
Configured memory balloon size:      0 MB
OS type:                             Linux26_64
Additions run level:                 0
Guest Facilities:
No active facilities.

Thanks for the details! I'll check with them on my next try. Just the first step doesn't match for me, as I'm not running Debian Stretch here (but Mint 18.1, as stated).

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
ask for app rating or review in Google Play, when uninstalling app
I vaguely fondly remember a time when Google Play (Google Store back then?) was pesturing me to leave a review every time I was uninstalling an app.
How can I enable this feature in Android 6?

This feature is independent of Android version- it is a matter of Play Store policies which keep getting added or sunset

Wait, you'd want this back? Never mind how odd that seems (to me, anyway) I think this could be done via tasker, or macrodroid. I'm guessing that you can grab the package name, and open it as a URL, which directs back to Google play. I think. I'll have a look, but someone more experienced will probs know ;)

@DanBrown yeah, I want to give bad ratings to bad apps so that I don't waste my time on them again the next time I install a 100 apps for the same purpose in order to find out which one is best - I'm weird in that way :)

@beeshyams could you add your comment as an answer? That was enough for me

This is a Google Play Store feature and is not dependent on the Android Version
Features of Play store which frequently change or sunset and there is no way to revert to earlier behaviour. For instance, Play Store asks for a review as mentioned here, a feature earlier not present
Why has Google started asking questions when reviewing apps in Play Store?

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What's an up-to-date method of getting S-OFF on a HTC One S?
All the instructions I can find for getting S-OFF on a HTC One S seem to be out-of-date.

These instructions ask you to download soffbin3.zip but the link takes you to website which thinks it's streaming you a video and the mirror link is dead
Rumrunner is available but soju.exe frezzes on "please wait"
firewater redirects to Sunshine which is a paid service. The Wayback Machine has a copy of the executable but when I copy the executable to my device and run it, it just... deletes itself.

I'm out of ideas. How do I get S-OFF on my HTC One S in this day and age?
(The only reason I want S-OFF is to install HBOOT 2.16.)

Pretty sure it's just Rumrunner - I used it to S-OFF my Evo 4G LTE on its highest version possible back when I owned it. Get your fastboot drivers sorted out.

Use Sunshine and pay the $25... I know it seems stupid to pay, but it works and there isn't any other way to do most HTCs anymore, all the devs that really knew how to do it work on the sunshine product now.

I had: hbot 2.15, s-on, twrp 3.x cm12.
I tried:

moonshine = told me to read
rumrunner = told me to stop it on the 1st swig
sunshine = I am a cheapskate, so no
fre-something-can't-remember_with_soff.bin = couldn't get the bin and it needed super-cid and was just a bit too much of "could go wrong"

What worked for me:

Flashed MagioRom_ONE_S_RC6.zip
Flashed the boot.img from that zip
booted the rom and disabled screen lock and fastboot
enabled dev/adb debug
let rumrunner do its work

Could be that rumrunner stalled for you because your phone asked for permission for the adb-connection.
I had to flash the MagioRom because rumrunner seems to prefer a sense rom and cm12 was a bit to far along.


text:
Phone bricked? Stuck in boot (can't access ADB)
Unfortunately my Moto G XT1543 is stuck in the boot. PWR + VOL DWN does not work, and adb returns the following:

adb reboot bootloader

daemon not running. starting it now on port 5037 *
daemon started successfully
error: device '(null)' not found

The official motorola drivers can't recognize the device. I'm completely stuck. Any advise?
Regards

My issue was that PWR + VOL DWN wasn't working, I apologize if I can't provide a more accurate answer, but PWR + VOL DWN finally worked and I was able to connect with adb once again.

Oh. Well that's good, eh? A happy ending :) just remember to mark this as an answer Tomorrow.


text:
Where do I download HBOOT 2.16?
I need HBOOT 2.16 to flash my preferred ROM on a HTC One S.
I can't figure out where to download the firmware itself. The only page I've found which even vaguely resembles clear instructions is this one but the download link for the firmware is broken. The other pages I've seen present a very muddled picture and no links through which to download the actual firmware.
I have a rooted device, S-OFF, super CID 11111111, formerly H3G__001 I believe.
I'm going round in circles trying to figure this out. How do I upgrade my firmware?

Situation seems bad. Do you have the S3 or S4 variant? AndroidRUU lists the latest 3.16.x firmwares which contain HBOOT 2.15.

Assuming you have an S4 variant.
Check this XDA-Developers thread out - latest official (but unofficially obtained) firmware at version 4.05.401.1, with HBOOT 2.16. Link is hosted on AFH and is pretty good in quality.


text:
Bluetooth sbc parameters
From http://soundexpert.org/news/-/blogs/bluetooth-audio-quality-a2dp, and How do I determine which A2DP codecs my phone supports/is currently using?, I can see that when I listen to bluetooth audio from my phone to my car, I am getting sbc with these parameters:
Middle Quality Joint Stereo
Samp Freq 44.1 kHz
Bitpool value 35
Resulting Frame length 83 bytes
Resulting bit rate 229 kb/s
Block length 16
Allocation method = Loudness
Subbands 8
Can someone share an equation of how these parameters relate to each other?  Does any sbc at 44.1 KHz and bitrate 229 kb/s have to have bitpool = 35 and frame length 83 bytes?

OK, I found my answer:
Direct link: https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=303201
Alternative: https://www.bluetooth.com/specifications/adopted-specifications and search for a2dp
The equations are in section 12.9.


text:
restoration of deleted data by mistake
i wanted to delete the data using the service however i deleted the data from my own phone by mistake. complete data from device as well as SD card have been erased.
Please assist to restore same.
Thanks & Best regards,
-Anand

unfortunately there is no backup taken in google drive as well.

Data was deleted using " https://myaccount.google.com/device-activity "

I'd try pulling the SD card and doing a few attempts at data recovery from it.  If it's been formatted as EXT3/4 I'd try using Photorec on a Linux system.  If it's anything else I'd try GetDataBack or FreeUndelete on Windows.
I know of no way to attempt that on the device's internal storage, sorry.

Hi.. Thanks for your suggestion. I hooked my SD card through card reader and managed to recover 80% of data using "iCare Data Recovery Free" software. Thanks for saving my useful docs. :)

@AnandRana Awesome, glad it helped!


text:
Android studio not detecting devices
I am currently using windows 10 enterprise and my android studio does not detect devices despite me installing drive pack 17 and also adb fastboot drivers all phones are detected by the machine but android studio does not detect the phone.

Enable USB debugging while you have plugged the phone in on android studio. Then a pop-up should appear, allow permission for your pc to do usb debugging. This might be the case since the phone is being detected by the device, usb debugging is found in Settings > Developer tools

Check Whether the program is running locally through your Android Virtual Device Manager

Ensure the following:
1.The connection is set to "allow file transfer " and not "charge only mode".
2.Ensure having developer privileges in your device and also enabling USB debugging.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
mobile network and Wi-Fi are blocking
The problem of my phone is, mobile network and also Wi-Fi connection are sometimes blocking. it happens randomly. On the screen, it shows everything is regular and there are connections, however, if I try to connect to network/Wi-Fi, it fails. The only solution is to restart the phone. Do you know what is the problem? I guess old rom....
My phone is Samsung Galaxy s II lite (AKA Samsung I9070 Galaxy S Advance).
Model number: GT-I9070
Baseband version: I9070BULK1
Android ver: 2.3.6
Kernel: 2.6.35.7-1211698
Build number: GINGERBREAD.BULK1

What do you mean by "are blocking" and "it fails"? What do you actually see on the screen? Since we can't see your phone, try to be precise.

I mean the connection is blocked. There is no access to network. for instance I cannot send sms or make a phone call. Same for internet access: I cannot use Whatsapp or connect to a website.

On screen, I dont see anything special. everything seems working, there is no error massage.

feel free to modify the question to make it more cleaer

Did you try factory reset?

This issue happens for many models.
Let me say a simple scenario
You are in a call, suddenly the signal has gone and call drops. Then even waiting for a long time, the signal is not coming.
This is because, the phone didn't attempt to connect to a network anymore.
The solutions

Turn on airplane mode and after 5-10 seconds, turn off it.
Go to operator selection -> manual -> search and choose the operator, later change to automatic.
As you said, restart the phone.

do you know any solution that fix this issue forever? this workaround has to be performed every time manually.

In my knowledge, there is no permanent solution. This is because the phone is not aware of the disconnection as it happend suddenly.

Do you have any list of models with this problem?

I found this happens on micromax, yureka and some small brands but never found this on htc or samsung. In samsung, data connection goes but the cellular network is available. Mainly in Android 5+ or CM 12+. But I can't state only these models. This is my knowledge in this issue


text:
After new firmware, can't install ROM (mount error)
I installed RUU 4.2.2 in an attempt to upgrade HBOOT to 2.16 on a HTC One S. The boot menu shows 2.16 so I guess it worked but now I have no OS.
I am trying to install a ROM (Lineage 14) but I get error messages like this
mount: failed to mount /dev/block/platform/msm_sdcc.1/
umount of /system failed: no such volume
Patching system image unconditionally...
E1001: Failed to update system image.
E:unknown command[log]
E:Erorr executing updater binary in zip '/sdcard/linea
Error flashing zip '/sdcard/lineage.zip'
Updating partition details...

If I adb shell then ls /dev/block/platform/msm_sdcc.1 I get
by-num      mmcblk0p13  mmcblk0p19  mmcblk0p24  mmcblk0p3   mmcblk0p35  mmcblk0p8
mmcblk0     mmcblk0p14  mmcblk0p2   mmcblk0p25  mmcblk0p30  mmcblk0p36  mmcblk0p9
mmcblk0p1   mmcblk0p15  mmcblk0p20  mmcblk0p26  mmcblk0p31  mmcblk0p4
mmcblk0p10  mmcblk0p16  mmcblk0p21  mmcblk0p27  mmcblk0p32  mmcblk0p5
mmcblk0p11  mmcblk0p17  mmcblk0p22  mmcblk0p28  mmcblk0p33  mmcblk0p6
mmcblk0p12  mmcblk0p18  mmcblk0p23  mmcblk0p29  mmcblk0p34  mmcblk0p7

In TWRP 2.6.1.0 I can wipe cache and Dalvik cache, Format Data and Factory Reset. If I adb shell and run mount I get
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p34 on /cache type ext4 (rw,relatime,data=ordered)
/dev/block/mmcblk0p35 on /data type ext4 (rw,relatime,data=ordered)
/dev/block/mmcblk0p35 on /sdcard type ext4 (rw,relatime,data=ordered)

I can mount cache, data, and system from the TWRP menu, but not USB-OTG.  If I go to Advanced Wipe, I see
E:Unable to mount '/usb-otg'

How do I fix these errors so I can install my OS?

It's a lil miraculous that I happen to check SE 10 minutes within you posting all your questions today...

What exactly did you do with adb shell? I assume you created system directory with ext2,3, or 4 FS. Please help me with exact steps. I'm stuck with the same error.

I upgraded the TWRP version from 2.7.something to 3.1.something using instructions from https://www.xda-developers.com/how-to-install-twrp/ The problem is solved still interested in the manual solution. do let me know how to get around it manually.

Still assuming S4 variant. Your TWRP is so outdated - get the latest here. Flash through fastboot as usual.

Not guaranteed to solve, but I think 2.6.x isn't compatible with the new partition layout introduced in HBOOT 2.16 anyway.

I have TWRP 3, still getting these and similar errors. TWRP "fix partition" tool doesn't work either.

Tried ROMs with older Android versions? See if the problem's with this particular package.

I fixed it by going into adb shell and running mkdir, mount, and mke2fs manually.

Can you explain how you did? It will help users more.


text:
Can libraries share memory as in linux?
Is it possible for libraries to share memory like the shared memory in linux?
(The shared memory feature adopted in System V and later adopted to linux)
Eg: When two apps are working simultaneously and both uses the OkHttp library, is the library loaded into memory twice?

The same shared memory feature is still present in Android, and it works on built-in shared libraries such as OpenGL ES, but it's not used for third-party libraries like you're asking about. Each app that uses a third-party library has to include the library in its APK file. These then aren't shared libraries (in the .so sense): they're just duplicate files which might happen to contain the same code. (Usually they won't contain the same code because different apps will have been built against different versions of the library.)
This avoids possible incompatibilities or security problems caused by updating libraries from different apps. Shared library incompatibilities are a huge problem in GNU/Linux systems. Distributions put a lot of effort into preventing them by testing different combinations of applications and libraries, but they still go wrong sometimes. In Android, where nobody is responsible for making sure that different apps work together, that kind of shared library system would result in apps often breaking when a shared library is updated. Security problems might come about in a system that used shared libraries in this way, because an app might update a shared library to a "newer version" that's actually hacked to leak information or control the app. The libraries would have to be treated as separate packages, signed by the author, just like apps are, and then there would have to be a complex process for handling version updates.

With pre-installed "core libraries" being the exception, I assume?

I don't think that core libraries have an exception in this case.

This is incorrect. Just like Linux, Android creates a copy-on-write mmap of the libraries, the kernel will automatically share the memory for mmap when possible. All core system libraries are also loaded by zygote and shared when a new process is forked. Reference.

@LieRyan The page you're referring to is only talking about the built-in "Android framework" libraries, not third-party libraries like the OP asks about. It's even better than just sharing the binaries: the COW process applies to the whole heap before the zygote fork. The same technique could be used for third-party libraries but in practice doesn't work out well on Android because the (third-party) libraries aren't actually built as shared libraries - they're distinct copies, statically linked. It would have to read the whole binary to know whether the library can be shared or not.

Java doesn't really have statically linked libraries, all classes are dynamically linked. In any case, the reason libraries included in an application don't actually share memory isn't because they're statically linked, but rather because applications ships their own copy of the libraries which then exists as different files in the filesystem. Shared libraries need to be loaded from the same file if they want to share memory. The AOT compiler may also inline library calls, but that's a separate issue.

@LieRyan Yes, that was my original point. If you can think of a better way to describe this that end users will understand, I'd be happy to accept an edit.

@DanHulme you have highlighted a security error in the answer but the shared memory is present in linux without any such errors. Any clarification would be awesome.


text:
How to add an image to the hard-disk of an android phone
Dont mention about custom Roms, I want to load an image into the hard-disk and be able to access it from a computer can I do so?
I want to know how to write to memory, and that includes wipping off the / directory.
May be want to load linux into it(Assume)

DriveDroid can help

DriveDroid allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions or always having a rescue-system on the go... without the need to burn different CDs or USB pendrives.
DriveDroid also includes a convenient download menu where you can download USB-images of a number of operating systems from your phone (like Mint, Ubuntu, Fedora, OpenSUSE and Arch Linux). Around 35 different systems are available at this moment.

Needs root
Related Creating a bootable USB through android

Beat me to it :) +1

I want to wipe off  / contents, that means everything at the root directory and place something new there.

I don't understand that part- if you wipe off everything in root directory, it won't be a phone anymore and you can't use it. I am afraid I don't understand

I mean replacing it with some other contents and making it notable from there.

I still don't follow you - are you talking of making your phone a bootable USB??? This app can do that as explained. If this still didn't help, please ask a separate question explaining your requirement clearly and linking this question as background if it helps


text:
Headphones aren't working on S7
I have an S7 Active, and all of suddenly both my headphones stopped working with it. The interesting part is my headset I was for my Xbox works with it, and my headphones work with everything else I tried them on. Is there any way to fix this?

Did you try pressy? it maybe blocked the sound! if not, call google to help.  if it does not help, get a new phone.  lastly, they are not compatible. if one of these do not work, comment and ill try to fix it.


text:
how to connect to open wifi?
I cant connect to open wifi with my Samsung A5. When I try to connect to wifi,  page immediately pop up and it writes that I cant connect (I do not get the public website to agree to the terms and connections like others). Do I need to change something in my options?

Can you post a screenshot of this page? It's tricky to be sure of what's happening without seeing it.


text:
Checking that GPS is paused after turning screen off?
I suspect a maps-based application I use doesn't actually pause GPS after I turn the screen off like it's supposed to, draining the battery accordingly.
Is there a way to check the status of GPS after the screen is turned off?
Thank you.

Macrodroid automation app may help by giving you a audio notification under the twin conditions of ( app being active, GPS being enabled ) when the screen is turned off
Trigger: Screen off
Action:
If
app state of your app ( choose from running in background / not in foreground / alive in background /not running- in the example below it is App in foreground)
And
GPS enabled
add child action of Notification sound,
end if
Constraints: None

Since you didn't link the maps app you used, I couldn't verify if GPS is running or not when screen is off


text:
How to get the full path of an image viewed in the default Gallery App on the Samsung Galaxy?
The Android is the Samsung Galaxy S7.
Can someone tell me how to get the full path of the files being displayed in the Gallery App?
I have tried to figure it out by creating a folder, placing picture in it, then browsing to the pictures in Gallery.  It shows the folder name, but doesn't show the path to the folder.
If I create a folder: /sdcard/mypictures/, it's show the images in an album called mypictures.  It doesn't show that the mypictures folder is off the root of sdcard.  If I make a subfolder in /sdcard/mypictures/march2017, it shows the images are in march2017.
I'm trying to figure this out because browsing a friends phone, we are trying to grap pictures from it.  We see them in Gallery, but can't figure out, of his years of storing and sorting pictures on where they are actually located.
I'm sure there is a way to get the path.  Hopefully someone can help.

I was able to figure out how to get to the path by this message and steps provided by beeshyams.
The menu button on the Samsung Galaxys is the hardware Return Key.
The problem is that, there isn't an onscreen menu for the recent Samsung Galaxy androids.  I was stuck on the 3 dot menu step.
The Samsung Galaxy has a hidden hardware menu.  Pressing and holding the Return Button activate the menu feature.
While having an image in view, press and hold the Return Button, this bring up a menu that include the Details option.  Clicking on Details brings up a lot of information on the image, including a map marked where it was taken.  It also shows a properties block that includes the path of the image.

Glad it is solved +1

Firstly, the option of installing a file explorer, as in my earlier solution (now deleted) was not tenable as the device from which pics were to copied is not OP's. OP edited his question to highlight using Gallery app only
On my device Moto X Play with stock gallery app, the method is - When I open any of folders and select a pic, a tick mark appears and from the 3 dot menu → details → scrolling down I can see the path as /storage/emulated/0/DCIM/camera/xxx.jpg. This information section follows information about the geo tagged information of pics
On the chat, we could not find a way to get to the 3 dot menu on OP's device and OP found the way out using hardware keys as explained his answer


text:
My phone won't boot up suddenly. Please help, thanks!
It is Samsung Galaxy Note 2 (GT-N7100), unrooted, stock ROM.
It always stuck at the Samsung Galaxy Note 2 logo screen.
I can boot to recovery mode and download mode.
What should I do to save my phone? Thanks a lot.

I tried to flash by using download mode but I got these errors.

< ID:0/003> Added!!  < ID:0/003> Odin engine v(ID:3.1205)..  <
  ID:0/003> File analysis..  < ID:0/003> SetupConnection..  <
  ID:0/003> Initialzation..  < ID:0/003> Get PIT for mapping..
  < ID:0/003> Firmware update start..  < ID:0/003> SingleDownload.
   < ID:0/003> sboot.bin  < ID:0/003> FAIL!  < ID:0/003>
   < ID:0/003> Complete(Write) operation failed.  < OSM> All
  threads completed. (succeed 0 / failed 1)

When repartition is checked,

< ID:0/004> Added!!  < ID:0/004> Odin engine v(ID:3.1205)..  <
  ID:0/004> File analysis..  < ID:0/004> SetupConnection..  <
  ID:0/004> Initialzation..  < ID:0/004> Set PIT file..  <
  ID:0/004> DO NOT TURN OFF TARGET!!  < ID:0/004> Can't open the
  specified file. (Line: 1831)  < OSM> All threads completed.
  (succeed 0 / failed 1)

The following errors displayed when I booted to recovery mode:

Android system recovery < 3e >  KOT49H.N7100ZSUFNL1
  E:failed to mount /efs (No such file or directory)  E:failed to
  mount /system ((No such file or directory))
   # MANUAL MODE #
  --Appling Multi-CSC  E:failed to mount /system (No such file or directory)  can't mount '/system' (No such file or directory)
  E:failed to mount /cache (No such file or directory)  can't mount
  '/cache' (No such file or directory)  E:failed to mount /cache (No
  such file or directory)  E:can't mount
  /cache/recovery/last_recovery  E:failed to mount /data (No such
  file or directory)  E:can't mount /data/log/recovery_log.txt
  E:failed to mount /system (No such file or directory)  E:failed to
  mount /cache (No such file or directory)  E:can't mount
  /cache/recovery/log  E:can't open /cache/recovery/log
  E:failed to mount cache (No such file or recovery)  E:Can't mount
  /cache/recovery/last_log  E:can't open /cache/recovery/last_log
   E:failed to mount /cache (No such file or recovery)  E:can't
  mount /cache/recovery/last_install  E:Can't open
  /cache/recovery/last_install  E:failed to mount /cache (No such
  file or recovery)

Those 'failed to mount' errors are disconcerting. I'm wondering if you've reached the limit of what you can do without using ODIN and getting a proper recovery installed on here. Then it may be possible to flash the stock ROM image back to the Note 2, or something newer like Resurrection Remix. You say it's not rooted, but is this running the stock ROM? Without knowing the versions of what you have installed it may be difficult to recommend a safe path from here.

Word of advice: YOU SHOULD NEVER TICK REPARTITION-ESPECIALLY WITH NO .Pit It's a quick-ticket to "I'm f**ked" town.

What you need to do is a attempt a reflash, and remake the partitions. As for where we can grab the .pit needed, You'll have to tell us the make and model (For example, the Samsung Tab 2 7" has 3 models-GTP3113, GTP3110 and I think GTP3100) and the advertised storage space.

It is GT-N7100. Yes it is running the stock ROM.
Any workaround or solution is fine as long as I could make it boot again. Thank you.

@DanBrown Someone told me to do so. I don't know it is dangerous. It is GT-N7100, running stock ROM. What should I do? I believe it is 16GB. How could I check when it won't even boot up?

That's enough info, I think. I'll see if I can find a .pit for you :) Checking repartition should only be done if the partitions are damaged and you have a .pit file to flash. The partitions don't often take damage, and the results of damage can get... Interesting.

Alright, So here is what I found:   You can attempt to reflash the stock ROM via ODIN, which is a results may vary, but usually works. Just leave repartition off. Alternatively (or if that don't work) there is a pit file for you, thanks XDA, install the ODIN stock ROM again, this time with the .pit selected (and repartition ticked) Let me know if it works, And I'll draft an answer for you to tick (to help others with future, related issues)

I used this firmware to flash using ODIN but failed. Did I use the right firmware? The error messages were given above. Only "Auto Reboot" and "F. Reset Time" are checked the first time I tried. Then I checked "Re-Partition" too the second time.

What country are you from??

@DanBrown Hong Kong

Ah, and where did you get the phone from? You've got an India Stock here.

@DanBrown Same place. I just searched on the net and got one which seemed to fit my model. What's the difference among ROMs of different countries? Does it really matter?

I don't really know the difference, other than matching them right gives a lower chance of Odin being a meano and voiding Knox (which essentially kicks any warranty or official support into orbit) Though since it's official, it shouldn't happen.

Under odin there is option to copy PIT partition information table. adb shell command is
dd if=/dev/block/mmcblk0 of=/sdcard/out.pit bs=8 count=580 skip=2176. Pit is different for different storage and different country mobile.


text:
Is there a way to switch to charging only before plugging my phone into an USB?
Is there a way on Android 6.0 to switch to charging only before plugging my phone into an USB?

@beeshyams : I wrote Android 6 to signal the version. I edited to 6.0.

Enable developer options - To enable Developer Options, go to Settings and select About phone. Now, scroll down and find out Build number. Tap on this option around 7 times. You will get a success message
You will find Select USB configuration . Tap on that too open a sub menu and choose Charging only
Next time you connect, it will revert to charging automatically

Yes there is. I just did this right before updating to 7.0 so I hope I am remembering right. If you go to your developer options there should be an option to turn on or off what happens when you plug in your phone to a usb cord connected to a computer. You can switch it to charge only if you want. My current computer auto-encrypts anything plugged into it so I had to dig for this option. If it isn't in the Developer options, its in the USB connection options. Sorry I couldn't be more help.


text:
GMail Sync off but still syncs
I just started using GMail on my Galaxy J3, just like the built-in email app if I turn off sync in GMail it still sync's.  If I turn off sync in built-in app then I can't send/receive - that's why I tried GMail - at least in GMail w/sync off I can send/receive.

So what exactly is the issue, that the built-in mail app won't send or receive when sync is turned off on it?  I don't see a real question here.

There are two questions - neither GMail or built-in app work properly.  I don't particularly care which I use I just want email that functions w/o syncing.


text:
Replace Settings App on LG ls740
While trying to remove Bloatware on my rooted LG volt LS740, I messed up some apps.  I have done Factory Resets a couple of times and still several apps give the Unfortunately xxx has stopped.  The LG Backup, Browser, Contacts and most importanly to me the Settings app.  The others are get around, but the Settings app is tough to not use.  One error message from Link2SD that I got was that the Odex file is broken and to reinstall app.  HELP, how can I do this?


text:
How to avoid preinstalled deactivated apps to auto update
I have a Samsung tablet with Microsoft One Note and Microsoft PowerPoint preinstalled, among others. I have deactivated these, but even deactivated these apps auto update eating a lot of storage.
How to avoid that?

When you say 'Deactivated' do you mean 'Disabled'? I've never known my disabled apps to ever update, but deactivated apps could just mean 'Force Stopped', hence, they are eligible for updating. Please check the terminology matches what you intend to convey.

UI is in Spanish so I don't know the proper word in English. Maybe it's 'Disabled'. I don't mean just force stopped but truly disabled (when I disable them, all updates are deleted and factory version restored).

Are you sure you haven't done something then to enable them again? Actively, maybe not, but a System Update will drop the latest on top of the old and re-enable them; you will have to go through the disable activity again. I don't believe that there is anything else that can re-enable disabled apps.

I'm sure. They auto enable and auto update about once or twice a day.

'once or twice a day' was a key bit of information. Nothing legitimate updates that rapidly. Microsoft doesn't even update their Windows versions that often. Something is suspicious about these apps.

They didn't update so fast before deactivation. Now, they try this often to return to "current" version. Update is not to a new, different version each time, but from factory version to day's current version.

If they come pre-installed from your carrier and/or manufacturer, they most likely are /system apps and the only thing you can do is disable them.


text:
App2sd compatible email app
I have a Casio G'zOne Commando C771 phone. It only has 400 MB of internal storage (!!!). I want to connect to my email, but if I use the built in email app, it will very quickly fill up what little storage I have left.
In most cases, I have to use "App2SD" apps and never use the built in apps that come with the phone (outdated, and if I even download the updates they will immediately take up that little bit of space - so I only updated the Play Store and nothing else). I have tried downloading other email apps but have been unsuccessful. None of the ones I have tried have the "Move to SD" button enabled. Alternately, if an app is minimal in size (< 10 MB) and allows me to store the emails on the SD card, that would also be acceptable.
Here are email apps I have tried so far: GMail (maybe it would work, but since it comes as a system App I can't move to SD), myMail, Aqua Mail, and "Mails" (by Apyfie).
I have a Roundcube server, so I have also tried the Roundcube app, which IS surprisingly app2SD compatible - unfortunately it's broken in almost all other aspects - for instance, I can only see my last 5 emails and no others - so I still can't use it.
I also tried to locate "K-9 mail" but it says it's not compatible with this version of Android.
This phone has Android version 2.3.3.
I am aware that I could probably root the phone and do it that way, but I would prefer not to.


text:
Why is my phone ignoring OTG USB?
I have 2 phones.
 1. Android 4.4.4 - When OTG USB is connected, it automatically mounts with no problems and I can manage files, watch movies from it, etc.
 2. Android 6.0 - when OTG USB is connected, phone fully ignores it (does nothing).
Why can't second phone mount it exactly like a first does? Do I have to install some application that takes care of it? First phone is rooted, second is not. Can that be a problem?

What phone is it?

1st - Lenovo Vibe Z2 -----
2nd - Huawei P8 Lite

Its not the android version describes that it can connect OTG(On-The-Go), its the capability of the device. Huawei P8 Lite has no OTG connectivity as described here : P8 lite review

Thanks! Last question -  it is stated that port itself doesn't support OTG. So i suppose there is no software that can do it. Or is it?

USB OTG requires capable hardware, software on which it’s enabled and the right drivers. Source : http://android.stackexchange.com/questions/68329/is-otg-support-on-a-phone-is-a-hardware-dependent-feature


text:
How to play single album on Spotify when bluetoothed?
When I am riding in my car I have my android phone hooked up to the sound system via bluetooth. I download an album to the Spotify app my phone at home on wifi because I am cheap and don't want to pay data costs. When I listen to a downloaded album on repeat, then only the downloaded album plays. However, if I do not have the album set on repeat, then, when the album is over, Spotify starts playing something else. Usually it is something on a different album by the same artist. This incurs data costs, which I would like to avoid. So, is this a bug or a feature? How can I listen to a single album with Spotify and have it stop playing when the album is over when I'm hooked up to bluetooth in my car?
(NB: I haven't tried this outside of my car using cellular data, so I'm not sure if that detail is spurious or important.)

In the Spotify app, go to:
"Your Library" (lower right) -> Settings (cog in the upper right) -> scroll down and turn off "Autoplay". That should do it. Autoplay does exactly what you said. "Keep on listening to similar tracks when your music ends."
You can also or alternatively turn on "Offline mode" at the top of the settings screen. This will only allow the app to play already downloaded songs and will not use any data. You can leave the app in Offline mode for almost a month at a time. They require you to go back online after 29 days to confirm that you still have Spotify Premium and then you can go back to offline mode if so desired.

That's so annoying that "Autoplay" is a default setting. Ugh. Thanks, Cara!


text:
How can you measure your battery drain rate?
Even turned off and with no background apps, my battery drains FAST. I would like to know how fast my drain rate is compared to other phones to find out if I should replace the battery.
What are some measurement methods?

@beeshyams edited

Comparing your device battery drain to another device battery drain is pointless. There are too many variables at play like Android Verizon, how well the OS is optimised, apps loaded, usage conditions and so on. See the section at end of answer for reasons of Abnormal Battery Drain
Drain rate could be high, even when not used due to Wakelocks. See wakelocks and greenify tags that can help in reducing battery drain. battery-life wiki has pointers as well
See How can I tell if I need to replace my battery? and in particular using the Vbatt app mentioned in my answer. This will not tell you whether you need to change your battery but helps you compare two batteries ( and is time consuming too)

See this study for an interesting infographic


text:
cannot update applications because of confused memory
Android 5.1.1 pulls this stunt off very so often.
Smart manager states 408 MB free.
But if I try to update some apps, Android imposes me to "Free up space", stating 79.51 MB is needed (in this instance which ended up requiring only 7.5 MB, go figure).  Suggesting to go to settings/storage.
Go there and an initial bar looks like what Smart manager states (used/available), then one second later shifts over to details, but still indicates 408 MB free.
It is confused and transmitting that state to this user.  What is going on?
After reading the answers, I conclude this is rather violent behaviour and incoherent in communication

See this question for possible reasons

The OS attempts to maintain a specific threshold of free space, and that's why you appear to have plenty of space to install something but you get the warning and it fails.  As the link from beeshyams says above, it may or may not be 10% of your total internal storage.
How do you get around it?  Utilize external storage if you are able, or any other strategy you can use to free up the internal storage space.


text:
How can multitasking experience be improved on Android tablets?
I have a 10 inch Nexus tablet that I like to carry around while traveling. I can also connect it to a bluetooth keyboard, and this almost allows me to do everything a laptop can, but there are some major annoyances.
For example, I want to do web development while traveling. I can SSH into a remote server and edit the code there, and open the page on the Chrome app. However, Android only lets me have one app open at a time, so whenever I need to switch between two documents, it's very inefficient since I'm constantly closing and re-opening my apps.
I would like to use my Nexus 10 as my primary computer for working. How can my multitasking experience be improved?

Android 7.x Nougat officially introduces multi-window. With this feature you can now run 2 apps side-by-side and drag the black interpolation bar to adjust the window size (3 tiers available).

With the aid of Taskbar things get even better - with proper settings you get Windows-like task bar and resizable, movable multi-windows.

Ultimately though, without the ability to natively open multiple instances of one app, document abilities will be crippled to an extent. Wired video output is also absent, making presentation difficult, though if you have Miracast-compatible devices this isn't much of a problem.
Get started loading your Nexus 10 with Nougat-based custom ROMs by visiting XDA-Developers.
Do note that, due to the age of the tablet, Nougat won't run very snappily and you can't expect to multitask heavily.


text:
How to remove everything from an Android device?
I would like to remove all files from my android device INCLUDING system files. I have tried

rm -r *

and other commands but when I switch the phone off the files reappear.

You don't have permission to delete anything from a read-only filesystem like the system itself. The most you can do is delete all user data.

You can't do this from the OS or adb, you would have to do it from fastboot or recovery such as CWM or TWRP.
fastboot erase all - note this will erase EVERYTHING, including your IMEI or MEID and other proprietary settings, the phone will likely be unrecoverable or unusable with most devices. It is blocked in some devices. Use with caution and understand the implications prior to doing this!!!
fastboot erase XXXX - Where XXXX is the partition you want to delete, like system, boot, userdata, etc.
In TWRP or CWM, you could just format the various partitions.
In most devices, these options would require an unlocked bootloader.

To emphasize: erasing everything on a phone is likely to hard brick it, unlike, say, erasing a computer's entire hard drive, which you could later set back up.

@JosephSible-ReinstateMonica Although I don't doubt this, why is this the case?

@RockPaperLz-MaskitorCasket Two possibilities: first, some partitions contain critical information specific to each individual phone, so it can't be restored from a stock factory image, and second, unless there's flashing code burned into ROM, "everything" includes the code that lets you flash new images.

@JosephSible-ReinstateMonica Thanks for the updates.  What specific information is unique to each individual phone that would prevent it from working?  I'm thinking that if, perhaps, several MAC addresses are stored, the user could use any valid MAC addresses and the phone would technically still work (although there could potentially be conflict issues).  I have a hunch you are thinking of other things though.

@RockPaperLz-MaskitorCasket MAC addresses and IMEI or MEID number primarily... Once the IMEI/MEID number is gone, the phone cannot be registered on a mobile network. Many people also forget about the serial number, if that goes away then nothing can be done with security on the device as everything is based on the serial number and you cannot generate an "unlock token" needed by some OEM's to unlock the device. There is also the partition that contains the radio firmware, if they are wiped it may not be possible to restore connectivity to the radios (mobile data/voice, wifi, bluetooth, etc).

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Error: java.lang.IllegalStateException: java.util.concurrent.TimeoutException: Thread Binder_C gave up waiting for partitionMixed after 180000ms
After entering the final command to make a mixed-format SD card in How can I move apps to SD on non-adopted Marshmallow storage?:

$ adb shell sm partition disk:179,64 mixed 25

I meet this error:

Error: java.lang.IllegalStateException: java.util.concurrent.TimeoutException: Thread Binder_C gave up waiting for partitionMixed after 180000ms

If it is 75, then the error is:

Error: java.lang.IllegalStateException: java.util.concurrent.TimeoutException: Thread Binder_4 gave up waiting for partitionMixed after 180000ms

How can I fix this? Only 3 results appear in Google, and neither of them helps.

Phone: Sony Xperia M4 Aqua Dual
SD card: SanDisk Ultra micro SDHC UHS-1 Card 16 GB, class 10

Sounds like it is taking more than 3 minutes to partition.  That shouldn't be the case, it's probably hanging for some reason.  That said, what device do you have and what class and size of SD card?

@MatthewRead I have updated my question

You need to eject (unmount) the card first from Settings - Storage. Then follow this: How to turn a portable SD card into internal storage via ADB command?.

It is because the SD card is mounted to have an ext4 partition (alongside with another normal partition), in order to use Link2SD to force moving unmovable apps to SD card. The error shows up after this. Even reformatting the SD card to have only one full partition back does not solve the problem.
To solve it, reformatting it with the phone's default format tool. You may want to reboot the phone after done. Thereafter, you can partition the disk with adb as normal.


text:
How to remove KINGroot?
I installed KINGroot and regretted it. Now I can't remove all of its files because of permissions only KINGroot has. My friend tried to remove it by using towelroot and other methods but my phone crashes them. I need a PC method to remove all KINGroot files but also having my phone permanently rooted. The friend I mentioned and my other friend have rooted phones without KINGroot.
Can you please help me solve this issue.
I have:

Samsung Galaxy S3 mini - model number: GT - I8190
version 4.1.2
Phone manufacturing date: Jul 28 2013

If you require any other information about my phone please let me know. I messed up.

Have you tried installing SuperSU and using it to replace your su binary?  If that works then you could easily use a root file browser or Titanium Backup, etc. to remove the Kingroot app.  Otherwise, is reflashing the ROM an option?

@MatthewRead Kingroot uses a slightly tweaked SU binary to stop access from other SU managers. That, and newer versions will sometimes delete all traces of SuperSU from the system, then monitor it as a threat. Kingroot also shows many a privacy risks, along with some real shady dealings.

@DanBrown "Kingroot also shows many a privacy risks, along with some real shady dealings" - can you link any source supporting this?

There was a report somewhere that Kingroot was taking SIM-based information and selling it. I'll let you know if I find said article. I do know that it's an app that A) Leaves imprints, and B) kicks SuperSU to death. Why would anyone block SuperSU? It does also install other apps, although they promise it's just their system cleaning app (which I know most people do not like.)

@MateuszKonieczny Above, and here's the link I mentioned - KingRoot still is stealing your IMEI - XDA and it's also a battery hog.

Firstly, soon after uninstalling KingRoot be sure to get another SU management app, to protect your device against malicious attacks since it has elevated privileges than a non rooted device,
A checklist just in case;

Check if KingRoot is enabled as device administrator (under settings≥security), sometimes it's difficult to uninstall apps with such privileges
Try to uninstall the app from  within itself, rather than dragging to uninstall (you will need to reinstall su binaries with this method, but if your goal is to just get rid of KingRoot for another SU app it's worth a go)
Navigate directly to /system/app/ and search for a package with name com.kingroot.kinguser and delete the contents.

If the app is still stubborn, then try the PC method
Connect your device via  USB with debugging enabled,
On your PC open ADB terminal and type the codes one by one
# mount -o rw, remount /system

# am kill com.kingroot.kinguser

# pm uninstall com.kingroot.kinguser

Check if the app is removed

If no PC you could try using terminal, grant it superuser access and type pm uninstall com.kingroot.kinguser. Also a thread from xda-developers mentions a a way to replace KingRoot with SuperSU but haven't checked it myself. It's found at: https://forum.xda-developers.com/a310/general/how-to-remove-replace-kingroot-kinguser-t3308989

That would be SuperSUME. It's paid, so dot forget that :)

When I try that that it gives me Error: java.lang.SecurityException: deletePackage operation deny

@AriCooper-Davis looks like its not giving you permissions to do so, probably root is broken , or check the file manager you used has been granted root rights

@AriCooper-Davis Please check here: rm failed, Operation not permitted on Rooted Android may help solve this issue

This is what i have done:
TWRP install superSu alongside Kingroot, then install an root app unistaller and delete the Kingroot app.
Restart and should be SU instead of Kingroot.

You can also remove it without PC.
I made a tool that will do this thing.
Replace it with SuperSU from https://forum.xda-developers.com/t/2020-replace-kingroot-v5-x-or-kingo-root-with-supersu.3904880/
Which works with newer versions of KingRoot too.


text:
How is Remix OS (or Phoenix OS ) different from the Android that runs on regular Android phones?
Remix OS (or Phoenix OS ) is a good way to run Android on PC but  what are the basic differences between the Android-on-pc OSs and a regular Android which runs on a regular Android device.

Isn't the Tablet/Desktop-friendly UI already different enough? What other difference do you hope to know?

I mean differences in the OS structure. At first I thought they had differences in the launcher and system UI only but now I know that it is not the only difference.

Well I don't know of any... Mind sharing what you already know (and the source)?


text:
Contacts have been randomly merged
I own Moto G4 plus, I have seen from a week that my contacts getting randomly merged to another contact..I was shocked to see this.

If you previously made a contacts backup, you can proceed to delete all the "corrupted contacts", then restore your backup.
Finally use Duplicate Contacts to remove any newly created duplicates. The tools serves its purpose well. I have had the same problem. Hope it helps


text:
skip whatsapp restore on temporary phone but keep files for restore on next phone?
I broke phone A last night and borrowed a phone B from a friend. It was very little storage so I don't have space to restore all my whatsapp data via google drive (the files are already there). I am waiting for phone C (replacement phone) to come, and would like to restore all messages on phone C when it comes.
If I skip restore on phone B (the low storage temporary phone), will I lose the ability to restore messages (even if I miss a few days that are on phone B)  on phone C? i.e. will skip delete everything and prevent restoration in future phone C?
Thanks!

No.  If you want to do this, you need to first go to settings in Google Drive, go to apps and disconnect whatsapp.
Then skip the restore.
It automatically overwrites your old one.
I had the same situation, followed the advice in the first comment and lost 1.7G of precious data including many pictures I have saved nowhere else :(

If you enable sync with G Drive for chat backup in Phone B, then you cannot restore the backup.
Otherwise, you can restore in Phone C but the chats you have made from Phone C will not be there.


text:
Establishing MTP connection for Android Studio
I am trying to connect an Android device to my PC in order to use it to test an app created with Android Studio. After connecting the device, I don't get the usual USB connection notification on my device and nothing shows up in my PC's file manager either.
I tried using both my Honor 5x (Android 6) and Nexus 9 (Android 7) as well as Windows 10 and Elementary OS and multiple ports/USB cables. On the Nexus 9, I enabled the developer options and set the connection mode to MTP.
Is there something obvious I'm missing?

Android Studio needs a device connected in ADB not MTP, though MTP can be activated with no effect.
On the device:

Open the Developer options
Enable USB debugging.
You  need to install drivers for the device to get detected by the PC.

On the PC, Android Studio:

Alt + F10  should open a window showing your device connected

Then you'll be able to test apps build with Android Studio

I did that, but am still not getting a connection. The tablet is not showing up in android studio or the file manager and there is also no notification on the tablet itself, however it is charging.

Defective cable probably? Did you try another USB cable? or the USB port may be damaged, may have dust, debris, etc

Hm I tried different ports on my laptop and two different cables, I will try a different PC when I have access to one. Thank you for all your help so far!

If all this doesn't work, you need to check for drivers! Without drivers your device will never be detected !

Have you turned on the Developer Mode ON on your Android device, and allowed USB Debugging; and does your PC have proper device drivers installed?  Check whether ADB is working or not.  If the problem persists then you need to uninstall everything and reinstall things in the sequence required, like first installing Java, and then ADB, and then Android Studio, and then setting up your Android Device as developer mode with USB Debugging allowed.


text:
Did I get a virus? (Galaxy S4, 5.0.1)
I was just normally using my S4 when it restarted, and when it turned back on, it said Android is upgrading. The last time I saw this, I was notified of a software update, and I manually clicked install, IIRC. This time, it was sudden and unprecedented. I think this is a virus, though I don't know how I got it.

Sounds like Android was updating to me, not a virus! Maybe a new auto-update feature from the last software update? I can't imagine a virus creating that prompt.

Did you get an android with turning cogwheels in its belly and a progress bar (i.e. a system upgrade or fresh system install), or did you just get an "Android is being upgraded" message and and something like "51 apps out of 89 have been optimised"?

I think it is a virus, because the last time I updated, there was an android (robot, mascot, creature? I don't know) for a few minutes. This time, I just saw a white box saying "Android is being upgraded" It did this in 10 seconds or so then moved on to say "Optimizing app 1 of 1." I do not have only 1 app installed. When I manually updated, it optimized 270 or so apps.

This means one app (since it said "app 1 of 1") had to be recompiled for some reason. I seriously doubt that it's a virus. Some file had been corrupted, and the kernel panicked, because that file was essential. File corruption shouldn't happen, but nothing is flawless, and it does occasionally. If it doesn't happen again, don't worry. But if it does happen again, and more and more frequently, it might indicate that the internal storage in your phone is starting to fail. Eventually all storage devices do fail. If this is the case, you should look into getting a new phone.

Oh, ok. I suppose that could happen with a phone of this age. Also, I think that should be posted as an answer, not a comment.

I added a little to the answer. I don't know if the system automatically notifies you of edits to answers, so I thought I'd better let you know.

As it only optimised one app, and not all, it means that this app had to be recompiled. It is possible that this app had just been updated, and failed to get compiled at installation, but it's more likely that some file(s) needed by the already compiled app had been corrupted. As your phone rebooted, this app was probably a critical system app, the failure of which caused the kernel to panic (strictly speaking, a panic isn't a crash, but an active decision by the kernel to shut operations down immediately).
Data corruption shouldn't occur on a healthy storage device, but nothing is perfect, and it occasionally does. If this doesn't happen again, you needn't worry, but if it does, it may indicate that the internal storage in your phone is starting to fail. This eventually happens to all storage devicees, flash storage as well as magnetic and optical media. Back up your personal data as often as you can, and consider getting a new phone. If it does not only happen again, but does so more and more frequently, you should definitely get a new phone as soon as possible.
Theoretically it could be a virus that corrupted the file(s), but a virus that infects apps in a way that the apps or the kernel can detect, wouldn't be very cleverly designed, so I seriously doubt that this is the case.


text:
Hello, is it possible customize the snackbar in Moto G 2nd Gen?
I am right handed but when I turn the phone, I would like to change the snackbar to the left, is it ONLY to the right?

If by "snackbar" you're talking about this... Isn't it always at the bottom?

Snackbar by default appears at the bottom of the screen.

Developers had to implement it to their snack bar in that way! You cannot do it for a application by using any other application I hope.


text:
Where is the option for sd card?
I want to save my YouTube video in sd card but i am unable to do that there is no option of sd card in offline video.then tell exact solution??

Even if you store Youtube video in internal, You can't use it without youtube app.
Youtube app is not a video pleayer. It is Video Streaming app.
It streams packets and The video is splitted to parts and stored in Youtube data files.
When you open it, it is actually getting Streamed rather than played.
So, if you store it in sd card, youtube won't detect the files and will not play the video at all


text:
Contacts, asking to Block or add to contacts
I recently lost my phone and reloaded WhatsApp on my new phone. Now, every time when I receive a message from a contact, it asks whether it should block or add to contacts. This does not happen when I send messages to my contacts.

Do you have given permission to read contacts, for WhatsApp?

Which Android version of your phone?

If Android Version Marshmallow or above, you have to give permission.

Go to Settings
Apps
Whatsapp
Tap on Permissions
On Contacts permission and check.


text:
Does turning off cellular data override restrict background data?
I have always assumed that turning off cellular data under Android settings/Data Usage meant no data use is possible.
However, I found out there is another setting: restrict background data. If that is turned on, will the phone still use cellular data even when cellular data is off?

I see three questions:
1.) Does cellular data off override restrict background data?
A: No. It's possible to get Background Data through WiFi.
2.) I have always assumed that turning off cellular data under Android settings/Data Usage meant no data use is possible.
A: No. See above answer, and below.
3.) However, I found out there is another setting: restrict background data. If that is turned on, will the phone still use cellular data even when cellular data is off.
A: Yes, it's not impossible. That restricts Background Data only.
But, some Phones 'leak'.
I had everything turned off and set to use WiFi, even went to the "Data Usage" Setting and restricted each APP individually - but the Carrier was billing me for Data Usage.
I phoned to complain and the Call Taker thought I must have done something incorrectly - Supervisor!
The Supervisor said that I had used a few BYTES on a couple of days, and they were adding a Charge for "Under 5MB Usage". I assured her that I had turned everything off and bought the Phone from them. We agreed that no practical Web Page is that short and that I wasn't trying to Surf for free.
They added a Feature to my Account called "Data - 5MB Free" finally admitting that they got so many complaints about this that this is what they came up with.
I suspect that the Manufacturer's UI or the OS was not checking the Settings (a 'leak' / Bug) and since the change to "5MB Free" I'm no longer getting billed for using Data without intending to.
So, yes, technically it is possible to Set something (or read something on the Internet) and to get different results than you had hoped for. It's possible to turn Data off and for a tiny amount to get used, resulting in getting billed for it.
If you don't want to pay Cellular Data Charges (or ask the Carrier to completely disable it) then turn it off and check your Data Usage (on your Phone and Phone Bill). If it's leaking take it to the Store or convince them over the Phone that you have turned everything off on your end.
Ask if the Usage is extremely small, if it is and the Phone is theirs ask for at least 1MB free.

I think I found where the leakage is coming from, or at least how to block it.
I bought my phone unlocked and have not rooted it. If you have a carrier subsidised phone this may not work without their cooperation if they have locked the settings for "Connections -> Mobile Networks -> Access Point Names". I've had this problem on two phones from different manufacturers, so I guess it's a UI and Android problem.
The problem (or solution) is that "Connections -> Mobile Networks -> Access Point Names -> APN Protocol" is set to "IPv4/IPv6" - you need to change that to "IPv4" so that when you have Data turned off the setting is respected. Either it's 'by design' or a Bug that turning off Data isn't blocking IPv6 usage when your phone boots, either way it's a rip off to get a Bill for Data usage when it's turned off.
My Carrier has locked their settings so I couldn't alter them without either taking my phone in and explaining all this again (or scouring the Internet for a way to change the Carrier settings). Fortunately I am able to add a new setting and choose it (I bought my phone outright), if your phone is "Carrier Locked" you might not be able to create a new "Access Point".
While researching this (after discovering how to see the leakage) I found a few tools and webpages that are helpful.
The APP that showed me the Data trickle is NetTech's "Net Analyser".
On their "Information" tab at the bottom it shows the total IPv6 usage since last boot - prior to fixing this problem it said that I was using over 60kB of Data, not much but enough to get billed (prior to getting 5MB Free).
Here's a screenshot, notice at the bottom where it says: "Received Since Boot" and "Sent Since Boot" - previously those values were over 60kB, now they are zero. The leakage is prevented, money saved.

What you need to do:

Go to "Connections -> Mobile Networks -> Access Point Names" and click on your current setting. See the Android Central article: "What is an APN, and how do I change it?" for a longer explanation. You either need to be able to edit the fields or create a new entry for this fix.

Screenshot your current settings so you can keep a record of the original settings in case you make an error when you edit them, or so you can create a duplicate entry to modify.

Either modify the Carrier's original setting for "APN Protocol" or create a new entry in the "Connections -> Mobile Networks -> Access Point Names". If you create a new entry use the screenshots to exactly copy everything identically (spaces, and set to "none" versus "not set" must be identical,).

Change "IPv4/IPv6" to "IPv4".
Save and reboot.
Check Data usage with "Net Analyser" (or APP that shows IPv6 usage). There should no longer be any IPv6 data usage.

Fixed.
While searching for a solution I also found this webpage: "How to DISABLE IPv6 on Android?" but they say the solution is temporarily and needs to be done each boot - that's useless for us because our problem seems to occur during boot, before the UI Settings kick in.
A more helpful webpage appears to be: "IPv6 on Mobile Devices" and especially: "Android: IPv6 Data Leaks" (translated from the original German webpage) which explains how to turn off IPv6, though you'll likely need root to do it:
## Kernel
# Disable IPv6
echo 0 > /proc/sys/net/ipv6/conf/wlan0/accept_ra
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

...will the phone still use cellular data even when cellular data is off?

No
The purpose of this setting (restrict background data) is to minimise cellular data when cellular data is enabled and the app is  running in background. Instead, when connected on WiFi background data is used
See this question for more
How does "Restrict background data" work?
Note that apps which are driven by GCM for notifications are unaffected by this setting as explained here Restrict background data for Facebook, but notifications still coming in
Edit In response to OP requesting for additional citation, see Optimizing Network Data Usage at Android developers  and Google help: Allow or restrict background data usage by app

One would hope you are correct

It is not the question of me being right or wrong- that's the way it's been designed- simply put restrict background data comes into play only when cellular data is enabled - it doesn't enable cellular data on its own. Both supporting answers are from moderators of the site :).

I wonder if there is another reference or source that actually confirms this.

The first link talks about Restrict background data but speaks not of cellular data off. The second link speaks about cellular data, but does not rule out the possibility of background data occurring with explicit mention. I may seem like splitting hairs but I am just not sure about this point.

The underlying fact 1. Restrict background data is applicable only for cellular data and not WiFi 2. Whenever data usage is mentioned, it is al in the context of cellular data. Your Q is basically asking if restrict background data working to enable cellular data - a valid doubt but the premise is wrong since restrict background data only works when cellular data is on and you want to save on data usage. Restriction is possible only when something is enabled- it by itself doesn't enable and then restrict

how do you know this bit: "since restrict background data only works when cellular data is on"

Because it is meant for cellular data (for WiFi you have metered networks a feature in recent Android versions, which also uses rules set up for cellular network ) and just as you can restrict flow of water only if water is present in the pipe. You can verify for yourself if you like using the app mentioned in this answer or wait for someone else to pitch in // contd

.  I doubt there is documentation around this. Not to be impolite, but user documentation explains the purpose but didn't deal with all exclusions/ inclusions

Unless you have in mind something like this http://android.stackexchange.com/q/82837/131553


text:
Can I set a macro to delete media from a particular Whatsapp group or contact?
Is it possible to set up a macro using Macro Droid, Tasker, or any other automation app which will delete all the media received from a particular Whatsapp group or from some specific contacts.
I am running Android 6.0 Marshmallow on a non-rooted Asus Zenfone 2 ZE551ML with stock ROM.

It is not possible
Quoting MacroDroid developer, in future request (dated 21 Feb this year- you can access that from within the app in forum )

WhatsApp has no SDK/API by design, they don't want third party apps interacting with their service.

When the automation app can't interact with WhatsApp, it obviously cannot set up automation tasks
I am not conversant with Tasker, but the limitation should be equally valid for any automation app

Incidentally, I have been trying to automate something similar and didn't succeed, because manipulating media also can't be done. Media in WhatsApp can't be backtracked to the sender, except by time stamp and in a busy group, you will have same time stamps for media sent by different people


text:
Remove "Acuttweather.com" widget on the top of the home page
I have purchased LG K8 phone.Can you tell me how to remove the front screen's "Acuttweather.com" widget on the top of the home page?
Android ver: 6.0

Does this not work ? https://www.verizonwireless.com/support/knowledge-base-205452/

Oh..Thanks a lot.It worked.Can you put that steps as an answer? Then I can close this post :) @beeshyams

Posted as requested - that was the first hit on Google :) you may consider accepting by ticking the green Arrow

Remove Items from Home Screen - LG K8 V

From a Home screen, touch and hold the item (e.g., widget, shortcut, folder, etc.).
Drag the item onto "Remove" trash icon or "Uninstall" trash icon (located at the top) then release


text:
Why can't this application be deactivated after screen is locked?
I recently installed WhatsApp. I thought it would be clever to deactivate it while my screen is locked to save battery: data can update when I have my screen active.
But it looks there is something special about this application that prevent it from being deactivated.

I often get notifications involving WhatsApp in high consumption while my phone is locked
there is a red message Can't refresh when closed on it's side when I go to "Battery > Close apps after screen lock" ... well, that's pretty much what I would like!

Anyone knows what I can do to avoid this? (apart from uninstalling this tyrannic application)? Is there a feature I'm missing and that I should change?

WhatsApp employs a mechanism that ensures messages are always notified (as long as data connectivity is present) , which is well explained here How is WhatsApp able to receive messages when not in use?. That's the reason on your device, the red warning is displayed
You can instead Greenify WhatsApp . For details  see greenify questions like How does hibernating an app work technically? and XDA - Greenify
Edit Protected apps feature may be used. I am not sure if this feature exists in the emui version you have. What is protected apps in Huawei phones?

Thanks, I can't see greenify wiki (it doesn't look like it exists).

Oops. My bad... That tag doesn't have a wiki but questions in it should help

Edited to add XDA link too

Added another possibility - see edit

I was able to install greenify. However, its not simple to configure, and it appears it caused connection losses to my other applications when network was bad. I finally uninstalled it.

I am surprised to hear that, but yes, it's a powerful app and needs to be understood to prevent such instances

My solution was to deactivate unwanted "battery usage notifications" for Whatsapp: it doesn't consume that much after all, compared to other applications.


text:
How to use Microsoft Exchange ActiveSync to sync Hotmail and Outlook contacts to Android?
I have sync issues with Microsoft Exchange ActiveSync, when using its service with my Hotmail account. (I'm using a Samsung Galaxy Note 4 with Android 6.0.1, if that helps)
These are the steps I took to reproduce the issue,

Go to the settings page
Under the Personalization Section I select Accounts
Select Add Account
Select Microsoft Exchange ActiveSync
Entered my Email Address and Password
Select Next
Uncheck all the checkboxes except Sync Contacts.
Select Next
Name the Account and select Done

Now that I had setup the account, I took the following steps to test my contact sync

Create a new contact on the device using the contacts app and selecting the microsoft exchange activesync as the account and fill in a name and contact number.
Save the contact.
Go to outlook's webapp
log into the same microsoft account and create a contact.
Save the contact.

Finally I went to my phone and made sure sync was switched on and looked for the contact I had made using the outlook's webapp. I also looked on outlook's webapp for the contact created on the phone.
The final result:

Sync from Outlook.com to android => WORKING

(The contact I created using the outlook.com web app was visible in both the web app and the phone)

Sync from Android to Outlook => BROKEN

(The contact was only visible on the phone ie: missing from the outlook web app)
How can I fix the BROKEN Android to Outlook sync?
___________________________________________UPDATE___________________________________________

I haven't tried using another android phone, I don't have one lying
around at the moment. I'll give it a shot when I can and let you
know.
I do not sync my contacts with my google account, how is this
possible? I am trying to sync my MS account contacts to my android
phone. I wasn't aware of a connection between the MS account and my
Google account contacts.
I've already tried syncing the emails, no luck. Issue still
persists.

It turns out that Microsoft Does NOT Support 2 way sync between android devices and hotmail or windows live accounts.
I got in touch with the outlook customer service rep for android and they confirmed this.
I hope MS figures this one out sooner rather than later.

Have you tried connecting another Android phone? It would be a nice AB testing to see where's the problem.
The first answer that comes to mind is to check whether your contacts not set to sync with Google contacts. In some cases that prevents everything from working correctly.
Another solution is to enable syncing email alongside with syncing contacts. Some Android phones don't update other data correctly till emails syncing is turned off.
And the last option is switching to the software called Akruto to check if that could fix everything. You can find all instructions and video guide on the official website: http://www.akruto.com/best-ways-to-sync-android-with-microsoft-outlook/
Hope this helps!

Unfortunately that application will not provide me with a constant 2 way sync between my phone and MS......

Found the issue. Please see my answer.

So after a few weeks of trying to figure out the root cause of the issue, it turns out that Microsoft Exchange Active Sync only supports One Way sync for your windows live accounts to your Android devices.
This was confirmed by MS Customer Service once I installed the Outlook App for Android and had a chat about Sync Issues.
Apparently MS is working on fixing the Sync Issues and providing us with true two way Sync, but as of 29th of April 2017, this has not yet happened.


text:
Is there any other way to install firmware than recovery mode or flash tool?
I'm trying to re-install my phone stock firmware. (I'm experiencing bugs, I already factory reset 5 times but the bugs are still there)
Phone's chipset is spreadtrum (sc8830)
I already loaded the packet file succesfully as seen in this screenshot.
The problem is.... I can't put my phone into download mode (bug), now the tool can't detect it.
I as well already tried all of this option but still nothing.
Another bug is I can't put it into recovery mode. I tried using apps like link2sd to put it into recovery mode but it only goes to blank screen (tried that many times)
Is there any other way to install firmware than what I stated above?

here's the link for the phone's details.

The loaded PAC file seems different from your device Chipset: it's says SC7731, yours is SC8830.

Spreadtrum devices don't have recoveries, nor don't they have a ''download mode". Their bootloader is accessed with a "boot key" (usually hardware buttons) through SCI USB2Serial port.
To get the phone detected, just simply switch it off. Hold volume down button (or volume up) and plug the device to the computer. Windows should install drivers (Download and install SCI drivers).
Open the flash tool (ResearchDownload), load the PAC file, click on run. Power off the device, hold volume up/ down, connect USB cable. Et voilà.

You need to know these basic things first.

Factory Reset doesn't fix bugs
Your phone is not having recovery installed.
Your phone recovery and download option is installed in hardware it is nothing to do with your firmware.

Download the application called as Power Menu and then try going into download mode.
If you are having a rooted Android phone then you can flash stock firmware with the help of FlashFire
There is a detail instructions given about the way to use FlashFire on your Android phone.


text:
How to limit an Android app to thousands of specific devices
I want to install a single-purpose app on a thousand of devices of the same model.
The need :

The app shall not be public therefore accessible to anyone
The app shall be installed on my 1.000 devices. Note that the devices are the same model (let's say nexus 10) but I do not want to grant access to all nexus 10 around the world
It shall be as easy as possible. I can imagine for example logging in these 1000 device with a single account and then limiting ditribution to that account, but it's quite long and might as well not be possible (limitation to the number of devices an account can have)
The app shall be updatable on all devices simultaneously
The number of devices might grow to 2.000 or even OVER 9.000

Can't you put the app on the app store but the first screen is a login were you only distribute the password to those whom you allow. You could also have a mechanism were at login people request access and you then can great them access from the admin side.

It's a good idea and I actually did it but that won't do because I would have to manually log in in each and every devices and People can still download it and rate my app 0 star with a legit "wtf is this" therefore killing my brand.

First of all nobody will download an app that is reserved if you make it clear in it's description. There are millions of useless apps but I don't download them and don't care. As for logging, you could have a database to do it automatically. There is no need for anything manual.

Another solution is to host the app SDK on you website instead of the play store. People with the link can download it. (You have to enable Trust unknown sources in security settings)


text:
Bypass T-Mobile Hotspot Tethering Limit by using the phone's unlimited plan?
I have the 10gb hotspot plan for tmobile but I also have unlimited data when I'm on my phone. Is there a way to bypass the hotspot limit by using the unlimited data from my phone instead? I have the nexus 6 on android version 6.

You could make your phone to act as a VPN Gateway
Requirements:

root
vpn server (can obtain any free openVPN from playstore)

Using a VPN gateway will make tethered traffic to go through the VPN.
Steps

Turn on portable hotspot
Open terminal as root and enter the following codes (you can paste them)
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43.0/24 dev wlan0 scope link table 61
ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61

Edit
If you are not rooted you can use PdaNet+.

Does this violate T-Mobile's Terms of Service? Does it literally say that you cannot use the phone to provide more than 10GB of hotspot service or does it just say that you can't do more than 10GB of tethering with their app?

i get device cannot find tun0 --- i'm on android 7.0 --- i also tried just tun and it gets the samething. what can you replace tun0 be replaced with?

@duckx Instead of tun0 try ppp0 , also double check if all the VPN configurations are correct. Additionally if this fails  run netcfg and note your interface names Run netcfg and note your interface names (typically tun0 and wlan0 or ppp0 (ignore m.wlan0 or similar, only take the one with a real mac address)

I made an app for these two different solutions (but requires root). You could try it: https://github.com/Mygod/VPNHotspot

@Mygod, thanks for the update I will also take a look at the app you mention

To make this work, I had to add the following VPN forward route: 0.0.0.0/0 in my L2TP client on the phone, and from terminal, I only typed this much:
su
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev ppp0 scope link table 61

And it immediately came on line. During the terminal session, I had the PC connected to the phone tethering Hotspot all the time, and for each line typed, I checked the tunnel.
As far as I understand, what these commands actually do, is to set up a NAT routing on the phone - correct?


text:
How can I allow USB debugging to an specific computer?
First of all, forgive my english please. I hope somebody can undestand this.
I have a broken touchscreen, so I'm controlling the device with a mouse via microUSB. Now I've tried different mirror clients (Airdroid, Mobizen and ApowerMirror) and they work just until I try to control the smartphone, then all of them asks to allow the computer USB debugging, the problem is that, I can't allow from the smartphone with the mouse because I have to connect the USB cable.
The screen that ask to allow debugging shows some digits with a message like "The digital print of your RSA password is:"
Sony Xperia Z1 Compact, Macbook Pro


text:
Prevent Google Music (but not other players!) from scanning local files
I'm wondering if there exist other options rather than adding  the '.nomedia' file - this way I'm hiding the mp3s for all the players I have. But I want just Google Music not to see them, not other ones.
BTW, placing a dot in the beginning of the folder name hides the files in all the players as well.

You can't... Apps that are following the Android guidelines do not scan the media themselves, but use the common android.provider.MediaStore sqlite database of the operating system, meaning all media players following the Android guidelines will use the same database. https://developer.android.com/reference/android/provider/MediaStore.html

Well, if you are on android 6 and above, you can just revoke "Storage Permission" of the application.

As the questioner probably doesn't know how to do that, it might be useful to explain how.

But Google Play Music cannot work without such a permission - it needs to cache the music on the device... It's a pity I cannot deny the permission to the SD card solely.


text:
Tried many ways to root my Telenor Infinity E
I have been trying to root my phone for two weeks using various exploits but till now all in vain. The devices isn't international so its not famous and I couldn't find any recovery, custom root or rooting method for it on the internat, although I found stock ROM which saved my phone several times when I soft bricked it.
My Device:
Model: Telenor Infinity E
Build: TELENOR_INFINITY-E_L100
AOS: version 6 Marshmallow
RAM: 1 GB
Chipset: MediaTek MT6735M
Kernel: 3.18.19 Aug 22, 2016
Android Security Patch level: July 5, 2016
Stock recovery: Having no menu

Bootloader: Unlocked
Methods Tried:

Tried famous desktop applications: OneClickRoot, KingRoot, KingoRoot, RootGenius, iRoot etc. (All failed)
Tried flashing TWRP of similar device using SP Flash tool. (Result: Boot Loop)
Tried porting TWRP recovery using stock recovery and Android Kitchen. (Result: Auto reverted back or Soft Bricked)
Tried injecting su, supersu in system.img using android kitchen and flashed. (Result: Soft Bricked)
Tried Many Repack tools like simg2img/make_ext4 binaries, similar tools/guides to repack system.img. (Result: Soft Bricked)
Modified ro.secure=0 and ro.adb.secure=0 in default.prop and re-flashed boot.img (success, but no root)
Used dirtycow exploit scripts got root shell but still no permissions to modify /system.
Patched adbd in boot.img using adb insecure app's assets and got 'adb root' access. (still can't modify /system or remount in rw)
Found SELinux's getenforce=1 and neither could disable it by command setenfore=0 or echo 0 > /sys/fs/selinux/enforce nor found any method except making a custom build of kernel (which is not feasible for me).

Can someone help me to Root this device or tell me if there is anything else I can try?


text:
Rooting Samsung Galaxy A3 2016 (SM-A310F)
How can I root the Samsung Galaxy A3 2016 (SM-A310F)?
Andoid version is Marshmallow (6.0.1) and my computer runs on Windows 7.

ROOTING YOUR PHONE WILL PROBABLY VOID YOUR WARRANTY FROM BOTH THE CARRIER AND THE MANUFACTURER. IF YOU DO NOT WISH TO ACCEPT FAULT FOR ANY ADVERSE EFFECTS OF ROOTING, THEN DO NOT READ ANY FURTHER.
Downloads and installs

Samsung USB Drivers.
Odin.
Root File.
Install Samsung drivers and unzip Odin and Root File.

Phone Setting

Turn on developer mode:

Settings > About device > Sofware info > Build number.
Tap build number 7 times.

Enable USB debugging:

Settings > Developer options > USB debugging.
Turn on.

Enable OEM (very important!):

Settings >  Developer options > OEM unlock.
Allow the device to be OEM unlocked.
  This has to be turned on for ever from now! Reports said without this options phones have turned into bricks.

Rooting

Turn your phone off, then turn it on in download mode.

Press and hold together Volume Down, Home and Power.

Connect the phone to the computer.
Start Odin and select AP, then browse to the Root File.
Press Start and the rooting will process.

Note that for Galaxy A3 2017 (SM-A320F) with Android 8 these instructions are not sufficient! Namely, in addition to OEM unlocking, you must disable RMM to prevent bricking your device after flashing custom binaries. See this page for details.


text:
How to stop power intake when completely charged?
Is it possible a process should run in the background of Android OS,
 and the only task of that process is to stop the power intake to the device when the battery is completely charged?

When the battery is charged, modern  phones don't draw any power. If the charger is plugged in and the battery drains, charging starts again. What is it that you are trying to do? Maybe I am wrong,  but it appears you are not sharing the context of your question

Have you tried Battery Charge Limit 0.1? I haven't really tried it myself due to incompatibility with my android version.
It requires root and android versions 4.4+
you can find it here: Battery Charge Limit 0.1 4.4+

I am not suggesting you to install such an app.
Because almost all phones have the feature by default.
You can see it by connecting to a power bank.
Charge your phone by connecting it to a power bank and after getting completely charged, let it be there without disconnecting. After some time, if the power bank stop producing current(turned off), it means Your phone has the feature of automatically disabling power intake.


text:
Does Downgrading from Android Marshmallow to Lollipop wipes data?
After an OTA upgrade to Marshmallow, Android Locksceen is no longer accepting my 4 digit PIN, I have been using this PIN for the past 7 months without any problems. So, I know for sure that I haven't forgotten the PIN. Nobody else has accessed my device & changed the pin.
I had 2 other backups of my Data, one on a SD Card in my Canon EEOS 700D DSLR(I am a Professional Photographer) & second one on My Laptop, both of them were stolen from the hotel I was staying at. My phones Internal Storage is now the only other place that has my work. I don't care about recovering music, videos, contacts, messages. I am only interested in recovering my clients pictures (Wedding Photographs). I just can't afford to lose this, please do not suggest Factory Reset. If it wasn't that important to me, I would have done Factory Reset.
Device Information
Samsung Galaxy SM-J700F
Android 6.0.1/MMB29K/J700FXXU2BPG3
Security Patch Level - 2016-07-01
No Root
No USB Debugging
No Custom Recovery
Boot Loader Locked
No Full Disk Encryption, Only Lockscreen
Samsung Find My Mobile Not Registered (Even if it was, it wouldn't work without WiFi or Mobile Data turned on)
Can't turn on WiFi or Mobile Data from Lock Screen, so Google Android Device Manager also not working.
Can only access Emergancy Dialer & Camera from Lockscreen
Since the problem appeared right after the OTA upgrade to Marshmallow, would downgrading back to the previous version using ODIN Flash Tool fix the problem? Now, with a locked bootloader, you can't flash anything other than official Firmware signed by Samsung, so, if I download Official Samsung ROM Android 5.1.1 Version from www.sammobile.com , and flashed it using Samsung ODIN Flash tool, would it wipe all the data in internal storage? or would it stay intact? Help Please!

The problem is not just whether it will wipe your data.

Many phones have a mechanism that prevents a downgrade in bootloader version, which you're attempting to trigger.
Older version of an app might not recognize the data created by the newer version of the same app. Although user apps are rarely affected, crucial system apps might be, and on error might constantly throw "*** has stopped" dialogs that effectively prevents you from using the phone.

So no, just don't think about downgrading as a means of restoring data. Instead, focus on dealing or working around the PIN, which you could check out the locked-out tag for a head start.