yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] ajhavery:
Thanks !!!
[G2 and Desire Z Android Development] v1r0x:
thank you and good luck!!

in the android.policy.jar I've only changed the rotation-thing.

in framework.jar only the android.graphics.Paint

Edit: Cid-Vox sent me his framework-res.apk and everything works fine now :)
[G2 and Desire Z Android Development] ajhavery:
The error in my opinion was related to signature. And by framework I also meant the same file, framework-res.apk.

It's good that everything is working now. btw, how is the smoothness or performance of this rom?
[G2 and Desire Z Android Development] v1r0x:
Ok, I thought you meant framework.jar

I couldn't replace the resources.arsc because 7zip returned an error ("not implemented"). So I took the apk which apktool created and signed it.

But not everything is working :(

If I want to open Settings I get an FC.

And in the phone app it reboots after starting a call

I think it's really fast and smooth. Better than the latest GB version
[G2 and Desire Z Android Development] ajhavery:
You might need to replace more files in framework.jar.

I'll able to tell more when I look into this matter after my exams tomorrow.
[G2 and Desire Z Android Development] v1r0x:
There's no hurry. As long as I can make/receive calls and wifi works, everything is ok :D

Edit: ok, I've fixed the phone app. :)

But still settings get FC and market has the "app is incompatible" bug.

And the ics control panel (Andy Thomsons Mod) FCs after trying to change the statusbar layout
[G2 and Desire Z Android Development] Cid-Vox:
I tried to port AOKP (BlindIce) but I can't enter the PIN. I already tried to fix keyboard rotation but no luck. Any further suggestions how to modify the android.policy.jar?
[G2 and Desire Z Android Development] sgtkid12:
Jspina has already ported the rom for me but wont be releasing it. Only things not working on it are the recent apps when holding down home and the nav bar cant be removed. But you can access the recent apps through the nav bar. I will post the link for you.

Edit: here is the link

http://minus.com/mFQ0YS41d/
[G2 and Desire Z Android Development] ajhavery:
What is the error you are getting??

Give some more detail so that I could help you.
[G2 and Desire Z Android Development] Cid-Vox:
thank I will have a look at this

There is no error. I don't have a dialpad to enter the pin and the hw keyboard doesn't work everything else seems to work.
[G2 and Desire Z Android Development] v1r0x:
Any idea how to fix the market problem?

I've tried tons of solutions but none of them worked.

Clearing the market cache, delete and add the account, changing dpi and changing the build.prop (model and manufacturer) didn't help :(

Had the same problem on ajhaverys last build...

funnily enough I can't download "Winamp" (it only appears in the web playstore but is incompatible) but I can download "Winamp pro" :confused:
[G2 and Desire Z Android Development] nickeedoo:
I'm stuck on the white HTC screen after trying a miui port from the official miuiv4 desire hd rom. I get this. Billions of lines. Of this.

I/Netd ( 1377): Netd 1.0 starting

Edit: Also, using Audacity Beta 2 as a base, and did this in Linux Mint.
[G2 and Desire Z Android Development] jspina:
You have to use the audacity libandroid_runtime.so.

Located in system/lib
[G2 and Desire Z Android Development] jspina:
If it is of any help, what I did was I used the phonewindowmanager.smali file from Ice Cold sandwich that snowoakami used. If you use the one from blind ice (this happened in the other thing I ported as well) the nav bar is gone and rotation works as well as recent apps by long pressing home. BUT the software keyboard does not come up and it wont know when the hw keyboard is open meaning it wont change to landscape.

I will attach the original android.policy.jar file from blind ice.
[G2 and Desire Z Android Development] xT4Z1N4TRx:
SO anyone ported AOKP yet or is it up to me ;)
[G2 and Desire Z Android Development] Cid-Vox:
give me a minute to verify that I solved that PIN issue :)

---------- Post added at 06:04 PM ---------- Previous post was at 05:40 PM ----------

Well that smali from snowoakami is outdated and they made a lot of changes so thats the reason for the bugs.

Anyway it seems I finally found the solution.

search for ".method readLidState()V" and delete the red part -> thats it

.method readLidState()V
.registers 4

.prologue
.line 1262
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->readLidStateByHardwareFeature()Z

move-result v1

if-nez v1, :cond_12

.line 1264[/COLOR]
[G2 and Desire Z Android Development] jspina:
I love you!

sent from the latest and greatest
[G2 and Desire Z Android Development] :
I am an idiot, I overwrote the files myself... trying again :D
[G2 and Desire Z Android Development] v1r0x:
they should be different.

Did you tried to redownload audacity?
[G2 and Desire Z Android Development] :
Yes, as I said I'm an idiot and did it all wrong, I'm retrying ;)
[G2 and Desire Z Android Development] nickeedoo:
Well guys, I have a miui 4.0.4 port that completely works. The graphics are so smooth! The only thing that doesn't work is that the camera app is missing. So I'm gonna try and fix that, perhaps upload. But I'm working with the MIUI team to try and make a DZ port.
[G2 and Desire Z Android Development] v1r0x:
Andromadus and maybe CM9 have working camera.

Which base did you take?
[G2 and Desire Z Android Development] nickeedoo:
I used Andromadus. But I accidentally used RD's MIUI, so I have to start over anyway. Hence why I might not upload it. But settings force-closes.
[G2 and Desire Z Android Development] v1r0x:
Just like me.

I think it's a problem with the miui slider-buttons. But I don't know how to fix it

I took the andromadus camera and it works :)
[G2 and Desire Z Android Development] nickeedoo:
So you had problems with settings force closing too?
[G2 and Desire Z Android Development] v1r0x:
Yes.

I have two problems:

- Market don't show all apps

- Settings FC
[G2 and Desire Z Android Development] nickeedoo:
Ah, alright. Did you also have a problem with adb not working?
[G2 and Desire Z Android Development] v1r0x:
No, adb worked all the time
[G2 and Desire Z Android Development] nickeedoo:
Got it fixed now, but I wondered why it wasn't working. Anyway, back to find out why settings/camera don't work!
[G2 and Desire Z Android Development] :
I've also succeded in booting miuiv4, but for me Setup Wizard also crashes and launcher does not work...
[G2 and Desire Z Android Development] v1r0x:
can you post your logcat/ddms?
[G2 and Desire Z Android Development] :
http://pastebin.com/puah0Ap1

For the record, aside of moving the smali files mentioned in OP, I also had to use all PowerManagerService*.smali files from audacity's services.jar.
[G2 and Desire Z Android Development] nickeedoo:
Oh and btw... you have to move the powermanagerservice smalis. :P If you get camera/settings working, please tell us how you did it!
[G2 and Desire Z Android Development] ajhavery:
Guys, new andromadus base is up, so better start working with it. Also first try with different libandroid.runtime.so to see if you can get it boot.

If not then replace the files in framework.jar as stated in the OP.

I've added new files to be replaced.

Good Luck.
[G2 and Desire Z Android Development] v1r0x:
I've started a new attempt with audacity b3 and official nexus s build.

Same problem as before :(

@nickeedoo: wanted to start a backup, but after hit "backup" the app crashes. Did yours work?
[G2 and Desire Z Android Development] nickeedoo:
Yep, backup works in mine. Settings and camera might be a android.policy.jar problem. I'm gonna decompile settings to see what's going on, but I think camera is a buildprop issue.

---------- Post added at 08:53 PM ---------- Previous post was at 08:48 PM ----------

Also, I recommend this highly!

http://miuiandroid.com/community/pages/Chat/

;)

---------- Post added at 09:00 PM ---------- Previous post was at 08:53 PM ----------

And you probably already caught this, but looky here.

2233:	E/AndroidRuntime( 2677): Caused by: java.lang.IllegalStateException: Can't call getPixels() on a recycled bitmap

2234:

2235:	E/AndroidRuntime( 2677): at android.graphics.Bitmap.checkRecycled(Bitmap.java:213)

Looks like we need to fix that.
[G2 and Desire Z Android Development] v1r0x:
I wanted to create a backup, but get an FC.

Here's the log:

05-06 02:36:29.244: W/dalvikvm(2415): threadid=1: thread exiting with uncaught exception (group=0x40a741f8)
05-06 02:36:29.254: E/AndroidRuntime(2415): FATAL EXCEPTION: main
05-06 02:36:29.254: E/AndroidRuntime(2415): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.miui.backup/com.miui.backup.ui.BackupSelectActivity}: java.lang.ArrayIndexOutOfBoundsException: length=2; index=3
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1959)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1984)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.ActivityThread.access$600(ActivityThread.java:125)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1149)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.os.Handler.dispatchMessage(Handler.java:99)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.os.Looper.loop(Looper.java:137)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.ActivityThread.main(ActivityThread.java:4429)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at java.lang.reflect.Method.invokeNative(Native Method)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at java.lang.reflect.Method.invoke(Method.java:511)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at dalvik.system.NativeStart.main(Native Method)
05-06 02:36:29.254: E/AndroidRuntime(2415): Caused by: java.lang.ArrayIndexOutOfBoundsException: length=2; index=3
05-06 02:36:29.254: E/AndroidRuntime(2415):	at com.miui.backup.ui.BackupSelectActivity.prepareSysDataInfos(BackupSelectActivity.java:74)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at com.miui.backup.ui.BackupSelectActivity.prepareAppInfos(BackupSelectActivity.java:53)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at com.miui.backup.ui.BaseSelectList.onCreate(BaseSelectList.java:104)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.Activity.performCreate(Activity.java:4471)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-06 02:36:29.254: E/AndroidRuntime(2415):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1923)
05-06 02:36:29.254: E/AndroidRuntime(2415):	... 11 more
05-06 02:36:29.264: W/ActivityManager(1340): Force finishing activity com.miui.backup/.ui.BackupSelectActivity
05-06 02:36:29.264: W/ActivityManager(1340): Force finishing activity com.miui.backup/.BackupActivity
05-06 02:36:29.764: W/ActivityManager(1340): Activity pause timeout for ActivityRecord{41b399f0 com.miui.backup/.ui.BackupSelectActivity}
[G2 and Desire Z Android Development] nickeedoo:
But there's good news! Camera now works in my build! Still not settings though. :(

Edit: Camera works faaast :O
[G2 and Desire Z Android Development] nickeedoo:
Ok, I'm ready to release my build almost. Pretty sure I figured out the settings and I'm wrapping that up. Now... I screwed up autobrightness to where if it's on, the screen will turn off randomly. I feel like people might get annoyed by this...
[G2 and Desire Z Android Development] v1r0x:
that would be great.

what's the problem with the settings?
[G2 and Desire Z Android Development] nickeedoo:
Well, it didn't work. I was thinking that it was referencing the widget slider.button incorrectly, so I changed a couple lines. But it still doesn't work. I wonder if it's because we're using an AOSP rom to port an AOKP miui rom.
[G2 and Desire Z Android Development] v1r0x:
With CM9 there's no problem with settings, so I think it's not a AOSP problem
[G2 and Desire Z Android Development] nickeedoo:
Oh ok, maybe I'll try building with that after work. Are the graphics still silky smooth? That's mostly all I'm concerned about. I'm still using my build with settings not working since I got it built. I am in love with it.
[G2 and Desire Z Android Development] v1r0x:
I still have a big problem which is really really annoying.

I can't install some apps because:

This app is incompatible with your Vodafone HTC HTC Vision.

Vodafone HTC HTC Vision
This item is not compatible with your device

Changing ro.product.model and ro.product.manufacturer in build.prop, clearing cache or pushing the app to the sd-card and install it ("Application not installed") didn't help.

Have this problem with just a few apps, but they are very important for me.

Hope somebody can help
[G2 and Desire Z Android Development] g1doobie:
ported BlindIce over and i am having a few issues. this is my first time doing this so excuse my complete noobness.

i was mainly concerned about getting it to boot first so i havent got autorotate working. i also need to get the physical keys mapped correctly. the onscreen keyboard will not pop up no matter what i do to try eithier. another issue is i cant get wifi to even turn on.

the @ button doesnt work so i cant even sign in to my google account to see if the market works

those are the issues i have encountered so far. any help would be greatly appreciated. i am new to this and eager to learn as much as i can

http://www.mediafire.com/?o4ins0wk6o3yo91
[G2 and Desire Z Android Development] Cid-Vox:
What base do you use CM9 or Audacity?

this is the way I fixed auto rotation for my AOKP build

android.policy.jar

smali\com\android\internal\policy\impl\PhoneWindowManager.smali

search for ".method readLidState()V" and delete the red part -> thats it

.method readLidState()V
.registers 4

.prologue
.line 1262
[COLOR="Red"] invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->readLidStateByHardwareFeature()Z

move-result v1

if-nez v1, :cond_12

.line 1264[/COLOR]

the keymaps should work the same way as they did in the base rom

take a look at the /system/usr/keylayout and /system/usr/keychars folder
[G2 and Desire Z Android Development] g1doobie:
i used cm9 as my base.
[G2 and Desire Z Android Development] ajhavery:
flash keyboard fix provided by blk_jack for andromadus and you'll have keyboard working properly.

Use ddms to get an error log.
[G2 and Desire Z Android Development] g1doobie:
how would i go about taking out aroma installer from a rom i am trying to port?
[G2 and Desire Z Android Development] ajhavery:
For the startup, take the arom installer from ILWT rom and edit the values.

To do so, you need to look in /META-INF/com/google/android/aroma.

Look at different components present there and then look how are they referenced in updater-script.

With a little research you'll find it easy.

Then when you get proficient, write your own from scratch.
[G2 and Desire Z Android Development] g1doobie:
i have a zip file to flash with google framework and apps to flash before flashing gaps. how would i go about putting that into my rom so people dont have to flash the zip for it
[G2 and Desire Z Android Development] ajhavery:
Just put the files in appropriate directory and add curresponding lines in updater script of you rom from updater-script of this flashable package.

If you fail, post and i'll try to figure out.
[G2 and Desire Z Android Development] lowlife546:
just curious about what happened to ur rom. been looking out for it this last week
[G2 and Desire Z Android Development] g1doobie:
nevermind figured it out
[G2 and Desire Z Android Development] g1doobie:
having trouble fixing keyboard rotation, keyboard lights, autorotation, autobrightness and making the physical button backlight not so bright. coudl someone plz help me. i have a new version of my rom ready to release when i get these issues fixed
[G2 and Desire Z Android Development] ajhavery:
Dude I've provided these fixes with reference to MIUI port in my first post. The fixes are similar to MIUI, follow as explained to solve your problems.

Read first post completely.
[G2 and Desire Z Android Development] mesaj:
I tried to port sense 3.5 on my own with proxuser guide but It doesn't boot.

theres loop of netd and iptables in logcat. before that I had one tund warning.

I used QtADB for logcat and shell to play with system files after flashing but nothing helps
[G2 and Desire Z Android Development] ajhavery:
for initials do following, take rom you want to port and swap

/system

/etc

/lib

/usr

/customize

and boot.img and corresponding /system/lib/hw/modules.

And you'll have it booting. Now experiment with different mods.

Preferably take a rom from Desire HD for initials.

To port a Sense 3.5 rom from desire HD, the files need to be swapped can be found at :

http://elektro-instal.com/napior/3.5 port tools.zip

The link has been added to the guide.

Thanks napior for the files. Credits goes to him. If you succeed make sure to thank him too. Though you need to make changes in build.prop and updater script as mentioned in the guide.
[G2 and Desire Z Android Development] sorceforge:
I am trying to port Bliss rom from its RUU, but I am blocked from performing deodex. I have found bootclasspath from boot.img, but it was unable to do that with both kitchen and autodeodex tool with custom bootclasspath.

Do you have any idea on deodexing?
[G2 and Desire Z Android Development] ajhavery:
Use an argument -I in smali, i.e.,

java -jar baksmali.jar -I -a 13 .......

I'm not sure if api level is 13, you need to substitute correct api level and then try again with correct bootclasspath.
[G2 and Desire Z Android Development] resac:
Help

solved it by changing lib file.. but now not single error in it but yet my rom get boot loop.. i m not getting whats the reason,....
[G2 and Desire Z Android Development] mesaj:
Thanks.

I'm done porting Bliss RUU, now I need to get working BT. Also Beats aren't there, SRS works good, anyway Beats are better and I'm trying to port them there.

I swapped modules and firmware but still bluetooth isn't working.

EDIT

I give up with Beats now. Bluetooth is most important to do now. FM Radio is second issue. Everything except this is working :D

Any help with bluetooth or radio?

logcat:
[G2 and Desire Z Android Development] johrie:
How is it to port a ROM from the Desire S? I am thinking of trying to port the Paranoid Android ROM, if no one beat me to it.
[G2 and Desire Z Android Development] mesaj:
I'e replaced all files with endymion listed in then with napior package, removed what was listed from firmware and htc_ebdlog in /bin and I get booting Bliss ROM so you can try same with Desire S, jsut backup your working folder first.

QtADB helps alot in porting for me and dsixda's kitchen is IMO must have.
[G2 and Desire Z Android Development] sorceforge:
So, could you tell me what files did you replace for booting Bliss rom? :)
[G2 and Desire Z Android Development] mesaj:
from: http://www.mediafire.com/?bh8rld7kvydbw16

/bin folder

/lib folder (without hw and soundfx)

/etc/firmware without BCM4329B1_002.002.023.0589.0632.hcd

/etc/all files,

(/soundimage left untouched)

then

from http://elektro-instal.com/napior/3.5 port tools.zip

replaced boot.img

everything from

/etc and

/etc/firmware

/lib with modules (removing all old modules) and hw (removing gps.bliss.so and sensors.bliss.so)

/usr/keylayout (with removing all files starting with bliss-*)

/usr/keychars (also with removing all files starting with bliss-*)

wifi won't work, so try changing

/etc/firmware (only files used before that were in endymion or napior's pack, don't touch vidc*)

/etc/wifi and /etc/ppp.

you can play also with

/bin, changing:

rmt_storage(just in case it's not booting), pppd, dnsmasq, wpa_supplicant

and/or /lib/libhardware_legacy.so

to files found in desire z/g2 official 2.3.3 software (ex. virtuous sense)

build.prop need to be changed according to http://xdaforums.com/showpost.php?p=24021769&postcount=2

For small changes/quick fixes I would suggest using QtADB, connect via recovery, mount /system r/w, copy and replace/remove files then move to shell and chmod for permissions they need (or 777, but I'm not sure), also logcat is available there so after reboot you can see what's going on.
[G2 and Desire Z Android Development] sorceforge:
Thanks for your answer! By the way, I have seen a lot of 'thwlan0' instead of 'eth0' which is proper address of our device in a lot of files including Bliss' stock kernel. I cannot deal with it right now because I am not in my house, so, how about changing them first?
[G2 and Desire Z Android Development] mesaj:
oops, yes, you'll need to make a change in build.prop :

use unity v10 kernel (boot.img included with napior's files) and convert your update-script to updater-script

btw. remove some unnecessary apps/widgets in system/app because system couldn't fit for me in system partition. Here's list of apps I've found somewhere on xda http://pastebin.com/8dpvEJxr (remove stocks, laputa and themes and should be ok)
[G2 and Desire Z Android Development] johrie:
Okay, so i tried a pretty much straight forward port. Just replaced all the files needed and flashed it. But it wouldn't boot. I will try again tonight when i have some more time and see if i can get a logcat.
[G2 and Desire Z Android Development] mesaj:
@sorceforge

It don't work for every RUU the same way, for Runny it wasn't.

I've reviewed my port and here are files that WinMerge reported to differ from RUU:

https://www.dropbox.com/s/xejsjf5l94ak1iy/BlissPort.zip

(just in case if you will have any problems unpacking it, try with PeaZip)

text file with instructions included, no fmradio and bluetooth yet, but napior pointed me to change /etc to these from ARHD, I will try tomorrow.
[G2 and Desire Z Android Development] johrie:
Dont know if you are refering to me, but i am trying to port paranoid android from the desire s.
[G2 and Desire Z Android Development] ajhavery:
To port a rom from desire S only swaping these files is not enough. FOr Desire HD it is, for desire S, follow my guide to port AOKP, as listed in the 3rd post.

I mean paranoid android is a cyanogenmod based rom so follow my guide to port AOKP rom.
[G2 and Desire Z Android Development] johrie:
Okay i'm on my way home now i will try to get it booting if i run in any more trouble i will come back here :) thank you!

Edit: I took a look at the 3rd post and that is exactly what i have done with what i am trying to port

Take CM9 as base..

Remove app , media and framework folder from base rom..

Copy above folders from IceColdSnadwich to base ROM

Now Tough Thing !!

Sit Patiently and see what lib modules(*****.so) files are missing from base rom..

Copy all missing libraries to base ROM from IceColdSnadwich.

You need to make similar changes to android.policy.jar as suggested above for MIUI rom to fix autorotation.

i did this.
[G2 and Desire Z Android Development] sorceforge:
Thanks for your endeavor! I am still enjoying my trip, so it will take a long time for me to continue porting. With your guide, I would like to start again from Deodexing. :D
[G2 and Desire Z Android Development] johrie:
Anyone who can help me with properly porting a rom from the Desire S to the Z, i am not getting anywhere :p
[G2 and Desire Z Android Development] napior:
Which rom are you porting?
[G2 and Desire Z Android Development] johrie:
I am trying Paranoid Android.
[G2 and Desire Z Android Development] napior:
Can you say something more about your problem? Any logcat?
[G2 and Desire Z Android Development] johrie:
Just getting stuck at the white HTC splashscreen. Will try to get a logcat when i am around a pc again.
[G2 and Desire Z Android Development] johrie:
Oke now i am stuck in a bootloop did the whole porting this over again ( still using the method in post 3) and i want to give you a logcat but that damn adb wont let me -_-