yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] RickyGoldsmith:
The DRM story....

Just finished dinner, so some time to write now. :cyclops:

XDA is flooded with a lot of MIUI porting guides, mostly with the same repetitive content, just slightly paraphrased. That makes the real problem inherited in all guides.

If you've followed the guides, you'll notice the following steps:

* Delete system/app/

* Delete system/framework/

.... etc...

What they don't emphasize is that certain components in /system/framework have dependency on /system/lib/.

Well!!! They actually do. But in a different manner. Most guides asks you to pick your base ROM which should beas close as, or almost identical to, the port ROM or vice versa. Unfortunately, that doesn't apply to us, the poor souls that own MediaTek SoC based devices, because we don't yet have a CM port.

I wish they simply clarified that the components depend on each other.

MediaTek is the common SoC provider for the many recently launched handsets from multiple brands. But every brand, to build its uniqueness, has a slight variation in its offering. I'm not sure if they customize themselves or just simply ask MediaTek for the customization.

So when you do the port, you need to be vigilant and ensure that you pick up not just the framework, but also its dependent libraries in /system/lib/. That's it.

I saw the problem creep on my device today, because I was fiddling with the frameworks in trying something different for the GPS / Location problem. Sorry for the noise....
[Miscellaneous Android Development] MayhemVC:
I'll try flashing this to my HX-9299A (HDC One).

How far off an 'everyday use' version would you say this is?
[Miscellaneous Android Development] debasish497:
Is HX-9299A same as gn878(Dream D1)?
[Miscellaneous Android Development] babamanan:
I don't think this ROM will help u for HX-9299A
[Miscellaneous Android Development] MayhemVC:
Correct!

Reflash required! :)
[Miscellaneous Android Development] debasish497:
This is the pain with MT6589* type SOCs. For a starter like me, I would have been more happy to be getting hands on PORTING with modifications in the stock ROM(aka [MENTION=2674277]somberi[/MENTION]). Qualcomm based SOCs are having better userbase/and Mods around since its here for a longer time, so its easier to pick similar - base/port ROMS. I have ported CM9 less painfully to my Xperia Mini Pro yesterday(Qualcomm snapdragon s1). I have just followed the CM9 Porting from the website. Then I tried to port Lewa Os to that CM9 build for Xperia mini. It booted and the screen came up without any diehard modifications. Of course there are few niggles here and there, but it worked on the first try. Unfortunately when I am trying with Base ROM of Gionee(deodexed from [MENTION=2674277]somberi[/MENTION]) and Lewa OS for lenovo A820 from *needrom* (both having similar conf.) I am without luck.

As far as the logcat shows, its a problem in the framework related stuff. Lets debug and see.

(My Xperia mini pro has a broken screen, and the battery is having problems. As I cannot always fiddle with the Dream D1 as it is my only *working* mobile, I took the former as a Guinea Pig to learn about the patching in framework,systemUI stuffs)
[Miscellaneous Android Development] debasish497:
[MENTION=3094817]RickyGoldsmith[/MENTION] from which site did you get the port ROM for MIUI V5, can you share the link?
[Miscellaneous Android Development] RickyGoldsmith:
Same place, needrom.
[Miscellaneous Android Development] debasish497:
No Noise in this thread guys since 2 days, My Dream D1 has gone for service for the second time, Tried to install TWRP , but bricked. :(

Initially was sceptical, but the guys at the service were lot less suspecting... :)

So far the best Service centre in Kolkata if anybody Bricks the phone::crying:

Mobi Soft Telelink Mintu Roy, 3A, 1st Floor, Madan Street, LIC Building, Kolkata, West Bengal - 700072

09433169568/9831159128/ 033-30207379

Email: mray9433169568@yahoo.com
[Miscellaneous Android Development] RickyGoldsmith:
Since you are trying to port TWRP, maybe I should share my experience.

Point 1: You'll need to increase the recovery size to 7 MiB. I tried doing it multiple times but ran into trouble. I think the trouble was mostly because there's no full ROM released for Dream D1. And the howto to change the capacity expects you to have the full ROM. Now some might say that the X11 Walton Firmware is there. Well. I have no data point to prove but using that did NOT help.

Point 2: I was able to flash the TWRP recovery image. But the screen remained black. Now what was the cause is somethign hard to determine because of Point 1. I did get to trim the image to fit in the 6.5 MiB partition size on the Dream D1. But still didn't work. My guess is it has to do with the kernel drivers.

And I'm sorry to hear that your device bricked.
[Miscellaneous Android Development] debasish497:
Today I might get my device back. I wouldn't try TWRP till I am with a full ROM for D1.

In the meantime, I was going through different sites(after GN858 showed up in NeedRom http://www.needrom.com/mobile/gionee-gn858-2/) to get hold of ROM building for GN878.

Astonishingly we can find GN858,GN868,GN708W,GN700 ROMs in various Chinese/Russian forums but no sign of GN878 anywhere. The GN708W is our own XOLO Q800 ,GN700 is GPAD G1.

All the above devices have custom brewed ROMS which are working fine as far as the links in XDA shows.

Does Dream D1 is an neglected device from GiONEE?
[Miscellaneous Android Development] lontu:
The full ROM for Dream D1 is available. Visit "Dream D1 Development" group in Facebook to get the download link.
[Miscellaneous Android Development] deepak2111:
1. I have also port TWRP recovery with 6.3 MB in size. It is more than standard recovery partition size 6.0 MB.

2. Recovry flashed with partition modified. I can boot mobile, but not in TWRP recovery.

3. Ported and posted updated CWM Recovery-6.0.3.0

http://xdaforums.com/showthread.php?p=43039475#post43039475
[Miscellaneous Android Development] debasish497:
There are 2 such shares there..1. Walton ROM 2. D1 Firmwares
[Miscellaneous Android Development] RickyGoldsmith:
That's Walton, not Dream D1. But hey, you'll reply back "both are the same" :fingers-crossed:
[Miscellaneous Android Development] debasish497:
Got my device back ;)

Sent from my Dream_D1
[Miscellaneous Android Development] deepak2111:
Congo...

Good thing... you have factory flashed ROM....

Use MTKDROID TOOL and try to extract flash tool compatible ROM.

In that u can find system image also.

Can it helpful us?:o
[Miscellaneous Android Development] debasish497:
Sorry mate, didn't read your post. I have already rooted and installed CWM and MIUI.

Meanwhile this link is useful

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

Thanks [MENTION=5056402]Theawesomeguy4[/MENTION]
[Miscellaneous Android Development] lontu:
Links available to download firmware for Dream D1 are as follows :
[Miscellaneous Android Development] RickyGoldsmith:
I am currently trying to do patchrom. If anyone wants, please collaborate
[Miscellaneous Android Development] debasish497:
I am in buddy, ask what help reqd.

Sent from my Dream_D1
[Miscellaneous Android Development] RickyGoldsmith:
You need to checkout the repo from https://github.com/MiCode/patchrom. Make sure you checkout the jellybean branch. Then create a device folder for gn878.

Since we do have stock rom, you'll have to create a stockrom.zip for miui to patch and build on top of it. The details are on the MiCode page on how to do it.

Edit: Since our stock rom doesn't have framework2.jar, we need to fool the build. After the stockrom.zip is created simply rename secondary-framework.jar to framework2.jar.

The big challenge is in getting the right delta for the smali rejects and then build.

The checkout itself will be time consuming as it is a huge repo. Have you done this before????
[Miscellaneous Android Development] debasish497:
Nope, but can try

Sent from my Dream_D1
[Miscellaneous Android Development] RickyGoldsmith:
No probs. It ain't that difficult. The build infrastructure adaptation is something I can help with. The biggest challenge is in adapting the rejected smali files.
[Miscellaneous Android Development] debasish497:
I have android SDK, but in windows. Can I do the required process in windows?

Sent from my Dream_D1
[Miscellaneous Android Development] Alex93917:
I've the same list when I try Patchrom and apply : make firstpatch ...

We just need help from MIUI T_T
[Miscellaneous Android Development] RickyGoldsmith:
I would highly recommend a Linux environment. The build is based out of shell and python scripts. It'd make more sense to have Linux. And I'm pretty good at Linux :D So I can provide you all the help there.
[Miscellaneous Android Development] RickyGoldsmith:
Hey Buddy!!! Nice to see you here. :cowboy:

Absolutely. I had hoped that signing up for MIUI Dev Program would include some assistance from MIUI. But anyways, I guess we still can all collaborate together to nail this out.
[Miscellaneous Android Development] Alex93917:
Yeah ... Friday, I didn't know how to use Ubuntu, now I know ... PatchRom didn't work with sdk and java, and now it works.

Then, We just need to learn how to use it, but with Xiaomi's help it would be better ... =)
[Miscellaneous Android Development] debasish497:
I have asked help from the facebook Group D1 development regarding this. Hope help will come in swarm. I am also a linux guy, but I am having ARCH based linux, installing android sdk is a painful thing there,..:)

I am installing ubuntu in a different laptop,.. when I'm in I'm in
[Miscellaneous Android Development] RickyGoldsmith:
Like I was saying earlier, and also in the other forum, comparing the files is the dirties part. Have a look at the attachment.
[Miscellaneous Android Development] RickyGoldsmith:
Oh!! And I completely forgot to add details about this important step.

When you use ota_target_from_phone, it will phuck up while extracting boot.img because it doesn't understand the MTK boot image format.

So, I worked it around by replacing the dump_bootimage() with the following. It is pretty self-explanatory...

# In recovery mode, dump the boot image from device
function dump_bootimage {
echo "Dump bootimage from device"
if [ -f dumpimage.sh ];then
./dumpimage.sh $TARGET_FILES_DIR/BOOTABLE_IMAGES
else

# In case of MTK, doing an adb pull of /dev/bootimg will lead to Gigs of junk
echo "Please copy your boot.img to $TARGET_FILES_DIR/BOOTABLE_IMAGES/boot.img\n"
echo "Once copied, press enter to continue\n"
read
return;
echo "If you are on MTK and reading this, you are ****ed\n"
read

local info=`adb shell cat /etc/recovery.fstab | grep boot | sed -e "s/\s\+/:/g"`
local fstype=`echo $info | cut -d":" -f2`

if [ "$fstype" == "mtd" ]; then
mtdn=`adb shell cat /proc/mtd | grep boot | cut -f1 -d":"`
device=/dev/$fstype/$mtdn
else
device=`echo $info | cut -d":" -f3`
fi
adb pull $device $TARGET_FILES_DIR/BOOTABLE_IMAGES/boot.img
fi
}
[Miscellaneous Android Development] debasish497:
cunning code buddy,...
[Miscellaneous Android Development] Ganesh Kumar:
how to connect this mobile to LED tv which has hdmi input, please advice...sorry to post hear but I m using this rom in my mobile.
[Miscellaneous Android Development] DreamD1:
Not possible, We don't have the HDMI port in our mobile.
[Miscellaneous Android Development] debasish497:
Is there any app or something? To convert USB to hdmi

Sent from my Dream_D1
[Miscellaneous Android Development] Ganesh Kumar:
Is there any converter which can convert signals of phone mini USB to HDMI output, also suggest any app is available?

MIUI Rom software supports airplay which can be connectable to Xioami MI box, but is there any root to connect mobile to HD TV?
[Miscellaneous Android Development] RickyGoldsmith:
I don't see much a use case to station a mobile using HDMI. If I was you, I would rather do it over DLNA.
[Miscellaneous Android Development] RickyGoldsmith:
Did you get any chance to look into patchrom?
[Miscellaneous Android Development] debasish497:
Ya, completed all setup in Linux, will see tonight. Anyways any breakthrough?

Sent from my Dream_D1
[Miscellaneous Android Development] RickyGoldsmith:
I'm just frustrated with the whole patchrom thing. The smali diff is just one part of the problem. The deeper I dig, I think the build on the jellybean is completely broken. But then, others have claimed to have had a successful build out there.

If you want, you can check my post there. I have posted some build related stuff on top of Meredith's howto.
[Miscellaneous Android Development] RickyGoldsmith:
With this kind of dumb work, and the frustration it builds, I guess I'll just either throw away the device, or just revert back to the stock rom. :(:(:(:(:(

Or maybe just live with porting the Lenovo ROM. :(:(:( It has just been a sheer waste of my time and energy.
[Miscellaneous Android Development] debasish497:
Don't be disheartened mate, I had my share of frustration while porting Lewa Os. I have seen mods successfully porting lewa in A116 but in gn878, I lost all hope. May be I am quite naïve, or might be I am doing it wrong... Anyways its frustrating.

Sent from my Dream_D1

---------- Post added at 11:25 PM ---------- Previous post was at 11:23 PM ----------

How far did you went? Aren't the mods who have previous work exp coming handy?

Sent from my Dream_D1
[Miscellaneous Android Development] RickyGoldsmith:
The ones who have been successful are the ones with a device with a CM base. MIUI is based out of CM, so any device which has a CM base is easy to work on.

But that aside, the whole MIUI porting thing is not of use. Working with source enhances your skill. You learn new things and feel happy about it. I am part of a linux distribution and I see the value there, committing my time to the OS. But on patchrom, even assuming I get a build completed, I ain't learning anything.

And when I look at their build framework for jb, I think it is half done. Their support seems to be for the ics branch, but someone has to confirm that. I don't see many devices in the jb branch. From what I've seen so far, the jb branch's build is broken. Maybe you could confirm that.

What I'm hating the most is that I'm getting frustrated, the more I work on patchrom. And in this last one week, all it has made me do is WHINE.
[Miscellaneous Android Development] RickyGoldsmith:
And for the sake of building, I did get the build to complete. http://en.miui.com/forum.php?mod=viewthread&tid=4569&page=2#pid90150

But I'm no happy about this crap.
[Miscellaneous Android Development] superdragonpt:
The PatchRoom for the v5 is not completed.

Better wait an little bit more,or wait for another dev that have more experience building MIUI.

Why dont you try the v4? i know it's not an up-to-date MIUI, but it's still an very beutifull rom and UI

BottonLine your not gona have an 100% MIUI, as some apps, wont work on non-original firmwares.

Good Luck (And dont quit).:angel:
[Miscellaneous Android Development] RickyGoldsmith:
The stockrom that we have is 4.1.2. Wouldn't that be incompatible with MIUI v4
[Miscellaneous Android Development] Ganesh Kumar:
Any progress on 4.2 version rom, :rolleyes::rolleyes:

but so many rom is available in needrom.com for Gionee other model phone but this model no one developed except this forum people.:good::good::good:
[Miscellaneous Android Development] DreamD1:
The main reason may be Gionee has not released this phone in large scale in China.:confused:
[Miscellaneous Android Development] debasish497:
http://xdaforums.com/showthread.php?t=2254543

Its very unfortunate, thanks [MENTION=2674277]somberi[/MENTION] for the CWM. GiONEE is a good mobile to boast, amoled display, fast, good signal reception etc etc. but certainly not a developer friendly device. I do not agree that mediatek based SOCs are to be blamed for this fallout, as we have some fantastic ROMs out there for MMX A116HD, even the Q800(which is GN708W) has some outstanding Lewa OS/MIUI V5 ROMs.

GiONEE certainly has used something in the SOC which prevents the 4.2.1 upgradation, there are no threads for this device in various forums in Russia/China/Nigeria/India/Ukraine where GN878 has been released. In Russia and China GN878 was released with mt6577 based SOC and then was re-released with MT6589. For some reason this mobile was withdrawn soon from Market, hence there are no ROMs in the market/Chinese forums.

http://to2c.com/blog/all-mtk6577-phones-list/
[Miscellaneous Android Development] debasish497:
RickyGoldsmith[/MENTION], any progress on gn878 or you have left that altogether?....

Mate can you help us for one last time to Port Lewa OS in this phone? I have heard that there is some tool to port.

http://xdaforums.com/showthread.php?t=2123239[MENTION=3094817]
[Miscellaneous Android Development] RickyGoldsmith:
I did put it online for sale. But apparently selling online also is a pain. Even at 2/3rd the price, people keep negotiating... So I'm not selling it until I find someone to give it to. :laugh::laugh::laugh::laugh:

And I still have one killer feature in it which will keep me motivated to use it. :good::good::good:

That said, since we know the MediaTek story, see here, I'll not be spending too much time hacking on it.

I'd rather rely on the ROMs ported by the Chinese developers of MIUI and Lewa. So that brings to Lewa. Given that GiONEE only released the kernel for 4.1.2, to the best of my knowledge, the only ROMs that can be ported to this device are the ones based off Jellybean. I did try 4.2.1 and the number of bugs were way too much. It did boot but hal kept crashing.

Has Lewa released a fresh 4.1.2 rom?
[Miscellaneous Android Development] RickyGoldsmith:
And regarding the link you've provided, I've used those. But I don't find them meaningful. Perhaps these kitchen tools are good for the rom kiddies. I generally pick the rom, and nail it down layer by layer.
[Miscellaneous Android Development] RickyGoldsmith:
By the way, Sony is releasing Xperia C series. This is a Mediatek SoC device exactly like what we have. It'd be interesting to see if Sony releases all the source code.
[Miscellaneous Android Development] debasish497:
The one from micromax a110 lewa. Its a build older but still good. But again its a dual core mtk6577.

---------- Post added at 09:39 AM ---------- Previous post was at 09:37 AM ----------

That's a distant ray of hope. Although I am not too sure whether mediatek will allow Sony to do it.
[Miscellaneous Android Development] RickyGoldsmith:
No. We need the build ROM from mt6589
[Miscellaneous Android Development] debasish497:
this is a very tricky situation,... lewa Roms are available for 4.2 JB and mtk6589 devices, 4.1 JB and mtk6577 devices. But we have a mtk6589 and JB 4.1 device.
[Miscellaneous Android Development] RickyGoldsmith:
Maybe you can help me here!!!

Can you explore if the kernel sources for the 4.2 ROM is available. If yes, can you try to build and test it out?

Otherwise, we need to do a trial and error. Perhaps, pick kernels from every MTK6589 device, and flash it on D1. If any works from the Lewa ports, then we can use that kernel.

Why I ask this?

Because I tried 4.2.1 with the default kernel 3.4.5 and there were many issues with hal
[Miscellaneous Android Development] deepak2111:
someone posted on Gionee E3 thread

"Go to that website.enter in Gionee section then go to gn708w rom.it is dream d1 "

check link

http://www.mobile-phones.cn/gionee-gn708w-mtk6589-quad-core-inch-smart-phone-p-12615.html

http://www.gizchina.com/2013/02/08/gionee-gn708w-is-an-expensive-quad-core-mt6859-phone/

http://gizbeat.com/1690/mtk6589-gionee-gn708w/

it look like dream d1 rather modified dream d1.

differ in

removable battery

screan type and resolution

not able to do full check up.
[Miscellaneous Android Development] debasish497:
No gn708W and gn878 are not the same device and our facebook friend Sudip Kumar Datta soft Bricked his device while trying to test the compatibility.
[Miscellaneous Android Development] deepak2111:
exactly...........it is not same device.....................

but.. see the specs...

---------- Post added at 11:44 AM ---------- Previous post was at 11:35 AM ----------

How can I help you?

BTW i have changed rcovery partition size....but again fail to boot in twrp recovery....

unpacked the image but i have not enough knowlegde......
[Miscellaneous Android Development] RickyGoldsmith:
Yes. the specs look close but that hasn't helped. The 878 was launched in China as a dual-core Cotrex A9 proc device. Then later, it was revised as a quad-core Cortex A7 device world wide.

What I badly want now is a kernel that is shippied with an Android 4.2.x ROM, that could boot on our device. If you want to try, you'll have to pick the kernel and also /system/lib/modules/ and maybe other dependent components (pvr etc). If it can boot, then we can use that kernel to port onto a huge myriad of Android 4.2 ROMs currently available.

Do any of you have insight into /system/vendor/bin/pvrsvrctl ??

I am new to this item. But it has a dependency and linkage with the device's gpu. When you try to test the kernel, you might want to ensure you have the correct pvr components too. I believe they are tightly tied to the kernels.

Regarding the partition resize, I had tried that earlier. But unfortunately, the resize was not very successful from what I can recollect. Part of the problem is the process of resizing. It expects your scatter map and the full rom, which we earlier didn't have for dream d1. I believe sudeep on FB has posted it. But I haven't re-tried that. What we'll need is to pick his rom backup, and use its scatter map, and then retry the TWRP steps. It was straight forward, so it should work. The partition resizing.

If that fails, then what we are left with is to read up on MTD device handling in the linux kernel.

Regarding TWRP, I'm not sure. From what I read about TWRP, and given the features it provides, you do need the kernel and its drivers for the vga, ready. Also the pvr compoinent, I guess. Now what we have is a phucked up kernel, which I'm not sure even has the exact sources released. The graphics chip comes from Imagination Inc. And I'm not sure how open they are. They are the chip on the Samsung Galaxy Nexus too, so my guess is they are pretty open. Not like MediaTek.

Last I was checking the MediaTek sources (for mtk6577), it was funny to see MTK relicense Imagination's MIT based source code.
[Miscellaneous Android Development] debasish497:
Is any body trying with the kernels?..

no luck with Gionee Phones ..

1) gn708w-------- no boot.

2) a116 mmx --- no boot.

3) AMOI N828 -- booting but not beyond that.

4) A820 -- booting but not beyond that..

(all ROM CWM zips courtesy needrom)

I want collaboration in this thing as I cannot download more than 5GB per month.
[Miscellaneous Android Development] deepak2111:
Can you explain how do you do? So I can shorten my learning curve...please.I do have some basic Linux, UNIX knowledge.

There are two ROM ..base(ours) and others...from which part...which file should we use..please...
[Miscellaneous Android Development] debasish497:
Boot.img

This Process can softbrick your phone though but I have flashtool and Gionee firmware files from Walton Primo X1 ready to unbrick my phone.

just find

1) how to unbrick from XDA.there are tutorials here in this forum.

2) setup adb and check whether you can get the logcat. have a basic knowledge to change the build.prop if necessary.

3) try porting 4.2* ROMS from needrom which has similar configuration same as gn878, eg Lenovo A820, a little googling will help.

4) lots of time, as the downloading and reading these tutorials and trying consume lots of time.
[Miscellaneous Android Development] Ganesh Kumar:
I can able to download all roms available in needrom.com but as you sugest I checked XDA forum to unbrick but so many tutorials are available then also no clarity on which procedure to follow, please give links so that we get this perticular mobile knowledge and we will try to port all available roms, also suggest other phone models which we require to download from needrom, its like you are teacher an we are doing the process :highfive::highfive::highfive: