Re-write damaged build.prop? - Galaxy Tab General

I've managed to make a typo somewhere when updating the build.prop and it hasn't written it, now my tab has a /System/build.prop.old file, but no /System/build.prop file. I've got a backup of the file, has anyone either got a valid UPDATE.ZIP file for a JK5 EU firmware version of the build.prop that I can write (will it work from the "external" SD card?) - or some other way of gaining root access via the recovery ADB shell so that i can rewrite this file, or am I going to need to reflash via Odin? I've tried creating my own update.zip file but it tells me that it can't find it, so I'm guessing it has to be on the internal SD card, which is not a lot of use as I can't mount it.
Not a big deal if I have to, I'd just rather know an alternative in case I stuff it up again
EDIT: Nevermind, I worked out how to gain root access whilst in recovery, pretty simple really - the same as the regular manual-root process but just using a different work folder. The /tmp folder is writeable in recovery mode so I just copied the rageagainstthecage binary into there via "adb push", set it to executable, ran it, killed the adb server and restarted it, reconnected and I had root access, moved the build.prop back and all is well again.
Based on this, it'd be a piece of cake to write an UPDATE.ZIP that did a full permanent shell-root and also installed busybox and superuser.apk. Any point or are people happy enough with the existing methods?

Related

cant access shell...

I installed vodoo lagfix (froyo 2.2) preview6 (or what is newest as today) Before that I had replaced sh with bash, sh was link in same directory binary bash. After vodoo lagfix i encountered reboots... Then i saw that shell is inacessible and now i need to copy bash back to /system/bin (bash is zero bytes) to acess shell and fix things Looks quite simple but i simply cant do it root explorer isint working android mate either any other suggestions? Maybe i can somehow can give root permisions to some simple file explorer? Now my phone restarts as soon as i unplug it and it goes into sleep mode...
Even before that I couldnt simply copy (why there is no cp command?) i had to cat file > file
BTW voodoo really works phone is fast
I hope i posted in right thread thanks for answers.
Had a similar problem: I have JG1, and clockwork replaces my shell and it then becomes unusable.
If you still have your old shell bianry lying around somewhere, or want to "install" your bash again, you can do it by creating an update.zip file.
I've attached a template for this - copy your desired shell binary to system/bin/sh, name it update.zip, place on SD card, go into recovery mode and hit "apply: update.zip"
IMPORTANT: the attached template is untested - you can, however, use the file I actually use, and simply adjust it for your needs (replace its shell binary, and look at the update script... nevermind the "root" text in it... I simply used the rooting update.zip as a base for it...)
Here's what I need when I play around with clockwork: http://db.tt/xGDcT1y
As for the template, see the post's attachments.
I hope this helps.
Cant apply update zip, because there is no such option only reinstall apps and so on... Have 2e recovery. Looks like i will need to use heidmall or similar app.

ADB vs. Root Explorer vs. Terminal on device

With certain files, SteelH describes using Root Explorer as "like trying to swap the engine of a car while it's running"
I experienced this as I tried to copy back a modified services.jar file with Root Explorer. I ended up using ADB and it worked fine.
Question 1: I did this while the phone was running/OS loaded, but ADB copy method worked while Root Explorer didn't. Why? Does ADB have higher authority in some way?
Question 2: How about using a terminal window on the phone to copy/replace files (if a computer is not handy)? Does it yield the same function/result as Root Explorer or ADB?
Question 3: If I simply want to back up the file, say services.jar or framework.apk, to be copied to SD, can I use Root Explorer for that?
Thanks.
snovvman said:
With certain files, SteelH describes using Root Explorer as "like trying to swap the engine of a car while it's running"
I experienced this as I tried to copy back a modified services.jar file with Root Explorer. I ended up using ADB and it worked fine.
Question 1: I did this while the phone was running/OS loaded, but ADB copy method worked while Root Explorer didn't. Why? Does ADB have higher authority in some way?
Question 2: How about using a terminal window on the phone to copy/replace files (if a computer is not handy)? Does it yield the same function/result as Root Explorer or ADB?
Question 3: If I simply want to back up the file, say services.jar or framework.apk, to be copied to SD, can I use Root Explorer for that?
Thanks.
Click to expand...
Click to collapse
i can't answer all of these authoritatively, but i will say
-i find adb to be the easiest way to do ANY modifications, as long as you know just a handful of commands and remember to remount. also remember to pull anything you are getting ready to mess with, just in case you bork it up. takes a lot less time to push an unmodified file than it does to do a complete restore. especially if you forgot to backup, lol
-if you have a terminal app mounted with rw privileges, you can move whatever you want wherever you want. however, referring back to my last point, adb is easier. i find that trying to type type type things out on a dinky little keyboard is a bigger pain in my butt than using my full size one, especially when i can use cut/paste from the intertubes.
-i think rooted explorere shouldn't have a problem copying a file from /system/ or /data/ to some folder on your sdcard
Thank you for the information. I just copied a file with terminal (on phone) and Root Explorer. Interesting thing: using the CP command, the file that was copied onto the SD showed the current date. The file that was copied using RE has the original date.

[Q] Backup /cache/ without root ?

I'm trying to recover some lost pictures from cache. I can't root because my bootloader is still locked, and unlocking it will wipe the very data I'm trying to recover... Is there any way for me to get read-only access to my cache, without first wiping the phone?
What exactly will adb backup/restore keep? Will it save my cache? I've heard people say it stores literally *everything* and others say it won't back up the cache and some other system files?
The djrbliss motochopper toolkit http://forum.xda-developers.com/showthread.php?t=2233852 would be absolutely perfect, except that I'm running 4.3, and I don't know of any way to downgrade without wiping the phone... One Click Root also would be perfect, except they don't support the Nexus 4...
Is there any way I can root access, or at least read/pull these files, without wiping the device?
I've been searching frantically for days now, I'd pay good money to have those pictures back If I can get these pictures off, you can bet I'm rooting immediately!
Nexus 4, running 4.3 build JWR66Y all stock
If all you want to do is be able to access files on your cache partition, you could try using "adb pull /cache/".
I dont think that needs root, but i could be wrong. Nonetheless, its worth a shot. Setup adb , open command prompt, and run:
Code:
cd Desktop
mkdir cache
cd cache
adb pull /cache/
Chromium_ said:
If all you want to do is be able to access files on your cache partition, you could try using "adb pull /cache/".
I dont think that needs root, but i could be wrong. Nonetheless, its worth a shot. Setup adb, open command prompt, and run:
Code:
cd Desktop
mkdir cache
cd cache
adb pull /cache/
Click to expand...
Click to collapse
It does appear to need root - it just leaves the destination file empty? Likewise I can't access /cache/ it through FTPDroid or Total Commander, says I don't have permission
bken said:
It does appear to need root - it just leaves the destination file empty? Likewise I can't access /cache/ it through FTPDroid or Total Commander, says I don't have permission
Click to expand...
Click to collapse
I guess you need root as I just tried adb pull too and it's not working, opening the folder in adb shell is not working either so I guess you have no luck
What you could try is copying the partition using dd but I'm not sure what's the name of the partition (which block) etc ... But that *could* work. EDIT: Not working either, you still get permission denied, sorry
Sent from my Nexus 4 running Android 4.3
mihahn said:
I guess you need root as I just tried adb pull too and it's not working, opening the folder in adb shell is not working either so I guess you have no luck
What you could try is copying the partition using dd but I'm not sure what's the name of the partition (which block) etc ... But that *could* work. EDIT: Not working either, you still get permission denied, sorry
Sent from my Nexus 4 running Android 4.3
Click to expand...
Click to collapse
Thank you for trying. adb backup gave me access to all my app files, but didn't grab cache.
Here's a thought: through the backup I have an extracted .ab file with all the data for the app that wrote this data into cache. Is there a way I could replace the .apk with something that could copy this program's cache data to /sdcard, and then "restore" with this modified .apk? Would the new .apk retain the permissions of the old, and let me copy this data? Or, alternately, could I modify the .apk to allow debug mode so I can open the cache as that app in console, and adb pull then?
My next best option I can think of, is to go ahead and unlock the bootloader, let the phone reset, and then immediately root and perform data recovery, and hope I don't overwrite everything in the meantime. I'm not sure yet which USB Mass Storage methods (if any) will let me use a standard file recovery program to scan the drive. This is also my last resort, as if it screws up I'm toast.
Forensics lab got back to me, said they could "probably" do it but it'd cost me $1200 I would happily pay 120 but 1200 is absurd. Wonder what their method is to extract data...
OK I think I'm almost there!! I retrieved the .apk through my Holo Backup full system backup and decompressed it using Droid Explorer. Decompiled with apktools, changed my manifest file, and then recompiled into apk. Now I'm trying to get my new AndroidManifest.xml and resources.arsc into my .apk without mucking up the certificate... It sounds like people have had success taking the changed files out of the newly compiled apk and stuffing them into the old apk real quick without it changing the certificates, but I don't seem to be having the same luck? I'm getting this error which isn't a "no certificates error" but isn't success either. Only thing I changed was debug = "false" to "true"
Code:
c:\>adb install -r -d d:\com.xxxxx.xxxxx.apk
2490 KB/s (15989341 bytes in 6.269s)
pkg: /data/local/tmp/com.xxxxx.xxxxx.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
The apk I'm starting from installed fine, and I know because it reverted me to a previous version because the marketplace had just updated me over the weekend. This zip trick has also apparently worked for a few people, any suggestions other than keep trying other computers and programs?
http://www.galaxynexusforum.com/for...562-how-decompile-compile-using-apktools.html
http://forum.xda-developers.com/showthread.php?t=1658121
I'm not trying to reverse engineer this app for any evil, I only want my lost data that I only don't have because I failed to root when I should have and as soon as I have that, I'm reverting the app back to the official version. :angel:

Unable to replace system files

I am trying to flash a touchwiz launcher and it succeeds in flashing in recovery but the files are not getting put into priv-app folder.
also, trying a copy paste using root explorer but it fails.
some files get copied but for some reason touchwiz launcher does not, any idea why?
Does Root Explorer have any option to remount /system with write permission? Nearly all File Managers with root access do it that way.
It looks like your /system is still mounted read-only. What exactly is being copied over?
Also, you can "adb shell" to the phone while on recovery, that way you have full access on the phone.

Cant modify file?

I'm trying to replace one of the files in /system/usr/keylayout but i'm getting an error telling me the system is read only.
So i've gone back to the /system folder in Root Explorer and tried to remount it as rw but nothing happens.
So i've gone in and tried to use ADB. I turned on USB Debugging and connected with ADB, used "adb shell" to get in, then every variation of deleting the file and remounting the file system i can. Every method to delete the file tells me its read only, and every method to remount it tells me that the folder isnt in /proc/mounts. If i dont specify a folder and just use /, then it runs and shows a ton of folders, but i still cant delete the file. My goal is to replace it with another.
Any ideas why? I'm rooted with magisk, newest version of platform tools on the laptop, im running OOS 11.0.4.4 IN11AA, stock rom and kernel.

Categories

Resources