x86 only ROM Building

x3r0.13urn

Senior Member
Nov 1, 2012
87
22
38
I was wondering about... Is it true if x64_x86 build (arm64) uses more RAM than just x86 (arm)? Considering this phone can't take any advantages of 64 bit OS (cmiiw), I just wonder whether it's possible to build the x86 ROM version of any available custom ROM out there?

I know only a little about theoretical of why it wouldn't be easy task / wouldn't possible perhaps due to its kernel only available in x64_x86 build... or it needs a lots of codes rework (since C++ x64 has additional instruction/data types which not available in x86), or its blobs only available in x64_x86... So, anyone has more convincing arguments about this task?
 
Last edited:

wertus33333

Senior Member
Sep 14, 2016
185
119
43
Hi x3r0.13urn
Just to clarify things: our Mi4c/s is built with a arm 64 SoC (system on a chip), and x86 means a different processor architecture (like computer cpu's) so there are 4 (common) cpu architectures:
"Normal" CPU: x86 (32 bit) and x64 (64bit)
"Mobile" CPU: Arm (32bit) and Arm64 (64bit)

So your question is, if it would have any benefits building an arm (32 bit) kernel/rom/Firmware for our arm64 Mi4c/s.
As the CPU itself is made for Arm64 i think there are lots of optimizations (things I, the noob, doesnt understand) in the Kernel/Firmware/Rom so it would be useless to go back to the old arm 32 bit environment (DEV's correct me if i'm wrong).
An idea of mine: Why not build an ARM64 Rom with small textures and low resolution? The screen would look **** but i think there would be many battery savings and more performance to use for other things..

Greetings
Wertus
 

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
I don't see why you need better performance, Mi4c is an already powerful device.
Regarding OP, there is no 32bit kernel developed for any msm8992 phone, as Qualcomm made it a 64bit chip and optimized the kernel for 64bit usage. So no, we can't compile a 32bit kernel for msm8992, and even if we did, it would be bad.

Regarding the smaller textures, a lot of Android is now vector graphics, and you can't make them smaller, and having smaller textures than we need would be useless as they would have to be upscaled to display them. The phone might even consume more power to upscale them.
 

x3r0.13urn

Senior Member
Nov 1, 2012
87
22
38
I see... So, if it's true, the problem there's no x86 kernel source thus afflicts other aspects. It's quite shame... since even up till today, 32-bit only OSes (Windows, *nix) are still available.

I agree on, yes SD 808 packs a punch to withstand today's need. Regarding about textures, I take it we're talking about resolution downscaling (from 1080p to 720p?), would save few MiB of RAM usage, and it will also lower CPU usage, though in my personal experiences, it won't prolong battery life very much.
 

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
I see... So, if it's true, the problem there's no x86 kernel source thus afflicts other aspects. It's quite shame... since even up till today, 32-bit only OSes (Windows, *nix) are still available.

I agree on, yes SD 808 packs a punch to withstand today's need. Regarding about textures, I take it we're talking about resolution downscaling (from 1080p to 720p?), would save few MiB of RAM usage, and it will also lower CPU usage, though in my personal experiences, it won't prolong battery life very much.
Windows and Linux distros must run on a lot of machines, and be compatible with all.
The Linux kernel found in a Android device is much different, as it targets one specific chipset, which in this case 64bit. Also, 64bit is overall much better than 32bit, the only drawbacks being RAM usage(but the differences are really small!).

No, I was talking with the other guy which mentioned using lower textures.

About lowering resolution, it can actually get worse. In games where FPS isn't locked CPU can become a bottleneck, because GPU has less work to do and therefore it can finish it faster, then it requests more data from the CPU, and so on, until the CPU can't keep up.

Overall you can't really improve this device much on the speed side of things, and ROM developers try to improve battery life already. The problem is that users use their devices in various ways and you can't make everyone happy.
So yeah, we do our best to optimise stuff and if it hasn't been done then it can't be done or it doesn't improve anything.
 

wertus33333

Senior Member
Sep 14, 2016
185
119
43
No, I was talking with the other guy which mentioned using lower textures.
Overall you can't really improve this device much on the speed side of things, and ROM developers try to improve battery life already. The problem is that users use their devices in various ways and you can't make everyone happy.
So yeah, we do our best to optimise stuff and if it hasn't been done then it can't be done or it doesn't improve anything.
I meant to reduce the resolution (sry, explained it wrong with textures).
Well, i guess a lot of people want to use the Hardware they have (why 720p if u can use 1080p "to show ur friends"?)

I just wonder if one could compile- lets say- an HTC desire HD rom, which works fluently at 700mhz with a single core cpu (and even an old one). So you could adjust the governor settings of the mi4c (with a better optimized cpu, gpu, bigger battery...) and get an incredible battery.
I understand that this is not wanted from most of the users because u have an old system, missing many functions and u cant use your new device to the full excess because of the software.
But to use this rom when i dont have the chance to charge my mobile for 3-5days (with multirom) would be great (if that works how i imagine it).

Edit: And yes, the mi4c is very nice for performance, just the bat could be better ;)
 

terence.tan

Member
Jan 13, 2017
40
82
28
Canberra
keybase.io
With regards to the battery: unfortunately for the short term, the solution is to buy an external battery (i.e. power bank), or do "extreme" things like switching on aeroplane mode, dim screen, powersave governor, etc.

In the medium term, there are things developers can do. However this work is very detailed and requires lots of testing. There's plenty of tweaks one can make with the CPU core load balancing, voltages, frequencies etc. It's difficult because there are so many knobs to twiddle, and so many ways to make things worse.
 
  • Like
Reactions: wertus33333

wertus33333

Senior Member
Sep 14, 2016
185
119
43
With regards to the battery: unfortunately for the short term, the solution is to buy an external battery (i.e. power bank), or do "extreme" things like switching on aeroplane mode, dim screen, powersave governor, etc.
Well, with all connections shut down (except for mobile network, without mobile data) it holds about 2 days (i'm still taking pictures and phoning), which's not bad. i also use my own governor values (gave me the most).
But where to charge the power bank (they are empty fast on festivals..)? xD
Thx for your explanation/help, but i think i'll just end up attaching a stronger battery to my one x (which holds around 1.5-2 days with same usage).
Do you know if i need to adjust any kernel parameters for a new bat (i dont think so)?
 

terence.tan

Member
Jan 13, 2017
40
82
28
Canberra
keybase.io
Well, with all connections shut down (except for mobile network, without mobile data) it holds about 2 days (i'm still taking pictures and phoning), which's not bad. i also use my own governor values (gave me the most).
But where to charge the power bank (they are empty fast on festivals..)? xD
Thx for your explanation/help, but i think i'll just end up attaching a stronger battery to my one x (which holds around 1.5-2 days with same usage).
Yeah. I'm not sure that there's a lot more you can do, without a developer actually running a profile on your phone to see what's drawing power.

Along the same lines, performance is important. We have a concept called "race to sleep", which means that the phone runs faster for a shorter time, then can go to idle. This saves power.

One strategy is to use hardware acceleration where possible. For example, using crypto hardware instead of in software. This is one example of a medium-term project that requires lots of testing, because if you get crypto wrong, you can lose your data...

Do you know if i need to adjust any kernel parameters for a new bat (i dont think so)?
I'd just try it and see if it auto-detects.
 

terence.tan

Member
Jan 13, 2017
40
82
28
Canberra
keybase.io
Re: aeroplane mode and power saving. Here's the quote I was looking for:

During its research for Project Volta, Google took a Nexus 5 and put it in airplane mode and measured how long it took to die with the screen off. In normal use, the device struggles to last a full day, but while idling like this, it lasted a full month. The takeaway was that if you can just get the phone to stop doing stuff, your battery life will greatly increase. After this research, it's no surprise to see Google focusing on deeper sleep modes.
Source: https://arstechnica.com/gadgets/201...permission-controls-fingerprint-api-and-more/

This is what I mean by, with a persistent developer who looks for all the details, you can get results like above...
 

wertus33333

Senior Member
Sep 14, 2016
185
119
43
Re: aeroplane mode and power saving. Here's the quote I was looking for:

Source: https://arstechnica.com/gadgets/201...permission-controls-fingerprint-api-and-more/

This is what I mean by, with a persistent developer who looks for all the details, you can get results like above...
My op2 holds around 3 weeks if i only use it as an alarm in the morning (with some minor tweaks, without gapps).
What really made me think is that the op2 with its 5.5" screen and a 3300mah bat gets around 10h SoT (lowest brightness, just idling) and the mi4s with its 3260mah and 5" screen only about 4h SoT (lowest brightness, idling).
Its not that hard to get results like in your link if you adjust the gov to just keep cpu load on the lowest possible. I also got 2 weeks with an SGS plus just idling around, but when i use it to browse the web its empty in 30mins xD.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone