• Save
BigAndroidBBQ 2012: XDA Session - Future of Android Development
Upcoming SlideShare
Loading in...5
×
 

BigAndroidBBQ 2012: XDA Session - Future of Android Development

on

  • 1,486 views

Presentation given at the Big Android BBQ 2012 by Jerdog of XDA-Developers. This session was a panel discussion with some of the most well-known developers in the Android world. We discussed their ...

Presentation given at the Big Android BBQ 2012 by Jerdog of XDA-Developers. This session was a panel discussion with some of the most well-known developers in the Android world. We discussed their current projects, what excites them about Android development, what they see as the future of Android development, and maybe even some answers to questions like, "To Kang of Not to Kang?" The panel featured XDA Recognized Developers Agrabren, Supercurio, Entropy512, Decad3nce, and Chainfire.

Statistics

Views

Total Views
1,486
Views on SlideShare
1,486
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Last minute replacement No PowerPoint special effects
  • - No “ fapped ”
  • -For app-devs not familiar with FAAPT Patch not very interesting -Attributes looked up ( android:layout_width ) -Simple lookup table
  • Debugged / went through sources / reverse engineered many apps -Helped quite a few people fixing their app -Article code often requested. ChainsDD signed off on it too!
  • exec() , ProcessBuilder: su –c “command”  one parameter. Quotes problem -writing script: AND executing it – space in paths! -rapid: expensive! Batch, as many commands in as little processes -many/lifecycle: expensive! Create su shell and keep it open, read/writing to stdin/stdout -hardcoded checks: su location, java package name -su parameters: it will start a shell if parameter not supported ! (see: VERSION checks)
  • - Works around all common pitfalls
  • - id is not always available, libsuperuser has workaround for that --- will not verify uid=0, but “ su ” will exist
  • - strictmode: network I/O on main thread  crash, flash red on disk I/O
  • - ProgressDialog
  • Example only does one specific action -Add service to manifest
  • -Triggers flash counters
  • -Others: depend on bootloader state
  • Bye!

BigAndroidBBQ 2012: XDA Session - Future of Android Development BigAndroidBBQ 2012: XDA Session - Future of Android Development Presentation Transcript

  • The Future of AndroidDevelopmentXDA Developer Panel 2012
  • Session SummaryIntroductionsApplicationsROMsKernelsCore AndroidQuestions & Answers
  • Introductions
  • Supercurio
  • AgrabrenSoftware Developer for NVIDIA CorporationDeveloped ROMs and Kernels for the HTC EVO4G and EVO 3DTwitter: @agrabren
  • Decad3nceBorn in Bosnia22-yr old student at the University of Nebraska-Lincoln studying Computer Science &EngineeringOpen-source fanatic and Device Maintainer forCyanogenModTwitter: @Decad3nce
  • Entropy512
  • Chainfire• Web: http://www.chainfire.eu/• Twitter: @ChainfireXDA• G+: http://gplus.chainfire.eu/
  • ApplicationsSupercurio
  • Project Voodoo Audio and Display low level mods from Linux Kernel patches to Android apps
  • Starting from scratch: How XDAcommunity promotes developmentGalaxy S lag: pauses during OS executionXDA Bounty thread raises donations to encourage development of a lagfix.Galaxy S sound quality tuning: enthusiasts test, donate and later buy the control app.Galaxy S and Nexus S Super AMOLED tuning: new kind of hack becoming quickly popular.
  • WTF is this thick French accentIll progress on that, its in my TODO list.My real name is François Simond, 30 year old. coming from France to attend this BBQ and meet you here.
  • R&D methodology: tests,measurements and feedback drivenForums members are supportive but often emotional.Strict testing and measurement methodology allow to publish safe improvements instead of half improvement half regression.Placebo is the enemy of innovation.
  • Voodoo LagfixGalaxy S original filesystem introduces latency and slow down during file writes.Development of a reliable RFS to Ext4 and Ext4 to RFS converter allowed Galaxy owners to enjoy their phone.Ext4 settings chosen for safety and speed now re-used by most manufacturers
  • Voodoo Sound first stepsTuning Wolfsonmicro codecs by hacking kernel driver source, rewriting selectively some i2c command sent to the hardwareRequirement: flashing a kernel implementing kernel patches.sysfs "text" interface.Android control application
  • Voodoo Sound and LOUDERlong term strategyHardware-agnostic generic i2c commands interceptor design.Implementation:• Minimalistic programmable Linux Kernel Module using rootkit-like methods to rewrite hardware commands• Complexity deported to an Android Java/C driver, mixer and UI communicating via ioctl with the kernel driver
  • Voodoo color basic Simple patch:Super AMOLED driver tuningSamsung Super AMOLED gamma points tuning, via the v1 gamma hack method.Affecting the image but inherently inaccurate.Considered as a panel rendering customization but not yet calibration.Now re-used in every Super AMOLED hacks
  • Voodoo Display Expert, long term1,5 year of development and preview soon to be released.Goals:• Fixing panel mis-configuration leading to sharpening artifacts, banding and shadows crushing/clipping• Panel calibration for accuracy and custom color tones.
  • Misc tools and one-shot apps,connections with the pressA few tools, most of them Open Source under WTFPL:• OTA RootKeeper (now merged)• Screen Test Patterns for display measurements• Audio Measurements Player for audio measurements• Voodoo Report for bug reporting and virtual teardowns• CIQ detector, FreeOrNot
  • Thanks to supportersWhat encouraged me to develop and share was solely the incredible initial support from XDA community.What allowed me to continue development is solely financial support from XDA enthusiasts, later extended to Google Play through app sales.
  • Thanks to manufacturersWolfsonmicro• providing access to datasheet under NDA• listening and integrating feedback in their new drivers and chips.• sharing knowledge and audio cultureSamsung Mobile Korea and USA• helping by sending development hardware• supporting and encouraging (albeit discreetly)
  • Q&A and meet me after the sessionPleased to meet you in person!You can reach me on twitter as well:http://twitter.com/supercurioProject website: http://project-voodoo.org/
  • ROMsAgrabrenDecad3nce
  • Developing for the HTCEVO 3DAgrabren
  • Why the EVO 3D?I love 3D... That’s why I work for NVIDIAReasonable size, great processorObvious successor to the HTC EVO 4G
  • Disarmed ToasterBring the AOSP experience to the EVO 3D Improved Battery Life Better Responsiveness Latest Versions of Android Support for 3D Camera and Panel
  • The Future of Android...Disarmed Toaster isn’t a ROM, it’s an idea... (and my wife’s XBox 360 handle)What if we could make a baseline ROM, and“apply” the flavor we want? CyanogenMod 10 ParanoidAndroid Android Open Kang Project (AOKP)Three ROMs in one package...
  • Variation is the spice oflife...Reduce the pain of flashing: Flashing between flavors does not require a factory reset Baseline framework ensures feature parity Consistent experience for the end user
  • Working withDevelopers Different types of Developers Kernel Developers Kernel Hackers ROM Developers ROM Hackers A Trademarked brand of Building Block Builders Themers
  • Working withDevelopers (cont.)Courtesy Don’t call people stupid for asking questions or pointing out “the obvious” Point out what may be “obvious”, as a ROM is large and sometimes it’s easy to overlook things
  • Examples fromDisarmed Toaster“Camera is rotated 90 degrees on first use, butfixes after taking the first picture. But youprobably already knew that, sorry.”User 1: “Video playback with [particular app]causes the device to reboot with [this video]. Ican upload if it would help?” OP: “Yes, please!” User 2: “I’ve run the video he was having trouble with, and here’s the logcat.”
  • CyanogenMod on Samsung Epic the perspective of aUnderstanding CyanogenMod from device maintainer. A presentation by Decad3nce Decad3nc
  • To cover:•• epicmtd: Fixing all the variances, nuances, and figuring out workarounds for a specific device.• you: How to get involved, where to find resources, and who to ask.• TODO: What I see as the future of Android/CyanogenMod. aries-common: Sharing the build environment with similar devices and working with maintainers outside of your devices scope.
  • aries-common:• o The common device sources shared between all the Galaxy S siblings. o Put forth by members of TeamHacksung and EpicCM o Contains:  Multiple shared libraries(from camera to audio)  releasetools  Common board declarations and overlays aries-common:
  • aries-common:• o commonalities:  The need for bdaddr reading  The need for bml over mtd  The need for custom releasetools aries-common:
  • aries-common:• o bdaddr:  Samsung lack of following conventions leads to some very elegant solutions  bdaddr_read in aries-common reads the custom SAMSUNG_BDADDR_PATH  Runs on board init aries-common:
  • aries-common:
  • aries-common:
  • aries-common:• o bml_over_mtd:  Collection of scripts, binaries, and update tools to convert bml partition scheme into mtd.  Useful to mimic Nexus S like environment.  Breakdown: • Checks for conversion • Initiliaizes bml_over_mtd binary • Converts to new partition layout aries-common:
  • aries-common:
  • aries-common:
  • aries-common:• o releastools:  Custom releasetools allow a device vendor to override compile time arguments for packaging.  Used along with shbootimg.mk script to create a working boot.img(android standard)  The python scripts also set the edify scripting in the update package. aries-common:
  • aries-common:
  • aries-common:• o teamhacksung members:  atinm  Kolja Dummann  Chrayu Desai  Rafael Salas  Pawit Pornkitprasan  Andrew Dodd  Andrew Mahone  Daniel Hillenbrand  Daniel Bateman  jt1134 aries-common:
  • aries-common:• o Different teams of developers working on similar devices. o teamhacksung, freeXperia, EpicCM, etc. o All are a component of the contributors that are within CyanogenMod. aries-common:
  • epicmtd:• o The device repo for the Samsung Epic (Sprint) o MTD suffix is because of the partitioning changes. o Maintained by EpicCM  Members include: • Will Keaney • Mike Kasick • Shareef Ali • Brian Beloshapka • Wispoffates • Donovan Bartish • nubecoder • nullghost epicmtd:
  • epicmtd:• o The epicmtd vendor is a derivative of the aries- common vendor. o Much like the aries-common vendor, it contains the necessities of:  bdaddr_read  custom releasetools  bml_over_mtd epicmtd:
  • epicmtd:• o However, epicmtds implementations of these are varied compared to aries due to hardware differences. o Differences:  Wimax/CDMA device  Keyboard(gpio shuffle)  Larger oneNAND  Unable to read BT MAC from /efs  Kernel driver variances • Touchscreen driver embedded the touchkey lights epicmtd:
  • epicmtd:• o Samsung had made things difficult for us. epicmtd:
  • epicmtd:• o The CDMA/Wimax/Sprint Quirks:  Utilizing the CDMA stack embedded in SamsungRIL in Cyanogenmod.  Pppd had to be manually started to get data connection, and modified for 100ms intervals for the epic radio.  The Samsung CDMA "ring of death" bug. • The phone emitted an "old fashioned ring" whenever there was an incoming call or someone was put on call waiting.  Emergency 911. • In original testing, e911 was not functional. epicmtd:
  • epicmtd:
  • epicmtd:
  • epicmtd:• o The larger OneNAND  Epic would end up utilizing Samsung OneNAND driver for the AUDI controller.  Varies with aries siblings.  Allowed for larger /data partitions, more space for users.  Did not need a dedicated /efs partition. epicmtd:
  • epicmtd:
  • epicmtd:• o Need for a custom bdaddr_read  The samsung epic didnt store bt mac address in /efs  Could only be read from a RIL property when stack was initialized  Fixed without having to modify BT stack in CyanogenMod.  Read from RIL, store, check on every init. epicmtd:
  • epicmtd:
  • epicmtd:
  • How to get Involved:• o Learn git, learn gerrit, use the cm wiki resources:  http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit  http://wiki.cyanogenmod.com/wiki/Howto:_Git o If not so advanced, take a heads up from Cyanogen:  "Stop. Write an app or two first, learn how the system works from a developer standpoint. Learn some Java. Read the developer documentation. Learn how to use Git. Then learn how to build AOSP from source. Read the porting guides, and learn how the build system works….. Now try to put your new found skills to work on enhancing the platform by writing code or making theme overlays. And share! And put that s**t on your resume. There is a *ton* of information out there but any kind of “step-by- step rom cooking guide” is going to be a complete fail- it’s too broad of a subject."
  • How to get Involved:• o Feel free to contact any device maintainer or general developer in CyanogenMod.  Contact via Google+, Contact via Twitterhttp://wiki.cyanogenmod.com/wiki/Community_Member s o If youre a developer looking to contribute in a meaningful right away, utilize devrel@cyanogenmod.com you:
  • How to get Involved:• o THANK YOUR MENTORS AND PEERS.  Thanks to Richard Ross(toastcfh)  Thanks to Warren Togami(warren)  Thanks to Will Keaney(Uberpinguin)  Thanks to Brian Beloshapka(bbelos)  Thanks to Shareef Ali(noobnl)  Thanks to Donovan Bartish(DRockstar)  Thanks to Justin Wood(nullghost)  Thanks to Troy Smith(wispoffates)  Thanks to Timothy Lusk  Thanks to Scott Warner(tortel)  Thanks to nubecoder, chris41gl, Rodderik, jt1134, nemith, AproSamurai and on and on... you:
  • KernelsEntropy512
  • Core Android• Chainfire
  • Chainfire Web: http://www.chainfire.eu/ Twitter: @ChainfireXDA G+: http://gplus.chainfire.eu/
  • Subjects • FAAPT • SuperSU • CF-Auto-Root
  • FAAPT• “Fast” Android Asset Packaging Tool• Significantly accelerates XML compilation• “Build Automatically” no longer taboo
  • Patch status • AOKP: Merged • CM: Merged • AOSP: Under review Binaries for Linux, OS X and Windowsavailable on XDA - Sources available on Gerrit
  • SuperSU Most su problems are caused by: • Calling su in the wrong way • Calling su at the wrong time Article and sample code (libsuperuser) will be available online soon.
  • Common pitfalls calling su• Runtime.exec() or ProcessBuilder with parameters• Writing a script with commands• Rapid successive su calls• Many su calls throughout the app’s lifecycle• Hardcoded checks• Assuming the su binary takes parameters
  • Best way to call su • Create an interactive su shell • Write commands to su’s STDIN • Read output from su’s STDOUT
  • List<String> Shell.SH.run(String command)List<String> Shell.SH.run(List<String>commands)List<String> Shell.SH.run(String[]commands)List<String> Shell.SU.run(String command)List<String> Shell.SU.run(List<String>commands)List<String> Shell.SU.run(String[]commands)
  • Checking for suavailability • Do not check for Java packages • Locate su in PATH, or • Try running su and check id output (preferred) boolean Shell.SU.available()
  • Blocking I/O• su is a blocking I/O call - it might return in milliseconds, or next week• Do not make blocking I/O calls from the main thread (see strictmode)• Calling su on the main thread is the primary source of crashes and freezes when apps try to run commands as root• libsuperuser will throw an exception when called from the main thread in debug mode
  • Main thread ?• All Activity-based code is run on the main thread• All manifest-declared BroadcastReceivers run on the main thread. May cause deadlock even if not running on the main thread• Most Service-based code is run on the main thread. Notable exception: IntentService
  • if (Looper.myLooper() ==Looper.getMainLooper()) { // running on the main thread } else { // not running on the main thread }
  • AsyncTask
  • public class MainActivity extends Activity { private class Startup extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) { // this method is executed in a background thread // no problem calling su here return null; } } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // start background task (new Startup()).execute(); }}
  • IntentService
  • public class BackgroundIntentService extends IntentService { public static void launchService(Context context) { if (context == null) return; context.startService( new Intent(context, BackgroundIntentService.class) ); } public BackgroundIntentService() { super("BackgroundIntentService"); } @Override protected void onHandleIntent(Intent intent) { // the code you put here will be executed in a background thread }}public class BootCompleteReceiver extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { BackgroundIntentService.launchService(context); }}
  • CF-Auto-Root• Automated root creator, for funsies• Takes a stock recovery image and produces an automated recovery+cache image, which: • Installs SuperSU • Wipes cache • Reinstalls stock recovery
  • Compatibility• Still in testing, about 30 roots already available• Starting with Samsung devices: • Exynos • Snapdragon • OMAP • Tegra (under development)• Others may follow
  • Future • http://autoroot.chainfire.eu/ Live, but still in testing, no public upload yet • How long will this work ? • What about the improved security features in Android 4.1.2 and 4.2 ?
  • Chainfire Web: http://www.chainfire.eu/ Twitter: @ChainfireXDA G+: http://gplus.chainfire.eu/
  • Questions & Answers