[Q] How To Deodex Photon? - Motorola Photon 4G

I was following a thread at DroidXForums on how to do it and when I get the "cp /sdcard/done_app/* /system/app/" command, it says that there is no file or directory there. The instructions from the DroidXForums is below and when I have the ability to post links I will post a link to the thread.
Could I get some help?
Unzip xUltimate v2.2, and launch "Main.exe"
If everything goes well xUlt should recognize the phone and make a connection. You now should see a list of options.
Run option 1. After option 1 is done, run option 2.
Now these well take a while. Run option 3.
IMPORTANT: After you have run option 3, you MUST navigate to the xUltimate folder and find "origi_frame" folder, and delete "guava.odex". It's a bad file, and interferes with deodexing process.
Now run option 4, and wait.
Exit xUltimate, and put the phone in USB mass storage.
Go back into the xUltimate folder and copy "done_frame", and "done_app", and move them to the root of the sdcard.
Open a command prompt, and do the following:
Code:
adb shell
su (note: super user will be promp on your phone)
stop
mount -o rw,remount -t emmc /dev/block/mmcblk0p12 /system
cp /sdcard-ext/done_app/* /system/app/
cp /sdcard-ext/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t emmc /dev/block/mmcblk0p12 /system
reboot

I belive
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
are wrong to use on the Photon should be
adb shell
su (note: super user will be promp on your phone)
stop
mount -o rw,remount -t emmc /dev/block/mmcblk0p12 /system
cp /sdcard-ext/done_app/* /system/app/
cp /sdcard-ext/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t emmc /dev/block/mmcblk0p12 /system
reboot

I shall try that. I will edit this later tonight and let you know how it goes!
Edit: Still no luck even when following your code.

well a simple way to deodex rom is use one thats already out Jokers think he has a pretty much stock rom with just a few minor tweaks.
if not there is always Yay's deodexd update zip
http://forum.xda-developers.com/showpost.php?p=16328237&postcount=1 scroll down its the
Stock Deodexed and Zipaligned ROM UPDATED WORKING DATA link
---------- Post added at 08:42 PM ---------- Previous post was at 08:39 PM ----------
i checked that link and first line says must be ROOTED are you?
ZeroManArmy said:
I was following a thread at DroidXForums on how to do it and when I get the "cp /sdcard/done_app/* /system/app/" command, it says that there is no file or directory there. The instructions from the DroidXForums is below and when I have the ability to post links I will post a link to the thread.
Could I get some help?
Unzip xUltimate v2.2, and launch "Main.exe"
If everything goes well xUlt should recognize the phone and make a connection. You now should see a list of options.
Run option 1. After option 1 is done, run option 2.
Now these well take a while. Run option 3.
IMPORTANT: After you have run option 3, you MUST navigate to the xUltimate folder and find "origi_frame" folder, and delete "guava.odex". It's a bad file, and interferes with deodexing process.
Now run option 4, and wait.
Exit xUltimate, and put the phone in USB mass storage.
Go back into the xUltimate folder and copy "done_frame", and "done_app", and move them to the root of the sdcard.
Open a command prompt, and do the following:
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
Click to expand...
Click to collapse

Rangerbry said:
i checked that link and first line says must be ROOTED are you?
Click to expand...
Click to collapse
I am rooted and the way I fixed it was to put the phone in Charge Only Mode, and it worked. I am unable to see in the log file created by Test.exe if I am fully deodex'd.
Code:
(21:42:24.89 Wed 11/23/2011)
****
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\android\platform-tools
****
C:\Windows\system32\java.exe
****
Main ADB
Android Debug Bridge version 1.0.26
****
PATH ADB
Android Debug Bridge version 1.0.29
****
[ro.build.id]: [4.5.1A-1_SUN-198_7]
[ro.build.display.id]: [4.5.1A-1_SUN-198_7]
[ro.build.version.incremental]: [CM]
[ro.build.version.sdk]: [10]
[ro.build.version.codename]: [REL]
[ro.build.version.release]: [2.3.4]
[ro.build.date]: [Mon Oct 3 13:59:39 EDT 2011]
[ro.build.date.utc]: [1317664779]
[ro.build.type]: [user]
[ro.build.user]: [eaz002]
[ro.build.host]: [fl36bld22]
[ro.build.tags]: [release-keys]
[ro.build.product]: [moto_sunfire]
[ro.build.description]: [sunfire-user 2.3.4 4.5.1A-1_SUN-198_7 CM release-keys]
[ro.build.fingerprint]: [sprint/moto_sunfire/sunfire:2.3.4/4.5.1A-1_SUN-198_7/CM:user/release-keys]
[ro.build.version.full]: [Blur_Version.45.3.7.MB855.Sprint.en.US]
****
adb server is out of date. killing...
* daemon started successfully *
TA28700TGP

So was I Deodexed?

Related

how to replace framewrok-res.apk?

how to replace? by using metamorph? i did with root explorer and ended up with bricked x10 mini.
It's probably best to do it via ADB.
yes adb / shell is my favourite method
I use Root expl. only to rw mount /system partition.
How to do via adb?
Sent from my E10i using XDA App
from: http://forum.xda-developers.com/showthread.php?t=759320
0. Root !
1. adb push framework-res.apk /sdcard/fr-black.apk
2. adb shell
3. su
4. mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
5. mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
6. cat /sdcard/fr-black.apk > /system/framework/framework-res.apk
7. chmod 755 /system/framework/framework-res.apk
8. sync
9. reboot
why cat and not mv/cp ? Because the file is created with "root" user and group and not "sdcard" group.
Means the framework file is first placed on sd card which i want to replace? Asking noob questions cause dnt want to install whole software again
Sent from my E10i using XDA App
abhi98228 said:
Means the framework file is first placed on sd card which i want to replace? Asking noob questions cause dnt want to install whole software again
Click to expand...
Click to collapse
Here, I'll try to explain what happens
1. adb push framework-res.apk /sdcard/fr-black.apk
-copies "frarework-res.apk" from ADB's folder and moves it to the phone's SD card, names it "fr-black.apk"
2. adb shell
-opens the linux shell on the phone
3. su
-goes into superuser mode, i.e. runs apps as admin if you're familiar with windows terms
4. mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
-remounts the /system folder on the phone so that it is read-write, allowing you to mess with the system files
5. mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
-backs up the default framework-res.apk from the phone by moving it to the SD card
6. cat /sdcard/fr-black.apk > /system/framework/framework-res.apk
-copies the fr-black.apk from the SD card and puts it in the old framework-res' place
7. chmod 755 /system/framework/framework-res.apk
-changes the user permissions for the new file
Eseb0 said:
Here, I'll try to explain what happens
1. adb push framework-res.apk /sdcard/fr-black.apk
-copies "frarework-res.apk" from ADB's folder and moves it to the phone's SD card, names it "fr-black.apk"
2. adb shell
-opens the linux shell on the phone
3. su
-goes into superuser mode, i.e. runs apps as admin if you're familiar with windows terms
4. mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
-remounts the /system folder on the phone so that it is read-write, allowing you to mess with the system files
5. mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
-backs up the default framework-res.apk from the phone by moving it to the SD card
6. cat /sdcard/fr-black.apk > /system/framework/framework-res.apk
-copies the fr-black.apk from the SD card and puts it in the old framework-res' place
7. chmod 755 /system/framework/framework-res.apk
-changes the user permissions for the new file
Click to expand...
Click to collapse
hehe ty bro
Hi
I need some help pls, when i wanna replace the framework-res.apk i get this:
C:\exploid_x10mini>adb push framework-res.apk /sdcard/fr-black.apk
* daemon not running. starting it now *
* daemon started successfully *
1523 KB/s (7108054 bytes in 4.557s)
C:\exploid_x10mini>adb shell
$ su
su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
# mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
failed on '/system/framework/framework-res.apk' - Cross-device link
Please help
try
mount -o rw,remount /dev/block/mtdblock0 /system
and check first-after with mount bash command the mountpoint
oversim said:
try
mount -o rw,remount /dev/block/mtdblock0 /system
and check first-after with mount bash command the mountpoint
Click to expand...
Click to collapse
I still get the same:
C:\exploid_x10mini>adb shell
$ su
su
# mount -o rw,remount /dev/block/mtdblock0 /system
mount -o rw,remount /dev/block/mtdblock0 /system
# mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
failed on '/system/framework/framework-res.apk' - Cross-device link
#
Can you explain .. " and check first-after with mount bash command the mountpoint" .. please
Skip mv step instade backup by root expkorer.
Sent from my E10i using XDA App
Thank you my mini is now black
kimb0 said:
Hi
I need some help pls, when i wanna replace the framework-res.apk i get this:
C:\exploid_x10mini>adb push framework-res.apk /sdcard/fr-black.apk
* daemon not running. starting it now *
* daemon started successfully *
1523 KB/s (7108054 bytes in 4.557s)
C:\exploid_x10mini>adb shell
$ su
su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
# mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
mv /system/framework/framework-res.apk /sdcard/framework-resORIG.apk
failed on '/system/framework/framework-res.apk' - Cross-device link
Please help
Click to expand...
Click to collapse
you can use cat /system/framework/framework-res.apk > /sdcard/framework-resORIG.a
as a work around
It help me

Farsi/arabic support (connecting the arabic letters together)

Froyo can show arabic letters but they are not connected ,any APK to support Arabic letters and connect the letters together ?
thanx in advance
I second this...
Patch your system with Streakdroid 1.7
Copy framework.jar from system\framework
patch it using arabic scripter from ce4arab Add the new framework.jar on Streakdroid 1.7 zip file then do master reset and patch it again
copy libwebcore.so to lib ( you will get it from the same page)
you will get connected letters
Jattal, Have you got a link to the arabic scripter?
how do u patch?
jattal said:
Patch your system with Streakdroid 1.7
Copy framework.jar from system\framework
patch it using arabic scripter from ce4arab Add the new framework.jar on Streakdroid 1.7 zip file then do master reset and patch it again
copy libwebcore.so to lib ( you will get it from the same page)
you will get connected letters
Click to expand...
Click to collapse
a step by step guide will be helpful
thanks.
here you go
http://arstreak.com/2011/03/20/dell-streak-froyo-2-2-2-build-345-with-arabic-how-to-for-all/
http://arstreak.com/
I would just like to add that most people are getting "cp not found error"
use the following commands after rooting and installing busybox
NOTE: what you download from the market is busybox installer... you will have to run it and then install busybox
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
busybox rm /system/app/*.odex
busybox rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
sync
reboot
Hope this helps.
amcolian said:
I would just like to add that most people are getting "cp not found error"
use the following commands after rooting and installing busybox
NOTE: what you download from the market is busybox installer... you will have to run it and then install busybox
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
busybox rm /system/app/*.odex
busybox rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
sync
reboot
Hope this helps.
Click to expand...
Click to collapse
Can this be done via root explorer thanks.
Unfortunately it cannot because your device will shutdown on changing the files and it won't be able to boot. The reason why the above commands work is that they freeze your phone in current state while the files are copied and deleted.
However as some adb commands do not run on android 2.2, you need busybox.
Sorry for the late reply, but I wasn't available for a while.
amcolian said:
I would just like to add that most people are getting "cp not found error"
use the following commands after rooting and installing busybox
NOTE: what you download from the market is busybox installer... you will have to run it and then install busybox
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
busybox rm /system/app/*.odex
busybox rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
sync
reboot
Hope this helps.
Click to expand...
Click to collapse
Hello
thanks for the reply, i would like to ask you if this method could work for all android devices OR only Dell Streak?
as i have Xperia X10 and i just installed Miui ROM and the letters are not connected... what should i do?
thanks in advanced
LOOK HERE
maan1976 said:
Froyo can show arabic letters but they are not connected ,any APK to support Arabic letters and connect the letters together ?
thanx in advance
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=834683
does work for non rooted devices
jattal said:
Patch your system with Streakdroid 1.7
Copy framework.jar from system\framework
patch it using arabic scripter from ce4arab Add the new framework.jar on Streakdroid 1.7 zip file then do master reset and patch it again
copy libwebcore.so to lib ( you will get it from the same page)
you will get connected letters
Click to expand...
Click to collapse
hello man
does this method work for non rooted device
my device is still new
is there any other way for non rooted?
and please tell me what is the easiest way to root the device
thaaaaaank u sooooo much
regards

[Q] Deodex/adb help!

Ok I am on a rooted 345 us White dell streak.
I am trying to deodex. I have used the deo 1.2.1 deodexer in the xda forum thread for auto deodex 2.3.
I pulled all my apks and their odex files from the /system/app/ folder
and the jars and odex files from the /system/framework folder
I am trying to use adb to copy them from my sdcard to the correct folders, but when i reboot my phone hangs at the dell logo.
Hopefully someone can see what I am doing wrong.
I enter:
adb shell
su (then I allow permission on my phone)
mount -o rw,remount -t yaffs2 /dev/block/mtdblock6 /system
cp /sdcard/doneapk/* /system/app/
cp /sdcard/doneframework/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t yaffs2 /dev/block/mtdblock6 /system
reboot
what am i missing?
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
sync
reboot
also u can find them here as i done this to intgrade arabic to streak its in done_app & done_fram
my rom 345
http://hotfile.com/dl/110981641/4de9442/arabic_streak_345_15380_00.7z.html
bump..
can you guys post a quick guide with steps on how to do this? How hard is it to go back and edit files later like services.odex? if it doesn't exist anymore?
I have no idea what bump means......forum noob obviously.
But if you search auto deodex 2.3 in xda forums it is under droidx forums.
So I changed the mount command to yaffs2 /dev/bkock/mtdblock6 where theirs is different because from what I understand, that is the streaks mount command for mounting.
But I will try the other path and see if it works. I will keep you updated when I try it later.
freepal08 said:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
sync
reboot
also u can find them here as i done this to intgrade arabic to streak its in done_app & done_fram
my rom 345
http://hotfile.com/dl/110981641/4de9442/arabic_streak_345_15380_00.7z.html
Click to expand...
Click to collapse
so I tried your command path and no luck. still stuck on the dell logo.
Thank GOD for nandroid backup.
how exactly did you deodex your files? maybe thats what i am missing. Maybe the deodexed files i put in have an issue.
i used xUltimate-v2.2.2
and if u are 345 rom
u can use my files
also its take up to 10 min to load the phone
Krad said:
bump..
can you guys post a quick guide with steps on how to do this? How hard is it to go back and edit files later like services.odex? if it doesn't exist anymore?
Click to expand...
Click to collapse
Whenever you edit services.odex you first doedex it...then you modify it...then you carefully and painfully re-odex it...with a deodexed file system you get rid of the first and last steps...
so it would be services.dex, you copy it to your pc, edit it, and send it back...quicker and easier modding
freepal08 said:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
sync
reboot
also u can find them here as i done this to intgrade arabic to streak its in done_app & done_fram
my rom 345
http://hotfile.com/dl/110981641/4de9442/arabic_streak_345_15380_00.7z.html
Click to expand...
Click to collapse
ok I am trying your files. I see you put sync as your last command after you remount. that differs than the droidx forum How to manually deodex thread.
what does sync do?
I got farther with your files than i have before. So maybe I might have some luck after all, but still stuck on a frozen boot animation
I have no idea what I did differently but I am now deodexed using the file provided above.
My phone is now a rooted and deodexed 345 build. Nice!

WORK AROUND - Scripting help for Android and my DX2!

All right... I guess it's time to "ask the experts". My linux background has not been very much help here... ARGH!
Okay, I have two script that I have written that are supposed to mount /system as RO and RW respectively. Very simple:
To mount rw:
Code:
#!/system/bin/sh
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
To mount ro:
Code:
#!/system/bin/sh
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
I manually ran the mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system command and adb pushed them to /system/xbin as mountro and mountrw and chmod both to 755.
In ADB I try to execute:
Code:
/system/xbin/mountrw
and get an error stating:
Code:
/system/xbin/mountrw: not found
I even try:
Code:
/system/bin/sh /system/xbin/mountrw
and I get this error:
Code:
mount: No such file or directory
Okay, so I figured out that it is having a problem trying to find the mount command, so I modify the script to:
Code:
#!/system/bin/sh
/system/bin/mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
I then re-run this:
Code:
/system/bin/sh /system/xbin/mountrw
and I'm still getting this friggin' error message!
Code:
mount: No such file or directory
When I run it through Script Manager I get the same error:
Code:
mount: No such file or directory
This should just friggin' work damn it! (Sorry, very frustrated.)
Also, it would be nice NOT to have to type the path to the script. I can run ZepplinRox V6_SuperCharger script from the ADB command line just by typing from the directory I have it in:
Code:
sh V6_SuperCharger_for_Android-update9_RC3.2.sh
No absolute path, no ./ path... WTF? ARGH!
Okay, I KNOW this is friggin' possible just by the fact that I can run Zep's script in ADB...
So, any takers? Thanks in advanced...
Friggin' Ciao.
[EDIT]
Okay, I figured out a work around for this... I probably should not work on this after working at work all day... But, that is another story...
I have heavily modified the script files I have created. They are still called mountrw and mountro and the contents are as follows:
mountrw:
Code:
#!/system/bin/sh
# This mounts the /system file system as Read Write in order to modify or add
# files to the /system file system.
busybox mount -o remount,rw / 2>/dev/null
busybox mount -o remount,rw rootfs 2>/dev/null
busybox mount -o remount,rw /system 2>/dev/null
mountro:
Code:
#!/system/bin/sh
# This mounts the /system file system as Read Only which is the default when
# Android is booted.
busybox mount -o remount,ro / 2>/dev/null
busybox mount -o remount,ro rootfs 2>/dev/null
busybox mount -o remount,ro /system 2>/dev/null
So, after poking around in ZepplinRox's V6_SuperCharger script, I found those values repeated several times, so that helped point me in the right direction. The next problem I had was getting the scripts to "run from anywhere". I still haven't figured that one out yet, and the VERY MESSY solution to that is to put the two scripts in /. I know, I know, I know... that is the most dangerous place to put it.
So, when I first log into the ADB shell all I have to type is
Code:
sh mountrw
and when I'm done, type
Code:
sh mountro
So, As the work around, this works. I really don't recommend anyone else doing this because of the data security risks that you open your phone up to... Yes, I'm aware of them and that is why I am asking now for some help in having the ability to run a script globally, from anywhere in the android file structure. I don't mind typing the "sh" in front of the script since I sometimes must do that in linux. I have noticed that the $PATH of Android doesn't allow scripts to be executed unless you type the absolute path to the script, or are in the same directory as the script.
Okay, so again to ask: Is there any way to execute a script without having to type the absolute path to it? Thanks!
Ciao! (MUCH calmer now then when I first wrote this post...)
[/EDIT]
I don't use adb much at all.
Usually I move stuff around with root explorer and use terminal emulator a lot.
I assume you ran everything as superuser as I sometimes forget to type su first
Maybe the sh command work on the supercharger script because it has the .sh extention.
You can try typing "bash mountrw" since that works when I install the script to /system/xbin/V6
But after reading your post I looked and saw I forgot about permissions so I did chmod 755 and now this works...
su
V6
heh..
I don't have tp type "bash V6" anymore
zeppelinrox said:
I don't use adb much at all.
Usually I move stuff around with root explorer and use terminal emulator a lot.
I assume you ran everything as superuser as I sometimes forget to type su first
Maybe the sh command work on the supercharger script because it has the .sh extention.
You can try typing "bash mountrw" since that works when I install the script to /system/xbin/V6
But after reading your post I looked and saw I forgot about permissions so I did chmod 755 and now this works...
su
V6
heh..
I don't have tp type "bash V6" anymore
Click to expand...
Click to collapse
Yes, I ran everything as su. (I'm a linux admin guy, so su and sudo is next to natural for me...)
Okay, so you put the mountrw script in /system/xbin/V6/ ??
Also, it is an sh script. I identify that in the first line of
Code:
#!/system/bin/sh
I have changed it to bash and same problem. Oh well. I think I can live with the scripts at /
Thanks though!
Ciao!

[Q] Simple File Copy Script

Hello everyone, I'm trying to figure out how to write a script to copy three .mp3 files from three different locations all to /system/media/audio/ringtones. So far, I'm in a bit over my head and I was wondering if anyone here could help me please?
Thanks in advance!
Mac of York said:
Hello everyone, I'm trying to figure out how to write a script to copy three .mp3 files from three different locations all to /system/media/audio/ringtones. So far, I'm in a bit over my head and I was wondering if anyone here could help me please?
Thanks in advance!
Click to expand...
Click to collapse
Well bud, honestly, it's not even worth all the writing it would take to compile a script for such an easy task via and file explorer that supports root functions. Simply copy n paste all into one folder, mount your /system -r/w and then the good ol multi-select button, copy to clipboard, browse up to /system/media/ringtones or /system/audio (whichever your phone model stores your system sounds/ui crap in), then after pasted to destination folder simply remount -r/o, reboot phone, voila!
jtmarich1985 said:
Well bud, honestly, it's not even worth all the writing it would take to compile a script for such an easy task via and file explorer that supports root functions. Simply copy n paste all into one folder, mount your /system -r/w and then the good ol multi-select button, copy to clipboard, browse up to /system/media/ringtones or /system/audio (whichever your phone model stores your system sounds/ui crap in), then after pasted to destination folder simply remount -r/o, reboot phone, voila!
Click to expand...
Click to collapse
Haha, thanks -- that's what I usually do but if it's too complicated it's not worth it.
Open a new text file, and write this:
Code:
#!/system/bin/sh
mount -o rw,remount /system
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
mount -o ro,remount /system
Save it (the extension doesn't matter) and that's it. You can run it using script manager, or the terminal emulator (in this case you need to get root permissions first, using the su command).
Also you can add some messages (to get a nicer script, you know ), this way:
Code:
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Copying files..."
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
echo "All done. Have a nice day =)"
Please be careful while using scripts, otherwise you'll brick some devices :silly:
RoberGalarga said:
Open a new text file, and write this:
Code:
#!/system/bin/sh
mount -o rw,remount /system
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
mount -o ro,remount /system
Save it (the extension doesn't matter) and that's it. You can run it using script manager, or the terminal emulator (in this case you need to get root permissions first, using the su command).
Also you can add some messages (to get a nicer script, you know ), this way:
Code:
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Copying files..."
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
echo "All done. Have a nice day =)"
Please be careful while using scripts, otherwise you'll brick some devices :silly:
Click to expand...
Click to collapse
Awesome, thanks. I'd give you a thanks but I'm all thanked out today.
RoberGalarga said:
Open a new text file, and write this:
Code:
#!/system/bin/sh
mount -o rw,remount /system
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
mount -o ro,remount /system
Save it (the extension doesn't matter) and that's it. You can run it using script manager, or the terminal emulator (in this case you need to get root permissions first, using the su command).
Also you can add some messages (to get a nicer script, you know ), this way:
Code:
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Copying files..."
cp location1/file.mp3 /system/media/audio/ringtones/file.mp3
cp location2/file2.mp3 /system/media/audio/ringtones/file2.mp3
cp location3/file3.mp3 /system/media/audio/ringtones/file3.mp3
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
echo "All done. Have a nice day =)"
Please be careful while using scripts, otherwise you'll brick some devices :silly:
Click to expand...
Click to collapse
This is exactly what I wanted and it works beautifully! Thank you so much!
If I put script like thisone (classic copy-paste) in /system/etc/init.d, is it possible to configure that runing on ewery boot? And how?
Thanks.
Haven't tried this yet for fear of bricking, can someone help to see it this will work? I'm just trying to have a script to be placed on the homescreen so I can easily disable/enable the mediascanner/screenshot function. By the way, cp copies files, and cp -r actually moves (cut-paste) files, right?
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Movingfiles..."
cp -r /system/prv-app/MediaProvider.apk /system/prv-app/newfolder/MediaProvider.apk
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
#!/system/bin/sh
echo "Mounting /system as RW..."
mount -o rw,remount /system
echo "Moving files..."
cp -r /system/prv-app/newfolder/MediaProvider.apk /system/prv-app/MediaProvider.apk
echo "Done. Mounting /system as RO again..."
mount -o ro,remount /system
Is it possible to do the same but with a folder+ content and not just a file?
Best thought to testing scripts, would be to add an android emulator to your computer. The one I use is nox. Its great for testing scripts and a variety of other things as well. Nox is an android based application, made jjust like a phone. All the features and extensions that your normal everyday android has, this emulator has as well.

Categories

Resources