Related
Disclaimer: XDA-Developers has zero affiliation and liability with this, and the sale of these parts is being allowed only for the sake of helping the modding community
My original thread was getting cluttered, and XDA asked me to make some changes, so here is the new thread on HOW TO DO THE MOD.
Breaking news available via my twitter feed, or #vibrantFFC
The US/T-Mobile variant of the Samsung Galaxy S had it's FFC borked prior to manufacturing. This has left us an easy way to add it back in and open up the ability to explore video calling. From my experience thus far, their is poor support for software for FFC's in general, but this seems to be changing. As more of these cameras make it out to devs, expect to see more video calling and chatting apps to start appearing in the near future.
To accomplish this you need a few things:
[*]A camera from the international Galaxy S variant, the i9000s. These are available through a wholesaler that requires a minimum order of 3, sometimes more. If you want to go this route and find a buddy, see my thread for that here.
A small size 0 flat head screw driver and phillips screw driver. Most eyeglass repair kits include screw drivers that are close enough in size to work.
An iPod opener tool, or something similiar.
Something to remove the paint from the digitizer where the FFC goes. Denatured alcohol, and the stronger goo gone varieties are known to work
Q-tips
Some balls (not really - its easy) and common sense (goes a long ways)!
An FFC compatibale ROM - eugene's froyo (2.2) or Bionix (2.1)
Open your phone - Remove the battery cover, sd card, sim card, battery. remove the 7 screws around the back plate, then use the iPod opener tool to snap the rear plate off.
Unsnap the various buckles to release the motherboard.
remove the speaker and original camera
turn the main board clockwise for about an inch to allow some space to work
locate the FFC molding. It is above where the original camera was located. You can dry fit the new camera in place to see where the FFC goes. This is the area that the paint needs to be removed from
Use your remover of choice and some qtips to get that paint off of there
Let things completely dry before putting back together. 10 - 30 minutes should be fine
snap new camera in place, check your work.
If it looks good, installation is reverse of removal.
Some ROMs (2.2 base) do not include the font camera driver. If you cannot get it to work, try copying the attached file (unzip first - should have .yuv extension) to /system/camera on your phone. (requres root)
You can get the camera from here.
maybe you can add the pictures from the other thread?
scrizz said:
maybe you can add the pictures from the other thread?
Click to expand...
Click to collapse
good point. adding now
Feel free to use min posted 10/3
Sent from my SGH-T959 using XDA App
Apologies for the noob question but what do you mean in step 2? Do we actually have to take the motherboard out of the phone like in these videos: http://www.careace.net/2010/06/09/disassembly-of-the-samsung-galaxy-s/ and also is it really necessary to remove the speaker?
EDIT: Sorry for not being descriptive, What I mean is, does the speaker block this "socket"in which the FFC goes? If not then why is it necessary to remove it?
siirial said:
Some ROMs (2.2 base) do not include the font camera driver. If you cannot get it to work, try copying the attached file (unzip first - should have .yuv extension) to /system/camera on your phone. (requres root)
Click to expand...
Click to collapse
Do the files go in /system/camera or in /system/cameradata ?
I am trying to work it on the Bionix 1.7 rom and I keep getting errors.
Here are my mod pics just to show off. hehehehe.
NikolaiT said:
Apologies for the noob question but what do you mean in step 2? Do we actually have to take the motherboard out of the phone like in these videos: http://www.careace.net/2010/06/09/disassembly-of-the-samsung-galaxy-s/ and also is it really necessary to remove the speaker?
EDIT: Sorry for not being descriptive, What I mean is, does the speaker block this "socket"in which the FFC goes? If not then why is it necessary to remove it?
Click to expand...
Click to collapse
That video is a general disassembly. It isn't specific to this mod. You can make the modification without removing the audio socket/speaker.
comment removed (voluntarily, in interest of the company)
I found a youtube video of showing how to install the camera
my apologies if this was widely known video
here is the link anyways,
http://www.youtube.com/watch?v=jCFe2qSQZGA
Dude thank you for this, im going to order the camera from you now and get this front facing camera business going....im tired of my evo buddies talkin ****!
Side note.....im getting < 1000 quadrant scores and I saw somewhere that people were getting over 2000 scores with vibrants....any suggestions?
Does anyone have any video samples to show the quality if the video?
Sent from my SGH-T959 using XDA App
jstanojevich said:
Does anyone have any video samples to show the quality if the video?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=8589612
http://forum.xda-developers.com/showthread.php?p=8613761
ZeroIsJdm said:
Dude thank you for this, im going to order the camera from you now and get this front facing camera business going....im tired of my evo buddies talkin ****!
Side note.....im getting < 1000 quadrant scores and I saw somewhere that people were getting over 2000 scores with vibrants....any suggestions?
Click to expand...
Click to collapse
pretty sure its the lag fix
FFC 'mirror app' FC
got an error 'error occired while trying to open the FFC. The camera could not be started....'
Any Ideas? Loaded Bionix 1.9.1 from Stock today, copied datapattern_front_420sp.yuv in \system\cameradata and tried TWO different cameras
Still nothing. Any other way to test it?
Thanks for any insight
it2steve said:
got an error 'error occired while trying to open the FFC. The camera could not be started....'
Any Ideas? Loaded Bionix 1.9.1 from Stock today, copied datapattern_front_420sp.yuv in \system\cameradata and tried TWO different cameras
Still nothing. Any other way to test it?
Thanks for any insight
Click to expand...
Click to collapse
you may want to reflash the rom
it2steve said:
got an error 'error occired while trying to open the FFC. The camera could not be started....'
Any Ideas? Loaded Bionix 1.9.1 from Stock today, copied datapattern_front_420sp.yuv in \system\cameradata and tried TWO different cameras
Still nothing. Any other way to test it?
Thanks for any insight
Click to expand...
Click to collapse
It won't run on stock kernel. There are several threads going about the cams. You may want to read them to get a full sense of whats going on. But, it looks promising.
Got mine installed a few minutes ago. I'm not on a rom that supports the FFC but the rear camera works, no lines or fuzziness as some reported. On first opening the camera app I tried to tap to focus and got a force close. Can't get it to happen again so I'm not sure why that happened. Other than that it's working perfectly.
I did notice on installing the camera that NOTHING but the camera needs to be unsnapped. There is a ribbon cable that has to be flexed into place to install the new one but it does save you from removing the whole board (not that it's hard but why bother). On installing the new camera I did notice almost a snap when the ffc popped into place.
Did anyone manage to get a perfectly round hole? I tried for a couple hours with a qtip,some goo gone, and a screwdriver. While the results are respectable I'm curious if anyone found a way?
Sent from my SPH-D700 using XDA App
tank65 said:
pretty sure its the lag fix
Click to expand...
Click to collapse
Yeah....I saw something about how to apply the lag fix...but they gave absolutly not instructions on what it is or how to do it. Would you kindly point me in the right direction
This is what he said about how to apply the lagfix but honestly...no idea what im doing.
"How-to Apply Lagfix to My Rom " Do Not Use another Lagfix as it Breaks my PLaylogos1 Script..."
adb shell
su
mv /system/bin/userinit.sh /system/bin/used
reboot
Then
adb shell
su
busybox dd if=/dev/zero of=/data/dataimg bs=1024 count=1048576
busybox mknod /dev/loop0 b 7 0
busybox losetup /dev/loop0 /data/dataimg
busybox mkfs.ext2 /dev/loop0
mkdir /data/data1
mv /system/bin/used /system/bin/userinit.sh
reboot
Thanks again
http://www.phoronix.com/scan.php?page=article&item=linux_2637_video&num=1
This is a 200 line patch that according to linux was according to Linus the most impressive result of code that is elegant - 200 lines long - and should be wound into the phone linux as well
---- edit - and here is why it isnt going to be of any use for us...
http://forum.xda-developers.com/showthread.php?t=822756&page=210
and the meat of it from bilboa1 :-
Originally Posted by giulio.alfano
Have you seen these? w_w_w.phoronix.com/scan.php?page=article&item=linux_2637_video&num=1
Phoronix(and Linus) say that is a miraculous 200 lines patch to increase interactivty? Can you consider the inclusion, of course if group scheduling in android 2.6.32 kernel is compatible?
the process groups are created per tty, that wont work on android
you can create process groups by hand however but it doesn't make a lot of sense for android in that case. the goal is to have some intensive tasks into their own group, but theres no intensive tasks and we don't have issues like audio or video lagging
their tweak is especially good if you run a compilation in the background and want to browse the web while waiting without having slow downs.
on android if you browse the web you dont have other cpu heavy tasks in progress usually (like encoding a video or what not)
i hope that was clear enough
I've off works urlaub would bei awesome
Where are the developers, who can say, if it works?
Sent from my GT-I9000 using my Brain
Wouldnt get too excited,phoronix is like the sun of linux news
Sent from my GT-I9000 using XDA App
Already discussed - its useless on phone. Phone will be even slower.
Sent from my GT-I9000 using XDA App
dupel said:
Already discussed - its useless on phone. Phone will be even slower.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Lets save statements like these after it has been actually tested.
KhaaL said:
Lets save statements like these after it has been actually tested.
Click to expand...
Click to collapse
Not everything needs to be tested. If you make a program to draw a circle, it wont make a square, let alone cook eggs. (it's the case for this patch at the technical level, beyond the "wow" words from 1st post)
Note: there's other patches in 2.6.37 for responsiveness which are different from the one spoken about here which are actually likely to improve things. But probably not as drastic.
dupel said:
Already discussed - its useless on phone. Phone will be even slower.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Got any links to where I can find out what you know?
I was *hoping* that if it made desktops much more responsive under heavy loadings that it would help with the phone - its not like we have slow cpu's in these things Or is it cpu architecture that allows the improvments and the phones just are not compatible? or something else?
just wanting to know more and to hopefully get a dev who thinks its worth taking a look to see - 200 lines of code - *cof* (ducks behind armour) "how hard could it be?" *runs for cover*
i get this sinking feeling from the subtle - and not so subtle comments from you guys tho - that its just not really suited for how android works on a phone....
cbdrift said:
Got any links to where I can find out what you know?
I was *hoping* that if it made desktops much more responsive under heavy loadings that it would help with the phone - its not like we have slow cpu's in these things Or is it cpu architecture that allows the improvments and the phones just are not compatible? or something else?
just wanting to know more and to hopefully get a dev who thinks its worth taking a look to see - 200 lines of code - *cof* (ducks behind armour) "how hard could it be?" *runs for cover*
i get this sinking feeling from the subtle - and not so subtle comments from you guys tho - that its just not really suited for how android works on a phone....
Click to expand...
Click to collapse
Read last 5 pages in hardcore kernel topic.
knowing one and the other about linux, I have to disagree with those who say: it's gonna make your phone slower..
why? in linux, things constantly run in the background. and what this patch does, is give priority to foreground processes. True, there isn't MUCH in the background, so results may not be super, but the compile with 64 threads is just AN EXAMPLE of what it can do. That's the PERFECT situation to demonstrate. This doesn't mean that it sucks for everything else! It just means that it works
So stop *****ing and just test it before you start yapping that it's bad, doesn't work on phones etc... There is no right and wrong here, there is just: test it and see if it works!
i'd like to have a REAL technical discussion with these people here that are so-called experts... Because their arguments (excusez-le-mot) SUCK.
so please adapt your first post, because what they are saying is just guessing and not based on experiments nor experience, which renders it completely useless
Just my 2 cents
dupel said:
Already discussed - its useless on phone. Phone will be even slower.
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
discussion is worthless, you can't convince me with some "maybe this, possibly that", if you say it's useless: give hard numbers or (sorry, but...) stfu!
UPDATE:
i've been reading up on the lkml and i think there are some very interesting possibilities here...
What this program does, is put the tty-bound processes in a special cgroup. While this is done automatically, there is also a possibility to just do the same in userspace. (check Lennart from redhat's solution).
It basicly creates a different cgroup for foreground processes, he does it in the bash profile. But i think that with this in mind, we can create cgroup handler for our "most important" apps to make them more responsive!
I've been looking into hardcore's kernel and it already has cgroup support built in, so it's actually just a matter of using it properly
how? check lennart's comments further in the lkml thread because you have to look out to clean up cgroups when no more processes use it.
Anyway, when properly tuned, it should be even better than the kernel patch people talked about!
These type of changes would suit more underpowered devices like the Hero or G1 but imho I dont know why the galaxy S needs it, my IO after applying OCLF is 2300+ apps, any lag issues are not due to the current modded kernels available as they are really good..
Idk why people don't understand simple things
cgroups does not magically makes your apps more responsive. It makes groups of processes which are scheduled together at the same level instead of doing it per process.
So, the group of "make" processes during a make -j64 get all globally a lower share of resources (than if they weren't grouped), allowing the group "browser" process to get enough resources to be smooth.
Without, each make process (64 of them) would get an equal resource time, which would also be equal to the browser, which ends up not being very nice for the desktop.
Now on the phone.. do you have a make -j64 running [IN THE BACKGROUND]? nope. do you have an heavy process or group of processes running [IN THE BACKGROUND]? nope.
Your front task is always the one taking most resources. If you put it in a group you might even decrease it's performance and responsiveness.
It's a double edged sword. You see, when they schedule the make -j64 process group, your browser is smooth but the make -j 64 process group is *slower*.
So unless a group of processes on the phone are taking too much cpu (i know of none doing that unless they're on the foreground), it's useless
bilboa1 said:
Idk why people don't understand simple things
cgroups does not magically makes your apps more responsive. It makes groups of processes which are scheduled together at the same level instead of doing it per process.
So, the group of "make" processes during a make -j64 get all globally a lower share of resources (than if they weren't grouped), allowing the group "browser" process to get enough resources to be smooth.
Without, each make process (64 of them) would get an equal resource time, which would also be equal to the browser, which ends up not being very nice for the desktop.
Now on the phone.. do you have a make -j64 running [IN THE BACKGROUND]? nope. do you have an heavy process or group of processes running [IN THE BACKGROUND]? nope.
Your front task is always the one taking most resources. If you put it in a group you might even decrease it's performance and responsiveness.
It's a double edged sword. You see, when they schedule the make -j64 process group, your browser is smooth but the make -j 64 process group is *slower*.
So unless a group of processes on the phone are taking too much cpu (i know of none doing that unless they're on the foreground), it's useless
Click to expand...
Click to collapse
very true... that's why it still might be possible to group "your current task" and "all the rest". That (might) give you an advantage still...
and as said: i'm not saying it IS better, i'm saying it might be worth testing
hence the suggestion i put in post 11: make something that puts the application you start in foreground in a dedicated group and EVERYTHING else in another. When you background that process, move it to the "pool" group
it might just help!! (so... don't shoot the idea too soon )
Hi!
I'm developing for HTC Hero, and until recently we've been having the same trouble as you guys with the Camera on ICS, no preview.
However, I've got it working with preview now, and I'm hoping it might work for you too!
Download: http://www.mediafire.com/?d0ccs22yr447fby
To try it out, push that file to /system/lib/hw/ and launch the camera app.
Been some views, anyone try this out yet?
sk842018 said:
Been some views, anyone try this out yet?
Click to expand...
Click to collapse
Yeah, it would be nice if someone could try it out. And if it doesn't work you could post some logcats/dmesg and I'll give it another shot.
Tried it out and responded in my ROM thread...
MongooseHelix said:
Awesome! I just tried it out and it does indeed fix the preview. Could you let me know what changes you made in building the HAL so I can merge them into Evervolv? Either here or gtalk/email: [email protected]
Thanks
Click to expand...
Click to collapse
And as for the reasoning behind it slowing down/crashing, the hacked up HAL keeps leaking memory causing OOM events which lead the lowmemorykiller to start killing off everything. This isn't unique to these msm7k phones as it also happens for at least the qsd8k devices like the Dinc and Evo4g which build off the same HAL source. The memory leakage is worse when the barcode scanner and panorama "fixes" are also used.
This emulator play great on the Amazon Fire TV . Just finished playing a few rounds of power stone 2 and it plays and look great. So happy with this purchase so far. I cannot wait for this to be rooted hopefully that usb port will allow for external hard drive to be plug in.
What emulator are you using??
Sent from my SM-N900V using Tapatalk
Gzus23 said:
What emulator are you using??
Sent from my SM-N900V using Tapatalk
Click to expand...
Click to collapse
Reicast maybe?
kairnage said:
Reicast maybe?
Click to expand...
Click to collapse
I uploaded reicast and it works pretty well. Much better than expected. I haven't played very many games yet, but the ones I've tried have worked well. I am getting a little bit of controller lag (nyko playpad) but I think that might be the controller.
superkoot said:
I uploaded reicast and it works pretty well. Much better than expected. I haven't played very many games yet, but the ones I've tried have worked well. I am getting a little bit of controller lag (nyko playpad) but I think that might be the controller.
Click to expand...
Click to collapse
Noob question....how do you get the games for these emulators?
underworld1234 said:
Noob question....how do you get the games for these emulators?
Click to expand...
Click to collapse
Not really sure what forum rules are here but the official way to get roms is to 'rip them yourself'. Googling dreamcast roms should give you more information.
How to get the best out of your reicast
I came across an issue that im not sure you guys have come across yet, but previously we had to put games on 50hz to let some of them run.
Now that we have This box running a real GPU, we can run games at true full speed by putting it on 60hz getting you 60 fps.
Im using a non powered usb hub with my Dual Shock 4 Controller Wired and a usb mouse with no issues.
Strangely, games that do not provide the option like the american version of Marvel Vs. Capcom 2 USA are locked at 50hz unless you get a jap ntsc version. You may want to test this out by turning on the FPS option to see if thats causing your gameplay lag.
The other issue is that Sonic Adventure and Marvel Vs Capcom both give Kernel Panics.
Have you guys experienced this?
daillest319 said:
This emulator play great on the Amazon Fire TV . Just finished playing a few rounds of power stone 2 and it plays and look great. So happy with this purchase so far. I cannot wait for this to be rooted hopefully that usb port will allow for external hard drive to be plug in.
Click to expand...
Click to collapse
This is great news!! Man I actually just pulled my Dreamcast out of storage the other day for some Berserk....very very cool that the Fire TV can play this well. I know this isn't EXACTLY where we should post these things, but can you guys sort of put a compatibility list together with what games you played and how they worked? Thanks again for bringing this to my attention.
There is a WIP compatiblity list at http://wiki.reicast.com/index.php/Reicast_Compatibility_List
It's a little outdated, most of the results are from r5 at the latest. There *are* some issues with Reicast r6 and Qualcomm chips that people have reported, but I've had no issues with it on my Nexus5.
Most of their testing is on Tegra4 (Shield) because nVidia actually gave them one to support the project.
Some controllers, like the Moga supposedly don't work right with r6 either.
r7 is supposed to be coming soon, though. Not sure what all that'll bring.
Games that for sure don't work: ANYTHING that's WinCE based, because there's no MMU support in the emulator.
muriani said:
There is a WIP compatiblity list at http://wiki.reicast.com/index.php/Reicast_Compatibility_List
It's a little outdated, most of the results are from r5 at the latest. There *are* some issues with Reicast r6 and Qualcomm chips that people have reported, but I've had no issues with it on my Nexus5.
Most of their testing is on Tegra4 (Shield) because nVidia actually gave them one to support the project.
Some controllers, like the Moga supposedly don't work right with r6 either.
r7 is supposed to be coming soon, though. Not sure what all that'll bring.
Games that for sure don't work: ANYTHING that's WinCE based, because there's no MMU support in the emulator.
Click to expand...
Click to collapse
That's awesome thank you. I didn't see the Berserk game listed but I'm guessing it's probably not compatible yet. Very neat that they're doing this though. I remember NBA2k and Virtua Tennis were the jam!
The 360 controller seems to work beautifully on the FireTV.
As far as emulators, sideload and see. RetroArch runs I think, which handles a lot of systems.
There's another thread on this topic IIRC.
I posted about SuperN64 no longer being in the Play Store,and gave out some links to it in a different thread.
It works excellently,even with HQ4X.
The main one to get normally is Mupen64Plus AE Free,but that one is a bit slower than SuperN64.
The only downside with SuperN64 is the ads when exiting the app,which are sometimes video ads,but you
can just cancel them out with the Home button.
Here is information about SuperN64 and the developer name which is also there.
h**t**t**p://xmarcos-santiago.android.informer.com/
Stars and random x to prevent BS.
I hate how EVERY post made requires the stupid image verification.
retroben said:
I posted about SuperN64 no longer being in the Play Store,and gave out some links to it in a different thread.
It works excellently,even with HQ4X.
The main one to get normally is Mupen64Plus AE Free,but that one is a bit slower than SuperN64.
The only downside with SuperN64 is the ads when exiting the app,which are sometimes video ads,but you
can just cancel them out with the Home button.
Here is information about SuperN64 and the developer name which is also there.
h**t**t**p://xmarcos-santiago.android.informer.com/
Stars and random x to prevent BS.
I hate how EVERY post made requires the stupid image verification.
Click to expand...
Click to collapse
I went to the site you provided but I can't see a download link. It just says, like you wrote, not found on the Play Store.
The link is just about the information and the developer name.
I already posted the link to an apk download in this thread below including another market that happens to have the free app.
h**t**t**p://gforum.xda-developers.com/showpost.php?p=52781805&postcount=63
Stars,random g,no BS.
Too many places require you to wait until a certain post count for posting useful links.
Stupid advertisement link spamming a-holes.
Long time,nobody posting.
Why?
I got another "link" to show here.
h**t**t**p://xmryadro.ru/reicast/
Remove stars and bolded x to get the link.
I fail at using google search to find it directly for easy access on Fire TV.
The page is a list of debug version APKs of Reicast you can download.
One of them is fom the 27th of this month. (two days ago)
I grabbed the 5/27 debug build and tested it with SA2 which causes reboots.
Apart from the pure BULLSH** of lacking analog mapping support,I did manage to beat City Escape in Interpreter and Software modes which ran quite fast considering that it is interpreter.
It did not freeze up for several seconds like recompiler does.
The problem is that it STILL rebooted after the results screen ends and the next part starts loading. (F-king HATE Qualcomm)
I used a 700MB+ CDI image of Sonic Adventure 2 for this test.
I wish that the NullDCe Android Alpha 0.1 would successfully boot SA2 gdi so I can see if the performance is half decent.
Even though there is no hard button input at all and that the screen shrinks to match a phone's resolution.
I wish that Chankast or Makaron would get ported to Android so we can see if they will not cause rebooting.
Though I did reply in the Reicast Forums with an idea for Reicast to have an underclocked core setting to make it not reboot on Qualcomm devices.
The only reason reicast runs so well is due to a new arm dynarec core and a lot of streamlining overall, which NullDCe lacks.
The issues with SA2 are known, I believe, as well as controller problems that ended up broken in r6.
Chankast isn't open IIRC, and NullDC has far better compatibility anyway. Reicast is the evolution of NullDC, but a lot is having to be rebuilt from scratch, and plans to eventually be even better that NullDC is.
Also, Qualcomm's a *****. Their GPU drivers are among the worst nowadays.
Good info on issues is going to be on the project's github, in the issues tracker.
angelxwind has a buildbot for the project as well, which should have the latest buildable package here: http://reicast.angelxwind.net/?page/downloads
Remember that this is something a few people are doing in their spare time. They're not getting paid, they're not charging for the app. It's a bloody miracle that it works as well as it does.
daillest319 said:
This emulator play great on the Amazon Fire TV . Just finished playing a few rounds of power stone 2 and it plays and look great. So happy with this purchase so far. I cannot wait for this to be rooted hopefully that usb port will allow for external hard drive to be plug in.
Click to expand...
Click to collapse
How are games being loaded to the FTV? What adb method and to what destination path?
Dynagem said:
How are games being loaded to the FTV? What adb method and to what destination path?
Click to expand...
Click to collapse
I wouldn't load them the way you are thinking of. What you need to do is put all of your Dreamcast ROMS into a folder on your PC and share it out to your network. Now get on your FTV and download ES File Manager and go to the "network" tab. Plug in the IP address of your PC creating the link between the FTV and your PC. Now you should be able to click on the PC icon in ES File Manager and see the folder that you shared out earlier. Now it is just a matter of copying and pasting the ROMS folder wherever you need them to be on your FTV.
So basically you are "pulling" your data from your PC to your FTV instead of "pushing" from your PC to your FTV. You have WAY more control over where your files end up on your FTV this way.
Bump for pleas of getting Reicast to have a workaround for sucky Qualcomm drivers.
- Nougat version: this post -
BLX
Moxie provides Battery Longevity eXtension, a feature that I believe is currently unique to this project. BLX prevents your battery from charging to its full capacity. Why is this useful? Because charging your battery reduces its capacity over time. To help prevent this, I've designed this mod to cut off the battery charging earlier. (Testing of BLX: this post and rationalle: this page)
To enable BLX edit:
/sys/class/misc/batterylifeextender/charging_cap_level
Click to expand...
Click to collapse
to any value from zero (disabled) to 10 (full BLX). I've found that when using the DASH charger, 10 works well and limits the charging to about 80%. For non-OEM chargers, a value of 5 has the same effect.
Still using Marshmallow? (I am!)
Final M kernel: This Post
Coming from another custom (Marshmallow) kernel? Check this link!
Remember to hit thanks for NevaX1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
* * *
In order to comply with GPL, linux kernels may be modified and distributed so long as their source code and compilation tools are public, allowing anyone to reproduce an identical binary.
Toolchain: here
Kernel Source: https://github.com/bedalus/oneplus3kernel
Wifi Module Source: https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0
I accidentally vented a post on my development philosophy: here just in case anyone is interested in how I approach development!
I realise this isn't very exciting (yet) but I'm posting here to keep a public log of this kernel development from scratch.
About me: I developed for the Nexus S ages ago! Left XDA but have since returned, hoping to keep things more low key.
Github commits
Commit fb944f9:
I just want to go over the build script a little for anyone who might like a little insight into the development process.
Code:
echo -e "Making OnePlus 3 kernel\n"
export PATH=$PATH:/opt/toolchain/lin531/bin/
export ARCH=arm64
export SUBARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
make msm-perf_defconfig
make -j5
# modules
find ./ -type f -name '*.ko' -exec cp -f {} ../zip/system/lib/modules/ \;
# copy zImage
cp -f arch/arm64/boot/Image.gz-dtb ../zip/kernel/zImage
ls -l ../zip/kernel/zImage
cd ../zip
zip -r -9 op3_vN.zip * > /dev/null
mv op3_vN.zip /mnt/c/Users/bedal/Downloads/
I've got my cross compiler located at /opt/toolchain which I believe is pretty standard. The cross compiler is Linaro, although there are many other choices available. I've selected Linaro because they are a large professional organisation, and contribute a lot to development on ARM architectures. ARCH is short for Architecture, as you can see in the top lines. The export command just passes the target architecture to the compiler, so we can build binaries that will execute on ARM chips.
It's also worth noting that we are cross compiling since we are developing on a different platform to our target. In fact I'm using bash for Windows on a 64 bit Lenovo laptop! This is an AMD64 architecture, which used to be commonly known as x86_64.
Code:
make -j5
This sets the build off, then
Code:
find ./ -type f -name '*.ko' -exec cp -f {} ../zip/system/lib/modules/ \;
...is just a handy bit of code to find any modules and move them to the necessary spot in my 'zip' subfolder. As it happens I'm building only the WiFi module, as the wifi code appears to have a problem running when built into the kernel binary.
The rest of the code is fairly trivial. The zip file that you flash in Recovery is just the new kernel binary, plus the wifi module, plus a script that extracts your existing ramdisk from your ROM's boot partition, discarding the old kernel binary in favour of the new one, before re-integrating and flashing back to the boot partition. I may go into that in more detail in a later post.
Commit e5403fd:
I want to just briefly mention the file: sound/soc/codecs/tfa9890/tfa_container.c
In order to better ensure that the kernel works correctly, the compiler will report anything it sees as an error and stop compiling. When I first tried to build the kernel, one of the first errors I got was with this file. The warning the compiler gave me was something like 'in procedure blah-blah, an if statement will always evaluate to TRUE'. So why is this a problem? Because clearly the developer used an if statement so that a choice could be made. If the condition specified in the if statement evaluates to TRUE, do one thing, if not (ie FALSE) then do some other thing. So the compiler suggests caution, because clearly an if statement can only pick the first option if the condition is always going to be TRUE.
Code:
[COLOR="Red"]if (!prof->list[i].type == dscRegister) {[/COLOR]
[COLOR="SeaGreen"]if (prof->list[i].type == dscRegister) {[/COLOR]
My solution (above) shows the line that was removed in red, and the replacement in green, and it should be pretty obvious that the exclamation mark was removed, and no other changes were made.
The reason that I bring up this specific change is that I've seen other solutions to this problem in other dev's source code, and while they may trick the compiler into believing the problem is solved, really the problem is worse. Generally speaking, it is in fact possible, indeed probable that code will make it through the compiler just fine, even though when executed it will cause a fatal error (an error that cannot be recovered from, ie a crash). So what's up with this code?
The exclamation mark is shorthand in C for 'NOT'. NOT reverses a boolean value, ie Y becomes N, N would become Y, and TRUE -> FALSE and of course FALSE -> TRUE!
We can see in the code that it appears to be trying to invert the logic of a list type. Let's pretend it's a shopping list. So what would 'NOT shopping list' be? One thing that's not a shopping list? Or all the things that aren't shopping lists? It's a nonsensical proposition, and I think some developers have looked at the code and thought, 'huh, that's in the wrong place,' and have fixed it by taking it out of the brackets.
Code:
if !(prof->list[i].type == dscRegister) {
If you remember your high-school maths, the contents of brackets are always evaluated first. The fixed (wrongly) code now tests if one list type now matches another. That's fine, if it's a match then we get TRUE. If not then FALSE. Now we know if whether it's one or the other, the '!' will flip it. Then the if statement will progress to the next bit of code, doing whichever thing is required based on the outcome of the test.
That's all well and good. The compiler can see this and compile it without throwing an error. The problem is that the '!' shouldn't be there at all. If this wrong-code is ever executed, because the '!' has flipped the logic, the wrong path will be taken.
Any other devs who are reading this and know this may be the method they used to fix the compiler warning should take a good look at the code in that one file. It should be obvious that the '!' shouldn't have been there at all, and was probably a typo at the original development stage that wasn't picked up by their compiler (older compilers couldn't spot as many different kinds of problem).
Any discussion will be most welcome. This is the sort of thing I feel should be going on at XDA but seems to be conspicuously lacking in the development forums!
Good to see another dev Greetings brother!
Welcome to the party @bedalus!
Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
@bedalus Tnx a lot for this!!!!
Thanks Keep up the Work !
Wow.. Glad to have you here bedalus back from nexus s days
Sent from my ONEPLUS A3000
First and foremost, thank you for sharing post 2. That kind of stuff is why I really come here. With that said, I flashed your kernel and it lives up to the name. The kernel is fast and fluid with all my tasks. Thanks for sharing your work and development skills with us :good:
mixtapes08 said:
Wow.. Glad to have you here bedalus back from nexus s days
Click to expand...
Click to collapse
Hey mixtapes, it's a small world! I'm a better programmer than I was back then. Well, maybe not better, just more patient
How've you been? What phones have you rocked since the Nexus S?
AlkaliV2 said:
First and foremost, thank you for sharing post 2. That kind of stuff is why I really come here. With that said, I flashed your kernel and it lives up to the name. The kernel is fast and fluid with all my tasks. Thanks for sharing your work and development skills with us :good:
Click to expand...
Click to collapse
I enjoyed writing it and I'll try to keep it up. I want to provide more insight into what each update has actually changed.
Oh that's good to hear. . Nexus 4,5,6p then op3. 4 and 5 are both sold already 6p on my girlfriend and I have op3 and the oldest nexus s that I use for alarm lol. How about you?
Oops I forgot the galaxy nexus that also sold already hehe.
Sent from my ONEPLUS A3000
mixtapes08 said:
Oh that's good to hear. . Nexus 4,5,6p then op3. 4 and 5 are both sold already 6p on my girlfriend and I have op3 and the oldest nexus s that I use for alarm lol. How about you?
Oops I forgot the galaxy nexus that also sold already hehe.
Click to expand...
Click to collapse
Yep, Nexus 4. I think I saw you over in that forum too IIRC. Then I got sick of it all, and rocked a dumb flip phone for a while. I thought I was in the matrix. Then I got a HTC One X plus, but it was too heavy, and I really didn't think the beats audio was that impressive. In fact I thought it sounded bad. Incidentally, I think the audio from the jack in the op3 sounds very good!
I later had a go with a Nokia 830, which was an excellent device, but as everyone says, Windows Mobile is a poor ecosystem. The OS itself was a bit ropey too.
I also had a Moto G 2nd gen at some point. Another solid device, but a bit too discrete for my taste! I then had a Sony X3 compact. A very nice device! But I broke the screen
I'm sure I'm forgetting some. But I felt the op3 was a total bargain at the price. I couldn't resist. It's a bit short on battery, but that's my only gripe.
Okay, it's been hard work, but v2 is here: http://d-h.st/qUqT
I'll go into detail about the commits in the next day or two.
Delete
Gesendet von meinem ONEPLUS A3003
@bedalus
What is up with this thread theres no OP (1st post). no info at all
what is this kernel for OOS, CM, AOSP?
I am no dev and am probably asking a silly question. But could one compile the current cm14 N kernel with this and build a custom N kernel?
Sent from my ONEPLUS A3000 using Tapatalk
partridge79 said:
@bedalus
What is up with this thread theres no OP (1st post). no info at all
what is this kernel for OOS, CM, AOSP?
Click to expand...
Click to collapse
It says it's for stock on the OP, meaning OOS. Also if you click the GitHub link you'll see it's forked from the official stock OOS kernel source, as well as in the repo you'll see the branch is called stock.
So if I had to guess I'd say it's for stock ROM..
@jukiewalsh
I was using xdalabs and there was no OP at all the 1st page had 1 post from a moderator saying thread cleaned (hence my post saying theres NO OP. So no links to click either but coming back now i see that OP has been restored along with the rest of page 1. (Which has all the info i required) Must have been some maintenence being done to post thanks for the heads up tho
partridge79 said:
@jukiewalsh
I was using xdalabs and there was no OP at all the 1st page had 1 post from a moderator saying thread cleaned (hence my post saying theres NO OP. So no links to click either but coming back now i see that OP has been restored along with the rest of page 1. (Which has all the info i required) Must have been some maintenence being done to post thanks for the heads up tho
Click to expand...
Click to collapse
Ohh okay haha gotcha
Will this work with community builds?
Sorry if it's a stupid question..
---------- Post added at 05:52 PM ---------- Previous post was at 05:35 PM ----------
dpryor88 said:
Will this work with community builds?
Sorry if it's a stupid question..
Click to expand...
Click to collapse
Edit:
It doesn't. Haha.