• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Is anyone actually working on a ICS/JB Rom?

kanaida

Android Expert
Dec 2, 2010
788
336
Hey guys, just checking in to see if anyone was actually doing any kind of real work towards an ICS/JB rom.

So far, I know that we have hardware accelerated GPU drivers for ICS that will work with the adreno 220/snapdragon S3 chip. (Don't install this, it won't work for current roms)

I've never really taken an undertaking this big before, but if anyone's got any idea or pointers i wouldn't mind poking around.

Here's what I was thinking might possibly work:

The dirty way (kernel hacking/Rom modification)
1) Take the system/data part of a working ICS rom that's got specs pretty similar to this phone
2) Somehow build an ICS/JB Kernel, or copy one from a very similar device.
3) As i'm probably sure, we can't just have 100% working hardware off the bat, so i could probably insmod some kernel modules to see what we can make work. Perhaps borrowing again from another kernel/rom
4) Work out the little nasty bugs

The clean way (A real port from source)
1) Get the source for a very similar phone
2) Edit code/kernel config to make it work with this hardware by comparing stuff between this phone's source and the ICS/JB one. Not sure how plausable this is as i'm not sure how many changes would have to be made, and it would help to have someone who knows C pretty well.
3) Work out nasty bugs

Donor Phone: Verizon LG Viper 4G (LS840)
Open Source Source Code ICS 4.0.4.r1 (LS840ZVI)

For those interested in compiling the source and kernels, please read the readme file.
This will help set up an ubuntu 10.04 environment as well.
This will too

Even though there's higher versions of ubuntu, stick to the standard 10.04 64bit because you don't need as many workarounds to get things working.

If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree. Since i'm creating a virtual machine using virtual box, and I'm only assigning it 2GB ram -we need to configure the swap partition to be pretty big. I created a virtual machine with a 60GB hard disk. In the ubuntu setup i went to advanced disk options and created 2 partitions: 1)Primary 40GB Ext 4 for / and 2) Extended 20GB for swap.

My virtual machine config


Partition layout for the ubuntu guest OS


If you're using virtualbox like me, don't forget to install the Guest Additions. When it boots up, in the virtualbox window click Devices, Install guest additions. When the autorun prompt asks, hit ok. These make the virtual machine faster, and better integrated with your host OS.

Here's the readme for the source
1. Android build
- Download original android source code ( ICS 4.0.4_r1 ) from http://source.android.com
- Unzip opensource packages of LS840_android_ZVG.tar.gz into downloaded android source directory
- And, merge the source into the android source code(ICS)
- Run following scripts to build android
$ . build/envsetup.sh
$ choosecombo 1 generic user
$ make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain)
into the android folder
- After build, you can find output at out/target/product/generic

2. Kernel Build (User)
- Unzip LS840_Kernel_ZVG.tar.gz at the android folder
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain)
into the android folder.
$ . build/envsetup.sh
$ choosecombo 1 generic user
- Build kernel
$ cd kernel
$ mkdir -p out
$ make cayman_sprint_us_defconfig ARCH=arm CROSS_COMPILE=arm-eabi- O=out
$ make ARCH=arm CROSS_COMPILE=arm-eabi- O=out
- After Build, You Can find the build image at /out/arch/arm/boot

This script i just glued together from the docs accomplishes installing pre-requisites in ubuntu, and sync'ing the android source code tree. After this we need to merge the contents of the zip so we can build it, but before that we need to figure out exactly what we can merge etc... this is where the research part comes in. Since we have our phone and the donor phone, it makes sense to use the metro config, and just copy over anything we need to get a kernel and rom up and going. (this is the part where you guys help out :) )

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
#Cache stuff. Skipping this for now
#echo "\nexport USE_CCACHE=1" >> ~/.bashrc
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
sudo chmod a+x ~/bin/repo
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
repo init -u https://android.googlesource.com/platform/manifest
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r1
repo sync

If anyone is pretty good at using Git repositories for committing, branching etc.. and has a good tutorial let me know. I screwed it up pretty bad the last time :)


Update: Found a link that explains the RIL (Radio Interface) so people in the know can see if they can merge that code so the radio works :)

Working with the RIL

I've read around and it looks like this *could* be the file: libreference-ril.c
I've also seen references to path /hardware/ril

This is sample contents from an htc phone.

Looking at my own phone I found the following files:
/system/lib/libreference-ril.so (i think android talks to this guy, he uses the qualcomm binary)
/system/lib/libril-qc-qmi-1.so (I think this is/could be qualcomm's radio binary)
/system/lib/libril-qcril-hook-oem.so (another qualcomm binary looks like)
/system/lib/libril.so (probably a part of android again)

I found this in build.prop:
rild.libpath=/system/lib/libril-qc-qmi-1.so #This has to be the radio binary :)
rild.libargs=-d /dev/smd0 #This must be the radio device :)
persist.rild.nitz_plmn=
persist.rild.nitz_long_ons0=
persist.rild.nitz_long_ons1=
persist.rild.nitz_long_ons2=
persist.rild.nitz_long_ons3=
persist.rild.nitz_short_ons0=
persist.rild.nitz_short_ons1=
persist.rild.nitz_short_ons2=
persist.rild.nitz_short_ons3=
ril.subscription.types=NV,RUIM
ro.ril.disable.power.collapse=0

I will examine the code for these guys when i get home :) Hopefully this means just replacing these few files in the ICS source might be a good start.

A slide show showing the nitty gritty details on RIL

UPDATE: 11/20/2012
Found this in the Viper's kernel source:
/kerner/arch/arm/configs/cayman_mpcs_us_defconfig


UPDATE: 11/29/2012
Finally getting the build process to work :)
Shouldn't be long now before I can pack it into a rom for testing.
If anyone knows if I can still use android kitchen to pack ICS roms, or if I have to do anything different, be sure to let me know.
 
Un1ocked found a way to flash the vs840zv7.cab on our phones. I also was able to flash myself. I had no signal and wasnt able to get passed the setup wizard...I was able to get the ls840 ics kernel to compile using the mpcs defconfig. They say that the ls kernel is more similar to our phone. but, my computer just went down so i no longer have that kernel source anymore. I might have the boot.img still saved on my phone, i have to check.
 
Upvote 0
I've had to delete a few posts here because it was pointless and argumentative. "Pointless" and "argumentative" are not only frowned upon at Android Forums, but it makes my left ... eye ... twitch ... twitch ... twitch.

Let's remember to keep the threads on topic and not make critical comments about other members. Don't like what you see someone else say? Disagree with them politely. Think it steps over a boundary? Report it.
report.gif
. Anything more and the twitching will start up, and nobody wants that.
 
Upvote 0
Un1ocked found a way to flash the vs840zv7.cab on our phones. I also was able to flash myself. I had no signal and wasn't able to get passed the setup wizard...I was able to get the ls840 ics kernel to compile using the mpcs defconfig. They say that the ls kernel is more similar to our phone. but, my computer just went down so i no longer have that kernel source anymore. I might have the boot.img still saved on my phone, i have to check.

This is good to know. I'll see if I can get the source and play with it. If the radio didn't work, it could just be that we're missing the code for the radio kernel module and that code might be in the source for the mpcs. perhaps, another ics phone might have a compiled kernel module/binary that we can use because i'm sure they use the same radio chip on at least one other phone. Anyone know the make/model of that chip?

If the kernel itself compiles, in theory if all the drivers are working then just copying the /system stuff could make it boot.
 
  • Like
Reactions: schemppjr80
Upvote 0
Hey kanaida thx for looking into this for us connect peeps. it will b nice to have 1 more cool thing to possibly put/run on our phones and to add to the connect fam. I know the other devs that have done and that r doing work for our phones have been busy with their own projects (and there aint nothin wrong with that its all good :-] ). Who knows, this work ur doing may even help someone out on there future project, u never know ;-) and when the time comes for testers hit me up and I will try to help (tho I don't possess the knowledge of building roms or theaming) any way I can. Thank u and best of luck on getting ur project completed.
 
Upvote 0
I build on 12.6 just fine. Ubuntu doesnt even supprt 10.04 any longer, LTS is 12.04. The source.android site list what n how to setup 12.x.

Also a 64bit system is a must, at least a quad core and at the bare minimum, 8GB of RAM. Thats from what I have seen others get by with, but it still takes the ma few hours to compile. The recommended specs are much higher. ;)
 
Upvote 0
Un1ocked found a way to flash the vs840zv7.cab on our phones. I also was able to flash myself. I had no signal and wasnt able to get passed the setup wizard...I was able to get the ls840 ics kernel to compile using the mpcs defconfig. They say that the ls kernel is more similar to our phone. but, my computer just went down so i no longer have that kernel source anymore. I might have the boot.img still saved on my phone, i have to check.
have him PM me what he did to get it to compile with the mpcs config. If its booting I prolly can take a that and get CM9/10 booting at least. I still unfortunately cant devote alot of time to the connects CM yet tho.
 
  • Like
Reactions: jprosek and chrod12
Upvote 0
have him PM me what he did to get it to compile with the mpcs config. If its booting I prolly can take a that and get CM9/10 booting at least. I still unfortunately cant devote alot of time to the connects CM yet tho.

Heading to work soon. I lost the kernel source I used/modified to get it to compile. But as soon as I get back I'll start working on it again. I still remember what I did so it shouldn't take long.
 
Upvote 0
Thanks PG, I know whats it's like to have 100 unfinished projects :)

As for ubuntu though, I read this right from the android docs:

Setting up a Linux build environment
These instructions apply to all branches, including master.

The Android build is routinely tested in house on recent versions of Ubuntu LTS (10.04), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.

For Gingerbread (2.3.x) and newer versions, including the master branch, a 64-bit environment is required. Older versions can be compiled on 32-bit systems.

Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.


besides, inside a VM. ubuntu 10.04 is much more light weight. they really killed performance with unity. Luckily though, I just got a brand new SSD drive (an OCZ Revodrive Hybrid, PCIE 4x). It's read speeds can exceed 900MB/s at times so that should speed compiling and stuff on my core i7 box :D
 
Upvote 0
Here are some screen shots from the vs840 ics rom... I'm typing this using tapatalk over wifi. So far the Rom doesn't recognize the sim card im using so I'm getting no service.

Nice. Can you make a detailed list of stuff that works/doesn't work?

1)2d performance ok/laggy?
2)3d working?
3)sound
4)video decoding
5)bluetooth
6)Wifi
7)GPS
8)Bluetooth and pairing
9)Mic
 
Upvote 0
Nice. Can you make a detailed list of stuff that works/doesn't work?

1)2d performance ok/laggy?
2)3d working?
3)sound
4)video decoding
5)bluetooth
6)Wifi
7)GPS
8)Bluetooth and pairing
9)Mic

1.YouTube is working
2. I'm able to play games like minecraft and temple run... I'll download NFS soon to see how that plays.
3. The audio sounds much better and louder then the previous zva rom.
4. As for bluetooth, I don't really use it so I don't have a device to test to see if it's working.
5. The GPS is able to find my location so thats working.
6. Voice recorder works using the phones mic
7. I'm able to take pictures with flash and record video with no problem.

The only thing wrong is that the phone heats up, I'm guessing it's because the phone keeps searching for a signal. I also notice some lag when I'm scrolling through pages and opening some apps. But, this Rom still feels alot smoother then zva.
 
  • Like
Reactions: jprosek
Upvote 0
That sounds pretty promising. I'm guessing the CPU governor/speed is causing your heating issues. LG's handywork again lol.

I've been looking at the source tree between the ZVA and the Viper's ICS to see if I can find code related to the RIL (Radio Interface Layer). I think if we merge/copy some code from the ZVA into the ICS it will fix the radio problem. I added a link at the top that describes this layer.

This guy apparently dived into it for previous verisons of android. Hopefully it's similar.
 
Upvote 0
We might have to wait till the source code is release cause after flashing this the 4g stopped working on zva. I tried using the lg support tool to reinstall zva and still nothing. So i thought it might had been the the sim card because it look old and worn out, but it still doesnt work.

That sounds pretty strange because the RADIO components (gps/radio etc) boot before the loader, and i'm pretty sure flashing a rom didn't flash over your radio rom. The rest as far as i can tell are just files in the framework that interpret and send commands back and forth to that layer. Those files are part of the rom, probably in framework.apk

How did you go about getting it on your phone in the first place?
from what i've seen so far, it's most likely /system/lib/libreference-ril.so

Oh, wait a minute. Try dailing the metro number to activate... I think *611, or *211 something like that. And try to activate (using the new rom)
 
Upvote 0
I used the kp500 to flash that file into the phone. Its kinda like kdz. It uses the lg support tool to install the rom. The very first time i flashed it booted into the animation screen then after that a weight screen poped up which had an encryption error. so i performed a factory reset, then i was able to boot with no service. Then 4g stopped working.

Edit: i wanted to add that i was able to see the notification bar during that encryption error and i saw that i had a signal with about 4 bars.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones