proxy using sim data instead of wifi

  1. create an ec2 instance and assign a public IP and open port 8888 to all source ip
  2. ssh login ec2 with -XC argument, -X: enable X11 forwarding, -C: compress all data
    1. this method need X11 window system, so you need a ubuntu
  3. install charles on ec2
    1. wget -q -O – | sudo apt-key add –
    2. sudo sh -c ‘echo deb charles-proxy main > /etc/apt/sources.list.d/charles.list’
    3. sudo apt-get update
    4. sudo apt-get install charles-proxy
  4. key in “charles" on the command line of that ec2, then you will see the charles window shows on your local screen
  5. setup proxy and port in APN
    WhatsApp Image 2018-01-24 at 12.32.45 PM
  6. you will need to wait about 3 min for the “allow connection" confirmation dialog pop up
    after click allow connection, you will see connection go from sim data through the ec2
    Screenshot from 2018-01-24 12-28-05

android chrome change user-agent

below works on my Android N

create file /data/local/chrome-command-line with below content

chrome --user-agent="Mozilla/5.0 (Linux; Android 7.0; Pixel XL Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36" -force-device-scale-factor=2

and then modify the selinux context of the file (or set selinux permissive)

chcon u:object_r:apk_data_file:s0 /data/local/chrome-command-line


setenforce 0


refer here:

AOSP Automatic variable $? isn’t supported yet

when I try to build curl from AOSP refs/tags/android-7.1.2_r9

below error shows on my terminal

AOSP Automatic variable $? isn't supported yet

I google it but found nothing

anyway, I delete below lines for build pass

build/kati$ git diff
diff --git a/ b/
index f75a8a0..fce22b9 100644
--- a/
+++ b/
@@ -182,10 +182,6 @@ CommandEvaluator::CommandEvaluator(Evaluator* ev)
INSERT_AUTO_VAR(AutoHatVar, "^");
INSERT_AUTO_VAR(AutoPlusVar, "+");
INSERT_AUTO_VAR(AutoStarVar, "*");
- // TODO: Implement them.
- INSERT_AUTO_VAR(AutoNotImplementedVar, "%");
- INSERT_AUTO_VAR(AutoNotImplementedVar, "?");
- INSERT_AUTO_VAR(AutoNotImplementedVar, "|");