I unzipped the 2nd_Albert_APP_update.zip and found the structure
\system\app and list of *.apk files.
question 1:
can I remove an apk file from 2nd_Albert_APP_update.zip in \system\app like twitter.apk without breaking the install process?
question 2:
Can I just add my own demo.apk files by simply copying them and saving the same archive and location mentioned above?
rp201 said:
I unzipped the 2nd_Albert_APP_update.zip and found the structure
\system\app and list of *.apk files.
question 1:
can I remove an apk file from 2nd_Albert_APP_update.zip in \system\app like twitter.apk without breaking the install process?
question 2:
Can I just add my own demo.apk files by simply copying them and saving the same archive and location mentioned above?
Click to expand...
Click to collapse
First of all wrong section. Second off if verification signatures are off, then you might* be able to assuming he used the package command, you might be able too.
Loglud said:
First of all wrong section. Second off if verification signatures are off, then you might* be able to assuming he used the package command, you might be able too.
Click to expand...
Click to collapse
sorry for wrong section, I was stuck between sections where to post.
I figured a metafile edit or package signing tool might be needed I did not want a simple yes response. I guess I will hijack my own post and change it a more dev type question.
Any rough steps you can give me to do this myself that I can then do searches on?
figure I'll have to
download android sdk.
examine metafile xy.z
look for section [] and edit
place apks in structure
buildpacktool.exe to look for.
any help would be greatly appreciated
thanks
rp201 said:
sorry for wrong section, I was stuck between sections where to post.
I figured a metafile edit or package signing tool might be needed I did not want a simple yes response. I guess I will hijack my own post and change it a more dev type question.
Any rough steps you can give me to do this myself that I can then do searches on?
figure I'll have to
download android sdk.
examine metafile xy.z
look for section [] and edit
place apks in structure
buildpacktool.exe to look for.
any help would be greatly appreciated
thanks
Click to expand...
Click to collapse
um sure. So first of the great thing is you really shouldn't have to do much. The basic premiss of this is that it uses a update.zip to flash via CWM, which means you shouldnt have to sign the package. Basic premiss, is I would first try unziping deleting and putting packages into ./system/app/ rezipping and then trying to flash that. That should be good enough to make your own. Second off if you really want to, you can look at the meta-data/.../update-script. There are some good guides on how to script this file.
http://forum.xda-developers.com/showthread.php?t=994940
Related
Hi everybody, I'm trying to make a soundboard to put on the android market. I downloaded a soundboard template from http://myandroidsoundboard.com/, and it works great except I don't know how to successfully change the package name from "com.soundboard" to something else without making the project go all "error" crazy.
I click the package name in the the package explorer and click refactor and I change the package name, but then everything becomes an error because the package name is now different. How can I change the package name successfully so I don't get errors everywhere?
Thank you.
You don't need to change package name of Java classes. You must change package name stored in AndroidManifest.xml and maybe some other files.
Brut.all said:
You don't need to change package name of Java classes. You must change package name stored in AndroidManifest.xml and maybe some other files.
Click to expand...
Click to collapse
I've gone through the android manifest file and I've changed everything there, but do you know what other files might need some changing? The only errors I see are coming from anything with the "R" next to it.
PrestoMovie said:
I've gone through the android manifest file and I've changed everything there, but do you know what other files might need some changing? The only errors I see are coming from anything with the "R" next to it.
Click to expand...
Click to collapse
I think it may be caused by the fact that after changing package name R.java file is generated in different Java package, but app code references original one. I see several ways, how to fix this: you could alter ant building process, use some refactoring tools to modify all references to R class or manually move generated R.java to proper place (and modify package declaration in it).
If you know, what I'm talking, then good. If you don't then it probably does not have sense to explain it further - it will take several pages of posting until you will get it.
Brut.all said:
I think it may be caused by the fact that after changing package name R.java file is generated in different Java package, but app code references original one. I see several ways, how to fix this: you could alter ant building process, use some refactoring tools to modify all references to R class or manually move generated R.java to proper place (and modify package declaration in it).
If you know, what I'm talking, then good. If you don't then it probably does not have sense to explain it further - it will take several pages of posting until you will get it.
Click to expand...
Click to collapse
which way would you say is this easiest? And would you be able to point me in the direction of a link that explains any of them well?
For what it's worth - archival value & others reading this thread now - a link to such info would be appreciated
PrestoMovie said:
which way would you say is this easiest? And would you be able to point me in the direction of a link that explains any of them well?
Click to expand...
Click to collapse
Ok, actually this can be done very simply ;-)
I think the best solution is to refactor code. Do you use some good IDE? Eclipse, Netbeans? If so you could use their refactoring tools, but it is also doable by simple find/replace. Just replace all occurrences of "import old.package.name.R;" in all *.java files by "import new.package.name.R;".
These are basics of Java/Android developing: if you know them, then you should have no problems
Brut.all said:
Ok, actually this can be done very simply ;-)
I think the best solution is to refactor code. Do you use some good IDE? Eclipse, Netbeans? If so you could use their refactoring tools, but it is also doable by simple find/replace. Just replace all occurrences of "import old.package.name.R;" in all *.java files by "import new.package.name.R;".
These are basics of Java/Android developing: if you know them, then you should have no problems
Click to expand...
Click to collapse
I'm using Eclipse. And thank you! Hopefully I can get it working now!
K, for some reason I'm only getting one error now in the androidmanifest.xml and it says "class com.soundboard.SoundBoard doesn't exist", but com.soundboard is no longer the package name.
bump bump bump.
bump.
I'm having the same problems. I've been able to create working .apk's but need to share it in the market and the market won't let me if the package name is the same thanks.
agentkalaw said:
bump.
I'm having the same problems. I've been able to create working .apk's but need to share it in the market and the market won't let me if the package name is the same thanks.
Click to expand...
Click to collapse
Advanced tasks require some knowledge. You must know, what is Android's package name and then changing it will be really easy thing to do.
Ahh and there is new "--rename-manifest-package" switch in newest aapt tool. I didn't test it, but it's official Android tool, so this should work.
PrestoMovie said:
K, for some reason I'm only getting one error now in the androidmanifest.xml and it says "class com.soundboard.SoundBoard doesn't exist", but com.soundboard is no longer the package name.
Click to expand...
Click to collapse
thanks for the help! I was actually able to change the package name and I'm having the exact same problem as the OP ^. I basically just need to edit the androidmanifest.xml file and i should be all set I tried searching on how to edit it after changing package names but no luck. any ideas? how do i edit androidmanifest.xml files to recognize the package name change? thanks again
Its been a long time since this post, but if it helps someone:
Issue: You have a source, you want to build 2 different apks from the same source, and be able to install both in the same device at the same time.
General Solution: Use a refactoring tool, like in eclipse, and rename all package names.
Better Solution: use aapt flag --rename-manifest-package. This does not require you change even a single line in the original source. Just this flag, and pass in a different package name, and whoa, you have a new apk with the different package name. I used it as follows, in the Android.mk:
LOCAL_AAPT_FLAGS := --rename-manifest-package new.package.name
Click to expand...
Click to collapse
Cheers
I've been looking into how to remove some apks from /system/app/ in CWM-flashable zips to save myself some time when going back and forth between ROMs. I understand (I think..) that after the removal process, I will need to resign the zip using JesusFreke's testsign.jar, but I still have some questions that I couldn't find much information on.
1) What exactly does the signing process do, and why would a flash of an unsigned zip fail?
2) This may be related to Q1, and may be a silly question, but why does a zip not retain the original signing if you alter the contents of the package?
3) Would using JF's testsign.jar affect the integrity of the ROM in any way? (In other words, are there any differences between testsign.jar and the signing process used by the ROM dev?)
4) Besides resigning, is there anything I should be aware of or anything else I need to do before flashing the updated ROM?
I am entirely new to this so I apologize for my entirely noob-ish questions, but really would appreciate any help! Thanks in advance.
Just open up the zip and delete the apps you don't want, add the apps you do want, and flash.
No need to do anything else.
harlenm said:
Just open up the zip and delete the apps you don't want, add the apps you do want, and flash.
No need to do anything else.
Click to expand...
Click to collapse
Don't u need to delete the permissions and everything from updater-script. I'm new to this so do u have to?
Sent from my SGH-I777 using XDA App
Usually the updater-script just sets permissions for the whole /system/app folder with one command.
Entropy512 said:
Usually the updater-script just sets permissions for the whole /system/app folder with one command.
Click to expand...
Click to collapse
How would u do that. Sry I'm a total noob to this. I only know how to set it per app.
Sent from my SGH-I777 using XDA App
The first reply already told you how to do it. I just delete the apks using winRAR and close the file, done.
Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Well presumably this is how ROM Manager and Metamorph both do their thing, just in a slightly more round about way (as they don't come with the files they need to copy). I'm almost 100% sure this is possible, but I've never tried it personally.
EDIT: Looks like this is how you'd do it: http://developer.android.com/reference/java/io/File.html. Specifically the renameTo() method.
CelticWebSolutions said:
Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Click to expand...
Click to collapse
Well there are about a dozen ways to do this. First of one of the hardest things is comming up with the commands/script. I can defiantly do this. If you want an apk, there are a few guys whom could port my script to an apk. I'm going to make a script here that will format, and create partitions and extract directly from the nook, no need to go through the fancy formatting and such, just go into terminal and run the script. Ill post a prototype for you to have the testers test!
Do you think something like BacksideUpdater inside custom ROM for LG Optimus V?
made by JerryScript
JerryScript i very nice guy, I bet if you ask him, he will let you play with his code
if is it what you looking for
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
xdajunkman said:
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
Click to expand...
Click to collapse
So one of the problems is its not really copying. Its more of an extraction from one place to another. We are required to use dd, and fdisk(for formatting).
GREAT! I was worried updates would be to complicated for people
Sent from my Nook Tablet using xda premium
... and I was worried that I might have to wipe my NT clean again to get the updates. After a week with this wonderful upgrade, I've got a LOT of customization I don't want to lose...
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Sycobob said:
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Click to expand...
Click to collapse
Has to be simple, something like copy an update.zip onto the SD card then run the apk which will automatically run the update in the zip But my knowledge of such things is limited so I need help there
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Sycobob said:
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Click to expand...
Click to collapse
Hmm.... that sounds good.
Anybody know how to actually implement it ?
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.
The only downside to all this is that I don't know how you would flash a kernel.
Sycobob said:
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Click to expand...
Click to collapse
That makes two of us!
Sycobob said:
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.The only downside to all this is that I don't know how you would flash a kernel.
Click to expand...
Click to collapse
I'm guessing you'd just flash it as usual, surely that one is the easiest? Copying stuff to boot partition would hopefully be just as simple, I was mainly worried about updating system files. I could do with building one for the current update to test the theory!
ok so im loving the svn and superlte and all that, can someone please give me some direction as an order to flash all the different mods and such? i understand different orders for different purposes im just looking to get mine as fast as possible and able to tweak the hell out of everything and . Also a follow up question when checking out and after exporting i add my apps and such what do i gotta do besides zipping up the file to make it flash right? has always i appreciate any feed back anyone can give me
BigTexastrev said:
ok so im loving the svn and superlte and all that, can someone please give me some direction as an order to flash all the different mods and such? i understand different orders for different purposes im just looking to get mine as fast as possible and able to tweak the hell out of everything and . Also a follow up question when checking out and after exporting i add my apps and such what do i gotta do besides zipping up the file to make it flash right? has always i appreciate any feed back anyone can give me
Click to expand...
Click to collapse
Not sure I'm quite up to date on the latest ROM slang lingo, but I'll do my best to provide some insight from a developers point of view.
In regards to creating a ROM .zip, which I think is what is referred to as, "checking out and after exporting I add my apps and such what do i gotta do besides zipping up the file to make it flash right?", the process is fairly generic. The ROM .zip (update.zip) file will be processed and loaded in the custom recovery.
The directions are generally all located in the updater-script file under META-INF/*. If the only action being done is adding apps to /system/app on a ROM .zip which already contains apps in /system/app, nothing should need to be changed in the updater-script file.
If apps are being added to /data/app, but nothing in the ROM currently installs to /data, might need to a copy_recursive to updater-script to make sure the /data directory from the ROM .zip is installed properly.
If there are other questions, the more detailed the links and question, the better we can answer! Hope some of the technical details help resolve the question!
Hi! First of all i hope this is the right place to post. Otherwise point me in the right direction.
Now to my case.
Since the original kitchen thread is closed i hope i will have mercy to post my question here.
When I go through the different steps in terminal on my mac i get this messages:
Issue 1:
"Warning: No cache.img.ext4 found. You can unpack this file separatelyby running the plugin script in the kitchen's Advanced menu options.If your device doesn't use a CSC, then just ignore this message."
When i extract the zip file the kitchen makes, it says i should put its systems file in the system folder. But in there, there is already a folder named app, should i replace it or just add the csc zip contents to it? A little confused here.
Issue 2:
"1 issue(s) found. *Please review the update-script to ensure it is correct.Number of symlink conflicts resolved: 1NOTE: This device (m3) requires an updater-script"
"This script will convert your update-script into an updater-scriptand will also add the update-binary file.This option will also be given when you build your ROM, so it isnot necessary to convert your update-script now. *The kitchen is NOTcompatible with updater-scripts, so only a few options can be used*afterwards if you have an updater-script.Ensure you have an update-script under META-INF/com/google/androidof your working folder."
Just so i don't get it wrong. My Galaxy S3 I9305 requires me to change this to updateR? What about the update-binary? Stay as it is?
Thank you very much for any help. Really want to learn this. And i have googled this a lot so you guys are my last option on this matter.
Sent from my GT-I9305 using XDA Premium 4 mobile app