[WIP] PrimeUX - Samsung UX Port into Prime 1.6

Search This thread

rothnic

Senior Member
Aug 18, 2010
811
278
Context: [DEV] Touchwiz for Transformer - xda-developers This was moved because there were no files to test.

What is this? This is based on Prime 1.6. All the samsung galaxy tab 10.1 specific files that run UX have been merged in. Then I decompiled the framework for both the TF and GT10.1, and merged in functionality into the TF framework. It has come a long way, and the launcher is usable. However, the statusbar does not come up because systemui.apk FC's.

PrimeUX: Download THIS IS NOT USABLE YET, PEOPLE WHO EDIT SMALI ONLY

You will get FC's from systemui, media, and myfiles. Media and myfiles could be avoided by leaving out more of the samsung files that fguy did not include in his. I assume it is because of the FC's.

This is meant for others to work on the systemui issue, not for any real use.

Porting Process:

Here was what I was using to decompile the framework. Drop all the files into the framework directory, then run decompile.bat and it'll all go into respective folders under an out folder. Then you can do this to the samsung framework, then diff them with winmerge or something like that.

When you find an error in logcat, search for a term related to it within Notepad++'s search in files feature. Generally, this will point you into the direction of a missing class. Then you can copy the class over into the associated TF framework file by right clicking on the highlighted missing class within Winmerge. However, sometimes it isn't so easy because Samsung and Asus have heavily modified the HC framework. Asus to add the dock functionality, samsung for the touchwiz stuff.

Tools: Decompile Framework
 
Last edited:

Gtj94

Senior Member
Aug 6, 2010
940
524
Melbourne
Good to see this happening! :D quick question, there isn't any resizing needing to done yea? Just smali edits?

Sent from my Desire HD using XDA Premium App
 

rothnic

Senior Member
Aug 18, 2010
811
278
Good to see this happening! :D quick question, there isn't any resizing needing to done yea? Just smali edits?

Sent from my Desire HD using XDA Premium App

I guess I'm unsure what you mean by resizing.

Currently it is at a point where more merging needs to happen(i think) to get the mini apps working. The systemui.apk has a major dependency on the mini apps working, so it crashes without them working.

The main problem I have is there is a FC by systemui, pointing to the mini apps as the problem. However, there is no way to find out why the mini apps aren't running. So, I don't know if more framework porting needs to happen, or what.
 

Roach2010

Inactive Recognized Developer
Sep 1, 2008
834
2,259
Glasgow
Hey rothnic. Great work so far. I don't envy you task of trying to merge the frameworks but you have my full support. I'm no smali expert by any means but I'll help out if I can.

I suggest keeping a healthy supply of beer at hand as smali editing drives me to drink :p
 

rothnic

Senior Member
Aug 18, 2010
811
278
Hey rothnic. Great work so far. I don't envy you task of trying to merge the frameworks but you have my full support. I'm no smali expert by any means but I'll help out if I can.

I suggest keeping a healthy supply of beer at hand as smali editing drives me to drink :p

Yeah, not the most fun stuff in the world. Was going to get around to touching base with you if I ever get it working. I'll package it up as a delta so it's not a full on release to manage. If there is a way to get it working, I hope to document the changes I made so it could be applied to TF updates as they come out.

Ported going to interface with applications such keyboard? I do not like asus keyboard:mad:

If it works, I'll probably alter Prime 1.6 as little as possible. Have you tried Thumb Keyboard from the market? Worth the cost.
 

dwillMUFC

Senior Member
Apr 25, 2010
227
38
Just comparing smali files and in "smali\com\android\systemui\statusbar\tablet" the TableyStatusBar$H file in the Prime UX, when compared to the A500 UX rom exact file. There are many differences between the two. Now Myself have only done minimal smali editing. However I was just wondering if this has already been looked at and/or whether they theoretically should be the same?

Thanks

Dan
 

rothnic

Senior Member
Aug 18, 2010
811
278
Just comparing smali files and in "smali\com\android\systemui\statusbar\tablet" the TableyStatusBar$H file in the Prime UX, when compared to the A500 UX rom exact file. There are many differences between the two. Now Myself have only done minimal smali editing. However I was just wondering if this has already been looked at and/or whether they theoretically should be the same?

Thanks

Dan

I started using the A500 UX version of systemui.apk. I had the errors that we still have now. But, I thought maybe the version that Fguy used for the Acer might not work well with this specific implementation of honeycomb. So I tried a newer version of the samsung UX files, but it had no impact.

So that is why you would find differences between the one in PrimeUX versus Fguy's ROM. I tried talking to him about it, but I think the language barrier is too great to really communicate well enough.

I'm not sure if he added anything to the SystemUI.apk or not, but my intuition was that the changes were mainly to the framework files. That is a consideration to make, though.
 

br13an

Senior Member
Sep 20, 2010
72
11
Why are you guys concetrating on the keyboard so much for this port, it just gives extra unneeded problems with it, maybe it's a better thing to leave the keyboard as it is for now, i guess that can take alot of headaches away,
 

rothnic

Senior Member
Aug 18, 2010
811
278
Why are you guys concetrating on the keyboard so much for this port, it just gives extra unneeded problems with it, maybe it's a better thing to leave the keyboard as it is for now, i guess that can take alot of headaches away,

We, as in the people trying to get this to work, aren't messing with the keyboard at all. One person had a hard to understand comment about the keyboard, and I was just being a nice person about an off topic comment.

The keyboard is definitely the last of my worries.
 
Last edited:

nex7er

Senior Member
Feb 3, 2008
449
163
Bergen
Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).

I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.
 
  • Like
Reactions: jcarrz1

jcarrz1

Retired Recognized Developer
May 26, 2009
1,633
1,430
scienceprousa.com
Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).

I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.

Take some courage, try it :p

I've had luck despite errors (although unlikely).
 

nex7er

Senior Member
Feb 3, 2008
449
163
Bergen
Well, I'm at another stop. I was going to use files from a real Galaxy Tab rom to see what differences there are. Perhaps the OP missed something (obv). I can't seem to decompile them. Not even giving me any smali folder. Hmm.

This would be a lot easier if OP listed all the files he has edited to add functions from normal prime 1.6 smali files. If not, I might as well have to start all over just so I'll know what files to edit and which not to. When Winmerge lists a different item, how am I supposed to know it's really just an identical file with some added Asus bonus without checking every single file? :p
 
Last edited:

nex7er

Senior Member
Feb 3, 2008
449
163
Bergen
Is anyone able to decode what this exception is? Doing some merges and running logcat while booting, this one comes up (untouched PRIMEUX.zip, just flashed back to the stock zip in OP).

08-22 02:55:12.200: WARN/PackageManager(161): Exception reading jar: /system/framework/twframework-res.apk
08-22 02:55:12.200: WARN/PackageManager(161): java.io.IOException: /system/framework/twframework-res.apk
08-22 02:55:12.200: WARN/PackageManager(161): at dalvik.system.DexFile.isDexOptNeeded(Native Method)
08-22 02:55:12.200: WARN/PackageManager(161): at com.android.server.PackageManagerService.<init>(PackageManagerService.java:904)
08-22 02:55:12.200: WARN/PackageManager(161): at com.android.server.PackageManagerService.main(PackageManagerService.java:706)
08-22 02:55:12.200: WARN/PackageManager(161): at com.android.server.ServerThread.run(SystemServer.java:155)
08-22 02:55:13.440: WARN/PackageManager(161): Failed verifying certificates for package:com.android.systemui
 
Last edited:

rothnic

Senior Member
Aug 18, 2010
811
278
Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).

I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.

What are you using to decompile? Also, I havn't had much luck compiling apk's, so if anyone knows for sure how, let me know. I can decompile/compile framework files just fine with the files I posted.

Well, I'm at another stop. I was going to use files from a real Galaxy Tab rom to see what differences there are. Perhaps the OP missed something (obv). I can't seem to decompile them. Not even giving me any smali folder. Hmm.

This would be a lot easier if OP listed all the files he has edited to add functions from normal prime 1.6 smali files. If not, I might as well have to start all over just so I'll know what files to edit and which not to. When Winmerge lists a different item, how am I supposed to know it's really just an identical file with some added Asus bonus without checking every single file? :p

Not sure what you mean by from a real Galaxy Tab rom. I used the files from Fguy's Iconia port at first, then a stock deodexed samsung ROM. I had the same problem I still have, but PrimeUX that I uploaded has untouched samsung applications (everything that goes in /app). I have merged classes from samsung to asus framework files: android.policy.jar, framework.jar, and framework-res.apk. All those errors were related to missing classes, so I merged them.

So what I'm saying is, it doesn't really matter what has already been merged, because those classes now exist. I have approached it by decompiling frameworks from samsung or fguy's rom and prime 1.6. Then i diff them, and then all you can do is use winmerge to let you know if they are different or not. If a file looks like it could have something to do with the status bar etc, then you can double click on that file and winmerge shows a side by side view where you can see the differences and merge lines or not.

This works isn't a clean, let me see which files are different so i can copy them around. It requires digging into each and every class file in the framework to see if something needs to be merged. Also, when you use different ROMs for the touchwiz files, many of the files will differ, so be careful there when mixing stuff.

Is anyone able to decode what this exception is? Doing some merges and running logcat while booting, this one comes up (untouched PRIMEUX.zip, just flashed back to the stock zip in OP).

I'm not sure on that one, but my guess is something went wrong when they deodexed the file. I tried replacing these files from different ROMs, including Fguy's and it always showed that error. I'm thinking maybe it's not a critical error and it still functions since those others work fine.
 
Last edited:

nex7er

Senior Member
Feb 3, 2008
449
163
Bergen
Oh sweet, you're here! Well, I was using apkmanager but I noticed a few minutes later that you posted working tools in your opening post. My bad, hehe.

I'm not used to editing smali at all, which is why I'm at a stop. There are so many differences (comparing omftab 1.0.5 to your primeux) for it to be a realiable testing ground for just one person. Some files reference different lines than the other (like omftab might have Line 293 somewhere in the file, and your primeux has Line 292 in the same spot). I have no idea if I should be touching those.

Also, running Logcat, I can not see any major problems with systemui popping up. Only the one I posted at the general bootup but it doesn't seem to mean anything. There are also many errors pertaining to mounting the sd-cards, but they still work just fine.

Meaning, it's hard to know what errors are real or not.

Just got done firing up some pokemon on my tab. I guess it's time for a nandroid and try again.


Found the *****y systemui message while doing first boot after flashing.

Code:
08-22 15:32:08.860: ERROR/AndroidRuntime(736): FATAL EXCEPTION: main
08-22 15:32:08.860: ERROR/AndroidRuntime(736): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.NullPointerException
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2046)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.app.ActivityThread.access$2500(ActivityThread.java:122)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1056)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.os.Looper.loop(Looper.java:132)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.app.ActivityThread.main(ActivityThread.java:4025)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at java.lang.reflect.Method.invokeNative(Native Method)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at java.lang.reflect.Method.invoke(Method.java:491)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at dalvik.system.NativeStart.main(Native Method)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): Caused by: java.lang.NullPointerException
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.sec.minimode.manager.MiniModeAppManager.registerCallback(MiniModeAppManager.java:80)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.systemui.statusbar.tablet.MiniModeAppsPanel.onFinishInflate(MiniModeAppsPanel.java:440)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:732)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.view.View.inflate(View.java:11630)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.systemui.statusbar.tablet.TabletStatusBar.addPanelWindows(TabletStatusBar.java:352)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.systemui.statusbar.tablet.TabletStatusBar.makeStatusBarView(TabletStatusBar.java:718)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.systemui.statusbar.StatusBar.start(StatusBar.java:61)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.systemui.statusbar.tablet.TabletStatusBar.start(TabletStatusBar.java:473)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:79)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2036)
08-22 15:32:08.860: ERROR/AndroidRuntime(736):     ... 10 more


I would also like to know what rom you have been using to compare and import from. This would make it easier so I don't use an older or newer rom and **** something up.
 
Last edited:

rothnic

Senior Member
Aug 18, 2010
811
278
I'm pretty sure those line references won't be an issue. It is more to do with things like Environment.smali from android.policy.jar. It has overlapping capability that looks very hard to merge.

Also, about not knowing what are errors. You will see a lot of red stuff coming from samsung related files. A lot of it is just samsung printing out debug information, but for some reason they print them like exceptions. They did this a lot when I was porting the original galaxy tab's email app to the Gtablet. The main issue is the one you pasted. That is all that is given, and it doesn't really tell you much.

I'll try to post later today which samsung ROM I was using. I think it might have been the deodexed one from here: http://xdaforums.com/showthread.php?t=1198921 . I'll find out for sure.
 

nex7er

Senior Member
Feb 3, 2008
449
163
Bergen
Good stuff. Yeah I've been using that one as well. Right now I am going over services.jar and comparing with omftab and the primeux service.jar is missing a bit. Including one that has to do with TW, apparently.

Differences like this " const v1, 0x10402d3" are all over. I have no idea what they are, but I'm going to guess I'm not to touch these even if they differ?


EDIT ADD: Without having looked much further (just started again), I came upon errors pertaining to GsmSignalBar, referenced from systemui. Could this be what causes the SystemUI.apk to not launch itself?

Code:
08-23 01:14:07.570: WARN/dalvikvm(1113): VFY: unable to resolve virtual method 441: Landroid/telephony/SignalStrength;.getGsmSignalBar ()I

Hmm, now to decide to take time to check this out or try something else. Really hard when you're alone and not working as a team on several parts. :p



EDIT ADD 2: Hmm, at some point, it IS launching the statusbar without crashing. It's not until later when that errormsg I pasted a few posts up, that it disappears. The remaining errors between it loading and the crashing are all related to phone stuff. Here's a full paste from when it loads till it crashes and starts doing other stuff: http://pastebin.com/4AnEX6kq

Code:
08-23 01:14:07.440: DEBUG/SystemUIService(1113): loading: class com.android.systemui.statusbar.tablet.TabletStatusBar
08-23 01:14:07.490: DEBUG/SystemUIService(1113): running: com.android.systemui.statusbar.tablet.TabletStatusBar@4049d9b0
 
Last edited:

rothnic

Senior Member
Aug 18, 2010
811
278
Not sure what the deal is with the getGsmSignalBar, because that didn't even have to be merged. It was already within framework.jar.

Try this services.jar, I did find something in there critical to the status bar and fixed it:
http://www.multiupload.com/3Q2WD076XI

I'm not setup atm to test. The wife has been needing the tablet and I've been working on the car. However, I should be free to work on this, this afternoon.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Context: [DEV] Touchwiz for Transformer - xda-developers This was moved because there were no files to test.

    What is this? This is based on Prime 1.6. All the samsung galaxy tab 10.1 specific files that run UX have been merged in. Then I decompiled the framework for both the TF and GT10.1, and merged in functionality into the TF framework. It has come a long way, and the launcher is usable. However, the statusbar does not come up because systemui.apk FC's.

    PrimeUX: Download THIS IS NOT USABLE YET, PEOPLE WHO EDIT SMALI ONLY

    You will get FC's from systemui, media, and myfiles. Media and myfiles could be avoided by leaving out more of the samsung files that fguy did not include in his. I assume it is because of the FC's.

    This is meant for others to work on the systemui issue, not for any real use.

    Porting Process:

    Here was what I was using to decompile the framework. Drop all the files into the framework directory, then run decompile.bat and it'll all go into respective folders under an out folder. Then you can do this to the samsung framework, then diff them with winmerge or something like that.

    When you find an error in logcat, search for a term related to it within Notepad++'s search in files feature. Generally, this will point you into the direction of a missing class. Then you can copy the class over into the associated TF framework file by right clicking on the highlighted missing class within Winmerge. However, sometimes it isn't so easy because Samsung and Asus have heavily modified the HC framework. Asus to add the dock functionality, samsung for the touchwiz stuff.

    Tools: Decompile Framework
    2
    what happened to the development

    I spent a huge amount of time on merging the builds, and because of some incompatibilities between the framework files I just don't see this happening. Unless something changes in the future.
    1
    Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).

    I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.
    1
    Do you think it's possible to leave out the miniapps? I'm pretty sure we're missing something that adds the arrow in the middle that allows the TW statusbar to come up (the one with the miniapps). If you could do that and boot up, the SystemUI should work just fine. I hope.

    I've added so much bull**** and it's not helping. SystemUI is being a partypooper. minimode.jar is just fine and I can't find out what minimode is calling.

    Damnit. Hoped I would find out this issue today. I guess hope is bull****, haha.
    1
    Got my new framework files working. I was better able to pinpoint the changes that were made, so I got a ton of stuff merged. There is a lot of stuff scattered about in framework.jar. I'll upload them later today. However, it did not fix the problem...

    Can you upload your kernel blob with the updated init.rc, I'm not setup atm to do that stuff.