SYMLINKs - myTouch 3G, Magic Android Development

Does anybody know if it's possible to symlink a directory or link a directory that already exists?
By this I mean, in the update script, normally data/app_s is symlinked to system/app.
Is there a way for me to link to system/app? I have already tried to symlink it, so I may have already answered my question.

Related

Need help getting symlink to work in my update-script

Need help getting symlink to work in my update-script. I am trying to create my own ROM now, but when the update-script runs I always get this error:
E:Can't symlink /system/bin/df
Click to expand...
Click to collapse
I've used Fatal1ty's update-script as reference and I've copied his bin and xbin directories. Is there anything that I am missing?

writing update-script file

I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
diordnahero said:
I would like to copy additional files into the /data/app/ folder with an update.zip file. My script will successfully add to /system/app/ folder but not /data/app/. I've seen code to delete and then add a whole new /data/app/ folder but I would like to keep whatever is in there already, just add and remove specific files in it. This is what I've been using but it fails. Can this be done?
Code:
show_progress 0.200000 0
delete DATA:app/com.facebook.katana.apk
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
Click to expand...
Click to collapse
While not necessarily my forte, do you happen to be running apps2sd? My guess is that the partition on the SD card hasn't mounted yet, and thus, the file(s) can't be accessed to delete.
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
diordnahero said:
yes I am.
Though my update script works to write and delete to /system/.. folders just fine. The update-script files I have looked at delete the whole folder first and then create/copy the new one, then correct permissions. I can't find anything specific to delete/adding individual files though.
Click to expand...
Click to collapse
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
JsChiSurf said:
The system folder is not part of apps2sd, so that would make sense.
I'm still thinking this is your issue. I'm wondering if there is a way to mount via an update script?
Click to expand...
Click to collapse
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
zippy-man said:
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcard when in recovery to do a backup of google ****s.
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
JsChiSurf said:
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
yup, I've done that before. Very handy. that'll get the job done
I dont think mounting via an update script is possible but you could write a script to do it kinda like Cyanogen's backup script that mounts the sdcar
Click to expand...
Click to collapse
I saw this syntax referenced in another thread, that you can use in an update script:
run_program PACKAGE:script.sh
I'm assuming this is what Cyanogen is doing?
That's pretty cool. So, moral of the story, you can create a little shell script that runs during the update process that will mount the necessary partition, and move / add / delete files as necessary.
Actually makes it nicer, as you can write your entire update as a shell script rather than using the standard update script lingo, which may be less familiar...
Click to expand...
Click to collapse
Yep. You just create whatever script you want and add that to the update script and it will run it. I have used it for many things but have not used a script to mount the sd card.
If you get a hold of the script that cm wrote you could pull out the party that mounts the sd card and use that to write to data if it its located on the sd card.
-------------------------------------
Sent from my HTC Hero
Awsome! Great stuff.
I found this but have not tried it yet as there hasn't been need to update anything lately.

How do i add apk to custom rom?

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.

can i delete /system/xbin folder?

hi,
anyone who has galaxy nexus and haven't modified anything, can you please check and see if you have /system/xbin folder?
i installed some program called busybox by accident and i think it created /system/xbin folder.
so i uninstalled the app but the folder is still there..
so i'm wondering if it was there in the first place..
can i delete the whole folder?
right now i have 3 files in that folder : busybox, dexdump, su.

[Q] How to REPLACE i9100 stock dialer through ADB?

Hi! First of all i would like to apologize myself if there is a solution to this issue, but i look around and found nothing...
I want to completely replace JB stock dialer (galaxy i9100) to callrec one without reflashing, only through ADB with the phone on recovery mode.
I´ve read a lot of things about it but i got no success.
I was able to rename several files (apk and odex) under /system/app folder:
SecPhone.apk and SecPhone.odex
SecFactoryPhoneTest.apk (this one is a symlink to /preload/symlink/system/app/SecFactoryPhoneTest.apk)
Phonesky.apk (this one is a symlink to /preload/symlink/system/app/Phonesky.apk)
Phone_Util_U1_EUR_OPEN.apk and Phone_Util_U1_EUR_OPEN.odex
PhoneErrService.apk and PhoneErrService.odex
All these files were renamed to [filename].BAK, including the ones under /preload folder.
After this, i´ve copied callrec Phone.apk to /system/app and /preload folders and reboot the phone but i don´t know why this not work for me.
All these operations were done without recovery mode, i´ve remounted /system and /preload as rw to do this because on recovery mode i could not mount sdcard.... :crying:
Anyone could help me to solve this issue??
Many thanks,
Raphael.
raphaelmg said:
Hi! First of all i would like to apologize myself if there is a solution to this issue, but i look around and found nothing...
I want to completely replace JB stock dialer (galaxy i9100) to callrec one without reflashing, only through ADB with the phone on recovery mode.
I´ve read a lot of things about it but i got no success.
I was able to rename several files (apk and odex) under /system/app folder:
SecPhone.apk and SecPhone.odex
SecFactoryPhoneTest.apk (this one is a symlink to /preload/symlink/system/app/SecFactoryPhoneTest.apk)
Phonesky.apk (this one is a symlink to /preload/symlink/system/app/Phonesky.apk)
Phone_Util_U1_EUR_OPEN.apk and Phone_Util_U1_EUR_OPEN.odex
PhoneErrService.apk and PhoneErrService.odex
All these files were renamed to [filename].BAK, including the ones under /preload folder.
After this, i´ve copied callrec Phone.apk to /system/app and /preload folders and reboot the phone but i don´t know why this not work for me.
All these operations were done without recovery mode, i´ve remounted /system and /preload as rw to do this because on recovery mode i could not mount sdcard.... :crying:
Anyone could help me to solve this issue??
Many thanks,
Raphael.
Click to expand...
Click to collapse
Anyone can give me a path?
Plz help!!

Categories

Resources