Tuesday, April 2, 2019

Resize screen to display only on working part of semi-functional touchscreen



I have a oneplus android phone. The touch screen recently started malfunctioning so that the bottom centimetre of the screen does not work, but the rest of the screen works perfectly well. Unfortunately the bottom centimeter contains lots of important functions. Is there a way to resize my display or resolution so that it excludes the bottom centimeter of my screen?



Answer



Notes:



  • My solution is tested on Stock Android 4.4.2 and Stock CyanogenOS 12 (5.0) of OnePlus One, and should work for Android 4.3 and above (based on this answer).

  • I've mentioned wherever root access is required.

  • This answer has been taken from my answer on a bit different question here.




I have used the following comment as the ground to work on:




The bottom 20% of my Nexus 4 doesn't work. I use: wm overscan 0,0,0,210 to have android WM not draw anything in that area so that I can operate all the drawn areas fully again.. – Thrustmaster



Instructions:



  1. Enable USB-debugging in your phone.

  2. Install ADB tools in your PC, connect your device into it, and make sure that device is getting detected in adb devices.


  3. We need to know the resolution and the display density of the device. In the terminal/cmd enter adb shell dumpsys display | grep mBaseDisplayInfo to show display related info. The output could look like:


    mBaseDisplayInfo=DisplayInfo{"Built-in Screen", app 480 x 854, real 480 x 854, largest app 480 x 854, smallest app 480 x 854, 64.29 fps, rotation 0, density 240, 240.0 x 240.0 dpi, layerStack 0, type BUILT_IN, address null, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}


    The relevant info in my case is:



    • real 1080x1920

    • density 480







    1. The most useful commands to be used are:



      • wm overscan [reset|LEFT,TOP,RIGHT,BOTTOM]

      • wm density [reset|DENSITY]


      My default launcher screen without tweaks looked like:





    2. To reduce the screen output at bottom issue the command:



      adb shell wm overscan 0,0,0,100

      Note the I used further reduction by upto 0,0,0,300 and the output was like this:



      Tweak the value to your desired needs.




    3. You may need to correct the density since the display could look odd. My device's default display density is 480 dpi, so I tweaked it this way:


      adb shell wm density 440


      and the resultant screen was like this. An app under tweaked resolution.



    4. Note that you can use adb shell wm density reset and adb shell wm overscan reset to revert back to default density and resolution respectively.


    5. Now that "dead touch zone" has been taken care of it's time to use virtual/soft keys (only if you need it).




      1. Izzy has it already covered in this answer. Otherwise, you can use Gravitybox LP (for Lollipop users) or Gravitybox KK (for Kitkat users). It is an Xposed module, and require root access and Xposed Framework installed.


        Install, activate and launch Gravitybox → Navigation bar tweaks → Enable Navigation bar → do a reboot, and soft-keys aka Navigation bar would be found enabled.





      2. Custom ROM like Cyanogenmod and some stock ROMs has the option to enable soft-keys(buttons) under Settings. You can use that option since it doesn't require any root access.




      3. After some further tweaks the final screen of my Android 5.0 looked like:


        IMG: After some further tweaks the final screen of my Android 5.0 looked like









We're good to go!


gps - Are there maps that I can download to a PC and later transfer to the android phone?


I notice that many maps vendor such as Google require user to download offline map using their android phone. At the worst case, the user need to setup internet connection point in which the android phone will use the PC's internet to retrieve those offline map.


So, my question is - are there really pure offline map that I can first download to my PC and later transfer to the android phone? (It would be better if the offline map can also be view inside the PC too. Meaning that the offline map can be used on multiple devices - Portability!)



Answer




I use OsmAnd which works well with offline maps (OSM). Download offline map(s) once and after that no internet connection is required to use them.


You can download the .obf-file of your location from this list of offline maps. Or use the app to download .obf files directly to your device.


Monday, April 1, 2019

security - Are multiple-users protected from each other differently than apps?


I confess that I come from the happy world of unix computers, and am used to the concept of user accounts and hence group gids and userids uids. For the occasional usage of an untrusted app (i.e. whatsapp/facebook) I have created another user profile for many reasons, but mostly because I wanted to reduce any potential access whatsapp/facebook might gain with regards to my main account.


Now the strange thing is that to the best of my understanding the protection mechanism of AOSP, relies on assigning a actually user ids to individual apps, as with those uid, the apps can be limited using that the underlying linux kernel provides Unix Discretionary Access Controls (i.e. file accesss dependent on uid and gid).


My question is if I am misleading myself that AOSP provides any stronger protection with regards to multi-users (in between the accounts) than it does with regards to the various apps to each other?




cyanogenmod - Can I set an alternative time source?


If I set the time manually on my Desire (rooted, CM7) it appears to lose up to a couple of minutes every day.


Unfortunately, since the latter part of last year (possibly since the change to UK daylight savings time) T-mobile UK seem to be running around four minutes behind the rest of the UK. At least it's consistent, so my best option at present, but I have still missed a couple of trains as a result :(


Is there a way to configure a different time source so it can sync to something on the net? Or do you have any other ideas?



Answer



Indeed. Since you're rooted, I suggest you use the freeware Sytrant. It also allows you to choose which time server you wish to sync from as well as allowing a user to specify a daily interval at which the time can be updated automatically.



2.3 gingerbread - Unlocking Nexus One without pressing the power button


The power button on my Nexus One doesnt work smoothly any more, sometimes taking nearly half a dozen attempts before the unlock screen appears on the phone. I was wondering is there is any other way to invoke the unlock screen on my phone, apart from pressing the power button. I have Gingerbread 2.3.4 on my phone.



Answer



Here is my comment as an answer xD


There are custom roms like CyanogenMod that allows you to unlock using your trackball, dont know if there on market is and app for that...


--some minutes ago...--



hey there is one at https://market.android.com/details?id=org.liberty.android.anyunlock&feature=search_result called AnyUnlock,


there are other apps like this.... --as you discovered xD --


pd: rate with 100 for the effort :p


security - Malware installed with remote debugging


Is it possible for someone to install apks without you noticing, using remote debugging? (E.g. over TCP/IP, or on the same WiFi network). I found articles referring to this after a quick Google, but I'm not sure if they are not just alarmist.


EDIT: This paper seems to talk about something similar - "Android’s External Device Attack: Demonstration and Security Suggestions" - Wei et al.


I was thinking of enabling debugging mode, but this is keeping me from doing it.




Stream any audio to DLNA/UPNP speakers


Is there a generic ways how to stream any audio from my mobile or table to my WiFi DLNA/UPnP speakers? By any audio I mean any audio output from any application - YouTube, Audible, BeyondPod, any music player etc.


I figured out partial solution for BeyondPod, a podcast client, and BubbleUPnP, where BubbleUPnP streams to the speaker when it is set as "external" player for BeyondPod. It's a partial solution because it works only for applications with support for redirection to external player. YouTube or Audible has no option to use external player.


And it is not ideal solution either. For example playlists are tricky, both BubbleUPnP and BeyondPod have their own playlists and they don't play along well. BubbleUPnP is unfortunately not just just audio forwarder, it's full fledged media player and its own broad functionality in this scenario it gets in the way :(


Is there a proper audio forwarding (re-streaming, re-directing) solution, an app or a driver, which would take any audio output and forward it to my external speakers? My speakers support UPnP/DLNA, Airplay and Bluetooth.




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