text:
Google Play app link links to the Play homepage instead of the app detail page
I have a link on my website leading directly to a specific Google Play application:
Go to the app

The link is based on the official Android docs.
The link opens the Google Play app and goes to my app as planned. But on some devices, the user lands on the Google Play homepage instead of the detail app page. The "some devices" run Android 7 and have Google Play (v9.8+) installed.
What might be wrong? Is it some kind of a setting that prevents accessing the app "deep link"?
It's quite frustrating especially that it works for other devices, e.g. Nexus 5 with Android 6 on it. I don't see a pattern. Does anyone have an idea?

Have you tried resetting the app? To do this go to Settings --> Apps --> Google Play Store -->Open by default (may be different on yours I'm running 8.0). From there you should be able to clear defaults and change supported link settings.

I just checked it on a device that shows the app page correctly and on another one that shows Play's homepage - and the settings are the same. Weird.


text:
Remove user account in Android 5.1
I have a ZTE Blade L5 Plus with Android 5.1 that I was using for a while. Now I'm using a Samsung Galaxy phone. I want to remove the Google account from my old phone, so I can give it to a friend.
On the Samsung phone, I go to "Settings" then "Cloud and accounts" then "Accounts" then "Google" then I tap the Menu button (or vertical ellipsis⋮ - the three dots button) and I get two options: "Sync now" and "Remove account". So this is easy on Samsung.
But on ZTE, I go to "Settings" then on the third tab "Personal", I choose the third options "Accounts", then "Google" but here, if I tap the menu button, I only get the option "Sync now". In this screen I have the following three options:

Sign-in & security
Personal info & privacy
Account preferences

If I go to "Account preferences", I have the option "Delete your Google Account" but that's for completely deleting my account, not for removing it from the telephone.
This question already exists, but for a slightly different version of the OS: Android 5.0.1

Possible duplicate of Remove user account in Android 5.0.1 on Galaxy S4

In my phone, I went settings->accounts, selected Google. There I have two e-mails  registered, I clicked on the first one, and a set of details opens.
On this screen you see on the top right corner a menu, that allows you to remove the desired account. It didn't wipe my Google's account - if you are afraid, you could just put it on flight mode before taking these actions...
In your case, however, instead of just deleting the account, I would do a factory reset before selling my phone (even if it is to a friend, due to personal stuff I have in it, like pictures and whatsapp messages)

It works, indeed, thank you. Unlike Android 6 where you get the Remove option right as you enter into "Goolge", here you have to click the account first and only after that you get the "Remove account" when clicking the three dots menu button

source: Stack Exchange

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

sort: votes


text:
Is there a way (with root?) to prevent Android task killer from killing certain apps?
I'd like a browser app (FireFox) not to be killed every now and then by the system's task killer since I'd like to use certain single page applications that hold some data and are not loaded very quickly. Is there any way to deal with this, even if root is required?
Some time ago, I've updated my device from a 1 GB RAM to another one, 3 GB RAM and everything went well (browser stopped to get killed at all). But after a system update in Jan 2016, things got even worse, now FireFox usually gets killed even after an alarm clock rang or I opened a camera app. This is a major issue for me so I appreciate any help about this.
PS yeap, I've tried Settings→Battery→Battery Optimization where I both added FF to exceptions (didn't help) and turned Battery Optimization at all (didn't help as well).

Tl;dr
It's possible with root, you can tweak oom_adj values to prevent apps from being killed, alternatively force the target app to stay in memory by "locking" it or change some related settings responsible for killing apps in low memory condition.

Background: Android RAM Management

Android uses a different way of handling processes. Instead of killing
  every process after its activity ended, processes are kept until the
  system needs more memory. The idea is to give speed improvements if
  you start that activity again. But how/when does Android kill a
  process if it needs more memory and which process to kill first?
This is managed by the LMK (Low Memory Killer) driver of Android. You
  may already know that every app/process in Android is assigned an
  oom_adj value, which indicates the likelihood of it being killed when
  an out of memory (OOM) situation occurs. More higher it's value, the
  higher likelihood of it getting killed. Valid range is -17 to +15. (if
  in the -17 range means it won't get killed). According to that, there
  are six groups (OOM groups), into which apps/processes are
  categorised:

Foreground app
Visible app
Secondary server
Hidden app
Content provider
Empty app

Basically these could be described as:

FOREGROUND_APP:  This is the process running the current foreground
  app. We'd really  rather not kill it!
VISIBLE_APP:  This is a process only hosting activities that are
  visible to the user, so we'd prefer they don't disappear.
SECONDARY_SERVER: This is a process holding a secondary server --
  killing it will not have much of an impact as far as the user is
  concerned.
HIDDEN_APP:  This is a process only hosting activities that
  are not visible, so it can be killed without any disruption.
CONTENT_PROVIDER: This is a process with a content provider that
  does not have any clients attached to it. If it did have any clients,
  its adjustment would be the  one for the highest-priority of those
  processes.
EMPTY_APP: This is a process without anything currently running in
  it. Definitely the first to go.

These groups are defined by oom_adj value limits, and apps would fall into one of those groups according to the oom_adj value assigned to that particular app. "Foreground apps" usually have an oom_adj value of 0 or less (so they are the least killable; i.e High priority).
"Empty apps" have a higher oom_adj (they are killed early; i.e Low priority). Also, oom_adj value changes according to the state of the user app; it's 0 when the app is active in the foreground and assigned a higher value when the app goes to the background.

Why their "killability" differ? Apps belonging to these different
  groups (that have different oom_adj's), start to get killed at
  different levels of free RAM. These triggering RAM limits are defined
  by the LMK minfree values. Above 6 categories correspond with 6 RAM
  limits which are set in the LMK minfree. eg: Stock Android 4.3 in my
  device comes with the minfree values of 48,60,72,84,96,120. (these
  are in MB).

Practically what it means is, Empty apps will get killed when ram goes below 120mb, Content providers when it goes below 96mb, Hidden apps when it goes below 84mb and so on.. lastly starts killing Foreground apps when ram goes below 48mb. (You may notice that this last value (48mb) is not desirable when using memory intensive apps like heavy games).
NB:

In newer kernel, oom_ score _adj is used instead of old oom_adj. (oom_score_adj valid range is -1000 to 1000). But oom_adj is also maintained for perhaps compatibility.
It is said that there are many OOM process categories that are assigned different oom_adj priorities by the ActivityManagerService, but eventually all of those would be considered under above six slots/groups (according to oom_limits), for the purpose of killing by the LMK minfree triggers. Therefore, those six are the important ones for normal users.

We can check the minfree values (also change them) and see the OOM
groupings of apps/processes with this Memory Manager app easily.

Not every device has the same OOM configuration.

Improving RAM Management
Nowadays there is much user friendly implementation of RAM management mechanism with UI in system settings (such as App optimisation in Battery settings, Protected apps in some ROMS e.g Huawei’s EMUI etc) and can have the same effect as described above:

Having said that we can now explore ways in which, RAM can be utilised without killing foreground applications too often. The target areas will include:
1.Adjusting minifree values to suit one’s needs
2.Locking apps in memory to prevent them from being killed
3.Overridding the hidden app limit of android

Adjusting minifree values

You can change the minfree values with memory manager and tap apply. (Additionally there is an option “apply at boot” and tick to preserve settings across boots). Several apps can achieve this e.g Memory manager, Minfree manager etc
Alternatively use terminal/adb using pages:
#!/system/bin/sh echo “values” > /sys/module

Locking apps to stay in memory (making it resident)

a) Using App Settings (Xposed)

One simple method is used Xposed module, App settings (you need Xposed framework installed)
After installing the framework, then download the 'App Settings' module through Xposed installer.
Open App Settings and allow the applications to load, selected the target app (in this case firefox browser)
In the settings page, enable the toggle and activate editing mode, tick the “Resident” option and save. (Making apps resident, causes apps to staying memory without being killed and it is advised to use exit button in target application if it’s no longer needed otherwise it will deprive other apps memory)

b) Using memory locker
Another implementation of this concept is locking the target application in memory by controlling the system files for setting oom_adj for all running processes.
How the application works:

Memory locker controls files in the /data directory and also controls
  sytem files in root for setting oom_adj for running processes.
All
  locked applications are automatically locked after each reboot.   Apps
  are classified as downloaded/system apps, to unlock select target app
  and click on the lock on right side. (You can optionally set oom_adj
  priority)

Overriding the hidden app limit

In addition the low memory killing mechanism, there is another parameter that controls killing of hidden and empty apps. Apps are killed when they go beyond specified limits.
There is a build.prop setting that which can control this (default is usually a low number less than 25, and modifying this can increase this value to a much larger value like 80)
Add this line to build.prop file in /system and leave another blank line below that (be sure to make back up first)

ro.sys.fw.bg_apps_limit=80

References and Credits

Android RAM Management (Special credits: mrhnet)
Memory Locker
Xposed - General info, versions & changelog

Thanks for this very detailed explanation. This most likely deserves the bounty, but let me think this over and ask some questions first. By the way, the first question is: so without rooting, there's no way to handle the problem, except for deleting many apps and hoping that the memory is loaded less?

Another question is: which values can I see without rooting? I've made a simple test where I switched from FF to a photo app and couple others and moved back to FF and it got unloaded and loaded back. According to plots by Simple System Monitor, there were at least 300 MB of free RAM at each moment (much > than 120 MB) and FF still got unloaded...

I don't think it is possible to do it manually without root since you have to tweak a lot of system files,  whilst adjusting the values and such messing requires elevated privileges or root.

What Android calls "Free RAM" is not necessarily free because a large part of it is cached memory (useful for fast execution of apps when relaunching them) such that the actual free memory is even less than the minifree value of say 120MB in this case. Good news most developers are now hardcoding the settings in their ROM ti allow non root users to accomplish this easily

Don't worry about bounty, first try to get as much answers (even better answers) from others users , this will allow you to find the most helpful solution :)

The post above is very thorough, but I will add instructions for a few specific models (stolen from ASM app page). Note that for apps that use more memory (eg Firefox), the system will likely eventually kill the app anyway when other apps request memory space. If the cached ram is needed, the largest and oldest apps go first regardless of battery saving settings, and Firefox is a big spender.

How to deal with (known) Battery savers?
Samsung
In Android settings > Device Maintenance > Battery, add app to the list of Unmonitored apps
Huawei (depending on models)
In Android settings > Advanced settings > Battery Manager, add app to the list of Protected Apps
or:
Battery > Close apps after screen lock, uncheck app from the Lock screen clean up
Xiaomi
In your Security app: Battery % > App battery saver, select app then No restrictions
and:
In your Security app: Permissions > Autostart then allow app to be started.
Asus (Zenfone)
Open your Auto-start Manager and allow app to be started.
OnePlus
In Android settings > Battery > Menu > Aggressive Doze & App Hibernation, check app to exclude it from the optimised apps.
Infinix
Open your Xmanager app, Auto-start manager and allow app to be started.

This app, RAM Manager claims to be able to lock certain apps from Android's RAM management mechanics.
Alternatively, go to Settings→Battery→Battery Optimization and set Firefox to Don't optimize can help a bit.

Yeah, I've tried the second option and also tried turning off optimization at all, that doesn't help. Could you point where exactly RAM Manager claims that? As far as I can see, it only allows to avoid its own optimization for certain apps (for launchers, to be specific). But the good point is – I should look into apps that try to control LMK and may be ask those who develop them – they probably have some extra knowledge.

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

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


text:
Is incoming/outgoing call screen customizable?
I'm looking for a way to change the incoming/outgoing call screen (that of my Sony phone needs replacement at least because when I press a button to turn on the screen and tap the "end call" button or to see the length of the talk, the screen is turned off in a second). I've tried a couple of dialer/contacts apps and those don't actually change that screen. Moreover, the comment here suggests that this screen may be changed only on a rooted device.
Is it so? Is this screen a part of launcher? A separate app? Is rooting required to change this? Where can I grab alternative implementations? A more detailed how to is appreciated since the phone is rooted already anyway.
PS the screen I'm talking about looks similar to this:

Try this app

@Abochur yeap, I've tried this one, a nice customizable dialer, but it doesn't change the screen I'm talking about (or at least I haven't found the option to do so)

To do so. Root the phone. Extract, and recompile these apps:
/system/priv-app/TelephonyProvider/TelephonyProvider.apk
/system/priv-app/Telecom/Telecom.apk
/system/app/InCallUiNext/InCallUiNext.apk
/system/app/telresources/telresources.apk
/system/framework/framework-res.apk

And this file also:
/system/framework/telephony-common.jar

After changing their drawable elements, return them where they were and set these permissions.
chmod 0755 for folders
chmod 0644 for files
This will work very well for you but always keep a backup of them incase something goes wrong. This is for editing the app but if the dialer is freezing after ending a call, then what you need to do is:
 1. Open Settings
 2. Click Apps
 3. Press the options icon
 4. Tap Show System
 5. Clear Data and Cache for Dialer and Telephony Provider

If still this doesn't work if you have TWRP Recovery installed:
 1. Press Wipe
 2. Advanced Wipe
 3. Check Dalvik Cache and Cache partitions
 4. Swipe to clear them
 5. Reboot System

Note: The in-call popup never changes no matter what dialer you opt for. Deleting it for example means the Telephone Service is tampered with. And you won't receive any calls. All other apps can offer adress book, blocking and dialer but on call dialing is then commanded to Telecom app which then manages the calling services and renders UI for call until the end. It offers the native service that is for calling and communicating to the phone gsm radio. All other apps can't do this. Just like in a media player, a media decoding library or a codec, so is the Telecom app essence and purpose. It is the core handler of telephony. Unless you modify it or redevelop it by code. It's one of the essential apps alongside SystemUI and Framework. That's why it won't be a walk in the park replacing it. It is integral to many system apps
This will solve your issue very well. Please let me know if it helped you

Wow, this looks very helpful except that for recompiling I have to get code of those screens somewhere. Any ideas (aside coding those from scratch)?

@YakovL Coding from scratch needs one to be very cautious. For your information, modifying will only change parameters and a few resources from the app hence you don't need to take care of the application's native libs in /system/lib, /system/vendor/lib, /system/lib64, /system/vendor/lib64 etc. That will make an easy go. But back to recompile from scratch. If your device is marshmallow or nougat, for example you need to understand that SDK at large, Java for developing android apps, Java for those framework files and writing libraries to support your current device platform. Remember libraries

are based on processor of device. We have, armeabi, arm64, arm and a few more. The once listed are for example cordial to the Mediatek chip. Since we have, Spreadtrum, Mediatek, Qualcomm, Broadcom, Samsung, Intel, and more processors too you need to take care of this too. So this needs a lot of knowledge about hardware and firmware at large. I haven't mentioned about network too which affects the type of Kernel and processor of device. 4g based processors and kernels, 3g and 2g based processors and kernels too exist. So what I mean developing a native app and is cordinating apps needs total

digging about the firmware you're running which is rather not an easy business. That's why I suggested only recompilation. I'm not trying to show you how hard it is. One can make it but through a lot of software testing and fixing since you are not your phone's dev.

Ok, let's make this straight: is changing that screen can only be done by some coding or I can find one somewhere like I find another dialer at Google Play and install it (may be with installation requiring some extra root procedures)?

@YakovL Yeah. Read the re-edit of the answer.

Right, thanks. How do you know which APKs to edit? I found only /system/framework/framework-res.apk and /system/framework/telephony-common.jar on my Sony device, with first 4 files missing. ("show hidden files" is enabled in my Root browser)

When you go to settings apps, what is the name of your default dialer. This will be the name of it even in system priv-app. Alternatively if you're unable to identify them. Download Terminal app and run this command: ls /system/app and send me the names of all files listed there. run again: ls /system/priv-app and send me the names of all files shown and I shall identify the apps responsible for calling if incase they have different names on your device brand. That way I'll be able to tell you which apps to recompile


text:
How to stop continue optimise app in Yu Yuphoria?
My mobile phone (Yu-Yuphoria) continue updating OS or optimising Apps and not stop.
Actually last night when I'm going to use my mobile it displayed black screen and then I did restart the phone.
At the time of restart phone as usual display "cyanogen" logo and then instantly going to updating mode and display "Optimise Apps". I gave time but this process is not finish. I also switch off device and switch on but same alway phone going on updating mode and displaying **"Optimise Apps".
I'm facing this issue last 2 days. If anyone have faced same problem then guide me on right direction.
In Short how to stop this continuously updating/optimising OS ?

After googling found only one way to get rescue of it.
You must need to do force restore factor. Use Below Step
1) Reboot your Device
2) When your mobile ON instantly press Volume Down Button + Lock Button
3) You mobile will be gone on boot mode
4) Select 3rd option Restore factory
5) Select Option for Delete whole data select YES (Might be 4th option)
6) Formate will be started (It will take approx 15 min)
7) When It will completed again your system will be display boot mode. You should choose Reboot Device
Congratulation your device will be worked as normally.

Did you previously root/unroot your device after installing a system application? Also on restart how many app(s) are being optimised on restart?

From my experience this sounds like permission issues in dalvik cache, an alternative solution in such scenario is uninstalling the problematic app

I decided to add another answer based from experience, but its good you fixed the problem yourself

@xavier_fakerat - Thanks for your quick reply, Actually whenever I did restart my device always display "Optimise App 1 to 150" and its in loop and restart automatically and again start "Optimise App 1 to 150" and continue.

Based on my experience, this problem usually occurs as a result of faulty (or incorrect) permissions in the dalvik cache.
How does optimisation work?
When the Android system is "optimising apps/system", it will be creating an optimised version of each application. This process makes each app start as
fast as possible with the new Android version.
When an .apk file is added to an Android system, it is converted to an odex (Optimised Dalvik Executable) file whose function mainly is to save space.  Unlike the odexed file, a deodexed file
essentially has all parts assembled in one place into classes.dex files (just Dalvik Executable)

Android uses Android Runtime (ART) for running applications (in ealier
  android verisons - Dalvik Virtual Machine to maintain backward
  compatibility , ART uses the same input bytecode as Dalvik, supplied
  through standard .dex files as part of APK files , while the .odex
  files are replaced with Executable and Linkable Format (ELF)
  executables).
Now, when an Android-based system is booting, the dalvik cache for the
  Dalvik VM is built using these .odex files, allowing the OS to learn
  in advance what applications will be loaded, and thus speeds up the
  booting process.

Situations in which the problem arises

After an upgrade of an Android version, the issue can surface if Android system is trying to create a new dalvik cache for the apps but the still has the "old cache" for such an application, hence tries to constantly create a new cache on top of the old one.
A "used" odex file is still present even though that particular application is deoxeded . Certain apps (e.g Link2sd, Lucky Patcher, Titanium backup etc) that integrate dalvik cache in system partition can cause such issues.
In one case, it resulted when Titanium backup created a patch that created an .odex file in /system/apps.
this problem resulted.
Rooting/Unrooting of the device can result in modification of data in the dalvik cache of a certain application, such that when the change of state occurs (from rooting or unrooting vice versa), it keeps trying to perform optimisation of the application(s).

Possible fixes

Wiping data and cache

No. You can try wiping your cache partition:

Turn off your device
Press a combination of Vol +  + Vol - +  Power key buttons and hold them down.
Release only the Power button when the device vibrates
Release the other buttons when the Recovery Menu screen appears
Using the Vol +/Vol - buttons to navigate, select Wipe cache partition
Press the Power key , which will act the enter key on your keyboard.
Wait for the process to finish.
You can then reboot the device and see if your problems are fixed

Resetting dalvik cache permissions

Another user has offered a concise explanation:

This problem is caused when there are .odex files in /data/app
  folder than have permissions set so system can't write to them during
  the optimization process.

In this case, setting correct permissions can resolve this matter:

Set correct permissions i.e rw- r-- r-- for odex files in /data/app ( or /system/app ) folder

Several users have suggested to use this method by employing a file explorer to delete the folder:

Use a file explorer with root access or adb shell and delete the
  folder dalvik-cache found inside /data (or rm -r -f /data/dalvik-cache
  from adb shell)

Uninstalling problematic application(s)

Try getting rid of possible culprits, especially those that require root, by simply uninstalling such applications.
Alternatively, try deodexing the applications with a suitable tool, to allow Android Virtual machine to reoptimise the applications at next reboot.

For many users  its the app titanium backup odex file that causes the
  issue but there can be other programs.

Reflashing stock ROM

If none of these seem fixing the issue, then you might have the highest probability of fixing the issue by reflashing your device with stock ROM.
Get the appropriate stock ROM file and reflash to clear essentially everything and rewriting the partitions with "fresh data"
Note back up important data first!

References

what happens when there is a system optimisation?
Android upgrading everytime when restarts


text:
SOLVED: S7 Edge SM-G935S Soft-bricked: Unable to mount all partitions
The problem is solved, the solution is posted in the answer:
Problem

The device is unable to mount every partition, this includes:

/efs
/persdata
/system
/data
/cache
The credit goes to member greenman of sammobile forum.

The solution to this problem is as followed:
Following the guide here to flash the stock firmware and Repartition the device.
Here is a full write up of the Repartition process, taken straight from the Sammobile forum website by the member greenman. This is for in case of the website is not available.
"Here is how to install an S7 firmware

In the S7 firmware Samsung are now providing 5 files.

Phone preparation:
To avoid any issues with FRP (Factory Reset Protection) go to Settings > About device > build number > Tap 7 times to activate Developer options.
Now go to Developer options > OEM unlock

FRP LOCK and OEM LOCK are now both OFF.

1. Download and install Odin on your PC

    [Download Odin v3.11.1][http://dl.sammobile.com/Odin3-v3.11.1.zip]

2. Choose your FIRMWARE by putting in your phone Model version
https://www.sammobile.com/firmwares

3. Download and unzip your firmware (do not use WinRAR as it can give errors)

4. From your download put these files into Odin:

BL
AP
CP
CSC (not HOME_CSC)

5. Now look at the Odin Settings (for this select Options)

F.reset time
Auto reboot

6. Installing another country CSC or a network CSC will need the system partition size changing.
For this select Options and add this setting

Re-partition

NOTE:
1. You will get a WARNING from Odin.
You can ignore this.

2. If you are installing a multi csc firmware, and your existing CSC is in that firmware, then DO NOT select Re-partition.
You can check if your firmware is multi-csc by installing this app:
[https://play.google.com/store/apps/details?id=org.vndnguyen.phoneinfo&hl=en]

3. To receive OTA updates, after installing the firmware, put phone into Recovery Mode to wipe cache then wipe data/factory reset.

A video guide here
[https://www.youtube.com/watch?v=7SK3IMprKVQ]
In the video guide the csc is not being changed and so Re-partition is not selected

Hope that helps."

I would suggest including a writeup in your answer just in case the link goes dead. A simple copy and paste as a block quote should suffice.

You are right. I will update the answer promptly. Thank you for notifying me.


text:
Safely erase Moto G (CyanogenMod 12, TWRP 2.8.4.0) for recycling
The web is replete with advice to encrypt Android phones before resetting the phone for recycling.  Using my old-school computer understanding (which may be out of date), the reason is that "normal" deletion simply marks file space as free for future use without overwriting the contents.
I am using CyanogenMod 12 with a 1st generation Moto G, so most of the online info isn't applicable.  Since I am not a developer (either for Android of any other environment), I have to find the least technically involved method possible to encrypt and reset.  For encryption, I found Lekensteyn's answer to be helpful.  For some reason, however, my adb shell does not support pipelines, so my slight modification is, verbatim (except for the password and resulting Hex for the ASCII):
root@falcon_umts:/ # head -1 | tr -d '\n' | hexdump -ve '1/1 "%.2x"'
head -1 | tr -d '\n' | hexdump -ve '1/1 "%.2x"'
DUMMY
DUMMY
FF00FF00FFroot@falcon_umts:/ # vdc cryptfs enablecrypto wipe password 6d6f746f47
vdc cryptfs enablecrypto wipe password 6d6f746f47
200 0 -1

This process took a split second, so I'm not sure if it worked.  From the background I've found online, encryption should take a good portion of an hour.  Is there any way to check whether the phone is encrypted?  I can still use the adb shell commands "ls" and "find" on the /data directory, though I'm not sure if that is the right path for me to worry about.  I'm only interested in making the user-specific data inaccessible, i.e., Contacts, Calendar, personally created folders in File Manager, logins for GMail (IMAP) and Exchange Server.  I have no apps or media files that I need to protect, nor do I have any cloud accounts apart from email accounts above (though I did use the Google store to download a PDF reader once).
Just from playing around (without necessarily a full appreciation), the "mount" command returns a whole whack of entries, while "ls mnt" only returns a handful.
Based on this site, the next step after ensuring encryption is to use Factory Reset.  However, TWRP also has a Wipe function, with options to "Advance Wipe" and "Format Data".  "Advance Wipe" has checkboxes for "Dalvik Cache", "Data", "Internal Storage", "Cache", "System", "USB OTG", which don't all have similarly named folders under the path "/" (so I'm not sure if they map to the file hierarchy).  "Format Data" is described as wiping, so I'm not clear on whether this does the requisite overwriting of physical bits in the nonvolatile memory.  For that matter, the above Stack Exchange solution isn't clear about this either, and I am assuming that the overwriting with indecipherable data is thing being sought in the encryption.
In summary, the questions about safely erasing the phone are:

Is the encryption meant to do the required overwriting?
Does the above Stack Exchange solution accomplish this?
2a. Since it happened so fast, how can I confirm its success?
Is the /data folder tree that I should be focused on?
Is the Settings->Factory Reset sufficent after #2?
Does the default TWRP wipe accomplish this, along with erasure?
Is the "Advance Wipe" or "Format Data" feature needed?

I am assuming that #4 is not required after #5 and/or #6.
Thanks.
P.S. I'm operating under the following constraints: I don't want to use Nuke My Phone because I no longer want to connect it to the internet, and I don't want to install any apps.  I might try dd if=/dev/urandom of=random.txt bs=1G count=2 if I can't sort about my issue above, but the last thing I want to end up with is a crippled system that is only half cleansed.  I will also look into how to extract the data critical parts for destruction, as I'm not interested in selling the phone.  I'm avoiding upgrades to CM because it needs a TWRP upgrade, which requires a bootloader upgrade, which I'm reluctant to do ever since Motorola's handset division got sold overseas.  Note that this page misses many of the points of interest, as it doesn't clarify whether "wiping" does the requisite overwriting, nor the odd encryption behaviour that I encounter.
2017-11-05 UPDATE: I have been unable to get the original ROM to install in order to enable encryption of the solid state drive.  Based on the prospects of wear levelling, I have doubts about the effectiveness anyway.  At this point, my only certain solution is to disassemble the device as much possible, separate away the components that are obviously not electronic, then physically pulverize the rest with a hammer (and with the components in a milk bag to keep them from scattering).

I said that if I don't get encryption working, I want to kill the data-sensitive hardware components and recycle the rest in an environmentally responsible fashion.  While I didn't find anything useful from googling securely-destroy-moto-g, I did find some hardware teardown/service guides: teardown; and (linked to from the teardown page), servicing.

For question #2 above, this page shows that Settings->Security should display "Encrypted" under the Encryption option if you succeed in encrypting.  It turns out that I did not succeed, and I am now dissecting the other answers on the source page for alternatives.  It's all seem very tuned to developers, however, who are familiar with the commands cited.

Frederick Nord's solution refers to an explanation at forum.cyanogenmod.org for why he reduces the size of the partition.  That URL doesn't seem valid at this time.  Would anyone know where I might find an archived version?


text:
Problem "Not registered on network"
I have an old Samsung Galaxy Note II. Rooted.
One day it went off. When I restarted it, it went to a somehow hybrid state between factory and the status it had before crashing, i.e. I had to reinstall everything, everything on mobile sd was gone, BUT it retained root.
Now everything eksr is working (besides some problems due to the old battery, it freeze or shut off every time battery level is about 80%) except for the fact that it does NOT recognise Sim cards (which are ok when mounted to different devices). Messages are "not registered on network" and "insert a SIM card".
I am still using the phone for everything it does not directly require a network registration (photography, reading, games, surfing on WiFi ecc).
Is there a way to correct whatever got corrupted? A number? In fact the phone does receive some signal from the provider (3 to 4 bars) selected - which is that of the unrecognised Sim.
With a new battery it could be a nice device. I love note 2.
Thanks.

Try other sim card with it, maybe sim is problem. Also flash stock firmware (it will completely remove everything from phone including root and custom recovery).

Sim works in other devices. Can I get the stock firmware from the web? Could you point me to a good resource? Thx

Look on Samsung site. Not that sim in other phones. Other sim in your phone that I was saying

I forgot if I have done that. I will. Thank you

authors: Једноруки Крстивоје


text:
Why I can't see Viber Videos folder in Windows Explorer (on Huawei P9)
When I connect my Huawei P9 to a PC and browse folders I can see viber/media folders on both Internal Storage and SD Card. In this folder I can see Viber Images and some dot folders, but no Viber Videos or User Images.
When I browse folders on the phone itself it shows these folders.
How can I see them in Windows Explorer?

Really not sure, see maybe those are hidden files? They shouldn't be but if they are, go to the view tab and select "show hidden files"

They are not hidden. I see a bunch of hidden folders like .ptt.

I think that folder has some kind of system protection.
However, there is a way to see images and videos (at least on Huawei P8): Open Files app (Huawei's default file explorer) and go to /viber/media and rename it's child folders (Viber Images and Viber Videos) and you'll be able to see them in Windows 10 Explorer.


text:
What is "Navigation Bar" option on Unihertz Titan Pocket?
I have a Unihertz Titan Pocket, and when I hold the power button, I see an option for "Navigation bar".
I've pressed it many times, but I don't see what it does.  Does anyone know?

Please post a screen shot of that menu.

It's an Android 11, touchscreen phone with a keypad. Interesting design.
Most probably it is for enabling/disabling the navigation bar (on the touchscreen) since it already has keypad navigation buttons. Or it might be the opposite; maybe for disabling the keypad's navigation bar and just using the on-screen navigation. Just toggle it from the power menu and see which one gets disabled.
PS. The navigation bar is the bar containing back, recent, and home buttons or a pill-shaped gesture bar at the bottom of the screen.

Now that you point that out, I see a line (perhaps stretched pill shape) at the bottom of most screens.  And that options turns it off.  But what is the point of that line (gesture bar)?

:) It basically is a type of navigation bar. You can see the same in iphones and many recently launched smartphones. For example.. https://m.youtube.com/watch?v=l3_u0KrSqt8

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


text:
Enable Display Over Other Apps Android 10-11 Go Edition (Nokia 1.4) when "feature is disabled because it slows down the phone"?
I have a Nokia 1.4 (TA-1322) running on Android 11 Go Edition. I have some apps which need to display over other apps, but whenever I try to enable it in settings, I see this message:

Feature not available
This feature has been turned off because it slows down your phone.

SCREENSHOTS

Image 1
Image 2

Please help me because I really need this feature, or maybe a workaround.
Any help will be appreciated.

Here are some potential solutions.
[Edit]: Non PC Solution added below!
PC METHOD
Requirements

PC/Mac with ADB installed on it. Check here for ADB installation instructions.
Package name for app (i.e com.android.testapp)
USB or for connecting to PC or Mac.
Obviously the phone.

Step 1: Enable USB Debugging on Android Phone

Open Settings on your android phone..
Navigate to About Phone
Click Build Number several times until developer settings are unlocked. Usually a toast is displayed showing "You are now a developer".
Now navigate to Developer Options. (Which are now unlocked in your settings)
Scroll to USB Debugging option and enable it.

Step 2: Connect Android Phone to ADB

Open PC/Mac with ADB installed. Check here for ADB installation instructions.
Connect Android Phone to PC/Mac via USB cable.
Click the notification popup on Android Phone and select File Transfer.
Open Commmand Prompt/Terminal in the ADB folder on PC/Mac (Skip if ADB is installed system wide)
Run command adb devices for a list of connected devices. The connected device should be available under list of devices! i.e

 $ adb devices
List of attached devices
xxxxxxxx            device
 $

Step 3: Determine Android App Package Name
There are many ways to determine the package name of the android app whose permissions are to be enabled, including some below;

Making a google search :).
Using third party apps i.e Package Name Viewer.
Checking the folder on Android phone Android/data etc.

Package name may appear like com.android.testapp
Step 4: Enable Permissions
Finally, to enable Display Over Other Apps permission for the application, type below command carefully into the Command Prompt/Terminal;
Note: Replace <package name> with package name of your application!
adb shell pm grant <package name> android.permission.SYSTEM_ALERT_WINDOW

OR
adb -d shell appops set <package name> SYSTEM_ALERT_WINDOW allow

Now return to your phone settings and check the permissions for the app, they should be granted.
NON PC METHOD
Requirements

Shizuku app (Download from here).
App Ops (Download from here).
Obviously the phone :).

Step 1: Install App Requirements

Download and install Shizuku app and App Ops from Playstore or from below links;

Shizuku
App Ops

Step 2: Start Shizuku App

Open Start Shizuku by following the instructions here.

I recommend Start using wireless debugging method for those who don't want to use PC or root.
Step 3: Open App Ops and Grant Permission

Now open App Ops.
You will receive a prompt to chose a working mode, click on Shizuku then Continue and allow shizuku access from popup dialog.
If Shizuku is running, and permission granted to App Ops successfully--
A list of installed apps will be shown.
Click on the app whose permissions are to be modified and--
Under Other, you will see Display Over Other Apps permission.
Click and Grant/Allow.

Enjoy diplaying windows in Other Apps.
Note: I have tested these solutions on Nokia 1.4 and they worked successfully, no guarantee for other phones!

Appreciate the self-answer, does this mean that permission restrictions such as this can be bypassed even on Android Go? If that's the case, then that's really good to know since it might be applicable to other cases.

@AndrewT. Yes actually...this approach was tested on Nokia 1.4 running Android 11 Go edition...and maybe applicable to other cases.

For advanced/root users.
Root method
Requirements

Termux or TermOne Plus
Package Name Viewer
Knowledge about basic ADB/Linux commands.

Instructions

Install Package Name Viewer and get <package_name>, example: com.google.android.youtube
Install & open Termux or TermOne Plus
Run command: su and grant root access
Enable permission with :

pm grant <package_name> android.permission.SYSTEM_ALERT_WINDOW

Enjoy!

Or in single line:
su -c 'pm grant <package_name> android.permission.SYSTEM_ALERT_WINDOW'

Note: Replace <package_name> with your app's package name.


text:
How to permanently disable the annoying "RCS chats" popup in Messages app
I have a Pixel 3. I try to avoid using SMS and instead use Signal whenever possible. When I do use SMS (the Messages app), I don't want "RCS chats" to be enabled. But nearly every time I open the Messages app, I'm prompted with a popup where the "Agree" button is very prominent.

I do not want to agree to use RCS chats. I want my choice (when I click "Use Messages without RCS chats") to be permanent.
How can I fix this?

There is a two year old Google community question about this, which Google as usual chose not to respond to, and just locked up the question.
On my Pixel 6a, I had enabled RCS previously. After seeing this question, I disabled RCS and opened messages app many times over two days. I did not get the enable RCS popup again
Enabling RCS by tapping agree and then from settings disabling RCS is a hack that worked for me. I am not sure if this behavior is OS version dependent or the logic behind this ( I guess it's some kind of promo popup to encourage RCS usage).
This may or not work for OP but making it into an answer that may help somebody.

Thank you. I will accept this answer preemptively and will try it out next time that popup happens. I know I could go switch the setting right now, but I'm curious to come back and check the date of this comment when it happens and see how long the interval was.

You are welcome. Also if it doesn't work please feel free to comment and unaccept as well!

On Android 14 / Pixel 8, even after disabling RCS from the settings, it has then re-prompted me a few days later. The message something slightly different like "We are setting up RCS chats so that you get blah blah blah". The amount of nagging Google does regarding features I don't want throughout Android is just incredible.


text:
Photo Sphere and Panorama are not available in Google Camera app
Recently Google launched a new camera app named Google Camera. Looking it's features, I found it has Photo Sphere and Panorama options. But when I installed it on my Moto G device it doesn't have both of those options. Only Lens Blur, (normal) Camera and Video options are available. See this:

What is the reason behind it? Or is there any setting I have to activate?

FYI: Moto G's stock camera app has a Panorama option.

Moto G doesn't have a Gyroscope Sensor (but it has an accelerometer). That's why Moto G didn't get the Photosphere option.
Actually, Panorama doesn't require a gyroscope. While there are obviously ways to do panoramas without a gyroscope. It looks like they use the same engine as Photosphere to do the panoramas. So the app also lacks Panorama.
Source Thread
Google Camera G+ Thread

There are several reasons for this, but it is mainly due to hardware limitations, Photosphere and panorama stitch together multiple images at the pixel level and require some pretty processor intensive work. Some users also mention that the lack of a gyroscope sensor as a possible reason.
I have googled and found at least 3 sources that corroborate this. Sorry but it looks like your out of luck.
http://www.engadget.com/2014/04/16/google-stock-camera-app-photo-sphere-lens-blur/
https://www.yahoo.com/tech/the-best-features-of-googles-new-android-camera-app-83124330305.html
http://www.slashgear.com/moto-g-google-play-edition-hands-on-vs-motorolas-g-15313328/

You can take panorama photos on the Motorola Moto G, if you use the Motorola Camera that was preinstalled. There is an option to take a panorama shot when you swipe from left to right in the camera interface. Hope this helps.

Yes this helped. But I already mentioned that in my comment.

@hims056 That's why you should always edit your post when you want to add extra information. Comments are for querying posts and seeking clarification, not for adding information.

authors: مازن حماده ناجي


text:
How to input sokuon in Gboard's Japanese 12-key on Android phone?
I'm using Gboard's Japanese 12-key. I want to write っ, such a sign that is called "sokuon (促音)", but I don't know how to put it in the 12-key input method.
How to input sokuon in Gboard's Japanese 12-key on Android phone?

To write it normally:

Swipe up た to write つ
Press the 濁点 key which also includes 大⇔小 to convert it to a small っ

Alternatively:

Swipe up た to write つ
Choose っ（小書き） from the suggestion strip

Tips: Gboard also includes dakuten and sokuon as suggestions without needing to manually convert them. To write ピッツァ, writing ひつつあ may suggest ピッツァ.

Much thanks! I really appreciate your answer, especially for the tips.

You must long press on a key. You will then see the other keyboard keys (characters) being displayed. Select the characters you want to type by moving your finger up or down or left or right depending on the character.


text:
Samsung asks for software update with weird random version
Today, I suddenly received this update for my Samsung Galaxy Prime Kit Kat 4.1 and it tells me to update to a weird random version which I searched on Google and received NO results (even when typing the 6th letter of the version). I hope this is not a glitch or someone trying to hack my phone.

Update details
Size : 124.17 MB
Version G360GDXU1BOJ3/G360GOLB1BOJ1/G360GDVU1BOJ3

This appears to be a fine update to me. If you check this page on sammobile, it has firmwares named similar to yours. The final base number is pretty same (UIBOJ3).
Besides that, android phones cannot be hacked that way unless you install some real (real) bad app, even then you should be able to recognize such a thing. So I would say just go ahead, this update is fine from security point of view :)

Thanks sir! This is just a wierd update. First update I seen with a wierd coding number.

No problem. In any case... I always backup first if I have even the slightest doubt no matter what reason. After all there's nothing to loose... :)

authors: Александр Бортник


text:
Space for widget which not exist
My problem is that I want to delete space for the widget which is shown in below screenshot. Any hints how can I remove it? I have got CyanogenNod 12.01 (Android 5.1.1).

the thing I want to delete (click image for larger variant)

The widget should be the google searchbar I guess - please check if you have the following settings available: "Settings - Display & LED - Searchbar in Recent Apps". The titles may vary as I've translated it to englisch. If this settings is available, then disable it and the widget should be removed.

@benjaminS please add this comment as an answer, you helped me with your hint

This Widget is normally the google searchbar.
If it is missing - the chances are high that you've removed the Google application from your phone. The missing widget can't be found and the empty box with the error message appears as we can see in your screenshot.
Luckily you are running cyanogenmod which lets you hide this widget from the recent apps screen. To do this go to:

Settings > Display & LED > Searchbar in Recent Apps

Disable the option and the widget should be gone.

I'll try to add screenshots when I get home this evening.


text:
Mount Android encrypted data partition on PC
My Nexus 4 screen met a tragic end due to violent contact with flooring tiles. Everything works except the touchscreen (which displays fine but does not react to touch any more).
I would like to get a full copy of my data partition, but my device uses Full Disk Encryption, with a lock pattern. I can easily get image files of my partitions from CWM recovery through adb:
adb pull /dev/block/mmcblk0p23 ./userdata.img

which gives me a nice 6GB file, but mounting this image is another story since it is encrypted. My PC uses XUbuntu (I also have Windows at hand if necessary, but I guess a linux system is more useful here). My phone is rooted.
I know my unlock pattern of course, so there should be some way to mount/read my userdata.img file. Any pointers ?
Thanks !

Apparently there is no tool on PC to decrypt Android's encryption at the moment, but the TWRP recovery can be used on the device to decrypt everything... Even with a broken touchscreen, as long as your device is supported by TWRP recovery:

Download the TWRP image (2.8.7 worked for me)
Boot into fastboot (power + vol. down on Nexus 4)
Start the recovery, from your PC:
fastboot boot twrp-2.8.7.0-mako.img
Once you are in the recovery, you can decrypt your data from the command line:
adb shell twrp decrypt yourpassword

where yourpassword is your encryption password. In case of schema, translate it to numbers:
1 2 3
4 5 6
7 8 9

if you go through the same point twice, it is ignored after the first time.
Then it will tell you that your decrypted data is available in a block device, I think this was /dev/block/dm-0 for me (not sure). You can back it up to your PC with:
adb pull /dev/block/dm-0 ./decrypted-data.img

And finally, mount the image as ext4 on your Linux PC ! (or use some program that can read ext4 partitions on Windows).
HUGE thanks to the TWRP folks on IRC who told me about the twrp decrypt command !

I think the pattern starts with 0 and ends with 7.

Does successful decryption output a success message indeed? And does it make /dev/block/dm-0 available? Asking for: https://android.stackexchange.com/q/212261/55085

sorry for bumping old thread. but will this work if the TWRP device and the backup source was different device?

I can confirm with 100% certainty that the numbers are indeed 1-9 for the pattern unlock.
My Nexus 4 met the same unfortunate end (except on concrete) and after some Googling, I found this post and was able to follow personne3000's answer in order to mount my pattern-encrypted userdata partition.
I'm running Ubuntu 15.04 x64 and had to apt-get install android-tools-adb android-tools-fastboot in order to continue the procedure.
My pattern is this (3x3 in order from 1-6):
[_   1   2]
[3   5   6]
[_   4   _]

Booted my phone to recovery from bootloader by running fastboot boot twrp-2.8.7.0-mako.img, and then when TWRP loaded, ran adb shell twrp decrypt 234856 and it successfully mounted my encrypted userdata to /dev/block/dm-0.
My 234856 decrypt password, ordered from 1-6 starting on the left, correlates to the positions on the above pattern grid, where '2' in the password correlates to '1' in the grid.
@Rhaegar Android sees the pattern as 0-8, because those are the bytes it uses when generating the SHA-1 hash for storing the pattern (http://www.cclgroupltd.com/a-rainbow-table-for-android-pattern-locks/), but TWRP sees the pattern as 1-9 when decrypting the userdata partition from the command line.
Huge +1 to personne3000 as without him providing that highly valuable information straight from TWRP devs I would not have my Android data right now.
I <3 Stack Exchange :)

While this would work for 3x3 pattern, it wouldn't work for more complext patterns>
Please see the following link if you are trying to decrypt a 4x4 or higher pattern https://twrp.me/faq/openrecoveryscript.html

Does successful decryption output a success message indeed? And does it make /dev/block/dm-0 available? Asking for: https://android.stackexchange.com/q/212261/55085

thanks a lot! this works for decrypting passphrase encrypted phones. tested on xiaomi mi 9, android 10. first adb shell twrp decrypt <passphrase> didnt work, then I ran adb shell and ran twrp decrypt <passphrase>, and boom! data was decrypted. lifesaver.


text:
My Internal storage is being apparently not internal, and cannot move apps to sd
I am running CM10.1.3 and have some form of error:
When I go to install an app, and it is too big, it comes up with the storage error – but it says "external storage", even though I have NEVER used an sd card, so apparently, my internal storage is external, even though it says it's internal on the stock ROM
So, I thought "Well, I needed an sd card anyway" and brought a 2GB on to tie me through until I get a 32GB through. However, upon insertion, it mounts, allows me to use it as a normal sd, but I CANNOT move apps to it using Link2SD: It does just not pop-up on the apps screen, and Link2SD seems to not actually do anything (I don't even get the option to move it).
Can you tell me why my internal storage is not internal, and why I cannot move apps to the external SD, and how to fix both?
My current setup
On my (external) SD card, I have a really small partition (about 30mb) and main one (1.9gb) set up, both are using FAT32. Looks like the 30m partition is pretty useless, so I probably need to re-format the card?
Progress
INTERNAL STORAGE- Honestly,  I don't know where to start.
SD CARD-I have try configuring Link2sd again, to no avail. I also changed the format of the sd to several well used ones.  They either had no effect or came up as "damaged, making the system reset it to FAT32

Apps and their data, yes. And "internal storage" (especially with the error "insufficient") always refers to the /data (or /data/data) partition. But from the OS point of view, everything else counts as "external storage" – follow the reference link from my first comment if you don't believe me :) And that fact stands even with the "internal (emulated) sd card" being FUSE mounted into /data. So it might help to [edit] your Q and point out (step by step) what you're doing with Link2SD and where it fails.

@Izzy OK man,  just don't blow up you answer :)

Summing up from the comments what proved to solve the issue:
Some background
From the system point of view, everything that's not "internal" storage is counted as "external" storage. Especially this includes the external-sd and also the internal-sd card:

Note: don't be confused by the word "external" here. This directory can better be thought as media/shared storage. It is a filesystem that can hold a relatively large amount of data and that is shared across all applications (does not enforce permissions). Traditionally this is an SD card, but it may also be implemented as built-in storage in a device that is distinct from the protected internal storage and can be mounted as a filesystem on a computer.

(Android Developers; emphasis mine)
Moreover: if an internal sd is available, that becomes the "primary external storage" – and the only place app2sd moves apps to.
Link2SD
(I have just updated our link2sd tag-wiki to make this information easier to find)
When setting up link2sd, the (external) SD card must be partitioned correctly – as described by the instructions on the Link2SD site. In short, the card should have the following partitions, both primary:

first partition, using FAT, to be utilized as-usual for your media etc
second partition, using ExtFS (ext2/3/4), exclusively used by Link2SD

You should have two partitions on your SD card and both should be primary.
  The first FAT partition is your standard SD card storage. The second partition is used for application files and can be ext2, ext3, ext4, f2fs or FAT.
You need to use a non-FAT file system (ext2, ext3, ext4 or f2fs) on your second partition in order to link app's private data files. Because the FAT file system (FAT16, FAT32 or exFAT) does not support UNIX file ownership or permissions and will cause a security breakdown of app's private files.
Link2SD does not create the second partition, you need to create it yourself.

(Link2SD; emphasis mine)
Your SD card was partitioned differently (and using FAT only), which will have caused most of the problems you've encountered. And as we've figured: After setting that up correctly, everything seems to be fine.
So enjoy a working installation now!


text:
Generate a location intent to share to other apps from a Google Maps
Normally, the share mechanism in Google Maps Android App shares text (containing an URL pointing to Google Maps website).
There is though an specific location intent in Android, that any app can catch. When I send such intent from other apps, I can embed a location in messaging apps or open that location in different map apps (including Google Maps).
How do I generate such intent from a pinpointed location in Google Maps, from the user interface?
For example, I have installed Maps.ME which does accept location intents too. How do I start a location intent with Google Maps and catch it with Maps.ME, to share a given location? I'm also interested in workarounds if no in-app solution is available.

Generate an hyperlink with desired coordinates as mentioned here.  Sharing this URL, most apps recognise it as URL and touching it raises an intent which the user can opt to use with any supporting app.

@Narayanan I'm trying to share that location as a true location intent. I'm unsure which app should I use to open the URL so that it gets recognized as location intent. Other apps are able to share a location and that can be opened in various types of map apps, including Google Maps App.

For example, I have installed Maps.ME which does accept location intents too. How do I start a location intent with Google Maps and catch it with Maps.ME?

Then in that case Tasker can raise intents. See this, but you have to figure out how the parameters are passed.

this app may help you to bridge different map apps. Here
you open Google Maps and share that location and choose this app. You can then open it using other maps which accepts location intent.
Hope it helps

It is a pity that apparently the Google Maps interface does not offer this already. This is indeed the best user-friendly solution.

@AndresR, i think google did it on purpose because they don't want others to use any third party maps.


text:
How to troubleshoot a regularly crashing Google Play?
I'm using a Lineage OS custom ROM on a Xiaomi Redmi 4A. I can't remember when it started, but quite often, I see a message telling me that "Google Play has stopped working".
This can happen on the launcher screen, or while using an app. I have seen it happen in all apps I use regularly. It happened around 6 times while I was writing this post, but the frequency varies.
I have installed a Logcat Reader application, and captured the log after a crash. This is what I think is the relevant part:
[07-24 15:26:38.492 2654:2699 F/libc]
invalid address or address of corrupt block 0x78 passed to dlfree

[07-24 15:26:38.492 2654:2699 F/libc]
Fatal signal 11 (SIGSEGV), code 2, fault addr 0xdeadbaad in tid 2699 (bgExecutor #2)

[07-24 15:26:38.602 708:708 F/DEBUG]
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

[07-24 15:26:38.602 708:708 F/DEBUG]
LineageOS Version: '13.0-20170307-UNOFFICIAL-rolex'

[07-24 15:26:38.603 708:708 F/DEBUG]
Build fingerprint: 'Xiaomi/lineage_rolex/rolex:6.0.1/MOB31K/fc38c175e6:userdebug/test-keys'

[07-24 15:26:38.603 708:708 F/DEBUG]
Revision: '0'

[07-24 15:26:38.603 708:708 F/DEBUG]
ABI: 'arm'

[07-24 15:26:38.603 708:708 F/DEBUG]
pid: 2654, tid: 2699, name: bgExecutor #2  >>> com.android.vending <<<

[07-24 15:26:38.603 708:708 F/DEBUG]
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xdeadbaad

[07-24 15:26:38.650 708:708 F/DEBUG]
Abort message: 'invalid address or address of corrupt block 0x78 passed to dlfree'

[07-24 15:26:38.650 708:708 F/DEBUG]
    r0 00000000  r1 00000000  r2 00000000  r3 00000002

[07-24 15:26:38.651 708:708 F/DEBUG]
    r4 00000078  r5 deadbaad  r6 f7073f38  r7 ab33a000

[07-24 15:26:38.651 708:708 F/DEBUG]
    r8 00000080  r9 dccd2afc  sl f6fd58db  fp f6fd58e4

[07-24 15:26:38.651 708:708 F/DEBUG]
    ip f706e5d8  sp dccd29e8  lr f703fc6d  pc f703fc6c  cpsr 600f0030

[07-24 15:26:38.658 708:708 F/DEBUG]

backtrace:

[07-24 15:26:38.658 708:708 F/DEBUG]
    #00 pc 00030c6c  /system/lib/libc.so (dlfree+1287)

[07-24 15:26:38.658 708:708 F/DEBUG]
    #01 pc 000157cd  /system/lib/libandroidfw.so (_ZN7android13ResStringPool6uninitEv+38)

[07-24 15:26:38.658 708:708 F/DEBUG]
    #02 pc 0001651d  /system/lib/libandroidfw.so (_ZN7android10ResXMLTree6uninitEv+14)

[07-24 15:26:38.659 708:708 F/DEBUG]
    #03 pc 0001653b  /system/lib/libandroidfw.so (_ZN7android10ResXMLTreeD1Ev+4)

[07-24 15:26:38.659 708:708 F/DEBUG]
    #04 pc 00013267  /system/lib/libandroidfw.so (_ZN7android12AssetManager10getPkgNameEPKc+258)

[07-24 15:26:38.659 708:708 F/DEBUG]
    #05 pc 000132c3  /system/lib/libandroidfw.so (_ZN7android12AssetManager18getBasePackageNameEj+62)

[07-24 15:26:38.659 708:708 F/DEBUG]
    #06 pc 0008894b  /system/lib/libandroid_runtime.so

[07-24 15:26:38.659 708:708 F/DEBUG]
    #07 pc 726cc6e1  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1f93000)

[07-24 15:26:39.752 708:708 F/DEBUG]

Tombstone written to: /data/tombstones/tombstone_06

[07-24 15:26:39.752 708:708 E/DEBUG]
AM write failed: Broken pipe

I have tried to wipe the dalvik cache partition, as well as reinstalling Google Play from opengapps.org. Neither fixed the problem.
What should I do to work towards fixing this?

On which device does this occur? Is the device rooted and/or is a custom ROM installed?

@Robert This is a Xiaomi Redmi 4A, with a LineageOS custom ROM installed.

When installing Open GApps on Lineage OS, it must be flashed together with the Rom. Installing GApps after flashing the rom and booting the phone cause crashes. If you want to use Open GApps with Lineage OS, download both and place them in the memory and first flash the rom zip file. Without exiting the rom flash GApps zip and boot the phone. At the firts boot, you will be asked to configure your google logins and then GApps can be used.
Read installation instructions on LineageOS wiki

Hmm, this might be a thing I did wrong back when I flashed this ROM. What would be the best way of backing up the data before a factory reset? I've heard of NANDroid as a good, comprehensive backup, but I'd think that it would also restore the erroneous state that creates these crashes.

What is the recovery you currently on? TWRP or CWM? They provide recovery/backup tools too. Read this article on XDA or this thread for some comparison.

Thanks for the info. I am currently using TWRP. However, a too-comprehensive backup might, ironically, be a problem. The crashes must be caused by an some incorrect data stored somewhere by something. Therefore, restoring absolutely all data, of all apps, would restore the crashes too. How can I make sure I don't "overshoot"?

I suggest trial and error


text:
USB Debugging: PC doesn't recognize that my Moto E (2nd Gen)(Upgraded to Marshmallow) in on debugging mode
So I'm trying to root my Moto E (2nd Gen) using PC apps such as Kingo Root, One Click Root etc. But the problem is that my PC doesn't recognize that my phone is in debugging mode. Moreover on my Android the following dialog box appears:
Please help me.
I have installed the Android drivers on my PC.

Maybe get rid of the app that shows this popup?

Thanks for the reply iBug, but this pop-up pops up when I enable  USB debugging.

It's probable a builtin app that can be removed only if you have root access. Anyway it's not an Amdroid's feature

Ironic. I want to enable debugging to to root my phone.

No offense, but why are you trying to root with exploit apps? The Moto E series is incredibly easy to root using "official" documented methods... Unlock the bootloader using Moto's official website, flash or boot a supported version of TWRP, and then just flash SuperSU or Magisk and reboot and enjoy without all the King(o) spyware.

The USB Mobile Monitor allows you to connect your Android mobile phone
  or tablet to your PC with a simple USB Cable. All that is required is
  the download of the USB Mobile Monitor App on your device and the
  installation of the USB Mobile Monitor software on your PC.
The USB Mobile Monitor allows you to replace the keyboard, mouse and
  computer screen of your PC with a single device.

Source: http://www.usbmobilemonitor.com/home.html
This is a kind of built-in system shipped with your device I guess. So,I think you need to install the APK version to get this works. It can be found here. Then follow the usage on this page.
After that, try enabling USB Debugging again.
For the rooting part, follow this guide on XDA Developers.

Go to Settings → About phone, tap Build number field 7 times.  You will begin seeing a message as you approach the 7 touches as shown below.
Ater that hit the back button and scroll down and enable usb debugging mode

Try factory resetting, then attempt a root with direct flashing through ADB.  Probably would work better, and if you're rooting then you'll lose all your data anyway.
Cheers,
Neveraht.


text:
Is it possible to add the NFC to the phone which does not have it?
My phone is a Motorola Moto 2g LTE (xt1072). It is really good phone but there is a one problem, it does not have NFC. Is there any solution, to add NFC to the phone which does not have it – and would Android be able to use it then? If yes to both, could you provide some links to such existing "equipment" as proof that it's not only "a nice theory"?

NFC SD and SIM Cards seem to be an option, but I don't know much about them

@beeshyams I searched through the net but I did not find any market in which the NFC SD card is sell. Could you provide me with a link?

Checking the link @beeshyams gave, that text exists at least since 6/2012 – yet I couldn't find any such SD or SIM card up to today (ie. more than 4 years later). Looks like there were some start-up productions back in 2010/11, though – well, they've produced microSDs with NFC. But the article doesn't state if and where those were/are sold. At least Amazon doesn't have any.

related: Does NFC enabled phone means the phone has an NFC tag inside?https://android.stackexchange.com/questions/108776/does-nfc-enabled-phone-means-the-phone-has-an-nfc-tag-inside?rq=1

Sorry to say this, but it seems to be a long way off before truly turning a NON NFC into NFC phone (as pointed out by Izzy in comments, there have been some efforts but no progress)

NFC SD and SIM Cards claims that Both SIM and SD cards can be equipped with NFC chips can be used to enable.
Toshiba has come up with NFC SD card last year, but the catch is that it requires NFC enabled device to work with. All it does , is enabling seeing the contents of SD card without physical connection
NFC-enabled SIM cards launched a couple of months back in Singapore for paying for rail travel- but they work only with NFC enabled phones

Could you provide me with a link to such a NFC SD card?

click on the link above ! it shows Amazon prices too

I want to enable NFC with SD card. Not to have SD card which I can enable with NFC

that is not possible as I said in the first line of the answer

Turning Non NFC phones into NFC by using SD cards/ SIM is not a reality- so there os no way you can turn your device into NFC

What means "it requires NFC enabled device to work with"? (Why would a device that doesn't have NFC be "NFC enabled"?)

@JinSnow Only to emphasize that you can't use them on phones that don't have NFC


text:
Sony Xperia Z4 stuck at boot after upgrading to Android 6.0
A few minutes ago, my sony xperia z4 tablet noticed me to upgrade to android 6.0.
Now my tablet no longer boots. There is just a text "Error" and a little lying android man.
I tried to Reboot in Recovery Mode by Holding Power and Volume Up Key but it does not work. Nothing happens.
What can i do?

Download Sony PC Companion for Windows/Mac.
Shutdown your tablet and connect it to PC in recovery mode while holding down volume up/down key. Instructions will be shown on-screen if you're not clear with my explanation.
Click on Repair my phone/tablet.
Follow on-screen instructions afterwards. It'll take sometime to download necessary files.
If everything goes right you should disconnect the device and boot it up. Remember first boot takes more or less than 5 minutes.
Support link just in case if needed --- Repair using PC Companion [detailed].

That what worked for me last time I updated Sny


text:
Hard brick phone exchange and deleting data
I have a Samsung Galaxy Note 4. While it was charging (it was near full charge) it rebooted on its own and continued to charge. It then must have shut itself down because it was off. I could not turn it on when I checked again. I recently completed the OTA update to Android Marshmallow. That was about a week or two before this happened. I was reading why this could happen and something about a failure of the eMMC seemed to make sense.
I've tried to replace the battery with a new battery and tried a new charging cable. Neither of those worked. I read some posts that suggested removing the SIM card and the SD card and also holding different combinations of buttons but none of those work. Unfortunately the PC doesn't see the phone either (and I tried a Mac too). So I see no chance to revive the device myself, and thus have to send it in for service.
For a cost, I have an exchange pending through my mobile carrier. Should I be concerned that I can't turn on the phone to delete my data (pictures, messages, work related notes)?

I assume that I will be required to turn in my phone to my mobile carrier and they will replace the motherboard and send it out as a refurb but what if they find a simpler fix and the phone is operational without replacing the motherboard?   Then my data will be there.
I do have additional third party insurance so I could mail the phone for repair to the phone manufacturer (for a fee that the insurance would later cover) rather than continue with the exchange thorough the mobile carrier.  I'll still likely lose my data and there may be a long delay in getting the phone back.
I've just been told to never turn in a phone without wiping it and that is why I am hesitant.  I know some people who don't turn in phones at all (they keep them or destroy them) out of concern that information can be retrieved.  I've tried some local shops but when simple battery changes don't work most shops aren't interested in finding a fix for the problem.  While it may be extreme, with the phone in my possession, I am still hopeful that I can find a fix whereas if I exchange it I won't have that chance.  However exchanging is my cheapest and fastest option to have a working phone.
Any advice?

Well, that really seems to be a brick (see: What does it mean to “brick” your phone?) – and obviously leaves you right at the beginning. As I've said, the possibility exists your data could be read. How likely that is is a different question. If the storage is really dead, unless you're the president of something big, efforts to do so wouldn't seem worth it (if I were the repair man).

Thank you very much for the link.  That was very helpful.  I have done updates when the battery power is low so I wonder if that could be a cause. I also have unfortunately used Kies (a long time ago though).  I had read about the JTAG process too previously.  It seems like that is the only thing that could work.  Like you mentioned, I'm guessing a repair person wouldn't try that.  Instead it seems he would switch out the motherboard, recycle the old board (melt the parts down for the metal), and sell the phone as a refurb?  Obviously who knows but then data should be gone right? Thanks again.

No guarantees – but yes, that's what's most likely.

Summing up from the (now purged) comments:
As the device really seems to be bricked beyond the chance of repairing it yourself, there are indeed only two options left: Keeping it as a paper-weight to protect your data – or sending it in under warranty/insurance to get it repaired, with the risk that someone might try to get a hand on your data.
While the latter is definitely possible, and there's no 100% guarantee against it, check the facts on how likely this will be: the harder it is (and currently, it looks pretty hard), the more valuable data one must expect to be on the device to consider the efforts worthwhile. If you were the president of "something big", or there were other reasons to suspect "top secrets" on the device, it would be one thing. But – no offense meant – the device of some "average user" hardly seems to justify it:

if the eMMC chip was really fried, it would require very expensive forensics work to recover even parts of the data
if the motherboard broke, considering the SoC design repair costs would demand to simply replace it. To get to the data, the chip would have to be unsoldered and placed on another board, or at least JTAGged (too much effort again)

So, no guarantees – but it's quite unlikely someone would care restoring the data. Not even as a special service to you – unless you're willing to include a bank cheque holding at least a 4-digit sum (in front of the decimal of course).


text:
Lenovo Tab 2 Partition Layout
I own a Lenovo Tab 2 A7-20f.
When I try cat /proc/emmc:
partno:    start_sect   nr_sects  partition_name
emmc_p1: 00000400 00000002 "ebr1"
emmc_p2: 00004800 00005000 "protect_f"
emmc_p3: 00009800 00005000 "protect_s"
emmc_p4: 0001ec00 00003000 "sec_ro"
emmc_p5: 0002e800 00300000 "android"
emmc_p6: 0032e800 0003f000 "cache"
emmc_p7: 0036d800 00b18000 "usrdata"

And when I use cat /proc/partitions:
major minor  #blocks  name

   7        0       9570 loop0
 253        0     524288 zram0
 179        0    7613440 mmcblk0
 179        1          1 mmcblk0p1
 179        2      10240 mmcblk0p2
 179        3      10240 mmcblk0p3
 179        4       6144 mmcblk0p4
 179        5    1572864 mmcblk0p5
 179        6     129024 mmcblk0p6
 179        7    5816320 mmcblk0p7
 179       64       4096 mmcblk0boot1
 179       32       4096 mmcblk0boot0

I don't think this is the typical Android Partition Layout. Any Idea which one is the Recovery and the Boot partition?
Or how to find it out?
Update:
When I lookup /proc/dumchar_info I get
Part_Name  Size    StartAddr   Type    MapTo   Region
preloader    0x0000000000040000   0x0000000000000000   2   /dev/misc-sd     BOOT_1
mbr          0x0000000000080000   0x0000000000000000   2   /dev/block/mmcblk0     USER
ebr1         0x0000000000080000   0x0000000000080000   2   /dev/block/mmcblk0p1   USER
pro_info     0x0000000000300000   0x0000000000100000   2   /dev/block/mmcblk0     USER
nvram        0x0000000000500000   0x0000000000400000   2   /dev/block/mmcblk0     USER
protect_f    0x0000000000a00000   0x0000000000900000   2   /dev/block/mmcblk0p2   USER
protect_s    0x0000000000a00000   0x0000000001300000   2   /dev/block/mmcblk0p3   USER
seccfg       0x0000000000020000   0x0000000001d00000   2   /dev/block/mmcblk0     USER
uboot        0x0000000000060000   0x0000000001d20000   2   /dev/block/mmcblk0     USER
bootimg      0x0000000001000000   0x0000000001d80000   2   /dev/block/mmcblk0     USER
recovery     0x0000000001000000   0x0000000002d80000   2   /dev/block/mmcblk0     USER
sec_ro       0x0000000000600000   0x0000000003d80000   2   /dev/block/mmcblk0p4   USER
misc         0x0000000000080000   0x0000000004380000   2   /dev/block/mmcblk0     USER
logo         0x0000000000300000   0x0000000004400000   2   /dev/block/mmcblk0     USER
expdb        0x0000000000a00000   0x0000000004700000   2   /dev/block/mmcblk0     USER
tee1         0x0000000000500000   0x0000000005100000   2   /dev/block/mmcblk0     USER
tee2         0x0000000000500000   0x0000000005600000   2   /dev/block/mmcblk0     USER
kb           0x0000000000100000   0x0000000005b00000   2   /dev/block/mmcblk0     USER
dkb          0x0000000000100000   0x0000000005c00000   2   /dev/block/mmcblk0     USER
android      0x0000000060000000   0x0000000005d00000   2   /dev/block/mmcblk0p5   USER
cache        0x0000000007e00000   0x0000000065d00000   2   /dev/block/mmcblk0p6   USER
usrdata      0x0000000163000000   0x000000006db00000   2   /dev/block/mmcblk0p7   USER
bmtpool      0x0000000001500000   0x00000000ffff00a8   2   /dev/block/mmcblk0     USER
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate
Now how can I found out which one is the system partition and why are Boot and Recovery one partition?

What does ls -l /dev/block/platform/*/by-name reveal?

After enabling expert mode in its settings, what does DiskInfo  show?

Related: How to list all major partitions with their labels?

There is just a "by-num" directory. Nothing new in it. Just the known numeric names.
http://imgur.com/tMimJwW http://imgur.com/soJuVXR

Thanks @Izzy! Your solution seems to be the best I found until now. Will check if it really helps. You may post this as answer in the meantime so we can close this. ;)

That would be duplicating the answer. Better idea would be I check a little deeper and give an answer closer matching your issue :) Also be welcome to give my Adebar a try for that. Works on Linux, but also on Windows in Cygwin.

Agreed. Your tool seems interesting. Will have a look at it.

@Izzy I updated the Question. Boot and Recovery are on one partition what seems to be a bit curious to me.

Why are Boot and Recovery one partition?
This you can find answered in a Wiki entry at Github. Quoting the relevant part:

Since MTK devices use the uboot mechanism, partitions including boot and recovery, are not revealed as separate partitions, but rather accessed sequencially by size and start parameters.

You can see that reflected in your output of /proc/dumchar_info: size is the second column, start sector the third. Think of it like "disk images stored on a raw medium" (not an exact description, but easier to visualize).
Which one is the system partition?
My first guess (by the name) was sec_ro (as system is "ro", read only). But that's not exact enough. To find out, you'd need the sector size and the size of your /system partition, then you can do the maths: /proc/emmc gives you the "number of sectors" each partition occupies, in HEX. sec_ro accordingly occupies 0x3000 sectors, that would be 12288 in decimal. At a sector size of 512 bytes1 that would be 6 MB – too small :) A better guess probably is p5 named "android", which sums up to 1.5 GB – that seems to be the correct size. cache is /cache and usrdata will be the /data partition.

1: according to Understanding MTK’s MBR/EBR File Format

Thanks, very helpful. I think I solved the problem through that.


text:
`fastboot oem unlock` does nothing. No output
I tried unlocking the bootloader of my YU Yuphoria on Linux (Ubuntu 15.04). Here is the link to the CM page from where I got the instructions from. I followed all the steps mentioned on the page. When I use the following command
fastboot -i 0x2a96 oem unlock

However, this is the output that I'm getting.
...
OKAY [  0.001s] finished. total time: 0.001s

It does not show any kind of warning that the data on the phone will be erased. ADB and fastboot are detecting the device. Here is the output for fastboot -i 0x2A96 oem device-info
...
(bootloader)    Device tampered: true
(bootloader)    Device unlocked: true
(bootloader)    Charger screen enabled: true
(bootloader)    Display panel:
OKAY [  0.005s] finished. total time: 0.005s

I tried flashing the recovery.img after that, but it does not work.
What am I doing wrong?

I finally got it to work. I tried flashing the recover using the command:
fastboot -i 0x2A96 flash recovery twrp.img

That didn't work. So instead I booted directly into the recovery mode using:
fastboot -i 0x2A96 boot twrp.img
Once I was in the recovery mode I was able to flash the ROM normally.


text:
Use different lock-screens on htc sensation
Is there a way to use other lock-screens on the htc sensation then the one that is provided by htc sense without installing a custom rom? (rooting is fine) I would love to use the standard android lock-screens, is that possible? (I don't care if it is achieved with an app or by modifying the settings)

There are some "lock screens" like Go Locker, but they are not "real" lock screens. Lock screens are just about the only part of the android OS that cannot be replaced by 3rd party applications. These other lock screens attempt to override the real lock screen. Some of them work fairly well, but I always notice some type of lag when turning on the device or unlocking the device.

I googled and found the Best List of Android lock screen apps that will help your productivity,reading ability and get live scores on your lock screens.you'll be really find it useful Android lock screens


text:
How to get 2012 Chevy Equinox to recognize my Evo 3d?
When I plug my Evo 3d into my 2012 Chevy Equinox (w/color touch radio), the Equinox does not recognize the phone. I'm using a micro USB cable to connect my phone to the vehicle. After plugging it in, the Evo 3d starts charging, but the Equinox does not show any available USB connection.
Iphone 4 is able to plugin and get recognized just fine.
How can I get the Equinox to recognize the Evo 3d so I can play audio from my phone through the Equinox stereo?

I have noticed a lot of vehicles that do not recognize any android devices but they do recognize iphones/ipods. This is something the manufacture has to add support for. These manufacturers usually use a proprietary system in the vehicle and they don't seem to think anyone uses anything besides an iphone or ipod.
You may be able to use bluetooth to transmit the audio from your device to your vehicles stereo.

On most android phones SD card storage cannot be used by both the phone itself and another device simultaneously. So for the Evo 3d to be available to your Equinox' player you might have to do something like tap on Turn on USB-Storage (not sure if this is your case) or choose Disk Drive when prompted about Connection Type on it. During this time the apps that you've moved to SD card cant be run, neither can you browse the SD card contents from your phone.
BTW, if your vehicle supports bluetooth with A2DP profile, that might be more convenient.


text:
Shell utterly borked, toolbox claims "no such tool"
HTC Magic, rooted with CyanogenMod 5. Tried to install busybox using "Busybox Installer" from the Market, ended up with a strangely borked system. Android does not boot, freezes on the splash screen. ADB shell, however, works. On the other hand, almost none of the commands work.
The busybox file is in /system/xbin, it seems. However, whenever I call it, I get "Permission denied". Even after sudo.
Running common commands like ls, cp, ln gives the same error message: "permission denied". Seems like those are symlinks to busybox, which is borked, see above.
/system/bin/toolbox is there, but it refuses to do most useful commands with a uniform message "No such tool". Ls, cp, mount, chmod, chown - "No such tool". Experimentally I found that set, ps, kill, reboot work. Is there a list of toolbox commands out there?
The only message of relevance in logcat is "02-02 01:36:38.280: E/logwrapper(61): executing /system/xbin/busybox failed: Permission denied". I kinda knew that.
I can write to the SD card. Is there a way to reflash the busybox while making it executable?
Is there an executable file anywhere on /data, so that I could push a copy of busybox there?
I can reboot into recovery mode, which is Android's own recovery mode.
Any ideas how to bring the system back to usable state? The phone is a scratch phone, so data loss is not an issue - there's no good data there.
It seems like making busybox executable somehow would bring everything back. I'm utterly lost, however, how to do that. And I'm rather surprised toolbox won't support chmod.
EDIT: funny data point. When I boot into recovery, I still can do ADB shell. And I get a completely different environment - there's command line with ls, busybox (!) and stuff. /system is almost empty. From that environment, can I somehow go back to the regular /system? The mount command is available.

If you can flash a custom recovery, it may have a "fix permissions" option.  CWM does.

Off the top of my head, you could try pushing a busybox binary to /data/local and then using it to chmod the one that's in /system/xbin.

@eldarerathis: when I push busybox to /data/local, it won't become executable. And I have no chmod at my disposal.

Oh right, it won't have executable permissions after being pushed. Custom recovery might be a good bet then, as @MatthewRead mentioned.

@eldarerathis It does, but RM requires a booted device ;).  Seva, can you su while adb-ing in recovery?  That might make everything visible.  On my Vibrant the "environment" is exactly the same as normal when in recovery, so I would hope it's not actually different for you either.

Per your last edit: you should be able to mount the device's /system partition from recovery. mount /system by itself works for me, but I don't know if that varies by device/recovery/etc. This is on an HTC EVO.

@eldarerathis: figured that one out. Funny, looks like recovery is a spare Linux instance.

Yay, the phone boots again.
Here's the magic recipe.
Boot into recovery.
adb shell
mkdir /data/s
mount -o rw -t yaffs2 /dev/block/mtdblock3 /data/s
chmod 755 /data/s/xbin/busybox
Reboot the phone.

My shell is back. There's a weird quirk now - ls (from the busybox, one assumes) thinks ADB is an ANSI terminal and tries to emit ANSI escape sequences. Still, yay.

That was my guess - that the permissions were not set to allow busybox to actually execute by the normal user.


text:
Tools for using connected phone via PC/Headset
My question is: Are there any tools to use a via USB connected android phone on windows/pc?
I'm using a analog headset and want to answer calls via the headset when my phone is connected.

A Phone connected through the USB, no.
But if the phone is instead connected through bluetooth to the PC, you can try to turn on HFP (Hands Free Profile) Bluetooth profile service from your PC's bluetooth stack. The only way I found this possible was from the BlueSoleil Bluetooth Stack Software where you can set the bluetooth to parade as a "headset" instead of "laptop/desktop" and hence your phone can connect to the PC thinking it is a headset.
However, BlueSoleil is not free and the evaluation version allows only 2MB worth of voice data packets in one connection after which the connection is automatically interrupted.

Looks like you're right but in one point: Depending on the BT driver it's possible to use the phone for free. See also: http://superuser.com/questions/58632/can-i-use-my-pc-as-a-bluetooth-headset-for-my-mobile-phone


text:
Unable to change time in Android emulator: Alarm driver missing
I am running Android 4.4 (using custom a custom rooted system image) in the android emulator (from the command line). When trying to set the time via Settings > Date & time ("Automatic date & time" and "Automatic time zone" are disabled) i can set the time (the dialog appears and works), but the system clock is not updated.
Logcat says:
D/        ( 1206): Setting time of day to sec=1515250620
W/        ( 1206): Unable to open alarm driver: No such file or directory

What could cause the alarm driver to be unavailable/missing and how can i fix this?
Update: I have verified that /dev/alarm is missing -- is there any way to add the missing driver without having to recompile android?
Thanks!

Yes, but some compiling is needed for the driver. Just not the whole custom image.
You need to set-up a cross compiler.
Go to your .config file and set the kernel driver you want to compile to

=m

using the menuconfig command
By selecting 'm' for the kernel driver. This means ``module,'' meaning that the system will compile it, but not directly into the kernel, but as a loadable module."
Now you are ready to compile your specific driver using this make command.
make <ARCH= Path to arm-eabi- directory >  <path to the .c file of module>

Once compiled go grab the created .ko file. Copy it to

/system/lib/modules/

within your custom rooted system image.
Lastly, from the terminal emulator use the insmod  command to inject it in. So it would look like
su

mount -o rw,remount,rw /system

insmod /system/lib/modules/modulefile.ko

That should do it if you encounter any errors read them carefully incase the module is interdependent. Check the Dmesg logs for success or errors.
References:
https://source.android.com/devices/architecture/kernel/modular-kernels#loadable-kernel-modules
http://linuxdocs.org/HOWTOs/Kernel-HOWTO-4.html


text:
Can't open Market application after updating my Samsung Galaxy Tab
Just updated firmware for my Samsung Galaxy Tablet.
Now I can't enter Market application. When I click the Market application icon, I get this message "Application not installed". And update was completed successfully with Kies.

Which version did the update give? (Settings -> About device -> Android version and Build number)

Build number: HTJ85B P7510XWKL1 Android version: 3.1

Are you trying to access the Market from a home screen shortcut or from the app drawer? Updates can sometimes break shortcuts so try to open it from the app drawer. Another thing you can try is to reset market data from Settings -> Applications -> Manage applications -> All -> Market -> Clear data and Clear cache.


text:
Enable the Android market on a kobo vox
Based on its cheap price, I'm considering purchasing a Kobo Vox. The only downside I see to it is that it the market isn't enabled on it. Is there a way to enable the Android market on it once I get it?

Well, only if your rooted. You would manually have to install the g-apps recovery update zip.
If you tell me your country and phone type, i can provide a link, or you can see all available versions here:
GApps Downloads

The kobo box is a cheap (price) tablet and it does have some issues. You better google and read about them before buying one.
That being said it can be made to run the Google Android Market. Note that you'll need adb or root'ing your device to do so. You'll also need to repeat those steps every time an update is available for the tablet (since it will rewrite the partition were you're making the changes).
Still interested ? ;-) If so then the best instructions for rooting and installing the market are available on mobileread.com.
Have fun!


text:
How do I check tcp packets when they were blocked by droidwall?
I'm using cyanogenmod's rom with droidwall activated with whitelist mode, and nothing checked.
I've seen some strange ips being called, and droidwall blocking them. I wan to analyse these packets. Which is the best way?
PS: I dont have Android Market installed.

Cyanogenmod has tcpdump installed. You can run it from the shell, just make sure you select the correct interface:

tcpdump -i tiwlan0 -vv

Or, you can write the dump to a file on your sdcard, and analyze it with Wireshark on your desktop later:

tcpdump -i tiwlan0 -w /mnt/sdcard/tcpdump.out

There is also software like Shark for Root, which will capture the packets like tcpdump (it requires root, but does not require tcpdump, which is available on my Cyanogenmod 7.1, but I'm not sure if it is available in all versions of Cyanogenmod).

Thanks @haimg. The sdcard option is really interesting. If I stop the command, will it have all dumps from before stopping?

@SomebodystillusesyouMS-DOS: Yes, that's the idea...

I've disabled my adsl modem, and tried to do this command, but it didn't save any http packet. Is this command correct? Am I doing something wrong?


text:
Rooted phone - sending SMS message via command line
I have a rooted Droid (Sholes), with ConnectBot installed.  I can ssh into it via dropbear copied to /system/xbin, and/or also the instance of Debian installed on it via the "Linux Installer" application.  I'm in portable Linux bliss.  But...
I would like to send an SMS message via the shell.  Something like
 sendsms 8005551234 "This is a text."

Anything like this out there?

You should be able to call the messaging intent with
am start -a android.intent.action.VIEW "sms:numberhere" -e "sms_body" "hello"

Using the intent command as described here:
http://learnandroid.blogspot.com/2008/01/run-android-application-from-command.html
https://stackoverflow.com/questions/4967448/send-sms-in-android

An alternative approach is to install Termux and Termux-api
Then ssh in the phone by following this link
Now you can send SMS and access many other useful options mainly:

Camera
Battery Status
Clipboard
Contacts
SMS and Inbox

Full list and syntax can be found here
As it is linux emulator you can use it for many other purposes also.

Seding sms is no longer permitted by google for termux: https://wiki.termux.com/wiki/Termux-sms-send


text:
Why are apps on Aptoide newer than the Play Store?
I have seen many of the usual apps such as YouTube, Facebook, and Google Maps even, that have a newer version in Aptoide rather than Google Play Store.
How is this possible since Google Maps and YouTube originally come from Google Play Store? Are these apps safe to download from the 'apps' store in Aptoide?
Also on the YouTube app in Aptoide, it doesn't have the 'Trusted' shield, it says 'Unknown'.

People may be uploading the various betas for these apps.

As you didn't tell which repo you've found them in, it might well be fakes with some "lovely addons" you'd better not try. Please see my answer to How safe is it to use Aptoide? on how to make sure you don't get "crap" (e.g. stick to "safe repos" like the one called "Apps", and watch out that the apps you download have a "green shield").

@Izzy  Yeah i did, i mentioned asking are they safe to download from 'apps' store in Aptoide?  because thats where youtube, maps, etc are available as newer versions. if its beta, it usually SAYS BETA. but in the current case, it doesnt. it just says newer versions are available. newer than google playstore?? i just dont understand.. this happens often.

Ah – sorry. I always said the name is a bit confusing. Especially when people spell it lowercase and not with an "uppercase A" :) Guess Andy's answer matches those candidates then.

Staged rollouts, alpha and beta testing.
APKMirror states testing builds clearly, for example on Google Apps:

Basically this. Since the update rollout from Play Store is staged, some people get the update earlier than the other, and they share the APK to other (e.g. XDA, APKMirror, Aptoide) for other people to sideload it. It almost always happened to me when reading new features of Google apps' update, when I haven't got the update yet.

Ok kinda makes sense now.


text:
Disable the autofocus on click in Google Chrome on Android
I am reading a diagnostic book and browsing pictures with my Samsung Galaxy S4.
I do not like the autofocus on click in Google Chrome on Android.
How can you disable the autofocus on click in Google Chrome on Android?

You cannot because the big player do not need to do their best to satisfy minority customers. Change your internet browser: Yandex Browser should work.


text:
Has the OEM messed up?
I recently acquired a new Alldaymall A88S tablet running on Android 4.4.2 KitKat
It appears to be a stock recovery, stock ROM. It was not new, but it was untouched.However, when I booted it, and peeked into the settings, I found some bizarre things:

I can record the screen without root (Never mind. I have root, the screen decoder is built-in)
Developer options was already unlocked, with USB debugging and allow mock locations already ticked.
I have access to mobile data options- yet I have no SIM, and nothing to suggest I should have These options exist
Most bizarrely, I have the ability to change the runtime between Dalvik and ART freely, from the developer options.

Has the OEM really failed/deviated from the norm, or has the previous owner tweaked it?

"It was not new, but it was untouched"... What exactly does this mean? But more to your point, it would be EXTREMELY unlikely the OEM has USB Debugging enabled by default. I would use a root checker app to see if it's rooted, then factory default it and see if developer options disappears.

@acejavelin ah, well, there's an issue. It has Root access. To your first point, its how someone would say "we've never used it" when you buy a second hand item from them

It's possible that the previous owner rooted the thing or even flashed a custom ROM on it, but simply did a factory reset before handing it to you.

Some custom ROMs are known to have USB debugging enabled by default.
The existence of mobile data options might indicate that the custom ROM was built for or ported from a SIM-enabled variant of the device. However, it might also be a more pleasant surprise - it might support using certain 3G dongles via USB-OTG. That's the case for one of my past tablets.
You are free to change between ART and Dalvik even on stock Android 4.4.x. Some OEMs do hide the option but it's unlikely your OEM is among one of them.

Ultimately I'll say if your device is running normally then just let it be.

Well, that helps. Any idea on what dongles might work?

@DanBrown Nope... Back when I owned that tablet (which has a Rockchip RK3066 SoC, popular for cheap tablets), similar tablets flood the market but none of them offered the same list of supported dongles. They do commonly support ones from ZTE and Huawei but still the exact models varied a bit. The only way to know for sure is to try acquiring info from the manufacturer.