yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Notorious:
Hey you're lucky I had 43 and got all of them patched but it was pretty much all for nothing since I can't build with patchrom due to horrible netbook......
[Android Software Development] fedevd:
Hmm.. Upload your device folder and I will build for you

Which device? Nexus 5? Maybe your reject fixes could work on mines.. I used stock AOSP 4.4.4 here..
[Android Software Development] Notorious:
If that's the case I need to make some edits [emoji5] to some of my smali since I got some repeating errors but they were ignored by patchrom. I will upload in the morning. Since right now its 12:50am so just relaxing and smoking a cigarette while I listen to music [emoji18]

---------- Post added at 11:52 PM ---------- Previous post was at 11:50 PM ----------

HTC Evo 4G LTE and possibly some rejects will work with your device but not all of mine
[Android Software Development] fedevd:
Almost 2 am here haha.. Gotta wake up in 4 hours.. Gimme your Hangouts account over PM and I will help you to build it tomorrow, took less than 10 mins here to build mine.. Gotta sleep, see ya tomorrow guys..
[Android Software Development] ZduneX25:
Am pretty sure if you would use 4.4.2 or 4.4.3 you would get way less rejects. They released kitkat sources when mi3 had 4.4.2 and I didn't notice and spectacular update after initial release. Moreover most of my patches (smali fixes etc) stopped to work on mi3 after 4.4.4 so I had to update them manually.

I know that everyone wants latest android but for learning 4.4.2 should fit just perfect however if you already face so many and get through them you can call yourself advanced patchrom user :p
[Android Software Development] Notorious:
Also [MENTION=3141383]ZduneX25[/MENTION] I would like to say thank you for teaching me the ways of patchrom. It was a great learning experience and I got to expand my android knowledge. Even though I can not personally build with patchrom due to hardware difficulties. I will now be able to help others when it comes to rejects and having everything setup for patchrom. There are only a few that are non Chinese that have mastered patchrom and you are one of them [emoji122]
[Android Software Development] ZduneX25:
The last error you get was still depending on sdk, the meantime one was about hardware difficulties.
[Android Software Development] Notorious:
I swear I have SDK setup right its in my bash.rc and I have all the necessary packages installed from SDK manager and I can pull logcats and use ADB from main terminal windows
[Android Software Development] fedevd:
Didn't knew that fact mate, I used 4.4.4 'cus was the one I had in hand so if 4.4.2 will be better then I will use it today.. Good to know that ;)
[Android Software Development] Tyrany:
[MENTION=3531145]fedevd[/MENTION] on your miui5 rom port last year you had an error similar to this

I/dalvikvm( 782): Zip is good, but no classes.dex inside, and no .odex file in the same directory

W/PackageManager( 782): Exception reading jar: /system/framework/framework-ext-res.apk

W/PackageManager( 782): java.io.IOException: /system/framework/framework-ext-res.apk

W/PackageManager( 782):	at dalvik.system.DexFile.isDexOptNeeded(Native Method)

W/PackageManager( 782):	at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:1290)

W/PackageManager( 782):	at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1061)

W/PackageManager( 782):	at com.android.server.ServerThread.initAndLoop(SystemServer.java:270)

W/PackageManager( 782):	at com.android.server.SystemServer.main(SystemServer.java:1277)

W/PackageManager( 782):	at java.lang.reflect.Method.invokeNative(Native Method)

W/PackageManager( 782):	at java.lang.reflect.Method.invoke(Method.java:515)

W/PackageManager( 782):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:807)

W/PackageManager( 782):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:623)

W/PackageManager( 782):	at dalvik.system.NativeStart.main(Native Method)

how did you solve it, havent find the answer on the posts
[Android Software Development] ZduneX25:
[MENTION=4264999]Tyrany[/MENTION] he did not bacause he was using miui build before framework-ext-res showed up, i would replace it with miui.apk in bootclasspath it has all resources from framework-ext-res now.
[Android Software Development] Notorious:
Alright guys heres my device folder y'all are free to go ahead and pick from it if you want or compare ect https://www.dropbox.com/s/xuy24vftuvqksgl/Jewel.zip?dl=0

[MENTION=3531145]fedevd[/MENTION] [MENTION=3794018]shakim24[/MENTION]
[Android Software Development] ZduneX25:
No github source? Did you share along with rejects so they could fully understand?
[Android Software Development] Notorious:
Yea I shared along with rejects and I tried putting it up on github but due to my noobness I couldn't upload my local git since I couldn't get rid of the big file warning (forgot to take stock rom out) and doing git rm --cached and git RM -r commands didn't get it out of my history
[Android Software Development] fedevd:
Downloading to build it mate, gimme a few minutes and will be ready (if nothing breaks the proccess)
[Android Software Development] Notorious:
Okay it is all up on Github now thanks to [MENTION=3141383]ZduneX25[/MENTION]

https://github.com/Notorious-XDA/Patchrom-Jewel
[Android Software Development] fedevd:
[MENTION=4229751]Notorious[/MENTION]
[Android Software Development] Notorious:
[MENTION=3531145]fedevd[/MENTION] that is the same error I got
[Android Software Development] ZduneX25:
[MENTION=3531145]fedevd[/MENTION] did you revert latest patchrom_tools commit?
[Android Software Development] fedevd:
Nope, didn't made anything.. Get into with TeamViewer and do it if you can, I can't rite now
[Android Software Development] ZduneX25:
Am having one session already.. https://github.com/MiCode/patchrom_...da00c738631b223bc92cc0a#commitcomment-7316474
[Android Software Development] fedevd:
Reverted, still having errors

Compress the target_files dir into zip file
/home/federico/Escritorio/patchrom/jewel/out/target_files
zip -q -r -y /home/federico/Escritorio/patchrom/jewel/out/target_files.zip *

zip error: Zip file structure invalid (/home/federico/Escritorio/patchrom/jewel/out/target_files.zip)
/home/federico/Escritorio/patchrom/jewel
Sign target files
Traceback (most recent call last):
File "/home/federico/Escritorio/patchrom/tools/releasetools/sign_target_files_apks", line 354, in <module>
main(sys.argv[1:])
File "/home/federico/Escritorio/patchrom/tools/releasetools/sign_target_files_apks", line 330, in main
input_zip = zipfile.ZipFile(args[0], "r")
File "/usr/lib/python2.7/zipfile.py", line 766, in __init__
self._RealGetContents()
File "/usr/lib/python2.7/zipfile.py", line 807, in _RealGetContents
raise BadZipfile, "File is not a zip file"
zipfile.BadZipfile: File is not a zip file
mv: no se puede efectuar `stat' sobre «temp.zip»: No existe el archivo o el directorio
Build full ota package: /home/federico/Escritorio/patchrom/jewel/out/fullota.zip
unzipping target target-files...
[/home/federico/Escritorio/patchrom/jewel/out/target_files.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /home/federico/Escritorio/patchrom/jewel/out/target_files.zip or
/home/federico/Escritorio/patchrom/jewel/out/target_files.zip.zip, and cannot find /home/federico/Escritorio/patchrom/jewel/out/target_files.zip.ZIP, period.

ERROR: failed to unzip input target-files "/home/federico/Escritorio/patchrom/jewel/out/target_files.zip"

make: *** [fullota] Error 1
federico@Aspire-Z3761:~/Escritorio/patchrom/jewel$
[Android Software Development] ZduneX25:
You guys use latest sdk which does not include zipalign so download zipalign and add it to PATH as well..
[Android Software Development] fedevd:
Didn't updated SDK for months haha.. The one from your 'other' folder in your Github will be ok? Downloading rite nao.. But I was able to build for my device without any issue and I am using the same source with 'jewel' added..

[MENTION=4229751]Notorious[/MENTION], from which recovery did you pulled your stockrom.zip? CWM always gave me errors but TWRP worked just fine..
[Android Software Development] Tyrany:
Small question i'm trying to get adb shell system_server and log says system/bin/sh system server not found

what am i missing? Since that load of files posted earlier make the device go into I/Netd : Netd 1.0 starting loop, i've used google as my friend and found a post from centuries ago from cosmic dan telling someone to run that and see what appear there, and maybe that could help get past that stupid error
[Android Software Development] Slimegod:
Can one of you guys pass me a zipalign download link, not in front of a computer at the moment.

Edit: Rang a bell, know where it is. What I get for driving and being into my phone smh.
[Android Software Development] Notorious:
The zipalign bin fixed my SDK error but now in facing another issue. Zdune said he would research the error later. And I pulled stockrom using TWRP. Said it might be related to something else or just my horrible hardware so will keep updated
[Android Software Development] fedevd:
[MENTION=4229751]Notorious[/MENTION] can you reboot into recovery and see if you have any partition mounted? If had issues with '/data', it was mounted when I booted in recovery so unmounting it solved my issues.. Judging your issue and the reverted commit you have issues with your target folder and the edify script, I had the same issues too so tell me, when you made '../tools/releasetools/ota_target_from_phone -r' did you had any error? I can build without 'zipalign', I made a build yesterday at nigth (bootlooped) without any issue and I used the same patchrom folder which contains your jewel folder.. I sent you msgs on Hangouts..
[Android Software Development] ZduneX25:
Sorry guys but device tree is all fine. I knew I prepared it right way I just faced build.prop issue because of missing values for patrchrom, but correcting it now in [MENTION=4229751]Notorious[/MENTION] project.

Log from my PC:

http://pastebin.com/Zqpn6GMv
[Android Software Development] fedevd:
Made what [MENTION=3141383]ZduneX25[/MENTION] said and used 4.4.2 and I had less rejects =D

federico@Aspire-Z3761:~/Escritorio/patchrom/mako/temp$ command tree reject
reject
├── android.policy.jar.out
│** └── smali
│** └── com
│** └── android
│** └── internal
│** └── policy
│** └── impl
│** └── PhoneWindow.smali.rej
├── framework2.jar.out
│** └── smali
│** └── com
│** └── android
│** └── internal
│** ├── app
│** ├── backup
│** ├── os
│** ├── statusbar
│** ├── telephony
│** ├── view
│** │** └── menu
│** │** └── ListMenuItemView.smali.rej
│** └── widget
│** ├── ActionBarView$ExpandedActionViewMenuPresenter.smali.rej
│** ├── ActionBarView$HomeView.smali.rej
│** ├── ActionBarView.smali.rej
│** └── multiwaveview
├── framework.jar.out
│** └── smali
│** └── android
│** ├── accounts
│** ├── app
│** │** ├── backup
│** │** └── SearchDialog.smali.rej
│** ├── bluetooth
│** ├── content
│** │** ├── pm
│** │** │** └── ResolveInfo.smali.rej
│** │** └── res
│** ├── database
│** ├── graphics
│** │** └── drawable
│** ├── hardware
│** ├── media
│** ├── net
│** │** ├── http
│** │** └── wifi
│** ├── nfc
│** ├── os
│** ├── preference
│** │** └── PreferenceScreen.smali.rej
│** ├── provider
│** ├── speech
│** │** └── tts
│** ├── telephony
│** ├── text
│** │** ├── format
│** │** └── util
│** ├── util
│** ├── view
│** │** └── inputmethod
│** ├── webkit
│** └── widget
│** ├── Spinner$DialogPopup.smali.rej
│** └── SuggestionsAdapter.smali.rej
├── services.jar.out
│** └── smali
│** └── com
│** └── android
│** └── server
│** ├── accounts
│** ├── am
│** ├── AppOpsService.smali.rej
│** ├── connectivity
│** ├── display
│** ├── location
│** ├── net
│** ├── pm
│** ├── power
│** │** └── ShutdownThread.smali.rej
│** ├── usb
│** └── wm
└── telephony-common.jar.out
└── smali
├── android
│** ├── provider
│** └── telephony
└── com
└── android
└── internal
└── telephony
├── cdma
│** └── CDMAPhone.smali.rej
├── dataconnection
│** └── DcTracker.smali.rej
├── gsm
│** └── GSMPhone.smali.rej
└── uicc
├── RuimRecords.smali.rej
└── SIMRecords.smali.rej

82 directories, 17 files
federico@Aspire-Z3761:~/Escritorio/patchrom/mako/temp$

So time to test a couple things and then have some partys xD
[Android Software Development] Slimegod:
Yeah man gotta use a ASOP ROM. Those rejects become tedious after a while smh. Especially if you have a whole lot then you still get errors after you thought you fixed them smh.
[Android Software Development] ZduneX25:
[MENTION=3531145]fedevd[/MENTION] bad zip file error seems to be releated to lack of ram if you have heavy device directory it cannot handle unzipping and if your device directory is light then you have enough ram to move forward, how much do you have? patchrom needs 4gb to handle every single rom
[Android Software Development] Notorious:
Finally now watch it not boot lol
[Android Software Development] fedevd:
I have 4 gb of RAM.. I am looking some more stuffs and trying to compile a bootable one, then I will make a Patchrom 'how-to' and wait for v6 sources..
[Android Software Development] ZduneX25:
[MENTION=4229751]Notorious[/MENTION] found out it was about reverting last tools commit am gonna let him explain, cause am a little bit busy
[Android Software Development] fedevd:
The commit you said messages ago worked for 4.4.2 but if I do not revert it it will work with 4.4.4.. I'm still outside so I can't get hands on yet but I will try tonight to make a build and post here the error if I have any (and for sure I will have =P)
[Android Software Development] fedevd:
[MENTION=3141383]ZduneX25[/MENTION] please, look this weird error:

/home/federico/Escritorio/patchrom/mako
Sign target files
ERROR: no key specified for:

duokanyuedu.apk
vancl.apk
kuwoyinyue.apk
jinshanshoujiweishi.apk
souhuxinwen.apk
jinshandianchiyisheng.apk
meilishuo.apk
ucliulanqi.apk
jinshankuaipan.apk
xinlangweibo.apk
laohuditu.apk
miliao.apk
xiechengwuxian.apk
youjia.apk
oupengliulanqi.apk
kuaijiejiudianguanjia.apk
91xiongmaokanshu.apk
wangyixinwen.apk
XiaomiAuthenticator.apk

Use '-e <apkname>=' to specify a key (which may be an
empty string to not sign this apk).
Build full ota package: /home/federico/Escritorio/patchrom/mako/out/fullota.zip
unzipping target target-files...
warning [/home/federico/Escritorio/patchrom/mako/out/target_files.zip]: zipfile is empty

ERROR: failed to unzip input target-files "/home/federico/Escritorio/patchrom/mako/out/target_files.zip"

make: *** [fullota] Error 1

I know that adding into 'apkcerts.txt' will be fixed but where did Patchrom took those apps not present on my device? =S
[Android Software Development] Slimegod:
Getting this error when downloading the source codes. Before that i got a error when downloading "curl https://dl-ssl.google.com.google.com/dl/google.source/git-repo/repo > ~/bin/repo". Said "could not resolve host: https". I know the repo is bad, saw it in the bin folder. Don't know that links are out there to get a good repo. Question is how to I get the codes downloaded.
[Android Software Development] ZduneX25:
[MENTION=3531145]fedevd[/MENTION] in yourdevice/metadata
[Android Software Development] fedevd:
I will look closer tomorrow. By the way, already made a bootable build with non wifi and non radio/3G but I am closer. Thanks mate ;)
[Android Software Development] ZduneX25:
I had to use some libs from n5 to make gsm work, just follow my /others dir.
[Android Software Development] Notorious:
I have no idea what's up with your setup I've never seen this. Also why are you trying to install curl don't believe it's needed at all
[Android Software Development] Slimegod:
Probably why I'm getting what I'm getting. Never had a problem with it before though. Anyway I won't install it and see.

Edit: I've always known to install curl. It's needed for the repo script. So I'm not sure what method your using to install your repo script. Anyone having the issues I am should read this thread. You'll get a clearer understanding of why the errors occur.

xdaforums.com/showthread.php?t=2302780&page=18
[Android Software Development] Notorious:
Sudo apt-get install curl
[Android Software Development] Slimegod:
Yeah you have to install that or else curl won't run. Was running VM and as that post said windows text editors put special codes at the end of lines so it may have read it with no problem because I was running VM. But being that Im running straight Ubuntu without VM on my laptop I just got Linux may not recognize the characters that's being typed so that's why I may have gotten those errors.
[Android Software Development] Slimegod:
Getting this error. Says "no resource found that matches the given name 'Widget.AppCompat.Base.DropDownItem'". Pretty much says the same thing with everything thats in the xml. Snatched the email you gave me the link to Notorious a few

days ago to Zdune's email/res/values xml.
[Android Software Development] ZduneX25:
Has to work, works for me and Notorious. There was no update from xiaomi. You can try add missing style the same way I did or you just put it in wrong path.
[Android Software Development] fedevd:
[MENTION=3141383]ZduneX25[/MENTION] Got it, booted. I have jist 1 bug and is 'android.process.acore' opening MIUI dialer, contacts or sms apps but I can use the Google ones.. Added 'libsqlite.so' from Nexus 5 and didn't worked, what else could be?
[Android Software Development] ZduneX25:
Download contactsprovider.apk directly from MIUI github and add it to your port. This apk does not allow any changes, so try with original file am not sure, but I think that patchrom resings it and that causes issue.
[Android Software Development] Slimegod:
Have it in the device folder and where do i get missing style. Had no issues with this when running VM. Would replacing at the end of the line with parent=""> be a fix? Also what version of apktool does patchrom use?

Edit: so I used Notorious email folder and the problem still persists. Didn't make a difference being that it's the same xml but I gave it a shot. Pretty much stalled with this project until I fix it, thanks anyway guys :beer:
[Android Software Development] Notorious:
are you using our customize framework and customize miui apps scripts?
[Android Software Development] Slimegod:
Yup. Compared your build with mine and it's the same.
[Android Software Development] fedevd:
Very well, everything fully working now, gotta fix Torch that do not activate the flash and fix themes that get back to default on each reboot
[Android Software Development] Slimegod:
Notorious you have 2 makefiles in your project. Which one is the correct one?

Edit: After reading a few pages back there were some edits to certs so I know that's the most recent. But before everyone starts taking my head off "email" is in two different places in both makefiles so that's why I'm asking.
[Android Software Development] Notorious:
The one with a - at the end was not meant to be uploaded. Depending on how I save something using a certain program it will make a backup of the original file and add a - at the end so just look at Make file not makefile-
[Android Software Development] Slimegod:
So were the certs corrected in your program and is safe to go off of? Also there is no "Make file" it's makefile with one word so use that one?
[Android Software Development] Notorious:
I think they are they should be good to use. And its Makefile keyboard just added a space
[Android Software Development] dams161:
Hello there

I try to make a port for miui

but I have a bootloop if anyone can help me thank you

http://pastebin.com/Nnc03nJb
[Android Software Development] fedevd:
Fix that missing method:

D/dalvikvm( 1724): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods

E/dalvikvm( 1724): ERROR: couldn't find native method

E/dalvikvm( 1724): Requested: Landroid/view/Surface;.nativeSetDirtyRect: (ILandroid/graphics/Rect; )V

E/dalvikvm( 1724): JNI posting fatal error: RegisterNatives failed for 'android/view/Surface'; aborting...
[Android Software Development] dams161:
OK but why?

I have problem socket
[Android Software Development] fedevd:
But why? Problem socket? I can't understand what are you talking about..

Reffer to OP, read it (1, 2, 3 times if neccessary or you will never get a bootable port) and you will see how to fix it, it's easy, you gotta add '.nativeSetDirtyRect' method in 'Surface.smali'..
[Android Software Development] dams161:
Sorry for my english

I look my error
[Android Software Development] Slimegod:
[MENTION=3531145]fedevd[/MENTION] how did you fix this?

Edit: fixing it now.
[Android Software Development] Slimegod:
Still getting that error
[Android Software Development] Notorious:
Where did you get your apkcerts from in metadata
[Android Software Development] Slimegod:
Searched it in the device directory. Read the post [MENTION=3531145]fedevd[/MENTION] left. Couldn't find it so I searched it. Yeah it's in the out/target_files/META. Saying put -e, so would it be "-ePacProcessor.apk" without the space in between the -e?
[Android Software Development] Notorious:
You must use the apkcerts that were generated after you pulled stockrom.zip from your phone. And its in patchrom/<device>/ metadata. Its trying to sign those apks but it does not have those listed in the apkcerts
[Android Software Development] Slimegod:
Not my device directory right. Cause I don't see a file named device.
[Android Software Development] Notorious:
By <device> I meant your device directory..
[Android Software Development] Slimegod:
Yeah I figured. Where I had it before, don't think I did it right though. Thanks :cool:

---------- Post added at 03:30 AM ---------- Previous post was at 02:46 AM ----------

Is this the correct way of fixing the error name="-e Launcher3.apk="? Still getting the error. The apkcerts is only in one place that that's where I mentioned before. Looked in the metadata in my device directory and it's not there.
[Android Software Development] Notorious:
You must have done something wrong because it is automaticlly made when you pull the stockrom from your device
[Android Software Development] Slimegod:
Everything is where it should be. I'll figure it out.
[Android Software Development] fedevd:
I'm tottally sure that you had 1 error pulling your rom from the device or ended without making the propper pull.. One of the initial steps were 'mkdir nameoffolder' and then 'cd nameoffolder' (where 'nameoffolder' is the given name of the folder where your device files were pulled). In that folder you gotta have a 'metadata' folder and 'apkcerts' file inside.. If you doesn't have it then you had a wrong device files pull..
[Android Software Development] Slimegod:
Here are the steps I took:

mkdir for patchrom

cd patchrom

repo init -u......

repo sync

. build/envsetup.sh

mkdir (device folder)

cd device folder

make workspace

make firstpatch
[Android Software Development] fedevd:
Don't you have 'metadata' folder on your device folder?
[Android Software Development] Slimegod:
My device folder
[Android Software Development] fedevd:
You didn't made '../tools/releasetools/ota_target_from_phone -r' before 'make workspace', that's why you don't have 'metadata' folder and that's why you have those sign errors
[Android Software Development] Slimegod:
I see. Gotta mkdir for what you just mentioned?

Edit: I'm reading the guide as we speak.