yashsingh1/xdaforums huggingface dataset:
[Android Software Development] nikku_hot123:
following are the errors i have found in logcat releated to statusbar....

can anybody fix it ???

E/AndroidRuntime( 469): FATAL EXCEPTION: main

E/AndroidRuntime( 469): java.lang.RuntimeException: Unable to create service com.android.systemui.statusbar.StatusBarService: java.lang.SecurityException: invalid status bar icon slot: privacy_mode

E/AndroidRuntime( 469):	at android.app.ActivityThread.handleCreateService(ActivityThread.java:1959)

E/AndroidRuntime( 469):	at android.app.ActivityThread.access$2500(ActivityThread.java:117)

E/AndroidRuntime( 469):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:989)

E/AndroidRuntime( 469):	at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 469):	at android.os.Looper.loop(Looper.java:130)

E/AndroidRuntime( 469):	at android.app.ActivityThread.main(ActivityThread.java:3687)

E/AndroidRuntime( 469):	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 469):	at java.lang.reflect.Method.invoke(Method.java:507)

E/AndroidRuntime( 469):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)

E/AndroidRuntime( 469):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)

E/AndroidRuntime( 469):	at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 469): Caused by: java.lang.SecurityException: invalid status bar icon slot: privacy_mode

E/AndroidRuntime( 469):	at android.os.Parcel.readException(Parcel.java:1322)

E/AndroidRuntime( 469):	at android.os.Parcel.readException(Parcel.java:1276)

E/AndroidRuntime( 469):	at com.android.internal.statusbar.IStatusBarService$Stub$Proxy.setIcon(IStatusBarService.java:283)

E/AndroidRuntime( 469):	at android.app.StatusBarManager.setIcon(StatusBarManager.java:111)

E/AndroidRuntime( 469):	at com.android.systemui.statusbar.StatusBarPolicy.<init>(StatusBarPolicy.java:621)

E/AndroidRuntime( 469):	at com.android.systemui.statusbar.StatusBarService.onCreate(StatusBarService.java:260)

E/AndroidRuntime( 469):	at android.app.ActivityThread.handleCreateService(ActivityThread.java:1949)

E/AndroidRuntime( 469):	... 10 more
[Android Software Development] sibiru:
hmmmh it must be in linux ?
[Android Software Development] lpjunior999:
Is there a link to a tutorial to getting an environment set up for this process? I think a lot of us are first-timers here (myself included) and this thread is starting to get overrun with requests for error help.
[Android Software Development] KemikalElite:
Basically, however that is the official documentation.
[Android Software Development] 1982Strand:
One question.. And forgive my noobishness, just found this thread and wanted to try things out..

I get that some files, like phone.apk, needs to be modified because it interacts with the radio, but how do i identify which ones to use? What determines that they should be used?

And just for the info, i'm on a HTC Desire, using MildWild CM3.3 rom (based on CM7). It's a pretty modded up one.. Don't know if that rom can be used though, but i'm gonna play around with it and see what happens..
[Android Software Development] antEris:
Ok, my head hurts :) in a good way though. First let me say that like many here this is my first attempt at anything of this sort, so this is quite the learning experience for me. Please forgive anything obviously ignorant on my part, and please correct me.

I've successfuly built a rom with this for the cdma xperia play. It "boots" but everything and i mean EVERYTHING force closes (mostly phone.apk and launcher2.apk) and there is no status bar (which I've seen a few other people mention). I have a couple of questions (like everyone else) if someone would be so kind as to share their experience with me. I would be quite grateful.

1) I'm not sure if I fixed the build errors correctly or not. But, here's what I did.

(phone.apk) For the multiple % xml errors I added format=false to those lines, and the phone.apk built.

(Settings.apk) For errors in the settings.apk talking about not having the "holo" crap I removed all lines that mentioned it and it built.

(SystemUI.apk) For the systemui I used the one from the i9100 and it obviously built, but with absolutly no information from my own phone.

I guess my question here is did I actually "fix" any of those errors or did I just make them go away? I know somone mentioned already having fixed the holo errors, is that how you did it, or am I borking stuff :)?

2) my phone (r800x) cannot flash the boot partition from recovery. Only via fastboot. So my rom.zip contains only the system.img. Do I need to do anything to the boot.img with the patchrom tools?

*edited at 12:45 est for clarity and additional ramblings*
[Android Software Development] jimakos29:
thread dead? everyone quit trying?
[Android Software Development] antEris:
Still trying...

I'm still here :D I'm not much help though as I don't know what I'm doing (at all...I mean it...at all). I can get it to build, but I'm still having problems actually getting it to function. In my previous post I was using CM7 as the base. Like I said, I could get it to boot up and load the setup wizard. But nothing past that. I could skip the wizard with the corners trick. Then all hell broke loose and eeevery thing started force closing like mad.

I'm using stock now. It was easier to get it to build (less errors to "fix") but ironically I can't even get it boot up. I'm gonna keep tinkering. If anyone has any tips I'd love to hear them :)

I don't know if what im doing to fix the xml errors is correct but if anyone has the "did you mean to include Format="False"" error I can show you how I got past them. The "holo" errors, I'm pretty sure I'm doing wrong, but I'd be happy to show you how I've gotten it to build without those errors as well.
[Android Software Development] equiliym:
please do, i have those errors in values-xx when trying to build Phone.apk.. not sure where to edit/add format=falce and if i should just delete all those strings.xml in values-xx folders or not since i dunno if people would use this rom in other language if i even make it work lol :p :(

edit: disregard that, stuck at SystemUI.apk errors, just so many of them.. might try another rom
[Android Software Development] antEris:
Edit the "strings.XML" with gedit in the values-xx folders the errors will tell you which folder an what lines to edit.

Add:

Format = "False"

after "<string" and before "Name =".

To get to the right line in gedit tap ctr+I, type the line into the box, i.e 205 if the error says line 205, and hit enter. Then do the previous to the line it takes you to.

The unexpected string end errors will fix themselves after you add the format lines to the previous lines.

Hope this makes sense.
[Android Software Development] equiliym:
thanks, i actually managed to fix all up to SystemUI.apk.. i tried cm7 7.2.0 but was hell so i tried an older build without all that holo stuff and worked quite well.. but still, SystemUI.apk is giving me much errors i really dont know how to solve at the moment.. if you could please take a look and give hints, i would really appreciate it.. actually alot of missing resources but still cant figure them out for now..

here is the link with my current build errors http://pastebin.com/X362Vcuc

edit: i managed to compile by adding i9100 or whatever example systemui folder instead of my own but everything FCing.. guess im just not lucky enough
[Android Software Development] DarthJonathan:
Im here just stuck no where to goo :(
[Android Software Development] antEris:
Looks like all your errors are res related. The i9100 example doesnt have res files. Try using your handsets systemui.apk, but delete the Res folder and androidmanafest.xml, as well as the apktool generated file. I know it has somthing to do with that, but im still not sure exactly what the patchrom tool is doing or expecting from our sysui. I doubt it will work. But hey, worth a try right?
[Android Software Development] jahlovePL:
Hi guys,

I think PatchROM is only for ICS or CM9 based roms.

Regards
[Android Software Development] antEris:
Even if this wasn't posted in the op and translated documents as being untrue. I would still tell you you're wrong and that this tool is definitely for gingerbread based on the errors we're getting with cm7. Pretty sure the holo errors are from cm source incorporating honeycomb and ics elements. I think that's why the patcher doesn't have the correct resources.

I'm guessing that's why I didn't have the same errors with my devices stock 2.3.3 rom.
[Android Software Development] jasper580:
But it seems to be compatible with ICS. Some dev's from at my phone (LG Optimus Swift) are going to release it in there next ICS version ;)
[Android Software Development] equiliym:
true, there are miui v4 ports everywhere these days.. im using an older build of cm7 without ics or honeycomb things so im not getting holo errors on this one, just phone values and systemui.. i managed to compile with i9100 without problems, tried few different 2.3.x roms but none working, boots and just bunch of FC
[Android Software Development] DarthJonathan:
has anyone tried to build from ics? i tired of the fc's and non working stuff :(
[Android Software Development] Namaless:
READ FIRST POST!!!

This is only for gingerbread... mod edit

-----

In the next week try to porting miui on i9003, posting here the results :)
[Android Software Development] DarthJonathan:
Dude i've read it and i got the rom boot and everything is working normal except for phone, statusbar, settings etc :D
[Android Software Development] checkmateyou:
I keep getting FC for sgh-t989 (a.k.a "T-mobile Galaxy S II). Anyone have success?
[Android Software Development] karthiknr:
This is more likely because of issues with java i suppose. Type "sudo apt-get install sun-java6-jdk" and try.
[Android Software Development] Jon2555:
Does anyone know when ICS source will be released? I heared that it's on the way bu I want to know date.
[Android Software Development] KOJANHQ:
already out: https://github.com/MiCode/PatchRom-ICS
[Android Software Development] Jon2555:
It's just a holder for new project but anyway thank you. They'll update it by the time.
[Android Software Development] Gerrett:
No look at branch "master" there's the source

Gesendet von meinem LG-P925 mit Tapatalk
[Android Software Development] expeacer:
Where?

I only see some files and original roms from devices. But the MIUI source? There is a placeholder only in patchrom_miui folder :confused:
[Android Software Development] sakindia123:
Can someone who got a successful build post their Makefile(s)?
[Android Software Development] dswaggz:
Amen

ⓥⓘⓐ⇨EII4G♛ⓧⓠⓤⓘⓩⓘⓣ ♝3.9&ⓥ6supercharged☜

ⓩⓞⓞⓜ⇨ⓩⓞⓞⓞⓜ™©
[Android Software Development] re4lsk:
where can i find the output.zip if succesfully created all the steps in the thread but i cant find my output.zip, where is it?
[Android Software Development] agent205:
try the build directory
[Android Software Development] re4lsk:
Found it, it was on a hidden folder

Trolling in the deep
[Android Software Development] agent205:
are you sure it got no error when building the Phone.apk ?

how come ?
[Android Software Development] ZduneX25:
I stuck on:

I got some hunks that are normal, but it seems like they also are different that hunks I used to fix, view from original smali file:

# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager$18;)V

.locals 0

.parameter

.prologue

.line 3207

iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$18$1;->this$1:Lcom/android/internal/policy/impl/PhoneWindowManager$18;

invoke-direct {p0}, Landroid/os/IRemoteCallback$Stub;-><init>()V

return-void

.end method

and view from .smali.rej file:

*** PhoneWindowManager$18$1.smali 2012-04-07 22:46:19.289257643 +0200
--- PhoneWindowManager$18$1.smali 2012-04-07 22:47:15.428608230 +0200

***************

*** 19,33 ****

# direct methods

! .method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager$18;Landroid/content/Context;)V

.locals 0

.parameter

.parameter "x0"

.prologue

iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$18$1;->this$1:Lcom/android/internal/policy/impl/PhoneWindowManager$18;

! invoke-direct {p0, p2}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

return-void

.end method

--- 19,34 ----

# direct methods

! .method constructor <init>(Lcom/android/internal/policy/impl/PhoneWindowManager$18;Landroid/content/Context;I)V

.locals 0

.parameter

.parameter "x0"

+ .parameter "x1"

.prologue

iput-object p1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$18$1;->this$1:Lcom/android/internal/policy/impl/PhoneWindowManager$18;

! invoke-direct {p0, p2, p3}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;I)V

return-void

.end method

Does it fit to original file o.O?? Am not sure how many lines should I add to original file from rej file I used to add lines starting with '+'
[Android Software Development] Craptorman:
I have not been able to find an explaination on how to fix the items in the .smali.rej file. I probably have 100 of them to fix but not sure how to do it. I have opened both the old and new and the rej file and see how the line numbers refer to each file. Just not sure on what to do from there. Anyone have any info or a direction to point me? If, not, no biggie. I'll keep digging.
[Android Software Development] NineInchNails:
+1 am stuck here also
[Android Software Development] rukin5197:
Going to give this a shot with MDPI. I'll put my sources on github if anybody's wanting to build it.
[Android Software Development] skeevydude:
Me as well. Moto Bravo trying to use CM7 OR CM9 as a base rom. They're our only non-froyo roms with an active developer that boots.
[Android Software Development] ChaosChris:
Do i need a flashable odin package of stock firmware or a cwm zip to complie the miui patch rom?

Sry for my bad english
[Android Software Development] 1982Strand:
To work out the rejects, start by reading THIS

to help understand how to process them.

Some of the rejects can be very hard to work out, as the source code (smali from the base rom you chose) is very different from stock ics and the miui ics. Especially if the base rom you're using are not stock.
[Android Software Development] ZduneX25:
@1982Strand I already pressed thanks button, but i do not think it's helpful in here, i know this way and no matter what i cannot move on fixing miui's hunks that are diffeent
[Android Software Development] 1982Strand:
Yeah, that's exactly what i'm talking about. Don't know what it is, but that PhoneWindowManager smali is a b*tch - on many devices. Don't know why exactly this file is SO different from stock ics.

Anyone know a good place to learn smali codes? :)
[Android Software Development] ZduneX25:
@1982Strand well i know that miui makes 4 directories for patching smali and I know from where them come except /old_smali if i would know from where it comes then i would be able to add changes before patching ^^
[Android Software Development] 1982Strand:
Taken from the dev guide:

(1) old_smali: the smali code from old framework.jar.out with .line removed - original android source

(2) new_smali: the smali code from new framework.jar.out with .line removed - miui source

(3) dst_smali_orig: the smali code from target framework.jar.out with .line removed - the source from the base rom you're using

(4) dst_smali_patched: the smali code after applying the patch into target framework.jar.out

with .line removed
[Android Software Development] ZduneX25:
Saw this, but I can afford to say it's not 100% true. I compared old-smali to original smali form Android.policy and there was more changes not only removed lines...

___________

Sent form awesome Neo V
[Android Software Development] Racing19969:
Thanks for this post.. helps alot in processing the rejects.. My question is, there is a folder with the rejects in it that shows you what to fix. So, which folder do you apply the fixes too: The dst_smali_patched, new_smali, or dst_smali_patched.
[Android Software Development] 1982Strand:
@ZduneX25:

? It looks to me that they match, except those line changes (and an ocasional "miui" in a line here and there)

the original android source is in /patchrom/android - and then the line removal is done and it's moved to old_smali
[Android Software Development] 1982Strand:
@Racing19969:

Actually, i just found that out just now :) A guy named iBotPeaches told me this.

You don't touch any of the files in the "temp" directory. You need to do your edits to the files in the root directory of the phone your're patching.
[Android Software Development] ZduneX25:
@1982Strand you made a good point, now I see it fits, maybe previously I was too upset to stay focus with this..
[Android Software Development] Racing19969:
Thanks for the info... makes sense now..
[Android Software Development] Craptorman:
Still confused on this. I believe I understand the reject files. But, my files in the root folder don't match up with the line numbers from the reject files and most of the time I can't even find the line from the reject file in the origonal root folder file. Only files that match up with the rejects are in the old_smali folder which leads me to believe these are the ones that need editing.

I must be misunderstanding something. Any other helpful hints on what files need to be edited?
[Android Software Development] Peteragent5:
How do you build this for Armv6?
[Android Software Development] 1982Strand:
You need to edit smalis in the device root folder. Example i use here is phonewindowmanager.smali from /patchrom/-your-device-here/android.policy.jar.out/

Example:

*** PhoneWindowManager.smali	2012-05-05 19:47:55.804643000 +0200
--- PhoneWindowManager.smali	2012-05-05 19:44:00.995979000 +0200
***************
*** 6972,6978 ****
.end local v3 #hungUp:Z
.end local v9 #telephonyService:Lcom/android/internal/telephony/ITelephony;
:cond_15
! invoke-direct {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->interceptPowerKeyUp(Z)Z

move-result v10

--- 6978,6984 ----
.end local v3 #hungUp:Z
.end local v9 #telephonyService:Lcom/android/internal/telephony/ITelephony;
:cond_15
! invoke-virtual {p0, v0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->interceptPowerKeyUp(Z)Z

move-result v10

***************
*** 7137,7143 ****
const/4 v10, 0x1

:goto_c
! invoke-direct {p0, v10}, Lcom/android/internal/policy/impl/PhoneWindowManager;->interceptPowerKeyUp(Z)Z

move-result v10

--- 7143,7149 ----
const/4 v10, 0x1

:goto_c
! invoke-virtual {p0, v10}, Lcom/android/internal/policy/impl/PhoneWindowManager;->interceptPowerKeyUp(Z)Z

move-result v10

This tells me this:

The patch is expecting source input (***) to be at the lines from 6972 to 6978.

The input at (---) is how the lines should look AFTER patching.

+ means line added

- means line removed

! means line changed

You get a reject, because the patch couldn't find the expected source input at the given line numbers (or anywhere else for that matter) and thus the actual patching fails.

For instance, the lines might be offset 200 lines before or after the expected input and might be slightly different looking:

.end local v7 #hungUp:Z
.end local v2 #telephonyService:Lcom/android/internal/telephony/ITelephony;
:cond_d1
invoke-direct {p0, v1}, Lcom/android/internal/policy/impl/PhoneWindowManager;->interceptPowerKeyUp(Z)Z

move-result v12

.. Notice the difference in values here.. I would then guess that this would be the right place to edit. I would only edit the line with the ! and leave the rest.

And remember when you now do your edits of the smalis, they will be partially patched already - the patches that were successfull to start with. In this case, the phonewindowmanager.smali will of course be different from the original one from your base rom zip.
[Android Software Development] ZduneX25:
@1982Strand what if rej looks this way:

and file from device looks:
[Android Software Development] Craptorman:
Thanks for the detailed example! I'll check this out when I get home on a little bigger screen :D
[Android Software Development] 1982Strand:
Well, i'd say you don't edit this. The line "Cond_0" which should be "blank" after patching, isn't in the original smali to begin with. So as i see it, this is not a "bad" reject and things will propbably work. But i'm not sure if i'm right though.

I got exactly the same reject :)

You all propbably get rejects from PhoneWindowManager.smali and --$18 and --$18$1, right?

If you got the same as me, the rejects you get from $18 and $18$ needs to be patched in $20 and $20$1 instead. So you'll keep getting rejects from $18 and $18$1, but they are fixed in $20 and $20$1, so they will work in the end. Take a look at the lines and see if i'm right. (Credits to Marange (who i'm assisting) for figuring this out :) )
[Android Software Development] 1982Strand:
@ZduneX25:

Could you zip up your reject file and the original smali and post them?

I got a feeling it's pretty similat to mine, so i'll have a look and check.. ;)
[Android Software Development] oSandmaNo:
I downloaded the zipball from the link and i got a 1kb file with only a default.xml inside it.

So from where do I get the makefile?
[Android Software Development] ZduneX25:
@1982Strand I would really appreciate it: http://www11.zippyshare.com/v/88790784/file.html
[Android Software Development] oSandmaNo:
Ok Ive got a build after hours of googling and reading this thread over and over. But I did it on a nandroid of a stock rom since cyanogen wasnt compiling and i couldnt find a stock rom in cwm zip format. And there was no phone.apk just BlurPhone.apk and it wouldnt decompile. So i skipped it. And now I got a zip file that has no updater script. Il try restoring this via clockwork and see.
[Android Software Development] tanclo:
this looks very helpful for a first time builder. is there some way one can build a rom for ODIN as the device I'm hoping to build a 'patch ROM' for, has no CWM recovery (yet)

It's the SHV-E120K (Galaxy HD LTE, one of 3 Korean variants).
[Optimus One, P500, V General] jomatt:
When i tried to install MikOS 6.5.8 from froyo 2.2.2 after rooting using gingerbreak and resetting everything i am getting this error..

assert failed: getprop (ro.product.device)=="thuderg"

getprop (ro.build.product)=="thuderg"

getprop (ro.product.board)=="thuderg"

E:Error in /sdcard/cynogen_thunderg-ota-eng.mik-6.5.8.zip (status 7)

Instalation aborted.

How to rectify this?
[Optimus One, P500, V General] aayushARM:
In CWM>install zip from sdcard>asserts. is that enabled? try again after disabling it if it's enabled.
[Optimus One, P500, V General] jomatt:
can u explain how to get this option?

i have only these options in it..

choose zip from sd card

apply/sdcard/update.zip

toggle script asserts

toggle signature verification
[Optimus One, P500, V General] aayushARM:
I was talking about the above thing!:rolleyes:

I Forgot the complete name, sorry!:D
[Optimus One, P500, V General] jomatt:
Disabled it..and tried to flash again..

but the same error preventing everything..
[Optimus One, P500, V General] jomatt:
When flashing aborted it reverted back to stock 2.2.2 froyo everytime..

when this happens previously installed gingerbreak and rom manager app is gone missing..

but super user is still there..
[Optimus One, P500, V General] FreakAphex:
i get this same problem when trying to do an update from the nightlys :( any fix's? or ideas?
[Optimus One, P500, V General] jomatt:
My Problem solved.... Actually the main cause is with CWM recovery ..

i tried latest CWM instead of old baseband CWM 5.0.2.0..

after flasing CWM 5.0.2.0 everything went smoothly.. No issues..
[Optimus One, P500, V General] FreakAphex:
Hrmmm So did i.. But now my CMW recovery is a black screen i can't see anything and can't figure out how to fix it.. do you got any ideas? lol