SlideShare a Scribd company logo
1 of 89
The Future of Android
Development
XDA Developer Panel 2012
Session Summary

Introductions
Applications
ROMs
Kernels
Core Android
Questions & Answers
Introductions
Supercurio
Agrabren


Software Developer for NVIDIA Corporation
Developed ROMs and Kernels for the HTC EVO
4G and EVO 3D
Twitter: @agrabren
Decad3nce

Born in Bosnia
22-yr old student at the University of Nebraska-
Lincoln studying Computer Science &
Engineering
Open-source fanatic and Device Maintainer for
CyanogenMod
Twitter: @Decad3nce
Entropy512
Chainfire

•
    Web: http://www.chainfire.eu/
•
    Twitter: @ChainfireXDA
•
    G+: http://gplus.chainfire.eu/
Applications



Supercurio
Project Voodoo
     Audio and Display low level mods
 from Linux Kernel patches to Android apps
Starting from scratch: How XDA
community promotes development
Galaxy S lag: pauses during OS execution
XDA 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 accent
I'll progress on that, it's 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 driven
Forums 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 Lagfix
Galaxy 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 steps
Tuning Wolfsonmicro codecs by hacking kernel
 driver source, rewriting selectively some i2c
 command sent to the hardware
Requirement: flashing a kernel implementing
 kernel patches.
sysfs "text" interface.
Android control application
Voodoo Sound and LOUDER
long term strategy
Hardware-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 tuning
Samsung 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 term
1,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 press
A 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 supporters
What 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 manufacturers
Wolfsonmicro

• providing access to datasheet under NDA
• listening and integrating feedback in their new
 drivers and chips.

• sharing knowledge and audio culture
Samsung Mobile Korea and USA

• helping by sending development hardware
• supporting and encouraging (albeit discreetly)
Q&A and meet me after the session
Pleased to meet you in person!


You can reach me on twitter as well:
http://twitter.com/supercurio
Project website: http://project-voodoo.org/
ROMs


Agrabren
Decad3nce
Developing for the HTC
EVO 3D
Agrabren
Why the EVO 3D?


I love 3D... That’s why I work for NVIDIA
Reasonable size, great processor
Obvious successor to the HTC EVO 4G
Disarmed Toaster

Bring 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 of
life...

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 with
Developers
 Different types of Developers
   Kernel Developers
   Kernel Hackers
   ROM Developers
   ROM Hackers
   A Trademarked brand of Building Block
   Builders
   Themers
Working with
Developers (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 from
Disarmed Toaster
“Camera is rotated 90 degrees on first use, but
fixes after taking the first picture. But you
probably already knew that, sorry.”
User 1: “Video playback with [particular app]
causes the device to reboot with [this video]. I
can 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 a
Understanding 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 didn't 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 Twitter



http://wiki.cyanogenmod.com/wiki/Community_Member
  s

    o   If you're 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:
Kernels



Entropy512
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 Windows
available 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 su
availability
  •
      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

More Related Content

What's hot

Movi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupMovi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupLars-Erik M Ravn
 
Extending Android with New Devices
Extending Android with New DevicesExtending Android with New Devices
Extending Android with New DevicesShree Kumar
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvmdfages
 
Facets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark MurphyFacets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark MurphySkills Matter
 
StateScriptingInUncharted2
StateScriptingInUncharted2StateScriptingInUncharted2
StateScriptingInUncharted2gcarlton
 

What's hot (7)

Movi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupMovi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetup
 
Hardware Accelerated 2D Rendering for Android
Hardware Accelerated 2D Rendering for AndroidHardware Accelerated 2D Rendering for Android
Hardware Accelerated 2D Rendering for Android
 
Extending Android with New Devices
Extending Android with New DevicesExtending Android with New Devices
Extending Android with New Devices
 
Droidcon uk2012 androvm
Droidcon uk2012 androvmDroidcon uk2012 androvm
Droidcon uk2012 androvm
 
Alexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal EngineAlexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal Engine
 
Facets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark MurphyFacets Of Fragmentation by Mark Murphy
Facets Of Fragmentation by Mark Murphy
 
StateScriptingInUncharted2
StateScriptingInUncharted2StateScriptingInUncharted2
StateScriptingInUncharted2
 

Viewers also liked

Future of Android ... And How To Stop It!
Future of Android ... And How To Stop It!Future of Android ... And How To Stop It!
Future of Android ... And How To Stop It!Terence Eden
 
FNT Software Solutions Pvt Ltd Placement Papers - Android Technology
FNT Software Solutions Pvt Ltd Placement Papers - Android TechnologyFNT Software Solutions Pvt Ltd Placement Papers - Android Technology
FNT Software Solutions Pvt Ltd Placement Papers - Android Technologyfntsofttech
 
Lo1.2 types of computer system error
Lo1.2 types of computer system errorLo1.2 types of computer system error
Lo1.2 types of computer system errorFrya Lora
 
Algebra Is Weightlifting For The Brain
Algebra Is  Weightlifting For The  BrainAlgebra Is  Weightlifting For The  Brain
Algebra Is Weightlifting For The BrainMaria H. Andersen
 
How to improve your concentration with 3 simple exercises-www.kkkbi.com
How to improve your concentration with 3 simple exercises-www.kkkbi.comHow to improve your concentration with 3 simple exercises-www.kkkbi.com
How to improve your concentration with 3 simple exercises-www.kkkbi.comkkkbi
 
Mobile Application Development With Android
Mobile Application Development With AndroidMobile Application Development With Android
Mobile Application Development With Androidguest213e237
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Developmentjini james
 
Types of computer system error
Types of computer system errorTypes of computer system error
Types of computer system errorRachel Espino
 

Viewers also liked (9)

Future of Android ... And How To Stop It!
Future of Android ... And How To Stop It!Future of Android ... And How To Stop It!
Future of Android ... And How To Stop It!
 
FNT Software Solutions Pvt Ltd Placement Papers - Android Technology
FNT Software Solutions Pvt Ltd Placement Papers - Android TechnologyFNT Software Solutions Pvt Ltd Placement Papers - Android Technology
FNT Software Solutions Pvt Ltd Placement Papers - Android Technology
 
Lo1.2 types of computer system error
Lo1.2 types of computer system errorLo1.2 types of computer system error
Lo1.2 types of computer system error
 
Algebra Is Weightlifting For The Brain
Algebra Is  Weightlifting For The  BrainAlgebra Is  Weightlifting For The  Brain
Algebra Is Weightlifting For The Brain
 
How to improve your concentration with 3 simple exercises-www.kkkbi.com
How to improve your concentration with 3 simple exercises-www.kkkbi.comHow to improve your concentration with 3 simple exercises-www.kkkbi.com
How to improve your concentration with 3 simple exercises-www.kkkbi.com
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Mobile Application Development With Android
Mobile Application Development With AndroidMobile Application Development With Android
Mobile Application Development With Android
 
Mobile Application Development
Mobile Application DevelopmentMobile Application Development
Mobile Application Development
 
Types of computer system error
Types of computer system errorTypes of computer system error
Types of computer system error
 

Similar to BigAndroidBBQ 2012: XDA Session - Future of Android Development

0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlabNational Cheng Kung University
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02chon2010
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osArnav Gupta
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boardsLF Events
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageXamarin
 
ABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsBenjamin Zores
 
Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Opersys inc.
 
Add sale davinci
Add sale davinciAdd sale davinci
Add sale davinciAkash Sahoo
 
Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)cbeyls
 
HKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOHKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOLinaro
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VOpersys inc.
 
Freedreno on Android – XDC 2023
Freedreno on Android          – XDC 2023Freedreno on Android          – XDC 2023
Freedreno on Android – XDC 2023Igalia
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIOpersys inc.
 
Java on the GPU: Where are we now?
Java on the GPU: Where are we now?Java on the GPU: Where are we now?
Java on the GPU: Where are we now?Dmitry Alexandrov
 
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)Ron Munitz
 
Getting Started with Node.js
Getting Started with Node.jsGetting Started with Node.js
Getting Started with Node.jsJustin Reock
 
Dynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open ChallengesDynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open Challengesbcantrill
 

Similar to BigAndroidBBQ 2012: XDA Session - Future of Android Development (20)

0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Enhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_osEnhancing and modifying_the_core_android_os
Enhancing and modifying_the_core_android_os
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boards
 
Beating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett DuncavageBeating Android Fragmentation, Brett Duncavage
Beating Android Fragmentation, Brett Duncavage
 
ABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded SystemsABS 2014 - The Growth of Android in Embedded Systems
ABS 2014 - The Growth of Android in Embedded Systems
 
Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014Is Android the New King of Embedded OSes at Embedded World 2014
Is Android the New King of Embedded OSes at Embedded World 2014
 
Add sale davinci
Add sale davinciAdd sale davinci
Add sale davinci
 
Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)Introduction to Android (Jeudis du libre)
Introduction to Android (Jeudis du libre)
 
HKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOHKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEO
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
 
Android Optimization: Myth and Reality
Android Optimization: Myth and RealityAndroid Optimization: Myth and Reality
Android Optimization: Myth and Reality
 
Freedreno on Android – XDC 2023
Freedreno on Android          – XDC 2023Freedreno on Android          – XDC 2023
Freedreno on Android – XDC 2023
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
Java on the GPU: Where are we now?
Java on the GPU: Where are we now?Java on the GPU: Where are we now?
Java on the GPU: Where are we now?
 
Universal Userland
Universal UserlandUniversal Userland
Universal Userland
 
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
Bringing up Android on your favorite X86 Workstation or VM (AnDevCon IV, 2012)
 
Getting Started with Node.js
Getting Started with Node.jsGetting Started with Node.js
Getting Started with Node.js
 
Dynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open ChallengesDynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open Challenges
 

Recently uploaded

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Recently uploaded (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

BigAndroidBBQ 2012: XDA Session - Future of Android Development

  • 1. The Future of Android Development XDA Developer Panel 2012
  • 3.
  • 4.
  • 7. Agrabren Software Developer for NVIDIA Corporation Developed ROMs and Kernels for the HTC EVO 4G and EVO 3D Twitter: @agrabren
  • 8. Decad3nce Born in Bosnia 22-yr old student at the University of Nebraska- Lincoln studying Computer Science & Engineering Open-source fanatic and Device Maintainer for CyanogenMod Twitter: @Decad3nce
  • 10. Chainfire • Web: http://www.chainfire.eu/ • Twitter: @ChainfireXDA • G+: http://gplus.chainfire.eu/
  • 12. Project Voodoo Audio and Display low level mods from Linux Kernel patches to Android apps
  • 13. Starting from scratch: How XDA community promotes development Galaxy S lag: pauses during OS execution XDA 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.
  • 14. WTF is this thick French accent I'll progress on that, it's 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.
  • 15. R&D methodology: tests, measurements and feedback driven Forums 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.
  • 16. Voodoo Lagfix Galaxy 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
  • 17. Voodoo Sound first steps Tuning Wolfsonmicro codecs by hacking kernel driver source, rewriting selectively some i2c command sent to the hardware Requirement: flashing a kernel implementing kernel patches. sysfs "text" interface. Android control application
  • 18. Voodoo Sound and LOUDER long term strategy Hardware-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
  • 19. Voodoo color basic Simple patch: Super AMOLED driver tuning Samsung 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
  • 20. Voodoo Display Expert, long term 1,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.
  • 21. Misc tools and one-shot apps, connections with the press A 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
  • 22. Thanks to supporters What 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.
  • 23. Thanks to manufacturers Wolfsonmicro • providing access to datasheet under NDA • listening and integrating feedback in their new drivers and chips. • sharing knowledge and audio culture Samsung Mobile Korea and USA • helping by sending development hardware • supporting and encouraging (albeit discreetly)
  • 24. Q&A and meet me after the session Pleased to meet you in person! You can reach me on twitter as well: http://twitter.com/supercurio Project website: http://project-voodoo.org/
  • 26.
  • 27. Developing for the HTC EVO 3D Agrabren
  • 28. Why the EVO 3D? I love 3D... That’s why I work for NVIDIA Reasonable size, great processor Obvious successor to the HTC EVO 4G
  • 29. Disarmed Toaster Bring the AOSP experience to the EVO 3D Improved Battery Life Better Responsiveness Latest Versions of Android Support for 3D Camera and Panel
  • 30. 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...
  • 31. Variation is the spice of life... 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
  • 32. Working with Developers Different types of Developers Kernel Developers Kernel Hackers ROM Developers ROM Hackers A Trademarked brand of Building Block Builders Themers
  • 33. Working with Developers (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
  • 34. Examples from Disarmed Toaster “Camera is rotated 90 degrees on first use, but fixes after taking the first picture. But you probably already knew that, sorry.” User 1: “Video playback with [particular app] causes the device to reboot with [this video]. I can 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.”
  • 35.
  • 36. CyanogenMod on Samsung Epic the perspective of a Understanding CyanogenMod from device maintainer. A presentation by Decad3nce Decad3nc
  • 37. 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.
  • 38. 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:
  • 39. aries-common: • o commonalities:  The need for bdaddr reading  The need for bml over mtd  The need for custom releasetools aries-common:
  • 40. 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:
  • 43. 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:
  • 46. 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:
  • 48. 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:
  • 49. 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:
  • 50. 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:
  • 51. 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:
  • 52. 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:
  • 53. epicmtd: • o Samsung had made things difficult for us. epicmtd:
  • 54. 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:
  • 57. 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:
  • 59. epicmtd: • o Need for a custom bdaddr_read  The samsung epic didn't 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:
  • 62. 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."
  • 63. How to get Involved: • o Feel free to contact any device maintainer or general developer in CyanogenMod.  Contact via Google+, Contact via Twitter http://wiki.cyanogenmod.com/wiki/Community_Member s o If you're a developer looking to contribute in a meaningful right away, utilize devrel@cyanogenmod.com you:
  • 64. 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:
  • 65.
  • 67. Core Android • Chainfire
  • 68. Chainfire Web: http://www.chainfire.eu/ Twitter: @ChainfireXDA G+: http://gplus.chainfire.eu/
  • 69. Subjects • FAAPT • SuperSU • CF-Auto-Root
  • 70. FAAPT • “Fast” Android Asset Packaging Tool • Significantly accelerates XML compilation • “Build Automatically” no longer taboo
  • 71. Patch status • AOKP: Merged • CM: Merged • AOSP: Under review Binaries for Linux, OS X and Windows available on XDA - Sources available on Gerrit
  • 72. 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.
  • 73. 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
  • 74. Best way to call su • Create an interactive su shell • Write commands to su’s STDIN • Read output from su’s STDOUT
  • 75. 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)
  • 76. Checking for su availability • Do not check for Java packages • Locate su in PATH, or • Try running su and check id output (preferred) boolean Shell.SU.available()
  • 77. 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
  • 78. 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
  • 79. if (Looper.myLooper() == Looper.getMainLooper()) { // running on the main thread } else { // not running on the main thread }
  • 81. 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(); } }
  • 83. 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); } }
  • 84. 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
  • 85. Compatibility • Still in testing, about 30 roots already available • Starting with Samsung devices: • Exynos • Snapdragon • OMAP • Tegra (under development) • Others may follow
  • 86. 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 ?
  • 87. Chainfire Web: http://www.chainfire.eu/ Twitter: @ChainfireXDA G+: http://gplus.chainfire.eu/
  • 88.

Editor's Notes

  1. Last minute replacement No PowerPoint special effects
  2. - No “ fapped ”
  3. -For app-devs not familiar with FAAPT Patch not very interesting -Attributes looked up ( android:layout_width ) -Simple lookup table
  4. 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!
  5. 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)
  6. - Works around all common pitfalls
  7. - id is not always available, libsuperuser has workaround for that --- will not verify uid=0, but “ su ” will exist
  8. - strictmode: network I/O on main thread  crash, flash red on disk I/O
  9. - ProgressDialog
  10. Example only does one specific action -Add service to manifest
  11. -Triggers flash counters
  12. -Others: depend on bootloader state
  13. Bye!