Saturday, October 31, 2015

contacts - How do I edit/add a birthday in the `people` app Cyanogenmod 11?


I have Cyanogenmod 11 M8.


I keep my contacts on the phone, not sharing them in the cloud, I prefer to run only AOSP software and FOSS applications from F-Droid.


Somehow I can't add/edit birthdays in the people app. Shouldn't this be a basic feature for a people application .


I know they are somewhere because the birthday adapter shows the imported birthdays from my VCF file in the calendar.


So how do I add a birthday?



Answer



On Cyanogenmod People, to see and edit the Events field (birthdays and anniversaries only available in this case), the People contact has to be in an Account, not on the phone only. I also do not use a cloud service for my own privacy reasons so I use MyPhoneExplorer app for PC synchronization and the associated but seperate MyLocalAccount app for Contacts storage, both on Play Store. If you decide to use MyPhoneExplorer/MyLocalAccount be sure to synchronize contacts into MyLocalAccount. When I realized this solution and installed MyLocalAccount (I had already been using MyPhoneExplorer) the older existing contacts did not synchronize with MyLocalAccount and I still had no Events field. I had to mass delete all contacts on the phone (easy with MyPhoneExplorer) and re-synchronize with MyLocalAccount. BTW, I use Outlook on my PC. Problem solved. Yes Android can be quirky but that's why we use it, right?!!


Thursday, October 29, 2015

motorola - Battery Level Instant Drop


Recently, muy phone has had several instances of instant battery level drop; not as in quick drain, but rather, immediate drop. I've been able to document these two occurrences :


INSTANT DROP


INSTANT DROP


Between the first and second occurrence, I uninstalled apps that were using data on the background (such as games and whatnot), I monitored the battery usage per application, disabled unused applications, and used motorola's app battery optimization. And while doing all that did in fact improved my overall battery life, that didn't prevent it from "spontaneously" dropping to near 0%.


Also, I noticed that in both cases, there was a slight increment in battery level, before dying (It was charging but I had to unplug it to attend a call).


Finally, there was no significant phone or battery heating that I could perceive.



Another sympton, although I'm unsure this is related in any way, is that my phone turned off, as if battery completely depleted, while having battery level at 15:


Phone shutdown


I've tried wiping my cache partition, and hasn't occurred since; however, I think that this might be purely coincidental.


My phone information:


Motorola


I have not been able to find this question repeated here on SE.


Any further needed information I can provide, please ask.


Regards.




How can I get a overview and manage the default applications for file types?


Most OSs show a nice summary about which application will be used to open a certain file type. Android does not seem to have such a function.


How can I track and manage the default applications?



Answer



As you maybe already know, for each application that currently is a default application for something, say a PDF viewer, you can reset this default in the application settings (Settings -> Applications -> Manage applications -> Your app -> Clear defaults). After this, the next time you perform the action (e.g. open a PDF), a popup will appear, letting you choose a new default.


As far as I know, this is all you can do with stock Android.


There are however, 3rd party apps, that give you an overview of the currently set default applications for common things, e.g. Default App Manager.


Corporate Exchange Email Won't Send (stuck in outbox)



I have a corporate sync account set up to sync my work calendar, contacts and email. I had some trouble setting it up, but once I got it set up it worked just fine for a couple of months. Then about a week ago it stopped sending emails. I can still receive emails. Also, the internet still works on the phone. Gmail still works. Sending and receiving calls and texts still works. But when I send an email it gets stuck in the outbox.


I have tried removing the corporate sync account and adding it back. I have tried restarting the phone multiple times and doing a manual refresh each time. I have tried various combinations of security settings (Use secure connection and Verify Certificate). Nothing helps.


I can't believe no one has asked this yet! Based on the forum posts I have read, it seems like a common problem. Is there some solution waiting in the wings?


[Droid 2 w/ Froyo]



Answer



The first thing I'd suspect is that a database used by the Email app is corrupted. To fix this, you need to go to Settings -> Applications -> Manage applications, find the Email app, and clear the data for it. (If you see anything like "Email Storage" be sure to clear the data for that as well). Then re-add your account and see if that helps.


If that doesn't work, I recommend asking your company's IT department if they have changed any settings for the Exchange server recently.


Wednesday, October 28, 2015

touchscreen - Touch enabled monitors and Android



I need to buy new monitor for my PC and I'm thinking about touch enabled monitors like DELL ST2220T or IIYAMA T2250MTS. I recently bought Gooseberry Board with Android on it and it would be great if I could connect it by HDMI cable to one of these monitors and use touch screen like i would on a tablet. Does anybody know if Android can work with such touch enabled monitors? Maybe someone have touch enabled monitor and could check it somehow?



Answer



The touch-screen part of a touch-screen monitor doesn't work over HDMI, but with a separate USB interface. It requires drivers specific to that monitor. To make it work with the Gooseberry Board under Android you'd have to find or write drivers for that monitor.


wi fi - Free Wi-Fi network: how to autoaccept (robotic click) wifi policy web page?






Possible Duplicate:
Can I automatically log in to open WiFi that requires web login/password?



At a hospital, there is a no-password Wi-Fi network which is for guest and prior having internet, I have to click "Accept" button on an initial web page I get in a browser. The page is super simple, single frame with single button at the bottom called accept.


There is an app in the play store which can open browser so that I can click the accept button.(app name: Auto Wi-Fi Prompt) Well, is there a way to write such script which will make even the "accept" click for me? (e.g., llama advanced config and a ".bat" file after that)


for example, once I activate Wi-Fi, it detects being connected to hospital-guest and will auto-click accept for me.




How Android's permissions mapping with UIDs/GIDs works?


Reading the book: Android Security Internals I'm reading at Chapter 2 - Permission Management paragraph that permissions are assigned to application at install time by the package manager with a mapping like Apk's UID <-> Permissions.


Later in the book (Permission Assignment - Permissions and Process Attributes paragraph) I read that



If additional permissions have been assigned to the application, they are mapped to GIDs and assigned as supplementary GIDs to the process.



And, since android.permission.INTERNET permission is associated with inet GID:




any process for an app that has been granted the INTERNET permission is associated with the supplementary GID correspond- ing to the inet group



But I was asking me if this is always necessary.


Imagining a case where you install APK X declaring android.permission.INTERNET permission in AndroidManifest.xml, since mapping of permissions with UIDs is done at install time, PackageManager should be able to map the permission directly with the APK's UID instead of adding inet GID to your APK package. So I'm wondering why it has to be that:



any process for an app that has been granted the INTERNET permission is associated with the supplementary GID correspond- ing to the inet group



Anyone can clarify me this?



Answer




Android's permission management can be divided majorly in two parts: Linux kernel and Android framework.


DISCRETIONARY ACCESS CONTROL:


Discretionary Access Control (DAC) based on users, groups and access mode predates back to early days of UNIX. Every file (including directories) and process has a user owner (UID) and a group owner (GID). So a process is allowed to Read Write and eXecute a resource depending on its access mode bits (RWX) for User, Group and Others (UGO). These permissions attributes are saved along with files on filesystem.
UID/GID 0 is special for Linux kernel; it's the super user (administrator) that is never denied from doing anything. All other users in range 1-65534 are non-privileged IDs which an OS can use in whatever way it wants to control access.


Android reserves UIDs in range 1000-9999 for system use unlike Linux distros where 1000 is usually the first UID assigned to human users. Android is designed for single human user but every Java app, whether preinstalled (as system or user app) or installed by user, is treated as a user. UID range 10000-19999 is reserved for these apps. At first boot (for preinstalled apps) or when installing a new app, a unique UID/GID is assigned to the app which is static unless the app is uninstalled. This app vs. UID mapping can be seen in file /data/system/packages.list or using command id (1) if the app provides a shell or can execute native binaries.


All of these UID's have hard-coded names on Android which are predefined, unlike Linux distros, where there are almost standardized naming conventions for users and groups which can be added / removed in /etc/passwd and /etc/group. Android shares only root user name with Linux. However these names are only for the ease of human users, for kernel only numbers (UID/GID) mean.


Access Control Lists (ACLs) can be used to extend DAC for more granular privileges but those are rarely used on Linux and (AFAIK) not used on Android.


LINUX CAPABILITIES:


Root user's authorities are further divided into subgroups called capabilities. Instead of using UID 0 whenever an elevated task is to be performed, a non-privileged UID can be granted only the required capability. File capabilities which are attached to files using Extended Attributes (XATTR), can also be used to elevate process capabilities whenever required. Android makes use of File Capabilities as well as Ambient Capabilities. See this thread for more details.


MANDATORY ACCESS CONTROL:



Mandatory Access Control (MAC) was introduced later to supplement DAC for better security. Android uses SELinux as part of its security implementations. SELinux also makes use of Extended Attributes to label files with a context while every process is also run with a SELinux context. Then a policy is defined which includes thousands of rules allowing one context access the other, denied otherwise by default. See this answer for more details on SELinux and an example how Android makes use of DAC, capabilities and MAC.


By making use of Linux kernel's DAC, MAC and capabilities, Android launches every app in a sandboxed virtual machine forked from zygote process, with its unique ID and with all capabilities dropped, so that forced to access only it's own files in /data/data/ or in external storage. See this answer for more details.


MANIFEST PERMISSIONS:


To have a further fine-grained control of system resources, in addition to Linux's access control mechanisms at kernel level, Android enforces it's own Manifest Permissions to installed apps within its core framework. These permissions are of three types: Normal, Dangerous and Signature.
All normal permission are granted to a requesting app without human interaction. For instance a user can't restrict an app from accessing internet if the app is requesting android.permission.INTERNET. Some of such permissions are controlled by using third party tools.
Dangerous permissions - such as READ_CONTACTS - aren't granted to an app without user's approval. Some of Signature permissions treated as Special permissions - such as REQUEST_INSTALL_PACKAGES - can also be controlled from Settings app > Apps & notifications > Advanced > Special app access menu on newer Android versions.
Additionally some of the permissions for which user doesn't have independent control such as GET_ACCOUNTS, or the operations which don't have corresponding permissions at all such as RUN_IN_BACKGROUND, can be controlled from a hidden permissions manager of Android: AppOps. But this is meant only for OS use and not for end users.


PERMISSION CHECKING AND ENFORCING:


Permission preferences are stored by Android Package Manager in different files such as /data/system/packages.list, /data/system/packages.xml, /data/system/users/0/runtime-permissions.xml at app install time or at runtime. These permission checks are then enforced on multiple events such as when accessing intents, starting an activity, sending/receiving broadcast, accessing a content provider, starting/binding to a service etc.


Though the whole permission checking and enforcing process happens under zygote in which ActivityManager and PackageManager - which are part of system_server - play major role, the core framework doesn't handle every permission check on its own. It again takes help from kernel to make permission checks more robust and efficient.

For instance READ/WRITE_EXTERNAL_STORAGE permissions are enforced through UIDs/GIDs by bind-mounting different views of Storage in a mount namespace for every app. See this answer for further details.


PERMISSION <--> GID MAPPING:


Another special case where Android relies on Linux kernel for permission check is android.permission.INTERNET. As stated earlier, only UID/GID 0 is special for standard Linux kernel. However Android applied a special patch PARANOID_NETWORKING to Linux kernel which maps certain capabilities to certain group IDs in range 3000-3999 making them special. One of those is INET (3003) group which allows its members to access internet (create PACKET sockets) which isn't possible without capability NET_RAW otherwise. All permission <-> GID mappings can be found in file /system/etc/permissions/platform.xml.


Coming to your question:



since mapping of permissions with UIDs is done at install time, PackageManager should be able to map the permission directly with the APK's UID instead of adding inet GID to your APK package



So the answer is, PackageManager doesn't handle android.permission.INTERNET on its own. It just adds the app to INET group and saves the configuration. Let's take example of Termux:


~# grep termux /data/system/packages.list
com.termux 10142 0 /data/user/0/com.termux default:targetSdkVersion=28 3003


Next time the app is launched with 3003 in its supplementary groups so that kernel doesn't restrict the app from accessing internet when enforcing DAC:


~# ps -p $(pgrep com.termux) -o cmd,uid,gid,supgrp
CMD UID GID SUPGRP
com.termux 10142 10142 3003,9997,20142,50142

SOURCES:



Tuesday, October 27, 2015

rooting - Can't root Galaxy 5830i


A year ago I bought a Galaxy ACE GT-5830i which came with Gingerbread 2.3.6, recently I wanted to root it, I tried following the instructions in Root,Unroot,CWM,and how to Flash Galaxy Ace S5830i, without success.


I wiped cache, Dalvik cache, rooted again, again and again but did not work.


After the root process I found the Superuser icon on the launcher, I checked for root and even tried to use link2sd and nothing. I tried to update the superuser app from Google play and ... nothing. How to root this device?




internal storage - Android tool to find what's taking space, and delete it?






Possible Duplicate:
What can I do to manage my phone's internal storage?



Basically, I'm looking for an Android version of SpaceMonger or WinDirStat.




google play store - How do I force stop an application downloading from Android Market?


As I posted Some of the applications are getting downloaded more than once ... I need to stop the downloading an application from the Market. Its really waste of time and waste of data(I use 2GB data plan for my mobile).


I restarted the phone, killed the Market app from Task Manager, but still no help. It still continues to download. After complete downloading its going to start download again. For this reason I wanted to stop the Download.


(Android 2.1)




6.0 marshmallow - How to get Adoptable storage encryption key without root access after I "forget it"


My micro SD card (set as adoptable storage) was corrupted while I was using my phone (Wiko Tommy with Android 6.0) during a trip. Probably because of a writing error on the filesystem, I guess.


I tried to unplug the SD card and to plug it again several times, but it didn't change nothing.


I should have stopped there, and wait in order to repair the SD card filesystem a few days later. But my phone wouldn't let me take pictures with the SD card unplugged ("storage is full", even if the internal storage wasn't full). So I unplugged the SD card, and told my phone to forget it. That way, I could use the internal storage again and take pictures.


Back with a computer available and with a SD card reader, I made an image of my SD card using the dd command. I tried to analyse filesystem problems with Testdisk, recover files with Photorec... But I realized that the SD card is encrypted and that this is probably my major concern.


I found this method that would enable me to get the encryption key and to read the SD card. Unfortunately it requires root access to read the /data/misc/vold folder, and my phone is not rooted. I would happily do it but I couldn't find any path toward it (it's a Wiko Tommy).



So I'm stuck there. Do you think of a way to get the files on the SD card back?



  • Find a way to root my phone?

  • Reverse the "forget" action so that the phone would read again the SD card (when the corrupted filesystem is fixed)?

  • Find a way to get the encryption key without root access, and then read from the image I have on the computer?

  • Use another SD card as adoptable storage, replace its contents by the old one (when the corrupted filesystem is fixed)?


Thank you



Answer



Find a way to root my phone? Not relevant... see below



Reverse the "forget" action so that the phone would read again the SD card (when the corrupted filesystem is fixed)? No, the forget action deletes the decryption token. It cannot be recovered by normal means.


Find a way to get the encryption key without root access, and then read from the image I have on the computer? No, the decryption token is in a directory that can only be read with root access, but it doesn't matter because the decryption token does not exist anymore.


Use another SD card as adoptable storage, replace its contents by the old one (when the corrupted filesystem is fixed)? There is a fix like this, it can be used in some situations like this or when moving to a larger card, the problem is that even if the corruption of the card is corrected, the data cannot be decrypted because the decryption token was erased when you "forgot" the card.


I am sorry to say, but your data on the card is now just random 0's and 1's, there is no way to decrypt the data without the decryption token (I call it a "token", it is the passphase/key or whatever you want to call it), the data will never be recoverable by any currently known method.


The root access is no longer relevant, if you didn't have it already... the reason is because to root the device requires the bootloader to be unlocked (in most cases) and doing so wipes all data on the phone, including the decryption token, which is why it is stated if you have root prior to this occurring there is a chance you can retrieve the token and decrypt the SD card.


The real problem is the token is gone because you did a "forget", if a new token is generated (by adopting a new card) it will be different than the old one. If you reinstall a "fixed" SD card with the same data, your phone will not know how to decrypt it and cannot read the data, it will most likely recommend that you format the card as either portable or adopted storage so it is usable.


sony xperia - How do I make the camera app save photos to the SD card right after taking them?


I know how to move photos and videos to the SD card, but I want to have it save photos and videos to the SD card in the first place, instead of the internal memory. I need that because I have very little internal storage space, only 1.72 GB, and 1.3 GB is already taken up by apps. (Mysteriously, it says apps are consuming 1.9 GB, but I know that at least 600 MB of apps is on the SD card, which has far more space), and when recording a long video, I have to do it in sequences because otherwise, it runs out of space rather quickly while recording, and stops the recording. Then I have to go into the settings app, tell it to move garbage, go back into the camera, and record the next sequence. No time for that? Too bad...


Bottom line, can I set the camera app, or basically anything that wants to save photos, to save the pictures or videos to the SD card in the first place?



Answer



There's a setting for that in the Camera App, which lets you toggle the default save location. You need to scroll down for it, though, and that's not very obvious. But, there is a setting for that.


Monday, October 26, 2015

htc dream - G1 Unable to get past android boot logo


I have a T-Mobile G1 (HTC Dream), this morning it vibrated once and then restarted, it then went to the android boot logo went through that and stopped at a black screen.


I've tried pulling the battery and restarting but it has the same problem.


The phone is rooted but it has NO custom boot screen, boot loader, rom. It has stock everything apart from the ability to use root.


Running Android 1.6


Anyone any suggestions, I intend to take it back to T-Mobile tomorrow night when they have late opening hours, but I'd like to get it working before then.




Answer



Have you tried doing a factory reset (you'll lose all data)?


Steps to do a factory reset are found here.



1. Power off the G1
2. Hold Home Key + End key for 20
seconds or until you see a "triangle with an exclamation point
and a picture of the G1"
3. Open the QWERTY keyboard and hit Alt+W
4. Restored!


usb on the go - Simultaneously connecting USB mouse and VGA monitor?


Is it possible to simultaneously connect a USB mouse and VGA monitor to an Android tablet?


Because of my physical disability, I would like to operate an Android tablet using a standard USB mouse, rather than the usual touch input. At the same time, I would like to mirror the tablet's display onto a standard VGA monitor. Is this possible on an Android tablet?


From reading a HowToGeek article, it seems that mouse input is possible if I use an adaptor from standard USB to USB OTG. If I insert a USB hub between the adaptor and mouse, can I also connect a VGA monitor to the tablet using a VGA to USB adaptor?



I've also heard of Chromecast. Is this needed to mirror the tablet's display onto a VGA monitor?




nexus one - Can I symlink /data?


I have a rooted Google/HTC Nexus One running Android 4.0, Cyanogenmod, and MIUI. These mods were done by the previous owner.


Considering that the amount of internal storage my phone has is really tiny, I'm always looking for ways to free up space. My current idea is to symlink either all or part of /data to somewhere on the SD card where I have lots of free space.


My question is, would this cause any problems? I've got a lot of Linux experience, but I'm an Android newbie. The filesystem seems to be a bit different from what I'm used to in the Linux world.


Also, are there any pitfalls I should be aware of, such as certain data that must be available before the SD card is mounted?



Answer



Use data2sd instead of creating the symlink manually from the terminal. Usually sd cards are formatted with FAT32, data2sd creates an EXT2 embedded partition instead...


more detailed explanation here.



samsung galaxy s 3 - Can't pass the initial setup wizard on SG3 with broken screen digitizer


So i burned digitizer on i9305 by flashing corrupted recovery. Then i flashed new working custom ROM and recovery, after Stock JB tried some KitKats like MoKee, Omni, CyanOgen 10/11 but i'm facing the same problem with all of them. After booting fresh android i got stuck on the welcome screen / first run setup wizard, cuz can't click anywhere. This phone supports USB OTG so i am able to use mouse in TWRP recovery for example, but the driver is not working on the welcome screen yet. Also i cant use ADB to simulate screen touch cuz it doesn't connect when the initial setup is active. I don't have any backup of initialized/configured android so this is no go either.


Any ideas how to get further? Thanks for any tip.



Answer




Finally found solution via editing /data/data/com.android.providers.settings/databases/settings.db file via sqlite3. Just adb pull that file to your computer, if you use stock recovery you must mount userdata partition manually, in that case see Android ADB Shell Recovery Mounting for hints. Also you can't just pull the file directly but copy it inside adb shell to your sdcard or some intermediary filesystem. Eg. busybox cp sett* /sdcard


To get rid of the initial setup:


update global set value=1 where name='device_provisioned';

update secure set value=1 where name='user_setup_complete';
insert into secure (name,value) VALUES ('device_provisioned','1');

Yes, the device_provisioned must be present in both tables. However on the stock JB there was no global table, so you don't need to take care of it and the secure table is missing some records we update here so these need to be inserted instead. On stock JB before editing the settings.db run PRAGMA wal_checkpoint and PRAGMA journal_mode = DELETE described here: https://stackoverflow.com/a/21258892/881375 otherwise updates on existing rows won't take effect because android will rollback on reboot. For CyanOgenMod 11 just delete the settings.db-journal file and it should be OK.


It was neccessary after pushing the settings.db file back to folder on device to


chmod 660 settings.db

chown system:system settings.db

in this order, because chmod may set the owner and group back to root


USB OTG mouse is still not working sadly, so i guess i must get access for adb anyway.


To enable USB debugging (ADB):


setprop persist.service.adb.enable 1 ('setprop persist.sys.usb.config mtp,adb' if needed)

settings.db:


update secure set value=5037 where name='adb_port';
update global set value=1 where name='adb_enabled';


After booting dialog to confirm PC's fingerprint appears. To avoid this get your adbkey.pub (on linux may be located at ~/.android):


adb push adbkey.pub /data/misc/adb/adbkey.pub
cat adbkey.pub >> adb_keys

After all of this you can input tap|swipe|text anything to control your phone and get access for bluetooth or OTG mouse/keyboard etc. I hope this helps. The fingerprint injection is needed for Android 4.2.2+.


Thanks to xda-developers and android issues with adb security at code.google.com.


usb debugging - How to enable USB debug on Note 2?


No matter what setting I change, my Samsung Note 2 is always entering "USB media mode" instead of "debug mode".


I have the USB debug option set and the Google USB driver from the SDK installed, but adb devices shows nothing.


Enabling USB debug on my Nexus and plugging it in gives the debug mode just fine and adb devices shows it.
If I plug the USB in the Note 2 with USB debug enabled, the notification shows "Connected as media device".


If relevant my device is running Android v4.1.2.




applications - Are in-app-purchases applied after an app reinstall?


If I purchase an in-app-purchase (e.g., in-game currency or content) and I remove the app and install it later, will the in-app-purchase content still be accessible?


For example:



  • Plants VS Zombie 2 Coins

  • Where's my Water additional content




Answer



In general, yes. The content you purchased via an in-app-purchase will persist between installs (and even across devices). The purchase is tied to the account and will usually be restored upon installing the app again.


There may be rare cases, where the developer has not done this; but for the most part they do.


Sunday, October 25, 2015

How to avoid the Hotspot getting disabled during an incoming/outgoing call?


I have turned on Hotspot and the data is being used on other Android device but when there is an incoming call the Hotspot gets disabled automatically and gets enabled after the call ,During which I am unable to share the data.


Why is this happening and how to avoid the Hotspot getting disabled automatically on an incoming/outgoing call.



Answer



Unfortunately a limitation in 3g is that data cannot be used whilst a voice call is happening. Android turns off the hotspot because data isn't available during the call, so unfortunately there is no fix available until networks start to implement voice over LTE.


Android OS uses a lot of data in background, how to turn auto system update check off?


I have a nexus 5 with Android 4.4. If i look at data usage, it shows that Android OS is using a couple of megabytes per day. I tried disabling sync and backup but it didn't help. What could be causing the background data usage? One thing that I could think of is automatic system update check, but there seems to be no way to turn it off.


What could be the cause of the data usage and can I fix it without rooting?





Saturday, October 24, 2015

wi fi - Trigger WiFi hotspot based on known WiFi availability or location


I have a HTC One XL and a Nexus 7. They both know my home WiFi network and a few other networks, and my Nexus knows my HTC's WiFi hotspot as well. When I'm out and about I press my hotspot widget on my HTC to enable the WiFi hotspot, which allows my Nexus to automatically connect and get online.


What I'd like is a way to



  • use a known WiFi network if available (to save battery and mobile data), and

  • otherwise automatically turns on WiFi hotspot mode

  • can be WiFi based or location based



This will allow me to use the Nexus 7 wherever I am, without having to take out my HTC and flick the hotspot switch. At the same time I'd like the Nexus to prioritise other known networks over the hotspot, so that if possible it drops off the hotspot network and uses the known network.


Searching for anything containing 'WiFi hotspot' returns dozens of apps to get around carrier imposed hotspot restriction, so I am not having much success there.




ADB on Ubuntu does not recognize Nexus 4


I'm unable to get my Nexus 4 phone recognized by ADB on Ubuntu (12.04 with a newer kernel installed: 3.8.0-30-generic). Developer mode is enabled on the phone.


The device shows up in lsusb:



$ lsusb
...
Bus 003 Device 034: ID 18d1:4ee5 Google Inc.
...


But when I run adb devices I get an empty list. I found many posts on the internet about this problem but none of them solves the problem. There are two solutions.



  • Add a rule to /etc/udev/rules.d/51-android.rules. I found various variation for the content of this file. In most cases a idVendor and idProduct value should be set based on the output of lsusb. Below are some examples that I tried



SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee5", MODE="0666" GROUP="androiddev", SYMLINK+="android%n"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee5", MODE="0666", OWNER="my-login"


After adding this I set the permissions for the rule file to 644 and I rebooted PC/ restarted udev, restarted phone and plugged in my Nexus 4.



  • Add the vendor id to ~/.android/adb_usb.ini.



echo 0x18d1 >> ~/.android/adb_usb.ini

I ran adb devices as root and normal user but I only get an empty list:




$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached


Any ideas on how to solve this problem? Any help of suggestions would be greatly appreciated.



Answer



It's not enough to make the Developer options page appear in the settings menu (by repeatedly tapping the build number). On that page, there's an option USB debugging, which defaults to off.


When USB Debugging is enabled, connecting your device to a PC using USB makes the "USB debugging connected" notification appear, regardless of whether adb is currently running on the PC.



recovery mode - Is there a way to get a disk image of the user storage space on modern Android devices?


I want to know if it's possible to get a "disk image" of the storage space on Android devices when they don't use external storage like SD cards.


I'm mostly interested because my kids factory reset my Kindle Fire HDX and I was hoping I could get a disk image (using something like dd in Linux) and then try to recover some of the user data like photos and videos (using something like PhotoRec, http://www.cgsecurity.org/wiki/PhotoRec). I've done this lots of times with SD cards and hard disks by simply mounting the storage device in a desktop running Debian, and executing something like:


# dd if=/dev/sdb1 of=image.iso


Then you can use PhotoRec and/or TestDisk, depending on what you want, to get useful stuff out of the image file.


Even some of my very old Android devices seem to allow mounting a storage device in this way (without removing SD card from the phone) and following this process. Unfortunately, it looks like many new devices that don't have removable storage (like my Kindle Fire HDX and my Nexus 5) only allow you to interface with a computer using Media Transfer Protocol (MTP) and Picture Transfer Protocol (PTP).


Can I use these protocols to get a bit-by-bit copy of the storage in the device? Is there a way to add the older storage device capabilities to new phones?



Answer



After doing some more research, I think I've found a partial solution here:


http://forum.xda-developers.com/showthread.php?t=2450045




  • First, you need to get ADB set up on your computer. In Linux it's pretty easy. Something like running # apt-get install android-tools-adb or downloading and extracting a directory.





  • Find your partitions. Run something like: adb shell cat /proc/partitions There are other options in the link for how to find and identify all the partitions.




  • Copy the data The dd tool should be available. You can run something like dd if=/dev/block/mmcblk0p9 of=/sdcard/image.img




Unfortunately, I have two problems with this. The first is that the permissions on partition devices might require root access. The second is that the Kindle Fire HDX and many other modern devices that don't have "USB Mass Storage" also don't use SD cards. So there is no easy location to write the image you want that isn't already used for something else on the device.


I'm trying to find a way to mount network devices or transfer data over USB between the device and computer (adb push and adb pull won't do what's needed as far as I can tell). I'll update this if I can find a good solution. Otherwise I'll ask some other questions about it.


Edit: This page has a great description along the lines of what I have above: http://www.df.lth.se/~jokke/androidfilerecovery/



As noted below, root is necessary, but there are usually lots of ways to get that easily. Unfortunately, I was working with the Fire HDX 8.9. Halfway through my copying data to an image file, the thing auto downloads an update to 4.1.1. Next thing I know, root access disappears and I don't think there's an exploit out for it yet. I probably lost any recoverable data after the update was written to the internal storage anyway. I'm so frustrated with Amazon lately...


samsung galaxy s 3 - Is there a quicker way to turn on WiFi Hotspot?


is there a way to automate (or at least reduce the number of steps) to turn on or turn off the WiFi hotspot on my Galaxy 3.


I have to



  1. unlock

  2. press the menu button


  3. press settings

  4. press More Settings

  5. Tethering and portable hotspot

  6. Slide portable hotspot on.




6.0 marshmallow - Altering left-right sound balance on Android 6.0.1


I have a hearing problem and I need to custom balance right and left outputs for my headphones.



How can I do it on Android 6.0.1 ? (I have a Nexus)


Conclusion so far: It seems like Android system is lacking some of the standard accessibility features that can help people with disabilities access and experience the Google Play applications. My next mobile will be iOs.



Answer



There's an older related post on this topic: How do I adjust audio balance of my Android phone headphones out? – but it seems that it's not matching recent versions of Android anymore. Like this CNET post it recommends going to Settings › Accessibility and check the "Hearing" section (which I could not found on my Lollipop devices – according to the linked question, it might be device-specific and not available on all devices – the Samsung S6 e.g. seems to have this, for other devices it seems to have been removed) for either the "Sound balance" or the "Music Effects" item. So if your device has that: great, you're done!


If your device does not have this setting, there are 3rd party solutions. But as far as I am aware, they all require your device being rooted. If that condition is met, you can e.g. use:



As much as I've looked around, these seem to be the only options available currently.




Update by Victor Spinei after evaluation:


In order to download and install this you might need to check:




  1. Settings/Security/Unknown source to be ON

  2. Settings/Google/Scan device for security threats to be OFF

  3. Close security applications like Lookout

  4. Do not forget to restart all those services after installing the audio apps.


Friday, October 23, 2015

performance - Should I get A1 or A2 spec'd Micro SD card for my phone?



I'm currently running with Samsung EVO Micro SD card in my phone (GT-i9195 or serranoltexx) in Adoptable storage mode.


I'm looking for a faster card to improve performance. I was about to get Sandisk Extreme A2 card for my phone.


However, I found the official pages about A1 and A2 class by SD Association. According to the official documentation,


A1:



The Application Performance Class 1 (A1) was defined by SD Physical 5.1 specification.




A2:



The Application Performance Class 2 (A2) is defined by SD Physical 6.0 specification. It makes SD memory card much higher performance than A1 performance by using functions of Command Queuing and Cache.



Note that A2 uses extra tricks to achieve better performance, especially Command Queuing (A2 spec'd cards have minimum support of 2 for Command Queuing depth).


I'm looking for a card that has as low latency as possible for a single read. Should I get A1 spec'd card instead of A2 because even though A2 has higher random access "minimum" IOPS, it may only get it with QD32 queues? I'm looking for a good random 4K read QD1.


I wish storage manufacturers specified random 4K read QD1 performance. It seems that only storage with manufacturer published numbers is Intel Optane series where those numbers don't look too bad.


Update: more information:


Another document on the official site explains A2 features a bit more:



Command Queue:



The new CQ mechanism allows the SD memory card to accept several commands in a series (without their associated data) and execute them (with the data) whenever the memory card is ready. It contributes mainly to random read performance.



Note that this clearly uses "random read performance" as average IOPS, not the maximum time for any given read operation.


Cache function:



In order to overcome the relatively limited write speed operation of flash memory, the Cache function allows the card to accumulate the data accepted by the host in a high-speed memory (e.g., RAM[)] [...] Data loss is allowed if the data is not moved to non-volatile storage.



So... high write IOPS is allowed to be writing to card internal RAM and data loss is acceptable? The OS can already do exactly the same thing with higher performance!



Self-Maintenance:



Card-initiated operation allows the SD memory card to perform internal maintenance operations while the host bus is idle. When a new command is received, the card must ensure that new command is serviced without violating SD standard timing (Read Command, 100 milliseconds; Write Command, 250 milliseconds).



And if card has entered "card initiated self-maintenance" mode (which A2 card is allowed to enter any time no commands are in the queue) the effective read IOPS may go down to 10 and effective write IOPS may go down to 4.


I think A2 spec has way too huge tolerances for bad performance. Calling the above as "minimum 4K read: 4000 IOPS" and "minimum 4K write: 2000 IOPS" is a lie.


(I'm wondering if I should get Sandisk Extreme A1 card when those are still available on the market. Samsung EVO+ cards have nice performance in benchmarks, too, but if I've understood correctly those are meant for non-application usage and have worse wear leveling algorithm than Sandisk Extreme cards. The same thing with Sandisk Ultra cards - they don't last having the same sectors written repeatedly.)



Answer



TL;DR: Get an A1 card unless you know for sure that your workload greatly benefits from Command Queuing (CQ) and your host hardware supports CQ.


Long answer:



After looking around a lot it seems that the A2 specification could allow better performance but actual hardware implementations are slow enough that A1 is better choice nowadays (year 2019).


Thomas Kaiser has collected info about A1 and A2 rated SD cards and says



Application Performance Class 1 (A1)


This performance class requires at least 1500/500 read/write IOPS (IO operations per second) with a 4k blocksize (small data chunks) and at least 10 MB/s sustained sequential write performance. No special host requirements are needed, the card simply has to exceed the performance requirements on its own.



and



Application Performance Class 2 (A2)


A2 promises even better performance with 4000/2000 read/write IOPS minimum but there's a problem since as outlined by the SD Association A2 cards show "much higher performance than A1 performance by using functions of Command Queuing and Cache".



Cache and Command Queuing require host (driver) support since the host needs to activate those new features first. The cache feature on A2 rated cards makes use of volatile RAM on the card [...] involving the risk of data losses [...]



Another user wrote about real world performance between Sandisk Extreme A1 and A2 cards:



I did some searching online and found a few other SD card benchmark results where A2 cards performed worse than A1 cards, so my results seemed to be what others were finding as well.


[...] A2 cards not only require special hardware and/or software for maximum performance, they actually perform WORSE than A1 cards without it


[...] [Sandisk fine print about A2 cards]: Up to 160MB/s read speeds, engineered with proprietary technology to reach speeds beyond UHS-I 104MB/s, requires compatible devices capable of reaching such speeds


[...] As far as I can find, the only "compatible device" is the SanDisk Mobilemate USB 3.0 micro SD card reader



James A. Chambers has tested A1 and A2 cards with Raspberry Pi:




A2 is not supported by Raspberry Pi yet (or almost anything else really) so A1 is the important mark to hit.



So the current status seems to be that A1 is strictly about card hardware speed and A2 is about card + host hardware/firmware/software solution. The only bit about A2 which in fact could improve performance is Command Queuing (CQ) which allows card to process some requests slower and still allow higher average troughput even for small I/O operations. And if you care about worst case latency (QD1) then any queuing is never worth it so you do not even want this feature.


However, it seems that with current hardware (year 2019) of A2 cards the latency for any single request has been increased from A1 cards. I guess this is caused by too slow embedded processors inside the cards that try to do a bit too much. The firmware is probably optimized for benchmark throughput (the card can handle lots of requests in paraller but execute each request a bit slower) and as a result, the latency for any single request has gone up. As a result, if your host device doesn't support CQ feature of A2 cards, you get the worst of two worlds: the latency will go up and overall throughput will suffer.


In the end, if your host does not support A2 feature, get an A1 card. And if you care about QD1 performance, get an A1 card even if your host hardware/firmware + software does support all the A2 features.


According to latest benchmarks I would recommend either SanDisk Extreme A1 cards or A-Data Premier A1 cards. According to StorageReview benchmark, the A-Data Premier A1 card has highest random 4K performance: 2971 IOPS for 4K read, 1190 IOPS for 4K write. The SanDisk Extreme A1 cards is better known, though, so it may be a safer bet. The SanDisk Extreme A1 is already hard to find because SanDisk prefers to sell A2 variants now especially for bigger flash sizes.


I wouldn't be surprised if current crop of A2 cards were cheaper to manufacture than A1 cards because the manufacturers can use lesser spec'd internal processor to achieve the A2 minimum random access performance thanks to more buffering and queuing. I can only wish more benchmarking sites would focus on request latency over throughput.


Where is the data for "Contacts Storage" located?


Settings -> Applications -> All tells me that "Contacts Storage" uses 2.5MB which must be my contact data.


Since I had to revert to 4.03 after a faulty update to 4.1 my contacts seem inaccessible although the data seems to be there.



Could you please tell me where to find the associated data(base) for Contacts Storage? My phone is rooted. And no, my contact data is not on GMail and I honestly don't know why...



Answer



The exact location of the contacts database might depend on your manufacturer's "customization". While "plain Vanilla Android" has them in /data/data/android.providers.contacts/databases, the stock ROM on my Motorola Milestone 2 e.g. uses /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db instead. A raw mask to check for is /data/data/*.providers.contacts/databases/*.db. The file is in SQLite3 format, and can be browsed on your PC with e.g. SQLiteman or DB Browser for SQLite, which is available for Linux, Mac, and Windows alike. With this application you can browse the database in a graphical mode. Of course you also can use the command line sqlite3 client if you prefer.


Crucial point to directly access this database is that your device must be rooted -- a precondition you already meet, as your question states.


So you can either use a file manager to navigate to the database file, and copy it to your computer for investigation -- or directly pull it to your computer via adb pull. A third option would be to investigate it directly on your device, e.g. using the SQLite Manager or aSQLiteManager app.


Wednesday, October 21, 2015

charging - Is my battery damaged?


I have an HTC 10 running stock Oreo with Sense, not rooted and S-ON. I bought this second hand and don't know whether the issue came up as the phone was upgraded to Oreo, or whether it had always been an issue (which would solve my case).



The issue is that the battery seems to work fine, although mobile network standby appears to take an uncomfortably large amount of power, however when it gets to a lower percentage, it shuts off unexpectedly then bootloops when you try to turn it on again. When you plug it in, it shows that the battery is at about 1%, but in a matter of minutes, it charges up to around 40% - this is on a 1mA 5V charger - and then proceeds to charge normally.


I can temporarily solve the issue by calibrating my battery, and that makes the mobile network standby drop back to normal, and my battery works fine, and the phone shuts down as expected when it reaches 0%. The problem is that the next time I charge the battery, no matter whether I charge it from nothing to 100% or from 65% to 85%, the problem gradually comes back, and I have to once again drain my battery to calibrate it properly, then wait for it to charge up to 100%.


I've heard online that many other HTC 10 owners have experienced similar issues with their device, but the fixes only work for some people sometimes, so this could easily be a software issue or a problem with the battery itself. Which is it?




cyanogenmod - Phone uses 3G even when connected to WiFi


I've a Moto-G XT1033. When I connect the phone to WiFi, it connects fine, shows the WiFi icon but uses 3G for internet. H+ or E is shown over mobile signal icon and an exclamation mark on WiFi.


Here's a screenshot:


shoes H+ when on 3G


I've to manually disable mobile data to force the phone to use WiFi. Then it works just fine.


Here's with data disabled


enter image description here


Also, this problem appeared only after I upgraded from kitkat to lollipop official ROM. Now I've switched to CM12 but the problem persists.



My WiFi uses proxy to connect to the internet and this problem is only on WiFi networks that use proxy.


Any idea what causes this or how to fix it.



Answer



Just disable captive portal detection. In the terminal, or in adb shell, issue the command


settings put global captive_portal_detection_enabled 0

and reboot.


networking - How to use -net-tap with android sdk emulator?


I am trying to create a bridge between android emulator (from android sdk) and host system using -net-tap. Is there any working manual for that case? I have tried to launch emulator with -net-tap tap0 - tap0 appeared in host system, but no one interfaces appeared in guest android. I also tried -qemu -net tap,iface=tap1,script=no, but it also doesn't work. I checked /proc/kmsg, there are no anything connected with new interface.


Full cmdline looks like /opt/android-sdk/emulator -avd test-x86 -accel off -no-audio -net-tap tap0 -qemu -net tap,ifname=tap1,script=no


Does anyone have an idea?




Tuesday, October 20, 2015

Can a dual SIM Android phone receive voice calls to both SIMs?


Is it possible for a dual SIM phone to receive calls (not simultaneously of course) to both SIMs without any manual switching?


From what I have seen, Android 4.0 seems to support voice call for SIM #1 and video call (which seems to imply voice too) for SIM #2. That seems like you get 2G voice coverage for SIM #1 and 3G voice coverage for SIM #2. Is this true?


I guess this may vary depending on particular phone model, but what solution is Android dual-SIM industry mainstream currently?





Monday, October 19, 2015

Where does Google Now get its weather data?


What source/data provider does Google use for its weather data for Google Now (and other services)?


I've checked its forecasts against weather.gov, weather.com, accuweather.com, wunderground.com, and weatherstreet.com and can't find one that matches for the same location. The reason I ask is because there have been multiple times that it's forecast is horribly wrong. Case in point: currently its forecast is 13 degrees F lower than the closest one of the others above.



Answer




Google displays Weather conditions using Weather Underground as per Google Web Search Features page.



All weather conditions and forecasts are provided by Weather Underground, Inc.



So, Google Now also might be picking from the same source.


Two-finger swipe 'breaks' heads-up notifications on Lollipop?


I have a Nexus 7 (2013) and a Moto X (2014) running Lollipop. On both of these, if I get a heads-up notification (i.e., those that show up on top of the screen when the device is unlocked) and swipe down on it with 2 fingers, it 'breaks' further heads-up notifications:



  • I can't tap on them to open the responsible app

  • For, e.g., an incoming phone call with 'answer' and 'dismiss' buttons, tapping the buttons does nothing. I can't answer phone calls anymore!



I can still swipe to the side to dismiss the notifications, and they still disappear on their own after a few seconds. I haven't been able to find a way to get the correct behavior back aside from a restart.


Yeah, the obvious workaround is to not two-finger swipe on them, but it's second nature as that same gesture expands notifications in other contexts.


I'm guessing the problem is generic, but I've triggered it on Hangouts and Phone notifications.


Do others experience the same thing? Any known 'fixes' aside from restarting?



Answer



This is a bug, and it has been reported on AOSP Issue Tracker #79583.


As of current writing, the issue carries on to 5.0.1 Lollipop, reproduced on a Nexus 5. One claimed that the issue has gone on 5.0.1 (but didn't mention the device), and the rest still reported the same issue on it.


If you are interested in the follow-up, you might "star" the issue (I have done it myself).


Sunday, October 18, 2015

applications - How best to block ads on non rooted phone?


How can you block ads on a non rooted phone. I tried rooting and have no success.




resource monitoring - Monitor file owner


There's a file (stream.wav) which appears from time to time on the /sdcard and it grows large and eventually eats up all available space. I need to find out the application which opens this file and keeps it growing.


Is there any way to determine this?


PS. The Android device is rooted.



Answer



For rooted phones only, on the terminal (or after adb shell):


su 
lsof | grep -i stream.wav


The output will look like


sdcard     206   media_rw    7   ... /data/media/0/stream.wav
XXXXXXXXX 6226 u0_a94 27 ... /storage/emulated/legacy/stream.wav

which shows XXXXXXXXX (masked) is responsible for the file.


Thanks to Izzy's comment, this is his answer, but a bit reformulated.


lg g2 - Phone switches to watch interface when put against a specific side of my laptop


Not a very annoying bug, but quite mysterious:


I noticed that when I put my LG G2 (running v4.4.2, with NFC turned off) against the top left edge of the lid of my laptop (ASUS Zenbook UX303LN running Linux Mint), whether closed or open, so that the phone's power button (on the back on LG G2) is aligned with the edge, my phone magically switches its interface into a tiny watch screen, in which I can unlock the screen (difficultly), switch watch designs, view the weather forecast and play music. As soon as I take the phone out of that spot, the regular interface comes back.


I would be glad if someone could tell me he could reproduce it, and was wondering if anybody had witnessed such an odd behaviour and/or could explain it?



Answer



The tiny watch screen is a feature of LG G2 named QuickWindow when put on a smart cover (a cover that uses magnets to detect if it's closed or opened).


LG G2 smart cover


(LG G2 showing tiny watch when put on smart cover)



That indicates there's a magnet field on a particular spot on ASUS Zenbook, and LG G2 reacts to that on a very specific position. (As already confirmed by OP, there's a magnet on the left side of the lid to keep the laptop closed)


usb host mode - How does MHL work?


I've done (quite) some googling, but I still don't get it. You need an MHL converter, or adapter, or something. On one end of the adapter, all resources say, there is a "standard micro-USB" port, and on the other a "standard HDMI port". If they are all so standard, what's the fuzz about 5-pins vs. 11-pins? The HDMI port must be standard for all displays to work with it I guess, so it must be something on the (apparently not so standard) micro-USB side in the phone. Looking in my phone, I can only see a 4-pins female micro-USB connector. Or are these 11 pins (I have a Galaxy Note II) buried somewhere deeper inside?


Secondly, there is often talk about this "switch" that's thrown as soon as an MHL adapter is connected. USB-OTG is disabled and it becomes a display input/output port only (input for the remote control, if available). I guess that means it's not possible to connect it through a USB hub to the phone? I need a bluetooth mouse and keyboard instead of a USB mouse and keyboard if I want to do this? Or is this only applicable for the 5-pins MHL devices, and is the point of the 11-pins one that I can connect my USB hub to the micro-USB port on the adapter?


Thirdly, I've also seen USB 2.0 to HDMI converters. They're twice as expensive as MHL, but they have a normal USB connection and output HDMI, so that would fit directly in my USB hub. (MHL would also fit through a microUSB->USB converter, but it seems there is something special about the micro-USB end that I don't get.) The question is whether my phone (a Galaxy Note II) has drivers for that kind of hardware, and whether the hub is fast enough. Any ideas?


Lastly, if anyone knows this, I'm curious about how this works on the inside. The graphics chip of the phone sends the video-out to its micro-USB port, just like it would with HDMI, or does it have some custom protocol that the MHL adapter then converts to HDMI? What about HDCP, how can you prevent someone from reading the output stream if every TV in the world can decrypt it already? Or is it like SSL a way to setup a secure connection to the TV so that others can't read your data stream if they were to capture it?




Answer



MHL is a new wire protocol, using very clever signalling technology to use very few wires to transmit a lot of data: 1080p video, 7.1 channel surround sound, and RCP remote control data. MHL also uses the existing power lines on USB to allow the TV to power the connected device.


When connected to an MHL display, the display controller on the phone speaks the MHL protocol just like it would speak the HDMI protocol to an HDMI display. The MHL standard itself is just the signalling protocol: it doesn't specify what connectors are used. This allows the micro-USB connector on a phone to detect when it's being used for MHL, and switch to speaking the MHL protocol. Apart from the connector, there's no relationship between MHL and USB, so you can't use a USB hub: the cable has to connect directly to the device.



HDCP on MHL works in exactly the same way as over an HDMI or DisplayPort connection: the intention is that only consuming devices with a valid, unrevoked device key can perform key exchange and thus decipher the content. See the Wikipedia page on HDCP if you want to learn about that, or about why the intended behaviour is not the actual behaviour.



There are three types of cable. The first is not an adaptor at all: it's just a cable for connecting an MHL producer such as a phone to an MHL consumer such as a TV. You can only use this if your TV supports MHL and has the appropriate connector.


The second is the 5-pin micro-USB-to-HDMI adaptor you've mentioned. You can still only use this if your TV supports MHL, but it means the TV doesn't need a special port. It doesn't use the HDMI protocol, or convert any signals: it's just a cable with a micro-USB connector on one end and an HDMI connector on the other.


The third is the 11-pin micro-USB-to-HDMI adaptor. This is needed for newer Samsung phones, which are incompatible with the 5-pin adaptors. Only the connection to the device is different: as far as the TV is concerned, it works the same as the 5-pin adaptor, and the TV must still support MHL. As you've surmised, the use for the extra pins is that 11-pin cables support using USB-on-the-go at the same time: the adaptor is Y-shaped, with a micro-USB connector at one end, and HDMI and micro-USB connectors at the other. The USB part works as normal and can be used with hubs, either in host mode or peripheral mode.


Illustration (credit: Rick Wessley) Illustrating the difference between micro-USB connectors




The other thing you've seen, a "USB to HDMI convertor", is for PCs. Software running on the PC acts as an extra framebuffer, and uses proprietary compression technology to compress the video stream so that it can be sent on a normal USB link. The compression protocol is secret, and optimized for sending computer GUIs rather than movies. The HDMI end of the convertor has enough processing power inside it to decompress the stream into a framebuffer, which it sends over HDMI to the connected screen. The technology is developed and owned by DisplayLink (formerly Newnham Technologies), based near me in Cambridge, GB.


Because they rely heavily on software running on the producer, they don't support Android, and likely never will. And because the compression protocol is secret and proprietary, the open-source community won't be able to supply a driver either. These devices use the standard USB protocol, so they work with hubs, but of course any delay or bandwidth contention caused by other devices will make the display laggy and add compression artifacts.


Since this answer was written, DisplayLink has released an Android solution that relies on an app running on the phone. They claim it works with all of their devices, but it seems to be mainly intended for their docking stations, not the HDMI adaptors.


wi fi - How to prevent Wifi auto-connect without forgetting that connection


In my workplace, we have both "real" and "test" wifi connection points. All are password-protected, with passwords that are difficult to remember. Normally I want to be connected to a real wifi, but from time to time, my work requires that I connect to a specific test wifi. I would like to retain the connection information for these test wifi services, including the password, but not auto-connect to them.


With my tablet (running Windows), for each connection listed, there is a checkbox for "auto-connect". I can uncheck that box and retain the information on how to connect, but connect only when I do so manually.



Is there anything equivalent on Android, or is my only choice to write down those passwords, and tell Android to forget the test connections after each time I use them?


Thank you for your attention.




Saturday, October 17, 2015

When making calls the screen turns off


I have Karbonn A9, Android 2.3.6.


When making calls the screen turns off and comes on pressing the power button. But sometimes it fails to come on, forcing me to restart it by removing the battery. Any clues?




Can Whatsapp messages be restored from email chat history?


My Whatsapp chats got wiped after a ROM flash that resulted in a soft brick. The other person uses Windows Phone 8, and I have an email from that mobile with the chat history txt file. Can I restore the messages on my phone with this file, perhaps by editing the DB file that Whatsapp backups create? Just the message text would be great, I do not care for the dates or other metadata.


This is probably not an easy task, and I'm ready to roll up my sleeves and dig in. Any general pointers to get started would be great.




Friday, October 16, 2015

4.4 kitkat - App icons disappear from home screen on app update


Ever since I got my Nexus 5, I've notice that apps sometimes disappear from the launcher for no reason. This seems to correspond to that app being updated, although it doesn't always happen to every app on every update. I've seem some questions about icons disappearing due to moving them onto an SD card, but I don't have one of those so that's not it.


The apps are still installed and show up in Settings > Apps or in the alphabetized pages one gets by pressing the ::: icon. Some of the apps this has happened to include Facebook, Android IRC, TransitTimes+, QuickPic, and Minecraft — but it's not just limited to those, and it doesn't seem to happen to those with every update.


I'm not using any special launcher or anything — just the stock one that comes with KitKat 4.4 on the Nexus 5. (Updated to 4.4.2)


What's going on and how can I fix it?





Creating a bootable USB through android


Is there any way to create a bootable USB (not turn your android device into a bootable USB), with an OTG USB stick through android?



I do not have a laptop to do this on, as the one I need (the one i need to bootable USB for, and the one i need to fix)no longer has an OS installed nor a CD drive. So any help would be much appreciated.


I am aware of the app to turn your android device into a bootable USB, but that does not work in my case.



Answer



Based on the discussions with OP, he has




  • Broken Win 10 machine, unable to get into OS




  • Rooted Android





He wants to




  • Extract Data from the Win machine




  • Install OS





Solution




DriveDroid allows you to boot your PC from ISO/IMG files stored on your phone. This is ideal for trying Linux distributions or always having a rescue-system on the go... without the need to burn different CDs or USB pendrives





  • From the developers XDA thread, download Hiren's boot CD (for windows) - link in OP into the Android device





  • Enter BIOS of your machine and set the Boot order to boot from USB as first choice ( key combination would be based on the machine and Google can help)




  • Connect Android to device and boot, device will recognised and a temporary Win environment Win XP / 7 can be created. Connect an external drive and transfer files to drive




Above based on my personal experience in getting data out of dead Win XP


Installing new OS





  • In my case, CD was working so I installed OS again




  • One of the reviews ( by Steffen Mossefin) claims he was able to do that using this app.




Edit:: Help section of app suggests ways of installing windows using this app by creating bootable USB drives, which of course need access to another PC - not tried this


mount - How to find out if my Device's Kernel has Loop Device Support


I would assume most all of you know why I am asking this, but for those who don't, Loop Device Support of a Kernel on an Android device is utilized to mount a Linux Distro IMG file (Ubuntu or Debian, & a couple others) to run the linux img in a Chrooted environment to run side by side next to your Android System.


So there is tons of information on what Loop Device Support is (if you need a good explanation see Wikipedia's article.), and why you need it, but there is a great lack of explaination as to how you find out if your device supports it. The most information relating to it is that "most roms support it"...


So down to the issue, how would one discover if my device currently supports it? Is there some script I can look at or something in the kernel I can view to find out if my device supports it?



Answer



You can verify by checking /proc/config.gz and search through it looking for the configure option - CONFIG_BLK_DEV_LOOP=y.


To do that you need to do it this way:


cp /proc/config.gz /sdcard/kernel_config.gz

and



adb pull /sdcard/kernel_config.gz

Unzip the kernel_config.gz and open it up in a notepad or text editor and search it.


If its either # CONFIG_BLK_DEV_LOOP is not set or CONFIG_BLK_DEV_LOOP=n all bets are off.


Wednesday, October 14, 2015

rooting - Switch over from systemless root to system (traditional) root


Internet search reveals a couple of ways of doing this:




  • This reddit post suggests a couple of methods, which are simple





  • In contrast, this XDA mentions that even flashing boot.img is not enough and you need to clean flash system as well - in other words complete ROM




Do I run a risk if I choose the first method and flash the last version of traditional root?


Anything else I need to bear in mind ?


Edit: Any other method ?



Answer



I had this very issue some time ago. In my case, this Reddit post helped.


Basically, to migrate to the traditional system root, you need to have the TWRP recovery installed, the latest SuperSU flashable ZIP, your phone to be already systemlessly rooted and SuperSU by Chainfire to be your root manager app.



Next, boot to Android, open SuperSU and navigate to the Settings tab. Find the Full Unroot button and tap it. When SuperSU asks if you're sure to unroot, accept. When it asks whether to restore the old boot.img, deny.


When the phone reboots, input the appropriate keys and boot into TWRP. Once there, make sure that the /data partition be mounted. Then, under the Advanced menu, start TWRP's Terminal and issue the following commands:


cd /data
echo SYSTEMLESS=false > .supersu

. Alternatively, you can use


echo SYSTEMLESS=false > /data/.supersu

to achieve the same result. This creates the file .supersu inside /data.


Finally, flash the SuperSU ZIP to force SuperSU to use the standard, old root procedure.





The .supersu file


This file is checked (e.g. sourced) by the SuperSU ZIP. If it finds the entry SYSTEMLESS and it has value false, the installer will perform a system install. If the value is true, the installation will be systemless.


Samsung S7 Oreo upgrade decreased screenshots quality


I did this week the Oreo upgrade on my Samsung S7 device. When I'm now taking a screenshot, the file is in JPG instead of PNG and the quality is just terrible.



I really need to revert back to the higher quality screenshots, I'm publishing crops of the screenshots on my own website. I simply cannot bring to my users such bad image quality.


Had a look to the Advanced settings parameters, but nothing I can change except something called "Smart capture" which seems not related to my problem.


To demonstrate what I mean, here is a 100x100 pixel crop from Android 8 version and from Android 7 version. The left part of the image is the bad quality screenshot from Oreo, the right part is what I had before the system upgrade.


screenshot quality comparison


I don't care about the JPG or PNG format, but the quality is mandatory.


Any hints to set the quality back to the original ? Can anyone tell me if this "nice" feature is something from Oreo or from Samsung Experience 9.0 which came with the Oreo upgrade ? I suspect the latter (would lead me to stock Android if this is the case).


Thanks in advance !




Tuesday, October 13, 2015

How do you create a folder on a home screen in Honeycomb 3.0.1 (Xoom)?



I was rather shocked to learn that my Xoom tablet, running Honeycomb (3.0.1) does not support the ability to group home screen shortcuts into folders. Nor does it seem to provide a stock widget that could be used for organizing shortcuts.


Coming from a Froyo (DroidX) phone and iPad, both of which have long supported folder functionality, this is a huge surprise and my only big disappointment with Honeycomb.


I have found 3rd party apps that can help this (Folder Organizer), but this App is overly complex for the given task. If anyone can recommend an app that does nothing but simple iOS-like folder organization, that would be great. (I realize there are many alternative launcher/homescreen repplacements that support folders, but would rather not broaden the discussion that far for now).


I find it embarrassing to have to explain to iPad users that Honeycomb does not have anything like folder organization for apps built-in to the OS. Is this a design "feature" of Android? Does Google prefer another method for organizing home screen icons? Is it coming in a future release?




Monday, October 12, 2015

wi fi - Wi-Fi doesn't stay connected


I have a Samsung Galaxy Ace running Android 2.3.6. The problem is that when I'm in the middle of internet browsing, I completely lose my Wi-Fi signal. I've tried a factory reset which didn't help, I've tried different Wi-Fi hotspots, but that didn't help either. I know it's not the connection thats the problem, as the same Wi-Fi connections work perfectly on my laptop. Any help will be greatly appreciated.




4.2 jelly bean - Enable software menu without virtual keys


I have a broken touch screen at the bottom of my Jiayu G45 (Android 4.2.2) phone. Thus the capacitive buttons are not available any more. I've found a program (Soft Buttons) which enables software menu in apps but as a side effect it occupies a part of the screen at the bottom and renders virtual buttons there (back, home etc.). Those buttons don't work for me and I don't want to dedicate a part of screen for them. So I wonder whether it is possible to enable the software menu without virtual buttons?


I have root access.


Soft Buttons does almost what I need. When "enable virtual keys" option is selected it sets two properties in /system/build.props


# added by Soft Buttons
qemu.hw.mainkeys=0
ro.show.navigationbar=yes


and asks to reboot. What I expected that setting


qemu.hw.mainkeys=0
ro.show.navigationbar=no

will do exactly what I need. But it looks like the second prop value is just ignored in case first one is set to 0, as navigation bar is still shown.


Here is a screenshot (just an example, not a screenshot from my phone)


(Click the image to enlarge).


IMG:



Answer




After the OP made his question more clear ,I have a more simple solution since he doesn't need a navigation bar he just want the virtual menu called The three dots button


requirements :



  1. Xposer installer get it from here (JB/KK only ) for Lollipop or Marshmallow it's over here

  2. 3dot Mod xposed module get it from here


Procedure :




  1. Install the module on you phone ,activate it under Xposed installer >> modules ,reboot the phone when activating it for the first time





  2. it's Done the nav bar will disappear and the 3dot button will always show up.




sync - How can I get my Chrome-synced bookmarks in an Android device?


I'm using Google Chrome and syncing the bookmarks with the built-in feature. How can I get those bookmarks in my Android device?




Sunday, October 11, 2015

pdf - How to read 2 or more documents side-by-side in Android?


When I do my math exercises, I need to view the book and the exercises at the same time. Sometime I need to open a third PDF, but it's more optional. How can I do so with Android? On iPad I use the application Side by Side, which allows to read up to 4 different PDFs side by side.


I use Nexus 7 with Android 4.4.2.





rooting - Can I root my stock-Gingerbread Captivate without flashing a new kernel?


I updated my AT&T Captivate to the stock Gingerbread a few weeks ago, and I've had nothing but problems since -- hangs, lockups, and that constant TetheringManager crash. I'm about to do a factory reset, but I'd really like to be able to back it up properly first, which of course requires root.


I've done a little research, and SuperOneClick definitely does not work in my situation. I've seen some people refer to flashing a new kernel, but a) I've never done it, b) it sounds a bit scary, and c) I don't need anything else out of a custom kernel, other than root access. Is that my only way forward in this situation?


(I found this similar question, but people seem to have ignored the "how do I root" part once they figured out that the OP didn't need to in the first place)



Answer



Unfortunately for us (not so much for manufacturers and carriers,) Gingerbread closed the exploits that were previously being used to gain root privileges on older Android OS versions. This means that tools like SuperOneClick and similar will no longer work. The only way to get root on Samsung devices with Gingerbread is to flash a pre-rooted image onto the phone with a tool like Odin or Heimdal.



Forums like XDA-Developers and Rootzwiki contain detailed instructions for flashing such an image (kernel only, full stock system, or a completely custom ROM.)


Unable to copy files to Nexus 7 / Android KitKat


I've got brand new, factory-based, un-tweaked ASUS Nexus 7 II (2013) LTE tablet and I'm completetly unable to copy more than just a few files between my PC and tablet.


Steps, that I repeat every time are painfully obvious:



  • plugs these two devices together,


  • wait until Nexus device appears in Windows,

  • open source folder window (any on Windows disk),

  • open destination folder (any on my Nexus device),

  • select some files or folders in source and drag them to destination.


Copy process starts and stops after sending about 10-20 files. On Windows side, copy progress freezes forever. On Nexus side, you see beatuful message saying that com.android.media process is halted.


I can repeat these steps over and over again. Changing cables, using different computers, restarting source computer or Nexus itself, all for nothing -- my Nexus 7 breaks file transfer after receiving about 20 files (sometimes it breaks after getting just one).


I know, that MTP protocol is very, very unstable and forcing users to use it (i.e. removing native USB support in Android 4.x) is a Google very not funny joke. But, for God sake, how can I copy my 20k photo collection to my brand new Nexus tablet, if it breaks copy transfer every tenth files?


Is this an identified bug, or with Android 4.4.2 Google decided, that we won't be able to copy files to our own devices at all? And the only way to get them there, will be to use stupid Google Drive?


Is there any fix or work-around to this problem? Other than my own solution, as stupid as setting up local FTP server, installing FTP client to my Nexus and copying files that way, through FTP protocol?





samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...