Add-Remove APKs from ROM? - Android Software Development

Hi
i want to build my own customized ROM...
How do i Remove and Add Apps (APK) correctly....
I want to know that bevor i start building...

you don't have to "build" anything... you can just remove apk-s you don't want using adb
enter recovery
adb-windows shell mount /system
adb-windows shell rm /system/app/app you want to remove.apk
link
http://android.modaco.com/content/h...apps-from-the-htc-desire-with-adb-in-windows/
hope this helpes

I believe that he's asking about removing apks from an existing Built rom...
Well from what I know:
extract the ROM
Remove apks you dont want, (??and mabe modify the script for the changes??)
re-compress ROM + Sign
extract the rom
Anyone with further knowledge please correct me.

Search the rom kicthen by dsixda

Hi,
When I try to run this command:
adb-windows shell mount /system
I get this message:
'adb-windows' is not recognized as an internal or external command,
operable program or batch file.

richrach said:
Hi,
When I try to run this command:
adb-windows shell mount /system
I get this message:
'adb-windows' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
Your home path variable not set correctly.
Sent from my SAMSUNG-SGH-I997 using xda premium

If you just want to remove APKs from the a ROM (Zip), then open the zip with WinRAR (do not unzip it), and delete the APKs. When you're done, just close WinRAR.
If you don't want to use that method, you can use ROM Cleaner (check attachment). Just download, unzip and click "RomCleaner.exe".

Related

Android img files

Okay I know this is a very noob question, how do I open android .img files And I have run a number of different search queries and still haven't found the answer.
jimmydafish said:
Okay I know this is a very noob question, how do I open android .img files And I have run a number of different search queries and still haven't found the answer.
Click to expand...
Click to collapse
what do you want to do with the img? dump it or just flash it?
if you got some kind of linux distro installed, just go (in terminal) to the dir where the image file is located, and type "file filename.img" if it returns something like ext2 filesystem, simply do:
mount -o loop filename.img /mnt
and the file will be mounted on /mnt, so you can access it using cd /mnt
if it returns something like VMS Alpha executable, you will have to download unyaffs, and if you want to repackage it later on, mkfs.yaffs2,
to get the file's content, just run unyaffs filename.img, and you will have the file content right in the folder with the img file...
if you don't have a linux distro installed, you can simply get virtualbox, and download the latest ubuntu iso file... mount the file in virtualbox and install ubuntu (it's quite easy)...
oh and incase you need them some basic commands:
Code:
ls - lists current folder content
cd folder - allows you to switch to a specific folder, like if you type ls, and you get the folder android listed just type cd android... if you want to go back to your home folder, type ~/...
sudo command - allows you to run specific commands as superuser (root... you can also just switch to user root by typing sudo su, so you won't need sudo every single time)
rm file / rm -R folder/file - allows you to remove files and with the parameter -R also folders ;)
hope this helped
emulator
What if i want to use the .imgs in the emulator/AVD? Any tips?
Thanks.
tdh_andy said:
What if i want to use the .imgs in the emulator/AVD? Any tips?
Thanks.
Click to expand...
Click to collapse
use mkfs.yaffs2.

[Error] Unable to apply PUSH Command in ADB

Hello mates,
I am trying to Copy the BUSYBOX file to my /data/local/bin directory. But when i use the 'push' command it say adb: command not found. Hereby i have attached the image of my terminal.
Would you please help me in copying my files to the directory "/data/bin/local"
Also, where should i put the files which i need to copy. Eg. Since i need to copy 'busybox' to the /data/local/bin/, should i put the busybox in my Desktop, i.e. /home/android/platform-tools directory?
You should've not run the command from within the adb shell. Just go to the tools folder and type "adb push busybox data/local/bin" ofcourse without the ""
The busybox should be indeed be present in the folder from witch you run adb, in your case the "tool" folder.
Good luck!
Erwin
Sent from my HTC Wildfire using XDA App
@ErwinP.
Thanks for rectifying this mistake.
It worked.
You're welcome! I had to learn it the hard way myself, so I'm happy ik I can help someone! ;-)

[***Guide***] Deodexing and Create your own custom rom and share it!

DEODEXING
must have all these
Download XUltimate
Busybox installed
Root
sdk tools
1. Connect tablet to computer
2. Start xUltimate, we will now get the required files from our phone to deodex and zipalign it which we will describe in the 3rd step.
3. On the main menu of xUltimate, type "deodex" in the main menu then choose option 5 (Pull and deodex all). Everything will be done for you here. Don't worry. You will see all your finished files in the folders 'done_app' and 'done_frame' which are located in the installation directory of xUltimate. If you have issues with the mobileprint.apk remove it and the mobileprint odex from /system/app/
4. move folders 'done_app' and 'done_frame' folders to your sdcard, you can find these folders in the directory of xUltimate as described in the previous step.
5. Make sure the sdcard is not mounted to pc anymore
6. Open Windows Command Prompt and type the following commands.
adb shell
su
stop
mount -o remount,rw /dev/block/stl12 /system
rm /system/app/*.odex
rm /system/framework/*.odex
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
chmod 644 /system/app/*
chmod 644 /system/framework/*
mount -o remount,ro /dev/block/stl12 /system
sync
reboot recovery
7. Now data and cache reset in the recovery menu...
8. reboot
Now How to Share and backup
1. download the backup script http://www.multiupload.com/OBLSBY5Z9E
2. extract the file and place in C:\Program Files\Android\android-sdk\platform-tools or where your sdk platform-tools folder is
3.open command prompt [run cmd prompt as administrator] type "cd C:\Program Files\Android\android-sdk\platform-tools" next press enter then type "backup" or where your platform-tools folder is [don't include ""]
4. the files for heimdall sharing will be in cd C:\Program Files\Android\android-sdk\platform-tools or where your platform-tools folder is also they will be on your sdcard
5. make sure when sharing you do a complete wipe you dont want to share your info
6.now lets get some roms posted!
Nice post, I was wondering how to do this just recently.
hi nice how to
i tried to download your backup script but the link is down.
can you please upload the backup script again
thanks
Wow thankss
Sent from my GT-P7500 using XDA Premium HD app
akenathon said:
Wow thankss
Sent from my GT-P7500 using XDA Premium HD app
Click to expand...
Click to collapse
CRC Studio | http://code.google.com/p/custom-rom-creator-studio/
The best rom cooking (windows) gui tool there is!
You can do this to with this gui tool and so much more...
Cheers
Thanks for the tips; but shouldn't this be in DEV or something..?
Well, that's where I would look to find such information... But I'm a noob.
Unable to deodex Phonesky.apk
as stated above, how to deodex Phonesky.apk?
I want to find way to create 3g with task v14 rom. Mybtab is gtab 10.1 3g p7500, but this rom doesnt support 3g.
Sent from my GT-P7510 using XDA Premium HD app
error msg
i try few times but always get this error, app`s is gove well and deodexed, from framework canot deodex following
android.policy
core
ext
framework
qcnvitems
services
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Cannot locate boot class path file boun
cycastle.odex
at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.jav
a:237)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:14
5)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(Cla
ssPath.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:93)
at org.jf.baksmali.main.main(main.java:278)
The system cannot find the file specified.
any solutions? thanks in advance

GUIDE : How to modify the cust.img

Hey there.
Does anyone knows how to modify the cust.img file of the latest official 2.3.5?
I want to remove some firmware apks (swype to install another version which support greek).
Thanks!
Hi I got this information from That-Guy:
1. Download Slitaz Linux 3.0 Live CD
2. Open terminal
3. Copy cust.img from phone to /home/tux folder
4. mkdir tmp
5. mount cust.img /home/tux/tmp
6. cd /home/tmp/hw/default/app
7. Delete apk files what you don't want
8. unmount tmp
9. Copy cust.img from /home/tux folder to phone
Thanks. I did the following and worked:
In Linux (ubuntu 10.04):
1)copy the cust.img file from your .cust_backup/image folder of your mobile somewhere in your computer (ex Desktop)
2)open a terminal and type sudo su (root permissions) and then your computer password
3)Go to "somewhere" : with command: cd somewhere (ex cd ~/Desktop )
4)type at terminal mount -o loop cust.img /mnt/
5)type sudo nautilus . This should open you a navigation window.
6)navigate to: file system --> mnt/
inside the hw/default/app are the apks of the default cust.img.
Edit it as you wish.
to unmount type at terminal (with root permissions again): umount /mnt/
you are ready to copy the cust.img back to your phone and replace the old one
can someone give us a clear cust.img and the apps to a folder in order to let us choose which of them we want to install?
I'm not so familiar with linux OS and i am afraid to do it on my own. :/
Doesn't poweriso work for this on windows?
Sent from my u8800-51 running popaura ICS.
Somcom3X said:
Doesn't poweriso work for this on windows?
Click to expand...
Click to collapse
i tried to open my cust.img with poweriso without success.
It stopped with an error, "the file format is invalid or unsupported".
http://forum.xda-developers.com/showthread.php?t=1373146
ufukyayla said:
http://forum.xda-developers.com/showthread.php?t=1373146
Click to expand...
Click to collapse
last post there is mine...

[HOWTO] - Deodex & ZipAlign any ROM - More RAM, More Space, More Speed!

Hi all,
I have managed to deodex and zipalign my rooted I8190XXALL2_I8190OXXALL1 ROM in my smartphone, so thought i would share it here.
Follow all the instructions carefully. I will not be held responsible in any manner if your smartphone doesn’t boot up or gets bricked due to not following the instructions.
Please make sure -
1. Your smartphone is already rooted (flash one of the rooted rom's founded here)
2. Download and install Busybox Installer latest version.
3. Make sure you already have Java SE Development Kit and Android SDK installed on your computer.
Install them to the default choice on the C: drive.
4. You should also have a basic knowledge of ADB.
Required Downloads -
1. xUltimate version 2.4.2 – Link. You may have to Google for the correct version to download. Extract it to C:\xUltimate-v2.4.2.
Instructions –
1. Connect your smartphone to your computer. (Make sure you have selected USB debugging in Settings>Applications>Development)
2. Open a command prompt as administrator. Wait for Window to appear.
3. Change Directory to C:\xUltimate-v2.4.2
4. Launch main.exe.
5. If everything goes well xUltimate should recognize the smartphone and make a connection. You should now see a list of options.
6. Select option (1) pull /system/app. Wait until it completes.
7. Select option (2) pull /system/framework. Wait until it completes.
8. Then select option (3) Deodex /system/app. Wait until it complete.
[If encounter any error. Find out which .odex file is it. Then remove .odex file from folder origi_app in xUltimate folder.
If you encounter the error “ ‘java’ is not recognized as an internal or external command, operable or batch file” see Note below.]
9. Then select option (4) Deodex /system/framework. Wait until it complete.
10. Now Exit from xUltimate.
11. Disconnect and connect your smartphone. Your PC should open a Window for you to view your files.
12. Go to C:\xUltimate-v2.4.2 folder and copy “done_frame”, and “done_app”, and move them to the root of the internal sdcard. Don’t copy them to your external sdcard
14. Now safely eject your smartphone from the PC.
15. Click on My Computer and find the directory where Android SDK is installed (on my PC it is in C:\Program Files (x86)\Android\android-sdk\. Then go to the ‘platform-tools’ folder in it. Right click on any free space in folder while pressing shift key. Select ‘open command prompt here’.
16. Reconnect the smartphone to your PC in USB debugging mode.
17. Now enter the following commands (if you are using adb shell in su for the first time, keep smartphone screen on).
adb shell (this should recognize your device)
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
18. Your smartphone will reboot and perform an automatic Android update. You have now deodexed/zipaligned the ROM on your smartphone.
NOTE
I only tried this on my I8190 with ROM I8190XXALL2 - I8190XXALL1 BTU Rooted.
At Step 8, (running Option 3), if you encounter the error “ ‘java’ is not recognized as an internal or external command, operable or batch file” then xUltimate can’t find the PATH to your ‘java’ command.
To add the location of Java to your PATH do this:
Right-click on ‘My Computer’ (or Computer for Vista) and choose ‘Properties’.
Navigate to the ‘Advanced’ tab (or for Vista/7/8, click 'Advanced System Settings’ on the left, then find the ‘Advanced’ tab)
Click ‘Environment Variables’
Under System Variables, find 'Path' and click Edit...
DO NOT ERASE OR REPLACE THE CONTENTS OF THIS. YOU ARE SIMPLY GOING TO ADD TO IT.
At the very end of the text field, add a semicolon [ ; ] and add the location of java.exe.
On my Windows 64-bit system this is in “c:\program files\java\jdk1.7.0_06\bin” . For others it might be "c:\program files\java\jre7\bin". I seem to have java.exe in both locations but only the first one worked for the batch file in xUltimate.
Then ‘Okay’ that to save the addition and come out of ‘Properties’
Batch files will now be able to find java.exe without you modifying the batch file.
*************************************************************************************
If for some reason you can't deodex and zipalign apps and framework with xUltimate, ive uploaded them for your use:
done_app
done_frame
They were deoxeded and zipaligned from ROM I8190XXALL2 - I8190XXALL1 BTU Rooted
*************************************************************************************
I followed the above and it works. I used Root Explorer to check my smartphone and all the .odex files have gone, i have more memory available, and smartphone seems faster!
infected_
Well you'll get more ram and deode xing opens a whole new of theming possibilities but it won't be as fast as odexed rom even though zipaligned !
nikufellow said:
Well you'll get more ram and deode xing opens a whole new of theming possibilities but it won't be as fast as odexed rom even thigh zipaligned !
Click to expand...
Click to collapse
I get more RAM thats what i like and more space..! i dont care about theming... but i guaranty that the phone seems faster deoxed and zipaligned...
infected_ said:
I get more RAM thats what i like and more space..! i dont care about theming... but i guaranty that the phone seems faster deoxed and zipaligned...
Click to expand...
Click to collapse
I do not doubt you mate i just posted what i knew from my experience ! Stay with deodexed Rom for few more days/weeks and then temporarily try coming back to odexed stock and you'll know the difference
Sent from a hybrid phablet !
i just didn't find a way no recompile system.img in windows.... or else i had made a pretty cool rom and fast whit android kitchen 0.208... :silly:
Don't give up we need Roms
Sent from a hybrid phablet !
i can compile cm or aokp if u want
Yes please.
Sent from my GT-I8190 using xda premium
Shapeshift said:
i can compile cm or aokp if u want
Click to expand...
Click to collapse
can you decompile system.img from this latest 4.1.1 rooted rom I8190XXALL2_I8190OXXALL1_BTU and replace /system/app/* and /system/framework/* with the deodexed and zipaligned apk's:
done_app
done_frame
and then compile into odin flashable *.tar.md5 ?!
infected_ said:
Hi all,
I have managed to deodex and zipalign my rooted I8190XXALL2_I8190OXXALL1 ROM in my smartphone, so thought i would share it here.
Follow all the instructions carefully. I will not be held responsible in any manner if your smartphone doesn’t boot up or gets bricked due to not following the instructions.
Please make sure -
1. Your smartphone is already rooted (flash one of the rooted rom's founded here)
2. Download and install Busybox Installer latest version.
3. Make sure you already have Java SE Development Kit and Android SDK installed on your computer.
Install them to the default choice on the C: drive.
4. You should also have a basic knowledge of ADB.
Required Downloads -
1. xUltimate version 2.4.2 – Link. You may have to Google for the correct version to download. Extract it to C:\xUltimate-v2.4.2.
Instructions –
1. Connect your smartphone to your computer. (Make sure you have selected USB debugging in Settings>Applications>Development)
2. Open a command prompt as administrator. Wait for Window to appear.
3. Change Directory to C:\xUltimate-v2.4.2
4. Launch main.exe.
5. If everything goes well xUltimate should recognize the smartphone and make a connection. You should now see a list of options.
6. Select option (1) pull /system/app. Wait until it completes.
7. Select option (2) pull /system/framework. Wait until it completes.
8. Then select option (3) Deodex /system/app. Wait until it complete.
[If encounter any error. Find out which .odex file is it. Then remove .odex file from folder origi_app in xUltimate folder.
If you encounter the error “ ‘java’ is not recognized as an internal or external command, operable or batch file” see Note below.]
9. Then select option (4) Deodex /system/framework. Wait until it complete.
10. Now Exit from xUltimate.
11. Disconnect and connect your smartphone. Your PC should open a Window for you to view your files.
12. Go to C:\xUltimate-v2.4.2 folder and copy “done_frame”, and “done_app”, and move them to the root of the internal sdcard. Don’t copy them to your external sdcard
14. Now safely eject your smartphone from the PC.
15. Click on My Computer and find the directory where Android SDK is installed (on my PC it is in C:\Program Files (x86)\Android\android-sdk\. Then go to the ‘platform-tools’ folder in it. Right click on any free space in folder while pressing shift key. Select ‘open command prompt here’.
16. Reconnect the smartphone to your PC in USB debugging mode.
17. Now enter the following commands (if you are using adb shell in su for the first time, keep smartphone screen on).
adb shell (this should recognize your device)
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
18. Your smartphone will reboot and perform an automatic Android update. You have now deodexed/zipaligned the ROM on your smartphone.
NOTE
I only tried this on my I8190 with ROM I8190XXALL2 - I8190XXALL1 BTU Rooted.
At Step 8, (running Option 3), if you encounter the error “ ‘java’ is not recognized as an internal or external command, operable or batch file” then xUltimate can’t find the PATH to your ‘java’ command.
To add the location of Java to your PATH do this:
Right-click on ‘My Computer’ (or Computer for Vista) and choose ‘Properties’.
Navigate to the ‘Advanced’ tab (or for Vista/7/8, click 'Advanced System Settings’ on the left, then find the ‘Advanced’ tab)
Click ‘Environment Variables’
Under System Variables, find 'Path' and click Edit...
DO NOT ERASE OR REPLACE THE CONTENTS OF THIS. YOU ARE SIMPLY GOING TO ADD TO IT.
At the very end of the text field, add a semicolon [ ; ] and add the location of java.exe.
On my Windows 64-bit system this is in “c:\program files\java\jdk1.7.0_06\bin” . For others it might be "c:\program files\java\jre7\bin". I seem to have java.exe in both locations but only the first one worked for the batch file in xUltimate.
Then ‘Okay’ that to save the addition and come out of ‘Properties’
Batch files will now be able to find java.exe without you modifying the batch file.
*************************************************************************************
If for some reason you can't deodex and zipalign apps and framework with xUltimate, ive uploaded them for your use:
done_app
done_frame
They were deoxeded and zipaligned from ROM I8190XXALL2 - I8190XXALL1 BTU Rooted
*************************************************************************************
I followed the above and it works. I used Root Explorer to check my smartphone and all the .odex files have gone, i have more memory available, and smartphone seems faster!
infected_
Click to expand...
Click to collapse
Make it for pll or rename the thread "INFO OR HOWTO"
Great info thx m8
Sent from my GT-I8190 using XDA Premium App
The done_app link is broken..
JoFury said:
The done_app link is broken..
Click to expand...
Click to collapse
just tried it now... its working.
https://dl.dropbox.com/u/17735355/done_app.rar
https://dl.dropbox.com/u/17735355/done_frame.rar
Is this SIII Mini specific or Any phone and any rom?? THAN-Q.
NHS2008 said:
Is this SIII Mini specific or Any phone and any rom?? THAN-Q.
Click to expand...
Click to collapse
any device running on an odexed Rom
why fix it if it ain't broken ?
nikufellow said:
any device running on an odexed Rom
why fix it if it ain't broken ?
Click to expand...
Click to collapse
Thank you for the answer...
Sent from infected_ s3 mini i8190
nikufellow said:
any device running on an odexed Rom
why fix it if it ain't broken ?
Click to expand...
Click to collapse
Even the L version?
i have a 4.1.2 Faria ROM in my S3 galaxy mini. I can do this?
generalriden said:
i have a 4.1.2 Faria ROM in my S3 galaxy mini. I can do this?
Click to expand...
Click to collapse
I don't advise you... faria's rom is already zipaligned.
infected_ said:
I don't advise you... faria's rom is already zipaligned.
Click to expand...
Click to collapse
I have problem from
mount -o rw,remount /system/ /system/
cp /sdcard/done_app/* /system/app/
rm /system/app/*.odex
cp /sdcard/done_frame/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
Click to expand...
Click to collapse
and after searche on Google find another thread like this and i see diferant methode can you pleas see and explain i try with this http://forum.xda-developers.com/showthread.php?t=1688211 method this night and feed if worked but if you see we have diferant commande now i know need to change
from
#mount -o remount,rw /dev/block/mmcblk0p9 /system
to
#mount -o remount,rw /dev/block/mmcblk0p22 /system
i try and feed if worked later
thank for tut
hi, need some help. when i try to deodex, i got error "Error occured while loading boot class path files. Aborting. bla bla bla"
please help me

Categories

Resources