Sgs3 cm10.1 ums rooted (ext4 xfat) - Galaxy S III Themes and Apps

Hi all,
since i could not use the UMS mode on my sgs3 and all of the tested Applications do not work i made 2 scrips for gscrip.
First check if all mount points are correct for you, if not correct them. Run mount, check mount point of sdcard (/dev/fuse /storage/sdcard1)
But i think on all sgs3 with cm10.1 it should be the same.
edit:
I get a transfer rate of ~8.5MB/s writing and ~ 18MB/s reading so for copying mp3 to the mobile i will still plug the card to the pc.
!!! AND DON'T FORGET TO UNMOUNT/EJECT YOUR SDCARD BEFORE ums_off !!!
And don't forget you are working as root so you can screw up a lot
[email protected]:/ # mount
...
/dev/block/vold/179:49 /mnt/fuse/sdcard1 ext4 rw,dirsync,nosuid,nodev,noexec,noatime,barrier=1 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
...
Click to expand...
Click to collapse
ums_on
Code:
setprop persist.sys.usb.config mass_storage,adb
umount /storage/sdcard1
echo /dev/block/vold/179:49 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
ums_off
Code:
echo "" > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
setprop persist.sys.usb.config mtp,adb
vold
Hints:
If you are using Linux and your sdcard is ext4 like mine and can't write as a user to the root of the sdcard just add a group to "/etc/group" for me it was (the id you see when you type mount)
Code:
mobile_sd:x:1023:dark-wulf
Check and Disable journal on ext4 sdcard with a card-reader
Code:
root # tune2fs -l /dev/sdXY | grep has_journal
root # tune2fs -O ^has_journal /dev/sdXY
And remove reserved blocks for root
Code:
root # tune2fs -m 0 /dev/sdXY
Thanks to http://forum.xda-developers.com/showpost.php?p=27282116 for bringing me the idea
Greetings
dark-wulf

Related

[Q] 【data2sd】i have some troubles~~~555

there're some troubles while data2sd, and it doesn't work.....
please help me!
my G7's infomation:
S-OFF, AlphaRev N1Table HBOOT, SdCard:6.8G+1.2G FATA32
Process:
E:\android-sdk\tools>adb shell
/ # mount /system
mount /system
/ # mount /data
mount /data
/ # mount /sdcard
mount /sdcard
/ # exit
exit
E:\android-sdk\tools>adb push c:\01data /system/etc/init.d
32 KB/s (394 bytes in 0.011s)
E:\android-sdk\tools>adb push c:\busybox-armv6l /system/xbin/busybox
1771 KB/s (1062992 bytes in 0.585s)
E:\android-sdk\tools>adb shell
/ # chmod 755 /system/etc/init.d/01data
chmod 755 /system/etc/init.d/01data
/ # chmod 777 /system/xbin/busybox
chmod 777 /system/xbin/busybox
/ # cd /
cd /
/ # mount /dev/block/mmcblk0p2 /sd-ext
mount /dev/block/mmcblk0p2 /sd-ext
/ # dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
dd if=/dev/zero of=/sd-ext/ext2 bs=1048576
dd: writing '/sd-ext/ext2': No space left on device
1199+0 records in
1197+1 records out
/ # /system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2
/system/xbin/busybox mke2fs -F -L userdata /sd-ext/ext2
Filesystem label=userdata
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
76800 inodes, 306639 blocks
15331 blocks (5%) reserved for the super user
First data block=0
Maximum filesystem blocks=4194304
10 block groups
32768 blocks per group, 32768 fragments per group
7680 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
/ # mkdir /sd
mkdir /sd
/ # /system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
/system/xbin/busybox mount -o loop /sd-ext/ext2 /sd
/ # cd /data
cd /data
/data # cp -a * /sd
cp -a * /sd
/data # cd /
cd /
/ # /system/xbin/busybox umount /sd
/system/xbin/busybox umount /sd
/ # exit
exit
E:\android-sdk\tools>adb reboot
error: closed
BTW,when i reboot the phone,i found the second partition on sdcard is 100% full,why?where is the mistake?
help!help!help!help!help!
This is a question and belongs in q&a, not development.
Sent from my Evil Lair using Doomsday Device
It actually belongs in the Data2SD thread, which in turn IS in ROM Development
Why you don't use Androhero tutorial that I reported on post number five??
It's very simple fast and secure.
Don't fails with it
sent from the future
thx,i'll try
Btw I suggest to use the default mtd structure.
sent from the future
E:\android-sdk\tools>adb reboot
error: closed
this problem may cause by usb drives or recovery?
the drives are all installed ok...
mattiadj said:
Why you don't use Androhero tutorial that I reported on post number five??
It's very simple fast and secure.
Don't fails with it
sent from the future
Click to expand...
Click to collapse
i have a question,in your tutorial, don't need this file busybox?
Busibox may be included in ROM.
Try to install recovery driver from root thread.
sent from the future

CM7 A2SD?

I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
i'm pretty sure that the most recent builds of CM do A2SD in the same fashion that Froyo implemented it.
Meaning that the apps run off your SD off the main partition, making the EXT 2/3/4 unnecessary.
The main difference between CM's version and the stock version of A2SD right now is that CM has implemented a way to get all apps unlocked to be able to go to your SD card, and not just the ones that have been enabled by the market publisher.
in general, there is no reason to keep the EXT partition on your card anymore if you are running CM. You can just reformat it and get that precious disk space back.
Hmm. Well that sucks. I always liked the Ext A2SD because it loaded much faster. With the Froyo method it takes a few once booted because the sd is mounted.
Sent from my CM7 EVO using XDA App.
IIRC CM7 supports Darktremor ext a2sd/cache2sd script. This is a necessity for me, so I hope that's correct.
The problem could be related to a bug
http://forum.cyanogenmod.com/topic/14813-darktremor-apps2sd-issue/
Have you tried the firerat a2sd+ script?
Data2sd support for performance enhancement would be nice also.
Ok, I am somewhat confused. I am coming from a sense-based rom that had a2sd enabled. I have a ton of apps so this is necessary. Was running my Dalvik from the \cache\ partition and apps from ext3.
Is this still possible in CM7?
I tried running a2sd check in CM& and it said "a2sd not located" (or something to that effect).
I've had a a2sd issue with recent aosp roms, my find is that if yours is not working and you have a2sd installed then it's the kernel, I had to try multiple kernels to get mine working, I found Sbc bcnice v7 works perfect, shows up properly partitioned and apps are utilizing it, all the new zendroids and savagezen dont support a2sd, neither does snap 7.6
my95z34 said:
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
Click to expand...
Click to collapse
use Link2SD it is the best a2sd replacement, it supports fat32 and ext as your 2nd partition.
my95z34 said:
I can't seem to get the Ext A2SD to work. I've got the partition but nothing installs there. Am I missing something? I remember on my G1 it was all pretty much automatic.
Sent from my CM7 EVO using XDA App.
Click to expand...
Click to collapse
Hey dude,
I had the same problem (or need depending on your view) - I tried to apply "cm7_legacy_a2sd_r3-signed.zip" which failed for some reason I couldn't be bothered to work out.
Which lead me to look inside and see how it was going to apply itself. Which then took me on a happy journey of discovery that resulted in the following How-To: pastebin.com/TgqtMuYX
Check it out and let me know how it goes. If you have any issues along the way either pm me or reply here if it's helpful to the wider audience. I'll feedback any relevant details if necessary.
Cheers.
AC
PS. The phone I applied this on was my Hero (GSM) before they pulled CyanogenMod-7.0.0-Hero - seems to behave quite well when you increase the heap to 32MB, but it's still work in progress for testing.
# Android.Control 2011/04
How to manually apply a2sd on CM7 from recovery - Carried out on a Hero, but other phones should be the same.
(details taken from cm7_legacy_a2sd_r3-signed.zip)
Boot into your recovery image. I used ClockworkMod as it allowed me to mount /system very easilly
If adb it is NOT in your search path you will need to specify the /full/path/to/adb
DO NOT complain to me if the adb commands below fail if adb is not in your path
All adb commands issued from a regular user account on Linux - (Windoze will be the same, I'm sure you can work it out)
Let us begin...
1. Mount the /system partition
Recovery: Select: [mounts and storage] > [- mount /system]
[ALTERNATIVE]
Code:
$ adb shell mount /system
Just to check all went well
Code:
$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98400 0 98400 0% /dev
/dev/block/mtdblock4 133120 122304 10816 92% /cache
/dev/block/mtdblock3 174080 118224 55856 68% /system
2. Find your sd-ext partition - usually /dev/block/mmcblk0p2
Recovery: Select [mounts and storage] > [- mount /sd-ext]
[ALTERNATIVE]
Code:
$ adb shell mount /sd-ext
Just to check all went well and to see what the /sd-ext device details are
Code:
$ adb shell df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 98400 0 98400 0% /dev
/dev/block/mtdblock4 133120 122304 10816 92% /cache
/dev/block/mtdblock3 174080 118224 55856 68% /system
/dev/block/mmcblk0p2 505636 10532 468999 2% /sd-ext
Recovery: Select [mounts and storage] > [- umount /sd-ext]
[ALTERNATIVE]
Code:
$ adb shell umount /sd-ext
3. Manually aplly firstboot.sh actions - from cm7_legacy_a2sd_r3-signed.zip
Using "/dev/block/mmcblk0p2" from the df output above exceute the following (replace with apropriate value for your phone!)
Code:
$ adb shell
~ # /system/bin/e2fsck -fy /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -O has_journal /dev/block/mmcblk0p2
~ # /system/bin/e2fsck -fy /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -c 0 -i 0 /dev/block/mmcblk0p2
~ # /system/bin/tune2fs -l /dev/block/mmcblk0p2
4. Then mount the sd-ext partition using existing script
Need additional entry in PATH to allow /system/etc/init.d/05mountsd to work
Code:
~ # PATH=$PATH:/system/bin
~ # /system/etc/init.d/05mountsd
You should see something very similar to below
Code:
e2fsck 1.41.10 (10-Feb-2009)
/dev/block/mmcblk0p2: clean, 11/130560 files, 27008/522112 blocks
5. Create app and app-private in sd-ext
If app and app-private [or dalvik-cache] exist on sd-exe BUT are NOT a directory then they must be removed!
Code:
~ # rm /sd-ext/app
~ # rm /sd-ext/app-private
[OPTIONAL]
Code:
~ # rm /sd-ext/dalvik-cache
Now we can create the directories proper
Code:
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/app
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/app-private
[OPTIONAL]
Code:
~ # install -m 771 -o 1000 -g 1000 -d /sd-ext/dalvik-cache
If you didn't see any errors you can assume everything is ok, but just to make sure...
Code:
~ # ls -l /sd-ext/
drwxrwx--x 2 system system 1024 Apr 16 13:49 app
drwxrwx--x 2 system system 1024 Apr 16 13:49 app-private
drwxrwx--x 2 system system 1024 Apr 16 13:49 dalvik-cache
drwx------ 2 root root 1024 Apr 16 01:42 lost+found
6. Create the userinit.d and functions script directories on /sd-ext
Code:
~ # install -m 755 -o 0 -g 0 -d /sd-ext/userinit.d
~ # install -m 755 -o 0 -g 0 -d /sd-ext/userinit.d/functions
Now we need to quit adb back to the host to push some files onto the phone
Code:
~ # exit
7. Push the userinit.d files into /sd-exe/userinit.d
(extract the contents of "cm7_legacy_a2sd_r3-signed.zip" to a temporary directory, then cd into sd-ext for the following adb commands)
Code:
$ adb push ./userinit.d/functions/a2sd /sd-ext/userinit.d/functions/a2sd
$ adb push ./userinit.d/10cache2sdext-binds /sd-ext/userinit.d/10cache2sdext-binds
$ adb push ./userinit.d/11data2sdext-binds /sd-ext/userinit.d/11data2sdext-binds
$ adb push ./userinit.d/12app2sdext-binds /sd-ext/userinit.d/12app2sdext-binds
$ adb shell
~ # chmod 750 /sd-ext/userinit.d/functions/a2sd
~ # chmod 750 /sd-ext/userinit.d/10cache2sdext-binds
~ # chmod 750 /sd-ext/userinit.d/11data2sdext-binds
~ # chmod 750 /sd-ext/userinit.d/12app2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/functions/a2sd
~ # chown root:shell /sd-ext/userinit.d/10cache2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/11data2sdext-binds
~ # chown root:shell /sd-ext/userinit.d/12app2sdext-binds
~ # exit
[ADVISORY]
If app, app-private or dalvik-cache was NOT working you would see a line similar to these lines below in the logcat output
Code:
I/busybox ( 113): sd-ext /sd-ext/app bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/app-private bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/dalvik-cache bindings not enabled
Reboot the phone, then quickly run adb logcat to watch the initial progress to confirm success
If you do NOT see any lines like those above in the logcat output then everything went OK
Code:
$ adb logcat
- waiting for device -
--------- beginning of /dev/log/main
I/cm ( 67): Welcome to Android 2.3.3 / CyanogenMod-7.0.0-Hero
I/cm ( 68): _
I/cm ( 69): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 70): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 71): )) _))
I/cm ( 72):
I/mountsd ( 87): Checking filesystems..
I//system/xbin/run-parts( 62): e2fsck 1.41.10 (10-Feb-2009)
I//system/xbin/run-parts( 62): /dev/block/mmcblk0p2: recovering journal
I//system/xbin/run-parts( 62): /dev/block/mmcblk0p2: clean, 555/500856 files, 428759/1000173 blocks
I/logwrapper( 93): busybox terminated by exit(0)
I/logwrapper( 97): busybox terminated by exit(0)
I/logwrapper( 99): busybox terminated by exit(0)
I/mountsd ( 101): /sd-ext successfully mounted
I/busybox ( 113): sd-ext /sd-ext/data bindings not enabled
I/busybox ( 113): sd-ext /sd-ext/system bindings not enabled
I/logwrapper( 113): busybox terminated by exit(0)
I/logwrapper( 62): /system/xbin/run-parts terminated by exit(0)
...
Please be patient while any existing files in /data/app, /data/app-private and /data/dalvik-cache are copied to /sd-ext/app, /sd-ext/app-private and /sd-ext/dalvik-cache respectively
If you have manually populated the app directory prior to enabling a2sd, then this will further delay your first boot while the dalvik-cache is updated for each unseen .apk file
[NOTE]
$ = regular user shell prompt (on your PC, depending which user you use for you adb environment)
# = root user shell prompt (on your phone)

[Q] My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive

16) My GoogleMaps (or other application that uses OpenGL) is freezing/irresponsive. What can I do?
Open terminal or adb shell and type these commands:
Code:
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo sysctl -w vm.min_free_kbytes=4096 >> /system/etc/install-recovery.sh
# chmod 744 /system/etc/install.sh
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Hi all i have some question about this!
So this is a countermeasure like a mod? I type it in then everything goes well?
Or i have to type it after every restart?
and if i write this it kills the app or it will run before the freezing?
is this working with opengl games?.
Thanks!
Ernő
when i tried typing this line
# chmod 744 /system/etc/install.sh
no such file exists
maybe this?
# chmod 744 /system/etc/install-recovery.sh
PS: Has this anything to do with recovery 2ndinit or something?
not exactly sure what this does, I think it makes sure at least 4096kb of RAM is free.
but try
$ su
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# echo vm.min_free_kbytes = 4096 >> /system/etc/sysctl.conf
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
# sysctl -p
it worked for me and has kept the setting after restarts
Just download sysctl in market and set it at 4096 it higher. If you have setvsel, it had option to increase min kb to 4096
Sent from my MB525 using XDA App
My Defy 2.2 also freezes when trying Maps (the only one that works is 5.0.0) - so I've tried sysctl with 8192 at min. kb. free.
No success, still freezing with 5.6.0/5.7.0 .
Uninstall updates in maps then update a fresh one.
Sent from my MB525 using XDA App

[Q] Custom kernel with loopback support

I'm looking for a custom kernel with loopback support (possibility mount img files).
I've tried: cyanogenmod kernel, tiamat - there's no it.
What img files u want mount?
Sent from my HTC Desire
I've got debian linux in .img file and I can't mount it on my HTC Desire - cause kernel doesn't support it.
Hm... weird.
Code:
# zcat /proc/config.gz | grep -i loop
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_RC_LOOPBACK is not set
Code:
# mknod /dev/block/loop0 b 7 0
and still:
Code:
mount: can't setup loop device: No such file or directory
P.S.: Sorry for double-post, I don't see delete or merge option.
I found a solution. The problem was non-existent device, try with different numbers for /dev/loop.
Example:
Code:
# mknod /dev/block/loop0 b 7 0
# mknod /dev/block/loop2 b 7 0
# mknod /dev/block/loop255 b 7 0

Startup Scripts

Stock ROM, oreo.
How do you execute scripts on startup? Either by init.d or some other means, doesn't matter as long as it works. The /system/etc/init.d folder isn't there. Remounting /system for me doesn't work:
mount -o remount,rw -t ext4 /dev/block/platform/hi_mci.0/by-name/system /system
I get: '/system': Device or resource busy
I reboot into TWRP, I get the same error as above. Any help please?
TouchOdeath said:
Stock ROM, oreo.
How do you execute scripts on startup? Either by init.d or some other means, doesn't matter as long as it works. The /system/etc/init.d folder isn't there. Remounting /system for me doesn't work:
mount -o remount,rw -t ext4 /dev/block/platform/hi_mci.0/by-name/system /system
I get: '/system': Device or resource busy
I reboot into TWRP, I get the same error as above. Any help please?
Click to expand...
Click to collapse
For mounting you use these command.
In local terminal
HWBND-H:/ $ su
HWBND-H:/ # mount -o rw,remount /system
In adb terminal
adb shell su -c mount -o rw,remount /system
And to see how is mounted
HWBND-H:/ # mount | grep system
It should return like this.
/dev/block/mmcblk0p51 on /system type ext4 (rw,seclabel,relatime,data=ordered)
And to go back to ro do this or reboot:
HWBND-H:/ # mount -o ro,remount /system
HWBND-H:/ # mount | grep system
/dev/block/mmcblk0p51 on /system type ext4 (ro,seclabel,relatime,data=ordered)
mrmazak said:
For mounting you use these command.
In local terminal
HWBND-H:/ $ su
HWBND-H:/ # mount -o rw,remount /system
In adb terminal
adb shell su -c mount -o rw,remount /system
And to see how is mounted
HWBND-H:/ # mount | grep system
It should return like this.
/dev/block/mmcblk0p51 on /system type ext4 (rw,seclabel,relatime,data=ordered)
And to go back to ro do this or reboot:
HWBND-H:/ # mount -o ro,remount /system
HWBND-H:/ # mount | grep system
/dev/block/mmcblk0p51 on /system type ext4 (ro,seclabel,relatime,data=ordered)
Click to expand...
Click to collapse
Thank you for your response I appreciate it. I ended up making my problem more complicated than it had to be. The solution was to open terminal and do:
adb shell
su
mkdir /system/etc/init.d
cp /storage/emulated/0/Downloads/script.sh /system/etc/init.d/script.sh
If I tried to create the folder through a rooted app (Total Commander), it didn't work. Copying the file through an app didn't work either.

Categories

Resources