Dual Boot Atrix: Simplified and Standalone (30 Jan 2013) - Atrix 4G Android Development

Quickly and conveniently leverage the strengths of mainstream ROMs and kernels using my new simplified and standalone dual boot tools!
Here I assume that your rooted Atrix with unlocked boot loader already hosts a ROM on EMMC. Even if you're not dual booting, I think you will find some or all of these tools helpful!
Steps
Code:
1. Boot to Recovery
2. Flash SmartPart FZ (partition SD card right on your phone!)
3. Flash Copy-ROM (copy ROM --- all except boot image --- from EMMC to SD card)
4. Flash Atrix Boot Emporium V3.0 (boot ROM on SD card to verify success)
5. Flash another ROM of your choice to EMMC and reboot (optional)
Links
SmartPart-V1.0-signed.zip: http://www.mediafire.com/?wm96y92g3lla3ot
Copy-ROM-V1.0-signed.zip: http://www.mediafire.com/?i068xs1ktdkd183
Atrix-Boot-Emporium-V3.0-signed.zip: http://www.mediafire.com/?zsf4is8fbzs7sf9
All zips tested working on my AT&T Atrix + Samsung 32GB Class 10 SD using ClockworkMod Recovery 5.0.2.0.
If everything goes well, you will have demonstrated "standalone" dual boot capability on your Atrix beauty without a computer! In fact, "unlisted" ROMs may be supported. For example I downloaded upndwn4par's CSROM V7.0 (26 Jan 2013), ported it to SD and then successfully booted it with faux's 1.0 GHz GB boot image featured in Emporium.
Walk-Through
Step 1: I prefer ClockworkMod Recovery 5.0.2.0 as it appears to be the most compatible recovery for Atrix.
Step 2: SmartPart FZ shrinks your (external) SD card's FAT32 partition by 4GB and adds three new “ext” partitions: /system, /cache and /data of ample size to host virtually any Android ROM. SmartPart FZ takes about 30-45 seconds to partition a Class 10 card.
Important! You MUST flash SmartPart FZ from internal memory (“choose zip from internal sdcard”) because if you flash it from external memory, your SD card gets mounted and you can't partition a mounted filesystem. Also it is a good idea to flash SmartPart FZ immediately after booting to CWM; else your SD card could get mounted accidentally.
Not sure you want dual boot? Just select the “Restore” option and Smart Part FZ restores your SD to its original state by removing any existing ext partitions (up to three consecutive partitions) and growing your FAT32 partition back to its original size. This takes about 10-15 seconds on a Class 10.
Note: SmartPart FZ is fundamentally the same as its shell script predecessor ( http://forum.xda-developers.com/showthread.php?t=1651356 ) --- except that FZ runs unattended and does not backup anything.
Step 3: Copy-ROM, with the “EMMC to SD Card” option selected, copies all files on /system, /cache and /data files to the equivalent SD card ext partitions created in Step 2. Your EMMC ROM becomes a “live backup” on SD that you can boot to, thus freeing up EMMC to host another ROM of your choice.
One advantage of copying a ROM to SD is that you can first configure it the way you wish (GApps etc.), and then copy it over instead of having to flash individual customized zip files to SD. Then you're ready to flash a different ROM to EMMC, or blast off with a fully redundant system.
Copy-ROM uses the “cp -a” command, which I have found to be several times faster than cloning partitions. How much faster depends partly on disk usage since cloning copies everything, including empty space. Example: Port CM10 Liquid Smooth with ~100 total apps to a Class 10 SD. Clone ROM takes 15 minutes. Copy-ROM takes less than 2 minutes.
Another advantage of copying files over cloning partitions is that you don't have to worry about partition size mismatch. And I would not want to modify EMMC partitions --- too scary for me.
Step 4: Use Emporium V3.0 to boot a supported ROM whether it is hosted on EMMC or SD. Emporium contains boot images and corresponding /system/lib/modules for:
Code:
ICS MROM
ICSROM
CM10 epinter (Stock and OC1300)
CM10 Th3Bill (AOKP, Liquid Smooth and MIUI)
CM7 MROM (HV and SV)
CM7 Neutrino (EE, GT and GT+)
GB MROM (HV and SV)
GB NottachTrix (ATT and faux 1.00, 1.30 and 1.45)
Emporium V3.0 is less than 120 MB compressed and 10-15% more uncompressed. Each file named “boot.img” was lifted from its respective ROM zip. Each file named “boot-sd.img” exactly matches its big brother boot.img, except that ramdisk was modified to redirect ROM filesystem mounts from EMMC to SD:
Code:
/system: mmcblk0p12 to mmcblk1p2
/cache: mmcblk0p15 to mmcblk1p3
/data: mmcblk0p16 to mmcblk1p4
except for CM10 boot images. Please read CM10 Notes below.
Emporium Options
One of the dilemmas associated with dual booting is how to clear /cache and or /data. Of course CWM can do this, but only for ROMs hosted on EMMC: It does not recognize ROMs hosted on SD. And CWM is a little cumbersome to use since the clearing options are not all on one page. Emporium addresses these issues by displaying a single page with options to:
Code:
Clear /cache and /data/dalvik-cache
Clear /data (BE CAREFUL)
on EMMC or SD depending on the option selected on the first page. Now you can conveniently boot to a jet clean ROM whether it is hosted on EMMC or SD. Of course if you just copied a healthy ROM to SD, it is probably not necessary to clear.
I will explain the third option: Extract Boot Files to /sdcard/Boot later.
All three options are null by default.
Step 5: Nothing new here if you've ever flashed a ROM.
Now if for some reason you want to reverse the process and copy a ROM from SD Card to EMMC, just flash Copy-ROM and this time select the “SD to EMMC” option. Then flash Emporium or fastboot your EMMC ROM with the boot image of your choice. You may want to Nandroid-backup or Titanium Backup before doing a reverse copy.
Of course there are faster ways to switch between ROMs. But the tools presented here give your Atrix a simplified, standalone dual boot capability using all flashable zips.
Once you're comfortable using these flashable zip tools, you can then move onto “live” boot switching using all soft keys. To that end, I rolled up all of Emporium's boot images and my simplified boot switcher “boot-rom.sh” to a single directory named “Boot” which also includes the user-configurable subdirectories ROM1 and ROM2. Just select Emporium's option: Extract Boot Files. This extracts Emporium's Boot directory and its contents to the top directory of your SD card. After that you can copy your ROM boot images to Boot/ROM1 and Boot/ROM2 using Root Explorer or other suitable app. Copy boot.img to {path-to-SD}/Boot/ROM1 and boot-sd.img to {path-to-SD}/Boot/ROM2.
Now you can switch “live” between ROMs or boot to recovery using the appropriate command string:
Code:
sh boot-rom.sh (reboot to current ROM)
sh boot-rom.sh 1 (boot to ROM1)
sh boot-rom.sh 2 (boot to ROM2)
sh boot-rom.sh 3 (boot to Recovery)
Here is Emporium's boot-rom.sh:
Code:
#!/system/bin/sh
echo Motorola Atrix Dual Boot ROM1 emmc or ROM2 SD card
echo sendust7 @ xda developers
echo
echo Usage: sh boot-rom.sh N
echo where N = blank \(reboot to current ROM\)
echo 1 \(reboot to ROM1\)
echo 2 \(reboot to ROM2\)
echo 3 \(reboot to recovery\)
echo
echo "Home directory: $HOME"
echo
if [ $# -eq 0 ]; then
echo Rebooting to current ROM. Please wait...
sleep 3
reboot
elif [ $1 -eq 1 ]; then
if [ -f $HOME/ROM1/boot.img ]; then
cat $HOME/ROM1/boot.img > /dev/block/mmcblk0p11
echo Rebooting to ROM1. Please wait...
sleep 3
reboot
else
echo "boot.img not found. Check home directory."
exit 1
fi
elif [ $1 -eq 2 ]; then
if [ -f $HOME/ROM2/boot-sd.img ]; then
cat $HOME/ROM2/boot-sd.img > /dev/block/mmcblk0p11
echo Rebooting to ROM2. Please wait...
sleep 3
reboot
else
echo "boot-sd.img not found. Check home directory."
exit 1
fi
elif [ $1 -eq 3 ]; then
echo Rebooting to recovery. Please wait...
sleep 3
reboot recovery
else
echo "Invalid option. See Usage."
exit 1
fi
return 0
Note that boot-rom.sh is more robust than previous versions. The improved logic displays the $HOME directory and also displays an error message if it can't find ROM1/boot.img or ROM2/boot-sd.img under $HOME. If you are using Script Manager to launch boot-rom.sh, go to Settings>More>Advanced>Configuration, set Home directory to {path-to-Boot} (for example, “/storage/sdcard1/Boot” for CM10), press field at bottom to select Home directory, then select “Export $HOME” and “Browse as root”. So when you launch boot-rom.sh from Script Manager, the $HOME directory should be: {path-to-SD-card}/Boot. If not, you get an error message if you enter an argument of 1 or 2 in the command string.
Be sure to launch boot-rom.sh as root.
CM10 Notes
If you unpack any of Emporium's CM10 files named “boot-sd.img”, note that I made two small changes in ramdisk in addition to rerouting filesystem mounts:
The “init” executable was replaced with the MROM ICS init
init.olympus.rc was modified to grant elevated privileges in mkdir /storage/sdcard{0,1} per the MROM ICS init.olympus.rc
I found these two additional steps necessary to successfully boot CM10 from SD and to make apps run properly. That said, these “boot-sd.img” files should be viewed as experimental, as your mileage may differ. But no kernels were modified.
I think that porting CM10 to SD has some merit as the /system partition is easily up-sized to hold apps moved from the /data partition. Why would I make this obscure statement? Well it turns out that CM10 apps running under /system appear to have more privileges than those running under /data. I demonstrated this behavior on at least two different CM10 builds hosted on both EMMC and SD using “aLogcat” a GUI-based system logcat generator. When I launched aLogcat under /data/app, it would not display logcat to screen nor save results to a file. Then I moved it to /system/app and the problems disappeared.
Enjoy.
Troubleshooting
No wifi? Try re-flashing with Emporium since it refreshes /system/lib/modules.
Soft-brick? You may have attempted to boot a non-existent, corrupt or incompatible ROM.
Unusually fast completion of zip flash? An error has probably occurred, and you may need adb and recovery log to debug.
Disclaimer: Standard disclaimers apply.
Credits: Embedded in the zip files.
Photos and Screenshots
SmartPart FZ Before and After (in adb shell):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Emporium V3.0 Directory Structure
More on the way!

beautiful
B-e-a-u-t-i-f-u-l

Great work......I will try it. Thanks
from the (M)ATRIX...

Awesome stuff, as usual.

can you explain what exactly is this? what we will be able to do with it?

antmiu2 said:
can you explain what exactly is this? what we will be able to do with it?
Click to expand...
Click to collapse
It automates dual ROM setup and usage.

antmiu2 said:
can you explain what exactly is this? what we will be able to do with it?
Click to expand...
Click to collapse
It generates a "live" backup of your existing ROM on your SD card --- a ROM you can boot to. Then you can flash another ROM to internal memory just as you normally would.
If all goes well, you will have successfully dual booted your Atrix.
Here's the original xda article on dual booting Atrix: http://www.xda-developers.com/android/atrix-4g-dual-booting-method-for-linux-and-windows/

sendust7 said:
If you are using Script Manager to launch boot-rom.sh, go to Settings>More>Advanced>Configuration, set Home directory to {path-to-Boot} (for example, “/storage/sdcard1/Boot” for CM10), press field at bottom to select Home directory, then select “Export $HOME” and “Browse as root”. So when you launch boot-rom.sh from Script Manager, the $HOME directory should be: {path-to-SD-card}/Boot. If not, you get an error message if you enter an argument of 1 or 2 in the command string.
Click to expand...
Click to collapse
Hi sendust. Thank you very much! :good:
Managed to succesfully run TheBill's PA 299 from my sdcard (using AOKP boot.img) and restore and run a backup of a GB rom (nottachtrix based) to/from emmc.
I also managed to reboot from GB to PA299 using Script Manager by following the above quoted steps.
I can't seem to get Script Manager to run the same script from PA299 using 1 as argument to reboot into my GB rom. I did set Home directory as instructed to /storage/sdcard1/Boot but the log still says Home = / and it returns boot.img not found.
Any help would be appreciated
cheers
n1c00_

n1c00_ said:
Hi sendust. Thank you very much! :good:
Managed to succesfully run TheBill's PA 299 from my sdcard (using AOKP boot.img) and restore and run a backup of a GB rom (nottachtrix based) to/from emmc.
I also managed to reboot from GB to PA299 using Script Manager by following the above quoted steps.
I can't seem to get Script Manager to run the same script from PA299 using 1 as argument to reboot into my GB rom. I did set Home directory as instructed to /storage/sdcard1/Boot but the log still says Home = / and it returns boot.img not found.
Any help would be appreciated
cheers
n1c00_
Click to expand...
Click to collapse
Great to hear of your success!
I experienced similar behaviour with Script Manager (SM) running under /system/app. Then I moved it to /data/app and the problem went away.
If SM resides in /data/app and still doesn't work, uninstall it and download the latest version from Play Store.
Here is SM (under /data/app) in action, booting from Neutrino 2.91 (ROM1) to Liquid Smooth (ROM2) ...

sendust7 said:
Great to hear of your success!
I experienced similar behaviour with Script Manager (SM) running under /system/app. Then I moved it to /data/app and the problem went away.
If SM resides in /data/app and still doesn't work, uninstall it and download the latest version from Play Store.
Click to expand...
Click to collapse
Thanks. SM already resides in data/app and reinstalation from Store didn't help.
I realise the problem is with SM and not with the script cause it runs fine in GB
Are there any other options?
Here's what I get
Thanks a million!
n1c00_

[Deleted --- Redundant.]

n1c00_ said:
Thanks. SM already resides in data/app and reinstalation from Store didn't help.
I realise the problem is with SM and not with the script cause it runs fine in GB
Are there any other options?
Here's what I get
Thanks a million!
n1c00_
Click to expand...
Click to collapse
I would check permissions for SM. Below is what I have for CM10 Liquid Smooth (scroll down to "os.tools.scriptmanager-1.apk"). Note that the permissions match those of the other apps.
Another option would be to configure a different app like Terminal Emulator to execute boot-rom.sh as root from the Boot directory.
[email protected]:~# adb kill-server
[email protected]:~# adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ $ su
[email protected]:/ # cd /data/app
[email protected]:/data/app # ls -ld *.apk
-rw-r--r-- root root 5433305 2013-02-02 16:35 Magazines.apk
-rw-r--r-- root root 6160306 2013-02-02 16:35 com.android.vending-1.apk
-rw-r--r-- root root 1345436 2013-02-02 16:35 com.devuni.flashlight-2.apk
-rw-r--r-- root root 5615781 2013-02-02 16:35 com.ebay.mobile-1.apk
-rw-r--r-- root root 6284122 2013-02-01 13:50 com.google.android.apps.currents-1.apk
-rw-r--r-- root root 7232165 2013-02-01 13:50 com.google.android.apps.maps-2.apk
-rw-r--r-- root root 3591566 2013-02-01 13:50 com.google.android.gm-2.apk
-rw-r--r-- root root 4075228 2013-02-01 13:50 com.google.android.gms-1.apk
-rw-r--r-- root root 6149925 2013-02-01 13:50 com.google.android.youtube-2.apk
-rw-r--r-- root root 16600426 2013-02-02 16:35 com.instagram.android-1.apk
-rw-r--r-- root root 5787419 2013-02-02 16:35 com.keramidas.TitaniumBackup-1.apk
-rw-r--r-- root root 316047 2013-02-02 16:35 com.liveov.shotuxtrial-1.apk
-rw-r--r-- root root 7116916 2013-02-02 16:35 com.mediafire.android-1.apk
-rw-r--r-- root root 6869418 2013-02-02 16:35 com.sirma.mobile.bible.android-1.apk
-rw-r--r-- root root 853905 2013-02-02 16:35 com.socialnmobile.dictapps.notepad.color.note-1.apk
-rw-r--r-- root root 417303 2013-02-02 16:35 com.speedsoftware.rootexplorer-1.apk
-rw-r--r-- root root 1004380 2013-02-02 16:35 com.sportstracklive.stopwatch-1.apk
-rw-r--r-- root root 98247 2013-02-02 16:35 eu.chainfire.cfbench-1.apk
-rw-r--r-- root root 1020803 2013-02-02 16:35 eu.chainfire.supersu-1.apk
-rw-r--r-- root root 84111 2013-02-02 16:35 eu.kowalczuk.rsync4android-1.apk
-rw-r--r-- root root 73631 2013-02-02 16:35 fr.depoortere.android.CircleBatteryWidget-1.apk
-rw-r--r-- root root 343102 2013-02-02 16:35 jackpal.androidterm-1.apk
-rw-r--r-- root root 781592 2013-02-02 16:35 jp.sblo.pandora.jota-1.apk
-rw-r--r-- root root 492578 2013-02-02 16:35 org.cohortor.gstrings-1.apk
-rw-r--r-- root root 1193795 2013-02-02 16:35 os.tools.scriptmanager-1.apk
-rw-r--r-- root root 141061 2013-02-02 16:35 se.qzx.isoextractor-1.apk
-rw-r--r-- root root 671989 2013-02-02 16:35 spinninghead.talkingstopwatchlite-1.apk
-rw-r--r-- root root 303317 2013-02-02 16:35 uk.co.nickfines.RealCalc-1.apk
[email protected]:/data/app #

sendust7 said:
I would check permissions for SM. Below is what I have for CM10 Liquid Smooth (scroll down to "os.tools.scriptmanager-1.apk"). Note that the permissions match those of the other apps. Another option would be to configure a different app like Terminal Emulator to execute boot-rom.sh as root from the Boot directory.
Click to expand...
Click to collapse
After few hours of trial and error finally managed to get it working!
Sendust you're a star!
SM just didn't want to configure (probably) because it was installed while running rom from sd. Once I got it installed running the rom on emmc and copied emmc to sd it kept the configuration. I just had to change the argument.
Thanks and keep up the good work :good:

I dont knlw if i am the only one but its seems I cant use dualboot with ICSROM on SD and CM10 on EMMC, everything show to have been done properly but when i try to boot into ICSROM i have a black screen (no bootlogo ), and when i flashed mrom kernel on ICSROM i get the bootlogo for ever ... :crying:
Any ideas ?
PS i use bootemporium

DBSS Troubleshooting
johnannis said:
I dont knlw if i am the only one but its seems I cant use dualboot with ICSROM on SD and CM10 on EMMC, everything show to have been done properly but when i try to boot into ICSROM i have a black screen (no bootlogo ), and when i flashed mrom kernel on ICSROM i get the bootlogo for ever ... :crying:
Any ideas ?
PS i use bootemporium
Click to expand...
Click to collapse
Troubleshooting manual in work.. I will try to have something in a few hours.
[UPDATE, 05 Feb 2012 1315 PST]
I duplicated the problem on my Atrix. In fact I couldn't even get ICSROM 1.4.6 to boot from EMMC. I tried reformatting /system, /cache and /data and re-flashing. Got a fixed Big-M with fadeout, followed by a single-blink and then blank for many minutes.
Then I CWM flashed MROM boot.img using Emporium 3.0 but it hung up at the pulsating Big-M. In retrospect, I may not have waited long enough.
Then I flashed MROM ICS right over ICSROM and it booted.
Then I reflashed ICSROM 1.4.6 and rebooted. Same behavior as at the start.
Then I CWM factory reset and flashed ICSROM 1.4.3 (previous version). This time, I got pulsating Big-M for several minutes (expected due to factory reset) followed by Location Consent screen, indicating a successful boot. So ICSROM 1.4.3 appears to work.
Then I flashed Emporium's ICSROM 1.4.6 boot.img (EMMC) and rebooted. Big-M came up and then... blank --- as before.
So I reinstalled 1.4.6 ROM, factory reset, fastbooted the 1.4.3 boot image (pulled from ICSROM 1.4.3 zip file) and voila... 1.4.6 came up.
These results intimate an issue with the ICSROM 1.4.6 kernel.
Unfortunately there is not a straightforward means of obtaining kernel debug messages (dmesg >> dmesg.txt) on a failed boot: http://bootloader.wikidot.com/linux:android:kmsg
Now if you Copy-ROM ICSROM 1.4.6 to SD, you need a modified boot image. Try this one:
Link (boot-icsrom-1.4.3-sd.img): http://www.mediafire.com/?57b25z5hkid2bc2
Modified init.olympus.rc code (ramdisk):
Code:
mount ext3 /dev/block/mmcblk1p2 /system noatime nodiratime wait ro barrier=1
mount ext3 /dev/block/mmcblk1p4 /data nosuid nodev noatime nodiratime wait barrier=1
mount ext3 /dev/block/mmcblk1p3 /cache nosuid nodev noatime nodiratime wait barrier=1
[UPDATE, 05 Feb 2012 1630 PST]
OK. I may have found a problem with the stock ICSROM 1.4.6 boot.img. If you unpack it and navigate to /ramdisk/default.prop, you will notice several "read-only" settings --- ones that can only be modified in ramdisk. I made one small change: Set ro.debuggable=1 (instead of 0). Here is the modified default.prop:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=1
persist.sys.usb.config=mtp
After making this one simple change, I repacked the 1.4.6 boot.img (boot-repack.img) then did the following:
Code:
Reboot to CWM
Perform factory-reset
Flash ICSROM 1.4.6
Reboot to fastboot
fastboot flash boot boot-repack.img
fastboot reboot
This time, I still got the familiar Big-M fadeout followed by the single-blink Big-M. But then 30 seconds later, the pulsating Big-M appeared, and several minutes after that, ICSROM 1.4.6 finally came up.
Link (boot-icsrom-146-emmc.img): http://www.mediafire.com/?5da1ngcny8px14w
Note: In the ICS MROM boot.img, "ro.debuggable" is already set to 1.
The short answer is that the ICS kernels are presently not stable, which is why I hesitated to include them in Atrix Boot Emporium.
Hope this helps.

what happens if i use the smart formater to my ext.sdcard and on the card are swap partitions and webtop partition? do i lose them??

Hai_Duong said:
what happens if i use the smart formater to my ext.sdcard and on the card are swap partitions and webtop partition? do i lose them??
Click to expand...
Click to collapse
I deliberated much about this and decided that for V1.0 I would stick with three (primary) ext partitions.
So yes, if you flash SmartPart FZ V1.0 and select the "Create" option, it will first do this:
Code:
echo "We first remove any existing partitions beyond the FAT32 partition..."
#echo "ENTER to continue; CNTL-Z to exit." ; read
parted /dev/block/mmcblk1 rm 4 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 3 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 2 > /dev/null 2>&1
parted /dev/block/mmcblk1 print
and then it wll create three new partitions, one each for /system, /cache and /data:
Code:
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val3" "$val4"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val5" "$val6"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
where the $val parameter values are partition boundaries based on the FAT32 right-hand boundary and fixed partition sizes defined in the shell script.

sendust7 said:
I deliberated much about this and decided that for V1.0 I would stick with three (primary) ext partitions.
So yes, if you flash SmartPart FZ V1.0 and select the "Create" option, it will first do this:
Code:
echo "We first remove any existing partitions beyond the FAT32 partition..."
#echo "ENTER to continue; CNTL-Z to exit." ; read
parted /dev/block/mmcblk1 rm 4 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 3 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 2 > /dev/null 2>&1
parted /dev/block/mmcblk1 print
and then it wll create three new partitions, one each for /system, /cache and /data:
Code:
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val3" "$val4"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val5" "$val6"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
where the $val parameter values are partition boundaries based on the FAT32 right-hand boundary and fixed partition sizes defined in the shell script.
Click to expand...
Click to collapse
oh thats sad. i wanted to try this because i love to test roms but i dont want to give up on my webtop partition.

Using your 1.4.3 boot.img and it still doesnt want to boot in the rom Dont know why, but after i flash the emmc with another rom it doesnt boot, before that it booted from sd
Sent from my Nexus 4 using xda app-developers app

johnannis said:
Using your 1.4.3 boot.img and it still doesnt want to boot in the rom Dont know why, but after i flash the emmc with another rom it doesnt boot, before that it booted from sd
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
OK that's good info. The file: boot-icsrom-1.4.3-sd.img was intended to boot 1.4.6 on SD. But of course it does not have the "ro.debuggable=1" fix. So when I got 1.4.6 to boot on EMMC using the fix:
Link (boot-icsrom-146-emmc.img): http://www.mediafire.com/?5da1ngcny8px14w
I realized that boot-icsrom-1.4.3-sd.img probably would not boot 1.4.6 on SD. And such was the case for me.
Did you try this:
Code:
Reboot to CWM
Perform factory-reset
Flash ICSROM 1.4.6
Reboot to fastboot
fastboot flash boot boot-icsrom-146-emmc.img
fastboot reboot
I would not be surprised if you got different results based on what the ICSROM author says...
http://forum.xda-developers.com/showthread.php?p=37561654&highlight=work#post37561654 ,
]If someone can post a link I will definitely take a look at it.
But please don't your hopes too high guys. Remember this ROM runs different on every device.
Click to expand...
Click to collapse
[UPDATE 07 Feb 2013, 0745 PST]
So I unpacked the ICSROM 1.4.6 and MROM boot images and found that the ICSROM init.olympus.rc (the device-specific script launched at boot time by the init process) is three times the size of MROM's init.olympus.rc.]. More to follow...

Related

moving apps to sd

it looks a bit different from G1
is this the correct "fstab" conf file to be modified ?
# cat /system/etc/vold.conf
## vold configuration file for Device
volume_sdcard {
## This is the direct uevent device path to the SD slot on the device
media_path /devices/platform/msm_sdcc.2/mmc_host/mmc1
emu_media_path /devices/platform/goldfish_mmc.0/mmc_host/mmc0
media_type mmc
mount_point /sdcard
ums_path /devices/platform/usb_mass_storage/lun0
}
unfortunately i can't find /system/init.rc
hope to inject a standard rom on this device soon !!!
At the moment we cannot get Apps working on the SD Card. Apps2SD won't work.
We are aware of this, and we understand that you'd like these features, but the hackers are currently busy working on exploits to install our own recovery for flashing baked ROMs.
init.rc is located on the top level of the root file system, under /init.rc . You need root to read the said file.
but ...
i'm used to linux and don't understand what we are missing in order to move apps to sd
since i'm root i should be able to do the extra mount of new partition, isn't it ?
actually, as far as understood, if android finds a new partition (either fat or ext) on the sd card it mounts it automagically
I have the same question, too.
Event we can't add extra mount in fstab. We could have the right to mount SD to /data/app, and just copying all apks to SD card, could we??
suoko,
I had done some tests today.
1. I format my sd card into ext3 format and copy all apks in /data/app into my sdcard.
2. mount my sd card on /data/app manually, and change the mode and owner of mounted folder and files.
You can install app into the sd card mounted on /data/app. But once you reboot them, (reset the /data/app), the market will be inconsistent with application list in settings. And I can't unmount the sd card after it mounted on /data/app.
So, I think it is still possible to use sd card for the app installation.
If you have any idea, please let me know... thanks
umount problem
by this "And I can't unmount the sd card after it mounted on /data/app." you mean you can't even access the sd vfat partition with your computer ?
i would only need vfat to be visible via pc not to screw installed apps
gonna try it too in a while
curiosity
as far you know, the install process of apks involves the "unzipping" of apks ?
or it's just a copy from the download apk folder to /data/app ?
what i would try is set a second app folder, this time in /sd/app
where /sd/app is an ext3 partition
so that we can leave main apps in internal memory and put extra apps in sd
the install process of apks is only to copy the app into /data/app folder. It is unzipped when the app is launched first time and cache them in another folder. So, we can found the dalvik-cache in the /data/ folder that the folder it unziped the dex files.
The test I had done is just mount the sd card on "/data/app" folder in android. So, if we want to add a second app folder, we need to change the app loader that I never did it before.
The unmount part means that I can mount the sd card on /data/app but I can't unmount that from /data/app, the message is "failed". The only way to unmount it is to reboot the tattoo. Once removing the sd card from tattoo, I can mount it to PC or tattoo again.
suoko
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This picture is that I mount the sd card(500MB) on /data. The displaying size of flash (that's my sd card) in tattoo is 361MB, sorry for all chinese, you can find the number in the second line from bottom to up.
I don't know where to change the fstab record in tattoo. But it may be possible to write an app who runs at the machine startup and does the "mount" staff before other apps in /data/app executing.
I had one Hero with Apps2SD installed. It mounts the sd card on /system/sd and /data/dalvik-cache. The apps are installed and launched at /system/sd/app. I think it is the same way like mime.
2 install folders in linux ???
you know what ? i guess in linux is not that easy to set up a second install folder.
I think we could sim link a /data/app/app folder to /sd/app but then the install process should do something:
check /data/app folder space left, and in case it's full, install to /data/app/app
Yes, right. That's the way I use. But I mount the sd card directly on /system. This makes android to calculate the left space of my sd card.
Currently, I need to modify the /init.rc to make it mount at the boot. But the /init.rc seems in the ramdisk image, so I can't modify it and store it back. I don't know where the ramdisk image is, it seems in one of partition 0, 1, 2. Any idea??
hello people
have you test this?
http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/
ok, trying now
formatted my 4gb sd to:
vfat: 3.4 GB
ext2: 508 MB
swap: 32 MB
i found partitions at:
mount -t ext2 /dev/block/mmcblk0p2 /data/myapp
swapon /dev/block/mmcblk0p3
must work on vold.conf now since ext2 on sd is not automatically mounted at /system/sd
another way ...
is create an ext2 img file to be mounted at boot using a loopback device.
no sd partitioning is needed then and the FULL-OF-APPS IMG FILE could be easily moved from one SD to another (aka to another android compatible phone).
modify /system/init.rc to mount an ext2 image on bootup.
http://forum.xda-developers.com/showpost.php?p=3402719&postcount=683
extra ext2 partition creation [750MB] (on ubuntu):
dd if=/dev/zero of=sd.img seek=749999999 bs=1 count=1
mke2fs -F sd.img
mounting it (on android):
[mkdir /data/myapp]
mount -o loop sd.img /data/myapp
current state:
mount: mounting /dev/block/loop0 on /data/myapp failed: Invalid argument
the ext2 loop partition was an end 2008 discussion
http://forum.xda-developers.com/showthread.php?t=463488&page=2
what i think now is extending the /data/app partition with the looped img file.
can we (without lvm) ?
I prefer the second install option
if android detects an extra ext2 partition or an ext2 img file, you can change the default install location in android preferences
Suoko, do your tattoo have /system/init.rc file??
In /init.rc, it doesn't import /system/init.rc. So, we can't use /system/init.rc to mount it.
currently, I need to compile my owned boot.img file. But the compiled file doesn't work. I don't know why. I following the following url to do so: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images.
Any idea??
BTW, why do we need to mount /dev/loop0?? I just use mount -t ext3 /dev/block/mmcblk0p2 /data/app to do so.
why loop?
Cause you don't have to partition the sd this way.
You just create an img file which can be used as a partition.
Think this:
You have a 4 gb sd and want to change it to store more music/vids/maps with a 16 gb one
You take the file and move it from the old sd to the new one.
You want to increase the img file size?
You create a new larger file?
You create it and move old img file contents to it.
We can probably extends its size some way
ok I see. That's a good idea for expanding purpose.
BTW, I had solved the boot.img problems. It is caused by the wrong version I checked out from repo. I use the correct version to build mkbootimg and everything works.
current state:
trying to mount the /dev/block/mmcblk0p2 on /data at the boot time. but all trials failed.
succesfully mounted looped device
extra ext2 partition creation [350MB] (on ubuntu):
# dd if=/dev/zero of=sd.img seek=349999999 bs=1 count=1
# mke2fs -F sd.img
pushing ext2 partition to android [350MB] (on ubuntu):
# adb push ./sd.img /sdcard/sd.img
mounting it (on android) (DO NOT RUN BUSYBOX !!!):
# su
# export LD_LIBRARY_PATH=/system/lib
# export PATH=/system/bin
# insmod /data/local/bin/tattoo-hack.ko
# mount -o rw,remount /dev/block/mtdblock5 /data
# mount -o rw,remount /dev/block/mtdblock3 /system
# mkdir /data/myapp
# mount -o loop -t ext2 /sdcard/sd.img /data/myapp/
[now run busybox]
# /data/local/bin/sh
# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 93.0M 0 93.0M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 150.0M 135.7M 14.3M 90% /system
/dev/block/mtdblock5 165.1M 148.1M 17.0M 90% /data
/dev/block/mtdblock4 150.0M 3.7M 146.3M 2% /cache
/dev/block//vold/179:1 3.7G 3.5G 223.5M 94% /sdcard
/dev/block/loop0 323.2M 2.0M 304.5M 1% /data/myapp
re: boot.img problems
huchengtw said:
ok I see. That's a good idea for expanding purpose.
BTW, I had solved the boot.img problems. It is caused by the wrong version I checked out from repo. I use the correct version to build mkbootimg and everything works.
current state:
trying to mount the /dev/block/mmcblk0p2 on /data at the boot time. but all trials failed.
Click to expand...
Click to collapse
are you reading mainfram3 tips ?
http://forum.xda-developers.com/showthread.php?t=641731
i'm gonna look at android install process and SD settings

[HOW TO] Fix Bell Vibrant I9000M internal sd card problem permanently

OK, here you go, I am making a JTAG adapter PCB for galaxy s. I need to test my pcb, so I bought an as is I9000M from ebay to test my PCB. The phone is in prefect physical condition, except the infamous bootloop problem.
Jump to the steps: http://forum.xda-developers.com/showthread.php?p=16044873#post16044873
Jump to the screen shot of his SD card size: http://forum.xda-developers.com/showthread.php?p=16042946#post16042946
Jump to my progress -> I need some help, I have problem repack kernel Please help me -> http://forum.xda-developers.com/showthread.php?p=16045474#post16045474
Jump to partition SD card on windows: http://forum.xda-developers.com/showthread.php?p=16045880#post16045880
I haven't got my JTAG PCB yet, so i thought, hmm, why not try to fix the phone first? so I spent the last two days, read lots of posts and threads including many many informative posts from this site.... and the conclusion was: it can NOT be fixed.
I have tried many methods, the best method so far I had is to have external SD card plugged in, the flash I900XXJPU using odin, then flash speedmod kernel, after I can boot, I then rooted, and unlocked the phone.
By using this method, in Settings -> SD Card and sorage:
External SD Card:
Total Space: Unavailable
Available Space: Unavailable
Internal SD Card:
Total Space: Unavailable
Available Space: Unavailable
Internal Phone Storage:
Available Space: 1.84GB
The following things work:
1: can make calls or receive calls (using a 7-11 speakout sim card, I think it pigback on Rogers network)
2: can install most apps from market
3: most preinstalled apps work
The following do NOT work:
1: camera
2: video
3: can NOT install any app which require access to /sdcard
I almost gave up, one blog post from coolcode dot org caught my eyes, he has a Korean galaxy S (M110S) with a damaged internal SD card and HE FIXED THE PROBLEM!
this is the original post:
http://www.coolcode.org/?action=show&id=364
It is in Chinese, so I will continue and translate it here...
Before I translate the steps he did, let me post a pic of the fixed phone.
translation:
Internal SD Card:
Total Space: 12.90G
Available Space: 12.90G
Internal Phone Storage:
Available Space: 1.88GB
Available RAM: 98.27MB
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So his theory is, exchange the mounting point of the internal and external sd card.
His method is different then the posts below:
http://forum.xda-developers.com/showthread.php?t=1088474
and another thread similar to the above but for I9000.
The above methods doesn't completely swap the internal and external sd card. His method involves kernel modification.
ok, this is what he did:
(His was modifying a 2.3.4 VG14 kernel)
Step 1:
Buy a fast micro SD card. Not sure has to be the same size as your internal SD card (I9000M is 16G, I9000 is 8GB), or can be larger. Class 6 or higher is recommended.
Create two partitions, one for /data and one for /sdcard.
partition 1 (mmcblk1p1) is for /sdcard, so it needs to be in FAT32 format.
partition 2 (mmcblk1p2) is for /data, so it needs to be in EXT4 format.
You can format your sd card in Linux or windows. in Windows, you can use Acronis Disk Director Suite.
Step 2:
You need a linux system, any linux is ok, SUSE, Redhat or Ubuntu.
Step 3:
Download samsung arm linux toolchain sdk, can be downloaded from here: http://cs.sch.ac.kr/~choicjy/entry/MV6410-Samsung-Arm-linux-toolchain
Step 4:
untar or unzip then move the whole directory to /usr/local/arm, if you don't have this directory, create it. (why this directory, because one script we will use has hardcoded the above path)
Step 5:
Find the kernel file (zImage) you want to modify (should be in the PDA file if odin format, or inside update directory of the update zip file)
Step 6:
Decompress the zImage file. We need a tool for that. you can download it from https://github.com/mistadman/Extract-Kernel-Initramfs
Step 7:
Run unpack-initramfs zImage, you will get a initramfs_root directory, it contains all the files we need to modify.
Step 8:
Since we need to format /dev/block/mmcblk1p2 to ext4, however, we don't have mkfs.ext4 in initramfs_root, so we need to copy one from http://u.115.com/file/e6yxxut0 , use the same method to decompress zImage to a different directory, then copy mkfs.ext4 from tegrak directory to ROM ? initramfs_root/sbin of the original kernel we are going to modify.
Step 9:
Now, we need to modify the following 5 files:
Code:
init.rc
fota.rc
recovery.rc
res/encryption.conftab
res/recovery.fstab
Step 10:
The theory is to exchange external and internal sd card mounting point. for example, if you see this:
Code:
mount ext4 /dev/block/mmcblk0p2 /data rw nosuid nodev noatime nodiratime wait barrier=1,data=ordered
replace it to:
Code:
mount ext4 /dev/block/mmcblk[SIZE="7"][COLOR="Red"]1[/COLOR][/SIZE]p2 /data rw nosuid nodev noatime nodiratime wait barrier=1,data=ordered
Search mmcblk and replace one by one manually for all 5 files.
Also, there are some lines regarding to
Code:
/sdcard
in fota.rc,res/encryption.conftab and res/recovery.fstab. make sure to change them as well.
in encryption.conftab:
Code:
/ext_sdcard /dev/block/mmcblk1 /dev/mapper/extsdcard sdcard1 vfat PROTECTED_WITH_PASSWORD
replace mmcblk1 to mmcblk0.
Step 11:
add:
Code:
chown root root /sbin/mkfs.ext4
chmod 750 /sbin/mkfs.ext4
after
Code:
chown root root /sbin/fat.format
chmod 750 /sbin/fat.format
They appear in init.rc and recovery.rc. he is not sure if these are needed.. but he added it anyway.
Step 12:
Modify recovery.fstab to format /data in ext4, this is modified content:
Code:
[device]
# mount point fstype device format option mount option
/efs rfs /dev/block/stl3 default default
/system rfs /dev/block/stl9 default default
/dbdata rfs /dev/block/stl10 rfs16 default
/cache rfs /dev/block/stl11 rfs16 default
/sdcard vfat /dev/block/mmcblk1p1 default default
/data ext4 /dev/block/mmcblk1p2 ext4 default
[format]
#index option
rfs16 "/sbin/fat.format -F 16 -s 1 -S 4096"
rfs32 "/sbin/fat.format -F 32 -s 4 -S 4096"
ext4 "/sbin/mkfs.ext4"
[mount]
#index flags options
rfs_opt1 nosuid,noatime,nodev,nodiratime "check=no"
rfs_opt2 ro,nosuid,nodev "check=no"
Step 13:
Now we need to modify vold.fstab and vold.conf. Since they are not in kernel, we need to workaround the problem.
first use adb shell or whatever way to get vold.fstab and vold.conf from system/etc to your pc and swap the mount point:
something like this:
Code:
vold.conf
0. ## vold configuration file for the emulator/SDK
1.
2. volume_sdcard {
3. ## This is the direct uevent device path to the SD slot on the device
4. emu_media_path /devices/platform/goldfish_mmc.2/mmc_host/mmc2
5.
6. media_type mmc
7. mount_point /sdcard
8. ums_path /devices/platform/usb_mass_storage/lun1
9. }
vold.fstab
0. ## Vold 2.0 Generic fstab
1. ## - San Mehat ([email protected])
2. ##
3.
4. #######################
5. ## Regular device mount
6. ##
7. ## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
8. ## label - Label for the volume
9. ## mount_point - Where the volume will be mounted
10. ## part - Partition # (1 based), or 'auto' for first usable partition.
11. ## <sysfs_path> - List of sysfs paths to source devices
12. ######################
13.
14. # sdcard mount for the P1
15. # internal sdcard
16. {
17. ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
18. asec = enable
19. }
20. dev_mount sdcard1 /mnt/sdcard/external_sd 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
21.
22. # externel sdcard
23. {
24. ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
25. discard = disable
26. asec = disable
27. }
28. dev_mount sdcard /mnt/sdcard 1 /devices/platform/s3c-sdhci.2/mmc_host/mmc2
29.
30. #end line ## keep this line
then, copy these two files to initramfs_boot/tmp directory.
search
Code:
mount rfs /dev/block/stl9 /system check=no
in init.rc file, you will see there are a few copy command after that, then you will see this:
Code:
exec umount
add the following after
Code:
exec umount
:
Code:
# switch external mmc & internal mmc
copy /tmp/vold.fstab /system/etc/vold.fstab
copy /tmp/vold.conf /system/etc/vold.conf
so the purpose is to copy these two files from /tmp to /system/etc when system boots.
Step 14:
Now we are done modifying. Time to repack.
First, we need to create initramfs.img file.
create a script in the same directory as the original zImage, lets call it pack-initramfs:
Code:
#/bin/bash
cd initramfs_root
find . | cpio -H newc -o > ../initramfs.img
cd ..
Step 15:
We need another script to do the repack, download from here:
http://forum.xda-developers.com/showthread.php?t=789712
unzip to the same directory as zImage, you will see a directory kernel_repacker is created.
Step 17:
Run:
Code:
./editor.sh ../zImage ../initramfs.img
You will get a new_zImage.
rename it to zImage.
If you just want to flash the kernel, package it in tar format and use odin to flash it:
Code:
tar cvf ExtSD-Kernel-for-M110S-2.3.4-VG14.tar zImage
or put back to the original ROM or update file and flash the whole ROM or update using recovery menu.
OK, I have finished translate of the original blog post. Let me continue with my own progress.
My phone is I9000M from bell.
This is my phone's symptom.
If I place my 16G external SD card in the slot and flash I9000XXJPU ROM, I can boot the system and I can see the following in /dev/block:
Code:
/dev/block/mmcblk0
/dev/block/mmcblk0p1
/dev/block/mmcblk0p2
If I do NOT place external SD card in the slot, after I flash I9000XXJPU, it goes to bootloop. I have to flash the speedmod kernel, after the, system boots, but I do NOT see any files start with mmc in /dev/block.
I think this is different than the blog post.
Anyway, I went ahead and downloaded the JVP update.zip ROM for BELL I9000M from <link to be posted>, extracted zImage from it, now I am stuck at step 17. When I run this command:
Code:
./editor.sh ../zImage ../initramfs.img
I got this error:
Code:
##### My name is ./editor.sh #####
##### The kernel is ../../zImage #####
##### The ramdisk is ../../I9000M.JVP/updates/initramfs.img #####
##### 01. Extracting kernel from ../../zImage (start = 18324)
gzip: stdin: decompression OK, trailing garbage ignored
7034672+0 records in
7034672+0 records out
7034672 bytes (7.0 MB) copied, 32.3349 s, 218 kB/s
##### ERROR : Couldn\\\\\\\'t match start/end of the initramfs .
So I cannot repack the kernel. Anyone can help?
I also have a question, when we flash the ROM (PDA/Kernel, MODEM, CSC files), where are they resides? On good partition of the internal SD card, or a completed different hardware? If it is later, then in theory the method posted in this thread should work for everyone.
This is how to format you sd card in windows:
Anyone has an I9000 with damaged internal SD card? can you please try it out? I am stuck at repack kernel step... :-(
BTW, you need to find the correct kernel for your model.
I asked the blogger why my external sd card showed up as mmcblk0 (not mmcblk1), he said that is for the model of my phone... I am not sure if he is correct, but in my original rc files, I do see the internal device id is mmcblk0.
why system do not see mmcblk0?
OK, I made some progress. I know why kernel_repack failed.
The cpio image in the kernel I have is gzipped. kernel_repack is expecting an uncompressed cpio image, thus it failed.
Now, I need to modify editor.sh in kernel_repack to read gzipped cpio.
Interesting post, good luck mate.
S.U.R.F.A.C.E 2.something
ok, another update.
for some reason, my i9000m decided to shut down, when I power it up again, the internal storage becomes 0.0, so this is the new storage spaces:
External SD Card:
Total Space: 0
Available Space: 0
internal SD Card:
Total Space: Unavailable
Available Space: Unavailable
Internal Phone Storage:
Available Space: 0.0GB
Why?
B: found another script to do the repack of the zimage:
http://forum.xda-developers.com/showthread.php?t=901152
however the script did not work for me:
I always get this error:
./repack-zImage.sh -uv
Warning: there is aready an unpacking directory. If you have files added on
your own there, the repacking result may not reflect the result of the
current unpacking process.
mkdir -p /work/arm/1/zImage_unpacked
cd /work/arm/1/zImage_unpacked
repack-zImage.sh: Can't find a gzip header in file 'zImage'
Terminated
I am using openSUSE 11.2 "Emerald" - Kernel \r (\l).
I tried 2 zImages, one is from
http://derek.theblog.ca/galaxys-i900...rbread-upgrade
(file: http://www.multiupload.com/N8D9XZ1PIF)
and the speedmod kernel speedmod-kernel-k13e-500hz.tar
Both result the same error.
I tried both V6 and V4 of the script, same thing
Anyone can help?
Now I know that you are really investing some time in this but it is a hardware failure so its not really fixed permanently, just permanently rerouted to external sd card?
Aren't even the oldest SGS i9000m's under a year old and thus still under factory warranty (provided you flash a stock rom to it - and then it will not boot).
I know you are supposed to have receipts but I think they can do without also. Have you tried that route or is this just about a challenge?
Will yes, permanently route to external sd card.
I don't have a receipt, yes, I believe it is under one year old, on the back of the machine it has 10.09 printed.
So, how do I get it fixed by Samsung? Call samsung and tell them I lost receipt if they ask? Any recommendations or success stories?
Also, can you please point to me the stock ROM? Since my unit did not start when I got it, I don't know which ROM it has.
Thanks!
BTW, read a few more posts and figured the modified initramfs has to be equal or smaller than the original one. Most custom initrams from xda are already gzipped, thus if I want to add something in initramfs, the size of the initramfs is going to be larger than the original one, thus it won't work... or I need to delete some thing in the initramfs not important (I don't know which to delete), or modify a stock rom, people mention that the stock initramfs is not compressed thus I can add stuff in and gzipped.
Thanks!
gfacer said:
Now I know that you are really investing some time in this but it is a hardware failure so its not really fixed permanently, just permanently rerouted to external sd card?
Aren't even the oldest SGS i9000m's under a year old and thus still under factory warranty (provided you flash a stock rom to it - and then it will not boot).
I know you are supposed to have receipts but I think they can do without also. Have you tried that route or is this just about a challenge?
Click to expand...
Click to collapse
Stock roms are jh2 éclair, jl2 and kc1. The last two need dbdata.rfs to be complete for a flash with repartition ticked or you can flash jh2 with repartition and then the others without as I think it has dbdata.rfs.
And lots of people have gotten warranty without receipts. Read through I9000M links in stickies in general section.
Sent from my GT-I9000M using XDA Premium App
Thanks. called Samsung service number in Montreal around 9AM EST, gave serial number, asked when did I purchase it, I said I purchased 2nd hand, but the machine has 10.09 printed. Rep agreed to repair it for me. I was told that I would receive the instruction in 10 - 30 minutes and a UPS label in 12-24 hours/ However, 3 hours after, I still don't receive any emails from Samsung nor UPS.
Usually how long it takes to receive the instruction email from Samsung? and how long it takes to receive the UPS shipping label?
Should I call them again?
Thanks
Sure why not?
Sent from my GT-I9000M using XDA Premium App
Thanks gfacer!
I got the label later, did not receive any instructions, so I just mailed the phone with battery. I took out my sim card and external sd card.
Hopefully they can receive it tomorrow and I will have the phone back next week!
thanks!

[INIT.D][10-05-2012]Super APP2SD Script [MAJOR UPDATE][BETA]

UPDATES, WARNINGS, AND INSTALLATION STEPS ARE AVAILABLE IN THE 2ND POST
WHAT DOES THIS SCRIPT DO?
* It is the only method, that I am aware of to have apps trully run, and be installed directly to the external storage without completely switching the internal storage with the external storage.
This bings different benefits to different people:
1 - If you have a device that comes from factory with only a small amount of storage available, you can now install as many apps, and apps as big as the partition you setup to use with this script. For example, if you have a phone with only 512 MB of app storage, you can now install games that take over 1GB of app storage so long as your external partition has the space available.
2 - If you bought a 16GB device and wish you had bought a 32GB device, this is great for you as well (I'm one of these). With this script, your apps will not take up any space in your internal storage, which means that your 16GB (or whatever is left of it after factory partitioning, 11.66 GB in my case) is now available for pictures, videos, downloads, backups, or whatever else you might want to put there or have easy access to when you connect your device to your computer.
3 - If you have a lot of Android games, this is great for you too, specially if you're playing games that take a lot of space. Just get a large MicroSD (I have a 64GB partitioned to 32/32) and put as much space as you need in the second partition, and now you can have all your games intalled at the same time. No need to keep uninstalling games so that you can install other ones.
* Once and Done, across the board setup. That's right, launchers, keyboards and widgets will run from the external storage natively, something never done before in Android as far as I know.
This means that once you have the script up and running, you're good to go until the next time you reflash your /system partition. No need to choose what apps to move. No symlinks or anything. Your apps now belong in the external storage, plain and simple.
* No need to backup all your stuff before running the script (and eventually no need to back up your stuff when you want to disable it either).
That's right, the script does the hard work for you. All your stuff gets safely moved to the external storage, with all ownerships and permissions intact. It all happens so smoothly that some people have a hard time telling that the script is already at work. Nothing gets deleted from the internal storage until you're certain that everything is working as expected either. So even if something goes wrong, as long as you have ADB, all your stuff can go back to normal without a problem
(Even though you don't have to backup and restore in order to get the script going, it's always greatly recommended that you keep a backup of your apps).
* Simple intallation:
To get the script going all you have to do is download it, extract it, and run 3 commands in the terminal. It will then ask you a couple of questions, and then you'll be all set. The one downfall is that because the script requires user input (no, the required information cannot be picked from a list), the script cannot be run from a recovery zip. However, I'll emphasize once again that it only takes 3 commands to get the script going.
Also, the script comes with an options file that allows you to setup device specific variables, making the script malleable to work on just about any Android device. Just open the USER_OPTIONS file before runing the install script, and as long as you have the variables there set correctly, the script should be compatible with your device.
* You can still use the external partition for other stuff if you want to. Just remember that it's mounted to /mnt/sd-ext (or /storage/sd-ext in JB). So if you still have a ton of space left in the partition and need the space, you can still use it. Just ensure not to touch the folders Android, app and data.
* Now this is a bit more technically, but in theory, you could a third partition for this script instead of the second partition, and then still be able to use app2sd solutions, though personally I don't see what advantage there would be to doing this since apps would still be in the external storage no matter what.
WHAT DOES THIS SCRIPT NOT DO?
*** IT CANNOT BE CONVERTED INTO A RECOVERY ZIP DUE TO USER INPUT REQUIREMENT ***
*** YOU CANNOT PICK AND CHOOSE WHAT APPS TO MOVE, THAT'S PLAIN AND SIMPLE NOT THE PURPOSE OF THIS SCRIPT ***
SCREENSHOTS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Above you can see my storage screen. If you add the amount of used space and the amount of available space, it's ~18 GB, well over the available 11.66GB in the internal storage. Also note that when the script is enabled, the bar displaying storage usage is unreliable. All other information is reliable, including, and most importantly, the amount of available free space.
Above you can see the output of some commands in the terminal. The most important part of the output for mount above are
Code:
/dev/block/mmcblk0p12 on /mnt/temp/data type ext4 (rw,relatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard)
/dev/block/mmcblk1p2 on /mnt/sd-ext/data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/media/Android type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/app type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
As you can see, mmcblk1p2, the external storage, is mounted to /data/app, /data/data and /data/media/Android, which means that as far as Android is concerned, those folders are in the external storage. Also note that all these mounts took place before /sdcard itself was mounted, meaning that the script is ensuring that these mounts take place soon enough in the boot process to avoid problems related to mounting the app storage locations after Android has loaded the available apps.
Finally, the fact that mmcblk0p12 is mounted to /mnt/temp/data is important because of the next two commands
The output of du -sh shows the amount of storage used by a folder, and as such because the internal storage is mounted to /mnt/temp/data;
/mnt/temp/data/app = internal /data/app = 8KB
/mnt/temp/data/data = internal /data/data = 72KB
/mnt/temp/data/media/Android = internal /data/media/Android = 4KB
whereas
/data/app = 1GB
/data/data = 624.3 MB
/data/media/Android = 5.6 GB
For a grand total of 7.22 GB of used app storage in the external storage as opposed to 84 KB in the internal storage.
CREDITS
*smaw51 - Testing
*ArangeLTX - Testing and Debugging
*Laggan - Testing
*aadiflesher - Testing
*Others who tested the script but weren't in direct contact with me.
*People who said it wasn't possible to run widgets, launchers and keyboards from External Storage (They provided the challenge I needed to make this work)
If anybody needs help or if anything doesn't work, I'll help through irc (much quicker than posting here) on freenode - #and-host
UPDATES:
09-26-2012: Major Update, Overhauled most of previous code.
09-27-2012: Found badass typo in one of the files, fixed and uploaded correction.
09-27-2012: Added install Script.
10-02-2012: Corrected install script so that things now run properly. Don't forget to double check USER_OPTIONS and set ENABLED=true
10-02-2012: Added MMCBLKXPX variable to user options so now devices that mount SD-EXT to different block can use script easily.
10-03-2012: More fixes to the install script, also added check for storage location as well as user input. Started working on compatibility for devices where /sdcard/Android is in different partition from /data
10-03-2012: Updated this post with more organized information.
10-04-2012: Modified script so that debugging output works properly in JB
10-05-2012: Finished working on compatibility for devices with /sdcard and /data in different partitions (PENDING TESTING)
10-05-2012: Added automatic detection for such devices ^ (New variable is automatically created in USER_OPTIONS, called fukedupFS)
10-05-2012: Added extra security for $deletepostmove (Will not take effect until stage 3 is detected)
10-05-2012: Added switch on install script to do a clean install, (using sh ./install-a2sd -clean) which will erase all current options/vars and reset stage to 0.
WARNINGS:
1 - PROCEED WITH THE FOLLOWING STEPS AT YOUR OWN RISK. IF ANYTHING BREAKS I'LL GLADLY TRY TO HELP (IF I CAN), BUT YOU DO WHAT YOU DO AT YOUR OWN RESPONSIBILITY.
2 - THE INSTALLATION SCRIPT REQUIRES USER INPUT, WHICH MEANS THAT IT CANNOT BE MADE INTO A RECOVERY ZIP. DO NOT BOTHER TO ASK FOR ONE. IF YOU CAN'T LEARN HOW TO USE THE TERMINAL, THEN JUST STICK TO OTHER SUCKY APP2SD SOLUTIONS.
3 - THIS SCRIPT IMPLEMENTS INIT.D BY DEFAULT, IF YOU ALREADY HAVE INIT.D FUNCTIONALITY MAKE SURE TO CHANGE:
Code:
/system/bin/logwrapper busybox run-parts /system/etc/init.d
TO
Code:
# /system/bin/logwrapper busybox run-parts /system/etc/init.d
IN THE B]sysinit[/B] FILE.
4 - THIS SCRIPT IMPLEMENTS INIT.A, WHICH IS ESSENTIALLY LIKE INIT.D, BUT HAPPENS EXTREMELY EARLY AT BOOT TIME, IT IS SUGGESTED THAT REGULAR USERS DO NOT PUT ANY SCRIPTS IN INIT.A UNLESS THEY KNOW WHAT THEY'RE DOING, JUST USE INIT.D FOR OTHER SCRIPTS.
5 - UPDATE YOUR BUSYBOX TO THE LATEST VERSION (1.20.2 AT THE WRITING OF THIS). SOME EARLIER VERSIONS OF BUSYBOX ARE KNOWN TO NOT HAVE SOME OF THE REQUIRED SWITCHES FOR THE COMMANDS USED IN THE SCRIPT.
6 - AT THIS POINT THE SCRIPT REQUIRES THAT YOU HAVE A SECOND PARTITION IN YOUR MICROSD FORMATTED TO EXT4, ANYTHING ELSE WILL NOT WORK. THIS MAY CHANGE IN THE FUTURE, BUT AT THIS POINT IT'S A REQUIREMENT.
7 - FULLY READ THE INSTALLATION INSTRUCTIONS, MORE THAN ONCE IF POSSIBLE, BEFORE RUNNING THE SCRIPT. FAILING TO COMPREHEND WHAT'S GOING ON CAN POSSIBLY LEAVE YOUR DEVICE SEMI-BRICKED/CAUSE MAJOR HAVOC AND FORCE-CLOSES AND YOU'LL HAVE TO RESTORE A BACKUP. MORE THAN ANYTHING MAKE SURE TO BACKUP YOUR APPS.
INSTALLATION:
1 - Download the attached file on your device or PC.
2 - Extract the files and move it to an easy to access location in your device, such as /sdcard. Open USER_OPTIONS and ensure that all variables correctly apply to your device, LEAVE deletepostmove='false' until later. Set ENABLED='true' once you're reviewed everything.
3 - Open a terminal app (Rom Toolbox and such probably won't work because the script requires user input)
4 - Assuming that you moved all 6 files to /sdcard, execute the following commands in the terminal:
Code:
su
cd /sdcard
sh ./install-a2sd
You can also perform a clean install by using the command:
Code:
sh ./install-a2sd -clean
5 - The script will ask a couple of questions, answer them (ask someone for help if you're not sure).
6 - If all went well (The script will tell you that folders were created, files were copied and permissions were set) you'll be told that upon pressing enter your device will be rebooted. Press ENTER when ready or reboot manually if it fails to reboot on its own.
7 - STAGE 1 - NOTHING WILL HAVE NOTICIABLY CHANGED UPON THE FIRST REBOOT. This is normal. The first reboot will only garther many variables needed for the script to run properly, it will also give the opportunity to review the variables and ensure that everything is ok, so that you can disable the script in case the gathered variables are not correct, so that things don't get broken unecessarily. Please take a look at:
Code:
/sdcard/Tweaked.Scripts/A2SD/options/vars
If all looks good in there (even if you don't understand what the variables are for, ensure that the paths make sense, don't worry if you don't have /mnt/sd-ext and /mnt/temp, or /storage/sd-ext and /storage/temp as these will be created).
Reboot again after reviewing the variables.
8 - STAGE 2 - ONCE AGAIN, WHEN YOU REBOOT, NOTHING WILL APPEAR TO HAVE HAPPENED. In fact, this is not the case this time. If all variables were correct in STAGE 1, every app along with their data and files will have started to be copied over to the external storage as soon as the device finished booting. You should be able to see the process for this by opening the terminal and running the command:
Code:
logcat | busybox grep "01a2sd"
You can also run the following command in the terminal to ensure that there are extra mounts that did not exist prior:
Code:
mount
***THIS IS THE MOST IMPORTANT STEP IN THE PROCESS. MAKE SURE THAT YOU DO NOT REBOOT YOUR DEVICE UNTILL THE FOLLOWING FILE IS CREATED:
Code:
/sdcard/Tweaked.Scripts/A2SD/DEVICE_IS_READY
Failing to do so is the single worst mistake that you can do. Rebooting the device before the copying is done might cause all your apps to look like they're not installed, as well as major FCs, to the point where stuff is unusable and you have to restore a backup.
Just be patient during this step, specially if you already have a lot of apps installed, even more so if you have games that use a large amount of space.
9 - STAGE 3 - After rebooting from STAGE 2, the device will mount the external storage in every location where apps would reside in the internal storage. This is why it's extremely important that STAGE 2 is completed properly, because unless everything has been moved properly, files that were not copied will seem like they don't exist, possibly causing FCs and major havoc.
If everything went ok, it will actually look like nothing happened, but in fact, everything should be running from the external storage. You can confirm this by running the following command in the terminal:
Code:
mount
You should see three mounts that weren't there before that look like
Code:
/dev/block/mmcblk1p2 on /data/media/Android type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/app type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk1p2 on /data/data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
At this point, it should be safe to open USER_OPTIONS in /sdcard/Tweaked.Scripts/A2SD/options and change deletepostmove='true'. Just remember that with this variable set on, all your apps will be wiped from external storage. This means that if you reboot without your MicroSD or if you lose the stuff in the MicroSD your alls will be gone. Becase of this, ensure that you have your apps backed up somewhere.
TweakerL said:
To install, download attached file (then rename it to 01a2sd) or copy code and save it to (01a2sd).
Copy the file to /system/etc/init.d (Can be done with any file manager that has root access)
Change permission to 755 (Can be done with most file managers with root access)
Change Options in script to your liking.
Enjoy the extra storage after reboot.
Code:
#! /system/bin/sh
########################################################################################################
########################################################################################################
## ##
## Super APP2SD by TweakerL ##
## Visit us at http://and-host.com ##
## Chat with us on freenot at #and-host ##
## ##
########################################################################################################
########################################################################################################
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
########################################################################################################
## Options #############################################################################################
## ##
## Feel free to change these: ##
## ##
## moveAndroid: Moves /sdcard/Android to external storage. ##
## moveApps: Not yet implemented ##
## moveData: Not yet implemented ##
## ##
## deletepostmove: If 'true ' Deletes files from internal storage after they have been moved. ##
## ##
## pruneoldlogs: If 'true' Deletes logs older than X hours set in prunehoursold. ##
## prunehoursold: If 'X' greater than 0 logs older than X hours will be deleted ##
## If 'X' equal 0 all logs will be deleted ##
## ##
## debugging: If 'true' files will be created in /sdcard for debugging purposes ##
## ##
moveAndroid='true' ##
##
deletepostmove='true' ##
##
pruneoldlogs='true' ##
prunehoursold='1' ##
##
debugging='false' ##
########################################################################################################
########################################################################################################
## Constants ###########################################################################################
## ##
## Don't touch these unless you're told to by someone who knows what they're doing: ##
## ##
append_android='/Android' ##
append_data='/data' ##
append_obb='/obb' ##
append_ext4='/ext4' ##
append_tweaked='/Tweaked.Scripts' ##
append_movethis='/movethis.txt' ##
append_temp='/temp' ##
append_media='/media' ##
append_A='A' ##
append_logs='/logs' ##
##
data='/data' ##
########################################################################################################
########################################################################################################
if [ -f /sbin/busybox -o -f /system/sbin/busybox -o -f /system/xbin/busybox -o -f /system/bin/busybox ]
then
has_busybox='true'
fi
if busybox blkid | busybox egrep -i "mmcblk1p2" > /dev/null
then
has_mmcblk1p2='true'
fi
if busybox blkid | busybox egrep -i "mmcblk1p2" | busybox awk '{print $4}' | busybox cut -f2 -d'"' > /dev/null
then
is_ext4='true'
fi
if [ $has_busybox == 'true' -a $has_mmcblk1p2 == 'true' -a $is_ext4 == 'true' ]
then
# DEBUGGING
# Get vars part 1
if [ $debugging == 'true' ]
then
set > /sdcard/vars.1
fi
# END DEBUGGING
# Start defining functions
makedir () {
if [ ! -d $1 ]
then
busybox mkdir -p $1
fi
busybox chmod $2 $1
busybox chown $3:$4 $1
}
# End defining functions
mnt_sd=$( busybox mount | busybox egrep -i '/sdcard' | busybox awk '{print $3}' )
mnt=$( busybox dirname $mnt_sd )
sd_uid=$( busybox ls -ln $mnt_sd | busybox egrep -i "Android" | busybox awk '{print $3}' )
sd_gid=$( busybox ls -ln $mnt_sd | busybox egrep -i "Android" | busybox awk '{print $4}' )
blk_ext4=$( busybox ls -lR /dev | busybox egrep -i "mmcblk1p2 ->" | busybox awk '{print $11}' )
blk_data=$( busybox mount | busybox egrep -m 1 '/data' | busybox awk '{print $1}' )
mnt_ext4=$mnt$append_ext4
ext_data=$mnt_ext4$data
ext_android=$ext_data$append_android
mnt_temp=$mnt_ext4$append_temp
temp_android=$mnt_temp$append_media$append_android
datetime=$( busybox date -Iseconds )
sd_android=$mnt_sd$append_android
sd_tweaked=$mnt_sd$append_tweaked
tweaked_logs=$sd_tweaked$append_logs
txt_movethis=$sd_tweaked$append_movethis
makedir $sd_tweaked 775 $sd_uid $sd_gid
data_media=$( busybox dirname $( busybox find /data -type d -follow -name 'Tweaked.Scripts' ) )
data_android=$data_media$append_android
data_uid=$( busybox ls -lnd $data | busybox awk '{print $3}' )
data_gid=$( busybox ls -lnd $data | busybox awk '{print $4}' )
android_uid=$( busybox ls -ln $data_media | busybox egrep -i "Android" | busybox awk '{print $3}' )
android_gid=$( busybox ls -ln $data_media | busybox egrep -i "Android" | busybox awk '{print $4}' )
# DEBUGGING
# Get vars part 2
if [ $debugging == 'true' ]
then
set > /sdcard/vars.2
busybox diff /sdcard/vars.1 /sdcard/vars.2 | busybox grep "+" | busybox egrep -v "@|_=" > /sdcard/vars.txt
fi
# END DEBUGGING
busybox chmod 775 $sd_tweaked
busybox chown $android_uid:$android_gid $sd_tweaked
makedir $tweaked_logs 775 $sd_uid $sd_gid
echo 'Logging Started' > $tweaked_logs/a2sd-$datetime.log
echo '' >> $tweaked_logs/a2sd-$datetime.log
busybox mount -o remount,rw /
makedir $mnt_ext4 775 $data_uid $data_gid
busybox mount $blk_ext4 $mnt_ext4
sleep 1
makedir $mnt_temp 775 $data_uid $data_gid
busybox mount $blk_data $mnt_temp
sleep 1
makedir $ext_data 775 $data_uid $data_gid
makedir $ext_android 775 $android_uid $android_gid
busybox mount -o bind $ext_android $data_android
sleep 3
busybox mount -o remount,ro /
if [ $moveAndroid == 'true' ]
then
busybox find $temp_android -type f -follow -print > $txt_movethis
fi
if [ $moveAndroid == 'true' ]
then
echo 'Copying files from internal storage to external storage\n' >> $tweaked_logs/a2sd-$datetime.log
while read line
do
source=$line
destappend=$append_A$( echo "$line" | busybox cut -f2-100 -d'A' )
dest=$ext_android/$destappend
destfolder=$( busybox dirname $dest )
if [ ! -f "$dest" ]
then
if [ ! -d "$destfolder" ]
then
busybox mkdir -p "$destfolder"
fi
busybox cp -pdf "$source" "$dest"
if [ -f "$dest" ]
then
echo -e $source'\ncopied to\n'$dest'\n' >> $tweaked_logs/a2sd-$datetime.log
else
echo -e 'Failed to copy: '$source'\n' >> $tweaked_logs/a2sd-$datetime.log
fi
else
echo -e 'Already exists: '$dest'\n' >> $tweaked_logs/a2sd-$datetime.log
fi
if [ $deletepostmove == 'true' ]
then
if [ -f "$dest" ]
then
busybox rm -f "$line"
if [ ! -f "$line" ]
then
echo -e 'deletepostmove = true - Deleted: '$source'\n' >> $tweaked_logs/a2sd-$datetime.log
echo -e '____________________________________________________________ ' >> $tweaked_logs/a2sd-$datetime.log
else
echo -e 'Failed to delete: '$source'\n' >> $tweaked_logs/a2sd-$datetime.log
echo -e '____________________________________________________________ ' >> $tweaked_logs/a2sd-$datetime.log
fi
fi
fi
done < $txt_movethis
busybox rm -f $txt_movethis
busybox chmod -R 775 $ext_android/*
busybox chown -R $android_uid:$android_gid $ext_android/*
fi
busybox umount $mnt_temp
if [ $pruneoldlogs == 'true' ]
then
(( prunehours = ($prunehoursold * 60) ))
find $tweaked_logs -mmin +$prunehours -exec rm {} \;
echo "All logs older than "$prunehoursold" hours old have been deleted"
fi
echo -e '\nEnd of Log' >> $tweaked_logs/a2sd-$datetime.log
fi
Click to expand...
Click to collapse
Where to find premission? Please advice.
Sent from my GT-N8000 using xda app-developers app
andylam16 said:
Where to find premission? Please advice.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
use a root file browser then press and hold on the file, select permissions. Change to: Owner (rwx), group and other (rx)
Sent from my GT-N8013 using Tapatalk 2
My device doesn't have intI. D folder in system/Etc
I have to create new folder?
Rename the file without . Txt?
Sent from my GT-N8000 using Tapatalk 2
lm that guy said:
use a root file browser then press and hold on the file, select permissions. Change to: Owner (rwx), group and other (rx)
Sent from my GT-N8013 using Tapatalk 2
Click to expand...
Click to collapse
Thanks bro, is r = read , w = write , x = ???
Please advice.
Sent from my GT-N8000 using xda app-developers app
andylam16 said:
Thanks bro, is r = read , w = write , x = ???
Please advice.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
Execute
Sent from my GT-N8013 using Tapatalk 2
lm that guy said:
Execute
Sent from my GT-N8013 using Tapatalk 2
Click to expand...
Click to collapse
Got it, thanks!:thumbup:
Sent from my GT-N8000 using xda app-developers app
kaipro said:
My device doesn't have intI. D folder in system/Etc
I have to create new folder?
Rename the file without . Txt?
Sent from my GT-N8000 using Tapatalk 2
Click to expand...
Click to collapse
+1
fauzin said:
+1
Click to expand...
Click to collapse
I suggest this thread: http://forum.xda-developers.com/showthread.php?t=1883125
Sent from my GT-N8013 using Tapatalk 2
kaipro said:
My device doesn't have intI. D folder in system/Etc
I have to create new folder?
Rename the file without . Txt?
Sent from my GT-N8000 using Tapatalk 2
Click to expand...
Click to collapse
Check link in my sig for my other thread where you can get the init.d enabler.
After did the procedure as mentioned nothing happened the apps still go to the scared not the external. Please advice anything I missed. Thanks
Sent from my GT-N8000 using xda app-developers app
---------- Post added at 10:54 AM ---------- Previous post was at 10:12 AM ----------
One more thing there is a file "99testinit" inside the init.d , do I need to anything about it?
Sent from my GT-N8000 using xda app-developers app
andylam16 said:
After did the procedure as mentioned nothing happened the apps still go to the scared not the external. Please advice anything I missed. Thanks
Sent from my GT-N8000 using xda app-developers app
---------- Post added at 10:54 AM ---------- Previous post was at 10:12 AM ----------
One more thing there is a file "99testinit" inside the init.d , do I need to anything about it?
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
Exactly same as me.
Sent from my GT-N8000 using Tapatalk 2
If you guys read everything, this is still an early version. At the moment, only /sdcard/Android is getting moved, which is the location that stores extra files downloaded by apps, not the apps themselves. If the script is running, you can go on terminal and type:
Code:
df -h
and you should see mmcblk1p2 (which is the ext4 partition in the MicroSD) and how much space is being used, which is the amount of space that should be getting saved from the internal storage. Also, if you look under storage under settings, the amount of space available should have increased considerably, specially if you have a lot of games.
I'll be working on the other two parts throughout this week (moving APK and DATA) Then you will be able to notice a bigger difference, although it will always look like apps are installed in the internal storage, even when they're in the external storage.
The reason for this is because the script works by mounting the external storage to:
/data/app (not yet implemented)
/data/data (not yet implemented)
/data/media/Android (already implemented)
while at the same time copying the contents of those locations from internal to external then wiping them from internal. Essentially when it's all said and done, the OS pretty much thinks that nothing has changed, except that whenever anything gets written to those folders it takes space from the external storage instead of internal.
A good way to test it would be to download a free gameloft game like MIB3 or Six Guns. Take a look at storage before installing. After you install MIB3, your available storage should drop by roughly 500MB, but if you're using the script, even at preview stage, the available storage will only drop by about 30MB, even though storage settings will say that the game takes up ~500MB.
Also, you can mount your normal data partition and take a look at how much space is being used there, as opposed to the external partition like this:
(All the following commands in terminal)
make sure which partition is mounted to /data
# mount
mount data to temp location (assuming data is mmcblk0p12)
# mount /dev/block/mmcblk0p12 /mnt/ext4/temp
check amount of space used in internal storage:
# du -dh /mnt/ext4/temp/media/Android
check amount of space used in external storage
# du -dh /mnt/ext4/data/Android
In the future I'll add to the script a way to automatically calculate the amount of space saved
The script itself is not working. Init.d is working, did rename the file and changed permission. I use script manger and try to run the script but it's got error,
Sent from my GT-N8000 using xda app-developers app
htainlin said:
The script itself is not working. Init.d is working, did rename the file and changed permission. I use script manger and try to run the script but it's got error,
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
I'm gonna be uploading a new version soon with more debugging so I can see why people might have issues.
EDIT - Done updating OP
Is there any recommendations for the partition other than ext4, like swap size and what not? I also assume a reboot is required in order to get it to run right? I am still getting insufficient storage available when updating apps in the play store. I was getting that error before, even though I have plenty of space, like more than 10 gb on the internal memory so I don't know if it is just a batch update issue on the play store with my note for whatever reason. But even individual updates stop with an insufficient storage error.
I have tried using both the attached file in the op as well as the copy and paste method. The file should have no extension once in place right?
It seems as though it is still not working right
I have init.d working, confirmed with the test file and your method, Busybox installed, partitions with 0 swap and 1024 size at ext4
I have not been able to locate a log created, where is it dumped to to see if it is even running the script?
EDIT: never-mind, I figured out why my stuff was't updating but still able to add new apps, in rom tool box, I set it to install to sd card after most of my apps were already put on the internal memory. Just switched it to auto and it fixed it up
smaw51 said:
Is there any recommendations for the partition other than ext4, like swap size and what not? I also assume a reboot is required in order to get it to run right? I am still getting insufficient storage available when updating apps in the play store. I was getting that error before, even though I have plenty of space, like more than 10 gb on the internal memory so I don't know if it is just a batch update issue on the play store with my note for whatever reason. But even individual updates stop with an insufficient storage error.
I have tried using both the attached file in the op as well as the copy and paste method. The file should have no extension once in place right?
It seems as though it is still not working right
I have init.d working, confirmed with the test file and your method, Busybox installed, partitions with 0 swap and 1024 size at ext4
I have not been able to locate a log created, where is it dumped to to see if it is even running the script?
EDIT: never-mind, I figured out why my stuff was't updating but still able to add new apps, in rom tool box, I set it to install to sd card after most of my apps were already put on the internal memory. Just switched it to auto and it fixed it up
Click to expand...
Click to collapse
Had a similar problem when i had the tf201, kept getting an error whenever playstore started installing an app after the initial download, and i had the same problem a couple of days ago with the note which i resolved by deleting all odex files in the data\apps folder, i used es file explorer, navigated to the app folder and did a search for 'odex', then deleted them, i can now install apps again
Dont know if this is the same issue as yours , and ive just now seen your edit, so i see youve resolved it, so no worries, hopefully our solutions will help out others
Edit: dont quote me but my particular issue i 'think' has something to do with titanium backup, so for those having 'inssuficient storage errorr' in the playstore AND you have titanium backup, this may help
It might be a restore from backup in general issue, after you mention you used titanium. I used my backup pro to restore apps and data from my tf 700 to the my note. Only halfsies worked but maybe that caused some issues.
This is going to be very nice one apk and data are enabled to move to sd
how do I know that I have ext4 in my SDcard? and if I dont have it , How do I make ext4 ?
Thanks

[High experimental] CM10 for new ICS Bootloader and Layout

Hello
in the CallBug Thread wrote any User can be flash CM10 on the new Layout. I replaced any in the updater-script in META-INF...
to its work you need
- Topogigis LGP990-ICS28G_TG or a another ICS with new unlocked Bootloader and new Layout and CWM 6
No i worked hard and first Tests says it can works. I tested it with the Kernel from Topogigi_SP2_ICS28G_20121126... I see the Bootscreen. Next step i test it with the Kernel form CallBugThread... I see only the LG Logo.
Next i test it with the boot.img from LGP990_ICS_v28G_Stock_NewBL_Root_CWM_initd_NVFlash
in the Moment i dont see the Starts Wizard
Now i must first do following:
In CWM go to mount and storage and format: system, data, cache manually
wipe Data/Cache (factory-reset) is not enough
a success boot to start wizard works only when any can make a Kernel. In the Moment, all available Kernel is not enough
in the Attachment the Updaterscript
pengus77 have made a step by step guide for work CM10 with the new Bootloader and Layout
pengus77 said:
So... here comes the step-by-step sum up guide to boot cm10 on the new bootloader !
1) Edit BoardConfig.mk in device/lge_p990/lge_p990 and replace
Code:
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 665681920
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1170259968
with
Code:
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 536870912
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1610612736
then add this line
Code:
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
and replace this other one
Code:
BOARD_VOLD_MAX_PARTITIONS := 10
with
Code:
BOARD_VOLD_MAX_PARTITIONS := 20
2) Edit, in the same folder, the file init.p990.rc and fix it so that it looks like this
Code:
# mount partitions
mount ext4 /dev/block/mmcblk0p12 /system wait
mount ext4 /dev/block/mmcblk0p12 /system ro noatime remount barrier=1 wait
# We chown/chmod /data again so because mount is run as root + defaults
mount ext4 /dev/block/mmcblk0p9 /data nosuid nodev noatime barrier=1 wait
chown system system /data
chmod 0771 /data
mount ext4 /dev/block/mmcblk0p2 /cache nosuid nodev noatime barrier=1 wait
chown system cache /cache
chmod 0770 /cache
mount ext3 /dev/block/mmcblk0p7 /lgdrm nosuid nodev noatime
3) Edit, always there, the file vold.fstab
Code:
dev_mount sdcard /storage/sdcard1 auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1
dev_mount emmc /storage/sdcard0 11 /devices/platform/sdhci-tegra.3/mmc_host/mmc0
4) Edit (yeah same folder, same folder) the file recovery.fstab (don't know for sure if it's needed but here we go...)
Code:
# mount point fstype device [device2] fstype2
/recovery emmc /dev/block/mmcblk0p8
/boot emmc /dev/block/mmcblk0p6
/cache ext4 /dev/block/mmcblk0p2
/data ext4 /dev/block/mmcblk0p9
/external_sd vfat /dev/block/mmcblk1p1
/sdcard vfat /dev/block/mmcblk0p11
/system ext4 /dev/block/mmcblk0p12
5) Go to kernel/lge/star/arch/arm/configs/cyanogenmod_p990_defconfig and replace this line
Code:
CONFIG_CM_BOOTLOADER_COMPAT=y
with this
Code:
CONFIG_CM_BOOTLOADER_COMPAT=n
6) Edit kernel/lge/star/arch/arm/mach-tegra/lge/star/include/lge/board-star-nv.h and replace
Code:
#define LGE_NVDATA_PARTITION "/dev/block/mmcblk0p3"
with
Code:
#define LGE_NVDATA_PARTITION "/dev/block/mmcblk0p5"
7) In device/lge/star-common/init.cm-star.rc modify this (at about line 120)
Code:
chmod 777 /dev/block/mmcblk0p3
chmod 644 /dev/block/mmcblk0p5
into this
Code:
chmod 777 /dev/block/mmcblk0p5
chmod 644 /dev/block/mmcblk0p6
8) Replace vendor/lge/p990/proprietary/lib/liblgeril.so with the one attached or edit it with a hex editor and change mmcblk0p3 with mmcblk0p5
9) Fix reboot-to-recovery by editing the file device/lge/star-common/prebuilt/setup-recovery and change it to this
Code:
#!/system/bin/sh
echo "boot-recovery" | dd of=/dev/block/mmcblk0p5 seek=6144 bs=1
10) Time for a brunch ! Compile cm10 as usual, then in out/target/product/p990 grab system.img and boot.img and copy them to your nvflash folder... that of course you know how to use and already have installed I used the ICS nvflash pack from Stefan and from Topogigi. Leave the defaults as they are, replace system.img and boot.img and flash
DO NOT FLASH THE INTERNAL SD CONTENTS OF THE ICS ROMS !!!
11) Fix the sdcard by enabling debug mode after the first boot, enter via adb and manually mount it with "mount -t ext3 /dev/block/mmcblk0p11 /storage/sdcard0". Then go in settings -> storage and format it from there.
Hope this is everything... if i forgot something shout
Update: The attached ics-partitions.cfg file for nvflash has the ext3 fs fix for the MSC partition... better safe than sorry
Attachments: http://forum.xda-developers.com/attachment.php?attachmentid=1577239&d=1355958301
http://forum.xda-developers.com/attachment.php?attachmentid=1577265&d=1355958826
Click to expand...
Click to collapse
Orginalpost: http://forum.xda-developers.com/showpost.php?p=35661482&postcount=100
Big thanks to all User and Devs where help him and the specially Thanks go to pengus77
Important: Use it at own risk, when you brick your phone... dont blame me
This is for CM10 based Builds: http://d-h.st/Nfe
This is for CM10.1 based Builds: http://d-h.st/5VO
You need to edit the cm10 kernel itself to make it bootable with the new partition.
Sent from my LG-P990 using xda app-developers app
I have no Linux to edit the kernel. And unfortunately I do not also the knowledge. I figured that you can get as basics to run it. I dealt with the feasibility
Need kernel dev to do this. This is the best way to prove if the layout partition is indeed has nothing to do with the call bug.
Sent from RC's Official CM10
Okay will get you kernel img tomorrow with proper ICS ramdisk.
You will need to put that kernel and modules in cm10 zip and also change updater script as necessary.
Sent from my Nexus 4
Finished my build. Waiting to nvflash my phone to new partition and then test. *fingers crossed*
Imperticus said:
Finished my build. Waiting to nvflash my phone to new partition and then test. *fingers crossed*
Click to expand...
Click to collapse
so if it works, u will give a link, so other ppl can try it too? :fingers-crossed:
Using CM10 with the old and the new bootloader?
There is no need to reinvent the wheel: just use wkpark's excellent patch on CM10 (kernel) source.
http://forum.xda-developers.com/showpost.php?p=33993473&postcount=636
not working for me, dont have time to try fix it. guess i'll just wait for harsh.
Here is cwm flashable new CM10 with modified kernel for NEW BOOTLOADER. It is untested (I am using ICS on old boot loader), so booting up is not guaranteed.
Those who dont know what they are doing, please stay away from this download.
http://d-h.st/auX
You will need NEW Bootloader, partition and recovery for new bootloader.
I am on ROM_OptiICS-v0.6_LGP990_CWM-v6_v28G-based_NVflash can i try this from CMW like full wipe + wipe cash then install from SD
komunistvb said:
I am on ROM_OptiICS-v0.6_LGP990_CWM-v6_v28G-based_NVflash can i try this from CMW like full wipe + wipe cash then install from SD
Click to expand...
Click to collapse
yes, but dont forget to backup first. This is highly experimental cm10.
Let me know how it goes.
thank u i will try it!
Harsh said:
Here is cwm flashable new CM10 with modified kernel for NEW BOOTLOADER. It is untested (I am using ICS on old boot loader), so booting up is not guaranteed.
Those who dont know what they are doing, please stay away from this download.
http://d-h.st/auX
You will need NEW Bootloader, partition and recovery for new bootloader.
Click to expand...
Click to collapse
I was having problem with the updater-script, it wasnt flashing properly. Guess i tried changing too much.
Imperticus said:
I was having problem with the updater-script, it wasnt flashing properly. Guess i tried changing too much.
Click to expand...
Click to collapse
Not to mess with updater script too much, just change system mmcblk0p1 to mmcblk0p12 and change for kernel from mmcblk0p5 to mmcblk0p6.
thats all i did in script.
and changed kernel with ramdisk for same. nothing more in system
Try to flash via CMW-based Recovery v6.0.1.5 and get this
(Status 7) Error
So, first test: I can Flash it when i remove the first line (assert(getprop("ro.product.device") == "p990" || getprop("ro.build.product") == "p990")
But dont boot yet. I dont see the Bootanimation,
I test it with a another combination
EDIT: @ Harsh, the Topogigi SP 2 Kernel are the best Basis i think, i can with this see the Bootanimation. Have a look in Topogigis Kernel and boot.img. With yours i see only the LG Logo
MetaIIica said:
So, first test: I can Flash it when i remove the first line (assert(getprop("ro.product.device") == "p990" || getprop("ro.build.product") == "p990")
But dont boot yet. I dont see the Bootanimation,
I test it with a another combination
EDIT: @ Harsh, the Topogigi SP 2 Kernel are the best Basis i think, i can with this see the Bootanimation. Have a look in Topogigis Kernel and boot.img. With yours i see only the LG Logo
Click to expand...
Click to collapse
His kernel boot.img have ramdisk from ICS stock. This one has modified CM10 ramdisk. Will check if change of ramdisk matters or not.
Harsh said:
Here is cwm flashable new CM10 with modified kernel for NEW BOOTLOADER. It is untested (I am using ICS on old boot loader), so booting up is not guaranteed.
Those who dont know what they are doing, please stay away from this download.
http://d-h.st/auX
You will need NEW Bootloader, partition and recovery for new bootloader.
Click to expand...
Click to collapse
Too much slow to download
Sent from my LG-P990 using xda app-developers app
Edit: see my next post

The CWM for Ouya project

Well, since i'm not aware of anyone else doing it, and it will be necessary for any real development to occur, I have decided to try porting Clockworkmod Recovery to the Ouya. I am downloading ubuntu right now and I'll start trying to build it from source against our current recovery tonight or tomorrow night depending on how long the setup and prerequisites take.
The reason I'm posting this now, is to solicit help. I've never built CWM before, but XDA has a really great tutorial I'm going to follow, but if anyone here has had experience in the past I'd love some help/tips, and other than that I would like a few brave souls to volunteer and try flashing it on their Ouya when/if I have a build that works on my own.
I'll update this thread with my progress, if I make any, and please let me know if any of you are willing to help in any way.
Update 1:
I have compiled a version of CWM recovery that theoretically should work, but I'm unable to flash it. I have installed flash_image onto the ouya and it works fine, but i normally would have used "flash_image recovery recovery.img" however there is no "recovery" partition on the ouya. This is what I get:
./flash_image recovery recovery.img
error scanning partitions: No such file or directory
Mount reveals the following info:
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,relatime,user_xatt
r,acl,barrier=1,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,nosuid,nodev,noatim
e,errors=panic,user_xattr,acl,barrier=1,journal_async_commit,nodelalloc,data=wri
teback 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,nosuid,nodev,noatime
,errors=panic,user_xattr,acl,barrier=1,journal_async_commit,nodelalloc,data=writ
eback 0 0
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1
023,default_permissions,allow_other 0 0
This is the script from the OTA update:
#!/system/bin/sh
if ! applypatch -c EMMC:/dev/block/platform/sdhci-tegra.3/by-name/SOS:5906432:f80238c4f4a53888b547e4463fb4751343f23412; then
log -t recovery "Installing new recovery image"
applypatch EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5277696:5d7013bf98f76199ea5b7d7d8baeb07fa3ad26ff EMMC:/dev/block/platform/sdhci-tegra.3/by-name/SOS f80238c4f4a53888b547e4463fb4751343f23412 5906432 5d7013bf98f76199ea5b7d7d8baeb07fa3ad26ff:/system/recovery-from-boot.p
else
log -t recovery "Recovery image already installed"
fi
but I can't make any sense of it. If anyone can help out i'd much appreciate it...
sonofskywalker3 said:
but I can't make any sense of it. If anyone can help out i'd much appreciate it...
Click to expand...
Click to collapse
This seems to be the magic lines in the update script:
if ! applypatch -c EMMC:/dev/block/platform/sdhci-tegra.3/by-name/SOS:5906432:f80238c4f4a53888b547e4463fb4751343f23412; then
log -t recovery "Installing new recovery image"
applypatch EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5277696:5d7013bf98f76199ea5b7d7d8baeb07fa3ad26ff EMMC:/dev/block/platform/sdhci-tegra.3/by-name/SOS f80238c4f4a53888b547e4463fb4751343f23412 5906432 5d7013bf98f76199ea5b7d7d8baeb07fa3ad26ff:/system/recovery-from-boot.p
Click to expand...
Click to collapse
I don't know much about the applypatch program. It might just be another script. Since it isn't being called with a "./", I'd imagine it is installed somewhere that the path mentions. Try looking for "applypatch" to see if it is a program or script. In a terminal running on the Ouya, try running "echo $PATH". Hopefully you get a list of directories containing program locations (e.g. /usr/bin/ ...etc). Applypatch might be in one of those directories.
UPDATE 1:
applypatch is a binary, not a script. It is located in /system/bin/
I tried running it without arguments on my Nexus 7 (to see if we would luck out with a nice "usage" message), but for some annoying reason I can't give it execute permissions, even as root. I'll look deeper into the scripts
UPDATE 2:
I need to verify this on my Ouya, but from the updater-script in the latest OTA, the kernel partition is /dev/block/platform/sdhci-tegra.3/by-name/LNX (I'm going out on a limb here boys, but I think LNX stands for Linux, aka, our kernel, lol).
UPDATE 3:
Seems like the recovery partition is /dev/block/platform/sdhci-tegra.3/by-name/SOS
I don't know much about the details of "applypatch", but the recovery script you posted above seems to first check to see if the recovery partition hashes to f80238c4f4a53888b547e4463fb4751343f23412 (the hash of the latest and greatest recovery). If it doesn't, then we flash the latest recovery, which from the looks of it consists of the kernel (in LNX) with a patch applied to it from recovery-from-boot.p (another mess of binary). In other words, it looks like they build a recovery from the existing kernel, as the name "recovery-from-boot" implies (the kernel is packaged in a file called boot.img).
Long story short, it looks like you can write to the block device /dev/block/platform/sdhci-tegra.3/by-name/SOS to write a new recovery. Aka, in a hacked version of the OTA script, include the line
package_extract_file("recovery.img", "/dev/block/platform/sdhci-tegra.3/by-name/SOS");
where recovery.img is the name of your new recovery. They did something very similar to the kernel (LNX). I'm pretty sure that the correct way to do something like this is to use "dd" after verifying the image is correct (by running a hash against the image). I'm not sure why the Ouya team is using package_extract_file() instead of dd. I'm not in front of my Ouya though, LNX and SOS could be folders rather than block devices (although /dev/block seems to imply otherwise).
You can remove most of the other lines in the script that install the actual OTA update files. If you need help, let me know. I can make a custom update-script for you.
WARNING!!!!!!!! The above is just my take on things from looking at the scripts for 20 minutes. This could total brick your device if your recovery isn't of the right format or is not correctly built. Don't say I didn't warn ya.
You might want to read off the contents of the SOS to compare in a hex editor to your recovery. We might find out some things that would prevent a brick.
Sent from my Nexus 7 using xda premium
Thank you for all your detailed information. I assumed that if my cwm recovery build failed I could just flash the boot.img from the ota and restore it, but it sounds like that might not be correct if the update is dependent on a hashed, preexisting recovery/kernel. I used the boot.img from the ota to build the recovery at http://builder.clockworkmod.com/ and it showed successful and gave me these four files:
https://dl.dropboxusercontent.com/u/7653846/Archive.zip
So to test, should I be able to flash_image /dev/block/platform/sdhci-tegra.3/by-name/SOS recovery.img?
my concern is that particular block doesn't show up on a mount command...
sonofskywalker3 said:
Thank you for all your detailed information. I assumed that if my cwm recovery build failed I could just flash the boot.img from the ota and restore it, but it sounds like that might not be correct if the update is dependent on a hashed, preexisting recovery/kernel. I used the boot.img from the ota to build the recovery at http://builder.clockworkmod.com/ and it showed successful and gave me these four files:
https://dl.dropboxusercontent.com/u/7653846/Archive.zip
So to test, should I be able to flash_image /dev/block/platform/sdhci-tegra.3/by-name/SOS recovery.img?
my concern is that particular block doesn't show up on a mount command...
Click to expand...
Click to collapse
I'm putting together an zip to flash in the stock recovery. This way we mimic what the stock updates do to flash over partitions.
I'm reading http://forums.ouya.tv/discussion/1380/recovery-mode right now in order to figure out how to get into the stock recovery.
One thing that I noticed is that I think your recovery is slightly larger than the stock one. I'm not sure how large SOS is, but I wouldn't want to flash over adjacent blocks (i.e. write out of bounds).
Makes sense. You must know something I don't if you can get it to flash in stock recovery... I tried simply adding files to the ota zip and flashing it and it failed.
sonofskywalker3 said:
Makes sense. You must know something I don't if you can get it to flash in stock recovery... I tried simply adding files to the ota zip and flashing it and it failed.
Click to expand...
Click to collapse
It probably doesn't work because the update.zip we're using is signed.
Just a thought, but an easier way to go, albeit dangerous, is to do the following. You need root access over adb to do this. Using dd is VERY dangerous. THIS MIGHT NOT WORK. We need to make sure that what we are writing to (/dev/block/platform/sdhci-tegra.3/by-name/SOS) is truly the block device containing the recovery partition or else this might brick the Ouya. In the past, I've seen recovery written to /dev/block/mmcblk0pX, where X is the recovery partition for the particular device. I'm not much of a tegra guy. I know more about Samsung's stuff.
1) place the recovery.img on your ouya (let's say in /sdcard/recovery.img)
2) open a terminal running on your Ouya (over adb would probably be best, e.g. "adb shell")
3) enter a root shell, type "su"
4) make a backup of your existing recovery partition with "dd if=/dev/block/mmcblk0p1 of=/sdcard/origRecovery.img"
5) write the new recovery to the recovery partition with "dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p1"
6) perform the following from user mbm in the Ouya forums to get into recovery (thread http://forums.ouya.tv/discussion/1380/recovery-mode)
This is a hack, an unintended sequence of events that results in recovery mode; what you need to do is crash the startup using sysrq.
For this you'll need a usb keyboard with the sysrq key, this is usually the printscreen button if your keyboard isn't labeled. As the OUYA starts to boot, hold down the alt-sysrq keys and press i, wait a few seconds and then repeat. This key combination is kill-all-tasks; thanks to whoever left this enabled in the kernel. Each time you kill the tasks the init process will restart them, after about 5 or 6 times init will print a warning on the console that one of the processes marked critical has been restarted too many times -- this then triggers an automatic reboot into recovery mode.
Unfortunately it's not always obvious when the ouya is in recovery mode. You might get screen with the ouya logo and a large red exclamation mark, or the screen might be entirely black; usually I got a black screen. Press the home button on the keyboard to bring up the recovery menu; it's actually a toggle so feel free to press the home button repeatedly until you see the menu since the timing isn't otherwise obvious.
Click to expand...
Click to collapse
There are two big unknowns here:
1) We don't know for sure that the new recovery (CWM) will actually work
2) We don't know for sure that /dev/block/platform/sdhci-tegra.3/by-name/SOS is the correct place to be writing a recovery
I'll see what I can dig up regarding /dev/block/platform/sdhci-tegra.3/by-name/SOS
---------- Post added at 02:53 PM ---------- Previous post was at 02:30 PM ----------
/dev/block/platform/sdhci-tegra.3/by-name/SOS is a link to /dev/block/mmcblk0p1
So far, it appears that the layout is the following:
Kernel (boot.img) is mmcblk0p2
Recovery is mmcblk0p1
System is mmcblk0p3
Sent from my SCH-I535 using xda premium
---------- Post added at 02:56 PM ---------- Previous post was at 02:53 PM ----------
I would imagine that if the recovery partition really is SOS, then the above steps would work if you could run them as root.
Sent from my SCH-I535 using xda premium
Some definite info:
SOS is recovery
OUYA firmware updates patches the boot partition on the fly (binary patching) - silly and error prone, but *shrug*. Don't need apply patch at all. dd is fine
It's much safer to use 'fastboot boot recovery.img' while in fastboot mode. This allows loading recovery or boot.img's into ram and execute them from there. Once that works 100%, you can flash it to SOS.
As most people already know, it's not possible to force the device into recovery. It has to be done with something like 'adb reboot recovery'.
mybook4 said:
I'm putting together an zip to flash in the stock recovery. This way we mimic what the stock updates do to flash over partitions.
I'm reading http://forums.ouya.tv/discussion/1380/recovery-mode right now in order to figure out how to get into the stock recovery.
One thing that I noticed is that I think your recovery is slightly larger than the stock one. I'm not sure how large SOS is, but I wouldn't want to flash over adjacent blocks (i.e. write out of bounds).
Click to expand...
Click to collapse
It's 8MB. If you dd to the block device (e.g. mmcblk0p1), you can't write out of bounds. The linux kernel knows the size and refuses it.
rayman said:
Some definite info:
SOS is recovery
OUYA firmware updates patches the boot partition on the fly (binary patching) - silly and error prone, but *shrug*. Don't need apply patch at all. dd is fine
It's much safer to use 'fastboot boot recovery.img' while in fastboot mode. This allows loading recovery or boot.img's into ram and execute them from there. Once that works 100%, you can flash it to SOS.
As most people already know, it's not possible to force the device into recovery. It has to be done with something like 'adb reboot recovery'.
Click to expand...
Click to collapse
I did the following with skywalker's recovery.
1) Attached a usb keyboard to the Ouya's full size usb port
2) Attached my computer to the Ouya's micr usb port
3) Ran "adb reboot bootloader" (the Ouya rebooted to a blank screen)
4) Waited 30 seconds and ran "fastboot boot recovery.img" (skywalker's recovery file)
The Ouya rebooted into CWM Recovery v6.0.3.2!
Error messages were encountered on the recovery screen (image attached)
5) Navigated around CWM with the arrow keys and the enter key
6) Rebooted with "reboot system now". Ouya booted right up.
When we flash the recovery to mmcblk0p1, we should rename /system/etc/install-recovery.sh (and maybe /system/recovery-from-boot.p) to prevent the recovery partition from being overwritten.
Looks like we need to adjust the recovery so it properly mounts the partitions. Hopefully after that we are good to go.
Wow, that's awesome progress! So I'll try the same steps when I get home tonight and then try building another recovery with proper mount points.
sonofskywalker3 said:
Wow, that's awesome progress! So I'll try the same steps when I get home tonight and then try building another recovery with proper mount points.
Click to expand...
Click to collapse
I think it should be a matter of placing the proper partitions in the fstab prior to creating the recovery image. From the error messages it looks like /cache and /data are the culprits.
If you get a chance to, please post the fstab you use so we can double check everything (want to avoid the potential for bricks).
Sent from my SCH-I535 using xda premium
I did the build without a custom fstab first to see if it would work. I'll make one tonight, or if anyone here has done it before feel free to make sure it's done right, this will be my first try at it.
Update:
Started making the fstab and got rid of the errors on my second build, seems it still can't mount some. making progress though.
Update2:
I have compiled a new recovery using the following recovery.fstab:
/cache ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/system ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
/data ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sdcard fuse /dev/fuse
this is based on information gathered from the mount command in an adb shell. it no longer gives the long string of errors, or complains that it can't mount any partitions except i get the following errors now:
can't mount /cache/recovery/command
can't mount /cache/recovery/last_log
can't open /cache/recovery/last_log
and a few others. not sure how to proceed at this point. I'm searching Google, but has anyone run into this before?
sonofskywalker3 said:
I did the build without a custom fstab first to see if it would work. I'll make one tonight, or if anyone here has done it before feel free to make sure it's done right, this will be my first try at it.
Update:
Started making the fstab and got rid of the errors on my second build, seems it still can't mount some. making progress though.
Update2:
I have compiled a new recovery using the following recovery.fstab:
/cache ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/system ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
/data ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sdcard fuse /dev/fuse
this is based on information gathered from the mount command in an adb shell. it no longer gives the long string of errors, or complains that it can't mount any partitions except i get the following errors now:
can't mount /cache/recovery/command
can't mount /cache/recovery/last_log
can't open /cache/recovery/last_log
and a few others. not sure how to proceed at this point. I'm searching Google, but has anyone run into this before?
Click to expand...
Click to collapse
I'm still new at making a recovery.fstab, but I noticed the following:
From running "ls -l /dev/block/platform/sdhci-tegra.3/by-name/"
lrwxrwxrwx root root 2013-05-25 02:23 APP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2013-05-25 02:23 CAC -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2013-05-25 02:23 LNX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2013-05-25 02:23 MDA -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2013-05-25 02:23 MSC -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2013-05-25 02:23 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2013-05-25 02:23 UDA -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2013-05-25 02:23 UPP -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2013-05-25 02:23 USP -> /dev/block/mmcblk0p7
Click to expand...
Click to collapse
Since the APP, CAC, LNX files are links to mmcblk0pX devices, maybe we should be using the mmcblk0pX names?
We should look at more examples to see what the recovery.fstab for other devices looks like. From what I've seen of other devices, mmcblk0pX devices are listed in recovery.fstab.
P.S. So far, I think we are fairly certain that
APP is the system partition
CAC is the cache partition
LNX is kernel boot.img
SOS is the recovery partition
I'm not sure what the rest are (data, etc). Is there a definitive list somewhere?
Here's what I was able to find based on your suggestion, it's the recovery.fstab from the nexus 7:
/system ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
/cache ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/data ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA length=-32768
/misc emmc /dev/block/platform/sdhci-tegra.3/by-name/MSC
/boot emmc /dev/block/platform/sdhci-tegra.3/by-name/LNX
/recovery emmc /dev/block/platform/sdhci-tegra.3/by-name/SOS
/staging emmc /dev/block/platform/sdhci-tegra.3/by-name/USP
Obviously this isn't exactly right, but it's a start until we can find more about the mounts.
I tried making the recovery.fstab using the mmcblk numbers but that made no difference... Cache always mounts empty. I'm going to try one more thing, then I'll post my final results and go to bed.
Update:
Well still no love, and no noticeable progress between recovery 2 and 7, but I feel like we're chipping away in the right direction. I'll seek some help from some more experienced recovery people tomorrow.
sonofskywalker3 said:
Here's what I was able to find based on your suggestion, it's the recovery.fstab from the nexus 7:
/systemext4/dev/block/platform/sdhci-tegra.3/by-name/APP
/cacheext4/dev/block/platform/sdhci-tegra.3/by-name/CAC
/dataext4/dev/block/platform/sdhci-tegra.3/by-name/UDAlength=-32768
/misc emmc /dev/block/platform/sdhci-tegra.3/by-name/MSC
/bootemmc/dev/block/platform/sdhci-tegra.3/by-name/LNX
/recoveryemmc/dev/block/platform/sdhci-tegra.3/by-name/SOS
/staging emmc /dev/block/platform/sdhci-tegra.3/by-name/USP
Obviously this isn't exactly right, but it's a start until we can find more about the mounts.
I tried making the recovery.fstab using the mmcblk numbers but that made no difference... Cache always mounts empty. I'm going to try one more thing, then I'll post my final results and go to bed.
Click to expand...
Click to collapse
Good stuff.
Not sure how we are going to get the field length= . I noticed the same field being used in the US Galaxy S III recovery https://raw.github.com/CyanogenMod/android_device_samsung_d2-common/cm-10.1/recovery.fstab
length= field is probably not needed, as the stock recovery doesn't list it.
Sent from my SCH-I535 using xda premium
Here's the recovery.fstab from my Ouya's recovery partition.
# mount point fstype device
/recovery emmc /dev/block/platform/sdhci-tegra.3/by-name/SOS
/boot emmc /dev/block/platform/sdhci-tegra.3/by-name/LNX
/system ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
/cache ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/misc emmc /dev/block/platform/sdhci-tegra.3/by-name/MSC
/staging emmc /dev/block/platform/sdhci-tegra.3/by-name/USP
/metadata emmc /dev/block/platform/sdhci-tegra.3/by-name/MDA
/data ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sdcard vfat /dev/block/platform/sdhci-tegra.0/by-num/p1
Click to expand...
Click to collapse
I tried doing CWM build with this recovery.fstab. /system, /data, and /cache all mounted.
Couldn't mount /sdcard automatically (trying to choose zip from sdcard) or manually (in mounts and storage, mount /sdcard).
I tweaked the recovery.fstab to the following:
/recovery emmc /dev/block/platform/sdhci-tegra.3/by-name/SOS
/boot emmc /dev/block/platform/sdhci-tegra.3/by-name/LNX
/system ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP
/cache ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/misc emmc /dev/block/platform/sdhci-tegra.3/by-name/MSC
/staging emmc /dev/block/platform/sdhci-tegra.3/by-name/USP
/metadata emmc /dev/block/platform/sdhci-tegra.3/by-name/MDA
/data ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sdcard datamedia /dev/null
Click to expand...
Click to collapse
This one mounted /sdcard correctly. I can "choose a zip from sdcard". I didn't actually choose a zip yet. I didn't format any of the partitions. I suppose we could try making a quick cwm zip to write something to the sdcard to test it out.
I've attached the stock Ouya recovery.img (from SOS partition). THIS IS NOT A CWM FLASHABLE ZIP, it only contains a zipped up version of the stock recovery.img. The md5 hash of the unzipped recovery.img is a6c1a6962984e9080ed8821628c4cc3f.
I've attached the CWM recovery.img that worked for me. THIS IS NOT A CWM FLASHABLE ZIP, it only contains a zipped up version of a newly built CWM recovery.img. The md5 hash of the unzipped recovery.img is c6b37906f280b16cd200503c3cde6dfb.
well, when I build using your suggested recovery.fstab i'm still getting the same error about the cache, but i booted the cwm you built and saw what you meant. can you post your actual recovery.fstab file so I can try to build with it? where did you get the boot.img you are using?
Update!
It worked!! I booted to your attached cwm and I'm running a nandroid backup right now. I'll try a restore next. In the meantime I'm putting together a Playmusic.zip flashable zip with the files necessary to get play music up and running and I'll try flashing it. Awesome work tracking down those partitions!
sonofskywalker3 said:
well, when I build using your suggested recovery.fstab i'm still getting the same error about the cache, but i booted the cwm you built and saw what you meant. can you post your actual recovery.fstab file so I can try to build with it? where did you get the boot.img you are using?
Click to expand...
Click to collapse
I edited the comment right above yours.
Recovery Builder wants the stock recovery.img, so I used adb to copy my Ouya's recovery partition to the sdcard, then I used adb pull to copy the recovery partition to my computer.
1) adb shell
2) su
3) cd /dev/block/platform/sdhci-tegra.3/by-name
4) dd if=SOS of=/sdcard/stockRecovery.img
5) exit
6) adb pull /sdcard/stockRecovery.img .
I used the recovery.fstab attached to this post. I obtained the stock Ouya recovery.fstab by doing the following:
I used split_bootimg.pl to split up the recovery.img into kernel and ramdisk (see Alternate Method in http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images). I used gzip to unzip the ramdisk and saw the stock recovery.fstab in /etc.
Here's what I did step by step:
1) split_bootimg.pl stockRecovery.img
2) mkdir ramdisk
3) cd ramdisk
4) gzip -dc ../stockRecovery.img-ramdisk.gz | cpio -i
in the ramdisk directory is etc/recovery.fstab
I then copied this file and edited the last line (/sdcard stuff). I used the new recovery.fstab with the Recovery Builder.
sonofskywalker3 said:
It worked!! I booted to your attached cwm and I'm running a nandroid backup right now. I'll try a restore next. In the meantime I'm putting together a Playmusic.zip flashable zip with the files necessary to get play music up and running and I'll try flashing it. Awesome work tracking down those partitions!
Click to expand...
Click to collapse
Awesome! Let us know how the backup/restore and zip flashing goes.
Once we verify that this CWM works correctly, people should be able write the new recovery by doing the following (NOTE this wasn't tested yet. I need to test it out first):
1) adb reboot bootloader
2) wait 30 seconds (blank screen is normal)
3) fastboot flash recovery recovery.img
4) fastboot reboot recovery (need a usb keyboard to navigate CWM)
5) flash a CWM zip to prevent stock recovery overwrite (we need to make this. The zip file should mount /system, rename recovery-from-boot.p to recovery-from-boot.bak, and unmount /system)
6) profit
Most of this could potentially be automated into a root/install CWM script.
Backup worked fine, flash worked and I'm booting now to make sure it put the files where it was supposed to and see if they work. Then i'll reboot and restore and make sure those files go away.One thing to note is that when i choose reboot system now it asked me to disable recovery flash,so I took the plunge and said yes, we'll see if it goes back to stock or not...
Update:
The .zip I built said it flashed correctly (unless i'm reading wrong the parts i could see with the overscan problems i'm having) but the files did not go to /system/app. I have attached the .zip file to see if I did something wrong with it, I just grabbed a sample from online and changed the files, haven't checked updater-script yet. I am restoring now, will post update on if that works.
It rebooted to stock recovery, as I expected, so still haven't flashed it just yet.
Well my oversensitive keyboard just hit enter twice so I'm actually backing up again, but I have to leave and take my daughter to a muesuem now, so I won't be able to continue until later. Good luck, i'll be keeping up with this thread on my phone.
Edit: removed non working zip

Categories

Resources