Thursday, January 31, 2019

cyanogenmod - How do I block this (carrier) advertisement dialog?



I receive this kind of messages almost every day, and I'm tired of them.


Screenshot
Screenshot (click image for larger variant)


I want to block them, but I have no idea how are they called. I'm looking for a way to block this messages, either via an app (doesn't matter if it needs root) or programatically (if I can detect these messages, perhaps I would be able to create an app to block them).


EDIT: The message icon is the same as the SIM Toolkit. Could this be related? As far as I know, Cell Broadcasts don't show with "OK" and "Cancel" buttons as this message.



Answer



From what I can see from this site (In Spanish): this is a specific advertising service that only the Movistar network seems to push to phones.


The only solution I found is to Disable the "SIM Toolkit" application, Settings > Applications > SIM Toolkit but this may require access to your device. Removing SIM toolkit according to Android Forum users can be removed without any issues. I would Disable it rather than take the nuclear deletion option personally.


From the link:




Hasn't been on my phone in a year... no problems without it - that I'm aware of.



and



I know for a fact that 4G works without it... has not been on my phone for the last year - and every ROM I could flash made no difference. I'm really temped to believe that SimToolKit is for Metro's various services/bloatware (where they monitor data usage - for whatever reason)



From Wikipedia:



SIM Application Toolkit (commonly referred to as STK) is a standard of the GSM system which enables the Subscriber Identity Module (SIM) to initiate actions which can be used for various value-added services.




These so called 'value added services' are what you want to remove.


Alternatively you could contact Movistar and see if they can stop it, tell them it is crashing your device or causing you issues and ask what can be done. Depending on your contract you could move to another network also.


gps - Find lost Samsung Galaxy Ace phone?


3 weeks ago I lost my Samsung Galaxy Ace. I don't have any tracker applications or any "if lost" applications installed. I'm looking for some tracker that doesn't need a sim card, just a locator using gps locator, but I also don't have any IMEI number or even email. So please help me, is there any way to find my lost Samsung Galaxy Ace S5830?




Why doesn't my Samsung Galaxy S communicate via USB?


I discovered today that I cannot connect my PC with Samsung GT-I9000 any more: when I plug in the microUSB cable, nothing happens other than that the phone starts to charge. Earlier I got to see Connect to Kies or something like that.


Things I've tried so far:


-Switcing USB debugging on and off
-Removing battery
-Trying different cable
-Trying reimaging PC to a known good state (where I previously would have found new hardware)

-Trying different computer
-Factory data reset
-Formatting internal SD card
-Entering download mode with mUSB jig (my phone has download and recovery modes disabled otherwise) and reconnecting mUSB cable. Then I saw the "USB Device Not Recognized. One of the USB devices attached to this computer has malfunctioned..." error on Windows (XP).


Is there anything else I could try before sending it to the long journey of Warrantyland?


UPDATE: I tried an app z4root which rooted the phone without the need of usb cable, then I could use Rom Manager to force the phone into Recovery Mode (remember my phone had the 3-button combo disabled). There I deleted-erased-formated everything I could and when I got back to normal mode and tried connecting again, Windows found new hardware and Kies recognized the phone. Just to be sure, I pulled the cable from computer, waited for 2 secs and then reconnected but, alas, nothing happenend again. I reimaged the PC and redid the z4root+Rom Manager+Recovery Mode wipe thing but nothing. Then I tried to reinsert microusb plug into phone under an angle and witnessed a successful connection. Kies offered updating firmare. I did not breathe on the phone and carefully clicked mouse to accept in hope that if this was a software error, new update would fix it. The update went fine but after the phone rebooted and I could confirm the firmware version from About, I still could not connect.


Then I used USB jig which I purchased from eBay to force the phone into download mode and tried to connect it with a PC once again. The PC froze at once (even the mouse cursor did not move). I tried pressing every conceiveable keyboard combination from Enter to Ctrl+Alt+Del and then disconnected the USB cable. As soon as I did that, everything started moving again on the screen. I could reproduce this behaviour for 5 times. On the sixth time, however, Windows found new hardware and started installing drivers but soon after that a balloon popped up saying "USB Device Not Recognized. One of the USB devices attached to this computer has malfunctioned [...]". Then I rebooted the phone and came back to the issue later.


I forced the download mode once again and plugged the USB cable in. Nothing happened. No frozing, no error.


Even though I have tried to wiggle the microusb plug in from every possible angle, it does not seem to have any effect. It just works when it wants to work. Charging works always, though.




2.3 gingerbread - How to get battery status in terminal?


I have gingerbread(2.3.6) phone with dropbear installed. I usually access my phone over wifi & run commands in putty. I want to get Battery status & percentage in terminal. Is there any command or program to obtain battery info ?




rom flashing - Add system apps in a custom rom


I'm trying to change a few some system apps in an already working custom rom (Lewa Os - CM7 derived) and my device is an Acer Liquid Metal)


Lewa Os is a chinese rom that I've translated thanks to the help of other guys in the forum to Italian.


So I want to repack the rom with all the new Italian files (framework-res.apk, phone.apk and so on).


I've used xda's kitchen (http://forum.xda-developers.com/showthread.php?t=633246) and following all the simple wizard (I didn't modify a thing) I simply added with copy and paste the new apks in the folder and cooked the rom.


When I flash it the final result is a rom that has everything BUT the "new" apks.


What's wrong?



How can I find it out?




data recovery - Recovering the contacts, SMS and call log from SD card



I am using an Micromax A57 running Android 2.3.5. Since there was a problem in the launcher, I reset the phone to factory settings, taking my SD card out before doing so. Since the phone's internal memory is very small, all the contacts, call log and SMS are saved on the SD card.


While doing the factory reset, my assumption was that I could restore this information from the SD card afterwards. However, when I re-inserted the SD card, my phone could not get any of my contact, SMS or call log information. I searched the Internet for the past 2 days and tried several applications to get it back but all in vain. My questions are:


First of all, would it be possible to get the SMS, contact and call log back from SD card (as I reset mobile alone taking SD card out)?


If possible, how to restore SMS, contact and call log?


Phone is rooted and I am sure the data lies somewhere in the phone as bits and bytes. Experts advise please.



Answer



Your assumption that Contacts, SMS and Call Logs are automatically saved to the SD Card was incorrect. They are indeed stored on the internal memory of the device. /data/data/com.android.providers.contacts/ is the most likely storage location. That can change though, depending on Android OS version, manufacturer/carrier modifications, or even 3rd-party apps that you use in place of built-in Contacts/Phone/Messaging apps.


Unless you synced your contacts to your Google account, backed up SMS and call logs, they are now lost after a factory reset.


internet - Disallow & prevent ALL data access (2G 3G ) for user (maybe even WiFi) directly or via MDM?


I saw this similar question but it does not ask or answer what I am asking.
How to totally block internet access (data) on an Android?
Completely block disable "data" period so that user cannot enable it or use it.


How can I disable mobile data completely?
Some of the answers here seem like good options, but I need a way where OTA/ SIM updates or the user/ employee cannot work/ hack around it easily.
Can any of these answers be applied in a way where it cant be easily reversed?


Completely disable & prevent 2G 3G ALL data access/ use (maybe even WiFi) on Android directly or via MDM?


There have been cases of some people I know (older family) that were brought an Android phone but inadvertently some Data was used without a Data Plan - more expensive.



Lets say instead of buying Feature Phones for some delivery boys, we bought Cheapest Android phones possible - The boss there just wants Phone calls with them and wants to ensure the boys wont be able to Rack up Data use/ bills on the phone -


Are there ways to Disable Data AND/ OR WiFI? Selectively or so? Maybe only have it on when being configured by MDM?


We will need the SIM to ensure Calls & SMS work. Is there a way to disable data use?




Why isn't there a Cyanogenmod stable ROM for my device?


Why don't the developers develop a stable ROM for my device? They have stable ROMs for similarly-named devices from the same manufacturer, even ones that came out after my phone. If the devices are similar, and there's already a stable ROM for one, why is it so hard to make a stable ROM for mine too?




4.3 jelly bean - How are Googles OTA (over the air) updates delivered/notified?


I've got a Nexus 4 (but this question relates to all eligible devices) currently running Android 4.2. However Android 4.3 was announced a few days ago.



  • I've run Check for Updates

  • I've followed the tips to checkin

  • I've done the trick to "Force Stop" the Google Service Framework app and then pressed "Clear Cache".


But none of this seems to be doing anything, and I'm still running an "Up to date" OS with 4.2.2.


Is this a carrier issue? Could it be because I'm not on one of the BIG THREE carriers in Canada (Rogers, Telus, Bell), but instead I'm on Virgin Mobile?





footnotes:


†: *#*#2432546#*#* or *#*#checkin#*#*



Answer



So I tried to "Clear Data", instead of just "Clear Cache" in the Google Service Framework (and Forced Stop).


I then ran the checkin again (Dial *#*#2432546#*#* in the phone app), and now I'm being shown the new Android 4.3 System Update.


Wednesday, January 30, 2019

Stereo audio input on any Android device?



Is there any Android device with a stereo audio input available?


I understand there is the analog microphone input commonly available on the headphone jack, but I am hoping there is a device out there that might have a stereo audio input hidden away on a dual-use USB port or something.



Answer



Good news! Android 5.0 has support for audio capture via USB class-compliant devices.


You'll probably have to use your device at 48 kHz, and mixer control isn't supported, but at least it's something.


My Zoom H4n works out of the box with a Galaxy S6.


Create a custom keyboard dictionary


Is it possible to use custom dictionary with the default Android keyboard? I guess the words are stored in some file, so I would like to edit it.


The goal is to create Macedonian auto-completion because there is no other way to achieve this.




Tuesday, January 29, 2019

Backup and restore Android Settings and Application through ADB


I would like to ask if it possible to backup and restore all Android Settings and applications through ADB.


I tried:


adb backup -all
adb: unable to connect for backup


It is not working, while all other commands are working.


Is it possible to use this bmgr ?




rooting - Can I root my Nexus 5 without a custom image?


Is it possible ?


So far I've found 2 images that would allow me to get root, either cloudfire or team win recovery project (twrp).


I'm a little uneasy loading an unknown bootloader to my device.


Or maybe some information beyond "run this program", "double click here" and such. I work as an embedded engineer so I like to know what I'm doing



EDIT :


Usually embedded devices have a 3 stage loading. First they execute hard code in ROM when power comes up. Then this code loads the boot loader, then this boot loader brings the actual linux kernel up. It is my understanding that I will be overwriting the boot loader with twrp. By image I mean a fully compiled binary that will overwrite what is already present. If it is not an "image" to you then fine, it is not. I want to know if it is possible to root the device without overwriting the default bootloader.



Answer



29 January 2015: TWRP can no longer install official updates past 5.0 on Nexus devices. Updating my language here to say "install unofficial updates" instead of "official".




Since you specifically mention TWRP in your question, I'll just use it as my example. Note that CWM or any other possible Android Recovery project will also apply.


It looks like there's a slight misconception at play. I'll just drop a few clarifying notes here:



  • TWRP is indeed an image to be flashed.

  • Flashing TWRP does not overwrite your bootloader.



  • TWRP is not a bootloader replacement - it is Recovery software. It is a drop-in replacement for Android's stock open-source Recovery Mode, and therefore has the access needed to do things like



    • Create/Restore backups

    • Root devices

    • Install unofficial (and some official) updates




So the short answer is: Yes! It is indeed possible to root without overwriting the stock bootloader!



A few more notes:



  • TWRP (And CWM Recovery) is a mature (Several years old and quite stable) Open-source project that is used by a huge portion of the Android community and considered very trustworthy.

  • Flashing TWRP will replace the contents of /recovery/.

  • You generally need to use the stock bootloader in order to select the boot-to-recovery option in order to use TWRP.


wi fi - Wi-Fi connection dropping



Lately I've been having trouble keeping a connection to Wi-Fi, first at home and now at work. What happens is that after a while I'll notice that my phone is using 3G.


If I go into my Wi-Fi settings, I'll see a strong signal from my router. When I try to connect manually, I often get the message, "Failed to connect to network" with no further details. (There's a special place in hell for those who write error messages that give no indication of the nature of the problem.) Other times I can connect, but the signal is reported as weak and drops quickly.


My computers can connect with no problems and report strong wireless signals. My roommates have no similar problems.


I have a Galaxy Nexus running Jelly Bean. My roommates have a Galaxy Note and a Galaxy S2, respectively, both on ICS.


What's wrong with my phone?




  • My phone is rooted but running the stock ROM.

  • My phone is the international GSM version.

  • I first noticed this problem while using Tasker to implement a Bluetooth wireless leash. I've stopped using the leash--and Bluetooth entirely--but the problem persists. I'm still using Tasker for other things.


  • In trying to track down this issue, I disabled "Avoid poor connections" but that change had no effect.

  • I'm willing to consider flashing stuff to my phone as a last resort, but I strongly prefer alternative solutions. I didn't have problems initially, so I doubt the radio is to blame. Furthermore, I will down vote any answer that provides an incompatible ROM/radio, etc. or that provides it from a non-reputable source.



Answer



My solution, which seems to be working so far, is quite related to what was proposed by t0mm13b.


That proposal was to adjust the DHCP settings. However, my router is quite limited in functionality and it's impossible to adjust wifi settings on it. Insane, I know. So, I set my phone to use a static IP address instead of using DHCP. So far, so good.


sms - sending messages off pc through phone, with only having app on phone.



I want to be able to send texts through my laptop, but without having to download anything onto it. Is there any app i can download on my phone to be able to tdo that?




Monday, January 28, 2019

3GB of internal storage is lost


I have a Sony Xperia SL with 32 GB internal storage from which 25 GB is available for user. When I bought the phone, everything was OK. but last month I found out that there is only 1GB left free, when sum of the files in the memory was only 21GB. I deleted some files and reduced the filled capacity to 10GB. However, I still have only 12GB free on my device. It sounds like 3GB of my storage is lost. (I have checked LOST.DIR and, for those who want to know, I have considered the thumbnail files when I summed up the files)




adb - Samsung J5 : Use SD card as internal memory


I'm actually trying to use my SD card as internal memory on my Samsung Galaxy J5 with 6.0.1 android version. I saw some post on google and i follow this tutotial :


http://www.phonandroid.com/galaxy-s7-s7-edge-fusionner-memoire-interne-carte-sd-sans-root.html (It's in french because i'm french)


but when i try to use sm partition in adb shell nothing is happening... and my internal memory still the same. As you can see on the tutorial other people got the same bug on Samsung J5.


If someone have a solution or a way to solve it.




security - Why can't a keyboard on the Samsung Galaxy S3 collect passwords?


When I enable an input method (a keyboard app) on a Nexus device, I see the following confirmation message:



This input method may be able to collect all the text that you type, including personal data like passwords and credit card numbers. It comes from the app Highway. Use this input method?



I understand this warning. Because of the way an input method works, it has the ability to collect everything I type, and I have to trust the author not to abuse this ability. But when I enable an input method on my Samsung Galaxy S3 (and maybe other Samsung devices; I haven't tried), I get a different message (my emphasis):




This method can collect all of the text you enter, except passwords, including personal data and credit card numbers. It comes from the app Highway. Use anyway?



I've checked entering a password into a web form, and setting the device password. In both cases, it still uses the (3rd-party) input method I choose to enter the password. So why does Samsung claim that the input method can't collect passwords? Are they doing something incredibly clever in their version of Android, or are they just talking nonsense?




wi fi - Connect to Wifi network even if it doesn't have internet access


I have a LAN accessible over wifi that I'd like to connect my Android device to, but when I go to Settings->Connections->Wifi and try selecting the network, it doesn't connect. If I enable internet access on the wifi network it will connect, but then as soon as I disconnect the wifi network from the internet, the phone disconnects from the wifi network. Is there a way to force the phone to connect to a wifi network, regardless of internet accessibility?


The phone is a Samsung Galaxy S4, with Android 4.3. Thanks!





Sunday, January 27, 2019

lock screens - Why, and how to increase 16-character lockscreen password limit?



This is a problem that has annoyed me, as the password that I have memorized is around the 20-character mark, yet Android limits it to 16 characters


Why, and how to increase, 16-character lockscreen password limit?


If it's relevant, the Android is running on 5.1 Lollipop.



Answer



From Android Security Internals: An In-Depth Guide to Android's Security :



Android doesn’t have a dedicated setting to manage the encryption pass- word after the device is encrypted, and changing the screen lock password or PIN will also silently change the device encryption password. This is most probably a usability-driven decision: most users would be confused by having to remember and enter two different passwords at different times and would probably quickly forget the less frequently used, and possibly more complex, disk encryption password. While this design is good for usability, it effectively forces users to use a simple disk encryption password, because they have to enter it each time they unlock the device, usually dozens of times a day. No one wants to enter a complex password that many times, and thus most users opt for a simple numeric PIN (unless a device policy requires otherwise)


Additionally, passwords are limited to 16 characters (a limit that is hardwired in the framework and not configurable), so using a passphrase is not an option



(Emphasis supplied)



I don't know more about this limitation and would be glad if somebody can amplify (Edit: Andrew T has clarified here to an extent)


So, that rules out increasing password length to beyond 16 ( how to increase, Androids 16 character lockscreen password limit )


Since you are on Lollipop , you may like to related pitfall (claimed to be fixed) of long passwords here Android lockscreen can be bypassed by overloading with massive password


Note:



rooting - How to root Acer Iconia A100?



I am having trouble trying to root my Acer Iconia A100 with Android 4.0.3. I have tried several rooting methods and they always fail.


I have the USB debugging enabled, and all the adblock or antivirus apps are off.


I've tried all of these:



Am I just missing a step somewhere?


Here is the report from the SRSroot app:


---= SRS One-Click-Root v5.1 =---

11:29:11 AM - Starting ADB Server..
11:29:16 AM - Manufacturer: Acer

11:29:16 AM - Model: A100
11:29:16 AM - Android Version: 4.0.3
11:29:16 AM - Build ID: Acer_AV041_A100_1.049.00_PA_CUS1
11:29:16 AM - Board ID: vangogh
11:29:16 AM - Chipset Platform: tegra
11:29:16 AM - Getting OffSets.. : 0xd9f0 0xaf47 (True)
11:29:17 AM - Query Server for Best Method.. Found Rootkit: 4

----= Start Rooting Process.. Please Wait =----


11:29:17 AM [+] Testing exploit: root8 (please wait..)
11:29:39 AM [+] Executing root8 exploit Failed.

11:29:39 AM Auto Root Failed on this device. :(

11:29:39 AM Rebooting Device and try again...

On the Kingo, when I run the Windows application to root the Android it always says that rooting was successful, but when I try to do anything that requires root (like installing busybox) on the Android, it always fails. Then when I restart the android the rooting is gone.


So, I can root it with Kingo, and if I use SRSRoot after that, it says the android is, indeed rooted, but it doesn't persist. When I reboot the Android then run the SRSrootkit then it sees that the Android is not rooted (even though it seemed to be before reboot) and it cannot root it itself.


Using the unlockr method, I find that the batch file reports mkdir failed for /data/local/tools, permission denied with subsequent permissions errors. And so that method is not able to get root either.




Answer



Well, I think I found a viable solution: Full root for A10x and A5xx ICS. Simple method.


They have a link to a tablet driver for the Acer Iconia A100. I think that is what I needed all along. I installed that on my PC and ran the script and it worked just fine.


I rebooted the Android and ran the Root Checker application and it reports that the Android is, indeed, rooted.


The solution was simple and it persisted after a reboot!


applications - Installation Error


I'm getting the following installation error on a few of my apps when trying to update them:


"Installation error - Unknown Reason - 18"


Any suggestions? I'm running CM6 on a Motorola Droid.



Answer




Apparently the problem is with apps installing to the SD card. Running the following command in the terminal fixed the problem for me:


su
rm /mnt/secure/asec/smdl2tmp1.asec

New keyboard app not listed in Language & input settings page


I downloaded and imported Android SDK's Softkeyboard example (an app) to Android studio and installed it into my Sony xPeria Z3 running Android 5.1.1. That said, I do not see the app name in Language & input settings page.



I checked the list of installed apps on my phone and I see that SoftKeyboard is installed and in Android Studio, there is no error.


Can you show me a way to fix this problem?



Answer



Note: the commands in this solution requires setup in PC and the solution is tested on Android 4.2.1, 5.0.2 and 5.1.1.




Whenever an app equipped with an IME service is installed in the system, in order to connect its IME to the system, the device's owner must explicitly allow the app to become part of enabled input methods.


So how does it happen? We know that we can use command-line but that's not what ordinary users do.


It happens this way. When you launch that app, you're or would be asked to enable its keyboard. You are then redirected to a sub-activity of Settings app. In ROMs close to stock Android, a user can access that sub-activity from Settings → Language & input → Current Keyboard → Choose Keyboards. This is how it looks like in some devices:


(Click image to enlarge; image courtesy of OP)


IMG:



You can use command-line as an alternative to show that sub-activity


adb shell am start -a android.settings.INPUT_METHOD_SETTINGS
adb shell "am start 'intent:#Intent;action=android.settings.INPUT_METHOD_SETTINGS;end'" # alternative to above command

For an app, the moment you turn the slider towards right in that sub-activity, its IME's id is appended into the value of enabled_input_methods - a secure setting. The app then gets listed under Settings → Language & input, among those already enabled as input methods.


Since only one IME can remain as a default IME in system, the app then shows you a dialog to select a keyboard app as default. That dialog can be accessed from Settings → Language & input → Current Keyboard. Whatever entry you choose there becomes the default keyboard in the device.


Now that you know the details, you can now easily add a keyboard into enabled input methods, including your example keyboard app.





There's an another way too. All the enabled input methods can be listed by this command:



adb shell ime list -s

Example output


com.android.inputmethod.latin/.LatinIME
net.zhdev.ctrlvkeyboard/.CtrlVKeyboard

All the available (enabled or not) IME services can be listed through


adb shell ime list -a

Example output




com.android.inputmethod.latin/.LatinIME:
mId=com.android.inputmethod.latin/.LatinIME mSettingsActivityName=com.android.inputmethod.latin.settings.SettingsActivity
mIsDefaultResId=0x7f070000
Service:
priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
ServiceInfo:
name=com.android.inputmethod.latin.LatinIME
packageName=com.android.inputmethod.latin
labelRes=0x7f08003a nonLocalizedLabel=null icon=0x0 banner=0x0

enabled=true exported=true processName=com.android.inputmethod.latin
permission=android.permission.BIND_INPUT_METHOD
flags=0x0
net.zhdev.ctrlvkeyboard/.CtrlVKeyboard:
mId=net.zhdev.ctrlvkeyboard/.CtrlVKeyboard mSettingsActivityName=null
mIsDefaultResId=0x0
Service:
priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
ServiceInfo:
name=net.zhdev.ctrlvkeyboard.CtrlVKeyboard

packageName=net.zhdev.ctrlvkeyboard
labelRes=0x7f0b0015 nonLocalizedLabel=null icon=0x0 banner=0x0
enabled=true exported=true processName=net.zhdev.ctrlvkeyboard
permission=android.permission.BIND_INPUT_METHOD
flags=0x0
com.touchtype.swiftkey/com.touchtype.KeyboardService:
mId=com.touchtype.swiftkey/com.touchtype.KeyboardService mSettingsActivityName=com.touchtype.settings.TouchTypeKeyboardSettings
mIsDefaultResId=0x0
Service:
priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false

ServiceInfo:
name=com.touchtype.KeyboardService
packageName=com.touchtype.swiftkey
enabled=true exported=true processName=com.touchtype.swiftkey
permission=android.permission.BIND_INPUT_METHOD
flags=0x0

The highlighted strings next to mId= are the IDs of the keyboard apps available in my system.


In any ID, the string before / is the package name of the keyboard app. Example: for Swiftkey keyboard, the mId is:


com.touchtype.swiftkey/com.touchtype.KeyboardService


The string com.touchtype.swiftkey is the package name of Swiftkey app. Package name is what will help you to find the appropriate mID that you should use to enable a particular keyboard app.


To know the package name of an app, follow View app's full package name?


In order to add or remove an IME into enabled input methods, do


# replace ID with mId of the keyboard app which you want to add or remove

adb shell ime enable ID
adb shell ime disable ID

To make an IME the default IME of the system, do



# Note that it doesn't matter whether the IME is added into enabled input methods or not. Consider this a direct override.

adb shell settings put secure default_input_method "ID"
adb shell content update --uri content://settings/secure --bind value:s:"ID" --where "name='default_input_method'" # alternative to above command

samsung - Used note 4 clean spyware


I purchased a used Note 4 off ebay and want to make completely sure there are no spy apps or malware on it. I know some spy apps can be installed into the system partition and survive a factory reset. I discovered an app called cerberus that could do this and could be used to spy on me and blackmail me. How do I completely clean my phone of all spy apps or malware and completely wipe everything including the system partition erasing everything.




Saturday, January 26, 2019

sony xperia - Pop-up advertising message filling the screen


Sony Xperia M, model C1905. Android 4.3 official firmware, build number 15.4.A.1.9


screenshot Screenshot (click to enlarge)


The blue button on the message is a link to play.google.com of "du speed booster" page. It is a useless application. All of applications on a phone installed from google play site. First time I thought, this message is an android generated to force me to free some internal memory. Now there is enough free memory, and the message still appears.


I do not know how figure out the harmful application. I searched in Google by words in message to find people, who faced the same message and solved the problem, but there are no such results. I have installed the AirPush Detector, but it did not find anything.


Must I do full wipe?



Answer



That's not an Airpush ad. Also, these kind of ads are forbidden by the Google Playstore TOS. Always pointing to the same app suggests another app from the same developer placing it, not an ad module.


I'd first check which apps are running when this happens (Settings→Apps, select the corresponding tab). See if there are "non-essential" apps listed which you can live without. Note them down.



Second, check permissions of the apps installed. There are some permission checker apps available which make things easier for you. Fot this specific case, Permission Explorer seems to be a good candidate:


Permission Explorer Permission Explorer
Permission Explorer: List of permissions, apps using a certain permission (source: Google Play; click images for larger variants)


As the screenshots show, this app allows you to browse your installed apps by permission. Your screenshot looks like a system alert window, so the offending app most likely has the SYSTEM_ALERT_WINDOW permission. Check for apps having this permission. Note them down.


In a third step, compare your notes: apps that were running when the message appeared, apps using the SYSTEM_ALERT_WINDOW permission. If you find a match, you most likely found your offender. Uninstall it, and see whether your issue is gone then.


If this has solved your issue, don't forget the following to help others: check if that app is still on Google Play, and if the version there matches the version you have installed. If so, first report that app to Google, as it violates the TOS, and put a comment warning others. Google should react by removing the app from the store.


cyanogenmod - Android 5.0 Lollipop device not detected via USB



When the device is set to use MTP, neither Windows, nor ADB will detect the device when connect via USB cable. I have tried multiple cables, in multiple USB ports. I have not tried other computers yet, as this is the only one that actually has the driver installed.


Disclaimer: I am running an Unofficial CyanogenMod 12 build of Android 5.0.2


Device : LG G3 (LG-D855)
Android 5.0.2 CM12-Unofficial-20141228
Google USB Driver: Installed
USB debugging: Enabled
PC: Windows 8.1 Pro Update 1
No one, except me, has reported this as an issue in the XDA thread.


I have been unable to get my PC to detect the device via USB since I first installed CM12, which was around 11/10/2014.


MTP



adb devices - MTP


If i change to PTP, Windows will detect the device, as will ADB. But Windows will only let me access the internal storage, and Camera folders.


PTP


adb devices - PTP



Answer



After a couple of days of digging, I found the solution to this issue.


I opened up Device Manager. My first problem is I was looking for Android Composite ADB Interface, which is what it usually is called. I started looking harder. When I noticed ACER Device. My machine is not an ACER, nor do I have any ACER devices attached, or so I thought. I expanded that group and found ACER Composite ADB Interface.


These are the steps that I followed that got my ADB working with my device. YMMV.


ACER Composite ADB Interface




  • Download the latest USB Driver from Google

  • I right clicked this device

  • Uninstall

    • You may need to reboot after. I did.



  • Open device manager up again

    • The device may identify differently, and will probably have a triangle icon.




  • Scan for hardware changes

  • Right click the device again

  • Selected Update Driver Software

  • Clicked on Browse my computer for driver software browse

  • Select the path to the drivers that you downloaded at the first step, check the "Include subfolders" Let me pick

  • Let it install

  • Open a command windows (I had to open as administrator)

  • Run the following:


    adb kill-server




  • Now run:


    adb start-server






  • Finally run:



    adb devices







  • Profit! Success!!


Friday, January 25, 2019

4.0 ice cream sandwich - Only connect to certain Wi-Fi networks


I have a Bionic and recently upgraded from Gingerbread to ICS. I used to have my home Wi-Fi and my work Wi-Fi networks saved in my phone, and I had it set to not look for any other networks. I never got notified about Wi-Fi networks being in range, it just connected to those two when it could.


Now that I'm on ICS I keep getting notifications about Wi-Fi networks being in range and the only way I've found to resolve that issue it to turn the wifi off completely. Problem is, then I forget to turn the wifi back on when I am at home or work.



So my questions are:



  • Is there a setting to turn off the Wi-Fi notifications and I'm just looking right past it?

  • Is there a way to set up my phone to only connect to a couple of Wi-Fi networks and to ignore the other ones unless I go in and tell it to connect to them?




How to change the Play Store language?


I live in Hong Kong, and the Play Store displays everything in the local Cantonese language. I have set everything I can (Android language, Account language, even the app locale via Xposed Module "App Settings") to English, but I still see all the categories in the store in Chinese. Can someone help me change those to English?


(Click image to enlarge)


IMG:



Answer




Short answer: You can't!


From How can I switch language in google play?, you used to be able to work around this via a proxy:



Basically the market is determined automatically based on your IP. You can change some local country settings from your Gmail account settings but still IP of the country you're browsing from is more important. To go around it you'd have to Proxy-cheat. Check out some ways/sites: http://www.affilorama.com/forum/market-research/how-to-change-country-search-settings-in-google-t4160.html



For the current versions of Google Play, it will always go for your IP address and geo-ify it. Therefore, if you're really determined you can use VPN to route through some servers with Geo-IPs.


If VPNs are not a solution for you (They weren't mine: Too expensive, too risky and depends on trust of the host, ...) you can mess with a GeoIP database (and have Hong Kong become US), alike as this XKCD comic:



Now what?


If you're a fan of Google products and want to keep using it, you will have to deal with it, or use the web based market as pointed out in another answer. What I did instead was that I rooted my phone to remove Google Play store after installing Amazon app store, and used it instead.



rooting - How do I root my Kindle Fire?


There are a half-dozen or so questions on the Kindle Fire here where the answers involve having already rooted your device (including my recently-asked How can I get the Android Market installed on my Kindle Fire?). Ok, fine - doing dodgy stuff requires dodgy prep work. But... How?


I checked The Master List of Rooting Techniques, and found SuperOneClick suggested as the solution for the Fire... But as pleasant as this sounds, in practice this seemingly-easy-to-use tool proves inadequate: the device has been updated to break the technique it uses.


So what's the story (morning glory)? Am I stuck using the device the way it was intended to be used (shudder)? If not, what arcane magick will free me from these chains of conformity?



Answer



You can use Kindle Fire Utility to easily get root and Market with Google Apps.



It has support for the latest Kindle Fire firmware (6.2.1 currently).


google play store - Does the Pixel C Now Support HDMI-over-USB-C?


When the Pixel C was released, we were told that it does not support HDMI-out over its USB-C port, but that it might be enabled later.


However, on Google's own store, they offer a USB-C to HDMI adapter, and the page indicates that you can "enjoy it" with the Pixel C.


So... does anyone know if the Pixel C got the update to support HDMI-out or not?



Answer



It doesn't; none of the Pixel devices support - it's a Google Store goof up





  • I was helping a friend on the purchase decision of Pixel XL and lack of USB C - HDMI was a major drawback. Just to confirm we contacted Google support and they confirmed it doesn't support HDMI




  • Seeing your question, I contacted them again, since there are plenty of references to lack of support and only Google Store confirming it supports, which is an oddity. They verbally confirmed that it is a Store site issue and followed up on mail, confirming that they are working on fixing the error. Screenshot below




enter image description here


You may also wish to confirm by calling them up from the contact us on the store web site


Thursday, January 24, 2019

applications - How can I install MySQL on my Android device(s)?


There are good and bad choices available for the design of my system and MySQL seems to be the best available. I need it to run client/server and support stored procedures & triggers and a host of other features. But I also need a database that will run single-user on mobile devices when off-line, then synchronize with the on-line server when reconnected to the Internet. The only database provided with Android is SQLite - which doesn't even come close to providing the features required. Also, installing MySQL on Android devices would mean that I wouldn't have to support any incompatibilities between two different databases. I do not need other features installed (HTML server, PHP, etc)... just MySQL. How can I get that installed (and with my apps(s)) and have it work easily and efficiently (and not have to root or install a new ROM on the device)?




motorola milestone - Why does the home screen stay empty (no application icons/no widgets) sometimes?


I have a Motorola Milestone, and sometimes when I press Home to go back to the Home Screen, the screen shows no application icons, no widgets.


It simply stays blank, with the wallpaper on background. I can navigate to the other Home Screens by dragging to left or right, but every screen it empty.


The phone seems normal, no slowness, the app drawer opens up normally.


The only solution I thought was to restart the phone. I don't use any task killer.


I also noticed this started to happen recently, after installing many applications. And it normally happens after running some heavy app, like Angry Birds.


Did anyone notice this too?




chat history - How to transfer WhatsApp conversations to a new phone?


I recently changed smartphones from an unknown to Samsung, and I've lost my WhatsApp conversations. I want them on the new phone. I have reinstalled it on the new phone, and the msgstore.db.crypt files are there, but WhatsApp does not read the older conversations back.


What I would like to do is have WhatsApp appear as an unbroken list of chats so that the date that I changed phones is not apparent in the list of chats.




Wednesday, January 23, 2019

What are the steps for rooting an Android device, in general?


I'm aware that for different devices the particular procedures are different, but I guess there are principal similarities in the procedure.



So what are the basic steps to root your phone? What actually happens behind the scene, when someone follows any of the rooting guides available?


What is the magic that gives you root privileges to your phone? How are the user privileges handled afterwards?



Answer



There are a few parts to the process:




  1. Unlocking or bypassing any bootloader protection, allowing the system partition to be written




  2. Installing the relevant binaries to acquire root.





Both of these stages can vary from phone to phone, but here are a few examples:


Unlocking the bootloader


On many OEM phones, this traditionally involves exploiting a vulnerability in part of the system in order to rewrite certain partitions. Sometimes it will mean flashing a new bootloader, a new recovery (this is becoming common) or temporarily booting from an image over USB, in order to gain recovery access to the system partiton.


On the Nexus range of phones, and the development phones that were released by Google, it is as simple as running "fastboot oem unlock", though this will wipe the phone. Also, bowing to pressure from the development community, many manufacturers now offer an official route to unlocking the bootloader.


Installing the root binaries.


Once the system partition has been cracked then the rest is fairly straight-forward. It basically means installing the 'su' binary (this escalates to super user permissions), and an apk which provides an Android front end to 'su', and prompts the user when an app is requesting root permission.


There are several approaches to this second stage. The most common has been to use a pre-rooted ROM provided by the community. There is often a choice, from the stock ROM provided by the manufacturer and then tinkered with to add the binaries, through to a whole range of AOSP (Android Open Source Project) ROMs, such as CyanogenMod (one which I contribute to).


There are some other methods. For example, some phones (eg Galaxy Nexus) can use a "superboot" bootloader, which tinkers with your existing ROM as bard of the boot process. It is flashed to your phone using the fastboot program.



Typically there will be a single favoured approach for any particular phone.


rom flashing - How to disable dm-verity on `Treble` , `system-as-root` device?


Background: Please check following links



  1. How to disable dm-verity on Android with “user” build type ROM?

  2. Stuck in boot-loop when unpack and pack system.img?


Update: So, I am trying to disable dm-verity on my Samsung S10 5G device to successfully flash an unpack, unmodified and then packed system.img.ext4.lz4 file(with another ROM files) using Odin.


I have tried the following things:



  1. Removed avb flag from boot.img with following commands:



# magiskboot dtb boot.img print -f
> #345900: fstab
│ [compatible]: [android,fstab]
├── #345940: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect,avb]

│ [status]: [ok]
└── #346156: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]
[status]: []
#343692: fstab
│ [compatible]: [android,fstab]

├── #343732: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect,avb]
│ [status]: [ok]
└── #343948: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]

[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]
[status]: []


# magiskboot dtb boot.img patch

# magiskboot dtb boot.img print -f
> #345900: fstab

│ [compatible]: [android,fstab]
├── #345940: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect]
│ [status]: [ok]
└── #346152: vm-linux
[compatible]: [android,vm-linux]

[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]
[status]: []
#343692: fstab
│ [compatible]: [android,fstab]
├── #343732: vendor
│ [compatible]: [android,vendor]
│ [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]

│ [type]: [ext4]
│ [mnt_flags]: [ro,barrier=1,discard]
│ [fsmgr_flags]: [wait,slotselect]
│ [status]: [ok]
└── #343944: vm-linux
[compatible]: [android,vm-linux]
[dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
[type]: [emmc]
[mnt_flags]: [ro]
[fsmgr_flags]: [wait,slotselect]

[status]: []


  1. Removed avb and verify flags from dtbo.img with following commands:


# magiskboot dtb dtbo.img print -f
> #126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]

│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126596: fstab

├── #126608: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]# magiskboot dtb dtbo.img print -f
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126796: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]

[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor

[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]

│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product

│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]

[fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
[compatible]: [android,vendor]

[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,verify,avb]


# magiskboot dtb dtbo.img patch


# magiskboot dtb dtbo.img print -f

> #126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]

[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126596: fstab
├── #126608: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]

└── #126788: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]

│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab

├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]

[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]
│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor

[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│ [compatible]: [android,product]
│ [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│ [type]: [ext4]

│ [mnt_flags]: [ro,errors=panic]
│ [fsmgr_flags]: [wait,]
└── #126792: vendor
[compatible]: [android,vendor]
[dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
[type]: [ext4]
[mnt_flags]: [ro,barrier=1,discard]
[fsmgr_flags]: [wait,]



  1. Patched ramdisk.cpio with following commands:


# magiskboot cpio ./initrd 'patch false true'
Loading cpio: [./initrd]
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [etc/recovery.fstab]
Dump cpio: [./initrd]

# magiskboot cpio ./initrd extract
# cat etc/recovery.fstab

> # Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided

# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly

/dev/block/bootdevice/by-name/system / ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/userdata /data ext4 defaults wait,length=-16384
/dev/block/bootdevice/by-name/cache /cache ext4 defaults recoveryonly
/dev/block/mmcblk0p1 /sdcard vfat defaults recoveryonly
/dev/block/bootdevice/by-name/sec_efs /efs ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/sec_efs /sec_efs ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/carrier /carrier ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults recoveryonly

# FOTA

/dev/block/bootdevice/by-name/apnhlos /modem emmc defaults recoveryonly
/dev/block/bootdevice/by-name/modem /mdm emmc defaults recoveryonly
/dev/block/bootdevice/by-name/dsp /dsp emmc defaults recoveryonly
/dev/block/bootdevice/by-name/vendor /vendor ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/product /product ext4 defaults recoveryonly

# Add misc for GOTA
/dev/block/bootdevice/by-name/misc /misc emmc defaults recoveryonly

# Samsung ODE

/dev/block/bootdevice/by-name/keydata /keydata ext4 defaults recoveryonly
/dev/block/bootdevice/by-name/keyrefuge /keyrefuge ext4 defaults recoveryonly

#Auto-generated code by FOTA Portal
/dev/block/bootdevice/by-name/dtbo /dtbo emmc default recoveryonly


After patching, I have converted dtbo.img to dtbo.img.lz4 using lz4 compression tool and created new recovery.img image with patched initrd file.


After that. I have tried to flash magisk_patched.tar file with AP contents as one of the following:




  • Overwritten all three patched file in points 1, 2 and 3 above. -> Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.

  • Overwritten 1.boot.img and 2.dtbo.img.lz4 above. -> Successfully rooted but when trying to edit the system_root partition then I am facing the following problem:


D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # mount -o rw,remount /system
beyondxq:/ # cd system
beyondxq:/system # echo "Test /system mounting" > temp.txt
beyondxq:/system # cat temp.txt
Test /system mounting

beyondxq:/system # cd ..
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # echo "Test /system_root mounting" > temp.txt
/system/bin/sh: can't create temp.txt: Read-only file system ---> Error here
1|beyondxq:/ # cat system/temp.txt
Test /system mounting
beyondxq:/ # cat system_root/temp.txt
cat: system_root/temp.txt: No such file or directory ---> Verify: File not created
1|beyondxq:/ # exit
1|beyondxq:/ $ exit


D:\>adb remount
Not running as root. Try "adb root" first.

D:\>adb root ---> It didn't work as the next command is not working

D:\>adb remount
Not running as root. Try "adb root" first.

D:\>adb shell

beyondxq:/ $ su
beyondxq:/ # ls sdcard
Alarms Android DCIM Download Movies Music Notifications Pictures Podcasts Ringtones Samsung selinux_policy_modified
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # cp sdcard/selinux_policy_modified /system_root/sepolicy
cp: /system_root/sepolicy: Permission denied ---> Permission Denied here
1|beyondxq:/ #


  • Overwritten 1.boot.img and 2.dtbo.img.lz4 above with unpack and packed system.img.ext4.lz4 -> The result is boot-loop after successful flashing.



Please suggest what went wrong or am I missing any step.




does ATT ZTE Z831 Android disable the internal storage option


My son just got the ATT ZTE Z831 Android and I am putting in a 32GB sd card. I was wondering if this phone has an internal storage option.




rooting - Booting into twrp unsuccessful


Followed the steps mentioned in http://www.droidape.com/install-twrp-and-root-moto-g-2014-2nd-generation/


installed twrp successfully. But as I try to get into the recovery the screen shows the android guy lying on its back(no command). Please help



Answer



Moto devices with a stock ROM have a facility to replace the recovery with the stock image, TWRP handles this but you have to reboot into recovery once before starting the phone normally. Flash TWRP with fastboot and boot into it, allow changes (or first, say No, then do a backup!) then within TWRP do a Reboot -> Recovery, this will "set" the recovery so it will not be replaced.


fastboot boot twrp.img (replace twrp.img with the actual filename for your TWRP image)


TWRP should load. Do not allow changes and perform a full backup (keep this safe so you can restore to known good point if needed at some time). Once this is done, go to Home - Reboot - Bootloader


Flash TWRP with fastboot flash recovery twrp.img and then reboot into the bootloader with fastboot reboot-bootloader and start Recovery, TWRP should start.


In TWRP, allow changes and go to Reboot and select Recovery, the device should reboot and TWRP will start again. Select the option to allow changes, go to Reboot and select Recovery, this will "set" TWRP as the static recovery image.



You can now Reboot - System and the phone should start with TWRP left in place.


Tuesday, January 22, 2019

bootloader - Android tablet won't reboot after rebooting using volume and power buttons


I am using a 7" Smartfren tablet called S7.


I was following this tutorial. When I got the last part about the bootloader, I turned my device off. I tried to reboot using the volume buttons and power button, but it won't open up. Also, it cannot be seen by using the command adb devices. Thus, I can't use any adb command to access it. What am I doing wrong?


It is recognized by my laptop as Android Bootloader Interface. So, it means that it can still be detected by my laptop, but not when using adb devices in cmd.


Edit #1: I tried the fastboot devices command, and it just returned an empty line. I guess it means that nothing happened.


Edit #2:

I'll tell you its current status. It can't be normally rebooted, but when you plug it in, it shows that it is charging. Then if I put it back on its case, complete with box and all it heats up meaning it is still functioning and is turned on.




Monday, January 21, 2019

htc sense - How do I store pictures on SD card by default?


How do I move the photos I have in my gallery to my SD card? Someone told me to download an app that allows you to do this, but it didn't.


Also, is it possible to save them to the SD card by default, rather than the internal memory? Someone told me to open the camera and select settings, but there was no option to change it. I think my phone is an HTC wildfire. It's the smallest white HTC on the market and it has 'with HTC sense' on the back.




networking - Zeroconf mDNS on Android?



Is it possible for me to run a Zeroconf mDNS server on my Android phone? Something like Avahi on Linux.


The reason I ask is because I run an SSH/SFTP server on my phone for transferring files to/from the phone. Right now I have to connect using the local IP address (10.1.0.x) and the IP changes via DHCP. I'd like to simply be able to connect to my phone using a .local address.


I don't think Dynamic DNS will work, because I want my LAN address (the private IP, 10.1.0.x) not my public NAT IP.



Answer



Do you have any control over the (presumably wireless) LAN that you're connecting your phone to? It seems to me that the main part of your problem is just that your phone picks up different IP addresses each time it connects to your LAN. If it always had the same IP, then you could either make a note of this, save it in your SSH client, or assign a name to that IP on your other machine(s) using a HOSTS file or similar.


Are you in control of your network, or do you know the person that is? You (or they) should be able to assign a static IP address, or a reserved IP address, to your device so that every time you connect your phone to the LAN it always picks up the same IP address.


If it's a small, personal network then this would just be a setting on your device's record on your router, if this is a larger network then it would be setup on the DHCP server and a matching A name record could also be setup on their internal DNS to give you a permanent name.


Sunday, January 20, 2019

Possible to play YouTube videos at 2x speed?


So I use a Galaxy S5.


I'd like to play YouTube videos (or videos anywhere else) at 2x speed, but I can't find any options for that. Is it possible to find a way to do this on Android?




permissions - Determine app sending SMS Premium messages


I normally have "Block Premium Messaging" set up on the phones in my family. This is a verizon content block the prevents you (or family members) from sending messages to premium services that charge.


Recently, I had to replace a phone that broke and when the new phone was activated the blocks I had set up were cleared. On my bill was a $9.99 charge for a text to one of these premium services.


I know nobody sent the SMS to the service to sign up for this. I suspect some application on the phone sent the SMS message. Is there a way I can find out which app on my phone is sending SMS messages to premium services? Can I view all the apps that have permission to send SMS messages?


-- update -- well, I ran RL Permissions and no downloaded apps have the Send SMS permissions. I must have already deleted the offending app or something else is going on.



Answer



Android apps can only send SMS if they have the SEND_SMS permission, there are a few permission viewers on the market:




to prevent installing rogue applications, you might want to be more cautious when installing applications and check their permissions they required before installing. If you install apps from the Android Market, then it should show you a list of permissions that the app requested, and one of the entries says "Services that cost you money".


adb - Pulling an apk of paid app from the device


I was pulling the .apk files from the device using the following command:


./adb pull /data/app/com.example.tracker-1.apk


When I tried using the same command for the encrypted app as below:


./adb pull /mnt/asec/net.stfj.spelltower-1/pkg.apk 

I get the following message


failed to copy '/mnt/asec/net.stfj.spelltower-1/pkg.apk' to './pkg.apk': Permission denied

The device is not rooted and the app is a paid app. The intention of pulling is not piracy but to understand the library and architecture of a set of apps. Is there a way I can retrieve that .apk file?



Answer



You wont be able to pull a "protected app" without root, sorry.



This has nothing to do with the app being payed, except that usually only payed apps are "protected" (theoretically, free apps could be "protected" as well); think of it rather as a kind of "DRM".


Once your device is rooted, you can use "root powers" to pull those .apk files. This can be done either using a specialized app (such as AppMonster), or via adb pull if the ADB daemon runs in root-mode (it usually doesn't, but that can be achieved using adbd Insecure). adb root usually doesn't work on "production devices", so you have to use this different approach.


adoptable storage - How to Read marshmallow encrypted memory card?


Please help on this ..


I am using Marshmallow 6.0.1, in that i am using Memory card as internal storage. Unfortunately my mobile got stuck with booting.


Now, my most of the data are available in the memory card. so i took out the memory card and tried to read from other devices with windows system. But its failed



i googled about this, it says its difficult to read !. It would be really helpful if any one helped on this




Friday, January 18, 2019

How to mount Internal Storage as USB Mass Storage for recovering data?


I accidentally formatted my Android phone's storage partition while updating to Android Oreo today. When I tried to restore the backup I realized that the backup of the data partition had failed and basically is an empty file with 0 Bytes.


I would like to run PhotoRec over it but I'm somehow unable to get my phone into mass storage mode. It seams like Google has ditched it for MTP. I tried some apps from XDA but none of them really worked with my device. I was able to get the external SD mounted but not the internal storage. The custom recoveries that are available for my device only support MTP as well.


Does anyone have an idea how it could be possible to recover my files? I'm rooted and bootloader is unlocked.




Thursday, January 17, 2019

Can a Dream's camera really zoom from the camera app?


I upgraded my HTC Dream to CM6.1, and the camera app now has a zoom option. Is this a real zoom, or just a digital blow-up of the image? I'm guessing the latter.



Answer



There is no mention of physical zoom on the HTC Dream specification page. (To my knowledge no Android camera has that.)


6.0 marshmallow - Is there a way to exclude an app from Doze?


Doze has been bringing great benefit for my aging Nexus 5. But sadly, its presence also marks an end for my WhatsApp Web experience; since their "web" app is actually just a mere "interface" and still requires the phone to be actively connected to the Internet.


As we all know, Doze puts one's phone into a stand-by state where every unnecessary connection is halted. This means it will also halt the WhatsApp app in my phone (and thus in my computer's browser).



Now, is there a way to exclude WhatsApp from Doze? I mean, is something like that possible?


p.s., I prefer a non-rooted approach to this problem, but should rooting be my only option, so be it.



Answer



This answer is based off my Nexus 9 on MRA58K. It should be similar for any app.


Follow the steps as given below:




  1. Go to Settings → Battery





  2. Tap on the top right 3-dot menu, and choose Battery Optimisation.




  3. There should be a dropdown below the actionbar on the top left, choose All Apps from the list.




  4. Find your app in the list (in this case, Whatsapp)




  5. Tap on it. You will get a popup with 2 options, Optimise and Don't Optimise





  6. Optimise should be selected by default.




  7. Select "Don't Optimise", and press "Done" below.




  8. That's it. I hope it works for you.





2.2 froyo - Samsung Galaxy S having internal sd card problems


I have Samsung Galaxy SLCD having android 2.2.1 which is around one and half year old. Around one month back my it started showing message in notification bar 'internal sd card removed unexpectedly' and after that sometimes phone hanged and I got black screen with samsung written like we get at boot time and sometimes there is multiple 'force close' pop-ups of different apps on phone. Whenever phone gets hanged or it automatically shutdown I am able to restart it only after removing battery and putting it back again and it takes long time to boot up every time I restart.


Now from last 3-4 days I am having following problems that were not there earlier-



  1. If I install an app from market or through eclipse and I restart phone the app is not there.

  2. If I uninstall an old app and I restart phone the app is not uninstalled, it is still there.

  3. If I copy a file it does not show up or if I transfer a file through Bluetooth it is gone after restart of phone.



However I am able to open old files or app. I don't have external SD card on my phone. Is problem with internal SD card of phone or some other OS or phone related issue. Anyone know how to solve above problems.


Thanks in advance.


Anuj




Wednesday, January 16, 2019

internal memory Vs SD card




Possible Duplicate:
Unable to move few Apps to SD Card
Can I force move to sd card applications that don't want to be moved there?




Why do Android phones require installations mostly in internal memory? Is there any application which supports to transfer the root directory to SD card?




networking - How to change the default DHCP IP address range on Android 7.1.2?


As the title says I look for a way to permanently change the default IP address range form 192.168.43.xxx to 192.168.1.xxx.


Reason: On my router some of my devices get a static IP trough DHCP, in the 192.168.1.xxx range. Using the hotspot on the road I would like to have the same setup.


I have tried to change the range following this steps, but it did not work out on both of my devices. They are rooted and Lineage OS is installed. The last answer suggest an easy way to do this, but it is not possible in lineage OS.


Also this post from anroidpolice suggests that it is possible by an app, I look for a solution to do this with adb. I have no access to Google Play, and do not want it.



Answer



NOTE: Root is required.


Default DHCP IP address range is hard-coded (1), you can't change it without rebuilding ROM with modified source code. Or use a little hack.



When you switch on tethering, what happens (at least):



  • hostapd - the daemon which manages access points - is started.

  • Network interfaces are set up, IP address is added to Wi-Fi interface (hard-coded before Android Pie (2, 3), randomized afterwards (4)), and routing table is added (5) for local network (6).

  • dnsmasq - the DHCP/DNS server (up to Pie) - is started with hard-coded commandline arguments (7) (which can be set through /etc/dnsmasq.conf (8) otherwise).


So we can replace /system/bin/dnsmasq with a custom shell script, taking control of the process in between. Rename the original binary to something else:


~# mv /system/bin/dnsmasq /system/bin/dnsmasq.bin

Create script /system/bin/dnsmasq:



#!/system/bin/sh

OLD_SUBNET='192.168.43'
NEW_SUBNET='192.168.1'
WIFI_INTERFACE='wlan0'
LOCAL_TABLE='97'

export PATH=/system/bin

# delete old route, add new

ip route del ${OLD_SUBNET}.0/24 dev ${WIFI_INTERFACE} table $LOCAL_TABLE
ip route add ${NEW_SUBNET}.0/24 dev ${WIFI_INTERFACE} table $LOCAL_TABLE

# set new IP address on Wi-Fi interface
ip address add ${NEW_SUBNET}.1/24 dev $WIFI_INTERFACE

# inject new subnet in hard-coded arguments received from netd
set -- $(printf '%s' "$*" | sed 's/'${OLD_SUBNET}'/'${NEW_SUBNET}'/g')
unset OLD_SUBNET NEW_SUBNET WIFI_INTERFACE LOCAL_TABLE


# execute original binary with new arguments
exec dnsmasq.bin $*

Confirm the name of your Wi-Fi interface (wlan0 usually). Check with ip link or ls /sys/class/net/.


Also confirm your local network routing table is 97: grep local_network /data/misc/net/rt_tables. Android's routing is a mess, getting more complex with every new release. So I'm not sure if this has been persistent or not. Also before making any changes, check your routing policies and tables to figure out what you should put in your script:


~# RULES="$(ip rule | grep -vE 'unreachable|local')"
~# echo "$RULES"
~# for t in $(echo "$RULES" | awk '{print $NF}' | uniq); do ip r s table $t; done

SELinux rules also need to be defined if (all or some) not already defined and if status is enforcing. Use Magisk's suploicy or some other similar tool like sepolicy-inject:



# execute binaries from /system/bin
allow netd system_file dir { read open getattr search }
allow netd system_file file { read gettattr open execute execute_no_trans }

# execute /system/bin/sh
allow netd shell_exec file { read getattr open execute execute_no_trans }

# execute /system/bin/toolbox and its applets
allow netd toolbox_exec file { read gettattr open execute execute_no_trans }


# configure RPDB rules / routing tables
allow netd netd capability { sys_admin }

* not persistent across reboots, use some init.d script or replace /sepolicy in ramdisk


Set permissions on files:


~# chown 0.0 /system/bin/dnsmasq*
~# chmod 0755 /system/bin/dnsmasq*
~# chcon u:object_r:dnsmasq_exec:s0 /system/bin/dnsmasq*

Enjoy!



Another options is to modify the value of config_tether_dhcp_range (9) in Android framework as explained in this answer, but I haven't tested this.


Or you can setup complete tethering from commandline, running your own processes. This answer includes the instructions, though the question is different.


RELATED:



rooting - How to root the SM-G900F Android 5.0 without tripping KNOX?


I know the Galaxy S5 can be rooted without tripping knox on Android 4.4. but that "bug" has been fixed by Samsung, and the developer of TowelRoot won't fix it because he works by Google now. So TowelRoot will not work for me because I have already updated to Android 5.0.


Is there any other possible solution to root the Samsung Galaxy S5 G900F Android 5.0 without tripping the KNOX WARRANTY VOID to 0x1 or 1.




Screenshot:

About Phone

(Touch for a larger image.)




Hope anybody will find a solution! Thanks!

Edit: Just updated my phone. Still on 5.0, updated the screenshot.




4.0 ice cream sandwich - Stuck on "Turning Wi-Fi on..."


I've a Wintouch Q75s Tablet running on Android 4.0.4 ICS. I was using its Wi-Fi with no problems until yesterday, the Wi-Fi didn't want to turn on. I've noticed that my MAC address changed to Unavailable which I think indicates an error.


What can I do to use my Wi-Fi once again?


I contacted the vendor but they didn't respond. Is there any hope my Wi-Fi can run again?


Edit: It started happening when I removed the wpa_supplicant. Now the WiFi does not want to turn on. However, the portable hotspot starts successfully without any problems.


Edit: The problem was solved by flashing a new firmware from Wintouch's website, the firmware was Q75SJ30401.IMG (Barcode Q75SJ304xxxxx)


A list of available firmwares for Wintouch devices can be found here


Thanks for everyone who helped me :)



Answer




As it turns out, the problem was caused by deleting wpa_supplicant. Wikipedia can offer a little insight on what that means:



In addition to being a full-featured WPA2 supplicant, it also implements WPA and older wireless LAN security protocols.



It further is responsible for the job to



review a list of currently visible networks, select one of them, provide any additional security information needed to authenticate with the network (e.g. a passphrase or username and password) and add it to the preference list to enable automatic reconnection in the future.



As it is said: curiosity killed the cat -- and deleting wpa_supplicant makes it quite impossible to use WiFi.


There are three corresponding files on Android:




  • /system/bin/wpa_supplicant is a binary (i.e. the program itself)

  • /system/etc/wifi/wpa_supplicant.conf is the default configuration (as the path correctly suggests, in the read-only /system area), which also includes device-specific settings, plus some "inline documentation" in form of comments

  • /data/misc/wifi/wpa_supplicant.conf is located in the writable part. It repeats some of the contents from the system file (most likely copied from there on initialization -- as /data gets completely wiped on a factory reset, those things must come from somewhere), but skips the comments. Furthermore, this file memorizes those networks you've connected to, including SSID, encryption used, and the passwords, all in plain text [sic!] -- that's where those "WiFi password recovery" apps get their information from


So if the latter config was deleted, it simply would be re-created after a boot. Of course, all your saved networks would be lost -- but that's a minor issue compared to the others:


If the system-config file gets lost, the binary does not now where to look for the interface, as that's configured here (e.g. ctrl_interface=tiwlan0). This would also explain the missing MAC address: no known device, no known MAC address. Still, recovery from that should not be too hard: there are not too many different interface names, and other settings (like the chipset used) can be taken from specifications -- so root provided (which is the case, or you could not have deleted it), you could re-create a matching file with a little try-and-err.


If the binary was removed, options are narrow without a backup. Having a similar device available running the very same ROM, you could extract the binary from there (the config as well, or course). If you have at least an image available for your current ROM, you could extract it from there as well.


If all above fails: Yes, flashing a ROM would solve the issue as well -- as this ROM should contain the necessary files. It's quite unlikely you damaged your hardware that way.


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