Category Archives: Android

Override DNS is #malicious-harmful!?

Hi guys,
my app is temporarily out of the Play Store. I hope it’s really a temporary thing.

It seems that my last beta (beta78), the one available only to the beta testers, was not compliant to the 4.4 section of the Developer Distribution Agreement. But let me explain in the right order.

50 minutes ago I received an e-mail from the Google Play Support. It was notifying me of some kind of violation. The e-mail was referring to the app: “Virtual Button ROOT MENU” (package ID jp.ne.neko.freewing.VirtualButtonRootMenu).
It seems that that app, which disables SELinux, violates the Developer Distribution Agreement

Don’t transmit or link to… items that may introduce security vulnerabilities to or harm user devices, apps, or personal data.

OK.

I’m serious it wasn’t some kind of phishing, they simply sent me the right notice but referring to someone else.

My latest beta has an advanced option which, if chosen, temporary lowers the device security by disabling SELinux on the device. It applies the DNS and brings SELinux back again. So it seems I’m guilty.

And now

Disabling SELinux is not approved by the Play Store.

In my humble opinion it was not so obvious, but anyway, I repackaged a stable release and a beta without the SELinux thing. I’m waiting to see my app online again.

How to enable/disable Android logcat when using a custom kernel

A good source of information could be found in this page, but none of them worked for me.

The most useful article I found was on xda and here’s the solution:

  • enable
    echo 0 > /sys/module/logger/parameters/log_mode
    
  • enable at boot, but not when suspended
    echo 1 > /sys/module/logger/parameters/log_mode
    
  • completely disabled:
    echo 2 > /sys/module/logger/parameters/log_mode
    

(you need a rooted device)

How to compile rsync for Android in Ubuntu

My situation

My machine

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

The latest rsync version to compile (for me it was rsync-3.1.0.tar.gz)

$ curl -s http://rsync.samba.org/ftp/rsync/ \
    | sed -r 's/^.*href="([^"]*)".*$/\1/' | grep 'rsync-[0-9].*\.tar\.gz$'

Procedure

  1. save the tarball name in a variable
    $ RSYNCTGZ="rsync-3.1.0.tar.gz"
    
  2. install needed software
    $ sudo aptitude install gcc-arm-linux-gnueabi
    
  3. download sources
    $ wget http://rsync.samba.org/ftp/rsync/$RSYNCTGZ
    $ tar xzf $RSYNCTGZ
    $ cd rsync-[0-9]*
    
  4. compile
    $ ./configure --host=arm-linux-gnueabi CFLAGS=-static
    $ make
    
  5. install on the device
    $ adb push rsync /data/local/tmp && adb shell chmod 775 /data/local/tmp/rsync
    
  6. test execution
    $ adb shell /data/local/tmp/rsync
    

References

Override DNS for KitKat – first release

Override DNS for KitKat has been released

Override DNS icon

Override DNS is the easiest way to force your rooted phone to use custom nameservers on mobile networks.

Many things dealing with name resolution have changed in Android 4.4 KitKat and so all the current Play Store apps stopped working.

The problem I found with this release of Android (4.4) is that, apparently for caching reasons, the system behaviour has been changed to redirect all DNS queries to a system daemon called netd (here’s a link to a presentation related to Android networking before 4.4 which, however, covers part of this topics).

The getprop/setprop method used by all the DNS changer apps does not work anymore. Those values, when changed, get simply ignored by the netd daemon.

It’s necessary to communicate directly to the daemon via the /dev/socket/netd socket.

The app automatically guesses the network device name and applies the right commands each time a mobile network gets activated.

Postphone v1.1.0

There’s a new version of Postphone. Huge list of things, here’s the full changelog:

    Improvements:
      New feat Google Android Backup Service (settings and database)
      Issue-001 now app keeps alarms upon reboot
      Hotfix-002 now when you receive a call with unknown Caller ID, 
           no popup is shown
    
    Application workflow:
      You must check or dismiss notification to remove alarm
    
    Code:
      Min SDK change from 7 to 8 (drop support for Eclair)
      DatabaseHelper class replaces DBAdapter
      Allow to upgrade from db v0 to db v1 and allow future upgrades
      Remove old code doTheVibration() and playSound()
      File rename popupcallback => popupcallback.xml
      Fix some typos
      Lower the number of events logged
    
    Developer side:
      New utility emulate-reboot
      New utility insert-fake-passed-calls with support for TZ
      New utilities for backup
      Change tmp path in sqlite-postphone-db utility
      Publish notes
      Backup notes
    
    Debug menu:
      Is disabled by default
      Can now be enabled via multiple taps on version name
      New menu entry "clear alarms table"
      New menu entry "test PopUpAfterCall"
    
    Design and blog:
      Blog featured banner
      Official logo.png