text:
How to perform double tap to zoom on android device with adb shell
I want to perform a double tap on the screen or mouse with adb shell. Is this possible? I'm not interested in waking or turning off the screen, but to increase the zoom on a picture.

@Firelord I want to double tap to zoom in / zoom out in pictures or websites, not related to waking the device.

Have you tried the keyevent 168? It seems to work here. 169 for zoom out.

Thanks to @Firelord for pointing out the solution. These are several keyevents that work on a Samsung Galaxy S7. You cand send either the code or the name of the event:
Turn on/off the screen (clicking the power button):
adb shell input keyevent 26
 adb shell input keyevent KEYCODE_POWER
Zoom in a little bit:
adb shell input keyevent 168
 adb shell input keyevent KEYCODE_ZOOM_IN
Zoom out a little bit:
adb shell input keyevent 169
 adb shell input keyevent KEYCODE_ZOOM_OUT
See all the official KeyEvents on Google Developer's page:
Android KeyEvent
Another option, much more powerful and sophisticated, is to use minitouch, which is a minimal multitouch event producer for Android.


text:
How to get adb logcat to filter ONLY by specific app (package name)
Would like to know how can I get the adb logcat of ONLY certain app, and all its errors and messages associated.
I've tried before with adb logcat -c; adb logcat | grep com.fitbit.FitbitMobile, but the thing is, it forces a grep on EVERY line, and sometimes there's a crash that involves multiline where needed information gets omitted.
I've tried the command on page Displaying and filtering with Logcat, however doesn't work. It just gets everything:
adb logcat -c && adb logcat com.fitbit.FitbitMobile:V

I've tried also the filtering option on Android Developers Documentation, but just mutes everything:
adb logcat com.fitbit.FitbitMobile:D *:S

Others commands that get the pid are not useful if the app is not running when I run logcat, and crashes immediately and is relaunched with a different pid.
Any ideas about the proper format?

There is no official but many third party solutions. I found pidcat quite good. You may give it a try.

@IrfanLatif thanks a lot, that worked somehow!

@IrfanLatif that looks like a good alternative answer, would you post that as a proper answer?

I think the answer at Filter LogCat to get only the messages from My Application in Android? is ideal.

@Bink that doesn't work, because debug info can be in multiple lines, only the header will have your.package.name.

@Smeterlink Hi! Regarding your reply to Irfan Latif, have you tried it and found it's sufficient for you? If yes, feel free to post it as an answer with some details about how you used it :)

I found a simple solution without requiring a third party app.
Just connect to the device using shell: adb shell
Then run: logcat | grep your.package.name
It will only show lines that contain that package name.

This does not work, because some information is in multiple lines and only the header includes your.package.name.

source: Stack Exchange

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

sort: votes


text:
Decrypt Samsung S3 Phone
I have recently encrypted my S3 to allow me to get work emails, but I have now decided against this as it has caused the phone to run like a dog. When I attempt to decrypt the device it says I need to set a password of 6 characters with at least one number, however when I go to the lock screen settings menu password is not an option. I have deleted the email account and I am not sure what to try next. Can someone point me in the right direction please?

Have you disabled any device admin the email was asking for?

Here is a last ditch solution if you get nothing better:
If you know how to use John The Ripper then all you have to do is pull all of the files off of your hard drive, and use JTR to crack the password (depending on the length of the key, this could take days or even weeks). Then you can make an image file of your hard drive and flash your device using a flashing tool.
Besides that, I'm sure there is no way to disable the encryption without the key. Really your only option at that point is to get any files off of it that it will allow you to, and then do a factory reset.

As far as I know, reverting the android encryption is impossible, you will have to backup your information and perform a factory reset.

It is possible to decrypt an android.  I am doing it right now.  I had to turn off the maas360 device admin using the app itself: you can't do it from the device admin screen.  Once I did that, I had the decrypt option.  The decrypt worked fine for the phone, and I am doing the sd card now.  I still only have the password option for the lock screen, but hoping this sd card decrypt gives opens the other options.  I have a Verizon G S4 running 4.4.1.

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


text:
How to make Fairphone built-in file manager remember the "move to" location?
Is there any way to make the built-in/factory-installed file manager on a Fairphone 3 remember the last target location I chose when I marked one or multiple files with a longer finger press and chose "move to"?
I guess it's called "move to", my Android is not in English.
I'm using Android 13.

Just in case, are you open to an alternative/3rd-party file manager app?

I guess I'd accept a good tip for another file manager as answer :)

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


text:
establishing USB connection takes > 3 minutes and times out, charging works
Some time ago I've been able to connect my "Smart"phone to my Ubuntu 14.04 PC as mass storage device with an micro USB cable hitting the ~"Activate USB storage" (translated) button in the notifiaction pull-down panel which appeared after the cable has been plugged in. Now, establishing an USB connection is tried for > 3 minutes and then times out; the animated waiting icon (spinning circle in which the button to activate the USB storage is transformed to) changes back to the button to activate the storage. Some infos:

occurs 100 % of the tries
restart doesn't help
cable seems fine because charging works
Android 4.0.4 on SansuiCosmic SP 1001 trying to connect to Ubuntu 14.04 with Linux 3.15.9 without problems with USB experienced so far.

I've never seen an "establish connection" button, could you get a screenshot of this? What mode are you trying to connect in? ADB/MTP/PTP/Mass device?

"cable seems fine because charging works": disagreed on the reasoning. USB plugs have at least 4 (some have 5) pins in use. 2 are for power, the other two for data. So if one of the data connections got broken, it would still charge fine. // Have you tried a different cable?

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


text:
How do I disable an app from running at startup
I have a genymotion virtual device which has an app which runs at startup which make the device crash giving me no access to the device.
How do I disable the app from my computer. (I am using virtual device)?

There are many options available. Some applications I know:

Comoro mobile security
Autostarts
ES Task Manager
BootManager (a module works within XPosed framework)

Autostarts also let you stop waking applications which listen on events I.e. when device gets connected to internet or a call is answered.

I cant access my device in the first place forget install an app in it


text:
"Unfortunately, Email has stopped" on Samsung phone when adding SPAM to filter
I have been tracking this issue for a while and noone seems to have a good solution.
examples:
http://forums.androidcentral.com/ask-question/409389-unfortunately-email-has-stopped.html
http://forums.androidcentral.com/ask-question/401360-email-spam-limit.html
The error is: "Unfortunately, Email has stopped"
The cause seems to be that Samsung's default/stock email app has a 200 item limit for it's SPAM filter.
This error affects Galaxy Note 2 and Note 3, and Galaxy S4 (probably more)

I am looking for a way to make this limit bigger.


text:
How to make cellular phone call from Xperia Z LTE?
How to make phone call over 4G or GSM using Xperia Z LTE (SGP321) tablet with SIM?  Messages elsewhere say you can't. If not exactly why not?

With stock Sony ROM you can't do phone calls on the Xperia Z, Z1 and Z2 tablets. Might work if you install an own ROM but I'm not sure.
The new Sony Xperia Z3 Tablet Compact ( http://www.sonymobile.com/global-en/products/tablets/xperia-z3-tablet-compact/ ) can make phone calls, even if you better get a bluetooth headset to make it useable.

Problem is: The baseband firmware may lack phone call support and most importantly the radio chips may have unwired connections that are crucial for the phone call function to work.


text:
How to send same text message to multiple people but they would only see their name as recipient?
I have a Moto X with KitKat.
I am trying to send the same text message to multiple people.

I do not want the recipients to see the numbers of other recipients.
I do not want the recipients' replies to go to multiple people.
I do not want the recipients to see who all the recipients are.
If the recipient reply's to my text message than that message should only go to me.

Just like adding people under BCC in the email.
Any help?

Isn't this exactly how SMS behaves? In a group SMS conversation, group messages are sent as individual messages to individual recipients.

That's how SMS usually works. When you send a text to a group of people, only they should be able to that they got it. They won't be able to see who else got the text.. unless you were sending SMS through Google Hangouts.


text:
Disable the screenlock on Samsung Galaxy Tab with forgotten password?
I was given a Samsung Galaxy Tab last year for my birthday and I put a password on it but now when I try to get back into it I can't as I have forgotten the password.
I was just wondering if there is a way to disable the screenlock without deleting the files on the tablet.

Try Hard Reset.
To Hard Reset please follow the below steps.

With the device off, press and hold Volume Up, Power and Home button.
Release the Power button when you see the Samsung logo, but continue to hold Volume Up until the recovery screen appears.
Use the Volume buttons to navigate the menu and select wipe data / factory reset. Press Power to choose the selection.
Press Volume Up continue.

Note: These steps clear data from the device. SD card data like your photos and music are not erased unless you choose to format the SD card. You may have to lose some files, but some of them may be able to be recovered.

The question states "I was just wondering if there is a way to diable the screenlock without deleting the files on the tablet."

try multi tools http://forum.gsmhosting.com/vbb/f606/utility-android-multi-tools_1-0-reset-user-lock-gmail-wipe-data-azimbahar-1620378/

The link you posted leads to a method that works on FastBoot. Samsung devices (excluding the Galaxy Nexus) don't have FastBoot.

1 - 6 command do not require fastboot mode.

I guess you're right, I must have overlooked it. (I need sleep.)

Can't shut it off without entering the pin in my case...

If you had its bootloader unlocked before, the following steps are simple to follow.
1. (Skip if done) Flash a custom recovery
2. Reboot into that custom recovery, connect the Tab to a PC (with adb installed on it), open a command prompt and run these commands (bold text is typed manually)

ibug@ubuntu:~ $ adb shell
shell@android:/ $ su
root@android:/ # cd /data/system
root@android:/ # rm -f password.key gesture.key lock*
root@android:/ # reboot

and you'll see your Tab automatically reboots to the normal system, with lockscreen gone.

If you logged in with your Google account, you should be able to see a 'forgot password' option after you have entered the wrong password 5 times. Your Google password will let you reset it.
Though only Medium-Low security passcodes can let you do that. If you do a High secuity passcode it will just enlongate the time to wait until you can try combinations again.


text:
How to start Samsung SM-T210 via pc , without wi-fi but with ethernet?
My home ethernet , is wired only !  How i can start and connect my tablet , through my pc ?

Some Android devices with USB-on-the-go (or USB host mode) support can use a USB ethernet adapter, when connected through a USB-on-the-go connector. If your device supports this, you can buy a USB ethernet adapter and connect it to your network that way.
If your device doesn't support that, you can use reverse-tethering to connect your device through USB to your PC's network connection (the PC acts like a router). See the existing questions with this tag to learn more about that.


text:
How can I remotely wipe a stolen phone?
My phone have been stolen and I have many pictures on it, and secret things! How can I trash every thing on it through a Whatsapp message? I have not tired anything yet.

if you have android device manager then login to android device manager through your PC, the rest you can control it from there :-)

authors: Владимир Борисов


text:
Activating swap at boot with an init.d script?
I have a rom that supports swap, but the swap script is missing.
How would i make that swap script manually?
I.E: What code would be in the file /etc/init.d/07swapon?

How about this?
Open a console, navigate to the android SDK tools folder.
Type "adb mount /system", without the quotes doh!
Type "adb shell".
At the shell copy paste the following commands one by one and press enter after pasting them.
echo "#!/system/bin/sh" > /system/etc/init.d/05userinit
echo "swapon -a" >> /system/etc/init.d/05userinit
echo "/dev/block/mmcblk0p3 swap swap" >> /system/etc/fstab
chmod +x /system/etc/init.d/05userinit
chmod g-w /system/etc/init.d/05userinit
chmod o-w /system/etc/init.d/05userinit
chmod g-w /system/etc/fstab
chmod o-w /system/etc/fstab
exit

Now you are back at the normal command prompt, type "adb reboot".
Device will reboot, when its done open a terminal and type "free".
It should show swap space allocated.

And with some programs in memory you can see swap being used:

adb shell
free
total used free shared buffers
Mem: 407860 399940 7920 0 872
Swap: 249596 16596 233000
Total: 657456 416536 240920

Information from here

hello, i've added a custom file in init.d and it cannot seem to be executed at boot

@Joe Your rom/kernel has to support init.d scripts. Does it?

@TheAndroNerd yeah it does. but the rom, doesn't fix permissions of the scripts, so the built-in scripts in the init.d folder isn't being executed. tried "chmod +x" to everyone of them and it worked. :)


text:
Passwords containing "!" are always wrong
I have a Samsung Galaxy S3 with untouched Android 4.1.2 and problems with logging into accounts on any website, in any browser, as long as the password contains an exclamation mark ("!").
I use the default Samsung keyboard for typing in the password. The language of the keyboard is set to German. The Android interface language is set to English. I use the exclamation mark which is seen on the first of three special character pages.
I tried this in the Chrome browser app and in the default "Internet" browser which comes preinstalled. If I change that exclamation mark in the accounts password to something else, I can login flawlessy on my smartphone.
Is this a codepage error? Do I have to set up some special localization or is it just a bug?

What if you copy-paste an exclamation mark from any website instead of typing it on the Samsung default keyboard? Do you have any means to record what's being sent (e.g., maybe a space gets inserted after an exclamation mark automatically, etc.). Or use Google's native keyboard app (or here)

I agree with ce4 an inserted space being the most likely cause. It's for sure no codepage thing, as the character is part of US7ASCII, which is contained in all encodings in the same place. So you could either try different keyboards, or simply avoid exclamation marks in passwords :)

Have you checked which char is sent to the server instead of the exclamation mark? Enter "!" at http://www.base64encode.org/ and look at the base64 encoded result. If it is correct "IQ==" should be the result.

@Robert: It is IQ==, so no errors here.

@ce4: Wow, thank you! You were right! A space is inserted mostly unnoticably. Wow... I think they have to overthink their auto-complete stuffs in password boxes. If you write this as an answer, I will check it.

In the comments, ce4 pointed out what was going wrong.
A space gets inserted automatically after each exclamation mark (and probably other sentence limiting characters like full stop, half stop or question mark too), resulting in an invalid password with a space char too much.
Whenever I enter an exclamation mark, I also enter the following character, use backspace twice and then enter the following character again. Seems to be the simplest solution yet.
Samsung should consider turning off these weird auto-complete stuffs in password boxes!

I have also encountered this "bug" but with a $ character. Whenever I typed $ it automatically inserted spaces before and after the $ character. My solution was to turn off "automatic spacing" on the Samsung keyboard settings and this worked for me ever since.


text:
ADB shell-ing to wifi connected device when usb device present
I have two devices connected to my workstation simultaneously, one by usb, the other over wifi.
C:\>adb devices
List of devices attached
Cxxxxxxxxxx2            device
192.168.60.69:5555      device

I'm not sure how to shell into the wifi connected device while the usb one is present.
I've tried the following
C:\>adb shell
error: more than one device and emulator

C:\>adb -s 192.168.60.69 shell
error: device not found

C:\>adb -s 0xxxxxxxxxxxxxx1 shell
error: device not found

where 0xxxxxxxxxxxxxx1 is hardware id of wifi connected device
Only way that works is to disconnect the usb connected device. However, I'm going to eventually have multiple wifi connected devices, I still don't know how to distinguish between them when trying to shell in?
Edit (6/13/2014)
I see why I was omitting the port, b/c the connect command returns the following error when trying to connect and cannot (say for instance the devices wifi was accidentally turned off)
C:\>adb connect 192.168.60.69:5555
unable to connect to 192.168.60.69:5555:5555

This made me think that adb would append port based on ip. However this is not the case, since after wifi was enabled on the target device, the above command did work
C:\>adb connect 192.168.60.69:5555
connected to 192.168.60.69:5555

I needed to mention something to show that I atleast know tcp/ip connect fundamentals (ip and port). Kinda embarrassing...

You need to include the port number.
adb -s 192.168.60.69:5555 shell

If you're using a sensible shell with configurable tab-completion (i.e. not Windows), then you can type adb -sTab to get a list of devices.

When multiple device are connected with adb
specify device with -s before command to get result.
Suppose you have three device connected with adb and device id is x,y,z.
Now you want to know IP address for device y, then scenario will be
adb -s y shell netcfg

(-s is used to specify device for adb command)
note: always mention port number after IP address to specify a device connected through Wi-Fi.


text:
Rooted Kindle Fire - Mounting Filesystem from Ubuntu
I have a first gen Kindle Fire that has been flashed with Android 4.0.4 (hashcode's of course).
The device was rooted using my thoshiba NB305 netbook running ubuntu 10.04 (Lucid).
While the original OS was still installed, I could mount the kindle's filesystem over a usb connection using
 mount -t ext3 /dev/sdc /mnt/kfire

Now I'm trying perform another rooting operation from the same laptop, to upgrade android to 4.2.2, and cannot get the kindle's file system mounted with this command.
I checked dmesg and the devices is still being detected as SCSI device on /dev/sdc
 sd 11:0:0:0: [sdc] Attached SCSI removable disk

however, a
 ls -l /dev/disk/by-id/

reveals that
 usb-Am_File-CD_Gadget_0123456789ABCDEF-0:0 -> ../../sdc

The thing is, mount isn't even detecting that a device is present at /dev/sdc,
I simply get the error
 mount: no medium found on /dev/sdc

I'm not sure how to mount a usb-Am_File-CD_Gadget, or why I'm not at lest getting a "wrong filesystem type" error from mount.
Also, the kindle is not showing up when running
 adb devices

and so figured I needed to mount it in order for adb to be able to see it. However, I just tried my LS970, and its showing up in adb devices, but also cannot be mounted with the above command (or mtpfs -o allow_other /mnt/kfire).
So, I'm looking to get the kindle discovered and communicating with adb first and foremost (I thought mounting was required for this, but apparently isn't).

I found this article to be potentially helpful, but still need to give it a through reading:
https://developer.ridgerun.com/wiki/index.php/How_to_use_USB_CDC_ACM_and_MS_composite_Linux_gadget_driver
Any help is much appreciated, Thank you.

Turns out it was the micro-usb cable I was using to connect the kindle to my laptop.
Once I found my uber quality ASUS cable, progress began...
Now the OS atleast properly detecting the device, and loading it as a mass USB storage device.
dmesg:
[ 5516.756143] usb 1-1: new high speed USB device using ehci_hcd and address 125
[ 5516.824377] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 5517.216091] usb 2-1: new full speed USB device using uhci_hcd and address 21
[ 5517.355193] usb 2-1: not running at top speed; connect to a high speed hub
[ 5517.383505] usb 2-1: configuration #1 chosen from 1 choice
[ 5517.405589] scsi4 : SCSI emulation for USB Mass Storage devices
[ 5517.411906] usb-storage: device found at 21
[ 5517.411919] usb-storage: waiting for device to settle before scanning
[ 5522.409318] usb-storage: device scan complete
[ 5522.412282] scsi 4:0:0:0: Direct-Access     Am       File-CD Gadget   0000 PQ: 0 ANSI: 2
[ 5522.415038] sd 4:0:0:0: Attached scsi generic sg2 type 0
[ 5522.433234] sd 4:0:0:0: [sdc] Attached SCSI removable disk

However, adb devices now gave:
List of devices attached
????????????    no permissions

to get ADB to properly list the device, and be able to connect to it, please see this solution on SO:
https://stackoverflow.com/questions/5510284/adb-devices-command-not-working


text:
Home Screen and Recent Apps buttons don't work
I am using Moto G3 TE. I was happy with the 5th version but because the frequent alert for 6th version was killing me, I gave up and updated to Marshmallow. It's been like 8 days and now my mobile is showing issues which I listed below:

Home Screen and Recent Apps buttons are not working. Though they show effect on touch but nothing happening.
I am unable to see Quick Settings through swiping from up to down
Pattern lock is not visible, when I press the lock button on side. My phone can be easily access by anyone now.
Moto's special feature of showing notifications on screen when I touch the phone, isn't working.

I am assuming the problem might be because of the upgrade to Marshmallow.
Other possible problems could be (considering today's activities):

Trying to upload around 2GB of data to Google drive. (When I tried this, unknowingly whole drives' data was downloaded to my phone until there was no space and then  the "DU battery saver" app crashed, this is the first issue I observed)
Giving some security permissions to "CM Security" app.
Inserted micro USB pen drive and moved some files from internal storage to pendrive through inbuilt explorer.

What I tried (in sequence):

Uninstalled "DU battery saver" app.
Uninstalled "CM security" app.
Installed "Clean master" app.
Reinstalled "CM security" app.
I restarted my phone several times but no use.
I take off the screen glass from the screen, still no use. (unfortunately, the screen glass broken)
Tried to reset factory settings but it seems the "reset" button is disabled.
It seems I even can't able to do "Hard reset" which I tried by holding the lock and volume up button. The phone just gets restart. It is not that I want to do this but I just thought to give it a try.

PS: My phone is six months old.
Please help.

Facing exact same issue  with Motorola X-Play

@NileshMendhe Run it in safe mode. Press the power button till you see "Power off" on screen. Then press and hold the "power off" button visible on screen. You will be prompted to restart your mobile in safe mode. Run it in safe mode. According to experts, it happens because of stupid third party applications. When you run on safe mode, run each third party app and check which was causing the problem and uninstall that app.

It only showed me "Zen UI Launcher " other than standard apps in color code.  Uninstalled it !
Still not working .

@NileshMendhe Here is the direct link which explains the same. Actually, I had asked the same question on motorola forums. Here is the link. The service guy asked me for IMEI number but due to my own suspicion, I didn't provide it. You will understand how I fixed the issue if you read that post (Don't try that!!).

Please see this new article 2017/02/10 10 most useless apps and games for Android. Most prominent, but specifically named in the list: Clean Master (along with quote-Booster apps, Anti-Virus apps, and Task Killers-unquote)

I was facing a similar error with the Nexus 5. Safe mode and wiping the cache partition were not working for me. People also complaining about not be able to use the adb commands because the phone does not connect.
One option I read about was doing a factory reset. This is probably not the preferred option so I found another one. This worked for me although it seems a little unconventional.

Download/install/open Nova Launcher
Long press on screen
Click on widgets
Create a nova activity
Scroll till you find setup wizard
Look for setup wizard test activity
Click on the icon you just created
Run through setup

I also read that it is caused by almost full storage. Unlike in the description I did not get a message telling that the storage is full and the phone is going into a mode optimized for low available storage. After, the phone rebooted (I also can't confirm that the phone rebooted).
Source: http://forums.androidcentral.com/android-6-0-marshmallow/600742-nexus-5-marshmallow-home-button-not-working-many-more-problems-3.html#post5344015
Nova Launcher: https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher

The Setup Wizard kept on hanging on a 'Just a sec' screen with intermittent crash messages.
Setup wizard will crash if you disconnect the device from internet (wifi/data). If it is not crashing, remove sim cards and reboot the device. Setup wizard will start again. skip wifi settings. setup wizard will crash. try again and again (crashed 2 times for me). Setup wizard will be completed successfully.
http://disq.us/p/1czhzx1

I had run out of storage and this error came up, same as the question described. Phone was in the same state even after clearing the storage and many reboots.  I followed answer steps and phone is back to normal. Thank you.

This worked great for me. Incase it helps future readers I had to set Nova Launcher as default launcher in Settings -> Home, then reboot the phone. Step 4 for me was called just "Activities", not "Nova activities"; there was a "Nova Action" which I tried first but was Nova specific. After choosing the language in the wizard my phone rebooted. The setup wizard asked me to add a Google account, whether to restore from another device, etc. I just skipped those steps and it correctly used the account that was originally configured on the phone, so I didn't lose any data or configuration.

Perhaps a simpler solution is using Action Launcher to launch the activity. I had no luck with either of them (got a permission denied toast) but the device was rooted, so I downloaded terminal emulator and did: su and then am start -n com.google.android.setupwizard/.SetupWizardTestActivity, and obviously I granted SU permissions to Terminal. Hope it helps someone. What a stupid bug.

AFAIK, there are 3 solutions for this issue (try it in below order): (2 & 3 need adb drivers or terminal app)

Switch to guest and come back

Settings->Users->Guest (or)
Swipe down the notification bar and click on profile icon on the left
  top

Start the initial setup and complete it or skip it

adb shell am start -n
  com.google.android.setupwizard/.SetupWizardActivity
--or if above doesn't work: --
adb shell am start -n
  com.google.android.setupwizard/.SetupWizardTestActivity

Give below command to mark that setup is done

adb shell
$ settings --user 0 put secure user_setup_complete 1

Running "su" (you need root) and then "settings --user 0 put secure user_setup_complete 1" did the trick for me (mostly. I still can't open recents, but at least home button and most other stuff works). Thanks a lot.

Starting the initial setup via am start -n com.google.android.setupwizard/.SetupWizardTestActivity in adb shell indeed worked for me (Note that it is SetupWizardTestActivity, not as given in the answer).

The wizard can be quit with the command am force-stop com.google.android.setupwizard but that might result in the problem being restored.

Caution: Backup/sync everything before starting the setup wizard, because it might reset various things (e.g. the calendar storage (if syncing stopped before) or wifi passwords).

.adb shell am start -n com.google.android.setupwizard/.SetupWizardTestActivity solves for instead of adb shell am start -n com.google.android.setupwizard/.SetupWizardActivity

Sure will add it to answer..

apps like du saver / clean master /cm security is totally useless on Android phones
they do nth much removes Android's garbage collection causing phone to again and again collect garbage....firstly uninstall all task killers and battery saving apps .
try cleaning cache partition
and perform a factor reset if problem presets
for factory resetting you need to follow this
power button + volume(-)
now select recovery mode
wait until no command appears
then
first press power button then just click volume (+)
you're good to go now

After selecting a factory reset on Android 6.0.1, and unsuccessfully trying a lot of stuff for hours, I finally ended up with a solution that works for me.
In short:

Enable Debug mode on your phone. For me this was Settings/About and tap 7 (?) times on the Build number.
On your PC, install the Android Studio, to get the ADB program. After install you might find it in "C:\Users\your_username\AppData\Local\Android\sdk\platform-tools".
Open command prompt in that folder.
Run this command: adb shell wm overscan 0,0,0,15

The result is that you get a small area (15 pixels) on the bottom of your screen that is not in use, but your Home button(s) will again work. You can experiment with the value 15, maybe you need 25 or only 10. To reset to original settings, use the value 0.
Hope this helps someone.

As Harshal Borade said, clean the cache partition. I had this issue with a new LG Phoenix 2. I wiped the cache and I was able to see recent apps. Google how to wipe the cache for your OS flavor.

I had exactly same problem on my Moto X Play. I was running out of space and I used to get alert all the time. 2 days back my phone restarted just like that and after that notif. drawer, home and recent apps buttons stopped working.
I could not even factory reset phone via Settings, that button was disabled. So, I searched through and got this video (https://www.youtube.com/watch?v=z0eaBzUUKqw) and got to know how you hard reset Moto X Play. I got into recovery mode and wiped data/factory reset. All back to normal now!
Hope it helps :D


text:
packages.xml is restored after reboot
This is my first question here. I hope developers will help me out.
I have XOLO A500 device on which Google Play services is not being installed because of "Using the same shared id" problem. To resolve the problem, I had rooted my phone and taken access of system through ADB. Following procedure I had made.
1) Rooted the phone and installed ADB to access the android system.
2) chmod 666 to packages.xml inside /data/system.
3) Pulled the packages.xml using command adb pull /data/system/packages.xml
4) Edited the packages.xml and removed the sharedUserId attribute for the particular app.
5) Pushed back packages.xml
6) Removed the dalvik cache.
7) Reboot.
All I am doing as su.
The problem here is after reboot, the packages.xml file is again restored as the original one. Please help me regarding this.
Edit 1: I am using ICS
Edit 2: Here is how I have done everything.

Started USB debugging.
Connected the phone and started ADB.
adb pull /data/system/packages.xml
Edited packages.xml and saved the file
adb shell
su
chmod 666 /data/system/packages.xml
exit
exit
adb push packages.xml /data/system
adb shell
su
chmod 664 /data/system/packages.xml
rm /data/dalvik-cache/*
exit
exit
adb reboot

Thanks and Regards

Did you re-appply permissions when pushing it back into the system?

Thanks for the reply. Yes, I have tried that as well but nothing worked. I have edited the question so that you can see how I have done everything and if possible, please help me.

chmod 666 means that all users can read and write but cannot execute

should i try that with chmod 777

You can, but check out this understanding chmod. This might shed some better light on the situation.

Tried that as well but the file is again restored.

Have you changed permissions for the directory as well?

no. I have not tried for that. Let me check that as well by providing 777 to both directory and file.

You'll need to change permission to chmod 644 before restarting. That will keep it from restoring itself. Sorry for the delay, rebuilding a transmission as I remembered the right chmod.

Let me know and I'll  post as answer

Thanks for your support. I have tried that also but it seems to be not working.

As a surprise, permissions also restored.

Then there's something else wrong with your system. 644 should have fixed it.

Thanks for your help mate. I will post again if I find anything working.

10 - 4 , I  would like to know what the problem is too

sharedUserId is simply a copy of the parameter of the same name from the Android Manifest file. When you clear the dalvik cache and reboot, the sharedUserId attribute is read from the original apk files and packages.xml is rewritten. You'll probably need to disassemble the apk, edit the manifest, and reassemble the apk using a tool like apktool. Note that the new apk you create will not be signed, so it will not be automatically updated though the Play Store.

Who reads the sharedUserId attribute from the original apk? PackageManager? packages.xml is rewritten - who updates or rewrites it?  Also who creates package.xml file and when?


text:
Is it a good idea to give my screen lock PIN to an app?
My online bank created an app which can be used to generate TANs or be used as second authentication factor. For the setup it asks for the screen lock PIN which I've never seen before and seems like a bad idea (the equivalent of running an application not only with sudo, but entering the sudoers password into the application on Linux which I'd never do and alert the distributor of the application about potential malware).
Is this comparsion approximately accurate? And thus the use discouraged, maybe even requiring to take the app down? I could ask the app author, but they'll likely provide a biased argumentation.
I verified with the bank's customer service that it requires the screen lock PIN.
I'm using Lineage OS 14 based on Android 7.1.2 with Google Apps installed.

AFAIK the app should not be able to use this pin as it can only be used on the lock screen which the app can't access.The only usage I could think of is to test for complexity and therefore determine if your device has been secured or not.

I'd tell the bank that's a bad idea. IMHO your comparison fits. To determine whether the screen is locked or not, there are APIs that can be used by the app ("Keyguard"). I see no reason why an app should know the device lock pin or password. And I'd never trust an app which accesses the Internet with my passwords. But then, I'd neither do banking on my mobile device.


text:
How to boot Android with flight mode (airplane mode) activated
Is it possible to boot up Android so flight mode is activated?
When I set airplane mode before rebooting or creating a nandroid backup the setting will stick.
Are there any files like init.d that are easy to modify where these kinds of boot options are stored?
Another alternative would be a modified Custom Recovery. But I haven't heard of one.
Use case:
Restore an old Nandroid Backup, but before the system fetches all the updates (messenger...) the user wants to restore certain app data so nothing gets lost.
That is only possible when in flight mode.

Long press power button as normal. When animation starts press volume down and hold until safe mode is acknowledged.
Booting in safe mode enables airplane mode, if safe mode is unwanted simply reboot.
Tested on Android 12 on Nokia 3.4 and Android 13 on Fairphone 5.

An indirect possibility would be using tasker, which has the capability of performing actions "on device start" (amongst many others). So you could setup a profile that says: "on device start" → "set airplane mode on". Other automation apps like llama might have the same capability.
Note however that the action can of course only be executed as soon as the app (Tasker/ Llama) is started, so there might be a delay in which airplane mode is turned off (and a network connection available). If you need to safely rule that out: take out the SIM card, and delete the AP config for your WiFi. That way the device would still boot with airplane mode disabled – but had no chance to connect anywhere. Third option would be booting it while inside a Faraday cage (or a lead box) …

the idea isn't bad but not universal at all. you have to plan that plus have to live with the fact that EVERY reboot means flught mode. i'm looking for an 'emergancy' helper. something that works afterwards, you know? thank you.

Removing SIM works always. And in case of emergency, switch off the WiFi router. Alternatively: where do those data backups come from? In case of ADB: have you tried adb restore when in recovery mode? I haven't tried, so I can't tell if that would work.

@JoshHolland Not true, depends on your recovery. ADB does work in most custom recoveries (you can at least adb shell to them, and – sometimes after manual mounting – adb push and adb pull). I'm just not sure about adb backup and adb restore, as that involves the package manager as well which might not be available from recovery for some reason (especially with some partions possibly not mounted).

Thought so :) But, adding a single word to your previous comment, it still might be (sadly) true: adb backup as well as adb restore probably won't work, as both commands require interaction to approve the process on the device ("now unlock your …"). Would be interesting in fact to try that: "press vol-down to approve or vol-up to cancel"? Or, similar to flashing, a list of "No" with a single "yes" to select from? And how to enter the encryption pwd, if any? Morse with power-key? ;) As said: worth a try. There might even be a build.prop tweak you could setup from recovery...


text:
How to automatically backup everything to a safe location
I would like to discuss the best way(s) to automatically backup all data on a phone including system, data and sdcard to a server or computer. This should be scheduled so that one will loose as little data as possible if the phone or tablet gets lost/stolen.
I don't want to exclude Googles Backup system totally but I personally look for a different solution because I don't want to hand over my data to any cloud service, so if the best way would be the cloud it had to be encrypted.
Incremental Backups would be great but I don't see that happening.
My devices are all rooted, otherwise a system backup wouldn't be possible of course.
Tools that come to mind and their respective disadvantages:

Clockworkmod Recovery / TWRP > cannot be automated
Online Nandroid Backup > would fill up the SDcard because incremental is not supported
Bittorrent Sync > can only sync folders not the whole sdcard (what about App2SD partition?)
Rsync > only works for SDcard and hard to automate (on Windows)
Airdroid > only for SDCard
Titanium Backup > no SDcard backup, only selected data backup

What kind of backup system would you suggest?

This looks a little like a duplicate but he is looking for a one time solution.

I can only suggest Titanium Backup - https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup, since I haven't really tried any other apps.
I used to use it when I first got Android after I rooted, I used that to do a backup before installing a new ROM. Was incredible. Don't know about the scheduling though, but that wouldn't surprise me if it had it.

It is a great tool indeed (forgot that one in my list) but does it backuo sdcard as well?

I can't lie to you, I honestly don't remember... I never backed up the card because I had the card when I did a ROM install. Get the demo

I have the pro version and TB does not backup SD, how would it?

@sir_brickalot, If I may ask, what content are you looking to backup? What is on your SD card? Reason I ask is because if it is photos and videos, I have mine automatically backup to the cloud. Was just thinking that maybe there is a solution if you adjust your thoughts around "What do I need to back up?" instead of "How to backup everything?"

Thanks, the reason I want to backup everything is because of things I did NOT think of! I.e. : Did I backup my private key for Threema to SDcard or maybe a textfile somewhere, or an encfs container.

authors: genial بالعربي


text:
Got connection problems: How to reset wifi stack without factory reset?
I installed CM 5.1.1 and restored a ton of apps with Titanium Backup.
Now my Wifi is bugged: When I enter a known Wifi network the phone connects to the wifi but can't make a real connection (has a '!').
There might be a problem with tethering or priorities:
$ netcfg
rmnet_usb0 UP                              10.175.104.107/29  0x00000041
wlan0    UP                               192.168.2.126/24  0x00001043

I have to turn off mobile data to get a network connection.
Now I want to learn how to reset the wifi stack to get rid of the problem without starting from scrach. Where is the culprit?
My setup is a Samsung Galaxy S4 LTE with Optimised CM12.1 by AnteresOne. Xposed and Xprivacy as well as AFWall+ are installed.

So far I tried to delete wpa_supplicant and the whole /data/misc/wifi folder and even flash clean system and just restore /data.

Solution was in my case: Deactivate AFwall+ 2.0alpha2. The app caused connection problem.
A solution that didn't help:
Updating your modem/non-hlos to the latest version for your country/carrier.


text:
Apps abruptly close and/or keyboard minimizes while using Gboard (6.0 & 7.1)
Ever since purchasing this OnePlus3t brand new with 6.0.1 installed, the pre-installed Gboard I've been trying to type on abruptly minimizes, sometimes closing the app with it.
I haven't hooked it up to adb/ddms yet but I was wondering if there are any known issues with Gboard, OxygenOS or perhapse the OnePlus3t hardware in general.
Though this behavior occurs mostly in Messages, the proprietary Messenger (like every time I use it), it does also happen in Chrome and Jota. Interestingly it only occurs "the first time" the keyboard's been used in a while. After that first "crash", it works absolutely fine. Once the phone has been idle/asleep/un-used (di.fm is usually streaming) for a "while", it happens all over again, severely burning my marshmallows (apples are probably healthier and not so sickening sweet, i just don't want to turn into an iFruit).
The recent 4.1.6/7.1.1 patch installed recently didn't resolve the issue either.
This device is for all intents an purposes completely stock. It hasn't been rooted, loaded with a custom launcher, or any other potentially problematic software (I've got a few main stream apps like Jota, di.fm, terminal (installed recently), ...).
I tried turning off some text-prediction features in the Gboard settings to no avail.
1+3t+OxygenOS(4.1.6)+Marshmallow=

Are you sure it is not due to accidental touches to nav bar while holding the phone?

Wondering that myself I've been paying extra close attention, and slowing down my typing significantly. I haven't yet ruled out edge detection, which triggers often when setting the phone down. I think I toggled pocket mode on and off already though.

Try capturing a logcat while replicating it. If it is a system error or so you may able to diagnose it by looking it.

Yeah, I didn't want it to have to come to that after dropping a small fortune, but I don't have many options. It's just going to lead me down a rabbit hole anyway.


text:
Disabling System Apps that have been updated and User apps [No Root]
How can I disable system apps that have been updated through the Play Store without doing "Uninstall Updates"?
For instance, Maps is a system app, which has been updated. How can I disable it without uninstalling the updates?
I would also like to know how to "Disable" User Apps, without Root!
My device is a Sony Xperia U.

Can you explain disable it without uninstalling the updates?

Easy: He wants to keep the currently installed version, but freeze it -- so he might "unfreeze" when he really needs it. A quite common requirement for Google Maps; I do that with TiBu, but that requires root. Without root, via Settings->Apps, it seems one has to "uninstall updates" before one is able to freeze a system app.

How can I deal with unwanted system applications without rooting? seems relevant.

My vote is for eldarerathis's answer, if you have 4.x then you can just disable it in the apps section in the settings. No way around the un installing updates option [unless you root], sorry

Would also help if we knew what device it was for, i.e. if you have a nexus you could boot a custom recovery flash the most up to date gapps then reboot, staying unrooted but with up to date apps


text:
Emulating a windows environment
Is there an emulator available for Android that mimics a windows environment? WINE for Android does not look like it will be out for a while, and those that I've found don't look like they support past Windows 98 (our software requires XP S3 and up) due to different processor structures. It doesn't have to be a free option; as long as it's not too expensive, we don't mind paying. If we cannot do this we can use LogMeIn, but that is not preferable.

Fast forward to 2022, looks like Wine for Android is still active.


text:
Why does Chrome open links from wonderlandads.com on scrolling?
I have been seeing this problem for a long time in my Android mobile devices and laptop Chrome browser.
When I try to scroll down a page, the browser just hangs for a microsecond and then automatically opens a link (wonderlandads.com/...php)
This wonderlandads tab has random ads in case of laptop, and in case of mobile it says virus detected!
Anybody has any idea how to deal with this?
P.S.:- I googled about overcoming this but did not find any related problem. So I am curious to know whether this issue is related to my Google account and spreads itself on devices where I open my Google account, or is this a Google bug/some sort of virus? I have tried uninstalling all the Chrome extensions.

Possible dupe of http://android.stackexchange.com/questions/128957/removal-of-the-wonderlandads-com-pop-up-virus. It seems that the problem is on the website, not on your phone. For laptop, I'm not sure though, but beware not to fall under scam to install the app suggested. It's a known tactic employed by scammer to install worthless "malware fixer".

Casually speaking, site wants money, thus using ads. :P

I have noticed that this happens the most when the page has not completely loaded and i start scrolling down.. but i need to resolve this.. Does any know any solution?

Take a look at This

@Trix:- I want to add that i am getting this problem majorly on Android phone. I know many of the problems are solved by un-install and re-install of OS but i dont think that this is the best solution and i go for this only in the extreme cases (this does not seem to be an extreme case for now ).. have tried reinstalling chrome on phone though, no luck..


text:
Can adb be used to recover SMS messages while in permanent "Safe Mode"?
I have a non-rooted Droid X2 that is in permanent "Safe mode", but I want to recover SMS messages.  SMS Backup and Restore will NOT work because safe mode only allows system apps to run.
adb shell will get me into the phone, but does not allow me to get to the SMS database:

[rjt@pc232 workspace]$ adb shell
$ cat /proc/version
Linux version 2.6.32.9-00008-gc406305 (hudsoncm@il93lnxdroid80) (gcc version 4.4.0 (GCC) ) #2 SMP PREEMPT Tue Jan 24 22:54:19 CST 2012

$ cd /data/data/com.android.providers.telephony/databases/
$ pwd
/data/data/com.android.providers.telephony/databases
$ ls
opendir failed, Permission denied
$ su -l root
su: permission denied
$ sudo
sudo: permission denied
$ sudo su -
sudo: permission denied
$ sudo su -l root
sudo: permission denied
$

Since SMS Backup and Restore is allowed to access my SMS messages when in normal mode, is "Safe mode" blocking my access or the fact that this phone is not rooted?
Can I root the phone without losing my existing SMS messages?

You will be unable to do this without a rooted device, as the /data directory can only be read by the Android system, and apps can also read their own /data/data/<package name> directory only.
Android devices do not come with sudo, and you need to be rooted to use su as it switches to the root shell (on unrooted ROM's, su can't switch to the root user, as the kernel denies it).
If you do find a way to root the device, (which may be difficult), you can mount the /data partition as RW, then you can copy files from it.
Use these command to remount the /data patition:
su
mount -o remount,rw /data
The su command can only be executed on a rooted device.
EDIT:
Just for clarification, the SMS Backup & Restore app uses an API call to get the SMS messages via the Messaging app, hence the need for the READ_SMS permission.
EDIT2:
Most rooting methods don't wipe the device data, however some do. You would have to google for a way to root your droid 2 however, and see if it wipes the data.

When in "Safe mode", should i be able to install and run applications such as "SMS Backup and Restore" via adb?  If so, how?

@rjt You can install them most likely, but you won't be able to run them AFAIK. You could try though. Download the apps .apk file, and use adb install <path/to/apk/file> to install it.

Thank You Liam for emphasizing that the phone needed to be rooted first.

Try this:
cat /data/data/com.android.providers.telephony/databases/mmssms.db > /sdcard/mysms.db

Which copies the SMS database across to the SDCard.
For the Telephone database,
cat /data/data/com.android.providers.telephony/databases/telephony.db > /sdcard/mytelephony.db

Its a very old trick, to pull in the databases without root. It is not guaranteed to work across all ROMs depending on how the directory permissions are set.

$ cat /data/data/com.android.providers.telephony/databases/mmssms.db /data/data/com.android.providers.telephony/databases/mmssms.db: Permission denied

you left out the redirect symbol? as in >

Yes i did leave out the redirect because i do not currently have an external sd card.  Will try again after inserting card.  whoops.  i do not have the sdcard with me, do really think it makes a difference?

try adb pull /data/... directly? You should have stated explicitly in your question that you do not have an external SD Card!

[rjt@pc232 workspace]$ adb pull /data/data/com.android.providers.telephony/databases/mmssms.db failed to copy '/data/data/com.android.providers.telephony/databases/mmssms.db' to './mmssms.db': Permission denied

This won't work as the device isn't rooted! The /data partition isn't even readable without root! You need to be rooted, use the su command to enter a root shell, then remount the /data partition as RW.

Liam W,  in my initial question, there are demonstrated attempts at sudo and su but permission denied.   Am i doing something wrong in regards to su / sudo?

@rjt See my answer. Android doesn't come with sudo, and root can only be attained on a rooted device.

So is there some way to root the phone without deleting the existing SMS messages?

@rjt See latest edit to my answer.

@LiamW I explicitly stated it is not guaranteed to work across ALL ROMs... some do, un-rooted Froyo on Samsung Europa, that works. Not all do!

@t0mm13b, thank you for the help.  i did try with an external sdcard, but still get "Permission denied".

@t0mm13b, i managed to root the phone and made a backup just as you described.  Thank You.

I'm not sure yet whether this works on non-Google phones, but on my Pixel 2 and Nexus 5, the backup feature (under Settings -> System -> Backup -> (Choose profile, if relevant) -> Pixel 2 backup) shows that SMS text messages are included in the Google Drive backup, if you have enabled it. You cannot directly download or view the backup from Google Drive/PC, but if you have another phone and choose to restore data to it, the SMS messages should be downloaded to the new phone and be available to view and export with a 3rd party app.


text:
Wifi automatically turns on persistently, despite configuration
I am using a Sony Xperia L (C2104) with Android 4.2.2 (Build number 15.3.A.1.17).
I can only find one setting that would turn on Wi-Fi automatically, and it is the "Location-based Wi-Fi" setting in the Power Management settings category. Of course, I have disabled this option, but I frequently find my Wi-Fi on. How can I fix this?

This problem might be caused by some third party application installed on the device. I faced this problem with quite a few applications like "Fast File Transfer", "Super Beam", etc. Applications that require to use the wifi-direct feature seem to create the problem. I uninstalled both the applications and the device wifi was normal again after a reboot.

Hm I seem to have no applications that require Wi-Fi direct feature; the closest thing I have is the bloatware File Commander, which I use and has Wi-Fi direct capabilities (although I never use the latter). Do you think it may be a culprit? Is there some way I can debug this?

My devices problem was solved by uninstalling the applications and since then, any other application hasnt caused this. Did you try SafeMode?
I have been using ES File Explorer for Wifi direct transfers but it hasn't ever created this problem. Might be your Firmware is corrupt, try reinstalling or Upgrading.
I searched Xperia Forums and found out its a common problem faced by many users. Need not to worry, sony will fix it (Hopefully!)

How do I enter safe mode? I would remove it but I don't know if I would be able to fetch it back afterwards :/ I hope Sony realized that this issue exists.

People have added it into the forum for Bugs/Errors on Sony's site, so we assume Sony knows.
Now, to enter Safe mode, go to the power menu, i.e. the one which you get after keeping the power button pressed. Then keep the "Power off" button pressed on the dialog box that appears, it should ask you to reboot into safe mode.
The File manager, and even better ones are available on the play store, don't worry about that.

you can try this ...

settings > apps > all > smartconnect > clear everything


text:
Restoring backup from CWM recovery
I made a backup of my stock ROM before flashing a Custom ROM. I used CWM recovery. But that backup wasn't fully  made due to memory constraints. But still it created files worth 1.01 GB in the backup folder. There are 4 files in that backup -

boot.img (6 MB),
data.ext4.tar (577 MB)
recovery.img (6 MB),
system.ext4.tar (448 MB).

My question is, if I try to restore from this backup, will it work?

There's no way to know, those zips could be incomplete. The only way to know is to try, but my guess is that it will not work. It needs to be the complete image. Very unlikely.

@RossC I have tried opening those archives, and they open without error. Otherwise they would have been corrupted, if they were not complete !

Do you need to restore the entire backup, or do you just want to pick parts of it (e.g. some apps with their data)?

@Izzy I am concerned with the stock ROM only.

In that case, it might be a safer approach to take a look at Where can I find stock or custom ROMs for my Android device?


text:
Check application install
I want to write a simple program (java) run on desktop to first check some application is already installed in the device and if not install it. For installation part I may be use to adb install command. How to check whether application is already install in the device.

To VTClers: Though being asked from a developers standpoint (and development questions are off-topic here), this question is of interest to power-users as well. Scenario: Check whether a certain app is installed on a device attached via ADB, without having to use graphical stuff.

Why do you need to check for app's existence before installing?  The -r switch to adb install command performs this check already and re-installs the app (keeping all the data) if it already exists.

Initially I do not need to re install same app if already installed. I will give a info message if install..

You can find your answer e.g. at Github, and details in the developers documentation:
adb shell 'pm list packages [options] <FILTER>'

Prints all packages, optionally only those whose package name contains the text in .
Options:
-f: See their associated file.
-d: Filter to only show disabled packages.
-e: Filter to only show enabled packages.
-s: Filter to only show system packages.
-3: Filter to only show third party packages.
-i: See the installer for the packages.
-u: Also include uninstalled packages.
--user <USER_ID>: The user space to query.

As you can see: Unless you specified the -u parameter, pm list will only show installed apps. Filter the output for the package you want to deal with. If the output is "empty", the package is not installed:
adb shell 'pm list packages' | grep -x 'com.foobar'

should output nothing if com.foobar is not installed.

Since you make a reference to both java and adb in your question it sounds as if you're familiar with both.
Just have your Java application as a wrapper to perform adb system commands.
Using the system commands to adb, you could use the same Java program (adb wrapper) to check for the installs and actually perform the installs.
You can replace the "pm list packages" with any of the adb commands do perform your intentions.
This is the java class you can use.  Of course your java application can search the return (response) string for the apps you want to verify.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class checkandroid {

    static int exitstatus;

    public static void main(String[] args) {
        // TODO Auto-generated method stub

        String shellcommand = "/opt/android/android-studio/sdk/platform-tools/adb shell pm list packages";

        String response = runit(shellcommand);

        System.out.println(response);

    }
    static String runit(String inputstr) {
        String output = "";
        exitstatus = 0;

        Process p = null;

        // -----------------------------------------------

        try {

            p = Runtime.getRuntime().exec(inputstr);

            InputStream cmdStdOut = null;
            InputStream cmdStdErr = null;

            cmdStdOut = p.getInputStream();
            cmdStdErr = p.getErrorStream();

            String line = "";
            String line1 = "";
            BufferedReader stdOut = new BufferedReader(new InputStreamReader(
                    cmdStdOut));
            BufferedReader stdErr = new BufferedReader(new InputStreamReader(
                    cmdStdErr));
            while ((line = stdOut.readLine()) != null) {
                // logger.info(line);
                // System.out.println(line);
                output += line + "\n";
            }
            stdOut.close();
            System.out.print("Error Status: ");
            while ((line1 = stdErr.readLine()) != null) {
                // logger.info(line);
                System.out.println(line1);
                output += line1;
            }
            stdErr.close();

            try {
                p.waitFor();

            } catch (InterruptedException e) {
                // Auto-generated catch block
                e.printStackTrace();
            }
            exitstatus = p.exitValue();
            System.out.println(p.exitValue());
        } catch (IOException e) {
            // Auto-generated catch block
            e.printStackTrace();
        }

        // -----------------------------------------------

        return output;
    }

}

Thank you Izzy and L.D James I combined both and make success :)

@user3734225 You're very welcome! Consider contributing back to the community by marking it solved by clicking the check mark.  This will flag a good resource for the next person having a similar question.  Glad to be of service!


text:
Confirm if apps have successfully installed from Google Play (Without looking at the phone)
My girlfriend recently had her phone stolen and I'm trying to track it down by remotely installing apps on her phone via Google Play, but I can't tell if the apps are successfully installed.  For example, if I turn off my phone completely, and install an app on it from Google Play, it will still report "installed" even though my phone's turned off.

The answer to your specific question is, unlikely.  You can install an app that has an interface that you can communicate with.  Communicating with that interface can allow you to know.  But other than that, it's unlikely.  And you'd have to have confirmation on the android to accept the manifest of the app's requirement list.
You may not be fully lost, however,  Google does have a feature by default that you might be able to track your phone even if you didn't install an app.
These are some requirement which most people normally have:
- The android is connected with your Google account.
- Your android has access to the internet.
- The the Android Device Manager (ADM) to locate your android (turned off by default)
- Allowed ADM to lock your android and erase its data (turned off by default).

Try Google's Android Device Manager.

Go to google play on a computer and try to install an app. After pushing the Install/Installed button a popup will appear listing the permissions it requires and below that a drop down listing the devices you can install it on. Click on the drop down. If it is currently installed it will say "Your device already has this item installed" next to the device name. Otherwise it will say the last time the device was used.
I just tested this by installing an app and canceling it in the middle of the install, then re-installing it, then uninstalling it.

I won't answer the question itself, but the general question on how to find the stolen phone, and for sure the way you trying is not going to get you anywhere. In order to have a chance to find the stolen phone you should have already install any anti theft app like Google's Android Manager or Cerberus or any similar app. Of course these apps will work only if the thief has not already uninstalled them or reset the phone and installed a new ROM.

So is there a way to check, what are dead ends? Because the phone will ring for a while... but then shortly they turn it off after we try to call it.

I've been trying to install android lost and then text it "androidlost register" ...but that seems to not be working... even though it says it's "installed"


text:
Is it okay to delete CWM backups after copying them to my pc?
Recently, I installed CWM (Rom Manager) and a custom recovery in my Xperia SP. Then I went to Rom Manager and pressed 'Backup Current ROM' which took me to a screen that backed up everything. Then I used adb pull /mnt/shell/emulated/clockworkmod/backup to copy that backup into my PC. Now, the copied files in my PC are:
Now,

First thing, from what you see, can you tell me if the backup is complete (it is about 2 GB)? Well, this is the content of the recovery.log file.
Can I delete the backup present in my phone(because it is occupying a
large amount of space ~2 GB)? Or should I keep it there. I have
heard of mysterious evil things like bricking, bootloops etc.
(which I am REALLY scared of). And in many places I've found that
the best way to recover from those scary things is to use the backup
of the ROM. Now, please tell me that if such a disaster happens to
my phone, can I transfer the files from my PC to the phone or do
they need to be in the phone for me to be able to recover from the
disaster?

You can theoretically delete them without hesitation after moving, but do keep in mind that CWM depends on file integrity checks like MD5 to see if your images have not been modified since the day you took a Nandroid backup. There are some cases when phone-to-PC transfers  ruin the MD5 signature1 and therefore prevent CWM from restoring the Nandroid backup in the future.
If you do every step in ROM installation exactly as said in the instructions listed on your ROM webpage and you're not going to do anything daring after successful installation, chances are you're not going to need that Nandroid backup anyway. But it's always better to be safe.

1 speaking from experience


text:
Can I run apps with similar function?
Recently I have installed Juice Defender and Greenify.
Unknowingly I ran both of them. The result is pretty great (battery almost stopped discharging). Battery levels stood constant for hours when my screen is off.
Is it good to run both of these apps together?

It's fine.  If they work simultaneously without your phone bursting into flames, just let 'em run!

Typically it is advised not to run two apps that have overlapping management areas.
If you aren't seeing excessive activity/drain due to the two apps stepping on each others toes then it is not bad. From your take so far, it does in fact seem good in this case.
You wouldn't, for example, want two anti virus software running side by side in the same environment. That would usually be bad.


text:
"OK Google" too sensitive, reacts on "OK" only
When I want to start an "OK Google" query, I just have to say "OK" and Google Search starts listening.
Unfortunately that makes the features unusable because when on a charger my phone is always active and when anyone in the office says "OK", my phone starts searching away.
Same behaviour when I start the original "Google Search" app and use the hotword.
What to do?
My specs:
 - Device: Samsung Galaxy S4
 - ROM: SlimKat 6.8
 - Launcher: Apex (has OK Google support)
 - Additinal Info: Xprivacy installed.

Did you notice this issue with other ROMs? Does Apex launcher have some "OK Google" functionality of its own like Nova Launcher does? It could be the launcher at fault, the ROM, the device, the Google Search App itself... Hard to narrow down yet. I'm using a Google Edition ROM here with the Google Now launcher and it needs both words. If you can, try that launcher (it's free) and try OK Google command from there to narrow this down a little. You can also retrain the voice model in google search and see if this helps.

Added info: Same behaviour in the official "Google Search"-app.

Cool it seems to be SlimKat but the app itself has a few quirks that people are anecdotally telling me here in the office. Seems more common on AOSP and 'Vanilla' android.

After searching around, this appears to be an issue with SlimKat ROM itself.
Reading this review of SlimKat or alternative link to article as their formatting is awful, the line that jumped out at me was:

....talk to by simply saying "Okay Google" (sometimes even just okay-_-)

suggests this happens on the ROM.
Also there is a theory that the launcher listens to OK G and starts background tasks for the searching.

Maybe it has something to do with the fact that it listens for "OK G--" and then it starts loading voice search while you're still saying "oogle", instead of it listening for "Google" and then loading up voice search, leaving you waiting for a short while?

It is worth noting that a friend with a Nexus 4 told me that sometimes it pops up on "OK" for him but it is rare. I can't find confirmation online.
Also some launchers try to incorporate the OK Google themselves, sometimes not in the correct manner and this can cause conflicts. For example the image below is from Nova Launcher (which I use myself very often) to show you its OK Google screen which is a separate function to the Google Search app's one:

Finally some OEMs have their own "Hi Galaxy" ala Samsung and this can further muddy the water with this functionality.

(source: futurecdn.net)

I thought I can set a custom word but no I can not.

@MANI I didn't think so to be honest, thought it might be like "Hi Galaxy" above! Apparently "OK Google" is a good expression for voice recognition software to find, and easier than other attempts at it... Who knows. It works for me about 70% of the time, the other 30% I'm left shouting at the phone like a weirdo!!

Yes I am using Apex with hotword integration and even Slimkat but the thing is: I could rule these out due to the fact that the same behavour is in the Google Search app, don't you think? Well I might try CM as a test. About "OK G.." I don't use the word "Google" at all and it still works.

It could be the app, that's why I mentioned that people are telling me it sometimes happens on Stock ROM devices, as well as the theory from Reddit. I'm trying to cover a few of the potential issues. I'd guess it happens anyway, but SlimKat certainly seems to exacerbate the issue.

@RossC Your link to the review seems to be wrong. It links to another review of Slimkat without the quote. Here is the correct link: http://www.droidcent.com/2013/12/kitkat-christmas-present.html?q=christmas and it is for Android 4.4.2.

@sir_brickalot (awesome name btw) I copied the text out of the link I provided, it is there but the AWFUL formatting of that site is obscuring it. I'll post both links to make it easier. It definitely is there, I've just copied it into notepad. But the key line is there anyway.

Accepted your ( @RossC )  answer, because it is well written. not really convinced though that slimkat has anything to do with it... doesn't tamper with the google service I would presume. ;)

@sir_brickalot  thanks, once I'm at a pc I'll edit the wording to mention the slimkat article but move the 'blame' more towards the Google search functionality itself. I can trigger it here by saying ok g- and even Oh god at times!!


text:
Reinstall Samsung Stock Apps
A few months earlier, I got a Samsung Galaxy S4. Immediately I rooted it and used NoBloat to unistall some stock apps. One of those apps was Gear Manager, since I didn't plan to get one at the time, and if I did I'd just reinstall it from Samsung Apps.
I just got a Gear 2 and installed Gear Manager. When I launched the app it states that my device is incompatible (even though it is).
This leads me to believe that the package I uninstalled was a daemon or helper for the app to manage my Gear with. If so, then where can I get the APK for the daemon.
P.S.: Factory reset is an unviable option as I can't backup Google Authenticator, therefore I'd lose access to multiple online accounts.
P.P.S.: Software update is also impossible as I'd lose my root access.
EDIT: If anyone has a rooted Galaxy S4, please give me a NoBloat backup.
EDIT: Well, I just uninstalled Samsung Apps Package for Gear Manager, rebooted the phone and apparantly it works now. It looks like the preinstalled Samsung apps work like the Google apps, they both have a base package already installed, but updates and the like are distributed as patches.

Side-note: Even if a factory-reset would be "viable", it wouldn't bring back any of the removed files. Those where stored on /system, which isn't touched at all by a factory-reset.

@lzzy I did not know that. I thought a factory reset was: Download latest OTA update, delete everything in flash (except the update package), apply update, reboot. Thanks for preventing another headache.

You might wish to consult our factory-reset tag-wiki :) Hint: Many of our tag-wikis contain useful background information, even first-aid (if applicable). Always a good idea to check them first. Click a tag, then select the "info" link/tab. Factory reset just "empties" /data and /cache, basically – i.e. "undoes" all changes a "normal" user (without root) might have done to the device, thus restoring factory default configuration. It always assumes no changes have been done to read-only areas such as /system.

Is it out of your league to try and find a stock /system dump from sites like XDA and extract your desired APKs from there?

@aureljared Good idea, though Gear support was added in November 2013 and for some reason I can only find March 2013 builds on the internet. Would you mind pointing me to a more recent build?

@manuel.rivera Help yourself.

Be sure to download the correct one.

@aureljared None of the ROMs on the site have the same hardware version (L720) as mine. Though, after a bit of googling I found that L720 is a Sprint modified ROM. So I should be able to use a ROM from that site, right? Also, do I need to use my region code (VP), or can I get away with using a ROM from another region?

Should've said you had a Sprint S4. Haha but you can find ROMs for that here.


text:
Multitasking solutions to (not-rooted) Android OS and Apps out there?
For here i mean multitasking visually, which means the ability to see more than one Apps at a time.
Other than Samsung's Multi Window, Popup Play (or by the Stick It! app), Pen Window, or the LG's QSlide, Slide Aside, and Dual Window, are there any other multitasking solutions else from the major vendors out there?
I would only consider reliable solutions, which means the original untwisted rom (i know original doesn't necessarily means reliable, but as least i got warranty), or by certain android apps which requires no-rooting, or any other solutions with clear lines of instructions or codes.

If you don't want to display all your existing apps next to each other, there's that "floating" API used by several specific apps (I'm sure not all of the ~4,500 apps in that list are matches, but you'll get the idea). For one true example, take a look at Floating Browser.

Just FYI. I have bought S5 and I am happy with its Multi-Window function. Hope I will have chance to write a few apps to make use of this feature.


text:
Android 4.4.3 update, dialer add 2 second pause - what is it?
THe new dialer for android 4.4.3 has an option for "add 2 second pause" and "add wait". What do these options do?
I'll add a screenshot soon.

It adds a delay to the buttons you dial when it is dialing. It is for interactive request on the phone (E.g. Press 1 to speak to RossC)
Here's an example that might explain it:
Say you do the following to top up your phone credit:

Dial 1741
Select option 1 for top up
Select Option 2 for enter code
Enter 20 digit code (XXXXXXXXXX-XXXXXXXXXX)

You could simply dial:
1741 <ADD 2 SECOND PAUSE> 1 <ADD 2 SECOND PAUSE> 2 <ADD 2 SECOND PAUSE> XXXXXXXXXXXXXXXXXXX  and it will all process. It literally adds a pause of 2 seconds to the buttons it dials!
My ancient Nokia phone used to have a 'P' for this above the # key. So you would have had 1741 P 1 p 2 etc on it. Very convenient for something you regularly call.

Ha! that explains that. I have never used this functionality. Thanks for the detailed answer.

This is pretty common on phone (and previously modem) diallers. You can use it to get through caller menu systems (the "press 1 for something, press 2 for something else" type menus) also known as Interactive voice response systems.
It's not normally shown as a menu option in the phone's dialler but you can normally enter a comma , into a dialler to get a short pause. You can then save this phone number along with all the number presses after it as a contact in your phone.
I have a contact saved in my mobile phone that calls my work voicemail system, waits a couple of seconds, then enters my PIN, then waits another couple of seconds, then presses "1" to hear new voicemails, this lets me do everything I need to do to listen to my messages with one click. It looks a bit like this:
020 1234 5678,,1234#,1

(the number at the start is the number that's called, the commas are the pauses, and everything after the first pause is used to get through  the menus)
When I dealt regularly dealt with the customer services parts of other companies, I had the details saved as a contact on my phone to get all the way through their phone menu system to a real human being with one phone call.


text:
Android 4.3 - No internet access, unable to connect to the proxy server error
My Lg nexus 4, received the android 4.3 update last night. I didn't do much on it, opting to sleep peacefully knowing that I had the latest and greatest in android software, but this morning I noticed that I cannot access the internet either via the web browser or the play market.
Chrome complains "unable to connect to the proxy server" regardless of what site I try to go to. And the play store says "No connection".
However, I do have a connection, I can use gmail to send and receive messages and I can use whatsapp and twitter and a few other apps.
I have checked the network settings for both my 3G and wifi, and there are no proxy settings or anything enabled.
Does anyone know what the problem might be?
EDIT:
Does this happen on both WiFi and mobile data? YES
What apps have trouble, and which do work? Chrome and the play store as far as I can see are both troublesome. Other apps work i.e. my whatsapp can send/receive messages, twitter works and so on.
What's the color of your signal bars in the notification area? Blue, full signal on HSDPA.
EDIT 2:
I think this may be affected by some setting left over from a rogue app. I have played with VPN apps and proxy setting apps in the past (a few months ago) so perhaps the new 4.3 update read some of those settings and configured things incorrectly?

Can you please edit your question, and add some more details: Does this happen on both, WiFi and mobile data? What apps have trouble, and which do work? (i.e. is Chrome the only failing app? Have you tried other browsers?) What's the color of your signal bars in the notification area (though if GMail works, they are most likely blue)?

I've the same problem. Chrome, Firefox, Facebook & others think I've a proxy configured, but I can't find the setting to remove it. Some other apps work fine. I also played around with proxies before, but as soon as I booted into 4.3 this started happening.

Any solution to this issue? I have the same problem after upgrade to 4.3

I might have a solution, but unable to answer my own question as I dont have 10 reputation on here. Need some people to like my question before I can reply.

@Husman Sure you can answer. Also, you have 106 rep.

i need 10 from this site. I think I only have 6 from here and I got a hundred for coming here from stackoverflow.  The reply button is still disabled.

@geffchang http://android.stackexchange.com/help/whats-reputation "If you are an experienced Stack Exchange network user with 200 or more reputation on at least one site, you will receive a starting +100 reputation bonus to get you past basic new user restrictions"

Gave you an upvote

If you have cleared your Google Service Framework data to receive the update, it will change your device ID that Google uses to recognise your device. This also affects the tokens used by some apps (i.e. Google Now, Google Search, Chrome) and they won't connect to the Google servers properly and refuse to work for a while (this was like 24~48 hours for me, before these apps started behaving as the tokens were eventually refreshed). Other non-Google apps will continue working.
More details of why this happens can be found in this reddit post by a Google engineer:
https://www.androidpolice.com/2013/11/20/google-engineer-dan-morrill-sheds-some-light-on-the-nexus-ota-process-urges-you-to-never-clear-google-service-framework-data/


text:
Best Practice for transferring images to an Android phone?
I switched from iOS to Android, and wish to transfer my pictures.
Where on the filesystem should I put the pictures? I first thought /DCIM/camera, but that's the directory for pictures shot with the phone.
/media and /Pictures seem to be appropriate, too.
I just want to set up everything in the best possibly way. I also want the pictures to be in different folders e.g. holidays, work, etc...
I have a Nexus 4 phone, if you need that to help me.

You could basically store them anywhere. As long as the directory does not contain a .nomedia file, the media scanner will find and catalogue them, so you apps (like e.g. gallery) will find and show them. On my phones, there was a Photo directory on the sdcard. The Nexus 4 not having a card slot, you probably could simply create such a folder on its internal sdcard.

Please feel free to use a folder structure which suits you. It's better if you create a seperate folder for pictures, inside media folder or on the primary folder itself. (where the folders such as DCIM and media are located.)
As your title asks, there are no hard and fast methods to transfer data to your phone. Standard file transfer safety measures apply.
About keeping seperate folders, do NOT use too many folders which might result in slowing down the phone. No matter where you put the images, the album app finds them. (Just make sure that you don't copy them in to folders that you do not know of)
Have fun with android.

I would place the images in the /Pictures folder, but there is no real 'best practice' as far as I know. That is the fun thing about Android, you can place the pictures wherever you want, you'll be able the access them in every picture application. So you place them where you would think they belong, if you need them later.
You can make the necessary folders and normally Android will organize them according to the folder where it's in. At least that is the case on my phone, but I have another phone (HTC One X, so maybe HTC added this feature).
Btw, I switched from iOS to android deserves a +1 :-)


text:
adb shows different battery capacity
My device is Coolpad Note 3 and it's 15 months old.
Recently, I've observed that the battery suddenly drops randomly to 20-30% and shuts down. When I plug it in for charging while it's powered off it shows that it's charging from 20-30%. If there is some charge left inside it then why won't it turn on?
And while charging it suddenly bumps up from 40-50% to 70-80%. Why does this happen? I don't think that the battery is failing because it's relatively new compared to my 2½ year old Redmi 1S (which is working perfectly).
Interestingly, adb shell dumpsys batterystats | grep "Capacity:" shows that my battery capacity is 1000 while the manufacturer mentioned that it is 3000 mah. I was getting nearly 5 hours of screen on time before this happened. Did the manufacturer do something to the device by giving some update ? Recently many other users reported such battery drain issues. Malwarebytes scan shows that the themes and ota updater apps have coolreaper malware which can be used to directly install any apps.
Here's the complete output:
$ adb shell dumpsys batterystats | grep "Capacity:"
    Capacity: 1000, Computed drain: 0.1000, actual drain: 0.00000000
    Capacity: 1000, Computed drain: 0.1000, actual drain: 0.00000000

Edit:
I got the battery replaced from the service centre and it's working properly but adb is still showing the battery capacity as 1000 only.


text:
How to update google apps in miui5
I have purchased a Redmi 1s mobile. It has miui v5. It seems that we can't update Google apps in miui.
So, how can we update Google apps in miui.
I've just seen that the updates are shown in apps like 9apps and mobogenie.
Is it safe to download the updates from these apps? Or
How can I make Google play to show these updates?

Do you mean the gapps package, or individual apps on the Play Store?

The google apps package

And are you asking about updating (i.e. the apps are already installed), or installing them in the first place? Because if they are already installed, they take care for their updates themselves (or rather Google Play does).

In miui google apps do not update themselves. I'm asking about updating apps.

Also updates for google apps are not shown in playstore in miui.

Have you tried using google installer ? http://en.miui.com/thread-17910-1-1.html

Google installer only shows the option to install but not update

But i was able to update the google apps from playstore..

But playstore doesn't show updates for Google apps in my mobile.

Try this..uninstall any of the Google apps and install the older version of that app and check update from playstore.

Try to extract the apk from other phones using apk extracter and install it thereafter in your phone.

try with that
http://forum.xda-developers.com/showthread.php?t=2397942
it replaces your play store and google apps with the last official versions
you have to flash it from  Recovery

This should help but he needs to be rooted for that. Im not whether his phone is rooted or not.

You need a custom recovery


text:
How to root this device? RK3188
I am attempting to root at RK3188 Mini PC I bought from amazon.
I believe I have found the drivers, but cannot figure out how to connect a USB cable to the device to connect to my PC to root.
Please see pictures below:
https://i.sstatic.net/SgauW.jpg
https://i.sstatic.net/gLxA9.jpg
As you can see the device has a:
HDMI port,
Charging port,
USB port,
Audio port,
The device takes 2 Amps to power, through the charging port.  I could try connecting a microUSB (?) to usb cable to the PC, but I believe it will not be enough to power the device as USB ports only supply up to 500mA.  I could also try a USB A to A cable, but I also fear damaging both devices.
Any suggests appreciated!
Thank you!

Update
Used the micro USB to USB adapter and found the device powered on from a computer USB port.  Still confused as the device needs 2A to operate.

@Sid we allow one "How to root" question per device. So this is not a duplicate.

@DanHulme sowie. my bad.

any body? should I try and word this question differently?

Use a self powered usb hub that's capable of delivering 2 amps. Else, you may solder your own USB Y-Cable (or use one of those HDD-Y cables with a micro-USB converter) and provide the power by an external 2A capable wall charger.


text:
Is my Android device booting into a "stealth" partition?
OK, this is a weird problem I’m encountering with an Android system I’ve been using without problems for several years now… and I’m practically out of ideas on how to potentially fix it.
Let’s start at the beginning to describe the problem and what I’ve been trying for the past 12 hours.
I woke up to my device this morning seeing that a recently installed app (via Google Play store) had crashed, and obviously a truckload of other apps and services also showed a hickup too.

I decided to simply uninstall it and reboot my phone (clearing the Dalvik cache while I was at it to avoid any hickups). The system booted as usual, but I noticed the app I just uninstalled is still there. Tried again, same result.
Knowing I have a 5-day old TWRP backup, I decided to restore that to get back to my old system state. Done, wiped Dalvik cache and rebooted. No success, the old system (with the app that shouldn’t be there) boots up. So, that TWRP backup wasn’t a solution.
Crying a silent tear, I decided to whipe all partitions via TWRP and simply reflash the ROM from scratch. Rebooted… and to my surprise the old system showed up (incl. wallpaper, settings, and that one weird app et al.)
Not wanting to give up, I even tried to install another ROM. TWRP confirms this succeeds. But rebooting again ignores every system change and boots that darn old OS (incl. settings and apps – which shouldn’t exist due to a factory reset.)
Getting a bit upset by all this I said to myself – OK, I’ll wipe all partitions and reboot. Having no OS the device should not boot at all, confirming I got rid of whatever messed up my device. Booted into TWRP, whiped ALL partitions listed (including the external SD). I confirmed this worked by using the TWRP file manager to check on the contents of every partition available. They are all empty. I was convinced this was going to work and my device would hickup due to a missing OS. So, I rebooted… and whoops, the device again boots into the system (with that app, the old wallpaper, etc.) Logic says this can’t be – since all partitions are empty.

Long story short: I meanwhile tried about every trick in my bag to get rid of the old OS, but no matter what I do – I can’t. Whiping, flashing, etc. doesn’t seem to change the fact the phone happily boots into an OS that – according to the TWRP file manager – doesn’t exist.
Now, I’m out of ideas on how to fix it. It’s almost as if I’m fighting some "hidden/stealth" partition which gets booted into. As said: this even happens when I whipe all partitions (System + Cache + Data + Internal Storage + Micro SD card) followed by a Format Data) and then reboot.
Meanwhile, I’m starting to suspect the last app I installed via the Google Play store might have been malware. But that shouldn’t result in a bootable OS after a complete device whipe.

Can it nevertheless be that my Android device boots into a "stealth" partition? If, how can I get rid of it when I can’t see it via TWRP?
Is there any way to hard-format and repartition the internal SDs and recreate the partitions besides TWRP’s functionality? (In case there’s some problem with one of the partitions, which TWRP doesn’t actually whipe.)
Or (which would really make my day) has anyone ever experienced something alike and has a solution which might help me fix this by getting rid of the old OS which the device seems to detect who-knows-where and happily boots up?

EDIT
Since a comment asked for some version details et al:

Device is a Samsung GT-P3100, aka espresso3g
TWRP 3.2.1-0
Rom that is (let’s just call it) “non-killable” is SlimKat. To be more specific
Slim-4.4.4.build.9.0-OFFICIAL-8293

Looking at things again and again it seems TWRP fails to correctly whipe one or more partitions (System, Data), even though there is not a single error message or warning when doing so.
I also tried erasing all partitions as well as the internal storage and flash lineage-13.0-20180211-nightly-espresso3g-signed, which results in an error 7 (rebooting the same darn “non-killable” SlimKat).
Same goes for trying to erase all partitions as well as the internal storage and flash Slim_espresso3g-6.0.1-20180414-1959,  which results in an error 7 (rebooting the same darn “non-killable” SlimKat).
Also, it might be helpful to know I have another espresso3g device available, which doesn’t show any similar problems. On that other device, I can flash, whipe, backup, recover, and consequently successfully boot into the related ROM as expected.
Therefore, I’m suspecting there’s something wrong with one or more partitions, which also prevents TWRP from correctly formatting in contrast to its claims. Even using the TWRP terminal and being crazy enough to try rm  -rf /data/* and rm  -rf /system/* seemed to work at first glimpse. Yet, the partition contents simply shows up on reboot as if nothing happened. Another indicator it might be some partition hickup is that – any change to any setting or even starting any app in the booting “non-killable” SlimKat results in the whole OS collapsing piece by piece until the device reboots into recovery.

Seems I’ve found the answer at https://andi34.github.io/faq.html
Quote:

I can't change my rom, wipe / format doesn't work. Nothing changed after flashing with Odin.
  16 GB Tab 2 have a known faulty EMMC (MAG2GA). It can happen, that your EMMC get “read only”, so you can’t perform any write actions (also you can’t format) anymore.
From the EMMC data sheet:

5.1.7 End of Life Management:
The end of device life time is defined when there is no more available reserved block for bad block management in the device. When the device reaches to end of its life time, device shall change its state to permanent write protection state. In this case, write operation is not allowed any more but read operation are still allowed.

But, reliability of the operation can not be guaranteed after end of life.
On a faulty EMMC firmware it happens a lot faster.
What are the symptoms?

Uninstalled apps and deleted files are back after a reboot
Formating the storage doesn’t work (after reboot the old rom and apps are back)
You can flash whatever you like via Odin
it showes “passed” but after reboot nothing changed (e.g. still no StockRom or still the old Recovery you had previously installed)

… there might be some more, but only to mention some …
In most cases, the issue can be fixed by a EMMC firmware update, but you need someone who’s able to do it (possible via ISP, nothing you can do esylie at home yourself). In some bad cases you need to find someone who can replace your EMMC.

Well, that’s that then. Obviously I will have to buy myself a new device first thing in the morning, after crying a river all the way to the bank while blaming Samsung for its End of Life Management.

Yikes. If it makes you feel better, I lost my old espresso to nuclear war, also known as it hit the floor in the middle of falling off the cable mid flash to marshmallow

@DanBrown I look at it this way: I lost a “phablet”, but I gained a hell of a technologically advanced frisbee. ;)

I know that feeling :D


text:
Do 3rd party camera apps really improve picture quality?
I've got a Samsung Galaxy Grand Neo (Jelly Bean). It has a 5 mp camera but I'm not satisfied with the picture quality. Will it help if I use another app like Camera Zoom FX or anything? If yes, then which app should I use?

Some camera apps improve the photos taken, but it's usually on a case-to-case basis. Some phones have limited / low-quality hardware and won't benefit from 3rd-party apps. Others have high-quality hardware, but poor camera software.
It's difficult to recommend a specific app. I have a Samsung Galaxy S4 and have installed the following: Camera Zoom FX, ProCapture, Snap Camera, official Google Camera. However, I don't get very good photos, probably because I think the camera is defective. My phone has been dropped several times already.
But your mileage might vary. Try the different apps, and see what works for you. There are trial versions.


text:
Is it possible to remove text from under the icons on the home screen?
I'm familiar with all the icons on my home screen. I think it would look better, at least to me, if the text from under those icons is gone. Is this possible?
I'm willing to root my device for this, but not switch to an alternate home screen launcher app.
I am using Moto-G with Kit Kat.

You could install a different launcher, Nova Launcher has this functionality under Nova settings > Dock > Remove Dock Icon Labels or similar... The same for the desktop icons also.

He's not willing to use another launcher, @RossC

Yes this can be done on the Google launcher itself . But you will have to root your phone. You will not only be able to hide the text but be able to tweak even more stuff. But let's just stick to hiding the text for now.
Download Xposed GEL Settings
It is an xposed module and requires the xposed framework. If you don't know what that is, here's a video to get you started off with the  Android Xposed Framework.
If you still have questions, do ask.

I looked all over for an Xposed mod but couldn't find one anywhere to do it. Good find.

Found one way around this. I only tested this with GO Launcher that supports renaming apps.
If you tap + hold the app icon, then tap "Rename", it allows you to erase the name then save it without a name. I found this to be the easiest, lightest way without having to download additional apps that are overbearing with stuff we really weren't looking for to fix our problem.

Try this http://market.android.com/details?id=com.abcOrganizer.lite&feature=search_result
Once installed, long press on homescreen to add a shortcut, add a "FolderOrganiser" app shorcut and it asks you whether you want to "add text below" icon.


text:
s3 stuck at booting screen
I bought a Samsung Galaxy S3 I9300 about a month back from eBay. It was working fine till the last Tuesday, but after that my phone started rebooting by itself. My Galaxy S3 is powered by Android 4.0.4 and unfortunately I haven't enabled the USB Debugging Mode, nor have I flashed it with any custom roms. So, I can't flash with any custom roms, the solution suggested by most of the threads I have browsed through. My phone is also not going into the recovery mode. Please help!

Enter Download Mode.
Download Odin
Download Offical Firmware from Here
place the Tar file in the PDA Location in Odin
and it will install the Offical Rom again.
Tutorial Here
if you have Kies Delete it just install the Drivers


text:
Back up phonebook list along with all data I used before factory reset
I'm using Karbonn A11 Android phone. One of my friends tried to guess my pattern and unfortunately he locked my phone. I want my phonebook list back before factory restore. Please suggest to me how could I get back my data.

If you have sync enabled in your mobile, then your phone book list will be automatically stored in your Google account. Go to "contacts.google.com" to find your contacts.
Else If you have USB Debugging enabled in your phone, you can follow this link to unlock your phone.