Related
As lately some people are asking me about ROM porting I decided to create this new thread where we can share knowledge about this hard task.
Please note this is a Dev talk thread, so DON'T ASK about fixing a particular ROM problem here. Also don't ask questions like "My phone is bricked! please help!". This IS NOT the appropriate place for it. There are plenty of other threads to help you out.
Also note that this is not a step by step guide (and not a guide at all), it's just a point where you can start from. Android is a very complex system and there are many things I don't know yet. So, research and hard work is what you need to learn it deeply. My first tip is Google really works. Don't be afraid to search
Ok, to the basics. Porting a ROM is no simple task. It requires advanced understanding of how android works and how it is organized. Previous Linux/Unix knowledge helps A LOT. As android is based on this O.S. there are many similarities between both. In fact many ppl consider android to be a kind of linux distro.
The very first task to port a ROM is finding a device which is compatible with your own. For example Defy/Milestone2. Then you are going to choose a ROM to port to your device.
As our devices (Milestone2) have a locked bootloader we now need to find a system image that have a compatible kernel with the ROM we are trying to port. This is mainly based on trial and test and takes a long time. You'll be ending flashing your phone several times with RSD Lite. You should learn how to use MotoAndroidDepacker and how to create a fixed SBF.
The basic procedure to try that:
1. Open original ROM update.zip and remove any files/commands that flashes boot/devtree/recovery/anything.
2. Install this new file on your phone via CW Recovery.
3. Boot into bootmenu and enable ADB so you can read logcat while phone boots.
4. Choose Boot/Normal. If your ROM uses 2nd-init you will need to place/edit/adapt bootscripts into bootmenu 2nd-init folder.
5. Check logcat for errors:
- If you're getting HAL errors you're going to need a new kernel;
- If you can start android without getting HAL errors but still getting errors and bootloop on android animation you should try to replace libs with appropriate original ones.
6. Once you are able to boot android you should test it's features to see what needs to be fixed.
This is what I have to say for now. The thread is now open for discussion.
At this week, motorola has just pushed the GB official update for Droid 2 and Droid 2 Global....
Can i try to port this new rom to milestone 2 and after a success boot, fix the radio..??
I was asking that, because some people has success on port CM7 to milestone 1, when it originally maked for droid 1...
tks a lot..!!
jorgebaruchi said:
At this week, motorola has just pushed the GB official update for Droid 2 and Droid 2 Global....
Can i try to port this new rom to milestone 2 and after a success boot, fix the radio..??
I was asking that, because some people has success on port CM7 to milestone 1, when it originally maked for droid 1...
tks a lot..!!
Click to expand...
Click to collapse
It may be possible, but you'll have a hard time fixing the baseband.
You may have to mod the init.rc scripts and find the right radio binaries (rild is one of them) and drivers.
Ask those ms1 people for help, if they are still with the same phone...
Sent from my Milestone 2 XDA App
I don't know if this will be relevant or not.
I wanted to know if to do any of this, having a Linux distro as OS a must or can I try my hands at it on a windows based machine. I mean I'm sure that a Linux distro will give certain advantages (as Android is based on UNIX/Linux) but can we get things to work a 100% on windows.
If yes, then will someone be kind enough to get give the list of all softwares etc. which will be required to do the job on Windows machine as well as a Linux machine.
I do know a few softwares but I'm not sure if I have an exhaustive list. I would like to learn and try and at least be able to modify in bits n pieces to begin with.
I apologize if this wasn't supposed to be asked in this thread.
The only thing i can get from SBF is a bunch of smg files.
But the only ones i can open are
preinstall.smg
CG39.smg
Is there a way to open/see the rest?
2)
Im trying to modify the CM7 rom, what boot does it use? 2nd-init or 2nd-boot?
i guess it is second-init. but not sure
thanks a lot for this !!!
WeeDv2 said:
The only thing i can get from SBF is a bunch of smg files.
But the only ones i can open are
preinstall.smg
CG39.smg
Is there a way to open/see the rest?
2)
Im trying to modify the CM7 rom, what boot does it use? 2nd-init or 2nd-boot?
Click to expand...
Click to collapse
SMG files are disk images of certain partitions of your flash memory.
You can only open CG39.smg and preinstall (CG66.smg) because they are the only images in ext3 format. The rest of images may be on ramdisk format or some proprietary format. For more details on partition codes take a look here:
http://and-developers.com/partitions:cdt
You may be able to open and see contents of other partitions but the only one that matters aside from system and preinstall is the boot partition (CG35.smg), which contains the init scripts we should mod in order to make they work with 2nd-init. Boot partition is in ramdrive format. More details here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://elinux.org/Android_on_OMAP
It is easier to unpack boot image using Dsixda's Kitchen here:
http://forum.xda-developers.com/showthread.php?t=633246
Edit: To see what boot your CM7 uses just go inside /system/bootmenu/config and look for a file called default_bootmode.conf. That should be the boot method used. It's normally 2nd-init.
sahilarora911 said:
I don't know if this will be relevant or not.
I wanted to know if to do any of this, having a Linux distro as OS a must or can I try my hands at it on a windows based machine. I mean I'm sure that a Linux distro will give certain advantages (as Android is based on UNIX/Linux) but can we get things to work a 100% on windows.
If yes, then will someone be kind enough to get give the list of all softwares etc. which will be required to do the job on Windows machine as well as a Linux machine.
I do know a few softwares but I'm not sure if I have an exhaustive list. I would like to learn and try and at least be able to modify in bits n pieces to begin with.
I apologize if this wasn't supposed to be asked in this thread.
Click to expand...
Click to collapse
Don't worry, this is the right place
As for your question: yes you can work in windows if you like, but using at least a Linux VM is more productive. I don't have a full list of applications to give you, as different mods may require different tools, but I advice you to have at least:
- Notepad++ (essential for editing text files and keeping linux end-line format);
- dsixda's Android Kitchen (http://forum.xda-developers.com/showthread.php?t=633246)
- 7zip (or some other compress tool you like)
- Moded putty for ADB as working with windows command prompt really suck (http://forum.xda-developers.com/showthread.php?t=803225)
- Oracle Virtual Box (if you are going to use linux VM).
r2beta0 said:
SMG files are disk images of certain partitions of your flash memory.
You can only open CG39.smg and preinstall (CG66.smg) because they are the only images in ext3 format. The rest of images may be on ramdisk format or some proprietary format. For more details on partition codes take a look here:
http://and-developers.com/partitions:cdt
You may be able to open and see contents of other partitions but the only one that matters aside from system and preinstall is the boot partition (CG35.smg), which contains the init scripts we should mod in order to make they work with 2nd-init. Boot partition is in ramdrive format. More details here:
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://elinux.org/Android_on_OMAP
It is easier to unpack boot image using Dsixda's Kitchen here:
http://forum.xda-developers.com/showthread.php?t=633246
Edit: To see what boot your CM7 uses just go inside /system/bootmenu/config and look for a file called default_bootmode.conf. That should be the boot method used. It's normally 2nd-init.
Click to expand...
Click to collapse
Thanks again r2beta
thanks r2beta0
- Notepad++ -- got it
- dsixda's Android Kitchen -- downloaded (need some link for a how-to on its usage)
- 7zip -- got it
- Moded putty for ADB -- got it
- Oracle Virtual Box -- can't install Linux on my system as this is a work machine
dunno if I can do without the last option.
sahilarora911 said:
thanks r2beta0
- Notepad++ -- got it
- dsixda's Android Kitchen -- downloaded (need some link for a how-to on its usage)
- 7zip -- got it
- Moded putty for ADB -- got it
- Oracle Virtual Box -- can't install Linux on my system as this is a work machine
dunno if I can do without the last option.
Click to expand...
Click to collapse
Oracle Virtual Box is an application that lets you run an operational system on a virtual machine, in other words, it doesn't install linux on your real computer. It's a very useful tool that I use everyday. Google for it and learn a bit, you won't be disappointed. About kitchen: the link I provided was download + guide. Read it again. If necessary read the full thread.
r2beta0 said:
Oracle Virtual Box is an application that lets you run an operational system on a virtual machine, in other words, it doesn't install linux on your real computer. It's a very useful tool that I use everyday. Google for it and learn a bit, you won't be disappointed. About kitchen: the link I provided was download + guide. Read it again. If necessary read the full thread.
Click to expand...
Click to collapse
I know a bit about virtual box but as I said I'm not allowed to have softwares not approved by the IT team to be present on the system. Though I can get away with small things like notepad++ and 7-zip, having virtual box on my system may raise some eye brows.
I'm trying to arrange an alternative system.
Me neither. I must do almost everything at home, and at this very moment I simply don't have any free time. I'm afraid you're not going to see me here very often anymore (maybe in a few months? a year? well, it might be a bit too late for milestone2...)
hi. Have a question, I want to remove baseband from a flashable zip (lets say, CM7 from Tezet) , is it posible? I dont know where to look for it (baseband). Thanks!!
Baseband is located in \system\etc\motorola\bp_nvm_default\
But don't remove it, just replace it with files from ROM, which have baseband you want.
---UFO--- said:
Baseband is located in \system\etc\motorola\bp_nvm_default\
But don't remove it, just replace it with files from ROM, which have baseband you want.
Click to expand...
Click to collapse
Ok thanks for the info.
Sent from my A953 using XDA
Hi All,
Just a quick question. I have ported Paranoid Android 2.10 to MS2 but the problem I am facing is that Reboot goes through Bootmenu and I have to choose reboot from Bootmenu again.
Any inputs?
Thanks in advance
Megalith27 said:
Hi All,
Just a quick question. I have ported Paranoid Android 2.10 to MS2 but the problem I am facing is that Reboot goes through Bootmenu and I have to choose reboot from Bootmenu again.
Any inputs?
Thanks in advance
Click to expand...
Click to collapse
I meant to get to it last night, but I was tired after work and fell asleep watch tv. Eventually, later tonight, I'll be uploading PA for MS2. Check my Defy PA thread in 12-14 hours cause I'm about to go to work and I'm not gonna feel like making a MS2 PA thread or updating my Bravo PA thread -- but the Defy Thread is always up to date when I put out new roms.
Also, I'm looking to get either a Defy or MS2 -- I've heard that there's 3G issues with AT&T users (which I am) with the MS2 -- Apparently the MS2 has different 3G frequencies than AT&T. Are there any AT&T MS2 users who are knowledgeable about that? While I can deal with no 3G, edge only, calls only -- I need to make sure I can at least do that before I commit to something.
I'd rather have the MS2 because I want a hw keyboard and I don't have the $300+ to try and get a Photon Q LTE from eBay (and I don't have to change up my repos if I get a MS2). If anyone here knows of a phone that's AT&T compatible, Defy code compatible, and has a keyboard, please let me know.
Thanks.
//Normally I'd post the latter half in the Q&A section, but ya'll don't have one so I'm just gonna piggyback
//My Bravo doesn't have a Q&A page either -- it needs one that's not my PM box...Don't PM me on how to root your phone and flash CM7 -- read one of the 5 guides on the first page of both General & Dev...:silly:
Ok devs need some help here.
I am trying to port a rom to our Milestone 2...but it bootloops on rom animation.
I tried to logcat it but I don't think it gets as far as adb server to detect the device.and just keeps saying "waiting for device"...so I end up with no logcat to diagnose the problem.
I can logcat my current working rom but only after the phone boots....am i missing something here? please, help
Any help is very much appretiated.
Thanks a lot in advance
Warning/disclaimer: This thread is intended for those who already know how to compile a kernel and have a working knowledge of Linux and its derivatives. There shouldn't be a great deal of risk involved, but you are responsible for what happens if you decide to follow these instructions.
Polite request: Please don't post replies to this thread that aren't of a technical nature directly related to compiling, modifying, or testing the kernel.
Introduction:
It appears as if Lenovo have released a buildable and bootable kernel source. I've done some preliminary testing with it. However, it would be better if we could get lots of people building and running the kernel, so that we can spot any remaining problems. This is also an opportunity to start hacking it to add/fix features such as USB OTG, etc.
Kernel source:
Get it from the Github repository at: https://github.com/gmarkall/lenovo_a1_07_kernel
Toolchain:
The Makefile seems to suggest that Codesourcery 2010q1 has been used by Lenovo to compile the kernel. Get it from https://sourcery.mentor.com/sgpp/lite/arm/portal/release1293, and make sure that the arm-none-linux-gnueabi-* binaries are on your path.
Building the source:
You may wish to edit the Makefile around line 192 to set CROSS_COMPILE=arm-none-linux-gnueabi- instead of the hardcoded path that is the default.
Then, to build the kernel:
Code:
make distclean
make a1_07_defconfig
make uImage
Booting the kernel
Normally, Android devices have two boot images that consist of a kernel and a ramdisk. One boot image is for the recovery, and the other is for the Android system. This makes it safe to flash a new boot image containing an untested kernel for the Android system, since the recovery can always boot up using the other boot image. However, the A1, by some bad design decision, only has one kernel - the bootloader always loads the same kernel, and just loads a different ramdisk depending whether it is to boot into recovery or system. As a result, it is not safe to flash a kernel to your A1 unless it's already been tested, since a bad kernel will make it impossible to boot from the internal memory, and you'll need a bootable SD card.
The solution to this problem is to make a bootable SD card for loading the kernel and ramdisk from. A bootable SD card consists of two partitions:
* A small bootable VFAT partition, that holds the X-Loader (MLO), U-Boot (u-boot.bin) and the kernel (uImage).
* An ext2 partition that holds the root filesystem.
In order to create a bootable SD card, use the omap3-mkcard.sh script that is attached below. To invoke it for making /dev/mmcblk0 a bootable SD card:
Code:
sudo omap3-mkcard.sh /dev/mmcblk0
You may need to hack the script if your SD card device isn't a /dev/mmcblk* one, since the script searches for partitions denoted "p1" and "p2" - this may need changing to just "1" and "2" respectively (thanks Xbdesign and Brancaleone for this).
This will create the necessary partitions, set the bootable flag, and format them. You will then need to mount the first partition (e.g. /dev/mmcblk0p1), and copy MLO and u-boot.bin to it (also linked below). Then, copy the uImage that you built from your kernel tree, which will be located in /arch/arm/boot. You can now unmount this partition.
Next, mount the second partition (e.g. /dev/mmcblk0p2). This will need to contain the same set of files that the initial ramdisk contains. There are two different ramdisks that you might want to use - one is from the Cyanogenmod 7 build, and the other one is from the stock system. Download links for these are also below. To extract the ramdisk, copy it onto the SD card second partition, then run the following commands (assuming the ramdisk is called ramdisk.ub):
Code:
dd if=ramdisk.ub of=ramdisk.img.gz bs=64 skip=1 # Strip off the U-Boot header
gunzip ramdisk.img.gz # Unzip
sudo cpio -idmv < ramdisk.img # Extract the cpio archive
Then, unmount the second partition of the SD card.
You should now be able to remove the SD card and insert it into your A1. Power down the A1 and power up again, and it should hopefully boot from the SD card and load your kernel. If it's booted from the SD card and loaded your kernel, you should be able to see that it was compiled on your host by looking in Settings -> About Phone -> Kernel Version.
Troubleshooting:
This is not a comprehensive guide, just a few pointers to where a problem might be - please post replies to the thread to get troubleshooting suggestions.
System boots up, but is not running my kernel - it didn't boot from the SD card. If the A1 is plugged into the charger/USB, you sometimes need to reboot multiple times before it boots off the SD card (I think it doesn't always turn off fully when the charger is plugged in).
The static Lenovo logo flashes up over and over again - it's booted from the SD card, but didn't manage to load your kernel
The static Lenovo logo comes up and stays there/goes to a black screen - it's probably loaded your kernel and mounted the root file system, but failed to mount /system. Try running adb shell to see what happens. If you get something like
Code:
/system/bin/sh: no such file or directory
then your kernel is running but /system isn't mounted.
IRC Channel
Join #ideapad-a1 on irc.freenode.net to discuss the kernel and other A1 development-related topics!
Download Links:
MLO
u-boot.bin
omap3-mkcard.sh
Ramdisk for Cyanogenmod 7
Ramdisk for ROW 2643 stock release
I've added the two ramdisks that I suspect will be most common - if you need another ramdisk, you'll have to extract it from an OTA.
Also, I compiled a tun.ko - www.doc.ic.ac.uk/~grm08/ideapad/tun.ko
Here's a cifs.ko - http://www.doc.ic.ac.uk/~grm08/ideapad/cifs.ko
EDIT: AutobahnA1 and infraredevans have confirmed that tun.ko works on ROW_2643.
EDIT 2/3: Please test out cifs.ko! (It doesn't work - it needs slow-work.ko. Will get that done when I can. Thanks to Ilikecokethree on the Lenovo forums for pointing that one out).
你懂中文吗,大神!
我是中国人 关注你的帖子很久了,我不懂英文,用翻译软件看的大概,我们这里很多人支持你,都在用你的rom 很棒!比联想官方的好多了,谢谢!
I think I did exactly the steps as you told, but it still boots the original kernel, may something be wrong? Thank you very much.
PS: I'm a chinese too, and my English is not good either
gmarkall said:
This is also an opportunity to start hacking it to add/fix features such as USB OTG, etc.
Click to expand...
Click to collapse
Please do not forget to try the WiFi-based geolocation, which is also missing!
I wish I had the knowledge to work on it myself but I am far from taking over such tasks...do not have the slightest idea about how these things work.
Good luck and please keep us informed!
geoponer said:
Please do not forget to try the WiFi-based geolocation, which is also missing!
Click to expand...
Click to collapse
Geolocation bug has nothing to do with kenerl. It's a missing entry in framework-res.apk in ROM from Lenovo
see : forums.lenovo.com/t5/IdeaPad-Slate-Tablets/A1-Geocode-Bug-in-Firmware-Solution/td-p/709701
betabox said:
Geolocation bug has nothing to do with kenerl. It's a missing entry in framework-res.apk in ROM from Lenovo
see : forums.lenovo.com/t5/IdeaPad-Slate-Tablets/A1-Geocode-Bug-in-Firmware-Solution/td-p/709701
Click to expand...
Click to collapse
Also, it's working in CM7.
hohoxu_hao115 said:
I think I did exactly the steps as you told, but it still boots the original kernel, may something be wrong?
Click to expand...
Click to collapse
Sounds like it's booting from eMMC instead.
Can you post the partition table of the SD card as listed by fdisk, and also a directory listing of each of the two partitions? I ask this to confirm what's happened - seems like you're the first person to follow these instructions, and it's quite possible I made a mistake somewhere.
betabox said:
Geolocation bug has nothing to do with kenerl. It's a missing entry in framework-res.apk in ROM from Lenovo
see : forums.lenovo.com/t5/IdeaPad-Slate-Tablets/A1-Geocode-Bug-in-Firmware-Solution/td-p/709701
Click to expand...
Click to collapse
Apologies for the off-topic, but I think that we are discussing two different things here: I am referring to the Geolocation bug, which prevents me from e.g. checking in with Foursquare by using only WiFi location information (active GPS signal is needed) while you have solved the Geocoding bug, which has nothing to do with the Geolocation one...
Please correct me if I am wrong.
@Graham: I plan to install the CM7 that you have been working on (with the feedback from other users - I keep an eye on that thread!) but since I use my A1 for professional purposes as well, I would like to make sure that everything is working fine before moving to CM7. Apologies for not being able to contribute to the beta testing of CM7 but I am really looking forward to seeing a version based on the source code provided by Lenovo, which I think will lead to a more stable version of your CM7. I cannot thank you enough for taking the time to work on this, really!
geoponer said:
Apologies for the off-topic, but I think that we are discussing two different things here: I am referring to the Geolocation bug, which prevents me from e.g. checking in with Foursquare by using only WiFi location information (active GPS signal is needed) while you have solved the Geocoding bug, which has nothing to do with the Geolocation one...
Please correct me if I am wrong.
Click to expand...
Click to collapse
I think that whether it works in CM7 or not, it almost certainly isn't a kernel issue. I'll test it by signing up for Foursquare and give it a try out on CM7 to see if it works later on. Will post my findings in the CM7 thread.
Hi Graham,
just gonna pile up several questions/thinkings and feel free to comment them the or answer on your liking
We do have few hickups on CM7 but I am more excited about idea of having proper recovery then ironing current CM rom that works more than satisfactory right now. Do we have enough code (I assume that target here is u-boot) on our hands that someone can implement necessary changes to internal partitions and boot procedures?
what is your opinion on replacement of u-boot with something else? for example LK loader or to be more precise with its current HD2 implementation known as cLK. it allready has some neat features like HBOOT like GUI, ability to change partition sizes on device itself (without computer), ability to boot from different partitions (would be nice to have android and ubuntu side by side loaded on our devices) and last but not least it has fastboot support enabled...or is it better way fill up u-boot with desired features if possible?
so...just my wishful thinking...not enough knowledge on my side to do anything regarding all this just hoping that some of you, more capable guys gets interested in this
dusko_m said:
Hi Graham,
just gonna pile up several questions/thinkings and feel free to comment them the or answer on your liking
We do have few hickups on CM7 but I am more excited about idea of having proper recovery then ironing current CM rom that works more than satisfactory right now. Do we have enough code (I assume that target here is u-boot) on our hands that someone can implement necessary changes to internal partitions and boot procedures?
what is your opinion on replacement of u-boot with something else? for example LK loader or to be more precise with its current HD2 implementation known as cLK. it allready has some neat features like HBOOT like GUI, ability to change partition sizes on device itself (without computer), ability to boot from different partitions (would be nice to have android and ubuntu side by side loaded on our devices) and last but not least it has fastboot support enabled...or is it better way fill up u-boot with desired features if possible?
so...just my wishful thinking...not enough knowledge on my side to do anything regarding all this just hoping that some of you, more capable guys gets interested in this
Click to expand...
Click to collapse
I do want to implement something that's pretty much as you describe. My biggest motivation is that it's currently not safe to flash a kernel since you can break both system and recovery that way in one go - I really want to make the boot process more robust.
gmarkall said:
Also, I compiled a tun.ko - tun.ko
I haven't tested it yet - is anyone able to try it please?
Click to expand...
Click to collapse
The module loaded without a problem on my 2643_ROW Kernel. Installed "Rooted AnyConnect" from the "Play Place". Now I can connect to my company VPN.
gmarkall: YOU ROCK! THANK YOU!!!
tun.ko
Graham
The tun.ko module works perfectly with openvpn on 2643_ROW.
I can now access my Amahi home server,awsome.
Thanks a lot you are doing a great job.
Dont want to sound presumptuous but any chance of a cifs.ko to go with it .
Cheers
Infraredevans said:
Dont want to sound presumptuous but any chance of a cifs.ko to go with it .
Click to expand...
Click to collapse
I'll give it a whirl... give me a few minutes.
gmarkall said:
I'll give it a whirl... give me a few minutes.
Click to expand...
Click to collapse
Here it is: http://www.doc.ic.ac.uk/~grm08/ideapad/cifs.ko
To compile it I had to copy md5.h from another kernel source to fs/cifs in the kernel tree. I also had to edit init/Kconfig so that CONFIG_SLOW_WORK defaulted to yes. I configured the module with the options:
Support Legacy LANMAN servers which use weaker security
CIFS Extended attributes
CIFS POSIX attributes
and without statistics, debugging, or experimental features. Let me know if this is a suitable config - I could always tweak it and build another one.
arm-2010q1-202-arm-none-linux-gnueabi.bin
Did someone manage to install arm-2010q1-202-arm-none-linux-gnueabi.bin on 64bit system?
xbdesign said:
Did someone manage to install arm-2010q1-202-arm-none-linux-gnueabi.bin on 64bit system?
Click to expand...
Click to collapse
I did - I didn't have any problems, but my random guess about how to solve it could be to install ia32-libs. If installing that doesn't solve it, can you post a bit more detail about the problem?
I am using ubuntu 10.04 LTS and just cant install / find Getlibs to install a 32-bit version of xulrunner :-(
xbdesign said:
I am using ubuntu 10.04 LTS and just cant install / find Getlibs to install a 32-bit version of xulrunner :-(
Click to expand...
Click to collapse
Do you need that to run the installer? I just downloaded the tar version instead and extracted it. I saw there was an installer as well, but I thought it would be more hassle than using the tarball so I just ignored it.
I have tried to compile TWRP 2.3.
It compiled with errors, but after solving a few errors, it was built successfully.
However, on flashing the zip via CWM, no effect took place, I am attaching my TWRP.
Anybody with knowledge and experience can help me compiling a successful build.
XDA:DevDB Information
TWRP 2.3, Tool/Utility for the Samsung Galaxy Y GT-S5360
Contributors
Nachiket.Namjoshi, DC07
Version Information
Status: Testing
Created 2014-06-08
Last Updated 2014-06-08
Downloads
DOWNLOADS
Removed
Go Here for working Builds: https://forum.xda-developers.com/galaxy-y/development/recovery-twrp-3-0-3-0-touch-recovery-t3550609
Reserved
Problems and Changelogs
Changelogs
latest update: Sun, Jun 8 ,2014.
v1.0a(alpha)
-Initial build (doesnt boot into twrp)
Problems and Errors(Intended for the ones who are willing and are able to help)
P.S you can read it but in case you dont understand what you are reading please refrain from posting questions about them in this thread.
If you are really curios, shoot me a PM or USE_THIS_LINK
Several errors (so cant paste) while compiling a otapackage (make -j4 recoveryzip)
Code:
Several mistakes in [B]bootable/recovery/updater/install.c[/B]
some [B]int[/B] not already declared,
some [B]arguments[/B] not appropriately passed in some [B]functions[/B] namely
[B]make_ext4fs(const char *filename, const char *directory,
char *mountpoint, int android, int gzip, int sparse);[/B]
and applypatch funtion...
all this is found on install.c
probably the reason why things arent built properly while [B]make recoveryzip[/B]
hence the size... 1mb
A few errors about the libs which are never compiled !
Code:
collective errors:
libopenaes.so, libblkid.so not a prelink map
These libs are never ever built !
Hence the errors.
Update01
After Solving and re-writing almost all of install.c and the update folder
got this stop
Code:
make: *** No rule to make target `out/target/product/totoro/obj/STATIC_LIBRARIES/libselinux_intermediates/libselinux.a', needed by `out/target/product/totoro/obj/EXECUTABLES/updater_intermediates/LINKED/updater'. Stop.
make: *** Waiting for unfinished jobs....
I think I should halt for today....
update02
recovery.img looks fine, however, there seems to be some problem
if I mount the img (dont ask me how to )
and calculate the size of all the files and folders,
it roughly comes upto 738 kb
but recovery.img is of 4.7 mb
Moreover, If i try
Code:
[B]make -j4 recoveryzip[/B]
there are still errors in install.c (make_ext4fs function errors)
Will try to dig into this again.
and update the thread with my findings :cyclops:
till then, if anyone can advice something, you can.
Update03
No progress yet...
Taking a rest now,
and i need a lil help in this... if anybody has ported before, plz post it here
Brief overview of things:
Getting a recovery.img of 4.7 mb but when executing
Code:
make -j4 recoveryzip
I get the recovery.zip to be 577.6 kb
however, by playing with the code, Its building the extra libs
but NOT adding them to the zip
so, need a proper updater-script
i think you must include it on a kernel., because the recovery of our sgy is not separated to the kernel.,
rio. said:
i think you must include it on a kernel., because the recovery of our sgy is not separated to the kernel.,
Click to expand...
Click to collapse
not really... I believe that if a flashable CWM can be created... a flashable TWRP can also be created...
Anyways, I was going to try dumping it into a prebuilt kernel...
but the issue is my odin doesnt work (in case of bricks)
and it can also hardbrick the device if dumped on to a kernel
Nachiket.Namjoshi said:
not really... I believe that if a flashable CWM can be created... a flashable TWRP can also be created...
Anyways, I was going to try dumping it into a prebuilt kernel...
but the issue is my odin doesnt work (in case of bricks)
and it can also hardbrick the device if dumped on to a kernel
Click to expand...
Click to collapse
oohh sorry i didn't wsee the zip. i thought you just build only img..
i checked the zip and there is no killrecovery.sh which is called by the updater-script..
rio. said:
oohh sorry i didn't wsee the zip. i thought you just build only img..
i checked the zip and there is no killrecovery.sh which is called by the updater-script..
Click to expand...
Click to collapse
oopss... im soo sorry, uploaded the wrong zip
EDIT:
Thread has been updated for the Devs and ppl who can help me.
Nachiket.Namjoshi said:
oopss... im soo sorry, uploaded the wrong zip
Click to expand...
Click to collapse
i checked your zip..
i guess you haven't used any theme.. there is no any images, fonts, twrp,ui.xml in res folder.. and i'm not sure if there are any 240x320 theme officailly available..
and you are missing 30+ libraries and some binaries in the sbin folder..
and mke2fs.conf,twrp.fstab in the /etc folder
and supersu folder
and selinux stuffs..
don't know why you are getting the install.c errors..
which branch are you using.. you need to use latest cm11 with twrp patches or omni branch to build twrp 2.7.x
for the not a prelink map error i think you need to add shared libraries or somethinh like that in prelink-linux-arm.map
anyways.. nice work. and keep trying... you can also ask for help in the official twrp thread here at xda..
psych.half said:
i checked your zip..
i guess you haven't used any theme.. there is no any images, fonts, twrp,ui.xml in res folder.. and i'm not sure if there are any 240x320 theme officailly available..
and you are missing 30+ libraries and some binaries in the sbin folder..
and mke2fs.conf,twrp.fstab in the /etc folder
and supersu folder
and selinux stuffs..
don't know why you are getting the install.c errors..
which branch are you using.. you need to use latest cm11 with twrp patches or omni branch to build twrp 2.7.x
for the not a prelink map error i think you need to add shared libraries or somethinh like that in prelink-linux-arm.map
anyways.. nice work. and keep trying... you can also ask for help in the official twrp thread here at xda..
Click to expand...
Click to collapse
Exactly... missing libs are the reasons, but there is absolutely no way of making these libs individually, well, I can try porting from other device as my last option..
and the most head-banging error is those install.c :/
I use twrp 2.7 branch (refer the link in the OP)
and Im building this with CM7 sources as it was GB
i tried to run your recovery file thru terminal but it doesn't show any action, can u pls upload your source?
i agree with @psych.half
some files are missing that must be call by recovery..
i don't know much about compiling a binary so pls update this thread on your progress. am willing to help
rio. said:
i tried to run your recovery file thru terminal but it doesn't show any action, can u pls upload your source?
i agree with @psych.half
some files are missing that must be call by recovery..
i don't know much about compiling a binary so pls update this thread on your progress. am willing to help
Click to expand...
Click to collapse
Yeh, Im currently updating github with todays changes...
I will now stop for today...
EDIT: Here, are the sources you asked for.
you compiled a higher twrp version
this one needs selinux hence the selinux error.
Some stuff needs to be updated to support the base of "kitkat if i say correct
you need to adjust boardconfig proper and such.
it isnt just a simple compile and get file thing
much much research and also you might need to edit the .C# source yourself.
SpaceCaker said:
you compiled a higher twrp version
this one needs selinux hence the selinux error.
Some stuff needs to be updated to support the base of "kitkat if i say correct
you need to adjust boardconfig proper and such.
it isnt just a simple compile and get file thing
much much research and also you might need to edit the .C# source yourself.
Click to expand...
Click to collapse
Yeah we got our mistake and reverted back to twrp2.3 and cm7 compatible build tools as Minus40 said.
He forgot to update the thread.
and the new twrp.zip in post #3 is twrp2.3,
stopped the work on this for today, will continue tomorrow,
Thanks for pointing it out anyways
Regards
recovery works on GT-S5367? (Galaxy Y TV)
EsromG5 said:
recovery works on GT-S5367? (Galaxy Y TV)
Click to expand...
Click to collapse
I doesn't work with original Galaxy y
Galaxy pocket devs
ı heard about galaxy pocket devs has finished twrp on pocket this can help you
Pocket has also new camera lib for cm9
Only proplem is Audio (On MadTeam)
SpaceCaker said:
you compiled a higher twrp version
this one needs selinux hence the selinux error.
Some stuff needs to be updated to support the base of "kitkat if i say correct
you need to adjust boardconfig proper and such.
it isnt just a simple compile and get file thing
much much research and also you might need to edit the .C# source yourself.
Click to expand...
Click to collapse
Updated thread, sorry, was in a hurry yesterday, forgot to update it just like post #13 by @DC07 says...
Sorry,
So, I can smell the victory though
Good News
I am getting a recovery.zip of a larger size, and finally, the build tools are working great and building the missing libs too...
thanks anyway @Minus40 for giving me the libs, but those libs are not gonna work on this device, its a bit complicated architecture...
Anyway, this is a good break through, ill update the github by the end of the day.
I hope to have a working TWRP by the weekend
presently, build tools error is that it doesnt dump proper permissions for the extra libs, will try give them the proper permissions (which i dont really know, which perms to give), a few days more and it'll be done.
Nachiket.Namjoshi said:
I am getting a recovery.zip of a larger size, and finally, the build tools are working great and building the missing libs too...
thanks anyway @Minus40 for giving me the libs, but those libs are not gonna work on this device, its a bit complicated architecture...
Anyway, this is a good break through, ill update the github by the end of the day.
I hope to have a working TWRP by the weekend
presently, build tools error is that it doesnt dump proper permissions for the extra libs, will try give them the proper permissions (which i dont really know, which perms to give), a few days more and it'll be done.
Click to expand...
Click to collapse
Try twrp 2.2.2.0 for cm7.
Welcome
I have started this thread for the THEORETICAL development of the mt6732/mt6752 from source if such a thing happened to exist which of course it does not.
While compiling from source is pretty well documented :good: compiling MTK is not so well documented especially the mt6732/6752.
I have tried to keep this thread as ambiguous as possible and hopefully we will be left in peace to iron out any difficulties.
DO's:
I am a Total Noob myself to compiling from source but experienced enough to use the xda search box, Google and Youtube first before asking any questions. If your still confused after using the above then by all means ask here.
DON'T s:
If your a noob who should happen upon this thread then by all means read and learn but please respect the dev's by not asking random question without searching first :fingers-crossed:
SHARING:
Please only share things of a sensitive nature with recognised members who you know and via the PM. :good:
Lets just see how far we can push this Kernel
Recommended Reading:
[GUIDE]Building a Kernel from source{Mediatek}
Build Kernel MT6577 - Can't boot after build
How To Port CyanogenMod Android To Your Own Device
XDA:DevDB Information
k01q_e k01q_h, Kernel for all devices (see above for details)
Contributors
bigrammy
Kernel Special Features: Remains to be seen
Version Information
Status: Testing
Created 2015-02-25
Last Updated 2015-02-25
I am here, reporting for duty. If anyone wants an extra "potato" because he has too much "ketchup" for use feel free to ask me
Just to be clear
I am new to compiling from source in any shape or form
I believe the kernel to be not a problem and I know dev's are working on getting our phone on cm and maybe others :fingers-crossed:
But me being me I am very curious and would like to understand how we would go about doing what @varun.chitre15 managed to do for the mt6582 Here
I have the PC all setup for building now thanks to @carliv great guide Here and the cm and android tut's I also found this useful guide on youtube by Dave Bennet Here
Our device is not on the cm or google repo so how do we add it locally.
Do we need any special commands for mediatek
Could we use the mt6582 repo and substitute or mod the files
As you can see I have more questions than answers as normal :laugh:
I dont want to tread on any toes here or take over current developing but just want to learn as said in the OP there is a lack of mtk guides regarding this.
If I missed a clear mtk guide then please post the link to it. :good:
In short your looking at manifests. http://wiki.cyanogenmod.org/w/Doc:_Using_manifests
carliv (I think) posted the device config on github - link in your SPFlash thread somewhere.
Found it: https://github.com/carliv/device_elephone_p6000?files=1
Vendor files
I have compiled and flashed a kernel, I've been running it for 24+ hours with no obvious issues. It's honestly very easy to just get it to build if you don't try to make major changes.
I have (very lazily) tried to change a couple of things in the config to fix the known issues (OTG, compass): unfortunately I have no way to test the OTG function right now, while the compass did not magically start working. On the other hand, the notification light issue which is introduced by V8.4 is not strictly or exclusively kernel-dependent, since I am running V8.3 with my own kernel and the notification function is intact. That's all I can share at the moment.
xenonism said:
I have compiled and flashed a kernel, I've been running it for 24+ hours with no obvious issues. It's honestly very easy to just get it to build if you don't try to make major changes.
I have (very lazily) tried to change a couple of things in the config to fix the known issues (OTG, compass): unfortunately I have no way to test the OTG function right now, while the compass did not magically start working. On the other hand, the notification light issue which is introduced by V8.4 is not strictly or exclusively kernel-dependent, since I am running V8.3 with my own kernel and the notification function is intact. That's all I can share at the moment.
Click to expand...
Click to collapse
Can you switch on and post the /proc/config ?
Regarding the notification lights, I think v8.4 introduced the custom partition (might be wrong on that). Running grep -r "ro.notification.breath" /system/ the only result I got was services.odex (might have been settings.odex). I've bak(smali)ed it but couldn't see the difference between the two that would explain the change.
HypoTurtle said:
Can you switch on and post the /proc/config ?
Regarding the notification lights, I think v8.4 introduced the custom partition (might be wrong on that). Running grep -r "ro.notification.breath" /system/ the only result I got was services.odex (might have been settings.odex). I've bak(smali)ed it but couldn't see the difference between the two that would explain the change.
Click to expand...
Click to collapse
The config file is attached to the post, it's too big to paste it.
I have tried the new ROM which came out today, then flashed my kernel. I can't use either SIM card anymore. Flashed the boot.img that comes with the ROM - same. I guess I gotta go back to V8.3 for now.
The new ROM doesn't seem to be the same as the OTA: it reports as: Elephone_P6000_02_V8.0_20150206.
About the notification issues (which bothers me the most), I haven't had much time do to more experiments, but I was thinking this (which probably also led to my confusion*): there's a chance the functionality is not removed or shut down, at least in the intentions of the maker. After all, in V8.4 (and in the new ROM), when the phone is connected the light stays on, while notifications make it breath. While not a desirable behaviour (at least IMO), I wouldn't call it... a non-behaviour, so to say. So perhaps the functionality itself is intact but something is altering the way it works, for whatever reason. I also did some unpacking and grepping a few days ago, but I couldn't find anything useful.
* At some point I thought the issue was fixed because the light was breathing while connected to my PC, but it was probably because I had a notification to read.
xenonism said:
The config file is attached to the post, it's to big to paste it.
I have tried the new ROM which came out today, then flashed my kernel. I can't use either SIM card anymore. Flashed the boot.img that comes with the ROM - same. I guess I gotta go back to V8.3 for now.
The new ROM doesn't seem to be the same as the OTA: it reports as: Elephone_P6000_02_V8.0_20150206.
Click to expand...
Click to collapse
Lets not speculate too much - but perhaps there was a minor board change between the first and second preorders, notification could be a problem with granting notification access (in settings) - could this be a selinux issue? It would explain why things like Light manager work - as you grant them notification access.
For lost Imei - can you compare the custom partition to the one in the ota?
If anyone needs an easier way to grab the 'ketchup', my GitHub has it. Click on my blog link in my signature.
BachMinuetInG said:
If anyone needs an easier way to grab the 'ketchup', my GitHub has it. Click on my blog link in my signature.
Click to expand...
Click to collapse
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
bigrammy said:
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
Click to expand...
Click to collapse
I'm actually a noob too, and honestly I've only ever successfully built a fakeflash (temporary recovery) that didn't even work.
bigrammy said:
Thanks bro,
Nice log
I was going to try use the sprout config as this is nice and clean Here when I have worked out how to do things that is.
My eyeballs are bleeding now with all this reading but from what I can see most of files are the same names so maybe we could just replace them with ours probably 98% ish
I did see one ROM some place for the mt6732/52 that had mt6582 references I just wish I could remember where I had seen it
Like I say I am a noob to this compiling and linux stuff so I maybe talking out of my ass :laugh:
Click to expand...
Click to collapse
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
I think you can use the scripts in the root of the source code to build the kernel? make<something>.sh.
Make sure you're on Linux (Ubuntu preferred) and that you have all dependencies installed correctly. To execute the script, simply go to the Terminal, cd to the location, then type . make<something>.sh
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
Have a look at the README.
Does make menuconfig work here?
These few simple instructions from the readme file enable you to build a working kernel (at least in a Linux environment):
Code:
How to Build
kernel
======
1. Get the prebuilt cross compiler from AOSP website:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
2. Add required cross compiler to PATH:
$ export PATH=/YOUR_TOOLCHAIN_PATH/arm-eabi-4.6/bin:$PATH
$ export CROSS_COMPILE=arm-eabi-
3. Then use the following commands to build the kernel:
$ ./makeMtk k01q_e new k
make menuconfig can be made to work, but you need to set some parameters and I can't look into it right now.
You previously asked something about the custom partition, I need some guidance there as I am not familiar with the IMEI issue.
xenonism said:
These few simple instructions from the readme file enable you to build a working kernel (at least in a Linux environment):
Code:
How to Build
kernel
======
1. Get the prebuilt cross compiler from AOSP website:
$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6
2. Add required cross compiler to PATH:
$ export PATH=/YOUR_TOOLCHAIN_PATH/arm-eabi-4.6/bin:$PATH
$ export CROSS_COMPILE=arm-eabi-
3. Then use the following commands to build the kernel:
$ ./makeMtk k01q_e new k
make menuconfig can be made to work, but you need to set some parameters and I can't look into it right now.
You previously asked something about the custom partition, I need some guidance there as I am not familiar with the IMEI issue.
Click to expand...
Click to collapse
Yea wasn't sure about menuconfig as mtk uses projectconfig rather than def_configs.
In the custom partition there are files like /custom/etc/firmware/modem.img etc. When messing with a Flyme port it was these files (and possible conflicts in /system) that caused an IMEI:nul.
FYI I opened the custom partitions on windows using an ext viewer after running the imgs through sgs2toext4.
Kernel building Mediatek
Tech N You said:
Can anyone actually make a guide noob friendly to build kernel from source? I got kernel with me locally zip file I want to build it please any help?
Click to expand...
Click to collapse
Not sure if you guys have seen or read this but it's a pretty comprehensive guide to building the mediatek kernel by @MasterAwesome and should really be compulsary for all kernel related things thread here http://forum.xda-developers.com/showthread.php?t=2754513
@HypoTurtle
Regarding the custom partition this is or could be a problem for us now and in the future and may require further investigation. The cm sprout branch has the modem.img in the (normal place /system/etc/firmware) but as you say ours is in the custom partition which is probably to protect it from bad /system flashes
Thing is I see no normal type link to it in the /system/etc/firmware so it must be linked some other way which may explain why all my port attempts failed as none of them used a custom partition (Asus_X002)
Maybe we will have to repartition the emmc to a standard config and alter the kernel (if the links are set via the kernel that is) for cm and other ports to work smoothly as I am unsure just how everything is linked up.
I have not had much experience with custom partitions so someone one know's of a good info source please link it. :good:
Hopefully Master @Santhosh M can figure out what's going on with the custom partition :fingers-crossed:
bigrammy said:
@HypoTurtle
Regarding the custom partition this is or could be a problem for us now and in the future and may require further investigation. The cm sprout branch has the modem.img in the (normal place /system/etc/firmware) but as you say ours is in the custom partition which is probably to protect it from bad /system flashes
Thing is I see no normal type link to it in the /system/etc/firmware so it must be linked some other way which may explain why all my port attempts failed as none of them used a custom partition (Asus_X002)
Click to expand...
Click to collapse
The partition is symlinked from .../by-name/custom (which is symlinked by the kernel from dev/block/mmcblk0p12) to /dev/customimg which is mouned after an e2fsck to /custom. /custom isn't linked to /system, it's just added to the global environment (init.environ.rc), will need to check on the environ, I'm on flyme and it has /custom/lib added to the library path (which doesn't exist).
HypoTurtle said:
The partition is symlinked from .../by-name/custom (which is symlinked by the kernel from dev/block/mmcblk0p12) to /dev/customimg which is mouned after an e2fsck to /custom. /custom isn't linked to /system, it's just added to the global environment (init.environ.rc), will need to check on the environ, I'm on flyme and it has /custom/lib added to the library path (which doesn't exist).
Click to expand...
Click to collapse
Haha thanks that explains a lot of weird things perfectly. :good:
What's the problem or what is the issue here.
Mediatek compiling guide ( by masterawesome ) that you have linked to is not actually practically this mtk kernel is done and is just way too complicatedly explained.
There is no defconfig stuff or pulling config.gz from phone in mtk. In this new source its just simple. Set up your toolchain path. Execute the makeMtk followed by the project no u want. Get zImage and patch it for mtk header and merge it with stock ramdisk. For this newer mtk chipsets repack has an extra stuff where u have to be careful of kernel command line parameters.
That's it the kernel stuff in mtk
SEE 4TH POST FOR ROM LINK
DISCLAIMER
As per always im not responsible for any problems that may or may not arrise from this UNOFFICIAL build, i am in no way responsible for any flash issues using SP flash tool, What you do here you do of your own accorrd i never forced you to flash anything, now the legal part is out of the way.
______________Device_specification____________
Model : 5044T
Chip type : eMMC
Fs type : Ext4
Mtk chip type : MTK6737M
Mtk chip type : MTK6735M
Kernel version : 3.18.19+
........Welcome to CR Droid 3.8.7 UNOFFICIAL.......
** NOTE **
This firmware is for Alcatel U5/Optus x Spirit 5044T models ONLY,
NOT WORKING
• Front Camera DOES NOT work
____________________________________________
PRE REQUISITE'S
• OEM unlocked in developer options
• Flash TWRP with SP flash tool.
• Format data in wipe menu before flashing rom & Gapps
• Install Rom first then install Gapps straight after
• Wipe cache/Dalvik & reboot
___________________________________________
LINKS
TWRP 3.2.3-0
https://drive.google.com/file/d/1YMfYp4z1tgdjvlK6KRlMsGLmkW_oikZz/view?usp=drivesdk
GAPPS
https://opengapps.org
SP FLASH TOOL
https://spflashtool.com
MEDIATEK VCOM FLASH DRIVER
https://spflashtool.com/download/MediaTek_USB_VCOM_drivers.zip
Pics of build
Links been pulled temporarily due to a modem issue.
Currently rectifying the situation now link will be back up asap.
See links on first post for GAPPS, TWRP, & SP flash tool.
CR droid 3.8.7 2019-02-24
https://drive.google.com/file/d/1S78TeH-8rHXAhqmSZS_h1PyoEGhSxUE0/view?usp=drivesdk
DISCLAIMER
As per always im not responsible for any problems that may or may not arrise from this UNOFFICIAL build, i am in no way responsible for any flash issues using SP flash tool, What you do here you do of your own accorrd i never forced you to flash anything, now the legal part is out of the way.
CHANGELOG
• RIL error is now resolved
• Minor changes to UI,
• Removed substratum until i can fix
• changed to TCL fingerprint for the play store,
• Added low ram optimiastion
• Added Volte to /etc /bin /lib & boot.img
• Added Vilte to /etc /bin /lib & boot.img
• Added hd voice calling
• Added Dual mic support
• Added NFC compatabilty
• Changed some cam libs to clean the picture up, touch to focus works camera quality is on par with stock if not better.
• Ril optimisations, call quality is now same as stock
NOT WORKING
• Vilte, driver compatabilty issue trying to fix may work partially
• NFC, im working on it for now everything but the running app has been placed.
• FRONT CAMERA DOES NOT WORK
dont ask me to fix it, i will decompile the kernel when i get free time to do so to try and fix,
ive already chowned & chmod'ed init.rc & init.mt6735 with drivers from stock, switched to running through mediaserver instead of cameraserver in service_contexts as it does on stock, created an init.camera.rc to enforce the stock camera permissions, switched each lib out individually leaving only those that dont break the camera, switched camera.mt6735m out in HW aswell as the mtk_camera_clientand it still dosent work i will continue to work on this problem until resolved
Nice job with the ROM, mate. I presume you're Australian, right? Had to mention it based on the Optus reference so yeah.
And care to expound on decompiling the kernel? I presume you can deduce what's going on with it so you could build an equivalent kernel using extant sources, yes?
blakegriplingph said:
Nice job with the ROM, mate. I presume you're Australian, right? Had to mention it based on the Optus reference so yeah.
And care to expound on decompiling the kernel? I presume you can deduce what's going on with it so you could build an equivalent kernel using extant sources, yes?
Click to expand...
Click to collapse
Hey mate sorry for late reply, been finishing a ubifs cyanogenmod 11 build ive jjust released,
Cheers for the feedback yeah this one is for alcatel 5044T using kernel 3.18.19+ great rom though just havent gotten round to decompiling kernel to fix the front camera managed to interpolate the back though to be better than stock
I use a .sh file called kernel-decompile.sh usually but havent decompiled a kernel in a while i try to use stock untouched as it saves the headache of getting kernel readable to make changes,
Did you make any progress on your build yet ? Managed to take a breif look at your device tree i noticed in one of the files it was screeming at the init.environ.rc is this present in your boot.img as its stating that the paths are missing for it if you have the init.environ.rc present you just need to add the paths listed into there corresponding path being either BOOTCLASSPATH or SYSTEMCLASSPATH
I noticed you init.rc is not right at all there is no information within to run any of the /bin resources required to execute gui, post fs-data section is also missing aswell as setting up the global evironment was also wrong i beleive as there was no info for chowning or chmodding below the mkdir asserts,
Ive still not looked at alot but everything else that i have managed to look at seems to be pretty good
I should be hopefully getting my Lineage 14.1 build up for the alcatel pixi 3 using stock 3.4.67 kernel soon so you may be able to see how i made the boot.img and compare it yours if you want or i have my LineageOS 13.0 build already up for the Pixi 3 already which uses the same setup pretty much because afaik the way the fs setup is set it out in the fstab and init.rc is all the same from 5.0+ onwards as it uses encrypted footers and what not, i had to vold manage the 900Mb /custpack partition to be used as user accessible data for file transfers and general storage of photos videos etc as it would not mount any other way and would cause me infinite boot loop i had to also set the 3.6GB /internal storage as a voldmanaged user inaccessible partition reserved for system storage as the /system partition is only 512mb so ive been struggling for space to make everything work but its nearly done
Matty1993 said:
Hey mate sorry for late reply, been finishing a ubifs cyanogenmod 11 build ive jjust released,
Cheers for the feedback yeah this one is for alcatel 5044T using kernel 3.18.19+ great rom though just havent gotten round to decompiling kernel to fix the front camera managed to interpolate the back though to be better than stock
I use a .sh file called kernel-decompile.sh usually but havent decompiled a kernel in a while i try to use stock untouched as it saves the headache of getting kernel readable to make changes,
Did you make any progress on your build yet ? Managed to take a breif look at your device tree i noticed in one of the files it was screeming at the init.environ.rc is this present in your boot.img as its stating that the paths are missing for it if you have the init.environ.rc present you just need to add the paths listed into there corresponding path being either BOOTCLASSPATH or SYSTEMCLASSPATH
I noticed you init.rc is not right at all there is no information within to run any of the /bin resources required to execute gui, post fs-data section is also missing aswell as setting up the global evironment was also wrong i beleive as there was no info for chowning or chmodding below the mkdir asserts,
Ive still not looked at alot but everything else that i have managed to look at seems to be pretty good
I should be hopefully getting my Lineage 14.1 build up for the alcatel pixi 3 using stock 3.4.67 kernel soon so you may be able to see how i made the boot.img and compare it yours if you want or i have my LineageOS 13.0 build already up for the Pixi 3 already which uses the same setup pretty much because afaik the way the fs setup is set it out in the fstab and init.rc is all the same from 5.0+ onwards as it uses encrypted footers and what not, i had to vold manage the 900Mb /custpack partition to be used as user accessible data for file transfers and general storage of photos videos etc as it would not mount any other way and would cause me infinite boot loop i had to also set the 3.6GB /internal storage as a voldmanaged user inaccessible partition reserved for system storage as the /system partition is only 512mb so ive been struggling for space to make everything work but its nearly done
Click to expand...
Click to collapse
You're welcome, glad you had things sorted out on your end. I do have an init.environ.rc on my /out folder but I am not sure if it's right at all lol:
Code:
# set up the global environment
on init
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar
export SYSTEMSERVERCLASSPATH /system/framework/org.cyanogenmod.platform.jar:/system/framework/org.cyanogenmod.hardware.jar:/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar
export LD_PRELOAD libsigchain.so:libxlog.so
On the stock ramdisk it looks like this:
Code:
# set up the global environment
on init
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/CustomProperties.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-tablet.jar
And by init.rc do you mean init.mt8127.rc? Could you tell me which parts are wrong please, as I've based this off @Stricted's MT8127 repo. I doubt that the missing "LD_LIBRARY_PATH" is at fault too. Also, I am getting a missing "__umodsi3" symbol error prior to introducing a (rather pointless imo) shim just to sort of make hwcomposer happy, even though I still end up not getting the GUI to show up.
You mind if we continue on discussing this on the LeapFrog development thread though? I don't want to stray off your original topic here anyway.
blakegriplingph said:
You're welcome, glad you had things sorted out on your end. I do have an init.environ.rc on my /out folder but I am not sure if it's right at all lol:
On the stock ramdisk it looks like this:
And by init.rc do you mean init.mt8127.rc? Could you tell me which parts are wrong please, as I've based this off @Stricted's MT8127 repo. I doubt that the missing "LD_LIBRARY_PATH" is at fault too. Also, I am getting a missing "__umodsi3" symbol error prior to introducing a (rather pointless imo) shim just to sort of make hwcomposer happy, even though I still end up not getting the GUI to show up.
You mind if we continue on discussing this on the LeapFrog development thread though? I don't want to stray off your original topic here anyway.
Click to expand...
Click to collapse
Hey mate sorry for late replty been helping a friend out building a twrp for them,
Yeah ill go through your init now on your guthub and ill type out into a notepad++ what i can visually see is wrong with it and any other files also,
LD_LIBRARY_PATH i beleive wont break a system and shouldn't stoo GUI loading up, also with HW composer could you notjust disabling it to run native 2D graphics ?
Anyhow yeah ill jump on the leapfrog forum when i get some time
user154 said:
Hey buddy, hows things going?
I was able to fix the front camera in my rom a few weeks ago,
There is no need to touch the boot image or kernel, I also experimented with changing permissions of camera drivers in the init files to no avail.
To fix we must ignore the advice of every porting guide and replace more than one lib.
In the end I looked at similar mtk kernel sources and was able to trace the error back to libcam.hal3a.v3.so however just changing this lib is not enough, we must also change some of its dependencies. Attached is a list of 12 libs that I changed to solve the problem
EDIT:
It may not be necessary to change all of these libs, you may be able to get away with just changing the hal3a libs and featureio and featureiodrv as these were the last ones I changed, I didnt try taking away any of the other libs I replaced as I found 720p recording was better and general camera quality had improved
Click to expand...
Click to collapse
Hey mate,
Yeah im not to bad sorry for late reply ahh sweet that means i dont have to decompile my kernel now that may have been one of the libs id changed that time id gotten it working and didnt even know id changed it, how did you figure tthat one out, as usually for cam the mains are camalgo, camdrv, gralloc & featureio i couldnt wrap my head round why i couldnt get it working again lol
Yeah 720p i found was the best optimal setting as SS 480p seemed to be a bit grainy and 1080p isnt device supportive so is so slow i havent released an update to CRdroid so may end up getting it done in the next few weeks 5044T users will be happy great work on figuring it out
Matty1993 said:
Hey mate sorry for late replty been helping a friend out building a twrp for them,
Yeah ill go through your init now on your guthub and ill type out into a notepad++ what i can visually see is wrong with it and any other files also,
LD_LIBRARY_PATH i beleive wont break a system and shouldn't stoo GUI loading up, also with HW composer could you notjust disabling it to run native 2D graphics ?
Anyhow yeah ill jump on the leapfrog forum when i get some time
Click to expand...
Click to collapse
I am not sure, something's keeping the loading animations from showing up, maybe I might have missed a few more blobs or whatnot. I'll have to upload an unsigned dump of the Epic for you to peruse some time. You mind if we get you a donor Epic whilst I wait for mac2612 at /r/OpenLF to get his own Epic being he's had Linux development experience before.
user154 said:
So I looked at logcat and saw that the issue was lensdrv looking in the wrong place for the lens. so I looked at some mtk kernel sources to see if I could trace lensdrv back to a specific lib. It appeared to be part of hal3a however changing this lib would make the camera app disappear, so I tried installing a different camera app which failed to install. when I looked at logcat the install failed because native libs were missing so I used a dependency viewer to see what libs were dependencies of hal3a and began changing them one by one, focussing on drv libs and then testing. Looking at logcat after I had changed a few I saw a reference to a problem with featureio so I opened featureio and featureiodrv in a hex viewer and one of them (cant remember which) had a string specifying the lens location, so I added these two and the front camera worked. This is what makes me think you could maybe get away with just changing hal3a and the 2 featureio libs to get the front camera working, however I was happy with how the camera was working so didnt try to take away any of the other depdencies I had changed
Click to expand...
Click to collapse
Dependency viewer? Which one are you using if you don't mind telling?
user154 said:
This is the one I use:
https://forum.xda-developers.com/android/software-hacking/tool-read-elf-gui-android-libs-t3717016
Click to expand...
Click to collapse
Hey bud sorry for the very late reply i feel quite rude i somehow managed to unmark my own thread just scoured my mentions section looking for a comment on it lol,
Had troubles with pc also blowing just got it fixed today so looking forward to getting camera all working well with it managed to make some progress with my rom before it did though
Ive turned my build into a vendor image as im also trying to incorporate all the test tools from the stock rom aswell as the VOLTE modem thats been attached to custpack in stock,
Managed to get most test tools working well but something wrong with the modem not engaging properly it says YES OPTUS but has no signal or service and imei is also blank not invalid but blank & gone lol yet sim still registers optus so i think im gonne be doing some debugging on it to see whats going wrong ive got a feeling i may need to reverse engineer the modem libs hoepfully not other than that ive only got a small bug when it first boots up that states "a vendor image mismatch has been detected, typically this means your vendor image is out of date please ensure your vendor image matches NJH47F"
Got me stumped a bit on it as i cant spot anything obvi wrong but ill persevere as having it as a vendor build seems to use at least 60-100mb less ram, first boot is quicker & there is virtually no lag at all compared to a traditional build and i was able to add all the SLPencryption and Fpsv files and libs without getting a bootloop as im trying to get encryption to work with it, not sure if its working though as i didnt get a chance to test yet.
Ill keep you updated on progress anyhow as i go when i get round to it i gotta help blake first though as i promised him id help him get his CM 12.1 working when i got my computer working again as hes been dying to get it working on his leapfrog epic
Hows things on your end with your rom ? Did you manage to make any progress with getting IMS, VOLTE or VILTE anywhere near working im struggling to say the least with it lol
MTK source code
Hi @Matty1993
Not sure if this will help but I have found the FULL Mediatek source code for the MT6737x.
The Android 8.1 sources can be found HERE along with some other useful things like the Android SDK source (This is the full 6.0 source code). :good:
I have downloaded the 8.1 source and it seems to be complete.
There are also full build instructions although you will need to create your own "Build Project" from what I understand or maybe you can just cherry pick what you need. :fingers-crossed:
Below are the officially maintained repository's on github.
OrangePi 4G-IOT
OrangePi 4G-IOT build on MTK6737 Soc, the officially maintained repository as follows:
kernel:
https://github.com/orangepi-xunlong/OrangePi4G-iot_kernel.git
u-boot:
https://github.com/orangepi-xunlong/OrangePi4G-iot_bootloader.git
build scripts
https://github.com/orangepi-xunlong/OrangePi4G-iot_scripts.git
external binary file
https://github.com/orangepi-xunlong/OrangePi4G-iot_external.git
toolchain
https://github.com/orangepi-xunlong/OrangePi4G-iot_toolchain.git
:fingers-crossed:
user154 said:
Hey, dont feel rude we cant all always reply straight away I've just welcomed my 2nd son into the world so not really been on here very much over the last month or so.
How is turning your build into a vendor image going? I didnt think this device had a seperate vendor partition just a sub folder of the system partition. If youve managed to give this device a vendor partition that would be quite a feat, theoretically it would mean it would be able to boot a GSI although I dont know how much mileage you would get out of this in reality.
I would imagine some of the problems you are having would be due to the system expecting files to be in one place but you have them in another, you should be able to work this out from the logs though if this is the case.
Good luck to the pair of you on the leapfrog epic front, sounds like a very fun project
I havent done much more on my ROM the only thing left to fix is IMS/VOLTE but I cannot test this so without having someone to test it and provide logs there isnt much I can do. I've been looking round for an oreo rom to port from but thanks to TCL deciding to compile the stock rom as 32 bit and not 64 this is proving rather difficult. I have looked at the possibility of porting 64 bit rom to 32 but from what I can tell the chances of ending up with a decent port rom with no major bugs is pretty slim.
At the moment my main project has been making a game for/with my eldest son, he is obsessed with kirby so made a simple platformer using sprites ripped from various kirby games.
Click to expand...
Click to collapse
Havent worked on the build in a while been in hosptial with pneumonia horrible just horrible wouldnt wish it upon anyone, before hand though yeah vendor build was going great so much more can be added and works where it dosent in /system, such as the slp encryption and cloud test suites etc would all give me bootloop when added to /bin /etc and /lib so what i did is made the system think its got an emulated /vendor partiton instead of me going to all the trouble to create a logical /vendor partitiion by editing a few things in the boot.img .rc files and slinking it in the cpiolist so that the dir is set in the rootfs with 0644 permission but still using 0755 permissions in /system/vendor took me a while to figure it out but even makes system boot and run faster and smoother dont know how thats possible though as it even uses 100mb less ram deffo works as /vendor but as the message i stated in the earlier post just wont go TF away no matter what i do lol,
Still fixing front camera trying to compile my own camera lib for the front but havent gotten round to it yet
bigrammy said:
Hi @Matty1993
Not sure if this will help but I have found the FULL Mediatek source code for the MT6737x.
The Android 8.1 sources can be found HERE along with some other useful things like the Android SDK source (This is the full 6.0 source code). :good:
I have downloaded the 8.1 source and it seems to be complete.
There are also full build instructions although you will need to create your own "Build Project" from what I understand or maybe you can just cherry pick what you need. :fingers-crossed:
Below are the officially maintained repository's on github.
OrangePi 4G-IOT
OrangePi 4G-IOT build on MTK6737 Soc, the officially maintained repository as follows:
kernel:
https://github.com/orangepi-xunlong/OrangePi4G-iot_kernel.git
u-boot:
https://github.com/orangepi-xunlong/OrangePi4G-iot_bootloader.git
build scripts
https://github.com/orangepi-xunlong/OrangePi4G-iot_scripts.git
external binary file
https://github.com/orangepi-xunlong/OrangePi4G-iot_external.git
toolchain
https://github.com/orangepi-xunlong/OrangePi4G-iot_toolchain.git
:fingers-crossed:
Click to expand...
Click to collapse
Big rammy my friend how have you been and thank you so much for linking me to some proper oreo source for these SoCs as i was trying to port lineage 15.0 32bit rom i found for Moto G4 MT6373M but just cant get it past the logo no natter what i do, being complete or near complete sources though i should be able to make something works cant thank you enough for the links again
Matty1993 said:
Big rammy my friend how have you been and thank you so much for linking me to some proper oreo source for these SoCs as i was trying to port lineage 15.0 32bit rom i found for Moto G4 MT6373M but just cant get it past the logo no natter what i do, being complete or near complete sources though i should be able to make something works cant thank you enough for the links again
Click to expand...
Click to collapse
Sorry to hear you have been seriously ill with pneumonia
I thought you had gone kind of quite on the forum, I do hope your all sorted now and feeling better. :fingers-crossed:
Yes the source is probably the best I have seen thus far and providing you have the necessary drivers and a little know how I am pretty sure you could bring up a new Project for your own device. :fingers-crossed:
Not sure about your booting issue as it could be just about anything but I am sure you will hunt down the problem. :fingers-crossed:
bigrammy said:
Sorry to hear you have been seriously ill with pneumonia
I thought you had gone kind of quite on the forum, I do hope your all sorted now and feeling better. :fingers-crossed:
Yes the source is probably the best I have seen thus far and providing you have the necessary drivers and a little know how I am pretty sure you could bring up a new Project for your own device. :fingers-crossed:
Not sure about your booting issue as it could be just about anything but I am sure you will hunt down the problem. :fingers-crossed:
Click to expand...
Click to collapse
All good dude yeah lots of nasty stuff in my lungs i got the privledge to know what a tube being stuck down your throat to make you breathe felt like yeah ill be sure to check it out as ive looked at a few but none of them were by far near complete which is probs why i couldnt get oreo to boot,
optus have finally switched to Qualcomm's snapdragon so they can run 8.1.0 on there new updated Optus x spirit 2 so they even have abandoned mtk i on the other hand prefer the overjoyable mess that mediatek is haha yeah thats what i figured about the boot issue to could be an init.xx.rc or se_contexts or even the init possibily everything else is perfect in bootimg, either that or could be one of the binaries in /bin or .jars in /framework could even be in /lib ill just keep picking away while i go through the oreo source until some magic happens :laugh:
Matty1993 said:
All good dude yeah lots of nasty stuff in my lungs i got the privledge to know what a tube being stuck down your throat to make you breathe felt like yeah ill be sure to check it out as ive looked at a few but none of them were by far near complete which is probs why i couldnt get oreo to boot,
optus have finally switched to Qualcomm's snapdragon so they can run 8.1.0 on there new updated Optus x spirit 2 so they even have abandoned mtk i on the other hand prefer the overjoyable mess that mediatek is haha yeah thats what i figured about the boot issue to could be an init.xx.rc or se_contexts or even the init possibily everything else is perfect in bootimg, either that or could be one of the binaries in /bin or .jars in /framework could even be in /lib ill just keep picking away while i go through the oreo source until some magic happens :laugh:
Click to expand...
Click to collapse
Yes most definitely not a good experience I am sure. :crying:
Hope you work out your booting issue :good:
I may need to pick your brains later on regarding the Lenovo TAB2 A10-70F/L I managed to get the KK 3.10.65 kernel source to build without any real errors but I think it maybe arm rather than arm64 IDK the old style MediaTek layout is very confusing and I am not sure how it all works eg which parts come from the actual kernel and what comes from the Mediatek project which config's it use or how to make config changes even etc etc.
I have had a lot on recently so not really had time to fully explore it Github lenovo_kernel_a10-70f
I can't seem find any good guides for working with this old style layout unless you know of any. :fingers-crossed:
bigrammy said:
Yes most definitely not a good experience I am sure. :crying:
Hope you work out your booting issue :good:
I may need to pick your brains later on regarding the Lenovo TAB2 A10-70F/L I managed to get the KK 3.10.65 kernel source to build without any real errors but I think it maybe arm rather than arm64 IDK the old style MediaTek layout is very confusing and I am not sure how it all works eg which parts come from the actual kernel and what comes from the Mediatek project which config's it use or how to make config changes even etc etc.
I have had a lot on recently so not really had time to fully explore it Github lenovo_kernel_a10-70f
I can't seem find any good guides for working with this old style layout unless you know of any. :fingers-crossed:
Click to expand...
Click to collapse
Yeah was horrible, made some minor progress on the boot issue dosent switch straight off now is sitting on logo for about 30 seconds before it switches off so getting there bit by bit haha,
Never worked on a lenovo Tab 2 what MTK specs is it running ?
your correct to also about it being confusing the word id use is uniqe experience to say the least last time i worked on older style mtk sources however i did make some notes as i got stuck a fair amount of times aswell not knowing where to put things but it varies from source to source where things go and configs etc etc so i dont know if the layouts would be the same
Matty1993 said:
Yeah was horrible, made some minor progress on the boot issue dosent switch straight off now is sitting on logo for about 30 seconds before it switches off so getting there bit by bit haha,
Never worked on a lenovo Tab 2 what MTK specs is it running ?
your correct to also about it being confusing the word id use is uniqe experience to say the least last time i worked on older style mtk sources however i did make some notes as i got stuck a fair amount of times aswell not knowing where to put things but it varies from source to source where things go and configs etc etc so i dont know if the layouts would be the same
Click to expand...
Click to collapse
The tablet is based on the mt6752/6732 chip set (Quad Core) although Lenovo's specs say HERE
WiFi: MediaTek® MT8165 64-bit 1.7 GHz Quad Core
4G LTE: MediaTek® MT8732 64-bit 1.7 GHz Quad Core
The kernel will boot on either device WiFi or 4G so clearly not much difference between them and seems to be more of a naming thing and possibly some minor tweaking.
The Lenovo K3 kernel source is called the aio (All in One) so I am thinking it may well build for this Tablet too as all the drivers seem to be present in that source. android_kernel_lenovo_aio_otfp I just need to workout the defconfig and what device specific parts I need from the tablets KK source code.
:fingers-crossed: