Friday, October 3, 2014

wi fi - Is it possible to designate a Wi-FI SSID as metered "mobile network"?


I am wondering if there is a method by which I can designate a WLAN/WiFi connection as "mobile network" based on its SSID for the sake data usage policies by apps or the Android system in general.


Typically when you have a data plan with your mobile provider, your phone's LTE (or 3G ...) modem will connect to the provider to enable you to have internet access.


Now if I am using a mobile LTE/WLAN router instead, my phone assumes that it's on an unmetered WiFi uplink and apps/the system will (mis)behave accordingly.


Is there a way to tell the system that when it connects to a particular SSID it should treat that as "mobile network" in regards to how apps may use data?


Phone: Samsung S9+ (SM-G965F), Android 9


NB: the settings from this answer don't exist on my phone.




Thursday, October 2, 2014

How to do a factory reset on Xperia Z with broken screen?


The screen on my Sony Xperia Z is cracked. I have now sold the phone so I need to delete my text messages, can anyone help?


I can only press in certain areas of the screen so I can't click on factory reset or delete messages one by one.




applications - Disable all software installation


Is there a way to block (by a password/PIN code or what else) all kinds of software installation on an Android tablet/smart phone?


I understand it is possible to block by a PIN code Market app instalation, but that only works for paid apps, and there are other ways to install applications other than the Market.


Rooting is not a problem.


Thank you!



Answer



Unfortunately Android doesn't offer this functionality out of the box. There are several 3rd-party apps on the Market that can help though.



I personally use App Protector Pro on my son's tablet. This app allows you to set a PIN and then set up a "block list" of any installed apps, including system ones. Among other apps, I added Settings and Package Installer to this list. This presents the "password" prompt upon installation (or un-installation) of any apps, including from alternative markets (Amazon Appstore, GetJar, etc.) and even side-loading APKs. App Protector Pro itself is also by default set to be on the "protected" list.


Of course if your device is in the hands of a person that is somewhat knowledgeable of Android OS, they can do a bunch of things to circumvent this sort of protection, such as a factory reset from Recovery console, for example.


[5-year Edit]:
Android 5.0 introduced restricted profiles feature. This allows you to block new installs from Play Store, and disable already installed apps for restricted users. Unfortunately this feature is only enabled for tablets. Phones still have to rely on 3rd-party "lock" apps, with varying degrees of success.


tasker - Restart data connection when stalled?


Occasionally the data connection of my mobile will stall, i.e. it still looks like it does have a data connection (either "H" or "G"), but no server can be contacted.


(In particular, my ROM being a Cyanogen, the data icon will turn gray, meaning that the Google servers can't be contacted at the moment).


This is usually easily solved by switching mobile data off and on again, which is not a terrible nuisance, except sometime this stalled state goes unnoticed for hours, putting me at risk of losing important communications.





  • is there an easy way to detect this "stalled connection" state? preferably a way that could be used in Tasker to trigger a disable/enable mobile data cycle?




  • is there an app to handle these situations? I found many that seem to deal with a similar problem, i.e. when the data connection is completely lost (no "H" or "G" icon), but none that deals with this particular situation.




(This is happening on a rooted HTC Wildfire S with a Cyanogen 9 rom, but my question is not specific to it).




Wednesday, October 1, 2014

wi fi - Change Input Method without unlocking the phone?


Recently, I've installed a WiFi Keyboard application to my Android phone. This way, since both the phone and my computer were connected to the same WiFi network, I could access the phone's keyboard from my computer.


After, the phone disconnected from the WiFi network. And got locked (I had a password set at the lock screen).


And now I cannot enter it, because I cannot enable any other keyboard than the WiFi one (which doesn't work because phone has no WiFi).


Can I enable it via adb or any similar way? Are there any solutions to this problem?


What I've tried:




  • I can do nothing on the lock screen, everything's blocked. The swipe doesn't work to change the keyboard. Also there's no settings box. And I cannot drag the notification bar.

  • I tried the adb shell ime command, but without luck. It doesn't seem to do anything. me@myPC:/$ sudo adb shell ime list -s me@myPC:/$


Additional Data:



  • Phone is Samsung Galaxy S3 mini unrooted. Android version is 4.4 I think.

  • Storage and SD card are encrypted. SD card has important data, so I can't simply wipe the phone.

  • I am able to enter my password in the Decryption screen as the normal keyboard shows up, but not in the lock screen.







This problem was solved. Solution:


This problem was solved by booting into safe mode, as proposed by ak11234.


I did so by holding the volume down key while powering on my device (pressed the power on button, waited for the phone logo to show ("Samsung" and the model number), released the power button and held the volume down key until the lock screen appeared).


However, these instructions vary from phone to phone. The ones described worked for Galaxy S3 mini.


You can find instructions for the most common phones that have Android on this webpage: http://www.droidviews.com/how-to-boot-android-devices-into-safe-mode/



Answer



Try seeing if you can login when you are in safe mode. Boot into safe mode by holding down the power button to open the menu, then hold down the power-off button, and click "OK" when it asks you to reboot into safe mode. Then attempt to login once the phone restarts, and re-enable the virtual keyboard.


Hope this helps.



samsung galaxy s - Contact names not showing for the calls and messages


My Galaxy S3 was working great until I installed a firmware update on 26/11/12. Immediately after, the names dropped off the calls and messages and it is now showing phone numbers only. When I dial somebody or receive an incoming call, only the numbers are displayed not the contact name.


Please help....





mount - How to list all major partitions with their labels?


I want to figure out all partitions on my device together with their resp. mount points or labels (i.e. to know which partition is holding system, recovery, boot, etc.). This needs to be device independent (as I have multiple devices). Goal is to dd them and know which image is what.


I have seen Command to list partition mount points? – however, there the goal was just a partition list of mounted partitions. I need them all, and e.g. /recovery is not mounted when booting into "normal work mode".



So far, my recherche has brought up a bunch of approaches – but none of them works on any of the devices I've tested:



  • cat /proc/mtd: this is empty or non-existing

  • cat /proc/emmc: this is empty or non-existing

  • cat /proc/dumchar_info: non existing (MTK/MediaTek)

  • ls -al /dev/block/platform/*/by-name: either non-existing, or not having the wanted details


Any idea of what I could have missed? Of course I could walk all the /dev/block/mmcblk0p* devices, dump them, and sort them out later – but then I had to repeat that investigation for every of my devices (and again when someone turns up with another one), so that's no solution.




EDIT: Please note the tag to this question. I'll have to access that information via ADB, and do not want to install some app on a device handed to me for investigation. Consider it "forensics background" (no changes to the device), though that's not exactly true ;)



Also apologies for my initial mis-phrasing: the "mount points" are only interesting in so far they reveal the purpose of the partition. I don't want to mount/remount them :)



Answer



As existing answers already show, there seems to be no "unique way" to achieve that. So I started combining ideas from allover, joining them into a script (or rather a "script library") to have them checked sequentially (until a good hit was made), and integrated that into my "Device Documentation Tool" named Adebar. Those interested can find it in the lib/partitions.lib file. As Adebar is open-source (GPLv2), feel free to copy and use it – or fork the project and improve it.


The full solution is a bit long to post here (as said, you can grab it at Github), but as our policy is to include at least the general part in the post, here's what it does:


Different sources provide different sets of details, so it tries the "best ones" first – and then recurses down until at least something was found.



  • /proc/dumchar_info gives the most details, so this is tried first. Happy MTK users will get this.

  • /proc/mtd is the second best source.

  • /proc/emmc should have almost as much as the previous candidates, but is a bit tricky to use

  • /dev/block/platform/*/by-name, cross-checked with …


  • /proc/partitions cross-checked with /proc/mounts gives us at least the partitions mounted


So the script I've built basically walks the sources in this order, stopping as soon as it was able to collect details (e.g. if /proc/dumchar_info was found, no need to parse all the others). All of them put into separate functions, returning data using the very same structure, one could even merge results from all of them.


If someone can come up with a better solution, I'm of course always open for the idea :)


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