Friday, November 30, 2018

usb host mode - How to stop Android asking for permission before permitting access to USB device


I have an application running on a rooted no-name Android tablet running ICS 4.0.3 that controls a USB device via the USB host mode interface. The android.hardware.usb.host.xml file is present in /system/etc/permissions and everything works wonderfully. Except...



When I run the app for the first time following a reboot and then plug in the USB device I get a popup window saying "Allow the app APPNAME to access the USB device? [] Use by default for this USB device. Cancel OK" and I have to tap OK before it can start using the device.


I need to turn off the user confirmation so that the app can use the device straight away. How do I do this? I've seem some suggestions about using a keypress generator to simulate the user tapping the button on the screen but I'd prefer to avoid that sort of approach and set things up so that the confirmation request simply doesn't happen.


I probably can't get the supplier to do a custom kernel build for me, but I should be able to get the firmware signing key from them so I can sign my app as a system app, if that will help.


One associated problem: ticking the "Use by default for this USB device" box doesn't appear to help - if I unplug and replug the device then I get the confirmation prompt again. I have noticed in this situation that the device number in /dev/bus/usb/001/ changes each time I unplug and replug (001, 002, 003 etc) which perhaps explains this particular problemette.



Answer



This question and answer is basically a duplicate of
https://stackoverflow.com/a/15151075/588476
See the above link for an example program and more in depth discussion.


As far as I know, there are two ways to get the USB permission box popup:




  1. Request permission explicitly from your application using UsbManager.requestPermission(...)

  2. Register an intent-filter on your accessory and let the system ask for permission when the device is attached


In the case of 1 I have found that the checkbox on the popup to remember the permission has no effect.


For me, I removed all code related to permissions from my software and simply put the intent-filter in my manifest. When the USB device is plugged in, if it hasn't already been granted permission then the USB permission box will popup. If the user clicks OK without checking the remember box, then the box will popup again the next time the device is connected. However if the user checks the box and presses OK then the box should never display again (unless the software is uninstalled and then reinstalled).


I'm not sure if there is a bug somewhere related to your device showing up as /dev/bus/usb/001 and then 002 etc - let me know if you are using the intent-filter, as without that the remember checkbox will do nothing.


I do not know of any way that you can avoid the permission popup altogether. I suspect there is no way to do it without digging into the android code like you said.


applications - Android Apps from Old Tablet to New Tablet


I have a Motorola Xoom running Jelly Bean and am moving to the Asus TFT-700. I plan on giving my Xoom to someone in a factory default condition so that my Google account will only be on the Asus. Do I really need to remember all of my installed apps so that they can be manually downloaded to the Asus or will my Google account take care of this automatically?




Thursday, November 29, 2018

updates - Ridiculous error on all google play store Using CM 10.1.3


I have a crazy problem. Whenever I update anything I get this error



update for (insert Google app here) could not be downloaded due to an error (error while retrieving information from the server. [RPC:S-7:AEC-7 QNHM-TYSO-UNVHY])




It may also be worth telling you the very last 5 letters vary. It also happens to any new apps I attempt to install.



Answer



You're going to want to clear the cache of your Google services on the device. Note that this will remove your Google Account from the device - so you'll have to re-add it.



  1. Navigate to Settings > Applications > Manage Applications > All

  2. Clear the data for Google Play Services, Google Service Framework and Google Play Store

  3. Reboot the device

  4. Log back into your Google Account

  5. Try your downloads again



adb - Manually switch from ART to Dalvik


I wanted to try out the new ART runtime, but didn't realize my custom ROM doesn't support it. So now I am getting recurring Force Closed messages after booting, and can't get through to the settings menu to switch back to Dalvik. So before I wipe everything and spend hours setting up my phone from scratch, is there a way to manually change back to Dalvik from the recovery menu? I think there should be a flag somewhere, that instructs Android to do the 'recompile' after a reboot.


Via the recovery menu, I have full root access over a adb shell and can mount all filesystems.



Answer



I just did this!



/data/property/persist.sys.dalvik.vm.lib is a textfile containing one of two values: 'libart.so' or 'libdvm.so'. You can change from ART to Dalvik simply by editing this file.


Ex: adb shell 'echo libdvm.so >/data/property/persist.sys.dalvik.vm.lib'


rooting - How can I root my TCL Idol X (S950) with Linux?


I have a TCL Idol X (S950) phone and I found out that I can root in using 'V-Root' (a Chinese software) however the software is for Windows.


The problem is that I don't have Windows, more explanation at the end.


More in detail:



V-Root is this soft: http://www.mgyun.com


If I well understood (Rooting/unlocking Android Nexus One with broken power button using Linux terminal tools) the rooting usually just install su command using some vulnerability in the Linux Kernel or in a daemon ... or any other similar vulnerability in the Android OS.


Reason
You may wonder why I'm not just grab a Windows pc from one of my friend and in my opinion there are a couple of reason for this:




  • Android (or better Android/Linux ) is using Linux kernel so in make sense to have some standard procedure to root on Linux too




  • Many of the Win. Root solution are shipped with some custom soft that we can not really trust ( for example V-Root, beside the fact that is in Chinese and few people non-chinese can understand it, how can I trust that it is not doing any malicious operation on my phone ? )





  • Most of the tutorial/forum thread are Windows oriented, so there are few and spare info related to Linux




So my question:
Is there a possibility to achieve the above on Linux? If not, is there any other method I can use on Linux?




2.2 froyo - How can I open an HTML file I have copied from PC to SD Card of Phone?


How can I open an HTML file I have copied from PC to SD Card of Phone?


I've tried opening it with the default application which is HTML Viewer but I get a "Web page not available" system page. The URL that the browser shows is:

content://com.android.htmlfileprovider/mnt/sdcard/Documents/To%20Read.html?text/html


Any ideas?



Thanks.



Answer



You should be able to point the browser at the file you want with a URL of the format file:///path/to/file.html. For example, I just did this on my EVO with a file I saved to the root of my SD card as post.html by launching the browser and entering the URL file:///sdcard/post.html.


Alternatively, my file manager lets me open an HTML file with "HTML Viewer". This is not as feature-rich, though, and didn't seem to render images for me (whereas the browser way loaded everything properly). My file manager does not give me the option to open the file with the browser, or either of the other browsers I have (Firefox and Opera Mobile).


downloading - How to download an audio file from a web site?



Is there a way to download an audio file, such as a mp3-file from the Android browser to the device so I could listen to it later when I'm offline? Is there a way I should program the web site to make this possible?


I'm not looking for an additional app to help me achieve this.



Answer



in your android browser long click on MP3 file link or any audio link and click on Save Link. It will be downloaded to your phone and it will be stored in download folder in your sdcard.


Hope it will help you.



Wednesday, November 28, 2018

4.0 ice cream sandwich - Internal hard disk partitions (sda2) not showing in android system


I have a x86 system (Asus Eee Pc)having hard disk of 232 GB, in which 4 GB allocated for Android and rest I don't know where it is gone. If I open super user and running this command in android terminal: cat /proc/partitions I get following result:


Block_Size(232Gb) sda

Block_Size(4Gb) sda1
Block_Size(rest) sda2

This shows there are two partitions (sda1, sda2) of total 1 drive (sda). Android is installed in sda1 and seen in it's file system. But sda2 data is invisible. When i run mount command , we get :



  • rootfs /rootfs rw 0 0

  • proc /proc proc rw ,relatime 0 0

  • /dev/sda1 /mnt ext3 rw,relatime,error=continue,barrier=0,data=writeback 0 0

  • few lines .... But nothing about sda2 .



I also try #busybox fdisk -l /dev/block/sda


   Device Boot     start   End     Blocks  Id  System


  • /dev/block/sda1 1 528 4241128+ 83 Linux

  • /dev/block/sda2 529 30396 23914716 83 Linux

  • /dev/block/sda3 30397 30402 42714 ef EFI(FAT-12/16/32)


And when i run


-#busybox fdisk -l /dev/block/sda2 result is : - doesn't contain a valid partition table .



How can I mount this drive in android? I just want to access and view the sda2 storage drive.




Stop Gmail notifications when receiving email from particular sender


Is there any way to stop the Gmail app from popping up a notification if you get an email from a specific sender?


My specific case is that I get a lot of emails from a careers site that I'm not usually interested in reading immediately so don't need to be notified about them. There's a related question on the site but this is asking for the opposite.




New Gboard dual language suggestions, how do I disable it?


Recently the Google keyboard has activated suggestions for both of my selected languages. This is a real nuisance since the suggestions are a mess IMO.


How can I disable it and go back to switching languages manually?



Answer



As you've mentioned, the multilingual suggestions is a new feature in Gboard (ref: Gboard, now available for Android - Official Google Blog.


Steps to enable/disable it:




  1. Open Gboard's Settings

  2. Select Languages

  3. Select a language

  4. On supported languages, below Language settings, tap Multilingual typing to enable/disable it. When enabled, you can check/uncheck other languages individually.


Note: the preference is not symmetric. When you have 2 languages that are supported for multilingual typings, you can disable it on language A while having it enabled on language B with A.


google play store - Android Market gone after emulator reboot


I have installed Android Market on Android Emulator successfully using steps mention in [How to] Install Android market on Emulator


Market is installed without any issue but after emulator reboot Market is gone.



Can anyone help me in solving this problem?


SPECS



  • OS=Ubuntu 10.04

  • Android-SDK=2.3.3(API Level 10)

  • Eclipse Indigo


AVD Details:



Name: AVD



CPU/ABI: ARM(armeabi)


Path: /home/ma/.android/AVD.avd


Target: Android 2.3.3 (API level 10)


Skin: HVGA


SD Card: 512M


hw.lcd.density: 160


vm.heapSize: 24


hw.ramSize: 256





Tuesday, November 27, 2018

Android - Change Google account on Nexus S




Possible Duplicate:

How can I remove the default Google Account on my phone?



I tried different methods of changing the Google account on my Nexus S, all failed. Did someone manage to do this, without a factory reset?




How to restore from Titanium Backup with file on computer?


I flashed new firmware and before doing so backed up apps and data with Titanium Backup. How do I restore? I have the folder on my PC which contains two .gz files and a properties file.



Answer



It's simple. Copy from PC the entire folder on your external SD or internal storage and name the folder as you wish



  1. Use the Detect option on TiBu



Preferences → Folder Location → Detect → All


Select location, click Use Current ( where current is the folder you have copied )



  1. How to restore your backups on a new phone, or after installing a ROM (if you wiped your phone





  1. Click the Backup/Restore tab





  2. Click Menu (the button), Batch Click “Restore all missing apps + system data”




  3. Reboot your phone





Caution: If you are restoring on identical device with same ROM step 2 is fine.


For Restoration on other devices , other ROMs/ upgrades (as in your case), doing this will cause serious problems as





  • What is user app on one ROM may be a system app on another




  • ROMs may be "cooked" differently so replacing a system app from different ROM can cause serious problems




  • Apps that are device specific e.g., Samsung Planner will not work on a Moto device





In this case, choose Restore all apps with data and a menu shows up, where you can de-select what you don't want to restore (like the first few in picture below)


enter image description here


How can transfer my game progress from HTC Legend to Samung Galaxy S3?





Possible Duplicate:
How to backup Angry Birds saves/data?
New phone: How to transfer game progress?



I don't really want to root either phone. But if I absolutely had to, I could root the HTC Legend, but definitely not the Samsung Galaxy S3.




Monday, November 26, 2018

nexus 5 - Rooting already unlock phone without losing data, possible?


As far as I have understood it's the unlocking part that requires wiping, and the rooting part doesn't. So, if I am already unlocked, can I root without losing my data? I've got a (red) Nexus 5 16GB Unlocked running Android 5.1.



Answer



Yes, you can root as many times you want without losing data if your device is unlocked. I've done that on my OnePlus One.


For further clarification, it's the default mechanism in the device set by the OEM, that whenever the bootloader's default (locked) state is tampered it would issue a data wipe (a Factory Reset), most probably to protect the user's data from a possible compromise.


Rooting on the other hand is moving a binary (su) under system (usually at /system/xbin and placing symlinks at locations like /system/bin) which with proper files permissions can be executed by an ordinary user to gain supreme rights on the system.


It is possible that the rooting method you attempt in your device isn't the standard (via Recovery) one but needs a one-click tool, and some users have reported data loss with the latter, so you may take a backup to be on the safe-side.


Further reading:




applications - How can I get apps from the Amazon app store from an unsupported region?


Currently, the Amazon app store appears to be US-only. Similar to How do I use the US Android Market from Europe?, I want to know: How can I use the US Amazon Appstore?


Market Enabler doesn't seem to work, and it's not IP-based like I previously thought. Any suggestions?




Answer



You have to "prove" to be a US resident by accessing the store with a US based IP once. It's sufficient to use a US proxy.


Additionally, you need a US credit card with a US billing address to buy apps; to download free apps, you can fake the number (all 0's will work) and address. Then ensure 1-click ordering is turned on in your Amazon.com account (the Appstore will prompt you to do this and provide a link). A prepaid credit card in USD might be a good way to do this for people outside the US, I'm not sure.


Some users seem to be reporting that Amazon is now blocking non-US IP addresses. This isn't 100% accurate, since I access the app every day from Canada with no issues. It may block specific countries though, in which case you'll need a US-based proxy/VPN. Make sure you trust it, so that your account credentials aren't compromised; don't use Tor / Orbot!


settings - Should I use Tasker or Locale?


For general detecting circumstances and triggering actions, what are the advantages/disadvantages of Tasker and Locale? Which one does the best job overall capability for improving the usefulness of a phone/device?


Categories of particular interest (in no particular order):



  • "Recipe" power

  • "Recipe" ease-of-creation

  • Variety of circumstances that each app can detect

  • Actions and configurations that can be triggered

  • Backing up setup

  • Sharing configuration




Answer



The easiest way to compare these two apps:


Locale costs more. But it is a lot more user friendly. You just set up "situations" with triggers and actions. Then you prioritize the situations. That's it.


Tasker costs less. But it is a lot more customizable. It's more like being given a scripting language. There are TONS of options and choices and it can get really confusing if you don't know what you are doing. It is not made for the average user.


I will say that anything Locale can do, Tasker can do it too. It just isn't as quick and easy to set it up.


In regards to backing up, you can backup Tasker into script files. Locale has no built in back up system.


Both of these applications are extendable to do practically anything because they support plugins. Tasker supports Locale plugins too.


Also: personally, I use both of these apps. I use locale for setting up common situations (disable sounds when asleep, adjust brightness/screen timeout when plugged in, go silent at work, etc.) and then Tasker for... well... tasks! Such as plugging in my headphones I reduce my media volume to 50% (I've blared music accidentally way too many times) and displaying a menu of music apps.


Sunday, November 25, 2018

What app does this notification icon belong to?


What app does this notification icon belong to? Upper left (x shouldn't be there). Looks like a chat bubble or ribbon. Thanks!! enter image description here





I can't restore apps with titanium back up


I got various problems.


Sometimes I get parse error. Sometimes it just stuck at 0%


I did everything


http://www.guidingtech.com/37632/fix-titanium-backup-errors/


My SuperSU is updated.


This is my ONLY backup.


I used to do xiaomi back up using settings. However,


I have no way to move the back up to the PC because I don't know where xiaomi stored the back up. When I flash the new ROM it seems that the back up is gone too. Xiaomi pc suite cannot back up ADB back up fail.



The only back up I have is that titanium back up.


Now I tried to restore and I got the back up stuck at 0%. I tried everything.


I tried upgrading to pro.


I change app processing mode from auto direct to auto indirect. The parse error is gone but still stuck at 0%.


I reselect /TitaniumBackup as backup directory.


No avail.


What sort of back up titanium back up make anyway? Do they just store the apk? Are titanium back up apps the only way to restore titanium back up backups?




contacts - Moving Nokia content to an Android phone



What is the easiest way to move Nokia (Symbian E series) content, such as contacts, inbox, photos, etc. to an Android phone? I can extract a backup from the Nokia but it's in .nbu format



Answer



By far the easiest way to transfer anything contacts related to an Android phone is via GMail.


When I moved from an old Nokia phone to my Android HTC Magic about a year ago, I downloaded and installed the Nokia Suite of tools for my phone from the Nokia website, installed them, copied my contacts into the Nokia Suite app on the PC, then did an export from the Nokia Suite contacts app to a CSV file. I remember seeing the Noklia-only NBU format as an optin, but if you're in the Contacts-only part of the suite it should also allow the CSV export (as this is also the easiest way to do a one-off import to other apps like Outlook).


At that point you can go into GMail, click the Contacts link, then at the top you should see an "Import" option, use that to upload your CSV file. All that you should lose from this is the contact's photos, but you can easily back up your contact's photos from the Nokia suite, and then just upload them to GMail one by one, or alternatively let Android on the phone sync with Facebook, etc and pull the Contacts photos from there itself.


You might find that if you already had some people in your GMail address book that you'll have a few duplicates now, just tick the relevant Contacts in Gmail and select "Merge these contacts".


For content, such as photos or music, which are probably just files on the Nokia's SD memory card, the easiest way is to attach the phone to a PC, select Data Storage/Transfer Mode on the phone, then open the SD card drive on the PC, drag all the relevant files onto the PC, then attach Android phone, mount SD card and drag all the content into the relevant folders on the Android's SD card.


As for messages, do you mean SMS/MMS text messages? As far as I know there aren't easy ways to transfer those between phone OS's at all (unless you're already doing something like sync'ing them to GMail).


Saturday, November 24, 2018

5.0 lollipop - What is the minimum MicroSD speed necessary to extend the storage of an Android phone?


I want to extended the storage of my Android phone be switching it to a MicroSD memory, as Android Marshmallow allows.


What is the minimum speed I need to use to avoid impacting performance? I am considering a SanDisk Ultra, but I wonder whether an Extreme will be better?


Are there any other aspects I need to check on the card to ensure compatibility?



Answer



tl:dr;


Go in for SDXC UHS class 1 or A1 cards if you are looking to run apps from Ext SD





SD card speeds have two aspects that would impact your proposed use as adoptable-storage ( though your question wrongly assumed that adoptable-storage is available on Lollipop, while it is introduced only from Marshmallow )




  • Sequential speeds - which are applicable when one chunk of memory is being written or read, say like a large video or a heavy presentation file




  • Random IO speeds - which pertains as the name suggests which are random in nature, as is the case with accessing app or app data , as in the case of adoptable-storage





Till recently compatibility for your purpose was being viewed only with sequential speeds. Motorola recommends UHS class 1 :


enter image description here



  • Last year SD card association has come up with a new standard that specifically addresses random IO for application access and is called A1 App Performance


The SD Card Association to Classify IOPS Performance of Memory Cards via Logo



....In today's climate, usage patterns of SD cards by different people vary greatly. Some need to record and store UHD content, other need to run applications, which is why the former benefit from great sequential performance, whereas the latter need guaranteed sequential and random read/write performance



AFAIK, SD cards with this rating are not yet marketed



As additional information here is where the A1 cards stack up when you compare sequential and video speeds


enter image description here


enter image description here enter image description here


Finally, coming to your question UHS 1 speeds (SDXC) are recommended ( since you haven't linked the cards under proposal, I am unable to specifically say which is better) or if you can wait for a while purchase A1 class which is better suited for adoptable-storage, in case you plan to upgrade


Also see this question for compatibility chart Should SD card be formatted before putting into new phone?


How can I force a complete new sync of my Google contacts to my phone?


I would like to force a fresh download of all my google contacts to my phone (and before delete all the google contacts I do have on my phone ... as the sync on my phone got confused and keeps creating thousands of duplicates which is kind of annoying and slows my phone down quite a bit ...


Is this possible? I guess, I should not delete the contacts on my phone, as might cause to delete the contacts in my google account as well.


Does anyone know where the contacts are cached on the phone? And is it possible to delete the cache in order to force a re-sync?


There are a couple of apps that seem to relate to contacts:



  • com.android.providers.contacts "Kontakte-Speicher" (Contacts Storage)

  • com.android.contacts "Kontakte" (Contacts)


  • com.google.android.syncadapters.contacts "Google Kontakte
    synchronisieren" (Google Contacts Sync)


Which of those does store the google contacts? Are the contacts stored in the data memory or in the cache?



Answer



What I did:


I removed my Google account from my phone, then deleted all data of the Apps: Contacts, Contacts Storage and Google Contact Sync, rebooted the phone and added my Google account again. Result: All my Google contacts are gone (and the phone is suddenly quite fast again! :-)


... however, it does not work to sync my Google contacts back (my LinkedIn contacts are still there). When I go to Settings > Accounts (Google) > my Gmail account it shows that all different apps have synched, however the "sync" icon stays visible for the contatcs, while it disappears for all other Apps after sync. – Pedi T. 1 min ago edit


I really had expected that removing the account will solve the sync issue .... any hints? But actually, this question is answered now, the remaining question is, how to fix my broken sync of contacts ...


Friday, November 23, 2018

6.0 marshmallow - "Searching for GPS" in Google Maps after update



I have been using Google Maps on the same phone (LG G4, android 6.0) for about 2 years now. Now suddenly after a Google Maps update the phone has GPS issues. It can find where I am and my direction (before I input any destination) but when navigation starts, every 5 seconds or so I get a "Searching for GPS" message and it can't find where I am. Needless to say that this has made the app useless as I cannot navigate anywhere.


If I use other GPS navigation apps such as HereWeGo everything works perfectly so a GPS harware issue is not the case.


I also waited for a new update to come, hoping that it might fix the issue, but the issue persists. I have also deleted tha app's cache and also deleted and reinstalled the app. Still nothing..


What happened with that update, and how can I fix that??


UPDATE: The problem might me a hardware issue as it started doing it on Waze and HereWeGO.




backup - how to back up an app's data manually?


I am able to backup my app's data from the root/data/data/you.package.name directory by just moving it to SD card manually. however, when i reverse the process, AKA paste the data back to simulate a restore, the app just force closes, i have tried it with a bunch of apps and noticed the same reaction. Where am i wrong?




4.2 jelly bean - How to watch videos in 144p, 240p, 360p, 480p, 720p on YouTube app?


While watching videos in browser it shows me options of 144p, 240p, 360p, 480p, 720p and so on. But on YouTube app for Android I only see option of HD/HQ (I assume its High Definition / High Quality).


How can I watch videos in 144p, 240p, 360p, 480p, 720p on YouTube app?



Answer



You can't. Those quality settings only apply to the desktop version. Mobile apps use a different set of videos, which are already optimized for mobile devices, and have two different quality settings, regular and HD.


Thursday, November 22, 2018

home screen - How can I replace HTC Sense?


I saw not using HTC Sense as a power-saving tip on another question, but I just wanted to know what the easiest way to replace HTC Sense is and what it requires me to do?


Do I lose all my widgets too or will it mostly change the way my Home screen looks?


Edit: I don't need HTC Sense to disappear completely from my phone or need to root it. I'm just curious how I would go about replacing HTC Sense with another application launcher.



Answer



To replace HTC Sense completely you will have to root your phone and replace the ROM completely. Please see this post for more information: How do I root my Android device?


If on the other hand you're looking at replacing your homescreen/launcher then there are plenty of options.




I personally have LauncherPro and have upgraded to the Plus version. The Plus version has 90% of the widgets Sense UI has but is in my opinion far quicker, more stable and has way more features.


NB: I don't believe any of these Launchers allow you to utilise the widgets from Sense UI.


EDIT: Just to answer your comment. LauncherPro is an app you can download and install from the Android Market. Once installed clicking the Home button will prompt you to select which launcher you'd like to use (either LauncherPro or Sense UI). All you would do from there is check the "Default" checkbox and select LauncherPro.


adb - How can run native executables compiled for ARM on unrooted Android devices?




Following this tutorial I have compiled a Hello World! ARM binary from C source using gcc. I want to run this program on my unrooted Android phone but I can't figure out an easy way to do it.


What I've tried:




  1. Copying hello to /sdcard and trying to run it from there. This doesn't work because the internal storage is mounted with the noexec flag.




  2. Copying hello to /data/local/ using cp hello /data/local/ or cat hello > /data/local/hello as explained here. This also doesn't work and I get a "permission denied" error.





  3. Installing a terminal emulator program such as Termux and using the Termux app to copy hello from /sdcard/hello to /data/data/com.termux/files/home, running chmod +x hello and then running ./hello from the Termux home directory within the Termux app. This works but is not a feasible solution.




Is there a better/easier way to run native ELF executables on an unrooted Android phone directly through ADB and doesn't involve installing any apps?



Answer




  1. In addition to noexec mount option, /sdcard is emulated filesystem with fixed file permissions. So files can't be set executable. But some file explorers like MiXplorer support executing binaries/scripts from /sdcard through /system/bin/sh.

  2. /data/local has permissions 0751, owner root.root 1, so normal apps can't access it. However from adb shell use /data/local/tmp which has user/group owner 2000 (aid_shell) 2 and selinux is also allowed 3. So you won't get permission denied.

  3. If you don't want to use PC, terminal emulator is the only option. On Termux you can also add /data/local/tmp (or a subdirectory) to $PATH by editing ~/.profile if you want to avoid placing binaries on multiple locations. But the directory should be world-readable and selinux must not be denying the access or execution of binaries.



2.2 froyo - Play audio of flash video while screen is off?


I want to listen to the audio portion of flash on my Droid preferably with the screen off. Sites like InfoQ.com have great interviews in flash that I want to just listen to.




Wednesday, November 21, 2018

4.4 kitkat - Google Voice Search requiring internet access even when offline speech recognition pack is installed


When installed, the Google app includes Voice Search.


In the settings for Voice Search, there is an option to install Offline speech recognition packs.



Despite doing this, Voice Search is still requiring internet access to perform speech recognition for simple tasks like writing messages or loading an app (both of which are offline tasks).


Although this Android SE question is specific for Jelly Bean, offline recognition should also be working in KitKat.


For Android KitKat, how do you fix this issue?




How can I get the Android to use wallpapers sized to my screen resolution?


When I only have one "desktop" on my Android phone and I select one of my photos for the wallpaper, it asks me to crop the image. The cropping tool only allows an aspect ratio that has nothing to do with the real aspect ration of my phones screen resolution. Why?


I have a Samsung GT i5800 running Android 2.1update1.



Answer



Pretty sure this was present in Eclair (but it's possible I'm mis-remembering and this was a new feature in Froyo) but when you select a picture in the gallery, at the cropping stage it should give you a choice of screen resolution/aspect ratios to use. One of them should be the resolution of your screen, the other one is for the side-ways scrolling multi-screen wallpaper.


I've ringed round the two selection options in the screenshot below, tap the wide option on the left for the multi-screen wallpaper and the one on the right to crop to a single screen. You should then be able to drag the crop box out to be the full picture (if you've got the aspect ratio right on your image).


enter image description here


Edit: This appears to be a Samsung TouchWiz feature, rather than a stock Android feature, it should still be present on OP's Samsung GT i5800.


Tuesday, November 20, 2018

sd card - How to install APK files on SDCARD?


I have samsung galaxy 3 (I5801). I have downloaded many APK files from internet. I have no problem in installing APK files. By default when APK file is selected it installs itself to phone memory. I want it to install application on SDCARD. I have made my phone memory full.


So my queries are



  1. How to install APK on SDCARD? APK should install itself to SDCARD.

  2. How to move already installed application to SDCARD from phone memory?




installation - Why can't I press the Install button when installing applications from unknown sources?


I'm trying to sideload an application, as seen in the picture below.



I have allowed the installation of applications from unknown applied actions in settings, but I can't seem to press the install button. The cancel button works correctly and installing applications via adb install works correctly. What's the problem?


EDIT: For those who have this problem, using ChainFire's C.F. Lumen will correct it because the app uses hardware compositing, and Android doesn't notice a "layer" on top of the current screen.



Answer



Looking at your screenshot, I think you are using screen filtering apps like Twilight, f.lux, CF.lumen and bluelight filter. Try to force stop/uninstall/disable the screen filtering app and it will work again.



If you are not using any filtering app, try looking for your installed apps that have overlay capability, apps that can show their contents over another apps, apps with overlay permission (like- Messenger, Musixmatch, Touch Assistant apps that can float on your screen).


If you are not sure, try disable them one by one in your Settings ⇒ Apps and find which one is causing the problem. You can also look for "Draw over other apps" menu in your android setting where all the apps with this permission will be listed. If you couldn't locate the menu, search for overlay permission + {android version} + {device manufacturer}.


Samsung Firmware Modifying!


As i'm working as a mobile software technician, alot of times i need to unpack some odin firmwares to add or remove some files, maybe adding some languages which isn't available in the firmware, then i repack it again so i can flash it with odin, i need to understand Samsung firmware structure, i need to know how exactly the system works, for example: I747 is an US phone, which comes with only 3 languages, if i want to add some other languages to it's firmware, then i need to understand the CSC tree first, so i can edit it and add the desired languages pack, i've been searching around for some tutorials about that but i couldn't find any, i know how to unpack and repack odin files, but as i said, i need to understand the system.




root access - What is the purpose of an app disallowing backups (android:allowBackup="false")?


I'm asking specifically because Helium (the application formerly known as Carbon) uses root permissions to do data backups and with root I can manually (through the shell or Root Explorer) back up data for apps that disallow it. So why would some app data not backup with Helium (which has root privileges granted)?


I read the information about the permission elsewhere on SE as well as at developer.android.com that says user couldn't copy off data to dig through on their PC, but it's actually trivial if you have root access in the first place. If you're really into digging through data then bypassing the permission is trivial. If the permission would stop you, you probably wouldn't be the type to be digging through app data.




Is there any known memory leak in Gingerbread 2.3.3 fixed by occasional reboot? Related to battery usage?



I notice that when I reboot my Samsung Captivate, it runs smoothly for about 2 or 3 days. After that, I notice that there is a lot more lag with various apps, and the launcher screen is more likely to die and restart, mostly after running the browser. After I reboot, it seems to behave fine.


Today was one of those days where I needed to restart. I also noticed that the battery drained much more quickly today (down to 45% after 3.5 hours). Looking at battery usage stats, Android OS used 41% of the battery.


From talking to friends, battery usage issues are fixed temporarily by a simple reboot.


From other questions on here, people who have issues with lag use various type tools like Watchdog, only to see Android OS using most of it.


Is the battery usage issue and occasional lag issues related? Is this an issue that is fixed in 2.3.4, or a subsequent version?



Answer



I upgraded to a 2.3.4 ROM. I no longer have the battery drain issue, or the lag issue. The question is whether or not it was the specific ROM or the 2.3.3 OS, but based on multiple links, here and here, I believe it is a 2.3.3 issue fixed in 2.3.4.


storage - Termux - How do I create a directory of files accessible outside of Termux?


I discovered that the files and directory that are created in (default) Termux, are not accessible to other apps on non-rooted phones.


Where is the folder that Termux defaults to?


How do I set it to use a folder / filespace that I can access through an app like ES File Explorer?


Or perhaps slightly differently, how in Termus would I change to, let's say, the default "Download" folder?


Cheers.





Anyone know of a custom GPS ROM for Samsung Galaxy 5?




Possible Duplicate:
Where can I find stock or custom ROMs for my Android device?



I recently bought a Samsung Galaxy 5 (model number GT-I5500) and I'm new to the android world.



I'm not satisfied with the performance of the GPS on my cell phone so I thought it would be interesting to use a custom ROM to see if it improves a bit.


Anyone knows of a ROM that was tested in this model?




Amazon App Store - Location of the downloaded APK


Where does this app store save the downloaded APK file? I have a problem where certain apps will only install when the sdcard is unmounted. The Amazon App store needs sdcard to be mounted



Answer



This is based on my EVO, but they appear to download into the Appstore's "private" external storage directory, which is /sdcard/Android/data/com.amazon.venezia/cache/. From what I've seen they appear to then get deleted after being installed, but anything which has been downloaded and not installed looks to be there.



Monday, November 19, 2018

profiles - Override WhatsApp contact image with the chosen Contact Image


I dislike how people use full body pictures for their contact images when it's a small image. When I link the accounts in my Android, I chose a picture that looks good and helps me identify them easily. But in WhatsApp, when these people chose their profile picture, they override my selection.


Is there a way to fix this?



Answer



For now there isn't, unless an add-ons for WhatsApp will enable this or they built it in themselves. It's comparable to Facebook, user set their own avatar and this can be seen by friends. This works unlike your contact list in which you control the content and other users have no say in adjusting the content.


settings - Undo Android 4.0 (aka Ice Cream Sandwich) Full Disk Encryption


Just upgraded my Nexus S to Android 4 aka Ice Cream Sandwich. Was looking through all the new features, and decided to enable encryption, which worked (and is working) just fine. Now I'm wondering if I can undo that and revert to an un-encrypted filesystem.


There does not seem to be an option in the settings area, and while I'm not fussed about doing a factory reset, I just wonder if I'm missing an obvious option somewhere. Can anyone help? Or even confirm that the factory reset is the only way out?



Answer



There should have been a warning when you begin the encryption that you had to agree to. The only way to unencrypt it is to perform a factory reset, thereby wiping your data partition completely.


enter image description here


Sunday, November 18, 2018

wi fi - What range of tcp buffer size do you suggest for slow and fast networks?


If you search the net, you come across with ranges like these that claim would enhance your net throughput:


net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960

net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960

In place that I live, the net speed of gprs/edge connectivity is so slow that even sending just a sentence of text via instant messaging apps like Whatsapp could take up to 5 seconds and even fails to send some times! but on the other hand my wifi connectivity is very fast;


so; what range of tcp net buffer size do you recommend for these two connections that better suits me?(or maybe any other effective variable)



Answer



Bufferbloat only becomes a problem when the link (i.e. your edge/gprs connection) is congested. If it's not congested, you may just have very poor cellular reception.


If bufferbloat is really the reason you will be unable to do anything locally (because the problem is very probably the largish buffer size on the cellular network equipment).


A few pointers:




  • try to avaid parallel traffic when using WhatsApp

  • try to switch off Image loading in WhatsApp (not sure if this is possible as I don't use WA)

  • (root required) use an outbound app firewall to avoid unnecessary traffic (e.g. AFWall+)

  • (root required): use an adblocker to avoid unnecessary traffic (e.g. AdAway)


launcher - App drawer icon gone from Cyanogenmod dock


I have a Samsung Galaxy S2, running the latest CM10.1.


I lost the app drawer icon on my Dock;
I must have deleted it.
The app drawer icon lets you go to the app list, and the widget list.


How do I get the app drawer icon back?
The icon looks like a circle with 6 dots inside it.



Answer



Here are two things you can do:



(1) Download the FREE AppDrawer app from Google Play.
It gives you a shortcut to the app list.
However, it does not give you the widget list.


(2) Reset Trebuchet.


NOTE: Use the procedure below at your own risk.
It clears (or resets) the contents of your home screen.


CM10.1 uses the Trebuchet launcher.


From your homescreen,
press the left menu button, and select Manage apps.
Look for Trebuchet, and click it.

Press the Clear data button. Alternatively, you may find success (without having to repopulate all of your home screens) via simply selecting "Clear Cache" and then "Force Stop" on the Trebuchet apps menu.


4.0 ice cream sandwich - Seeing the full text of a long notification


I've got a notification on my phone where the length of the text exceeds the width of the screen and it doesn't wrap, just wanders off the edge. How can I see the full text of the notification?


I've seen a suggestion here that long pressing for ~5 seconds shows it however all this does is bring up the App Info menu. Maybe on older versions of Android that didn't have the App Info menu this worked? Ideally looking for an answer that works on Ice Cream Sandwich and above (since I think that was when the App Info came about?) but I have a Nexus 4 running Jelly Bean 4.2.2 phone.


Here's the notification that I received. Hypothetical: Why did I lose data connectivity? What did I do!?!


enter image description here





Saturday, November 17, 2018

4.0 ice cream sandwich - How do I turn on flashmode in Sony Ericsson Ray?


How do I turn on flashmode in sony xperia ray? I am doing what is said in forum the flash tool says I am in Fastboot mode not in flash mode.



Answer



HINT: Just try the combination with the other volume button if you enter the wrong mode (that's what I do because I cannot remember the button trick either and do trial&error every other time I need this.


Launch your software, prepare the ftf for flashing and only then do the following to enter flash mode:



  • Switch off the phone (remove battery maybe)


  • Press the Volume down button and hold it

  • (While holding) Plug in the USB cable

  • If successful, the LED should turn green


Just for the record, to enter fastboot mode:



  • Switch off the phone (remove battery maybe)

  • Press the Volume up button and hold it

  • (While holding) Plug in the USB cable

  • If successful, the LED should turn blue



If I mixed something up, please correct me.


Friday, November 16, 2018

html - How do I view source in the Android browser?


Is there a way to view the source HTML in the Android web browser?



Answer



You can use Javascript's alert method to return the source code, type this in the address bar:


javascript: alert(document.getElementsByTagName('html')[0].innerHTML);


permissions - Grant notification access via ADB


This might seem weird, but I installed a regular Android app using ADB to my Huawei Watch 2 and the app requires notification access which when attempting in app causes it to crash as it trys to open the settings to allow it's access which doesn't exist in the settings.


I just need to grant this one permission in order to get the app to work




Thursday, November 15, 2018

wi fi - How to reach local computer via machine name instead of IP?



Developer here prototyping a mobile app, somewhat new to mobile:



  • I have a simple HTTP service running (currently) on my main laptop with machine name latitude.

  • Another laptop named vaio sharing the same WiFi network can access that service via http://latitude:8080 -- in other words, it can easily resolve the (current) IP 192.168.x.y (or whatever dynamic IP it has at that moment) of latitude somehow.

  • Now my HTC Android phones, connected to the same WiFi network, can reach the IP address of latitude so opening in its browser http://192.168.x.y:8080 works.

  • But I'd like to use the machine name here, too, like when I access the HTTP service from vaio, simply by typing http://latitude:8080 and have the phone resolve the current dynamic IP of latitude. This doesn't work, only get the standard browser error page: "Webpage not available".


Is there some DNS setting in Android I need to tweak? Haven't found anything from playing around with Settings, and a question like this is notoriously hard to google, too...


The One V has Android 4.0, and the One M7 has Android 4.2 in case that makes a difference.


(Note, this should work even when the Android is not USB-connected to my computers and is not acting as a WiFi Hotspot -- obviously, since it's consuming my main WiFi network anyway).





Wednesday, November 14, 2018

settings - Can’t enable the developer options of Samsung Galaxy Tab


I have several time tap on “Build Number” for 7 times but it does not show any toast message and also not enable the developer options.


Where can we find the USB Driver for the Tab.


I have Samsung Galaxy Tab(GT-P1000).





SMS-Email Gateway App



Is there any combination of android applications which can connect to a POP3 account and:



  1. transfers emails to SMS (by phone number provided in the subject of the email)

  2. transfers SMSes to an email?



Answer



Not sure how much reliable this is, but I found this app: SMS Gateway


Their description says that e-mails via POP3 can be sent via SMS, while SMS can be sent via HTTP GET request.


Tuesday, November 13, 2018

4.0 ice cream sandwich - How do I disable the on screen keyboard? I have a USB keyboard attached


I have a ZeniThink C91 using Ice Cream. I also have a case that has a USB keyboard. How do i disable the android Keyboard so only the USB keyboard is active? Ice Cream 4.0




sms - Recipients complain they receive Text Message from me with a half hour delay


I have a G2 w/ Android 2.2 on T-Mobile and Some of my friends complain that they receive Text Message with a half hour delay. One friend is on T-Mobile and one is on ATT so I'm not sure if it's a network, sim card issue, phone issue, android issue, or if it's just their phone....


How can my friends fix this issue? New SIM card?




Answer



There was a point a couple of years ago where I had persistent problems with SMSs not being delivered, or being delivered hours late to one particular person. That person was my girlfriend at the time, so you can imagine how well it went down that I seemed to be ignoring her all the time. After much backwards and forwards with the network they ended up issuing us both with new SIM cards and we never saw the problem again.


SMS was never originally designed to be used the way that we all use it today, and is unreliable, but if this keeps happening bug your network and they may be able to do something to help.


nexus 5 - How to get exact call time?


How can I get the exact time that a specific call took place? If I go to "recents" in the phone app, I see entries with times that read like Mobile, Yesterday. I need the exact time, down to the minute.



Answer



For Android 5.0.x Lollipop:



  1. Either on "Recents" or "Call History", tap the entry you want to see. It will open a mini-menu under the entry with options "Call back" and "Details".

  2. Select "Details" to see the call details.

  3. From here, you can see the time when you receive/miss a call, and also the duration of the call.


Call Details on Phone app



Click the image for larger variant


Monday, November 12, 2018

installation - Can't install previously installed apps from Google Play


My Samsung Galaxy S2(I-9100) was upgraded to 2.3.6 by the technician at a Samsung Service Station. This resulted in a wiped-off of all the apps that I had installed along with some other data(like contacts,sms etc).


I had to go through the entire procedure of registering your phone with my gmail account.


I cannot install some of the apps that I had previously installed (from the web store) because I cannot choose the device and I get the message "Your device already has this app installed".


Any help would be appreciated.


Thanks.


error1



enter image description here



Answer



The issue here is that the uninstall process wasn't registered at Google Play Store.


Without the uninstall process registered, Google Play Store still reports the app as installed on the device that's associated with your Google account.


To overcome this, you need to manually trigger the uninstall from the Google Play Store, within the "MY ANDROID APPS" list:


Access Google Play Store User Apps List






I have a couple of apps that I've uninstalled from my device and the uninstall process wasn't registered at Google Play Store. I'll use one as a guide:





  1. Access "MY ANDROID APPS" list, search for the desired app and click the recycle bin icon to trigger the uninstall:



    Click the uninstall icon





  2. After confirming, the app will get marked as "removed":




    Application marked as removed





  3. Now you can access the application at Google Play Store, and install it like you mentioned that you prefer to do:



    Install the application






Sunday, November 11, 2018

applications - Systemless Root


Chainfire (the developer of SuperSU), has come up with a new style of rooting devices on Android 6.0 Marshmallow and above. This is "systemless" root, and is all the rage right now. So, just in case anyone feels curious, I thought there should be some information about "systemless" root here for future reference.


The main question:


What is "systemless" root, exactly?


This question has 2 ancillary questions, which are:




  1. Where is it more applicable over traditional "system-based" root, and how is it different from it?





  2. Is it better than traditional root? If so, how?




A comprehensive answer to the main question along with the ancillary questions will be preferred.



Answer



Main Answer:


Systemless root is a rooting method/procedure developed by Chainfire (the developer of the popular root management app SuperSU) which involves a modified boot ramdisk image. The superuser su binary becomes a kernel inclusion instead of existing under /system/xbin/, like in normal system-based root.


Ancillary Answers:





  1. Preference of systemless root over traditional root:


    It was initially suggested by Chainfire to be useful for Nexus devices from Marshmallow onwards to prevent rooted users from having to reflash the entire stock system, boot and recovery partitions before undertaking even a minor OTA update, which has since become more important as Google has introduced the policy of pushing out monthly security updates through OTAs, and flashing the entire device every month is tedious at best.


    Systemless root eliminates the heavyweight system partition from the flashing equation, allowing the devices with systemless root to be updated just after reflashing stock recovery and boot.




  2. Pros of systemless root over traditional root:



    • Utility when OTA updating devices as mentioned above.


    • The modified boot image gets rid of the "Tampered" screen on Android bootup from Marshmallow onwards, if the device has a non-stock partition, most commonly recovery.

    • No exploits required. Systemless SuperSU can technically be flashed as a boot image through fastboot, although it is normally done by flashing a zip in a custom recovery, which automatically patches the on-device boot image to make the necessary modifications to support systemless root.

    • It works with an SELinux Enforcing security condition, while traditional root needs SELinux Permissive on Android 5.0 and up.

    • It unintentionally circumvents Android Pay and Android for Work root restrictions, which work with traditional root.




  3. Cons of systemless root over traditional root:



    • Quite buggy and is still in BETA stage, although it is being actively developed and is definitely usable (from personal experience). Edit: No longer buggy and the default rooting method on Android 6.0.1 and up when using SuperSU.


    • Some custom kernels like LeanKernel refuse to work with systemless root as they need traditional root for functioning properly. Edit: Most custom kernels now recommend systemless root, a well-known such kernel being ElementalX.

    • Some root apps may not work with systemless root as they hard-code the path-to-su in their code, which is only applicable for traditional root.

    • Not sure if this is actually a con, but systemless root is the only recommended rooting method that will work on Android 6.0.1 and up.




Sources:



  1. XDA-Developers

  2. Nexus 6P Reddit thread (not sure if it's very reliable)



file system - What does /mnt/asec directory contain?


What does /mnt/asec directory contain in Android? Can someone explain in brief?




updates - Configure Play Store to download temporary files to SD Card


I find that every time I start to update an application using Google Play, my phone's internal memory starts to run out (i.e. the Play app downloads temporary files to internal memory). In a number of cases, the size of the update is quite large and I end up with less than 10% free space left which corrupts the installers and I end up with no update. :(


Is it possible to in any way instruct Google Play to use my SD card (which has over 10GB free space) as the temporary location instead of the space-constrained internal memory? As much as possible, I'd like to do this without having to root my device.




Saturday, November 10, 2018

6.0 marshmallow - Very low to no volume after upgrade to 6.0 marshmellow


I recently upgraded to 6.0 and since then I have had very quiet volume on calls and even when listening to music.


I have everything turned up to maximum but still very quiet like it is on low.


Has anyone experienced or heard anything like this or know of some ways on how to fix this and make the volume louder?


I am also running a Droid Turbo 2.



Answer



I eventually fixed this issue with another phone replacement in the end. Apparently, it was either a glitched update or something. I opted for a free phone replacement and I've not had issues since.


What's the easiest way to create a QR code for a link?


The title is pretty self explanatory on this one.



Answer



Using the goo.gl URL shortener: http://goo.gl/a4Wv and adding a .qr to the end of it: http://goo.gl/a4Wv.qr


HTC Desire low on internal storage, I'm clueless -- Any help?



It's been bugging me for a while but getting quite bad lately. I get warnings that my internal storage is full, I have about 13mb left of what I believe is 512mb worth of rom. I have checked with the app "diskusage" and my apps take about 122mb, with about 20 more mb being used by "data" (unsure what this is). When I check the apps list, my biggest app is some 12mb, and even within the first screen of apps this drops to just over 6mb. So I don't have extremely big apps, and I don't have all that much of them either. I try to put most on my sdcard, so no problem there either.


How do I figure out what's hogging all this space, and how do I fix it ?


On a related note, what is the Android equivalent of "formatting" your phone? I believe factory settings doesn't remove all data (sdcard etc) or does it?


EDIT: I have done a hard reset on my phone, and the free space available is somewhat similar to what I saw before. So, is it normal to only have about 150mb available for apps when the internal rom should be 512mb ?




external sd - Is it possible to mount on a PC an SD card that has been encrypted by an Android Marshmallow device?


I have a Samsung Galaxy S5 duos with stock Android Marshmallow, and I'm considering encrypting my SD card to prevent access to its contents in case I lose my phone. The main reason of not doing this is that I'm not sure if there's a way to mount an encrypted SD card on Windows (or other desktop OS's)


When I encrypt the SD card on my Samsung Galaxy S5, is it using a known implementation of encryption, or is it something that only works on Android (or perhaps Samsung) phones?


I do not want to use USB connection to my phone to access my SD card, it's terrible. Mounting the SD card is much easier and faster and less annoying.


EDIT: just to clarify, I am NOT talking about adoptable storage. I want a portable encrypted SD card that can both be read on PCs and Android phones (i.e. I want to be able to remove the SD card from my phone, plug it into my PC, provide a password to decrypt and read/write it like any other SD card)




Answer



Marshmallow has two ways to treat the external SD card :




  • Portable Storage : In this the entire memory of the ext.SD card is available for use, if it is not encrypted (natively) and you can mount it on your PC to read/ transfer contents




  • Adoptable-storage: In this the ext. SD is treated as a part of the phone and when you encrypt the phone, the ext. SD card is also encrypted. Once it is encrypted, it can only be read through USB and cannot be read independently by using a card reader to mount on your PC. You can read more on this at tag and it's wiki has questions to answer the common concerns. So, for all practical purposes encrypted ext. SD card cannot be read on PC independent the device. However, if your device is rooted, you can try the method suggested here How to decrypt Adopted Storage?





  • Full Disk Encryption details different encryption modes on Android Marshmallow. Whether OEMs implement it with additional security features is not known and surely won't be shared on public domain




Edit: Answering OPs query in comments and edit to question


See How does Samsung implement SD card encryption?




  1. Samsung implements proprietary encryption as evident from the question and also this Reasons for full disk encryption differences between Nexus & Samsung





  2. Encrypted card cannot be read without the device as on the first question linked




So, it would be not possible to read the card on your PC, by mounting it via card reader on your PC as you propose to do. To clarify further, it can be read if you connect your device using USB


Edit: For a technical understanding, see the excellent answer here How does Marshmallow encryption work technically?


samsung galaxy s 4 - Trying to restore photos from a broken S4 (AT&T), how do I go about it?



My friend broke her S4's screen, and wants to get back the photos from the internal memory. The phone does not have USB debugging turned on, so having it attached to the computer only charges it. The phone does show up in Kies and is asking for me to unlock it. I do have the pin code, but as the screen is dead, and I cannot put it in. ADB devices, and FastBoot devices do not show the phone at all. Fastboot Reboot-recovery does not do anything either.


How can I go about restoring these photos from the internal memory. Any suggestions would be helpful. Thanks!



Answer



Alright, I managed to get it work. I hooked up a octopus USB extension to a micro USB cable on one end, and an USB keyboard on the other end. I booted the phone and then pressed ENTER, ##PIN##CODE##, ENTER on the USB keyboard and the device unlocked. This took a few tries as I was going in blindly.


Then I unplugged the USB cord, then plugged in a micro USB cable that was connected to my computer (Ubuntu 14.04). The phone showed up w/o any problems and I was able to grab files from the on-board storage.


One thing I had to do was constantly keep pressing the BACK button on the device to prevent it from locking.


At the end of it all, I successfully extracted 4GB worth of pictures.


Friday, November 9, 2018

terminal - How to find out the UID of a given file/folder?


I have an issue with inconsistent UIDs.


I would like to know how to manually find out the ID of a folder (specifically the /data partition). I think that it should be the same concept of an usual unix/linux filesystem but... I'm evidently getting older for this stuff :-)


From the Astro app I can see the details of the /data partition but it only tells me d-- and I cannot find any user id.



Actually, I have not set up any account on this phone, so there should be (I guess) only one UID present (the default one) apart from the system daemons etc.


Maybe for this reason it doesn't show up? Is there another, more powerful/informative app to be used? A file manager of some sort, a terminal console would be ideal for me.



Answer



I'd personally recommend using a terminal emulator or adb shell and then using the ls command. You can get the UID's listed by name if you use the -l flag and listed by number with the -n flag. Note that in the /data directory you'll need root permission in order to index the files/directories, so ls will fail with a normal user:


root@android:/data # ls -l
drwxrwxr-x system system 2012-08-27 14:29 anr
drwxrwx--x system system 2012-08-29 17:46 app
drwx------ root root 2012-08-27 00:54 app-asec
drwxrwx--x system system 2012-08-27 00:54 app-private
drwx------ system system 2012-08-27 00:55 backup

drwxrwx--x system system 2012-08-29 17:46 dalvik-cache
drwxrwx--x system system 2012-08-29 17:34 data
drwxr-x--- root log 2012-08-27 00:54 dontpanic
drwxrwx--- drm drm 2012-08-27 00:55 drm
drwxrwx--- gps system 2012-08-27 10:29 gps
drwxr-x--x system system 2012-08-27 00:54 lightsensor
drwxr-x--x root root 2012-08-27 00:54 local
drwxrwx--- root root 1969-12-31 19:00 lost+found
drwxrwx--- media_rw media_rw 2012-08-27 14:10 media
drwxrwx--t system misc 2012-08-27 00:54 misc

drwx------ root root 2012-08-27 10:30 property
drwxrwx--x system system 2012-08-27 00:54 resource-cache
drwxr-x--x system system 2012-08-27 00:54 sensors
drwxr-x--- root shell 2012-08-27 00:54 ssh
drwxrwxr-x system system 2012-08-30 11:05 system
drwxr-xr-x root root 2012-08-27 00:55 tf
drwx--x--x system system 2012-08-27 00:54 user

root@android:/data # ls -n
drwxrwxr-x 1000 1000 2012-08-27 14:29 anr

drwxrwx--x 1000 1000 2012-08-29 17:46 app
drwx------ 0 0 2012-08-27 00:54 app-asec
drwxrwx--x 1000 1000 2012-08-27 00:54 app-private
drwx------ 1000 1000 2012-08-27 00:55 backup
drwxrwx--x 1000 1000 2012-08-29 17:46 dalvik-cache
drwxrwx--x 1000 1000 2012-08-29 17:34 data
drwxr-x--- 0 1007 2012-08-27 00:54 dontpanic
drwxrwx--- 1019 1019 2012-08-27 00:55 drm
drwxrwx--- 1021 1000 2012-08-27 10:29 gps
drwxr-x--x 1000 1000 2012-08-27 00:54 lightsensor

drwxr-x--x 0 0 2012-08-27 00:54 local
drwxrwx--- 0 0 1969-12-31 19:00 lost+found
drwxrwx--- 1023 1023 2012-08-27 14:10 media
drwxrwx--t 1000 9998 2012-08-27 00:54 misc
drwx------ 0 0 2012-08-27 10:30 property
drwxrwx--x 1000 1000 2012-08-27 00:54 resource-cache
drwxr-x--x 1000 1000 2012-08-27 00:54 sensors
drwxr-x--- 0 2000 2012-08-27 00:54 ssh
drwxrwxr-x 1000 1000 2012-08-30 11:05 system
drwxr-xr-x 0 0 2012-08-27 00:55 tf

drwx--x--x 1000 1000 2012-08-27 00:54 user
root@android:/data #

updates - What is the typical Android OS Upgrade policy?



I noticed that our HTC Thunderbolts were upgraded from Android 2.3 to Android 4.0. That is very nice, I thought it would never upgrade.


Now that it did, I am wondering, why / what rules qualify an upgrade? Is it once every 18 months regardless? Is it diverse depending on which phone you have? Does it also depend on the carrier and/or brand? (are the HTC phones generally this way, or is it Verizon's choice)


Please clarify the Android OS update policy for me.


It would be extra good if you knew the policy on the iPhone OS, and how it compares.


Oh, and I already know that apps (YouTube, Play Store, Play Music, Gmail, Games) are not part of the OS, except for certain bundled apps. (Camera, Internet, Phone, etc.)



Answer



There isn't a specific Android OS Upgrade Policy. If it's a Nexus device and it can handle the latest version of Android it will get the latest version of Android from Google. Other than that it is up to manufacturers to update drivers and their specific customized version of Android for their own devices and then it is up to the carriers to approve those updates and release them to users' phones.


Apple has only one phone basically and they release updates on what seems to be a yearly basis and update is done via their own service, not restricted by carriers.


5.0 lollipop - What kind of applications use internet on the background?




Viewed the list of applications that use Wi-FI and came across what is shown on the image below.


problem


What it is? Virus? Instead of Google I use F-Droid. Root is there, but only Total Commander and Titanium Backup are available. Phone - Samsung Galaxy J1 Mini. Rooted, twrp. In applications "10005" does not exist. Titanium Backup was deleted 2 month ago.


After installing Dr.Web 10005 disappeared. But from 15.11.2018 to 12.12.2018 "10074" exist.



Answer



Every Android app (including system apps) is a *NIX user and is assigned a unique UID within range 10000-19999 at the time of installation or during first boot (for pre-installed apps). That's how Android enforces Discretionary Access Control on apps.


The number you showed looks like UID of some app which has been removed now. You can check UIDs of installed apps from file /data/system/packages.list. UIDs near to 10000 are usually system apps or builtin Google/OEM/vendor apps.


If you have root, you can track/control apps' internet access based on their UIDs using Linux kernel's built-in firewall netfilter, which is controlled by userspace tool iptables. AFWall+ makes use of the same.


wi fi - How can I tell that my phone uses the Wi-Fi connection for data traffic?



I just bought the Samsung Galaxy 2 and my monthly data plan allows me 250MB.


I have Wi-Fi at home with 100GB of data per month.


Obviously, I want to use my home Wi-Fi as much as possible on my phone, and I have no trouble connecting my phone to it.


My question is:
How do I know if my phone is accessing my home Wi-Fi and not my phone company's network when I access the internet on my phone.


I can see that my phone is connected to my home Wi-Fi but it is also connected to my phone company's network at the same time. Is there a way to see when I am using my home Wi-Fi and when I am using my phone company's network?


I am worried that if my phone connects to the phone company's network and not my home Wi-Fi, then I will end up with a huge bill. I just want to make sure I am using my home Wi-Fi when I am accessing the internet on my phone.




Thursday, November 8, 2018

adb backup on Marshmallow - is it different?


Device and settings:



enter image description here


Goal: I wanted to take adb backup on Mint Linux (17.3) of my apps (with data if possible) and internal SD using this Full Backup of non-rooted devices as reference


Problems:




  1. When I key this in terminal



    adb backup -apk -shared -all -nosystem -f moto.ab


    I get the prompt "Now unlock your device and confirm the backup operation " in the terminal but nothing happens on the device- I do not see any panel to accept or enter desk top pass word as in pic below (it's the same if I try -system instead of -nosystem)




enter image description here



  1. The terminal reverts to prompt for next command in a few seconds ( A 0 Kb file is created on the laptop)


Question


Am I doing something wrong or Marshmallow require some extras to take a backup as desired?



Moto devices are said to be "pure Android" so I expect this problem to be prevalent on Nexus devices running latest OS




Edit: Things tried with varying sucesss



  1. Nexus 5 Marshmellow ADB backup problems. Going by this post



(....) it appears that adb backup isn’t recognizing the -apk, -nosystem, and -noshared switches. Any idea why? From the command line, if i remove those switch the backup runs



adb backup -all -f moto.ab 


works in the sense that I get the option on panel to enter password back up (problem 1 above overcome) but the file size (105 Mb) shows all apps are not backed up (In comparison using ES File explorer, the size is 2 GB)



  1. I had read somewhere on this site that Helium app is based on adb. Helium Wiki says



Helium is NOT available to Motorola devices. This is because Motorola phones have a bug that break Android's backup mechanism. Until this is fixed by Motorola, Helium will not work on those Androids (....) Update: Helium is working on the Motorola Droid Turbo.



That obviously explains why it doesn't work on my device was the logical conclusion. This called for experimenting, so I downloaded Chrome extension of Helium and activated it (it needed a little workaround explained here )


I selected all apps under Helium and it backed up (less some apps shown as "non backable") with a size of 110 Mb (similar to above experiment)



So, apparently, my device Moto X play is not the problem !



  1. Tried solution here ADB backup creates 0-byte file; prompts for current backup password even though I never set one; “Failed to set password” for Desktop backup password recommending escaping spaces between arguments


adb backup -apk\ -shared\ -all\ -nosystem -f moto.ab and got a 0 Kb backup file




Can I use a external Bluetooth Adapter on an Android Tablet without internal bluetooth?



I bought this Android 4.0 tablet but apparently it doesn't have internal bluetooth. I would like to ask if its possible to connect an external bluetooth device so that I can transfer my files from my laptop to the tablet.




4.0 ice cream sandwich - Storing Apps on internal storage


I have recently bought Karbonn A15, i am facing 2 problems in it.



  1. How to Store images taken from the camera to SD Card, currently its storing in Internal Storage, i have 8GB of External Storage, but just have 2.5GB of internal

  2. How to store apps in internal storage, currently it by default stores on system space, i have 2.5GB of internal storage but just have 581MB of system space.


Can anyone tell me how can i do the settings for the above things.



Answer



Short answer to your questions:




  1. In many cases, the camera app itself offers to chose the storage for images/videos. Check its settings for an item called "storage". If it's not there, you could try to use a symlink of the DCIM folder to the sdcard.

  2. That's a case for App2SD -- but depends on whether the apps support it or not. You can check this e.g. in Settings→Apps→Manage Apps. If supported by the app, you should be able to move it out of the "system space" from here.


As for where an app is installed by default, mostly depends on two things:



  1. what the developer specified in his apps Manifest for the install location (see App Install Location in the developer's documentation)

  2. what the user defined in the Android settings as default install location (see e.g. How to Install Android Apps to the SD Card by Default & Move Almost Any App to the SD Card)


Related information:




internal storage - What kind of data is stored in /data/user directory?


It seems to store some kind of application data, but how is it different from /data/data directory?



Answer



/data/user was added in Jelly Bean as part of multi-user support. Each user on the device gets a directory in there named after their user ID, and that directory contains each app's data directory for that user. /data/user/0 is a symlink to /data/data.



Cruz T301: Internet Kick-Off


I have a Cruz Tablet (T301) that runs Android 2.2.1. For the longest time, I've tried to fix this matter on my own, but now I've run out of options.


When I get on the internet, my tablet has an interesting favor towards Facebook: not surprising because it comes with an app/bookmark of Facebook by default. I can browse Facebook and share as much as I please as well as talk to my friends to my heart's content. However, if I step outside of Facebook for as short as a second, my tablet kicks me off the internet.



Various options I have embraced to fix this matter. I've already turned off my Wi-Fi, waited for a minute or two, and turned it back on to browse: that didn't work. I even restarted my tablet with the aid of my paper clip that keep handy for situations such as this: that didn't work either. I even became so bold as to perform a factory reset: even then I'm still being kicked off the internet.


I only have one application that allows me to browse the internet on my tablet: Browser, which also came by default. Is there anything else that I haven't tried yet that may aid me in this situation? Is it the application, or the tablet itself? Do I have a virus, and I'm just not aware of it? If I do have a virus, how do I get it fixed?




Wednesday, November 7, 2018

4.1 jelly bean - Backup gmail emails offline


I have an Android 4.1 phone. When I typically login into my gmail app, even if I am offline, I can see / read already downloaded emails. So, I have those two questions:



  • Where are those emails saved locally on my phone? Is there a way to access this folder within Android or through a PC?

  • Is there a way to backup all emails downloaded / stored on the phone, while still remaining offline?




Answer



You can use for this:


adb backup -noapk -noshared -f gmail.ab com.google.android.gm

would backup all data of the GMail app to your PC, storing it in a file named gmail.ab in the current working directory. A restore of that snapshot then is as easy as running


adb restore gmail.ab

Note that this will include all the settings of the GMail app.


If you prefer doing the same via an app on your device, take a look at Helium Backup.



Without root, it's not possible to access the corresponding folder on your device directly (which would be found below /data/data/com.google.android.gm and be owned by the GMail app, which forbids access for other apps/users, including the shell user).


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