[ThinkTank] CyanogenMod for CMP741e

Discussion in 'Craig Tablets' started by mastermind278, Feb 3, 2013.

  1. mastermind278
    Offline

    mastermind278 Junior Member

    Joined:
    Jan 13, 2013
    Messages:
    28
    Likes Received:
    9
    Trophy Points:
    3
    So today I began playing around with CyanogenMod for the CMP741e.

    I believe it would be smart to first start off with CM9 versus CM10, as our device is already on ICS.

    So first thing I did was try to create a compatibility pack, I dumped the bootloader and got the script files from my running device:
    From there I was able to get the script files that are made I was able to make a compatibility pack similar to a few other devices:
    Dev-Host - cmp741e-compatibilityfix-v1.zip - The Ultimate Free File Hosting / File Sharing Service

    From there I decided to see if we had a touchscreen, in which we did not, so I flashed the kernel from the device originally and that seemed to just boot to a blackscreen.

    At this point I am reinstalling my Ubuntu VM to play with our kernel to see if there can be some ramdisk simple edits that can be done to modify it to boot properly.

    As always I am making this thread to bounce ideas with others and others throw out their ideas. This has worked previously on other devices I have worked with so here's for the same!
    • Like Like x 4
  2. mastermind278
    Offline

    mastermind278 Junior Member

    Joined:
    Jan 13, 2013
    Messages:
    28
    Likes Received:
    9
    Trophy Points:
    3
    Looking at the script file from the dump after modyfying them to .fex I find the following:
    [recovery_key]
    key_min = 4
    key_max = 6


    Might be something interesting....

    Script files also confirm:
    ctp9_name = "gt811"


    Playing with Keytest.apk I found out the following:
    Power Button = Key 26
    Volume Down = Key 25
    Volume Up = Key 24

    Back button (circle) = Key 4

    So it seems that nothing is programmed at key 6...

    Nonetheless, if we change the script file it might be possible for us to do key 26+ key 25 and boot into recovery....
    What does everyone think?
    Last edited: Feb 3, 2013
  3. DerpyTails
    Offline

    DerpyTails Junior Member

    Joined:
    Aug 31, 2012
    Messages:
    20
    Likes Received:
    4
    Trophy Points:
    3
    Location:
    Philadelphia, PA
    Tablet / Device:
    Craig CMP741d
    Any word on something like this for my CMP741D :)

    Sent from my Craig CMP741D using Tapatalk 2
  4. chitown_
    Offline

    chitown_ Junior Member

    Joined:
    Jan 16, 2013
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Chicago
    Tablet / Device:
    Craig CMP741E
    Let him get the CMP741E going first :)
  5. DerpyTails
    Offline

    DerpyTails Junior Member

    Joined:
    Aug 31, 2012
    Messages:
    20
    Likes Received:
    4
    Trophy Points:
    3
    Location:
    Philadelphia, PA
    Tablet / Device:
    Craig CMP741d
    No Problem, I didn't want it now, I meant eventually :)
  6. jholt5638
    Offline

    jholt5638 Junior Member

    Joined:
    Oct 27, 2012
    Messages:
    13
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    ohio, us
    Tablet / Device:
    D2 Pad Craig CMP741e
    Last edited: Feb 7, 2013
    • Like Like x 2
  7. wfg97079
    Offline

    wfg97079 Junior Member

    Joined:
    Jan 14, 2013
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks very much for this. As someone who is new to CM, can someone identify if this port has any issues on this device? Also, with this device, whats the process for installing this port?
  8. jholt5638
    Offline

    jholt5638 Junior Member

    Joined:
    Oct 27, 2012
    Messages:
    13
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    ohio, us
    Tablet / Device:
    D2 Pad Craig CMP741e
    The only problem I've just found is that the system partition is full I have to investigate that but all the hardware does work.
    The Thunderbolt port does not have this problem. As to install it you need the custom recovery in the tut on how to install gapps
    copy the zip to your sdcard reboot into recovery do a factory wipe then install from zip and reboot system
  9. mastermind278
    Offline

    mastermind278 Junior Member

    Joined:
    Jan 13, 2013
    Messages:
    28
    Likes Received:
    9
    Trophy Points:
    3
    Unfortunately it continues to have a non-touch touchscreen issue. Would you care to share what changes you have done for the ports so others can try to work on it also.

    Thanks!
  10. jholt5638
    Offline

    jholt5638 Junior Member

    Joined:
    Oct 27, 2012
    Messages:
    13
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    ohio, us
    Tablet / Device:
    D2 Pad Craig CMP741e
    Changes I made is that I made a copy of my boot.img and replaced the kernel modules with the ones from the factory image copied the idc files and placed them in /system/usr/idc. It seems that maybe my cmp741e has a different touchscreen driver than everyone else, mine seems to use zet6221 driver. Finally I replaced the /system/lib/hw/ audio related libraries with the one from the stock image
  11. agk4444
    Offline

    agk4444 Junior Member

    Joined:
    Feb 4, 2013
    Messages:
    10
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    United States
    Tablet / Device:
    cmp741e
    ok I finally got it working. i just copied gt811.ko to /system/vendor/modules and gt811.rc to /system/usr/idc/ from factory image. Make sure you have proper permissions when you copy the files. Now trying to get accelerometer working.
    Last edited: Feb 9, 2013
  12. spock1104
    Offline

    spock1104 Junior Member

    Joined:
    Feb 9, 2013
    Messages:
    22
    Likes Received:
    10
    Trophy Points:
    3
    Tablet / Device:
    CMP741e
    I have two CMP741e tablets, both with the gt811 touchscreen. I've taken a different approach, trying to get one of the two active A10 CM10 ports working on our device. shaun2029's repository is out of sync with the sunxi project and so I had to try to port the source code for the gt811 touchscreen, and the myfluxi repository is up-to-date. I also found several kernel modules on the internet and tried those, along with my own compiled modules. Either I corrupted the gt811 firmware, the screens are wired odd, or the firmware on the chip is odd from the getgo, but my results are all about the same. Vertically the screen more or less works fine, but horizontally the position lags the finger by maybe 10 pixels, and on reaching pixel 350 the registered position moves to the far right of the screen and moves in the opposite direction.

    I've somewhat bypassed the error by putting manual calculations of the position into the driver, but the offset is still there and there's still a slight gap in the middle of the screen. Also, with the way the data is structured it only "works" with up to three fingers on the screen, and starts giving very confusing results with fingers 4 and 5. It's a shame too, because the 3.0.50 kernel in the myfluxi repository seems to work very nicely judging from my use after my "latest results." If anyone is willing to be a guinea pig or is a glutton for punishment I'll post my work thus far, but I think this calls for someone much more skilled with drivers since this is my first experience with kernel modules. Just in case, I've put in a request with Craig for their source code and asked Goodix for help, but I don't expect responses back

    Also a note on the motion sensor, I opened one of the tablets up to check the components since the driver is ambiguously named bma250_dmard06, which are two different but seemingly related sensors based on various searches. I confirmed that the dmard06 is in use.

    Not that it's much help, but this also seems to be the same tablet as the TB4-4/5580 (given by the build.prop)
    Last edited: Feb 9, 2013
    • Like Like x 2
  13. spock1104
    Offline

    spock1104 Junior Member

    Joined:
    Feb 9, 2013
    Messages:
    22
    Likes Received:
    10
    Trophy Points:
    3
    Tablet / Device:
    CMP741e
    There's a gt811_malata.c out there that I just started reading through again, and it does similar tweaks to the screen position. It looks like it may be the first portion of the screen is bit shifted, hence the lagging and gap.
  14. agk4444
    Offline

    agk4444 Junior Member

    Joined:
    Feb 4, 2013
    Messages:
    10
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    United States
    Tablet / Device:
    cmp741e
    This is modified version of Christian Troy Unofficial CM10
    Don't use this if you don't know how to restore you Tablet.
    Thanks to Christian Troy
    I just grabbed his Cm10 flashable zip and replaced it with boot.img-kernal from mastermind dump.

    This worked on my tablet that has gt811 LCD. It will only work on tablet that has gt811.

    https://www.dropbox.com/s/o4wapzxjgj9dkhs/cm10_a10_20130212-signed.zip

    Things that don't work yet
    1. NO AUDIO
    2. Looks Like HW video doesn't work Yet
    3. Camera doesn't work yet. Looking to edit Camera.cfg in etc section.

    Any ideas to fix those will be appreciated.
    Thanks to Mastermind for the dump
    Last edited: Feb 14, 2013
  15. hugott
    Offline

    hugott Junior Member

    Joined:
    Jan 19, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi i been testing thunderblot and cyanogenmod 9 Unofficial versions on my cmp741e factory made may 2012 this issue i son both roms accelerometer is not working working the screen dosent move went you move the tablet went is landscape and porting sorry my english the only roms that are working for my are the holt5638 version cm9 say the model is “novo 7”and thunderbolt say is “D2Pad” i dont now what is this i am new, the big issue on cm9 that the internal memory SDcard is full please fix this not the extsd. The versiĆ³n of vampirefo is not working the touch on this tablet please i will like that you all you make the fastes and stable custom roms ever for the cmp741e thanks a lot for everything and for you time i like this tablet, hey another question can you make a custom kernel to use with setcpu? And say what are the best and performance settings? I would like to use this app…
    special thanks to / agradecimientos especiales a
    vampirefo
    holt5638
  16. Dee_V3
    Offline

    Dee_V3 Junior Member

    Joined:
    Feb 17, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Move busybox(fix permission if using file explorer) using ADB and it should fix it.

    Open ADB and use these commands:

    adb shell
    su
    ln -s /system/xbin/busybox /system/bin/busybox
  17. spock1104
    Offline

    spock1104 Junior Member

    Joined:
    Feb 9, 2013
    Messages:
    22
    Likes Received:
    10
    Trophy Points:
    3
    Tablet / Device:
    CMP741e
    I made a little more progress with the driver, found that the problem looks like it's actually caused by the bitshift. I replaced it and it seems to follow my finger, but now the first 50 pixels don't register touch. I don't get a lot of time to look at this, so maybe someone else can. I'm attaching a compatibility zip with my test configuration, and my modified source code. Use this with [rom] CyanogenMod 10 - git myfluxi - SlateDroid.com

    For recovery, CWM Recovery 6.0.1.2 for Allwinner A10 LY-F1/TREQ Tablets - xda-developers has been working well for me. I highly recommend you backup first! For the more advanced users, version 6 brings two backup options, and the default is a format that will diff between the last time you back up and the current. It'll probably be useful for dev purposes to switch to the "tar" method, which is the old one and will dump all the files in a useable/recoverable/tweakable format.

    Sound seems to work fine, rotation and camera not working. I wanted to get the touchscreen going (i.e. usable tablet) before I worked on those. I've been using the "show touches" and "pointer location" options in the developer options to troubleshoot the touchscreen. I have not modified the tablet to boot the touchscreen on startup, so through adb you will have to insmod /system/lib/modules/gt811_ts.ko This was done on purpose as I've experieced the occasional lockup with the driver loaded.

    Also the usual disclaimer anyone places with these, I make no guarantees that this won't break your tablet, kill your pet, bring about the reckoning, etc.

    DO NOT TRY THIS IF YOU DO NOT HAVE A GT811 TOUCHSCREEN. If you're unsure, from a terminal on the tablet run lsmod.

    Anyone looking at my source code, you'll also find that I swapped the input_x and input_y. I got sick of the driver considering x to be vertical and y to be horizontal.

    View attachment $cmp741e_3_0_50_compatibility_alpha_1.zip

    View attachment $gt811_modified_source.zip

    One last warning, I tried using agk4444's port and my screen is getting picked up by goodix_touch.ko instead of gt811.ko. If I try to load gt811.ko I get a ctp error. This would suggest I'm still running the script.bin from my compatibility, so I highly recommend you back up your original! http://elinux.org/Hack_A10_devices Otherwise the nanda backup that mastermind278 has may work.
    Last edited: Mar 1, 2013
    • Like Like x 2
  18. spock1104
    Offline

    spock1104 Junior Member

    Joined:
    Feb 9, 2013
    Messages:
    22
    Likes Received:
    10
    Trophy Points:
    3
    Tablet / Device:
    CMP741e
    I'm afraid my development may have halted, at least for a while. I created and flashed a bad image and couldn't get back to recovery. Flashed gooseberry and then to agk4444's cm9, but now my internal sd is corrupt and the tablet thinks it only has 306mb ram. I need to find or create a compatible phoenixcard img to get going again.
    Last edited: Mar 3, 2013
  19. spock1104
    Offline

    spock1104 Junior Member

    Joined:
    Feb 9, 2013
    Messages:
    22
    Likes Received:
    10
    Trophy Points:
    3
    Tablet / Device:
    CMP741e
    Definitely don't make my mistake and use gooseberry unless you want to set yourself up for a headache.

    Standard /dev/block:
    /dev/block # ls
    ls
    loop0 loop2 loop4 loop6 nanda nandc nande nandg nandi ram1
    loop1 loop3 loop5 loop7 nandb nandd nandf nandh ram0 zram0

    /dev/block after flashing gooseberry:
    loop0 loop4 mmcblk0 nandc nandg platform
    loop1 loop5 mmcblk0p1 nandd nandh ram0
    loop2 loop6 nanda nande nandi ram1
    loop3 loop7 nandb nandf nandj zram0


    emmc got moved from nandi to nandj, which doesn't play nice with these tablets.


    EDIT/UPDATE: Problem resolved, created semi-working phoenixcard image, will update later with results.
    Last edited: Mar 3, 2013
  20. spock1104
    Offline

    spock1104 Junior Member

    Joined:
    Feb 9, 2013
    Messages:
    22
    Likes Received:
    10
    Trophy Points:
    3
    Tablet / Device:
    CMP741e
    So first off, let me stress that if you have the GT811 tablet and end up stuck, do not use the Craig image and also do not use an image designed for another tablet. Because hardware configurations vary, you can severely mess the tablet up (as I experienced first hand).

    Instead, I bring you a Phoenixcard/Livesuit image that fully boots! I'm not sure if you'll have your touchscreen or not, I've made the necessary modifications but I restored my tablet before I added the driver to the package. CMP741E_GT811.img

    I have also added CWM 6.0.1.2 and reboot-recovery.sh (source http://forum.xda-developers.com/showthread.php?t=1802268), so although it is mostly stock you do not have stock recovery. This is so that if a mistake occurs in development (like I made, oops) one can flash this and then immediately switch to whatever they want to use. After boot, all you should need to do is go to a terminal and type 'sh reboot-recovery.sh'

    This is assembled using mastermind278's boot.img and bootloader.img dumps, they are what was "different" between the two variants that caused the tablet to freeze on boot.

    And without further ado, a how to guide on replicating these results:
    1. Get a base image. I based this on the zet6221 image available on Craig's website Craig Electronics Inc. but my image will also work as a base, depending on which version of the tablet you want to build for.
    2. Extract the image. I used LiveSuit images - linux-sunxi as my guide using RedScorpio.
    3. Optional: Copy the folder to a new one, maintaining .img.dump as the end of the name
    4. Optional depending on what you're doing, but I replaced boot.fex and bootloader.fex with mastermind278's image files. They also need to be copied to _iso/*.fex.iso, and I confirmed they're binary copies.
    5. The fex files are sparsed ext4 and can be converted to full ext4 and edited based on the steps in Slidepad 704ce - Cook your own ROM
    6. Copy the generated fex files back to your dump folder and in the _iso folder.
    7. Run RedScorpio on the dump folder to generate a new img
    8. You now have a custom image usable with Phoenixcard and Livesuit!


    As an aside, I'm definitely looking forward to getting CM10 working with a new kernel. I'm running agk4444/Christian Troy's CM9 again, and noticed that 1. PPI higher than 128 isn't supported without going into phablet mode. and 2. Google Chrome still crashes. Other than that, I switched the governor to fantasy and it overall it runs nicely.
    Last edited: Mar 4, 2013
    • Like Like x 2

Share This Page