Tuesday, January 31, 2017

settings - My Samsung Galaxy Note 8 Doesn't Show an "Allow USB Debugging?" Prompt. Is there a fix?


Around this morning, I had the idea to transfer all my whatsapp chats(from android to ios)


Not so complicated, right?


Well, I was in for a rude awakening. Not only did I spend literally 7 hours trying to fix it... I couldn't fix it!


That's basically why I'm reaching out to you. My last hope. My knight in shining armor.


Here are the more technical details:




  • Before you say it, and I know you will, I'll tell you - I restarted my phone about 10 million times

  • I've enabled and disabled usb debugging around 10 million times minus 1.

  • I haven't played with adb so I don't screw with my android system. However if that's necessary, I'll do what must be done.

  • I'm specifically using my own samsung galaxy note 8 since I previously tried on another phone(LG v20) and it didn't work either.


So, I must ask you, are you up to this challenge? Can you fix what seems unfixable?


P.s. Here's a preview of what should be showing up on my own android device but is not:


enter image description here



Answer



It seems like the profile of the computer(perhaps the RSA key fingerprint) was automatically recognized by the android device and so it didn't ask for any permissions. From there, I'm still kind of trying to understand it. But basically, as soon as I reset(factory reset) my computer, it started prompting me for authorization again. I'm sure the factory reset was on the extreme end of options, but it worked in the end.



settings - Stop Android from displaying "Install blocked" prompt


I am continually getting prompts for installing apps, such as Clean Master and or 9 apps on my Android phone. I turned off the option "Install apps from unknown sources" in security settings but then a message would popup saying "Install blocked" every time, as shown in the screenshot below.


So, how to stop these annoying prompts?


(Click image to enlarge)


message showing install blocked



Answer



You're better off with Izzy's advise and find and weed out the app trying to install that Clean Master app. Anyhow, there you go with an another solution.


When you attempt to sideload an apk using UI or any app that attempts to install an apk and isn't granted the permission android.permission.INSTALL_PACKAGES, Package Installer app comes into action and its activity PackageInstallerActivity is launched. The setting for unknown sources (install_non_market_apps) under Settings Storage's database is checked and based on that, you're either shown that prompt (dialog) or the permissions and the install button.


Even if you manage to find a hack that disables that prompt from being shown, Package Installer would still be launched and the UI would look awkward since only app's label and white space would be visible to you, which would do naught but create confusion.




The solution I ended up with is to get rid of the activity PackageInstallerActivity. You can use Elixir 2 to disable that activity.


Launch it → Application → tap IMG: → System applications → Package Installer → find and disable the said activity


You can also use in this case


adb shell su -c pm disable com.android.packageinstaller/.PackageInstallerActivity # Disables the activity
adb shell su -c pm enable com.android.packageinstaller/.PackageInstallerActivity # Use it to enable the activity

Now whenever you or an app attempt to sideload an apk which requires launching the Package Installer app, you may either get a toast like in the following image or an app registered to open/explore an apk would be launched or be suggested by system.


(Click image to enlarge)


IMG:



If the toast becomes noisy, hide it using EnhancedToast1 or UnToaster2. Since they are Xposed modules, you would need Xposed Framework appropriate3 for your Android version.


Note that disabling that activity wouldn't affect the ability of Play Store to install an app, neither would it affect adb install because the underlying package manager is intact.


You can use here too. Example, whenever your preferred file manager is active on screen, enable that activity so that you can continue to sideload an apk, should you decide to, and keep it disabled for any other on-screen active app.



You (KitKat or Lollipop users) can hide/block the whole Package Installer app. You definitely need for that.


adb shell pm block com.android.packageinstaller # for KitKat 
adb shell pm hide com.android.packageinstaller # for Lollipop

The biggest inconvenience here is that you won't be able to uninstall an app using Settings app because it uses Package Installer's activity named UninstallerActivity and UninstallAppProgress. Attempt to removal of an app using Settings app would cause the latter to crash.


Every time you intend to remove an app using Settings app or sideload an apk using UI, you must unhide/unblock Package Installer app.



To unblock/unhide, do


adb shell pm unblock com.android.packageinstaller # for KitKat 
adb shell pm unhide com.android.packageinstaller # for Lollipop

Note that hiding/blocking that app wouldn't affect the ability of Play Store to install an app, neither would it affect adb install because the underlying package manager is intact.




1: XDA: EnhancedToast
2: XDA: UnToaster
3. Xposed Framework: Android 4.x, Android 5.x and 6.x


Edit hosts file from terminal IDE with root accessed


My terminal IDE accessed root but cannot edit hosts file.


root@172.16.0.151:/system/etc #vim hosts

But vim just opens hosts file as readonly. Where do I missed here?



Answer



You've missed that the /system file system is mounted read-only.



mount -o remount,rw /system
cd /system/etc
vim hosts
# edit, save, then make /system read-only again:
mount -o remount,ro /system

Monday, January 30, 2017

twrp - How to uninstall a system app using adb uninstall command (NOT remove via rm or any other way)


Have to mention this to avoid possible confusion, this question is not duplicate. This question is specific to using adb to uninstall a package. There are several similar questions but are all different from this one, as they're focused on removing an application by any means.


Please do not provide answers using "rm" command to delete the package files. Also, answers related to malformed package names, or trailing carriage returns. I think they're pretty much all covered in all the other questions.


I had pm uninstall functionality but after ROM upgrade. Some things won't uninstall anymore. For example the following two system apps (which I removed under previous ROM, significantly improving overall performance):

/system/priv-app/SecurityCenter/SecurityCenter.apk=com.miui.securitycenter
/system/app/Updater/Updater.apk=com.android.updater


Now I get an error trying to pm uninstall them: Failure [DELETE_FAILED_INTERNAL_ERROR]


But other system apps (which won't uninstall through regular android interface) do uninstall via pm uninstall command. Example:
/system/priv-app/Browser/Browser.apk=com.android.browser


So both are system apps, what could be the difference between them?


For reference, I upgraded from MIUI 8.1.6.0 to 8.5.3.0, and re-installed TWRP and SuperSU. This question is not specific to my ROM, as I see other people are in the same situation. But I seem to have an advantage being able to be able to uninstall some system apps. And am willing to contribute, to find a solution for everyone, to uninstall any app.


I tried: mount -o rw,remount /system
but that didn't solve it.


Please help out with any ideas along the way. Thanks!





Update 1 - Confirming steps to avoid intermittent issues
* Wiped all partitions in TWRP
* Installed Latest ROM (MIUI 8.5.3.0)
* Went back to TWRP, wiped only /Data
* Restored /Data from backed up version of the ROM that came with device (MIUI 8.1.6.0)
* Now after I boot into OS, ROM shows as latest (MIUI 8.5.3.0) in settings


Now I am able to pm uninstall every app I've tried. Even the most resilient: Google APP, Updater, Security.


This Frankenstein.. err I mean hybrid ROM works fine so far, and I've already removed many system packages, making the phone (Redmi 3S+) visibly faster. But I would still like to pinpoint what was causing this to make it into Generic Solution. So, if it ain't broke I'm willing break it, so next time it breaks we will know what's causing it and how to fix it.


Update 2 -

* Wiped all partitions and restored all partitions from Original ROM.
* Restored to factory settings (using TWRP)
* and after booting into ROM, went back to TWRP and made another backup
* Using same scenario as in Update 1 above, with only exception of using /Data from here. pm uninstall does not work.


Any thoughts on the differences between the two /Data partitions I should be focusing on?




Sunday, January 29, 2017

file system - Check and fix SD card errors within Android itself?


Sometimes my SD card gets "corrupted" and this leads to many read/write errors. Usually, connecting the SD card to the windows 7 and selecting the "Error Checking" (Right click the drive > Tools > Error Checking) option finds the corruption and fixes it.



Is there any tool or app for checking SD cards for drive errors and fixing the same from within the android itself?


I'd also like to mention that I'm on rooted froyo with busybox installed.



Answer



You can fix this with the help of root and a terminal emulator (e.g. Android Terminal Emulator (or, alternatively, using adb shell). The binary to do the job is called fsck, and usually located in either /system/xbin or /system/bin. Sometimes you need a special variant of it, which might e.g. be called fsck.exfat or the like. So first let's make sure we find the right binary:


cd /system/xbin
ls fsc*

If not found, repeat with /system/bin. I will assume here it was found in the first place, and is simply called fsck (adjust the following correspondingly if that's not the case).


As fsck comes from the "Linux core", we can consult its man page for the syntax. Though there might be some options not working on Android, the most basic ones should. See the linked man page for details (or run a Linux VM and use man fsck in case that page disappears) -- I will stick to the basics here:


First we need to find the device your SD card is bound to. If it's mounted, the mount command will assist us:



mount

That's it, basically: Check the output and see where your SD card sits. Usually this is something using vold, but it's different between devices. Output may include something like /dev/block/vold/179:17 on /mnt/storage/sdcard -- in that case, the first part of my quote is our device. In order to repair the "drive", you need to unmount it first. This can be done via the settings menu, or, as we're just in the terminal, by issuing


umount /dev/block/vold/179:17

Now we can go for the repair job. Basic syntax is:


fsck [options] [-t fstype]  [fsoptions]

So we first try the simplest approach and hope fsck figures out everything itself:


fsck -C -r /dev/block/vold/179:17


Which basically means: Show progress (-C), and always ask the user to repair (-r) any errors on /dev/block/vold/179:17. If this does not work out, check with the linked man page for further options.


Saturday, January 28, 2017

my samsung galaxy 2 battery is draining to fast!


I have an Samsung Galaxy S2 GT i9100. I have had it for quite a time, but today I noticed something strange:


First my battery had not been charging while I was sleeping: when I woke up I had only about 13% charge left. So I put the phone on the charger while I was making breakfeast.


When I came back to the phone some time later, it had nearly not charged at all: in fact the phone was using more battery then it was charging.


Why is my phone battery's charge dropping when I'm charging? I had this problem the whole day -- it won't charge more then 30%, then suddenly the battery level drops. How can this be solved?




nexus 7 - Google Voice "Call With..."


I love the Call With... feature in the Google Voice webapp and use it often. It allows you to initiate a call from your Google Voice number by first dialing one of your linked phones then patching you through to the number you want to dial:


Google Voice Webapp Call With...


This would be perfect for my Nexus 7 - I'm often at home on my couch next to my land line phone wanting to make a call. I don't want a VOIP solution for the tablet, I'd rather tell GV to call my land line and patch me through to the number I want to dial (the call quality is much better on the land line). I can't find this feature in the Google Voice Android app. I've used the webapp, via Chrome, on the N7 but that's kind of clunky. Does anyone know of more finger-friendly way to initiate a GV call like this from an Android device?




How do I transfer contacts from one phone to the other without a SIM card?


I have no sim card and a new Android phone. How can I transfer my contacts from one phone to the other without a SIM card?




Friday, January 27, 2017

networking - How to ping a local network host by hostname?


I recently wiped my phone and now I am unable to ping a machine by the hostname. Pinging by IP works.


I have a machine, let's say it is called NAS. From my Router and PC, ping NAS finds the machine. However, from my Android Phone, ping NAS returns ping: unknown host NAS.


I am rooted, so I went to /etc/hosts and added 192.168.1.### NAS and it was able to resolve NAS to an IP but what is the solution for making it ping all machines by hostname.


In my Wifi settings on the phone, DNS shows 3 entries: 8.8.8.8, 8.8.4.4, 192.168.1.1.




battery - What happens when using a cellphone when charging?


What happens when a phone is being used with the charger connected?


Will it take power from charger and save the battery usage?


OR


At one end, the charger keeps charging the battery and at the other end, phone discharges the battery simultaneously?


(I am using Sony Xperia SP with Android 4.2.1)




usb connection mode - How to enable SD MSC mount in Jelly Bean?



Since upgrading to CyanogenMod 10, the dropdown notification when I connect my phone to the computer no longer appears. How do I mount the SD card via USB MSC in Jelly Bean? Note that the drive still appears to the computer, just empty. My phone is an Xperia Arc S.


Update: I see no mass storage mode under USB connection settings:


Settings
Settings screen (click image to enlarge)




Answer



Seems as if Google is evil¹ and removed that option from Jelly Bean to enforce their DRM schemes². I found however a tool which restores it: Automated Framework Kit




¹Like we didn’t already know that.

²I have no idea what was the rationale behind it, but remember it’s the company which has a mail service that’s immensely popular despite not properly working with any major mail client.


Thursday, January 26, 2017

Android Facebook Version 3.4 - Sort News Feed



My Samsung Galaxy S 3 just updated to Android Facebook Version 3.4.


I cannot figure out how to sort News Feed by most recent?




twrp - How can I get my recovery back?


I was trying to get TWRP on my Asus Zenfone 2 ZE551ML (Stock firmware, WW-2.20.40.198). In order to do that, I tried to unlock the bootloader using this guide. I don't believe the unlocking really worked, though, because every time I tried to flash TWRP through Fastboot or the app, it failed.



It did, however, lose me my stock recovery. If I go to the bootloader and select "RECOVERY MODE", the phone just restarts and goes to the same bootloader again. So I got neither the stock recovery, nor TWRP.


As you can see from this answer, the only way I know how to flash stock firmware is through the stock recovery.


I did manage to root and install Xposed, though, both through adb. What worries me, though, is that if some root app or Xposed module mess up my phone somehow, I won't be able to flash stock firmware or a backup. So I really need a recovery. I would actually prefer to have the stock recovery at this point.


What can I do? I need the stock recovery to flash the stock firmware, but I can't.


I've tried Asus Flashtool before, but it didn't work. I think maybe it's because I tried it on Windows 10, some users said it worked better with Windows 7.


How can I get my recovery back?



Answer



You can flash the stock recovery through fastboot. The complete guide for flashing is here


external sd - High CPU load during file copy to SD card


Copying large files to micro SD card (via MTP mode or USB thetering and FTP) causes a high CPU load (around 90%) with the result of my phone rebooting from overheating.


Is this a normal behavior? Any suggestions?


My system is Cyanogenmod 11-M8 on a Galaxy S4 mini with a SanDisk Ultra microSDXC 64GB.


EDIT


Here are the last messages before reboot according to adb logcat


I/ThermalDaemon(  322): Sensor 'tsens_tz_sensor0' - alarm cleared 1 at 47.0 degC

E/MP-Decision( 1785): num online cores: 2 reqd : 1 available : 2 rq_depth:0.000000 hotplug_avg_load_dw: 29
E/MP-Decision( 1785): DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 rq:0.000000 seq:1069.000000
E/MP-Decision( 1785): num online cores: 1 reqd : 2 available : 2 rq_depth:2.500000 hotplug_avg_load_dw: 58
E/MP-Decision( 1785): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 rq:2.500000 seq:182.000000
I/ThermalDaemon( 322): Sensor 'tsens_tz_sensor0' - alarm raised 1 at 50.0 degC
E/NetdConnector( 832): NDC Command {4878 bandwidth gettetherstats} took too long (1006ms)
D/MobileDataStateTracker( 832): default: setPolicyDataEnable(enabled=true)


rooting - How do I root my Samsung Galaxy Ace?


I want to root my Galaxy Ace but don't want to install Custom ROM or CWM!


Just only root so that, I can run some apps which requires root.





Wednesday, January 25, 2017

How do I enable Mobile Data only for select apps on a rooted phone?


Unfortunately my carrier charges €0.10 per MB of data -- and I've found out the hard way that Android is a data hog.


As a result I keep my mobile data almost exclusively off.


Is there a way, perhaps through an app, to only allow some apps to use mobile data? For example I'd like to be able to use Whatsapp and Opera Mini, but disable every other service.


I've found that without wanting to, apps like eBuddy and (especially) Google Talk always want to re-connect, even when they haven't been directly run.



I am aware that as from 2.2, Google tightened security on app capabilities (especially task managers and home screen selectors). For what it's worth, my device is rooted and running CyanogenMod7 RC4 (based on Gingerbread) so this might break compatibility with pre-2.2 apps.



Answer



As you are rooted, you can use DroidWall to control network access on a per app basis.


From the Market page:



Front-end application for the iptables Linux firewall.
Allows you to restrict which apps can access the network.
This is the perfect solution if you don't have an unlimited data plan, or just wants to see your battery lasting longer.



How to block apps on tablet from accessing the Internet while on tethering



I use my WiFi-only tablet for turn-by-turn navigation. I either use wifi hotspot tethering or bluetooth tethering through my phone's data plan. (Or USB tethering once I get a Y charging cable.)


My problem is that my tablet apps run their background updates and syncs while I am tethered, consuming my limited data plan. The worst culprit is Google account autosync.


While most apps nowadays are wifi/3G-friendly, that is, they have a setting to do heavy downloads only on WiFi, they do not differentiate broadband wifi or my phone's wifi hotspot. The Play Store app on my tablet would particularly update large apps in the background while I am driving!




Tuesday, January 24, 2017

facebook - Choose contact name manually?


In my contact list, I entered a number of "household" contacts combined together. For example, "Bob & Sally Smith", with the corresponding e-mail addresses, phone numbers, etc. The problem is that, if the e-mail address is also associated with a Facebook contact, it overrides my preferred naming system and shows the name of the Facebook contact. For example, if the e-mail address were Bob's in my example, it would show "Bob Smith" instead of the combined name.


Is there a way to force it to use the name I prefer it to use?



Note that this may be specific to my phone - Motorola Droid. A friend of mine has the Droid X and I might see if his does the same thing...




Converting phone to SIP gateway


Is there a way to use my phone as a SIP GSM gateway, so I can make and receive cellular calls using a SIP phone and/or re-route them through a SIP PBX?




How do you extract an App's data from a full backup made through "adb backup"?


I have been backing up my Nexus 7 with adb backup to back up all files into an encrypted backup. I see that you can restore from a backup with adb restore, but that would wipe all my existing data on the device.


How exactly would I extract one App's data from this encrypted backup file?




Answer



Just for reference of others, here is some background on the .ab file format.


The Android Backup (*.ab) file is a compressed TAR file. It is compressed using the DEFLATE algorithm. On top of that, there can be AES encryption used. This is determined when you create the backup, if you enter a password then the backup is encrypted, otherwise; there is no encryption, it is only compressed.


The HEADER of the file is a little different than a normal DEFLATE archive. It contains information about the backup and looks like the following:


ANDROID BACKUP
1
1
none

The first line is the "Magic" line. The next line is the version of the Android Backup file format. The next line is a boolean (true or false, 1 or 0) indicating if the file is compressed. The last line is the type of encryption. This example is not using any encryption. If there was a password, the line would read "AES-256". After that is the encryption cipher. If no password, then the DEFLATE "archive" starts.



It is compressed using the Java Deflater. Which, from a developers perspective, causes issues if you want to use anything besides Java to extract it. I haven't been able to find anything that can deflate it using the same algorithm, even though all that I have found (for like C#) are supposed to follow the "SPEC".


With that said, there is an open source project under the Apache 2.0 license, written by Nikolay Elenkov that will allow you to extract the .ab in to a tar file.


Usage:


java -jar abe.jar unpack   

If you are not sure how to really use that (which is beyond the scope of this answer) the next version of Droid Explorer v0.8.8.7 (available here) will allow you to do exactly this, and more, right from Explorer. You can read more about the features on my blog (yes, i know, shameless plug. I do that when it fits the question)


unpack


Is it possible to selectively limit background data usage?


I have a sufficient data-plan so I've never worried about this... tomorrow though, I'm travelling abroad. Due to this, I will have restricted 3g usage.


Are there any apps or Android settings to prevent certain applications from syncing in the background while allowing others to work unrestricted? For example, if I only want to use WhatsApp or check emails, without "Android OS" or Facebook playing around online, would this be possible?


If I could have this as a "roaming only" profile/mode would be an advantage. If I could also allow these applications to run as normal when WiFi is available, that would be a bonus!



My device is not rooted and I would prefer not to root it to achieve this. Are there any apps or solutions to achieve this?




Monday, January 23, 2017

Is there an Android calendar with limited security permissions?


I've just bought an entry-level Samsung Europa, running version 2.2. I'm technically-minded but new to this OS. I'd like to find a calendar that runs in limited security permissions, so that my calender isn't synced to anywhere over the internet. I am happy to take responsibility for my own backups.


I have signed up for a Google account to run the stock Calendar app (it mandates it), to access Google Maps and to access the market. I've set the Google account to "Sync is OFF" in General Sync Settings, and I've turned off Auto Sync. I've kept Background Data turned on, and turned off Google syncing in the Calendar options. I am hoping this combination of settings means that my calendar will not be copied off the device, though I'm not confident this is the case.


I wasn't aware until after purchasing that app-level security permissions could not be modified in Android - some light research just now suggests that one needs to root the device to get that feature. (I may well do that, but I want to get a working set-up first). Since the sandbox permissions for Calendar are do what you want, I've been looking at alternatives. Jorte Calendar requires wide permissions, and Smooth Calendar looks like it just relies on the standard Calendar app as storage, as I think does GO Calendar Widget.


I'm okay with limited data flowing to Google/Microsoft/BigCorp - such as map usage or market searches. But I'd plan to avoid using remote storage for private data: my contacts, texts, calendaring and so forth (there's something about Calendar refusing to start without a Google or FB account that is a touch irksome). I could use a local calendar on my old Sony K660 without wondering if it was being copied without consent - are there calendar apps that will do this? Or is rooting & resetting perms for Calendar my best option?


Addendum: in Privacy Settings, I've turned off Back Up My Data. Turning it on then off again reveals this dialogue box message: Are you sure you want to stop backing up your settings and application data and erase all copies on Google servers?. So that's a reassurance that file system data won't get synched by the stock OS - just Contacts and Calendar to go :-)



Post Addendum: I suggested in the comments that I might use the Corporate feature, in which one can add a Microsoft Exchange account. However this appears sadly to be subject to similar privacy objections that I apply to the Google account requirement. The user is asked for an email and password, and is confronted with this message:



By activating this application you accept that part of your mobile phone data (comprising IMEI and model name) will be stored, processed and used by Samsung for the purpose of reporting activation of the application to the licensors of the application software itself. Such data held by Samsung will be dealt with strictly in accordance with Samsung's privacy policy. A copy of the policy is available upon request. Continue?



Admittedly this is a small privacy risk compared to the wholesale copying of a calendar or contacts, but it still emphasises the point that the corporate storage of ones data is essentially mandatory. (Added here for the benefit of search engines on this topic.)


That said, it may still be worth a go. For those of us without access to a real private Exchange server, one would need to find something to emulate one, so that the Google account can be removed. Once I've settled into using the phone, I will look into these alternatives - and this in particular. Also of interest is package support in some Linux distributions - not much for OS X yet, but I will keep on looking!




Pdf videos on mobile phone


I put a video in my pdf with Acrobat and there I can watch my video. But if I open the pdf on my mobile, I can't watch the video, I only see an image. Is there a way to watch videos of a pdf in a mobile? I have a samsung J5.




2.2 froyo - Decrypt folder, that was encrypted using EncFS, on Android


So this is my setup: I use Ubuntu (11.04, but this shouldn't matter) to encrypt my secret folder. I sync this folder using Ubuntu One (Dropbox would be possible too). Now I want to have it on my Android (not rooted) too.


But how do I decrypt it?



Answer



boxcryptor is in alpha stage now. https://market.android.com/details?id=com.boxcryptor.android


Saturday, January 21, 2017

rooting - How to root cyanogen OS? (On Wileyfox swift)


I would like to know how to root Cyanogen OS on WileyFox Swift



Answer



Simply by flashing SuperSU.1 There's a thread at XDA explaining the steps:




  1. download SuperSu

  2. save it to your external sdcard

  3. enable developer options (settings - about - click mutliple times on the build number)

  4. enable OEM unlock in the developer options settings on the device

  5. reboot Wileyfox Swift into fastboot mode: with the device powered down, hold the Volume Up and connect USB


  6. to unlock the boot loader (WARNING!!! This wipes your user data!!!), type from your computer:


    fastboot oem unlock
    fastboot -i 0x2970 oem unlock-go
    fastboot oem unlock-go



  7. download latest recovery image from Cyanogen




  8. to boot the custom recovery, on your computer type


    fastboot boot .img


  9. install supersu update zip from recovery menu (choose zip from extenal SD)




  10. reboot and enjoy root access


Note that steps 6 and 8 require the matching drivers being installed on your computer if you run Windows.


Updating a rooted Swift


Also note that "incremental updates" are no longer working with the device rooted. Please see how to update rooted fox at XDA for alternatives. Each of those updates will probably break root, so you'll have to repeat the above procedure after each update to regain root access.


Alternatively, you can also switch from CyanogenOS to CyanogenMod, which includes root access.




1: Note that's not the latest version – but the one reported working at the time of that post. The always latest version is available here.


root access - Where in the filesystem are settings saved? Namely ADB backup password


Where in the phone filesystem are settings saved? I've lost my ADB backup password and simply want to delete it. If it affects other settings that won't matter too much.


I will be interfacing the filesystem through a root shell.




Answer



In my stock Android 4.2.1 the file responsible for holding Desktop backup password seems to be /data/backup/pwhash.


I took a backup of it, renamed it, restarted the device, and the password was reset to empty. Now I could create a new password from the Settings easily.


In CM12, I had to rename two files, namely pwhash and pwversion, and everything went well after a reboot.


Note: I noticed file modification in /data/ to proceed and ultimately reach my conclusion, which of course works here.


Friday, January 20, 2017

root access - How to create a wifi hotspot from the terminal?


How would you suggest to create a hotspot from a root terminal?


I would need to create



  • hidden hotspot

  • hotspot without password



I am looking for an equivalent of create_ap for android. Here is the full help section to get an insight of what I would need:


Usage: create_ap [options]  [] [ []]

Options:
-h, --help Show this help
--version Print version number
-c Channel number (default: 1)
-w Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)
-n Disable Internet sharing (if you use this, don't pass

the argument)
-m Method for Internet sharing.
Use: 'nat' for NAT (default)
'bridge' for bridging
'none' for no Internet sharing (equivalent to -n)
--psk Use 64 hex digits pre-shared-key instead of passphrase
--hidden Make the Access Point hidden (do not broadcast the SSID)
--mac-filter Enable MAC address filtering
--mac-filter-accept Location of MAC address filter list (defaults to /etc/hostapd/hostapd.accept)
--redirect-to-localhost If -n is set, redirect every web request to localhost (useful for public information networks)

--hostapd-debug With level between 1 and 2, passes arguments -d or -dd to hostapd for debugging.
--isolate-clients Disable communication between clients
--ieee80211n Enable IEEE 802.11n (HT)
--ieee80211ac Enable IEEE 802.11ac (VHT)
--ht_capab HT capabilities (default: [HT40+])
--vht_capab VHT capabilities
--country Set two-letter country code for regularity (example: US)
--freq-band Set frequency band. Valid inputs: 2.4, 5 (default: 2.4)
--driver Choose your WiFi adapter driver (default: nl80211)
--no-virt Do not create virtual interface

--no-haveged Do not run 'haveged' automatically when needed
--fix-unmanaged If NetworkManager shows your interface as unmanaged after you
close create_ap, then use this option to switch your interface
back to managed
--mac Set MAC address
--dhcp-dns Set DNS returned by DHCP
--daemon Run create_ap in the background
--stop Send stop command to an already running create_ap. For an
you can put the PID of create_ap or the WiFi interface. You can
get them with --list-running

--list-running Show the create_ap processes that are already running
--list-clients List the clients connected to create_ap instance associated with .
For an you can put the PID of create_ap or the WiFi interface.
If virtual WiFi interface was created, then use that one.
You can get them with --list-running
--mkconfig Store configs in conf_file
--config Load configs from conf_file

Non-Bridging Options:
--no-dns Disable dnsmasq DNS server

-g IPv4 Gateway for the Access Point (default: 192.168.12.1)
-d DNS server will take into account /etc/hosts

Useful informations:
* If you're not using the --no-virt option, then you can create an AP with the same
interface you are getting your Internet connection.
* You can pass your SSID and password through pipe or through arguments (see examples).
* On bridge method if the is not a bridge interface, then
a bridge interface is created automatically.


Examples:
create_ap wlan0 eth0 MyAccessPoint MyPassPhrase
echo -e 'MyAccessPoint\nMyPassPhrase' | create_ap wlan0 eth0
create_ap wlan0 eth0 MyAccessPoint
echo 'MyAccessPoint' | create_ap wlan0 eth0
create_ap wlan0 wlan0 MyAccessPoint MyPassPhrase
create_ap -n wlan0 MyAccessPoint MyPassPhrase
create_ap -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase
create_ap -m bridge wlan0 br0 MyAccessPoint MyPassPhrase
create_ap --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase

create_ap --daemon wlan0 eth0 MyAccessPoint MyPassPhrase
create_ap --stop wlan0

Answer



This is done with hostapd located in /system/bin/hostapd in principle.


You may generate a hotspot through the interface and get the command with


ps | grep hostapd

Is there a way to download the files stored on Google Drive to an Android device?


I've stored some images in Google Drive, and I'd like to view them on my tablet. The problem is, I can only view them one at a time and the procedure goes something like this:



  1. Open Drive.

  2. Navigate to image folder.


  3. Select image to view.

  4. View image.

  5. Press back.

  6. Select another image to view (while trying to remember which image I just viewed, so I don't view it again).

  7. Repeat steps 3 - 6.


If I could download the files onto the tablet, I could view them in the default image viewing application and the procedure is more like this:



  1. Select image to view.

  2. Slide left/right to view next/previous image.



Is there a way to download the files stored on Google Drive to an Android device?





I found a slightly awkward workaround. If you login to Google Drive using a web browser, clicking on the image will download it to /storage/sdcard0/Download/. You can then view the images using the default image viewer application.





After this question was asked, there have been many updates to the Google Drive app. Saving files to the device is now quite easy.



  • Click the three dot menu button below a file, and choose Download.


  • Long Press to select the file. Press the three dot menu button of the app, and choose download (can be used on multiple selected files).

  • Probably other ways I haven't described here.


Also, the primary problem I was having has been solved. You can now swipe to view the next/previous photo.


Thank you for all the answers, but this question is now obsolete.



Answer



You can use ES File Explorer.


To get connected:



  1. Press the settings button on the phone, or the app.

    Settings icon

  2. Expand the Network list, and click Cloud.

  3. Click New, and choose Gdrive.
    New iconGdrive icon

  4. Enter your Google credentials, accept the terms, and you're all set up.


To copy a file to the phone:



  1. Locate the file on Gdrive through ES File Explorer.

  2. Long press the file.


  3. Press More, then Copy to.

  4. Select the location to copy the file to, and press OK.


OR...



  1. Locate the file on Gdrive through ES File Explorer.

  2. Long press the file.

  3. Press Copy.

  4. Navigate to the location you want the file.

  5. Press Paste.



Help understanding Whatsapp's permissions


Whatsapp has been nagging me for the past few days that I have to upgrade it to continue using it. With the Facebook acquisition and the Play Store no longer marking the permissions that are "NEW" separately, I'm on a toss up between an upgrade and an uninstall; I'm hoping further information about the permissions will help.


First of all, does anyone know which permissions were added after Facebook's acquisition?
And among the permissions listed, what does "find accounts on this device" allow the app to do? Does "receive text messages" allow the app to read any existing or new incoming SMS messages? And as a minor curiosity, why would it need the "retrive running apps" list?



Here's the permission list from the Play Store:



This app has access to:


In-app purchases


Device & app history



  • retrieve running apps


Identity




  • find accounts on the device

  • add or remove accounts

  • read your own contact card


Contacts/Calendar



  • read your contacts

  • modify your contacts


Location




  • approximate location (network-based)

  • precise location (GPS and network-based)


SMS



  • receive text messages (SMS)

  • send SMS messages


Phone




  • directly call phone numbers


Photos/Media/Files



  • modify or delete the contents of your USB storage

  • test access to protected storage


Camera/Microphone




  • record audio

  • take pictures and videos


Wi-Fi connection information



  • view Wi-Fi connections


Device ID & call information



  • read phone status and identity



Other



  • receive data from Internet

  • read sync statistics

  • prevent device from sleeping

  • full network access

  • control vibration

  • run at startup

  • view network connections


  • connect and disconnect from Wi-Fi

  • use accounts on the device

  • create accounts and set passwords

  • modify system settings

  • read sync settings

  • toggle sync on and off

  • install shortcuts

  • uninstall shortcuts

  • read Google service configuration

  • change your audio settings





Answer



I had sent this question as an email to WhatsApp support too, and I've now received a reply from them with complete explanations of the permissions. Pasting that reply below:




Thanks for your message. We strive to keep this information as up to date and as accurate as possible.
However, at times, it is possible that Google or your handset maker may change, deprecate or remove various permissions.


Category: Your messages


Permission: Receive text messages (android.permission.RECEIVE_SMS)
Explanation: We use this to be able to read the SMS we send to your phone to verify your phone number.



Category: Storage


Permission: Modify or delete the contents of your USB storage (android.permission.WRITE_EXTERNAL_STORAGE)
Explanation: We store your media and chat history backups on the USB storage.


Category: System Tools


Permission: Modify system settings (android.permission.WRITE_SETTINGS)
Explanation: We need this to read your settings, we do not write any settings, but there is only a write settings permission which includes the ability to read settings.
Permission: install shortcuts (com.android.launcher.permission.INSTALL_SHORTCUT)
Explanation: We use this to install a WhatsApp shortcut or conversation shortcut on your homescreen.
Permission: uninstall shortcuts (com.android.launcher.permission.UNINSTALL_SHORTCUT)
Explanation: We use this to make sure we do not create duplicate shortcuts on your homescreen.



Category: Your location


Permission: approximate (network-based) location (android.permission.ACCESS_COARSE_LOCATION)
Explanation: We use this so that you can send your location to your friends.
Permission: precise (GPS) location (android.permission.ACCESS_FINE_LOCATION)
Explanation: We use this so that you can send your location to your friends.


Category: Services that cost you money


Permission: directly call phone numbers (android.permission.CALL_PHONE)
Explanation: We need this so that we can have the "Call" ability in the app.
Permission: send SMS messages (android.permission.SEND_SMS)
Explanation: You may send an SMS by using our tell a friend feature to tell a friend about WhatsApp.



Category: Camera


Permission: Take pictures or videos (android.permission.CAMERA)
Explanation: We use this to allow you to take pictures from inside WhatsApp. Read more here


Category: Microphone


Permission: record audio (android.permission.RECORD_AUDIO)
Explanation: We use this to allow you to record Voice Notes to send to your friends.


Category: Your accounts


Permission: Add or remove accounts (android.permission.MANAGE_ACCOUNTS)
Explanation: We use this to add a WhatsApp account to your device to show your WhatsAppable contacts.
Permission: create accounts and set passwords (android.permission.AUTHENTICATE_ACCOUNTS)

Explanation: We use this to add a WhatsApp account to your device.
Permission: use accounts on the device (android.permission.USE_CREDENTIALS)
Explanation: We need this permission to read and write your WhatsApp credentials.
Permission: find accounts on the device (android.permission.GET_ACCOUNTS)
Explanation: This is necessary to find which accounts to check for WhatsApp contacts.
Permission: read Google service configuration (android.providers.gsf.permission.READ_GSERVICES)
Explanation: This is used for Google Maps integration in WhatsApp location sharing.


Category: Your social information


Permission: modify your contacts (android.permission.WRITE_CONTACTS)
Explanation: This is necessary so that we can add the WhatsApp button into your contacts so you can send a WhatsApp to your friends from anywhere in your phone.

Permission: read your contacts (android.permission.READ_CONTACTS)
Explanation: We use this in order to automatically add all your friends that have WhatsApp installed on their phones.


Category: Your personal information


Permission: read your own contact card (android.permission.READ_PROFILE)
Explanation: We use this to try and set a default profile name.
Permission: read call log (android.permission.READ_CALL_LOG)
Explanation: This permission is not needed but is granted transitively from READ_CONTACTS because we support old versions of Android.
Permission: write call log (android.permission.WRITE_CALL_LOG)
Explanation: This permission is not needed but is granted transitively from WRITE_CONTACTS because we support old versions of Android.


Category: Phone calls



Permission: read phone status and identity (android.permission.READ_PHONE_STATE)
Explanation: We need this so that we don't annoy you when you are on the phone.


Category: Your applications information


Permission: run at startup (android.permission.RECEIVE_BOOT_COMPLETED)
Explanation: We use this to make sure the app is running to make sure you get your messages on time. Permission: retrieve running apps (android.permission.GET_TASKS)
Explanation: We need this in order to see if you are running any Task Killers, which may cause problems with our application.


Category: Sync Settings


Permission: read sync settings (android.permission.READ_SYNC_SETTINGS)
Explanation: We use this to make sure you get your messages on time.
Permission: read sync statistics (android.permission.READ_SYNC_STATS)

Explanation: We use this to debug possible problems in getting your messages on time. Permission: toggle sync on and off (android.permission.WRITE_SYNC_SETTINGS)
Explanation: We use this so that we can make sure your WhatsApp contacts are up to date.


Category: Development tools


Permission: test access to protected storage (android.permission.READ_EXTERNAL_STORAGE)
Explanation: We store data onto the external storage. The permission is granted transitively by android.permission.WRITE_EXTERNAL_STORAGE. We have no idea why Google describes the permission thusly.


Category: Affects Battery


Permission: control vibration (android.permission.VIBRATE)
Explanation: to notify you of a new message, we may vibrate your phone.
Permission: prevent phone from sleeping (android.permission.WAKE_LOCK)
Explanation: We need this to make sure that when a friend sends you a file, it doesn't get broken by your phone going to sleep.



Category: Network communication


Permission: full network access (android.permission.INTERNET)
Explanation: Without this we wouldn't be able to send your chat messages.
Permission: google play billing service (com.android.vending.BILLING)
Explanation: We use this to allow you to pay for the WhatsApp subscription.
Permission: receive data from internet (com.google.android.c2dm.permission.RECEIVE)
Explanation: We use this to make sure that you get your messages on time.
Permission: view wifi connections (android.permission.ACCESS_WIFI_STATE)
Explanation: We use this to check and see if you are on a Wi-Fi that WhatsApp won't work on.
Permission: view network connections (android.permission.ACCESS_NETWORK_STATE)

Explanation: We use this to diagnose your network connection and have the app react accordingly to ensure you get your messages on time.
Permission: full network access (android.permission.INTERNET)
Explanation: We need this to open socket connections to our servers in order to make sending and receiving messages fast.


How do I free up internal storage if I don't have any apps downloaded?


I have an Android Voyager, RCT6773W22B. It's version 5.0.


When I first got it, and years after that, I could download at least five apps downloaded at a time and have a great sum of pictures in my gallery. I would still have space after this. Over time, I would delete apps I didn't use anymore. If I wanted to download something else and there wasn't enough space, I would delete apps and/or pictures I don't need.


Now, I can't download anything due to internal storage. I have no apps, five pictures (not taken with the camera), and I've cleared the cache on everything except Chrome. It tells me my internal storage is completely full and I can't move anything to an SD card. What do I do?




usb - Connect an Android tablet to ethernet



I use tablet with Android in a professional environment and the it department doesn't accept to install wifi.


My tablet need to synchronise with CSV file on a LAN share.


I'm looking for solutions. Is it possible to connect a tablet on ethernet (possibly with builtin firmware)? If yes, which model?


I looked for solutions and I found some interesting links:



Does someone have experience with this? I prefer avoid root my tablet or use a custom firmware or launch some custom command when connected to the network, but if no Android tablet come with this feature built in, I would be willing to root it.


Alternate solution: connect the tablet to the PC with USB and access the LAN share located on the computer (it was possible with Windows Mobile) and maybe access the whole network.


I own a Galaxy Tab 8.9 and the best would be to find a solution with that tablet.



Answer



i found that device https://sites.google.com/site/bobjgear/Android-Ethernet-Adapter



I think it is the solution. If you have some specific tablet like Xoom you can use ethernet with that specific adapter


Thursday, January 19, 2017

installation - Why is Install button still greyed out in absence of screen filter apps?


As you can see in the image, the Install button is greyed out. I have Unknown sources enabled and no screen filter app or Twilight or Lux are installed in my phone.


screenshot



I am using Samsung 6 Edge latest version.



Answer



It means Your Device Doesn't Support the app


4.1 jelly bean - Clean way for flashing factory image on Samsung Galaxy Nexus?



Is this the correct and clean way for flashing factory Jelly Bean image on Samsung Galaxy Nexus, without using any external tool (apart from Android SDK)?


I don't want to to break my phone, so I'm asking this. I've collected these informations from various sources, but I need a confirm that all the steps and commands are correct and needed.




Step 1: Download and install Android SDK for Windows. Start Android SDK manager, select Android SDK platform-tools and Google USB Driver (this should be already selected) and install. It will take a while.


After packages installation, add the folder:


C:\Users\\AppData\Local\Android\android-sdk\platform-tools

to your PATH variable, to make command fastboot available in command prompt.


Step 2: Download a factory image from official Factory Images for Nexus Devices. For me is "yakju" for Galaxy Nexus "maguro" (GSM/HSPA+), file yakju-jro03c-factory-3174c1e5.tgz


Make a new folder, say C:\jro03c. Open yakju-jro03c-factory-3174c1e5.tgz and extract bootloader-maguro-primelc03.img along with radio-maguro-i9250xxlf1.img to C:\jro03c. Folder now contains two image files:



C:\jro03c\bootloader-maguro-primelc03.img
C:\jro03c\radio-maguro-i9250xxlf1.img

Then inside the .tgz file itself, open image-yakju-jro03c.zip and copy all *.img files to C:\jro03c. You will end up with six image files:


C:\jro03c\boot.img
C:\jro03c\bootloader-maguro-primelc03.img
C:\jro03c\radio-maguro-i9250xxlf1.img
C:\jro03c\recovery.img
C:\jro03c\system.img
C:\jro03c\userdata.img


Step 3: Power off your Galaxy Nexus. Press and hold Volume Up and Volume Down then press and hold the Power button; the Galaxy Nexus will now enter "fastboot mode". Connect your phone using the USB cable.


Then open a command prompt (Windows Key + R opens "Run", then type in cmd) type:


cd C:\jro03c
fastboot oem unlock
fastboot reboot-bootloader
fastboot flash bootloader bootloader-maguro-primelc03.img
fastboot reboot-bootloader
fastboot flash radio radio-maguro-i9250xxlf1.img
fastboot reboot-bootloader

fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot reboot-bootloader
fastboot erase cache
fastboot oem lock
fastboot reboot


applications - Getting "not enough space" error even i have enough space in sd card


I have a android jellybean phone [model - ETEl-I4] .i cannot install any apps anymore.i have installed lot of apps before.i can see i have enough space in sd card and i have set default write device to SD card.but when i try to installs apps like skype,viber..etc.i'm getting this error.i read some answers but i think i don't have any cashes problem i have enough space in sd card. please help me how to fix this issue.


error


enter image description here


I have set default write device to SD card.



enter image description here


As you can see i have 5GB space and apps i'm trying to install are less than 50mb.


enter image description here




Wednesday, January 18, 2017

What lock/unlock button does on recent apps screen?


On recent apps screen there is a lock/unlock button on each and every app, I want to know what's it's function. I am attaching screenshot for reference.


enter image description here



Answer



If you lock an app in recents and click on tap to clear, it will stay in recents. Apps not locked will be cleared (that kills all the running apps without the need to kill each one separately)


Tuesday, January 17, 2017

application autoupdate - Apps launch automatically after update in Google Play Store



I am using Samsung Galaxy S4 I9505 running on Android KitKat 4.4.4. If there are 5 apps to update, all the apps open automatically after the update. My Google Play Store's current version is 5.3.6.


Why does this happen and how to prevent it?



Answer



I believe you have an app installed that monitors other apps.


For example, an app called Earn Talktime does the same. These apps launch other apps (on installing and updating) for monitoring whether that app was installed through their offer or not.


Simply uninstall any app like that and the issue would be gone.


rooting - How to root LG K7 (MS330)?


I have a cleaning program on my phone and one of the program functions is to optimize CPU.
When I try this, it says I do not have root privileges.


How can I get root privileges on my android LG MS330 ?




If I try a new email client like K9-mail, can I go back to my original email just by uninstalling it?


Before I try something I cannot easily reverse ( and to confirm something I think I already know the answer for ): if I install another email client ( like K9-mail ) on my Samsung phone of even more on my Archos 101 tablet, can I revert back to the email client I already have just be uninstalling the new email client ?


Will I get a choice of email clients ( like you have now when you install Opera or Firefox ) ?



Answer




When you first install an application that can handle the same intent as another application install (for the sake of this example, let's say a home launcher, but this works for any similar apps), then the first time you'd press the home button (which calls an intent to go to the home screen, which you now have 2 apps that could handle it), you'll get a selection screen of applications that can fulfill that intent and you'll have the option to set one of them as default.


If set an application as default and you no longer wish to use that application as default you can either uninstall the application OR you can go to Settings --> applications --> manage apps --> go to the app in particular --> and click on "clear defaults". This will reset the default application for that intent, so the next time you'd press the home button you would again get a selection of home launchers to choose from.


"Incompatible with other applications(s) using the same shared user ID" when installing Google Play service?


I need to run Google Plus, and Google Plus needs the Google Play service.


Every time I install google play service from the Google Play store it fails to install with this error:



Incompatible with other applications(s) using the same shared user ID



What could be the issue? How can I fix this?


UPDATE: I know almost nothing about android, so I dont know what ROM is, or such thing, I get my phone from local production and I guess, yes, it uses custom system, so I just know that I'm using Android Version 4.0.4. any help would be greatly appreciated.





wi fi - Using SMB server without root access


I'm looking for a way for my HTC Hero (Android 2.1) so I can share the contents of my SD card and phone memory over the WiFi network like a regular Windows file share. I'd like one that does not require me to root my phone, and am willing to pay for the right app so it doesn't have to be free.


I'm thinking of using SMB server and all I've found so far are:



  1. SambaAndroid which requires root access.

  2. androidsmb which is a "Java implementation of the SMB/CIFS network file and printer share server for Android devices" hosted on Google Code that has no documentation and has not released any files.


Is it even technically possible to develop an SMB Server on Android that can be installed without root access?




Answer



As your original question still isn't answered and I wondered the same, here's the answer.


Short answer: No, without root it's not possible to run an SMB server using the default ports so that it's found by Windows PCs.


Long answer: SMB either runs on ports 137-139 (UDP and TCP) using NetBIOS or on newer systems (from Windows Vista onwards) directly on TCP port 445 where in the latter case computer names are resolved by the LLMNR (Link-local Multicast Name Resolution) protocol which runs on UDP port 5355. Why is this important? Apps not running as root can't bind to unprivileged ports (<1024). It's possible to use alternative ports for SMB but Windows is hard-wired to just listen to the default ones. So I guess if you use Linux or a separate SMB client for Windows which allows to connect to a server with a custom port number it's probably possible. But it's not really a straight-forward way.


applications - retrieving and classifying Notes with time and date of creation


I wrote hundreds of messages in 'Notes' of my smartphone (the system app), and I would like to retrieve them and put them in a CSV file, (or Excel) with one column for the content of the message, and another with time and date of creation of the note. Is it possible?


My device is Huawei Y330-U01


Android 4.2.2



Answer




It is possible (at least in my device) and I've provided a generalized idea using my Mediatek device running Android 4.2.1.


The idea is very simple. Most of the notes apps I tried so far stores the notes inside a .db file located in their personal space under /data. We have to get the relevant .db file(s) and then export it into a .csv file.


For a non-rooted device




  1. Find the package name of your "Notes" app. You can use ADB command by launching the app in the foreground and entering the following ADB command from PC:


    adb shell dumpsys activity | grep mFocused | awk -F 'u[0-9]+ ' '{print($2)}' | cut -d '/' -f 1

    The output shown for my device was:


    com.mediatek.notebook


    It is possible that the aforesaid command may not work for your device, so either you troubleshoot it by yourself, or install an app like OS Monitor → launch your "Notes" app → launch OS Monitor → locate your "Notes" app amongst the processes and tap on it to see the value corresponding to Process.


    Suggested by Izzy -- If all else fails, then try App Browser or Adebar to find package name. I tried the former and it does the job nicely.




  2. Take backup of your "Notes" app by issuing the following ADB command:


    adb backup 

    where is the package name of the app whose backup you want to take. The file will be saved as backup.ab in the directory from where ADB is executed.


    In my case, I ended up with the backup file backup.ab (~1.7KiB) in my Home directory of GNU/Linux using the command:



    adb backup com.mediatek.notebook

    This step is needed because I'm unaware (as a non-root user) of any other way to get my hands on an app's internal files residing in /data.




  3. The .ab file cannot be opened in my PC so I used Android Backup Extractor (see usage in its README.txt) to convert into .tar archive which then can be opened by any archive viewer (like Ark, WinRAR, and so on).


    Some other methods to unpack the .ab file are mentioned here.



  4. Open the converted file (.tar for me) and locate .db file under appsdb<.db>.

  5. Open that .db in an SQL viewer like DB Browser for SQLite. You can then export the file into .csv using File → Export → Table(s) as CSV file.



For a rooted device:



  1. You can either follow all the aforementioned instructions, or copy the .db file(s) from /data/data//databases/<.db> into your PC and proceed with aforesaid step 5.

  2. You may try SQLite Editor to view the database(s) directly on Android if you only intend to see the content of your "Notes" app, since data and creation time probably would be visible in .db file.


We're good to go now!


Monday, January 16, 2017

what happens to my google acct if I delete the gmail service?


I found a section in my Google acct where I can delete Gmail and Youtube services.



I want to keep my Youtube but thinking of deleting my Gmail acct since I'm not using it anymore.


I still want to use my Google acct since I have $100s worth of paid apps attached to it.


Any ideas?


Thanks




usb - Are Android chargers universal in terms of power (Voltage, amperage)?


I would like to buy a car charger, wall charger and USB cables for my Samsung Intercept. However, $20 for a charger seems expensive and I want to avoid getting ripped off. The Samsung Intercept Manual doesn't show the specs for the charging port on the phone itself.


Can I use any Android charger with any Android phone? Does Google require Android manufacturers to follow a standard for charging the devices? Or do most Android devices follow their own proprietary standards. The form factors (Micro-USB, Mini-USB) and voltages (~5V) seem universal, but I'm more concerned about amperage. It's not unheard of for some chargers to ignore the USB 2.0 standard. Do some chargers try to force 3000 mA down the wire to supercharge their devices? If so, that could destroy a device which is intended to receive only 500 mA.


I can charge the my Android phone using a powered USB port on any computer. How many milliamps does this provide? I read that USB 2.0 will provide a standard 100 mA or 500 mA. Are there another standard amperes which are used for charging?


I found what appears to be a generic wall charger for any Micro-USB device. The product description doesn't say how many mA this provides, but from the comments it appears that this charger provides 950mA. Which this overcharge my phone?




Answer



Some devices use USBMicro, others use USB Mini. Like any device, it depends on the voltage that the device can take. But for the most part, AFAIK, as long as the charger is the same plug type (micro, mini, etc.) then yes it can work.


A lot of the chargers that use USB plugs output the voltage that a standard USB port would (between 4.75 and 5.25 volts). If this is the case, you will have no problems. The only issue, when you use USB to charge, it is usually a slower charge then using a wall charger.


applications - Are APK files saved on my device when I install from the Play Store?


I used a Nexus 7 for a couple of years and got a Nexus 10 earlier this year. I installed a number of kids books/games on the 7 and wanted to transfer them to the 10. Now I can't find some of them at the store. Would the APK files still be located on the 7?




4.0 ice cream sandwich - How exactly does operating system update work on Android devices?


Today I have received my first Android device, to be more precise a GOClever Tab A102.2 tablet. I have noticed that it runs as operating system Android 4.0.4 so I though why not update it since the latest one is 4.2? I went to Settings > About > System Update however it asks for a update.zip file which I have to place in NAND or SD card.


Searching through the internet I have found that some devices connect to the internet and check for updates when prompted while others need to be updated with vendor specific versions (I guess that's the case for me).


Now I wonder, why do some devices need to be updated with vendor specific versions? The way I see it, Android is just an Operating System and thus not tied to the device so theoretically if I wanted I could ditch it in favor of some other operating system (say a linux distro) so whether the update comes from the vendor or not should be irrelevant.


Also, can vendor specific versions of Android be updated (through some other means) even though the vendor didn't release an update for it?




Answer



Most vendors/manufacturers modify the Android source code to ensure full compatibility with the devices hardware - if you were to update to a clean version of Android, it just wouldn't work properly (and it it even booted, most things wouldn't work at all).


Some manufacturers implement an OTA update feature - whereas some don't. Those that don't sometimes make you connect your phone/tablet to the computer and use their 'helper' program to do the update.


Even the devices that do connect to the internet and download the update are vendor specific - device specific even, it is just that the manufacturer let you do it that way.


As to your final question: Yes, through a custom ROM. Custom ROM's are versions of Android that have been modified by the Android community, based on the stock Android code, to work on your device. You should search google, or look at forums such as XDA-Developers for more info about ROM's, or to look for a ROM for your device.


Remember: All the hardware in phones are different. Only the manufacturer knows how to code for it, so that is why default Android code won't work with it - it would need propriety drivers.


Sunday, January 15, 2017

htc droid incredible - Multiple force closes


I have intermittent issues with multiple apps forcing closing. This has happened on both my current ROM (Miui) and every version of Cyanogenmod I've tried.


Usually this problem crops up again a few months after a fresh ROM install or factory reset. I'll switch from 3G to Wifi, or vise versa, and then everything on my phone that uses background data will start force closing. The most usual suspects are Google Services Framework (com.google.process.gapps) and Facebook (com.facebook.katana), but almost any app seems to force close including ScoreCenter, Docs, and Smooth Calendar.


In addition to the force closes, the other big symptom is that I can't turn off or on airplane mode, mobile network data (3G), wifi, or background data syncing - but usually not all at the same time. Sometimes I'll be able to turn on Wifi but not airplane mode, or other times I'll be able to turn 3G off but Wifi won't turn off. Sometimes I'll be able to turn a service off or on after a reboot, other times not. Sometimes when I reboot a service that I turned off before will be back on again, other times not. Incredibly, utterly frustrating.


Neither rebooting, fixing permissions, nor wiping dalvik cache seem to help. I've only ever gotten my phone to work again by fiddling around with the radio settings and pulling the battery for hours before something magically starts working again. This most recent time I've even removed my Google account from the phone but that hasn't helped either. I know a factory reset would make this problem go away (for a little while, at least) but it always returns - I want to find the root cause and change whatever is making it happen in the first place (especially if it's something I'm doing!).


I know that this issue involves the interaction between app syncing and the wifi/3G radios but I have no idea what or why. I've uploaded a logcat here - I hope you all can make heads or tails of it. I saw E/ACRA ( 1296): java.io.IOException: No space left on device and presumed it might be a partition storage space issue but all the partitions I could see (including those that require root) still have space.


Thanks in advance, I'm super frustrated with this one.



Answer




After investigating further and looking at the partitions again, it turns out that I did have a totally full /data/data (as described in a previous question).


For posterity, here's what I did:


Because DiskUsage, the app I normally use to investigate partition usage, had locked up as well I fired up Terminal Emulator (luckily it was still working) and followed this advice I found in an XDA thread:



You can check [the partition utilization] by running this command as root:


df /data/data


If you see % used = 100 then this is your problem.



It was, in fact, 100% full. As soon as I moved some apps to my SD card my phone immediately started working again. I must've misread the free space of the partition when I first looked into it (doh!). The radio issues I was sure were involved ended up being a red herring.


2.2 froyo - Is there a way to permanently turn off Google Maps until needed?


Google maps seems to have an insane amount of Intents registered for it, as well as other ways of being started.


Since this is a pretty resource hungry app (especially memory wise), I would very much want it permanently not running unless/until I actually need it. However, Android keeps starting it all the time - for example, when the connectivity status changes (which for me happens pretty frequently indoors), or GPS/network location changes.


Is there some way of ensuring that Google Maps doesn't start ANY processes, guaranteed, until I click on an icon to deliberately launch it?


Environment: Droid X, running rooted stock Froyo 2.2; I have Autostarts. and Advanced Task Killer, as well as Pro version of Titanium Backup installed.


I'm fairly open to almost any method as long as





  • It's reliable.




  • It lets me use Google Maps with 100% intended functionality once I DO need it, without requiring 5 minutes of work to re-configure.




  • Ideally, doesn't require me to reboot to use it, but this one is not a deal killer.




  • I would STRONGLY prefer a generic method which would be applicable to other applications, NOT just Google Maps.





  • I'm a software developer with a hefty dose of Unix/Linux system administration experience. In other words, solutions which require shell prompt or writing/running shell scripts (or Perl in Android Scripting Environment) are extremely welcome.


    Solutions involving writing my own Java Android app are acceptable as long as they are detailed enough than a total Android development newbie can get at least some work done without being 100% lost.




Things I tried:




  • Killing the processes via Task Killer is NOT working - they come back up, either immediately or in a little while. Probably via Intents but not 100% certain.





  • Standard methods of getting rid of GMaps issues (log out of Latitude/shut down GPS and network locator). This seems to help a lot BUT I find the need to permanently shut down GPS/locator to be unacceptable - e.g. it won't let me run Locale app or locale-based Tasker things.




  • Freeze via Titanium Backup Pro. This requires a reboot and generally not very pleasant.




Possible approaches I thought of (but don't know how to do) are:





  • Somehow FULLY eliminate (turn off) all Intents registered by Google Maps when not needed.


    Problems: First, I don't know what ALL the Intents Google Maps uses.


    Second, the only practical way of doing that that I know of is Autostarts app which is NOT a workable solution - it takes ~5-10 mins to find and re-enable all the intents I am aware of (Autostarts is really poor at per-app intent management - it's centered on per-intent), never mind possible intents that Autostarts does NOT know about (it's a black box, I don't know which intents are missed if any.




  • Have a script which will rename the JARs or whatever the executable files on Android are (entire .APK?) from say GoogleMaps.apk to GoogleMaps.disabled.apk and back.


    Problem: I don't know if this is possible to do on a rooted Froyo. Also, Google Maps was pre-installed on DroidX, so would renaming somehow ONLY affect the update but not the original app?





  • Have a script which will go into the APK and rename/move/empty out manifest file to remove any intents for that app.


    Problem: Would this require a recompile? It definitely requires a reboot which is a minus





Answer



From your mentioning of Titanium Backup I assume your device is rooted. So my absolute recommendation here is AutoRun Manager (and yes, you will need the Pro -- second yes, it's worth it). Having that installed, open the app, use the "advanced mode", look for the app you want to modify (in your case: Google Maps). Expand it. ARM will show you all its listeners -- disable them.


That's it. Nothing is waking it up anymore unless you explicitly start it. BUT: Before you start it, you may need to enable those listeners again, or you may experience strange side effects (I did). On the other side, at least this does not require a reboot.


For technical details, you might want to crosscheck with the question How can I manage intent associations with apps, or directly dive into the Intents section of the AOSP developer manuals.


shell - Is there a way to list the local dns cache?


I would like to get a list of my current cache on my phone, what is the command to issue in order to retrieve that list ?


I would like to get a command and not an app that does that, since i want to incorporate that command into a script that i am write.


Thanks.




4.0 ice cream sandwich - Adding web shortcuts with icons similar to chrome's new tab thumbnails


I have a Droid RAZR MAXX, and there are a few shortcuts to web pages on the screen. They have been there since before the phone got ICS.



Under GB one could long tap the screen, add a shortcut, and choose a web site rather than an app. This created a shortcut with the name of the site, and the icon looked like a screen capture of the URL that the shortcut targets (like the chrome new tab page).


However in ICS I can't see way to do it, I can add a bookmark to the home screen through the browser, but the icon is different. I tried adding a bookmark through each browser, chrome, default, firefox, opera, dolphin. None of them produce this icon.


Anyone know how to do it? Or is this something that Moto threw in to the software, but didn't keep in ICS? (Though in that case why do the old icons still work?).



Answer



Can't see how to get an individual bookmark with a thumbnail screenshot of the webpage, but there are a couple of similar things you can do with the default browser in ICS.


enter image description here


In the screenshot above the top row are bookmarks added to the home screen by going into the browser, opening the bookmarks list, long pressing on a bookmark and selecting "Add to Home Screen". These appear to be the using the site's "Favicon".


The next two rows are the "3x2 Bookmarks" widget, that just lists the contents of my browser's bookmarks folder. Add that by opening your apps list, selecting the Widgets tab at the top and then long pressing to drag the "3x2 Bookmarks" widget to a home screen. It then gives you a chance to pick a folder in your Bookmarks to show (you could create a new folder in bookmarks beforehand and fill that folder with only web pages that you want to show on your home screen).


4.3 jelly bean - Converting an existing user to a restricted profile


With Android 4.3 comes a new feature, restricted profiles. It allows creating new special "restricted" users, for which an admin user can control access to apps.


However, in addition to my own admin user, I already have a secondary user for my kid, which has all of the user-specific data, such as saved games. If I create a new restricted profile, those will be lost.


How can I convert an existing (secondary) user to a restricted profile?



Note for the interested: The restricted profiles feature doesn't provide a complete secure access block, but it works well as a hinderance and prevents accidental blunders - which happens to be excatly what I'm interested in.



Answer



As of this moment, it is not possible to convert a user into a profile.


However, you could create a profile based on the existing user. Downside: Since a profile doesn't have a Google account tied to it, they can't have a GMail app. And as you have already mentioned, they would also lose those user-specific data.


UPDATE #1: From Android.com, it says that a restricted profile is a subset of a user's account. It's using the same user account, albeit restricted. So the profile is quite different from a User, where it's tied to a different Google account.



Each restricted profile offers an isolated and secure space with its own local storage, home screens, widgets, and settings. Unlike with users, profiles are created from the tablet owner’s environment, based on the owner’s installed apps and system accounts. The owner controls which installed apps are enabled in the new profile, and access to the owner’s accounts is disabled by default.



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