• 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

Yumbrad, do you mind telling me how you learnt this Android development (process, online guides, etc)? I have a break coming up and was looking to delve into this stuff. Just don't know where to start, and Google was no help.
 
tusing, around me, the signal is weak... one to two bars. 3g, however, works way better than before due to an improvement that VM sent me a text about a few weeks ago, along with the big bad we're gonna f with your data if you use more than 2.5gig (whatever). I occasionally use Wifi at home, not often due to the effects on battery life. Even on recent builds from mantera's source (CM7) I still get terrible battery life with Wifi on. Not really a big deal now that the system has been updated.

konspiracy, I know others like to use Wifi, but you didn't get exactly what I was getting at. Anyhow, if you have a fix, then by-all-means, go for it.
 
tusing, around me, the signal is weak... one to two bars. 3g, however, works way better than before due to an improvement that VM sent me a text about a few weeks ago, along with the big bad we're gonna f with your data if you use more than 2.5gig (whatever). I occasionally use Wifi at home, not often due to the effects on battery life. Even on recent builds from mantera's source (CM7) I still get terrible battery life with Wifi on. Not really a big deal now that the system has been updated.

konspiracy, I know others like to use Wifi, but you didn't get exactly what I was getting at. Anyhow, if you have a fix, then by-all-means, go for it.

Speedtest results? I'm jelly nao!

Anyways, I didn't receive any new towers in my area or updates. All I did receive is the big bad 2.5 gig text message. T-Mobile's $30 a month plan is looking compelling right now (5 gigs of 4G data, unlimited normal data after that, and 100 minutes (I use around 30 minutes/month)) and I will probably switch to them in a year (provided they retain a similar plan).

Only if phones like the Galaxy Nexus didn't have a bajillion percent markup off-contract D:
 
Speedtest results? I'm jelly nao!

Anyways, I didn't receive any new towers in my area or updates. All I did receive is the big bad 2.5 gig text message. T-Mobile's $30 a month plan is looking compelling right now (5 gigs of 4G data, unlimited normal data after that, and 100 minutes (I use around 30 minutes/month)) and I will probably switch to them in a year (provided they retain a similar plan).

Only if phones like the Galaxy Nexus didn't have a bajillion percent markup off-contract D:

I can post speed test result, but its kinda iffy. I can get good and bad results in the same 15 minute span. I don't think they have updated all the towers yet. The T-Mo plan would mess me up big time. I use about 6-800 minutes due to work and the usual crap, along with data. I do like the whole 4g deal though. I have heard alot of good coming from the T-Mo camp, but I'm in no hurry to switch up AGAIN. I had a really bad experience from Verizon (after 9 years, had MAJOR issues getting out from under their thumb, f-that). If I do decide to go with another plan, it will probably be Sprint, due to a discount I get through work. I could get the Galaxy Nexus from them, but I don't see a need for it now, thanks to the other devs here.
 
All, its been requested that a gentle reminder go out to everyone to keep the spirit and focus of this particular thread concentrated on discussing how to further the development of an Ice Cream Sandwich (ICS) port for the Motorola Triumph.

This is intended to be a developers / development thread, and as such, its requested that posts be kept on-topic and centered around ICS for the Moto Triumph.

I'm sure the desired end result of this will be something that will benefit the Moto Triumph root community.

Thanks for your cooperation and understanding.

Cheers!
 
Sorry for going off track.

Anyways, what I originally came here for before I saw Yumbrad's triumph was that I get errors when pulling from git, about the host being offline (I was in VirtualBox). Any ideas? Should I delete all local files and start again, or just continue trying to sync??
 
Yumbrad, do you mind telling me how you learnt this Android development (process, online guides, etc)? I have a break coming up and was looking to delve into this stuff. Just don't know where to start, and Google was no help.

Really don't know if this is irrelevant, so mods delete this if needed.
Look up "newboston Java" on YouTube. I'm studying up while I can. It teaches you all about Java and he even has a playlist for developing android apps. I'm studying up while I can.
 
Go into your folder and delete all items except .git if you cant see it then its okay.
Now resync and tell me what happens.
 
Okay what tells ICS where my wifi module is? I believe that for some reason our wifi driver is not being told to load when we swipe the on button

in adb.

D/Beautiful Widgets( 933): WIFI_STATE_CHANGED_ACTION
E/WifiStateMachine( 181): Failed to load driver!
E/WifiStateMachine( 181): DriverFailedState
D/Beautiful Widgets( 933): WIFI_STATE_CHANGED_ACTION
D/dalvikvm( 719): GC_CONCURRENT freed 405K, 11% free 9124K/10247K, paused 5ms+10ms

So it must not be loading the correct driver.
 
Really don't know if this is irrelevant, so mods delete this if needed.
Look up "newboston Java" on YouTube. I'm studying up while I can. It teaches you all about Java and he even has a playlist for developing android apps. I'm studying up while I can.

It's not irrelevant - it has to do with developing.

I just woke up from sleep, and I'll look at it tomorrow. Thanks for the link, I bet it will help others too.
 
Yumbrad, do you mind telling me how you learnt this Android development (process, online guides, etc)? I have a break coming up and was looking to delve into this stuff. Just don't know where to start, and Google was no help.

4 years of comp sci for the development background, and 11 years of linux development as my job. But the android specific bits - the internals we have to mess with are not well documented (writing end user apps is fairly well documented). That's why this was a time consuming lesson - as I was tracing through and I wanted to know how a particular piece of data traversed through the system, it'd be 10 google searches later and I'd understand part of a subsystem. But some of the keys are just from experience - a few basic tools really help to figure out what's going on: dumping every variable around the source of your "problem", using adb shell to get in and find out what's running ("ps"), what a program reads and talks to ("strace program"), what's in a file ("grep qmux /system/*.rc"), and simply what's there (good ol "ls"). Some of the O'Reilly linux books are free online and would be a good source of knowledge - applicable to Android and beyond.
 
As to what the issue was - in the end, as it usually is, it was pretty simple. Like the old joke about the guy getting paid for knowing *which* button to press :)

I began by porting in TG's changes. In the end, not all of these were necessary, and for ease of merging with ongoing CM9 development, I trimmed down to just what was needed: we need to ignore all the ICC (generic term for SIM/RUIM) stuff since this phone has no ICC, and handle the fact that the subscription info returned has only 4 elements, not 5 (and taking the PRL--normally the 5th element--from system properties).

At that point, it got further, and you can trace my previous posts to see how I decided to examine rild. I thought since rild was running and we had the same rild and qualcomm libril libraries, behavior should be the same so I was looking for some way in which they were configured differently. That led me to look at rmnet0, which the RIL was supposed to be bringing up in the step that errored. (Keep in mind that at each of these steps I'm doing lots of googling to get an overview of what people know - googling "SETUP_DATA_CALL," "rmnet0," etc..)

So rmnet0 is a kernel device driver, so that means code. Yay! But our kernels are the same, so I decided to look at the parameters (experience here).. That's when I saw the ETH/RAW_IP difference. That was a symptom, not a cause of the issue. Looking at the kernel source, I could see an ioctl (system call from userspace into the kernel) that would make that change, so (experience) I thought an strace would yield perhaps if the ioctl was failing or whatnot. The strace ended up yielding a lot ... I should have started there. What libraries/sockets/files rild opened up (especially with the -f option, which traces child processes that fork off). Then of course I saw the qmux_socket_connect opening failing that I mentioned.. more googling and looking at qmuxd, which should create that file. qmuxd must have died! It's started the same way in TG's and our init.qcom/triumph.rc ... Well, I tried in vain to get a dump of why qmuxd was dying - eventually, after looking closer at the ps I realized - duh, it's never starting. Then it clicked - the ps showed all the daemons in init.triumph.rc that had "class main" were running, and none that didn't. I went through adding "class main" to all the non-disabled services.

Then, with TG's changes and the class main changes, I got 3G flickering on and off. Traced that to a crazy version number in the log - I had turned off the datacall,signalstrength compatibility line at some point. Re-enabled that, and 3G was good. I just now pared down the changes to just what's needed, pushed them to my github, and sent mantera pull requests.

Hopefully this all will be useful/interesting to some. Like I said, often have to jump through a lot of investigative hoops to fix a silly simple problem :) One potential bonus - some of our other problems may stem from other daemons which weren't being started. Not sure why only class main now gets started in the vendor rc file.
 
Awesome find Yumbrad!

I am betting that will fix one of the problems we have/will have with WiFi. I have been trying to figure out why the driver isn't loading but haven't had success. But Edowar seems to be a step further and has his driver loading but he is getting this error:

E/WifiStateMachine( 235): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon

It seems it would be pretty hard to communicate with the service if the daemon never even started! Hopefully the fix is that simple because we don't have the source to the WiFi driver. So if we can somehow get the driver to load, have those daemons all started with your "class main" fix, and set the country code correctly- HOPEFULLY that will solve all our WiFi problems.

I put in your fixes and am rebuilding overnight, so I'll try it out in the morning.
 
Also, don't think it was working before, but is now: auto portrait/landscape orientation flipping.

If you're referring to the main homescreens, they were working before. You had to check the option in the Settings to allow rotation though.

Then it clicked - the ps showed all the daemons in init.triumph.rc that had "class main" were running, and none that didn't. I went through adding "class main" to all the non-disabled services.

It's funny that you say that was the issue... when I was adding the class mains to the other daemons lines to get hw accelleration and sound and so on working, I was thinking "I wonder if I should add the same thing to the rest of the daemons..." and I then thought "Nah, it's not going to be a problem." Turns out that was a big "Doh!"

Edit: I see that you changed the prl to 61007. Was that just needed? or did that just happened to be the prl that you're using?
 
If you're referring to the main homescreens, they were working before. You had to check the option in the Settings to allow rotation though.



It's funny that you say that was the issue... when I was adding the class mains to the other daemons lines to get hw accelleration and sound and so on working, I was thinking "I wonder if I should add the same thing to the rest of the daemons..." and I then thought "Nah, it's not going to be a problem." Turns out that was a big "Doh!"


So that's all you had to do to get alot of the stuff working? Lol that sounds so simple. :D
 
... Hopefully this all will be useful/interesting to some. Like I said, often have to jump through a lot of investigative hoops to fix a silly simple problem :) One potential bonus - some of our other problems may stem from other daemons which weren't being started. Not sure why only class main now gets started in the vendor rc file.

Probably another one-liner flag being set incorrectly somewhere. Since CM7 works, & the kernel is pretty much the same, most of the changes needed are just setting the right flag in the init.triumph.rc, system.prop, or BoardConfig.mk. It's time consuming to find, but I would say, if anyone finds themselves writing a whole lot of new code, they're probably going down the wrong path :)
 
Thanks for that link, quickly going through things, I noticed a few changes that may help. I won't be able to try this out myself for a while, but if someone has the time, these changes may help get wifi working:

files/etc/wifi/wpa_supplicant.conf

Code:
- ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
+ ctrl_interface=wlan0 DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
init.triumph.rc

Code:
- service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
+ service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c /data/misc/wifi/wpa_supplicant.conf -dd
(note the space between -c and /data/misc/wifi/wpa_supplicant.conf)

Code:
- setprop wifi.interface wlan0
+ setprop wifi.interface "wlan0"
+ setprop wlan.driver.status "ok"
 
Thanks for that link, quickly going through things, I noticed a few changes that may help. I won't be able to try this out myself for a while, but if someone has the time, these changes may help get wifi working:

files/etc/wifi/wpa_supplicant.conf

Code:
- ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
+ ctrl_interface=wlan0 DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
init.triumph.rc

Code:
- service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
+ service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c /data/misc/wifi/wpa_supplicant.conf -dd
(note the space between -c and /data/misc/wifi/wpa_supplicant.conf)

Code:
- setprop wifi.interface wlan0
+ setprop wifi.interface "wlan0"
+ setprop wlan.driver.status "ok"


I'll give them a whirl.
 
Actually on the service wpa_supplicant line, I just noticed the convention is to NOT have a space in between. So either consistently have no spaces or have all spaces.
 
Yumbrad's changes have been pushed up. Do a repo sync and you should be good to go.

IMO, the following needs to get fixed before an alpha release:

The web browser doesn't recognize touches.
The keyboard is still messed up.

Even with data, without the above, it's not very usable. Although, the market works fine. :)

Overall, data seems slower than with gb but it could just be a symptom of the other issues. working is better than not though.

Also, I ran a quadrant just to see what it would be like. I got a score of about 2100 at stock. So it's not the greatest but I think once we finish getting things working, and optimizing stuff, it will probably get better.
 
Back
Top Bottom