We've got an LG Nexus system dump and endless desire to spoil every Googley surprise we can. Today's edition of the Android 4.2 Teardown could be alternatively subtitled "The Super-Serious Security Edition," because we're talking about the sort of stuff that should make your sysadmin jump for joy.

Please keep in mind this is just as forward-facing and time-ambiguous as all my other teardowns. This is a list of new stuff in the 4.2 dump, not a list of "confirmed for 4.2" features. Anything could be cut or not fully implemented by the time 4.2 rolls around; similarly to how bits of Android are currently multi-user aware, yet multi-user functionality isn't accessible. Some of this stuff may make it to 4.2, but probably not all of it. Got it? Good.

Now, get ready for a HUGE security push. I recently revealed the Play Store was getting "App Check," a client-side malware scanner, and Google already has "Bouncer" a server-side malware scanner, but they aren't stopping there.

SELinux

Image credit: Centos.org

Security-Enhanced Linux is a set of kernel add-ons and user-space tools first started by the NSA that brings mandatory access control to Linux, which basically means user programs and system servers only run with the minimum amount of privileges they need to function. Unmodified Linux uses discretionary access control. Users can grant high levels of access to files they own, and malicious software can do anything it wants with the files and controls the user has access to. If you run that malicious app with root privileges, it now has access to everything.

In SELinux, there is no concept of a root user. Security policy is defined by an Administrator and applied to every process and object, and nothing can override it. This means the potential damage a malicious program can cause is minimal. Basically, SELinux is serious lockdown-mode for the hyper-secure enterprise crowd.

So, now that we have a rough idea of what SELinux is, maybe this set of strings will mean something to you:

        <string name="selinux_status">SELinux status</string><string name="selinux_status_disabled">Disabled</string><string name="selinux_status_permissive">Permissive</string><string name="selinux_status_enforcing">Enforcing</string>
    

This was buried in the Settings APK. According to the layout xml, SELinux will have a status readout tacked-on to the current About Phone screen. It will now list "SELinux Status" at the very bottom, right under "Kernel version" and "Build Number." If you're wondering why there are 3 options and not just "on" and "off," "Permissive" is a logging mode, which will tell you when it would have blocked something, but won't actually block things.

The other key piece of information to get from the string file is that this is an optional mode, don't go around saying that Google is shutting down root functionality or anything. This is for security conscious enterprise and government-types and probably won't be enabled on consumer phones.

Always-On VPN

Image Credit: How Stuff Works

A VPN (Virtual Private Network) provides all sorts of benefits, depending on how you set it up. You can use it to beat government or corporate site filtering, access a remote computer, surf anonymously, or just to encrypt all your web traffic.

Right now, you can tell Android to funnel all your data through a VPN, and it will, but if you restart your phone, or if the VPN server ends your session, suddenly all your data will start beaming out over the regular internet. There's no way to say "only send data while connected to a VPN," until now.

        <string name="vpn_menu_lockdown">Always-on VPN</string><string name="vpn_lockdown_summary">Select a VPN profile to always remain connected to. Network traffic will only be allowed when connected to this VPN.</string><string name="vpn_lockdown_none">None</string><string name="vpn_lockdown_config_error">Always-on VPN requires an IP address for both server and
    

The strings are pretty self-explanatory. VPN Lockdown will only allow your data to travel over the VPN. No VPN? No internet. There's a subset of VPN users that probably consider VPN functionality useless without this feature. They'll be happy.

Premium SMS Confirmation

A big incentive for the bad guys to write Android malware is that you can quickly and silently charge money directly to a phone bill with premium SMSs. That's a tempting target, so making it harder for malware writers to get paid would go a long way towards slowing down a virus-filled mobile future.

Google seems to want to do just that, I found these strings in the framework code:

        <string name="sms_short_code_confirm_title">Send SMS to short code?</string><string name="sms_premium_short_code_confirm_title">Send premium SMS?</string><string name="sms_short_code_confirm_message">&lt;b>%1$s&lt;/b> would like to send a text message to &lt;b>%2$s&lt;/b>, which appears to be an SMS short code.&lt;p>Sending text messages to some short codes may cause your mobile account to be billed for premium services.&lt;p>Do you want to allow this app to send the message?</string><string name="sms_premium_short_code_confirm_message">&lt;b>%1$s&lt;/b> would like to send a text message to &lt;b>%2$s&lt;/b>, which is a premium SMS short code.&lt;p>&lt;b>Sending a message to this destination will cause your mobile account to be billed for premium services.&lt;/b>&lt;p>Do you want to allow this app to send the message?</string><string name="sms_short_code_confirm_allow">Send message</string><string name="sms_short_code_confirm_deny">"Don't send"</string><string name="sms_short_code_confirm_report">Report malicious app</string>
    

If you're having a hard time reading through the programming junk, the main message says "app name would like to send a text message to number, which is a premium SMS short code. Sending a message to this destination will cause your mobile account to be billed for premium services. Do you want to allow this app to send the message?" It's a nice, clear message that will pop up whenever an app tries to send a text to a short code. You're then allowed three options, "Send message," "Don't send," and "Report malicious app."

        <?xml version="1.0" encoding="utf-8"?><shortcodes> <shortcode country="al" pattern="d{5}" premium="15191|55[56]00" /> <shortcode country="am" pattern="d{3,4}" premium="11[2456]1|3024" free="10[123]" /> <shortcode country="at" pattern="11d{4}" premium="09.*" free="116d{3}" /> <shortcode country="au" pattern="19(?:d{4}|d{6})" premium="19998882" /> <shortcode country="az" pattern="d{4,5}" premium="330[12]|87744|901[234]|93(?:94|101)|9426|9525" /> <shortcode country="be" premium="d{4}" free="8d{3}|116d{3}" /> <shortcode country="bg" pattern="d{4,5}" premium="18(?:16|423)|19(?:1[56]|35)" free="116d{3}" /> <shortcode country="by" pattern="d{4}" premium="3336|4161|444[4689]|501[34]|7781" /> <shortcode country="ca" pattern="d{5,6}" premium="60999|88188" /> <shortcode country="ch" pattern="[2-9]d{2,4}" premium="543|83111" /> <shortcode country="cn" premium="1066.*" free="1065.*" /> <shortcode country="cy" pattern="d{4,6}" premium="7510" free="116d{3}" /> <shortcode country="cz" premium="9d{6,7}" free="116d{3}" /> <shortcode country="de" pattern="d{4,5}|1232d{3}" premium="11(?:111|833)|1232(?:013|021|060|075|286|358)|118(?:44|80|86)|20[25]00|220(?:21|22|88|99)|221(?:14|21)|223(?:44|53|77)|224[13]0|225(?:20|59|90)|226(?:06|10|20|26|30|40|56|70)|227(?:07|33|39|66|76|78|79|88|99)|228(?:08|11|66|77)|23300|30030|3[12347]000|330(?:33|55|66)|33(?:233|331|366|533)|34(?:34|567)|37000|40(?:040|123|444|[3568]00)|41(?:010|414)|44(?:000|044|344|44[24]|544)|50005|50100|50123|50555|51000|52(?:255|783)|54(?:100|2542)|55(?:077|[24]00|222|333|55|[12369]55)|56(?:789|886)|60800|6[13]000|66(?:[12348]66|566|766|777|88|999)|68888|70(?:07|123|777)|76766|77(?:007|070|222|444|[567]77)|80(?:008|123|888)|82(?:002|[378]00|323|444|472|474|488|727)|83(?:005|[169]00|333|830)|84(?:141|300|32[34]|343|488|499|777|888)|85888|86(?:188|566|640|644|650|677|868|888)|870[24]9|871(?:23|[49]9)|872(?:1[0-8]|49|99)|87499|875(?:49|55|99)|876(?:0[1367]|1[1245678]|54|99)|877(?:00|99)|878(?:15|25|3[567]|8[12])|87999|880(?:08|44|55|77|99)|88688|888(?:03|10|8|89)|8899|90(?:009|999)|99999" free="116d{3}" /> <shortcode country="dk" pattern="d{4,5}" premium="1d{3}" free="116d{3}" /> <shortcode country="ee" pattern="1d{2,4}" premium="90d{5}|15330|1701[0-3]" free="116d{3}" /> <shortcode country="es" premium="[23][57]d{3}|280d{2}|[79]9[57]d{3}" free="116d{3}" /> <shortcode country="fi" pattern="d{5,6}" premium="0600.*|0700.*|171(?:59|63)" free="116d{3}" /> <shortcode country="fr" premium="[4-8]d{4}" free="3d{4}|116d{3}" /> <shortcode country="gb" pattern="d{4,6}" premium="[5-8]d{4}" free="116d{3}" /> <shortcode country="ge" pattern="d{4}" premium="801[234]|888[239]" /> <shortcode country="gr" pattern="d{5}" premium="54d{3}|19[0-5]d{2}" free="116d{3}" /> <shortcode country="hu" pattern="[01](?:d{3}|d{9})" premium="0691227910|1784" free="116d{3}" /> <shortcode country="ie" pattern="d{5}" premium="5[3-9]d{3}" free="50d{3}|116d{3}" standard="5[12]d{3}" /> <shortcode country="il" pattern="d{4}" premium="4422|4545" /> <shortcode country="it" pattern="d{5}" premium="4d{4}" free="116d{3}" /> <shortcode country="kg" pattern="d{4}" premium="415[2367]|444[69]" /> <shortcode country="kz" pattern="d{4}" premium="335[02]|4161|444[469]|77[2359]0|8444|919[3-5]|968[2-5]" /> <shortcode country="lt" pattern="d{3,5}" premium="13[89]1|1394|16[34]5" free="116d{3}" /> <shortcode country="lu" premium="6d{4}" free="116d{3}" /> <shortcode country="lv" pattern="d{4}" premium="18(?:19|63|7[1-4])" free="116d{3}" /> <shortcode country="mx" pattern="d{4,5}" premium="53035|7766" /> <shortcode country="my" pattern="d{5}" premium="32298|33776" /> <shortcode country="nl" pattern="d{4}" premium="4466|5040" free="116d{3}" /> <shortcode country="no" pattern="d{4,5}" premium="2201|222[67]" /> <shortcode country="nz" pattern="d{3,4}" premium="3903|8995" /> <shortcode country="pl" pattern="d{4,5}" premium="74240|79(?:10|866)|92525" free="116d{3}" /> <shortcode country="pt" premium="6[1289]d{3}" free="116d{3}" /> <shortcode country="ro" pattern="d{4}" premium="12(?:63|66|88)|13(?:14|80)" free="116d{3}" /> <shortcode country="ru" pattern="d{4}" premium="1(?:1[56]1|899)|2(?:09[57]|322|47[46]|880|990)|3[589]33|4161|44(?:4[3-9]|81)|77(?:33|81)" /> <shortcode country="se" premium="72d{3}" free="116d{3}" /> <shortcode country="sg" pattern="7d{4}" premium="73800" standard="74688" /> <shortcode country="si" pattern="d{4}" premium="[368]d{3}" free="116d{3}" /> <shortcode country="sk" premium="d{4}" free="116d{3}" /> <shortcode country="tj" pattern="d{4}" premium="11[3-7]1|4161|4333|444[689]" /> <shortcode country="ua" pattern="d{4}" premium="444[3-9]|70[579]4|7540" /> <shortcode country="us" pattern="d{5,6}" premium="20433|21(?:344|472)|22715|23(?:333|847)|24(?:15|28)0|25209|27(?:449|606|663)|28498|305(?:00|83)|32(?:340|941)|33(?:166|786|849)|34746|35(?:182|564)|37975|38(?:135|146|254)|41(?:366|463)|42335|43(?:355|500)|44(?:578|711|811)|45814|46(?:157|173|327)|46666|47553|48(?:221|277|669)|50(?:844|920)|51(?:062|368)|52944|54(?:723|892)|55928|56483|57370|59(?:182|187|252|342)|60339|61(?:266|982)|62478|64(?:219|898)|65(?:108|500)|69(?:208|388)|70877|71851|72(?:078|087|465)|73(?:288|588|882|909|997)|74(?:034|332|815)|76426|79213|81946|83177|84(?:103|685)|85797|86(?:234|236|666)|89616|90(?:715|842|938)|91(?:362|958)|94719|95297|96(?:040|666|835|969)|97(?:142|294|688)|99(?:689|796|807)" /></shortcodes>
    

Here's the data for it. They basically just have a giant list of premium shortcodes for each country. If you send to a shortcode that isn't in this database, Android will still warn you that this is a shortcode, and that "Sending text messages to some short codes may cause your mobile account to be billed for premium services."

This sounds like it will stop phone billing malware in their tracks, and instant, easy reporting will go a long way too.

We'll be back with more! Next time we've got a sneak peek at the new, work-in-progress Gallery design, and some other stuff. Stay tuned!