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

Root [ROM][PORT] Sharp ROM 2.2.2 for the Triumph (Updated: 12/16/12)

If you still haven't gotten the reboot/recovery to work by this weekend, I can spend a little time to take a look at that if you want.
That would be great, cause when I'm testing stuff, I always end up leaving the phone off while I get stuck reading how somebody got it to work on another phone. Then twenty minutes later, I look down and the phone is powered down and I can't remember which test zip I was gonna run or if I was just rebooting. :D

I am banging my head against the wall trying to rewrite methods. Of course, I am learning java by web search, so I figure I'll get a few lumps, but one wrong character and the whole thing breaks. I attached a zip with 2 smali files in it, one from sharp and one from stock. It is fairly short and only one method needs to be rewrote,
.method public static newFromParcel,
I would appreciate if you could see what you could do. Plus it may be one of the keys to mms on this rom, and it would give me a chance to see how it should be rewritten.

I use beyond compare and literally everything in that smali is identical except the method above and 2 methods from the Triumph:
.method private static isDoubleEncoded and
.method private static removeDoubleEncoding.

Just figured I'd ask a guru since I had your attention. :adore:

I know you are way up there on cloud 4 while this is just measly old 2.2, but I really think this rom could bring new life to the Triumph and act as a proof of concept for getting the sharp 2.3.5 working on our kernel. As, I really don't have hope for the 2.3.5 Sharp kernel on our phone from all my tests and understanding of the situation.

I've been wanting to help the ICS guys but got side tracked. I really think the xperia play ics beta is our best chance to get a very stable system on our phone. Sony releases almost all of there source code and the phone is on the same platform as ours. If you read their development site it tells how they had to rework the system to run smooth on a 512mb system, so there may be other benefits to using some stuff from that.
 

Attachments

  • SmsMessage.zip
    18.4 KB · Views: 70
  • Like
Reactions: viskon
Upvote 0
Update on MMS: These are the things I'm leaning toward being the cause/solution.

1. framework.jar: This is a complete list of files that MAY need to be modified. Most of these are simple adding of methods that are not present in the Sharp framework. Mainly getActiveProfile, getCdmaMin, getDeviceEsn, getDeviceId, getLine1Number, getSiwaKey, throughout the phone stuiff.
smali\android\telephony\TelephonyManager.smali

A bunch of files in smali\com\android\internal\telephony: (I'll narrow it down in time)

CdmaSMSDispatcher.smali (not really sure)
CommandsInterface.smali
Connection$DisconnectCause.smali
IPhoneSubInfo$Stub$Proxy.smali
IPhoneSubInfo$Stub.smali
IPhoneSubInfo.smali
ITelephony$Stub$Proxy.smali
ITelephony$Stub.smali
ITelephony.smali
PhoneBase.smali
PhoneFactory.smali
PhoneProxy.smali
PhoneSubInfo.smali
PhoneSubInfoProxy.smali
RIL.smali
RILConstants.smali
UiccManager.smali
VoicePhone.smali
WapPushOverSms.smali

cdma\CdmaCallTracker.smali
cdma\CdmaConnection.smali
cdma\CDMAPhone.smali
cdma\CdmaServiceStateTracker.smali
cdma\SmsMessage.smali

gsm\GsmCallTracker.smali
gsm\GsmServiceStateTracker.smali maybe also $1 $5 and $6
gsm\NetworkInfo.smali

test\SimulatedCommands.smali

smali\com\android\internal\R$string.smali

smali\com\google\android\mms\pdu\SendConf.smali

smali\com\google\android\util\AbstractMessageParser$Html.smali

Possibly a couple folders that are in the stock Triumph framework.jar
2. The corresponding edits made to framework.jar added to framework-res.apk, mainly strings.xml
It's funny cause it seems that Virgin used the same trick I did, to get the phone to show them as the carrier.

3. Phone.apk and Mms.apk from the stock Triumph, cause they have network info built into them, and make specific calls for phone info.

I am posting this as reference in an attempt to get as much info out there as possible. And maybe make it easier for somebody if they want to try their hand at a fix. Plus, if we do ever get the Sharp 2.3.5 running, I'm sure we will run into the same problems.
 
Upvote 0
That would be great, cause when I'm testing stuff, I always end up leaving the phone off while I get stuck reading how somebody got it to work on another phone. Then twenty minutes later, I look down and the phone is powered down and I can't remember which test zip I was gonna run or if I was just rebooting. :D

I am banging my head against the wall trying to rewrite methods. Of course, I am learning java by web search, so I figure I'll get a few lumps, but one wrong character and the whole thing breaks. I attached a zip with 2 smali files in it, one from sharp and one from stock. It is fairly short and only one method needs to be rewrote,
.method public static newFromParcel,
I would appreciate if you could see what you could do. Plus it may be one of the keys to mms on this rom, and it would give me a chance to see how it should be rewritten.

I use beyond compare and literally everything in that smali is identical except the method above and 2 methods from the Triumph:
.method private static isDoubleEncoded and
.method private static removeDoubleEncoding.

Just figured I'd ask a guru since I had your attention. :adore:

I know you are way up there on cloud 4 while this is just measly old 2.2, but I really think this rom could bring new life to the Triumph and act as a proof of concept for getting the sharp 2.3.5 working on our kernel. As, I really don't have hope for the 2.3.5 Sharp kernel on our phone from all my tests and understanding of the situation.

I've been wanting to help the ICS guys but got side tracked. I really think the xperia play ics beta is our best chance to get a very stable system on our phone. Sony releases almost all of there source code and the phone is on the same platform as ours. If you read their development site it tells how they had to rework the system to run smooth on a 512mb system, so there may be other benefits to using some stuff from that.

Ha. Definitely not a guru at smali--far from it. I just spent a lot of hours way back when adding the options to the MT that I'm a little familiar with what it's trying to do on the power menu.

However, I spent a few hours staring at the Sharp GlobalActions.smali code and they got something odd going on there... You're right, it's definitely different from ours. Just adding some options doesn't seem to work like it does on the stock roms. I'll keep looking at it when I get some time.

One more thing, there is definitely something odd with how this ROM interacts with our CWM. I made a nandroid and it's got the date in the backup name all messed up. It thought that the date was 1-1 instead of 6-9. Something in the rom isn't getting the date/time correctly. Also, restoring the rom didn't work and I just got stuck at the M logo as others have been reporting. I wonder if it's a kernel problem.
 
  • Like
Reactions: BSydz
Upvote 0
Ha. Definitely not a guru at smali--far from it. I just spent a lot of hours way back when adding the options to the MT that I'm a little familiar with what it's trying to do on the power menu.

However, I spent a few hours staring at the Sharp GlobalActions.smali code and they got something odd going on there... You're right, it's definitely different from ours. Just adding some options doesn't seem to work like it does on the stock roms. I'll keep looking at it when I get some time.

One more thing, there is definitely something odd with how this ROM interacts with our CWM. I made a nandroid and it's got the date in the backup name all messed up. It thought that the date was 1-1 instead of 6-9. Something in the rom isn't getting the date/time correctly. Also, restoring the rom didn't work and I just got stuck at the M logo as others have been reporting. I wonder if it's a kernel problem.

Thanks for your time, I hope that you, or somebody, can get it to work though. At least I don't feel like a dumbass for staring at the screen for a few hours myself. I gave up cause the MMS issue was more important. The ROM has 4G and is run through GSM so there are like 5 networks it has to shut down to go into airplane mode and that throws the GlobalActions.smali way off from the Triumph, that doesn't even roam. I found a mod for the 2.3.5 at a russian website, but not too sure how that is going to help yet. I am in the middle of a move, just got a house, so my main rig with all my working folders is down for a day or 2.

For anybody who knows java I found this, you can convert the dex files to a jar with class files using dex2jar, then use jd-gui to edit the class files. I just found this a few days ago and have only used it once, but again I am just learning java so can't really comment on it.

I REALLY hate to say this, but I kinda get gut feelings sometimes, and when I saw CWM 5504, I got one of those feelings. I have never tried it because of that, but I have made numerous backups from all of the Sharp ROMs, except rev 2.1 cause I haven't had time, and restored them through CWM 5027. Plus Ver2 is a slightly modified stock Triumph kernel. I have never had the date/time issue, except when I was flashing nb0's, because they did not connect to the network to update the date and time. But after setting the time and date it was correct in the nandroid backups. Also, I have no idea what all Mobstergunz did in Rev 2.1 but he started with the very first original Sharp ROM I released, and modified it from there. So by the time I released the deodexed version he had already built his rervision, but had to fix a couple things. So just to clarify, the branches split at the first original, and there are 4 kernels being used throughout the different versions. The Sharp kernel is present in original, trim and deodexed trim, the slightly modified stock Triumph kernel is present in Ver2 (to get bluetooth working), and Mobstergunz hybrid kernel is present in Rev 2.1 and a different hybrid kernel in his Rev 2.2. I'm gonna update the op to reflect this as it has gotten a little confusing.

Edit: I just used TWRP 2.1.3 recovery with a buckup I made 5-29 when I tested TWRP with the Sharp ROM and date and times are fine, it restored fine also. I have only had one issue with CWM recovery and the Sharp ROM and that was a md5 verification, but CWM has done that to me a couple times in the past with other ROMs.
 
Upvote 0
Tried this earlier today. So far, no 999-999-9999 garbled messages.
Download Go SMS. Go to settings - advanced - security settings -manage blacklist - blocker setting - add number prefix. Punch in 999. From the other options you can toggle on/off the notifications.

Haven't received a 999 MMS for several hours now. I toggled the notification on for test purposes and it sent a notification every time. Hope it continues to work until a permanent fix is found. Does not interfere with your regular SMS.
 
  • Like
Reactions: BSydz
Upvote 0
bsydz and mobster, thanks for your work on this ROM and the MMS mode. I have read that there are CM7 fixes for the optimus VM phone for MMS, perhaps the secret is in there... At any rate as soon as MMS is a go I'm sure to move to this ROM from CM7.. faster GPS lock will be excellent as currently it's quite dangerous to try to use while driving and trying to keep the thing from going to sleep and loosing lock! It will also be interesting to compare battery usage.

keep up the good work!

Also, some people are reporting hearing static on their triumphs, so the FM radio hardware is definitely there.. wouldn't THAT be something to get it working.
 
  • Like
Reactions: BSydz
Upvote 0
bsydz and mobster, thanks for your work on this ROM and the MMS mode. I have read that there are CM7 fixes for the optimus VM phone for MMS, perhaps the secret is in there... At any rate as soon as MMS is a go I'm sure to move to this ROM from CM7.. faster GPS lock will be excellent as currently it's quite dangerous to try to use while driving and trying to keep the thing from going to sleep and loosing lock! It will also be interesting to compare battery usage.

keep up the good work!

Also, some people are reporting hearing static on their triumphs, so the FM radio hardware is definitely there.. wouldn't THAT be something to get it working.
Thanks for the feedback.
1. I have looked at the optimus v fix and the Evo fix and others but this is entirely different because those are all CDMA phones, this is a GSM phone with CDMA so everything is run through GSM cause that is the main radio.
2. The bluetooth and FM radio are the same chip and the issue with the bluetooth was remedied by using a modified Triumph kernel, so that brings me to the idea that FM MAY only work using the Sharp kernel, but bluetooth doesn't work on the sharp kernel, so that is a whole nother headache. I'm definitely not a kernel guy. Plus we are not supposed to have FM so making it work is probably the last thing on my list of things to do. But if anybody wants to try feel free, everything that I have to work with is available in the op, I am working from a prebuilt ROM and have not been able to find even a reference to any kind of source code for the Sharp ROMs.
3. The battery is quite amazing. Yesterday, I left my house at 6 AM and had wifi on all day, when I got back home about 8 PM I noticed I had over half my battery left. I did not plug it in til 11 or so and it was still above half. Only a few times have I been able to make it through a whole day and not have to put it on the charger at the end of the day. Also, I have never recalibrated my battery or reset the stats.
 
  • Like
Reactions: PoconoTech
Upvote 0
Tried this earlier today. So far, no 999-999-9999 garbled messages.
Download Go SMS. Go to settings - advanced - security settings -manage blacklist - blocker setting - add number prefix. Punch in 999. From the other options you can toggle on/off the notifications.

Haven't received a 999 MMS for several hours now. I toggled the notification on for test purposes and it sent a notification every time. Hope it continues to work until a permanent fix is found. Does not interfere with your regular SMS.
Thanks for the input, but the 999 messages are just the picture mail not being decoded, the 999 is just what the phone sees as the phone number when it is still encoded. I found that if you get an MMS message from 999 then it actually isn't fully sent, meaning if you, for instance, restore a backup with working mms the messages will eventually still come through. For example, I knew my sister was gonna send me some pics of her beautiful baby, so I restored my CM7 backup and over night I received all the test messages that I had sent from the Sharp ROM earlier that day and had already received the 999 messages. Hope this makes sense.
 
Upvote 0
TY I appreciate this ROM very much. have been using it lately because of the GPS and camera. TWRP is my preferred custom recovery as it is quicker to navigate (only couple times it's rebooted on me) and if I remember correctly bROM loads on CWM but not TWRP due to issue it has with MD5 w/ TWRP. Yes I do that same thing if I get a 999..... I just switch to a back up of stock get the message (save to SD card) and switch back. I use GPS more then I do picture messaging. I have a friend that is familiar with what needs to be done with MMS and am over due to visit their family. Maybe I can show up with my phone, a bottle, and some nice words to get them to take a look.

Also on this ROM I enjoy the wifi connecting as it should without the delay that the stock was having after screen locked. If I have time maybe I can post 2 triumphs side by side on GPS, this ROM vs others.
 
  • Like
Reactions: BSydz
Upvote 0
I take it the Sharp is a GSM phone. Too bad there's no other CDMA variants
Yes, but, it is GSM with CDMA. So it is very different than the Triumph when it comes to how it handles phone and data.

Anyone making headway on the MMS issue? I didn't realize how much I missed it until I didn't have it
I'm about to release a fix for sending MMS but haven't been able to get it to receive yet. I have been busy the last week or so, picked up a second job and was moving, so I just got my main rig back up. I'll be working on it this weekend. I've got a few suggestions from a few people, but as far as I know I am the only one working on this.
 
Upvote 0
Updated OP with Ver3. I got MMS sending but still not receiving properly, and made a few tweaks here and there. Let me know if I broke anything along the way. I'll be working on the MMS when I get some time this weekend.

Edit: You should be able to flash this over Ver2, but I have not tested with any other versions.
 
Upvote 0
Updated OP with Ver3. I got MMS sending but still not receiving properly, and made a few tweaks here and there. Let me know if I broke anything along the way. I'll be working on the MMS when I get some time this weekend.

Edit: You should be able to flash this over Ver2, but I have not tested with any other versions.

awesome!
 
  • Like
Reactions: BSydz
Upvote 0
Ok, so I have had my phone off the charger since 6 AM yesterday, that is 35 hours and still 20% battery left. That is with wifi on the whole time, a full days average usage, flashing about 5 test Roms today, and only plugging it in for a minute to load the test zips on my SD card cause my reader is giving me issues. I have to say that is a first for me on this phone. About to leave it unplugged til it dies and see how long it will last. :D

Edit: 10PM just hit 10% and gave me the plug in warning.
 
  • Like
Reactions: mstech
Upvote 0
Downloading now. Can't thank you enough for your time. There are things on this ROM that just work like it's suppose to. Want to test out if the wifi interference is still there with certain other wifi chipsets.. that happens with stock rom... how my genius brother who's a level 4 IT put it (and could write this in his sleep but gets a little tired talking tech after work). Said, Seems without actually looking at it but from how I explained it that the wifi on the stock might of been set with shorten inter-frame gap (quiet time between packets transmitted on the network) which makes some of the devices that get bumped unable to get back on. That if it is your own network having an issue to set the router preamble to 0 if Triumph is bumping others off and this should help. if that bit interests you search long and short preamble. This would explain why not everybody was having the wifi interference between devices.
 
  • Like
Reactions: BSydz
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