• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Still trying to free up /system space my way

dsmryder

Android Expert
I made a script to try to link the file (will be files) that the build moves to the /hidden partition. I can do everything manually, but I'm not sure what I'm doing wrong here. And I don't even know if the init.triumph.rc is running the file.
Here is the quick list of the commands ran.
Code:
[EMAIL="root@android:/system/app"]root@android:/system/app[/EMAIL] # mount -o remount,rw /system
[EMAIL="root@android:/system/app"]root@android:/system/app[/EMAIL] # cd /sdcard                                          
[EMAIL="root@android:/sdcard"]root@android:/sdcard[/EMAIL] # sh apklink.sh                                           
link failed File exists
And here is the script that I am running
Code:
cd /system
for i in /hidden/*.apk
do
ln -s "$i" "${i##*/}"
done
 
I made a script to try to link the file (will be files) that the build moves to the /hidden partition. I can do everything manually, but I'm not sure what I'm doing wrong here. And I don't even know if the init.triumph.rc is running the file.
Here is the quick list of the commands ran.
Code:
root@android:/system/app # mount -o remount,rw /system
root@android:/system/app # cd /sdcard                                          
root@android:/sdcard # sh apklink.sh                                           
link failed File exists
And here is the script that I am running
Code:
cd /system
for i in /hidden/*.apk
do
ln -s "$i" "${i##*/}"
done

Try replacing your "ln" with "echo" to see exactly what $i and stuff ends up being.
 
Not sure much about Android, but this appears to be running in sh not bash? Do you need a #!/bin/bash at the top of that script or to run it with bash apklink.sh?

Maybe sh is OK, but I never use it if I can help it.
 
Not sure much about Android, but this appears to be running in sh not bash? Do you need a #!/bin/bash at the top of that script or to run it with bash apklink.sh?

Maybe sh is OK, but I never use it if I can help it.

Yeah, I rewrote it with #!/bin/sh at the begining and changed the script to what I found on the internet. I did get it to work on my workstation so I know the code is right for the desktop version of sh, but I don't know for sure if it works for the Android version.
 
How many times has it been run? Maybe the link has already been created.

You use ln -sf (f for force) it will recreate the links.
 
Back
Top Bottom