Related
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
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!
Hi all,
after i resize my SD with MiniTool Partition Wizard and create a Linux Swap partition my swap on mobile wan't work. also when i want to create a ext4 for data2sd, it also wan't work -.-
don't have any idea..
Use GingerDX v21 + Alfs v06
safix8 said:
Hi all,
after i resize my SD with MiniTool Partition Wizard and create a Linux Swap partition my swap on mobile wan't work. also when i want to create a ext4 for data2sd, it also wan't work -.-
don't have any idea..
Use GingerDX v21 + Alfs v06
Click to expand...
Click to collapse
hi try this FAT32/EXT2/LINUX SWAP for now
testing only then if work upgrade to ext4
use minitools partition then download userinit.txt
go to this thread
xpraken said:
do this
1) download userinit.txt below to root of sdcard
2) boot into CWM recovery
3)mount /sdcard, /sd-ext (if you have ext partition) and /system
4) run: adb shell
5) move userinit.sh to /sd-ext ->
mv /sdcard/userinit.txt /sd-ext/userinit.sh
6) then,
chmod 755 /sd-ext/userinit.sh
7) reboot
this step will activate the swap without using app like swapper2
Click to expand...
Click to collapse
9) run sdparted: for the differents options see the original thread
This is for my configuration -> sdparted -es 1024M -ss 128M -efs ext3
also when i create partitions with minitool partition?
Swap using terminal emulator:
bash
cd /sdcard
dd if=/dev/zero of=[swap filename] bs=1024k count=[Size in MB]
# E.g. dd if=/dev/zero of=swapfile.swp bs=1024k count=32
# Creates a 32mb empty file called swapfile.swp on sdcard
mkswap [swap filename]
# Formats swap file
[wait at least 30 secs after doing this then]
swapon [swap filename]
# This enables the swap file (NOT swap using Partition)
# [swapoff [swap filename]] (Disable Swap. Be Patient while swap contents are emptied)
----
or if you were looking for partitions...
swapon [Linux swap partition] (/dev/****)
after i successfully parted my sd, moved the userinit tu sd-ext, the Recovery can mount sd-ext.
when i want to boot to rom, it will stuck on Alfs Kernel Boot logo.
i have create an fat32/ext2/swap partition
What do i wrong
{
"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"
}
i'm wondering about people who gets ext and swap work fine.
i work over an week to get swap and ext partition to work -.-
could be the sd card itself be the problem?
safix8 said:
could be the sd card itself be the problem?
Click to expand...
Click to collapse
Safix8 it'a not your fault..it's a problem of kernel..i and few people have this problem..the solution for me is remove the ext partition and for swap partition look here. so, swap work for me..
safix8 said:
9) run sdparted: for the differents options see the original thread
This is for my configuration -> sdparted -es 1024M -ss 128M -efs ext3
also when i create partitions with minitool partition?
Click to expand...
Click to collapse
men this how i work with ext2 and swap (linux swap)
use minitools to partition fat32/ext2/linuxswap
i download the userinit.txt and edit the swappiness to 200 bcoz my linux swap is 257mb
then
poweroff ur phone
boot to cwm or xrecovery
mount /sd-ext and /sdcard
first to know if ur phone is connected
type adb devices
if on the list the phone is connected
next
run adb shell
type this
mv /sdcard/userinit.txt /sd-ext/userinit.sh
and
chmod 755 /sd-ext/userinit.sh
at last reboot
to know the swap is working
goto terminal
type FREE
if swap is 0
is not working
xpraken said:
do this
1) download userinit.txt below to root of sdcard
2) boot into CWM recovery
3)mount /sdcard, /sd-ext (if you have ext partition) and /system
4) run: adb shell
5) move userinit.sh to /sd-ext ->
mv /sdcard/userinit.txt /sd-ext/userinit.sh
6) then,
chmod 755 /sd-ext/userinit.sh
7) reboot
this step will activate the swap without using app like swapper2
Click to expand...
Click to collapse
Sweet! Now I'm able to swap without swapper2. Thanks!
adb shell?where
hajiborojobo said:
adb shell?where
Click to expand...
Click to collapse
read this it may help
ADB
Manage swap over app
Try app resetSwap
"https://market.android.com/details?id=com.guille.resetSwap#?t=W251bGwsMSwxLDIxMiwiY29tLmd1aWxsZS5yZXNldFN3YXAiXQ.." for manage your swap (enable, disable, reset, info..)
it's cool , needn't restart
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
Code:
disclaimer
/*
* Your warranty is... still valid?
*
* I am not responsible for bricked devices, dead SD cards,
*/
Hello
This Guide to make Dual-Boot for P-Smart that keep Stock rom untouched and install any GSIs. It allows two Android os installed at the same time and switch between them using SHRP Recovery for dual boot.
This method tested and worked on Fig-la1
Spoiler: General information
This done by creating a new system partition using Parted (shrink userdata partition and creat the new system partition)
To Boot from the new system partition: change the name of the new system partition to "system" and the name of old system partition to any name e.g. "system-b"
To Boot from the old system partition: change the name of the old system partition to "system" and the name of new system partition to any name e.g. "system-b"
Dual boot for P20 lite - demonstration video (I am using SHRP RECOVERY (like TWRP) with tweaks to change boot partition easily, instead of writing terminal commands. This a video shows the dual boot process)
Requirements
TWRP/SHRP
Parted (attached arm and arm64, unzip the file)
Latest fastboot and ADB commands installed
Backup all your data because you will make a factory reset and format data partition
Steps:
Boot to TWRP/SHRP
Run the following commands
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
p free
note: parted /dev/block/xxxxx according do your device
3- it will show the list of partition "save this you may use it later". remember the number of old system partition which is in my case "52"
{
"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"
}
4- remove "userdata" partition which in my case number 59 using the following command
Code:
rm 59
5- create the new system partition (partition number 59 in my case ) using the following command
Code:
mkpart name fs_type start end
name: name of new partition e.g "system-b"
fs_type: file system type e.g "ex4"
start: the end value in MB of the previous partition, in my case "7153MB"
end: equal to start + size where size will be the size of the target partition. in my case in need 4GB partition so end=7153MB + 4GB =11153MB
In my case I'll type:
Code:
mkpart system-b ext4 7153MB 11153MB
set 59 msftdata on
name 59 system-b
6- create the "userdata" partition (partition number 60 in my case, start= 11153MB )
In my case I'll type:
Code:
mkpart userdata ext4 11153MB 31.3GB
set 60 msftdata on
name 60 userdata
7- get the new partition list
Code:
p free
8- exit
Code:
quit
9- format userdata and the new system partition using "mkfs.type /dev/block/mmcblk0pxx" (in my case partition number 59 and 60). you may need to reboot to stock recovery to make factory reset
Code:
adb push /path/to/mkfs.ext4 /sbin/mkfs.ext4
adb shell
chmod 777 /sbin/mkfs.ext4
mkfs.ext4 /dev/block/mmcblk0p59
mkfs.f2fs /dev/block/mmcblk0p60
10- You can now switch between two systems using either of these two methods
Spoiler: Using SHRP Recovery
SHRP is a beautiful TWRP-based recovery with modern UI, custom layout, useful functions, and more.
In this method you must have "System" and "System-b" partitions, other names not accepted
1- Download SHRP Recovery for DUAL Boot from here
2- Flash it on recovery_ramdisk or erecovery_ramdisk
3- from the main screen choose tweaks
A- Active new system partition and new data profile
(Important Note: Now "System partition" is the new created partition and "System-b partition" is the default system partition)
B- Active default system partition and default data profile
(Important Note: Now "System partition" is the default system partition and "System-b partition" is the new created partition)
Reboot before make any change
Spoiler: manually
A- To Boot from your new system partition > boot to twrp and run the following command
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
name 52 system-b
name 59 system
or from TWRP terminal write the following
Code:
parted -s /dev/block/mmcblk0 name 52 system-b
parted -s /dev/block/mmcblk0 name 59 system
change the number 52 and 59 according to your partition list (in my case 59: new system partion, 52 old system partition ). Then reboot TWRP and flash your new android os
B- To Boot from your old system partition > boot to twrp and run the following command
Code:
adb push /path/to/parted /sbin/parted
adb shell
chmod 777 /sbin/parted
parted /dev/block/mmcblk0
name 59 system-b
name 52 system
or from TWRP terminal write the following
Code:
parted -s /dev/block/mmcblk0 name 59 system-b
parted -s /dev/block/mmcblk0 name 52 system
change the number 52 and 59 according to your partition list (in my case 59: new system partion, 52 old system partition ). Then reboot
-------------------------------------------------------
@Abdelhay.ali hey bro, can i use shrp recovery to root FIG-LA1?
and which system (rom) will be used as second system?