yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] RickyGoldsmith:
[MENTION=2674277]somberi[/MENTION] - I just verified. Something in the patch screwed the camera focus functionality. With just flashing the ROM, the camera works perfect.
[Miscellaneous Android Development] RickyGoldsmith:
Testing results from user @debasish497

Testing results from user [MENTION=5277821]debasish497[/MENTION]

Working:

1. Compass

2. Sound was working after Somberi fixed, but camera crashing after video selected. even the gallery started crashing. Before the patch was applied, the camera worked (checked only twice thrice though).

3. address book, phone working .although there was no videocalling option(switching back to the original ROM as this feature is not working).

4. the launcher is alright but if you select more effects, then it will become slow and unresponsive.only cube effect was working fine, other than the default.

5. Dual sim option selection from the settings is incomplete.

6. I cannot see 2 sims in the settigs bar at the top.

not Working:

1. Camera after the sound was fixed

2. No video in camera, becomes unresponsive and black out.

3. the 3G was slow somehow, wifi was fine. after reflashing with the stock rom, the 3g is fine now.

4. No dual sim selection screen
[Miscellaneous Android Development] superdragonpt:
[/B]

Replace the MODEM.BIN, FROM the one in your stock rom, and test...

That's how i managed to fix my ports, when i have those problems, also it's always nice to check the .libs your using in the port .......
[Miscellaneous Android Development] RickyGoldsmith:
Where can I find the modem.bin file?
[Miscellaneous Android Development] Ganesh Kumar:
The rom is awesome...only minor bugs, force close some time with launcher & camera problem..the big advantage is mobile sound volume is increased double than stock rom, I think no one is noticed when i listen songs through my apple ipod headset in stock rom the sound is medium but now it's increased to apple ipod sound & clarity is so good. thanks again only some polish is required to this rom then this is the perfect rom to use in amoled display as this rom gives rich colour.:mad::mad::mad:
[Miscellaneous Android Development] RickyGoldsmith:
Yup! :cool:

The alarm makes me wake up now. :D
[Miscellaneous Android Development] Sam Solomon:
Just Remove the camera libs from sound patch....When i did the ROM,i swapped Camera LIBs to make it Work..
[Miscellaneous Android Development] somberi:
Can someone do that? I'm at work and do not have access to any of the cloud storage services :(, that's where i keep all my files.
[Miscellaneous Android Development] RickyGoldsmith:
I don't see any camera libs in the sound patch that [MENTION=2674277]somberi[/MENTION] provided. Can you point the ones?
[Miscellaneous Android Development] Sam Solomon:
There should be a lib file interfering with Cam....Someone mirror that patch for me....Will check... That site is blocked in my net service :crying:
[Miscellaneous Android Development] RickyGoldsmith:
[MENTION=4994953]Dark4Droid[/MENTION]: Here's the patch on Google Docs
[Miscellaneous Android Development] RickyGoldsmith:
The patch adds the library libsrsprocessing.so. This was not in the stock MIUI that you ported. Rest all are identical libs.
[Miscellaneous Android Development] RickyGoldsmith:
Sound fixes along with Camera

The final list of libraries that need to be patched on top of the MIUI rom is in the 2nd post in the thread.

Root Cause

This was a tricky bug to tame. The libraries were identical in size. Only when looking deep into the symbols of these shared objects, you will see that they actually are different. By looking at the symbols, I was able to bring down the final list of libraries that needed to be patched.

The faulty libraries that needed to be patched were:

libaudio.primary.default.so.strings

libaudiocustparam.so.strings

libaudioflinger.so.strings

and ofcourse:

libsrsprocessing.so was used as it is from the stock gionee rom.

In what I analyzed, the reason the camera was crashing in [MENTION=2674277]somberi[/MENTION]'s fix was because there we also replaced the libmediaplayerservice.so. This library was missing some of the symbols that were necessary for the camera functionality.
[Miscellaneous Android Development] somberi:
Great find. Thanks for the explanation!
[Miscellaneous Android Development] RickyGoldsmith:
Swapping the storage

[MENTION=2674277]somberi[/MENTION]: I believe in your stock ROM, you have been able to swap the storage. How is that done? On MIUI, I'm running out of space.
[Miscellaneous Android Development] DreamD1:
They have released the official ROM, link below:

http://bbs.vsunmobile.com/thread-57264-1-1.html

---------- Post added at 03:08 PM ---------- Previous post was at 02:37 PM ----------

Try the method in this link

http://xdaforums.com/showthread.php?t=2296230
[Miscellaneous Android Development] RickyGoldsmith:
I believe this device came with Android 4.2. The kernel we have for Dream_D1 support Android 4.1.2

---------- Post added at 03:08 PM ---------- Previous post was at 02:37 PM ----------

This looks too much of an overkill. I'd rather go with what [MENTION=2674277]somberi[/MENTION] did. It just extended the task to the secondary storage. That's more elegant and simple.
[Miscellaneous Android Development] RickyGoldsmith:
[MENTION=2674277]somberi[/MENTION] [MENTION=4994953]Dark4Droid[/MENTION]

Did you guys get a chance to look at this ROM? There were concerns that this rom could be a fake MIUI...
[Miscellaneous Android Development] somberi:
I did not do anything special. Just cooked the ROM via dxdia's kitchen from the stock system.img and boot.img. :confused:

---------- Post added at 12:54 PM ---------- Previous post was at 12:52 PM ----------

No time.. will try it this weekend. :fingers-crossed:
[Miscellaneous Android Development] RickyGoldsmith:
But ours is based on the 4.1.2 version where as Xiaomi is basing it on 4.2. So we need a kernel from 4.2.
[Miscellaneous Android Development] debasish497:
I might be making any mistake while trying to create the boot.img from Zimage. [MENTION=3094817]RickyGoldsmith[/MENTION] please suggest me ways to test that. I have a apathy towards the flashtool, as twice messed up my phone with that.
[Miscellaneous Android Development] RickyGoldsmith:
I haven't tried to build yet, but you can check this. It is already there in the build. Does it not work?

echo "**** Generate download images ****"

if [ ! -x ${mkimg} ]; then chmod a+x ${mkimg}; fi

if [ "${KBUILD_OUTPUT_SUPPORT}" == "yes" ]; then
${mkimg} ${kernel_zimg} KERNEL > out/kernel_${MTK_PROJECT}.bin
else
${mkimg} ${kernel_zimg} KERNEL > kernel_${MTK_PROJECT}.bin
fi

copy_to_legacy_download_flash_folder kernel_${MTK_PROJECT}.bin rootfs_${MTK_PROJECT}.bin
[Miscellaneous Android Development] debasish497:
How to test it now,. I was replacing the boot.img from a cwm flashable stock and trying to boot .... might be not the best Idea,..
[Miscellaneous Android Development] vizhigal:
I do have created a kernel from the FLY IQ444Q released sources , now how to test it.
[Miscellaneous Android Development] newbie_vlc:
¿The MIUI don't support dual sim signal notification?

On your photos only appear one sim signal
[Miscellaneous Android Development] RickyGoldsmith:
Just flash it as you flash your regular ROM. You do need to ensure that you Also Include The Kernel Modules
[Miscellaneous Android Development] RickyGoldsmith:
Yes MIUI isn't designed to support two Sims. [MENTION=1097102]newbie_vlc[/MENTION]
[Miscellaneous Android Development] debasish497:
I have also checked from Srini Sri(@vizhigal in XDA) from FB group, both of us are getting similar error while porting.

Srini says that the build.mk is of diiferent size in IQ451 and IQ444Q,... we need to see that what is the mismatchFly IQ444Q Forum

[MENTION=3094817]RickyGoldsmith[/MENTION] want your leads here man,..
[Miscellaneous Android Development] RickyGoldsmith:
build.mk is just the makefile. That won't be the real problem.

What is the problem? Is it still the kernel panic, that you posted? If yes, then you didn't configure your kernel correct.

Can you share your exact build steps, along with the commands, in this forum? I'll see if I get some time over this weekend.
[Miscellaneous Android Development] debasish497:
In my case, it was the error I posted. But Srini said that he's getting similar error. Exact he didn't tell me.

However I have almost followed what Varun Chitre has said in the sources he shared. (Read.md).
[Miscellaneous Android Development] RickyGoldsmith:
That build doc doesn't talk anything about the kernel build config. Where did you get the build config from?
[Miscellaneous Android Development] Ganesh Kumar:
[MENTION=3094817]RickyGoldsmith[/MENTION], I m using v3.1 but not able to download app from Google play..please advice.
[Miscellaneous Android Development] RickyGoldsmith:
Because we didn't ship the Google Play market with the ROM. You'll need to flash the MIUI Market app and then download the Google Play app throught it. Check in this forum. We've already discussed it.
[Miscellaneous Android Development] RickyGoldsmith:
Any further updates on the kernel??? Or is it all stuck?
[Miscellaneous Android Development] deepak2111:
waiting for new kernel to work...

unfortunately my Harddisk crashed..my mobile also in service centre::(:(.

i am creating AROMA installer for dream d1..initially tested..it works..but have to test with rom whenever mobile come back.

If anyone interested in testing AROMA installer i will upload it.
[Miscellaneous Android Development] debasish497:
I was using the IQ444Q source codes and the kernel build config from IQ451what Shrini shared in FB group.

Yes we are both (Shrini also) stuck at some point,..

I didn't afford much time to see the problem cause but will try tonite.

Regarding the build process- I googled and messaged R Murgadoss from LFY(linux for you) to guide me. Based on the steps which is more or less same as can be found in the read.md file from varun chitre's git page.

http://xdaforums.com/showthread.php?p=363625

Although the above doesn't have the full instruction for mt6589 which is a bit different, but still its more or less complete.
[Miscellaneous Android Development] vizhigal:
Can anyone give. gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT tool chain download link
[Miscellaneous Android Development] RickyGoldsmith:
This should be available on any Linux distribution
[Miscellaneous Android Development] deepak2111:
can you share steps/commands how do you compile kernel from which source?
[Miscellaneous Android Development] vizhigal:
1. I am on windows 7 -32 bit , Ubuntu10.04 in Vmware 9.0

2. The tool chain is compiled from NDK 8e, (gcc version 4.6.x-google 20120106 (prerelease) (GCC))

3.The prerequisite for compiling the kernel is posted and attached in FB group .

4.To get the building environment checkenv.py is suitably altered to work with 32 bit.

5.The command line is very simple ./makeMtk gionee89_jb r kernel.

6 Need to make a folder as gn_project with the files asked for if you are using the makeMtk available in the mediatek/build folder.

7.If you use the IQ451 makeMtk you do not require gn_project file.

8..Sources tried IQ446 , IQ451 (4.1.2) , trying now CINK -5 ( clone of IQ451 ).

9.IQ 451 kernel compiling is throwing below error

mediatek/custom/out/gionee89_cu_jb/kernel/built-in.o: In function `tpd_fw_version_show':

/root/work/451/kernel/mediatek/custom/out/gionee89_cu_jb/kernel/touchpanel/mtk_tpd.c:144: undefined reference to `get_fw_version_ext'

make[3]: *** [.tmp_vmlinux1] Error 1

make[2]: *** [sub-make] Error 2

If you change the touch panel folder files from the other sources you will get a kernel.

10.IQ444Q ( D1 clone ) kernel compiling is throwing error with respect to disp_drv.c where errors are showing undefined reference to lcm_count and disp_drv_get_lcm_driver .

If you use the IQ451 kernel source with IQ449Q mediatek files you will get a kernel.

I just uploaded the D1 boot.img replaced with the new kernel and Mr.Somberi recovry image with the new compiled kernel. The link details are with Mr.Debashish( I do not know whether XDA will allow external links.

Please let me know if you require any more details.
[Miscellaneous Android Development] debasish497:
http://www.mediafire.com/?gmjba63bimfv1k1

Link as shared by [MENTION=3082969]vizhigal[/MENTION]
[Miscellaneous Android Development] vizhigal:
Kernel compiled from IQ44Q source files with out any build errors.

Two doubts need to be clariied.

1.About HDMI support

The ProjectConfig.MK file shows HDMI support as below.

# Specify HDMI external IC type.

CUSTOM_KERNEL_HDMI=nxp_tda19989

# To control whether enable or disable HDMI feature. If choose yes, phone's screen can be demonstrated on TV via HDMI cable.

MTK_HDMI_SUPPORT=yes

In my trial builds i kept this as same and the build was added with nxp_tda19989 driver files. I do not know the errors are because of this.

Now i changed the support as no and build the kernel.

2.About build.mode

In makeMtk the build.mode option is eng .

project = gionee89_cu_jb

build_mode = eng

I changed this to user in the makeMtk and build a kernel.

project = gionee89_cu_jb

build_mode = user

What is the difference between the eng mode and user mode ?

Last post build errors analysis.

As per ProectConfig.mk

# To choose LK LCM driver name

CUSTOM_LK_LCM=nt35590_hd720_dsi_vdo_truly ssd2075_hd720_dsi_vdo_truly

# To choose kernel LCM driver name

CUSTOM_KERNEL_LCM=nt35590_hd720_dsi_vdo_truly ssd2075_hd720_dsi_vdo_truly

To choose uboot LCM driver name

CUSTOM_UBOOT_LCM=nt35590_hd720_dsi_vdo_truly ssd2075_hd720_dsi_vdo_truly

The trial build errors is due the driver files nt35590_hd720_dsi_vdo_truly & ssd2075_hd720_dsi_vdo_truly are not present in the kernel folders ( alps\mediatek\custom\common\kernel\lcm ).

The drivers are present in the alps\mediatek\custom\common\lk\lcm folder.

The , mt8193_mt65xx_lcm_list.c file , mt8193_lvds.h file from Include folder and the drivers files were copied to kernel folder in respective folder.

The comparison of bounds.s file from a clean build with bounds.s file from a IQ44Q bad build has shown the missing final .o files .

This bounds.s can be found in the alps/kernel/out/kernel folder.

For logo.build we need only cu_hd720 folder files as per ProjectConfig.mk ( BOOT_LOGO=cu_hd720 ).

In the alps\mediatek\custom\common\lk\logo and in alps\mediatek\custom\common\uboot\logo . I removed the rest of the heavy folders to reduce the size.

Will upload the mediatek (113.mb ) file only as the other folders are available in the source files.
[Miscellaneous Android Development] RickyGoldsmith:
build dependency

I got some time to kill today.....

How did you guys get past the dependency?

I see the sources that I have, is not complete. No all dependencies are met.

rrs@zan:/media/DATA/Android/Google_Android$ ./makeMtk gionee89_cu_jb check-dep
mediatek/build/makemtk.mk:50: mediatek/operator/OperatorInfo.mk: No such file or directory
make: *** No rule to make target `mediatek/operator/OperatorInfo.mk'. Stop.
cp: cannot stat ‘./mediatek/build/tools/ptgen/MT6589/*.img’: No such file or directory
[Miscellaneous Android Development] debasish497:
Its trying to find operator specific signal definition make file, if the flag is set and is not none, it will try to get this file.
[Miscellaneous Android Development] vizhigal:
check the ProjectConfig.mk ...line no =1136.1137 &1138

# It's used to define which operator you will support. If it's not operator load, the value is NONE(default value). The values may be:

OP01_SPEC0200_SEGC(for CMCC), OPO2_SPEC0200_SEGA (for CU)

OPTR_SPEC_SEG_DEF=OP02_SPEC0200_SEGA

PLATFORM_MTK_SDK_VERSION=1

copy the last two lines in a text file and name it as OperatorInfo.mk.

create a folder operator in mediatek folder with the newly created .mk file.

Check the spellings as per ProjectConfig.mk.
[Miscellaneous Android Development] RickyGoldsmith:
Thanks. What about the other one???

/mediatek/build/tools/ptgen/MT6589/*.img

Actually, it has a new set of dependency problems now.

rrs@zan:/media/DATA/Android/Google_Android$ ./makeMtk gionee89_cu_jb n kernel
2013/08/01 12:09:25 custgening...
LOG: out/target/product/gionee89_cu_jb_custgen.log
==> [OK] 2013/08/01 12:09:27
2013/08/01 12:09:31 custgening...
LOG: out/target/product/gionee89_cu_jb_custgen.log
==> [OK] 2013/08/01 12:09:32
2013/08/01 12:09:32 cleaning kernel...
LOG: out/target/product/gionee89_cu_jb_kernel.log
/bin/bash: line 0: cd: kernel: No such file or directory
make[1]: *** [kernel] Error 1
make: *** [clean] Error 2
cp: cannot stat ‘./mediatek/build/tools/ptgen/MT6589/*.img’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/DSP_BL’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/*.img’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/*.bin’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/*.txt’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/EBR1’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/EBR2’: No such file or directory
cp: cannot stat ‘out/target/product/gionee89_cu_jb/MBR’: No such file or directory
cp: cannot stat ‘mediatek/cgen/APDB*’: No such file or directory
[Miscellaneous Android Development] vizhigal:
I think you are using the makeMtk from build folder with ./makeMtk gionee89_b r.

This throws lot of errors because it starts building from preloader , alternatively try ./makeMtk gionee89_b r.kernel .

I am using IQ451 makeMtk file for compiling. with ./makeMtk gionee89_b r.kernel .

You can try this cd to kernel/arm then the below commands.

export PATH=/usr/local/prebuilts/arm-linux-androideabi-gcc/bin:$PATH

TARGET_PRODUCT=gionee89_cu_jb MTK_ROOT_CUSTOM=../mediatek/custom/ make

export Path= is your tool chain path.
[Miscellaneous Android Development] vizhigal:
D1 kernel compiling from IQ444Q sources -AN analysis

The kernel was extracted from D1 boot.img decompressed and all the text strings are extracted for analysis.

Below is the strings taken for analysis from the kernel. These strings are representing sensors.

LIS3DH

LTR502

dummycamcal

dummyeeprom

MPU3000

kdcamerahw

kdcamerahwbus2

FM50AF

akm8963

mms144

isa1200

fan5405

The inference from the above is below

accelerometer=lis3dh

alsps=gn_liteon_ltr502

eeprom=dummy_eeprom

gyroscope=gn_invensense_mpu3000

kd_camera_hw

kd_camera_hw_bus2

image_sensor=OV8830_MIPI_raw , ov9726_mipi_raw

Lens=FM50AF

magnetometer=akm8963

touchpanel=gn_melfas_mms144

vibrator=gn_isa1200

POWER=fan5405

The kernel compiled from the IQ444Q sources using ProjectConfig.mk was de compressed and text strings were extracted for analysis.

The details of built kernel is below

BMA250

cm36283

dummy

cam

cal

dummy

eeprom

camera

camera

bus2

OV8825AF

bmm050

gt9xx

fan5405

The inference of the above strings is below

accelerometer=BMA250

alsps=cm36283

dummycamcal

eeprom=dummyeeprom

cameracamerabus2

image_sensor= OV8825_MIPI_raw,s5k8aayxmipiyuv

Lens=OV8825AF

magnetometer=bmm050

touchpanel=gt9xx

POWER=fan5405

From the above it is clear the kernel biult from the sources is different from the D1 .

More than the above the sensor details collected using phoneinfo.apk is showing a different story.

SENSORS

BMA050 3-axis Accelerometer

Vendor: Bosch

cm36283 Proximity Sensor

Vendor: Capella

cm36283 Light Sensor

Vendor: Capella

MPU3050c gyroscope Sensor

Vendor: Invensensor

BMM050 Orientation sensor

Vendor: Bosch

BMM050 3-axis Magnetic Field sensor

Vendor: Bosch

Rotation Vector Sensor

Vendor: Google Inc.

Gravity Sensor

Vendor: Google Inc.

Linear Acceleration Sensor

Vendor: Google Inc.

Which one to believe , ?
[Miscellaneous Android Development] debasish497:
The phoneinfo.apk matches with the IQ444q kernel right?
[Miscellaneous Android Development] vizhigal:
How apk gets the information's from the phone that's need to be known.

But I go by what the kernel says because iq444q software / boot img extracted from the phone also matches with the D1 details.

Most of the drivers are from the mt6577 .

I think D1 clone gn878 was first released on mt6577 platform .

But only two image sensor drivers could not be found in any source.
[Miscellaneous Android Development] debasish497:
d1 was released on mt6577 dual core platform.. but with higher clock rate 1.2 ghz. Only the cpu was replaced so gn878 has common soc except cpu and ram with mtk6577 socs. But its different than the other mt6589 socs which were released later in 2013.

Some sort of engineering mode is involved. In that way the apk is getting the info.
[Miscellaneous Android Development] RickyGoldsmith:
Thanks for the info. I did not want to mix up files from different archives. I instead trimmed down the current makeMtk and was trying assistance from you guys for the missing pieces I saw.
[Miscellaneous Android Development] RickyGoldsmith:
I would go with the one that was shipped with the D1 ROM. There'll always be variation based on what the brands request, based on cost and other factors. I believe [MENTION=5277821]debasish497[/MENTION] also confirmed that newer revisions of the D1 device have a different board.
[Miscellaneous Android Development] RickyGoldsmith:
Given that the phone family is the same, has anyone else elsewhere been able to successfully build and boot the kernel?
[Miscellaneous Android Development] debasish497:
Exactly, the same has been problem for Gionee also... as in all the markets itself there are 3 version of gn878... with different boards altogether.

Its problematic for them too to provide a single 4.2 update. However they could have done it micromax way.

In India I assume there is only one variant, however someone reported that our MIUI V3 was not bootable in someones D1(or walton X1) which again raises the question
[Miscellaneous Android Development] vizhigal:
The two image sensor files mentioned in the D1 boot.img kernel details is not available in any of the source files without that specific files if we compile the camera may malfunction as those were camera drivers I suppose ..
[Miscellaneous Android Development] vizhigal:
alps\mediatek\custom\gionee89_cu_jb\hal\sensors\sensor\hwmsen_custom.h

The hwmsen_custom.h define the below information ,

#ifdef CUSTOM_KERNEL_ACCELEROMETER

#define ACCELEROMETER	"BMA050 3-axis Accelerometer"

#define ACCELEROMETER_VENDER	"Bosch"

#ifdef CUSTOM_KERNEL_ALSPS

#define PROXIMITY	"cm36283 Proximity Sensor"

#define PROXIMITY_VENDER	"Capella"

#define LIGHT	"cm36283 Light Sensor"

#define LIGHT_VENDER	"Capella"

This information is a common in the source files compared irrespective of the actual chip names of the phone.The system info.apk reads this information,

Hence if we try to build a kernel then the drivers should be as below with the suitable changes in the ProjectConfig.mk

accelerometer=gn_st_lis3dh

alsps=gn_liteon_ltr502

gyroscope=gn_invensense_mpu3000

image_sensor=OV8830_MIPI_raw , ov9726_mipi_raw

Lens=FM50AF

magnetometer=akm8963

touchpanel=gn_melfas_mms144

vibrator=gn_isa1200

POWER=fan5405
[Miscellaneous Android Development] RickyGoldsmith:
Thanks for putting the hard work. Appreciate it.
[Miscellaneous Android Development] debasish497:
[MENTION=3082969]vizhigal[/MENTION] any reason why did you take the 4.1.2 while compiling?
[Miscellaneous Android Development] RickyGoldsmith:
If the kernel build is incomplete, maybe we could also explore other avenues. How about exploring the possibility to run the current GiONEE kernel on a 4.2 ROM ?
[Miscellaneous Android Development] debasish497:
is that possible?
[Miscellaneous Android Development] RickyGoldsmith:
IIRC, I read it on the Android developers mailing list that it is possible. I haven't myself explored much though
[Miscellaneous Android Development] debasish497:
That would be great.

http://xdaforums.com/showthread.php?t=2200349
[Miscellaneous Android Development] deepak2111:
I think there isn't any MTK complete source.

look at here

varun.chitre tried to compile.