• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Fixing boot loop after deleting /system/app

xuare

Newbie
Dec 22, 2011
19
0
/in my infinite wisdom I decided that since I have done this successfully under linux for /lib and /var, that deleting the /system/app directory and symlinking it to the sdcard would be easy! Now I have issues, because the SDcard isn't mounted at boot.

To further complicate it, I turned off USB debugging just prior for other reasons. So, I don't think I could get into the shell via adb to copy the sdcard files back.

I was wondering if there is another way to restore the directory, short of unsoldering the flash chip. As I can see it, either running a shell from boot or enabling USB access despite debugging being off. could work easily. Or perhaps reformatting the SDcard to ext2 and restoring the file structure would let it be mounted at boot, thus allow the symlink to be active?
 
I did use titanium to back up, however I'm not sure how that would do anything since the boot process loops without providing a GUI and USB Debug is off. Also, wouldn't the symlink of /system/app --> /sdcard/app just dump the apps back to the sdcard when restore is activated?
 
Upvote 0
I could never get CWM on the Prevail because plugging in the USB after putting it into download mode caused the entire computer to freeze, then it would reject the device until it was allowed to boot normally. (Done under Ubuntu using VMWare to run ODIN)

I have found that I can still access the shell in adb by booting into recovery mode. The downside is su segfaults. This means I can copy / mount items in shell and pushing files from adb also get a permission denied error.

I'm trying to piecemeal the one click root so I can add a line item to mount the sdcard and restore the app directory RIGHT when root is obtained. Other than this, I can't think of another option. Basically i'll add these commands into the 'one click root' line in the Linux/Mac shell file:

Code:
$adb remount
# Added lines for restoring the app directory
$adb shell 'mount -t vfat /dev/block/mmcblk0p1 /sdcard'
$adb shell 'rm /system/app'
$adb shell 'cp -R /sdcard/app /system/app
# Done adding lines

I also used the adb shell to start /system/bin/debuggerd. I'll let you know how it goes. Also, if there are any other ideas, please let me know.
 
Upvote 0
adb remount and others don't work. I'm having issues executing my initial idea with the computers available while away from home.

Is there a way to get root in the shell without a reboot? I'll need to check the list of binaries that exist, but if anyone has ideas handy, that would be helpful.

I do know I can upload to /data/local/tmp/
 
Upvote 0
Yeah, if the trick above doesn't work reflashing is the other option. Once that's done I have plenty of places /system/app is backed up to (including w/ Titanium). My issue was finding a quicker way to achieve success, many of which require getting root on the shell without Superuser.apk installed (busybox and other rooting apps/binaries are installed)
 
Upvote 0
I haven't /data/app should be intact, minus changes from the factory reset attempt. Good idea, I'll try to look into it. Not sure how much it can help if I cant change system/app, since thats where init looks for the system apps (I think)? If I can change that location without root, that would be helpful...
 
Upvote 0
Its not too hard, if you can get a copy of shabbymod (before odin etc.) it copies files using a script. Just remover all directories except apps empty apps folder that was included and copy your set from the SD card and run the script. That OUGHT to replace the symlink (remove the SD card and test it) with the folder and apps inside.
 
Upvote 0
-I do not have write access to /data/app, so that is tossed out.
-Reformatting the sdcard to ext did not cause vold.fstab to mount it at boot. Since I can't su I won't be able to mount it manually, either
-There are issues with running the root script due to the reboot needed in the middle and the lack of USB debug being on

Now on to trying ODIN to reflash. Does anyone know if ODIN function properly under Windows 2000? It the only thing I have handy currently
 
Upvote 0
-I do not have write access to /data/app, so that is tossed out.
-Reformatting the sdcard to ext did not cause vold.fstab to mount it at boot. Since I can't su I won't be able to mount it manually, either
-There are issues with running the root script due to the reboot needed in the middle and the lack of USB debug being on

Now on to trying ODIN to reflash. Does anyone know if ODIN function properly under Windows 2000? It the only thing I have handy currently
I think it will work on win 2000 but that is only a guess.
 
Upvote 0
I found some WinXP love. ODIN is cranking but it's taking forever. I didn't specify a BOOT image and to became stuck on downloading BOOT for 10 minuets. Restarted it with local copy files and now it's hanging after the last "big partition size" warnings.

Why can nothing ever be easy?
 

Attachments

  • doh.jpg
    doh.jpg
    119.1 KB · Views: 122
Upvote 0
I found some WinXP love. ODIN is cranking but it's taking forever. I didn't specify a BOOT image and to became stuck on downloading BOOT for 10 minuets. Restarted it with local copy files and now it's hanging after the last "big partition size" warnings.

Why can nothing ever be easy?

Re-edit; either I, at one point had a different version of Odin, or had confused myself with another phone. But maybe try using all 3 files (boot, pda, and phone)
 
Upvote 0
Flashing boot gives an immediate error "Destroy Instant". This occurs even with the battery and SD card removed.

going to try to reboot both the phone and XP...and pray

EDIT: Moving Odin and the image files From the desktop to the c: drive helped (AMSS dl running). So, for Odin to work, don't

a) Run it from a network drive
b) Run it using any directory with a space, alias, or skyline in the path

More updates as I get them...

EDIT2: AMSS bombed. It has been running for over 270 minuets. Now we're back to square one. I have no idea why my phone refuses to flash. Perhaps I should take this to an ODIN thread?
 

Attachments

  • doh.jpg
    doh.jpg
    126.6 KB · Views: 157
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones