Friday, May 11, 2012

Epic 4G Kernel 3.0.x Progress

This post documents our progress porting kernel-3.0.x to work on Epic 4G CM9.

  • Update 6/23/2012:
    • Haptic feedback is now working, thanks to nubecoder.
    • Updated the test kernel download files.  If you were using a previous test kernel, redownload the zImage and boot.cpio.gz.
  • News 6/20/2012:
    • The orientation sensor has been fixed with the switch to CM9 libsensor source, although the test kernel is not yet updated for it.
    • WiMax is working, although there are still some big bugs to work out.  The test kernel will be released when it is stable enough to use.
  • News 6/18/2012:
    • nubecoder is working on porting the vibetonz driver to the 3.0.x kernel.
  • Update 6/9/2012:
    • Reverted display drivers to match stock 2.6 which results in much better colors.
    • Incorporated the 200MHz min frequency fix from 2.6.
    • Switched the default governor to Ondemand and added the ability to control the min/max cpu frequency via the Performance menu.
    • Added sysfs controls from 2.6 for disabling the capactive key backlights via the Advanced Settings menu.
    • Updated to 3.0.33
    • Updated the test kernel download files.  If you were using a previous test kernel, redownload the zImage and boot.cpio.gz.
  • Update 6/4/2012:  
    • Added a "Bugs" list. 
  • Update 6/3/2012:  
    • Capacitive key backlights are now timing out with the keyboard light.
  • Update 6/2/2012: 
    • Mic recording and proximity sensor now properly continue to work during calls.
    • Kexec test kernel posted under Links section with instructions. Feel free to test and report any findings as a comment to this blog post.
  • Update 5/19/2012:  
    • Fix light & proximity sensors.  This also allows for Autobrightness to function.  
    • Fixed camera snapshots.  Front facing camera still needs fixing.  Fixed front facing camera.
    • There appears to be a bug during calls where the mic recording gets disabled as the CPU goes to sleep.  Waking the phone with the power key re-enables the mic.  Calls are not dropped and you are still able to hear the other person, but they obviously won't hear you.  Using an app like Softlocker to disable deep sleep allows the mic to function continuously during the call. 
    • Proximity sensor fails to operate the screen after above mentioned suspend issue, until manually reactivating the sensor or after initiating a new call session.
  • Update 5/17/2012:  Call audio is now working.  
  • Update 5/11/2012:  Wifi is now working.
What Works
  • Haptic Feedback
  • Call Audio
  • Wifi
  • SDCard
  • USB Mass Storage
  • 3g & Text Messaging
  • GPS
  • Light/Proximity Sensor
  • Bluetooth, A2DP
  • Ringtones, Notification Sounds, Media Audio (Speaker & Headset)
  • Incoming/Outgoing Calls
  • Recovery Mode
  • adb
  • Keyboard
  • Touchscreen & Softkeys
  • Autobrightness
  • Capacitive backlight timeout
  • Camera Snapshots (Front and Back)
  • Video Recording
  • Screenshots
  • /system, /data, /cache mounted as mtd/yaffs2
  • Suspend/Resume
  • Charging
What Doesn't Work Yet
  • WiMAX - In progress.
  • Headphone mic (need to confirm)
  • More to add as we find it
  • Capacitive key backlights become dim at some point (happens after first suspend).
  • adb uses Google vendor id (18d1) during recovery mode instead of Samsung id (04e8).
    • Linux users may need to adjust your usb udev rules to recognize device. (Permanent flash only)
  • Registers a generic adb device serial number.
  • Charging bugs (seem to be tied together, but doesn't always happen)
    • Statusbar battery icon not properly reflecting actual charge state. (possibly occurs after first suspend, still unconfirmed.)
    • Phone enters deep sleep while on charger. (might have been a fluke, need to confirm)
    • Charge LED does not stay lit with screen off. (Presumably when enters deep sleep)
  • Powered off device on charger will automatically boot up (Permanent flash only)


Temporary kexec test kernel instructions:
Files last updated: 6/23/2012
Note:  The orientation sensor should work if you are on Beta5-pre1 or newer.  If north is pointing the wrong direction, consider a quick calibration as seen here:

  1. Download the 3 files: zImage, boot.cpio.gz, &
  2. Place the files at the root of your sdcard (/sdcard/zImage, etc.)
  3. Flash from CWM.
IMPORTANT:  The phone's stock browser saves zImage as zImage.bin.  You *must* rename it back to zImage.

Please test anything in the list above, whether we specify it working or not.  If something isn't working fully, or not working at all, please let us know in a comment.  Anytime you want to go back to your normal kernel, just reboot the phone.

CM9 beta3 for Epic 4G Release Notes

CyanogenMod's Team Epic is proud to announce the release of CM9 beta3 for Sprint's Samsung Epic 4G. Please follow us on Google+Facebook, or Twitter for the latest news. This release contains many new features and significant bug fixes!

Release Notes
  • IMPORTANT! Before you upgrade to CM9 beta3, DO THIS to prevent possible issues.
    • Remove Voltage Control, SetCPU, and uncheck "Set on boot" in Settings > Performance > Processor.
    • If your GPS navigation was broken in CM9 beta2, uninstall and reinstall Google Maps.
    • If you have had trouble with Gallery displaying photos in the wrong order, or thumbnails matching to the wrong photo, see this thread for a tool to run before you upgrade to beta3.
  • If you have trouble with auto rotation after enabling the settings in the Customization Guide, try calibrating your sensors with the temporary FC09 sdcard utility.
Project News
  • Launch of Team Epic - CyanogenMod's Sprint Samsung specialists
    • Due to the success of EpicCM and the generous support of the Epic 4G community, we were able to recruit many developers and non-dev leaders to help with QA testing, documentation and answering questions.  This has allowed us to purchase additional dev phones in order to aid development of Epic Touch, Nexus S 4G and Sprint Galaxy Nexus.  We also have productive teamwork with Epic 4G's AOKP developer Alias8818, allowing us fix bugs faster in both CM9 and AOKP.  We are now continuing fund raising to purchase additional dev phones including Sprint's upcoming SGS3.
  • kernel-3.0.x News
    • One of our long-term goals is port a newer 3.0.x kernel work on Epic, and to maintain that kernel together with the very similar hardware of the Nexus S 4G.  KalimAz (CyanogenMod's maintainer of Nexus S and Galaxy Nexus) received an Epic 4G in Spain on May 3rd.  Now KalimAz, mkasick and bbelos are slowly getting closer on this goal, most recently they were working on fixing the wifi driver.
Tour of Android 4.0.4 ICS CM9 on Samsung Epic 4G

Changelog of CM9 beta3 (see previous)
    • Theme Chooser
      • The ability to customize look and feel of CM9 to user choice using predefined themes or community driven user inspired ideas. Preview the theme before applying to make sure its exactly what your looking for in a theme before applying to the phone.
      • Lockscreen Shortcuts
        • Allows you to choose lock screen shortcuts (1-5) anything from browser, Facebook, twitter and messaging, the choice is yours, with customizable icon's.

    • Capacitive Buttons/Keyboard Backlight Disable Option
      • One of the most exciting new features in CM9 beta3 for Epic 4G is the ability to disable the capacitive touchkey backlights.  Unlike other phones with multiple brightness levels, the touchkey lights on Epic 4G have only on and off.  Using the Epic in the dark would be often annoying as the touchkey lights are blindingly bright.
      • Settings > Advanced > Disable Touchkey Lights turns off lights after a 750ms delay since you last touched it.  We designed it this way on purpose so the user has enough time to recognize the location identity of the four buttons.
      • Settings > Display > Automatic backlight > Edit other levels... allows you to further customize when touchkey lights and even the keyboard backlight will be enabled based upon the light sensor levels.  0 means off and 255 means on.
    • Unique Bluetooth MAC Address Fix
      • Previously Epic CM9 used a generic MAC address instead of a unique per-device MAC address.  Since the bluetooth address has changed, all  users must re-pair their bluetooth devices before they may be used again.  This resolves several known issues with some newer bt devices.
    • Gallery Photo GPS Fix
      • All previous versions of CM9 for Epic 4G would an erroneous date of 1969 in the photo EXIF data if you have GPS enabled at the time of taking the photo.  This would cause the Gallery app to become confused and display photos in the wrong order.  All new photos taken by the Camera of CM9 for Epic 4G will no longer have this issue.  bbelos and Cyc of Team Epic wrote this tool and instructions for fixing your older photos.
    • Conservative Overclocking
      • CyanogenMod aims for maximum stability, so we have decided to include only the most conservative overclocking and no undervolting in the standard CM9 kernel.  Undervolting is known to work 99.99% of the time, but rare timings involving certain apps can cause the phone to spontaneously reboot.  It is our belief that many reports of random reboots are the result of unsafe overclocking or undervolting.  We will not ship the means for users to shoot themselves in the foot in the default operating system. 
      • We have added only the 1.2GHz step, disabled by default.  You enable it in Settings > Performance > Processor > Maximum CPU frequency.  Since voltages cannot be changed, no add-on tools like Voltage Control are necessary.
      • While 1.2Ghz maximum seems to be stable for most users, we do not recommend using it if you care about maximizing stability.
    • Smoother cpufreq scaling
      • All previous kernels have had trouble where it would no longer use the 100MHz step if you have changed your cpufreq or governor settings.  Major fixes were made to the kernel to allow cpufreq to scale more smoothly.  As a result, the cpufreq governors now behave differently.  The powersave governor has been removed as it causes extreme slowness, failures and consequential higher battery consumption. 
      • GPS Navigation and Google Maps Fix
        • CM9 beta2 added emulation for RotationVectorSensor2.  Unfortunately this exposed a race condition that can cause sensors to entirely deadlock, the cause of the rare reports of GPS Navigation failures we have been hearing lately.  beta3 contains teamhacksung's fix to the magnetometer driver to prevent this failure.
        • If your GPS was already broken in CM9 beta2, you may need to uninstall and reinstall Google Maps in order to fix it.
      • Camera Timer
        • The Camera app now has the ability to set a countdown timer before a photo is taken.  While in the Camera, hit the Settings button, then the action bar (three dots), then tap the camera button.  The on-screen camera button will turn red and you will see a red countdown in the top left.  When it reaches zero it will take a photo.
      See the CM9 Status page for more details. Then proceed to the CM9 Install Guide.  Please check if your bugs are already filed in the Epic CM Issue Tracker.

      If you appreciate this work, please consider supporting the Team Epic. Thank you!

      Thursday, May 10, 2012

      Team Epic Development Fund

      Dear Epic 4G community,

      We have merged the Epic 4G donor list to Team Epic's new blog.  Your support has made it possible to raise nearly $5,000 in funds toward build server upgrades, phones and other development expenses.  This generous community underwriting has made it possible for the team to expand and begin to support development of other flagship Samsung phones on Sprint like the Epic Touch and Galaxy Nexus.

      The team is is now fixing bugs to prepare for CM9 beta3 for Epic 4G.  A great many bugs have already been fixed and new features are working!  If you follow us on Google+ you can help us to test builds as we approach release.  Epic 4G is still a great phone and this team will continue to update CyanogenMod to support it for the foreseeable future.

      In an unusual but highly successful move, we have invited Alias8818 of Epic 4G AOKP to collaborate on common issues as a member of Team Epic.  This has turned out to be a healthy partnership as we have learned about fixes in AOKP to merge into CM, and AOKP relies on CM for device bug fixes.

      If you appreciate our work, please consider supporting our team with a tiny contribution of $5.  We are currently saving up reserves to purchase Sprint's upcoming SGS3 for our lead developers, as we believe it will be the best Android phone on Sprint.  We sincerely hope it will have a slider keyboard like the first generation SGS Epic 4G, but even without a keyboard it will be an awesome phone that we want CyanogenMod to work well with.

      Thank you!

      Monday, May 7, 2012

      Pictures Repair and Cleanup for Epic CM9

      Epic isn't that old!
      All pictures taken since the start of CM9 for the Epic have contained invalid GPS data that have affect how the pictures are shown in Gallery, this caused photos to appear out of order as Gallery thinks they were taken in year 1969.  Additionally there were previously issues with removable storage but people's thumbnails were still incorrect and not matching their respective pictures.  Also Beta2 and earlier suffered from an issue where if CPU minimum and maximum frequencies were modified they would lose 100Mhz setting so the phone would idle at 200MHz instead of dropping to 100MHz when idle.

      Beta 3 has all these issues resolved but the pictures already taken are still affected as well as settings saved for the processor.

      This patch does the following:
      • Removes ALL GPS data from CM9 and CM7 pictures
        • Pictures taken with Touchwiz ROMs are not affected
        • Pictures taken with GPS Location ON with Beta 3 and newer as well as CM7 WILL lose GPS data from those pictures if they are not backed up elsewhere before flashing!
      • Clears Gallery's thumbnail cache and databases so it can rescan all the images fresh
        • Gallery may show some of your pictures with GPS data in details but that is just stored in the database and not in the file and will be lost after the script is ran.
      • Wipes the /data/system/throttle folder so CPU governor and states will start at default frequencies
      Depending on the number of pictures this can take several minutes. I recommend keeping the phone plugged in while running to ensure the process is not interrupted.

      Time stamps shown by Gallery will be off by your Time Zone (-4 hours to -6 hours here in the US). This is a bug affecting all android OSes to present and is NOT device specific. Even with the time-stamps being off the pictures have the correct order and will be read correctly when uploaded to the web or other devices.

      Download [1]
      Flash in CWM Recovery.

      If you appreciate this work, please consider supporting the Epic CM team. Thank you!