I just don't understand updater script and the framework-res.apk??? - Android Q&A, Help & Troubleshooting

Maybe im starting a little bit above my head but I've finally been able to create my own builds of roms from source stock and cm thanks to all the info here which is pretty amazing the only time i run into problems is when i try to venture off into the custom world. My question is i guess I see so many references from devs to this and the updater script for obvious reasons i just wanted to know what it was and why their so important in the rom itself and in tweaks. Most importantly though where can i go to learn how to understand this stuff

What exactly is your question? The updater-script is like a manifest for the installation of the rom, it controls what gets copied where, and sets permissions. I'm sure it can/does do more, but I don't know too much myself. As far as the framework-res.apk goes, it is the "framework" for the rom. So among other things it hase the core color, animation, dimensions, etc xml's. It also has some of the system png's. I'll try to find some links, as I haven't really look before. Anyone else feel free to chime in with more info, or correct me if I'm wrong.

For updater-script, might want to look in my signature
#pitchblack5691#

Related

[Q] Beginner Questions

I'm very interested in doing some ROM development, though I'm quite the beginner. I know my way around Java and can hold up against some C, and I've also done some apps. I have a few questions though before I get started.
After I run make on the AOSP, how can I test my build with the emulator and my device (Eris)?
Will using the build on my Eris work, provided there are no build problems?
How could I base a ROM I make off of an existing ROM? (For example, KaosFroyo)
What is the difference between cooking a ROM, and running make on the AOSP?
I think thats about it for now. Thanks for taking a look!
Chiggins said:
I'm very interested in doing some ROM development, though I'm quite the beginner. I know my way around Java and can hold up against some C, and I've also done some apps. I have a few questions though before I get started.
After I run make on the AOSP, how can I test my build with the emulator and my device (Eris)?
Will using the build on my Eris work, provided there are no build problems?
How could I base a ROM I make off of an existing ROM? (For example, KaosFroyo)
What is the difference between cooking a ROM, and running make on the AOSP?
I think thats about it for now. Thanks for taking a look!
Click to expand...
Click to collapse
1) I'll answer the Eris part, since I have done that more than once... You need to zip up the following:
a) /system folder from 'out/target/product/generic (or desirec if you used a vendor tree)
b) a /META-INF/com/google/android folder structure with a working update-script
c) a boot.img with an Eris kernel and appropriate init.* scripts in the ramdisk​Then sign the resulting zip. There's your base ROM. You can also just throw that into dsixda's kitchen.
2) Yes. Define 'work'. You'll need an Eris kernel, Eris specific drivers in the right place, and the correct settings in the init.* scripts and build.prop. It also helps to have a wlan.ko in /system/lib/modules that is compiled against the kernel that you are using.
3) If you take an existing Eris ROM and use it as a base, you're golden. The Eris specific stuff is already there. At that point, you can theme, add/remove apps/etc. Give credit where credit is due though. Personally, I recommend that you start with a stock ROM or AOSP, but that's me.
4) Well, I suppose it depends on who you ask... Some devs don't really like the 'cook' moniker. It sort of implies that you are just taking parts from everywhere else and making something tasty instead of coming up with something new. Compiling AOSP is not really coming up with something new, but at least you started 'from scratch'.
Even if you don't want to use a kitchen, I recommend that you download dsixda's and my Android Builder to look at the scripts. You can learn a lot by looking at those.

[Q] Rom porting guide?

Is there such a guide/tutorial/description?
I am interested in porting ROMs to the G1. I am a total beginner, and I could not find anything useful (except the automatic porting of dsixda's kitchen, what is great btw, but I want to learn how to do it by hand, etc).
Could please someone tell me how to do this, what to copy from original ROM for things to work, etc?
Thank you very much!
It's going to vary from ROM to ROM, depending on what device you are porting from and whether it's Sense/AOSP/etc.
You can get some ideas from a couple of my posts though.
http://forum.xda-developers.com/showthread.php?t=723319
http://forum.xda-developers.com/showthread.php?t=815265
Porting is not generally that hard to do... It's getting everything to work right that's a pain.
Also, look at vendor trees for your device. That will give you a good idea about which proprietary files (drivers, etc.) that need to be replaced.
gnarlyc said:
It's going to vary from ROM to ROM, depending on what device you are porting from and whether it's Sense/AOSP/etc.
You can get some ideas from a couple of my posts though.
http://forum.xda-developers.com/showthread.php?t=723319
http://forum.xda-developers.com/showthread.php?t=815265
Porting is not generally that hard to do... It's getting everything to work right that's a pain.
Also, look at vendor trees for your device. That will give you a good idea about which proprietary files (drivers, etc.) that need to be replaced.
Click to expand...
Click to collapse
This is really great, thanks Gnarlyc... been searching all over for tutorials/etc. I was able to port an N1 ROM to the EVO (using dsixda's kitchen); however sensors + radios failed to work after boot-up; probably missed a couple files/libs. Will look these links for tips. Thanks!
gnarlyc said:
It's going to vary from ROM to ROM, depending on what device you are porting from and whether it's Sense/AOSP/etc.
You can get some ideas from a couple of my posts though.
http://forum.xda-developers.com/showthread.php?t=723319
http://forum.xda-developers.com/showthread.php?t=815265
Porting is not generally that hard to do... It's getting everything to work right that's a pain.
Also, look at vendor trees for your device. That will give you a good idea about which proprietary files (drivers, etc.) that need to be replaced.
Click to expand...
Click to collapse
really nice, finaly a topic where i found more infos than just "use the kitchen and change kernel"
other questions :
how do you know you needed to replace some string values by other ? simply open the original rom for you device and compare, or simply guessing the name ???

Porting htc one roms to the max?

hey guys, just wondering how difficult it would be to do this and keep the finger print scanner. i (with no android developing experience) tried following a few tuts to try and port a 4.3 rom with little success, i managed to get it to start installing in cwm then to give a permission failure or something similar so yeah just a quick question
+1
Sent from my SM-N900V using Tapatalk
hectorz321 said:
hey guys, just wondering how difficult it would be to do this and keep the finger print scanner. i (with no android developing experience) tried following a few tuts to try and port a 4.3 rom with little success, i managed to get it to start installing in cwm then to give a permission failure or something similar so yeah just a quick question
Click to expand...
Click to collapse
Permission failure? Noob here too
I am guessing the ROM you tried to port checks for the Model number of the phone before flashing. What ROM did you try to port to and if you could post the instructions here we will make this the porting thread
Given that HTC One has all the custom ROM's and kernels we need devs or someone like us who can follow instructions to start doing it. I am sure we will get help from one another and end up with custom ROM's for the MAX.
I was also thinking of doing this but just to start with i don't want to look at the fingerprint scanner and may be later we could get it working.
I am certain most people would be willing to not have a working fingerprint scanner, as a trade off for a few custom roms/kernels...
Well to start you need to make sure your Meta-Inf directory is one from the Max, you should be porting from something with the same board as well which would give you less headaches in the long run. The One would be a good starting port since they use the same boards (msm8960 Snapdragon 600) The updater script in Meta-Inf needs to be pointing to the correct device. For example and this is just an example in the beginning of the updater script which is really the instructions for flashing the rom in recovery shouldn't say something like "get prop blah blah m7vzw" the m7 being the model # should be t6vzw if you were using a Verizon device etc etc.. All mount points need to be exactly what the Max's mount points are otherwise it will never flash.. The original One mount points aren't the same as the One Max. Also the kernel from the Max is a must, plus in system/lib you need the modules as well as hardware. In system/bin you need vold, vold is device specific. In system/etc you need vold.fstab again device specific stuff. The you need the hardware directory, which is touch capacitive buttons and LED's and what not. Those may be the same as the One since they are laid out the same.. The audio should most likely be the same but you would need to remove all the Beats Audio crap from system/etc since the One Max isn't a beats device.. GSM to GSM may be an easy port, CDMA to CDMA may be a little more difficult. Although they use libril-qc-qmi-1.so I think it is, that may be a typo but that's something like what the lib path will point to, the code may be slightly different in telephony for CDMA LTE devices. That would be found in framework.jar if applicable framework2.jar..
I could most likely easily get a port done, I'm just very limited to time.. Some of the tutorials out there are very generic and would kind of work well if you have 2 very identical devices with minor changes and manufactured around the same time small example would be like the HTC Desire and the HTC Thunderbolt.. That's a pretty straight forward port with some minor audio tweaks since sound image in system/etc is different and that as well are devices that would require a RIL hack as stated above with framework.jar... That right there would be strictly smali/baksmali hacking which I have some knowledge with but by no means a master of it lol... That is unless we had source for certain things but that isn't likely by no means... If anyone is interested in getting to work I'm more then willing I just sometimes have a hectic schedule... There is more to porting then just a few quick changes if you want a clean solid daily driver port... I started to port MIUI V5 just haven't really had much of a chance to test it. I have 3 MIUI ports built all slightly altered to eventually test different hacks..
The reason I chose MIUI V5 to port is because a good deal of HTC MIUI ROMs are based heavily on Sense.. Not many of them are AOSP based anymore which to me is kind of a shame.... The Chinese must have gotten tired of so many ports popping up with a lot of broken stuff because they all use to be AOSP based and to get them ported required a ton smali hacks and now when you decompile an actual source built official chinese MIUI rom and you diff out lets say services.jar from CM and services.jar from MIUI for every line of code like cdmareceiver.smali in CM in MIUI it's i.smali then cdmareceiver$1.smali in CM in MIUI it's 23.smali.... Those aren't actual lines those are just examples but they made it damn near impossible to properly diff stuff out.. You'd literally have to go through thousands and thousands upon thousands of lines to figure out which matches what and then make the changes you feel like need to be made and then hope you didn't break something in the process.... It sucks lol...
So yeah most of the HTC devices are now MIUI converted Sense based builds and I'm hoping are a little easier to port with less changes!! But I guess we'll see?!?!
Like I said, anyone wanting to work with me I will be more then glad to lend my knowledge of Android! I need someone to get me motivated again. I really miss working on Android and building stuff porting stuff whatever.. It's just fun! Plus we desperately need some form of a custom Android really really bad.... All of us do... I mean I'm Verizon, but Sprint, the International crew, all of us....
Lets pool all of our knowledge together and do some work!!! To all reading this if you are down contact me in this thread or PM me and lets get busy!
Murrda said:
Well to start you need to make sure your Meta-Inf directory is one from the Max, you should be porting from something with the same board as well which would give you less headaches in the long run. The One would be a good starting port since they use the same boards (msm8960 Snapdragon 600) The updater script in Meta-Inf needs to be pointing to the correct device. For example and this is just an example in the beginning of the updater script which is really the instructions for flashing the rom in recovery shouldn't say something like "get prop blah blah m7vzw" the m7 being the model # should be t6vzw if you were using a Verizon device etc etc.. All mount points need to be exactly what the Max's mount points are otherwise it will never flash.. The original One mount points aren't the same as the One Max. Also the kernel from the Max is a must, plus in system/lib you need the modules as well as hardware. In system/bin you need vold, vold is device specific. In system/etc you need vold.fstab again device specific stuff. The you need the hardware directory, which is touch capacitive buttons and LED's and what not. Those may be the same as the One since they are laid out the same.. The audio should most likely be the same but you would need to remove all the Beats Audio crap from system/etc since the One Max isn't a beats device.. GSM to GSM may be an easy port, CDMA to CDMA may be a little more difficult. Although they use libril-qc-qmi-1.so I think it is, that may be a typo but that's something like what the lib path will point to, the code may be slightly different in telephony for CDMA LTE devices. That would be found in framework.jar if applicable framework2.jar..
I could most likely easily get a port done, I'm just very limited to time.. Some of the tutorials out there are very generic and would kind of work well if you have 2 very identical devices with minor changes and manufactured around the same time small example would be like the HTC Desire and the HTC Thunderbolt.. That's a pretty straight forward port with some minor audio tweaks since sound image in system/etc is different and that as well are devices that would require a RIL hack as stated above with framework.jar... That right there would be strictly smali/baksmali hacking which I have some knowledge with but by no means a master of it lol... That is unless we had source for certain things but that isn't likely by no means... If anyone is interested in getting to work I'm more then willing I just sometimes have a hectic schedule... There is more to porting then just a few quick changes if you want a clean solid daily driver port... I started to port MIUI V5 just haven't really had much of a chance to test it. I have 3 MIUI ports built all slightly altered to eventually test different hacks..
The reason I chose MIUI V5 to port is because a good deal of HTC MIUI ROMs are based heavily on Sense.. Not many of them are AOSP based anymore which to me is kind of a shame.... The Chinese must have gotten tired of so many ports popping up with a lot of broken stuff because they all use to be AOSP based and to get them ported required a ton smali hacks and now when you decompile an actual source built official chinese MIUI rom and you diff out lets say services.jar from CM and services.jar from MIUI for every line of code like cdmareceiver.smali in CM in MIUI it's i.smali then cdmareceiver$1.smali in CM in MIUI it's 23.smali.... Those aren't actual lines those are just examples but they made it damn near impossible to properly diff stuff out.. You'd literally have to go through thousands and thousands upon thousands of lines to figure out which matches what and then make the changes you feel like need to be made and then hope you didn't break something in the process.... It sucks lol...
So yeah most of the HTC devices are now MIUI converted Sense based builds and I'm hoping are a little easier to port with less changes!! But I guess we'll see?!?!
Like I said, anyone wanting to work with me I will be more then glad to lend my knowledge of Android! I need someone to get me motivated again. I really miss working on Android and building stuff porting stuff whatever.. It's just fun! Plus we desperately need some form of a custom Android really really bad.... All of us do... I mean I'm Verizon, but Sprint, the International crew, all of us....
Lets pool all of our knowledge together and do some work!!! To all reading this if you are down contact me in this thread or PM me and lets get busy!
Click to expand...
Click to collapse
this was exciting to read, best of luck
I am going to get Ubuntu installed today and then Android Kitchen here i come!
pradeepvizz said:
I am going to get Ubuntu installed today and then Android Kitchen here i come!
Click to expand...
Click to collapse
You can always use Cygwin on windows. there is a how to cook a rom tutorial in the General Android Dev forum.
DeadPhoenix said:
You can always use Cygwin on windows. there is a how to cook a rom tutorial in the General Android Dev forum.
Click to expand...
Click to collapse
Thanks, i just installed it via virtual box without disturbing my system.
Just got android kitchen up and running, on prting sides of things got further this time, into aroma installes but error 7 which suggested earlyer is to do with mount points, if anyone could happen to help with theese it would be fab ))
Ok this is good start, i am proud of us here
I have got Android Kitchen running on my Ubuntu via virtual box.
I tried to set my working folder and tried tried to import my TWRP stock ROM backup. It seems like Android kitchen will require a CWM backup and TWRP does not seems to work.
With the TWRP backup i got this error
NON-YAFFS/NON-TAR FILE FORMAT DETECTED IN ROM
Click to expand...
Click to collapse
So i have just restored stock ROM on my phone, flashed CWM and now backing up my Stock ROM to COOK ANDROID
@[email protected] did you miss this thread just kidding, I know you have got a hectic schedule.
Again i am extremely happy to see ppl starting to develop ROM's!
Thanks for your encouragement @Murrda
No problem.. I'm home from work already and I'm off for the next 3 days so I'm actually going to get back to working on some ports. Anyone need a hand with anything as far as questions or setting up Linux or a dev environment please feel free to hit me up!
pradeepvizz said:
Ok this is good start, i am proud of us here
I have got Android Kitchen running on my Ubuntu via virtual box.
I tried to set my working folder and tried tried to import my TWRP stock ROM backup. It seems like Android kitchen will require a CWM backup and TWRP does not seems to work.
With the TWRP backup i got this error
So i have just restored stock ROM on my phone, flashed CWM and now backing up my Stock ROM to COOK ANDROID
@[email protected] did you miss this thread just kidding, I know you have got a hectic schedule.
Again i am extremely happy to see ppl starting to develop ROM's!
Thanks for your encouragement @Murrda
Click to expand...
Click to collapse
Murrda said:
No problem.. I'm home from work already and I'm off for the next 3 days so I'm actually going to get back to working on some ports. Anyone need a hand with anything as far as questions or setting up Linux or a dev environment please feel free to hit me up!
Click to expand...
Click to collapse
heyy i could use some help doing this part in android kitchen. straight from android kitchens page but i can't seem to get the recovery.fstab out anyway! im on t6ul verson of the max by the way thanks
/HIDE (sorry dont know how to get this to work (forum noob here too)
Create a file under the kitchen's /tools/edify_defs folder, with the name being the same as the value of ro.product.device (found in your device's /system/build.prop file).
If the stock ROM images for your device contain the recovery.img file, extract its files from the kitchen menu: Advanced --> Tools for boot image --> Extract from boot.img/recovery.img in any folder. Then, open up its ramdisk folder, and look for /system/etc/recovery.fstab or /etc/recovery.fstab or similar FSTAB file location. Open this file to find the mount points.
See the template file in the edify_defs folder to see how to set the mount points inside the file you created. Look at the other files in that folder for examples on how to do it.
managed to flash something and get mounting things sorted ))), getting an interesting navy green screen when booting now, will let you know on further developments. its a vanilla android rom i tried insertcoin-m7-google-edition_5.0-1 to be exact
hectorz321 said:
managed to flash something and get mounting things sorted ))), getting an interesting navy green screen when booting now, will let you know on further developments. its a vanilla android rom i tried insertcoin-m7-google-edition_5.0-1 to be exact
Click to expand...
Click to collapse
Good start mate! awesome!
update, getting a boot logo now which is great but im in a bootloop and have no idea where to start, iv been looking on trying to get logcat and such running but no success yet. Any advise anyone?
hectorz321 said:
update, getting a boot logo now which is great but im in a bootloop and have no idea where to start, iv been looking on trying to get logcat and such running but no success yet. Any advise anyone?
Click to expand...
Click to collapse
Which guide are you following? i just cooked a ROM today first time. I made the stock ROM for the T6UL.
---------- Post added at 08:34 PM ---------- Previous post was at 08:34 PM ----------
ooo, Merry Christmas everyone
Yeah I've been trying to port gpe over to the max but I think I need the gpe kernel ported too.. I used the Max Sense kernel for it and I get a bootloop or frozen boot logo after install with no hope of getting a logcat. I didn't move the Max sense update-binary but don't think that would be an issue, both since Its gpe and I'm using aroma..
Sent from my HTC One using XDA Premium 4 mobile app
HolyAngel said:
Yeah I've been trying to port gpe over to the max but I think I need the gpe kernel ported too.. I used the Max Sense kernel for it and I get a bootloop or frozen boot logo after install with no hope of getting a logcat. I didn't move the Max sense update-binary but don't think that would be an issue, both since Its gpe and I'm using aroma..
Sent from my HTC One using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Got to exactly the same point as you, reading several tutorials online i came across this interesting line "To port Sense you have to unpack the boot.img of your base rom and edit the init.rc to change the bootclasspath and match it with the port one" which is what iv done but also got stuck in a bootloop, looking at the two kernels are are a few differences in them. I think that might be they key.
hectorz321 said:
Got to exactly the same point as you, reading several tutorials online i came across this interesting line "To port Sense you have to unpack the boot.img of your base rom and edit the init.rc to change the bootclasspath and match it with the port one" which is what iv done but also got stuck in a bootloop, looking at the two kernels are are a few differences in them. I think that might be they key.
Click to expand...
Click to collapse
Yeah, i know for the kernel, without being able to mess with the zimage, the sense max kernel lacks the init.environ.rc from gpe, the fstab file is different(at least file extension), and there's a few things that point to sense files or folders that don't exist on gpe. Currently there is no released source for the max yet :'( so unless someone knows how to do it manually and hasn't shared HOW to do so, I just have to wait.. Hopefully it won't be too long.
Sent from my HTC One using XDA Premium 4 mobile app

[PORT] [Q] Regarding ports, Base ROMs and whatnot

Hi all,
With the risk of this being called a duplicate thread I just want to clarify that I'm in no way asking to port something for me, and I've read the 2 similar threads around, and felt like this should have it's own place.
So, straight to the point, I've been looking to get involved with android porting, and since LOS and AOKP for our device haven't quite filled my cup I was thinking of trying to port something else (trying to not get into much detail here )
Moving on, after searching around XDA and everywhere else, I've found a tuto or two where the process of porting was explained, and being an average user, I went to grab a "Base ROM", (thought the LOS/Stock ones would do, downloaded both)
To my surprise, files mentioned in the tutorials (framework-res.apk, framework.jar, ...) are nowhere to be found.
Finally the question, this just to save me from a reflash,
Am I supposed to install the "Base ROM" to dump /system to my PC?
Or am I perhaps misunderstanding something?
----
PSA: I'll probably find it difficult to get time to work on this (school stuffs) so even if I decide to go on with it, it might take a good while till something comes up.
Also, if there's someone with some experience in porting who'd be so kind to give me some pointers or show some availability to help with bug fixing/porting (not asking for labor, just explanations, in case I need 'em), please PM
Thanks, and sorry for the long post
b0taSs said:
Hi all,
With the risk of this being called a duplicate thread I just want to clarify that I'm in no way asking to port something for me, and I've read the 2 similar threads around, and felt like this should have it's own place.
So, straight to the point, I've been looking to get involved with android porting, and since LOS and AOKP for our device haven't quite filled my cup I was thinking of trying to port something else (trying to not get into much detail here )
Moving on, after searching around XDA and everywhere else, I've found a tuto or two where the process of porting was explained, and being an average user, I went to grab a "Base ROM", (thought the LOS/Stock ones would do, downloaded both)
To my surprise, files mentioned in the tutorials (framework-res.apk, framework.jar, ...) are nowhere to be found.
Finally the question, this just to save me from a reflash,
Am I supposed to install the "Base ROM" to dump /system to my PC?
Or am I perhaps misunderstanding something?
----
PSA: I'll probably find it difficult to get time to work on this (school stuffs) so even if I decide to go on with it, it might take a good while till something comes up.
Also, if there's someone with some experience in porting who'd be so kind to give me some pointers or show some availability to help with bug fixing/porting (not asking for labor, just explanations, in case I need 'em), please PM
Thanks, and sorry for the long post
Click to expand...
Click to collapse
i wouldnt even try to port, its just confusing, files missing, preloader updates which makes you think which one to use, its all really just a mess, you will have better chance of getting something if you build from source, just fork our device, kernel and vendor trees and download a custom rom source of your choosing and build it, i wont say step by step, but i recommend that to download the vendor, device and kernel sources you make the local_manifest.xml so that when you do repo sync it downloads those sources aswell
Ruben Craveiro said:
i wouldnt even try to port, its just confusing, files missing, preloader updates which makes you think which one to use, its all really just a mess, you will have better chance of getting something if you build from source, just fork our device, kernel and vendor trees and download a custom rom source of your choosing and build it, i wont say step by step, but i recommend that to download the vendor, device and kernel sources you make the local_manifest.xml so that when you do repo sync it downloads those sources aswell
Click to expand...
Click to collapse
And here I thought porting would be easier, but yeah, now that you mention that.. :silly:
Aw well, thanks mate :good:

How to theme xiaomi miui/nougat roms

Hello, I would like to customize the phone more to my preferences and I would like to edit the systemui etc, I've tried looking for systemui, but just couldn't find it, I am using aosp extended, and when I looked for the systemui.apk in the system folder, its just not there. I used to work a bit with those things a few years back, but I don't know if its different because miui is maybe built differently or just android changed the way files are compiled or anything. Anyway, if someone could shortly explain to me how to edit miui/any custom rom system files, or give me a guide that fits miui, I would really appreciate it, thanks.
anyone pls? :\

Categories

Resources