Save offline music to external SD card with Google Music 4.0? - Android Q&A, Help & Troubleshooting

I downloaded the leaked google music app from ICS, and it works great.
My only caveat is that when I choose to make something available offline, it goes straight to my internal storage (Motorola Atrix).
I have a 32gb microSD card with a dedicated folder for music. Is there a way I can get the offline songs onto there?
I currently use PlayerPro from the market, and I wanted to use the Google cloud for "wirelessly syncing" my music.
Any ideas?

Nobody was able to figure it out?

Does any other music player sync with google?

Wouldn't it be possible to somehow mount a folder that is located on the sd-card and link it to /sdcard/Android/data/com.android.music/cache just like it is done with the apps2ext hacks on low memory devices?
Would the file system of the sd-card then have to be ext instead of fat32?
Maybe someone who has more practical knowledge of the matter could look into this. I can only theoretically assume how it might work

I did some further research and found this post.
It describes how to mount an external sdcard to to /sdcard instead of sdcard. But would this also work with a subfolder of /sdcard?

I fiddled around myself a bit.
So here is what I did:
format sdcard as ext2
manually mount sdcard since it won't automatically when ext:
Code:
mkdir /Removable/MicroSD
mount -r -w -t ext2 /dev/block/vold/179\:9 /Removable/MicroSD
mkdir /Removable/MicroSD/GoogleMusicData
Then move all data from /sdcard/Android/data/com.google.android.music/cache to /Removable/MicroSD/GoogleMusicData/cache
I did this with root explorer since I'm not too much of a terminal h4xx0r.
Delete the folder /sdcard/Android/data/com.google.android.music/
Link the new Folder on external MicroSD Card to the original location via this terminal command:
Code:
ln -s /Removable/MicroSD/GoogleMusicData /data/media/Android/data/com.google.android.music
Since /sdcard is already a link like the one we are setting up here, it is not possible to link to this linked location (/sdcard/Android/data/com.google.android.music).
Instead we have to link to the origninal destination of /sdcard which is /data/media.
Now the microSD card is accessible for root explorer. It shows read and write access.
But google music won't find it. It says that it doesn't have enough space to stream music so I figure that it somehow doesn't have access to the sd card.
What could be the issue here?
Also instead of 28GB free memory root explorer shows me only 364,44MB free memory. the command "df" in terminal however confirms 28GB of free memory.
Help please?
EDIT:
I thought that a reboot might do it. But it doesn't. Instead it gets rid of all the hacking I've done in terminal. So I guess I would have to place a script in /etc/init.d for the link to be set everytime I reboot, right?

Another Fix (no sdcard formatting needed)
This is a fix i figured out piecing together other peoples attempts.
Use this as a script
mount -o bind sdcard2/android/data/com.​google.android.music sdcard/android/data/com.​google.android.music
Alternately you can change the first location to the location of your choosing as long as it resides on the external as card.
Ex.
Mount -o bind sdcard2/music sdcard/Android/data/com.​google.Android.music
will bind:
sdcard/Android/data/com.​google.Android.music (google's forced save location)
to
sdcard2/music
Go to google music (play music now) settings and clear any music that is currently saved to your device.
this only applies to music made available offline. If you do not clear it before running the script the music will exist on your internal sdcard but not be accessible.
open script manager and find the script you made
Select it and make sure to click set on boot and superuser
Run Your script.
That is it now your default save location for google music is bound to the location on the external sdcard. the device will see the location as its default but really be saving to the external sdcard.
You can check this by going to google music. Selecting "make available offline" and look at the free space. It should shoe the space available on your external sdcard.
TLR Version (noob version)
I was getting a lot of questions about the preliminary steps here (i.e. rooting, writing script, etc) so i decided to attach the noob version in case anyone needs verification on how to accomplish these steps.
HOW DO I ROOT?
So, Rooting gives you full access and control over your phone. instructions for how to root are device specific. so i would start by searching XDA for "YOUR DEVICE one click root"
ex. samsung galaxy s2 one one click root
some devices are easier to root than others. i cannot provide steps for your particular device, but through XDA, and google you CAN find everything you need.
some devices have one click root tools, some do not, so the rooting process is more in depth for those devices.
rooting instructions are so device specific i could not find a generic set of instructions, and don't want to mislead anyone by linking them to a set of instructions not ​compatible with their device.
There is a risk of bricking your device (making it inoperable) while rooting, although the risk is minimal... almost non existent if you carefully follow instructions. I have rooted 5 seperate devices without bricking any, and, in most cases even if bricked the device can still be restored.
there are additional benefits to rooting, such as overclocking
for example my Galaxy S2 normally runs at 1.5 GHZ, i have increased the speed to 1.8GHZ
(NOTE** Without XDA DEVELOPERS i would have rooted 0 devices, and probably bricked at least one, so thank you to all of you out there who have helped me, I hope this method will help some of you in return.)
NOW THAT YOU ARE ROOTED...
INSTALL SCRIPT MANAGER..
First, to install script manager just go to google market (Play Store) and search for script manager
INSTALL ES FILE EXPLORER..
To make a script go to google market (Play Store) and find ES File Explorer
WRITE SCRIPT..
Open es file explorer when install completes.
in es file explorer click the menu button, and select "new"
when prompted select "File"
name your file something you'll remember
Ex.MusicScript
Click your new file
when prompted select "Text"
type this EXACTLY how you see it
Mount -o bind sdcard2/music sdcard/Android/data/com.​​google.Android.music
press back and when prompted to save click yes
MAKE DESTINATION FOLDER..
now on es file explorer click "Favorites" (the star)
a new menu will pop up, at the top you willsee a picture of a phone with "/" underneath it click the phone
this will take you to the root directory
click the folder Sdcard2
click the menu button, and select "new"
when prompted select "Folder"
Name the folder music
Your script and destination music location are created
EXECUTE SCRIPT..
now open script manager
find your script which should be located in the directory /mnt/sdcard and the file name you chose earlier
select the script
open as script/executable
make sure script is selected not executable
click the buttons for "Su" and "Boot"
click save
Go to google music (play music now) settings and clear any music that is currently saved to your device.
this only applies to music made available offline. If you do not clear it before running the script the music will exist on your internal Sdcard but not be accessible.
now reboot the script will run at boot a prompt will appear asking for superuser rights, click yes and remember this selection (it may say something different than remember this selection whichever option resembles remember needs to be selected.)
YOU'RE DONE!!!
your music should now save to sdcard2/music but the device will still think it is saving to the default sdcard/Android/data/​com.​google.Android.music
You can check this by going to google music. Selecting "make available offline" and look at the free space. It should shoe the space available on your external sdcard.
So try your hardest to figure out how to root using google, and if your not confident enough to attempt it this fix may not be for you.
if you have tried everything you can and are still stuck message me back, including what device you have, and i will see if i can find a link to the rooting instructions for your particular device.
I assume no responsibility if you damage your device... These steps do work, and if followed will fix your music issues as well as introducing you to a world of additional benefits of being a rooted user.

Hey FuzzyMeep Two! Thanks for the great tutorial.
It worked, with some minor adaptions:
1.) The script should read "mount -o ...". Note that there's no space between '-' and 'o'. You got that right in the first script though
2.) On GalaxyS2 with JellyBean/4.1.1 the correct paths are storage/sdcard1 (external) and storage/sdcard0 (internal).
regards,
Patrick

Thank you

Related

[Q] Where is Google Play download cache located?

Hello.
I'm facing the infamous problem of "not enough space" when downloading from the market, while I actually have plenty of space. The ultimate solution seems to be moving download cache to the SD card (symbolic link). The problem is that the download cache with ICS and Google Play isn't located in /cache/download anymore, and I have been unable to find where it is located both searching with Google and browsing the filesystem.
Any help?
Look in the market for opda system tuner lite, it'll clean it right up
Go to /data/app/ and delete the Titanium Backup ODEX. If this doesn't work, read the PM I'm about to send you (moda will complain it's illegal (it isn't for this purpose though)).
Sent from my GT-I9100 using XDA
Hello. Thank you both for replying, but you both answered a different question than the question I asked. I have already tried to clean market cache, to no success, and I believe very strongly that the solution is moving download cache to the SD card. I found lots of people with Google having my very same problem and fixing it this way. The problem is that I am now using MIUI ICS with Google Play, and the download cache location is different. Does anyone know where the download cache is located with ICS / Google Play Store?
Just to be 100% sure I also tried okmijnlp solution, and as I was expecting it didn't fix the problem.
Ok, solved the problem myself. The folder I had to link to SD card is /data/data/com.android.providers.downloads/cache. This worked on a MIUI v4 ROM (after rebooting).
Black Antitoon said:
Ok, solved the problem myself. The folder I had to link to SD card is /data/data/com.android.providers.downloads/cache. This worked on a MIUI v4 ROM (after rebooting).
Click to expand...
Click to collapse
Could you please advice how you have changed this, as i am new Android user hence not much aware how do go about it.
Hello.
I have bad news for you: after writing my last post here I realised that the problem wasn't actually solved (it only worked fine for a few hours), so linking that folder to the SD card is not a solution to the problem I was experiencing. However you are likely to need to link some folder to another one on your phone at some time, so I am explaining you these steps anyway.
First, you need to be on a rooted ROM. If you aren't, then have a look on the forum about your device here on xda and good luck for the rooting process.
Afterwards, you need the "Terminal emulator" application. If you don't have it, please download it from the market. Then run it and enter the following command:
Code:
su
This will give root rights to the terminal emulator app.
Now you can run the following commands.This will create the new folder on your SD card:
Code:
mkdir /sdcard/downloads
This should move all the contents of the "cache" directory into the new directory which you have just created:
Code:
mv /data/data/com.android.providers.downloads/cache/* /sdcard/downloads/
This should delete the now empty cache folder:
Code:
rm /data/data/com.android.providers.downloads/cache
This will finally created a symbolic link which has the same name of the old cache folder but points to the new folder on your SD card:
Code:
ln -fs /sdcard/download /data/data/com.android.providers.downloads/cache
I am not a Linux expert and I haven't tested these commands on my phone right now, so I'm not 100% sure that I haven't done any mistakes.
thanks for your reply
the solution didnt work for me as i dont have same .com folder. i tried searching on google and below steps helped in resolving the cache issue
1. You gonna need Android Terminal Simulator or equivalent terminal app. This will also require your Android rooted.
2. Type ’su’ (root permission request will be showned, you need to approve it).
3. Type ‘cd /’
4. Type ‘umount /cache’
5. Type ‘mount -o rw,remount -t rootfs rootfs /’ (to set the folder access to rw – read write)
6. Type ‘rmdir /cache’ (delete cache folder)
7. I personally using root explorer to do point 5-6
8. Type ‘mkdir /sdcard/cache’
9. Type ‘ln -s /sdcard/cache /cache (to link cache folder to /sdcard/cache – which should have bigger partition size)
Now i am able to download 30MB application on my phone from market.
Black Antitoon said:
Ok, solved the problem myself. The folder I had to link to SD card is /data/data/com.android.providers.downloads/cache. This worked on a MIUI v4 ROM (after rebooting).
Click to expand...
Click to collapse
Yes, it works for me using the root explorer under CM10.0. Thanks.
Hi!
I'm having the same trouble with not enough space, and when i run these command, it says operation not permitted. What to do? :/ It says thatsome sd card doesn't allow links?
Have you typed "su"? What happened then?
In any case, let me repeat that the procedure above eventually did NOT solve the download cache problem, if this is what you are looking for. The only solution for me was switching to a different ROM.
It's not need to use the console (Terminal Emulator). Just do the following:
1. Install Root Browser Lite (grand rood permissions if neccessary)
2. Delete the /data/data/com.android.providers.downloads/cache folder
3. Create the /sdcard/cache folder
4. Go to sdcard, select the new created cache folder by long press and choose 'Create shortcut' from list, you will see 2 buttons, 'Create' and 'Cancel'
5. Go to /data/data/com.android.providers.downloads/ and tap 'Create' button below
6. Enjoy!
You can use any other root file manager, of course.
The download cache was also at /data/data/com.android.providers.downloads/cache/ on the 4.2.1 jellybean ROM I'm running right now as well.
Thanks for posting the info!
wilderwind said:
It's not need to use the console (Terminal Emulator). Just do the following:
1. Install Root Browser Lite (grand rood permissions if neccessary)
2. Delete the /data/data/com.android.providers.downloads/cache folder
3. Create the /sdcard/cache folder
4. Go to sdcard, select the new created cache folder by long press and choose 'Create shortcut' from list, you will see 2 buttons, 'Create' and 'Cancel'
5. Go to /data/data/com.android.providers.downloads/ and tap 'Create' button below
6. Enjoy!
You can use any other root file manager, of course.
Click to expand...
Click to collapse
Thank you for your extremely clear explanation!
Nevertheless, despite having resolved the problem of lack of space for downloading apps from the store, with the help of your expertise, now everytime i reboot the device it shows me the message "android.process.media has stopped..."
I know it is related with the shortcut for the cache downloads.
Do you know how can I fix it?
Thank you.
TX a lot
Black Antitoon said:
Ok, solved the problem myself. The folder I had to link to SD card is /data/data/com.android.providers.downloads/cache. This worked on a MIUI v4 ROM (after rebooting).
Click to expand...
Click to collapse
+1000

Questions about VRUEMJ7 Tether Unlock

Two questions about the following thread (can't post in dev threads until 10 posts are made)
http://forum.xda-developers.com/showpost.php?p=47140596&postcount=1
Does anyone still have the files? The dropbox link doesn't contain any files
Is an external microsd card necessary?
The instructions are
Code:
su
cd /mnt/extSdCard/MJ7_tether_unlock/
sh tether.sh
Wouldn't it be fine to copy the MJ7_tether_unlock folder to root and use the following . . . ?
Code:
su
sh /sdcard/MJ7_tether_unlock/tether.sh
I fixed the link. Should download now. And no you cant use that command the reasoning has to do with how I wrote the script. If you dont have a micro sdcard you could also just make a new folder named "extSdCard" in the /mnt directory and then move the unzipped tether folder there.
Sent from my SCH-I545 using XDA Premium 4 mobile app
Surge1223 said:
I fixed the link. Should download now. And no you cant use that command the reasoning has to do with how I wrote the script. If you dont have a micro sdcard you could also just make a new folder named "extSdCard" in the /mnt directory and then move the unzipped tether folder there.
Click to expand...
Click to collapse
I couldn't get r/w in /mnt
I know there's probably a smarter way to do it, and I never tried the chmod you recommended on /system . . . but I re-wrote your tether and untether sh files to use /sdcard/tether instead of /extSdCard/MJ7_Tether_Unlock
I'm not sure how to remove the "crapware" bundled into the VZW S4, but every time I connect it via usb (to my Mint 15 laptop or W7 machine) it asks me to install some Verizon helper junk. It also mounts as a CD-ROM (due to some .ini file)
Does anyone know where this "storage" area is and if it's safe to blow all that crapware away? My S4 gets mounted as CD-ROM everytime whether or not I have USB debugging enabled. In W7 if I cancel it's "Would you like to install this Verizon helper software?" then the S4 is mounted as a portable media player. In Mint 15, I can easily unmount the ROM and the S4 is mounted as a portable media player.
Since I couldn't get past this, I just moved the renamed "tether" folder over to /sdcard which is the only way I can get the phone to mount.
Surge, thanks for the framework patch, and scripts. I like the extSdCard approach since it is always preserved, but it's just a lot easier for me to use the /sdcard since I've not got an external SD and am too cheap to buy one just for this
After running the scripts, I just copied the entire folder over to my computer in case the /sdcard is ever reformatted
I can't attach the whole thing since I'm filesize limited, but I attached the folder with everything except the original MJ7framework-res.apk
Obviously the instructions are close your original, except you just move the tether folder into /sdcard (which is consquently what shows up as "Phone" when mounted as a portable media player storage area in Mint 15???). Then just
su
cd /sdcard/tether/
sh tether.sh
Thank again surge
darker_slayer said:
I couldn't get r/w in /mnt
I know there's probably a smarter way to do it, and I never tried the chmod you recommended on /system . . . but I re-wrote your tether and untether sh files to use /sdcard/tether instead of /extSdCard/MJ7_Tether_Unlock
I'm not sure how to remove the "crapware" bundled into the VZW S4, but every time I connect it via usb (to my Mint 15 laptop or W7 machine) it asks me to install some Verizon helper junk. It also mounts as a CD-ROM (due to some .ini file)
Does anyone know where this "storage" area is and if it's safe to blow all that crapware away? My S4 gets mounted as CD-ROM everytime whether or not I have USB debugging enabled. In W7 if I cancel it's "Would you like to install this Verizon helper software?" then the S4 is mounted as a portable media player. In Mint 15, I can easily unmount the ROM and the S4 is mounted as a portable media player.
Since I couldn't get past this, I just moved the renamed "tether" folder over to /sdcard which is the only way I can get the phone to mount.
Surge, thanks for the framework patch, and scripts. I like the extSdCard approach since it is always preserved, but it's just a lot easier for me to use the /sdcard since I've not got an external SD and am too cheap to buy one just for this
After running the scripts, I just copied the entire folder over to my computer in case the /sdcard is ever reformatted
I can't attach the whole thing since I'm filesize limited, but I attached the folder with everything except the original MJ7framework-res.apk
Obviously the instructions are close your original, except you just move the tether folder into /sdcard (which is consquently what shows up as "Phone" when mounted as a portable media player storage area in Mint 15???). Then just
su
cd /sdcard/tether/
sh tether.sh
Thank again surge
Click to expand...
Click to collapse
I don't recall recommending to chmod /system as that would lead to a brick if done improperly. Also I guess you could change the script and replace all instances of "/extSdCard" to "/sdcard" which is what you did, I just wanted the zip and folder to be named in such a way that youd easily be able to tell what it was. But why even bother with using a pc? I was saying to run the commands through terminal emulator on the phone.
P.S. /system/etc/autorun.iso
Sent from my SCH-I545 using XDA Premium 4 mobile app
I ran them from terminal emulator. I was just referring to mixing the files over to the phone. ES file Explorer wouldn't write in mnt. When plugged in to the laptop I just prefer to move stuff straight in. The only thing I could get to mount was a scarf
Anyway thanks again
Also, does removing the auto run iso from etc have any adverse effects?
darker_slayer said:
Also, does removing the auto run iso from etc have any adverse effects?
Click to expand...
Click to collapse
Removing or renaming the autorun.iso file does not stop the USB connection from connecting as "installer" when you first plug it in. There is still a delay of 20-30 seconds before it switches to "connected as media device" after you plug it in. If anyone has a permanent solution to this, please post it! I've tried changing the settings in the hidden menu *#7284#, but the settings don't stick and revert back to the "connect as installer" after a reboot.
Zelmo88 said:
Removing or renaming the autorun.iso file does not stop the USB connection from connecting as "installer" when you first plug it in. There is still a delay of 20-30 seconds before it switches to "connected as media device" after you plug it in. If anyone has a permanent solution to this, please post it! I've tried changing the settings in the hidden menu *#7284#, but the settings don't stick and revert back to the "connect as installer" after a reboot.
Click to expand...
Click to collapse
Thanks for the info, I was going to ask about this in a separate thread. After your reply looks like I need to look for some other method.
Also, the phone never mounts anything other than /sdcard/ right? Moving things to other places requires an explorer app?
To add to the growing number of noob questions, is it still possible to run ES File Explorer with SU in version 3? I know I used this way in the past, but I can't find the option and it's not showing me a bunch of stuff like /efs/carrier/HiddenMenus or letting me past into extSdCard
Is there a free root explorer if ES can no longer do it?
darker_slayer said:
Thanks for the info, I was going to ask about this in a separate thread. After your reply looks like I need to look for some other method.
Also, the phone never mounts anything other than /sdcard/ right? Moving things to other places requires an explorer app?
To add to the growing number of noob questions, is it still possible to run ES File Explorer with SU in version 3? I know I used this way in the past, but I can't find the option and it's not showing me a bunch of stuff like /efs/carrier/HiddenMenus or letting me past into extSdCard
Is there a free root explorer if ES can no longer do it?
Click to expand...
Click to collapse
I use ES File Explorer without any problems. Do you have "root explorer" switched ON in "Tools" in the ES File Explorer?
Zelmo88 said:
I use ES File Explorer without any problems. Do you have "root explorer" switched ON in "Tools" in the ES File Explorer?
Click to expand...
Click to collapse
Nope
Looked for it in settings, didn't think to check tools

Using CWM to remove apps

Firstly, apologies if this is the wrong forum to post this but to me it looked the most obvious :laugh:
I'm trying to get a CWM install.zip package (writing it myself) to delete user apps (aka bloatware) - I'm using the installer-script way of doing things.
Here's what I've tried.
Method 1:
mount data
remove_recursive("/data/app")
umount data
Result 1:
blank directory is there on rebooting into JB
Method 2:
mount data
remove("/data/app/bloatware.apk")
umount data
Result 2:
Individual apk files are removed
So you ask, I got it nailed so what's the problem? The problem is either method results in ghost apps appearing in Settings/App where the app name appears in the com.developer.name format and is zero bytes. I can then uninstall it via the normal Uninstall button and It goes away but how can I properly remove it from inside CWM ? Are there files/databases where the apps are stored that need to be purged?
Secondly, whilst I have your attention , what is the proper way to mount the internal Sdcard, I've tried /sdcard,/mnt then going into sdcard, /storage then using /sdcard0 but nothing works either deleting directories or add them. Any ideas anyone?
Many thanks
Adrian

[Titanium Backup] Failed to protect backup

Tried every method...but I'm unable you protect my backups in titanium backup
To protect*
How I solved this problem on my Moto G LTE
Shantanu Baviskar said:
Tried every method...but I'm unable you protect my backups in titanium backup
Click to expand...
Click to collapse
I carefully read this thread: [Help] Titanium Backup PRO - protected archive not working.
So I modified file /system/etc/permissions/platform.xml according http://jrummy-apps.com/fix-sdcard-on-kitkat/ and make new file /data/local/userinit.sh with this content:
Code:
#!/system/bin/sh
busybox mount -o remount,rw /
chmod 770 /mnt/media_rw
See the attached archive root.zip which I made for you it is pretty straightforward.
You should have move your TiB backup folder on this path: /mnt/media_rw/sdcard1/TitaniumBackup
You will be able to protect backup archives in Titanium Backup Pro then.
PS: If /data/local/userinit.sh doesn't start automatically in your ROM you can use for example Scripter feature in ROM Toolbox Pro and import userinit.sh script and set it as Start at boot.
_jis_ said:
I carefully read this thread: [Help] Titanium Backup PRO - protected archive not working.
So I modified file /system/etc/permissions/platform.xml according http://jrummy-apps.com/fix-sdcard-on-kitkat/ and make new file /data/local/userinit.sh with this content:
Code:
#!/system/bin/sh
busybox mount -o remount,rw /
chmod 770 /mnt/media_rw
See the attached archive root.zip which I made for you it is pretty straightforward.
You should have move your TiB backup folder on this path: /mnt/media_rw/sdcard1/TitaniumBackup
You will be able to protect backup archives in Titanium Backup Pro then.
PS: If /data/local/userinit.sh doesn't start automatically in your ROM you can use for example Scripter feature in ROM Toolbox Pro and import userinit.sh script and set it as Start at boot.
Click to expand...
Click to collapse
Although in the case of Note 4 it didn't work right off the bat, I made it work a little different thanks to your idea. For some weird reason the script just doesn't get executed at boot (neither the *.sh file, nor as a script, through ROM Toolbox) but I was able to use the 2 lines in the script and made a task (in Tasker) which executes the shell command at boot. Everything else is straight forward and TiBu can now protect backups.
As a mention for those interested in replicating all these: the suggested SD card fix made by rummy applies EXACTLY the same changes as the SDFix so you can use either of them. Again, thanks for your reply and the great idea! :good:
nacos said:
I was able to use the 2 lines in the script and made a task (in Tasker) which executes the shell command at boot. Everything else is straight forward and TiBu can now protect backups.
Click to expand...
Click to collapse
Great, this is another example how to execute script at boot
I solved this problem on all my phones (Moto G LTE and Samsung Galaxy Note 2 and Samsung Galaxy W) but not on my tablet Nexus 7 2013 nor on internal emulated SD card nor on attached OTG USB flash disk. This is example where pure Stock Google Android ROM sucks
_jis_ said:
Great, this is another example how to execute script at boot
I solved this problem on all my phones (Moto G LTE and Samsung Galaxy Note 2 and Samsung Galaxy W) but not on my tablet Nexus 7 2013 nor on internal emulated SD card nor on attached OTG USB flash disk. This is example where pure Stock Google Android ROM sucks
Click to expand...
Click to collapse
This update addresses the issue mentioned before about init'd scripts not executing at boot. OK, here is the issue (specific to Qualcomm's Snapdragon) and the working solution - thanks to alexndr. I've tested it and it's working, however it doesn't work directly with <X.sh> text files, instead the script must be packaged in a flashable zip and flashed from recovery. Once I did that, it worked like a charm! The 98mediarw file in the screenshot uses the same script as previously mentioned; The 98 before the file name assigns a higher execution priority - I used 98 for testing purposes, it clearly doesn't need that. :good:
nacos said:
OK, here is the issue (specific to Qualcomm's Snapdragon) and the working solution - thanks to alexndr.
Click to expand...
Click to collapse
Oh, at first I thought that you post something what helps me with my tablet:
_jis_ said:
I solved this problem on all my phones but not on my tablet Nexus 7 2013 nor on internal emulated SD card nor on attached OTG USB flash disk.
Click to expand...
Click to collapse
But this is just another example how to execute script at boot
none of these methods are working. Is it because I'm using a Custom ROM?
What are you trying to achieve? What exactly is your environment?
nacos said:
What are you trying to achieve? What exactly is your environment?
Click to expand...
Click to collapse
I have Motorola Moto E (CM11 Stable build by percy_g2) and I'm trying to protect my backups in TiB but I'm getting error "Sorry, the operation failed." It used to be the same in stock ROM. And one more question, is this bug fixed in Lollipop versions of Android?
To answer you questions, no, this is not a bug, it's by design, also it's not happening because you're using a custom ROM, but rather because all OEM's (Google being probably the worst of all) are pushing towards more and more restrictive software & hardware environments, also supported by laws meant to discourage the users from modifying original configurations. Why? Dirty politics, I won't get into that but if you keep your eyes wide open you'll see and understand A LOT! Oh, by the way...to expect for Lollipop to be less restrictive and more fun (to customize) would be naive! Nuff said, let's have some fun!
There are multiple parts to this fix/diagnostic. Don't skip any point and follow these instructions rigorously, otherwise it won't work!!! Let's take them one by one:
Is you platform.xml file (under system/etc) modified to allow read/write access to media_rw (mnt/media_rw)? If not, apply the patch using SDFix from Google Store.
TiBu backup folder must be set to mnt/media_rw/externalSD/Titaniumxxx (if you don't have externalSD than use your internal storage instead, pointing to TiBu folder) - but, for right now, you won't be able to set this path because currently TiBu doesn't have access to media_rw, due to media_rw not being given the right permissions by the system. That's exactly what mediarw script does.
In order for init.d to execute the mediarw script at every boot, you need to insure that you do have init.d support AND it's working. This is how you verify:
(3a) Do you see the folder system/etc/init.d? If yes, go to (3b), if no, you don't have init.d support! That's another fix entirely.
(3b) If you see the 00test file in the init.d folder navigate to /data and open up the file called Test.log - that tells you that init.d is installed and working. If you have a Qualcomm's Snapdragon and you do have the init.d folder but it doesn't execute any script at boot, see the fix in post #6.
(3c) If you don't care about setting up init.d support, you can still run the script at boot, as a shell command using Tasker - see post #4
Once you're sure that all the above are set correctly, flash the attached file from recovery. Reboot, navigate to system/etc/init.d and confirm the presence of the mediarw script in the init.d folder
Reboot again, then navigate to mnt/media_rw and check that permissions for media_rw have been set to 770 - :fingers-crossed: mission accomplished, my friend! :fingers-crossed: If, on the other hand, the permissions for media_rw are still set at 700, then something went wrong. Go back and check every step again, otherwise...
Open up TiBu, set the backup folder path as instructed in #2 and verify that your backups can be protected. Voila!!
nacos said:
To answer you questions, no, this is not a bug, it's by design, also it's not happening because you're using a custom ROM, but rather because all OEM's (Google being probably the worst of all) are pushing towards more and more restrictive software & hardware environments, also supported by laws meant to discourage the users from modifying original configurations. Why? Dirty politics, I won't get into that but if you keep your eyes wide open you'll see and understand A LOT! Oh, by the way...to expect for Lollipop to be less restrictive and more fun (to customize) would be naive! Nuff said, let's have some fun!
There are multiple parts to this fix/diagnostic. Don't skip any point and follow these instructions rigorously, otherwise it won't work!!! Let's take them one by one:
Is you platform.xml file (under system/etc) modified to allow read/write access to media_rw (mnt/media_rw)? If not, apply the patch using SDFix from Google Store.
TiBu backup folder must be set to mnt/media_rw/externalSD/Titaniumxxx (if you don't have externalSD than use your internal storage instead, pointing to TiBu folder) - but, for right now, you won't be able to set this path because currently TiBu doesn't have access to media_rw, due to media_rw not being given the right permissions by the system. That's exactly what mediarw script does.
In order for init.d to execute the mediarw script at every boot, you need to insure that you do have init.d support AND it's working. This is how you verify:
(3a) Do you see the folder system/etc/init.d? If yes, go to (3b), if no, you don't have init.d support! That's another fix entirely.
(3b) If you see the 00test file in the init.d folder navigate to /data and open up the file called Test.log - that tells you that init.d is installed and working. If you have a Qualcomm's Snapdragon and you do have the init.d folder but it doesn't execute any script at boot, see the fix in post #6.
(3c) If you don't care about setting up init.d support, you can still run the script at boot, as a shell command using Tasker - see post #4
Once you're sure that all the above are set correctly, flash the attached file from recovery. Reboot, navigate to system/etc/init.d and confirm the presence of the mediarw script in the init.d folder
Reboot again, then navigate to mnt/media_rw and check that permissions for media_rw have been set to 770 - :fingers-crossed: mission accomplished, my friend! :fingers-crossed: If, on the other hand, the permissions for media_rw are still set at 700, then something went wrong. Go back and check every step again, otherwise...
Open up TiBu, set the backup folder path as instructed in #2 and verify that your backups can be protected. Voila!!
Click to expand...
Click to collapse
(Please ignore that screenshot. I didn't properly read your msg in blue text)
I couldn't understand post #4 so can you please describe it more deeply? :crying: btw I don't have 00test but a file named 00banner. And can you tell me how to use tasker properly?
Sorry for butting in on this thread. I found it by searching because I too can no longer protect a backup in my tibu Pro. I used to be able to but not anymore and I'm not sure why.
I'm on a rooted nexus 5 running stock 4.4.4.
Reading your instructions I went looking for platform.xml and found it. When I checked its properties I got, see screenshot. Don't know what to modify to mount it as you say. I'm in ES Explorer.
Can you help?
Thanks.
And here is a screenshot in root Explorer
Update your tb to 7.0.1 and now you can protect backups ? this thread should get closed now
Closed? Why? Just because a shortcut is available doesn't mean there is nothing to learn from wondering around, my friend!
After all, this is exactly what XDA is: a huge data base available to those who are willing to learn and dare to wonder around, wouldn't you agree?

Deleted /system/vendor folder using ES File Manager Explorer

Hello,
I have Lenovo S720 running on Android 4.0.4 that I recently factory reset because It has only few little internal storage (~1,4 GB), and cannot support many updating apps.
After I do that, whats left in the internal storage is about 500 MB of storage, the rest being taken up by the system (I suppose).
I installed Framaroot to root the device, then System App Uninstaller (ROOT) and ES File Explorer.
First, I try to uninstall any bloatware with the System App Uninstaller -> I didn't get much free internal storage.
Then, I use ES File Explorer to seek, which folder took up the most space.
-> One of the is /system/vendor folder.
-> So, I copied that folder to /mnt/sdcard/backupsys/ (or /sdcard/backupsys/ [little bit forget]), Thinking it would come in handy later.
-> Then, I (foolishly) proceed to delete the folder using the root privileges .
-> It took a moment until all of my app start crashing (including the ES File Explorer!).
-> I turned-off the device, and now it still stuck in the (what I think as) "bootloop" mode.
Fortunately I still can communicate to the phone using adb tools, which I have a little knowledge of. But, the pm and am command cannot function well.
Now, I'm only thinking about moving back the vendor folder from /mnt/sdcard to the /system folder.
But I encounter some problem:
1) I can't (& don't know how to) write to the /system
2) I can't (& don't know how to) read from the /sdcard
- command 'ls' inside this dir returned nothing.
Glad I have the "su" tools from the Framaroot. I searched on the Internet and it seems the problem can be solved with mount tools, but I don't know how.
ls -la tools on root (/) return:
(other dir)
root /system ,,,,,,,,,,other info,,,,,,,
system /sdcard ,,,,,,,,,,other info,,,,,,,
(other dir)
So maybe because I can't gain system account, I can't access the folder and read it...
I try to hard-reset in the recovery mode, but I can't select the options! (I can move the selector with volume up/down) but I cant click it with the power button!
The phone seems to be worse every second.
My main question is: can I recover my phone (copying the vendor folder back) using command tools on my development computer? Or is there any other ways?
I'm willing to install any custom ROM best suited to my phone.
Thanks in advance.
Hello,
Welcome to XDA.
If you have a copy of what you deleted or can get it from somewhere and you want to adb push your missing files and folders back to your device then you need to have the files you want to push stored on your PC and push them from there to the device. For instructions on how to use adb read through the thread linked below and go from there.
http://forum.xda-developers.com/showthread.php?t=2141817
If you have further questions or need further help with using adb then you can post in the Q&A forum linked below:
http://forum.xda-developers.com/android/help

Categories

Resources