Tìm kiếm Blog này

Thứ Hai, 1 tháng 7, 2013

Hướng dẫn Dual boot Galaxy S3 với kernel Siyah 1.7.x.

Hướng dẫn Dual-boot Galaxy S3 với kernel Siyah 1.7.x.
Điều kiện cần thiết:
- Cả hai Rom đều là Rom JB (vì từ ver 1.6.x trở đi Siyah ko hỗ trợ ICS nữa).
- Có ít nhất 2GB trống trên SD card.
- Tải 2nd rom cần flash về chép vào thẻ nhớ.
- Trên 80% pin
- Flash ernel Siyah mới nhất, đã gồm cả recovery hỗ trợ dualboot Siyah 1.7.beta2
Vào việc thôi :D
TH1: Sử dụng Rom đang dùng như ROM PHỤ
-Sau khi flash siyah kernel ở trên, reboot vào recovery
-Backup nandroid rom đang dùng.
-Chọn dual-boot option/ Clone 1stROM to 2ndROM (hơi lâu)
-Go back – full wipe – sau đó flash Rom mới (hoặc restore)(Lúc này nó sẽ là Primary rom, Rom chính ).
-reboot, sau đó boot lại vào recovery và flash Siyah kernel 1.7.x cho Rom mới.
Xong.
TH2: Sử dụng Rom hiện tại như ROM CHÍNH
-Sau khi flash siyah kernel ở trên, reboot vào recovery
-Backup nandroid rom đang dùng.
-TrongDualboot options thực hiện các bước sau
Format 2ndROM system – Wipe 2ndRom data/cache- wipe 2ndROM davikcache. Sau đó flash Rom mới vào second rom bằng Install Zip to 2ndROM (Int hay Ext thì tùy bạn để file zip ở đâu)
-Xong rồi Reboot đi còn đợi gì nữa :D
Lưu ý: sau khi cài đặt, để đổi hai rom chính và phụ cho nhau, chỉ cần chạy Swap 1stRom and 2ndROM trong Dualboot option
Chào thân ái và quyết thắng.
Video S3 của mình Dualboot, từ giây 55 là boot vào 2ndROM :
Chịu khó đọc lướt qua FAQ sau trích từ XDA mình tổng hợp không theo thứ tự(lười dịch :p ).(db=dualboot)
6. “How to boot into primary rom?”
A. Wait for the 3 second timeout or press volume up/power to skip the timeout.
7. “How to boot into secondary rom?”
A. During the 3 second timeout, press volume down or home button.
8. “Is kernel partition shared?”
A. Yes. Same kernel boots both roms.
9. “If I flash another kernel (that doesn’t support db) do I lose dual booting?”
A. Yes
10. “I lost dualbooting after flashing another kernel. I didn’t do anything to second rom files in sdcard/.secondrom. How can I get db back?”
A. Just flash the latest Siyah.
11. “Will there be any performance degradation on the rom used as secondary?”
A. NO
12. “Will my phone run slow overall because of db?”
A. NO
13. “How to flash a newer version of 1st rom?”
A. As usual, just flash it from recovery.
14. “How to flash newer version of 2nd rom?”
A. Swap 1st and 2nd rom in recovery, flash the newer version, swap again.
15. “I miss the recovery I used before, so much..”
A. After you have setup dual booting, you can odin flash any recovery you like. It won’t break dualbooting. But when you wanna play with db settings later on, you need GM’s alternate recovery.
16. “User apps of 1st rom are automatically available for second rom?”
A. NO. However, if you had backed them up using Titanium Backup or similar apps, just restore apps while on second rom.
17. “I wanna keep separate backup for apps in both the roms, since I use one Rom for say entertainment and other productivity.”
A. Setup different backup directory in Titanium Backup in 1st and 2nd rom.
18. “I don’t see Stweaks app in second rom.”
A. Delete /system/.siyah/stweaks-installed file in 2nd rom. Reboot to second rom.
19. “Do I need to anything special before flashing a newer Siyah?”
A. NO. Just flash kernel as tar or in recovery – whichever you used to do. Kernel image is copied to the unified kernel partition.
20. “How can I run same STweaks settings of 1st Rom in 2nd Rom?”
A. While on 1st rom, copy /data/.siyah/default.profile to /data/media/data/.siyah directory.
5. “What things should I be taking care off while dealing with dual booting?”
A. – If Wi-FI on aosp doesn’t work, flash a sammy ICS rom (on to 1st rom or second rom depending on location of aosp) before flashing aosp rom.
- Make sure to fix permissions of second rom after setting up 2nd rom for the first time or else you’re likely to see a black screen.
- If NFC doesn’t work, flash that NFC fix zip you can find on XDA which replaces JB NFC firmware with ICS NFC fw.
- Even if you’re installing second rom for the first time, wiping data+cache of 2nd rom and formatting system of 2nd rom is necessary; As it creates empty 1.5 gb system.img to be used as system partition for 2nd rom and also creates data directory of second rom in /.secondrom dir in the internal sd.
21. “How do I remove everything related to DB and run single boot again?”
A. In recovery, under dual boot options – “delete 2nd Rom”. OR Delete .secondrom directory in /data/media while on 1st Rom.
22. “If secondrom files are kept in /data/media, will wiping data in recovery erase second rom files?”
A. NO. /data/media is skipped in CWM recovery.
23. “I was using ExFat card on sammy rom without any issues. I have setup dual boot with aosp and now after I boot to CM i9t says my card is corrupted.”
A. Aosp roms doesn’t support ExFat out of the box. The data was corrupted by aosp vold. Even if you boot back to Sammy rom, it still would be corrupted. To recover data, manually mount the card in recovery, copy contents to internal SD and reformat card to a Fat32.
24. “I read somewhere that both rom data partition use the same space. Doesn’t that mean my apps are shared across roms?”
A. NO. It just means they uses same partition. They’re still different directories.
1st rom data = /data
2nd rom data = /data/media/.secondrom/data
4) “How much time was it to clone a rom?”
A. There’s /system, /data/ and /cache to clone. 2 GB data + 103mb cache + 513 mb system = 2.6 gb
Shell prompt read speed = 7mb per second.
Total Time = 2.6*(1024/7) = 380 secs = 6/7 minutes.
5) “If i reboot to recovery from power-off state using 3 button method, to which rom’s recovery it’s booted into?”
A. Unified kernel, same recovery. And remember – flashing zips to second rom is not possible as of now.
6) “Any solution to flashing zips to secondary rom?”
A. 
Yes. Use Install zip to 2ndROM from internal SD” or “Install zip to 2ndROM from external SD” under dual-boot options in Recovery.
Alternative 1: 
If you know what the updater script in the zip is doing, you can do that manually using Root Explorer (replacing/copy files, setting permissions, etc).
Alternative2: 
i) Swap 1st Rom and 2nd Rom using Dual-boot options in recovery. Now your 2nd rom becomes primary for time being.
ii) Install zips like normal. 
ii) Swap again. 
7) “Should i have same versions of kernels on both roms? If not, from which rom should i flash the kernel”
A. Flash kernel from any rom (if cwm app/darkyota is used). Both uses the same kernel partition anyway.
8) “Will i get a prompt to dual-boot if i’m not using dual boot, as in i haven’t cloned any rom to use as secondary?”
A. NO
9) “I don’t like waiting for 3 seconds to boot into primary rom.”
A. Touch the screen/press volume up key immediately upon prompt.
10) “How to undo dual booting?”
A. Use “Remove 2ndRom” from dual-boot options in recovery.
11) “How to remove secondary rom if “Remove 2ndRom” in touch recovery fails for some reason?”
A. Format 2nrom /system partition from dualboot options in recovery, remove data.img and cache.img under /sdcard/.secondrom directory manually by booting into primary rom. Also delete /secondrom directory.
12) “So if at all i format /sdcard, my second rom is gone?”
A. Yes
13) “Is the size of /system partition of secondary rom re-sizable from user space?”
A. NO
14) “Can i have both aosp roms/both samsung roms/first aosp, second samsung/first samsung,second aosp?”
A. Yes
15) “Can i have one GB rom and second ICS rom?”
A. No
16) “Why?”
A. Kernel partition is shared between roms. Dual boot functionality is implemented in ICS kernel. ICS kernel can run only ICS roms.
17) “Can i have different kernels for the two roms?”
A. NO. Kernel partition is shared.
18) “USB mass storage works?”
A. Yes. Both cards will be mounted for primary and secondary roms. MTP works too.
19) “If i had the same /data partition shared between roms, i could use same apps on both roms.”
A. Data partition can not be shared as they’re incompatible between roms. (Sometimes dev asks you to perform full wipe even if you’re switching between versions of the same rom right). Even if they were shared, separate dalvik caches has to be used and hence every boot will take a long time to rebuild dalvik.
20) “How do i swap primary and secondary roms?”
A. 
Easy Way: 
In recovery, select “Swap 1stRom and 2ndRom”. It may take upto 20 minutes. Be patient and watch the progress bar.
Difficult way: If the “swap” in recovery fails, 
i) Select “Backup secondary rom” under dual boot options.
ii) Under original Backup and Restore option, select “Backup” to nandroid backup your primary rom.
iii) Under dual boot options, “Restore as secondary rom” or “Restore as secondary rom from internal sd” and select the nandroid backup of what was actually your primary rom.
iv) Under original Backup and Restore option, select “Restore” to restore the rom you backed up as secondary.
21) “How to upgrade primary rom?”
A. As usual, goto recovery, wipe whatever you need to wipe and install the new version. Remember to flash latest Siyah after upgrading if the Rom comes with a different kernel.
22) “How to upgrade secondary rom?”
A. Use “Install zip to 2ndROM from internal SD” or “Install zip to 2ndROM from external SD” under dual-boot options in Recovery. to flash the Rom zip. If any wipe is required, use format /secondrom_cache, format /secondrom_dalivkcache, format /secondrom_data and format /secondrom_system under Mounts & Storage in recovery.
Alternative 1, if the above fails: 
Temporarily convert secondary rom to primary (by swapping them in recovery), flash rom zip revert primary back to secondary by swapping again. Remember to flash latest Siyah after upgrading. (This is just to be sure. Flashing zip to second rom does not change kernel)
23) “How to replace secondary rom with another?”
A. 
Easy Way: 
i) Wipe second rom partitions using format /secondrom_cache, format /secondrom_dalivkcache, format /secondrom_data and format /secondrom_system. 
ii) Install Rom zip using Install Zip to 2ndROM from internal SD or external SD from dual-boot options in recovery.
Difficult Way:
Perform the steps to setup dual boot as if you had only one rom which is going to be used as primary rom.
24) “How to replace primary rom with another?”
A. Normal procedure – wipe, install from recovery.
25) “Are init.d scripts and extweaks profiles shared across the roms so that i can make changes by booting into any rom and the other rom automatically inherits the settings?”
A. NO. Roms have differet /system partitions so different init.d directories. Roms uses different /data partitions so different extweaks settings since extweaks profiles are stored under /data/.siyah. Configure both separately. Initramfs scripts are shared anyway because Roms use the same kernel.
26) “Can i use titanium to backup and restore apps on both roms?”
A. Yes. With the default settings of titanium backup, it uses /sdcard/TitaniumBackup directoryto backup apps. Assume you have the same app installed in both roms and you backed up the app from both roms. Then when you restore app+data, the last backup is restored. (regardless of from which rom was it backed up last. Because the app database is overwritten for each backup). If you want to maintain exclusiveness between apps in the two roms, use a different backup directory in second rom. Reason for exclusivity could be – you need different settings for same app in the roms OR you have reached level 2 of a game in rom1 and level 6 in rom2 and you need to maintain that, etc.
27) “What’re the Dual Boot options available in touch recovery?”
A. 
i) View Current Status
Displays secondary rom info if found.
ii) Clone 1stRom to 2ndRom
First time, you will have only one rom. You may clone it as secondary rom (so that another rom can be used as primary). Note that what was Primary rom will remain as Primary after this. In short – you will copy of same rom and 1st and 2nd.
iii) Clone 2ndRom to 1stRom
Whatever has been cloned as second Rom is cloned to first rom. Note that what was Second rom will remain as Second after this. In short – you will copy of same rom and 1st and 2nd.
iv) Remove 2ndRom
Remove second Rom by Deleting /system, /data and /cache partitions of second rom. You will have normal booting.
v) Swap 1stROM and 2ndROM
Swaps primary and secondary roms by exclusively overwriting /system /data and /cache of both roms. This is a time consuming process. Be patient.
vi) Backup 2ndROM
Nandroid backup secondary rom to external sd.
vii) Restore as secondary rom
Restore any nandroid backup as secondary rom from external sd.
viii) Backup 2ndROM to internal SD
Nandroid backup secondary rom to internal sd.
ix) Restore as 2ndROM from internal sd
Restore any nandroid backup as secondary rom from internal sd.
x) init second rom data
Initialize /data parition of secondary rom to resize the partition to make it bigger in case you run out of space for apps. Init also wipes all the data in /data partition. So your existing apps in secondary rom will be gone.
xi) wipe second rom davik cache, xii) fix permissions in second rom – self explanatory
xiii) Install Zip to 2ndROM from Internal SD xiv) Install Zip to 2ndROM from External SD- self explanatory
xv) Wipe options for Second ROM can be found under Mounts and Storage – / format /secondrom_cache, format /secondrom_dalivkcache, format /secondrom_data and format /secondrom_system.
Mounting partition options for 2nd ROM can also be found there.
28) Why is “cloning 1stROM to 2ndROM” slower than “cloning 2ndROM to 1stROM”?
A. While cloning primary to secondary, it writes data.img and cache.img to internal sd card. While cloning secondary to primary, the images are written to device memory or rootfs. This is faster than writing to a mounted storage.
29) “Why can’t internal SD be mounted with secondary rom whether it’s sammy or aosp?”
A. It works now. 
/data and /cache partitions of secondary rom resides in the internal sd. (/sdcard/.secondrom). So internal sd can not be unmounted to mount it to the PC. MTP works for internal SD too. Even though slower, that’s the only option we got.
30) “After setting up Second Rom, i don’t see a prompt to boot into second rom”.
A. Try wiping Second Rom Cache and Dalvik.
31. “Before wiping 2ndROM data/cache, i had some free space on internal sdcard. During wipe it failed and that space has dissipated. Even after a successful wipe, the space is still lost.”
A. Try (1). If it fails, try (2)
1) Delete files in /sdcard/.secondrom directory.
2) The space was occupied by lost.dir in /sdcard. Delete contents in that directory and you have the space back now.
32. “What’s happening when i wipe /data and /cache of 2ndROM during the first time setup of dual boot?”
A. Two empty mountable EXT4 images – data.img and cache.img are created in /sdcard/.secondrom. While flashing zips to second rom, /data and /cache of second rom needs to be mounted in respective mmcblk. This empty .img files helps zip flashing without having the trouble to create them first.
33. “Will flashing a rom zip to second rom (when i already have dual booting) change kernel? I may lose dual boot if so.”
A. NO. Flashing kernel is prevented for second rom if the zip contains a kernel.
34. “I lost dual booting after i flashed primary rom via odin”. I flashed kernel again. I could see files in /sdcard/.secondrom. But no dual boot. Help”
A. Some carrier branded firmwares and such may wipe and push some apks and csc stuffs to the hidden partition used as /system of second rom. About 100 MB is used i think. After first reboot, it’s never used again, but now you have lost /system of second rom even though data and cache are intact in SD.
Copy data.img and cache.img of secondrom from /sdcard/.secondrom to PC. Then modify your zip installer of your second rom to install only /system of second rom. (Edit updater-script in the zip to comment out lines that write to /data).
Now full wipe second rom /data and /cache. Format second rom /system. Flash the modified zip to second rom. Copy back and replace data.img and cache.img from your PC. Second rom should be intact now.

Không có nhận xét nào:

Đăng nhận xét