Possible to port Nexus 4 ROMs? The kernel source is out.

Search This thread

r00tb33r

Senior Member
Apr 16, 2010
50
2
Is it possible to port over Nexus 4 ROMs (including 4.4 KitKat) to HTC First? HTC has released the kernel source code for our phones. I like the Nexus experience, and don't really want CM. If HTC made Nexus handsets for Google I would have bought that instead, but the minimalist nature of the First really appeals to me.
 

russian392

Senior Member
Apr 30, 2012
975
178
Simpsonville, SC
Is it possible to port over Nexus 4 ROMs (including 4.4 KitKat) to HTC First? HTC has released the kernel source code for our phones. I like the Nexus experience, and don't really want CM. If HTC made Nexus handsets for Google I would have bought that instead, but the minimalist nature of the First really appeals to me.

um that isnt quite as easy as you think. porting cm is easier cause our phone has hardware relatives like the HTC One mini which use the same drivers and stuff like that. also our screen size matches the One mini so porting it would be as easy as 1-2-3. it does take time but it will be a hell of alot faster than BUILDING an AOSP rom. to make aosp work 1, you would need screensize and other hardware compatibility, then 2, the rom was never made for htc and 3, there is not flashable zip of the stock rom to base the OS off of, so it would requre alot more work. trust me , cm and and aosp arent much different so dont worry.
 

r00tb33r

Senior Member
Apr 16, 2010
50
2
um that isnt quite as easy as you think. porting cm is easier cause our phone has hardware relatives like the HTC One mini which use the same drivers and stuff like that. also our screen size matches the One mini so porting it would be as easy as 1-2-3. it does take time but it will be a hell of alot faster than BUILDING an AOSP rom. to make aosp work 1, you would need screensize and other hardware compatibility, then 2, the rom was never made for htc and 3, there is not flashable zip of the stock rom to base the OS off of, so it would requre alot more work. trust me , cm and and aosp arent much different so dont worry.

Since I have no experience porting Android I can't say that you are incorrect, but isn't the binary architecture of applications the same (ARMv7-A Krait instruction set?), the screen is reasonably similar (1280x720 vs 1280x768, or Nexus 4 having 48 extra pixels on the width in portrait mode). Basically, it's not possible to just stick our device-specific kernel (and kernel modules, aka drivers) in there and have everything else just work? Before Android, I had no problems compiling a new Linux kernel for my distro with new options and applications worked just fine.

By the way, HTC promised a 4.4 KitKat update for HTC One Mini which AFAIK is 95% same as our First. Would it be possible to port that ROM? I'd still prefer Nexus though.
 

Kendosis

Senior Member
May 5, 2009
137
41
New York
Yeah it would be possible to port 4.4 from the the One Mini, I'm not to sure how stable it would be though I'd foresee the usual bluetooth,camera,wifi issues.
 

r00tb33r

Senior Member
Apr 16, 2010
50
2
Yeah it would be possible to port 4.4 from the the One Mini, I'm not to sure how stable it would be though I'd foresee the usual bluetooth,camera,wifi issues.

Why would there be bluetooth/camera/wifi issues? We would use our own kernel with correctly configured modules. Both First and One Mini kernel source is out, can't we just run a comparison to see what's different? From the look of it they use the same Linux kernel release, so differences should be few (at least no false positives from different module versions). If newer Android builds will use newer Linux kernel, we can add those differences that we will know of after we do the First vs One Mini source comparison.

I think running the patch program would be an easy way to find the affected source files, as files with no differences will generate no patch lines.
 
Last edited:

r00tb33r

Senior Member
Apr 16, 2010
50
2
It's a darn LG. It would like either 1. Take for ever or 2. Impossible
We are using an HTC lol

Sent from my HTC first using xda app-developers app

I don't follow what you mean about incompatibility of LG. It's still the same CPU architecture, and neither the Linux kernel nor the Android operating system are the developments of LG. Explain please.

I'm a computer engineer with a bit of custom hardware core development experience for embedded systems running Linux. I just don't see why there's a problem swapping out all the hardware-specific stuff from underneath Android as long as CPU architecture remains the same.
I have years of Linux experience, just not Android-specific.
 

russian392

Senior Member
Apr 30, 2012
975
178
Simpsonville, SC
I don't follow what you mean about incompatibility of LG. It's still the same CPU architecture, and neither the Linux kernel nor the Android operating system are the developments of LG. Explain please.

I'm a computer engineer with a bit of custom hardware core development experience for embedded systems running Linux. I just don't see why there's a problem swapping out all the hardware-specific stuff from underneath Android as long as CPU architecture remains the same.
I have years of Linux experience, just not Android-specific.

well.
1. ive seen people try, its not as easy as it seems.
2. think of it as windows. you install it on your pc, it will take another several hours just to download and install various drivers and software for your hardware.
the thing is not just in the android OS. the os should be able to auto adapt itself to any android capable device. BUT we have to consider 1. drivers for the adreno 305 and the snapdragon 400. we also need kernel/baseband capability. the nexus is pretty much a BLANK device with absolutely nothing on it, and they install a stock kernel and stock rom. we would have to go in and make the kernel work, which hopefuly we can just use a ready built one, and then tweak the rom + kernel to fit the harware, whcih will include the capatative side of the screen, and camera, and everything else, and the ram. and that. although technicaly some of it will be there, its not as easy as you might think.

edit

see, ive worked on an ARMv6 device, and its like much harder than an ARMv7 which has alot of similarities. and mind you, im not saying its IMPOSSIBLE, and im not saying its extremely hard. im sure it can be done, but porting cm form a mimic device like the One Mini would be easier than a Nexus 4, or a Nexus 5 at that.
 

russian392

Senior Member
Apr 30, 2012
975
178
Simpsonville, SC
Wouldn't it be easier and more connivent to port from the HTC one xl? It does have a good amount of great ROMs

its not the ROM, gosh. its the HARDWARE. the One mini has pretty much identical hardware, therefore its easier. if we can atleast get ONE rom ported successfully everything else would be much easier cause the that rom could be used as a base for other ports...

the XL, well the major difference is the adreno 225 vs our 305, plus we have more sensors...
so um...posibly? you could give it ago if you want
 

abrahammmmmmm_

Senior Member
Oct 19, 2013
167
46
Salem
its not the ROM, gosh. its the HARDWARE. the One mini has pretty much identical hardware, therefore its easier. if we can atleast get ONE rom ported successfully everything else would be much easier cause the that rom could be used as a base for other ports...

the XL, well the major difference is the adreno 225 vs our 305, plus we have more sensors...
so um...posibly? you could give it ago if you want

I see what you mean, but I wasn't really aware of the great difference of the adreno 225 & 305. When checking it out I only heard there was some very minor tweaks done to the 225 to get the 305. And I'd actually give it a go if it wasn't for how easily this phone bricks, I guess I'll just have to be patient and wait to see what our great devs we've got can whip up for now
 

r00tb33r

Senior Member
Apr 16, 2010
50
2
its not the ROM, gosh. its the HARDWARE. the One mini has pretty much identical hardware, therefore its easier. if we can atleast get ONE rom ported successfully everything else would be much easier cause the that rom could be used as a base for other ports...

the XL, well the major difference is the adreno 225 vs our 305, plus we have more sensors...
so um...posibly? you could give it ago if you want

Modern operating systems are built on the principle of abstraction layers. The *nix kernels place devices as memory pointers on the filesystem tree (they are not files however in the literal sense), so you can swap out hardware and kernel but maintaining the same pointer names and your upper level application won't care at all, as a matter of fact it may not even know it runs on different hardware from before. The "ROM" that you download and flash onto your device is not monolithic, it's made up of components and the Linux kernel and Android OS, and the rest of the applications are separate parts. You should be able swap out the hardware specific layer, otherwise the design of the OS won't be worth a damn.

From user's perspective however "ROM" means something else, it means a specific set of features, be it pre-installed apps, eyecandy (like Sense or Touchwiz), or other miscellaneous bloatware. Basically it's a snapshot of an environment, which defines the user experience. HTC has their own tailored user experience which they ship with their phones like the One mini, with Sense, and probably some carrier restrictions (like custom restricted Wi-Fi tethering on AT&T). HTC first, because it's a product manufactured FOR Facebook, and marketed as A Facebook phone, has a different user experience from typical HTC products. Samsung has their own tailored user experience with their own apps and Touchwiz. Finally LG makes their own phones too, however the Nexus device they make for Google is a Google product, and Google tailors the user experience for their product. I like Google's vision of the smartphone user experience (I had a Nexus One before), and that's what I want to achieve with the current phone. True, that I could have bought a Nexus 4, however HTC's hardware design allows me to do things that are seemingly impossible with LG... Like swapping the IMEI (don't ask).

Not everybody wants their user experience be of HTC or CM flavor. Please be respectful of that. Arguing against wishes of others accomplishes nothing.

I believe it's clear enough that One mini updates can AND WILL be ported to our phone, there is no point to discuss that further in the context of THIS thread.
 
Last edited:

russian392

Senior Member
Apr 30, 2012
975
178
Simpsonville, SC
Modern operating systems are built on the principle of abstraction layers. The *nix kernels place devices as memory pointers on the filesystem tree (they are not files however in the literal sense), so you can swap out hardware and kernel but maintaining the same pointer names and your upper level application won't care at all, as a matter of fact it may not even know it runs on different hardware from before. The "ROM" that you download and flash onto your device is not monolithic, it's made up of components and the Linux kernel and Android OS, and the rest of the applications are separate parts. You should be able swap out the hardware specific layer, otherwise the design of the OS won't be worth a damn.

From user's perspective however "ROM" means something else, it means a specific set of features, be it pre-installed apps, eyecandy (like Sense or Touchwiz), or other miscellaneous bloatware. Basically it's a snapshot of an environment, which defines the user experience. HTC has their own tailored user experience which they ship with their phones like the One mini, with Sense, and probably some carrier restrictions (like custom restricted Wi-Fi tethering on AT&T). HTC first, because it's a product manufactured FOR Facebook, and marketed as A Facebook phone, has a different user experience from typical HTC products. Samsung has their own tailored user experience with their own apps and Touchwiz. Finally LG makes their own phones too, however the Nexus device they make for Google is a Google product, and Google tailors the user experience for their product. I like Google's vision of the smartphone user experience (I had a Nexus One before), and that's what I want to achieve with the current phone. True, that I could have bought a Nexus 4, however HTC's hardware design allows me to do things that are seemingly impossible with LG... Like swapping the IMEI (don't ask).

Not everybody wants their user experience be of HTC or CM flavor. Please be respectful of that. Arguing against wishes of others accomplishes nothing.

I believe it's clear enough that One mini updates can AND WILL be ported to our phone, there is no point to discuss that further in the context of THIS thread.

1. SWAPPING IMEI IS ILLEGAL
2. You are correct, htc has some briliant hardware but the nexus 5 is a monster now haha
3. Go get the stock aosp android rom (4.2 or 4.3) then get a kernel for our phones, and flash it....see what you get and PLEASE let me know if it works cause i highly doubt it.
4. The reason why i duscussed the One Mini ports, is because if they are successfull, you can use them as a basis for for other ports like a nexus 4 port. and it doesnt have to be a nexus 4 port, it can be anything else, just at the moment, so far we have ZERO roms that boot, one bricked phone because of a blind build, and what you basicaly want is a blind build of a nexus 4 rom...so if youre willing to put your phone on the line, go right ahead.
 
Last edited:

r00tb33r

Senior Member
Apr 16, 2010
50
2
1. SWAPPING IMEI IS ILLEGAL
2. You are correct, htc has some briliant hardware but the nexus 5 is a monster now haha
3. Go get the stock aosp android rom (4.2 or 4.3) then get a kernel for our phones, and flash it....see what you get and PLEASE let me know if it works cause i highly doubt it.
4. The reason why i duscussed the One Mini ports, is because if they are successfull, you can use them as a basis for for other ports like a nexus 4 port. and it doesnt have to be a nexus 4 port, it can be anything else, just at the moment, so far we have ZERO roms that boot, one bricked phone because of a blind build, and what you basicaly want is a blind build of a nexus 4 rom...so if youre willing to put your phone on the line, go right ahead.

1. Depends, still, don't do it. I don't tell others to do it, and won't say how even if asked. But that's a feature I need hence why I choose HTC.
2. More than I need.
3. When I get around it. Fortunately it's possible to unbrick these if something goes terribly wrong (I have the JTAG pinout for this device). I am waiting on a new JTAG box from the team before I release the pinout to public... Unless of course anyone wants to donate a new box or badass logic probe or a very high speed digital oscilloscope.
4. Of course the One mini port will happen before any others because it will take the least time, however not all of us want to use it.