MoDaCo is undergoing planned maintenance. Site functionality may be reduced - follow @modaco or @paulobrien on Twitter for updates.

  • Announcements

    • Reminder - MoDaCo position on illegal content

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such software
      Nintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)


      CUSTOM ROMS

      You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not be hosted directly in topic via the MoDaCo attachment system
      ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)
      ROMs must give full credit to the original author
      This decision has been taken in light of the huge amount of interest in this area of device customisation within the community, and member feedback! Please note that custom ROM discussion should be kept in specific device sub-areas, (e.g. Kaiser.MoDaCo.com for Kaiser based devices). ISSUES If you have any issues with this policy, please contact me directly via PM. P
    • Support MoDaCo by signing up to a MoDaCo Silver or Gold membership

      To sign up to an annual MoDaCo Silver subscription which will eliminate all ads from the site (as well as giving you access to the MoDaCo Online Kitchens for Android) for only £9.99 using PayPal, Credit or Debit Card, ensure you are logged in to the site, and then click the link below, which will take you directly to the subscription store! You can also sign up to an annual MoDaCo Gold subscription for £29.99, which adds the benefits listed below! PURCHASE A MODACO SUBSCRIPTION - FREE Titanium Backup Mobile for Android worth $5.99! - FREE 1 year PrivateInternetAccess.com worth $39.95! - FREE 1 year LastPass Premium worth $12! - FREE CalcConvert for Pocket PC from Binaryfish worth $17.95! - FREE Calendar Bar for Pocket PC from OmegaOne worth $9.99! - FREE CamerAware for Pocket PC and Smartphone from MoDaCo worth £19.99 / $30! - FREE Chronos for Pocket PC from ActiveKitten worth $14.95! - FREE CodeWallet Pro for Smartphone and Pocket PC from DeveloperOne worth up to $24.95! - FREE Concentrix for Pocket PC from eSoft Interactive worth $9.95! - FREE FlexMail for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE FTouchSL for Pocket PC from Vekoff s.r.o. worth 10 euro / $12.50! - FREE Jewel Challenge for Pocket PC from eSoft Interactive worth $9.95! - FREE John Cody's Alerts Pro for Smartphone from Omnisoft worth $14.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Dutch for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> French for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> German for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Italian for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Talking Dictionary 2008 English <-> Spanish for Pocket PC from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Dutch for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> French for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> German for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Russian for Smartphone from Lingvosoft worth $49.95! - FREE LingvoSoft Dictionary English <-> Turkish for Smartphone from Lingvosoft worth $49.95! - FREE Note2Self for Pocket PC and Smartphone from WebIS worth up to $19.90! - FREE Opera 8.60 for Pocket PC and Smartphone from Opera Software worth up to $48! - FREE Pocket Informant for Pocket PC and Smartphone from WebIS worth up to $59.90! - FREE Pocket Launcher for Pocket PC and Smartphone from Conduits worth $9.95! - FREE PTab for Pocket PC and Smartphone from z4soft worth up to $60! - FREE Resco Explorer for Pocket PC and Smartphone from Resco worth up to $49.90! - FREE Safemode for Pocket PC from monocube worth $12.95 - FREE SplashPhoto for Pocket PC and Smartphone from SplashData worth up to $59.90! - FREE Sprite Backup for Pocket PC and Smartphone from Sprite Software worth $29.95! - FREE Teksoft Glyphs UI for Pocket PC and Smartphone from Teksoft €9.95! - FREE Teksoft HeadsetRemote for Pocket PC and Smartphone from Teksoft €4.95! - FREE Traffic Jam for Pocket PC from eSoft Interactive worth $9.95! - FREE unlock (1 per year) from imei-check.co.uk - DISCOUNT of 10% at MoDaCo FairDeal - DISCOUNT of 10% at Semsons.com - FORUM - AD FREE SITE - FORUM - custom rank / title - FORUM - double competition entries - FORUM - double post attachment space - FORUM - no search flood control - FORUM - priority event registration - FORUM - triple PM space
    • Reminder: Selling items on the forum directly is not allowed

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspensions / ban.
Sign in to follow this  
Followers 0

Patches for: [ICS][CM9][4.0.4] CyanogenMod 9.1 for the Huawei Ascend G300 [ROM] from Dazzozo

11 posts in this topic

Posted (edited) · Report post

Hi,

I like to open this thread for contribute to the good effort from Dazzozo to port and patch CM9 for the G300.

This thread is for posting PATCHES or CONTRIBUTIONS. Please, don't post for requests or suggestions, or for report bugs; use the main thread to do it. This is a DEV thread.

Next two posts include some contributions by myself.

Backside!

Edited by backside
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

...

Edited by mack_
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

PATCH #1: Fix Compcache (AKA zram) disabled

Explanation: The current compcache service isn't started in CM9. The source uses the file "/system/etc/init.local.rc" to declare at boot the service, but this file is NEVER called at the boot process. The file "/init.rc" has the import, but the filesystem isn't mounted (/system) when the "/init" parser reads the import. You can check that this an unresolved bug of cyanogenmod. If you like to check: open an ADB session and see "/dev/block/zram0".

Solution: Execute the file "/system/bin/handle_compcache". This initializes the compcache using the correct values of the interface. To execute this file, you have two options:

  • Option 1: Modify the file "/init.rc" to include the lines from file "/system/etc/init.local.rc". This is a hard work because you need to edit the "boot.img" file and write it to flash. I suggest to Dazzazo to include this on next release. This creates the service compcache inside the Android.
  • Option 2: Add a "init.d" file that call to "/system/bin/handle_compcache". I add an attachment with one of this files. You only need to set RW of SYSTEM and copy the file to "/system/etc/init.d/".

Note: The same patch apply to any other custom ROM based on CM9. This problem is derived from cyanogemod.

89zram.zip

Edited by backside
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

PATCH #2: CDROM.ISO (AKA automount) enabled

Explanation: Stock ICS firmwares for G300 have the hability to provide a virtual CDROM drive with an ISO file that contains the driver for the device. When you use a Windows computer connected to the mobile in the Mass Storage (UMS) mode, a CDROM unit appears on the host. This is done because the stock ROM provides the file "/system/cdrom/autorun.iso", a simple ISO image file that contains the drivers. You can replace this file with ANY other file (in ISO format) and you see your CDROM content from the phone. Nevertheless, the CM9 ROM by Dazzozo don't have support to this file... after now!

Solution: If you modify the file "/init.huawei.usb.rc" and include the next lines you can restore this functionality (remember that edit "init.rc" files is a hard work!):

# USB google mode configuration

on property:sys.usb.config=autorun,mass_storage

	write /sys/class/android_usb/android0/enable 0

	write /sys/class/android_usb/android0/idVendor 12d1

	write /sys/class/android_usb/android0/idProduct 1037

	write /sys/class/android_usb/android0/f_mass_storage/nluns 3

	write /sys/class/android_usb/android0/f_mass_storage/cdrom_index 2

	write /sys/class/android_usb/android0/f_mass_storage/lun2/file /system/cdrom/autorun.iso

	write /sys/class/android_usb/android0/functions mass_storage

	write /sys/class/android_usb/android0/enable 1

	setprop sys.usb.state $sys.usb.config


on property:sys.usb.config=autorun,mass_storage,adb

	write /sys/class/android_usb/android0/enable 0

	write /sys/class/android_usb/android0/idVendor 12d1

	write /sys/class/android_usb/android0/idProduct 1038

	write /sys/class/android_usb/android0/f_mass_storage/nluns 3

	write /sys/class/android_usb/android0/f_mass_storage/cdrom_index 2

	write /sys/class/android_usb/android0/f_mass_storage/lun2/file /system/cdrom/autorun.iso

	write /sys/class/android_usb/android0/functions mass_storage,adb

	write /sys/class/android_usb/android0/enable 1

	start adbd

	setprop sys.usb.state $sys.usb.config

Include this code after the "on boot" section at the begining. This don't complete the trick, you need to execute in ADB the command "setprop sys.usb.state autorun,mass_storage,adb", and after that if you have a file at "/system/cdrom/autorun.iso" you show the content in your workstation!

Note: If you like you can use a GUI to do the task to select the ISO file, use the great free APP "DriveDroid" (search for it on the Market). Please, note that this software is developed thinking in use images as USB MASS STORAGE (like a pendrive), not for PURE ISO (CDROM emulation). The proposed hack works with ANY ISO, and you don't need at all any hybrid support. You can boot any bootable OS (not only Linux!) or use any type of CDROM. To mount as CDROM choose as the logical unit "F Mass Storage 3".

Edited by backside
0

Share this post


Link to post
Share on other sites

Posted · Report post

The cdrom is known. I removed it intentionally because it was such a pain in the ass. To install CM you have to have installed these drivers already.

The zram issue is also known -- a friend fixed it a few weeks ago for the U8185. I can have it implemented for R6.

1

Share this post


Link to post
Share on other sites

Posted · Report post

I'd like to present a 1.2G Linux mint ISO on my SD card as a CD

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

The cdrom is known. I removed it intentionally because it was such a pain in the ass. To install CM you have to have installed these drivers already.

The zram issue is also known -- a friend fixed it a few weeks ago for the U8185. I can have it implemented for R6.

Hi Dazzozo,

Good news about patching the bug of zram in R6!

Related to CD-Emulation: You don't need to include the file "automount.iso" in the ROM. You only need to add support for it! If you see about the DriveDroid tool, you can mount ANY iso that you like. In any case, the definition of the "autorun,..." don't has any interference with the current rom. It's only for add a new mode (automount), and anyone has to worry about it. Please, update the file "/init.huawei.usb.rc" with the new code for the next release! I ask for this because patching init.rc files is difficult (modify the "boot.img" it's risky and time consuming). Remember: you only ADD a new definition mode without collateral effects.

Edited by backside
0

Share this post


Link to post
Share on other sites

Posted · Report post

I'll consider it :)

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Thank you, Dazz!

You'll consider also to "patch" the values of auto-brightness in the R6?

And one more question: What branch I need to use from your git tree of the kernel that you use for compatibility with R5 (and future releases)?

https://github.com/Dazzozo/android_kernel_huawei_u8815

I like to compile some other modules and patch some of them. Can you provide some simple instructions? Can you publish for each release the tag used for kernel?

Best!

Edited by backside
0

Share this post


Link to post
Share on other sites

Posted · Report post

Thank you, Dazz!

You'll consider also to "patch" the values of auto-brightness in the R6?

And one more question: What branch I need to use from your git tree of the kernel that you use for compatibility with R5 (and future releases)?

https://github.com/Dazzozo/android_kernel_huawei_u8815

I like to compile some other modules and patch some of them. Can you provide some simple instructions? Can you publish for each release the tag used for kernel?

Best!

You want the ics branch for CM9. Yeah, I can probably start tagging it.

I've been given some brightness values in IRC that seem to fix the button backlight issues.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Ok Dazz,

Please, begin to tag your releases. We like to use your great kernel & rom, and make patches.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.