How do i add apk to custom rom? - Samsung Infuse 4G

Hi,
I have a few apps and would like to add into custom rom. I read and google but no help.
Using winrar and open custom rom, i create a folder /data/app and place all apk in "app" folder. non of the apps in that folder installed. Do i need to do more then just add the apk?
I read here http://forum.xda-developers.com/showthread.php?t=1198035 and no use. maybe OP not don't with the guide yet.
thx

cat2115 said:
Hi,
I have a few apps and would like to add into custom rom. I read and google but no help.
Using winrar and open custom rom, i create a folder /data/app and place all apk in "app" folder. non of the apps in that folder installed. Do i need to do more then just add the apk?
I read here http://forum.xda-developers.com/showthread.php?t=1198035 and no use. maybe OP not don't with the guide yet.
thx
Click to expand...
Click to collapse
Reread that thread. The answer is in there.
Hint: ROM flash packages never put anything in /data

you can preinstall apps to /data/app but it takes update script modding. if you havent figured it out it is a lot easier to add them as system apps in /system/app

@Dani897: I try adding apk to /system/app or /data/app but none are working. When I add apk to /system/app; after the rom flashed and reboot, Samsung kept on flashing forever.

cat2115 said:
@Dani897: I try adding apk to /system/app or /data/app but none are working. When I add apk to /system/app; after the rom flashed and reboot, Samsung kept on flashing forever.
Click to expand...
Click to collapse
check your permissions!
the data/app way need adition work in the update script. im not gonna get into that.

Dani897 said:
check your permissions!
the data/app way need adition work in the update script. im not gonna get into that.
Click to expand...
Click to collapse
Thanks. How do i check permission? in CWM? In cwm (red) v2.5.1.3 -->Install zip from sdcard --> toggle signature verification-->disable'
In advance, all i see is fix permissions.

cat2115 said:
Thanks. How do i check permission? in CWM? In cwm (red) v2.5.1.3 -->Install zip from sdcard --> toggle signature verification-->disable'
In advance, all i see is fix permissions.
Click to expand...
Click to collapse
no in a terminal emulator or in linux. they get screwy sometimes if you do editing in windows. i cant even seem to get ownership of one of my flash drives on my linux machine after i formatted it with windows.
if you are on a mac you can do it by clicking and choosing "get info" from the context menu apparently but i dont own a mac so i dont know.
i never used it but check out cygwin and do some googling on permissions in terminal/console. it might be best if you are not ready to install a new os. but you can also install ubuntu with the wubi installer inside windows of use a vm with osx or the linux distro of your choice pretty easily. please dont ask for support questions on doing those things.
you can find permissions of files in a directory with ls -l
you can change them with chmod an ususally one of the numbers below but there are others, google is your friend
666 is rw-rw-rw
644 is rw-r--r-
777 is rwxrwxrwx
755 is rwxr-xr-x
644 or 755 are the most likely that they should be.

Related

Backup apps????

Is there a way to save some of my apps before I flash a new ROM? I have a few that I installed while the were free but now they are paid apps or no longer in the market. (Tether apps) I am going to flash one of the Haykuro roms but want to keep these apps to install on the new ROM. Thank for any suggestions!!
Some options:
- Look on the Market for a backup app
- Look for a file manager app and copy the stuff out of /data/app and /data/app-private
- Hook up Dream to a desktop and adb pull it to the computer
- Reboot into recovery and create a nandroid backup
Thanks for the tips, when using the file mgr, when I click on data, nothing is in the file. Am i looking in the wrong area???
jordanjf86 said:
Thanks for the tips, when using the file mgr, when I click on data, nothing is in the file. Am i looking in the wrong area???
Click to expand...
Click to collapse
They're hidden files. You must show hidden files, first.
ivanmmj2 said:
They're hidden files. You must show hidden files, first.
Click to expand...
Click to collapse
No, they're not hidden files. The problem is that /data is a protected directory. The file manager doesn't have permission to access it.
jashsu said:
No, they're not hidden files. The problem is that /data is a protected directory. The file manager doesn't have permission to access it.
Click to expand...
Click to collapse
Is there any way around that?
setuid, but that's insecure and a little bit of a hassle. I'd go the adb pull way.
You could also do it all manually inside the Terminal Emulator. Use su to gain root then cp /data/app/* /sdcard/somewhere
thanks!!!!

[MOD] Six(6) Lockscreens & Power Menu + Clock Options for KC1 [EDT][4.22.2011]

Ok everyone. Here is the lockscreen mod, power menu AND additional clock options for KC1. This will NOT work on Krylon's stock build but ONLY my deodexed one. Since there is no cwm yet you will need to push the files manually with adb or use root explorer to drop them in. Root Explorer is the easiest method. Just be sure to set permissions on all the files to rw-r--r-- after you copy them in.
Lockscreens are Rotary (default), Puzzle, Android, Glass, Epic and Star Wars (Settings > Display > Unlock Screen)(Please be aware - Lockscreen wallpapers are not supported on any of these)
Power Menu (no header) - Reboot, Recovery, Download mode
Clock Options - Hide Clock, Hide am/pm (Settings > Date and Time)
Added "Stay Awake" option (Settings > Applications > Development)
Pretty sure I killed the "battery full" pop-up as well
DOWNLOAD <<<<< KC1 Lockscreens / Power Menu / Clock Options
If using adb here is what to do...
Place the files in the zip in your adb tools folder. Navigate to your tools folder in your cmd prompt and perform these commands
First, mount your system as r/w
Code:
adb shell
su (will need to accept root access on phone)
mount -o remount,rw /dev/block/stl9 /system
Your system is now mounted as read/write. Now remove the original files from your phone.
Code:
rm /system/framework/framework-res.apk
rm /system/framework/framework.jar
rm /system/framework/android.policy.jar
rm /system/framework/services.jar
rm /system/app/Settings.apk
exit
exit
Now push the new files into place.
framework files to framework folder
Code:
adb push framework-res.apk /system/framework
adb push framework.jar /system/framework
adb push android.policy.jar /system/framework
adb push services.jar /system/framework
Settings to app folder
Code:
adb push Settings.apk /system/app
Now the files are all in place, but you need to set the correct permission on them.
Code:
adb shell
su
chmod 644 /system/framework/framework-res.apk
chmod 644 /system/framework/framework.jar
chmod 644 /system/framework/android.policy.jar
chmod 644 /system/framework/services.jar
chmod 644 /system/app/Settings.apk
DONE. Now reboot your phone. It will take about 5 minutes to reboot.
Again, you can use Root Explorer to move these files into place manually. Just be sure to set the permissions of all of them to rw-r--r-- after you do.
Credits
~ Untermensch for ultimately being my mentor on lockscreens and for his write-up on doing the power menu
~ S0niqu3 for the hide am/pm source
~ sbrissen for the hide clock source
Used root explorer to drop them in place and reset permissions work like a charm thanks
Sent from my SGH-T959V using XDA Premium App
Android, Rotary and Star Wars unlock doesn't have unlock sounds
Sent from my SGH-T959V using XDA Premium App
Wow. That was fast. Thank you much.
Sent from my SGH-T959V using XDA Premium App
chadster214 said:
Android, Rotary and Star Wars unlock doesn't have unlock sounds
Sent from my SGH-T959V using XDA Premium App
Click to expand...
Click to collapse
Yea only not all the lockscreens support unlock sounds. Only the twiz lockscreens support the twiz music player widget as well.
if u use root explorer do i just have to replace the framework and put the new one?
crunkhead18 said:
if u use root explorer do i just have to replace the framework and put the new one?
Click to expand...
Click to collapse
yes, just overwrite the files
Can someone show me how to use this root explorer instead of adb
Sent from my SGH-T959V using XDA Premium App
rickyy00 said:
Can someone show me how to use this root explorer instead of adb
Sent from my SGH-T959V using XDA Premium App
Click to expand...
Click to collapse
I would honestly learn the basics before you try any of this.
i allready flashed stock deodexed kc1 rom onto my phone in hopes of putting on the lockscreens but i just wanted to know if the root explorer method was easier like he stated up there
I really want these....but its quite painful setting up all my sync'ed accounts again after flashing. I went from Deodexed to Krylon's Odexed Stock, to go back to Deodexed would be a painful process again to get all my accounts set back up and app's loaded + moved to SD. Also fixing the camera/mms/phone issue with the Deodexed ROM on top of that.
Anybody else have any thoughts? Just do it? Haha
mikeDCMDVA said:
I really want these....but its quite painful setting up all my sync'ed accounts again after flashing. I went from Deodexed to Krylon's Odexed Stock, to go back to Deodexed would be a painful process again to get all my accounts set back up and app's loaded + moved to SD. Also fixing the camera/mms/phone issue with the Deodexed ROM on top of that.
Anybody else have any thoughts? Just do it? Haha
Click to expand...
Click to collapse
I used ES File Explorer, go into settings, and check the two boxes in Root setting.
Then go to the directory where the zip is saved, extract and copy paste to the right directories. Once that was done I rebooted. It took 5 min or so to boot but It came up. Once done go into settings and change lockscreen.
Worked like a charm for me. Thanks!!!
rickyy00 said:
i allready flashed stock deodexed kc1 rom onto my phone in hopes of putting on the lockscreens but i just wanted to know if the root explorer method was easier like he stated up there
Click to expand...
Click to collapse
as the OP say " use root explorer to drop them in" come on dude!!! READ!!!
chadster214 said:
as the OP say " use root explorer to drop them in" come on dude!!! READ!!!
Click to expand...
Click to collapse
DUDE THAT GUY NEEDS TO BE SPOON FED ON EVERYTHING! Even though it's already straight outlined for him.
YES RICKY00.
IF THE OP SAYS IT'S THE EASIEST METHOD THEN YES IT IS THE EASIEST METHOD. I USE IT BECAUSE IT'S THE EASIEST METHOD AND WELL WORTH THE MONEY TO PAY FOR THAT APP CUZ OF HOW EASY IT IS TO USE AND SINCE I'M A LAZY ASS TO USE ADB EVEN THOUGH ADB ISN'T THAT HARD.
so to be clear...
i have to flash the deodexed rom in order to have this?
i cant push them with root explorer with only a rooted 4gs?
freaktractor said:
so to be clear...
i have to flash the deodexed rom in order to have this?
i cant push them with root explorer with only a rooted 4gs?
Click to expand...
Click to collapse
you have to flash to Deodexed KC1
Oh boy, so I was able to do this via ADB.
But thought I would also try and do it with Root Explorer. I am bored at my job today.
I copied the files to the sdcard. Then opened Root explorer, located the files, using multi- select I selected all but the settings file that goes into the system/app.
I then hit copy/ then tried to paste the four files to system/framework
I get an error that says there isn't enough space. Then I get all sorts of force closes, and have to re-odin the deodexed KC1.
What the hell am I doing wrong? I am sure I am just having a brain fart but its becoming irritating.
Bl4ckpheniX said:
Oh boy, so I was able to do this via ADB.
But thought I would also try and do it with Root Explorer. I am bored at my job today.
I copied the files to the sdcard. Then opened Root explorer, located the files, using multi- select I selected all but the settings file that goes into the system/app.
I then hit copy/ then tried to paste the four files to system/framework
I get an error that says there isn't enough space. Then I get all sorts of force closes, and have to re-odin the deodexed KC1.
What the hell am I doing wrong? I am sure I am just having a brain fart but its becoming irritating.
Click to expand...
Click to collapse
I had the same problem with another framework, and cringed when I tried this method. BUT, I used ES File explorer for this mod and everything worked like a charm. I didnt have to set permissions or anything.
Bl4ckpheniX said:
Oh boy, so I was able to do this via ADB.
But thought I would also try and do it with Root Explorer. I am bored at my job today.
I copied the files to the sdcard. Then opened Root explorer, located the files, using multi- select I selected all but the settings file that goes into the system/app.
I then hit copy/ then tried to paste the four files to system/framework
I get an error that says there isn't enough space. Then I get all sorts of force closes, and have to re-odin the deodexed KC1.
What the hell am I doing wrong? I am sure I am just having a brain fart but its becoming irritating.
Click to expand...
Click to collapse
Try using es file explorer
Sent from my SGH-T959V using XDA Premium App
fknfocused said:
I used ES File Explorer, go into settings, and check the two boxes in Root setting.
Then go to the directory where the zip is saved, extract and copy paste to the right directories. Once that was done I rebooted. It took 5 min or so to boot but It came up. Once done go into settings and change lockscreen.
Worked like a charm for me. Thanks!!!
Click to expand...
Click to collapse
I am not deodexed though.

[Q] CWM feeling like a newb

I downloaded everything in the cwm final
I used file manager to overwrite the old files and when I boot into recovery I still get the old recovery and not cwm
There is also nowhere for me to instal from update.zip
I have done this on my evo and it was easy but I'm clearly missing something with my galaxy 4g would someone be so kind as to give step by step instructions?
BGVampire said:
I downloaded everything in the cwm final
I used file manager to overwrite the old files and when I boot into recovery I still get the old recovery and not cwm
There is also nowhere for me to instal from update.zip
I have done this on my evo and it was easy but I'm clearly missing something with my galaxy 4g would someone be so kind as to give step by step instructions?
Click to expand...
Click to collapse
reinstall packages
krylon360 said:
reinstall packages
Click to expand...
Click to collapse
No fair you beat me to it.....duh winning..
Sent from my SGH-T959V using XDA Premium App
krylon360 said:
reinstall packages
Click to expand...
Click to collapse
and yes you must reinstall packages every time you want to re-enter CWM so you must leave the update.zip on you SD card
wrecless said:
and yes you must reinstall packages every time you want to re-enter CWM so you must leave the update.zip on you SD card
Click to expand...
Click to collapse
Thank you for your post. Common knowledge I know but a great reminder!
Sent from my Galaxy s 4g
can't flash CWM recovery
everytime i boot into recovery, i selected reinstall packages, then i get error : signature verification failed!
am I missing something? I have EVO too, it wasn't that difficult to install CWM.
anybody can help me by pointing to things I might have missed?
sarfrazhc said:
everytime i boot into recovery, i selected reinstall packages, then i get error : signature verification failed!
am I missing something? I have EVO too, it wasn't that difficult to install CWM.
anybody can help me by pointing to things I might have missed?
Click to expand...
Click to collapse
recovery.bin probably isn't being overwritten correctly. At first I downloaded the file with Dolphin Browser and had the same problems. Try downloading the file with firefox and then try pushing it to /system/bin again.
probably recovery file is not being copied in system/bin folder. i can see it has only read permission for group and write permission. i tried rom manager permission fix, that didn't change permission of recovery. i tried changing from terminal using chmod +w & chmod 755. but that didn't help change the permission on recovery file.
sarfrazhc said:
probably recovery file is not being copied in system/bin folder. i can see it has only read permission for group and write permission. i tried rom manager permission fix, that didn't change permission of recovery. i tried changing from terminal using chmod +w & chmod 755. but that didn't help change the permission on recovery file.
Click to expand...
Click to collapse
Rom Manager isn't working for the Galaxy S 4G yet.
What application are you using to copy recovery to /system/bin?
typically i use ES explorer but i tried File Expert too.
one typo on my prev post: i don't have write permission on recovery, only got read permission.
sarfrazhc said:
typically i use ES explorer but i tried File Expert too.
one typo on my prev post: i don't have write permission on recovery, only got read permission.
Click to expand...
Click to collapse
ES won't work. File Expert should work. Just make sure you have R/W permissions. Don't do anything with Rom Manager. That won't help.
yea it should work as they say but it does not. I tried changing permission using File expert,it click OK and then i check file permission on recovery right away, the write permission is not checked. even chmod 755 failed to change the write permission!
sarfrazhc said:
yea it should work as they say but it does not. I tried changing permission using File expert,it click OK and then i check file permission on recovery right away, the write permission is not checked. even chmod 755 failed to change the write permission!
Click to expand...
Click to collapse
I don't think you have any problems with R/W. I just don't think the recovery file was overwritten. Look in /system/bin in File Expert. Do you see recovery and recovery.bin? Or just recovery?
/system/bin/recovery file exists and i have been trying to change its permission.
sarfrazhc said:
/system/bin/recovery file exists and i have been trying to change its permission.
Click to expand...
Click to collapse
You don't need to change the permission of recovery. Copy the recovery file and navigate to /system/bin in file expert. When you get there you want to hit menu then more then mount. It will give you two options. Pick mount as read write. Then paste the recovery file.
Read through this thread again. It should help.
http://forum.xda-developers.com/showthread.php?t=1099374
mounted with read/write and now i could boot into recovery.
Thanks a lot for taking time to answer my questions. First backup is in progress...
sarfrazhc said:
mounted with read/write and now i could boot into recovery.
Thanks a lot for taking time to answer my questions. First backup is in progress...
Click to expand...
Click to collapse
No problem man.

[Q] Can't delete Mms.odex, "No such file or directory"

I'm trying to use my new Sensation with the SIM from my Japanese iPhone, which requires replacing the stock Mms.apk with one that works with Softbank. That much I managed to do. Now when I try to open the Messaging app it crashes immediately, which is apparently normal and means I need to delete the old Mms.odex. But when I try, the command prompt window tells me:
rm failed for /system/app/Mms.odex, No such file or directory
I've made sure the folder isn't read-only (I managed to copy the new Mms.apk to it after all). Not sure what else could be going wrong. Thanks in advance for any help.
Its not a good idea to push files into the system directory of an odexed ROM like that. You usually need to push the appropriate .odex file with the .apk file.
Also could be a permissions problem. You need to make sure the permissions for the new file the are same as what's already in the directory.
Sent from my Sensation using Cyanogenmod
dr.m0x said:
Its not a good idea to push files into the system directory of an odexed ROM like that. You usually need to push the appropriate .odex file with the .apk file.
Click to expand...
Click to collapse
I know it's not ideal, but this method seems to work just fine; I've read a bunch of Japanese blogs that explain this is how to get MMS working with Softbank, and people on forums elsewhere say it's worked for them.
dr.m0x said:
Also could be a permissions problem. You need to make sure the permissions for the new file the are same as what's already in the directory.
Click to expand...
Click to collapse
How do I do that? I'm pretty new to all this, two days ago I was Googling where to find my Sensation's settings menu
If you want to ensure the mms.apk has correct permissions you can simply run:
adb shell chmod 644 /system/app/mms.apk
This will set the correct permissions for apps in the /system/app folder, although its worth reading up on linux permissions to understand what the command is actually doing.
Permissions didn't help, but I've managed to track down another Mms.apk file that works well enough - messages don't integrate properly with HTC's Messaging app, but I can send and receive MMS. I'm going to keep looking for a better apk but at least this one functions!

[DEAD][Script][4.4.2] How to make all apps read External SD Card

This fix Requires ROOT and Busybox installed to /system/xbin
Context: I have been looking for a way to make an app that hides files to read/write files on my external SDcard, The way I found was to edit the platform.xml file to add that missing line as guided here: LINK this is just one of the many articles saying the same thing. which helped some apps work, but not the one i was looking for.
Reason: the point of this script is to make it so you do not have to set permission to the "media_rw" folder after every reboot manually.
Steps:
1) Follow and complete guide linked above, or any other similar guide, if you have not done so already.
*NOTE* some custom ROMs have already implemented this fix
2) After reboot use an app that allows you to make scripts (Ex. Rom Toolbox) this guide will use Rom Toolbox app
- create new script, name it whatever you want. I named it "sdcard permission"
- input this line and save:
Code:
chmod 777 /mnt/media_rw
*NOTE* you do not need to put it as 777 but it is what worked for me as it gave full read/write/execute permissions
3) Set script to run at boot
4) Run script manually then check app to see if it worked
-Alternatively go check /mnt/media_rw to see if it has the new permissions
Now you should be able to access the external SD card after every boot.
NOTE: you may need to redo the guide in the first step after switching ROMs as the new ROM may not have the fix implemented.
Reserved just in case
Buddyjohn said:
This fix Requires ROOT and Busybox installed to /system/xbin
Context: I have been looking for a way to make an app that hides files to read/write files on my external SDcard, The way I found was to edit the platform.xml file to add that missing line as guided here: LINK this is just one of the many articles saying the same thing. which helped some apps work, but not the one i was looking for.
Reason: the point of this script is to make it so you do not have to set permission to the "media_rw" folder after every reboot manually.
Steps:
1) Follow and complete guide linked above, or any other similar guide, if you have not done so already.
*NOTE* some custom ROMs have already implemented this fix
2) After reboot use an app that allows you to make scripts (Ex. Rom Toolbox) this guide will use Rom Toolbox app
- create new script, name it whatever you want. I named it "sdcard permission"
- input this line and save:
Code:
chmod 777 /mnt/media_rw
*NOTE* you do not need to put it as 777 but it is what worked for me as it gave full read/write/execute permissions
3) Set script to run at boot
4) Run script manually then check app to see if it worked
-Alternatively go check /mnt/media_rw to see if it has the new permissions
Now you should be able to access the external SD card after every boot.
NOTE: you may need to redo the guide in the first step after switching ROMs as the new ROM may not have the fix implemented.
Click to expand...
Click to collapse
I have a Samsung Galaxy S3 and been trying all kind of things to get to media_rw folder to keep its read writable and nothing worked so far. I did everything in you post to see if it would help/work but script not working. I can only keep permissions if I set manually set permission using root browser and then it working until I reboot the phone and I tried adding the script using ROM Toolbox pro but its not even changing the media_rw permission when run it.
This my first time using the script tool but to me seems to be setup properly. If needed I will get some screenshots of the script windows to show how I set it up. I am just posting this now to see if anyone can help or wants to ask some questions.
I know how permissions work in Windows and getting up to speed with Android. I been trying to make the media_rw folder r/w to be able to able to path it to my Titanium Backup folder on my external SD.
This looks similar to setting boot bat files in Windows so I know it should work but no go so far.
Heres the screenshots of my script that failed to run and the output file hoping to get some advice why script did not work.
Is this thread dead? Should I seek answers elsewhere?
techmanc said:
Is this thread dead? Should I seek answers elsewhere?
Click to expand...
Click to collapse
yes this thread is dead, lots of apps are updating compatibility finally, also there are some xposed modules that essentially does what i did on here. so this is dead.
Buddyjohn said:
yes this thread is dead, lots of apps are updating compatibility finally, also there are some xposed modules that essentially does what i did on here. so this is dead.
Click to expand...
Click to collapse
can yuo point me to some threads that are still working cause I still not been able to get RW access to media_rw folder.
techmanc said:
can yuo point me to some threads that are still working cause I still not been able to get RW access to media_rw folder.
Click to expand...
Click to collapse
try these three xposed modules, i recommend enabling one at a time to see which works, reboot after enabling one.
http://forum.xda-developers.com/xposed/modules/app-handleexternalstorage-t2693521
http://forum.xda-developers.com/xposed/modules/kitkat-sd-card-access-t2790992
http://forum.xda-developers.com/xposed/modules/xposed-disablesignaturecheck-t2789267
also i just realized why it was failing on yours. make sure you have busybox installed to system/xbin
that will make the script work. or atleast should.
Buddyjohn said:
also i just realized why it was failing on yours. make sure you have busybox installed to system/xbin
that will make the script work. or atleast should.
Click to expand...
Click to collapse
Looked s Busybox says installed to /system/bin heres the screenshot do I click install to move or use smart install. Never did much with app just know it was needed for rooting.
techmanc said:
Looked s Busybox says installed to /system/bin heres the screenshot do I click install to move or use smart install. Never did much with app just know it was needed for rooting.
Click to expand...
Click to collapse
Install it to /xbin
Buddyjohn said:
Install it to /xbin
Click to expand...
Click to collapse
What the difference between installing to /xbin vs /system/bin might I ask?
techmanc said:
What the difference between installing to /xbin vs /system/bin might I ask?
Click to expand...
Click to collapse
Honestly I am not to sure, I just assumed xbin was the right one as a lot of older mods and roms required busybox on xbin. so i tried it and it worked.

Categories

Resources