Sunday, June 30, 2019

sd card - change download folder to external sdcard in ttpod


I am new user of Sony C6603, with Android 4.2.2. For free music download, I use TTPod. I find the music can be downloaded for free in this App, but I wonder if I can change the default download folder (/storage/emulated/0/ttpod) to somewhere external sdcard (/stroage/sdcard1)? Or maybe such a change prevent some functions of this app?




Saturday, June 29, 2019

contacts - Restore only part of nandroid image


In attempt to install 2.2 I've deleted all my contacts(contacts were saved on phone, not as google contacts)
I've done full nandroid backup while phone still had those contacts; however when I try restoring image; I get bootloop.
Nandroid backup contains system.img, data.img, cache.img and boot.img;


I'm wondering if I can restore only data.img to get contacts back.



I have thought of 2 other solutions:


a) make a new nandroid image of current status; verify that it's ok by doing restart; then open copy database with contacts from one backup to another.


b) open database with contacts from data.img; and manually retype 200 phone records.


Is there any smarter (quicker, easier) way??



Answer



Clockworkmod recovery has an 'Advanced Restore' option that allows you to pick just one of the following partitions: boot system data cache sd-ext


If you don't already have it, download ROM Manager from the market and this will help you install the clockworkmod recover.


(I've no idea whether this will solve your problem, but yes you can restore the data partition! ;) )


Friday, June 28, 2019

applications - Error -504 on appliation installation


Yes. I've read all other questions regarding this problem. Like this one:
Error 504 when downloading apps from Play Store?

It's the same problem as this one but with more background information and an other app:
How to fix installation error -504?


The details:
My device is an Ulefone Be Touch 2 running Android 5.0.


My connection is perfect. To be sure I tried different networks, among them are 3G, 4G and wifi on ADSL, VDSL, cable and fiber. I've also used Tor and 3 different VPN providers in 3 countries on 2 continents. Let's say I ruled the network out.



  • A single app does not install: OpenKeychain.

  • Currently I have 126 apps installed.

  • It does not install via desktop browser > play store > install button.

  • I have enough free space (40GB). The app is 7MB.


  • Re-adding Google account and clearing caches did not work.

  • Even a complete device wipe and re-install didn't work.

  • Downloaded the apk and tried manual installation, same error.


I also own a Nexus 7 (2013 wifi) and the app installs fine on that device.




How do you test the disk integrity of your Android tablet's file system?


My Lenovo ThinkPad tablet is rather new (only a few months old), but I'm worried that it might be starting to contain some disk errors.


I just got a "Cannot read page from file system trouble ahead" error message from the LectureNotes application and I'm not sure what it means, especially since a Google for the error produced no results.


Anyways, is there a chkdisk, Hard Disk Sentinel, or something for the tablet's SSD drive that I can use?





lock screens - What is an "Emergency Call," and can I set number for it?


On the default lock screen, whether using pattern or pin, there is a button at the bottom which says "Emergency Call". But if I try to call my home number or anything it tells me "That is not an emergency call." What does it let through? Is it only 911?



Is there any way to tell it to allow a certain set of numbers from the emergency button, like to set a list of emergency numbers such as: 911, Home and Wife? This would seem like it would be very useful, so if someone finds you smooshed on the road, they know these certain people should be called.



Answer



The purpose of that feature is so that if there is an emergency you can dial an emergency number (911) without having to unlock the phone. Its not so that someone else can use it to call your wife/mother/ICE number. It's not a bad idea since if you were hurt then someone else could inform those people but as I understand its just for emergency numbers (although to be honest I don't know of any other emergency numbers other than 911).


Edit: I just realized that if you lost your phone you wouldn't want others to be able to make calls from the phone (another reason why it only allows emergency numbers). However if, as you suggested, it only allowed certain numbers... that would be cool.


Google Photos Add a Location on Multiple Files


I am using Google Photos for my archieved photos. I have lots of photos from past(When the Photo Location not involved) Now i want to add the location for my Photos to organize them. It is possible for 1 image. But there thousands of them. Is there possible way to do it Folder by Folder or Multiple Photos Selection and Add Location to them?enter image description here





htc desire hd - Problems with music playback - Music File corrupt?



I have an HTC Inspire 4G (Desire HD, Ace), and whenever I have headphones plugged in and am listening to music, the music player will randomly start playing new songs, pausing and starting a new one every second or so, until I unplug my headset. I plug my headset back in, then at some point my phone will do this again, and I have to start this process all over again.


It started on the stock sense rom using the stock sense player when I first got the phone. I then tried using winamp, same problem. I rooted the phone, flashed CM7, and am now using Cloudskipper as my music player, still the problem persists. I even unchecked headset controls, still continued. I even tried another pair of headphones, however both were BEATS headphones. What is going on??



Answer



It was something wrong with the firmware in the phone. I installed a new kernel with the beats audio mod and everything worked correctly after that.


Thursday, June 27, 2019

security - How to report potential abuse in Aptoide without becoming a member?


The Aptoide store is an alternative platform where you can get Android apps.


I found an app on Aptoide store via Google that has a size of 3.3 MB. The same app with the same app-version in F-Droid store has only a size of 1.1 MB. So I assume that this app is infected by malware.


The Aptoide's info about the suspicious app is



Xxxx is Unknown


This classification was assigned because: there is not enough information about the application in Aptoide Anti-Malware platform.





  • Scanned with Anti-Virus: Zoner Anti-Virus Sophos Anti-Virus AptoideGuard Malware Analyzer


    No Infections Detected No Infections Detected





In the Aptoide website belonging to the app, there is a "report abuse" button but this requires a login (which I don't have and don't want to have)


In the stores impressum, I found an email address so I wrote an email to Aptoide store admin. I got an automated email reply that I should use a web form to contact Aptoide with a link to the web form. So I filled in the web form and submitted it.


This was a week ago and since then nothing happened. The suspicious app is still available in the store and I got no email response.



Is there any other channel to Aptoide where I can report potential abuse without becoming a member?



Answer



To answer my own question: Non-member complaint was not possible in my case.


After registering as a new member and then using the "report abuse" link, Aptoide's "copyright infringement-workflow" did the job after one week.




After sending the second form I registered as a new user, loaded the page with the potential malicious app, flagged it as "virus", wrote a comment and pressed the "report abuse" button and send my text.


As a result of "report abuse" activity, I got an automated email



Thanks for your email!


Please submit your support request in this link



The form request is essential for us to help you, the ticket generated by this email will stay on hold with low priority until you send us your request via the form below!



where the link points to https://aptoide.zendesk.com/anonymous_requests/new


After one additional week, I got an email that the app has been removed from the store.


It was a reply to pushing the "report abuse" link that was made to handle copyright problems with the standard email-text for this use case



Aptoide is deeply committed with the respect of the IPR of Android Developers.



Nevertheless, the suspicious app is not available anymore.


terminal - How use Escape, directional keys on the virtual keyboard?


I recently bought Better Terminal Emulator Pro, and I like it, but how do I use the Escape key and directional keys? For instance, I'd like to switch between modes in vi or use the up and down arrows to cycle through my command history.


I have a Samsung Fascinate. No D-pad.



Answer



BTEP has a "Using Better Terminal Emulator Pro" page on their wiki which explains most of the special shortcuts and keys. The basic breakdown of what you're looking for is:


For directional input: Either use a keyboard that supports this or use BTEP's virtual direction pad feature. You can access it by tapping the screen when the keyboard is visible, long-pressing the screen when it isn't, or pressing the Search button. The cursor should change to a > character to indicate you're in VDP mode, and you can swipe your directional input (i.e. swipe up for the up key).


For ESC: This is usually mapped by default to the volume up key, but you can remap it to any of the available programmable shortcut keys. You can also press the Search button then press [, since Search is mapped to the control character on devices that lack a trackball or dpad (as well as activating VDP mode) and ^[ (CTRL-[) is the ESC character.


troubleshooting - Why external microphone doesnt work on some Androids (like LG G5)


I want to solve the problem with new Android phone (I use LG G5; and Motorola-Turbo2 too, but i dont care about it).



I use two kinds of microhpones (4 pin) :



enter image description here


This mic actually has only 2 working wires (3rd an 4th rings connected to MIC board). Top 1st and 2nd rings are just empty.



enter image description here



I can use WIRED mic perfectly with LG, but not with MOTOROLA (MOTOROLA cant see that as "mic", thus doesnt get any voice from it).


However, I tried to use Wireless microphone system with LG, it cant obtain voice (i have tried all ways), but MOTOROLA works with appliance perfectly.


As you know, the receiver outputs audio exactly on the same 3rd and 4th rings, but in addition, it adds some electrical power too, as a person is able to hear it softly in speakers (as opposed to WIRED microphone, which doesnt output anythig if something doesnt powers it)



Addition: I am a bit technician and tried to manually cut wires & connect lines with each other, to every possible combination, but in none of the case the LG worked with the applicance...


p.s. I dont think that it matters whether 3rd or in 4th ring is "ground", because when I have exchanged 3rd and 4rd (ground & microphone) wires, it didnt matter for phones. They are working the same way, only with "beloved" types...



Answer



tl:dr; Based on your observation that it works with Moto but not with LG, my guess is that it is due to conflicting TRRS standards -there are two standards. OMTP which is the older standard and CTIA/ AHJ which is the standard all newer Android devices are expected to follow


Details and solutions to overcome are listed




From TS/TRS/TRRS/TRRRS: Combating the misconnection epidemic by Allan Tépper - ProVideo Coalition which talks of this problem on Android phones


There are two TRRS standards - OMTP and CTI / AHJ





  • OMTP is the older standard



    The older OMTP wiring standard calls for Tip to be used for left audio, Ring 1 to be used for right audio, ring 2 to be used for microphone, and the sleeve to be used for ground. According to my research, this older OMTP standard is found in old Nokia (and also Lumia starting from the 2nd generation), old Samsung (2012 Chromebooks), old Sony Ericsson (2010 and 2011 Xperias), Sony (PlayStation Vita) and the OnePlus One I used to own before migrating to a Nexus 6 for use with Project Fi.





    The newer CTIA/AHJ wiring standard reverses the last two mentioned, so it calls for Tip to be used for left audio, Ring 1 to be used for right audio, ring 2 to be used for ground, and the sleeve to be used for microphone. According to my research, this newer CTIA/AHJ wiring standard is used in products from Apple, HTC, latest Nokia, latest Samsung, Jolla, Sony (Dualshock 4), Microsoft (including Surface, Lumia, and XboxOne controller with chat adapter) and most Android phones.






From this, it appears that your devices are using different standards, though it's difficult to say which device is using which standard , but Moto being the older phone is probably using the older standard while LG is using newer standard.


Pictorial representation (see for discussion on more phones including Apple )


enter image description here


Problems in connection are around Ground - since mic and ground are different in both standards. See also from SE.Electronics Hacking a TRRS to TRS adapter


Solutions



Samples of the last two options are linked at the end of blog here



Before you invest money, you can possibly verify by swapping the ground and mic , see this example from SE.Electronics





Edit: Post your edit today , saw This you tube video suggests that Wireless TRRS microphone adaptor worked to fix the wireless problem on LG V 10. I don't have any details on that or why it works but maybe worth giving it a shot considering, it's not expensive


Wednesday, June 26, 2019

sony xperia - In a dual sim phone, must both sims be used?


I'm looking at getting the Xperia X Performance. It has two slots for SIM cards. Will the phone work alright with only one normal SIM and will all the apps still work ok? A long time ago I red most apps don't work for dual sim, but I'm not sure if this has changed. (if this question is too specific, feel free to answer it for any phone)



Answer



user manual for your specific device does not mention such restrictions and it also gives out the combination of SIM networks permitted when both SIM's are inserted, so there is no reason to believe app restrictions whether you use one SIM or both


PS: My device is Moto X Play normally used with one SIM but works fine with both SIMs


Tuesday, June 25, 2019

nexus 5 - How to prevent someone from powering off an android device?


I have a Nexus 5. Even if I enable security passcode or pattern, someone can still switch off my mobile using the power button. How can I prevent it?



Answer




You cannot (barring any hardware tweaks.)


If you root your phone and install a custom ROM, you may be able to remove the "Turn off" and "Reboot" options from the Power menu. However, Nexus 5 (as do most modern phones) has a hard-wired feature, where holding the power button for 10 seconds shuts the phone off. This is done so that you can restart the phone if it freezes up. Since Nexus 5 doesn't have a removable battery, this hard reset would be the only way to shut it off without having to wait for the battery to drain.


If you are technically inclined, you can always make hardware modifications to the phone which would prevent the Power button from functioning normally. However, such mods are not for the novices, and will certainly void your warranty.


multi user - Alternative "File Open" (not stack "DocumentsUi") for WhatsApp?


DocumentsUI, the AOSP standard "file manager" is quite buggy here (I use Lineage 15.1), especially in the context of multi-user and work profile (meaning it does not show files for other users then the main user and is hence not usable).


For "simple" file browsing, I therefore substituted DocumentsUI app (com.android.documentsui) with com.simplemobiletools.filemanager.pro which works much better.


My issue and the core of the question is, that the glorious "facebook" WhatsApp Manager when attempting to attach files, resorts to opening the intent specifically for com.android.documentsui and fails even to open com.simplemobiletools.filemanager.pro even in the case that it is the only filemanager still installed. Hence I cannot attach files in other users in Whatsapp, due to the buggy DocumentsUI and WhatsApp not being willing/capable/well-enough-designed to make a general "FileOpen" intent, instead of referring directly to com.android.documentsui


I understand that WhatsApp is particularly made very little IT-able persons, who do not care about privacy very much, therefore it is clear that the WhatApp is not geared to allow/accomodate for educated and more able users which might desire to use not the standard com.android.documentsui.



An answer to this question would be to provide an insight which com.android.documentsui would be able to integrate well with WhatsApp Messenger




audio - What are the options for streaming music from PC to phone?


I'm interested in being able to play music that's on my computer through my phone - mostly so I can plug the phone into speakers in different parts of the house. Looking for apps, I realise that there are actually some pretty different ways you can do this:



  1. Run a music server that's accessible over the internet, access through app or web browser on phone (eg AudioGalaxy, Subsonic)

  2. Run an audio streaming server that provides a single audio stream (eg SoundWire - you drive the choice of music from the PC, and the phone is just a passive receiver)


  3. Share your music folder, and use a Samba (or equivalent) file share app like ES File Explorer to access the files on your phone and play them from there.

  4. Use DLNA-supporting apps at both ends to play and share music (eg, Windows Media Player on PC, and AllShare or Skifta on phone)

  5. Sync music from PC to phone regularly, and just play it from there.


Am I missing any? What are the strengths and weaknesses of each approach? One concern for me is I'd rather not have music going via the internet, because then it would count doubly out of my internet usage cap.


Also, are there apps (with the right combination of PC software) that can combine these approaches? It would be great to be able to either drive a playlist from the PC, or select songs from the phone. Extra bonus points for solutions that work for video (ie, films) as well.


My PC is Windows XP, my phone is Samsung Galaxy Note.


EDIT Incorporating answers from below into the original list.




nexus 5x - Persistent malware despite factory resets


I'd love your thoughts on this. Several months ago I mistakenly clicked a popup on a website, and since then have been getting intermittant popups says "your sim card is infected...etc" and it tries to direct me to the play store to install some sketchy "antivirus" app (which I have never downloaded).


The issue is, I've done multiple factory resets, but after a few days I get the popup again. I've tried 10 antivirus apps from the play store, google chrome's malware detector, but everything comes up clean. Most recently, I used TWRP to completely wipe all data from my phone (wiped Dalvik, system, storage, data, cache, everybox I could check), and before reinstalling Oreo 8.1 I wiped all my data being synced by Google. Still, a few days later, I get the popup, without visiting sketchy websites or downloading non-standard apps in the interim.


I figure there is either something that is being synced to my phone from my Google account (I use google Fi and it requires I use my google login), or there is some niche in my phone that is not getting wiped. The only other thing I can think of is that these are just regular popups, and not part of malware, but that seems unlikely since I didn't get them before I clicked the banner that one time.


Any suggestions on how to get rid of this thing? Thanks!




linux - How do I get my phone to connect the internal SD by USB?


I recently rooted and upgraded my Samsung Galaxy S2 to version 4, ICS.


Since doing so, when I connect my device by USB to my Ubuntu computer, only the 12GB internal storage shows up on my desktop and in Banshee.


How do I get my 16GB SD card to also mount on Ubuntu, so that it is available for transferring music files and so on?




Update


According to one answer below, and also in instructions I've now seen elsewhere on the web, I should be able to adjust my USB connection mode by following the following instructions:




1.Bring up Settings.


2.Click More… (under Wireless and network).


3.Then select USB utilities ~ Set USB cable connection mode.


4.Select Connect storage to PC



However, I am stopped at step 3 because I do not have a "USB Utilities" option under Settings -> More.... What I have looks like this:


settings more


I don't know if this is the make-or-break factor that will get my USB connectivity as hoped, but in any case, shouldn't I have the option since everyone else seems to? What can I do to get it?





Details


Here is the storage settings as seen on my phone. As you can see, there are 2 entries of "Internal Storage", one of about 2GB, and one of a little under 12GB.


Then there is an "SD Card", which seems to have about 15 GB, but it is grey and I am unsure if this is really my SD card or not.


Then under "USB Storage", I have the option to mount an SD card, which is problematic, because I already have my card inserted, and seemingly mounted (as described after this image):


storage settings


If I press the menu key while in the storage settings interface, I get two options:


options


For "USB computer connection", I have these settings which I don't think I want to change, because MTP does not work with my Galaxy Tab, so I'm not confident it will work with my Galaxy S2. I tried the camera option, but that made it so my phone appeared with a camera icon on my computer, limited the directories, and did not do much to help:


USB computer connection


For "Storage configuration", I tried "Use internal Storage" both on and off, but it does not seem to make a difference:



storage configuration


Here is a screen shot from PowerAmp, which seems to think my music is located in a directory called "emmc". The music is accessible from within PowerAmp, but I can not access it when I connect my phone by USB:


power amp emmc


PowerAmp tells me I can actually find the emmc directory, where my music seems to be stored, in two locations, /emmc and /mnt/emmc:


power ampt two emmcs


When I connect my phone by USB, it looks like this. Note no emmc directory, nor any Music directory, and if you look at the side, there is one 12 GB Filesystem, no entry for my 16GB SD card:


12GB filesystem


And lastly here is the 12 GB drive's properties:


12GB properties



Answer




The solution was to wipe and reflash the ROM. I guess the earlier ROM I had was just messed up as far as USB is concerned.


Monday, June 24, 2019

6.0 marshmallow - Will the Android M developer preview get an OTA update to the stable release version?


If I install the Dev Preview 3 on my Nexus 5 right now, will I get an OTA to the stable build or will I have to flash it as well?



Answer



No, you need to flash it since Google only provides the stable release as downloadable image on Factory Images for Nexus Devices.


From Official Android Developer site,



Note: Developer Preview 3 includes final APIs and near-final system images available by both download and OTA. At the full public release of Android M later in Q3, final system images will be available by download only, so you'll need to flash manually to your test devices.




voice recognition - Hotword detection of google now / search not woking


After switching to a new ROM I restored Google Now using Titanium backup but however I no longer have hotword detection enabled neither do I have the option to enable it (It is simply missing)!


It used to say Search, or say "OK Google" but now it only says Search


However, speech recognition in general works fine!


Other relevant information:



  • Using Samsung Galaxy SII

  • Using Vivek ROM but experienced same problem on CyanogenMod





kernel - How can I check if a device is booted into safe mode from adb?


Is it possible to use adb to detect whether a device is booted into "Safe Mode" or normal mode?



I've looked through the output of getprop and other command-line tools and haven't found any good indicator of safe mode, at least not on my N5/hammerhead device.


Update: I'm trying to check whether or not the device is in Safe Mode, not to force it into Safe Mode. Putting the device in Safe Mode programmatically is relatively straightforward and well-documented.


Any ideas?




Sunday, June 23, 2019

Why does the STORE button on Amazon Kindle go to the website instead of the in app store?


I have the Android Amazon Kindle app installed on both my Galaxy S phone and my Archos 10" tablet.


I keep the software updated so I'm sure the latest version is installed.


I am logged in with my account on both devices.



When I press the STORE button I go to the inprog Kindle store. But when I press the STORE button on the Archos it starts the web browser in stead.


Now, I have bought ebooks before from both devices and I am sure that previously, the Archos also displayed the inprog store. It's much easier to use the inprog store display than the full Amazon web site version.


Does anyone now what could have changed this behavior ? I looked for some setting but found none.




Saturday, June 22, 2019

sync - Google account not saving Wifi passwords, apps, etc


My favorite part about Android is how Google backups almost everything for you without you actually really noticing. I just got a Nexus 5 and logged in to my Google account right away. I noticed it did not start installing all my apps right away and now when I go over to friends' houses their wifi passwords aren't saved from before. This is really annoying cause they all have default router passwords that are extremely long.


I installed a few ROMs just to play around with the phone, and each time I did the initial setup and signed in to Google, it would not sync anything...


I have "Back up my data, Backup account, Automatic restore" all set in settings. Any ideas why this is happening to my Google account?



Answer



That's a pretty well known "feature". Don't worry, your data is backed up there – it only does not restore. And you cannot even really delete it there. So in some way, it's "safe"...



Things you might want to look up in this context:



There are many many more references I could give, but that would be a bit much for here. So a last hint: check the "Linked" and "Related" question links on the ASE Q&As I've linked here.


cyanogenmod - USB Debugging is not showing in ADB devices



I Enabled USB Debugging on CyanogenMod 11 for LG Optimus L7. The Device is showing in Device Manager.


But, it is not showing in ADB devices list. And there is no notifications for USB debugging.




Friday, June 21, 2019

hardware - What do I need to improve performance of the Android emulator?


I currently use Ubuntu 10.10, and I find the emulator extremely slow. However, I have an Intel Core 2 Duo CPU (T5200 processor) with 4G of RAM. What do I need to improve performance? Better hardware? A minimal Linux distribution?



Answer



Past versions of the emulator were extremely slow on all platforms. However, there are now native x86 versions of the emulator; performance should be considerably improved. You should be able to get them through the Android SDK (or through Intel's website, see this Stack Overflow post).


However, I would recommend (for end users) Memu instead; it's very fast and reliable. Genymotion is the best alternative if you aren't on Windows.


settings - Developer options for a second user on Android 4.3


I have a Nexus 7 (2013) edition with Jelly Bean and set up several user accounts. I have enabled developer options on one account (clicking Settings::About tablet::Build number 7 times) and everything is working as it should.


Now I would like to enable developer options on a different user account. However, no matter how many times I click the Build number field, the Developer Options refuses to appear.


Is there a way to enable Developer Options on another account? Is there a way to switch Developer Options from one account to another?


(I have tried clearing settings in the account with developer options. It did remove developer options, but it still didn't allow developer options in the second account).



Answer



Only the main user (owner) has access to Developer Options.


Related question:




Thursday, June 20, 2019

camera - Taking raw photos using Android devices



I have a Samsung Galaxy S4. Is there a way in Android or an app that can take raw photos? I.e. have the raw camera data to process in a program like Photoshop. I am using Android 4.2.2.



Answer



NO, there is no public API that allows developers to create camera apps that takes raw photos. Based on what I've read in dpreview.com, implementation would have to be at driver level, and specific to each device.


Also, raw files taken by camera phones would also look nasty.


vibrate notifications only when receiving emails from certain addresses?


Is it possible to set vibrate notifications when receiving emails from a list of email addresses but not when receiving emails that don't come from that list? Either using the default Gmail app on a 2.3.5 Android phone or something else.


I have a bunch of labels defined, but on the Gmail App I got the following menu: Notification settings with:
Email notifications [x]
Labels to notify


In Labels to notify I only have:



Inbox off
Priority Inbox Zeta, Always, Notify once for new emails


But I can't add more labels to this menu...




audio - How can I boost the music volume higher than the max limit?


I have a Samsung Galaxy running Android. When I put music to max, it's not loud enough in my ear phone.


How can I boost it beyond the maximum volume? On Linux I can do this with ALSA; is there a way to do it in Android?


Follow up:


All of them are paid media players so FREE is almost unavailable. Using for the moment: Cubed



Answer



As far as I know audio amplifying circuits will have a fixed amplifying ratio (gain). By adding resistance (either digitally or using analog POT) on the input (or output?) signal the volume is reduced. Hence in my opinion it can't be done.


Switching over to in ear phone buds like:enter image description here instead of: enter image description here will provide better noise isolation and there by improve listening experience. If the music is being played from files stored in the phone, you can edit them to increase volume with audio editing tools like Audacity.


Wednesday, June 19, 2019

Does Google Navigation Live Traffic reroute during the journey?


After setting a destination and start navigation and my journey, if a new incident occurs and slows/blocks the route, is Google Navigation able to update the route and find a faster alternative automatically before I get near?



Answer



In the new Google Maps app we finally have this feature. From this post on the official Google blog:




Enhanced navigation: In addition to current traffic conditions, we’ve added two new features to help you navigate around traffic. You can now see reports of problems on the road that you can tap to see incident details. While on the road, Google Maps will also alert you if a better route becomes available and reroute you to your destination faster. This feature is available only on Android and is coming soon to iOS.



From http://productforums.google.com/forum/#!msg/maps/hL8UXVgRMcE/6PfnMZP8tIQJ



Once you are in the "navigation" mode, you will see a status bar on the bottom that gives you an estimate of time remaining to your destination. The text of the time remaining changes color based on the traffic situation. The colors correspond to the former colored traffic light dot. If the words are red, that means there is some serious traffic on your route. Yellow indicates areas of slowed traffic. Green indicates that there are no anticipated delays.



external sd - When should I run a consistency check on my removable MicroSD card?


I own an Android device with a removable MicroSD card. The card uses either FAT32 or ExFAT technology. These are "non-journaling filesystem" technologies, so the data on the cards can become corrupted in certain cases.


Perhaps I should run a consistency check (e.g. fsck / Chkdsk / ScanDisk) every so often.


A) How often should I run a consistency check on my MicroSD card?


B) Also, if my device sometimes freezes and I must power it off using the power button, must I run a consistency check every time?



Answer



Usually you don't need to run consistency checks on filesystems manually. vold runs filesystem check (fsck.exfat or fsck_msdos) everytime before mounting a supported filesystem (including exFAT and FAT[N]) on secondary external storage.


Tuesday, June 18, 2019

Can I disable USB Debugging on Android smartpones from Windows via adb.exe?


I have to install Applications on dozens of android smartphones and I am currently writing a program to automate this process. I know I can't remotely enable USB Debugging, so my question is: Can I use ADB.exe to send a command to the smartphone that disables USB Debugging immediatly or puts the disable in a command queue to execute at next reboot?


Thanks



Answer



If the device in question is ed, you can write to the system settings directly from a shell command in adb shell. The name of the setting to write depends on which Android version you have.


If your device isn't rooted, you can't change the USB debugging setting from adb or any non-system app.


installing app without copying apk file


How can I install some apps to android without copying the .apk file? I can do the same in iOS. that must be a possible thing, but I couldnt find it neither here nor Google.


EDIT:


Imagine you want to install your own app to someone's device without letting them have the apk file.



Answer



Provided you have physical access to the device, you can manually install your app by doing the following:




  1. Install Android SDK tools from this page (Download for other platforms → SDK Tools Only.)

  2. Install USB drivers for the phone (usually from manufacturer's site.)

  3. Turn on USB debugging on the phone (in SettingsDeveloper options)

  4. Connect the phone via USB (you can also do this over Wi-Fi with a number of apps if the phone is rooted.)

  5. Open Command Prompt or Terminal and navigate to the "platform-tools" sub-directory of where you installed the SDK tools.

  6. Issue the following command: adb install path_to_apk\your_app.apk


Keep in mind though that you are still essentially "letting them have" the apk, since the installation simply copies the APK file to the appropriate directory on the phone (usually /data/app or /data/app-private) and registers it with Android's Package Manager. A knowledgeable enough user can still retrieve the APK.


How to edit 'etc/hosts' file in non-rooted phone?


I'm using LineageOS 14.1 and don't want nor need to root it. How can I remount /system rw and edit /system/etc/hosts?


All answers in "How to edit 'etc/hosts' file?" expect a rooted phone.



Answer



Unless I missed something, that is not possible. Without root access only the mechanism of flashing an update (via recovery or OTA) can modify /system. To be accepted, such an update archive must be signed with the same key as the ROM – which is something only the developer of the ROM (here: the LOS team) can do.



There might be a way via a custom recovery which lets you edit all file systems directly (see e.g. ). But without knowing what device it is, it cannot be said if a matching recovery exists (you can check that in the Devices section of their website for official images, and search XDA for unofficial ones). Apart from that, it's either the device or not editing any file within /system.


security - Bypass "Swipe up to unlock" on Android Lollipop lock screen


I recently flashed my Nexus 4 to Android Lollipop using the factory image.


I have set a pattern lock for unlocking the device. But whenever I turn on the phone, I have to click on the little lock icon or swipe upwards to bring up the pattern unlocker dots.In KitKat or earlier versions, those dots would come up as soon as I turn on the phone.


Is there any way to set the pattern dots visible on lock screen by default? I went through all the settings but in vain.



Answer



As far as I know, currently there is no setting to turn off the "safety lock" due to the addition of notifications on the lock screen. (Strangely, the lock is still there even if the user chooses not to display any notification)



The best bet to bypass this is to use Smart Lock's Trusted face, a new feature in Android 5.0 Lollipop similar to previous face unlock. You can bypass both "safety lock" and "pattern lock" simultaneously by looking at the phone while on the lock screen. I would say there is no downside (as far as my experience goes). If it fails to detect your face, then you just have to swipe up and draw the pattern normally.


How to set up:



  • Go to Settings - Security

  • Tap "Smart Lock", confirm your current pattern lock

  • Tap "Trusted face" and follow the instruction


Is there a maximum number of devices allowed on a Google Play Account?


Many schools are looking at using Android tablets in classrooms. Some have classroom sets of 35-40 tablets. As a means to manage apps, having them tied to a single Google Play account would be ideal. Is there a maximum number of devices allowed?


This setup would also be cost effective, if the school uses any pay apps, as the app is linked to the account, not the devices. Does anybody have any experience or knowledge beyond, "I have 5 devices in my family all synced and it works."?




handcent sms - How can I send SMS messages from my Google Voice number without using the Voice app?


I would like to send text messages via Google Voice, as it is the number I give out for voice calls. However, I find sending SMS through the Voice app to be a bit cumbersome. The new widgets improve this somewhat, but it is still awkward.


I would prefer something with an interface more like Handcent or ChompSMS.


Are there any other apps that support sending SMS via Google Voice?




Monday, June 17, 2019

root access - Why are the rooting apps not working anymore?


A couple years ago, it was easy to root any device: Install KingRoot, KingoRoot, or a similar app, hit the large ROOT button, and let it do the rest. After 5 minutes or so, a green "Root Succeeded!" prompt will pop up, and we can choose to keep the root app, or uninstall it and install a clean root manager app like SuperSU/Superuser.



How do they work? Why aren't they working anymore? And if they work, should I use them or not?



Answer



I had this question a few months ago, and I found this answer through some research, so I thought to share my research in this site by answering my question, considering the fake information online. (For example, the official KingoRoot site says that it can root Android Oreo which is completely wrong information)


How do the rooting apps work?


There are quite a lot of rooting apps, KingRoot, KingoRoot, Z4Root, Root Genius, Universal Androot to name a few popular/used to be popular apps. All of them use exploits/vulnerabilities/loopholes in the Android OS to give themselves privileges reserved to the system apps or even the Android OS itself. And then they mount as read/write the directory named /system which houses the processes required to get the system running and the system apps, and place a binary named su in a place of the directory, namely /system/bin/su. If some app requires root, the app executes that binary, and you see a prompt whether to allow or decline root access.


The exploits/vulnerabilities that get discovered are given an CVEID, and then detailed in the CVE website, and fixed in the Android Security Bulletins. An example is the infamous DirtyC0W vulnerability which was given the CVEID CVE-2016-5195, which plagued and still plague the older Linux kernels. Almost all of the apps mentioned above exploit this vulnerability.


Why are the rooting apps not working anymore?


As referenced in the Bulletins above, Google fixes a series of issues in Android every month. So the scope of the vulnerabilities is highly decreasing. All the vulnerabilities the rooting apps uses to date were fixed in the security patches somewhere around 2018 January.


But there can be issues some manufacturers forgot to patch! What about them?


On Android 6.0.0 or newer, that will just cause the device to not boot anymore. To understand the reason for this, we have to look at a concept named Chain of Trust.



Chain of Trust, abbreviated CoT, is a security mechanism that was introduced to protect the Android OS from viruses and unauthorized modifications. It works like a chain of hardware and software, where each part verifies the next part. On a step-by-step basis:



  1. When you power on the device, a hardware function (sometimes called Boot ROM) starts. The Boot ROM is burned into the hardware and cannot be changed.

  2. The Boot ROM verifies the first software in the CoT, the bootloader which is a raw binary blob, sometimes called the preloader. (Also the Boot ROM sometimes loads and uses special custom partitions/binaries depending on the vendor) If the bootloader does not pass the verifications, the device shuts down. If it passes, the Boot ROM runs the bootloader.

  3. The bootloader checks the options passed to it by the Boot ROM, and selects the appropriate boot mode. The usual boot modes which exist on almost every device are the normal Android boot, Recovery and Fastboot/Download.


If the bootloader is locked it verifies if the next part of CoT to run is intact, and if it is, the bootloader runs it. If it is not, it can shut down, reboot, or get stuck in a special bootloader mode depending on the device model.


If the bootloader is unlocked it does not verify the next part of CoT but directly loads it.



  1. The next part is called the boot partition. It handles the way to boot the system itself. In Android versions on/newer than 6.0.0 (Lollipop), it also verifies if the system is intact, and if it is modified, it shuts down.



As mentioned first, these root apps exploit the vulnerabilities to modify /system, which is verified by the boot partition as mentioned in Stage 4 above. So any modification will cause the device not to boot. This state is commonly referred to as a "soft-brick", which can only be fixed by a re-flash.


So the newer devices require the bootloader to be unlocked if you want to root your device. These devices are rooted by flashing a recovery with more options than the normal recovery (like TWRP, ClockWorkMod), usually referred to as a custom recovery, and using that to modify the boot partition (and disable the system verification). It is also possible to directly modify the boot partition without a custom recovery.


Some manufacturers give a way to unlock the bootloader, and some of them don't. The popular devices with locked bootloades (for an example US carrier locked Samsung S devices) tends to be exploited by the Android modding community.


My device is still Android 5.1.1 or older! Should I use these to root?


Most of those older devices are possible to root by the rooting apps. So, you could. Should you? That depends on your preferences. Root access grants the power over everything in the OS, and with root access, it usually doesn't take even a microsecond to make sure that your device won't ever boot again. It is very probable that the rooting apps ever won't do that, but, they could. Also, with root an app could access everything your device does, and everything it holds in its memory including your credit card information, passwords, etc. If that sounds like a serious privacy threat to you, maybe don't use the root apps. If you don't care about that, you can try them.


If you are savvy enough, there are the sources of almost all the exploits those root apps uses. You can try to search them up by CVEID, look for them in Git, compile and run them and try to get a root shell, and you will be able to install the su binary and the other dependencies yourself.


Also, KingoRoot has been known for sending highly sensitive data like IMEI and Serial Number to their servers. The chances are they will never use them, but, that's your decision in the end. And KingRoot is known for installing a backdoor in its SDK which allowed some apps to get root access unauthorized by the user.


Conclusion


The era of the rooting apps is long gone. The rooting apps doesn't work anymore and if you use them on newer Android versions you risk soft-bricking your device and probably losing all your data. If you use them on supported Android versions they would work most of the time, but there are privacy and security concerns you should consider before going on.



I hope my research would help someone in the future who gets the same problem as me. :)


applications - Cannot install some apps in Android 4.1.2


I have a Motorola Razr D3 cellphone. Although I have at the moment 800 megabytes free on the device memory, some apps report insufficient space to perform the installation. I've cleaned caches and removed many apps.


I'm unable to install some software, for example, Aircrack-ng.


Storage space



What should I check for?




rooting - How do I root a Samsung Galaxy Star Duos S5282?


How do I root my Samsung Galaxy Star Duos S5282? How do I put it in recovery mode?




updates - How can I install official Android 2.2 Froyo in Samsung Galaxy S which runs Android 2.1 Eclair?


How can I install official Android 2.2 Froyo in Samsung Galaxy S which runs Android 2.1 Eclair?




Sunday, June 16, 2019

4.0 ice cream sandwich - How do I remove corporate administrator settings?


I have an HTC Desire C, just a couple of weeks old. I also have a new job and decided to add my work email account via Exchange activeSync, however once it became apparent that I was giving up rights and functionality (such as the screen pattern lock) for my own phone I decided to remove it.


I removed the administrator, which automatically removed the email account, however I am still unable to restore the screen pattern lock. I've restarted the handset a couple of times, no help.



I seem to have no options to view or delete and administrator accounts (presumably, and hopefully, because there are none now).


I've read the similar question posted here and the answers but they don't help me sadly. Any ideas?




How do I disable HTML5 player for Chrome on Android?


Whenever I click on a video link, it automatically takes me to the HTML5 player and doesn't even prompt me as to which player I want to use. Is there a way to force a prompt by altering the application files or something?




How to insert Unicode characters by their hex codes using USB keyboard on ICS?


Is typing hex codes to insert Unicode characters possible when using USB external keyboard on vanilla ICS or Jelly Bean? Any root modifications available to achieve this?


Or, if not possible system-wide, are there any text editing apps that will allow such behavior?


Inserting Unicode characters such as various bullets, subscript and superscript numbers, Greek letters and so on has been very useful while studying. I normally use gedit on a netbook running peppermint distro, because it's very simple and nondistracting while typing my summaries. I've ended up knowing by heart the most used hex codes. I'm planning to replace the netbook by a cheap vanilla ICS tablet (already factory-rooted) and a comfortable, decent USB keyboard, and the described feature would be mostly appreciated.


Thanks in advance!





external sd - Is a Class 10 MicroSD overkill or is a Class 6 adequate?




Possible Duplicate:

Is the class rating of my MicroSD card relevant?



I don't see any speed class or × rating markings on the 2GB card that came with my phone. Is a Class 10 card going to be noticeably faster (in apps that use the SD storage) than a Class 6? I know that it's theoretically 40% faster but I'm not sure that my Flipside would even be able to take advantage of the higher speeds.



Answer



It is most likely overkill unless you are doing a lot of write/reads to your SD card for some particular reason. The only reason I've known to buy a faster SD card is for photography, when you want to be able to reduce the time it takes to write photos from the memory buffer to the SD card so you can take more pictures at a higher FPS.


Edit hosts file from terminal IDE with root accessed


My terminal IDE accessed root but cannot edit hosts file.


root@172.16.0.151:/system/etc #vim hosts

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



Answer



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


mount -o remount,rw /system
cd /system/etc
vim hosts

# edit, save, then make /system read-only again:
mount -o remount,ro /system

Saturday, June 15, 2019

Can I re-install a purchased app from Google's Play Store?


I've successfully purchased an app from the Market via my Android phone. It's currently too large for my internal memory (still running 2.1), so can I uninstall it and then re-install it at a later time?


Will uninstalling the app (after the 15 minute eval period elapses), also ensure that I can't re-download it again or do purchased apps remain linked to my Google account even if they aren't currently installed?



Answer




You can uninstall it and the market will remember that you bought it. It'll say "purchased" in the market and you can reinstall any time. Every time I reflash a ROM I go into my downloads section of the market and I see all my purchased apps.


battery - Prevent complete charging?


I'm looking for a way to prevent my phone from completely charging every time it is connected to my computer. I want to reduce the battery's capacity loss, as it is non-replaceable, and it seems to me that keeping the maximum charge at around 50% to 60% would be ideal. This chart, from this site, suggests that the benefit would be significant.


Capacity at    Discharge
full charge cycles

100% 300 – 500
90% 600 – 1,000
70% 1,200 – 2,000
50% 2,400 – 4,000



Friday, June 14, 2019

Camera app that can use hardware buttons for making photo


I am searching for either a camera app with hardware button support, or for some other solution that would make it possible to use hardware buttons for making photo (shutter) in a camera app.



My phone, Samsung Galaxy S III mini doesn't have separate camera button, only power button, home button, back and menu buttons, and volume rocker. It is IMHO much easier to use hardware button than to try to hit software button on camera screen.


I think this should be possible, because built-in Phone Call app can be configured to accept call with Home button, and end / cancel the call with Power button.




This question can be considered to be continuation of How to assign a hardware button to camera which is about using hardware button (e.g. Home) to start camera.



Answer



While Is there an app for X questions are off-topic here, just a little hint: You might wish to take a look at ProCapture and A Better Camera, which both support the volume rocker for either shutter or zoom (configurable). I'm pretty sure they are not the only ones.


Can read books in Amazon Kindle on LG 4G Tablet


When I tried to read a book that I downloaded onto my tablet in Amazon Kindle, I can see the book, but when I go to the pages of the book, there is nothing. I see the title of the book across the top of the page, but nothing is showing on the page itself. Can read the book on my phone under Kindle so need to know what the problem is with tablet. I have tried rebooting the tablet, but that did not solve the problem.




settings - How can I set my volume to be beyond 15 on my samsung galaxy S?






Possible Duplicate:
How can I make my Samsung Galaxy Nexus volume go louder than what stock allows?



The volume on my media music player sounds very low on my headphones. Wondering if anyone knows a way on how to increase the set volume from 15 to 30.




applications - Why does this ad keep showing up below my notification bar and how do I stop it?


I keep getting an ad that shows up BELOW my notification bar. It is NOT in the notifications, nor on the homescreen, as far as I can tell.


I am using CyanogenMod 12.1 nightlies on a HTC M8. Screenshots below.


How can I get rid of this thing? It just showed up one day. I don't remember installing anything new (although I have autoupdate on for apps, and some update very often) right before it started. I tried ad scanners, but they haven't been much help.


I would rather not factory reset.


I can close the ad by clicking the small "x". If I click on the info button in the lower left corner, I can give feedback on the specific ad and ask not to see it again. If I click on opt out, it asks for my IMEI, which I'm not really comfortable providing.


The ads are all in Hungarian and Romanian. I live in Romania, close to the Hungarian border, so I'm guessing that is why.



(Click image to enlarge)


IMG:


IMG:


Opt out page:


IMG:



Answer



There are many complaints about the Premium Wallpapers HD app, which apparently started to show ads looking like this after its latest update.


In general, an Android app can draw anything over other apps if it has the “Draw over other apps” permission, so you can check which of your installed apps have this permission.


Activate Tethering with ADB - Android 5.1


I'm on LINUX, and I've create a simple script to activate : - Data connexion (3G/4G) switch ON - Enable tethering switch ON - Change PC ethernet connexion


So I've just have to plug my phone on my USB, and launch my script and voila :)


But, recently I've got a new phone (Xiaomi MI4c) which works with android 5.1.1 And my script isn't working properly, and I don't know why !:crying: Everything works, except "enable tethering" with ADB:



#adb shell su -c 'service call connectivity 30 i32 1' 
Result: Parcel(
0x00000000: 00000000 00000002 00000006 006e0062 '............b.n.'
0x00000010: 00700065 0064005c 00000000 00000006 'e.p.\.d.........'
0x00000020: 00740062 0070002d 006e0061 00000000 'b.t.-.p.a.n.....')

And nothing happend


adb works fine :


# adb shell su -c 'service list connectivity'  |grep connectivity
54 connectivity: [android.net.IConnectivityManager]


I've found this :


service call connectivity 32 i32 1 on Ice Cream Sandwich (4.0) 
service call connectivity 33 i32 1 on Jelly Bean (4.1 to 4.3)
service call connectivity 34 i32 1 on KitKat (4.4)
service call connectivity 30 i32 1 on Lollipop (5.0)

How can I see which number should I use to enable this functionality with ADB ?


Thanks for your help.



Answer




I'm uncertain behind the reason because I reached the result using trial and error but this command would do the job for Android 5.1.1:


service call connectivity 31 i32 1

As expected, you need root privileges.


Also, you may be able to get something interesting from the source code of a service, in this case, it would be android.net.IConnectivityManager.


supersu - How to manually root a phone?


I want to learn how to root a android phone manually, I mean without any apps like KingRoot, dr.fone etc. I did not found any guides or information about it.


(Background Information: I want to root a BlackBerry KeyOne, even if you say it does not work i want to learn and try it anyway)


Can you please help me?



Answer



I was looking at the web search results of “how to manually root Android devices” and I noticed that most of those are either just advertising stuff or makes use of dedicated (particularly closed source) rooting solutions. Those which worked some time ago are now obsolete since they depended on some security vulnerability in Android which was fixed over time.


In fact it's not impossible to root phone manually but it's not worth the hassle. However as a reference, let me describe an option. But before diving into the technical details, we need to understand what root is and how Android prevents root access. Details can be found here but a few points in short:



  • Mostly vendors ship their devices with locked bootloader, and a chain of trust is established during boot process, which won't let any modification be done to kernel (boot.img), recovery or the main OS. So the first step towards rooting is unlocked bootloader. Beware of the risks!


  • A part of the chain of trust is dm-verity (VB/AVB); a kernel based phenomenon which makes sure that partitions containing core OS (/system, /vendor, /odm) are always mounted read-only and any malicious attempt to modify them must fail. Modifying boot.img or recovery.img is usually accompanied by disabling dm-verity to avoid surprises like bootloops at later stages. TWRP's standard warning:

    This device uses dm-verity!
    This means that swiping to allow system modifications will prevent you from being able to boot if you are using the stock kernel.




  • Similarly some vendors particularly Samsung go beyond normal and build extra security features in their devices like Knox, RKP, Defex, proca, TIMA, FIPS, bla bla bla. So you might also need to circumvent those e.g. by building kernel with SECURITY_SELINUX_DEVELOP=y, patching kernel binary etc.

  • Android apps don't have capabilities to elevate their privileges by executing binaries which have setuid or file capabilities set (which is the standard way to get root access). So the only option is to run a background persistent process (daemon) with root privileges outside the apps (e.g. during boot process) and request it to do privileged tasks on behalf of unprivileged apps when needed.

  • Root (i.e. UID 0) is the old Discretionary Access Control (DAC), but Android also makes use of Mandatory Access Control (MAC) i.e. SELinux. A root process running with restricted SELinux context is quite helpless, so we have to break this barrier too. It requires modifying SELinux policy.



I'll address the last two points here, but first two considerations:



  • Android rooting solutions deploy a special su binary which - when executed by an app - makes a connection to privileged daemon and gets the app a root shell. So this su binary and daemon are specially developed for this purpose. A less sophisticated approach would be to run already available daemons like adbd, sshd or one of the old inetutils flavors (telnetd, rlogind, rshd, rexecd) with root privileges. When running in background, these servers can provide a root shell or execute commands with root privileges when connected by a client. For the sake of simplicity I'm using only a minimal network utility named netcat (nc) which is a busybox applet. But please note that apps can't get root access with this approach, it can only be used from commandline.

  • We are going to patch monolithic /sepolicy file and /init.rc file which are part of ramdisk in boot.img. But starting with Treble Android uses split policy which is loaded/compiled from /system/etc/selinux/ and /vendor/etc/selinux/. Starting with SAR, there's no ramdisk at all in boot.img and /init.rc is part of system.img. So in both cases you need to necessarily modify system partition. I'm not giving details on that here.


STEPS:



  • Extract boot.img e.g. using AIK or magiskboot on Android or PC.


  • Create a new SELinux context, say pseudo_su. Set it permissive so that to allow any possible interactions with other processes / files etc. Use Magisk's supolicy tool or sepolicy-inject (1, 2) on Android or PC:



    ~# supolicy --load sepolicy --save sepolicy 'create pseudo_su' 'permissive pseudo_su' 'dontaudit pseudo_su * * *' 'allow pseudo_su * * *' 'allow * pseudo_su * *'

    Or to build split-policy using Android's compiler:


    ~# /system/bin/secilc -m -M true -G -N -c $(cat /sys/fs/selinux/policyvers) -o sepolicy /system/etc/selinux/plat_sepolicy.cil /system/etc/selinux/mapping/$(cat /vendor/etc/selinux/plat_sepolicy_vers.txt).cil $([ -f /vendor/etc/selinux/vendor_sepolicy.cil ] && echo /vendor/etc/selinux/vendor_sepolicy.cil /vendor/etc/selinux/plat_pub_versioned.cil || echo /vendor/etc/selinux/nonplat_sepolicy.cil)

    * Get the value of POLICYDB_VERSION_MAX from your kernel source.


    To use vendor's precompiled_sepolicy or build from split-policy and patch:


    ~# supolicy --load-split --save sepolicy 'create pseudo_su' 'permissive pseudo_su' 'dontaudit pseudo_su * * *' 'allow pseudo_su * * *' 'allow * pseudo_su * *'



  • Define an init service which starts a simple TCP server on boot, only listening to on-device connections:


    # /init.rc
    ...
    service pseudo_su /sbin/busybox nc -lk -s 127.0.0.1 -p 23 -e /sbin/busybox sh
    seclabel u:r:pseudo_su:s0
    disabled

    on property:sys.boot_completed=1
    start pseudo_su


    * Make sure you get the right busybox binary, there are multiple implementations of netcat.
    * Use port 23 or any other unused port.



  • Copy updated sepolicy and init.rc to root of extracted ramdisk, busybox binary to [ramdisk/]sbin/ and set permissions.

  • Repack boot.img and flash or test with fastboot boot boot.img.


HOW TO RUN ROOT COMMANDS?


Once booted, we can pass commands from a netcat client on terminal emulator app (like Termux) or adb shell:


~$ echo id | /sbin/busybox nc localhost 23
uid=0(root) gid=0(root) groups=0(root) context=u:r:pseudo_su:s0


* Default SELinux policy doesn't allow apps traverse /sbin. So either inject allow rules or put busybox in /system/*bin/. Or use some other nc e.g. from Termux's netcat package.


For ease of use, create functions (put them in .bashrc so that you don't have to define every time):


# ~/.bashrc
...
function psu() { echo "$@ 2>&1" | /sbin/busybox nc localhost 23; }
function psush() { /sbin/busybox nc localhost 23; }

~$ ls -ld /data/adb
ls: cannot access '/data/adb': Permission denied

~$ psu ls -ld /data/adb
drwx------ 7 root root 3488 2019-07-19 00:44 /data/adb

To get root shell:


~$ psush
whoami
root
^C

But it's just a dumb shell, not connected to terminal. To have a more feature-rich experience, other tools like socat can be used which support line editing, pseudo-terminals etc.

Also environment variables aren't evaluated unless explicitly passed, because commands are executed remotely:


~$ /data/data/com.termux/files/usr/bin/ps -p $$,1 -o pid=,comm=
23599 bash
~$ psu /data/data/com.termux/files/usr/bin/ps -p $$,1 -o pid=,comm=
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/bin/ps": library "libprocps.so" not found
~$ psu LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/bin/ps -p $$,1 -o pid=,comm=
1 init
23599 bash

So that's how we can get a minimal root functionality without using any specialized rooting tools.





RELATED:



Wednesday, June 12, 2019

applications - How can I prevent services from running in the background?





Possible Duplicate:
How can I stop applications and services from running?



Is there a way to prevent the service apps (or any other apps) from automatically running in the background?




backup - Android phone lost, what data can I get onto new phone?


Sorry about the clumsy question.


My Android HTC Magic was lost/stolen last night. I had an unlock swipe code, power-on SIM code and have called the phone company and had it blocked, so not too concerned about the phone itself being used by someone else.


What I am thinking about is when I get a new phone, what data/info can I get back easily as I can't just copy it from the old phone now? Obviously GMail/Contacts/Calendar are all stored on the web, any purchased apps are linked to my Market login, and I'm not concerned about photos, music etc that were on the SD card.


What I'm more concerned about are my preferences, settings, SMS texts, list of installed apps, prefs, data from those apps, etc. Are those all gone?



Addendum: I was thinking of rooting the phone, so did take a standard Nandroid backup a week ago that I have a copy of on my PC, if I get an identical model of phone and restore that, will my data come back? Also what happens if I try to restore that onto a different model of phone (I'm assuming bad things would happen)?



Answer



As long as you didn't turn these features off, simply adding the same Google account you used on the old phone to the new phone will restore a lot of your data.


Backed up:



  • Google Contacts

  • Installed apps

  • Wi-Fi settings

  • Bluetooth settings

  • Purchased apps



Not backed up:



  • Sim-only contacts

  • Preferences

  • Settings

  • Texts

  • Application data


To answer your second question: the Nandroid restore should work on an identical phone. However, this will not work for a different phone unless you only copied data in the backup. Any system data will cause problems on a non-identical device.



internal storage - How to stop apps writing to "Android" folder on the SD card?


I have a (seemingly) simple question to which I haven't found a clear answer to. My phone creates an "Android" folder on my SD card and I'm wondering if it could be moved into the phone's internal storage instead.



I just got a new phone and it's got way more storage than my last phone, so I'd like to make the most out of it as I can, so I'd prefer that all the application data is on the internal storage rather than on the SD card.


That's the way it worked on my old phone, so I'm a bit puzzled that it doesn't seem as easy to do anymore.




installation - Set up and install non play store apps to multiple devices?


I set up roughly 10 android tablets running version 4.4.2 a day, running through set up manually, customizing the settings and downloading an .apk and setting that up.



I was wondering if there is an easier way to run through all this, whether it's a software that could allow me to remote control all of them at once since they all go through the exact same steps, using a script or anything really?


Thanks in advance



Answer



Indeed there is something to make your task easier – though not in the way of "remote control all of them at once", but working sequentially. Here's a "simple approach":



  1. Prepare your first device (let's call it "master" here): install all the apps you want to have it, set them up if needed.

  2. Create a full ADB backup of the "master" (for details, please see Full Backup of non-rooted devices)

  3. Now, for each device, restore that "master backup"


This should definitely work, but with a few restrictions:




  • it works best if all devices are of the same brand and model, running the same Android version. It might work for devices not fitting (all) these criteria, but then special care must be taken (e.g. better not include "system stuff")

  • limitations come up concerning some data, such as SMS, which are protected against being backed up (don't ask me why)

  • limitations apply to apps protecting themselves against backups (by setting the ALLOW_BACKUP flag to FALSE in their manifests)


You might be able to work around the latter two limitations by rooting the "master", installing the Xposed Framework, and use the Backup All Apps module. You then would need to fine-tune step 2 to have the backup only include the packages you want (i.e. explicitly specify/include them on the command line).


installation - Why does the Play Store's download percentage never reach 100%?


I've owned two Android phones so far. While both are HTC ones, I've used several customised ROMs on the older one, so the following does not seem to be specific to one maker or installation.


I've noticed that whenever I download an application from Google Play Store, the percentage never reaches 100%. It's usually between 40% and 60% when the progress bar disappears and the status changes to "installing".


I considered the possibility that the system begins to install the package before it's fully downloaded but, besides that being a bad idea, many times the installation takes a much shorter time than the rest of the download would have (assuming constant speed).


It seems that, instead, the percentage reported is wrong, and that the file is in fact fully downloaded while the screen shows 40%. Does that happen to others as well? How is it explained?



Answer



This started happening at the same time that Google introduced the concept of "delta" updates. This means that only the portion of the app that has been modified is sent over, as opposed to the entire app. However, they never changed how the Play Store app calculates the download percentages - it's still taking app's full size as the base 100%, instead of the size of the delta update being downloaded. It simply never bothers to check with the download manager (which works correctly, as reflected in the notification tray) for the correct size of the delta.


This is why you are seeing the percentage stop at random times - the difference in sizes of the full app and the delta is what's making the play store think the download is larger than it actually is. For example, if an app's full size is 10MB, but the update is only 5MB in size, the Play Store will still think it's downloading the full 10MB, and will stop at 50%, when the 5MB download completes.



Can I stream video from PC to an android device over USB?


I'd like to be able to stream video to my android phone (Samsung Galaxy S rooted 2.2) from a PC running Windows XP (I'm at work!).



There's no wireless network here, VLC and similar marketplace apps seem to only offer this service over wifi/3G; can I over USB?



Answer



I think the answer here is "in all practicability, no."


One hypothetical alternative would be USB host support, and to mount an external hard drive or thumb drive onto your phone. This would mean doing something like this, How To Mount External Hard Drive to Your XOOM. This seems impractical and potentially dangerous (who knows if that OTG cable might cause a short). The SGS may not even recognize the cable, or the drive, and the apk may not work with your phone.


That's the best answer I have on actually connecting via usb to a storage location.


Actual streaming from a PC via the USB port, though? Even if there were a way, it'd probably require extensive work on both the phone and the computer. Wouldn't a better (and way easier) solution be to buy a wireless USB adapter and set it to ad-hoc mode and SSID non-broadcast? Just a thought.


Tuesday, June 11, 2019

samsung - SD card trouble



I have a 16GB Samsung Galaxy S5. I filled the memory so I bought a 32GB SD card to move my media onto. I copied the Media onto the SD card, made sure everything transferred properly, and then deleted the media on the device memory. A few hours later, I turned the phone off, switched batteries, and when I booted back up, a message popped up saying that the SD card was damaged. The phone will not recognize anything except that its installed. Please tell me there is a way to fix the SD card and recover my media with minimal loss! How can I do it?




google apps - "Application has stopped unexpectedly" error when starting Play Store or browser. How to fix?


How to fix the application Google Services Framework (process com.google.process.gapps) has stopped unexpectedly error? It's showing like 10,000 times and I can't get into the Play Store or the browser.




Monday, June 10, 2019

4.0 ice cream sandwich - screen keeps jerking and there are automatic touches



First of Tablet info :


Model number : Micromax P275


Android version : 4.0.4


Baseband version : v3.0


Kernal version : 3.0.8+ linda@SKYWORTHSERVER3 #52 Fri Sep 21 14:00:53 CST 2012


Build number : P275_HW.V0.1_V3.0_20120921


I dont know anything about android


now the issue is that the screen keeps randomly jerking and there are random touches that happen which will open apps and close apps randomly. this happens after few minutes since Tablet turn on. When these things happen i cannot do anything. even if i try to power down by pressing the power key the dialog box disappears because of this random behavior.


i observer this behavior mainly when i travel in bus. so i'm thinking that the vibrations are affecting the accelerometer and thus causing the random movements. When i'm in a stationary place i rarely see this issue, but it has occured.


now i disabled



1)Auto rotate


2)Disabled all options in Developer options except Force hardware rendering.


the system update will happen and i cant turn it off(atleast i dont know).


my main useage in the Tablet are 1) pdf reading 2)videos 3)small c programmin(using CCtools).


please help me with this issue. its is very very frustrating. last thing,i brought this device 28 days ago. also i would like links on reinstalling android.



Answer



From your description, there are two obvious possibilities. The first is that some static electricity or oil on the touch screen is causing it to think you're touching it. Try giving the screen a good wipe. Also, earth yourself by holding a metal water pipe with one hand, and cover the screen with your other hand.


The alternative is a manufacturing defect in the touch screen. Faulty touch screens are quite a common problem with cheaper tablets. If you can manage to do this with all the false touches, try to install a paint program from Google Play and run it on your tablet. Leave the paint program running for a few minutes, and any false touches will paint on the screen. You can see where they are happening. You may see a pattern to them, such as all being in one strip of the screen, or always at one point. That would confirm that it's a fault in the touch screen, in which case you should return your tablet and get it replaced.


How to intercept Chrome links with Advanced Download Manager (ADM)?


I have installed Advanced Download Manager (ADM), but when I try downloading a file from Chrome, it downloads the file with its Chrome download manager.


How to set-up ADM to intercept the download link on Chrome?




finger print scanner - An error has occurred with the fingerprint sensor


Shortly ago, my J7 Prime stopped recognizing my fingerprint.


When I go to Settings -> Lock screen and security -> Fingerprint Scanner I get




An error has occurred with the fingerprint sensor. If this message appears repeatedly, restart your device.



I tried a few options I found, and none worked:



  1. Rebooting.

  2. Going into Safe Mode. The same error appears. Plus, almost all my widgets in the home screen disappeared, so I had to redo it.

  3. Settings -> Apps -> Three dots -> Show system apps -> Fingerprint -> Clear Data . The cache was already empty. Rebooting.

  4. Logging off and into my Samsung account.

  5. Developer options (this was already enabled) -> OEM unlock -> Enable. Reboot. Developer options -> OEM unlock -> Disable, and Developer options -> Disable.



What I did not (and I cannot) try:



  1. Rooting my phone (it is a corporate device).

  2. Resetting my phone (same).


What can I do to fix the problem? (other than taking it to the IT dept.)



Answer



There was a system update pending. After I updated the fingerprint sensor came back to life.


(Note: Not only that... about 1.5GB were freed, which I very much needed. Unfortunately, Android's gluttony will promptly take care of it.)


I cannot propose this as a general solution as:




  1. I am not sure it will always work (although after the update there were a few glitches that got fixed, so I guess there are chances it will work).

  2. This depends on the existence of a pending update, which will not always be available.


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