Thursday, April 30, 2015

unbricking - Yu Yuphoria bricked after installing custom recovery and boot file


My YU YUPHORIA got bricked while I was working with it. I want to install custom ROM into it for that I am installing custom recovery and boot file but the file that is found on Internet was not working and that's why I am stuck with company logo. I can't go into recovery mod, neither it boot, and USB debugging mode is turned off. I tried to install fresh ROM from fastboot but after installing every driver properly command prompt is showing "waiting for the device". Please sugest some way to get rid of this problem.



Answer



Flashing stock firmware may solve the softbrick. Download firmware fron this link. - The link is for model Y5010a, since you didn't mention which model. Update with model name if it's differ.


There is 3 files, in zip format. Choose any of them, unzip it and you'll find drivers, the flash files and the flashing instructions. Install drivers and your phone should be detected.


7.0 nougat - Stop auto-selecting cellular network


I'm roaming in Mexico with an international plan via a US-based GSM carrier. This gets me 4G on TelCel in Mexico, and it works great.



However, occasionally, for reasons unknown to me, sometimes my phone will switch off of TelCel, and switch to a cell network named "334 01", which does not provide cellular data. This happens while browsing the Internet on my phone, while tethered to my laptop, or while I'm asleep. From a quick search I gather that "334 01" is AT&T's IMSI code, but my US carrier is not AT&T, though this phone was never carrier-locked.


Is there an Android setting that I can modify to either:



  • Stop my phone from changing cell networks automatically

  • Prohibit my phone from connection to a specific cell network (in this case "334 01")


Tethering is explicitly included in my plan, so I don't think it's TelCel "kicking me off". When I notice that my data connection is gone I can switch back to TelCel by selecting it via the "Cellular Operators" menu in settings. My phone is a Motorola Moto X Pure running Android 7.0.


EDIT: Whoops, the offending network is "334 03" which is Movistar.



Answer





Solution


Dial *#*#*4636#*#* and in Phone Info section → preferred network type choose the network type you would like to be always connected to.


enter image description here


As OP noted in their comment, the network selection made in settings was not sticking and the selection made in above menu did stick and prevent roaming (they chose LTE as preferred network)


lock screens - How to enable a PIN but allow quick access to camera?


In Android 4.1, when you set the lock screen security to "slide", you can quickly access the camera by sliding left.


Is there a way to get a similar sliding mechanism, but at the same time require a PIN to access the rest of the phone?



Answer



From my experience you will need to use a custom lock screen such as widget locker to do what you want. This can not be done with the stock Android lock screen.


Wednesday, April 29, 2015

How to change a default application in Ice Cream Sandwich?



I used the ADWLauncher EX by default while having Gingerbread 2.3.6.


Today I have manually updated my Nexus S to Ice Cream Sandwich 4.0.3, and I wanted to give the new default launcher a shot, but I cannot find anymore where to select / forget the default application for an action.


I've turned the settings of my phone inside out, googled and crawled the forums, but without success.
If anybody can tell me how to change a default application in ICS, I'd be grateful!




Android: Complete action using...


Yeah, I never thought I'd want to see that Complete action using... window again! :D



Answer



Go to Settings, Applications. Find the app that has the default set. Scroll down to the bottom of that view and click the "Clear Defaults" button.


enter image description here



factory reset - Dban on android


I am unable to use my phone it will not hold charge and dies quickly. I will be receiving a new phone tomorrow however I want to wipe my phone for my personal benefit. I have two questions; first will it wipe the system or just my personal files, and two I will be using another users battery will damage be done to the battery? Also if you know of any other file wiping tools for non rooted droid user....Any advice is appreciated, thank you




4.2 jelly bean - How do I enable Airplane mode using Tasker on Android 4.2.2?



How do I enable airplane mode automatically at 01:00 AM using Tasker on Android 4.2.2?


The Airplane mode setting inside Tasker under Action -> Net -> Airplane mode cannot be activated:



Airplane mode is not available in Android 4.2+, try the Secure Settings plugin and a rooted device.



My device is rooted. How do I properly use the Secure Settings plugin to enable Airplane mode automatically at the said time?



Answer



Notes:





  • The answer is tested on a rooted Android 4.2.1 running Tasker v4.6u3m and Secure Settings v1.3.6.




  • Secure Settings may needs to be installed as a System app (it has the provision under SYSTEM+ in its GUI).






Since you're already aware of making profiles, tasks, and actions, I would come to point:



  1. Make a profile having time as the context, and create a new task in it.


  2. Under that Task, the action would be Plugin → Secure Settings → Configuration (pencil icon) → System+ Actions → Airplane Mode → On → Save (floppy icon), and save your action under the task.


Now whenever the time would come Tasker would execute Airplane mode, and everyone would be happy!


You can automatically disable the Airplane Mode as well, by choosing Off or Toggle over On in the aforesaid step.




For Readers: If you don't happen to have Secure Settings or it's not working somehow, then you can use the following action as an alternative. (Credits to Andrew T. and DavisNT for their answer)


Action: Code → Run Shell, and enter these details:



  • Command: settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true

  • Check Use Root



That would execute the Airplane mode based on your profile.


To automatically disable the said mode, create an another action in a different profile and copy the aforesaid action with exception of 0 over 1 and false over true.


You're good to go now!


4.0 ice cream sandwich - Tablet won't connect to any WiFi network anymore, always shows "saved"


My tablet will not connect to ANY WiFi network anymore. Everything was working perfectly for about a month. But now, the WiFi icon has disappeared, and every time I try to connect to a network it simply shows "Saved." I figured maybe it was an issue with my network, so I went out and tested it with other WiFi connections. It can scan and detect everything, but the same thing happens while trying to connect to anything. My Nokia phone and laptop are able to connect to everything perfectly, but the tablet will not, even to the networks which it has previously connected to.


Things I have tried:



  • Deleted all networks by using the "Forget network" option and tried connecting again.

  • Tried "open" type networks without any passwords.

  • Rebooted the tablet several times.

  • Done a factory reset, twice.

  • Tried to analyse logcat data.



Here is a screenshot: enter image description here


I also tried connecting to my laptop using Ad-hoc (with the laptop using a wired ethernet connection and transmitting it to the tablet wirelessly) but no use.


As you can see in the screenshot, the WiFi icon which turns blue and gray is GONE from the notification bar. It never shows up anymore. And the "Saved" result is what comes up every time I try to connect to a network.


I switched the WiFi on and tried connecting to the network while logcat was running, here is the text: http://pastebin.com/9pUba6Tt


The D/CommandListener( 79): Clearing all IP addresses on wlan0 is what happens every time I attempt to connect to any network. Always the same thing.


I have gone through dozens of XDA threads and such with this issue. Many people have gotten the "Saved" problem, but it's only been for people who have UPDATED to ICS 4.0.4 from Gingerbread or something. My tablet CAME with ICS 4.0.4.


P.S: My tablet is a cheap one, it's a Ubislate 7C+ from Datawind.


ANY help would be really, really, appreciated. I've been trying to fix this for about a week now. Thanks.




Tuesday, April 28, 2015

5.0 lollipop - How to root Samsung Galaxy A5?


I have Samsung Galaxy A5, SM-A500H running Android 5.0.2, downloaded from here. I want to root it.


The only root available right now AFAIK, is CF-Auto-Root, as described here for example. But this root breaks everything. All the apps stop running when you reboot the phone and you have reinstalled the firmware, it doesn't work.


Is there another way to root my device?



Answer



I've recently used Kingroot, installed without computer assistance (downloaded the .apk with the device browser via wifi and installed from the device's internal storage), to root a device so obscure I haven't seen a single reference to any fixes, custom ROM, or even version upgrades: the Visual Land Prestige Elite 10Q tablet. Kingroot took about ten minutes to run, including rebooting the device, and the only thing I don't like is that I have to hold the tablet in portrait orientation whenever I use any Kingroot function, because it doesn't recognize screen rotation.



Obviously, I haven't tried this software with a Galaxy A5, but it should be fine.


Monday, April 27, 2015

Is there a way to share my mobile screen with another Android phone like Netmeeting or Live Meeting?


The requirement is similar to Netmeeting software where the screen of a desktop is shared and can be accessed for another system. Is is possible in a mobile device?


There should be no PC to Mobile connection.


Applicability: This can be used for verification of railway or air tickets where I can show my ticket shared with examiner's device instead of handing him the device.




languages - How can I show two alphabets in my contact list?


I have a Galaxy S with an interface in Hebrew. Some of my contacts are in English and some are in Hebrew. However, I only have the option to scroll through the letters in Hebrew. The English alphabet is simply not there.


Is there any way to show the English alphabet as well so that I can scroll through the English letters too?



Answer



I don't believe this is possible with the default Contacts app (and I don't know of any third-party ones). Android's language/locale support is very basic -- for example, your date format cannot be changed independently unlike, say, Windows -- so I recommend filing a bug with Google, hopefully it will be fixed in the future.


sd card - Partition gets unmounted automatically in Android Oreo


I have Android phone running Oreo 8.1.0. I have two partitions in sdcard. One partition is ext4 formatted. I mount it using:



mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2

But after some time, the partition gets unmounted automatically and I have to mount it again.


Even when it is mounted, the contents are not visible in file explorer apps like MiXplorer and ES Explorer, and are only visible in terminal.


So, what is the best way to mount ext4 partition in Android persistently and what is the reason of such behavior?



Answer



SHORT ANSWER


Go to Magisk Settings and set Mount Namespace Mode to Global once for all. In SuperSU app, disable Mount Namespace Separation.
OR
For one time solution, use this command instead:



~$ su -mm -c 'mount  '

LONG ANSWER



but after some time, the partition gets unmounted automatically and I have to mount it again.



ANDROID NAMESPACES
This behavior is due to Mount Namespace implemented by Android since Android-6 for the purpose of apps sandboxing / isolation. In order to control app's access to system resources and filesystems - particularly SDCards - every app (Dalvik or ART VM which processes Java bytcode to executable .dex binary) is started by zygote (an Android init process) in a new mount namespace where it can independently unmount any filesystem (except rootfs) or remount, not affecting other namespaces. Every process the app starts, lives in the same (or further) isolated namespace.
Usually mnt (mount) and net (network) namespaces are enabled on Android kernel by default. Other namespaces pid, user and uts can be enabled by rebuilding kernel.


GLOBAL NAMESPACE

Very first process started by kernel at boot: init along with all kernel processes (kworkers etc.) and other init daemon processes (such as ueventd, logd, servicemanager, vndbinder, mediaserver, netd etc.) live in Global / Root Namespace. When we install mods (such as Magisk, Xposed etc.), they also start as a process in root namespace, usually at initial stage of boot process.
Android filesystems (real or pseudo; /system, /data, /proc etc.) are also initially mounted in global namespace. An app's namespace has all mounts (including rootfs) set to slave, so that any new mount inside them in root namespace, propagates to the app's namespace but not vice versa. See mount propagation.


NAMESPACE TOOLS
Linux command lsns can be used to view all namespaces. Mount namespace can be created by unshare -m. To enter a namespace, nsenter is an easily available SETNS wrapper. In most cases these commands don't work without root privileges.


SUPER USER AND MOUNT NS
When we execute su command in a Terminal emulator app, a new process (shell) is started with elevated capabilities. This process lives in the same mount namespace as that of Terminal app. So the mount command is also executed in the same namespace and thus filesystem is only visible within that namespace. Once we exit that shell, mountpoint won't show filesystem contents. If there is no running process in a namespace, it's automatically cleaned.
Please note that an app is completely killed when its Dalvik process is killed by Force Stop or by Android's memory management.
If the Terminal app wasn't completely killed, su may enter the same namespace, only when Inherited Namespace option is enabled in Magisk. Isolated Namespace will always create a new mount namespace.


Now coming to your question:




Even when it is mounted, the contents are not visible in file explorer apps like MiXplorer and ES Explorer, and are only visible in terminal.



This is because Explorers (apps) are running in their own mount namespaces. Run this command as root to get an overview:


~# ps f -p2 --ppid 2 --deselect -o mntns,pid,cmd --sort=mntns

You may use Termux for a full version of ps.



When I set this command to execute on boot by placing inside init.d directory in /etc, then it works normally and ext4 partition does not unmount itself automatically.



This is because that init.d script is executed by init in global namespace.




So, what is the best way to mount ext4 partition in Android persistently and what is the reason of such behavior?



To escape the whole enigma, always mount your frequently accessed filesystems in Global Mount Namespace (though it's vulnerable to security breaches) unless necessary otherwise. A simple check if we are in global namespace:


~# [ "$(readlink /proc/self/ns/mnt)" = "$(readlink /proc/1/ns/mnt)" ] && echo 'In Global NS.' || echo 'Not in Global NS.'

NOTE: This test works only in initial PID NS.


Another possibility is to create namespace with unshare -m --propagation shared. Now any new mounts in this namespace will propagate to all namespaces. But this isn't applicable to already created apps' namespaces. mount --make-rshared / doesn't work (at least for me) if namespace was originally created with slave or private propagation.


See this thread post for more details.


How do I backup data (SMS/contacts) from a device with a broken screen?


I just broke the screen of my (unrooted) Galaxy S.


How do I get back my SMS and contacts?


PS: I tried Kies but it won't detect my phone for some reason. (Kies works fine with another Galaxy I possess but not this one)




Where I can find factory home screen layout file?


Where I can find factory home screen layout file?


I would like modify default layout which will persist after I will make a hard reset.


Best



Edit


device: Lenovo A6000, kitkat 4.4.4


rom: orignal stok rom from Lenovo


home screen launcher: LenovoLauncher com.lenovo.xlauncher




Sunday, April 26, 2015

4.4 kitkat - An unknown app called 10102 shows up in Data Usage graph


A mysterious app named "10102" shows up in my data usage. It bears only the standard Android app icon (the Bugdroid logo with a cube on its torso). From what the graph tell me, it has used 36 megabytes of data in the background and zero on the foreground. I think I haven't uninstalled anything for months. Is it a malware? I haven't sideloaded anything and only authorized my laptop as USB debugger. If it's a malware, how do I remove it? I have no idea how to find its package name and 10102 isn't in the list of downloaded apps in settings.


I'm running stock & never-been-rooted Android 4.4.4 on Nexus 4.



Answer



It's probably an uninstalled app. It happened on my phone a few times.


root access - How does su regulate app permissions?


I seen a lot of apps in the market that give superuser functionality to applications. However there is a pre-requisite of rooting your phone. I am curious how a rooted phone has those permissions already?


I've downloaded the source code and have managed to locate the su.c file that might invoke an application to change. But im still not sure. Can anyone give an insight on this?



Which actual files delegate permissions? Are all system apps given root permissions at startup?




languages - Gboard ruined my typing experience, how can I change it back?



My phone just got the new Gboard, and to be honest, I haven't noticed much of an improvement. Maybe I don't use its many celebrated features as much as I should.


However, I have one big problem with it the way it is. I use my phone to mainly type two languages: Norwegian and English. Before the update, I would switch between them by the touch of a button (the globe icon next to the space bar), and for those rare occations I needed something else, I could momentarily enable them in the settings. I used the English layout for writing English, and the Norwegian language to write Norwegian. This way, the moment I begin to write, the swipe function knows which dictionary to test for what I'm trying to type, and everything works nicely.


However, with the new Gboard, it can do both languages at once. Apparently, the internet is happy that you don't have to manually switch, but I am more annoyed at the fact that when I begin swiping, the keyboard doesn't know which dictionary to use, so I can swipe all I want without any words coming out. I have to manually type a few words first before it gets the idea, and from there it works nicely. It also makes it much more difficult to mix both languages into a single small text.



How can I get back to manually switching between languages? Is there a setting I've missed, or do I have to roll back to an earlier version?


I'm on an LG Nexus 4, running Android 5.1.1, and Gboard version 6.0.69




Saturday, April 25, 2015

external sd - Factory reset in phones that don't support SD-cards


Does factory reset on a phone without SD-card support delete the files stored in the ExternalStorageDirectory?


Explanation : Say I have a device like the Galaxy S or an iPhone(I know, sacrilege) both devices don't support SD-cards(Not sure about Galaxy S, definitely about the iPhone). My question is if such a device which doesn't support SD-cards is factory reset, then do your files and media stored in this device's "External Storage Directory" which actually happens to be on the phone get deleted?


My guess is no, am I right?



Answer



You are correct.


The external storage directory is classed as an 'External SDCard'. Anything with SDCard in the title is not wiped during a factory reset.


When you go to factory reset, you will be given the option to wipe your SDCard as well as the internal storage data directory.



Friday, April 24, 2015

USB drivers for using ADB with Samsung Galaxy S on CyanogenMod 7.1?


I recently installed CyanogenMod 7.1 on my Samsung Galaxy S i9000 and I have some problems now to get ADB on my Windows 7 64-bit computer to recognize the device.


Currently, adb devices returns no entry for my phone and the Device Manager shows a device called "Galaxy S" but with a yellow exclamation mark because a driver is missing.


I've tried to install Samsung Kies as well as the Google USB driver for Windows Revision 4 and point the device manager at the directories with those drivers. It doesn't find anything it can use there.


Which drivers do I actually need for the phone now that it is running CyanogenMod 7.1? And where do I get those and how can I install them?




Answer



Use the drivers that come with the android SDK. The samsung drivers do not work once CyanogenMod is installed.


sandboxing - Security model when asking access to photo, media and files



When an app asks for permission to access photo, media an files, does the andriod security model sandbox the access to only files for that particular app?


Or can the app then access files created by other apps?


So many apps ask for permission to the file system, does that mean e.g. App#1 can grab files created by App#2?


I want to install WeChat but want to understand what security risk is involved potentially.




What does this notification icon that looks like an arrow with a plus sign mean?


I'm running stock Android 4.4 on my Nexus 4, and I keep seeing this weird icon that looks like a gray tag or arrow with a plus sign in it.


A gray, left-facing facing pentagonal arrow or tag.



I don't know any app that does this, and there's never a matching notification when I pull the notification bar down. What does this mean?



Answer



This icon simply means that there are more notifications to show, but there isn't enough space left in the top status bar to show all notification icons (that's why it doesn't have a matching notification).


clockworkmod recovery - Do I need to wipe anything before restoring a full nandroid backup?



I'm used to wiping everything when installing a new ROM, but I would like to know if a nandroid restore automatically wipes out the partitions it is recovering.


When I run a restore, I see some messages saying it is "formatting cache" and "erasing boot before restore", but the rest of my partitions (system, data, .android_secure, etc) don't have any accompanying messages about them being cleared first.


Does a nandroid restore overwrite partitions, or does it merge the files with the current structure?


And in the interest of making this applicable to a wider audience, is the process different for different phones (some have extra partitions) or different versions of clockworkmod? Or is the process the same for everyone?




Storage on HTC desire X


The internal storage on my phone is almost full. The storage screen tells me



  • 2.77GB / 2.91 GB taken

  • Apps 0.89GB

  • Other 1.89 GB

  • Available 138MB



What is this "other" and how can I clean it up? I already followed the steps of "make more space", it barely makes a difference.


Phone Storage then tells me 43.00MB / 1.09GB is taken.


And on the SD card I have 1.86GB / 14.72GB taken.


I have plenty of storage in various places yet when I try to install apps I'm unable to do so cause of "insufficient storage". How can I fix this?




applications - Get common name of an app given its package name


I'm interested in a way to go from the package name (e.g. com.android.providers.telephony) to its common name (Phone).


I'd like to know if there's ADB/shell command (from the phone), or any system/preinstalled app.


I know that a bunch of apps reveal both once you could pin the app in it. – In Android 4.x (tried with 4.2.2) you can even use the system app manager to confirm the package name once you found and selected the app via the common name.




Thursday, April 23, 2015

5.0 lollipop - Session logout on device with multiple users?


There is an option to switch between users, but there isn't an option to logout from an active user session. The background apps and services for inactive users (once logged in and switched out) continue to run draining the battery.


The only way i think, is to reboot the device and not login the user.


So, is there any way that the owner can force subsequent inactive users to logout of their session? I have superuser access to the owner with android-5.0.2.



Answer




In a terminal app on Android, enter (requires root access) :


su
am stop-user USER_ID

E.g. For a Guest user, its USER_ID in my device is 11 so the command would be am stop-user 11.


am stop-user doesn't process multiple input so you've to execute the command for every secondary user which you want to pause.


This is bit different from restarting the device. If you check am's usage you would see,


am stop-user: stop execution of USER_ID, not allowing it to run any code until a later explicit start or switch to it.

As said, it simply pauses all the activities associated to that user account, so whenever an explicit start or switch is provided your session would resume rather than starting from scratch.



For confirmation that the user indeed has paused or is not running, see my answer for How to find out currently running user name/ID from ADB?


Briefly, pm list users or dumpsys activity would tell you whether the user is RUNNING or SHUTDOWN. The latter command is better. If the user-session is indeed put on halt by am stop-user, you would see mState=SHUTDOWN for that user. However, if the user hasn't been activated even once since the reboot, you wouldn't see any of its entry.


How to disable vibration from notifications?


I am now on Android version 6.0.1 on a Motorola Moto G (3rd gen)


I have the ebay app installed and prior to the update whenever I received Ebay notifications they would just silently appear on my home screen at the top (where all notifications go). However, since the update my phone now vibrates, which I don't want.


When I go to Settings->Sound & Notification->App Notifications->Ebay




  • "Block all" is not enabled

  • "Treat as priority" is not enabled

  • "Allow peeking" is not enabled


How/where do I disable vibrating for Ebay notifications?




Wednesday, April 22, 2015

google play store - Fakestore, blankstore, gms, microg, unifiednlp - what's best for Android without Gapps?


I've been running Android for maybe 2 years without Gapps or a Google account, and like the experience, but I'd also like to do it better because some apps I used to use, now don't run without some Google services. I researched NoGapps but don't quite understand the information well enough, and the different packages available, to know what I need.


It looks like these are packages that simulate the Google play store and main services APIs but return either null data, minimal responses, or data from other open source providers? But I can't find a clear explanation what options there are, and the main differences between them, to help me choose what to install.


My current phone is lineage 14.1 + SuperSU 2.79 on a Samsung S7 G930F, and I don't use the Play Store (I use FDroid and sideloading).


Update


Just to clarify (following @Izzy's excellent "basics" reply so far), the main issue thinking about it isn't so much "which of these packages can I use to replace a Google library".


The real issue is, to what extent do these No Gapps alternatives meet the presumed goal of allowing software to still work (by faking a playstore/location provider/other service that they expect GApps to have provided), but also in reality sanitising or avoiding actually using Google for these, or reducing and making clear what data is sent to Google if it's used.


So for example, Fakestore sends nothing to Google, period, its job is to fake that Google Play Store is installed and its Android API working, but unfortunately unreachable/empty. But for the rest, it's really hard to know what's still sent and what's sanitised or not sent. If all there is, is a FOSS reimplementation of a Google Library, same data, same auth, mostly same logging/datamining, that's a bit weak and unfortunate, even if unavoidable. If Nlp can fully avoid Google and use more trustworthy sources, that's better. But this is the kind of information and discussion I can't find details about.



I'm realistic here - a person who wants an app that needs Google Push Notifications, has to either fake that functionality as installed but not responsive, or use code that cleans the data and does data leak avoidance as best possible, or must accept they can't use that app. But the information needed for that decision is clarity as to what these NoGapps softwares can do, to minimise or avoid data leaks, and how far they can go to distangling from Google.


That's pretty central to "why I want to use them". I'd like to be clearer what their compromises are and what's possible or not, in terms of data and info passed to Google, and I'm not, which is all that stops me enjoying them ATM.



Answer



Some basics first:



  • NoGAPPS is deprecated and got replaced by its successor, µG (read: microG).

  • µG includes the core (basically, GServices) and also UnifiedNlp.

  • No GService replacements will support the Google License API. That's much too hot an area. While we all love dentists, we better not see them working on us (replace "dentists" by "lawyers" in this context).

  • there are ways to access PlayStore, though, and you've mentioned some candidates:


    • BlankStore: Deprecated, no longer maintained except for bugfixes, but its successor not yet ready. Supports only free apps.

    • FakeStore: As the name suggests, only a "fake" – i.e. it fakes the presence of Playstore to apps not working otherwise.

    • Yalp: Like BlankStore but still maintained, plus supporting apps you've already bought (but not the process of buying and not the license check some paid apps perform).

    • More candidates in my corresponding app list.




I'm running that combination (CyanogenMod + µG with UnifiedNlp + BlankStore/Yalp) for about 2 years now. The only thing I found not working was paid apps that wished to verify their license against GPlay – apart from that, everything runs smoothly. For details, you might wish to see my article series on Android without Google. Note that, however, there seem to be some issues concerning LOS 14.x and UnifiedNlp currently; for details, please check with the issue tracker on µG's Github presence.


You can find the implementation status in the project's wiki, as well as a short introduction. In terms of privacy, you can derive from those two:




Acting as a replacement for the closed-source Google Apps (GAPPS), it is a powerful tool to reclaim your privacy while enjoying Android core features.



(from the introduction; emphasis mine). In the implementation status, take a closer look at two columns: Functionality and Crashing. If both are "No", we have a dummy: Apps think it's there, but absolutely nothing is happening in there (especially no data transmission); this is and always will be the case for Analytics and Ads, for example. No functionality and crashing means there's nothing implemented (not even a dummy) – so apps accessing that might crash, but again nothing is transmitted (currently e.g. Auto and Cast).


If data is transmitted, to my knowledge this is limited to the absolute minimum for the functionality to be achieved. This e.g. includes Google Cloud Messaging (token, id and obviously the message must be exchanged, where the latter is usually incoming only), Account Authentication (guess what: account name and token/password must be sent for that, or there can't be an authentication), Maps API (must obviously send the desired position for the tiles to be retrieved – but this doesn't go to Google, as it uses OpenStreetMap/OpenScienceMap instead). Fused Locations doesn't run via Google either, as it uses the UnifiedNlp backends instead.


How to prevent specific apps from using mobile data?


So there are some mobile apps that love to use lots of mobile data, and sometimes use it when the wifi signal isn't good (e.g. Spotify). Which then leads to a nasty surprising spike in data usage during those times.


My phone is rooted, btw.




rom - What does the command `adb sideload FILE` do?


I am reading a tutorial on the sideload command at link.



It contains the steps of rebooting into recovery mode and using adb sideload [file].zip.


My question is that what does sideload actually do with that zip file ? In the past I have compiled AOSP and flashed a device using



  • adb reboot-bootloader

  • adb fastboot flashall -w


Is sideload trying to achieve something similar to the above ?


Edit:


I think my confusion relating to sideload stems from my lack of understanding of how Android's memory is structured. I found two links.


First is a link that explains Android partitions : partitions



Second is a SO answer, that explains Android's memory: memory


Now my understanding so far is this :


Android has RAM and ROM. ROM is divided into several partitions, namely, /system, /data, /boot, /recovery, /cache, /misc and /sdcard.


Now the link relating to sideload states that this command installs a zip file.


What I don't understand still is that, is this zip file, going to replace the entire ROM in Android ? Namely, will it have to have the right partitions as in the list above ?


This also makes me confused about a similar command 'fastboot flashall'. I know when I run it, the terminal goes by saying its writing to several of the partitions. So my questions boil down to these :


1) Is sideload replacing entire ROM ?


2) Is the related command 'fastboot flashall' also replacing entire ROM ?


3) Are there ways to replace select partitions ?


Thanks.




Answer





  1. Adb sideload command just loads a zip file from the computer to the phone. The creator of the zip controls what it does (the recovery just uploads it from the computer and looks at a specific file).


    You can do a lot with it, but it's not a full rom, it's cannot replace a rom. Here is an example of an update.zip I once wrote and sideloaded it to a phone:


    mount("yaffs2", "MTD", "userdata", "/data"); delete("/data/system/gesture.key"); delete("/data/system/password.key"); ui_print("Done!");




It deletes a couple of files, and prints a successful result.


2.The command fastboot flash all can replace an entire rom, because it does a bunch of operations like format a partition and install a new rom. But you can flash other files that don't do those things (but often this command do exactly that.)



3.You can do a lot of things in the adb command line, like delete a partition a flash or just copy something else to it. What exactly do you want to do? On which partition?


Hope this is helpful, and check out the android developers page on adb ( http://developer.android.com/tools/help/adb.html ).


Tuesday, April 21, 2015

Cannot get into recovery mode from boot-loop on BLU phone


I have BLU Life One X which is at 0% battery and in boot loop:




  • It shows 0%, then

  • "BLU/Bold Like Us", then

  • "Android is starting/optimizing app AAA of BBB", then cycles.


I tried to follow the instructions:



  1. Pressed Power + Volume Up + Volume Down.

  2. Got two teeny lines: Recovery Mode: Volume Up and Factory Mode: Volume Down.

  3. No matter what I press, the screen goes dark and nothing happens.



What can I do now?



Answer



Bingo! Your phone has a Mediatek chipset (MediaTek MT6589 precisely), nothing is as easy as flashing an MTK device.


You just need a flasher and flashing files (ROM) and eventually have drivers installed.


[The process below is for Windows OS only]


Prerequisites:




  • Blu Life One firmware (ROM): Here (Requires to be registered to the site, takes less a minute) or here (Serous mobile phone forums).





  • SP Flashtool : Here (Grab the latest version, always stable)




  • MTK VCOM drivers: Here




Install the drivers. Otherwise your phone won't be detected by the computer.


Unzip the firmware (should be a .zip or .rar file).


Open SP Flashtool. Click on Scatter-Loading then browse to the folder that contains the firmware. You'll have a text file xxxxx-android-scatter, or similar. Select it.



SP Flashtool should load some files on the main interface. Uncheck the firmware field labelled: PRELOADER (very important), leave the other checked. It is sometimes recommended to only keep the field SYSTEM or ANDROID checked.


Now, click on the green arrow (Download) then connect your phone to the computer. Should be shut down with battery inside.


Windows should start installing drivers the the flashing process should start.


Wait until the end, a big green check-mark should pops.


Et voilà.


Please report any errors I'll try to help you.


usb - Adb says "Error: Device offline" everytime


Please see this question for background information.


Problem:


Whenever I run adb devices it says Error: device offline - This appears even when no device is connected at all. It won't even let me start the adb server. Therefore solutions like "run adb kill-server first" won't have any affect.


Things to note:




  • This is adb on another android device. I can not "re-install the android SDK platform" or something like that. It took me a long while to find the ARM binary for adb that works.

  • From googling around, I suspect it might be that the adb binary is outdated, however it seemed to work recently for other people on XDA-devs. If anyone can provide me with a newer version of adb as a binary that will run on an ARM platform (android), I'd be happy to try it out.

  • Yes, I do run adb as superuser (root). Other commands (like adb --help work).


The tablet runs android 4. The phone runs android 7 but that shouldn't matter since even without anything connected I can't even start the adb server on the tablet.




Edit: Using the adb binary from here solved the error, but presents me with this now:


# adb devices
List of devices attached

* daemon not running. starting it now at tcp:5038 *
* daemon started successfully *
** daemon still not running
error: cannot connect to daemon at tcp:5038: Success


installation - (how) can I install android on an iphone 4?




Possible Duplicate:
Can I install Android on my non-Android device?



I know it is possible to install Android on an iPhone 3G.


How about the iPhone 4? Is it possible to run Android on it? If yes, how, and what are the risks?
If no, is that a "not yet" or a "can't happen, because of X"?





4.0 ice cream sandwich - Is there a way to check who is connected to my Galaxy Nexus hotspot


I would like to be able to check who is using my phones hotspot, it was simple on my Droid 2 since the Motorola app much like the one shown in the answer to How do I check who is connecting to my hotspot? however I don't see a version of this screen with the galaxy nexus.


Update: Looking for a non-root solution




Answer



Install Wireless Tether app (free) if you are rooted. It features Access Control. Means, you can use it to allow/deny ad-hoc clients for mobile data. Ofcourse, for this.. it'll need to display connected clients.


And, it works with Galaxy Nexus LTE!


Update:
You can use Fing - Network Tools, too. Its clean way for your task.


Monday, April 20, 2015

Is there some SSH server for android?



Is there an ssh server for Android (such as openssh for Ubuntu) that will allow me to access my device console via PuTTY?



Answer



Yes, there are a couple of options for this, including:




Some of these apps will require you to root your device. SSHDroid, QuickSSHD and SSHelper, at least, do not (there may be others as well). There are certainly multiple choices for you to investigate depending on your requirements/desired features/etc.


Sunday, April 19, 2015

Does rooting erase anything?


If I root my android phone (just so I can get access to Wifi Tethering, etc.) will that erase anything on the phone (apps, data, etc.)?


Will it change anything other than the ability to run app(s) as rooted?



Answer





will that erase anything on the phone



Rooting itself should not erase anything (except for, maybe, temporary files created during the process). However, on some devices rooting requires to first unlock the bootloader -- and that usually includes a (which means: all data and user-installed apps are gone -- which you can work around on Android 4.0+ performing an adb backup –apk –shared –all –f /path/to/backup.ab before performing the unlock, and adb restore /path/to/backup.ab afterwards, as Compro01 pointed out in below comment).



Will it change anything other than the ability to run app(s) as rooted?



Yes.¹ As the necessary binaries (usually su, SuperUser.apk/SuperSU.apk, and busybox with all its symlinks) are pushed to the /system partition (which otherwise is mounted read-only), it will change that partition. Might sound trivial now, but the thing is: some s (and other updates shipping directly from the manufacturer/provider) first compare the partitions checksum. If that doesn't match (and it won't after rooting), updates might be refused/failing.


On the other hand: if those updates wouldn't fail, you might lose when they are applied. If they include a full /system image, that is.





¹ Update: With Magisk the changes described here are not applied to the system partition.


How to get the installation date and time of application?


I want to find the installation date and time of the applications in my mobile. Where is it stored? In Ubuntu it can be found from the /var/log/dpkg.log. What about Android? I am using Android 4.1.2.




Saturday, April 18, 2015

encryption - Cannot Factory Reset after Encrypting



I encrypted my phone but now want it not encrypted so have to factory reset. However, if I try to do this from the CWM Recovery it says


-- Wiping data... 
Formatting /data...
Error mounting /data!
Skipping format...
Formatting /cache...
Formatting /sd-ext...
Formatting /sdcard/.android_secure...
Error mounting /sdcard/.android_secure!
Skipping format...

Data wipe complete.

When I try to factory reset from the normal GUI it doesn't give me an error but finishes very very quickly and hasn't worked (presumably the output above has happened in the logs).


What can I do?



Answer



I have also encrypted the /data partition (on my Samsung I9300) and wanted to reset it for an upgrade. This failed with the error you mentioned, /tmp/recovery.log contains:


ClockworkMod Recovery v6.0.3.2
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0

1 /efs ext4 /dev/block/mmcblk0p3 (null) 0
2 /boot emmc /dev/block/mmcblk0p5 (null) 0
3 /recovery emmc /dev/block/mmcblk0p6 (null) 0
4 /cache ext4 /dev/block/mmcblk0p8 (null) 0
5 /system ext4 /dev/block/mmcblk0p9 (null) 0
6 /data ext4 /dev/block/mmcblk0p12 (null) -16384
7 /preload ext4 /dev/block/mmcblk0p10 (null) 0
8 /modem emmc /dev/block/mmcblk0p7 (null) 0
9 /sdcard datamedia /dev/null (null) 0
10 /external_sd ext4 /dev/block/mmcblk1p1 (null) 0


-- Wiping data...
Formatting /data...
I:Formatting unknown device.
W:failed to mount /dev/block/mmcblk0p12 (Invalid argument)
Error mounting /data!
Skipping format...

DISCLAIMER: I am not responsibility for anything that goes wrong, including (but not limited to) user error.


If you wish to wipe the /data partition completely (including media like photos), follow the below instructions:




  1. Boot into recovery.

  2. Run adb shell in a terminal (Linux) or Command Prompt ("CMD", Windows). After a few seconds, you should see a line containing ~ #.


  3. WARNING. Triple-check the command that you are entering here. White space and capitalization are important. Make any mistake here and you may accidentally wipe your whole flash memory including recovery images.
    NOTE: if you want to encrypt your partition later, you have to leave 16KiB unallocated space on the end of the partition.
    In the adb shell, run the command mke2fs -t ext4 /dev/block/mmcblk0p12. Substitute /dev/block/mmcblk0p12 and ext4 according to the recovery filesystem table (for /data). Output when running the command:


    ~ # mke2fs -t ext4 /dev/block/mmcblk0p12 
    mke2fs 1.41.14 (22-Dec-2010)
    Filesystem label=

    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    755904 inodes, 3022848 blocks
    151142 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=3095396352
    93 block groups
    32768 blocks per group, 32768 fragments per group

    8128 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

    Writing inode tables: done
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 34 mounts or
    180 days, whichever comes first. Use tune2fs -c or -i to override.



  4. (Optional) Install new firmware (E.g. CM 10.1).



  5. Reboot.

  6. (Optional) In order to encrypt the partition while clearing your whole data partition, run vdc cryptfs enablecrypto wipe PIN_OR_PASSWORD (before Android 5.0) or vdc cryptfs enablecrypto wipe password PASSWORD_IN_HEX (since Android 5.0, see this post for details).

  7. Reconfigure device, choose language, enter name, install apps, etc.




Technical details below.



The factory reset menu item activates erase_volume("/data") in recovery.c which calls format_volume("/data").


format_volume is defined in roots.c:


int format_volume(const char* volume) {
//
// check to see if /data is being formatted, and if it is /data/media
// Note: the /sdcard check is redundant probably, just being safe
if (strstr(volume, "/data") == volume && is_data_media() && !handle_data_media) {
return format_unknown_device(NULL, volume, NULL);
}


Since the volume name indeed starts with /data, and the recovery filesystem table contains an entry for type datamedia and handle_data_media is initially zero, format format_unknown_device is called. That function is defined in extendedcommands.c as follows:


int format_unknown_device(const char *device, const char* path, const char *fs_type)
{
LOGI("Formatting unknown device.\n");

if (fs_type != NULL && get_flash_type(fs_type) != UNSUPPORTED)
return erase_raw_partition(fs_type, device);

// if this is SDEXT:, don't worry about it if it does not exist.
if (0 == strcmp(path, "/sd-ext"))

{
//
}

if (NULL != fs_type) {
//
}

if (0 != ensure_path_mounted(path))
{

ui_print("Error mounting %s!\n", path);
ui_print("Skipping format...\n");
return 0;
}

fs_type is NULL and the path is /data. That means that the code path ends up at ensure_path_mounted(path) which is the place where this function fails. Looking at the name, ensure_path_mounted attempts to mount the partition by name which of course fails since the encrypted partition is not supported in CWM. Therefore, CWM refuses to "format" the partition (actually, all it does is erasing all files except for /data/media after mounting).


Therefore the goal is to format /data with ext4 (see recovery filesystem table) or mount the encrypted data partition somehow. I could not easily find the tools for mounting encrypted partitions, so I decided to go the easy way and just format the partition.


How to turn on the wi-fi hotspot using ADB?


Do you have any idea how can we configure and turn on the wi-fi hotspot using the command line (ADB console)?




Friday, April 17, 2015

sms - How do I turn off auto-complete when texting?


Does anyone know how to turn off the auto-complete feature when texting?


Sometimes I just want to text and not have my device try and tell me what I'm thinking. Other times this is OK, but I just want to turn off the autocomplete sometimes.


I looked in the phone settings (not very hard I guess...) and I didn't really see anything to allow this.


Anyone know how this is done?


EDIT:


I am using a Droid X.



Answer



The following works for me on an HTC Incredible. Hopefully your settings are similar.


Settings > Language & Keyboard > Touch Input > Text Input > Prediction. You should be able to un-check Prediction.



Thursday, April 16, 2015

charging - Exclude possibility of damage of Android device while chargin with another charger




Is it true, that if I have one Android tablet with mini-usb from Philips, one Android device with mini-usb from Sony, then if I connect Philips charger to Sony charger, then it is possibility for a device to blast or cause any damage?


I heard about a story, where woman connected charger of other manufacturer and during phone call device blasted. I don't know if it is a rumor, or this is truth? In the other hand, workmate says that solution is on a hardware level and devices detect voltage and solve this issue automatically.


Is it safe to charge with different manufacturer charger or not?



Answer



Workmate is correct: all USB chargers supply 5 V with current limited by the design of the charger. However, the device won't draw more current than it needs -- connect a 2 A capable device to a 500 mA charger, and it'll charge at 500 mA, but connect a 500 mA device to a 2 A charger, and it'll still only draw 500 mA.


Battery fires and explosions are caused by internal shorts and excessive current draw from the battery, not by charger mismatches (within USB voltage spec).


Can you limit data for a number of apps and leave others unlimited?


I've got a monthly plan that gives me 100mb of data for use with any app except for WhatsApp, Facebook (messenger) and Twitter, which are unlimited and will not consume my data. Is there a way to limit the cumulative data usage for all the other apps while leaving the other four without a limit? I've already restricted apps in the mobile data and installed no root firewall, but I'm looking for something more specific that will limit my data consumption when I've hit 100mb with everything else except the apps I mentioned before. I have an Xperia Z3 running Android 5.1.1 unrooted




Transfer Whatsapp chat history to new device


I've got a new phone (Samsung) and want to transfer my Whatsapp chat history from my old device to it. Is this possible, and how to do it? I have a Whatsapp backup file for that date.




Wednesday, April 15, 2015

7.0 nougat - Unable to change mobile data cycle date on huawei p9 lite with android 7.0


My old phone had an option to change the mobile data cycle date. As you can see in the image below the option is gone. Does anyone know where I can find it in this "new and improved" version of android??


and yes I have seen this question but it has changed since this update and it no longer works


enter image description here enter image description here


Screenshots (click images for larger variants)




How to backup Angry Birds saves/data?


I need to reinstall my Android ROM but before I would like to backup my Angry Birds savegame/data/scores.


Do you have any idea how can I do it?



Answer



Angry Birds' data would be stored inside the phones memory under the folder Data. Access to that folder is not permitted to you or any app for security reasons.


Without having root access there is no way to access that folder or backup your app. However once you've obtained root access you could either extract the data yourself or use an application like


Titanium Backup:



Titanium Backup QR code


4.0 ice cream sandwich - How can I regenerate .thumbnails folder in DCIM


I accidentally deleted the contents of .thumbnails folder in DCIM in sdcard. After deleting it I am unable to access MediaStore.Images.Thumbnails._ID however MediaStore.Images.Media.DATA is having all the images. How do I regenerate thumbnails in the .thumbnails folder to get the details of MediaStore.Images.Thumbnails._ID?


I initially had the idea that the gallery app in Android generates thumbnails in the .thumbnails folder so what I did was clear the cache of gallery app. Unmounted the sdcard and mounted it again in the hope that .thumbnail folder will have all the thumbnails when I relaunch the app



I am using HTC One V(Android version 4.0)




Tuesday, April 14, 2015

updates - What is Google's OTA phase deployment strategy?


I have always wonder what is Google's deployment strategy for OTA for latest software updates.
I do know that they do it in phases but, do they do it base on time zone? model's serial numbers? In other words how do they pick who gets it first or not. I have a 2013 Nexus 7 and it has been about 2 weeks since the release of Kit Kat 4.4 and I have not received it yet.



Answer



It appears to be random chance.


In this reddit thread, Google Employee Dan Merrill says of OS update rollouts and "mashing" the "check for updates button":



Rollouts are conducted in phases. Typically they start at 1% of devices for around 24 - 48 hours; we watch the return rates and resulting device checkins and error reports (if any), and make sure nothing looks wrong before sending it to more. Then typically it goes to 25%, 50%, 100% over the course of a week or two.


What the percentages mean is that when your device checks in, it has a 1% chance (for example) of being offered the OTA. If it doesn't (randomly) get an offer, it will never get an offer until the next batch.


IOW, once your device checks in and gets turned down, that's it until the next batch. Mashing on the "check for updates" button just causes your device to check in again, and get automatically turned down again. Think about how that makes your device feel! WON'T SOMEONE PLEASE THINK OF THE PHONES?!



That said, once the new batch does start, hitting that button does give you a new roll of the dice -- but once. Since devices usually only check in for system updates every 24 hours (I think? Certainly on a many-hours basis) this can get you your shot sooner than it would happen on its own.


So, mash away. :) Just be patient, and mashing on it more often than once or twice a day isn't going to gain you anything.


Edit: also, keep in mind that this isn't first-come/first-served. You're not racing other devices to get your slot in the current batch, or something.



He also warns against the "clear data on the Google Services framework" trick, as all that does is make the network think that it's dealing with a factory-reset device and makes you lose all the tokens used by apps that use it. It will not necessarily get you the update faster. (It might, but it might not.)


Source(s): Android and Me, Android Community


p.s. He also states in another message that if you're really impatient you should do an ADB sideload.


Is Samsung Galaxy S II rear camera Gorilla Glass too?


is Samsung Galaxy S II rear camera Gorilla Glass too?


It sticks out a little above the case, so I would like to know if it's durable enough not to need to buy special case which, obviously, makes the phone thicker.



Thanks!



Answer



Unfortunately it is not, my Galaxy S II already has a lot of little scratches on the camera "glass", and unlike in my old HTC Desire phone, GSII doesn't have extra "glass" in the back plate to protect the actual lens. So when it gets scratched I cannot just exchange the backplate :(.


I treat my phone very gently, so I'm very surprised to see the lens having some many little scratches :(. Clearly in GSII the lens is way too unprotected and near the surface when you place it on flat surface.


As a extra step, I bought case-mate "though" case to add a bit more space between the lens and flat surface. Although the lens is scratched all the pictures seem to be just fine. Phew...


rooting - Root Samsung Galaxy Core i8262 manually


I tried almost every readymade app like Framaroot, Root Genius, etc. to root my Samsung Galaxy Core i8262 , but I didn't succeed.


I want to root it manually but did not have Linux laptop. I have a Windows 8 laptop. How to root it with that?





Monday, April 13, 2015

Boot loop after flashing android 6.0 marshmallow on nexus 5 follow up


this question follows up on this one (but there are many other posts about this topic on the web.. see this reddit post and this xda developers post.


I just want to approach this problem in a more structured way as opposed to just saying how something worked by coincidence.


Problem definition


Like everyone else I simply followed the official instructions from google developers. To expand a bit (because this could be the cause of the problem).. following this part of the instruction from the above link:



To flash a device using one of the system images below (or one of your own), you need the fastboot tool. You can get the fastboot tool either:




  • From a compiled version of the the Android Open Source Project.

  • Or, from the platform-tools/ directory in the Android SDK. Be sure that you have the latest version of the Android SDK Platform-tools from the SDK Manager.



So I simply downloaded the entire android studio application (i know that's a bit of overkill but I just wanted to make sure I got the latest and greatest)


From the below android studio screenshot.. you can see that I have android SDK platform tools 23.0.1


question: I'm updating my phone from android 5.0.x (not sure what the exact version is).. could it be that this android version mismatches the android platform tools that i have?


enter image description here


I've ensured that my fastboot is added to my PATH environment:



$ which fastboot
/Users/abdullahbakhach/Library/Android/sdk/platform-tools/fastboot

I've downloaded the flash file (specifically the hammerhead for nexux 6.0.0 (MRA58K)).. then i started the device in fastboot mode by the key combination. and ran the flash-all script.


what happened was that the script ran with the following logs:


$ ./flash-all.sh 
sending 'bootloader' (3120 KB)...
OKAY [ 0.207s]
writing 'bootloader'...
OKAY [ 0.524s]

finished. total time: 0.731s
rebooting into bootloader...
OKAY [ 0.001s]
finished. total time: 0.001s
sending 'radio' (45425 KB)...
OKAY [ 1.536s]
writing 'radio'...
OKAY [ 3.145s]
finished. total time: 4.681s
rebooting into bootloader...

OKAY [ 0.001s]
finished. total time: 0.001s
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: HHZ12k
Baseband Version.....: M8974A-2.0.50.2.27
Serial Number........: 03a3d66d0a4e64bd
--------------------------------------------

checking product...
OKAY [ 0.100s]
checking version-bootloader...
OKAY [ 0.100s]
checking version-baseband...
OKAY [ 0.100s]
sending 'boot' (9156 KB)...
OKAY [ 0.500s]
writing 'boot'...
OKAY [ 0.798s]

sending 'recovery' (10016 KB)...
OKAY [ 0.562s]
writing 'recovery'...
OKAY [ 0.850s]
sending 'system' (1019261 KB)...
OKAY [ 32.164s]
writing 'system'...
OKAY [ 70.421s]
erasing 'userdata'...
OKAY [ 15.854s]

erasing 'cache'...
OKAY [ 0.630s]
rebooting...

finished. total time: 122.480s

question: should i be concerned about this part?


archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'


anyways after all is done.. the phone reboots and gets stuck in the boot screen (for ever)..


what i've tried


I've tried running these commands as suggested by this post


adb shell
e2fsck /dev/block/platform/msm_sdcc.1/by-name/persist

and


make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/persist


but nothing changed..


I've also tried performing a wipe using TWRP as suggested by this post: - I downloaded the twrp-2.8.7.1-hammerhead.dmg file from the twrp site


and then ran


fastboot flash recovery twrp-2.8.7.1-hammerhead.dmg

then performed a wipe two different ways: - performing a normal wipe pretty much made things worse.. the phone would show the google logo then reboot.. show the google logo and so on - simply deleting the cache also didn't make any difference at all..


i'm stuck.. any suggestions?



Answer



I too faced this issue and issuing the fastboot commands manually (instead of relying on flash-all) and it worked well.


These are the commands to use (just forget everything and make sure these commands are executed in this order with the appropriate .img file available):



fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot flash system system.img
fastboot reboot

recovery mode - If I reset my phone, will it also TRIM the fragmented eMMC?


I know that Android supports fstrim but it only works if the phone is idle for a long time while charging. I think my phone is too fragmented and is lacking performance so I want to reset it but I am not sure if TRIM will also run if I do so. Since TRIM is important to improve the SSD's speed, I'd really like to run TRIM on my phone.



Answer





Android supports fstrim but it only works if the phone is idle for a long time while charging



It's not so. On newer versions, Android runs fstrim with a daily schedule, provided that the conditions meet. Or it should run on a reboot if not run for 3+ days. See this answer for details and how you can run fstrim manually.


FRAGMENTATION ON FLASH MEMORY:



I think my phone is too fragmented and is lacking performance



No, fragmentation doesn't exist on flash memory, or at least doesn't affect the performance. It's actually the filesystem which gets fragmentation (that's why newly formatted filesystem has 0% fragmentation), transferring the same to underlying physical storage. However underlying medium handle it differently.


Let's first take a brief insight into filesystem vs. storage media relationship. Filesystem interacts with Logical Block Addresses (LBAs), which are just numbers representing a unit of memory. Filesystem to LBAs mapping is irrespective of whether underlying media is HDD or SSD.


On HDDs, LBAs to Cylinder-Head-Sectors (CHS; rotating magnetic disks) mapping (1:1 / sequenced / linear) (1) is created during low-level formatting of disk drive when manufacturing, which never changes except if some sector is marked bad by disk controller firmware (in g-list from disk's defects table) and remapped to some spare sector. OS may also mark sectors bad in filesystem to exclude them for future use, as CHKDSK does on Windows during full format and e2fsck/badblocks do on Linux. So Operating system is aware of the physical geometry of the disk, which is propotional to the geometry of LBAs.



On flash memory (including SSDs, eMMCs, SD Cards and USB sticks etc.), LBAs to Physical Block Addresses (PBAs; silicon cells) mapping is fully controlled by Flash Translation Layer (FTL); a part of memory controller firmware. OS knows nothing about it, it can see at maximum the LBAs, not what's happening below it, not even the ECC of failed memory cells (just like bad sectors on HDD), and that's why we don't realize the bad health of eMMC unless it fails. Since a page of memory can't be just overwritten unlike HDDs, it has to be Erased first before being Programmed (written). A side effect is that a number of pages are erased/re-written and the physical mapping changes even if a small file is edited. On HDDs, files aren't physically replaced unless shortened or elongated. OS is aware of these physical changes on HDD, but not on flash memory.


So on HDDs, OS is aware of the physical fragmentation which is same as filesystem (LBAs) fragmentation, and defragmentation (as done by Windows regularly) occurs at physical level. But on flash memory, you can't simply do defragmentation in actual, rather good flash memory controllers do fragmentation purposely as a wear-leveling strategy. OS has no control over the actual fragmentation at physical level (unless you have some advanced tools to communicate with flash controller). However OS is aware of the fragmentation within filesystem. But if you defragment the filesystem, it won't defragment the flash memory.


Also as @Robert mentioned in comment, there is no effect of physical fragmentation on the performance of flash memory at all because there are no mechanical components in flash memory i.e. no seek latency because of head moving over different tracks as in HDDs. Filesystem fragmentation - as some experts think - may have somewhat impact due to increased number of I/O requests OS has to make to read/write scattered data.




Summarizing the above lines:



  • On HDDs it's the OS/filesystem which controls where the data is actually saved on physical memory, so it can de-fragment it.

  • On flash storage media, OS/filesystem doesn't know where the data is actually saved on physical memory, so it can't de-fragment it.






Since TRIM is important to improve the SSD's speed, I'd really like to run TRIM on my phone



When an OS asks a filesystem to send TRIM to eMMC, it actually requests flash memory controller to do Garbage Collection - Erase the PBAs which map to LBAs which belong to deleted files. So the eMMC controller maps those LBAs to already/newly Erased blocks (PBAs). This won't do defragmentation. See above mentioned answer to know how often fstrim should be run.


DOES FACTORY RESET DOES TRIM?



 I want to reset it but I am not sure if TRIM will also run if I do so



Factory reset on Android devices format /data and /cache (2) partitions. So the question is whether formatting is accompanied by TRIM or not.


Well this can't be standardized. Formatting and TRIM are different things, so it depends on the formatting utility whether it sends TRIM command to eMMC or not. Formatting may involve partitioning but in most cases (particularly on Android) it's just the high-level formatting i.e. to create data structures (e.g. superblocks, file tables, directories, inode/block bitmaps, journals etc.) used by the OS to identify the partition's contents.



If we go through the lines in source code of stock recovery which handles formatting of partitions during factory reset, we see no notion of TRIM it does wipe_block_device (3) which calls BLKDISCARD or BLKSECDISCARD provided that they are supported (4). Both ioctls are essentially TRIM on block device level (not on filesystem level). fstrim is only run by vold inside the main Android OS. Additionally one of the tools used for creating filesystem mke2fs_static does try to discard device before fs creation (5), but not the other tool e2fsdroid_static. So there are chances eMMC will be sent a TRIM/discard request during factory reset, but be aware of the past: Android phones don't completely wipe data when their factory reset option is run.


Sunday, April 12, 2015

localization - Problems with changing the default country in Google Play Store


I need help regarding changing my country on the Google Play Store. I tried everything from hard resetting my phone to changing all the details in the settings but it didn't work. I changed all my Google Wallet details to the US address, even added a US-based payment method, set the US address and payment method as default, then I tried clearing the cache, purchasing an app using the new payment method. I even did another hard reset, but unfortunately for me, nothing has worked so far.


I would be really grateful if you guys could offer me some help regarding this problem.


Please don't redirect me here: How do I change the Google Play country?


I tried that already but doesn't work for me.


Unfortunately I also can't root my device (Xperia Z Ultra) since root is not yet available for it and I am using a Mac.



Answer



Okay guys, so after nearly a whole day spent searching for ways to make this work I have finally, finally made it. So here's what made it work for me. I did everything mentioned in my original post, then I gave up with my google ID and made a new US based google account. Removed the old google ID from my device, did another hard reset and then logged in with my new ID. The US play store worked fine for a while with Tunnelbear for vpn, but then it went back to my local play store, and then started to crash repeatedly until it refused to open anymore. I was then fed up and put back my old google ID and removed the new one that I had just created, and guess what. Tada! It logged me into the US play store without any trouble. No need for vpn or any other fix. It's been working fine since, and fingers crossed it will forever.


So, what you have to do is log out of your current google ID, log in from another (new) one, and then remove the new ID and log back in from your old google ID. Make sure that before logging in with the new ID, update all your google wallet and google account details with US address, payment and phone number on your old ID.


Hope this was clear. Cheers.



rom flashing - Which directories can I remove in internal SD in Galaxy SII w/ Cyanogenmod?



I used ClockworkMod to wipe my Samsung Galaxy SII and install Cyanogenmod 9.1 on it. However, when I mounted my phone on my computer, I see that lots of folders were left on its internal SD by apps from before I flashed my phone.


I was tempted to just delete everything on the internal HD from my computer (running Mac OS X 10.6.8), but I noticed there seems to be critical directories on it like one for Clockwordmod.


Here is a list of the directories on the internal SD via ls -a:


enter image description here


Are there directories in here that are essential to the normal function of the phone? A related question is: When I flash my phone, how to I completely wipe it so that when Cyanogenmod is installed, there will be no traces of previous activity as shown in the screenshot above?


Thank you!



Answer



When doing a complete wipe, you can safely delete all directories off the internal storage. Generally, Android OS will re-create any folders on user areas like internal/external storage if it doesn't find them.


You may want to hold onto (or at least back up prior to deletion) media folders like DCIM and Pictures, for example. Keep in mind that on different devices Camera apps may store photos and videos in other, non-standard directories. And of course do not delete the clockworkmod folder if you wish to keep the NANDroid backups you've made previously.


Under normal operation, .android_secure is the only directory on either internal or external storage that is absolutely necessary. It contains apps that were "moved to SD" via settings (if external SD card is not present, apps get moved to internal storage instead.) If this folder is deleted, it will cause instabilities where these apps would not start (obviously), but you may also have trouble uninstalling them from Android, and would need to manually remove their left-overs (the caches, for example.)



Another notable directory is Android - it contains data for installed apps.


external sd - SD card partitioning? why? how?


I am going to install cm7 and it seems to me that is 'good' to partition my SD card.



I did some reading but I am not sure if ext partition will become accessible as mass storage when an Android phone is connected to the computer.


I still want to transfer files from / to my SD card via computer. How can I backup files if they are on an ext partition?


How big ext partition is good if my sd card is 16GB?




HTC Desire on Android 2.1



Answer



I'm on a rooted Samsung Spica running the stock Samsung 2.1 Eclair version.


Since my internal memory was limited to around 160 MB, I was hunting around for a simple enough solution and preferably freeware. I have an 8 GB card and IMO, allotting 1 GB would be more than adequate for all the games / apps that I'd want to keep for posterity but couldn't afford to occupy space within the limited internal memory that I had.


Enter Link2SD - it's freeware and works with Android 1.6 and above.


You will also need a partitioning tool - I used the excellent freeware Easeus Partition Manager (EPM) to ensure no data was erased during the repartitioning / resizing.




  1. First, download and install EPM.

  2. Pop your storage card into your card reader.

  3. Start EPM

  4. Your card should be visible amongst the other drives/partitions in your PC.

  5. Select the partition on your card - it should cover the entire length by default. Right-click & choose RESIZE/MOVE and then REDUCE the Partition Size (this is what shows in Windows) until the Unallocated Space size is of a suitable size. (The Unallocated space will be allocated as the partition on which your apps will be stored.) Click OK.


An aside - even though Link2SD supports the usage of the second partition (in which your apps will reside) created in the FAT / FAT32 format, Windows only recognizes the first PRIMARY partition which is why this newly created partition won't show within Windows inspite of it being FAT / FAT32. We shall be using either ext2 / ext3 or ext4 as the file system in any case.


Onward...




  1. Right-click this new Unallocated Space and choose CREATE. Click YES on the warning that describes what I've said above.

  2. Now, in the Partition Label, type in a label like "AndroidApps" or whatever suits you.

  3. This is CRITICAL - the CREATE AS should be PRIMARY

  4. Choose File System as EXT3 and click OK.

  5. Click APPLY in the main window's TOP LEFT corner (big blue check mark icon). EPM will carry out the operations. Congrats! You've just re-partitioned your card and without any data loss too. (Hopefully!)


Assuming you've installed Link2SD in your phone and the SD card has been re-inserted. 11. Reboot your phone.




  1. Start Link2SD and it should detect your partition.





  2. A list of apps is now displayed. Click the app you want to move to the card and then click CREATE LINK.




That's it.


security - How do I protect my phone from malicious apps once it is rooted?


I rooted my phone.


Now if I use a Terminal Emulator such as Android Terminal Emulator, I noticed that I can can easily obtain root access without a password:



$ id
uid=10059(app_59) gid=10059(app_59) groups=1015(sdcard_rw),3003(inet)
$ su
# id
uid=0(root) guid=0(root) groups=0(root)

In the Unix server and desktop world, a superuser account with no password is considered dangerous because the superuser account has access to all resources on the machine.


Is this similarly dangerous on an Android phone? If so, how can I protect my phone from malicious apps which try to gain root? Can I manage which apps have access to the superuser account on this phone?



Answer



There's a similar question which covers some of this: Security risks of rooting your android smartphone. However, since it doesn't really explain how you manage access to the root user, I'll expand on that here.



When you root your device, you basically always (technically I suppose you don't have to, but you should) install the Superuser application along with the su binary. Superuser's sole purpose is to manage which applications are permitted to elevate to root and which are not. The default behavior is that Superuser will prompt you whenever a new app tries to execute a call to su, and you can then allow or deny it using the prompt. It can save your decisions so that you won't get prompted more than once for the same app, but you can erase this saved data from the Superuser settings page. It also provides a log viewer which keeps track of when su is accessed and by which applications.


Now, the tricky part is that many of the newer malicious apps will actually perform an exploit to gain root access rather than simply trying to make a call to su. There's really not much you can do about these aside from being careful about what you install and where you install apps from since they aren't even using su to begin with. However - to directly answer your question - apps which require legitimate root access can be easily managed by Superuser as explained above.


If you are rooted but don't already have Superuser then you should be able to simply install it from the Market, I believe.


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