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

Root [DEV] Continuing Triumph ICS Development

It appears there are some differences between the instructions set and what is necessary to complete the setup. Minor stuff to most but I'm not fluent in linux so It's been a fun challenge. I didn't have to start from scratch but I did have to copy the instructions from the google doc over to a notepad, which I could then paste into Terminal. As long as I'm not destroying my phone or my computer, this is the best way to learn.

I appreciate the tip though.

I do this as user, not root, (I really don't see a reason to do this as root) on my computer
Code:
mkdir ~/bin

PATH=~/bin:$PATH

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

chmod a+x ~/bin/repo

mkdir android

cd ~/android

repo init -u https://github.com/mantera/android.git -b ics

repo sync

cd ~/android/vendor/cm/

./get-prebuilts

cd ~/android

repo sync

. build/envsetup.sh && brunch triumph
Delete both the android and bin folders and try again from scratch
 
BTW: An update on what I'm working on currently. I got the 2.6.35.14 kernel "mostly" working. It boots up but something's not right just yet. So I've been spending time trying to figure out wtf that is causing the fc's. If anyone has suggestions on this particular error message in logcat, it would be helpful:

E/rmt_storage( 164): rmt_storage shared memory ioctl failed

And here's the full dmesg:

Motorola Triumph 2.6.35.14 kernel dmesg - Pastebin.com

Awesome work. Once the 35 kernel is stable, I'll take another shot at the video decoding stuff. I suspected that our 32 kernel was the reason that the fix from the desire HD wasn't working.
 
I'm close to having a VM setup to build Mantera's source in my spare time to start mucking with the camera. Sorry to be late to the party, but can someone give me a 5000 ft view of the current state of affairs? My assumption is that the primary obstacle here is that we don't have any source for the camera at all, we just have binary blobs from stock that work with 2.x, is that correct or wildly inaccurate?
 
I'm just going to go out on a limb here and say no. I'm sure he will give an update when there is one to give. This is complicated stuff and it takes A LOT of time to grasp even for experienced developers. If only there were more hours in a day....


Anyway... I finally got some more time to look at HDMI again. I figured out the source of the error when starting the daemon and I figured I should document it for anyone else who comes across it. The error that says:
reloc_library[1311]: 770 cannot locate '_ZN7android21SurfaceComposerClient16enableHDMIOutputEi'...
CANNOT LINK EXECUTABLE

The source of that problem is from libsurfaceflinger_client.so so swapping that with andro-ids version fixed it.


@aaronfitz
Not sure if you are still working on this but I grabbed the logs of a successful hdmi connection/disconnect while running andro-id. Hopefully comparing it against what we are getting may point us in the right direction.

On disconnect:
Code:
D/HDMIDaemon(  137): processUevent: event.action == offline
D/HDMIDaemon(  137): sendCommandToFramework:'hdmi_disconnected' successful
E/HDMIListener(  187): handleEvent 'hdmi_disconnected'
E/HDMIService(  187): Broadcasting ... HDMI_CABLE_DISCONNECTED
V/AudioService(  187): HDMI disconnected
E/HDMIService(  187): Broadcasting ... HDMI_DISCONNECTED
E/HDMIListener(  187): writeCommand: 'disable_hdmi'
On connect:
Code:
D/HDMIDaemon(  137): processUevent: event.action == online
D/HDMIDaemon(  137): bool android::HDMIDaemon::readResolution(): edid_modes file empty buf== '4' mode== '4'
D/HDMIDaemon(  137): sendCommandToFramework:'hdmi_connected: 4' successful
E/HDMIListener(  187): handleEvent 'hdmi_connected: 4'
D/HDMIService(  187): notifyHDMIConnected ... Broadcasting On
D/LightsService(  187): Incoming Notification: ID(17302346), Title(Video out connected (HDMI)), Show Light(false), Default(false), Color(0x0), onMS(0), offMS(0)
V/AudioService(  187): HDMI connected
E/HDMIService(  187): Broadcasting ... HDMI_CONNECTED, modes: 1
E/HDMIService(  187): Broadcasting ... HDMI_CABLE_CONNECTED
D/HDMIDaemon(  137): bool android::HDMIDaemon::readResolution(): edid_modes file empty buf== '4' mode== '4'
D/HDMIDaemon(  137): GET Info<ID=4 1280x720 (110,40,220), (5,5,20) 74MHz>
D/HDMIDaemon(  137): SET Info<ID=4 => Info<ID=4 1280x720 (110,40,220), (5,5,20) 74MHz>
E/HDMIListener(  187): writeCommand: 'enable_hdmi'
I am going to keep trying to get this on CM7 for now. I haven't gotten any communication going with the daemon yet even though it seems to be running and started. Any ideas?
I'm hoping I'll have more time next week to work on this more.

By communication, do you mean between hdmid and the Android framework HDMIListener/HDMIDaemon? If so, try running hdmid once per boot. hdmid can open the framework socket multiple times, but the framework must send it a "start" event for the connection between the two to come up. The framework is coded to only do this once at boot. I only tried having my hdmid service auto start, but I imagine rebooting and then starting manually would work as well.

Good dock figuring out the shared library difference. Hopefully cm7 works quickly. I see output from the Audio and video services on your successful log at. Wonder why those aren't getting the event in cm9. Hm...
 
I'm close to having a VM setup to build Mantera's source in my spare time to start mucking with the camera. Sorry to be late to the party, but can someone give me a 5000 ft view of the current state of affairs? My assumption is that the primary obstacle here is that we don't have any source for the camera at all, we just have binary blobs from stock that work with 2.x, is that correct or wildly inaccurate?

That's correct.
 
That's correct.

Speaking of the Camera mantera, I noticed the libcamera.so in the device/motorola/triumph/prebuilt/lib is a different size than /vendor/motorola/triumph/proprietary did you use a different one for prebuilt or is this code left over from ikarosdev?

EDIT* Never mind I answered my own question it is from ikarosdev, I guess the question is did ikarosdev take that from CM or did he recompile the driver himself as I know it's getting copied over from the device_triumph.mk.

EDIT 2* I wonder if we shouldn't change the copying of the camera file like TickerGuy does it. He is using the complete stock binary blobs. I will try that tonight when I get home

PRODUCT_COPY_FILES += \
vendor/motorola/triumph/cherry/libcamera.so:/system/lib/libcamera.so \
vendor/motorola/triumph/cherry/libcamera.so:/obj/lib/libcamera.so \
vendor/motorola/triumph/cherry/liboemcamera.so:/system/lib/liboemcamera.so \
vendor/motorola/triumph/proprietary/libmmjpeg.so:/system/lib/libmmjpeg.so \
vendor/motorola/triumph/proprietary/libmmipl.so:/system/lib/libmmipl.so
 
Speaking of the Camera mantera, I noticed the libcamera.so in the device/motorola/triumph/prebuilt/lib is a different size than /vendor/motorola/triumph/proprietary did you use a different one for prebuilt or is this code left over from ikarosdev?

would swapping them around do any justice?
 
Okay so I am now getting a blue screen of life (or maybe it is still of death) on my monitor when I plug in the HDMI from my phone. The problem was in the framework. I still think I have a problem there because I am not getting broadcasting events from the HDMIService.

I was hoping that from this point I would be able to plug in the libraries from Andro-Id and everything would be dandy, but that hasn't worked yet. I probably still need to figure out why the HDMIService isn't broadcasting the event when the cable is connected and disconnected.
 
Okay so I am now getting a blue screen of life (or maybe it is still of death) on my monitor when I plug in the HDMI from my phone. The problem was in the framework. I still think I have a problem there because I am not getting broadcasting events from the HDMIService.

I was hoping that from this point I would be able to plug in the libraries from Andro-Id and everything would be dandy, but that hasn't worked yet. I probably still need to figure out why the HDMIService isn't broadcasting the event when the cable is connected and disconnected.

Not sure if you saw this post in the TG-Reloaded thread, it may contain some info helpful for getting HDMI working. I will look into it when I have time, but I'm not motiviated to get HDMI working, esp since I never use it and don't have a mHDMI cable either.

http://androidforums.com/triumph-al...g-reloaded-latest-03-04-a-78.html#post4073817
 
In trying to set up my environment, after registering with HTCDev, I am having the following error:
Downloading OpenSense SDK for Phones by HTC, Android API 10, revision 2
Download finished with wrong size. Expected 7170813 bytes, got 93 bytes.

So, that is not unzipping. Is there an easy way to manually download that one component, or should I just re-run the SDK update?

edit: bah this should have gone in the environment setup thread, sorry for the derail.
edit2: looking at what OpenSense is, it seems like it may not matter whether or not I have it, can anyone elucidate that point?
 
I'm going with what I know, so I first looked into the AudioService and AudioSystem classes of framework.jar and what do I find? The same code edits (well, not the same, but similar) that I did for the DroidX will need to be done for the Triumph in order to enable HDMI audio. That component should not be that difficult. Declare the broadcast intent receiver in AudioService and then complete it with the audio routing code which follows later. A simple comparison to Cyanognemod source code should make recontructing the code relatively easy. Another edit will need to be done to AudioSystem to make sure that DEVICE_OUT_AUX_HDMI is declared and that there aren't any conflicts. Make sure you check the source of AudioSystem.h as well.

Edit: BTW, I'm looking at ziggy64's recently posted 2.3.4 WIP build
 
Within the same framework.jar, go to android / os / IHDMIService. My guess is that the entire class is going to need to be ported over. Sounds pretty crucial.

Edit: Maybe this has already been found? Maybe not?
 
Within the same framework.jar, go to android / os / IHDMIService. My guess is that the entire class is going to need to be ported over. Sounds pretty crucial.

Edit: Maybe this has already been found? Maybe not?

Yeah I have IHDMIService which is just an interface. In services.jar is where most of the HDMI code stuff is- com/android.server/HDMIService and HDMIListener

I grabbed the HDMIService code (and HDMIListener) code from https://www.codeaurora.org/git/proj...ices/java/com/android/server/HDMIService.java

It seems to be nearly identical to the decompiled code from Andro-ID (which is the base of ziggys rom). One difference is that it doesn't look like it sends out the notification (for the notification bar) but I am thinking that isn't necessary- I may try to code that part up just in case.

I got my HDMIService to start broadcasting but I am still just seeing a blue screen. At this point, I am unsure as to where the problem with the video could be. I may try to start working on audio.
 
I would like to work on the auto brightness, as it seems to not yet work and is not listed as working. I have the kernel and working on getting the repo to build. Could someone update me on the progress of auto brightness. For instance, is the light sensor working at the kernel level?

I had trouble building due to failure below:

Code:
java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpITnCY3 out/target/product/triumph/cm_triumph-ota-eng.root.zip
java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:127)
	at java.util.jar.JarFile.<init>(JarFile.java:135)
	at java.util.jar.JarFile.<init>(JarFile.java:114)
	at com.android.signapk.SignApk.main(SignApk.java:454)

The fix for me was to decrease the memory for virtual machine to 1024 (-Xmx2048m => -Xmx1024m) in device/motorola/triumph/releasetools/triumph_common.py
 
Use the AndroSensor app from the market to test if the light sensor is working on your phone, it should be in the kernel.
 
Hey mantera how's the 35 kernel coming along ? Just wondering if you were still having problems with it or anything and as always thank u and all the devs for this beautiful amazing rom

I haven't had time to look at it the last few days. I'll have to take a look at edowar's stuff to see if it works for us.
 
Well, I tried it in cm9. Looks like these work. Performance wise, it's no difference to what we had before according to nenamark2. I got the same score.

However, it looks like we still need to update our kernel drivers to get the full effect of these drivers I think. We're getting these errors:

I/Adreno ( 118): ioctl code 0x40140931 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 22 Invalid argument

I/Adreno ( 118): ioctl code 0x40140931 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 22 Invalid argument
 
Well, I tried it in cm9. Looks like these work. Performance wise, it's no difference to what we had before according to nenamark2. I got the same score.

However, it looks like we still need to update our kernel drivers to get the full effect of these drivers I think. We're getting these errors:

I/Adreno ( 118): ioctl code 0x40140931 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 22 Invalid argument

I/Adreno ( 118): ioctl code 0x40140931 (IOCTL_KGSL_TIMESTAMP_EVENT) failed: errno 22 Invalid argument

I just reran nenamark2 w/ 24 fps on CM7 03-04 build, then did a "logcat -d | grep "ioctl code" and didn't find any of those error lines.
 
Back
Top Bottom