[Guide]How to recover from a bootloop - Galaxy S Plus I9001 Android Development

Guide: How to Recover from a bootloop​by brooplank1337​
This guide will learn you the common ways of fixing a bootloop, how to create a custom CWM Fix-Zip and how to use ADB to recover from a bootloop.
Chapters:
Chapter 1: Finding the cause of the bootloop
Chapter 2: Using a CWM ZIP as solution
Chapter 3: Using ADB as solution
Chapter 1: Finding the cause of the bootloop
Bootloops are mainly caused because system files interfering with each other which causes instability and/or crashes at the boot sequence.
To find the cause of a bootloop you have to think about what you did before getting the bootloop.
Choose one of the following reasons that caused the bootloop for you and try out its solution.
- After flashing a new rom
If you flash a new (base)rom with odin your /data will be kept. This means your old dalvik-cache will be used for the new system files which would result in a bootloop, to fix this problem:
1. Start your phone in CWM Recovery
2. Go to Advanced
3. Choose "Wipe dalvik-cache"
4. Now go to "Mounts & Storage"
5. Choose "Wipe /cache"
6. Reboot your phone
if the problems still exists after doing that and you're sure it's not related to the rom, then you need to do this:
1. Start your phone in CWM Recovery
2. Now go to "Mounts & Storage"
3. Choose "Wipe /data"
4. Choose "Wipe /cache"
5. Reboot your phone
- After restoring a system only backup
This one is actually the same as the above one, since only /system is restored (advanced restore) there is an incorrect dalvik-cache present which will cause the bootloop. perform the same steps as above to solve the problem.
- After installing a Mod / Theme or UOT Kitchen output
When you install a Mod / Theme or UOT Kitchen output and you get a bootloop, you know there is something wrong with the file that you are installing. This is mostly caused by an incorrect BaseROM of the mod/theme, but can also happen if the creator just didn't create it properly.
Wiping dalvik-cache won't be enough to fix this, you will need to open the zip on your computer and look at the files that are installed with the mod/theme. you can do this by looking into the system folder in the zip, there you can find the files that are being installed. for example:
You have installed an Extended Power Menu mod but it causes a bootloop, here is what you do:
1. Open the installation zip with Winrar (Extended Power Menu in this case)
2. Now look inside the "system" folder, in my case I found the framework folder inside the system folder
3. The framework folder contains: android.policy.jar & framework-res.apk, so these are the suspicious files.
4. What you simply do is searching for the original files (from your (base)rom) and drag them into the framework folder (inside winrar)
5. Now it will ask for a compression level, choose "Store" and the archive will be done in seconds.
6. You will need to put the file on your external sdcard using the "Mount USB Storage" option in CWM under "Mounts & Storage"
7. Install the zip just as you did with the mod, you should now be bootloop free, if not reinstall the zip with a mounted /system (Mounts & Storage > Mount /system) (and you can optionally wipe /cache and /dalvik-cache, this will never harm any file/setting.
Q: Ok... but I have no external sdcard.. how to fix it then?
A: Have a look at the "Using ADB as solution" chapter
- After setting wrong permissions
Android is very dependent on the right permissions, if you adjust file permissions incorrectly you could get a bootloop, giving a file to less permissions would break it, but also giving a file to much permissions would break it. most common permissions of system files are:
- 644 (RW-R-R) - (this is best known system permission, it exists in /system/app, /system/framework, /system/etc, /system/lib and allot of seperate files)
- 755 (RWX-RX-RX) - (mainly used for /system/bin)
- 777 (RWX-RWX-RWX) - (used for scripts inside /system/etc/init.d and busybox files)
An easy fix is performing the "Fix permissions" option in CWM under Advanced. be sure to mount the partitions before running the fix. Although this doesn't cover all permissions. have a look at the CWM or ADB chapter to find the solution.
Chapter 2 Using a CWM ZIP as solution
Using the original cwm zip is the easiest way, since the zip is already created for you, you only need to replace the files with the original rom files. You can get those files from the deodex packages for baseroms which are posted on the forums. If you are using an odexed ROM, you can get your files from system.img.ext4 (open the baserom: *.tar.md5 with Winrar and extract system.img.ext4)
Now you can open system.img.ext4 with "DiskInternals Linux Reader". browse to the app/framework directory and extract the needed files from the image file.
Once you got the same files as present in the original CWM zip you can easily drag em into the archive, then choose "store" as compression level. Now finally you need to put it on your sdcard and install it.
If you don't have an external sdcard or you can't reach your internal sdcard (which is very likely when you have a bootloop), you can use ADB to push the zip to your phone, read about how to use ADB in Chapter 3.
Commands for updater-script (located in CWMFIX.zip/META-INF/com/google/android/)
Mount & Install
To mount the system partition:
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
To extract the system folder in your zip:
package_extract_dir("system", "/system");
Setting Permissions
To set permissions of an individual file:
set_perm(0, 0, Mod, "File here");
A working example:
set_perm(0, 0, 0644, "/system/build.prop");
To set permissions of a directory:
set_perm(0, 0, Mod, "Dir here without a trailing slash");
Setting Permissions Recursively
To set permissions to all files inside a directory (resursive):
set_perm_recursive(0, 0, 0755, Mod, "Dir here without a trailing slash");
A working example:
set_perm_recursive(0, 0, 0755, 0777, "/system/etc/init.d");
Chapter 3 Using ADB as solution
ADB can be used to access the phone while booting, be aware that some bootloops make it unable to use ADB since they do not go further then the samsung logo.
The only tricky part about using ADB with bootloops is that you have to do it on the right time, this is just after the Galaxy S Plus logo, so just when the bootanimation starts. The easiest way to enter your phone in this part is using a batch script that monitors the state of your device and connects directly when possible.
I use this script for example (requires adb.exe and the 2 dlls)
Code:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb push mycwmfix.zip /sdcard/mycwmfix.zip
adb reboot recovery
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push the specified cwmfix zip to your sdcard, and after that it will reboot in recovery so you can install the cwm fix you made.
You can also make an batch script that pushes the files automatically to your phone, here is an example:
Code:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb -d shell su -c "mount -o remount rw /system"
adb push framework-res.apk /system/framework/framework-res.apk
adb -d shell chmod 644 /system/framework/framework-res.apk
adb push SystemUI.apk /system/app/SystemUI.apk
adb -d shell chmod 644 /system/app/SystemUI.apk
adb reboot
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push framework-res.apk and SystemUI.apk to the directory it belongs to, after that it changes the permissions of the files to RW-R-R (644) and then it will reboot.
I hope you learned something from this tutorial, when I think I forgot something Ill add it later.

That's perfect thanks a lot brood

knank said:
That's perfect thanks a lot brood
Click to expand...
Click to collapse
Thanks

broodplank1337 said:
Guide: How to Recover from a bootloop​by brooplank1337​
This guide will learn you the common ways of fixing a bootloop, how to create a custom CWM Fix-Zip and how to use ADB to recover from a bootloop.
Chapters:
Chapter 1: Finding the cause of the bootloop
Chapter 2: Using a CWM ZIP as solution
Chapter 3: Using ADB as solution
Chapter 1: Finding the cause of the bootloop
Bootloops are mainly caused because system files interfering with each other which causes instability and/or crashes at the boot sequence.
To find the cause of a bootloop you have to think about what you did before getting the bootloop.
Choose one of the following reasons that caused the bootloop for you and try out its solution.
- After flashing a new rom
If you flash a new (base)rom with odin your /data will be kept. This means your old dalvik-cache will be used for the new system files which would result in a bootloop, to fix this problem:
1. Start your phone in CWM Recovery
2. Go to Advanced
3. Choose "Wipe dalvik-cache"
4. Now go to "Mounts & Storage"
5. Choose "Wipe /cache"
6. Reboot your phone
if the problems still exists after doing that and you're sure it's not related to the rom, then you need to do this:
1. Start your phone in CWM Recovery
2. Now go to "Mounts & Storage"
3. Choose "Wipe /data"
4. Choose "Wipe /cache"
5. Reboot your phone
- After restoring a system only backup
This one is actually the same as the above one, since only /system is restored (advanced restore) there is an incorrect dalvik-cache present which will cause the bootloop. perform the same steps as above to solve the problem.
- After installing a Mod / Theme or UOT Kitchen output
When you install a Mod / Theme or UOT Kitchen output and you get a bootloop, you know there is something wrong with the file that you are installing. This is mostly caused by an incorrect BaseROM of the mod/theme, but can also happen if the creator just didn't create it properly.
Wiping dalvik-cache won't be enough to fix this, you will need to open the zip on your computer and look at the files that are installed with the mod/theme. you can do this by looking into the system folder in the zip, there you can find the files that are being installed. for example:
You have installed an Extended Power Menu mod but it causes a bootloop, here is what you do:
1. Open the installation zip with Winrar (Extended Power Menu in this case)
2. Now look inside the "system" folder, in my case I found the framework folder inside the system folder
3. The framework folder contains: android.policy.jar & framework-res.apk, so these are the suspicious files.
4. What you simply do is searching for the original files (from your (base)rom) and drag them into the framework folder (inside winrar)
5. Now it will ask for a compression level, choose "Store" and the archive will be done in seconds.
6. You will need to put the file on your external sdcard using the "Mount USB Storage" option in CWM under "Mounts & Storage"
7. Install the zip just as you did with the mod, you should now be bootloop free, if not reinstall the zip with a mounted /system (Mounts & Storage > Mount /system) (and you can optionally wipe /cache and /dalvik-cache, this will never harm any file/setting.
Q: Ok... but I have no external sdcard.. how to fix it then?
A: Have a look at the "Using ADB as solution" chapter
- After setting wrong permissions
Android is very dependent on the right permissions, if you adjust file permissions incorrectly you could get a bootloop, giving a file to less permissions would break it, but also giving a file to much permissions would break it. most common permissions of system files are:
- 644 (RW-R-R) - (this is best known system permission, it exists in /system/app, /system/framework, /system/etc, /system/lib and allot of seperate files)
- 755 (RWX-RX-RX) - (mainly used for /system/bin)
- 777 (RWX-RWX-RWX) - (used for scripts inside /system/etc/init.d and busybox files)
An easy fix is performing the "Fix permissions" option in CWM under Advanced. be sure to mount the partitions before running the fix. Although this doesn't cover all permissions. have a look at the CWM or ADB chapter to find the solution.
Chapter 2 Using a CWM ZIP as solution
Using the original cwm zip is the easiest way, since the zip is already created for you, you only need to replace the files with the original rom files. You can get those files from the deodex packages for baseroms which are posted on the forums. If you are using an odexed ROM, you can get your files from system.img.ext4 (open the baserom: *.tar.md5 with Winrar and extract system.img.ext4)
Now you can open system.img.ext4 with "DiskInternals Linux Reader". browse to the app/framework directory and extract the needed files from the image file.
Once you got the same files as present in the original CWM zip you can easily drag em into the archive, then choose "store" as compression level. Now finally you need to put it on your sdcard and install it.
If you don't have an external sdcard or you can't reach your internal sdcard (which is very likely when you have a bootloop), you can use ADB to push the zip to your phone, read about how to use ADB in Chapter 3.
Commands for updater-script (located in CWMFIX.zip/META-INF/com/google/android/)
Mount & Install
To mount the system partition:
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
To extract the system folder in your zip:
package_extract_dir("system", "/system");
Setting Permissions
To set permissions of an individual file:
set_perm(0, 0, Mod, "File here");
A working example:
set_perm(0, 0, 0644, "/system/build.prop");
To set permissions of a directory:
set_perm(0, 0, Mod, "Dir here without a trailing slash");
Setting Permissions Recursively
To set permissions to all files inside a directory (resursive):
set_perm_recursive(0, 0, 0755, Mod, "Dir here without a trailing slash");
A working example:
set_perm_recursive(0, 0, 0755, 0777, "/system/etc/init.d");
Chapter 3 Using ADB as solution
ADB can be used to access the phone while booting, be aware that some bootloops make it unable to use ADB since they do not go further then the samsung logo.
The only tricky part about using ADB with bootloops is that you have to do it on the right time, this is just after the Galaxy S Plus logo, so just when the bootanimation starts. The easiest way to enter your phone in this part is using a batch script that monitors the state of your device and connects directly when possible.
I use this script for example (requires adb.exe and the 2 dlls)
Code:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb push mycwmfix.zip /sdcard/mycwmfix.zip
adb reboot recovery
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push the specified cwmfix zip to your sdcard, and after that it will reboot in recovery so you can install the cwm fix you made.
You can also make an batch script that pushes the files automatically to your phone, here is an example:
Code:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb -d shell su -c "mount -o remount rw /system"
adb push framework-res.apk /system/framework/framework-res.apk
adb -d shell chmod 644 /system/framework/framework-res.apk
adb push SystemUI.apk /system/app/SystemUI.apk
adb -d shell chmod 644 /system/app/SystemUI.apk
adb reboot
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push framework-res.apk and SystemUI.apk to the directory it belongs to, after that it changes the permissions of the files to RW-R-R (644) and then it will reboot.
I hope you learned something from this tutorial, when I think I forgot something Ill add it later.
Click to expand...
Click to collapse
Dear sir,
I tried every possible way to recover my handset but its not working as the permissions for SYSTEM folder are changed and adb cannot read it or write it.
i also tried to pull the original folder and push another new system folder so that the files are accessible but no success.
I also tried flashing boot,recovery,system images but no use.
what would you suggest in such situation as the shell su chmod and all the other files reside into system/bin folder.
please do try to check asap and reply.
thanks in advance

mat7961 said:
Dear sir,
I tried every possible way to recover my handset but its not working as the permissions for SYSTEM folder are changed and adb cannot read it or write it.
i also tried to pull the original folder and push another new system folder so that the files are accessible but no success.
I also tried flashing boot,recovery,system images but no use.
what would you suggest in such situation as the shell su chmod and all the other files reside into system/bin folder.
please do try to check asap and reply.
thanks in advance
Click to expand...
Click to collapse
My first advice is to not quote the OP.
Secondly, try to use the adb in recovery mode. If this doesn't work either, use the repartition thread guide to restore your /system partition.
Sent from my GT-I9001 using xda premium

pattern unlock, bootloop
I installed some frameworks, after that settings some features not working properly. yesterday i wanted to set pattern unlock and when i set it i immediately got bootloop.. please tell me what to do? should i flash stock setting mod? or something like it? (framework) i have xperia arc s stock 4.0.4 ...

I need HELP, guys! I am having a little problem and idk how to fix this. After flashing Infamous ROM, reboot, everything worked fine, but then I reboot the phone and it stuck in the bootloop, so I went to the TWRP and factory reset, reboot, still stuck in bootloop. So i went back and format data and flash it again. Everything works fine, then i try to reboot and it and stuck and the samsung screen AGAIN! So i went back to the Stock ROM do the same thing, first boot is fine, reboot and it stuck in the Samung Galaxy S4 screen. Any solution guys? I even tried fix permission . Still didntwork. HELP, PLEASE!!

minhthai17 said:
I need HELP, guys! I am having a little problem and idk how to fix this. After flashing Infamous ROM, reboot, everything worked fine, but then I reboot the phone and it stuck in the bootloop, so I went to the TWRP and factory reset, reboot, still stuck in bootloop. So i went back and format data and flash it again. Everything works fine, then i try to reboot and it and stuck and the samsung screen AGAIN! So i went back to the Stock ROM do the same thing, first boot is fine, reboot and it stuck in the Samung Galaxy S4 screen. Any solution guys? I even tried fix permission . Still didntwork. HELP, PLEASE!!
Click to expand...
Click to collapse
Obviously there is no Infamous ROM for I9001 - you're sure you flashed a ROM that fits to SGS+ please review this and maybe reflash a dedicated ROM.

minhthai17 said:
I need HELP, guys! I am having a little problem and idk how to fix this. After flashing Infamous ROM, reboot, everything worked fine, but then I reboot the phone and it stuck in the bootloop, so I went to the TWRP and factory reset, reboot, still stuck in bootloop. So i went back and format data and flash it again. Everything works fine, then i try to reboot and it and stuck and the samsung screen AGAIN! So i went back to the Stock ROM do the same thing, first boot is fine, reboot and it stuck in the Samung Galaxy S4 screen. Any solution guys? I even tried fix permission . Still didntwork. HELP, PLEASE!!
Click to expand...
Click to collapse
Two questions
1) on which phone did you flash this infamous rom?
2) tried wipe /system and tried it again?

minhthai17 said:
reboot and it stuck in the Samung Galaxy S4 screen.
Click to expand...
Click to collapse
this forum is for Samsung Galaxy S Plus man.... we can't help you... go in S4 section

minhthai17 said:
I need HELP, guys! I am having a little problem and idk how to fix this. After flashing Infamous ROM, reboot, everything worked fine, but then I reboot the phone and it stuck in the bootloop, so I went to the TWRP and factory reset, reboot, still stuck in bootloop. So i went back and format data and flash it again. Everything works fine, then i try to reboot and it and stuck and the samsung screen AGAIN! So i went back to the Stock ROM do the same thing, first boot is fine, reboot and it stuck in the Samung Galaxy S4 screen. Any solution guys? I even tried fix permission . Still didntwork. HELP, PLEASE!!
Click to expand...
Click to collapse
Format emmc and flash any stock ROM for ur device through Odin.
Reroot again and flash any custom ROM built for your device.
Sent from my GT-S7562 using xda premium

bootlooping after data restore to a new rom
hi, i installed jelly bam on my note i717 and it works great, but when i restore data from my stock laggy jelly bean it bootloops i tried doing fix permissions, wiping delvik cashe and cashe. i tried going back and restoring to old jelly bean and then backing it up again and flashing jelly bam again and after restoring data again with fix permissions it bootloops again. how can i safely restore data on my new rom? please help!
p.s. using twrp with cwm i couldn't even flash rom cuz it errored and aborted it every time.

GameOverMan said:
hi, i installed jelly bam on my note i717 and it works great, but when i restore data from my stock laggy jelly bean it bootloops i tried doing fix permissions, wiping delvik cashe and cashe. i tried going back and restoring to old jelly bean and then backing it up again and flashing jelly bam again and after restoring data again with fix permissions it bootloops again. how can i safely restore data on my new rom? please help!
p.s. using twrp with cwm i couldn't even flash rom cuz it errored and aborted it every time.
Click to expand...
Click to collapse
This is i9001 forum... BTW are you trying to restore system apps data?
Inviato dal mio GT-i9001 con topatalk 2

oh sorry didn't notice that. yes im just trying to restore data.

GameOverMan said:
oh sorry didn't notice that. yes im just trying to restore data.
Click to expand...
Click to collapse
I understand, but system apps data or user apps? You can't restore system apps data
Inviato dal mio GT-i9001 con topatalk 2

broodplank1337 said:
Guide: How to Recover from a bootloop​by brooplank1337​
This guide will learn you the common ways of fixing a bootloop, how to create a custom CWM Fix-Zip and how to use ADB to recover from a bootloop.
Chapters:
Chapter 1: Finding the cause of the bootloop
Chapter 2: Using a CWM ZIP as solution
Chapter 3: Using ADB as solution
Chapter 1: Finding the cause of the bootloop
Bootloops are mainly caused because system files interfering with each other which causes instability and/or crashes at the boot sequence.
To find the cause of a bootloop you have to think about what you did before getting the bootloop.
Choose one of the following reasons that caused the bootloop for you and try out its solution.
- After flashing a new rom
If you flash a new (base)rom with odin your /data will be kept. This means your old dalvik-cache will be used for the new system files which would result in a bootloop, to fix this problem:
1. Start your phone in CWM Recovery
2. Go to Advanced
3. Choose "Wipe dalvik-cache"
4. Now go to "Mounts & Storage"
5. Choose "Wipe /cache"
6. Reboot your phone
if the problems still exists after doing that and you're sure it's not related to the rom, then you need to do this:
1. Start your phone in CWM Recovery
2. Now go to "Mounts & Storage"
3. Choose "Wipe /data"
4. Choose "Wipe /cache"
5. Reboot your phone
- After restoring a system only backup
This one is actually the same as the above one, since only /system is restored (advanced restore) there is an incorrect dalvik-cache present which will cause the bootloop. perform the same steps as above to solve the problem.
- After installing a Mod / Theme or UOT Kitchen output
When you install a Mod / Theme or UOT Kitchen output and you get a bootloop, you know there is something wrong with the file that you are installing. This is mostly caused by an incorrect BaseROM of the mod/theme, but can also happen if the creator just didn't create it properly.
Wiping dalvik-cache won't be enough to fix this, you will need to open the zip on your computer and look at the files that are installed with the mod/theme. you can do this by looking into the system folder in the zip, there you can find the files that are being installed. for example:
You have installed an Extended Power Menu mod but it causes a bootloop, here is what you do:
1. Open the installation zip with Winrar (Extended Power Menu in this case)
2. Now look inside the "system" folder, in my case I found the framework folder inside the system folder
3. The framework folder contains: android.policy.jar & framework-res.apk, so these are the suspicious files.
4. What you simply do is searching for the original files (from your (base)rom) and drag them into the framework folder (inside winrar)
5. Now it will ask for a compression level, choose "Store" and the archive will be done in seconds.
6. You will need to put the file on your external sdcard using the "Mount USB Storage" option in CWM under "Mounts & Storage"
7. Install the zip just as you did with the mod, you should now be bootloop free, if not reinstall the zip with a mounted /system (Mounts & Storage > Mount /system) (and you can optionally wipe /cache and /dalvik-cache, this will never harm any file/setting.
Q: Ok... but I have no external sdcard.. how to fix it then?
A: Have a look at the "Using ADB as solution" chapter
- After setting wrong permissions
Android is very dependent on the right permissions, if you adjust file permissions incorrectly you could get a bootloop, giving a file to less permissions would break it, but also giving a file to much permissions would break it. most common permissions of system files are:
- 644 (RW-R-R) - (this is best known system permission, it exists in /system/app, /system/framework, /system/etc, /system/lib and allot of seperate files)
- 755 (RWX-RX-RX) - (mainly used for /system/bin)
- 777 (RWX-RWX-RWX) - (used for scripts inside /system/etc/init.d and busybox files)
An easy fix is performing the "Fix permissions" option in CWM under Advanced. be sure to mount the partitions before running the fix. Although this doesn't cover all permissions. have a look at the CWM or ADB chapter to find the solution.
Chapter 2 Using a CWM ZIP as solution
Using the original cwm zip is the easiest way, since the zip is already created for you, you only need to replace the files with the original rom files. You can get those files from the deodex packages for baseroms which are posted on the forums. If you are using an odexed ROM, you can get your files from system.img.ext4 (open the baserom: *.tar.md5 with Winrar and extract system.img.ext4)
Now you can open system.img.ext4 with "DiskInternals Linux Reader". browse to the app/framework directory and extract the needed files from the image file.
Once you got the same files as present in the original CWM zip you can easily drag em into the archive, then choose "store" as compression level. Now finally you need to put it on your sdcard and install it.
If you don't have an external sdcard or you can't reach your internal sdcard (which is very likely when you have a bootloop), you can use ADB to push the zip to your phone, read about how to use ADB in Chapter 3.
Commands for updater-script (located in CWMFIX.zip/META-INF/com/google/android/)
Mount & Install
To mount the system partition:
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
To extract the system folder in your zip:
package_extract_dir("system", "/system");
Setting Permissions
To set permissions of an individual file:
set_perm(0, 0, Mod, "File here");
A working example:
set_perm(0, 0, 0644, "/system/build.prop");
To set permissions of a directory:
set_perm(0, 0, Mod, "Dir here without a trailing slash");
Setting Permissions Recursively
To set permissions to all files inside a directory (resursive):
set_perm_recursive(0, 0, 0755, Mod, "Dir here without a trailing slash");
A working example:
set_perm_recursive(0, 0, 0755, 0777, "/system/etc/init.d");
Chapter 3 Using ADB as solution
ADB can be used to access the phone while booting, be aware that some bootloops make it unable to use ADB since they do not go further then the samsung logo.
The only tricky part about using ADB with bootloops is that you have to do it on the right time, this is just after the Galaxy S Plus logo, so just when the bootanimation starts. The easiest way to enter your phone in this part is using a batch script that monitors the state of your device and connects directly when possible.
I use this script for example (requires adb.exe and the 2 dlls)
Code:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb push mycwmfix.zip /sdcard/mycwmfix.zip
adb reboot recovery
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push the specified cwmfix zip to your sdcard, and after that it will reboot in recovery so you can install the cwm fix you made.
You can also make an batch script that pushes the files automatically to your phone, here is an example:
Code:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb -d shell su -c "mount -o remount rw /system"
adb push framework-res.apk /system/framework/framework-res.apk
adb -d shell chmod 644 /system/framework/framework-res.apk
adb push SystemUI.apk /system/app/SystemUI.apk
adb -d shell chmod 644 /system/app/SystemUI.apk
adb reboot
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push framework-res.apk and SystemUI.apk to the directory it belongs to, after that it changes the permissions of the files to RW-R-R (644) and then it will reboot.
I hope you learned something from this tutorial, when I think I forgot something Ill add it later.
Click to expand...
Click to collapse
Hey,
After trying to make a backup using cwm my phone got caught on a bootloop. I think the backup was not completed and I believe there was some sort of error (something about an image not being copied, I think). There is also a warning on the cwm recovery page that says "no file-context". What can I do?
Thank you

vascotto said:
Hey,
After trying to make a backup using cwm my phone got caught on a bootloop. I think the backup was not completed and I believe there was some sort of error (something about an image not being copied, I think). There is also a warning on the cwm recovery page that says "no file-context". What can I do?
Thank you
Click to expand...
Click to collapse
do you mean you flashed a backup and it is boot looping?

sa1tine said:
do you mean you flashed a backup and it is boot looping?
Click to expand...
Click to collapse
I was creating a backup of my current ROM (which is the default, factory version).

vascotto said:
Hey,
After trying to make a backup using cwm my phone got caught on a bootloop. I think the backup was not completed and I believe there was some sort of error (something about an image not being copied, I think). There is also a warning on the cwm recovery page that says "no file-context". What can I do?
Thank you
Click to expand...
Click to collapse
Probably your device ran out of free space. Try to delete some backups you've made before.

Hi,
I have CyanogenMod 10 installed on my I9001 and it worked perfectly for the past few months until I rebooted the phone today and now it is stuck on the CyanogenMod start screen. I had not installed/modified anything on my phone before rebooting...
I tried to wipe cache, but that did not help. Any idea how to fix this without deleting everything from the phone?
Thanks!!

Related

[HOWTO] UnRoot MyTouch 3G

!!WARNING!! THIS PROCESS MAY REQUIRE KNOWLEDGE OF THE LINUX OS BEYOND BASIC UNDERSTANDING
I did this on my own phone (original myTouch) and it worked. What is really handy is that you can manipulate anything within /data after flashing the NBH file and PRIOR to flashing the OTA update. Here is what I did:
Within recovery I put all the /data files together (moving /sd-ext/data to /data/data etc) and then ran a script which did this (0628 is just a handy way to know when you perform the backup):
NOTE: only run these commands after "mount data", "mount sdcard" are successful
Code:
busybox mkdir -p /sdcard/my_backup_data/2010_0628
rm -r /data/data/com.google*
rm -r /data/data/com.android*
for d in app app-private data
do
busybox tar -cvzf /sdcard/my_backup_data/2010_0628/$d.tgz -C /data $d
done
The removal of com.google and com.android is mostly for compatibility with system files. You are going to an older version of the OS.
Using the goldcard generator (http://psas.revskills.de/?q=goldcard) I entered my CID from the sdcard and put the goldcard.img on the card. I also placed the sappimg.nbh file on the sdcard. Now using VOLDOWN+POWER I flashed the phone back to its original state.
So now I can put in my "normal" sdcard that has recovery flasher, recovery-RA.img, modified DRC92 update.zip, DMD64 update.zip, all placed in the /sdcard root location. Using the recovery flasher I then flashed /sdcard/recovery-RA.img and went back into recovery.
NOTE: only run these commands after "mount data", "mount sdcard" are successful
Code:
for d in app app-private data
do
busybox tar -xvzf /sdcard/my_backup_data/2010_0628/$d.tgz -C /data
done
Now I have all previous apps and data loaded. So I had to boot the phone at least once and let it do its thing and then I was able to use RA's recovery to run fix_permissions. After that, all the apps worked (minus any beyond v1.5). So the last thing is to now get to v1.6 and make sure everything worked.
Once you verify everything is proper, you can copy the signed-opal-DMD64-from-DRC92.64f7dfbc.zip file into /cache (this allows easy upgrade later) and flash the signed-opal-DRC92-from-COC10.1c95e995-testkeys.zip file like any other within RA's recovery. After flashing, you will have everything stock. Once the update is completed you should instantly receive a notice that a new update has already been downloaded and is available.
I believe I have covered everything. These are the steps I used on the original myTouch to keep all my apps and settings and data after flashing the NBH file. If I left out something or you need further clarification, please ask.
this space held
hold this space

Android 2.3 (CM7) Font Replacement

Hey guys, I have a similar thread to this running on both CyanogenModForums and TypoPhile, but it seems as though I'm not going to find the help I need.
When I go to replace the fonts, I use two different methods. Both have ended in a bootloop for me as of 7RC2. I even know why the bootloop is happening, I just have no idea how to fix it.
The first method is in the terminal. For this to work, you need root (obviously), busybox, a terminal emulator and the fonts:
su
mount -o remount /dev/block/mtdblock4 /system
busybox cp /sdcard/Fonts/* /system/fonts
mount -o ro,remount /dev/block/mtdblock4 /system
sync
reboot
Unfortunately, the second mount command fails. It throws the error: filesystem is busy (not an exact quote because I don't really want to reboot to recovery again right now). Because it never remounts as r/o, the writing never gets done correctly and the system bootloops.
The second method is through Root Explorer.
I mount /system as r/w and then proceed to copy my fonts over (I've tried both using multi-select and copying one-by-one). Then, when I click mount R/O, I get the same problem. It won't remount. Therefore, same thing happens and bootloop ensues upon reboot.
Though I cannot imagine that it would matter, the fonts I am trying to use are as follows:
Liberation Sans => Droid Sans (Rg, Bd)
Terminus => Droid Sans Mono
Linux Libertine G => Droid Serif (Rg, It, Bd & BI)
I say that it shouldn't matter because this is exactly what I had for a very long time on 6.1.
I suspect that the problem may be coming from the fact that since 2.3, Android changed how the /system/fonts folder is setup, and I'm not sure how to handle the changes. If anyone is familiar at all with this, I would much appreciate any and all help you can send my way!
Bump. Please guys, any ideas are welcome. I really want to get to the bottom of this. Typographers are people too!
Same here, anyone has found something ?
ok I found that on CM7 forum :
Method 1: The Terminal Emulator
For this, you need root (obviously), busybox, a terminal emulator, ROM Manager and your fonts: They must already be renamed to which fonts you want them to replace (e.g., you could rename LiberationSans to DroidSans in order to use LibSans instead. For easiness, don't have any spaces in your pathname)
Step 1:
su
mount -o remount /dev/block/mtdblock4 /system
busybox cp /sdcard/[Font Dir]/* /system/fonts #Replace "[Font Dir]" with where ever you put your fonts (minus the "")
mount -o ro,remount /dev/block/mtdblock4 /system
sync
Step 2: If the second mount command does not work, try "umount -f /dev/block/mtdblock4" without the quotes. If that doesn't work, then you just have to hope that it will work anyways. If the second mount command succeeds, then you're done. It worked and your phone should now be using the new fonts. Skip to Method 1 > Step 4.
Step 3: Next, go into ROM Manager, and press the "Fix Permissions" option. Wait for it to finish going through everything, and then reboot. If your device bootloops, then something went wrong that ROM Manager's Permissions Corrector couldn't catch. In this case, I strongly recommend purchasing Root Explorer and giving it a go because Method 2 hasn't ever failed for me.
Step 4: If everything worked fine, then your fonts will already be used by the system (you don't even need to reboot!). However, if you now plan to backup your ROM, make sure that you reboot once first to make sure that the fonts survive and your system doesn't bootloop upon reboot.
Method 2: Root Explorer (Recommended)
For this method, you need root, possibly busybox (but I'm actually not sure about that), Root Explorer, ROM Manager and the fonts setup the same way they would have been for Method 1.
Step 1: Enter into Root Explorer and navigate to the fonts folder on your sdcard that has all of the renamed fonts. Press Menu > Multi-Select and select all of the fonts you wish to use. Then press "copy."
Step 2: Next, navigate to /system/fonts/ and press "Mount R/W" at the top of the screen. Press "Paste."
Step 3: Now comes the tedious part, long-press each file you replaced individually and select "Permissions." The permission set you want for each of these files is "r-xr-xr-x." So the first and last column should all be checked and the middle column should be empty. You can try to press "Mount R/O" at the top of the screen, but if it won't change, it will still be okay (It's not ideal, but it's happened to me, and it worked fine).
Step 4: Next, go into ROM Manager and hit the "Fix Permissions" option. Wait for it to go through everything and then "Voila!"
Step 5: If everything worked fine, then your fonts will already be used by the system (you don't even need to reboot!). However, if you now plan to backup your ROM, make sure that you reboot once first to make sure that the fonts survive and your system doesn't bootloop upon reboot.

[Q] [i9020a] Nexus S - can't remove / rename install-recovery.sh

Hello,
I have a Nexus S which I am trying to root and flash CWM recovery on. I've followed "The Unlockr's Guide" which was a tremendous help as well as kursk's "Step by Step ROOT Nexus S via ClockworkMod Recovery image (i9023 and i9020A)".
I am having issues however, renaming / removing the "install-recovery.sh" script. I've tried to rename it using Android Mate. I get the error message "failed to rename to install-recovery-no.sh".
I've also tried to use ADB Shell by trying:
"mount -o rw,remount /dev/block/mtdblock3 /system" which go the following error:
mount: operation not permitted
so I couldn't perform the rename using the mv command.
I really don't know what else to try... Any help would be appreciated.
Thanks.
Just start from begin again and use this guide. I have also i9020a and I was done in 15 minutes, newer did it before with Nexus S. good lack
Wrong thread sir!!!
However, back on subjkect,
type adb shell
cd to /
the cd to system/etc
from there, # mv install-recovery.sh install-recovery.sh.bak
if you are still having problems, i have a zip file removing this recovery-install.sh script. forgot who was the author though.( just saying so that you know merit goes to someone else) . just fflash from recovery.
http://db.tt/ooDaCnU
I just renamed it using root explorer. Worked fine for me
Thanks deeren,
That worked. It removed the recovery-install.sh script altogether. One question, if I ever want to go back to the stock recovery, is there a script I can use to bring it back?
deeren said:
Wrong thread sir!!!
However, back on subjkect,
type adb shell
cd to /
the cd to system/etc
from there, # mv install-recovery.sh install-recovery.sh.bak
if you are still having problems, i have a zip file removing this recovery-install.sh script. forgot who was the author though.( just saying so that you know merit goes to someone else) . just fflash from recovery.
Click to expand...
Click to collapse
AnalogTrail said:
Thanks deeren,
That worked. It removed the recovery-install.sh script altogether. One question, if I ever want to go back to the stock recovery, is there a script I can use to bring it back?
Click to expand...
Click to collapse
If you are on stock rom, then you can just reflash any stock rom (without wiping , so that you do not loose your data) and it will put back the script back.
you could also pull the script from any stock rom and push it back to your phone using adb.
move along, empty post, nothing to see here
I think..just flash any Stock ROM..
and your Stock Recovery will be back...
cmiiw
deeren said:
Wrong thread sir!!!
However, back on subjkect,
type adb shell
cd to /
the cd to system/etc
from there, # mv install-recovery.sh install-recovery.sh.bak
if you are still having problems, i have a zip file removing this recovery-install.sh script. forgot who was the author though.( just saying so that you know merit goes to someone else) . just fflash from recovery.
http://db.tt/ooDaCnU
Click to expand...
Click to collapse
Can You tell me how to use that script ., I mean I am a noob . Can you tell me what exactly to do with that file. Coz I have been trying to remove that .sh file for 6 hours now. No matter what i do ., whenever i run the android recovery it creates a new file again and shows that triangle with exclamation screen ., :'(

[Q] Samsung galaxy tab plus P6200

Hi.. I installed ICS on my Tab but i receive an wifi error... disconnect unexpectly... After factory reset I tried to instal again ICS stock using Odin but won't boot... My tab is using root... Please help my... I can't use my tab and i'm dead
Catalinq said:
Hi.. I installed ICS on my Tab but i receive an wifi error... disconnect unexpectly... After factory reset I tried to instal again ICS stock using Odin but won't boot... My tab is using root... Please help my... I can't use my tab and i'm dead
Click to expand...
Click to collapse
If you are stuck on the splash screen, the first thing to try is to wipe the cache and dalvik-cache from the recovery menu. A full wipe may also be required, although I would not recommend it until you try the suggestions below.
Use ADB (first install SDK)
HTML:
adb devices
HTML:
adb reboot
P6200
Doesn't start...What to do? I tried to instal a custon rom but same problem... Logo image appear and dead. I can acces download mode and CM6... How to fix this ugly problem?? Thanks
Catalinq said:
Doesn't start...What to do? I tried to instal a custon rom but same problem... Logo image appear and dead. I can acces download mode and CM6... How to fix this ugly problem?? Thanks
Click to expand...
Click to collapse
Bootloops are mainly caused because system files interfering with each other which causes instability and/or crashes at the boot sequence.*To find the cause of a bootloop you have to think about what you did before getting the bootloop.Choose one of the following reasons that caused the bootloop for you and try out its solution.- After flashing a new rom*If you flash a new (base)rom with odin your /data will be kept. This means your old dalvik-cache will be used for the new system files which would result in a bootloop, to fix this problem:1. Start your phone in CWM Recovery2. Go to Advanced3. Choose "Wipe dalvik-cache"4. Now go to "Mounts & Storage"5. Choose "Wipe /cache"6. Reboot your phoneif the problems still exists after doing that and you're sure it's not related to the rom, then you need to do this:1. Start your phone in CWM Recovery2. Now go to "Mounts & Storage"3. Choose "Wipe /data"4. Choose "Wipe /cache"5. Reboot your phone.
ADB can be used to access the phone while booting, be aware that some bootloops make it unable to use ADB since they do not go further then the samsung logo.*The only tricky part about using ADB with bootloops is that you have to do it on the right time, this is just after the Galaxy logo, so just when the bootanimation starts. The easiest way to enter your phone in this part is using a batch script that monitors the state of your device and connects directly when possible.
Using the original cwm zip is the easiest way, since the zip is already created for you, you only need to replace the files with the original rom files. You can get those files from the deodex packages for baseroms which are posted on the forums. If you are using an odexed ROM, you can get your files from system.img.ext4 (open the baserom: *.tar.md5 with Winrar and extract system.img.ext4)Now you can open system.img.ext4 with "DiskInternals Linux Reader". browse to the app/framework directory and extract the needed files from the image file.Once you got the same files as present in the original CWM zip you can easily drag em into the archive, then choose "store" as compression level. Now finally you need to put it on your sdcard and install it.If you don't have an external sdcard or you can't reach your internal sdcard (which is very likely when you have a bootloop), you can use ADB to push the zip to your phone, read about how to use ADB ..
HTML:
@echo off
cd /d %~dp0
echo.
echo Waiting for device...
adb wait-for-device
echo.
adb -d shell stop
adb push mycwmfix.zip /sdcard/mycwmfix.zip
adb reboot recovery
This script will wait for the device to become ready, when it's ready it freeze the device, so the script has more time to push the file (instead of keep rebooting). Then it will push the specified cwmfix zip to your sdcard, and after that it will reboot in recovery so you can install the cwm fix you made.
screen
Screen here
Catalinq said:
Screen here
Click to expand...
Click to collapse
How to fix it?
tab 2
Catalinq said:
How to fix it?
Click to expand...
Click to collapse
we have the same problem did u fix ung tab can u share with me thanks

cm10 roms don't flash. Status 7 error

I would like to explain my problem here. Almost two weeks ago I guess I flashed sense 4 build 7 by derefas and I guess i had a nand burn. No rom flashed at that time like cm10 roms. cm9 rom flashed but there were a lot of FC's at startup so I couldn't use them. Xenon rom and Ateeq rom only worked for me at that time but internal memory was very large and there was only 40 mb free space. Then I followed this guide by cute_prince
Ok guys, here I am posting NAND Recovery Procedure:
Download the following attachment.. Rename flash_erase.txt to flash_erase ( Its actually a binary file )
Copy this file to /system/xbin directory using Root Explorer. Set permission as 755
Make sure Root Access is enabled for both Apps and ADB in Developer settings
Connect phone to PC .. Now open a terminal ( I am using Ubuntu ) and type the following:
Code:
adb shell
su
cd /system/xbin
./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
Note: when you execute above command you may get an IO error.. Its OK, dont get panic
Now disconnect phone from PC.. Remove battery and reinsert it ..
Goto recovery and:
format /boot
format /system
wipe data / factory reset
Now install your favourite ROM
Once the ROM is booted, goto storage settings.. Everything should be fine now and you should get around 140MB free depending on your ROM
and then then the less internal memory problem at boot and fc's in cm9 rom, these problems were solved but the problem that cm10 roms don't flash and error appears like this one
"symlinks failed
file at bla bla bla couldn't be flashed
status 7"
This problem still persists while installing any jelly bean rom not for ics and sense roms flash but they simply bootloop. At htc beats audio screen they don't go any further.
please help me. I am stuck with this problem now for weeks now. Someone please end my misery.:crying::crying::crying::crying::crying::crying:
Possible method
Steps that I would recommend:
1. Remove the sd-ext, and format the SD-card.
1.5: Create a new sd-ext with an ext4 partition using any partition manager apps.
2. Get a superwipe.zip, by akya22, and get it onto your Sd card by any means available.
3. Redownload Beta #6, super-stripped gapps, and get them on your sd card.
4. Insert SD card in your phone.
5. Go to fastboot and flash a new recovery, twrp 2.4 , preferably, because it's official.
6. Reboot your phone using fastboot reboot command.
7. Go to recovery, and flash superwipe.zip.
8. Go to Wipe section, and wipe Cache, Dalvik cache, for security.
9. Do a factory reset once more, for security.
10. Flash CM10 first, and check if it gets flashed correctly.
11. Flash Gapps.
12. Reboot.
Don't think your NAND is burnt because less than 50 percent of memory is available in your device, after flashing CM10. It is normal.
If all these steps get executed correctly, then...
1. Install Solid Explorer on your device. It is the best app for adding scripts.
2. Get an int2ext+ or int2ext (recommended)(i am using beta #6 with int2ext) script by croniccorey.
3. Extract the script to the root of your SD Card. Its name would be "40int2ext", and can be found in the /system/etc/init.d/ folder of the zip file.
4. Open the ROM's zip file in one pane.
5. Browse to /system/etc/init.d . There will already be two files present.
6. Drag and drop the 40int2ext into this folder, from the other pane.
7. Now, if you see that there are 3 files in this folder, the script has been added.
8. Reboot into recovery and flash this ROM.
P.S.: Did you follow the NAND recovery procedure correctly?

Categories

Resources