Read/write file access - G Tablet Q&A, Help & Troubleshooting

Hello
Some of application such as Sygic, Aptoid, Waze and others cannot access to sdcard unless I reboot.
When verffying with Root Explorere I have noticed that the default access to Sdcard is R/O. As soon as I change that to Read/Write every thing goes right.
The problem is R/O keeps come back and apps cannot run until I do modification again.
Anyone can help please as to fix permenantly this issue.
Thanks

samaliset said:
Hello
Some of application such as Sygic, Aptoid, Waze and others cannot access to sdcard unless I reboot.
When verffying with Root Explorere I have noticed that the default access to Sdcard is R/O. As soon as I change that to Read/Write every thing goes right.
The problem is R/O keeps come back and apps cannot run until I do modification again.
Anyone can help please as to fix permenantly this issue.
Thanks
Click to expand...
Click to collapse
There are two ways
1 the easy way is an app from playstore to do that at every boot
Are many can do this
2 the hard way is a script
You can paste it to init.d folder or script manager execute at every boot
Do you have gtab?
And sd card should not have sysrw option
Something wrong with install of rom

samaliset said:
When verffying with Root Explorere I have noticed that the default access to Sdcard is R/O. As soon as I change that to Read/Write every thing goes right.
The problem is R/O keeps come back and apps cannot run until I do modification again.
Click to expand...
Click to collapse
Peculiar problem. Will have to do some tests and look at some logs to find out the cause.
1. Can you create or delete files/dirs. on the SDcard, and do these changes persist after a reboot? Or do they vanish--like the changes never happened?
2. What's the output of this command right after a reboot?
Code:
$ [B]mount[/B]

rajeevvp said:
Peculiar problem. Will have to do some tests and look at some logs to find out the cause.
1. Can you create or delete files/dirs. on the SDcard, and do these changes persist after a reboot? Or do they vanish--like the changes never happened?
2. What's the output of this command right after a reboot?
Code:
$ [B]mount[/B]
Click to expand...
Click to collapse
Thanks for your reply,
1- I realy need some more details about this point. Some more explaination will be highly appreciated.
2- After typing this line and enter, the output is : /system/bin/sh:
Code:
$: not found. Moreover,after reboot, wh
ile launching Waze, I get the message : "Wazecan't access your sd card. Make sure it isn't mounted".

geowolf1000 said:
There are two ways
1 the easy way is an app from playstore to do that at every boot
Are many can do this
2 the hard way is a script
You can paste it to init.d folder or script manager execute at every boot
Do you have gtab?
And sd card should not have sysrw option
Something wrong with install of rom
Click to expand...
Click to collapse
Thanks fro your reply.
1- May know which app I should use.
2- Sure it looks hard for me to do that.
Yes I do have a Gtab 7.7 with JB.
The rest of the message needs more explaination if possible.

samaliset said:
Thanks fro your reply.
1- May know which app I should use.
2- Sure it looks hard for me to do that.
Yes I do have a Gtab 7.7 with JB.
The rest of the message needs more explaination if possible.
Click to expand...
Click to collapse
Sd card always alow read/write permission is not part of root
Type mount to terminal and post the result so rajeevvp give you his knowledge

samaliset said:
Yes I do have a Gtab 7.7 with JB.
Click to expand...
Click to collapse
There is no such device as a gTablet 7.7. Is this the tablet you have?
1. Use the standard file manager app and create or delete some files and directories on the SDcard. Reboot the gTablet. Verify that the changes you made remain after the reboot.
2. The $ character is just a prompt, used to indicate that the commands that follow can be executed by any user. Don't type that into the Terminal emulator app. Type in only the stuff shown in bold.
3. Setup adb (see the sticky threads) to make entering commands and collecting logs easier.
4. From now on post the exact error or diagnostic messages that you see. Or, make screenshots and post them.

I am very sorry to post my message here by mistzke.
Anyway I would like to thank all for your help and would like to inform you that the probme had been solved in installing a new tom.
Thanks znd sorry again

Related

[INFO] Backup the pds partition of your Atrix!

It is a wise idea to backup the /pds partition of your Atrix. It is /dev/block/mmcblk0p3. It holds very important information unique to the phone, like the wifi and bluetooth mac addresses. We still don't fully understand it, but it can resolve issues with the touchscreen not taking input properly. This has happened to a number of people, and now that everyone can have the unlock, I am sure people will do things that will cause the same problem.
Steps:
1. Pick your favorite method: adb, ssh, terminal emulator, etc
2. Become root if not already, REQUIRED
3. dd if=/dev/block/mmcblk0p3 of=/tmp/pds.img
4. Pick your favorite method to get the file off the phone: scp, sd card, etc
The file should be about 2mb. Keep it in a safe place.
edgan said:
It is a wise idea to backup the /pds partition of your Atrix. It is /dev/block/mmcblk0p3. It holds very important information unique to the phone. We still don't fully understand it, but it can resolve issues with the touchscreen not taking input properly. This has happened to a number of people, and now that everyone can have the unlock, I am sure people will do things that will cause the same problem.
Steps:
1. Pick your favorite method: adb, ssh, terminal emulator, etc
2. Become root if not already, REQUIRED
3. dd if=/dev/block/mmcblk0p3 of=/tmp/pds.img
4. Pick your favorite method to get the file off the phone: scp, sd card, etc
The file should be about 2mb. Keep it in a safe place.
Click to expand...
Click to collapse
Everyone can't have the Unlock... Bell is denied for now.
This is sweet though. Thanks for the tip.
Can Root Explorer be used to do this?
no pds is mounted but root exp sees an empty partition, btw would be possible to know which files exactly are in the directory?
me and others messed up this partition using tenfar's recovery, now we have problem with temp throttling, i guess (cpu reaches only 50% of max freq)
Once you go through steps 1 to 3, you can go to /tmp in root explorer and copy pds.img file to sdcard or wherever you want to copy the pds file
Uhhh, is this still possible to back up after unlocking and flashing the 2.3.4 build?
Sent from my MB860 using XDA App
neer2005 said:
Uhhh, is this still possible to back up after unlocking and I flashing the 2.3.4 build?
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
I don't see any reason why you wouldn't be able to.
Screwed up my PDS on my old Atrix. Made sure to immediately back mine up when I got a new one too lol
Backed up the pds file to my ext-sd card using adb shell and got a 2.00mb file. Is this right?
Thanks for the info!
yes
now share it
Thanks I just make a backup image... but how do you restore it?
dd if=/tmp/pds.img of=/dev/block/mmcblk0p3
edgan said:
It is a wise idea to backup the /pds partition of your Atrix. It is /dev/block/mmcblk0p3. It holds very important information unique to the phone. We still don't fully understand it, but it can resolve issues with the touchscreen not taking input properly. This has happened to a number of people, and now that everyone can have the unlock, I am sure people will do things that will cause the same problem.
Steps:
1. Pick your favorite method: adb, ssh, terminal emulator, etc
2. Become root if not already, REQUIRED
3. dd if=/dev/block/mmcblk0p3 of=/tmp/pds.img
4. Pick your favorite method to get the file off the phone: scp, sd card, etc
The file should be about 2mb. Keep it in a safe place.
Click to expand...
Click to collapse
i cant seem to find the file once i created it!
ok, seems simple enough, but stupid question... can someone explain the commands "dd=" and "of=".
I was able to see the file @ dev/block with winscp but how do I convert it to a .img file, etc.
Thanks for your help.
samcripp said:
i cant seem to find the file once i created it!
Click to expand...
Click to collapse
It's in /tmp.
I suggest people use this command:
*MicroSD Installed*
dd if=/dev/block/mmcblk0p3 of=/sdcard-ext/pds.img
*No MicroSD Installed*
dd if=/dev/block/mmcblk0p3 of=/sdcard/pds.img
These commands will create the pds.img file in the root directory of your MicroSD or your Internal SD card respectively.
What is pdf partition?
I believe and if I am wrong I am sure someone will correct me but
dd = I'm not sure
if = input file
of = output file
dd essentially takes a disk and copies it.
Sent from my MB860 using Tapatalk
Not to sound newbish, but I am, I keep getting Cannot Open for Read: Permission Denied
Could someone assist? Thanks.
Realized:
SU is what I needed to type, methinks...will try.
Worked:
Yeah, once I put SU and got that done, it worked out.
_Dennis_ said:
I believe and if I am wrong I am sure someone will correct me but
dd = I'm not sure
if = input file
of = output file
dd essentially takes a disk and copies it.
Sent from my MB860 using Tapatalk
Click to expand...
Click to collapse
From Wikipedia: "dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data............. dd can also be used to copy regions of raw device files, e.g. backing up the boot sector of a hard disk, or to read fixed amounts of data from special files like /dev/zero or /dev/random.[4]"
So, I am a n00b on using adb (etc..) so I will explain the way I did it using adb.
1. Make sure you have adb.exe installed on your computer and connect the phone to the computer. (I got my adb.exe from the Gladroot script. Here is a link: http://goo.gl/jHiJc)
2. Open a command window
3. Browse to the directory where the adb.exe is and type the following (press enter after each line):
adb shell
su
dd if=/dev/block/mmcblk0p3 of=/sdcard-ext/pds.img
Now, if you DON'T have a SDcard in your phone, take out the "-ext" from that last line.
The file (pds.img) should now be in either the internal sdcard or on your physical sdcard, as nexxusty described.
I hope that helps some as it took me a while to learn this.
Sorry if this is too noob for some, but I started from zero knowledge of this
garekinokami said:
Not to sound newbish, but I am, I keep getting Cannot Open for Read: Permission Denied
Could someone assist? Thanks.
Click to expand...
Click to collapse
Only thing I can think of is if you didn't give ADB superuser permission. You have to physically click allow on the phone after you type "su". Could that be it?
wirednix said:
Only thing I can think of is if you didn't give ADB superuser permission. You have to physically click allow on the phone after you type "su". Could that be it?
Click to expand...
Click to collapse
Lol Yes. 10 Char.
Aye I know what it IS....not what dd MEANS lol. Thank you for the guide.....I completed this in terminal emulator.

[Q] How to install a terminal (Debug Tool) in FRX06

Hi!
I have installed the [BUILD] **Complete Froyo Bundle!!** FRX06 - "Stable" - Minor Fixes, but I have no WiFi.
In a previous version was included by default Debugging tool which would allow a terminal to be launched in order to copy the wifi-nvram file from the SD card towards the /data folder.
How to get the Debugging Tool / Terminal in this version ?
Any help welcome !
Thanks,
JM
jsalsa said:
Hi!
I have installed the [BUILD] **Complete Froyo Bundle!!** FRX06 - "Stable" - Minor Fixes, but I have no WiFi.
In a previous version was included by default Debugging tool which would allow a terminal to be launched in order to copy the wifi-nvram file from the SD card towards the /data folder.
How to get the Debugging Tool / Terminal in this version ?
Any help welcome !
Thanks,
JM
Click to expand...
Click to collapse
Unfortunately you can't. Use ConnectBot from the Market.
For the wifi-nvram.txt trick why don't you just use the user.conf file to bind mount it? That way you wouldn't ever have to do it again... Do it once, then never worry about it again...
Thanks !
For ConnectBot, this is a SSH client. how to connect locally: localhost I presume, But which login/password?
For user.conf file, I did not know its existence . have added the "cp /sdcard/wifi-nvram.txt /data/wifi-nvram.txt" at the end, let's see if this works at next reboot.
Thanks again !
jsalsa said:
Thanks !
For ConnectBot, this is a SSH client. how to connect locally: localhost I presume, But which login/password?
For user.conf file, I did not know its existence . have added the "cp /sdcard/wifi-nvram.txt /data/wifi-nvram.txt" at the end, let's see if this works at next reboot.
Thanks again !
Click to expand...
Click to collapse
ConnectBot works locally. Instead of SSH, choose "Local"...
Let me know if you need help with the user.conf command. Should work, haven't tried it myself...
Thanks once more.
the user.conf trick did the trick already.
Many thanks !
JMS
jsalsa said:
Thanks once more.
the user.conf trick did the trick already.
Many thanks !
JMS
Click to expand...
Click to collapse
np. Figured that is the easiest method for fixing this... now you can just leave the file on your SD card and user.conf will always mount it for you .
arrrghhh said:
ConnectBot works locally. Instead of SSH, choose "Local"...
Let me know if you need help with the user.conf command. Should work, haven't tried it myself...
Click to expand...
Click to collapse
can u tell me how does user.conf work ? what do i have to do ?
the show stopper said:
can u tell me how does user.conf work ? what do i have to do ?
Click to expand...
Click to collapse
Boot back to WinMo, edit the froyo.user.conf file (in the 'conf' folder on your SD card, where Android is...)
I like editing these files with Notepad++ but I think Wordpad will handle the enter keys correctly (regular Windows Notepad won't!)
At the bottom, you'll see a "CustomCommands" section. Within the braces ({}) add a line -
Code:
ln -s /sdcard/wifi-nvram.txt /data/wifi-nvram.txt
Make sure it's on its own line, look at some of the other commands for an example (look at the rm command...)
That's the skinny... hopefully it works! This assumes the wifi-nvram.txt file you created (with your MAC address in it) is at the root of the SD card (look at the command, /sdcard/wifi-nvram.txt... if it's in a 'mods' folder which is at the root of the SD, then the path would be /sdcard/mods/wifi-nvram.txt...)
? Purpose
arrrghhh said:
Boot back to WinMo, edit the froyo.user.conf file (in the 'conf' folder on your SD card, where Android is...)
I like editing these files with Notepad++ but I think Wordpad will handle the enter keys correctly (regular Windows Notepad won't!)
At the bottom, you'll see a "CustomCommands" section. Within the braces ({}) add a line -
Code:
ln -s /sdcard/wifi-nvram.txt /data/wifi-nvram.txt
Make sure it's on its own line, look at some of the other commands for an example (look at the rm command...)
That's the skinny... hopefully it works! This assumes the wifi-nvram.txt file you created (with your MAC address in it) is at the root of the SD card (look at the command, /sdcard/wifi-nvram.txt... if it's in a 'mods' folder which is at the root of the SD, then the path would be /sdcard/mods/wifi-nvram.txt...)
Click to expand...
Click to collapse
What is the result of moving this file what does this do,fix,solve? P.s. sincere?Not being sarcastic just curious.
Phatboyj420 said:
What is the result of moving this file what does this do,fix,solve? P.s. sincere?Not being sarcastic just curious.
Click to expand...
Click to collapse
What is this, I don't even...
If you're asking what this fixes, it's for wifi problems. I think someone tried this trick, and it didn't work. You actually have to place the .txt file instead of symlinking.

[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

Can't delete files from my external memory card through file explorer

I have tried a lot of custom Roms. I'm on Neat ROM Lite now. Not sure which ROM changed my file access permission settings to cause this problem but I'm not able to delete any files from my external memory card. I was able to delete when I was on stock rom. The other problem is for a few apps I get an error message which says can't install on usb/sd card. I have posted this in another thread
some time back but got no response. Some one please point me in the right direction.
This is what my file permission looks like.
PS: I am able to delete when my fone is connected to PC via USB. So I don't think it has anything to do with a faulty sd card.
pavitar said:
I have tried a lot of custom Roms. I'm on Neat ROM Lite now. Not sure which ROM changed my file access permission settings to cause this problem but I'm not able to delete any files from my external memory card. I was able to delete when I was on stock rom. The other problem is for a few apps I get an error message which says can't install on usb/sd card. I have posted this in another thread
some time back but got no response. Some one please point me in the right direction.
This is what my file permission looks like.
PS: I am able to delete when my fone is connected to PC via USB. So I don't think it has anything to do with a faulty sd card.
Click to expand...
Click to collapse
file permissions are 775, try changing them to 777(all boxes ticked)
for future refference he is my support thread Ricky310711 AllInOne Support Thread
ricky310711 said:
file permissions are 775, try changing them to 777(all boxes ticked)
for future refference he is my support thread Ricky310711 AllInOne Support Thread
Click to expand...
Click to collapse
Can you please tell me, how to apply a file permission? I tried checking the box which is not checked in the snapshot shared, but that too gives an error.Says "Operation failed"
pavitar said:
Can you please tell me, how to apply a file permission?
Click to expand...
Click to collapse
download mobile terminal from playstore
Hey I know its been quite sometime now.but as ur advice I downloaded mobile terminal and now have to run the following command everytime I boot my fone:
mount -o rw,remount -t/yaffs2 /storage/extSdCard
Otherwise i do not get rw access to my external sd.Istn't there a permanent solution to this? Also I fail to understand what changed my permissions and why does this persist across all the new roms I flash?
Sent from my GT-I9100 using xda app-developers app
Wanamlite ->Slim Bean 4.2.2 ->NeatRom Lite -> wanamlite
pavitar said:
Hey I know its been quite sometime now.but as ur advice I downloaded mobile terminal and now have to run the following command everytime I boot my fone:
mount -o rw,remount -t/yaffs2 /storage/extSdCard
Otherwise i do not get rw access to my external sd.Istn't there a permanent solution to this? Also I fail to understand what changed my permissions and why does this persist across all the new roms I flash?
Sent from my GT-I9100 using xda app-developers app
Wanamlite ->Slim Bean 4.2.2 ->NeatRom Lite -> wanamlite
Click to expand...
Click to collapse
Create a blank file and type that command in it. Now save it and rename it to 95mountsd with no extension
Now, if you have init.d support, place it in /system/etc/init.d and reboot
Command will run on every boot itself
Thank you, it worked. Now could please have a look at my other issue, in this post I'd be really thankful.
Can you please tell me what could be the reason for my default rw settings to change, coz I remember when I had stock os I never had to do all this.
iamareebjamal said:
Create a blank file and type that command in it. Now save it and rename it to 95mountsd with no extension
Now, if you have init.d support, place it in /system/etc/init.d and reboot
Command will run on every boot itself
Click to expand...
Click to collapse
pavitar said:
Thank you, it worked. Now could please have a look at my other issue, in this post I'd be really thankful.
Can you please tell me what could be the reason for my default rw settings to change, coz I remember when I had stock os I never had to do all this.
Click to expand...
Click to collapse
Sorry, i'm not good at hardware stuff
Maybe the ROMs aren't mounting that special kind of partition your sdcard is having
FAT32 format works universally
yaffs2 may not
I'm not sure
iamareebjamal said:
Sorry, i'm not good at hardware stuff
Maybe the ROMs aren't mounting that special kind of partition your sdcard is having
FAT32 format works universally
yaffs2 may not
I'm not sure
Click to expand...
Click to collapse
Hey I have switched back to stock rom and I've rooted it by flashing philz kernel. Now I don't see init.d in my /system/etc , where do I place this 95mountsd in this case?
pavitar said:
Hey I have switched back to stock rom and I've rooted it by flashing philz kernel. Now I don't see init.d in my /system/etc , where do I place this 95mountsd in this case?
Click to expand...
Click to collapse
Try this
https://play.google.com/store/apps/...&utm_medium=organic&utm_term=universal+init.d

[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?

Categories

Resources