Almost Done - Rom building questions - Hero CDMA Q&A, Help & Troubleshooting

1. Additional apps in /data/app/ will not install. I've read that this has to do with the update-script. I've based mine off Fresh and unofficial Modaco 1.3 and believe my script to be fine but here it is anyway.
Code:
show_progress 0.1 0
delete_recursive DATA:dalvik-cache/
delete_recursive DATA:boot-cache/
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
set_perm 1014 2000 0550 SYSTEM:etc/dhcpcd/dhcpcd-run-hooks
set_perm 0 2000 0550 SYSTEM:etc/init.goldfish.sh
set_perm 1002 1002 0440 SYSTEM:etc/dbus.conf
set_perm_recursive 1002 1002 0755 0440 SYSTEM:etc/bluez
set_perm 0 0 0755 SYSTEM:etc/bluez
set_perm 0 3003 02755 SYSTEM:bin/netcfg
set_perm 0 3004 02755 SYSTEM:bin/ping
set_perm 0 0 04755 SYSTEM:bin/su
delete DATA:app
delete DATA:init.sh
delete DATA:local
delete DATA:dalvik-cache
copy_dir PACKAGE:data DATA:
set_perm 1000 10000771 DATA:app
show_progress 0.1 10
show_progress 0.2 0
write_raw_image PACKAGE:boot.img BOOT:
show_progress 0.2 10
2. Is there anything extra I need to add to the rom to get wifi tethering working once the /data/app actually does work? I remember when root first occured wifi tether wouldn't work on the stock rom.
3. What do I need to do so people have already done apps2sd do not experience any FC issues?
4. I have png optimized many apks (ie framework-res, com.htc.resources). I took it a step further and recompressed them but the recompressed versions caused the phone to stay stuck on boot HTC logo. I tried a rom with original framework apks and a few recompressed apks from system and they suffered FC.
I am using Ubuntu 9.10 (Karmic)'s built in archiver for these compressions. I may try transferring them to Win7 and use 7zip but I don't see why that should make a difference. A zip is a zip right?
Hope to hear something back soon even though it's christmas eve. I'd like this rom to be my xmas gift to this forum.

Please help someone?

theresthatguy said:
1. Additional apps in /data/app/ will not install. I've read that this has to do with the update-script. I've based mine off Fresh and unofficial Modaco 1.3 and believe my script to be fine but here it is anyway.
Click to expand...
Click to collapse
That update script looks very familiar. Everything looks fine in your script. It should be copying /data/app over just fine.
2. Is there anything extra I need to add to the rom to get wifi tethering working once the /data/app actually does work? I remember when root first occured wifi tether wouldn't work on the stock rom.
Click to expand...
Click to collapse
That was just a matter of wifi tether not supporting our phones at first. You don't need to do anything special.
3. What do I need to do so people have already done apps2sd do not experience any FC issues?
Click to expand...
Click to collapse
If you are using my boot.img or unofficial modaco's boot.img and you have the script in /system/bin/a2sd then you don't need to do anything extra. You already have the commands in the update script to prevent FC's. Just an FYI that my boot.img has changes beyond the stock one.
4. I have png optimized many apks (ie framework-res, com.htc.resources). I took it a step further and recompressed them but the recompressed versions caused the phone to stay stuck on boot HTC logo. I tried a rom with original framework apks and a few recompressed apks from system and they suffered FC.
Click to expand...
Click to collapse
I'm a little confused by what you are asking here. But the /framework/ files can be very sensitive to compressing and zipaligning. If you are receiving FC's after doing it then they were just likely pushed past their breaking point.
I hope that helps you. Good luck!

Hey flipz thanks for the reply.
1. I wonder why the /data/apps aren't copying if they should be?
2. Cool, good to know
3. I have added that apps2sd script to my boot image but I can't figure how to get it back together. Keeping same error. Maybe I'll borrow yours if that's okay until I can figure it out.
4. Im using ubuntu and was dragging and dropping tyrant new pngs into the apks. I decided to recompress and zipalign any apk that I "optimized". This caused the frameworks to not let the phone boot. So I replaced those with my backup non-recompressed versions that's when I found out all the other apks were force closing.
I guess I'm asking if theirs a specific procedure for rezipping an apk.

Some good info here. I've been wanting to learn how to make apps and roms and have been bookmarking threads like this. Thanks to everyone for being so helpful.

FWIW - I'm not using Ubuntu, but FileRoller 2.28.1 on Slackware works fine to extract and compress zips. It's just a front end for gzip.
Look at your content or path for the FC issues. It's not the compressor program you're using on the .apks.

incogneato said:
FWIW - I'm not using Ubuntu, but FileRoller 2.28.1 on Slackware works fine to extract and compress zips. It's just a front end for gzip.
Look at your content or path for the FC issues. It's not the compressor program you're using on the .apks.
Click to expand...
Click to collapse
Okay so I have the optimized non-recompressed versions of apks let's say maps for example. Then I decide to extract it, compress it for smaller file. Now as the new compressed version if FCs. Doesn't make sense to me?

Are you re-signing the apks ?

theresthatguy said:
Okay so I have the optimized non-recompressed versions of apks let's say maps for example. Then I decide to extract it, compress it for smaller file. Now as the new compressed version if FCs. Doesn't make sense to me?
Click to expand...
Click to collapse
obelisk79 said:
Are you re-signing the apks ?
Click to expand...
Click to collapse
^this.
Also, maybe I'm missing something, but using the standard *.zip function in file roller the only options available are password/encrypt. How exactly are you trying to change the compression?

Related

Signing Files No Longer Works...

So I usually customize any roms with my package of ringtones and a few apps, thats never been a problem. However now, anytime I try and customize anything and flash it, I get this error when trying to flash the update:
Code:
E: Can't chown/mod /data/app (No such file or directory)
E: Failure at line 79: set_perm 1000 1000 0771 DATA:app
Installation aborted
My guess was that there was a new set of test keys to use when signing files? Any help would be greatly appreciated. I've noticed this problem with most of the 2.0 AOSP builds, but now I'm trying to accomplish it with Cyanogen's 4.2.6.
do you have apps2sd setup?
it probably wont work if the new ROM sets it up on the flash (dude im drunk now lmao) pm me if you still need help, i can help tomorrow when im sober
Yes I have it setup, I'm not on a new flash or anything, just upgrading. The ROM itself works fine, and my additions usually do too (this is the first time the problem has ever occurred).
tehseano said:
Yes I have it setup, I'm not on a new flash or anything, just upgrading. The ROM itself works fine, and my additions usually do too (this is the first time the problem has ever occurred).
Click to expand...
Click to collapse
Ya i know but some of the 2.0 ROM's have big trouble with the apps2sd setup
E: Can't chown/mod /data/app (No such file or directory)
leads me to believe that something is wrong with the symlinks
tehseano said:
Code:
E: Can't chown/mod /data/app (No such file or directory)
E: Failure at line 79: set_perm 1000 1000 0771 DATA:app
Installation aborted
Click to expand...
Click to collapse
i think this is self explained.
if u unpack a custom rom with an empty data/app folder and repack it with any zip-program. this empty folder gets deleted. if u place a 0kb-file in it, like the "placeholder" in cyanogens roms, the folder wont be deleted.
kingchris said:
i think this is self explained.
if u unpack a custom rom with an empty data/app folder and repack it with any zip-program. this empty folder gets deleted. if u place a 0kb-file in it, like the "placeholder" in cyanogens roms, the folder wont be deleted.
Click to expand...
Click to collapse
ty, didnt think about that!
DOES ANYONE KNOW HOW TO PORT THEMES IF the signing doenst work

Help please

i get failure at line 9 symlink dumpstate SYSTEM: bin/dumpcrash on both of these wtf am i doing wrong? i've been flashing roms and wanted an easy way to get the apps that are usually left out i like and the rosie i like with any rom.
http://www.4shared.com/file/ZqqLR1uw/sdotapps-signed.html
http://www.4shared.com/file/hTObX773/sdotrosie-signed.html
i'll take a look for you. downloading now. i know i've created a few of these myself, but i'm very limited, hopefully it will be something simple!
EDIT:
You have to update your update-script in the META-INF folder.
This is from my customization zip.
Code:
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "heroc"
show_progress 0.1 0
delete SYSTEM:app/htcbookmarkwidget.apk
delete SYSTEM:app/com.htc.TwitterWidget.apk
delete SYSTEM:app/com.htc.MusicWidget.apk
delete SYSTEM:app/HtcTwitter.apk
delete SYSTEM:app/Flickr.apk
delete SYSTEM:app/LiveWallpapers.apk
delete SYSTEM:app/Sprint_Nscar.apk
delete SYSTEM:app/Sprint_Core.apk
delete SYSTEM:app/HtcLockScreen.apk
delete SYSTEM:app/Calculator.apk
delete SYSTEM:app/Browser.apk
delete SYSTEM:app/Sprint_Navigation.apk
delete SYSTEM:media/bootanimation.zip
show_progress 0.1 10
show_progress 0.2 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10
My update script adds my theme, customized bootscreen, some other JChiSurf's mods and removes those apps listed.
I think you should be able to combine your two zips into one if you'd like.
riggsandroid said:
i'll take a look for you. downloading now. i know i've created a few of these myself, but i'm very limited, hopefully it will be something simple!
EDIT:
You have to update your update-script in the META-INF folder.
This is from my customization zip.
Code:
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "heroc"
show_progress 0.1 0
delete SYSTEM:app/htcbookmarkwidget.apk
delete SYSTEM:app/com.htc.TwitterWidget.apk
delete SYSTEM:app/com.htc.MusicWidget.apk
delete SYSTEM:app/HtcTwitter.apk
delete SYSTEM:app/Flickr.apk
delete SYSTEM:app/LiveWallpapers.apk
delete SYSTEM:app/Sprint_Nscar.apk
delete SYSTEM:app/Sprint_Core.apk
delete SYSTEM:app/HtcLockScreen.apk
delete SYSTEM:app/Calculator.apk
delete SYSTEM:app/Browser.apk
delete SYSTEM:app/Sprint_Navigation.apk
delete SYSTEM:media/bootanimation.zip
show_progress 0.1 10
show_progress 0.2 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10
My update script adds my theme, customized bootscreen, some other JChiSurf's mods and removes those apps listed.
I think you should be able to combine your two zips into one if you'd like.
Click to expand...
Click to collapse
thanks man, i shouldnt have borrowed an update script and not looked at it. grrr at me. yea i know i can combine the two but i may not what the rosie sometimes lol. thanks again
edit: i may pm you... i see what you did with your update script and me likey but not that smarty lol.
sdotcarlisle said:
thanks man, i shouldnt have borrowed an update script and not looked at it. grrr at me. yea i know i can combine the two but i may not what the rosie sometimes lol. thanks again
edit: i may pm you... i see what you did with your update script and me likey but not that smarty lol.
Click to expand...
Click to collapse
alright, well i'm usually flying by the seat of my pants and just learn as i go, after many mistakes, but if i can be of any help, i'll try.
will be at work for another hour or so, and then will be back on later tonight, depending on the mrs.
riggsandroid said:
alright, well i'm usually flying by the seat of my pants and just learn as i go, after many mistakes, but if i can be of any help, i'll try.
will be at work for another hour or so, and then will be back on later tonight, depending on the mrs.
Click to expand...
Click to collapse
Right on thanks again.

[Q] Can anyone spot where I'm going wrong

Ok I need some help with update-script for a theme I have in metamorph format. I'm really lost with this don't know how to do it the correct way. I keep getting can't find update-script when I flash through recovery. If anyone can please help me or poke me in the right direction that would be nice.
I always follow this guide to create update zip file:
http://www.londatiga.net/it/how-to-create-android-update-zip-package/
But remember, when you create "update-script" file, make sure you:
1. put an extra line in its end
2. all line breaks must be in Unix format
To sign the zip package, either you may use the way in the tutorial, or you can use ZipSigner on your Android to sign a zip.
Can you spot where I'm going wrong.
show_progress 0.1 0
delete SYSTEM:app/Facebook.apk
delete SYSTEM:app/GenieWidget.apk
delete SYSTEM:app/GoogleSearch.apk
delete SYSTEM:app/ADWLauncher.apk
delete SYSTEM:app/Contacts.apk
delete SYSTEM:app/Music.apk
delete SYSTEM:app/LatinIME.apk
delete SYSTEM:app/Browser.apk
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 50
set_perm_recursive 0 0 0755 0644 SYSTEM:app
show_progress 0.2 600
copy_dir PACKAGE:sdcard SDCARD:
show_progress 0.3 100
If the error you're getting says it can't find the update script, the error is likely to be the name or location of the script, and not the script content...
Sent from my Nexus One using XDA App
danger-rat said:
If the error you're getting says it can't find the update script, the error is likely to be the name or location of the script, and not the script content...
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
right ok this is the structure:-
update.zip
META-INF=
com
CERT.RSA
CERT.SF
MANIFEST.MF
com=
google
google=
android
android=
update-script
Is there any thing wrong?
Do you have the update binary in the android folder?
Sent from my Nexus One using XDA App
Thank you for your help. I've found out what was the problem was, it was me being a fool and making a beginners mistake. Too little sleep and rushing to get it ready for gingerbread. Well thats what I'm saying and i'm going to stick to it
Everything was perfect from the start just me double zipping the update folder, how stupid do I feel? Very

how to create galaxy s update script

hi every body
can any one explain how to creat update script for galaxy s , im trying to cook rom based on xxjpy but usually i have problem with update script , i need to know how to create it incompatible with rom files and arrangment , whats the code and its functions we will write it in script and depend on what , finally in detail so i can create my own
thanksssssssssss
Well, the best thing to do is to google for some update scripts and modify ,but if you really want to write your own script from scratch don`t use notepad, use notepad++ or something like that.
here is an example and please try to understand it, follow line by line and see what it does :
show_progress 0.1 0 >this fills the progress bar
copy_dir PACKAGE:ghost TMP:/ghost > copy from your .zip (/ directory) to internal TMP folder which is in the ramdisk (all folders that are CAPITALISED are located in ramdisk)
set_perm 0 0 755 TMP:/ghost/test > setting permission to execute the test file
show_progress 0.1 10
copy_dir PACKAGE:system SYSTEM: this copies from /zip/system directory to that SYSTEM in ramdisk
show_progress 0.2 0
format CACHE: formats cache folder
delete_recursive SYSTEM: this deletes SYSTEM folder
symlink toolbox SYSTEM:bin/cat this creates virtual shortcuts google it for more
symlink toolbox SYSTEM:bin/chmod
what i`ve told you here is how i understand it... best for you is to try to download an update.zip and see what it does(opening that update script and see where it leads to)
Thanks my dear to reply me but is there web site that if i open it i will know and study and understand how to write it and create command to complete the script
yeah . google : how to make android update scripts
try to make some simple update.zips like adding an app to your phone via recovery .... put some print_ui in it so you can debug it...and furthermore try to flash your phone with another firmware...with a custom update script made by you.

Bash Script for Building CM7 (Custom build.prop too!)

Hey guys, I got tired of typing in my commands everytime I wanted to build a new version of CM7. So I whipped this up, it even edits and updates the build.prop in the zip with the time and your name (Just substitute it where mine is ).
ONLY RUN IF YOU HAVE BUILT ONCE BEFORE: The script could wipe out all things that have been sync if this is your first time building.
Code:
cd ~/android/system/out/target/product/inc/
rm -r *
cd ~/android/system/
repo sync
. build/envsetup.sh && brunch inc
cd ~/android/system/out/target/product/inc/system/
Day=`date +%d`
Date=`date +%D`
Month=`date +%m`
Year=`date +%y`
Minute=`date +%M`
Hour=`date +%H`
Second=`date +%S`
mv build.prop build.text
sed "s/ro.modversion=[^ ]*/ro.modversion=CyanogenMod-7.0.0-RC4-Kyle-Lucas-$Month\/$Day\/$Year-$Hour\:$Minute\:$Second/" build.text > build.prop
rm build.text
cp build.prop ~/android/system/out/target/product/inc/
cd ~/android/system/out/target/product/inc/
zip -qf update*.zip
Could it be more clean? Yeah, but it gets the job done.
Also, maybe it is just me...but my output directory has to be empty for the build to run properly. If that isn't your case remove the first 2 lines.
I would like to say thanks for posting this. Do you need a 64 bit system to compile cm 7?
I believe so. I am running one, Ubuntu 10.10 x64. I think I read somewhere that compiling android from source from 2.2 on requires 64 bit.
Someone please correct me if I'm wrong on that.
Sent from my ADR6300 using XDA Premium App
I heard 2.3 and up.
Sent from my ADR6300 using XDA Premium App
You should include a check to see if that output directory exists before calling "rm -r *"
After the initial sync, the out folder doesn't even exist, let alone anything inside that. The script nearly wiped out all the code I just downloaded... thank goodness the write-protected Makefile stopped it before it deleted .repo!
whiplash000 said:
You should include a check to see if that output directory exists before calling "rm -r *"
After the initial sync, the out folder doesn't even exist, let alone anything inside that. The script nearly wiped out all the code I just downloaded... thank goodness the write-protected Makefile stopped it before it deleted .repo!
Click to expand...
Click to collapse
Ouch, that's a good point... even 'rm -rf ~/android/system/out/target/product/inc/' should work and be a bit safer only recursively going after that directory.
EDIT: I delete the whole directory, it gets recreated on a build if it isn't there.
You can build 2.3 up if you do a few tweaks to the make file.
I have a make script that will do everything in a 32bit system.
If you guys want it I will post it.
Sent from my Incredible using XDA App
wes342 said:
You can build 2.3 up if you do a few tweaks to the make file.
I have a make script that will do everything in a 32bit system.
If you guys want it I will post it.
Sent from my Incredible using XDA App
Click to expand...
Click to collapse
That would be cool if you could post it!
whiplash000 said:
You should include a check to see if that output directory exists before calling "rm -r *"
After the initial sync, the out folder doesn't even exist, let alone anything inside that. The script nearly wiped out all the code I just downloaded... thank goodness the write-protected Makefile stopped it before it deleted .repo!
Click to expand...
Click to collapse
Whoops hadn't thought of that. I already had a build enviornment before this that had built a few times. Ill fix that up when I get home
Sent from my ADR6300 using XDA Premium App
ok guys here is the make file for 32bit systems.
just put it in your root directory.
Note: this has been changed so many times please check to make sure everything in the file will work with your system.
i have used this before and it does work.
this is not the original verision that i was working with (i lost it when my computer died) got this from a friend who made a few changes but i think i changed everything back.
1. you need to remove the ".txt" after you download the file.
2. you need to make it executable.
3. this will install a different version of java so you may need to uninstall the new java after you are done.
4. you can use this to build anything all you have to do is make a few changes to the source you want to build from.
to start the make file.
Code:
./androidmake
then in an hour or so you should have a cyanogen 7 rom.
right now it should be setup to build cyanogen 7
good luck guys. your on your own from here.
-check out our site osmasterminds-
Thanks Wes!
It ran almost all the way, then I got:
make: *** No rule to make target `out/target/product/inc/obj/lib/libcamera.so', needed by `out/target/product/inc/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so'. Stop.
make: *** Waiting for unfinished jobs....
Notice file: system/core/logwrapper/NOTICE -- out/target/product/inc/obj/NOTICE_FILES/src//system/bin/logwrapper.txt
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
cp: cannot stat `/home/treken/android/system/out/target/product/inc/update*': No such file or directory
[=-build aosp androidmake-=]
and here is some stuff before the error:
http://pastebin.com/GiNGFfR6
Treken said:
It ran almost all the way, then I got:
make: *** No rule to make target `out/target/product/inc/obj/lib/libcamera.so', needed by `out/target/product/inc/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so'. Stop.
make: *** Waiting for unfinished jobs....
Notice file: system/core/logwrapper/NOTICE -- out/target/product/inc/obj/NOTICE_FILES/src//system/bin/logwrapper.txt
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
cp: cannot stat `/home/treken/android/system/out/target/product/inc/update*': No such file or directory
[=-build aosp androidmake-=]
and here is some stuff before the error:
http://pastebin.com/GiNGFfR6
Click to expand...
Click to collapse
From your last line it looks like the packaged zip might not start with "update"...
Jazi said:
From your last line it looks like the packaged zip might not start with "update"...
Click to expand...
Click to collapse
It looks like the proprietary files are missing actually.
make: *** No rule to make target `out/target/product/inc/obj/lib/libcamera.so', needed by `out/target/product/inc/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so'. Stop.
How do I fix this?
Treken said:
How do I fix this?
Click to expand...
Click to collapse
my guess would be that this part of the script didn't work:
wget http://dl.dropbox.com/u/6751304/htc.zip;
unzip htc.zip;
mv ~/htc/ ~/android/system/vendor/htc/;
So perhaps do it by hand, but honestly the more correct way would be to run the extract-files.sh script to actually grab them from your phone.
This is the guide I used to set up my build environment: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Incredible. If nothing else, I know following those steps manually will get all the pieces you need.
EDIT: I just looked at the zip file that script points to and it has proprietary files for an HTC Passion, not an Inc... so yes, you're missing the proprietary files for the Inc with this script
Ok, thanks! I'll try to change it
I don't know how to change it. wget retrieves it from dropbox. I can't pull the files from my phone either because I can't seem to get adb working properly
Treken said:
I don't know how to change it. wget retrieves it from dropbox. I can't pull the files from my phone either because I can't seem to get adb working properly
Click to expand...
Click to collapse
Honestly I think it would serve you better to get a properly set up build environment by following the steps in that link I gave. If you can compile a ROM using those instructions then I would try automating it. You should make sure you can walk before you try to run.
Treken said:
I don't know how to change it. wget retrieves it from dropbox. I can't pull the files from my phone either because I can't seem to get adb working properly
Click to expand...
Click to collapse
You can also get them from here:
https://github.com/koush/proprietary_vendor_htc/tree/gingerbread/inc/proprietary
But that requires another set of skills to pull them down, at least without manually doing it one by one.
It might be smart for the original bash script to use koush's github, as it is updated with new ones as they come out.

Categories

Resources