yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 10.1 Android Development] rsage:
Thanks - that works much better. I see that I do have a mount point at mmcblk1p2, just wondering if it's safe to assume that's the second partition on my external microSD since the output only shows # of blocks, partition name, etc...

u0_a87@android:/ $ cat /proc/partitions
major minor #blocks name

7 0 6269 loop0
179 0 7634944 mmcblk0
179 1 20480 mmcblk0p1
179 2 2048 mmcblk0p2
179 3 2048 mmcblk0p3
179 4 8192 mmcblk0p4
179 5 8192 mmcblk0p5
179 6 8192 mmcblk0p6
179 7 716800 mmcblk0p7
259 0 20480 mmcblk0p8
259 1 1433600 mmcblk0p9
259 2 4886511 mmcblk0p10
259 3 524288 mmcblk0p11
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
179 24 31166976 mmcblk1
179 25 23069308 mmcblk1p1
179 26 8096760 mmcblk1p2
254 0 6268 dm-0
u0_a87@android:/ $
[Galaxy Note 10.1 Android Development] TweakerL:
Those blocks are 1kb in size, so if your second partition is 8096760 kb or ~8GB, then it's safe to assume. Another way to look at it, is that mmcblk0p is clearly your internal storage, and mmcblk1 being the only other thing left, it must be your external storage. Moreover, ~31000000kb sounds like a 32GB MicroSD, which I assume is what you have...
[Galaxy Note 10.1 Android Development] smaw51:
Yeah it was with that script. I had it unzipped to my /sdcard, not in it's own folder, maybe that had something to do with it. I tried to do the script the way you said as best I could, after getting su and into directory in terminal, ran

mount -o remount,rw /system, sh ./install-a2sd; reboot

I saw a bunch of stuff flash on the screen for a split second before it rebooted.

I checked and the files had been transferred, but I had to switch enable to true. I then ran the script in init.a, init.d, then init.a again.

What would be a decent time to wait for the ready file to generate before giving up and trying again?
[Galaxy Note 10.1 Android Development] rsage:
Correct on all counts, thanks
[Galaxy Note 10.1 Android Development] aadiflesher:
flashable zip

Hello.

The script sounds really great and I really wanna try this. I used others but this sounds "super" :)

Are you going to make a flashable zip any time soon, that includes all the changes necessary to make it work?

Thanks!
[Galaxy Note 10.1 Android Development] smaw51:
I'd imagine that would be possible once it gets ironed out. I still have not been able to get it running fine for me yet.
[Galaxy Note 10.1 Android Development] TweakerL:
Double Post
[Galaxy Note 10.1 Android Development] TweakerL:
Once the script is fully tested I might try to make a recovery zip for it. However, the zip in the OP named a2sd-install.zip does essentially the same exact thing that a recovery zip would, except for requiring people to run a single command in terminal. I'm not gonna lie, I have no idea how to make a recovery zip yet, but guess what, two weeks ago when I started working on this script I had no idea how I was gonna do it, and yet now I have the only script, in the whole android universe, that I know of, that enables running every app, including keyboards launchers and widgets from external storage. Do you really want a recovery zip? Feel free to make one. Don't know how? Go ahead and learn how, this is a developer website after all... I personally got tired of hoping people would make stuff, so I started doing it myself.

Believe me, I'm not trying to be an ass even if I come across that way. The fact is however that if I read back the thread there's hardly anyone being helpful and mostly people asking for stuff, comparing this script, which was only a preview until 2 days ago to apps and scripts that have been around for ages, some that have already even died out, or complaining...

I'll be honest here, people ought to be less afraid of trying things, unless it involves messing with the bootloader as just about everything else is easily recoverable. I'm as new to this stuff as some of the people asking for zips... I only just started making stuff a little over a month ago, and just in putting together this script I semi bricked/bricked my tab about 30 times (no exaggeration). I'm not saying people should go and brick 30 times, just that people should be willing to make a little bit of effort. If it weren't for people like smaw51, even though we haven't had the chance to really work on his device he's at least tried, it would be mighty difficult for anyone creating something to get it to a point where others can use it easily. Just talking about how nice it would be to have a recovery zip doesn't do the process any good. Every person who has ever made a script knows that everyone wants something easy to install, but that's not gonna happen until enough people have tested it. Because as soon as something untested gets released in a easy package people will inevitably try it and complain when their stuff gets broken no matter how many times we say to try it at your own risk.

Bottom line, don't ask for the end result if you're not gonna help get there
[Galaxy Note 10.1 Android Development] smaw51:
Right on dude, I can help make a recovery zip. I did it with my old htc evo so I'm sure it's pretty simular, and if not we can just find a recovery zip for something like a boot animation for the note and modify it to work.

I have still not been able to get the DEVICE IS READY file or whatever it is called in the Tweaked.Scripts folders area. I have looked through the code in install-a2sd to find where the issue was coming from. It looks like when it goes to verify that all the files were copied over, it returns a false and exits the script. I have triple checked to make sure I do have all the scripts in the right location and have recovered my busybox a few times as well thinking it might have been an issue with one of those commands, still no luck. I went ahead and removed the exit portion of the main install script when it checks for the files, no other issues running the script but still no DEVICE READY file even after close to an hour, and I don't have much stuff on my device.

My card is partitioned to ext4 with I believe around 3gb on the partition.

Also, when I go to run the scripts individually in init.a and init.d it looks like they come accross a permission error somewhere along the way and shut down. I have root access set on everything so I don't know where this is coming from.

Also, the difference between the removeable sdcard in mnt/extSdCard as opposed to /sdcard, which is the internal memory, which one should the Tweaked.Scripts be? Mine is getting sent to the internal memory

The error I get when I run the 01earlymounts script is about A2SD/options/vars: not found

I tried commenting it out with # but it just came up with a differnt error.

Also, can you explin what the -f and -o mean here? I got the ! is like not

if [ ! -f /system/bin/debuggerd -o ! -f /system/bin/sysinit -o ! -f /system/etc/init.a/01earlymounts -o ! -f /system/etc/init.d/01a2sd -o ! -f $SDCARD/Tweaked.Scripts/A2SD/options/USER_OPTIONS ]

Thanks for your hard work dude!
[Galaxy Note 10.1 Android Development] smaw51:
I think I might have just figured out some part of it! While I was trying to run the scripts in the init folders, I was always getting errors about not finding the the stuff in the Tweaked.Scripts folder, like vars and USER-CONTROL or whatever, I tried commenting out and changing other things to see if I could get it to run without errors,

I was finally able to get both to run without error by changing the line

TWEAKED=$(busybox find.........

to TWEAKED = (/sdcard/Tweaked.Scripts)

I think there was just an issue with my busybox maybe

Everything ran with no hickups, we'll see if it worked or not a little later
[Galaxy Note 10.1 Android Development] smaw51:
yeah, there was a space missing in one of the init folder scipts, I don't remember if it was the a or d one. It still didn't work yet though.

So this is supposed to replace the current debuggerd with yours and then rename the extension to .bin right?
[Galaxy Note 10.1 Android Development] TweakerL:
It renames the actual binary to debuggerd.bin, then creates a new debuggerd which launches sysinit then calls debuggerd.bin, the original binary. sysinit on the other hand launches init.a instantly and init.d with a set delay.
[Galaxy Note 10.1 Android Development] smaw51:
That was probably a big issue for me then haha! I was renaming the file you provided to .bin, we'll see how this clears things up. Also, I have been working on a flashable zip for this
[Galaxy Note 10.1 Android Development] phillybizzle:
Making a automatic all in one .zip for this would be kick ass!! I am unexperienced with the directions on this, and have absoutly no memory left :(
[Galaxy Note 10.1 Android Development] ArangeLTX:
Please, add new var to "USER_OPTIONS", and use it in 01a2sd script:

SD_BLOCK_NAME='mmcblk1p2'

My SD-EXT is 'mmcblk0p2'. Thanks.
[Galaxy Note 10.1 Android Development] smaw51:
How does this work?
[Galaxy Note 10.1 Android Development] TweakerL:
Found the reason why nothing was happening after running the install script. Apparently I had forgotten to have it change ownership for the files, which caused them to be unable to run. Should be all fixed now, so please download the new zip, extract it to the sdcard, then navigate to that location and run the command as usual

su
cd /location/where/you/extracted
sh ./install-a2sd

Say I extract it to /sdcard/Download

su
cd /sdcard/Download
sh ./install-a2sd

New zip can be found in 2nd post.

I have no problem doing that; however I suggest you double and triple check that as I've never heard of the external storage going into mmcblk0

Please post output for the following commands in terminal

mount
cat /proc/partitions
[Galaxy Note 10.1 Android Development] ArangeLTX:
NP, thanks :)

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
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mtdblock0 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock3 /data yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock2 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock1 /v_mtd yaffs2 rw,relatime 0 0
/dev/block/mmcblk0p2 /data/sdext2 ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.mindblocks.blocks-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
major minor #blocks name

7 0 50967 loop0
31 0 409600 mtdblock0
31 1 6144 mtdblock1
31 2 103936 mtdblock2
31 3 430080 mtdblock3
179 0 30657536 mmcblk0
179 1 29542400 mmcblk0p1
179 2 1048576 mmcblk0p2
179 3 65536 mmcblk0p3
254 0 50967 dm-0

_____

A "FIX":

From:

SD_MNT=$( busybox mount | busybox egrep -i '/sdcard' | busybox awk '{print $3}' )

To:

SD_MNT=$( busybox mount | busybox egrep -i '/sdcard' | busybox awk '{print $3}' | egrep -v '.android_secure' )
[Galaxy Note 10.1 Android Development] TweakerL:
Thanks for the suggestion with $SD_MNT

Can you please post output for:

busybox ls -lR /dev | busybox egrep -i "mmcblk0p2 ->" | busybox awk '{print $11}'

Just want to make sure it still outputs the right info. Will have updated zip with new variable up in a few minues.
[Galaxy Note 10.1 Android Development] ArangeLTX:
You get the right command. :D

/dev/block/mmcblk0p2
[Galaxy Note 10.1 Android Development] TweakerL:
Coolbeans, zip updated. Make sure to change $SDCARD right at the beginning of the install-a2sd script if your /sdcard is not linked to /data/media, unfortunately I can't have this variable pulled from USER_OPTIONS since at the point of install the file technically doesn't exist. Will soon add a prompt in the script that asks for the user to type in the location.
[Galaxy Note 10.1 Android Development] ArangeLTX:
Can you use the Android builtIn (ICS, could by GB too??) "$EXTERNAL_STORAGE" var?

Some more info:

$ set

ANDROID_ASSETS=/system/app
ANDROID_BOOTLOGO=1
ANDROID_DATA=/data
ANDROID_PROPERTY_WORKSPACE=8,65536
ANDROID_ROOT=/system
ANDROID_SOCKET_zygote=9
ASEC_MOUNTPOINT=/mnt/asec
BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar
COLUMNS=53
EXTERNAL_STORAGE=/mnt/sdcard
HOME=/data
HOSTNAME=android
IFS='
'
KSH_VERSION='@(#)MIRBSD KSH R39 2010/08/24'
LD_LIBRARY_PATH=/vendor/lib:/system/lib
LINES=19
LOOP_MOUNTPOINT=/mnt/obb
MKSH=/system/bin/sh
OPTIND=1
PATH=/data/local/bin:/system/bin:/system/xbin
PGRP=7232
PPID=7147
PS1='$(precmd)$USER@$HOSTNAME:${PWD:-?} $ '
PS2='> '
PS3='#? '
PS4='+ '
PWD=/
RANDOM=29152
SD_EXT_DIRECTORY=/sd-ext
SECONDS=161
SHELL=/system/bin/sh
TERM=screen
TMOUT=0
USER=app_91
USER_ID=10091
WTLE_VERSION=3.2.0.patch6.1
_=set
[Galaxy Note 10.1 Android Development] TweakerL:
I could use it, but I feel funny about the fact that I don't know for sure that it's always there in every device in every version of android. I'll try to have the script for it's presence, then if it's there ask for confirmation and if it's not there or if the user says it's wrong, then ask for the user input.

Btw, looks like you're online and watching the thread now, but if you have access to IRC we might make a lot more progress talking on there.

Also, what device do you have?
[Galaxy Note 10.1 Android Development] ArangeLTX:
You are right again. I saw that this var many times link to internal storage (phones with internal storage and a SD slot).

#xdadevs @ freenode.

Sony Ericsson Xperia NEO V. Now with ICS; working to go to JB.
[Galaxy Note 10.1 Android Development] TweakerL:
Zip updated with prompts now. If $EXTERNAL_STORAGE is set, it will tell the user what it's set to and ask for confirmation. If yes then install proceeds, if no then script asks for new location. Upon giving new location script asks for confirmation. If yes, install proceeds, if no the script exits. If $EXTERNAL_STORAGE is not set, then the script asks for location. Upon receiving the location script asks for confirmation. If yes, install proceeds, if no script exists.

Pro: no need to edit the script

Con: It now can never be a flashable zip since it requires user input. ( I prefer it this way... if people can't use the terminal they're not worthy of this :D )
[Galaxy Note 10.1 Android Development] smaw51:
I think there is an issue with the initial command checking for busy box. I have the newest version installed in system/bin, tried installing again a few times, verified that the file it was checking for was there. I just # out the check and ran the script, all went well aside from auto reboot so did manually. We'll see how long until ready file is generated
[Galaxy Note 10.1 Android Development] smaw51:
Hey tweakerL, what do you have your sdcard partitioned to?

---------- Post added at 06:16 AM ---------- Previous post was at 05:26 AM ----------

So this should work perfectly , but I just screwed mine up by being careless. My tweaked.scripts folder was being weird and not allowing editing or deleting from previous attempts. I'm thinking this caused an error with the script, it was taking over 30 minutes and still no ready file, the time stamp on the folder was off by a few days as well. So I just rebooted, was able to do some work on the folder, rebooted and deleted the delete.txt files and then the ready file was generated, rebooted, stuff was getting copied around, saw my storage size decrease, deleted more delete.txt files, then started getting a bunch of fc, until touchwiz went and everything was blank, rebooted a few times and looks like the settings were reset and my apps and stuff are not showing up. Play store not here, so I'll just restore from a nand, and see what happens.

So moral of story, make sure that your stuff is clear before running this script and have plenty of time to letters run, like , maybe an hour. Also, I only had a couple gigs of stuff
[Galaxy Note 10.1 Android Development] TweakerL:
Yea there was a mistake in the logic for checking for busybox that ArangeLTX and I found last night, I'm uploading a new vewsion soon.

Now as for the issue you had, I'm pretty sure I know exactly what happened. First off, you WANT to have $deletepostmove set to false until you know that everything moved right. Now when you delete the deletethis.txt files in mid process the script will think that it's done and create the DEVICE_IS_READY file even though it's not ready. So, you don't want to do that. Also, it can take a while to run, though the time is completely dependent on how much stuff you have.

You MIGHT be able to see the stuff being copied if you open the terminal and use the command:

logcat | busybox grep "01a2sd"

though I'm not absolutely sure that the logwrapper will catch it without further modification.

Anyway, I'll be uploading a new zip in the next few minutes.
[Galaxy Note 10.1 Android Development] smaw51:
right on. I restored from a nand last night and ran the script again, this time making sure to wait and stuff. Everything ran smooth and fairly quick. I still had the time period of all my stuff force closing and wasnt able to get to my file explorer, but I just waited until it was just touchwiz failing. Nothing was showing aside from the stock wallpaper. I have rebooted a few times, looks like everything was coppied over to the ext on my sdcard, I can see is in my file explorer. I think if I had done it the proper way of leaving deletepostmove to false I would have avoided the force close.

It is still seeming thought that my stuff is still on my external memory though. I will upoad a before and after screenshot as soon as my tablet is done upgradeing (I think it could be because it was an older nand??). It is showing more space used by my apps for some reason, but from memory, it looks like more space available and everything else was fairly the same.

So if I were to run this again, I would turn enable to true, leave deletepostmove to false until after it runs smooth, then I can turn that to true and reboot and it will clear up my internal memory?

Thanks a lot for all your hard work on this!

EDIT added screenshots
[Galaxy Note 10.1 Android Development] Tony84:
Hi, first of all I don't understand instructions in second post, where to copy what file and what file to set 755 permission etc. etc. it's not shown, if someone could help me to do that it would be nice ^^

Then other question: this script enable to use only the sdcard as default installation destination or is also like we see in many phones that we can move manually apps from internal to external storage?

edit: instruction are valuable from andylam16's quote in 3rd post?
[Galaxy Note 10.1 Android Development] smaw51:
And this is all on the 2nd post, from the OP

The third post you're talking about was a quote for an earlier post without the edits and the updates

Make sure you have your sdcard partionted to ext4

Make a nand backup in recovery

make a backup of all your apps as well if you want to

Extract the zip to a folder, like /sdcard/

check the extraction method to see if it sets up its own folder and what not. With rom toolbox it extracts to a folder with the same name as the zip.

Open the file /USER_OPTIONS with a text editor and change the enabled value to true

The new script is set up to take care of most everything for you. What you do need to do is with a file explorer, go into /system/bin find debuggered, and add the extention .bin to it, making /system/bin/debuggered.bin

then open your terminal emulator, and type

su

cd /sdcard/install-a2sd

sh ./install-a2sd

and follow the prompts

let your device sit a while until the DEVICE_READY file is created in ?sdcard/Tweaked.Scripts/A2SD/

Reboot, then wait again, and reboot while file is there again

I'm not sure how the new update put out today works, if it is any different in the install method or not, but these are the steps I followed to get my stuff on my sdcard.
[Galaxy Note 10.1 Android Development] Tony84:
ok clear enough ^^ thank you very much I'll try now

---------- Post added at 06:27 PM ---------- Previous post was at 06:11 PM ----------

when there is the question "according to your system /sdcard points to mnt/sdcard" is it correct or here I have to put the mnt for the external sdcard?

---------- Post added at 07:07 PM ---------- Previous post was at 06:27 PM ----------

successfully applied it, but nothing moved to external sd. if I want to try again what to do to restart from beginning?
[Galaxy Note 10.1 Android Development] smaw51:
So you rebooted 3 times and nothing is on your ext partition of your sd card? Do you have a lot more files in your Tweaked.scripts folder now?

---------- Post added at 06:58 PM ---------- Previous post was at 06:31 PM ----------

Dude, with the firmware update that came out today, there might be issues with this!

After I installed the update, It went back to almost stock, my pics and stuff are still here, but only bloatware apps, no gapps, tried flashing them but no luck, the flash said successfull though.
[Galaxy Note 10.1 Android Development] TweakerL:
Couple of things just to correct and clarify:

You don't have to rename debuggerd to debugger.bin, the install script will do that by itself, though it doesn't hurt to do it manually.

Also, if you read the 2nd post you'll see that the whole process takes 3 reboots.

STAGE 1 = get variables

STAGE 2 = use variables from reboot 1 to start copying all your stuff over

STAGE 3 = Mount external storage now that all your stuff exists in external storage.

THE MOST IMPORTANT STEP IS TO LET THE SCRIPT DO ITS THING AFTER THE FIRST REBOOT IN STAGE 2

(DO NOT REBOOT UNTIL YOU SEE THE FILE /SDCARD/TWEAKED.SCRIPTS/A2SD/DEVICE_IS_READY)

IF YOU DO REBOOT, AND YOU DON'T KNOW HOW TO USE ADB TO DISABLE THE SCRIPT, YOU'LL HAVE MAJOR HAVOC ON YOUR DEVICE

AND IF YOU ENABLED $DELETEPOSTMOVE IN USER_OPTIONS BEFORE MAKING SURE EVERYTHING MOVED OK ALL YOUR APPS WILL BE GONE

AND YOU'LL HAVE TO RESTORE FROM A NAND BACKUP

I'll be editing the OP and 2nd post with extra info later, possibly today... EDIT - Done

Hmmm, the update failed for me earlier... however, most likely the update got rid of part of the script. flashing GAPPS has caused nothing but troubles for me in this tab. I'll add info on 2nd post in a little bit on how to disable the script through ADB. My best suggestion would be to restore the apps with titanium backup or something of the sort, then run the script again.
[Galaxy Note 10.1 Android Development] Tony84:
Rebooted 3 times but first time I applied script I set in terminal mnt/sdcard but this is internal storage. After reboot I applied again script but input mnt/extSdcard, so actually don't know If the script applied well. Now what to do to restart directly with extSdcard? Btw inside internal sdcard tweaked scripts I have device is ready, first run, stage1, 2, 3.. in mnt folder now have some folders usbdrive A till F.
[Galaxy Note 10.1 Android Development] TweakerL:
Install script is supposed to point to the internal storage. you had it right the first time. If your device is still running properly, run

mount

in terminal, and if you have the 3 mounts like it shows in the 2nd post, then the script is already fully functional.
[Galaxy Note 10.1 Android Development] Tony84:
Got them but as I said nothing has moved into external sdcard