Friday, July 31, 2015

cyanogenmod - How to quickly lock screen to landscape?


For the use with a neoprene bracelet for running, I would like to quickly lock my Milestone 1@Cyanogenmod 7.2.0 to landscape mode. All widgets that disable auto orientation seem to cause the phone to switch back to portrait.


I could achieve that by disabling 0°/180°/270° in the settings, but I would like an easier solution with a widget.




windows - Driver issues when using Samsung Galaxy SIII via USB for development


The phone is connected via USB to Windows 7 64-bit. The USB debugging option enabled.
When I connect the phone to the computer, I'm notified that some drivers failed to install.



Do I need these for development? Where can I get them? I have yet to try the Kies drivers.
As is, the device is connected as a "media device", which is useless in terms of development.

When trying an Android SDK sample demo, it starts the emulator instead of running on the phone.


More info about device:



  • Model number: SGH-T999V

  • Android version: 4.0.4


edit: See my answer below.



Answer



There's no need to install Kies. Download the driver SAMSUNG_USB_Driver_for_Mobile_Phones_v1.5.14.0.exe (or a higher version) which is available from the Samsung website. Click on the Manuals & Downloads tab (below the image of the phone) and then the Software tab.


After installing, I connected the S3 via USB and Windows Update automatically searched for and downloaded a package that was 6.8MB, followed by this notification.




I restarted my computer (just in case) and I can now use the S3 for development, even though it says the device is connected as a "media device".


sync - News & Weather Widget Not Updating


I have a news & weather widget on my Nexus S home screen, set to show the weather for my current location. In its settings, I have it set to update once an hour along with automatic location tracking. Neither of these things work anymore since about a month ago (possibly the 2.3.4 update?). I have background data enabled, sync enabled, and I don't have any battery saver style programs.



Answer



I solved this myself after trying a few things. I deleted the News & Weather app's data by going to Settings>Applications>Manage Applications>All, Tapping "News & Weather", and then "Clear Data". I needed to delete and re-add the widget and set my refresh settings again, but now it works.



security - Signal, WhatsApp, etc. without Gapps on Copperhead


There is seemingly no way to install gapps on Copperhead OS anymore, as indicated by the Copperhead OS bugtracker. Yet, Mike Perry does it by installing Copperhead piecemeal. What is going on here? What in Copperhead OS's unified install breaks gapps? Is it just the android-info.txt file in the image zip?


As an aside, I only wanted to install Google Play Services because it sounded like Signal, WhatsApp, and maybe Wire might not receive messages in the background without gapps pico installed. Signal warns about this, and asks to burn oodls of battery to fix it, but I do not know if this really matters. I do know microG cannot be used to fix it currently because the way microG spoofs Google Play Services breaks security throughout the phone.




file system - What's the Android equivalent of /etc/fstab?


Sometimes I really wish they hadn't messed around with Linux so much! I know there's an /etc/fstab in there somewhere, but where?


I'd like to mount some partitions with alternative filesystems (because I don't like FAT32).



Answer



Don't think about Android as a heavily modified Linux distribution. Because it's not. The nearly only thing that Android shares with a Linux distribution is the kernel. And even this component is modified. Also other core components, like the libc, differ.


Android has no /etc/fstab



You don't need /etc/fstab to mount an partition. But there is IIRC no mount command either.dev_mount should work (root required). To answer your questions title: All startup system mounting is done with the/etc/vold.fstab helper script.


rooting - How can I root the Huawei Ascend Y530 U051?


Which Root Tool Do I Need for my Huawei Ascend Y530 U051?


I have tried kingoroot, one-click, towelroot, z4root, universal-root and none of them work. I'm on Android 4.3 and I'm desperate to root it. I have been googling and watching pointless youtube videos on it and still cant find a root tool that works.



Can you help me to accomplish that?




Thursday, July 30, 2015

motorola defy - Is it possible to add a keyboard layout and dictionary to Swype?


I used the official Motorola upgrade tool and updated my Motorola Defy to Froyo (French firmware). Before the update, when I held the Q key on the Swype keyboard, many languages options were offered, and among them there was the Polish language. Now I don't have that option anymore, as there are far fewer languages available.


Is there any way to have that language installed back? I have tried Manylocale2, but it does NOT what I need: it changes the locale, but it will not add any languages to the language menu...


Thanks



Answer



From Swype Help




Swype supports text entry in a number of languages. To switch between languages:


Tap the SYM key.
Tap the key showing the abbreviation code for the currently

active language (e.g. "EN" for English). A Language Choice window displays, showing available languages. Select the desired language by tapping it in the list.


To toggle between the current language and last-used language, Swype from the Swype key to the key with the current Language indicator.



However if the Swype was preinstalled (as seems the case by way of the update given to you) it seems that you are stuffed as there is no way to add a language, or if it comes to that, edit a preinstalled language with Swype.


This is probably the one downside of Swype, whereby they have a business model to sell to carriers not to the public and a preinstalled Swype is neither updateable or removeable.



Solution: spend a couple of bucks on the excellent SwiftKey in the Market, it has editable and readily available language dictionaries and is very full featured and is directly comparable to Swype.


Wednesday, July 29, 2015

Where are Android settings stored?


I have to set up 50+ plus phones for my company, and I am allowed to root the phones. Each phone needs to have the exact same WIFI SSID's / passwords, account / privacy settings, brightness, input methods, etc. Repeating the exact same manual setup 50 times seems a bit tedious..


Where are the phone settings stored? Can I simply adb push the settings to each device? The phones are Samsung Galaxy Pockets.



Answer



As it turns out, there is no magic file or directory that contains all settings. They are stored in various places, and depends greatly on how the manufacturer decides to set things up. I primarily work with Samsung phones, so the information here will mostly be Samsung oriented. Also, note that all of the below requires root access. If anyone has anything to add / rectify, feel free to comment.



First off, I have found that "copying settings" is not always the best way to go. You can do nandroid backups and restores, which pretty much clones one phone to another. If you're technical enough, and you're using Samsung, then creating your own odin image might be an even better option as it doesn't rely on you or someone else having created nandroid / recovery support.


The Settings


General settings:
Settings are mostly stored in the /data subdirectory. If you're looking for something specific, start there.

Built-in apps:
Built-in apps tend to keep their settings in /data/data/com.android.* and /data/data/com.google.android.*
For example:
Contacts: /data/data/com.android.contacts
Email accounts: /data/data/com.android.email
MMS: /data/data/com.android.mms


WiFi:

WiFi settings location depends on the manufacturer, but is generally predictable.
Samsung Galaxy Pocket, S2, S3: /data/misc/wifi/wpa_supplicant.conf
Samsung Tab: /data/wifi/bcm_supp.conf
HTC Desire: /data/misc/wifi/wpa_supplicant.conf
Dell Streak: /data/misc/wifi/wpa.conf
Oneplus 2, 3: /data/misc/wifi/networkHistory.txt


Keyboard configs:
I have had to disable hardware keys, reconfigure layouts, or alter general keyboard behaviour before. The exact file name tends to be different on every phone, but I've found the config files to always be in /system/usr/keylayout/. Be careful, as breaking those could render your phone unusable.


Misc:
Most miscellaneous settings like product information, boot sounds, and enabling / disabling the on-screen nav bar are stored in /system/build.prop. Breaking this config file could bootloop your device.



If I find more information, I'll add later.


wi fi - Remember wifi password but never automatically connect


I have both my wifi password and my friend's saved. Since they live nearby sometimes it will automatically switch to theirs if the signal is stronger. I don't ordinarily want to use their connection unless I'm over there or my internet is down.


Is here any way to make android only automatically connect to my wifi without forgetting the other's password? It is long and impossible to memorize so forgetting the network is a huge pain.


Running ICS, and have root if needed.



Answer



Not exactly what you may have intended, but still a possible solution: Using an app like




you can generate a QR Code of your friend's Wifi connection, print it, laminate it (for protection), and put it into your wallet. Now, whenever you want to use that Wifi network, take out the QR-Code, scan it with Barcode Scanner -- and get connected. For a "log-out" simply disconnect, and remove the network from your list (to keep your device from autoconnecting).


Not quite elegant -- but it saves you from typing the long password everytime. Side-Effect: Print out the QR multiple times, and give it to your friend's for other guests. Do the same for your own Wifi. Now you never have to tell your passwords: To permit your guests to connect, somply show them the QR-Code to scan (and have them delete the network from their devices when they leave, as Android stores Wifi-passwords unencrypted).


installation - Error 504 when downloading apps from Play Store?


My device is Motorola Xoom MZ604. The internet connectivity is 4G WiMax via my laptop as hotspot. The problem is when I'm trying to download any app from Google Play Store, it gives me an Error 504 with the message I mentioned in title.


However, if I navigate to the application via browser and click: Install → Select Device → Install and then restart my device, it sometimes works.



Some googling brought me that it's a gateway timeout error. But I'm still unable to figure out how to work around the problem. So looking forward for your help.




Tuesday, July 28, 2015

How to check success status of opened URL in Tasker?


In Tasker, I have created a profile to open a URL when I visit certain place during certain time. It works.. When conditions are met, my default web browser (Dolphin) is opened to handle that URL visit.


I have setup another profile to kill Dolphin when I leave that place or time duration ends (whichever comes first).


Now, I want to make logic flow more complex: If URL fails to load, don't kill Dolphin.


How to check that URL was opened successfully or not? The rest I can do by myself.




Monday, July 27, 2015

How many devices does one purchase of Android app support?


I have purchased an app from the Play Store. How many times I can install the same app on different Android devices?


Is there a limit?



Answer



There is no limit. From Google Support:




Downloading previously purchased & downloaded apps


When you download a paid or free app on Google Play, the app is connected to your Google Account, meaning that you get several benefits:



  • If you get a new device, remove an app to free up space, or reset your device, you can reinstall the app without purchasing it again.

  • If you have multiple devices, you can install the app on all of your devices without purchasing the app again.

  • You can quickly find free or paid apps that you previously downloaded.



wi fi - How can I stream audio from my phone over wifi to a speaker or receiver?


I have a Galaxy Nexus and would like to be able to send music from it to speakers or a receiver.


Since I use a few different apps to listen to music (Spotify and Pandora mostly but sometimes also Audible) I don't want to have to use a specific player.


And I'd like to do it all over WiFi because Bluetooth doesn't provide enough range for me (I've tried, many different ways).


Is there a way to do this with android?



What I'm not looking for:



  • A way to stream to or from a PC.

  • Anything involving BlueTooth.

  • A new music player app on android - I want to stream music from any app on my phone to a wireless receiver or speaker.

  • Anything involving software running on a PC.


This should work when my PC is off. I should be able to pull out my phone, open spotify or pandora or audible or google listen or whatever and hear the output on any speaker in the house.




Sunday, July 26, 2015

Old fashioned menu button




I'm fairly new to android development, but am I long time android user. Phones used to have a "hardware" menu button, which I have since seen is emulated in software, but only when I'm running an 'old' app on my phone ("three dots stacked on top of each other that appears to the right of all the other buttons)


Why is writing apps that make use of the button discouraged?


Is it not supported by most phones?


Is it a bad user experience? ('swipe down from top to access soft buttons', etc..)



Answer



Because it's less congnitive effort to press an icon that is somewhere in your vision (on the screen), than remembering that the option is hidden under the menu button.From the design perspective, you want as less options hidden in some menu somewhere, and more options that are more intuitively-placed.


Android 4.0 introduced multitasking button to its navigation, so, if the menu button was kept there, there would be four navigation buttons, and that would be confusing. Menu button was replaced by options in the Action Bar, and Action Overflow button (shown below).


Action Overflow button, courtesy of Android Developers


Basically every manufacturer switched to multitask button instead of menu button (even Samsung, who lingered with the menu button for a while), so you could say that, now, in 2015, phones with this legacy button are becoming more scarce, so the development of the software that takes advantage of the legacy button is discouraged.


Saturday, July 25, 2015

4.4 kitkat - How can I disable a stock app that has its Disable button greyed out?



There is a pesky bloatware app (specificlly VUDU Version 1.0) that came preinstalled on my device. Whenever I boot my device, it starts up an app process, so every time I boot I have to open up the App Switcher and swipe it away.


I went into the Settings app and tried to Force Stop and then Disable the app, but the Disable button is disabled ("greyed-out") itself. Some other apps also don't allow me to disable them. Is there any other way that I can enable the button or disable the app without rooting? I am running 4.4.2.



Answer



Sorry, but you have to root in order to do this. There is no other way.





  1. Root




  2. (optional) Install Titanium Backup and backup your phone. If you mess something up you can restore your phone using this




  3. Now use an app called System App Remover to select the app you want to delete. You will have to grant superuser permission for it to work





Friday, July 24, 2015

Reset Knox password


I had installed Samsung Knox on my Galaxy Note 3 and now I have forgotten its password. It is not very clear what should I do, in order to reset the password.


From the login page, when I click on the "Forgot password", it asks for an email. As I enter the mail, it says the email has not been registered.


How to reset the Knox password?



Answer




After you go to the web portal, follow the steps below:



  • On the My KNOX User Portal, Click on Devices and select your device.

  • Click on Reset KNOX Password.

  • Launch your My KNOX if you aren't inside it already.

  • Enter your new unlock code; tap Continue.

  • Enter your unlock code again; tap Confirm.


From To manage My KNOX


How can profile (log the charging and discharging current for some time period) my battery?


As the question reads, I want to log the current in milliAmpere or Ampere (both charging and discharging) over a period of time.


Please note I am not asking about charging or discharging rate, but rather on the current. I am aware of the app called Ampere which displays the current, which is good but I want them logged over a period of time. I am also aware of the app Battery Log, which logs the details but not the current.



Device info: Nexus 5 rooted, running stock 5.1.1. Ready to install custom kernel but stock ROM only.


Edit: Based on a comment from Firelord, I could see a file in /sys/class/power_supply/battery/current_now which at the moment of writing had a number 835910 and after a second it became 695229, then 673163. All these values were during the discharge phase.


When plugged in, it showed 412190 and the Ampere app showed 160mA. It seems this is the current, but I guess I have to average it out to compare it with Ampere's output.


Interestingly, there is another file named status which has values charging and discharging.


I also happen to know another question in this site.



Answer



Ampere shows us the value of current made available to the system by the kernel. I used three devices with different Android versions to test my answer. Here we go!




Test 1 & 2: Two MTK devices running stock Android 4.2.1 and 4.4.2


Since MTK is involved, thing would behave a bit differently. In both the devices Ampere had trouble measuring the current not because it couldn't, but two files were available to measure the current, and the user had to choose one from its Settings → Basic settings → Measurement interface. (Rant: A design flaw I tend to think since I wasn't aware of that before digging it up).



The two files for my Android 4.2.1:


/sys/device/platform/mt6320-battery/power_supply/battery/BatteryAverageCurrent
/sys/class/power_supply/battery/BatteryAverageCurrent

The two files for my Android 4.4.2:


/sys/device/platform/battery/power_supply/battery/BatteryAverageCurrent
/sys/class/power_supply/battery/BatteryAverageCurrent

The file BatteryAverageCurrent would show a numeric value with no mention of any unit (be it A or mA).


In my devices, both the files (second was the symlink of the first) had the same value (dynamic, Current varies of course) like 440 when connected to PC, and 880 when connected to charger. Correspondingly, Ampere showed the similar value with a slight mismatch of +- 1-10 mA. // Somebody on XDA said that this app doesn't show true values, but that's none of my concern honestly.



Test 3: A Qualcomm device running Android 5.0.2 (CyanogenOS 12)


I read that Google made changes in Lollipop related to measurement of current, and among other things, BatteryAverageCurrent is nowhere to be found in the system, at least not in my system. Don't blame me since I didn't verify whether the changes were introduce in Lollipop or before, and it's not really a concern to test the things here.


Before I tell the tale further I should mention that Ampere had no trouble in this device even though there were two files to measure current:


/sys/devices/00-qcom,charger/power_supply/battery/current_now
/sys/class/power_supply/battery/current_now

Not to mention that the second one is the symlink of the first one, and 00-qcom,charger may differ in your device.


Anyhow, when it comes to the content of the current_now you can consider everything same as in BatteryAverageCurrent except that the value was in negative like -180 or -840 (don't ask me why?)


There's more


The last directory named battery has some other cool stuff which might interest some people. Checkout them like Battery temperature, Voltage, capacity, among other things.



If you want a summary of them, look at uevent file whose output would be like:


POWER_SUPPLY_NAME=battery
POWER_SUPPLY_CHARGING_ENABLED=1
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_CHARGE_TYPE=Unknown
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4350000

POWER_SUPPLY_VOLTAGE_MIN_DESIGN=4400000
POWER_SUPPLY_VOLTAGE_NOW=4316000
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_INPUT_CURRENT_MAX=100000
POWER_SUPPLY_INPUT_CURRENT_TRIM=33
POWER_SUPPLY_INPUT_CURRENT_SETTLED=0
POWER_SUPPLY_VOLTAGE_MIN=4300000
POWER_SUPPLY_INPUT_VOLTAGE_REGULATION=1
POWER_SUPPLY_CHARGE_FULL_DESIGN=0

POWER_SUPPLY_CHARGE_FULL=0
POWER_SUPPLY_TEMP=311
POWER_SUPPLY_TEMP_COOL=0
POWER_SUPPLY_TEMP_WARM=0
POWER_SUPPLY_SYSTEM_TEMP_LEVEL=0
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_CHARGE_NOW=5048
POWER_SUPPLY_FASTCHARGER=0
POWER_SUPPLY_CHARGE_TIMEOUT=1


And if (somehow) you're wondering about 0 in POWER_SUPPLY_CURRENT_NOW=0 then know that POWER_SUPPLY_CAPACITY=100 i.e. charging was complete and even Ampere was showing 0mA.




As for Logging, sorry! since I've no detailed solution as I didn't bother because the logging can be done using an automation tool like Tasker.


But a brief usage of Tasker must be told:



  • Create a profile based on time or the type that suits your goal.

  • There are two file actions under the action File namely Read File and Write File. If it doesn't work, then you can always do cat >> using the action Code → Run Shell and you don't need root access.


We're good to go now!


Thursday, July 23, 2015

Transformer Prime, VPN and password protection


I have VPN connection on my Android tablet (Asus Transformer Prime) and it required me to set up a password protection for my tablet. I don't want to use any dummy passwords to open my tablet, so how can I disable that without deleting the VPN connection?



Answer



Found this, it's a hack but it works for on my galaxy nexus 2.1.2 Here's the steps:



  1. Set your lock screen security to what you want, slide/none

  2. Go to create VPN profile

  3. Create a pattern lock

  4. Setup VPN profile


  5. Lock device

  6. Unlock but input the wrong pattern until device locks for 30.

  7. Tap "Forgotten Pattern"

  8. Enter your google account details.

  9. Cancel the "Screen Security" page

  10. Now device will unlock without pattern requirement


Source: Connecting to VPN forces having secure screen lock


notifications - Voicemail indicator won't go away


On my Atrix running 2.3.6, there is a permanent icon in my notification bar saying that I have unread voicemail. I understand that this icon is flagged on the SIM card itself: sure enough, if I pop the SIM card into another phone, the icon shows up there too.


How do I get rid of it? I've tried every suggestion on Google, which amounts to leaving myself a message and then deleting it, or calling customer service. The only kosher method of getting rid of it is to have my carrier send me the special SMS that clears the icon, which is normally sent when you listen to your messages (but it's not happening for me). Customer service reps seem to have no idea what this means so I can't get them to manually send that SMS. For what it's worth, I'm on Rogers in Canada (but my Atrix is running the AT&T build of Android).


Some versions of Android allegedly have a "Clear voicemail indicator" setting, but I have no such thing.



If it's possible through executing code on the Android, then:



  • Has someone written an app to clear it from the SIM card? I can't find anything, but I can't imagine something like that would be allowed on the market since it would use hidden libraries.

  • Does anyone have experience writing apps that use hidden libraries and can point me in the right direction? I've been able to follow tutorials that set up an Eclipse environment for compiling apps that use hidden libraries, I just have no idea where to start with the SIM card stuff.


If not, then do I just have to live with it?


EDIT: Using standard carrier voicemail, not Google Voice.




Are files created in "/storage/emulated/0" supposed to appear in "/storage/sdcard0"?


From what I guess, internal storage is available by every user. If emulated storage is a storage location, made for a specific user, are files created in /storage/emulated/0 supposed to appear in /storage/sdcard0? I assume no, because files that are user created should show up in emulated only, otherwise files created by the user would be available for all other users to see.



Answer



I've checked on one of my devices, and as the comment chain already suspected, you don't need to worry about everyone having access to everybody elses data. First:



/storage/sdcard0 -> /storage/emulated/legacy

Which means, it's just a symlink which always points to the data of the current user:


/storage/emulated/legacy -> /mnt/shell/emulated/0

(the first user – in my case the only one). Second, where you usually look for it:


/sdcard -> /storage/emulated/legacy

Same game again. So for the emulated SD card (aka the "internal SD card), the Android system takes care to map it accordingly for the current user. Not sure about the external SD card (if that e.g. could be used to share data between multiple users). This is usually found in /storage/sdcard1:


$ mount | grep sdcard

/dev/block/vold/179:65 /mnt/media_rw/sdcard1 vfat […]
/dev/fuse /storage/sdcard1 fuse […]
$ ls /mnt/media_rw/sdcard1
/mnt/media_rw/sdcard1: Permission denied
$ su -c "ls /mnt/media_rw/sdcard1"
[data from external SD card]

So you can see the external SD card can only be accessed directly with root powers, why "ordinary users" have to go via a FUSE mount overlayed on that. So the system again might take care that each user can only access his/her own data in that place. I'm not familiar enough with the internals to say for sure (or even to say what exactly is done there).


Now for your explicit question, whether files created in /storage/emulated/0 supposed to appear in /storage/sdcard0: Assuming you're speaking about /mnt/shell/emulated/0 (I couldn't find /storage/emulated/0 on my device), empirically they of course do, as both are the very same location: /storage/sdcard0 -> /storage/emulated/legacy -> /mnt/shell/emulated/0 – which means that /storage/sdcard0 shows what's contained in /mnt/shell/emulated/0. But your concern is unwarranted: due to the "middle-man" (/storage/emulated/legacy), /storage/sdcard0 always points to the storage of the "logged-in user" – so if e.g. the second user looks there, (s)he will see what's in /mnt/shell/emulated/1 (or which ever his/her emulated storage area is).





So as a PS, let me sum up things from the comments, as a short FAQ:



  • I wonder what would happen if a different user tries to access and save data in a different user's emulated storage?
    He receives an error message that it's either not there or not accessible.

  • Why are these symlinks needed?
    Multiple reasons, many of them historical (one word: "compatibility").

  • What are those symlinks and how do they work, in laymens terms?
    They are basically "signposts", saying "please look there". Other than you initially assumed, they don't contain any data themselves – they are really only signposts or "pointers". The data itself resides at the "targeted location", and only there. For more details, please see the Wikipedia article on symbolic links.


Also see:




Wednesday, July 22, 2015

How to do backups and updates properly with full device encryption?


I think about the following use cases:



  • 'Perfectly' reverse encryption without losing settings

  • Update ROMs. Even if /system, /data, /sdcard (internal) are encrypted

  • Low level Backups with CWM. When SDCARD partition is also encrypted.

  • Emergency access to my data (screen broken, soft bricked...)


  • How to mount crypted dumps on linux (knowing the passphrase)


Is there some salt value going into the key together with the passphrase stored on the device?


I currently use a tmpfs mount to /sdcard and 'adb push update.zip' on my Nexus S to update the ROM. I've been told that the Galaxy Nexus also has an encrypted /system which would prevent all that (see Nexus S solution here: Broken screen while debug mode was disabled. How can I re-enable adb? )




Tuesday, July 21, 2015

adb - How can I enable adbd during boot on Cyanogenmod?


I am stuck during the boot process, at first before entering the passphrase for /data and now at the SIM PIN screen. At this point, adb is inaccessible (normally adbd would start up after unlocking /data, etc.).



How can I start adbd during boot? This is a CM 10.2 userdebug build for i9300 with /default.prop (from initrd) containing:


ro.adb.secure=1
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb

I have also tried the following to no avail:



  • Edit /init.rc, comment out the disabled line for service adbd.


  • Edit /init.smdk4x12.usb.rc, add start adbd to the property:sys.usb.config=mtp trigger.

  • Add persist.sys.usb.config=adb to /default.prop



Answer



Since Android 4.2.2, [USB debugging requires authentication], something that is not possible during boot. To disable this, set the following property in default.prop (inside initrd):


ro.adb.secure=0

Alternatively, copy ~/.android/adbkey.pub into the initial ramdisk of the boot/recovery image at /adb_keys. This preserves the secure feature while granting your key access.


This enables adbd for a short time. It seems that some process is setting sys.usb.config=mtp. To work around that, I applied this patch (perhaps only the start adbd part is necessary, I have only tested the below):


--- init.smdk4x12.usb.rc        2013-10-24 18:47:34.894857300 +0200

+++ init.smdk4x12.usb.rc 2013-10-24 18:47:40.775493943 +0200
@@ -12,10 +12,11 @@
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8
- write /sys/class/android_usb/android0/idProduct 685c
- write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/idProduct 6860
+ write /sys/class/android_usb/android0/functions ${sys.usb.config},adb
write /sys/class/android_usb/android0/enable 1

- setprop sys.usb.state ${sys.usb.config}
+ start adbd
+ setprop sys.usb.state ${sys.usb.config},adb

on property:sys.usb.config=mtp,adb
write /sys/class/android_usb/android0/enable 0

You won't be able to get root (su) through this. For that, set:


ro.secure=0


Updating the initramfs block, the initramfs header field and the SHA1 ID (header) of the boot.img is not in the scope of this answer.


replace internal memory


Is it possible to replace internal memory of a android phone ?


How difficult it is?



Is internal memory part of System On Chip itself, so that it is next to impossible to remove them ?


Have anybody tried this out ?


My device is "Redmi Note" - but you can consider this as a generic question. If these is any device where replacing internal memory is possible, I will switch to that device :)


Thanks



Answer




Is it possible to replace internal memory of a android phone ?



Yes.


Lots of Taobao (think of it as Chinese eBay?) merchants actually offer services of enlarging RAM and internal storage by replacing the chip, and these are actually quite popular, at least around me. Most are for Apple and Xiaomi phones which are popular and often lacking in storage. For example, they could expand the storage of a Xiaomi MI 5 to 6GB+128GB, a configuration Xiaomi themselves never offered.



Here's a very simple search with the keywords "Xiaomi" + "capacity enlargement" (in Chinese):


enter image description here


The internal storage chip (eMMC/UFS) is not an integral part of the SoC, but on most modern phones, it's packaged together with the SoC, often stacked on top of it, as the picture below demonstrates:


enter image description here


(AP≈SoC)


(Source article - also worth a read)



Have anybody tried this out ?



There are several factors preventing you from trying it out, however:




  • The tiny size and mass amount of pins connecting the two together means you need professional devices to de-solder and re-solder them. The merchants above are usually situated in Shenzhen in real life - known for flourishing electronic industry, so they are well-equipped for such, but same can't be said for a random DIYer.

  • You can't handily buy replacement chips unless you are familiar with the supply chains, and even then you can't make sure what you bought is compatible.

  • You also need to load the blank chip with basic data (such as partition tables), which usually only professionals have access to.


Even if you are professional enough to overcome all of this, the stability of the modification is questionable - there are numerous examples of unstable re-solder job undermining the connection, causing the phone to fail. Such mods, naturally, are not covered within warranties, and therefore only you get to shoulder the consequences.


TL;DR: YES technically, but NO realistically.


4.4 kitkat - Turn off vibration notification for ALL apps at once


In my stock, unrooted Android 4.3 on a Nexus 4, if I uncheck the feature Vibrate when ringing under Sound Settings, it only turns off vibration for Calls. This does not turn off vibration notification for individual apps (Whatsapp,FB etc). Therefore what I am looking for is an option to turn off vibration system wide, which means the phone should not vibrate for anything, be it calls, text messages or app notifications.
It's like this feature on iOS...when Vibrate on Silent is Off, switching the phone to silent mode turns vibration off system wide.


Is there any app that enables me to toggle this setting?
If Tasker is a suggestion, please provide a detailed description as I am still on the learning curve.


Update 1
Currently (until Oreo) there's no way to do this without having root and installing the application marked as answer below. For Xposed users, there's a free alternative: VibrationTuner



Update 2
It should not come as a surprise, but MIUI has this. Tested on MIUI 9.5.



Answer



Update: Android Pie (9.0) finally allows you to disable all the vibrations. Go to Settings app > Accessibility > Vibration. Some ROMs still don't have this option, in which case you may want to check out my old solution.




Old solution - applies to Android Oreo or older (<9.0):


Stock Android does not have an option to disable all vibrations. This frustrated me as well, so I made an app that can turn them off system-wide - https://play.google.com/store/apps/details?id=sk.blade.globalvibratetoggle


A rooted phone is required, as there is no API for disabling vibrations.


The app is basically a user-friendly wrapper for this shell command: chmod 444 /sys/devices/virtual/timed_output/vibrator/enable.


4.2 jelly bean - Can I have different volumes settings for notifications and ringtones with Nexus 4/Android 4.2?


My old Gingerbread phone would let me have a low volume for notifications while having a high volume for ringtones (very useful at night). My new Nexus 4 seems to have these volume settings tied together. Is there any way to separate them?



I'm running Android 4.2.1 stock.


Have looked at a Nexus 7 running 4.1.1 and it has separate volume streams so this looks like a phone specific bug/feature.


Update
Tried various apps but couldn't fine one which separated the Ring and notification audio streams.


In the end I downloaded the Cyanogenmod notification sounds, selected the ones I liked and processed them to -10db and -15db versions. Then copied them to the 'Notifications' folder on the phone. (The phone looks at the title tag in the mp3 file rather than the file name so needed to change that as well.)


I now have the ringtone as normal but a quieter version of the notification sound that doesn't wake me at night or sound ridiculously loud in meetings.



Answer



It appears to be somewhat awkward in ICS and JB to get this functionality, several methods in order to achieve it are discussed here. I'll summarise/copy some of the better sounding ones (I added the links):



Try Audio Control, it's by far the best volume management app in the Google Play store. There is both a notification and ringer volume for ICS or Jelly Bean.




If you're willing to pay then this app has "Separate Notification and Ringer volumes for ICS/JB devices".



Google & download a silent MP3, use Profile Manager or Tasker to change notification sound to silence mp3 when required.



Or alternatively (as the OP points out in the comments) use a low volume ringtone so you can still hear it. Someone points out that for this method if you have custom notifications for different apps then they won't be silenced/lower volume, only apps that use the default system notification will be affected unless you update all of the notification sounds.



Another option is to use a profile switcher like Tasker or Setting Profiles (what I use) and make two profiles:



  1. Silent - profile set it to silence your ringer


  2. Ring - profile to set your desired ringer volume


Now make a rule to trigger your "Ring" profile based on incoming call condition. The condition could be a call from a specific person, or persons from particular groups in your address book. Use the * wildcard if you want the condition to include calls from anyone. You can piggy back conditions so that, for example, you can add a time condition so the rule might only be activated at a certain time of day.


So what you have now is 2 profiles, one that mutes ALL sounds (thanks to ICS) and another that sets the ringer volume to a specific level. Set the "Ring" profile to have a higher priority, that way when they are both active at the same time, the "Ring" takes precedence. Combined with your condition, the result should be, ALL of your sounds are muted, but when a call comes in, it triggers the incoming call condition, triggers the "Ring" profile, and both the mute and the ring profiles are active at the same time, and the ring profile will win. There might be a short delay, but it shouldn't be noticeable.


This would of course have the effect that certain calls will ALWAYS ring and maybe sometimes you truly do want to silence your phone. To that, you will just make another profile, call it "True Silent" for example, and have it silence everything and give it the highest priority (or at least higher then the "Ring" profile) and then when you activate that profile, it will win over the others.



Both of these apps are again paid for applications however they have a grater functionality than Audio Control. Tasker is a particularly great one.



Ringleader allows you to set up profiles that you can change any or all of your individual ringtones to silent in one click. It takes a while to configure. Once you install it you have to set all of your ringtones and alerts again using the Ringleader option for choosing alerts. If you set it as the default ringtone chooser option it simplifies the process. Once you have reset each one they will shop up in the Ringleader options list. In Ringleader you then save a base profile. After you have a base profile saved you can edit all of the alert sounds individually through Ringleader and save new profiles. I have three profiles. One is for normal use, one for phone calls only and one for silent. There is a simple widget available for switching them quickly.




This is a free application however there's also a paid for version. Someone else in the thread mentions this working for them however the actual notification volume can't be set separately, the notifications can only be silenced while still allowing the phone to ring.


When Googling around I did see people mention Audio Manager as a solution to this, however I've tested it out and although you can set the ring volume independently of the system volume as soon as someone rings you the volumes change to the same level, even if you use the app to lock the volumes.


fastboot - Enabling ADB on Nexus 6 with dead screen


So I acquired a Nexus 6 with a completely dead screen. (Dead as in I cannot see anything)



The phone powers on (and off) and is detected by my computer.


I want to be able to see the phone's display on my computer. I believe the process will be straight forward if I mange to get ADB enabled


The phone is presumably locked (I do know the unlock pattern) and USB debugging is disabled.
adb devices gives no output


When I boot into recovery mode, fastboot devices recognizes my device.


The phone is probably unrooted and has a locked bootloader. I do not need to preserve any data.


If I manage to get ADB working, I known of tools that will allow me to view my phone screen, which is my end goal.


I looked at Broken screen while debug mode was disabled. How can I re-enable adb? but when I tried booting CWM recovery rom, I got the message "FAILED (remote failure)" because the bootloader is locked? Similar problem with Android toolkit.


Anyone know of a way to enable ADB through fastboot when USB debugging is not enabled


Thanks in advance



EDIT: I followed this guide to not avail


$sudo fastboot flash recovery twrp-3.1.1-0-shamu.img 
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
(bootloader) has-slot:recovery: not found
target reported max download size of 536870912 bytes
sending 'recovery' (11757 KB)...
OKAY [ 0.535s]
writing 'recovery'...

OKAY [ 0.189s]
finished. total time: 0.724s
$ sudo fastboot reboot
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
rebooting...

Answer



I followed this guide




  1. I went into fastboot mode by holding down the power button (force restart) and the volume down key (recovery mode)

  2. I downloaded a twrop image from: https://dl.twrp.me/shamu/

  3. fastboot flash recovery twrp.img

  4. fastboot reboot (while holding the volume down key see note)

  5. Then I booted the recovery image

  6. adb with root permissions detected my device. If you get a permission denied error try killing adb and running with sudo


*Note many devices will replace your custom recovery automatically during first boot. To prevent this, use Google to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.


usb - My screen got broken, how to see on the computer what I'm doing in my device?


My Android device screen got broken and I can't see what I'm doing. That's the only wrong thing with my device, the rest is apparently working OK. Is there any way to send my device screen to my computer?
I don't want to work blindly anymore!



Answer



You don't have to continue working blindly, you can use Droid@Screen: it shows the screen of a real or emulated Android device on a computer running Windows, Mac OS or Linux.



enter image description here


Droid@Screen is a stand-alone Java Swing GUI application that shows the screen of an Android device on a computer. Its author says that its typical usage is showing an app demo or during training, but it also fits your case.


In order to use it, you need the following to be installed in your computer:



  • Java 6 (at least)

  • Android SDK, installed and configured.

  • Environment variable ANDROID_HOME (or ANDROID_SDK_HOME) pointing to the Android SDK installation directory. (Optional)

  • USB driver for the target Android device installed.


Note: USB Debugging must be enabled on your device. (Thanks @JasonC for the heads up)



I have been using it with my Galaxy Nexus and I must say that despite a little lag between what happens in the phone and what is displayed in the computer screen (2-4 s), it does what it says. You don't even need to be rooted for that!


You can download it from the author's site, where you also can watch a complete video and text instructions about its installation and usage.


How to search the Play Store by permissions?


How do I specify that I do not wish to see apps that require for example internet access? Or to only show apps that use a specific permission?



A specific repository with search on its webpage? An app that provides searching the Play Store?



Answer



UPDATE: Currently not functional according to Google Play store listing.


If you're interested, I've developed an app, StripSearch, to filter search listings by the permissions used. The app works by excluding results that don't meet the permission requirements specified by a given search filter (a filter can exclude, require, or ignore specific permissions). Several filters are included by default, but you can create your own as well.


Get StripSearch here: https://play.google.com/store/apps/details?id=com.hasslefixes.stripsearch


If you want to see a demo explaining its usage, you can watch a video here: https://www.youtube.com/watch?v=mynw3rbky5A


StripSearch is free, does not include ads or spyware, and only uses the following permissions:



  • android.permission.INTERNET (obviously needed to search the store)

  • com.google.android.providers.gsf.permission.READ_GSERVICES (needed to obtain the Google Play Android ID tied to your phone and account)



Giv it a try!


Sunday, July 19, 2015

networking - Listen which URLs an app tries to connect


Is it possible to listen/monitor an app's network activities?


I have this one app, and I couldn't figure out where it gets its images. I tried to google an app to listen to other apps connections, but I didn't find any. I'm looking for similar functionality as Google Chrome's network tab from developer menu.


I have rooted Nexus 4 with 4.2.2.




Answer



OS Monitor lists network connections by app:


OS Monitor: Connections Connection Tracker
OS Monitor and Connection Tracker listing connections (source: Google Play; click image to enlarge)


As you can see, OS Monitor lists up all connections, and lists the corresponding app "owning" this connection along. This should enable you to see all servers your suspicious app connects to. There are other apps available with the same feature as well, as e.g. Connection Tracker shown in the second screenshot.


If you really need the full URL, the above won't bring you there (both apps use methods similar to netstat, which only reveals the hosts). Instead, you might want to take a look at e.g. tPacketCapture, which "sniffs" your network traffic (without requiring root), and saves the protocol in so called .pcap files. These again can be read then by e.g. Shark Reader.


Saturday, July 18, 2015

Temporarily cache notifications


Is there a way to completely block notifications on my Android device? I'm not asking for "silent mode" or "remove individual apps, one by one". What I'd like, ideally, is an app that disables temporarily (like Windows 8 does) for say, 1, 3 and 5 hours all notifications.


This includes sound, vibration, LED blinking, and the notification "banners" that appear on the notification area. Except obviously the permanent notifications, like Avast!, alarm clocks and TuneIn (just to name a few). And then, after the timer expires, show all notifications that have been blocked.


Even if root is required, is there any possible way to achieve this? When I'm studying, I really hate having pending notifications in my bar, so instead of dismissing it, I'm forced to check them. I think Honeycomb tablets with the merged bottom bar had the feature to turn off notifications (although not temporarily, it was as easy as flipping the switch on when you were done).


Edit: I'm running Android 4.2.2 AOSP (no root but I know how to root it) on a Nexus 7. Fully OEM.


Edit 2: There is definitely no notification toggle on my device.


Screenshot
(Click image to enlarge)




dialer codes - What is CP and AP and what are these options used for?


There is this service menu where I can select different USB modes for my phone. One option is called CP and the other is AP.


menu


What do the acronyms CP and AP stand for? I recognize MTP, PTP and ADB. But what are the options CP and AP used for?



Answer




TL;DR
Application processor (AP) = CPU + GPU
Cellular processor (CP) = Cellular modem




The long version:
CP stands for Cellular Processor. It's also referred to as Baseband Modem. Another reference is Baseband Processor, or BP for short. AP stands for Application Processor. These are 2 of the 3 fundamental building blocks in mobile devices. The third being the Graphical Processor, or GP for short. The CP includes all the digital components required to communicate with a cellular network. The CP usually consists of an ARM-based processor and a DSP. It has its own operating system and communicates via a HS (High-Speed) serial connection with AP unit on which operating systems such as Android, iOS and Windows Phone are running.


Previously, CP, AP and (GP) were found in separate, dedicated chips. However, there is a trend to combine all three components on a single System on a Chip (SoC) to save cost, reduce power consumption, and shrink the overall size of the circuit board.


The table below is showing SoC chips with two AP — CPU & GPU and one CP — the cellular or baseband processor. The table is copied from 3G, 4G and Beyond by Martin Sauter.


Table1





Bonus:
The USB settings in the image above is used to determine what drivers are enumerated when connecting your phone to the PC via USB cable. It is a multiplexer switch which determines whether the USB port is directly connected to the CP or the AP.


There are also options to select device features that will be enabled once connected to the PC. These options include:



  • MTP (Media Transfer Protocol)

  • ADB (Android Debugging Bridge)

  • PTP (Picture Transfer Protocol)

  • RNDIS (Remote Network Driver Interface Specification) for USB Ethernet

  • DM (Diagnostic Mode)

  • MIDI (Used to connect MIDI device such as MIDI keyboard)


  • Modem


USB connection Options
Click on image to enlarge


More info can be found on XDA forums and in 3G, 4G and Beyond by Martin Sauter.




Reality:
AP mode of UART serial connection is favored upon.
Many blogs seem to have found that AP mode saves battery capacity,
charges phone faster when connected via USB, increases battery life.



Web browser - how to pass true native resolution to prevent sites from serving up mobile responsive design


How can Chrome (or some other browser) be configured to tell websites its resolution is the native resolution of the phone and not a reduced resolution that's adjusted for being high DPI? "Request desktop site" works for some sites, but not all, and ones that detect the resolution of the phone will show the mobile "responsive" layout. For example, if I Google "what is my screen resolution" and visit the first site, it reports 360x640 even though my phone is 1440x2560. I'm running Lollipop if that matters.




Answer



It turns out you can use Firefox for Android to do this:



  1. In the address bar go to about:config and then search for pixels.

  2. Select layout.css.devPixelsPerPx and change the value from -1.0 (default) to 1 if you want sites to think the resolution of your browser is the true native resolution of the screen rather than a DPI-adjusted value.

  3. If you have a super high resolution screen like a QHD (1440x2560), you may want to set this to 2 rather than 1, and then if you use the phone in landscape mode, your resolution will be 1280x720 which won't make things as small by default as setting it to 1 would.


Using the above in conjunction with "Request desktop site" should do a great job at always showing the desktop site for not only user-agent-detection-based sites but also for responsive media-query-based sites.


Restore whatsapp Google Drive backup on different number


I have all my whats app data backed up on Google Drive. Two days ago my phone stopped working and now I have a new one with a different number(cause I lost the simcard with the number I was using for whats app).


From the F.A.Q I can read that the "restore" option is available only if the number is the same, there's no other way to restore my old chat or at least read them? The google account is the same...




Friday, July 17, 2015

settings - How do I reverse "sync turned off" in my Google account?



Under the Settings -> Accounts -> Google, there's an account in the Accounts section and under that it says "sync turned off."
When I tap on it there is a list of services that can be synced (e.g. App Data, Calendar, Gmail, Google Play Books, etc.) and I can manually tap one of those to sync it now.
How do I enable automatic sync?
I don't see any option to "sync automatically" (only "sync now") from within the account nor from the Google Accounts page.
It used to sync automatically, and I'm not sure what happened or why it doesn't anymore.
How do I get that back?



Answer



Go back to the Settings menu, and in the Wireless and Networks section tap Data Usage. Then press the menu button and in the popup menu check the Auto Sync Data box.


You can then return to the Google account page mentioned in the question, where the list of services is, and select the newly visible checkmarks next to which ones you want to automatically sync.


command line - How to get 2nd IMEI number using adb?


I am currently using this command adb shell "service call iphonesubinfo 1" to get IMEI number, but it only returns 1st one.


Does anyone know how I can get the 2nd IMEI number?



Answer




Which code to use with service call depends on Android release. On Android 9 IPhoneSubInfo method 1 returns first IMEI while methods 3 and 4 return both IMEIs:


~$ service call iphonesubinfo 3 i32 1 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo
~$ service call iphonesubinfo 3 i32 2 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo

Related: How to check IMSI/ICCID on MIUI10?


cyanogenmod - Restoring messages from ClockworkMod backup


Here's the story. Today my phone (modded with Cyanogen mod) started bootlooping. So, I did a ClockworkMod backup and went about installing the latest version of Cyanogen mod. When that was done, I restored the backup, but it started bootlooping yet again. So now, I have a fresh install of Cyanogen mod but none of my texts or call logs etc, all my contacts were sync'd from my Facebook anyway so I can get them back easily.


Does anyone know how I can extract my text messages from the ClockworkMod backup without sending my device back into a bootloop?


Cheers!




Thursday, July 16, 2015

Google Play Store gives error "No Connection"


I have an HTC Desire HD. I am having trouble connecting to the Google Play Store. Every time I try to connect it just come up with an error "NO CONNECTION". I really want to download some apps (in particular Words With Friends). I know I am connected to the Internet; I can access my mail and Facebook, etc.


I have uninstalled Play Store and re-installed it but no luck!


How can I fix this?





4.4 kitkat - It's there a way to get /system partition permanent read/write access even after reboot?


I used ADB.exe to get access to my System partition, I linked the dalvik-cache folder there to save space on my data partition, but the problem is I need to convert it read/write everytime I want to install a new app (or even if the old app wants to update), is there a way to make the partition always read/write instead read-only? Thanks!



Answer



You don't need to make /system permanently R/W. You just need to mount it as R/W at every boot. So I'm providing you with a few options to mount /system as R/W at boot automatically, but do note that these methods mount /system as R/W in master mount namespace, which means ALL programs can write to it as long as file permission is right. This creates a severely huge security flaw. Do it at your own risk.
The following options are not steps of a single method, but different approaches.




  1. If you can modify your boot image, then editing /init.rc is the best and easiest way.

  2. If you can't modify /boot directly, but init.d is availble, you can write a simple script to mount /system as R/W. As is mentioned in comments, it may not go right through if you try to call su from an init.d script.

  3. If both 1 and 2 is unavailable and you have root (I suppose you do by asking this question), replace a system service (debuggerd is the best choice) binary with a custom shell script. Then run start debuggerd to activate it (effective from next boot).


The script required by method 2 and 3 is very simple, like below.


#!/system/bin/sh
/system/bin/mount -o rw,remount /system

You probably would like to add a sleep loop after it if you use method 3, as whenever debuggerd exits, it will be restarted.


BTW, you can easily add init.d support by yourself with method 3. Just take a glance at this. However in my opinion, re-partitioning is the best way to utilize free space /system, yet it's potentially harmful.



data recovery - Why can't I see Android storage as a partition on PC?



I'm trying to recover accidentally deleted video from HUAWEI P10. I use Ubuntu so I tried to recover it using photorec.


The problem is that I can't see mobile internal storage or SD card storage in the list:enter image description here


First row is a HDD, second row is SSD, third is external HDD and the fourth is I don't know what but not any of the mobile storages.


EDIT
The last row is present only when mobile is connected to the PC.


The mobile is connected to the PC through USB cable and I've set transfer files option. Same result with Transfer photos.


enter image description here


Do you know what to do?




rom flashing - SIM Card not detected after failed recovery flash


I recently tried to install CWM on my rooted archos 40 titanium. Unlocking the bootloader using fastboot oem unlock doesn't work, I only got ellipses for a while. So I installed Mobiluncle tools and selected my recovery.img on my sdcard. However after it flashed, it rebooted in recovery, but the recovery doesn't work, it only restart again and again and again.



Fortunately, the device can still start normally, but now my SD Card isn't detected nor is my SIM card. I expected it would come from the bad recovery, so I tried to make a fastboot erase recovery but the bootloader is locked! I tried a simple Factory Reset in the setting it did nothing, it restarted android without wiping it :(


How to solve that? Is the fact that I can't read my SD and SIM due to the fact that the recovery doesn't work?


EDIT: It seems it's Mobiluncle tools fault since when I closed its process in android settings the SD Card "appears" (but not the SIM card unfortunately)


EDIT 2:


I managed to wipe data partition using a shell, but after reboot the system is very unstable (a lot of apps crashes unfortunately), so I believe it is because I didn't wipe cache. But now I tried to install Framaroot and root but whatever I try any application that requires root says that my phone isn't rooted. How to root please


EDIT3:


using adb shell then su:


shell@android:/ $ su
su
DIE: file credentials different than expected

1|shell@android:/ $

EDIT:


Root now works


EDIT:


I tried, in factory mode, going in individual tests part and then SIM, nothing showed and in Memory Card test it says (*means x chinese characters)


eMMC FAT ***:
******: (null)
******: **
******: 1266 MB

******: 0 x 4581

SD* 2 :
******: ****
******: 15185 MB
******: 5629 MB
******: 0 x 12675


Wednesday, July 15, 2015

Security: how to prevent USB mounting of mobile device


I am running Android KitKat 4.4.2 on a Samsung Galaxy SIII Neo. As a security measure I would like to prevent my phone being automatically mounted whenever I attach a USB cable from my mobile device to a PC. This way if someone steals my device they will not be able to read or copy files stored on my mobile device. However I am not sure how to turn this feature on or off.


I have read this post but I actually have USB debugging enabled under Settings | General | Developer Options. But the answer found there does not seem to apply to my device.



Answer



I think it was in Android 4.2 a feature was added that requires the phone to allow each PC it is connected, which is identified by a unique key. You can save this key in your phone rather than having to click on accept every time.


If you want to clear the keys that you have already accepted: Settings -> Developer Options -> Revoke USB debugging authorization


Now any device that is connected to your phone must be accepted by the phone again.


This should not really be a problem unless someone steals both your phone and your laptop. If you plug your phone into someone else's computer, the phone should require your phone unlock code and explicit acceptance to allow USB debugging.





EDIT: After playing some more with these settings, I think my above answer is not really related to the mounting issue.


I don't think there is a way to prevent auto-mounting. But if your phone is locked, it should not be readable. So lock your phone. You can test whether anything is readable on your phone by plugging it in the USB cable to a computer while the phone is locked.


sms - I can't send a picture attachment together with a text message any more ( Samsung Galaxy S). Any idea why?


I tried to send a text message - attaching a photo already on my phone ( the first time ) and attaching a picture taken at time of send ( the second time ).


However, when I try to send this text message - the status remains sending ( an my correspondent does not receive the message ).


Is this a problem with my phone company, you think, or can I have changed some setting somehow. Is there a setting that can be set, anyhow ?


I did send picture attachments with text message before , some weeks ago , but not after upgrading to Froyo 2.2.1 ( just to be complete - can't think this has anything to do with it ).


------------- [ UPDATE ]-------------------------


Something I noticed but did not mention before : if I view a text message with a picture attached, and press the image to 'view' it,*a sort of movie view is started*e.g. with the picture at the top of the screen, and a Start, Rewind and Forward button at the bottom. Pressing the Start will 'play' the picture as move of about 5 seconds - since it is a picture, of course the image does not change. I am pretty sure this was not the case when I sent some image messages a couple of weeks ago. To be complete: even the image messages I did send before now show this 'movie' type of action.




Answer



In case this helps someone with the same problem, I have the solution :


I had to check the Settings - Wireless and network - Mobile network - Use packet data check box. When this was done, I could send picture MMS messages.


Maybe obvious for some .. but it sure was one setting I thought I should not need just to send an MMS message.


How to get rid of update notifications for a given app in Google Play Store?


General question


I have an app X installed on my device in version Y. I don't want to update it to any newer version (Y+z) for some reason. Still, the Google Play Store app always lists updates for X, which keeps me from a simple "update all". My question, put to a single sentence:



How to hide updates for X permanently from the "available updates" list?






Specific examples


First, I know there are alternatives as e.g. the AppBrain Market App, which can handle this quite well (skip this update, skip all future updates). I prefer a "generic solution", which does not depend on a 3rd party's market app.


Second, I know that Titanium Backup includes a "Market doctor", which can be used to disconnect an app from Google Play.1 However, in my specific case that only worked for a few hours: I disconnected GTalk, as I don't want it replaced by Hangouts. The update notification disappeared for a few hours, then it was back. No idea what restored the "link".


Third, just to make sure: I'm not talking about the "auto update" feature as discussed e.g. in How to enable Play Store auto-update for just a few apps?. I was rather hoping for something close to Does the google play store not provide updates for frozen apps?, but without the need to "freeze" the app in question (which I still want to use, but in the version installed, not in a "future version" available).


Fourth: No, uninstalling the app in question is no option here, though it would perfectly hide any future updates from being displayed :) Nor is "freezing", as the app is used regularly.


Fifth: There is a related question for my GTalk example: Do apps included in the gApps zip get updated via Google Play? However, I want the opposite: No update.




It might very well be that "Google Apps" (and other pre-installed apps) are handled in some specific way, and restore their "market links" themselves somehow. For this case, my question includes: How to prevent that from happening?





Update


There's a thread at XDA discussing the very same issue. Until recently, a work-around for "user installed apps" was to uninstall them and then sideload the .apk – but even that stopped working. Well, re-signing the .apk with a different key might work for user-apps. But both would fail for pre-installed apps (can't sideload them to override; different signature would refuse that install completely).


Moreover, there's an issue filed on this by some "joel.bou..". Not hard to guess, though blanked out: that would be Joël Bourquard. If it's really him, then that's really an issue (for those who don't know: Joël is the dev behind Titanium Backup). Let me quote from the issue:



For the record: in the Android Market days it was possible to "Attach" or "Detach" apps (on rooted devices) with a system tool such as Titanium Backup. But nowadays (with the Google Play Store app) this has become nearly impossible to do, because the complete app list seems to sync from Google's servers and the user has no control over that.



Which explains why detaching with apps like Titanium Backup is no longer permanent. And I'm afraid I've asked the impossible. But I thought the same in the past with other questions, and surprisingly got solutions here. So I do not yet give up hope on this one!




1: what that does is explained by eldarerathis in this post (thanks to Firelord for digging that up!)




Tuesday, July 14, 2015

Opening .memo files from Samsung default memo app


I have .memo files on my PC from the default memo app on a previously owned Samsung phone. When opened in Notepad, the files do not contain plain text. How can I recover the contents of the memos?



Answer



By using VLC player or downloading Samsung Note for PC as mentioned here



Related methods mentioned here for export - see Husni's answer of zip file solution and others


How can I export Samsung memos?


backup - I Need Help Getting Contacts from Broken Android!


My Huawei Mercury M886 fell out of my lap when getting out of the car and it got run over...


Its not rooted. The screen is completely shattered off and I cant use the touchscreen or buttons so I cant get passed the lock screen.


I was able to get about half my contacts from my back up in April on the wireless server from Cricket, and I don't use the Gmail back up and purposely did it that way. I plugged my phone into the computer but I cant access the phone at all since I have to choose the USB/Computer option from the phone itself.



Anyone know of how I can get to them? They are not on the SD card either. I need a way to access the phone without using the touchscreen. Is there a way to sync the Android phone to PC without using the touchscreen?


I don't have my phone password protected. It seems as though that the Android can do everything except retrieve information without using the touch screen...this is a HUGE problem...very impracticable for bad situations.




callerid - Sony Xperia Z won't name contacts on incoming calls


Whenever on of my contacts ring my phone, it does not display the caller ID and simply marks them as "Unknown".


I don't mean saying the contacts name out loud either- I just mean the caller ID isn't displayed on the screen for incoming calls. Even when the contacts are saved into my phone.


Please help! It's driving me mad and leading me to avoid all phone calls at the moment.




Monday, July 13, 2015

2.2 froyo - How to remove corporate settings?


My DroidX just got upgraded to 2.3.15 (android version shows 2.2) over the air. After the upgrade the phone forced me to set a pin number. The phone is not currently connected to an Exchange server, but it used to be. A couple of weeks ago I removed then Exchange settings for contact list sync and I uninstalled TouchDown.


The strange thing is that the Exchange server that I was connected to didn't have a requirement for a password, so I'm not sure where this setting is coming from. When I look in Location & Security > Select Device Administrators I see "Corporate Sync" listed in there, but there doesn't appear to be any way to remove the settings.


I no longer work for the company with the exchange server, so I can't connect back to it. I'd rather not wipe the phone and reset it if I don't have to. I would also prefer not to root the phone as well.




updates - Is the old app uninstalled when it is upgraded?


i want to know when an upgrade is available for an app obviously a new apk is there. So is it that the old apk is uninstalled and new apk is installed ?



Answer



Not quite, no. When you uninstall a package, it also removes other data to do with that package: for example, the app's own private data, its data on the SD card, your default preferences for that app. It also tells any other interested apps that you've removed the app, via an intent broadcast. Other apps receiving that broadcast might take further action based on that: for example, a launcher (home screen app) would remove desktop shortcuts and widgets from that app, since they won't work any more.


When a package is upgraded (that is, replaced with a new APK file with the same package name and a later version code), the old version is stopped, so that nothing from the app is running any more. The old APK file is removed and the new one replaces it, but the other uninstall actions aren't performed: the private app data and default preferences are kept, and the uninstall broadcast isn't sent. Instead, a different intent is broadcast to tell any interested apps that the package has been updated.


So while the old APK file is removed, the effect of an upgrade is quite different to uninstalling the old package and then installing the new one.


In Google Play the situation can be a bit different if the developer has enabled delta updates (called Smart updates by Google).


In a delta update only the changes between the two versions are downloaded and applied to the existing APK. For example, if you have an app that is 15MB in size, and the developer decides to change the background image, you don't need to download the entire application again, you can just download the delta (difference), which includes the new image. The old APK is then duplicated, the new content is injected to the copy of the old APK, and if successful the old APK is removed. The end result is the updated APK.


Sunday, July 12, 2015

home screen - scroll the background farther than half the picture



Is there a way to let android scroll 1080px through the wallpaper to show one of the pictures every page instead of half of the picture?(https://imgur.com/Jg6fNQ1) I want every page to be a different picture,so it has to scroll 1080 pixels to the right instead of part of one picture and another half of the other when i go to the 2nd page. I tried some apps for that but apps like five wallpapers stutter and lag too much. The wallpaper I use: https://imgur.com/bkBsxfD




external sd - How to recover data from a damaged SD card?


I have an HTC Inspire. I have had my 8 GB SD Card for three years...needless to say, it has like 5000 pictures and hundreds of videos on it. It has a lot of music on it too, but I'm not worried about that. I just want my pictures back more than anything. I got a message on my phone that told me I should safely unmount my SD card before removing it. Since I haven't taken it out for months, I didn't think anything of it. A few hours later, it said "SD Card damaged. You may have to reformat it." When I clicked on that, it said "Are you sure you want to format the Sd card? All data on your card will be lost."


I have tried plugging it into the computer, but there's not an option to view files. I tried putting it in my dad's phone, and his phone didn't even recognize that it was even in there. If anyone has ANY ideas, whatsoever, it would be greatly appreciated. Thank you!!




rooting - How do I root my Chinavasion TechPad 7" Tablet android tablet?


I have a TechPad 7" Tablet from Chinavasion, S3C6410 Android 1.6;



None of the generic rooting methods work.


Any ideas?



Answer



Droid2Bootstrap.apk was able to root it


Saturday, July 11, 2015

google play store - Be notified of an update to an app that is not installed


Is there any way to receive an update/new version released notification from the Play Store for an app that is not installed in my phone? I'm using 4.3 on a Nexus 4.



Answer



There isn't anything built in but you can use an app such as Changelog Droid. You would need to add the apps you wish to be notified for to the Observed list within the app.


Note: It appears this app is no longer being maintained and has problems with paid apps. I do not know of an alternative at this point. This app will still work ok for free apps though.


2.3 gingerbread - Where does Android store clipboard data?


Where does Android store clipboard data?


I have a rooted Android phone. Where are clipboard files stored? I can find that in a rooted Samsung device at /data/Clipboard, but am not able to find in other Android phones (e.g. Sony, HTC). For phones running GingerBread.


I'm able to see the clipboard data using adb shell service call clipboard 1, but after Gingerbread this service call command does not show the data.



Answer



Pure AOSP version of Android does not save clipboard data to files; the data is stored only in RAM by the ClipboardService, which runs inside the system_server process.


Samsung, like many other manufacturers, adds their proprietary modifications to the base AOSP code; one of these modifications is the ability to keep the clipboard history, and this history is stored in files in the /data/Clipboard directory. Of course, you won't find this proprietary Samsung code on other devices, or even in third-party ROMs for Samsung devices.


As for accessing the clipboard service using adb shell service call clipboard ..., you cannot do it on recent Android versions, because the IClipboard interface now has security checks (it requires specifying the package name, and the calling uid must own the package name). This interface is also an implementation detail and changes between different Android versions.



insufficient memory - How to delete dumpstate/logcat on Moto E



My phone is running out of internal memory. So I searched online and found a solution, which was to dial *#9900# and then delete dumpstate/logcat. But when I dial the same on my MOTO E, I dont see anything happening. It Just says USSD Code running and closes. My phone is running on Lollipop 5.1. Can you please help me delete dumpstate/logcat?




crashes - Gmail, Inbox, Messaging, Messenger work until try to open conversation -- crash


Phone: stock 5.0.2 Moto E 2015


Randomly one day about 2 weeks ago I started getting popup notifications like:




Unfortunately, Keep has stopped.



Same for Pocket, and Google Play Newsstand. Like, regularly. In spurts. Like one after the other. Disabling the apps in preferences and force-closing them makes no difference. Resetting them to factory or removing & reinstalling makes no difference. Trying to open those apps directly also leads only to that error.


At the same time I noticed that I could no longer click on notifications from Inbox and Hangouts. I could open the apps directly but they would stop as soon as I clicked on a conversation. I then tried and saw the same behavior with the older Messaging and newer Messenger. I see similar behavior with Calendar and Play books -- i.e., I can open the apps directly, but as soon as I try to open an entity (an event in Calendar or a book in Books), the app stops with the same dialog as above.


Clicking Report in the above-mentioned popup always led to a crash ... until this morning. The feedback app now works.


What else works: Chrome, Google Now, Play Music (I use it all day every day), and the Contacts/Phone apps all seem fine.


PS: This is the same phone I had to do a factory reset on after after a routine reboot, Google Play Services disappeared on stock 5.0.2 Moto E 2015 unexplicably happened. Based on this, I'm starting to think that the flash memory is faulty and leading to random corruption. It's the only theory I've got.




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 ...