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

Root [ROM] Jiilik's custom Shine Plus ROM's

I was thinking of the same thing. I just have a few questions concerning the kernel:

So there's some specific stuff to the phone such as bluetooth, radio, telephony... are these stored in the kernel (boot.img) or in the other source (system.img)?

Since we can pull a working system.img from our phone, can't we use that as a base and do a diff with what's different with CM7? Would it be a matter of drag-drop replacement with some configuration editing or would we have to actually build from source?

Okay, so keep in mind that I'm still learning too, but here's the situation as far as I understand it (which might be less than I think I do). My apologies if I oversimplify this, but it might be useful to others too :)

There are actually two processors in our phone - there's an arm9 processor that controls the actual cell phone bits. This processor needs some software to run. This software is what we refer to as the radio.img. It's a big binary proprietary blob. This part of the phone also controls things like whether the phone is SIM-locked to a provider (Telus) or Sim-unlocked and can use other sim cards. It is, gererally speaking, locked down and inaccessible to us, the user. We can get some information about it by sending funny commands into our phone - for example, if you punch in *#06# in the dialer, the radio spits out your IMEI number. Other codes change other settings. Most of these are standard for any phone that uses the same chip and baseband, regardless of whether their running symbian, android, wp7, whatever.

Then we have a second processor on our phone, an arm11 processor. This is the phones 'main cpu', which runs android. It's really a full fledged computer, with all sorts of things integrated, like 2d and 3d GPU's and such. This is the part we get to play with. Pretty much all hardware on the phone is connected to this CPU, including the wifi, graphics, touchscreen, etc. This means we get to control these devices from android.

Additionally, inside the kernel, there's a bit of code referred to as msm_proc_comm - this is the interprocessor communication code that allows our main CPU to send and receive commands from the radio's CPU. This is how the phone gets data to and from the mobile network, etc.

The unfortunate thing is that anything in the radio is off limits to us. Sad, really, but probably a good thing from a regulatory position - imagine if we could arbitrarily change our cell frequencies, transmit power, or even spoof our phone as being someone elses. Anyway, this stuff is all in the radio bits.

Our kernel contains drivers for all the other hardware, and drivers to communicate with the radio.

For a few things, this is easy, like the keyboard. There's some wires that connect the keyboard to the cpu. If there's voltage on those wires, a key is being pressed. Figure out which wires, and in what combo, and the kernel knows which key it is.

However, most drivers contain something called firmware. Firmware is a sort of software that is loaded into the hardware itself to program the behaviour of the chip. Many of our phone's devices require firmware to operate. So far, I can see that the 3D graphics, bluetooth and wifi require firmware, although the touchscreen and a few others might too.

The 3D graphics firmware is located in /system somewhere... they have file names like yamato... Bluetooth has firmware somewhere, but I haven't tracked it down yet... the wifi firmware is called BCM4329B1_002.002.023.0313.0341.hcd or similar, depending on the version of the phone... I think the program called tsdown loads firmware to the touchscreen too.

Anyway, the firmware is all binary blobs. The kernel loads the firmware into the device when it initialises that device's driver. The drivers themselves are open source, but the firmware is not and needs to come from the manufacturer.

So, the short answer to your question: some of this is in the radio.img (inaccessible), some is in the kernel (which we can make), and some is in system.img as binary firmware. We should be using the kernel and firmware that matches our phone, or things will simply not work.

This means, we need to use the radio, the kernel, and the firmware that matches our phone. We'll also need a few other odds and ends, such as the startup scripts that ensure all the right drivers and firmware get loaded when we boot. If we can isolate the firmware and startup scripts in system.img and boot.img, we're laughing.

Aside from that, we can probably get away with anything else installed, assuming it's compiled for armv6 and not armv7. See, most of the apk's that one installs on android are written in java. They are machine agnostic. The underlying bits that power the phone, however, are not. So, by simply porting in non-java files from other phones, there's no guarantee that they'll run on ours. Phones with the same CPU are probably safe though. For example, the CM7 port to the ZTE Blade might be a good place to start from, since it has the same CPU.

Wow, wordy today. Hope that's useful.

I'll work from the angle of getting a build specifically created for our phone. If you want to try to do it by stitching together the differences between ours and another phone's rom, please indulge yourself. One way might be more successful than others at this point.
 
Yeap that was completely helpful! So it seems there's things all over the place. Hmm, I believe you'll have better luck than I with getting a working build from source on the phone.

I'll try my approach and hopefully we'll be able to come up with something workable.
 
Yeap that was completely helpful! So it seems there's things all over the place. Hmm, I believe you'll have better luck than I with getting a working build from source on the phone.

I'll try my approach and hopefully we'll be able to come up with something workable.

Okay, not sure I've got everything yet, but here's my tentative list of proprietary files contained in system.img that cannot be replaced with the open source equivalents.

Code:
$ tree
.
`-- proprietary
    |-- bin
    |   |-- BCM4329B1_002.002.023.0313.0341.hcd
    |   |-- akmd2
    |   |-- netmgrd
    |   |-- port-bridge
    |   |-- qmuxd
    |   |-- rild
    |   |-- rmt_storage
    |   `-- tsdown
    |-- etc
    |   |-- firmware
    |   |   |-- wlan
    |   |   |   |-- cfg.dat
    |   |   |   |-- qcom_cfg.ini
    |   |   |   `-- qcom_fw.bin
    |   |   |-- yamato_pfp.fw
    |   |   `-- yamato_pm4.fw
    |   `-- wl
    |       |-- nvram.txt
    |       |-- rtecdc-apsta.bin
    |       |-- rtecdc-mfgtest.bin
    |       `-- rtecdc.bin
    `-- lib
        |-- egl
        |   |-- libEGL_adreno200.so
        |   |-- libGLESv1_CM_adreno200.so
        |   |-- libGLESv2_adreno200.so
        |   `-- libq3dtools_adreno200.so
        |-- hw
        |   |-- copybit.msm7k.so
        |   |-- gps.default.so
        |   |-- gralloc.default.so
        |   |-- gralloc.msm7k.so
        |   |-- lights.msm7k.so
        |   `-- sensors.alohag.so
        |-- libOmxAacDec.so
        |-- libOmxAacEnc.so
        |-- libOmxAdpcmDec.so
        |-- libOmxAmrDec.so
        |-- libOmxAmrEnc.so
        |-- libOmxAmrRtpDec.so
        |-- libOmxAmrwbDec.so
        |-- libOmxEvrcEnc.so
        |-- libOmxEvrcHwDec.so
        |-- libOmxH264Dec.so
        |-- libOmxMp3Dec.so
        |-- libOmxMpeg4Dec.so
        |-- libOmxQcelp13Enc.so
        |-- libOmxQcelpHwDec.so
        |-- libOmxVidEnc.so
        |-- libOmxWmaDec.so
        |-- libOmxWmvDec.so
        |-- liba2dp.so
        |-- libaudioeq.so
        |-- libauth.so
        |-- libbcmwl.so
        |-- libdiag.so
        |-- libdsm.so
        |-- libdss.so
        |-- libdsutils.so
        |-- libgsdi_exp.so
        |-- libgsl.so
        |-- libgstk_exp.so
        |-- liblgerft.so
        |-- libmm-abl.so
        |-- libmm-adspsvc.so
        |-- libmmgsdilib.so
        |-- libmmipl.so
        |-- libmmjpeg.so
        |-- libnetmgr.so
        |-- libnv.so
        |-- liboem_rapi.so
        |-- liboemcamera.so
        |-- liboncrpc.so
        |-- libpbmlib.so
        |-- libqmi.so
        |-- libqueue.so
        |-- libril-qc-1.so
        |-- libril-qcril-hook-oem.so
        |-- libril.so
        |-- libsnd.so
        |-- libwms.so
        `-- libwmsts.so

9 directories, 75 files

Some of these files may live happily in the CAF or even the CM7 source trees, so we'll see what can be trimmed.

If you see anything I've omitted, let me know.
 
Oh interesting, was this generated by the extract-files.sh? I'm still trying to find this file.

Well, yes, but I wrote the file myself. (I took inspiration from others out there...)

You can see my most current version online here... assuming I remember to commit my changes :)

Hope that helps.
 
Hey, jiilik! I just love everything you've been doing... excellent work... I have a request... I really don't know how easy or impossible it would be to do it... on the previous android version of the lg shine plus, there was the option for spanish laguage, but I guess they just left it behind like other equally not important things like stability :P...

I've used morelocale2 to set my apps in spanish, but the OS remains in english... so...
could it be possible to add spanish language to any of your custom roms? :$

If it would be too many work or just impossible, I'd understand... but, hey! I needed to ask! :D
 
the v008 didn't solve the "Gallery" issue while overclocking...
From wmy observation, some graphically more complicated games (such as "Hungry Shark"/ "Trial Xtreme") ran no problem while overclocking, but the 'not so complicated' ones(even "the Impossible Game" suffers.
Still, the upgrade is great cause ext4 is now supported , haha!
 
Hey, jiilik! I just love everything you've been doing... excellent work... I have a request... I really don't know how easy or impossible it would be to do it... on the previous android version of the lg shine plus, there was the option for spanish laguage, but I guess they just left it behind like other equally not important things like stability :P...

I've used morelocale2 to set my apps in spanish, but the OS remains in english... so...
could it be possible to add spanish language to any of your custom roms? :$

If it would be too many work or just impossible, I'd understand... but, hey! I needed to ask! :D

Heya Alexcess: yeah, I guess spanish would be useful in M
 
Thanks a lot jiilik, however my experience with the flashed ROM has not been that great so far. Basically every time the screen goes dark if I lock the phone without turning off wifi and wait a few seconds first, and after I took out the battery and put it back in and restart the phone, most of the process did not respond at the start (including the qualcomm ones) and I have to flash the ROM again every time to get my phone working, only to happen again next time the phone is rebooted.

I have tried v1,v7 and v8.

I have deleted everything on my SD card and formatted it, I have also tried to wipe out all user settings/factory reset the phone in the recovery menu and set this phone up like a new phone, however none seems to work. At the moment I am trying to flash my phone back to the stock ROM first (but not sure how I can do it, so it would be great if you could help me here: http://androidforums.com/shine-all-things-root/454782-flash-stock-rom-dz-file.html) and then tried to flash to your ROM to see if I can get better results.

My girlfriend's phone started doing the exact same thing whenever the black screen would happen. Battery pull gives FC's everywhere. Restore Nandroid and everything works. It's like a system file gets corrupted whenever the wifi fails and screen issue happens. Don't have much time to investigate.
 
So I spent some time last night trying to get "adb remount" to work correctly like in other CM roms. I double-checked to make sure ro.secure=0 was the correctly set in the default.props, flashed that, and checked when the phone itself was running (by using "adb shell getprop ro.secure").

Still nada.

All my Googling just shows countless people saying ro.secure=0 is the only prerequisite in order for adb remount to work. So I'm out of ideas for the moment.
 
So I spent some time last night trying to get "adb remount" to work correctly like in other CM roms. I double-checked to make sure ro.secure=0 was the correctly set in the default.props, flashed that, and checked when the phone itself was running (by using "adb shell getprop ro.secure").

Still nada.

All my Googling just shows countless people saying ro.secure=0 is the only prerequisite in order for adb remount to work. So I'm out of ideas for the moment.

Have a sort of work-around for you.
run adb shell

get root by typing 'su' (prompt should change from $ to #)
type 'sysrw'

/system will now be mounted read-write. To revert the change, type 'sysro'.

These two scripts I added to the phone using dsi's xda kitchen. I find them very useful.
 
Have a sort of work-around for you.
run adb shell

get root by typing 'su' (prompt should change from $ to #)
type 'sysrw'

/system will now be mounted read-write. To revert the change, type 'sysro'.

These two scripts I added to the phone using dsi's xda kitchen. I find them very useful.

Yeap that's what I usually end up having to do (in fact I've memorized it completely LOL):

adb shell
su
mount -o rw,remount /dev/block/mtdblock3 /system

Then to mess around with /system/app:

chmod 777 /system/app

Still. There should really be no reason why "adb remount" won't work. Especially with ro.secure=0 set. :(

EDIT: Is there a way to get ADB added to Superuser (the console)? I'm not getting the pop-up at all, even when performing su commands. Nevermind, I see it in the logs. I'm still derp.
 
Jiilik, I was working on a project to get the CRT off animation in our phones. To do this, I need to modify two things: framework-res.apk and services.jar (smali code editing, fun times ahead)

Considering my semester is ending in a week, I might have some extra time to get this going. Once I have the files and I've tested them (i.e.: CRT off animation works), I'll post the files and you can add them to your ROM. Keep in mind I'm going to TRY and do it. Not sure I'll succeed. ;) (Just activating CRT off in framework does not work, they pulled the CRT off animation from the code)
 
Jiilik, I was working on a project to get the CRT off animation in our phones. To do this, I need to modify two things: framework-res.apk and services.jar (smali code editing, fun times ahead)

Considering my semester is ending in a week, I might have some extra time to get this going. Once I have the files and I've tested them (i.e.: CRT off animation works), I'll post the files and you can add them to your ROM. Keep in mind I'm going to TRY and do it. Not sure I'll succeed. ;) (Just activating CRT off in framework does not work, they pulled the CRT off animation from the code)

To be honest, I have no idea what the CRT animation code is that you are referring to. :)
 
Sweet zombie Jesus, I actually got LG source to compile. Turns it the problem is with their "webkit" files within the source. I'm pretty sure at this point it's some bastardization of whatever webkit version they were using in 2.1

I've tried different webkits from Cyanogen 2.3.3, AOSP 2.3.3, and Cyanogen 2.2, and from trial and error with compiling and swapping in and examining key source files within each version, it looks as if LG's source webkit is from 2.1

I tried swapping in Cyanogen 2.2 webkit into AOSP then unzipping LG webkit over it (for a merge), and it failed on certain functions in some files that existed in 2.2/2.3, but not in the LG source.

The last step I'm trying right now is to give LG the finger and merge everything BUT their webkit source into AOSP 2.3.3. So far right now it's compiled perfectly fine.

I'll update when I have it cooked and flashed onto the phone as to the results.

EDIT: Nope. Stuck on the LG logo.
 
Sweet zombie Jesus, I actually got LG source to compile. Turns it the problem is with their "webkit" files within the source. I'm pretty sure at this point it's some bastardization of whatever webkit version they were using in 2.1

I've tried different webkits from Cyanogen 2.3.3, AOSP 2.3.3, and Cyanogen 2.2, and from trial and error with compiling and swapping in and examining key source files within each version, it looks as if LG's source webkit is from 2.1

I tried swapping in Cyanogen 2.2 webkit into AOSP then unzipping LG webkit over it (for a merge), and it failed on certain functions in some files that existed in 2.2/2.3, but not in the LG source.

The last step I'm trying right now is to give LG the finger and merge everything BUT their webkit source into AOSP 2.3.3. So far right now it's compiled perfectly fine.

I'll update when I have it cooked and flashed onto the phone as to the results.

EDIT: Nope. Stuck on the LG logo.

Well that's useful to know! Great work! Do you have adb set up? When my phone got stuck at the LG logo, I connected to it with adb and got a shell. Lets me try to figure out why it's locking.

Of course, it has to boot up far enough to even present start adbd. :D If it's hanging before that, then you're screwed and have to go to recovery mode.

Cheers
 
So, after many failed attempts, that involve attempting to correct each build error when merging LG's sources with AOSP, I've given up on that.

I've now learned how to use diff, vimdiff, and some other options. I'm currently looking at LG's changes in webkit with AOSP 2.3.3 and try to figure out why they did some things they did.
 
Hey, just so you know, I simply turned off the phone and when I booted it, I had FC's all over the place. Still on 007 ROM... Trying to recover from it right now. Something goes wrong with the shutdown of the phone, if it doesn't do a proper shutdown, something gets corrupted. Hard to say what though.
 
Hey, just so you know... Having ext4 support in the ROM doesn't help much, because Amon RA doesn't have ext4 support. You can't mount the ext4 partition properly for backup and recovery... Just thought I'd let you know.
 
Hey, just so you know... Having ext4 support in the ROM doesn't help much, because Amon RA doesn't have ext4 support. You can't mount the ext4 partition properly for backup and recovery... Just thought I'd let you know.

Well, I did make a clockwork recovery which is running an identical kernel, and thus has ext4 support. You could try using that. I've been running it on my phone for a few days quite happily.

Cheers

EDIT: Oh, I recommend doing a normal nandroid with GNM-ra recovery first in case things go sour. Also, back up your SD card using a computer or something before playing with any partitioning tools. You could lose your SD card data, including that shiny backup you just made :D
 
Hey, just so you know, I simply turned off the phone and when I booted it, I had FC's all over the place. Still on 007 ROM... Trying to recover from it right now. Something goes wrong with the shutdown of the phone, if it doesn't do a proper shutdown, something gets corrupted. Hard to say what though.

Okay, I don't know what this error is caused by, but it's happened to me before. I think it's related to corrupting the dalvik cache or similar. Reflashing doesn't solve it for me, but wiping and reflashing does. If it recurs here, I'll try wiping specific things, like just the cache to see if that can isolate the issue.

That said, I haven't had this error since your alpha 1.2. I think it's a problem inherited from LG's original rom. I don't know why it lays dormant or gets triggered.

Can you see if wiping the cache fixes it?

Cheers
 
I really appreciate all the work you're doing with this phone, jiilik.
I have a question, though. You said earlier in this thread that the cpu runs at a default of 480 Mhz, yet I'm running the stock 2.3 rom and android system info tells me that it's running at 600 Mhz.
Oh, and would it be possible to rollback/put in the drivers for the auto-brightness sensor from 2.1 so that that feature works again in 2.3?
 
Okay, I don't know what this error is caused by, but it's happened to me before. I think it's related to corrupting the dalvik cache or similar. Reflashing doesn't solve it for me, but wiping and reflashing does. If it recurs here, I'll try wiping specific things, like just the cache to see if that can isolate the issue.

That said, I haven't had this error since your alpha 1.2. I think it's a problem inherited from LG's original rom. I don't know why it lays dormant or gets triggered.

Can you see if wiping the cache fixes it?

Cheers

Will do right now. I actually have a nandroid that can reproduce the issue everytime. ;)

also, another Amon RA problem: It says it backs up sd-ext (Ext3 partition) but it does not. So if you symlink to sd-ext, it will not restore your apps, only data partition... Not sure if flashing CWM would fix that.

Did you try CWM? As in boot in it? I don't want to mess up my recovery right now. ;) haha
 
Back
Top Bottom