PC script to auto remove apk's - Android Software/Hacking General [Developers Only]

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?

Related

µkitchen to add custom files into protected rom

Hello all ,
I ran into the problem of liking a rom that was protected..
no problem , only thing i want to add was remote tracker.
the rest i do with uc.
So with the help of da_g i striped a kitchen to unpack and repack protected roms.
to add a package , just unpack..put your cab in the dump dir and add it to config????.txt
and repack.
that way i get the use the protected rom with my own package build in.
thought i would post it.
grtx , arnold
hi arnoldl,
i want to thank you and everyone have helped you to create and publish this. i was searching something like this since many time ago, finally i found your thread and i was able to add RT to the rom i use!
i think this will be useful to many other people
i have changed something and it works perfectly with my blackstone!
thank you thank you.
bye
What is the difference in extracting ngh file, adding cab file to dump folder, updataing config.txt and recooking compared to installing the cab file using UC?
Can we add visual kitchen packages to this dump folder? If we can add do we need to just copy all the files in all the folders of the package to dump folder?
eg: in the package there are some files in 0409 and some in files folder , _skip, app.reg, all these goes to dump folder?
Thanks
@DarkRenegade
No problem , happy that i helped...
@kk0813
If i would buy a phone of the street , i would do the folowing.
- check if there are funny things on it
- format the card
- hardreset the phone
and gone is your remote tracker protection..
If i cook rt in, with my personal settings for it.
after a hard-reset it's installed again , so i can still gps find my stolen phone after a complete format.
only next step i want to take is to re-hard spl , to prevent reflashing if posible.
but these days with new 6.5 images coming out so quick i flash so often i will wait with that one
but all other things i install by uc or later shashimi
Don't know if you can add kitchen files.
never tried it.....
btw attached a new version.
remade it to work with the new envirus kitchen the newer 6.5 roms are using..
arnoldl said:
@DarkRenegade
No problem , happy that i helped...
@kk0813
If i would buy a phone of the street , i would do the folowing.
- check if there are funny things on it
- format the card
- hardreset the phone
and gone is your remote tracker protection..
If i cook rt in, with my personal settings for it.
after a hard-reset it's installed again , so i can still gps find my stolen phone after a complete format.
only next step i want to take is to re-hard spl , to prevent reflashing if http://forum.xda-developers.com/showthread.php?t=503112posible.
but these days with new 6.5 images coming out so quick i flash so often i will wait with that one
but all other things i install by uc or later shashimi
Don't know if you can add kitchen files.
never tried it.....
btw attached a new version.
remade it to work with the new envirus kitchen the newer 6.5 roms are using..
Click to expand...
Click to collapse
Thats a nice idea. Thanks for the updated version.
DarkRenegade said:
hi arnoldl,
i want to thank you and everyone have helped you to create and publish this. i was searching something like this since many time ago, finally i found your thread and i was able to add RT to the rom i use!
i think this will be useful to many other people
i have changed something and it works perfectly with my blackstone!
thank you thank you.
bye
Click to expand...
Click to collapse
Thanks again
works very well
arnoldl said:
Hello all ,
I ran into the problem of liking a rom that was protected..
no problem , only thing i want to add was remote tracker.
the rest i do with uc.
So with the help of da_g i striped a kitchen to unpack and repack protected roms.
to add a package , just unpack..put your cab in the dump dir and add it to config????.txt
and repack.
that way i get the use the protected rom with my own package build in.
thought i would post it.
grtx , arnold
Click to expand...
Click to collapse
You have a Trojan horse in first post!!!
All this to add a couple of cabs to a ROM ? Isn't it a whole of a lot easier to just... you know... install them after ? Or maybe even UC them to make it even lazier ?
Does this work with other roms from other devices? Or just Raphael roms?
I tried this but it extracts os.nb and os.nb.payload and also os.nb.extra but when it starts to create dump it fails
this is the log
ImgfsToDump 2.1rc2
Cannot map file imgfs.bin
what to do help
jagan2 said:
I tried this but it extracts os.nb and os.nb.payload and also os.nb.extra but when it starts to create dump it fails
this is the log
ImgfsToDump 2.1rc2
Cannot map file imgfs.bin
what to do help
Click to expand...
Click to collapse
Use the latest version of extractor, place the .nbh file in BaseROM, rename it to RUU_signed.nbh and run the extractor.
That worked for me.
A little late reading this, but I downloaded it to rip a rom from a little known site & guess what... Theres a trojan in that 1st post, virus software just riped it out of 2 kitchens recently downloaded as well as that 1st post file.
file namned Win32/Delfsnif.dx
I used your extractor but when i use old (1,2mb) i have problem with rom (sense 2.5 crash , windows menu crash), when i use new extractor (1,9mb) i don;t have a bootable rom (.nbh is very small 15mb-100mb) Is there any solution?
Sorry for my english I hope you can understand me.
I think there are more usefull tools that could help you.
Let's have a look here : http://forum.xda-developers.com/showthread.php?t=411915
And I believe that this tool is used by most roms makers.
Sorry but this tool is traying to rebuild protected rom into kitchen (with folders - ext, rom, sys etc.) but this is impossible.
Worked Great ! !
It worked great for me!
Moving to general section
You should just move this to the cooking forum. People are always asking if you can modify cooked roms. Then others are always answering that you can't dump and modify a protected rom, which clearly isn't true. So this would work ok in the Cooking forum (can't even remember the name of the forum, even though I'm a mod there, lol).
If this works, than this is pretty kick ass! I was recently trying to simplify the process as you did but your work looks flawless to me! I'll post as soon as I can confirm it works putting the rom back on an HTC rose (htc s743).
After the rom is dumped, what says what files go in what directories? In the dump directory ALL files are in the dump directory and not in the folder structure they would be after the ROM is flashed to the phone. Where would I find what determines the folder structure?

Modifying a ROM

Hi guys, I was wondering how you would go about personalizing ROMs for your own use. Nothing code-wise, but installed programs and such. Opening up the zip files of downloaded ROMs I see the apk files and the system apk files - is it really as easy as just removing those you don't want and plotting in the ones that you do?
If this rom is from the same board as you, can say so.
But, .. you still need to run a linux terminal the code to sign the package that you previously made with same special files..
Just the search tools and you'll find it!
...You can easily too start porting rom's too...

Old cooker want to cook something

After many many tweaking and cooking ROMs for WinMo I want to do same with Android. The reason I cooked for WinMo was speed, but since it is not an issue with mine Desire(but it can be better I want to customize ROM a little bit, so remove some stuff and later maybe add few apps. If this want be a problem I will try to tweak too.
However in WinMo I have always have served kitchen, I just tweaked removed and add few things and job done but here there are no kitchens..yet(I hope somebody will sooner or later post it
So is there anybody who can help to set up kitchen so that I can cook few roms for me and this community?
So if I understanded correctly I need following to start cooking
android sdk
java jdk
signing tool
stock ROM
I have downloaded them all, extracted SDK in D:\HTC Desire\Android SDK, installed Java JDK in C:\Program Files (x86)\Java and I don't know what to do next?
Extract ROM, where(?), extract system.img which is in rom.zip if yes how and where?
Thanks for your help
Benko, you can extract the ROM anywhere you want. But, you don't want images. You should look at Pauls rootedupdate.zip as a starting point. Unzip that.
eViL D: said:
Benko, you can extract the ROM anywhere you want. But, you don't want images. You should look at Pauls rootedupdate.zip as a starting point. Unzip that.
Click to expand...
Click to collapse
Ok extracted that rootedupdate.zip and found a lot of apks and obexes so after I delete those files that I dont want how to put that all back together to file that is flashable?
You'll have to resign the zip after removing stuff, otherwise it will give verification errors when trying to flash.
You need to remove the current certificates from the file, there are three files in the META-INF folder - delete those, but keep the update script (the COM folder inside), it's needed for flashing.
I use this little thingy for signatures: http://android-dls.com/wiki/index.php?title=Generating_Keys
Hope this helps!
PS-beware of any dependencies between the various apk's and any framework modding that might be needed, otherwise you'll get more fc's than you can carry; I know I did
PS2- if you want a served kitchen, you'll find one over at Modaco, for a CyanogenMod port (a link is posted in a thread here) - see if that suits you're needs.
PS3- check out the Chef Central sticky here, too - it should be easier to get quicker/more accurate info from the seasoned cooks there
benko286 said:
Ok extracted that rootedupdate.zip and found a lot of apks and obexes so after I delete those files that I dont want how to put that all back together to file that is flashable?
Click to expand...
Click to collapse
Rezip the folders: meta, system & boot.img.
Then resign them. You can then transfer it to sd and try to flash. If it doesn't boot, then you have to troubleshoot.
May I know that how to change layout of the home screen?
e.g. HTC sense has news/mail widget where first installed and booted.
Where can I change these settings?
Also , I want to know if I made my own rom, and updated to my desire.
If it doesn't boot or anything, can I updated the rootedupdate.zip from Paul to get the desire back working?
Thanks
eViL D: said:
Rezip the folders: meta, system & boot.img.
Then resign them. You can then transfer it to sd and try to flash. If it doesn't boot, then you have to troubleshoot.
Click to expand...
Click to collapse
kevin612 said:
May I know that how to change layout of the home screen?
e.g. HTC sense has news/mail widget where first installed and booted.
Where can I change these settings?
Also , I want to know if I made my own rom, and updated to my desire.
If it doesn't boot or anything, can I updated the rootedupdate.zip from Paul to get the desire back working?
Thanks
Click to expand...
Click to collapse
Ok zipped those folders(META-INF, system, boot.img) in rootedupdate.zip, used autosign.bat to manually sign that .zip and now it should be flashable?
@Kevin-yes if it is not bootable you can flash Pauls rom again
benko286 said:
Ok zipped those folders(META-INF, system, boot.img) in rootedupdate.zip, used autosign.bat to manually sign that .zip and now it should be flashable?
@Kevin-yes if it is not bootable you can flash Pauls rom again
Click to expand...
Click to collapse
Hopefully. After a few hundred times you'll get the hang of it. ;P
If it boot loops, it won't boot. Try again. Always remember what you're adding and subtracting. Maybe start out with only a couple things.
eViL D: said:
Hopefully. After a few hundred times you'll get the hang of it. ;P
Click to expand...
Click to collapse
OK Since I returned my device to my store because of warranty can you try that ROM, I will upload it for you ?
benko286 said:
OK Since I returned my device to my store because of warranty can you try that ROM, I will upload it for you ?
Click to expand...
Click to collapse
Sure, why did you return it?
Uploading it now
Some very very bad battery leaking...80% in one night and sync was off!
Thank you so much eViL D: and everybody else for help
Ok I also want to create my own rom but I don't know how to sign it..
Any help would be most appreciated.
ROM Link here
http://www.mediafire.com/?zt4ymz42jzj
I hope it works
So for now I even don't need Android SDK?
I downloaded the rom kitchen from Chef Central...Does the rom need to be sign after I built them out in Linux?
Also there are some folders I not understand yet....
Inside system folder - customize, etc, framework, usr and xbin I dont understand yet.
Cause looking at eVil D:'s rom and paul's rom is very different in those. And even paul's rom doesnt have customize folder.
Would like to understand all and see if I can make a rom out.
Thanks
Anybody tried my ROM ?
benko286 said:
Anybody tried my ROM ?
Click to expand...
Click to collapse
Got corrupted DL. Will have to try again.
kevin612 said:
I downloaded the rom kitchen from Chef Central...Does the rom need to be sign after I built them out in Linux?
Also there are some folders I not understand yet....
Inside system folder - customize, etc, framework, usr and xbin I dont understand yet.
Cause looking at eVil D:'s rom and paul's rom is very different in those. And even paul's rom doesnt have customize folder.
Would like to understand all and see if I can make a rom out.
Thanks
Click to expand...
Click to collapse
the kitchen signs the rom automatically. run the menu from terminal ( using linux) and u will see all the what the kitchen is doing.
do not try to compare custom roms ... they are different. some have extrafiles & folders depending on their customisations.
best thing is to compare with an original rom for the desire. and u see what has been added to get X and Y. involves a lot of trials and errors.
eViL D: said:
Got corrupted DL. Will have to try again.
Click to expand...
Click to collapse
I will try downloading too, if it wont work I will reupload it
I know that this can sound wierd but can anybody of you upload his kitchen?
Thank you all for help!
EDIT: File is corrupted, uploading again!
Reuploaded and tested, RAR file is ok
http://www.mediafire.com/?w5wommomzmk
Please somebody try ROM
Thanks
benko286 said:
Reuploaded and tested, RAR file is ok
http://www.mediafire.com/?w5wommomzmk
Please somebody try ROM
Thanks
Click to expand...
Click to collapse
Anybody tried ROM ?
P.S anybody has link to CyanogenMod port, anybody uses that kitchen?

[Q] disappeared Lock-Screen Ring & Home

I was playing with System/app/...
after checking some useless apps and removing them, this happened to me .
I am wonder what did i choose by mistake, and what was that?
check attachments for screen shots please.
I am not sure about Fusion.apk
If yes that's the problem, may some one provide a copy for me.
Thanks.
Actually they are there, and i can use them, but not visible.
Desire S
ICS 4.0.4
Sense 3.6
fusion.apk is part of htc sense framework, just open rom zip and copy that file to /system/app and reboot
441Excelsior said:
fusion.apk is part of htc sense framework, just open rom zip and copy that file to /system/app and reboot
Click to expand...
Click to collapse
Hi
Dude i ca'not , thats official RUU rom (exe) cant be extract.
then ask someone who use stock rom if he can upload that file for you
441Excelsior said:
then ask someone who use stock rom if he can upload that file for you
Click to expand...
Click to collapse
LooL Thank BTW.
Haven't played with RUU for a very long time. but if I remember correctly, when you run exe it extracts rom zip file to a temp folder somewhere on your c drive, keep it open and do a search you should be able to find the zip.
A good example of why it's a good idea to make a nandroid backup before playing with the system...
ContactFront said:
Haven't played with RUU for a very long time. but if I remember correctly, when you run exe it extracts rom zip file to a temp folder somewhere on your c drive, keep it open and do a search you should be able to find the zip.
Click to expand...
Click to collapse
Yep, OP just needs to search and read. This is exactly the method we used to get the .zip originally when the ICS RUU was released by HTC.
SimonTS said:
Yep, OP just needs to search and read. This is exactly the method we used to get the .zip originally when the ICS RUU was released by HTC.
Click to expand...
Click to collapse
IDC i always relock - install RUU - unlock - root.
THATS ALWAYS BETTER TO HAVE A CLEAR INSTALLATION OF SOME THING RATHER THAN PACK INSTALLATION.
ContactFront said:
Haven't played with RUU for a very long time. but if I remember correctly, when you run exe it extracts rom zip file to a temp folder somewhere on your c drive, keep it open and do a search you should be able to find the zip.
Click to expand...
Click to collapse
That's really nice if it does some thing like that. i did search in %temp% and %user%/app/data
but no trace .
and i am not sure that you are able to use UniExtractor to extract this new type of protected EXE file.
by using CMD, n does command you would get a pack from that EXE file, included a CAB file which is included all data in,
Is there to open a protected CAB?
usualy windows Cabinet files may extract via Winrar, Cabex, Cabextractor, etc ...
SimonTS said:
Yep, OP just needs to search and read. This is exactly the method we used to get the .zip originally when the ICS RUU was released by HTC.
Click to expand...
Click to collapse
2- And there is no big deal with Root n non-rooted device.
3- whats your problem with me?
why you always search for some thing in my topics to say some thing against me?
4-I see that you have lots of thanks
i am wounder that you have ever gained a thanks to solve a problem?????(or just talking off topics, make some one mad, blah blah blah...)
azithro said:
2- And there is no big deal with Root n non-rooted device.
3- whats your problem with me?
why you always search for some thing in my topics to say some thing against me?
4-I see that you have lots of thanks
i am wounder that you have ever gained a thanks to solve a problem?????(or just talking off topics, make some one mad, blah blah blah...)
Click to expand...
Click to collapse
No, there is no problem whether you are rooted or not as you said you need the Fusion.apk - which you just need to pull from the extracted .zip file after the first stage of running the RUU on your PC.
I don't have a problem with you - other than the fact that you seem to want to argue with anyone who gives you advice. You asked for a .apk file - you were suggested to extract it yourself from the RUU and then you decide to argue and find reasons why you can't do it. If you want help then read the answers from knowledgeable people and try what they suggest - otherwise what is the point in asking?
As for my 'Thanks' - who cares? I know less than many of the people on here, and you don't get 'Thanks' in Off-Topic, and I am almost never in OT, and it's none of your damn business why people have thanked me in the past.
You seem to have a real attitude of assuming you have a right to be supported. XDA is not, and never has been, a helpdesk for noobs - you need to get that into your head and deal with it.
Edit on this as I wanted to be sure of what I was saying. If you run the RUU then it will extract various info, including ROM.zip, into a temp folder, but this .zip is only useful as an image to flash from recovery, not to extract individual files from. On that basis, look for one of the ROMs that were based on the official RUU - there was a de-odexed, pre-rooted one released fairly shortly after the RUU - and pull fusion.apk from there.
And don't take your rookie mistake and frustration at yourself out on other members of XDA.
azithro said:
That's really nice if it does some thing like that. i did search in %temp% and %user%/app/data
but no trace .
and i am not sure that you are able to use UniExtractor to extract this new type of protected EXE file.
by using CMD, n does command you would get a pack from that EXE file, included a CAB file which is included all data in,
Is there to open a protected CAB?
usualy windows Cabinet files may extract via Winrar, Cabex, Cabextractor, etc ...
Click to expand...
Click to collapse
It indeed does somthing like this
Look into your C:\Users\YOURUSERNAME\AppData\Local\Temp
SimonTS said:
No, there is no problem whether you are rooted or not as you said you need the Fusion.apk - which you just need to pull from the extracted .zip file after the first stage of running the RUU on your PC.
I don't have a problem with you - other than the fact that you seem to want to argue with anyone who gives you advice. You asked for a .apk file - you were suggested to extract it yourself from the RUU and then you decide to argue and find reasons why you can't do it. If you want help then read the answers from knowledgeable people and try what they suggest - otherwise what is the point in asking?
As for my 'Thanks' - who cares? I know less than many of the people on here, and you don't get 'Thanks' in Off-Topic, and I am almost never in OT, and it's none of your damn business why people have thanked me in the past.
You seem to have a real attitude of assuming you have a right to be supported. XDA is not, and never has been, a helpdesk for noobs - you need to get that into your head and deal with it.
Edit on this as I wanted to be sure of what I was saying. If you run the RUU then it will extract various info, including ROM.zip, into a temp folder, but this .zip is only useful as an image to flash from recovery, not to extract individual files from. On that basis, look for one of the ROMs that were based on the official RUU - there was a de-odexed, pre-rooted one released fairly shortly after the RUU - and pull fusion.apk from there.
And don't take your rookie mistake and frustration at yourself out on other members of XDA.
Click to expand...
Click to collapse
Thanks Bro, Cheers man :highfive:
ContactFront said:
It indeed does somthing like this
Look into your C:\Users\YOURUSERNAME\AppData\Local\Temp
Click to expand...
Click to collapse
Thank you 2 bro. GJ
ContactFront said:
Haven't played with RUU for a very long time. but if I remember correctly, when you run exe it extracts rom zip file to a temp folder somewhere on your c drive, keep it open and do a search you should be able to find the zip.
Click to expand...
Click to collapse
My Desire s is running MIUI v5 android 4.1.2 rom about 4 months and it runs Perfect , the best ROM I have ever used, BTW I bought Lumia 920, and I Love it, do not want to go back to android again.

ROM Maker - Updated?

Hi All,
I'm looking for a windows utility, that can edit, customize and update an existing rom...
Basically, I am trying to tweak a Chinese rom to make it more INTERNATIONAL... However I'm not seeing many Windows (GUI) Apps that can do this, and if there is, they've been discontinued at ICS or earliest JB build.
Does anyone know an updated tool that can help me with this please...??
PhilzTouch is supposed to support this, but the package didn't work either...
Thanks, Lister
Lister Of Smeg said:
Hi All,
I'm looking for a windows utility, that can edit, customize and update an existing rom...
Basically, I am trying to tweak a Chinese rom to make it more INTERNATIONAL... However I'm not seeing many Windows (GUI) Apps that can do this, and if there is, they've been discontinued at ICS or earliest JB build.
Does anyone know an updated tool that can help me with this please...??
PhilzTouch is supposed to support this, but the package didn't work either...
Thanks, Lister
Click to expand...
Click to collapse
Philz touch is a recovery, not a ROM editing utility
Hi @DSA,
Yeah I'm aware it's a recovery, as I use it on my Note. However when I've tried to research looking for one of these Apps, some people suggested (and have seen in past, on unrelated topics) that with PhilzTouch you can clone your existing LIVE OS, and package it up to a Flashable Zip.
Well it did create a flashable zip, and it even puts it in a folder called "Custom Roms" which is based on a "Update.zip" file, even though it has a different name... However it doesn't flash, and when opened the file, it has .TAR files included and not a normal rom package.
So yeah, struggling to find anything that works... I came close to building/porting a rom earlier, however I received FCs afterwards...
Thanks, Andy
DSA said:
Philz touch is a recovery, not a ROM editing utility
Click to expand...
Click to collapse
Lister Of Smeg said:
Hi @DSA,
Yeah I'm aware it's a recovery, as I use it on my Note. However when I've tried to research looking for one of these Apps, some people suggested (and have seen in past, on unrelated topics) that with PhilzTouch you can clone your existing LIVE OS, and package it up to a Flashable Zip.
Well it did create a flashable zip, and it even puts it in a folder called "Custom Roms" which is based on a "Update.zip" file, even though it has a different name... However it doesn't flash, and when opened the file, it has .TAR files included and not a normal rom package.
So yeah, struggling to find anything that works... I came close to building/porting a rom earlier, however I received FCs afterwards...
Thanks, Andy
Click to expand...
Click to collapse
adb pull /system then zip with 7zip or winrar you will also need to make an updater script and updater binary for your device. with correct blocks so that the rom flashes correctly. so, you need to search for how to create an updater binary for your device and the correct blocks for data, system, and boot img. for your device. if cm has one for your device, you can usally download their rom zip and put all your info you pulled using adb into their zip deleting their's but note you will need your boot image to be pulled also which i do not know how to do

Categories

Resources