Saturday, November 30, 2019

dropbox - How to sync calendar with android without google?


is there a way to sync an Ubuntu calendar application like Thunderbird Lightning or Evolution with an Android device without using google-calendar?


At the moment I am syncing my Thunderbird-Lightning calendars on different computers via Dropbox, what is much more reliable than google-calendar. Another big advantage over google-calendar is, that I can access my appointments offline as well, since the calendar files are synced onto the harddrive of each computer by Dropbox.


I'd like to access those calendars via my android device as well.




  • The Dropbox-app for android does not support automatic syncing yet, so it seems like I have to use another service.




  • Apart from that I guess I need to know an android app, that can access a calendar-file stored in ics-format.





Thanks in advance YSN




2.1 eclair - Is there any way to move apps to my SD with Android 2.1?


Is there any possible way to move apps to my SD card on my Droid Eris? I keep getting that low memory icon in my notification bar and its really annoying. I'm running Android 2.1



Answer



It's a built-in feature of Froyo, as long as the developer has built the app that way.



However, you're mostly out of luck, unless you're willing to root your phone and install Cyanogenmod and APPS2SD or jump through the hoops Bruce details in his answer.


If you do have Android 2.2 or higher, the app SDMove can be a big help in moving apps in bulk. SDWatch is also useful, as it monitors apps you install and alerts you if it can be moved the SD card. (There are, of course, other apps that do the same things. They're just the ones I've used.)


google play store - Android and antiviruses


This is actually three questions:



  1. Are anti-viruses needed for smartphones running Android OS?

  2. Is the Android Market absolutely safe (because all precautions are taken by Google to prevent any problems)?

  3. Which are the big players in the Android Security Software market?


Thank you.



Answer






  1. Yes and No.


    No because Android's and Linux's security scheme is impenetrable as long as you don't give Root Access or Permissions. Without root, a malicious program cannot take over your system's integrity (there is very little zero day exploit in Linux/Android). And without Permissions, malicious program cannot risk your privacy, e.g. personal data, hardware that can risk your personal data (e.g. camera, mic), location, internet, SD card, etc.


    However, Yes because nobody pays attention to those permissions and security warnings. Also, Android can still be a vector for Windows' viruses, even though the Android itself will not be affected by Windows' virus.


    The Geinimi trojan that Matt pointed out relies on the program convincing the user to went through the standard install/uninstall prompt without being suspicious.




  2. No, Market is not a safe place. Any developers can upload any program to Market, and Google does not screen those programs. However, Google will and do remove any reported rogue programs quite quickly.





  3. Refer to Matt's answer.




Friday, November 29, 2019

I’m new to SetCPU on Moto Droid and need help


I'm running rooted stock Android 2.2 on a Motorola Droid. I was hoping other users of the app could give me some advice.


First question: whats the best underclock setting for a good balance between performance and longer battery life? How much longer battery life is it giving you on average?


Second question: I told it to autodetect the phone and I can seem to only overclock to 800mhz. How do I overclock to 1ghz. How high can I/should I overclock? I'm only overclocking when I play psx4droid.


Third question: any recommended profiles to setup?


Thanks!




Answer





  1. That's going to depend on how much you're using it during the day, I would say start at 700 and move it around until it feels smooth for you.




  2. I wouldn't push the phone that high, first it's going to overheat pretty quickly, which can permanently brick your phone. Even 800 is going to be rough on it so I wouldn't leave it up that high for very long.




  3. I've got an eris (Did a little looking around, and the Droid CPU is set at 550Mhz whereas the Eris is set at 528Mhz as reference points) so this is going to be a little different than what you've got, but here's my profiles so you can tweak as needed.






Temp > 36.9 C 528Mhz/160Mhz Priority: 100 (This is the failsafe setting, if the phone get's too hot it'll cut the CPU speed so the phone can cool down and prevent any damage)


Charging/Full 729Mhz/528Mhz Priority: 80 (If the phone is plugged in, it can run a little harder, but I also don't use my phone much when it's plugged in)


Battery < 100% 710Mhz/528Mhz Priority: 50 (This is the normal use setting, which keeps the phone moving smoothly, but doesn't get too hot)



The most important thing is that you have scaling set to ondemand. This will turn the processor down if it's not being used. Hence, on the last setting, it is very rarely at 710Mhz and is most often below 550Mhz.


Second to remember is not to set the minimum too low, or the phone will have trouble waking up from sleep. You'll need to do a little digging around to find out what the ideal min is for the droid, but I would suspect above 160 Mhz would be safe for you.


Those should cover most bases, at bare minimum add the failsafe profile so that you don't lose your phone.



Thursday, November 28, 2019

Update Market Application to Google Play Market Application


I have the problem with latest update which re-brands "Market" app to "Google Play Market" app.


At one moment "Market" icon disappeared from both home screen and applications. I was seeking for the solution to that, found some (weird at the time) "Play Market" update installed and have uninstalled it. This brought back "Market" application.


Later I have seen that this was a silent patch which I should not uninstall!


Problem is, that, when I start "Market" app it ONLY displays following page in browser: https://play.google.com/about/android-developer-policies.html


I am stuck here with this page, and the app is not updating again to "Play Market"


Does anyone know how to resolve this?



Answer




Try clearing the data for the Market and rebooting the phone. Then log in to the Market, wait a minute, then back out and continue using your phone with the internet connection active. Hopefully the Market should update itself within a few minutes.


Or, you can just download and install the .apk. I rely on Android Police for the latest version; they've posted 3.9.16 here.


Can I use a Galaxy Gear without a Samsung Phone?


I got excited about the prospect of writing code for a watch and ordered a Samsung Galaxy Gear. Currently the device does nothing unless paired with a Samsung phone running the proper version of the official software.



My goal is to enable debug mode and use adb to install apps, not necessarily use all the phone-gear functionalities.


Any idea on how to do anything without a Galaxy phone? The obvious answer is no, but I'm hoping some clever hacker in this site may have found a way.



Answer



I have gear and note 2. I rooted my phone and watch: everything went OK. Finally got internet on the gear Bluetooth tether to my phone.


Got new KitKat on the note 2. I installed Null ROM onto the gear. The gear with it original stock OS ROM sucks, its pure garbage. But with custom ROM its a lot better.


Beware: Rooting the gear you can mess it up.


settings - How can I change the default location for bluetooth file transfers?


I have an Android 2.3 device (Samsung Galaxy Y Duos, S6102) and want all files that I receive via bluetooth to save to my SD card.


How can I do that?



Answer



The default location is already on your external SD card in the /bluetooth folder.


It's not possible to configure it up to Android 4.1 Jelly Bean:
With the included stock bluetooth receiver you cannot change the location as of now, because it's hard coded. You need a 3rd party app like Bluetooth file transfer which might be configurable here.



In ./packages/apps/Bluetooth/src/com/android/bluetooth/opp/ you can see it.


Constants.java defines this:


public static final String DEFAULT_STORE_SUBDIR = "/bluetooth";

BluetoothOppReceiveFileInfo.java has no switch for the location:


File receiveFile = new File(uniqueFileName);
if (sDesiredStoragePath == null) {
sDesiredStoragePath = Environment.getExternalStorageDirectory().getPath() +
Constants.DEFAULT_STORE_SUBDIR;
}

Wednesday, November 27, 2019

4.0 ice cream sandwich - Tracking Android Phone via IMEI number


I have lost my Android Phone. How can I track it via IMEI number.


Can I install any application which can given me the number of SIM currently on given IMEI number.


Please help




If I buy an Android phone today and want security updates for as long as possible, how should I choose a phone? I'm willing to use custom ROMs.​



Quite a few software developers offer special "long-term support" (LTS) or "extended-support release" (ESR) editions of their products. You install the product once and get security updates for up to ten years, without having to upgrade to the next major version of the software.


Here are some examples: You can install one version of Firefox ESR and then get security updates for version for about a year. Or you can install one version of Ubuntu LTS and then get security updates for that version for five years.


Unfortunately, Google doesn't offer a special long-term support edition of Android. Security fixes get backported to your device's Android version until Google stops backporting them. These patched Android versions get built into new firmware images for your device until your device manufacturer or third-party ROM builder stops building new images.


(For example, it looks like Android 6.0.1 "Marshmallow" is still getting security fixes. The latest versions of Android 6.0.1 are android-6.0.1_r56 through android-6.0.1_r63. Each of these eight Android versions was released on the same day: on Aug. 1, '16. Each of the eight was designed to support a different set of Nexus devices. Device makers can pick any of the eight and then port it to other Android devices. As of this writing, it looks like Android 5.1.1 "Lollipop" may also still be getting security fixes. The latest version is android-5.1.1_r38, which was released July 19, '16; it may also be known by the build code LMY49M.)



iOS


Apple tends to support iOS devices for three to five years after their initial release. (Source.) They ship both new features (which slow down your device, thereby encouraging you to upgrade) and security updates. But I want a device which is more open and expandable than an Apple device.



If I'm buying an Android cellphone today, and I want to get security updates for it as many years as possible, how should I choose?


(Monthly security updates are nice, but today I'm not asking about monthly security updates. My question is not about which Android phones get security updates the most frequently. Instead, it's about which Android phones get security updates for the greatest number of years after purchase — even if I must wait six or twelve months between updates.)


Please don't recommend a specific make and model of mobile phone and leave it at that. Such an answer would be useful to readers today, but not to readers who view this question a few years from now. Instead, please tell me how to compare products myself. How important is it for me to choose a best-selling device? Does it matter whether I buy a midrange phone (US$100-$200 with no contract) or a high-end phone ($600-$800 with no contract)? Must I choose hardware from manufacturers who get their drivers into the Linux kernel, and if so, which manufacturers are these? What other criteria should I use in order to make my choice?


Please assume that I'm willing to download and install custom ROMs in order to get security updates, but that I'm not willing to compile anything myself.


I know that you can't predict the future with perfect accuracy. Please just try your best.



Answer



The Dutch consumer organization retests their smartphones periodically for updates: https://www.consumentenbond.nl/acties/updaten/ruim-een-derde-smartphones-heeft-sterk-verouderde-veiligheidsupdate



The list is basically: the Google Nexus/Pixel phones (~3 years), Nokia / HMD Global, last (& this..) year's flagship Samsung (~1.5 years), this years flagship Sony Xperia.


(These phones had the February 2018 update begin March)


In the mean time iDevices are updated for up to 5 years (4 years + security updates until next iOS). This makes them cheaper year-over-year over the lifetime of the phone. Please see the "Depreciation" and "Sources" worksheets in this Google Sheets workbook.


Notification light in silent mode on Lollipop



With Android 4.4 on my Nexus 5, when I set the notification volume to 0, the notification LED would still pulse when receiving a notififaction. This is the setting I usually want. Now, with 5.0, I cannot find a way to keep the phone completely silent but still receive notifications via the LED.


Did I overlook a setting, or did Google really mess up that badly?



Answer



The best solution I have found so far is purchasing the popular app "Light Flow" for currently $2.49 and in this app activate "Show LED in priority mode". Then just set the phone to priority mode and you have pretty much the same behavior as in pre-Lollipop. Still annoying, though, to have to use an extra app for this. There might be free app alternatives, but I already wasted too much time for this and didn't search for that.


file system - Why is EXT3 not supported on Android?


Android uses the Linux kernel instead of some "Android kernel", so why is ext3 not supported on Android 2.3?




Answer



The filesystem support is device-specific, and in fact many devices using Android 2.3 support ext3 in the kernel (or ext4, which can also mount ext3 and ext2 filesystems).


Usually the difference in filesystem support is due to different hardware. Older devices often used raw NAND flash chips and MTD drivers in Linux, which did not support conventional filesystems such as ext4; only special filesystems such as YAFFS or JFFS2 could be used on such devices. In this case having ext3 or ext4 support in the kernel was not necessary, and it could be omitted to save some memory; to get ext3/4 support on such device you will need to flash a custom kernel (or, in some cases, an external module could be compiled instead of replacing the whole kernel).


More recent devices usually use eMMC storage, which provides a block device instead of raw flash; such devices mostly use ext4 for their filesystems, and therefore should have support for mounting ext3 filesystems (although actually using it to mount a custom filesystem, e.g., on a separate SD card partition, will require root access).


Tuesday, November 26, 2019

last seen on whatsapp


Good day I have 2 phones with 2 different whatsapp accounts, not linked to each other at all.


Lets say I've got 3 contacts, contact X, contact Y and contact Z on my whatsapp profile "A" on phone "A", and the same 3 contacts on my whatsapp profile "B" on phone "B". I can see contact X "last seen" time and date on the whatsapp profile "A" on phone "A", but at the same time not see contact X "last seen" time and date on the whatsapp profile "B" on phone "B" of mine. I can however see on whatsapp profile "A" & "B" when contact X is online as both whatsapp profiles "A" & "B" simultaneously indicate "online" when contact X is online.


For contacts Y & Z I can see the "last seen" time and date as well as "online" simultaneously on whatsapp profile "A" & "B" on phones "A" & "B".


Why would it be that I can see contact X's "last seen" time and date on whatsapp profile "A" but not on whatsapp profile "B" while I can see the "last seen" time and date of contacts Y & Z on both "A" & "B" whatsapp profiles?


Other contacts which is also on both whatsapp profiles of mine, I can see the "last seen" time and date on both whatsapp profiles.


Thanks



Pieter




5.0 lollipop - Missing "Scheduled Power On/Off" option in Android 5.0.2 on Swipe Elite Plus phone


I have a Android Lollipop 5.0.2 based mobile device called Swipe Elite Plus (released in India). I searched the internet and found that Android 5 had the Scheduled Power On/Off available but my device doesn't have it. Neither is this option available in Settings and there isn't any option Settings -> Advanced.


I have found no clear indication on any website including official Android website exactly in which version was this option introduced. There are many references on internet where people have explained how to use it in Android 5.0.2, viz.



TIA




file transfer - My Macbook doesn't import or copy photos from Galaxy S3


There are 663 photos in my camera. I want to share some of them them via computer with my mother who does not have a smartphone.




  • My phone and computer are connected via USB cable.

  • The Android File Transfer app is installed and working up to the point of showing me a window on my computer with choices of files to transfer.


However, when I click on DCIM or Pictures nothing comes up. Similarly, nothing happens when I click on Camera.


What am I doing wrong? How do I get those photos from my phone to show up in my computer? And will they be in both places? I'd like to keep them in my phone also.


Thank you.




linux - Today I read that flash write performance diminishes with use. I'm a heavy user. Should I change my behavior?


My phone


I own a phone with gigabytes of built-in flash memory. My phone also includes a physical MicroSD card slot. I don't own a MicroSD card to put in the slot, and have never bothered buying one, but am not opposed to the idea of buying one.


I perhaps make heavier use of my phone's flash memory than most people.




  • I run a freeware sleep tracker app most nights, all night long. It has many features. Its most storage-intensive feature? It records sound for at least part of every night.




  • I have Debian Linux installed on my phone as well (even though the phone is not rooted). I launch Debian when desired using an app named GNURoot Debian. Debian Linux is normally stored on an SSD designed to handle an enormous number of write cycles, or on a hard drive which can also handle numerous write cycles — not on a smartphone flash memory chip.





  • I have perhaps a hundred apps installed, and the Google Play store automatically updates some of them from time to time.




  • I make heavy use of a game which was designed for use on Windows and Linux, but has been ported to Android. Every time I move between floors of the game world, the game saves some information to disk. I suspect that, in practice, it rewrites at least part of the game's save file.




The problem


David Cary has more than 10,000 reputation points on Electrical Engineering Stack Exchange. In one post there, Mr. Cary writes:




Flash memory has relatively quick read times but much longer write times. For example, with a Numonyx M25P80-VMW6G 75MHz 8 Mbit serial flash, reading a sector of data (at 75 MHz) requires 7 milliseconds, while erasing and writing new data to a sector is typically 0.6 seconds (max 3 seconds).


In other words, writing this flash memory typically takes 85 times as long as reading, and in the worst case writing a sector takes over 400 times as long as reading. (That's not even taken into account the inefficiencies of partial-sector updating).


In my experience, the time it takes to erase and rewrite a particular sector of flash continues to increase with each erase/rewrite cycle, but read times stay constant.



I don't know that much about hardware, but let's assume that Mr. Cary's experience will be true for my phone too.


My question


I don't like spending money unnecessarily, and it sometimes takes me great effort to choose a phone to buy. When I buy a phone, I like to treat it well and to keep on using it for five to ten years or more — unless it breaks so badly that this becomes absolutely impossible.


Certain operations on my phone are annoyingly slow, such as Debian Linux automatic software update checks (apt-get update) and others. I don't know whether or not they're slow because of the time it takes to write to flash or because of other reasons.


Anyway, assuming that the issue which Mr. Cary has raised above is a real issue, should I worry about it? Should I change my behavior because of it — for example, by moving GNURoot Debian from the phone's built-in flash memory to a MicroSD card inserted into the correct slot?



Note


I have left this question mostly device-agnostic. This is because I'd like to apply what I learn both to the device which I own and any other Android devices which I may buy in the future.


Related




Answer



As a user, and not a developer, this is not an effect you should concern yourself with. For operations like disk defragmentation or use of flash memory as virtual memory, the sustained high disk write rates can wear out flash memory quickly. But "normal" usage by a human will not produce enough writes to create a wear issue.


Let's take the sleep app as an example and estimate how many writes this will cause on a wear-leveled disk. Suppose the app collects 128 kilobit / second audio to store uncompressed and runs and collects audio at all times for 5 years. (128 kilobits / second) * (128 bytes / kilobit) * (5 years) * (365 days / year) * (24 hours / day) * (60 minutes / hour) * (60 seconds / minute) ~= 5.17 * 10^11 bytes. On a wear leveled disk of 1 GB ~= 10^9 bytes, this will be (5.17 * 10^11) / (10^9) ~= 517 cycles over the 5 years, which is well below the expected 100,000 cycles for current flash memory.


Also, note that almost all SSDs are currently built from flash memory, so there is no significant difference between the storage for your Android phone and that in a consumer SSD for a laptop/desktop in terms of expected aging issues.




EDIT



If you are really worried about this, I would benchmark your storage performance. I don't think it is a good assumption that erase/write operations take 0.6 seconds; your flash memory is not the same as that used in the example figures.


This empirical evaluation of flash memory gives actual figures for degradation. The magnitude of the effect is not that large for cycles in the low thousands.


4.0 ice cream sandwich - Security options grayed out



I have my mobile phone (Samsung Galaxy S2) running on ICS. Recently I activated Microsoft Exchnage ActiveSync to connect to my corporate email. It disabled all the security options like 'Pattern Unlock'. I hated it, and removed my microsoft active exchange account from the phone, but these options are still disabled. How do I get it enabled?



Answer



As a last ditch effort, you could try this:



  1. Use Titanium Backup to backup all your Apps + Data.

  2. Reset the phone to factory defaults.

  3. Restore all apps and data except for Activesync.


This will definitely fix your issues. Question is, "Is it worth the effort?"


adb - How to Install App as System App



My S3 has a damaged motherboard (says Samsung Tech Center), only boots into safe mode.


If I am to keep using the device I have to make the apps into system apps, so they run in safe mode.


One way is to use titanium backup (or other root file app) to make the app system, but the phone came back from Samsung wiped clean. It is still rooted, have SuperSu app installed.


Does anyone know how I can make a Play_Store or Downloaded_APK app system?





htc droid incredible - How to choose micro USB cable for my device?


The plug sure looks like any old micro USB plug. Will another cable (like the one from my digital camera) work to charge the battery, or do I need one specifically designed for my phone (incredible)



Answer



Any Micro USB cable that has the capability of charging your phone does excactly that.


I found a link on USB powering. The source is from 2005 but the issue remains the same.


Some cables do charge your device due to a sufficient power flow through the cable while others don't.


applications - How to bind mount a folder inside /sdcard with correct permissions?


I am using a Sony Xperia M4 Aqua. As is well known, the internal memory is rather small. Especially the Media directory of WhatsApp uses a lot of precious space, therefore I am trying to move it to the SD card. I am using Android 6 and I have formatted the SD card to have an adopted storage partition.



Adopted storage would be normally used to migrate all /data to it, as discussed here. I am however interested in moving just the single directory WhatsApp/Media somewhere else (possibly in the adopted storage partition), and then bind-mount it to its original location.


For this purpose, I moved the WhatsApp/Media directory to the adopted storage. Then, following this discussion, I have modified the script /system/etc/init.qcom.post_boot.sh adding the following mountcommands (the phone has no support for init.d scripts)


mount -o bind /mnt/expand/4fdb2500-9aa7-44bc-a2c4-80aeae28e764/WhatsAppMedia /storage/emulated/0/WhatsApp/Media
mount -o bind /mnt/expand/4fdb2500-9aa7-44bc-a2c4-80aeae28e764/WhatsAppMedia /mnt/runtime/write/emulated/0/WhatsApp/Media
mount -o bind /mnt/expand/4fdb2500-9aa7-44bc-a2c4-80aeae28e764/WhatsAppMedia /mnt/runtime/read/emulated/0/WhatsApp/Media
mount -o bind /mnt/expand/4fdb2500-9aa7-44bc-a2c4-80aeae28e764/WhatsAppMedia /mnt/runtime/default/emulated/0/WhatsApp/Media
mount -o bind /mnt/expand/4fdb2500-9aa7-44bc-a2c4-80aeae28e764/WhatsAppMedia /data/media/0/WhatsApp/Media

Notice: /mnt/expand/4fdb25.... points to the adopted storage partition.


This only apparently works: if I open a shell with adb I can correctly see that the WhatsApp/Media directory contains the mounted directory. Also, I see no additional views that contains the WhatsApp directory, as can be checked by doing, in an adb shell



find / -type d -name WhatsApp

Nevertheless, WhatsApp is not able to access the Media gallery. For instance, in the chat I just see blurred pictures (like a preview), and clicking on it I do not see the full picture. Moreover, if somebody sends me a picture, all I can see is a blurred preview with the download icon. Clicking on the download icon does not produce anything.


Wrong permissions are presumably the source of problems. For example, some permissions/group ownership appear to be incorrect on some views:


root@E2303:/ # ls -n /storage/emulated/0/WhatsApp
drwxrwx--x 0 1015 2019-09-04 14:37 Backups
drwxrwx--x 0 1015 2019-10-19 02:00 Databases
drwxrwx--x 0 1015 2019-09-04 20:24 Media
root@E2303:/ # ls -n /mnt/runtime/write/emulated/0/WhatsApp
drwxrwx--- 0 9997 2019-09-04 14:37 Backups

drwxrwx--- 0 9997 2019-10-19 02:00 Databases
drwxrwx--x 0 1015 2019-09-04 20:24 Media
root@E2303:/ # ls -n /mnt/runtime/read/emulated/0/WhatsApp
drwxr-x--- 0 9997 2019-09-04 14:37 Backups
drwxr-x--- 0 9997 2019-10-19 02:00 Databases
drwxrwx--x 0 1015 2019-09-04 20:24 Media
root@E2303:/ # ls -n /mnt/runtime/default/emulated/0/WhatsApp
drwxrwx--x 0 1015 2019-09-04 14:37 Backups
drwxrwx--x 0 1015 2019-10-19 02:00 Databases
drwxrwx--x 0 1015 2019-09-04 20:24 Media

root@E2303:/ # ls -n /data/media/0/WhatsApp/
drwxrwxr-x 1023 1023 2019-09-04 14:37 Backups
drwxrwxr-x 1023 1023 2019-10-19 02:00 Databases
drwxrwx--x 0 1015 2019-09-04 20:24 Media

Permissions and group ownership of the Media directory should be the same of the other (non bind-mounted) directories Backups and Databases. Oddly enough, an attempt to remount the directories with the correct gid


root@E2303:/ # mount -o remount, gid=9997 /mnt/runtime/write/emulated/0/WhatsApp/Media
root@E2303:/ # mount -o remount, gid=9997 /mnt/runtime/read/emulated/0/WhatsApp/Media
root@E2303:/ # mount -o remount, gid=1023 /data/media/0/WhatsApp/Media


does not produce any changes in the group ownership: ls -n as above gives identical results.


Even more strange, but maybe unrelated, omitting the space between remount and gid=... results in


mount: Invalid argument

How to bind mount WhatsApp/Media folder from external SD card with correct permissions?



Answer



I have been using two different approaches (in fact many with small differences) on my older Android versions to mount whole /sdcard/WhatsApp directory from external SD card. I have tested, it works on Android 9 too, but the storage things have changed on Android 10.


Before getting into practical details, we need to keep in mind a few points:



  • /sdcard isn't an actual but emulated filesystem. Android uses sdcardfs (or FUSE) to emulate actual storage on /sdcard. See What is /storage/emulated/0/?


  • Both of the above filesystems have a fixed SELinux context: u:object_r:sdcardfs:s0 (or u:object_r:fuse:s0).

  • Normally /data/media is emulated over /sdcard, but in case of Adoptable Storage when data is migrated, /mnt/expand/[UUID]/media is emulated. See How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?


  • Files and directories on /sdcard have fixed ownership and permissions which depend on if the app has android.permission.[READ|WRITE]_EXTERNAL_STORAGE permission granted or not. Files have never executable permission. Apps' data directories in /sdcard/Android/data/ have ownership set to respective app's UID. For details see What is the “u#_everybody” UID?


    We assume here that every app is allowed to write to /sdcard by setting ownership 0/9997 (user/group) and permissions 0771/0660 (directories/files).




  • To achieve above said behavior, since Android 6 every app is run in an isolated mount namespace and /storage/emulated is bind mounted to a different VIEW: /mnt/runtime/[default|read|write]/emulated with private/slave mount propagation. So mounting directly to /storage/emulated won't appear in apps' mount namespaces unless you enter every app's mount namespace explicitly. The same is true if you mount from some app's isolated mount namespace. See Partition gets unmounted automatically in Android Oreo.


    We are going to mount from root mount namespace to /mnt/runtime/write/emulated which is propagated to all apps' mount namespaces.





  • read and default views have different permissions than write (1), but mounting to both is usually unnecessary. Permissions READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE belong to same permission group. So granting one to an app through GUI also grants the other, and all apps with Storage permission will only see write view. default is only to let apps (which don't have READ/WRITE Storage permission) traverse /sdcard/Android/data directories. So mounting to default will let such apps just pass through subdirectories on /sdcard/, no files will be visible.


    Also at least with sdcardfs emulation, read and write are bind-mounted (2) from default and mounting to one also mounts to other two. So it's not possible to mount all of three with different permissions.



  • /sdcard does not support Extended Attributes (xattr) and Access Time (atime). Other mount options include nosuid, nodev and noexec. See mount manpage for details.




First of all make sure you are in root mount namespace as explained in the link given above. Or use nsenter to get a root shell in global namespace:


~# [ $(readlink /proc/1/ns/mnt) = $(readlink /proc/self/ns/mnt) ] || busybox nsenter -t 1 -m /system/bin/sh


1. MOUNT SD CARD MANUALLY:


The straightforward way is to format external SD card as portable storage with exFAT or FAT32. Since these filesystems aren't native to Linux, their in-kernel driver implementations support uid, gid, fmask and dmask mount options. You can use exfat or sdfat drivers with exFAT and vfat with FAT32. Former has also a userspace implementation mount.exfat-fuse which requires only FUSE support from kernel. Check with grep fuse /proc/filesystems.


Let's say /dev/block/sda1 is your exFAT partition:


~# mount -t exfat -o nosuid,nodev,noexec,noatime,context=u:object_r:sdcardfs:s0,uid=0,gid=9997,fmask=0117,dmask=0006 /dev/block/sda1 /mnt/runtime/write/emulated/0/WhatsApp
~# mv /data/media/0/WhatsApp/* /sdcard/WhatsApp/

* Replace u:object_r:sdcardfs:s0 with u:object_r:fuse:s0 or whatever label your /sdcard has.


You can also create multiple partitions on SD card. Or after mounting with required mount options you may also bind mount a directory instead of whole partition. Let's say you first mount SD card to /mnt/my_sdcard, then bind mount WhatsApp directory:


~# mount -o bind /mnt/my_sdcard/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp


Downside with this approach is that vold mounts external SD card on boot, so you need to un-mount first.
Secondly the data on SD card isn't encrypted, though there are multiple ways to encrypt manually. See Decrypting microSD card on another Android device or desktop computer.


2. ADOPTABLE STORAGE:


An easy way to counter the above said downsides is to make use of kernel's built-in FDE by formatting the SD card as Adoptable Storage, but only if you don't want to migrate all /data/media/ to external SD card. Once formatted, external SD card will be mounted at /mnt/expand/[UUID] (filesystem UUID is a 16 bytes number). But we can't simply bind mount a directory from there to /sdcard because the filesystem on Adoptable Storage is ext4, which follows UNIX permissions model but the apps can't handle those as explained above. Even if you make it work somehow (using chown, chmod etc.), every app will create files with its own UID which won't be accessible to other apps e.g. Gallery may not be able see pictures downloaded by WhatsApp.


For this method to work your kernel must support sdcardfs (check with grep sdcardfs /proc/filesystems). Create a directory on Adopted SD card and emulate it to /sdcard/WhatsApp:


~# mkdir /mnt/expand/[UUID]/media/0/WhatsApp
~# mv /sdcard/WhatsApp/* /mnt/expand/[UUID]/media/0/WhatsApp/
~# restorecon -rv /mnt/expand/[UUID]/media/
~# mount -t sdcardfs -o nosuid,nodev,noexec,noatime,mask=7,gid=9997 /mnt/expand/[UUID]/media/0/WhatsApp /mnt/runtime/write/emulated/0/Whatsapp


Please note that we necessarily need to use path /mnt/expand/[UUID]/media/ because it's labeled as media_rw_data_file (3) (like /data/media (4)) which is allowed by SELinux policy to be accessed by apps (5). If you use a different path, you need to modify SELinux policy. Unlike other filesystems sdcardfs itself doesn't change SELinux context when accessing underlying filesystem.


3. PORTABLE / ADOPTABLE STORAGE:


This method is the most flexible, it works if you want to use:



  • Portable storage but don't want to mount whole partition, instead a directory.

  • Adoptable storage but your kernel doesn't have sdcardfs support.

  • Adoptable storage but don't want to use /mnt/expand/[UUID]/media/ path necessarily.


Use a third party tool named bindfs (which uses FUSE) to simulate the behavior of emulated filesystem. Actually Android's built-in tool /system/bin/sdcard does exactly this on pre-sdcardfs releases but it has some fixed paths and other unnecessary things, so its source code needs to be modified to achieve what we want. You can build bindfs yourself or try this this one.


~# DIR=/mnt/media_rw/[UUID]    # for Portable Storage

~# DIR=/mnt/expand/[UUID] # for Adoptable Storage
~# mkdir $DIR/WhatsApp
~# mv /sdcard/WhatsApp/* $DIR/WhatsApp/
~# bindfs -o nosuid,nodev,noexec,noatime,context=u:object_r:sdcardfs:s0 -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X --create-with-perms=a-rwx,ug+rw,ugo+X --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore $DIR/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp

Side notes:



  • sdcardfs also works partially with this method except it doesn't support SELinux context= option (so far). So it depends on what is the SELinux label of backing directory on SD card.

  • Other tools like rclone, encfs, sshfs etc. which make use of FUSE can also be mounted inside /sdcard the same way.*

  • -u and -g options require /etc/passwd and /etc/group to exist on bindfs < v1.14.2.





So you may go with whatever method suits you. Usually in-kernel drivers perform better than userspace solutions, and methods native to Linux kernel are more robust and stable. FUSE (over FUSE) may exert performance penalty sometimes e.g. if SD card itself supports high speed data transfers.


You can place the required mount commands in an init.d script or define and init service. See How to run an executable on boot and keep it running?


Note:



  • Apps which don't scan /sdcard filesystem themselves but rely on Android's MediaProvider for any changes may need a forced media scan for new files on mounted filesystem to appear immediately.

  • If you use multiple users or profiles, you need to mount new filesystem for every User_ID. For device owner it's 0.





RELATED:



Nexus 5 Reboot loop


Today my Nexus 5 turned itself off, and then whenever I try to start it again, it loops rebooting - it shows the google logo, then starts the boot animation, then powers off and starts over.


I've tried to get into recovery mode with the volume+power keys, but when I'm able to get into the recovery screen, it shuts off in about the same amount of time and reboots again.


What can I do to fix this?


I did run the upgrade to 5.1.1, but it was a few days ago so I'm not sure whether that would be related.




Answer



In the end, nothing I tried worked - it went into the reboot loop even from inside the boot loader screen, so I couldn't get into recovery mode.


I sent it to LG and they repaired it for free even though it was supposed to be out of warranty.


Monday, November 25, 2019

root access - possible to ssh into android phone over 3G?


Is it possible to run an ssh shell on an android phone when the phone is remotely connected but on 3G? I have my phone remote and sending data over 3G but I might want to change something on it. I have considered


1) the phone receiving text back from an http request and riunning it as a connad 2) running an ssh shell on the phone anything else?


Thanks




Saturday, November 23, 2019

Can somebody explain how multi-user is implemented in android 4.4



Can somebody please help in giving information on how multi-user partition is achieved on android 4.4.


I was digging into 4.4 code specific to creating multiple users.


There is class called multiUser(added in 4.4 for multi-user) whose members talk with multiUserService to create user space.


I am not getting how exactly secure space is created at file system.


I have below basic question. 1. How FileSystem partition is achieved for multiple users 2. How UI part ( Launcher, different screen icons etc) is developed and when user switch how it reload default users data.




Answer



It works in a very similar way to how one user's apps are isolated from each other. Whereas apps' private data used to be stored in /data/data, now it's stored in /data/users/n, where n is the ID of the user profile. Each user gets their own directory, and each app that user uses gets a directory within that. POSIX file system permissions protect the data directories, not only from other apps, but also from other users.


Because Android uses the existing POSIX process, UID, and file system security mechanism, the same way it does for different apps, the implementation is already secure without needing anything special at the OS level, or a more complicated (and thus battery-hungry) solution such as virtualization. Virtualization would work poorly for this anyway: providing virtualized access to the network, Bluetooth, NFC hardware, etc. such that all users could control it would add a lot of unnecessary complexity to the driver stacks.


When both users run the same app (such as the launcher), there are actually two instances of that app. They share one APK file, but they have two separate processes running under different POSIX user IDs, and they each look in their own data directory. This way, nothing they might write to is shared between the two users, but read-only parts (such as the app's executable code from the APK file) are shared, reducing RAM and storage use. Both instances might be running at once, and switching users just changes which one is the foreground app on the screen. Nothing needs to be reloaded or restarted.


This works the same way whether the app is a built-in one, or one installed by the user. There's an awkward side-effect of that: when one user upgrades an app, the upgrade affects all users, even if the new version needs more permissions.


Only apps with the INTERACT_ACROSS_USERS permission are special. Such apps get access to APIs within the Android framework to look at all the users' data directories at once. The lock screen is an example of such an app: in one instance, it needs to be able to read each user's settings and profile picture, in order to show the "switch users" GUI.


samsung - Using your smartphone as Laptop and Desktop with a DisplayLink-Setup (with S7 for example)



I want to buy an Samsung S7, but I also want to use it as a laptop and desktop replacement. What I have in mind is a workflow like seen in this youtube video. After some researching how this could be done with the S7 I found out that it hasn't MHL (which might be problematic), and that what is done in the video might not work. Luckily I came across the DisplayLink technology.


So I want to buy a compatible docking station, for example this one. And as I read with USB OTG the phone could not charged I would use a wireless charger. Then some mouse and keyboard (bluetooth or usb with the docking station) and I would be happy. Also I would buy me a portable display and a power bank.


But before I go and buy it, has anybody experience with such a setup? I find it rather difficult to find information on these setups. I found this post here, but it is from 2011 and so not very up to date. So will this setup work? What solutions have you guys for such a setup?


If it might not work, or might be problematic, please feel free to offer alternative solutions, also suggesting different phones, as despite the S7 is my favorite up to now I am still open for other options that do what I want them to do.


EDIT: At the end of this post a user confirms that the Lenovo's DisplayLink (AN9017A1) works with the S7.




battery - How Doze (marshmallow feature) work during playback?


We know that Doze mode starts the 'ultra power saving' when the device isn't moving.


But what happen if we leave the device on a table playing music with the screen off?


EDIT: I experienced the volume decreased after sometime when playing with Google Music app. Is this a feature of the app or some intrusion of the Doze ?




Is auto sync really killing my battery?


I have been digging the archives for eternity to find that Location Services and Auto-sync (assuming we ignored other factors such as Bluetooth etc -- because my focus is mainly about auto sync) are extremely battery hungry.



Although, i manually toggle the switches (GPS, BT etc) based on requirement. I have paid enough heed to notice the battery gain and drain caused by auto sync enabled and disabled.


I have read somewhere people claiming innocence of autosync. Basically, Their idea is that it doesn't constantly push all the data from server to my phone and vice-versa. instead, there is a thread meant to ask the server if there's something new (and events are created based on the responses).


So, shed some light on:


1) is auto sync really causing the depression to my battery?


2) what does auto sync really do (perhaps a geeky explanation please) ?


3) how many minutes/hours am i actually gaining or losing while leaving it ON or OFF ?


4) what other factors claim culpability as to battery drain?




Friday, November 22, 2019

external sd - Specifying SD card mount options upon boot


I have an Archos 101IT with a 16G external SD card. The SD card contains one partition that is formatted as an ext3 file system. The Archos runs UrukDroid 1.6.4 (Froyo 2.2).


The Problem: When booted, the SD card is mounted with the following mount options:


/dev/block/vold/179:17 on /mnt/storage/sdcard type ext3
(rw,nosuid,nodev,noexec,noatime,nodiratime,fmode=0666,dmode=0666,errors=continue,data=ordered)


The fmode and dmode options make it impossible to use file permissions, in particular it is not possible to make files read-only. This is needed by the Titanium Backup tool to protect backups from being overwritten.


I can change the mount options with a remount:


# mount /mnt/storage/sdcard -o remount,fmode=0,dmode=0

The Question: How can I have the SD card mounted with the right mount options upon boot?




internal storage - Why the Galaxy has 25GB instead of 32GB


I just purchased a Samsung Galaxy S3 32GB, when I check the storage I have only 25.5GB. Where is the other 6.5GB?



Answer



Usually this space is taken up by various things that come with the device, like resources for the OS, built-in apps, and just disk information. Even formatting an 8 GB SD card will only get you 7.49 GB. That same logic would leave you with 30 GB, the rest is most likely the OS, and various system resources.


How is the default screen orientation in android specified?


On android phones, the orientation typically defaults to portrait. When you disable auto-rotation, the screen will always remain in a portrait mode.



On android tablets, the orientation typically defaults to landscape. When you disable auto-rotation, the screen will always remain in a landscape mode.


Apparently tablets were not envisioned for use while lying sideways. When I do this, there is no way to get the tablet to remain in portrait mode - with or without auto-rotation the screen is stuck in landscape.


As it is pretty hard for me to change gravity, I am trying to figure out if I can hack my tablet to default to portrait mode. My question is, where would this be set? As I can't find any applications that can force change the orientation I get the impression this is embedded somewhere deep and inaccessible in the operating system. Is this possibly somewhere in the properties file? Is it embedded deep in the hardware? Where can I start looking?


My specific tablet is a Notion Ink Adam Running BeastyRom 2.2.1 + Clemsyn


edit: also asked here: http://forum.xda-developers.com/showthread.php?p=14315083#post14315083




locked out - Recovering from forgotten lock pattern


My son has an impression tablet 10 and has forgot the lock pattern. How can we reset it without knowing the code?





Wednesday, November 20, 2019

privacy - Malicious Android Apps installed remotely on my device


I recently installed Trend Micro Mobile Security in order to to check my apps if all are safe and secure since I have a rooted Xperia Phone which may be more prone to attacks.


I had clean results then I've got it uninstalled. The problem starts when I installed an App called "WiFi FTP (WiFi File Transfer)" from 1 Mobile Market which I found out isn't a genuine Google Play app and has a suspicious 1MB file size. As a rooted user I've got a popular app called Xprivacy which warns me when any app is seeking permissions and gives me the choice to allow it or not.


When I opened WiFi FTP and gave it full permissions it needed I had a surprising Xprivacy popup for another app called "Security Certificate" asking for permissions to use (among others) the Internet. I've blocked all of them. After removing WiFi FTP I had another popup for a suspicious app with the name "Settings Helper" asking for the same permissions as its predecessor. I blocked all permissions it was asking for, and opened Settings > Apps to check what they are. I found both of them having an identical weird android logo and when I got into the app info it had a "Disable" option not an "Uninstall" one. Which means that it is installed as a system app. Though I disabled both of them, and when I was outdoors I turned on Mobile Network for internet access just for 5 seconds and found a surprising big charge,and after checking traffic data usage I found an app (or better call them a system service for the three of them) with the same weird logo called "ceryos" that was the reason for that unusual charge and the previous two apps with some minimal net usage too!



I disabled the three apps but after some hours I checked them back and found them enabled Again except for "ceryos" (luckily)! And resetting the permissions limits I set them to from xprivacy. Though after doing more checks I found another one called "Live Wallpaper" with the same icon and disabled it.


What is the safest way to disable or remove these malicious applications?




how to downgrade moto g 2nd gen from lollipop to kitkat without root


I am having a problem while gaming on my new android update on moto g (2nd gen). So, i want to downgrade the android version please help me out.




wi fi - Is there a way for 3G to not disconnect when connecting to WiFi?


WiFi is unreliable, I wouldn't trust WiFi for SIP calls, I've disabled WiFi within CSipSimple.


Now every time I connect to WiFi, my SIP registration seems to go away, and I'm not receiving any calls at all. It's also unclear what happens when you do receive a call, unlock the phone to pick it up, and then the phone connects to WiFi (which it presumably didn't do during the sleep in order to conserve the power).


Is there a way to make this work?




Tuesday, November 19, 2019

A2DP Bluetooth audio randomly shows "(no media)"


Sometimes when I connect my phone to my headset, the Bluetooth device will be listed as:



"Connected ( no media )"


enter image description here


When this happens, it uses the "Phone audio" profile. The "Media audio" profile (A2DP) will also have a checkmark, as if it were connected, but all sound is coming from the phone's speaker (see photo below). If I attempt to uncheck it, it will immediately recheck itself. When it is working properly, it will wait two seconds and disconnect.


enter image description here


Rebooting the headset, or disconnecting it manually doesn't solve the issue.



Answer



Solved: The android system is likely connected to the headset for phone calls, and some other device for A2DP (media). Some other device is still using the audio connection, even though the sound comes from android's speaker!


What this means is that if you have any other A2DP devices that you've paired your android with (laptop/stereo/etc) then you will have to disconnect via the other device, not android.


However under android's "Paired Devices" list (see image), the other device isn't always listed as connected, even though it is! If you manually try to un-check the "Media audio" profile for the other device, it will not disconnect! You must manually disconnect the other device outside of android.


For example: If the other device is a laptop, you must disconnect the audio connection using the laptop. If the other device has no way to manually disconnect (no buttons), just turn it off and use your android to connect to the correct device.



cyanogenmod - Do apps included in the gApps zip get updated via Google Play?


While using alternative ROMs like CyanogenMod 9(as i currently am), one flashes an additional zip file called gApps which contains apps provided by Google.


As Google releases newer versions of applications, will the newer versions be updated via Google Play or do I need to manually flash a newer version of the gapps.zip?


I'm asking because an update to the Google Play market app was recently released (which includes the ability to remove apps from the ALL MY APPS section) but I still haven't seen my market app updating itself.



Answer



Short answer: Gapps will be updatable via Play Store. You can set them to update automatically if you will (personally, I don't. I always try to find a free wifi hotspot to do updates ;)


More specific answer: The Play Store app updates itself silently in the background; you will never be asked for an update.


Longer answer: Gapps must be installed separately because the apps in the Gapps set are not open-source. It was a compromise reached between Google and ROM devs. In essence, ROM devs are free to create their own version of ROM as long as they exclude Gapps, but Google then went further to provide an installable Gapps.


That is why Gapps' updatezip are rarely updated; after all, Gapps still have the ability to be upgraded via Play Store.



How do I disable the lock-screen when my Samsung Galaxy S II is charging/connected via USB?


When I develop for my Samsung Galaxy S II, the screen locks as usual after the configured time. However, for development it would be practical if the phone would just stay awake while it is connected to my computer.


So, How do I disable the lock-screen when my Samsung Galaxy S II is charging/connected via USB?


Question: Display On when plugged in is not a duplicate, as this solution does not work on the Galaxy S II. Unfortunately.



Answer



Try the app StayAwake, it should work for Galaxy S II too.



locked out - How to unlock Google Device Manager remote lock?


I have a rooted Samsung S4 mini with the latest stable CyanogenMod installed (cm-10.2.1.3).


I was playing with the Google Device Manager (https://www.google.com/android/devicemanager) and tried to lock the device.


When I tried to unlock I found out, there is no keyboard or input box to enter the password into.


The screen looks exactly the same as my lockscreen - I'm using the pattern lock which I remmember perfectly - besides there are just words: "locked" and the message I typed into the web remote lock. I can also see there is Android Device Manager running in background (icon in top left notification corner). Wherever I click or try to draw my pattern lock, the device does nothing (but it is not frozen as I can open the Power button menu).


I also use a custom keyboard application and I removed the original CyanogenMod keyboard. Can this be a problem?



  1. Is there any option at the online Device Manager to remotely unlock the device?

  2. The phone is rooted and I can connect via ADB in Recovery. Can I do something there - besides wiping the device - to unlock the remote lock?




Answer



In the end I was able to solve the problem by clicking the "Emergency Call" button.


That enforced the keyboard to come up and after closing the Emergency Call screen there was a window to enter Google Device Manager password.


ios - How can I transfer my contacts from an iPhone to an Android device?



I tried to transfer data from my 3 year old iPhone to my new HTC Inspire via bluetooth but it keeps saying the two are "paired but not connected". Seems I can't get past this problem.


How can I transfer info from my old phone to the new?




Monday, November 18, 2019

samsung galaxy s 5 - Unwanted outgoing phone calls



Occasionally, when I flip the lid of my phone and put it on the table, the phone calls the primary number of the contact with which I communicated last (by phone or text message).


I suspect that some button has this function under certain circumstances, but I am not able to reproduce this call back voluntarily.


Does anyone know what happens to me? And maybe how to deactivate this hidden callback feature.


I have a Samsung Galaxy S5 mini.


Edit: According to the answer I received, I moved the icon of the phone app, so that it would be impossible to tap it three times by closing the lid. But this didn't change the problem. The annoying unwanted outgoing calls still persist.




storage - Where is "Back up my data" stored? Can it be edited?


Anybody know how to get to it? It's not on the Google Dashboard, or linked to from the developer docs. I've even dug through the code, but it's confusing. Anybody know a way to download it, and better yet, upload a replacement?


For context: My phone sometimes starts acting weird (random hangs and/or reboots), and one theory is that some part of my backup is getting periodically corrupted, because even with a hard reset some problems persisted, but went away when I cleared "Back up my data" before doing another factory reset. Now that things have started to get weird again, I'm wondering if I could download that backup data and keep just certain parts of it.



Answer




There isn't any way to get to it. It is basically turning on and off a developer facing backup feature. Each app can write what it wants to into a certain amount of space, and Google takes care of sending it back to the app when it is reinstalled.


Even if you were to write an app for it, you'd only be able to access the storage linked to that developer key, not the other apps that use the service.


For more info on what that option does, see my answer here.


How can I factory reset a European Huawei phone in China without access to Google?


Well, as you can see in the title......I am having a hard time in China. :) My phone is from Spain and I had to factory reset it (it got soft-bricked...just on its own. Weirdest thing ever). It is a Huawei P8 Lite 2017 with literally no support. Whatever is on the internet (PC suite) can't be used because it says it is not a supported phone.


Is there a way to continue the factory reset without the Google service? It is blocked here.


This is the screen where I am stuck atm:


FRP



Answer



To reach Google and proceed with the next steps, you need to set up a PC that's capable of penetrating through that wall (e.g. with VPN), and make it a proxy server on the local network for your phone to use. Here's the way I do it:




  1. On your PC, install Privoxy and let it through your firewall (if exists)

  2. Go to its installation directory and open config.txt. You might need to open it with administrator privilege to be able to save it later.


  3. Search for "listen-address" and you should get something like this:



    listen-address 127.0.0.1:8118



    It should be right above the chapter "4.2 toggle" and not have a "#" before it. Edit it to:



    listen-address 0.0.0.0:8118




    Now save the file.




  4. Determine the LAN IP of your PC, usually by running ipconfig in the Command Prompt. Suppose it's 192.168.0.1.



  5. Fire up Privoxy and connect to the VPN you use. Now your PC is ready; move on to the phone.


  6. While in Setup Wizard, connect your phone to the same network as your PC. If you have already connected to the network, make the phone forget it and set it up from scratch. When entering setup details, check Advanced Options, then choose "Manual" for Proxy. Enter the IP and port you got previously. It should look like this:




    Proceed to connect.




Your phone should now use your PC as a proxy, and therefore should be able to reach Google. Follow the on-screen guidance afterwards.


adb - How do I take a full image backup of an Android device?



I am trying to do a full system image backup of a Samsung Galaxy Tab 4. It is unrooted at present, and is running Android Kitkat 4.4.2 . I have no desire of rooting it as of now.


I have tried creating a full image backup of the device using the ADB (Android Debug Bridge) method (adb backup -apk -shared -all -f C:\backup.ab), which looks like it works, but when it completes, no backup files are created (Although the backup process is shown as having been completed).



Can anyone either offer advice on why the adb method doesn't work, or present an alternative solution to this? The end result should be a full backup image (including all apps and data) that I can use to restore the device back to its exact backup state.




wi fi - Can I turn my Android device into a webcam?


If so, how? Could it be implemented via a USB, Bluetooth or Wi-Fi connection?



Answer



IP Webcam (Turns your phone into a network camera with multiple viewing options.)



(alternate direct link)


Originally posted by user739 in a duplicate question


Sunday, November 17, 2019

wi fi - Can I turn my Android device into a webcam?


If so, how? Could it be implemented via a USB, Bluetooth or Wi-Fi connection?



Answer



IP Webcam (Turns your phone into a network camera with multiple viewing options.)


(alternate direct link)


Originally posted by user739 in a duplicate question


rooting - How do I root my Nexus 7?


I am wanting to gain root privileges on my Google Nexus 7 tablet, running Android 4.1-4.2.1. How can I do this?



Answer



The Nexus 7 is probably one of the easiest Android devices to root - and all you need is the Android SDK (and 2 downloads).


Step 1


Install the adb and fastboot commands. On Ubuntu:


sudo apt-get install android-tools-adb android-tools-fastboot


On Windows you should download the Android SDK, however you can just download this zip which contains the adb, fastboot and dependencies.



Step 2


On your Nexus 7, go to System Settings->Developer Options->Check USB Debugging (You may need to slide the toggle switch in the action bar to on). If you do not see the USB Debugging option, go to System Settings->About Tablet->Tap on 'Build Number' 7 times.


Connect your Nexus to your computer.


Step 3


Make sure the drivers have downloaded and installed if you're on Windows - Windows Update should automatically find them.


Once connected, open up a terminal window (Windows: Win+R, type cmd press Enter. Ubuntu: ctrl+alt+t) and navigate to where you have unzipped the fastboot & adb programs (no need to do this on linux - they are in the path).


Step 3.5


Type adb backup -all -nosystem to backup your userdata to the backup.ab file.


Step 4


Type adb reboot bootloader.



Step 5


When the Nexus 7 has rebooted into fastboot mode, type fastboot oem unlock. Read the information on the device, and touch the Yes option. Your bootloader will be unlocked. This will erase all userdata!


Step 6


Download the latest TWRP recovery image. Save it in the same location as the fastboot binary. Issue the fastboot flash recovery twrp.img command to flash this recovery image.


Step 7


From the fastboot menu (green robot on its back with the cover open), use the volume keys to cycle through the options start, restart bootloader, power off, to recovery mode. Push the power key to select recovery mode. You'll see the google logo with an unlocked padlock, and then the TWRP splash screen for about 45 seconds. Then TWRP asks "keep system read-only?" Instead of tapping on "no," swipe the swiper to allow these modifications. This shows you the TWRP menu, 8 big buttons. Tap on Advanced. On the next menu, tap on ADB Sideload.


Download the latest SuperSU zip file and save it to the same location as adb and fastboot. DON'T UNZIP IT.


Step 8


On the Nexus 7, swipe the swiper to prepare it to sideload. Issue the command adb sideload CWM-SuperSU-v0.99.zip, which takes about a minute, and then tap the reboot button. This may take several minutes and several reboots, so don't worry.


The Nexus 7 is now rooted!



Step 9


Type adb restore to restore from a backup.


ram - Rooting Micromax A87 to make it faster


What is the best way to root my Micromax A87?


My phone RAM shows only 160MB, but I only access about 120MB.
I want my phone to run faster.


Or is there any common method for rooting my phone.
Kindly help me.



Answer



A XDA thread speaks about rooting MicroMax A87 Ninja which seems to be quite easy and broken into following easy steps:




  1. Preparation of computer which includes downloading JDK, SDK, ADB driver and One click tool to root.

  2. Connect the phone and run the root tool.


I am skipping on rest of the details as the XDA thread enumerates its details.


external sd - App2sd - Changing the SD Card


I plan to purchase a new micro SD card for my phone, I use app2SD for most of my programs, so what I wonder is what will happen if I get the new SD card, will I be able to copy the content of the old card onto the new card and still operate the phone as if nothing was changed?



Answer



Yes, I did that myself, like this:



  1. power the phone off and remove the old SD card

  2. mount the old SD on a PC, copy its entire contents somewhere on your hard disk

  3. mount the new SD card on a PC, format it as FAT or FAT32 (make sure it's the same file-system as the old one)

  4. copy the contents of the old SD card onto the new one

  5. insert the new SD card into the phone, power it on.



Kies dies when trying to update Galaxy Note firmware


I downloaded and installed Kies in my Windows 7 laptop. (Toshiba Satellite.) I plug the phone in the USB, it is recognized and its storage shows in Explorer. Then I run Kies. It says there is a firmware upgrade available. I click to update. A window shows with a progress bar at the bottom, saying something like "downloading update components."


After the download goes to 100%, Kies just silently dies on the PC, no error messages, its windows just vanish. And nothing happens on the phone. My phone is not rooted, it still has the carrier-provided software, regularly updated via Play. It was bought here in Brazil.


Kies is trhe latest version, I had it check for upgrades. I also disabled the PC antivirus to no avail.




Saturday, November 16, 2019

Nexus 4 And Vodafone india




Possible Duplicate:
Can I use my device on a different carrier?



I am buying the Nexus 4 from US google play store and my colleague is sending it over via his relative. My question is even though google has mentioned that the unlocked version being sold on play store is supported by 200 carriers worldwide - will there be any issues with Vodafone India or is there any carrier that i need to purchase Sim from. Please reply immediately as i am kind of worried here.


Thanks in advance Sameer




custom roms - What are the Pros and Cons to running CyanogenMod?


Can anyone that's used it list the relevant benefits and drawbacks? I'm actually more interested in the drawbacks and limitations because its not hard to find praise for it.



Edit: Ooops, I forgot to mention, original Droid currently running Android 2.2



Answer



Your mileage with Cyanogen Mod (CM) depends on the phone you are running. If you have an HTC phone, you will not have any HTC Sense running or installed at all. So HTC widgets will not work. This is a hurdle for many HTC phone users that enjoy some of those widgets. Personally I've been able to find adequate replacements to them. So that wasn't a barrier for me.


If you are not using an HTC phone there probably won't be a lot of cons. Again though you might not be able to use any stock widgets that came on your phone. But you might have a different dialer and contact app then what you are used to.


Do you connect to an email system at work, such as an Exchange mail system? I do and that was one of the reasons for me not using CM. Not that it didn't work, but there was some functionality I was missing, a few settings and I didn't like the way the contact app managed the Exchange contacts. Whatever HTC uses for their builds worked better IMO so I use an HTC based ROM.


As Saboogu states, hardware will make a difference too, but CM team is good about refining their ROM and working out kinks so that it functions well even on older phones.


If you are already rooted make a NAND backup first. Follow this guide I wrote keeping in mind it was written for an Evo, but most info still applies to other phones. Once you have a backup then wipe and flash and go from there. See if you like it and the feature set. This way if you hate it you can easily restore your backup.


htc sense - Is it safe to install Launchers for Android which require quite a few permissions?


I have HTC One X with Sense on it. Sense is a bit slow. So I installed Apex Launcher. It was fast but it required quite a few permissions so I uninstalled it. I looked at other Launchers in Google Play like Nova, Go, etc. but all of them had required some or the other permissions which were giving me goosebumps, like



  • Service that cost you money: Directly call phone numbers

  • Your messages: Access mail information, read your text messages (SMS or MMS)

  • Your personal information: Read call log, read your contacts

  • Your accounts: Find accounts on this device


So my question is, is it safe to install Launchers for Android which require permissions like they can read your emails, SMS, call number directly? Also Apex launcher cannot create widget on home screen unless the phone is rooted and shows a message - NOTE: Due to limitations of the Android framework, you won't be able to add widgets from the drawer unless Apex Launcher is installed as a system app (root required). Please read the FAQ for more information. Is this the case with all Launchers?




Answer



Those permissions (call, SMS) are in most cases used for "quick-access-widgets/shortcuts" the launcher provides. To create a call widget for a contact, the contacts need to be read, which again might need the account data in some cases to retrieve them.


So all those permissions are obviously making sense in context of a launcher. Of course this does not mean they cannot be abused. So I'd either stick with a heavily used / well known app, or have additional protection (PDroid, LBE).


You explicitly mentioned Apex, which I use on some of my devices. On others I use GoLauncher EX. I also use LBE to keep watch. None of these two launchers ever misused these permissions (at least I never got a warning) -- though I must admit I did not check all the logs thoroughly all the time.


rooting - Directly storing apps in SD Card



So I bought an 'Swees' Android phone recently, with ~150mb Internal storage + 4gb External SD Card.


I downloaded Android SDK manager on my mac, installed necessary packages and ran the 'adb' file in Terminal.


I set Default Storage Locaction to '2', (i.e. External Storage).


This was a success.


I have moved all my installed apps to SD Card (which I couldn't do before).


However, it seems I still have ~95% of Internal Memory used up.


When I download an app from the Play store it installs directly into the SD Card, which is what I want.


But when I install some apps (big file sizes) it will return an error, "insufficient storage space available".


I have >3.5GB available on my SD card.


Does the file have to be downloaded before it's installed on the SD card. And does it keep the downloaded file in Internal Memory?



I have no idea why else this is happening.




Friday, November 15, 2019

I can't connect to a bluetooth headset when the headset is connected to a computer



http://en.miui.com/thread-247552-1-1.html


Basically I got an error that I insert wrong pin or password. However, I can connect to the device before without problem.


So I tried the only thing that make sense. I remove the device from my PC.


Then I can connect.



However, it's very strange. That means if a device is paired with some device and I lost the device, I will not be able to ever pair that device with anything.


Or is it because I happen to be close to the computer?


http://en.miui.com/data/attachment/forum/201603/24/124058xr2qq3eurgymnquq.png.thumb.jpgenter image description here


Am I correct here?


What's actually happen with bluetooth? Should we pair a bluetooth device with one and only one device all of the time? What about if we pair with one and the pair is gone?



Answer



Your title talks about connecting, but the question body talks about pairing. These are two different things.


When you pair a Bluetooth peripheral (such as a headset) with a central (such as a phone or PC), the two devices swap cipher keys that allow them to keep their radio transmissions secure in future. Once they're paired, they remember the cipher keys forever. They can later connect to each other without having to pair again. If you like, pairing is like swapping phone numbers, while connecting is like calling their phone.


Normally, if you leave Bluetooth turned on on a phone or PC, it will keep looking for peripherals it has paired with before, and automatically connect to them as soon as they're in range. This makes it a lot easier for you, because you just have to turn on the headset and it's immediately ready to use. In this case it seems to have caused some confusion, though.


Any Bluetooth device can pair with several devices: exactly how many depends on the device, and how much memory it has. Some very cheap headsets may only pair with one, but usually they can remember up to a dozen pairings. When you pair with too many devices, it just forgets the oldest pairings. (Like erasing your old friends' phone numbers from your phone book to make space for newer friends.) Bluetooth centrals can pair with lots of devices at once.



Just like you can only call one phone at a time, a Bluetooth peripheral can only be connected to one central at a time. It needs to disconnect before another central can try to connect to it.


In your case, it looks like the headset was connected to the PC when you tried to pair it with your phone. This couldn't work, because a second central can't connect to the same peripheral. When you unpaired it from the PC, the PC also disconnected, which then made it available for the phone to connect to. In practical terms, what this means is that if you want to keep using it for both, and you want to control whether the PC or phone connects to it, either keep unpairing and pairing again (like you already did), or turn off Bluetooth on the PC when you want to connect with your phone (and vice-versa).


rooting - How do I root a Samsung Galaxy S4 SGH-I337?


I have a Samsung Galaxy S4 SGH-I337 with a I337UCUAMF3 baseband. How do I either root it and unlock the bootloader or install a mod? Alternately, can I change it back to a previous baseband and unlock the bootloader?




wi fi - Auto sync only when connected to a specific wifi network


I am getting rather low battery life when using auto-sync on 3G. I have wifi in college and at home, so I'm looking for a way to enable auto sync only when connected to those 2 specific wifi networks.



Answer




That's easily accomplished using Tasker. If you don't know, Tasker is the most complete automation solution for Android. It doesn't come for free (5 Euro -- but you can get a free trial on their homepage), but is definitly worth the price. Just take a look at the Tasker UserGuide for a full description.


Tasker combines conditions and tasks to profiles. In your case, the Task would be something like:


Task AutoSync:



  • Auto-Sync: On


You will have two Conditions, one for each profile (Tasker always connects conditions by AND, so you need two different profiles:



  • Profile Home:


    • Condition: Wifi Connected (add your home network's details)

    • Task: AutoSync



  • Profile College:

    • Condition: Wifi Connected (add your college's network's details)

    • Task: AutoSync





Now, when you're not connected to any of these networks, switch off AutoSync manually once (you won't have to repeat this). Next time you connect to one of the two networks, Tasker turns AutoSync on -- and resets it to the previous state (off) as soon as you are disconnected.


If Tasker is too heavy for you, I'm pretty sure there are other automating tools which can accomplish this simple task (Llama - Location Profiles for example). But now that you've got the idea, you will find the related app fitting you.


Thursday, November 14, 2019

google play store - Multiple update notifications from Android Market



I have recently upgraded my HTC Desire to run CyanogenMod 7. The main reason I did this was so that I could use a more recent version of the Android Market that supported multiple accounts. The reason for this was that I have moved my email address from GMail to Google Apps for Your Domain and wanted the main email address on the phone to be the Google Apps one, but the market to keep using the gmail one so that I don't have to buy apps again.


I also have two other gmail/apps accounts configured on the phone (so that I can receive emails sent to these two accounts).


Generally, everything works fine and I'm really happy with CyanogenMod. However, I have one fairly minor problem with the market. When new updates are available to the installed apps, I used to get a notification message saying (e.g.)


2 New Updates are available

(I'm paraphrasing as no updates are currently available, so I can't remember the exact wording of the message). This is quite instructive. With the new market, I get FOUR notification messages:


2 New Updates are available email@mydomain.com

2 New Updates are available other_email@mydomain.com


2 New Updates are available more_email@gmail.com

2 New Updates are available email@gmail.com

This seems a bit daft as they're all the same updates! Is there any way to sort this out? The market is set up to use the email@gmail.com account, but seems to be checking for all of the accounts. I'd imagine that if there are paid apps that need updating, they'll only be listed for the last account (although that's a guess), but for all the free ones I seem to be stuck with multiple messages.



Answer



I guess this is by design as the majority of users don't have 4 accounts on their phone. The whole idea of those messages is to give the user the opportunity to download a new version as soon as it comes out. You may not want to use your mobile data when you don't want it to. Maybe the update automatically tickbox would bypass this message, however it will probably still say that 3 updates have been applied.


So what you maybe looking for is silent updates https://stackoverflow.com/questions/10328471/can-we-do-silent-updation-for-android-application looks like you can do it with a rooted phone.


I too think that Google can handle multiple accounts in a more intuitive ways across their products. Since its out of our control to improve these closed source apps ourselves I will say its better than it used to be. I think the best solution for Google would be to combine these messages into one notification ie "5 apps have been updated".


Make some noise on the Google support pages to improve this UX, this may be a good start http://www.google.com/support/forum/p/Google+Mobile/label?lid=551c5c4cca827a18&hl=en



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