1. Are you ready for the Galaxy S20? Here is everything we know so far!

Fixing boot loop after deleting /system/app

Discussion in 'Android Devices' started by xuare, Dec 22, 2011.

  1. xuare

    xuare Newbie
    Thread Starter

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



    1. Download the Forums for Android™ app!


      Download

       
  2. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    Restore your backup? (if no back up, shame on you. hail Odin!)
     
  3. xuare

    xuare Newbie
    Thread Starter

    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?
     
  4. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    I was referring to a nandroid backup (performed in clockwork recovery) titbac only backs up apps. recovery doesn't need the OS to load
     
  5. xuare

    xuare Newbie
    Thread Starter

    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 (Text):
    1. $adb remount
    2. # Added lines for restoring the app directory
    3. $adb shell 'mount -t vfat /dev/block/mmcblk0p1 /sdcard'
    4. $adb shell 'rm /system/app'
    5. $adb shell 'cp -R /sdcard/app /system/app
    6. # 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.
     
  6. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    Way above my pay grade, for now

    Edit: find someone with windows, and try Odin? Lol
     
  7. xuare

    xuare Newbie
    Thread Starter

    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/
     
  8. Bandaid

    Bandaid Android Enthusiast

    Xuare, when you get another pc to use, install odin. Then when your up and running, download Titanium Backup via the Market and bring your apps back.
     
    Lordvincent 90 likes this.
  9. xuare

    xuare Newbie
    Thread Starter

    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)
     
  10. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    Have you tried pushing the files to /data/app? (idk if u need root to do this, but just a thought)
     
  11. xuare

    xuare Newbie
    Thread Starter

    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...
     
  12. DarkStarr

    DarkStarr Member

    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.
     
  13. xuare

    xuare Newbie
    Thread Starter

    Thank you everyone for the ideas. I haven't had time to fiddle but hopefully I will by Friday. I'll let you know what I find
     
  14. new optimus

    new optimus Android Expert

    Do you have kumakernel on your phone?
    I believe you have root even while in recovery though since you symlinked /system/app it may not. did you at least use a ext type of file system on the sdcard?
     
  15. xuare

    xuare Newbie
    Thread Starter

    -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
     
  16. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    Well, which ever solution does end up restoring your phone, I would still recommend using Odin to atleast install cwm. Will save you a lot of headaches. I know it has for me. :)
     
  17. new optimus

    new optimus Android Expert

    I think it will work on win 2000 but that is only a guess.
     
  18. xuare

    xuare Newbie
    Thread Starter

    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?
     

    Attached Files:

    • doh.jpg
      doh.jpg
      File size:
      119.1 KB
      Views:
      100
  19. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    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)
     
  20. xuare

    xuare Newbie
    Thread Starter

    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?
     

    Attached Files:

    • doh.jpg
      doh.jpg
      File size:
      126.6 KB
      Views:
      141
  21. scary alien

    scary alien not really so scary
    VIP Member

    Guys,

    I've moved your thread to the root area.

    Cheers!
     
    Lordvincent 90 likes this.

Samsung Galaxy Prevail Forum

The Samsung Galaxy Prevail release date was April 2011. Features and Specs include a 3.2" inch screen, 2MP camera, GB RAM, MSM7627-3 processor, and 1500mAh battery.

April 2011
Release Date
0
Reviews
Loading...

Share This Page

Loading...