Development Status / Support?

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
I'm trying to disect https://github.com/vampirefo/android_vendor_blu_p6601/tree/master/proprietary and figure out exactly how the Lineage rom was built using this device tree. There is just one commit on there 'first commit' and it doesn't tell me any meaning to why any of that is actually there and why it is being overlayed instead of being compiled with the actual lineage sources. This is most likely the biggest part of the problem. I'm wondering at this point if the Wiko U Feel device has a working 7.x rom if it wouldn't be easier to just do a quick port, as the device is identical as mentioned above. The region of the device being set in software is the only difference. It would be a lot easier to start off by disecting the working wiko u feel update.zip making the appropriate changes to the build.prop and flashing it to the p6601/r1hd. What I'm seeing the problem as mostly is that the lineage rom we have is built from source, yet its still using a device overlay or was built with an incorrect overlay perhaps. I'd like to see a github commit history on the actual device overlay from its original sources instead of the one supplied by vampirefo. I know these guys have done a great job, and not throwing off on their work at all, but some of this would be a lot easier to troubleshoot and get working if the commits were more detailed OR if we had the actual device/vendor overlay from BLU. Of all the git sources I see for this device, none of them are actually documented. If Blu provided android_vendor_blu_p6601 as a .zip to someone this would explain.
It doesn't happen a lot that we get actual commits from the vendors, but I'd really like to see the commit history of the xda-developers at least on the roms that worked VS the ones that didn't.

This probably don't even make sense to most people, its really hard to explain these things in words. But that device overlay if it was during build as it is on the site makes complete sense why the camera is broken. Everything in the proprietary directory is basically overwriting the lineage equivalents that are located in /system/* So after the lineage rom is built, instead of using the files that everything else was built against, its using those in the overlay (and there is a lot of them) This would all SCREAM to me that there is ABI mismatch.

I've noticed that the only apk in the overlay is the Camera.apk but there is a plethora of libs and binary files that I wouldn't think needs to be in an overlay.

It would really help to know how this vendor/device overlay got implemented during the build of Lineage. Did this originate from Blu or was it from another device and modified to work with the R1HD? That information isn't available with the sources I have seen so far.

All that said, if this was official Blu overlay that I'm looking at (by vampirefo) then if Lineage was built with this overlay being used, and its what Blu used in 6.x everything should work. But its a bit odd that the only thing not working is the Camera, yet the only apk in that large list of files in the overlay just happens to be Camera.apk.

I really feel like I'm talking in circles though so I am going to have to obtain the untouched p6601 device overlay from Blu if someone can't show me the link to the official p6601 device overlay. At that point I'll have to completely rebuild lineage and start testing my own work. It's very very difficult to troubleshoot someone elses work with little documentation to go on (or possibly I'm looking in the wrong location).

Sorry if tldr guys and don't mean to confuse anyone.

**Edit: Can someone supply the md5sum of any or all of the /system/app/Camera*.apk in the lineage rom. I just went over mrmazak's logcat output again and think I found some relevant info in the components of the camera service relating to a few lines in the java code. I'd really like to think this is part of the problem. I'm starting to think that the proprietary vendor files that were compiled to work with 6.0 are getting copied during the build of the lineage rom and the camera is one thing that has changed enough to fail upon execution in 7.x while using the 6.0 app. Really we have about covered all our bases with permissions and libs (which it still relates to) but if the actual camera service wasn't compiled for 7.x it is making calls to the libs in which the routine has changed in some of the framework. Hopefully something as simple as switching out an apk or two is still along the lines of a fix.

You have to remember I don't have this 8 yr old laptop setup for cross-compiling ARM source code, I really don't want to have to set it up but its starting to look like I may have to in order to get this all working right. Screwing around with ports is not something I'd consider 'clean' and if I had developed this lineage rom personally I wouldn't have ported anything unless it was broken. What I can gather of this lineage rom we are trying to fix is that it isn't a full blown port and isn't full blown rom, seems to be what could be called a hybrid.

If it gets to the point where I indeed have to build a ROM I'm wondering if I wouldn't rather just use AOSP instead of lineage or I suppose I could do both if it does come to that.
 
Last edited:

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
**Only read the following if you truly are seeking a Nougat Rom and you appreciate any efforts made by all previous and current developers trying to dedicate their time toward making this device's firmware more up to date and more feature rich***

If you are really setting around waiting for a fix or wanting to ensure further work please consider a donation to help with my time. I don't want to seem like I'm begging for a donation, however I don't really want to invest much more time into resolving this camera issue to get nougat working because personally I'm perfectly fine with Marshmallow I can't contribute my entire day every day for the next few days just to get 7.x working on the r1hd.

Its not about trying to make history or trying to be popular on xda - I have 5 childeren plus my ol lady and myself that I have to feed and instead of working on roms I could be doing something else productive to feed my family Hope thats understandable to you guys and hope its not taken the wrong way.

I've seen a lot of immature responses particularly in this device's threads and I truly feel like the reason the original devs discontinued their work was 100% to do with the maturity level of the community in which they were voluntarily working hard to help and provide a better device for. A lot of people on here don't understand how much effort and time is involved while developing Android roms/kernels, and then when a dev does get stuck on something people want to get smart and then criticize the devs best efforts. It is enough negativity that I'd label all my work as *discontinued* as well!!
 

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
I believe some of the overlay might have come from olegsvs

Not sure which repo. "Common" or "6735m"
Or both or other. But from his git he is having camera trouble on every version of cm13/ cm14

https://github.com/olegsvs?tab=repositories
If what you are saying is correct then that would be our common denominator and would be the entire cause. The way to correct this issue would go back and remove every single file that isn't a lib or in lib/hw from the overlay which is broken and replace them with straight aosp/lineage files from another mtk device that is stable running lineage 14.x. I've been busy today working on a diff project, so when I get the time to try to sort all this out myself I'll try to put something together. I wish I had an extra R1HD to test with so I wouldn't have to mess with my acess point to the internet (my r1hd).. Anyway I'm pretty confident aside from the perms and the few lines missing in the init files that the vendor overlays are what is causing this issue. It is what provides the camera.apk pkg for the camera service, which is probably the 'core' component causing the entire issue.

ls -l /system/app/camera*.apk or ls -l /system/Camera*.apk is there only one file or more than one? If you can find another 32bit lineage rom for another device (64bit roms aren't as common as people think either, not as common as 64bit kernels anyway) we can steal some files from it to try this nasty fix. Or we can scratch it all and start over and hope we don't get a working camera and broken other things haha..
 

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
a bit OT but this was my thread so heck with it.. What is everyones fantasy about the 64bit thing? Does people not realize that there is no advantage to having 64bit OS/Kernel unless you utilize more than 4GB of memory? I have no idea what people think the big deal is with having a 32bit device.. Performance wise you lose nothing. The only downfall to any of it is when you try to do a 'port' and you want to use things compiled only for 64bit. Well I'll just tell you, this Porting business is the most unclean thing you can do when trying to publish a Rom. It is not made for your device to begin with, its mixing and matching files in hopes of getting things to work. And even then you are left with bugs. I am in no way going to start porting Roms for this device. If I could just find one single git tree that has the original vendor and device overlays, I Will just build AOSP 7.x (latest stable) and use the right kernel sources as well. There is absolutely no sense in trying to take a broken port and spending countless days on trying to patch something to work for a device it was specifically not meant to work with. The MTK chipset is just one thing, the actual attached hardware, nand patition scheme to actual nand size, the camera hardware, wifi firmware, etc usually aren't all the same on these mimic devices. If we had the correct device tree, correct kernel sources, and correct vendor overlay (which by law BLU is suppose to provide all the above that is GPL'd) Then all we'd have to do is sync with the AOSP git, set the device, plug in the overlays in the configs. Build, install, and go from there. Most likely everything will work in this manner. But like I said I have limited resources on this laptop, and it would take me at least 2 days just for the compile to finish, thats if the thing don't overheat while compiling. In the meantime I'd not be able to do anything that required any amount of CPU/Ram while doing the compile of Android. Now if I had a nice top of the line CPU with 16 or 32GB ram and a decently fast HDD, I might could compile Android AOSP overnight for our tablet. I just can't with what I have, and it only seems to be interesting 2 or 3 people anyway. I'm not making anything at all for putting all the time and effort into getting Nougat running on the R1HD, If I was it would be a different story, but as mentioned before I have no problem with the 6.0 Rom we have once its heavily modified manually. Not like 7.x has any features I just must have.. Being a long term Linux Admin and Power user I can say that people that always must stay on the latest OS hand think its the coolest thiing they remind me an awful lot of Ubuntu users or Arch Linux users. They end up with more broken than they would if they had just went with a good OS to begin with such as Slackware ;) Just my two cents!!
 

EZJohnson

Member
Nov 20, 2016
8
1
3
iirc i think everyone was having difficulties just getting the 32 bit roms they built to boot. 64 bit is just as you say a result of porting from another device.

I don't think i can help with the tree/source/overlay but i can get you access to a fast server to do builds on if that would help.

I think there's more than 2 or 3 interested but not many people have experience in building and debugging android.
 
  • Like
Reactions: linuxsociety

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
https://forum.xda-developers.com/android/development/nougat-unofficial-t3567653

This looks like what we really need to migrate to our device if any other device out there is near identical this one is. With our boot.img in place of the boot.img in that .zip (or removing the section to flash the kernel altogether is an option also) We should be able to test this ROM on our device, We'll simply need to modify the build.prop or simply replace it with the build.prop from the unofficial lineage Rom we have) That would be a start, if it boots with no wifi, sound, etc. Then its still a start as we won't have replaced any vendor specific files at this point. As many know though the Kernel is responsible for the hardware communication, and only proprietary drivers (none of which I have found for wifi/ cam etc) are needed when using this approach. The Lib files and SDK files for this device are noted to be working. With a little work to the updater-script this should flash and boot our device. With 100% luck we'd get the same results as they got (everything working except FP and Video Recording) Those definitely aren't show stoppers. But at this point I'm still making assumptions. I have it downloading now.. I am going to bust the zip apart and make comparisons to our working roms, and see what I can do. I'm not worry about bricking anything as in a failed flash I can just restore. I wont be flashing anything other than the System from that rom and testing. If anyone else wants to try their luck go ahead, just be sure you have a working rom to flash back OR a nand backup :)

Rom is 64bit, however their 64bit kernel has a good chance at booting our device, and if it does and we can obtain their sources, we may just be in business as we could use their kernel source and patch as needed for any hardware differences, and at that point their ROM would work with our device when we patch their kernel sources for our specific hardware (if any differs) I've not compared their kernel config to ours yet but will do soon. If we were lucky enough to use the same kconfig for hardware such as the Wifi and any other non-SoC hardware, then their Rom would just work (all except the updater-script checks that checks for the device compatibility pre-install --which can be easily removed) I noticed like 3 calls in the updater-script that checks some info on the /data partition. Didn't even see a check against the board/device. Removing those calls in the script and it Will flash, but we need to thoroughly go over it before anyone tries to flash it.
 
Last edited:

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
https://forum.xda-developers.com/android/development/nougat-unofficial-t3567653

This looks like what we really need to migrate to our device if any other device out there is near identical this one is. With our boot.img in place of the boot.img in that .zip (or removing the section to flash the kernel altogether is an option also) We should be able to test this ROM on our device, We'll simply need to modify the build.prop or simply replace it with the build.prop from the unofficial lineage Rom we have) That would be a start, if it boots with no wifi, sound, etc. Then its still a start as we won't have replaced any vendor specific files at this point. As many know though the Kernel is responsible for the hardware communication, and only proprietary drivers (none of which I have found for wifi/ cam etc) are needed when using this approach. The Lib files and SDK files for this device are noted to be working. With a little work to the updater-script this should flash and boot our device. With 100% luck we'd get the same results as they got (everything working except FP and Video Recording) Those definitely aren't show stoppers. But at this point I'm still making assumptions. I have it downloading now.. I am going to bust the zip apart and make comparisons to our working roms, and see what I can do. I'm not worry about bricking anything as in a failed flash I can just restore. I wont be flashing anything other than the System from that rom and testing. If anyone else wants to try their luck go ahead, just be sure you have a working rom to flash back OR a nand backup :)

Rom is 64bit, however their 64bit kernel has a good chance at booting our device, and if it does and we can obtain their sources, we may just be in business as we could use their kernel source and patch as needed for any hardware differences, and at that point their ROM would work with our device when we patch their kernel sources for our specific hardware (if any differs) I've not compared their kernel config to ours yet but will do soon. If we were lucky enough to use the same kconfig for hardware such as the Wifi and any other non-SoC hardware, then their Rom would just work (all except the updater-script checks that checks for the device compatibility pre-install --which can be easily removed) I noticed like 3 calls in the updater-script that checks some info on the /data partition. Didn't even see a check against the board/device. Removing those calls in the script and it Will flash, but we need to thoroughly go over it before anyone tries to flash it.
Scratch the kernel Idea, I ported the rom in the link above in hopes the kernel would at least boot to get some logcat info, little to my surprise it failed terribly.. Rom flashed ok but without 64bit kernel we can't use the userland. Definitely some weird issue after that flash, I couldn't even boot recovery until I fastboot flashed the original kernel back, then recovery would boot fine. Wasn't under the impression that the recovery.img depended on a working boot.img for the android side of things in order to boot. I have a feeling that there is some checks done pre-boot (both recovery / regular) that checks the kernel. I had the .zip fixed up about as perfect as it could get modified all the updater-script/binary made changes to /system where needed. I was hoping I got somewhere with this try. But it failed miserably :(
 

liviu_anc

Member
Sep 13, 2014
14
1
0
Scratch the kernel Idea, I ported the rom in the link above in hopes the kernel would at least boot to get some logcat info, little to my surprise it failed terribly.. Rom flashed ok but without 64bit kernel we can't use the userland. Definitely some weird issue after that flash, I couldn't even boot recovery until I fastboot flashed the original kernel back, then recovery would boot fine. Wasn't under the impression that the recovery.img depended on a working boot.img for the android side of things in order to boot. I have a feeling that there is some checks done pre-boot (both recovery / regular) that checks the kernel. I had the .zip fixed up about as perfect as it could get modified all the updater-script/binary made changes to /system where needed. I was hoping I got somewhere with this try. But it failed miserably :(
I tryed to modify the boot original boot IMG but when I writes I had the same issue like yours I think is something with the boot IMG probably is not converted correctly
 

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
I tryed to modify the boot original boot IMG but when I writes I had the same issue like yours I think is something with the boot IMG probably is not converted correctly
$ file ../r1hdworking/boot.img
../r1hdworking/boot.img: Android bootimg, kernel (0x40008000), ramdisk (0x44000000), page size: 2048, cmdline (bootopt=64S3,32N2,32N2)


$ file ./coolpad-test/boot.img
boot.img: Android bootimg, kernel (0x40080000), ramdisk (0x44000000), page size: 2048, cmdline (bootopt=64S3,32N2,64N2 androidboot.selinux=permissive buildvariant=userdebug)
 

vampirefo

Senior Member
Apr 3, 2010
3,241
1,631
243
**Only read the following if you truly are seeking a Nougat Rom and you appreciate any efforts made by all previous and current developers trying to dedicate their time toward making this device's firmware more up to date and more feature rich***

If you are really setting around waiting for a fix or wanting to ensure further work please consider a donation to help with my time. I don't want to seem like I'm begging for a donation, however I don't really want to invest much more time into resolving this camera issue to get nougat working because personally I'm perfectly fine with Marshmallow I can't contribute my entire day every day for the next few days just to get 7.x working on the r1hd.

Its not about trying to make history or trying to be popular on xda - I have 5 childeren plus my ol lady and myself that I have to feed and instead of working on roms I could be doing something else productive to feed my family Hope thats understandable to you guys and hope its not taken the wrong way.

I've seen a lot of immature responses particularly in this device's threads and I truly feel like the reason the original devs discontinued their work was 100% to do with the maturity level of the community in which they were voluntarily working hard to help and provide a better device for. A lot of people on here don't understand how much effort and time is involved while developing Android roms/kernels, and then when a dev does get stuck on something people want to get smart and then criticize the devs best efforts. It is enough negativity that I'd label all my work as *discontinued* as well!!
Interesting, so what value do you place on getting the camera fixed? $20, $40?

I am just curious, you asked for donations, which is fine, what is the goal amount for a ROM?

I think if you put an amount, it would be more realistic for donators, gives them a goal to achieve.

My wife wants a ROM for her R1HD, so I am debating with myself whether to buy a used R1HD from eBay and built a rom myself or just wait, like yourself if I build a rom I won't be giving it away.

I am simply weighing my choices.

1. I spend x amount of money buying a used phone that I really don't want, then spend my time making or porting a ROM, and trying to figure out the camera issue, my wife has to have a camera period.

2. I give you $5 and you do all the work, I simply download your ROM and install it on my wife's phone.

Sent from my Life Max using Tapatalk
 
Last edited:

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
Interesting, so what value do you place on getting the camera fixed? $20, $40?

I am just curious, you asked for donations, which is fine, what is the goal amount for a ROM?

I think if you put an amount, it would be more realistic for donators, gives them a goal to achieve.

My wife wants a ROM for her R1HD, so I am debating with myself whether to buy a used R1HD from eBay and built a rom myself or just wait, like yourself if I build a rom I won't be giving it away.

I am simply weighing my choices.

1. I spend x amount of money buying a used phone that I really don't want, then spend my time making or porting a ROM, and trying to figure out the camera issue, my wife has to have a camera period.

2. I give you $5 and you do all the work, I simply download your ROM and install it on my wife's phone.

Sent from my Life Max using Tapatalk
I wish it was that easy to put a price on things beforehand. Really its not an amount that matters anyway, most people show no appreciation toward the devs here. Typically there are only one or two people who do show gratitude in even larger projects. What people don't understand is these things take some serious time to set down and fix. And even then there are no guarantees and there will never be anything that works 100% bug free or satisfies every end user. I don't want anyone to think I'm begging for a donation, I'm simply stating that I don't have the time on my hands to set down and fix all this device needs with nothing in return, as I personally do not need a Nougat rom on the device, and everything works perfectly fine for me as is. However it seems a lot of people desire the latest and greatest, and wish for ongoing development support. These things usually take quite a bit of effort on our end, effort that is taking away from our time with family and kids that should be equally compensated in some form or another.
 
  • Like
Reactions: vampirefo

vampirefo

Senior Member
Apr 3, 2010
3,241
1,631
243
I wish it was that easy to put a price on things beforehand. Really its not an amount that matters anyway, most people show no appreciation toward the devs here. Typically there are only one or two people who do show gratitude in even larger projects. What people don't understand is these things take some serious time to set down and fix. And even then there are no guarantees and there will never be anything that works 100% bug free or satisfies every end user. I don't want anyone to think I'm begging for a donation, I'm simply stating that I don't have the time on my hands to set down and fix all this device needs with nothing in return, as I personally do not need a Nougat rom on the device, and everything works perfectly fine for me as is. However it seems a lot of people desire the latest and greatest, and wish for ongoing development support. These things usually take quite a bit of effort on our end, effort that is taking away from our time with family and kids that should be equally compensated in some form or another.
The biggest problem with the Nougat ROMs, are lack of GPS. Camera can be fixed most likely by using updated blobs.

GPS isn't currently working, but works on CM13, Slimrom or any other MM rom, my wife doesn't use GPS so I may fix Nougat for her or perhaps Slimrom or some other MM rom she likes the look of Slimrom.

I found an R1HD for $12 so I ordered it, I guess I will see how it goes. The best MM ROM available is CX1.

There are many ROMs that can be ported to R1HD, any ROM my blu life max can run so can R1HD, main difference is camera libs.

I currently run Nougat on my blu life max, looking for that magical GPS fix and finger print scanner, both of course works on any MM ROM.


http://www.needrom.com/author/vampirefo/

Update haven't received R1HD phone yet, but did get GPS working on Lineageos 14, as soon as I get R1HD and wife approves of rom of course I will start porting it to her phone.

https://forum.xda-developers.com/android/development/rom-lineage-14-1-blu-life-max-t3605410

like I said this phone is almost the same as R1HD, it's larger screen, main difference is camera libs.

Update phone arrived doesn't work, oh well, my wife will either have to wait or get another phone, I was going to use it to get my wife a rom, then send the phone to you, so you could use it to dev on instead of the one you have now.

Perhaps someone else will send you an old phone to dev on, it's hard to work on a phone you depend on, I know I do it all the time.

The main problem you will see with R1HD is the camera, Blu chose to use Sony parts on this phone, which makes working on it almost impossible.

Sony libs depend on lib3a.so and libdpframework.so which makes it not compatible with libc.so and libandroidruntime.so which means no camera, I had hoped the new updated blobs fixes this problem, no ideal if it does or not, older blobs are useless, except for porting, to another device that uses Sony camera parts.

Sent from my Life_Max using Tapatalk
 
Last edited:
  • Like
Reactions: damnmachine

mrmazak

Senior Member
Jun 16, 2013
3,212
1,324
253
This new post
https://forum.xda-developers.com/r1-hd/help/camera-issues-t3606553

Gave me an idea and I am trying my best(no comparison to your best, lol)
To add stock camera app to cm build.

In summery it was discovered if you remove stock camera app from stock rom you get same problem with camera as we have on cm.

Still trying to confirm the OP finding.
I have installed open camera and renamed the "myoscamera.apk" to "myoscamera.apk_" and the stock camera is now gone and open camera still works.
 
Last edited:

vampirefo

Senior Member
Apr 3, 2010
3,241
1,631
243
This new post
https://forum.xda-developers.com/r1-hd/help/camera-issues-t3606553

Gave me an idea and I am trying my best(no comparison to your best, lol)
To add stock camera app to cm build.

In summery it was discovered if you remove stock camera app from stock rom you get same problem with camera as we have on cm.

Still trying to confirm the OP finding.
I have installed open camera and renamed the "myoscamera.apk" to "myoscamera.apk_" and the stock camera is now gone and open camera still works.
Has nothing to due with camera app, any app would work, has to due with camera libs.

Sent from my LIFE X8 using Tapatalk
 

mrmazak

Senior Member
Jun 16, 2013
3,212
1,324
253
The biggest problem with the Nougat ROMs, are lack of GPS. Camera can be fixed most likely by using updated blobs.

.....................
Update phone arrived doesn't work, oh well, my wife will either have to wait or get another phone, I was going to use it to get my wife a rom,

............................

Sent from my Life_Max using Tapatalk
Is this something you want to elaborate on. I have a few success cases bringing this device back to life. It is only long shot.
 

linuxsociety

Senior Member
Dec 18, 2010
431
349
0
Southern Kentucky
Is this something you want to elaborate on. I have a few success cases bringing this device back to life. It is only long shot.
You are right MrMazak, I thought I had pointed that out a while back about the Vendor /Overlay adding a Camera3.apk to system replacing the stock Camera.apk that gets built from CM/Lineage. I noticed this and thought I suggested changing it to the official Camera.apk from Lineage off a device with the same hardware. I still don't know where the Vendor and Device Overlays Lineage roms and all the non-working camera roms originated. Putting /system apps in an overlay is just asking for trouble 99% of the time when building from source especially CM/Lineage or any non-aosp rom.

Also the Camera.apk in system isn't just an application apk.. Its part of the Camera Service framework and other camera apps depend on its functionality before they will function properly, you can test on a stock rom by moving the Camera.apk thats in /system to a backup file and then trying to use a 3rd party camera apk installed to /data/

I could be wrong, but from what research I've done it appears that the Camera apk in /system is a part of the media framework and is a direct dependency for anything needing to use the flashlight / camera.

**Edit: Ultimately you can resolve any screwed up lib dependencies by using ndk-depends (see: https://android.googlesource.com/pl...6bf5f58dbd9486bbc9/docs/text/NDK-DEPENDS.text)
 
Last edited: