[Q] [help]how to get system folder permission for hdx7 - Kindle Fire HDX 7" & 8.9" Q&A, Help & Troubleshoot

I just play andorid device a few days, but My hdx7 is a little bricked because i deleted some system app. Now I can log in fire os, have adb, usb connected and internal storge, even i can operate device setting app, but i can't open the other app because i don't have a desktop.
I compare system/app folder with the same folder in the amazon bin, found that the folder lack of scores of app, but the other system folder is the same. So I hope can adb push app folder to the system folder, but the pemission denied. I try to remount or mount, it can't work.
if adb root, then "adbd cannot run as root in production builds.
if adb push apk to the app folder, then “permission denied".
if adb remount, then ”remount failed: Operation not permitted".
and I have try adb shell like that:
# su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system
# exit
it didn't work.
my hdx7 have rooted.
My Questions are:
1. If I could push the app folder to the system folder and reset to factory, is my hdx saved?
2. How to get the system folder rw in the situation?
thx for any prompt, although i am a rookie but i will try my best, i wish the adept can help me and will be enormously grateful. Sorry for my poor english.

It sounds to me that you had lost root.

kschang said:
It sounds to me that you had lost root.
Click to expand...
Click to collapse
So i have tried root again like "http://forum.xda-developers.com/showthread.php?t=2544965" said
But it didn't work, please see the attach, But I don't know why.
Sorry for that i'm rookie to andorid and ask so many questions.

randolphling said:
So i have tried root again like "http://forum.xda-developers.com/showthread.php?t=2544965" said
But it didn't work, please see the attach, But I don't know why.
Sorry for that i'm rookie to andorid and ask so many questions.
Click to expand...
Click to collapse
Hmmm... It says you still have root (the prompt changed after "su")
I personally don't use ADB much. I have Root Explorer (grabbed it legally for free from Amazon ages ago) and Wifi Explorer Pro (same method) so I basically WiFi myself the files I need sideloaded then move them around on the device itself. But if you've lost launcher, you have deeper issues.
Have you tried ADB push any launcher? Or even a download store like 1Mobile or Aptoide?
ADB is basically a Linux shell debug into Android, so you need to learn some Unix shell commands. I'm sure you can find ADB guides with the basic commands, like "ls", "cp", and so on.
You need to check the directory and see if the system/app and other system directories are still there. This is one reason I only play with the copy of ROM I have (see Safestrap Recovery).

Related

Removing hard links & /system/bin/ command options

1) How do I remove hard linked files on the X10 Android file system? I also need to identify them with the "ls" command, but it doesn't work the same as linux by listing the count in the ls listing of hard links to a specific file. The reason is, when I try to move a file in /system/app, it tells me it failed due to cross-device link - likely because the OS knows the link will fail if I move the file to my /sdcard directory. I want to remove the hard-link.
2) Is there a listing of all the options available to the commands in the /system/bin directory? It seems the ls command, for example, is a stripped down version of the ls that comes with linux.
Thanks.
what method are you using to move the files in system/app? you should be able to move them using root explorer, or copy out using dd if= of= statements then rm, the xperia system does not seem to like cp and mv commands
I'm using:
Code:
mv /system/app/Facebook.apk /sdcard/backup/system/app
...it fails. A dd works, because it just does a block copy and doesn't move the file. I'll try moving it with Root Explorer.
I'd prefer an actual command instead of using an app on the phone, as I've connected the phone to my PC with the USB cable and using adb.exe.
FYI, I tried Root Explorer, for some reason it can move the file just fine! My phone is rooted and I'm running the adb shell with super-user access.
use this:
busybox ls -l
busybox cp
busybox mv
Or even better, use "busybox --install /system/bin" and let it install all the symlinks for you
aln688 said:
I'm using:
Code:
mv /system/app/Facebook.apk /sdcard/backup/system/app
...it fails. A dd works, because it just does a block copy and doesn't move the file. I'll try moving it with Root Explorer.
I'd prefer an actual command instead of using an app on the phone, as I've connected the phone to my PC with the USB cable and using adb.exe.
FYI, I tried Root Explorer, for some reason it can move the file just fine! My phone is rooted and I'm running the adb shell with super-user access.
Click to expand...
Click to collapse
biktor_gj said:
use this:
busybox ls -l
busybox cp
busybox mv
Or even better, use "busybox --install /system/bin" and let it install all the symlinks for you
Click to expand...
Click to collapse
Thanks for the tip, you've just explained what busybox is. I always wondered why Titanium Backup wanted Busybox for it to run properly. I'll try these commands out.
UPDATE: Nice, I get VI as well! I was wanting that. I got fedup editing a file on the PC and pushing it back to the phone. Thanks.

[Q] Rooted or not?

Hi, I rooted my Vribrant, both ways (manually and with one click root). I installed terminal emulator. I tried the su command to check if I am root. The # appears normally. However I tried deleting a file with Root explorer, inside the system folder, and when I get back it's still there. I also tried deleting it manually from Terminal EMulator with these commands:
su
cd system/apps
rm Swype.apk
and I get this:
rm failed for Swype.apk, Read-only file system
I also tried:
su rm Swype.apk
and this is returned:
Permission denied.....
I also tried the exact same thing from adb shell (which I had to allow in superuser permissions program), but it gave me the exact same results. What's wrong? Am I doing something wrong? Thanks
In root explorer, try hitting the r/w button at the top and see if that works.
Sent from my SGH-T959 using XDA App
I know about the button. The strange thing is that inside system folder it grands me r/w permissions, and no matter how many times a press the r/o button it doesn't change. Still gives the results I said. However, besides root Explorer what's wrong with terminal emulator and adb?
I'm not 100% sure how to mount as root in adb. I wish I knew myself heh.
Did any of those root methods install the superuser app?
Sent from my SGH-T959 using XDA App
Terminal Emulator should return a "#" after typing "su"
Sent from my SGH-T959 using Tapatalk
From a terminal write
adb root. (will give root)
adb remount. (will remount system as r/w)
adb shell cp /system/app/swype.apk /system/app/swype.apk.bak
Adb shell rm /system/app/swype.apk
This link is what i used to use to gain rw permissions
http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html
Alternatively from terminal on the phone type
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Assuming your sys partition is mntblock3
Sent from Conical. 07
rbirg said:
I'm not 100% sure how to mount as root in adb. I wish I knew myself heh.
Did any of those root methods install the superuser app?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Yes both methods installed the "Superuser Permission" app.
I7oobie said:
Terminal Emulator should return a "#" after typing "su"
Sent from my SGH-T959 using Tapatalk
Click to expand...
Click to collapse
It does normally.
linuxmotion said:
From a terminal write
adb root. (will give root)
adb remount. (will remount system as r/w)
adb shell cp /system/app/swype.apk /system/app/swype.apk.bak
Adb shell rm /system/app/swype.apk
This link is what i used to use to gain rw permissions
http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html
Alternatively from terminal on the phone type
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Assuming your sys partition is mntblock3
Sent from Conical. 07
Click to expand...
Click to collapse
I tried the first method but it didn't work. When I entered adb root, it said "adbd cannot run as root in production builds". I searched a bit and found that I must have a rooted kernel for this to work. (I guess it's different from the root method I tried in "how to root vibrant").
Anyway the second way worked, where i replaced mntblock3 with stl9 for my phone. I tried the rm command and it worked! However as soon as I exited terminal, I couldn't delete other files. I had to retype the command. I can't do this everytime I need access in System folder. Why is this happenning? Does this have something to do with the fact that root explorer cannot change r/w to r/o mode while in system folder?
what if you open Superuser
Click on Root Explorer.
Click on Forget.
Open Root Explorer and grant Root Access and check to remember it.
work now?
Moved to Q&A, please post in the correct section.
s15274n said:
what if you open Superuser
Click on Root Explorer.
Click on Forget.
Open Root Explorer and grant Root Access and check to remember it.
work now?
Click to expand...
Click to collapse
No it didn't work. I also installed the latest version of SuperUser 2.3.6.1. But without a difference unfortunately.
What works for me, is installing sgs tools, and whenever I want to do write operations on system folder, run the appropriate script from sgs and then use root explorer......
Although I think there's something wrong? Why doesn't the mount r/w button work in root explorer, and why do I have to remount the file system through SGS tools, every time for it to work?
makes no sense to me either. Have you uninstalled RE and the installed it back granting root once reinstalled?
Yes several times.....
I am giving up. I just have to go through the whole process every time. I found some other people having this issue. I am on stock JI6 firmware. Maybe when I read a little bit more I will flash a custom rom.
Download and install Super Manager. Pretty handy program to use for Root users.
I'm not sure what the issue is,but mine does it too. I'm running the "unofficial" froyo JK2 build,flashed via ODIN,and I'm having the same issues. root works,root file explorer is stuck in rw,won't let me switch to ro,and it can't do anything to files in / or /system. manually remounting it from terminal or sgs tools works.
msnuser111 said:
I'm not sure what the issue is,but mine does it too. I'm running the "unofficial" froyo JK2 build,flashed via ODIN,and I'm having the same issues. root works,root file explorer is stuck in rw,won't let me switch to ro,and it can't do anything to files in / or /system. manually remounting it from terminal or sgs tools works.
Click to expand...
Click to collapse
At least I am not the only one with this problem.... haha
I forgot to mention that I use Root Explorer version 2.12.2
When I try a custom Rom I will post the results....
^ why not get the update, .4 is the most recent build. Do you have an illegal copy?
It's not only root explorer. It happens with other file explorers too like android mate and super manager... Inside system folder whatever, I do doesn't happen unless I unmount and remount like before

[Q] How to ADB push?

I'm trying to push files to /system via ADB. However I'm having problems (getting permission errors). I am running Eclipse 2.0.2, so yes, my phone is rooted, I have su and busybox.
Phone is connected to PC and is set as "USB Mass Storage".
USB Debugging is ON
Here is my CMD log:
Code:
C:\android-sdk\tools>adb remount
remount failed: Operation not permitted
I tried to remount and it failed
Code:
C:\android-sdk\tools>adb push C:\myfile.apk /system
failed to copy 'C:\myfile.apk' to
'/system/myfile.apk': Read-only file system
I tried to push, and got a READ-ONLY FILE SYSTEM error (keep this in mind)
Code:
C:\android-sdk\tools>adb shell
$ adb push C:\myfile.apk /system
adb push C:\myfile.apk /system
adb: permission denied
I try to push inside of ADB shell. Nothing again...
Code:
$ su
su
# mount -o remount,rw /dev/block/mtdblock4 /system
mount -o remount,rw /dev/block/mtdblock4 /system
# exit
exit
I go into SU and attempt to remount the /system
Code:
$ adb push C:\myfile.apk /system
adb push C:\myfile.apk /system
adb: permission denied
$ exit
exit
I go back up to ADB shell and try to push again... same error as before
Code:
C:\android-sdk\tools>adb push C:\myfile.apk /system
failed to copy 'C:\myfile.apk' to '/system/myfile.apk': Permission denied
I go back to the main command line and try to push again. This time I get PERMISSION DENIED. This error is different than before.
Any help on the matter?
I've read about ro.secure needing to be set to 1, but I need to edit the boot.img in order to do this, correct? Does that require an unlocked bootloader? Is root ADB even possible on the DX2.
Thanks!
I am no expert (don't even know if i know enough to b called a newb) but maybe try a root explorer. I use es file explorer because it's free. In settings check root explorer and mount file system. I received similar errors and this solved my problem.
Sent from my DROID X2 using XDA App
I'm familiar with root explorer, it's easy. I'm wanting to be able to use ADB though. Your post made me try something new though. I plugged my phone into my PC, then went into root explorer and mounted everything as RW. But, still was unable to push via ADB. Thanks for the reply though
So, how can I get ADB working?
wesf90 said:
I'm familiar with root explorer, it's easy. I'm wanting to be able to use ADB though. Your post made me try something new though. I plugged my phone into my PC, then went into root explorer and mounted everything as RW. But, still was unable to push via ADB. Thanks for the reply though
So, how can I get ADB working?
Click to expand...
Click to collapse
I was using adb also and had similar problems. After i changed those settings i was able to push a file. I had to have system mounted.
Sent from my DROID X2 using XDA App
No luck on my end :/
Sorry i couldn't be more help. I am new to adb and may have done more to get it working. I'm sure there's someone else around here that can help u out.
Sent from my DROID X2 using XDA App
Make sure there are no spaces in the file path to your android-sdk folder. Can't say if this is your issue but its worth a shot as it has always caused weird problems with android development since day one.
Sent from my DROID X2 using Tapatalk
Ro.secure is in your local.prop on the root of your phone. As far as your issue you have to reset permissions in order to push to /system. I saw that you were trying to do that but with no success. I believe I know what will help but I will have to find it and repost.
http://forum.xda-developers.com/showthread.php?t=1133528
Ok look at the command lines at the bottom of the op. You are going to use adb shell. Follow that almost exactly but adjust according to your directories. Should go into adb shell, gain su permissions, mount /system rw, push your apk, then don't worry about remounting as ro, just reboot. Pay close attention to spaces.
Sent from my DROID X2 using xda premium
CadenH said:
Ro.secure is in your local.prop on the root of your phone. As far as your issue you have to reset permissions in order to push to /system. I saw that you were trying to do that but with no success. I believe I know what will help but I will have to find it and repost.
http://forum.xda-developers.com/showthread.php?t=1133528
Ok look at the command lines at the bottom of the op. You are going to use adb shell. Follow that almost exactly but adjust according to your directories. Should go into adb shell, gain su permissions, mount /system rw, push your apk, then don't worry about remounting as ro, just reboot. Pay close attention to spaces.
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Took me a few days to be able to getting around to trying this, but it didn't work :/ I'm still getting all of the same errors. The /system just doesn't seem to want to mount as RW (even though it is possible when using root explorer).
As for ro.secure in my local.prop, I'm able to edit this but it resets on reboot because (from what I've read) this is a file generated by the kernel
Anyone else have ideas?
Wes
wesf90 said:
Took me a few days to be able to getting around to trying this, but it didn't work :/ I'm still getting all of the same errors. The /system just doesn't seem to want to mount as RW (even though it is possible when using root explorer).
As for ro.secure in my local.prop, I'm able to edit this but it resets on reboot because (from what I've read) this is a file generated by the kernel
Anyone else have ideas?
Wes
Click to expand...
Click to collapse
Moon shadow has a post in development to mount system rw
It's some type of script u run before adb or something
I don't know anything bout adb
But I do know he created it for this reason
Check it out
It's prolly got the info you need
ashclepdia said:
Moon shadow has a post in development to mount system rw
It's some type of script u run before adb or something
I don't know anything bout adb
But I do know he created it for this reason
Check it out
It's prolly got the info you need
Click to expand...
Click to collapse
Thanks for that! It's not quite what I'm aiming to eventually do, but did give me more insight on how the whole adb/shell/su systems work. From inside of su, I was able to mount the /system as RW, however I'm only able to do this from inside of SU. I want to be able to do this from the initial CMD so that I can ADB PUSH from my computer to the phone.
Here's my latest log:
Code:
C:\android-sdk>adb shell
[[TRYING TO MOUNT FROM ADB SHELL]]
$ mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount: Operation not permitted
[[TRYING TO MOUNT FROM ADB SHELL USING BUSYBOX]]
$ busybox mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
busybox mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount: permission denied (are you root?)
[[GO TO SU]]
$ su
su
[[MOUNTING AS RW SUCCESSFUL]]
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
[[COPYING A FILE INSIDE /SYSTEM SUCCESSFUL]]
# cp framework/framework-res.apk framework/framework-res-test.apk
cp framework/framework-res.apk framework/framework-res-test.apk
[[REMOUNTING /SYSTEM AS RO]]
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
[[ATTEMPTING TO COPY AGAIN, FAILED]]
# cp framework/framework-res.apk framework/framework-res-test2.apk
cp framework/framework-res.apk framework/framework-res-test2.apk
cp: can't create 'framework/framework-res-test2.apk': Read-only file system
#
So now the question is, how do I mount as R/W so I can use ADB push?
Wes
Maybe its because im tired but im confused as to why it wont let you push your files if you have remounted as rw. At that point it should be cake. You gained access to system by remounting it as rw successfully already.
Sent from my DROID X2 using xda premium
wesf90 said:
So now the question is, how do I mount as R/W so I can use ADB push?
Wes
Click to expand...
Click to collapse
Try:
Code:
adb devices
adb remount
adb push [filename] [destination]
adb reboot
the "adb remount" remounts the fs RW instead of the default RO.
I'm no expert in ADB, but I had run into the same issue as you and for me the fix was to go into ADB SHELL , then type SU to get SU access, then type exit twice to get out of shell completely. Then I tried pushing the APK and it worked fine with no read only errors.
This worked for me on my SGS2, could work for you ! Goodluck !
Come to IRC and I can help you with this. http://webchat.freenode.net Come to the #cm7dx2 channel. I'm usually there... Look for the nick(s) Moon|Work|(something), Moon|Home|(something), or MoonShadow-NM. If the (something) says Busy, I might not answer right away. If it says Away, I'm away from the keyboard and you won't receive a response until I return.
Ciao!
Any update
did you ever get this figured out? I'm having the same frustrations on mine. Mine won't install the 2.3.5 update due to it not recognizing the Quickoffice.apk and I'm trying to push the files manually, but I'm having no luck getting past the same you've posted here.
hellhunter said:
did you ever get this figured out? I'm having the same frustrations on mine. Mine won't install the 2.3.5 update due to it not recognizing the Quickoffice.apk and I'm trying to push the files manually, but I'm having no luck getting past the same you've posted here.
Click to expand...
Click to collapse
I've got a better idea to fix your issue brotha!
From my nexus tappin the talk
<edit post successful>
hellhunter said:
did you ever get this figured out? I'm having the same frustrations on mine. Mine won't install the 2.3.5 update due to it not recognizing the Quickoffice.apk and I'm trying to push the files manually, but I'm having no luck getting past the same you've posted here.
Click to expand...
Click to collapse
Do this
Sbf to 2.3.4
(or 2.3.3& take one ota To get to 2.3.4...however you want to do it..just be bone stock 2.3.4 )
Root your device.
BUT DO NOT USE ZERGRUSH TO ROOT
Use petes Motorola one click root method.
Then continue the process as normal from there on out.
Trust me in this. Zergrush root method is not playing nice with your /system partition, (if you notice during the root process it might say something like "making room in system,"= or "moving/deleting app to make room" something similar)
And when it does that, it's messing up how the update checks for untouched stock apps.
Let me know how it goes.
This solution has worked for COUNTLESS others so far, zergrush has always been the culprit when it comes to failing to find certain apk or system file that needs to be there for the update to install.
From my nexus tappin the talk
<edit post successful>
jamesh0317 said:
Try:
Code:
adb devices
adb remount
adb push [filename] [destination]
adb reboot
the "adb remount" remounts the fs RW instead of the default RO.
Click to expand...
Click to collapse
This won't work with Eclipse since it's not using 2nd init. I asked this question in the Eclipse forums and Nitro responded with the following:
Not without using 2nd init. All of that works due to being able to load its own init.rc which starts services and passes parameters, etc.. during boot time. It is possible to make a stock rom use 2nd init. CM9 will not even have root enabled by default. The only other way to push stuff is to enable root shell prior to pushing.
Click to expand...
Click to collapse
I know that CM7 allows using the adb remount, but that's because it's using 2nd init. I had also asked the question about why CM7 defaults to root shell when you adb shell into it and that's why he mentions how CM9 won't have root enabled by default.
The way I push to Eclipse is to run root explorer on my phone and mount the directory r/w. Then, I can use "adb push" to the phone.
ashclepdia said:
Do this
Sbf to 2.3.4
(or 2.3.3& take one ota To get to 2.3.4...however you want to do it..just be bone stock 2.3.4 )
Root your device.
BUT DO NOT USE ZERGRUSH TO ROOT
Use petes Motorola one click root method.
Then continue the process as normal from there on out.
Trust me in this. Zergrush root method is not playing nice with your /system partition, (if you notice during the root process it might say something like "making room in system,"= or "moving/deleting app to make room" something similar)
And when it does that, it's messing up how the update checks for untouched stock apps.
Let me know how it goes.
This solution has worked for COUNTLESS others so far, zergrush has always been the culprit when it comes to failing to find certain apk or system file that needs to be there for the update to install.
Click to expand...
Click to collapse
I think I may have tried that in one of my iterations. Originally I had it rooted with One-Click and then I was having issues with the 2.3.5 OTA update (quickoffice.apk) and at this point I've SBF'ed and rooted it probably 5 times this week so far. Rooted with both One-click and zergRush at various times. Actually I think every time except this last time has been with one-click. So I don't think that has seemed to make a difference for me so far. I can try it again, but if there's any other advice to throw out in the mean time, I'll take it.
Alternatively, I may take the new phone (the first replacement they sent had 2.3.5 on it, but a bad menu key causing the phone to flip out), load Titanium Backup on it, backup all the system apps and restore them to my original phone. Worst case is I have to SBF it again. But that seems like a logical process since I will have two phones available.

[Q] 4.0.3 HTC Temp Root Question

Hello everybody,
i have gained root access to my phone via backup/restore method through adb where local.prop is stored in /data/. So when i log onto my phone with adb i have root access. I copied busybox, su and the superuser.apk to the right place and removed the local.prop file again. After a reboot I was hoping to remove some crapware off my phone but to my surprise the binaries i copied vanished from the filesystem. So the phone reverted the changes by itself. I did this process several times copying busybox and su to various places referred to by $PATH, but it´s everytime the same after i reboot. The files are gone.
After the first attempts failed i tried to make changes to my phone while logged in as root. I wanted to uninstall unnecessary packages with "pm uninstall" but that failed also. The command just responds "failed". Even when /system is mounted rw (it remounts itself to ro after a while though). I´ve also made changes to /init.rc but they are also gone after a reboot as other changes i´ve made. Basically i wasn´t able to accomplish anything with root access no matter what i did.
So what i want to know is how this black magic works andy why i cant do anything with root. I know how to achieve real root through htc dev and various other methods.
Thanks for reading!
nasenstueber said:
Hello everybody,
i have gained root access to my phone via backup/restore method through adb where local.prop is stored in /data/. So when i log onto my phone with adb i have root access. I copied busybox, su and the superuser.apk to the right place and removed the local.prop file again. After a reboot I was hoping to remove some crapware off my phone but to my surprise the binaries i copied vanished from the filesystem. So the phone reverted the changes by itself. I did this process several times copying busybox and su to various places referred to by $PATH, but it´s everytime the same after i reboot. The files are gone.
After the first attempts failed i tried to make changes to my phone while logged in as root. I wanted to uninstall unnecessary packages with "pm uninstall" but that failed also. The command just responds "failed". Even when /system is mounted rw (it remounts itself to ro after a while though). I´ve also made changes to /init.rc but they are also gone after a reboot as other changes i´ve made. Basically i wasn´t able to accomplish anything with root access no matter what i did.
So what i want to know is how this black magic works andy why i cant do anything with root. I know how to achieve real root through htc dev and various other methods.
Thanks for reading!
Click to expand...
Click to collapse
is your RECOVERY.img
and beside i dont really think your /system is fully mounted rw
mauricio.valladolid said:
is your RECOVERY.img
and beside i dont really think your /system is fully mounted rw
Click to expand...
Click to collapse
Thanks for the reply. i use mount -o remount,rw /system as mount command to get read/write permission on /system. If there is something more to do please let me know. And if the behavior i ve seen is caused by the recovery.img is there something i can do about it?
nasenstueber said:
Thanks for the reply. i use mount -o remount,rw /system as mount command to get read/write permission on /system. If there is something more to do please let me know. And if the behavior i ve seen is caused by the recovery.img is there something i can do about it?
Click to expand...
Click to collapse
why dont you just install ext4 recovery and flash supersu.zip?
I really dont get it why are you trying to do it the hard way

Messed up /data/apk - Help?

The problem:
I rooted my Samsung Galaxy Ace and went exploring the root directory with Root Explorer. I renamed the folder "apk" found in /data to "apk_old", thinking that if everything worked, I could just delete it as it contained a handful of stock apks as well as several apps installed from the market. At the time, I though apks were needed just for installation and that by deleting the folder I would save ~30MB of internal memory. Well, I turns out I was horribly wrong. Several stock apps, such as Youtube or Maps and all market apps that were installed in internal memory have stopped working. In the app drawer, their icons have turned into those default apk icons and their names into com.something.blabla. I was getting crashes every 1-2 minutes from those apps. The widgets on my home screen, such as Google search or Homework 4x2 have also stopped working.
What I've tried:
*renaming the folder back to "apk", obviously. That didn't work, it said something like "execution failed"
*making a copy of the folder - failed
*zipping the folder - failed
*thinking there was a problem with Root Explorer, I installed Total Commander and Solid Explorer hoping I could rename the folder back. Total Commander cannot open the /data folder, while Solid Explorer says the /data folder is empty
*"pulling" all of "/data" with ADB - 0 files pulled.
However, as I was trying to clean up my own mess, things changed a bit. At some point the crashes stopped and all of the "corrupt" apps have simply gone away from the app drawer. While I was unable to do anything with the "apk_old" folder in /data, something changed so that right now I can't even access /data anymore.
So yea, I have a bad feeling that somehow everything inside the /data folder has been wiped, though I sure hope I'm wrong. Anyone have anything to advise?
Oh, and I also noticed that Superuser is gone. I tried re-rooting my phone from this link, it worked the first time I rooted, but not now...
http://forum.xda-developers.com/showthread.php?t=1552792
I don't know exactly what you have in /data/apk I guess is the same I have in /data/app all the installed package.apk
Since your system is compromised I would avoid to use programs from it like Root Explorer to change anything, and for the other programs looks like they don't have root access.
I would try with plain adb: http://forum.xda-developers.com/showthread.php?t=2141817
Once you have your phone connected with adb shell you can go root:
Code:
$ su
to list files and directories in /data
Code:
# ls /data
and then to rename the folder
Code:
# mv /data/apk_old /data/apk
then reboot the phone
good luck
I'm assuming those # signs were suppose to be $'s?, Anyways, what I typed into adb:
1. adb shell
2. $ ls data
What I get:
opendir failed, Permission denied
Another atempt:
1. adb shell
2. $ su
What I get:
su, and after a long pause - Permission denied
eh? So, apparently I can't get root access, what now?
the dficua
Ha, made progress. I installed Superuser through adb and it gave me permission to access data and to rename apk_old back to apk. However, the folder has been wiped of all the apps. Luckily, I have a friend who also has a Galaxy Ace, I'll just copy the folder and paste it into /data, hopefully i'll bring back the default apps.
$ is the normal shell
# is root shell
I forgot to tell you to try that on recovery mode to prevent the calling of SuperUser to grant privilegs, su binary itself should be in /system/xbin
When you restore apps remember also to fix permissions, user and group, it should be something like this:
# chmod 0664 /data/apk/*.apk
# chown system:system /data/apk/*.apk
check the right values in your friend's phone.

Categories

Resources