Need help with updater-script - Samsung Infuse 4G

Im trying to learn how to port as along with creating a rom but anyways.im having trouble with the updater-scripts. I dont know how to re write them so that the Base's script is like the Ported script, without messing up the symlinks. Ive tried writing them about 7 times. Then when I come to flash the rom and doesn't work and im pretty sure the updater-script is my problem.

Ty113096 said:
Im trying to learn how to port as along with creating a rom but anyways.im having trouble with the updater-scripts. I dont know how to re write them so that the Base's script is like the Ported script, without messing up the symlinks. Ive tried writing them about 7 times. Then when I come to flash the rom and doesn't work and im pretty sure the updater-script is my problem.
Click to expand...
Click to collapse
Most of what I learned from updater-scripts (edify) comes from googling and downloading many of the firmware from the i997 and other devices for comparison.
If you are creating new or editing another, make sure you use a linux text editor like Note++. Notepad, Word or other text editor will give you errors. Note++ is also free.
Syntax is also very important. Edify is not very forgiving.
gl

Ty113096 said:
Im trying to learn how to port as along with creating a rom but anyways.im having trouble with the updater-scripts. I dont know how to re write them so that the Base's script is like the Ported script, without messing up the symlinks. Ive tried writing them about 7 times. Then when I come to flash the rom and doesn't work and im pretty sure the updater-script is my problem.
Click to expand...
Click to collapse
Along with qkster's advice, id like to also suggest actually looking at other ROM's updater scripts.. Or any flashable zip package as a matter of fact.. Just look through it and see if you can put together what does what.. It doesnt hurt to use something as a base if you are using it to further your own knowledge and actually trying to understand what your doing.. If you have any questions send me a PM and ill help the best i can.

Related

[HOWTO] porting a ROM for old radio to work with new radio

I would love to help the community by using your kernel for the newer radios to port any roms for the older radio... is there any help you can give me? should i use your boot.img from the test-donut.img/test-eclair.img?
Click to expand...
Click to collapse
first, a thing we must know for porting job is what boot.img included.
here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
the ramdisk do some initializing jobs, so if we port a ROM, we should ensure that the content in ramdisk and files which are included in ramdisk (like init.rc), have necessary things the ROM needed.
for the first step, we can just extract the boot.img from the ROM, and extract the ramdisk from the boot.img which extracted just now, then repack it with my kernel (you can extract the kernel from my boot.img with same tools).
(to execute the perl script in link above, you need linux or just cygwin. )
but if we are sure that the ROM we want to port have nothing special with ramdisk, just like common ROMs, we can use my boot.img files directly. for eclair ROM, I suggest you extract the boot.img from my ROM, and don't use the first boot.img (test-NOCDB.img) I had posted.
after this, make our update.zip (use other's ROM as an example, especially the update-script in META-INF directory). sign our zip with testkey and apply it, then we can make our phone booting into desktop.
(you can find information about sign and download tools here: http://forum.xda-developers.com/showthread.php?t=471586, though the thread is not talk about how to sign things)
the main troubles we may meet probably are symlinks and setperm* in the update-script. if there is already a file/link has a name we want to symlink to, or if there isn't a file we want to symlink from or setperm, we will fail. so check the files carefully.
the next step is make everything work properly. we can use file from a ROM which made for new radio (and work well of course) to replace the one in the ROM we are porting. we can find these files in my 2.x ROM for eclair, or other's 1.6 ROM for donut (and for new radio, since the maker of them tested them already).
the most important files are (to my knowledge):
system/lib/libhtc_acoustic.so
system/lib/libhtc_ril.so (if something wrong with mobile network)
system/lib/libcamera.so
system/lib/libcameraservice.so
system/lib/liboemcamera.so (for 2.x) or system/lib/libqcamera.so (for 1.6)
system/lib/libgps.so
system/bin/akmd
(are there something I missed?)
(if we want to use NCommander's work on CameraHardwareInterface with a 2.x ROM, we should use my kernel for DONUT instead. I didn't try it, and I don't recommend it.)
these files are some thing work with hardware partially, so different radio may need different files. but if something just work fine, don't hurry to replace the file for it.
and now...., I don't have more thing to talk about, since we have most things work well. but for further tweaks, there are lots of things to do.
everyone can post your question here. if I know the answer I will post it. if I don't or I am not online, I think others will response you. and if there are things I missed or made some mistake, plz point it out
I will update this post when we collection more info or correct something. I find that I don't organized everything in order . I will update it later.
Thanks for the post... what's the difference between your eclair/donut kernel? (This is based on your original post about your kernel... is there an updated kernel somewhere i should know about?)
Edit
Nevermind i figured it out by reading your post more. carefully thanks for the detailed instructions
Thank you very much for this sanpei. This is the type of posts that really should be on this forum
Appreciated so much. waiting for your next updates.
Phil_McRevis said:
Nevermind i figured it out by reading your post more. carefully thanks for the detailed instructions
Click to expand...
Click to collapse
sorry for my poor ability of expression
asero said:
This is the type of posts that really should be on this forum
Click to expand...
Click to collapse
I expect more people can share their knowledge, and we can make a wiki for all
Hello!
I have to edit some lines of init.rc of your kernel. I've thus extracted the ramdisk, edited the file, repacked and tried booting with fastboot boot kernel-img ramdisk-img, but the phone hangs on the operator logo. I've tried even just extracting kernel+ramdisk and boot them - same result (the boot.img works well).
how can I fix it? Thanks
Wrong post

AvaboxV2. Dev toolbox for Windows

This is a toolbox i put together for windows users that want to get involved with theming porting etc..
With that said lets see some innovation with theming and porting. now theres no reason to not learn how to do these things. trial and error.
This update now includes a deodexer folder that will allow people to deodex apks. I have also included more boot.img perl scripts to unpack specifically what you want. and there is now one to repack the boot.img's. Be careful as there can be errors while reading the kernel during extract.
I hope this can further development for the hero. goodluck!
Download-AvaboxV2.zip
Sounds awesome. I'll take a look at it tomorrow after class. Thanks!
Always willing to try something new. I have no reason for fresh kitchen, but i got it. lol
Downloading now
I had the first version. It would of been handy awhile back, I forgot i had it.
Sounds Good! Goin 2 Check It Out..
Avalaunchmods said:
This is a toolbox i put together for windows users that want to get involved with theming porting etc..
With that said lets see some innovation with theming and porting. now theres no reason to not learn how to do these things. trial and error.
This update now includes a deodexer folder that will allow people to deodex apks. I have also included more boot.img perl scripts to unpack specifically what you want. and there is now one to repack the boot.img's. Be careful as there can be errors while reading the kernel during extract.
I hope this can further development for the hero. goodluck!
Download-AvaboxV2.zip
Click to expand...
Click to collapse
Appreciate the help, thanks Avalaunch.
man this thread was hidden.
glad to help people.
Finally found this... Ok I have been trying to deodex on my own with NO success, I tried AvaboxV2, and everything looks good, says it's ok, but when I look inside the newly created apk it is missing the classes.dex which I believe is needed and required to work right...
What I am exactly trying to do is De-Odex HtcLockScreen.apk from ZenEXP-0.9.6.2 so I could then possibly fix the stupid Menu Menu Unlock issue. Any help would be most appreciated, I have also tried xUltimate with no success either.
Thanks man!!!!! This is awesome!!!! I'll be up and theming in no time!!!!

PC script to auto remove apk's

Hey everyone!
On the rom I currently use there are about 20 apk's I have no need for. What I do is download the rom, and individually delete the apk's before flashing the rom. The thing is I flash quite often (cheeky, I know ) and this is getting quite frustrating.
Ideally I want a script that does this all for me. I found one but it seems be for running on the phone, after the apk's have been installed. Does anyone know how I can create a script for the PC that does this before I even install the rom?
Thank you for any suggestions.
Oh and here's the thread I found that looked relevant...
http://forum.xda-developers.com/showthread.php?t=674357
edcoppen said:
Hey everyone!
On the rom I currently use there are about 20 apk's I have no need for. What I do is download the rom, and individually delete the apk's before flashing the rom. The thing is I flash quite often (cheeky, I know ) and this is getting quite frustrating.
Ideally I want a script that does this all for me. I found one but it seems be for running on the phone, after the apk's have been installed. Does anyone know how I can create a script for the PC that does this before I even install the rom?
Thank you for any suggestions.
Oh and here's the thread I found that looked relevant...
http://forum.xda-developers.com/showthread.php?t=674357
Click to expand...
Click to collapse
Over what OS?
If in Windows (or any M$ OS, incl. DOS) you can make a batch file.
My file is adjunted as example (modify as you like, put in the root dir -obviously to the unzipped ROM- and run. Rezip and maybe re-sign)
salu2
Thank you. This is exactly the kind of thing I am after. If I had of been born just a few years earlier I would probably know all about batch scripts. Fortunately, I just missed the DOS days!
Anyway, I puzzled out / looked up the commands in the script you posted. Based on that I extracted the rom, then placed the batch file within it, so that the cd (current directory) command runs correctly.
Unfortunately this mucks up the signing on the rom. Do you re-sign your CM7 roms every time you do this or is there an easier way?
Edit: My PC is Win 7, 64bit, soon to be Win 8 Consumer Preview.
Edit: The roms do not need resigning.
I don't re-sign the ROM, simply flash again over Clockworkmod Recovery.. and work.
But, you can:
1) sign using Auto-Sign....
2) Click [Thanks]...
Salu2
__________________________________________________________________
I know, I know.... my english is ****ty... but my spanish is much better... ;-)
Big thank you. That's solved that one nicely for me!
You're welcome.
Updated zip in my first Post.
Salu2
Hey again. I was hoping to build on the script you kindly provided. At the moment I am using various alpha roms where the exact apk's present changes fairly often. It would be great if I could see the outcome of each action. This way I would know if the apk has had it's name changed or been removed. How would I enable this?

Editing APK files

Hi i have read a few posts about editing apk files but most are only about editing the image files. i need to edit the classes.dex file inside the apk i have done this but when i try and install the apk it doesnt work is this possible to do? thanks
this is not to do anything illegal it is simply to make an android app i use equal to the iphone equivalent (there are less servers for the android app) so i basically want to change the url from the apk to the iphone url)
Cheers
morgs640 said:
Hi i have read a few posts about editing apk files but most are only about editing the image files. i need to edit the classes.dex file inside the apk i have done this but when i try and install the apk it doesnt work is this possible to do? thanks
this is not to do anything illegal it is simply to make an android app i use equal to the iphone equivalent (there are less servers for the android app) so i basically want to change the url from the apk to the iphone url)
Cheers
Click to expand...
Click to collapse
Tried signing the file after modding it?
Sent from my GT-S5360 using xda premium
Hi thanks for your reply, yes i have and it still doesnt work unfortunately
Use apktool to extract the APK, you'll get .smali files instead of classes.dex (this is the decompiled version). Edit these files appropriately, then repack the APK with apktool and sign it. Should work.
Does apktool require command line? if so it is too complicated for me
Yes, it does. If command line is too difficult, it's probably unlikely you'll be able to get this working I'm afraid. You could try this: http://forum.xda-developers.com/showthread.php?t=1619473
It's an IDE for editing APKs, might help. But honestly, the command line part is the easy bit
Just never had any luck with any command line stuff for android never works for me and i hate all the extra crap you have to install to use it. Thanks anyway ill see how i go.
morgs640 said:
Just never had any luck with any command line stuff for android never works for me and i hate all the extra crap you have to install to use it. Thanks anyway ill see how i go.
Click to expand...
Click to collapse
If you wanna do basic stuff wid apktool then its a reaaly easy tool.. The commands are really very small!
Apktool d xxxx.apk for decompile
Apktool b xxxx for compiling n ur done!
Even the complex ones arent difficult! Only the installing of apktool takes time and its the hardest thing in the whole procedure
Sent from my GT-S5360 using XDA
in theory apktool is faily simple. but if you compile for android 4.0 better prepare yourself for huge headaches and a couple of white hairs as this thing wont work. i know two solutions, one consists of a really stupid juggling with two versions, one old which you can barely find, and one new, decompile with the old one, compile with the new one. some guy made a mod though and it finally ends the trouble, but i haven't seen it officially pronounced, which made it so damn hard to find it, hidden in some internet forums. another problem was that aapt needs to be present in the same directory, error codes will just spew out a bunch of gibbersish and you will never know whats wrong so all thats left is trying. but once you got it working it is as easy as pie.
molesarecoming said:
some guy made a mod though and it finally ends the trouble, but i haven't seen it officially pronounced, which made it so damn hard to find it, hidden in some internet forums. but once you got it working it is as easy as pie.
Click to expand...
Click to collapse
You mean this: http://forum.xda-developers.com/showthread.php?t=1551236 ? (It was about two threads below this one at the time I posted this )
nice! i made myself little batch files for this. i just go "apkd skype" to decompile skype.apk and apkb skype for building it, zipping it, signing it. didnt even know theres a guy out there now.
SifJar said:
Yes, it does. If command line is too difficult, it's probably unlikely you'll be able to get this working I'm afraid. You could try this: http://forum.xda-developers.com/showthread.php?t=1619473
It's an IDE for editing APKs, might help. But honestly, the command line part is the easy bit
Click to expand...
Click to collapse
This program worked perfectly thank you so much

[Q] How the edify_generator.py builds a script

I have tried to read the file, but I am having too much trouble. I'm not a real programmer and some of this stuff if too cryptic for me to read my way through.
What I am trying to do is take some partitions that aren't being used and, well, use them. Our toolkit has theese files in it and I think this is where the installer script is made from. I have our recovery.fstab eddited (I think I did it right). But I'm sure that this isn't where the installer script gets it's information.
I'm just not able to work my way through this one. And of corse I may be on the wrong track for this whole thing.
Anyway. thank you for looking.
I have partially figured it out. On our build there are a few files used to make the edify script. One is the edify generator, and the others are dependent on what is going on. We have one for making an update file (something we don't use) and the other is for making the flashable ROM that we do use.
Anyway, post back if you want to know more.

Categories

Resources