About data2loop to increase stability - G Tablet Android Development

My English is poor, so I only give the code, without more explanation.
code modiy from ownhere's data2ext
create 3rd ext4 partion for loopback device.
Please note '-o sync,commit=5',This will enhance the stability.
Code:
$BUSYBOX mknod /dev/loop0 b 7 0
$BUSYBOX losetup /dev/loop0 /dev/block/mmcblk3p3
$BUSYBOX mount -t ext4 -o sync,commit=5,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/loop0 /mnt/asec/extdata
you can turn off journal for speed:
Code:
/system/bin/tune2fs -O ^has_journal /dev/block/mmcblk3p3
Code:
busybox ls -lL /dev/loop*
brw------- 1 0 0 7, 0 Jan 9 19:17 /dev/loop0
brw------- 1 0 0 7, 1 Jan 9 19:17 /dev/loop1
brw------- 1 0 0 7, 2 Jan 9 19:17 /dev/loop2
brw------- 1 0 0 7, 3 Jan 9 19:17 /dev/loop3
brw------- 1 0 0 7, 4 Jan 9 19:17 /dev/loop4
brw------- 1 0 0 7, 5 Jan 9 19:17 /dev/loop5
brw------- 1 0 0 7, 6 Jan 9 19:17 /dev/loop6
brw------- 1 0 0 7, 7 Jan 9 19:17 /dev/loop7

Scoring won't be so high, but stability will increase a lot

Hi Chenglu, I've actually already tried to modify your original data2loop script to use ext4 and run it with a kernel with ext4 built in. It actually benchmarks great on first boot, somewhat better than the original ext2 data2loop version, but the tablet won't boot again, it crashes sometime during boot and I have to wipe data and restart.
Not sure if the sync,commit=5 options will make a difference - maybe I'll give that a try and see if it helps...
EDIT: No, it still pukes out on reboot, those options don't make a difference. I've attached my inandop.sh file here. If you diff this with yours, there are only a few changes, and I'm just not sure why it doesn't work. Any ideas?

Chenglu...
Thanks... this should help... but I am still very concerned with this approach..
Even though you are performing a sync you still can not guarantee that the data has been flushed out.. Flushing will depend on what other operations are in queue within the I/O sub system. In addition, right now you have a commit of every 5 seconds which honestly again leaves room for possible corruption. Again should help as this setting is meant for removable storage...
Lastly DO NOT turn off the Journal. yes it will speed up the file system BUT at a HUUGE risk of data loss in the event of unclean shutdown. This is your only fail safe that ensures filesystem consistency even across unclean shutdown.
Generally I agree with this approach for many situations but NOT your entire system partition or critical data partitions...
These devices are too portable with unreliable power sources (not the battery but the ability for it to reboot on its own and the ability for you to accidentally power it off)..
I for one am against this performance boost...
Chenglu said:
My English is poor, so I only give the code, without more explanation.
code modiy from ownhere's data2ext
create 3rd ext4 partion for loopback device.
Please note '-o sync,commit=5',This will enhance the stability.
Code:
$BUSYBOX mknod /dev/loop0 b 7 0
$BUSYBOX losetup /dev/loop0 /dev/block/mmcblk3p3
$BUSYBOX mount -t ext4 -o sync,commit=5,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/loop0 /mnt/asec/extdata
you can turn off journal for speed:
Code:
/system/bin/tune2fs -O ^has_journal /dev/block/mmcblk3p3
Code:
busybox ls -lL /dev/loop*
brw------- 1 0 0 7, 0 Jan 9 19:17 /dev/loop0
brw------- 1 0 0 7, 1 Jan 9 19:17 /dev/loop1
brw------- 1 0 0 7, 2 Jan 9 19:17 /dev/loop2
brw------- 1 0 0 7, 3 Jan 9 19:17 /dev/loop3
brw------- 1 0 0 7, 4 Jan 9 19:17 /dev/loop4
brw------- 1 0 0 7, 5 Jan 9 19:17 /dev/loop5
brw------- 1 0 0 7, 6 Jan 9 19:17 /dev/loop6
brw------- 1 0 0 7, 7 Jan 9 19:17 /dev/loop7
Click to expand...
Click to collapse

Fast internal storage and ext4 partion is the fundamental solution.
loopback device In some respects have an advantage.

I dont dispute the performance gain... but at a risk. Everyone should be aware of this and accept the risk... If you do then thats fine...
I guess I'm more conservative when it comes to my data.
Chenglu said:
Fast internal storage and ext4 partion is the fundamental solution.
loopback device In some respects have an advantage.
Click to expand...
Click to collapse

rcgabriel said:
Hi Chenglu, I've actually already tried to modify your original data2loop script to use ext4 and run it with a kernel with ext4 built in. It actually benchmarks great on first boot, somewhat better than the original ext2 data2loop version, but the tablet won't boot again, it crashes sometime during boot and I have to wipe data and restart.
Not sure if the sync,commit=5 options will make a difference - maybe I'll give that a try and see if it helps...
EDIT: No, it still pukes out on reboot, those options don't make a difference. I've attached my inandop.sh file here. If you diff this with yours, there are only a few changes, and I'm just not sure why it doesn't work. Any ideas?
Click to expand...
Click to collapse
your busybox support ext4?

Chenglu said:
your busybox support ext4?
Click to expand...
Click to collapse
good point, that was a mistake. I am now using a statically compiled version of mkfs.ext4 that seems to work. Mount doesn't need explicit ext4 support in busybox, should just work. And I think I'm using a version of fsck that supports ext4.
EDIT: Okay, I'm using mkfs.ext4 which I've tested from the command line and it is clearly making a real ext4 filesystem. Also using a version of es2fsck that ought to work with ext4. These are both from the Desire forums, but seem to be generic ARM binaries so they seem to run on our G Tablet.
Still same result - works on first boot, not thereafter.
Maybe I need to use a version of busybox that explicitly supports ext4? Trying that next.
BTW, I got the binaries I'm using from the data2ext.zip file here: http://forum.xda-developers.com/showthread.php?t=859419
Also - ownhere's script looks pretty badass. We should consider using something based on that.
EDIT2: I am using busybox, mkfs.ext4 and e2fsck from the Desire forums, so it should support ext4 fully. Nonetheless, the exact same screen flicker followed by screen shutting off occurs with this. Attached is my updated inandop.sh. This is just baffling.

rcgabriel said:
good point, that was a mistake. I am now using a statically compiled version of mkfs.ext4 that seems to work. Mount doesn't need explicit ext4 support in busybox, should just work. And I think I'm using a version of fsck that supports ext4.
EDIT: Okay, I'm using mkfs.ext4 which I've tested from the command line and it is clearly making a real ext4 filesystem. Also using a version of es2fsck that ought to work with ext4. These are both from the Desire forums, but seem to be generic ARM binaries so they seem to run on our G Tablet.
Still same result - works on first boot, not thereafter.
Maybe I need to use a version of busybox that explicitly supports ext4? Trying that next.
BTW, I got the binaries I'm using from the data2ext.zip file here: http://forum.xda-developers.com/showthread.php?t=859419
Also - ownhere's script looks pretty badass. We should consider using something based on that.
EDIT2: I am using busybox, mkfs.ext4 and e2fsck from the Desire forums, so it should support ext4 fully. Nonetheless, the exact same screen flicker followed by screen shutting off occurs with this. Attached is my updated inandop.sh. This is just baffling.
Click to expand...
Click to collapse
I'm working on this as well...
Took a look at your script. It looks like you've put everything (including busybox) into /system/bin instead of /system/xbin? Your environment variable for busybox shows /system/bin...
Just wanted to confirm...

rcgabriel said:
EDIT2: I am using busybox, mkfs.ext4 and e2fsck from the Desire forums, so it should support ext4 fully. Nonetheless, the exact same screen flicker followed by screen shutting off occurs with this. Attached is my updated inandop.sh. This is just baffling.
Click to expand...
Click to collapse
I'm unable to get the loop file to mount as ext4 with ADB after it fails...
I'm not sure if/why it actually mounted in the first place, but I'm thinking this is a kernel issue. Are you positive that your kernel supports ext4? Also, I'm thinking ext4 might need to be compiled into the kernel instead of a module.
I could be wrong, though....

Also check which mount binary you are using. Busybox has one, but there is also a "mount" sometimes linked to the "toolbox" binary in /system/bin.

Ok so I (sort of) got it working.
After getting a kernel that is known working with ext4, the system was able to mount the partition again. I was getting the vegan "loop", so I went in with ADB and saw that the partition was mounted but all of the files were gone.
I then booted into CW and mounted USB, and at the same time on my PC I extracted my /data/data folder from a recent clockwork backup and copied it to /sdcard. I then unmounted USB and mounted /system and /sdcard from CW. Then from ADB I copied the data folder over to /mnt/asec/extdata and fixed the perms. I created empty folders for app-private and anr because they were empty on my backup (other than a traces.txt file in anr).
After bouncing the tab it booted up, but some of my settings were blown away. No big deal. Quadrant crashes at the I/O test part, but it might be because I don't have an Internet connection. The wifi is broken with the kernel I'm using.
Let me know if you still can't get things mounted. I'll test this more tomorrow when I get a fixed kernel.
I'm going to start working on the alternate approach of adding a 3rd partition...

anlog said:
Ok so I (sort of) got it working.
After getting a kernel that is known working with ext4, the system was able to mount the partition again. I was getting the vegan "loop", so I went in with ADB and saw that the partition was mounted but all of the files were gone.
I then booted into CW and mounted USB, and at the same time on my PC I extracted my /data/data folder from a recent clockwork backup and copied it to /sdcard. I then unmounted USB and mounted /system and /sdcard from CW. Then from ADB I copied the data folder over to /mnt/asec/extdata and fixed the perms. I created empty folders for app-private and anr because they were empty on my backup (other than a traces.txt file in anr).
After bouncing the tab it booted up, but some of my settings were blown away. No big deal. Quadrant crashes at the I/O test part, but it might be because I don't have an Internet connection. The wifi is broken with the kernel I'm using.
Let me know if you still can't get things mounted. I'll test this more tomorrow when I get a fixed kernel.
I'm going to start working on the alternate approach of adding a 3rd partition...
Click to expand...
Click to collapse
The kernel should support ext4, I built it myself with ext4 enabled in the config file. And yeah, I put the busybox executable in /system/bin so it wouldn't conflict with the one in /system/xbin that Vegan already has. I also dumped mkfs.ext4 in /system/bin.
What I realized is that busybox has a nasty habit of failing partially at doing things - I keep assuming that it's exactly like the stock Linux command line tools, and it's not always identical. I ended up tearing out the important stuff and running it as a standalone test script from the command line to see what was happening.
Mkfs.ext4 runs with no obvious issues (I see it creates a journal at the end, so I know it's creating an ext4 filesystem now).
But then I got an error:
Code:
mount: mounting /dev/loop0 on /mnt/asec/extdata failed: Invalid argument
followed by:
Code:
umount: can't umount /mnt/asec/extdata: Invalid argument
e2fsck 1.41.6 (30-May-2009)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /data/ext4 is mounted.
/system/bin/e2fsck: Superblock invalid, trying backup blocks...
/system/bin/e2fsck: Bad magic number in super-block while trying to open /data/ext4
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
mount: mounting /dev/loop0 on /mnt/asec/extdata failed: Invalid argument
So mount failed to mount the file device that was created - that would seem to be a big issue. And then e2fsck failed to fsck it that one I'm baffled by.
I don't really understand how this "partially works" when it runs from inandop.sh but seems to fail entirely when I run it from the command line, but I sense that it "works once" because something it's getting sometimes written as ext4 sometimes as ext2/3 and that's leading obviously to corruption. Will figure more out later when I have time. I may just try adapting ownhere's script directly, he's obviously put a ton of thought into filesystem stuff and I'm not an expert in that area at all.

rcgabriel said:
The kernel should support ext4, I built it myself with ext4 enabled in the config file. And yeah, I put the busybox executable in /system/bin so it wouldn't conflict with the one in /system/xbin that Vegan already has. I also dumped mkfs.ext4 in /system/bin.
What I realized is that busybox has a nasty habit of failing partially at doing things - I keep assuming that it's exactly like the stock Linux command line tools, and it's not always identical. I ended up tearing out the important stuff and running it as a standalone test script from the command line to see what was happening.
Mkfs.ext4 runs with no obvious issues (I see it creates a journal at the end, so I know it's creating an ext4 filesystem now).
But then I got an error:
Code:
mount: mounting /dev/loop0 on /mnt/asec/extdata failed: Invalid argument
followed by:
Code:
umount: can't umount /mnt/asec/extdata: Invalid argument
e2fsck 1.41.6 (30-May-2009)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /data/ext4 is mounted.
/system/bin/e2fsck: Superblock invalid, trying backup blocks...
/system/bin/e2fsck: Bad magic number in super-block while trying to open /data/ext4
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
mount: mounting /dev/loop0 on /mnt/asec/extdata failed: Invalid argument
So mount failed to mount the file device that was created - that would seem to be a big issue. And then e2fsck failed to fsck it that one I'm baffled by.
I don't really understand how this "partially works" when it runs from inandop.sh but seems to fail entirely when I run it from the command line, but I sense that it "works once" because something it's getting sometimes written as ext4 sometimes as ext2/3 and that's leading obviously to corruption. Will figure more out later when I have time. I may just try adapting ownhere's script directly, he's obviously put a ton of thought into filesystem stuff and I'm not an expert in that area at all.
Click to expand...
Click to collapse
I was able to reboot 5 times and it kept the settings for me. I just couldnt test all apps because wifi was broken with the kernel I was using. I can test more today.
Are you sure that your ext4 format is completing? I got an mtab error when first trying to create the journal, so I just changed the script to format it with the -O ^has_journal option and it competed.
Vegan runs fine for me with latest busybox...

modify init.rc for mount ext4 /data
you must have tune2fs mkfs.ext4 e2fsck binary file.
Code:
#!/system/bin/sh
##get highest priority
/system/bin/renice -20 -r -g $$
ECHO_TARGET=/misc/inandop.log
BUSYBOX="/system/bin/busybox"
#data2loop by xiaolu
echo "try data2loop" >> $ECHO_TARGET
if [ "`$BUSYBOX df /dev/loop0 | grep loop`" != "" } ; then
exit 0
fi
$BUSYBOX ln -s /dev/block/loop0 /dev/loop0
$BUSYBOX ln -s /dev/block/loop1 /dev/loop1
$BUSYBOX ln -s /dev/block/loop2 /dev/loop2
$BUSYBOX ln -s /dev/block/loop3 /dev/loop3
$BUSYBOX ln -s /dev/block/loop4 /dev/loop4
$BUSYBOX ln -s /dev/block/loop5 /dev/loop5
$BUSYBOX ln -s /dev/block/loop6 /dev/loop6
$BUSYBOX ln -s /dev/block/loop7 /dev/loop7
if [ ! -e /data/system.firstrun.finish ];
then
# first run data not create do nothing, data2loop after reboot
#/system/bin/mkfs.ext4 -b 4096 -m 0 -F -L userdata /dev/block/mmcblk3p2
#/system/bin/tune2fs -o journal_data_writeback /dev/block/mmcblk3p2
#/system/bin/e2fsck /dev/block/mmcblk3p2
#/system/bin/tune2fs -O ^has_journal /dev/block/mmcblk3p2
$BUSYBOX mkdir /data/anr
$BUSYBOX touch /data/system.firstrun.finish
exit 0;
fi
$BUSYBOX umount /cache
echo "0" > /data/misc/screen_lock_status
$BUSYBOX chown 1000.1000 /data/misc/screen_lock_status
$BUSYBOX chmod 644 /data/misc/screen_lock_status
$BUSYBOX mkdir /mnt/asec/extdata
/system/bin/tune2fs -o journal_data_writeback /dev/block/mmcblk3p2
$BUSYBOX mount -t ext4 -o remount,barrier=0,nobh,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk3p2 /data
result=$?
echo "mount mmcblk3p2:$result" >> $ECHO_TARGET
$BUSYBOX chown 1000.1000 /data
$BUSYBOX chmod 771 /data
echo "+++Need create loopback device for data, please wait... " >> $ECHO_TARGET
if [ ! -e /data/data2loop.finish ];
then
if [ -e /dev/block/mmcblk3p3 ];
then
echo "+++Found mmcblk3p3, will use it for /data/data, create ext4 fs on it now..." >> $ECHO_TARGET
/system/bin/mkfs.ext4 -b 4096 -m 0 -F -L extdata /dev/block/mmcblk3p3
/system/bin/tune2fs -o journal_data_ordered /dev/block/mmcblk3p3
/system/bin/e2fsck -y -v -f /dev/block/mmcblk3p3
#/system/bin/tune2fs -O has_journal /dev/block/mmcblk3p3
/system/bin/tune2fs -O ^has_journal /dev/block/mmcblk3p3
$BUSYBOX mount -t ext4 -o loop,commit=5,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk3p3 /mnt/asec/extdata
result=$?
echo "mount /dev/block/mmcblk3p3:$result" >> $ECHO_TARGET
else
echo "+++Need create 512M ext2 loopback device for data, please wait... " >> $ECHO_TARGET
$BUSYBOX dd if=/dev/zero of=/data/ext2 bs=1048576 count=512
$BUSYBOX mke2fs -m 0 -F -L datadata /data/ext2
echo "+++Loopback device create done... " >> $ECHO_TARGET
$BUSYBOX mount -o loop,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext2 /mnt/asec/extdata
fi
$BUSYBOX chown 1000.1000 /mnt/asec/extdata
$BUSYBOX chmod 771 /mnt/asec/extdata
for i in data app-private anr ; do
if [ ! -d /mnt/asec/extdata/$i ] ; then
$BUSYBOX mkdir /mnt/asec/extdata/$i;
fi
$BUSYBOX chown 1000.1000 /mnt/asec/extdata/$i;
$BUSYBOX chmod 771 /mnt/asec/extdata/$i;
#if [ ! -h /data/$i ] ; then
$BUSYBOX cp -a /data/$i /mnt/asec/extdata/;
$BUSYBOX rm -rf /data/$i;
$BUSYBOX ln -s /mnt/asec/extdata/$i /data/$i;
result=$?
echo "ln -s:$result" >> $ECHO_TARGET
#fi
done
$BUSYBOX umount /mnt/asec/extdata
$BUSYBOX touch /data/data2loop.finish
fi
if [ -e /dev/block/mmcblk3p3 ];
then
/system/bin/e2fsck -y -v -f /dev/block/mmcblk3p3
#/system/bin/tune2fs -O ^has_journal /dev/block/mmcblk3p3
/system/bin/tune2fs -o journal_data_writeback /dev/block/mmcblk3p3
$BUSYBOX mknod /dev/loop0 b 7 0
$BUSYBOX losetup /dev/loop0 /dev/block/mmcblk3p3
#$BUSYBOX mount -t ext4 -o sync,commit=5,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/loop0 /mnt/asec/extdata
$BUSYBOX mount -t ext4 -o barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/loop0 /mnt/asec/extdata
result=$?
echo "mount /dev/loop1:$result" >> $ECHO_TARGET
else
/system/bin/e2fsck -y -v -f /data/ext2
$BUSYBOX mount -o loop,errors=continue,noatime,nodiratime,nosuid,nodev /data/ext2 /mnt/asec/extdata
fi
$BUSYBOX chown 1000.1000 /mnt/asec/extdata
$BUSYBOX chmod 771 /mnt/asec/extdata
$BUSYBOX mkdir /data/cache
$BUSYBOX mount -o bind /data/cache /cache
$BUSYBOX chmod 777 /cache
sync;
exit 0;

Code:
rootfs / rootfs rw,relatime 0 0
tmpfs /dev tmpfs rw,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
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mtdblock3 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock6 /logodata yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mmcblk3p2 /data ext4 rw,nosuid,nodev,noatime,nodiratime,barrier=0,nobh,data=writeback 0 0
/dev/block/mtdblock0 /misc yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/loop0 /mnt/asec/extdata ext4 rw,nosuid,nodev,noatime,nodiratime,barrier=0,data=writeback 0 0
/dev/block/mmcblk3p2 /cache ext4 rw,nosuid,nodev,noatime,nodiratime,barrier=0,nobh,data=writeback 0 0
/dev/block/vold/179:17 /mnt/sdcard2 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=07
02,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:17 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmas
k=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard2/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/vold/179:25 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=070
2,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:25 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmas
k=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

chenglu can you post the instructions on how to create a third partition and mount that instead of creating a loop file? I want to test that today.
Thanks,

anlog said:
chenglu can you post the instructions on how to create a third partition and mount that instead of creating a loop file? I want to test that today.
Thanks,
Click to expand...
Click to collapse
Code:
busybox fdisk /dev/block/mmcblk3 -l
Disk /dev/block/mmcblk3: 16.0 GB, 16097738752 bytes
4 heads, 16 sectors/track, 491264 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk3p1 1 397087 12706776 83 Linux
/dev/block/mmcblk3p2 397088 458497 1965120 83 Linux
/dev/block/mmcblk3p3 458498 491264 1048544 83 Linux
reboot into recovery mode
Code:
busybox fdisk /dev/block/mmcblk3
The number of cylinders for this disk is set to 491264.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): m
m
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
"d" delete a partition 1 and 2
"n" create primary partition 1 2 3
busybox mkdosfs /dev/block/mmcblk3p1
mkfs.ext4 -b 4096 -m 0 -F -L userdata /dev/block/mmcblk3p2

In your instructions it looks like partition 3 isn't referenced, but instead you're formatting /data as ext4 instead of ext3? Or am I missing something???

Add the -O ^huge_file file option to your mkfs.ext4 when formating the partition. (it won't work with this feature since it requires special kernel option that brakes compatibility with existing modules)
mkfs.ext4 -O ^huge_file ........
Report back...
anlog said:
I was able to reboot 5 times and it kept the settings for me. I just couldnt test all apps because wifi was broken with the kernel I was using. I can test more today.
Are you sure that your ext4 format is completing? I got an mtab error when first trying to create the journal, so I just changed the script to format it with the -O ^has_journal option and it competed.
Vegan runs fine for me with latest busybox...
Click to expand...
Click to collapse

Related

cannot mount \cache

Hey all.
Firstly please forgive me it this seems pretty basic however i seem to have lost the ability to mount the cache partition on my JF1.5 Dev Phone.
The upgrade process went fine, had been using it for a week, then i installed an animated splash screen made for non-cupcake builds and it bricked my phone. i got the black screen of wait in place of an animated load screen. luckily, anticipating such problems, i had just done a full nandroid backup.
now here's the problem. while backing up from nandroid, i was informed that the cache partition does not exist.
looking in the filesystem, there is a /cache folder but nothing in it and i have lost the ability to install apps via the market.
running mount shows:
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p2 on /system/sd type ext2 (rw,errors=continue)
/dev/block//vold/179:1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=
1000,gid=1000,fmask=0711,dmask=0700,allow_utime=0022,codepage=cp437,iocharset=is
o8859-1,shortname=mixed,utf8)
and the partitions table shows:
major minor #blocks name
7 0 204 loop0
7 1 1936 loop1
31 0 256 mtdblock0
31 1 5120 mtdblock1
31 2 2560 mtdblock2
31 3 69120 mtdblock3
31 4 69120 mtdblock4
31 5 76544 mtdblock5
179 0 3872256 mmcblk0
179 1 3349521 mmcblk0p1
179 2 522112 mmcblk0p2
please help, i have tried mounting it manually to mtdblock4 with the command:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /cache
mount: mounting /dev/block/mtdblock4 on /cache failed: Invalid argument
If any more information than this is needed i can supply logcat file etc...
twoolie said:
Hey all.
...
please help, i have tried mounting it manually to mtdblock4 with the command:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /cache
mount: mounting /dev/block/mtdblock4 on /cache failed: Invalid argument
Click to expand...
Click to collapse
wouldn't the command be:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock4 /cache
??
but I fail to see why you are doing this, care to explain so i can understand?
ok maybe i should explain better. there are 3 major blocks set aside for the use of the filesystem. mtdblock3 is set aside for the /system partition, mtdblock4 is set aside for /cache and mtdblock5 is set aside for /data. cache is important because it caches objects for the dalvic VM, web pages for the browser and most importantly, it stores apks from the market while downloading. now the first two are not so bad because the dalvic vm will run, just a little slower and the browser will browse, ablight will not be able to cache pages and will only have access to what is in ram. but because the market will wait to be able to place a file in /cache before downloading it, this effectively means i will never be able to download/install from the market.
Now what happened was when i created my nandroid backup it backed up system.img, cache.img and data.img
i then bricked the system and wanted to restore from nandroid backups. first i put back the system, then data but the phone wouldnt accept a cache image. fastboot is unable to mount it, jf recovery is unable to mount it, and the android OS is unable to mount it.
also i tried your suggestion but mount -o rw,remount -t yaffs2 /dev/block/mtdblock4 /cache returns the same error message:
mount: mounting /dev/block/mtdblock4 on /cache failed: Invalid argument
also, mount -a returns:
mount: mounting /dev/block/mtdblock4 on /cache failed: Invalid argument
mount: mounting /system/modules/modules.cramfs on /system/modules failed: No such file or directory
mount: mounting /system/xbin/xbin.cramfs on /system/xbin failed: No such file or directory
i'm hoping that this means something to somebody. does this just mean i am missing cramfs modules i need?
any help would be GREATLY appreciated.
It would be a roundabout way, but DREAIMG.NBH will restore partitions. Of course you'd have to then do the rooting process all over again.
Wait... but to do nandroid, don't you want to just restore
system.img
data.img
boot.img
so the commands would be
fastboot flash system system.img
fastboot flash userdata data.img
fastboot flash boot boot.img
I guess I'm failing to see why cache needs to be restored. won't the OS just clear it out an write over it eventually anyways?
Or am I missing something?

How to Run(Chroot) Linux(Ubuntu/Debian,etc.) in your Milestone 2

Chrooting Linux on Android is a very popular topic, and you can find many tutorials online. I am not going to post a detailed how to here.. but, I will explain the generalized steps for the process! If anyone have any questions or need help, feel free to ask!
Get Root Access on your phone
There are many ways to get root access; Easiest will be using z4root or SuperOneClick ! Rooting is mandatory because: You need to install Busybox; Need to mount file system, etc..​
Install SuperUser App from the Market
This application allows you to grant Root access to other applications (when needed). Depending on how you rooted your phone, superuser.apk may be already installed on your phone.​
Install Busybox App from the Market
Depending on how you rooted your phone, Busybox may be already installed on your phone. In any case install this app from the market and update your busybox to the latest version. Busybox is a set of commonly used linux commands, which are not available in android by default. Eg: cp, chroot, etc.​
Install Connectbot from Android market
Connect bot is a terminal client application for android. There are other alternatives but, I recommend Connectbot! Also Connectbot has SSH support, so if you are installing an SSH server on your Ubuntu, you can connect to it using connectbot and you may totally skip the VNC for GUI. Anyway, note that you need a terminal app to start the chroot daemon!​
Install AndroidVNCViewer from Android market
With androidVNCViewer we can get GUI access to our ubuntu! This App works so fine in my Milestone 2 with Ubuntu; It even supports mouse pointer!​
Download/build a Linux rootfs for your flavour of linux
Now, you need the Ubuntu/Debian/Other linux file system for your Phone's processor. Like most of the Android phones, Milestone 2 uses an ARM processor. And Ubuntu offers full support for ARM processors. It is so easy to build ubuntu for ARM(OMAP) platform using rootstock/bootstrap method. I used rootstock method for Ubuntu as explained here.
PS: For your first time, make sure you build, "Ubuntu Lucid" (just use the --seed/-s parameter of rootstock command. I was not able to use 11.04(Natty). Once you get Lucid to work, you can surely try yourself for the other versions! )​
Create a mountable .img file with a size suited for you
From rootstock, you will get a .tgz file! You will need to convert this to a mountable .img file.
In order to create an empty ubuntu.img file, use the followed command in your ubuntu-desktop's terminal; the last arguement (2048) specifies size of the Ubuntu rootfs (If you need much disk space when you are in ubuntu, use a large value here. Normally 2GB will be sufficient for you; even with GUI/VNC).
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=2048
Next, format our empty ubuntu.img with a suitable ext2/ext3/ext4 file system!
For Milestone 2, you should use ext3 (I think it does not support ext2). ext4 is supported only in Gingerbird+. So, you should use the appropriate command based on your mobile
Code:
mkfs.ext2 -F ubuntu.img
mkfs.ext3 -F ubuntu.img
mkfs.ext4 -F ubuntu.img
You can find out the suitable file system by opening Connectbot in your mobile and entering the followed command. In the output, look for words ext2/ext3/ext4!
Code:
su
mount
Once you format ubuntu.img with appropriate file system. We should temporarily mount the ubuntu.img in a somewhere and we should extract the armel-rootfs-xx.tgz to it. You can use these commands
Code:
sudo mount -o loop ubuntu.img /mnt
sudo tar -C /mnt -zxf armel-rootfs--xx.tgz
sudo umount /mnt
Download(and modify) or create a Shell script for automatically mounting your Chroot image
This is the most important part, we have to run a set of commands in our android shell to get into the ubuntu. To make things easier, we will write these command-sequence in a shell script, and whenever we need we simple call this script. Cool isn't it?. Basically this is what this script should do:
Code:
1. Check if there exists an ubuntu.img file as we specify in command line
2. Create a loop device with the ubuntu.img - ie. Make android(linux) believe that ubuntu.img is a mountable device.
3. Mount the newly created loop device to a folder. My script mounts the image to /data/local/chrootos
4. Set some environment variables in the shell
5. Mount the [I]devpts, proc, sysfs[/I] for the ubuntu!
6. Run the Chroot command. This command actually changes the root of file system to a new directory we specify. ie. we fake [B]/data/local/chrootos[/B] as the rootfs![B]/[/B]
Create a folder in your Phone's SD Card and copy one or more(If you want to choose between: Debian/Ubuntu/Puppy/etc) .img files and your shell script for booting linux into it.
Create a folder named .chroot in your SD Card. If you have a "." as the first character, this folder will be hidden in the Android File Browser. And will avoid you accidentally modifying these files.​
Get into your Phone's Shell through ConnectBot / USB-ADB / Terminal Emulator
Enter su in the terminal to get root access
Remount your Android filesystem to get write access to your phones
By default, the android file system is read only. So in order to write to the files sytem, we have to remount it with the following command.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Copy your bootscript to /system/bin so that you can easily start your LinuxIf you have downloaded my bootscript, the file name will be bl - short for boot linux. So, once you copied you will have your shell script at /system/bin/bl. Once we copy the shell script to the bin directory, it will work as a shell command.​
Start your linux and customize it
If you have done everything correctly so far, you can now boot into your ubuntu.img with the following command. Note that you do not need to specify the full file name "ubuntu.img".
Code:
bl ubuntu
Start your linux and customize it
If Chroot was a success, you will see the ubuntu shell prompt. And then you can start installing more stuff, etc. [email protected]:​
Downloads & Screenshots
Screenshots: http://goo.gl/PzVI0
My Shell Script for starting linux: http://goo.gl/il3nJ
My ubuntu.img: Coming Soon​Password
Code:
arunraj.in
Common Errors
The most common error will be when we are dealing with the "loop device". Because, according to the apps installed in your device, there may not be a free loop device available. If you are facing errors, feel free to ask me and I will try and help!​
Thanks, man! When I have time I'm gonna try it out.
Sent from my Milestone 2 XDA App
thanks for tutorial. will try this soon
Script didn't work :/
Gongui20 said:
Script didn't work :/
Click to expand...
Click to collapse
Do you get any error message?
Thanks !
It's very interesting.I will try it when I have some free time.
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
Click to expand...
Click to collapse
/bin/bash didnt exist or something like that.
Gongui20 said:
/bin/bash didnt exist or something like that.
Click to expand...
Click to collapse
I think there was no free loop device available for mounting the image.
could run these commands as root and send me the output(the txt files created)?
Code:
mount > mount-list.txt
losetup -f > losetup1.txt
losetup /dev/block/loop1 /sdcard/.chroot/ubuntu.img > losetup2.txt
losetup1.txt
/dev/loop0
Click to expand...
Click to collapse
mount-list.txt
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,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
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk1p21 /system ext3 ro,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/userdata /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/cache /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
tmpfs /tmp tmpfs rw,relatime,size=2048k 0 0
/dev/block/pds /pds ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/preinstall /preinstall ext3 rw,nosuid,nodev,noatime,nodiratime,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.rovio.angrybirdsrio-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1 /mnt/asec/com.rovio.angrybirds-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-2 /mnt/asec/org.xbmc.android.remote-2 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
losetup2.txt is empty.
Yeap, I faced the same error when I was doing it. If you notice the mount-list.txt, you can see that AngryBirds application is using /dev/block/dm-0 and /dev/block/dm-1. /dev/block/dm-2 is also in use.
You could try this:
Edit the script bl and replace /dev/block/loop1 in the script with /dev/block/dm-3. It might just do the trick.
Hey check this out:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Works on Asus TF101
Hi
Thanks for the guide. I got it running on my Asus TF101. I had to modify your script slightly :
The /system filesystem is mounted as ext4 (not yaffs)
The /system fs is mounted from /dev/block/mmcblk0p1
/dev/block/mmcblk0p1 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Apart from that no other changes were necessary.
Need Help!!!!
hi ~ I just put the img file in /sdcard/.chroot/.linux/ ,named ubuntu.img and edited the Script
but when I run the script ,there is a problem in line:
mount -t ext3 /dev/block/loop1 $mnt
it said:
Device or resourc busy
I have tried thousand ways and cost 5 days,but I can't solve it.....
can you help me?
sorry for my poor english...
losetup1.txt
/dev/loop0
I also replace /dev/block/loop1 in the script with /dev/block/dm-5,but I need use command :"mknod /dev/block/dm-5 b 7 0" first.
the error Screenshots and mount
echoeye said:
the error Screenshots and mount
Click to expand...
Click to collapse
Hi,
Which is your Mobile ?
Also -- Did you see reply #7, #8 on page 1 of this thread ?
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
The problem is you have apps installed to the sd card (and getting mount points busy), when it happens here I just open Titanium Backup and move External apps to internal.
No matter what I tried here, this script wouldn't work... So I used DebOnDroid app from defy forum, and when updated to GB. The app stopped working also, so I moved the ubuntu.img to /data/local/ and mounted from there, works like a charm!
This is the script I'm using /system/bin/buntu:
Code:
export mnt=/data/local/debian
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin
export TERM=linux
export HOME=/root
export USER=root
echo "Linux Chrooter: Setup Networking"
sysctl -w net.ipv4.ip_forward=1
#necessary mount points
busybox mount -o loop $mnt/../debian.img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t sysfs sysfs $mnt/sys
busybox mount -t proc proc $mnt/proc
#extra mount points
busybox mount -o rw /system $mnt/mnt/s
busybox mount /data $mnt/mnt/d
busybox mount /sdcard $mnt/mnt/sd
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
umount $mnt/sys
umount $mnt/proc
umount $mnt/dev/pts
umount $mnt/mnt/*
#somehow the commented lines didn't work...
#umount $mnt/mnt/d
#umount $mnt/mnt/s
umount $mnt
PS: when I copy a binary from ubuntu to /system/bin and chmod, it won't exec, why?
Sent from my Milestone 2 XDA App
r2beta0 said:
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
Click to expand...
Click to collapse
thank you very very very very very very very very very very very very very very very much!!!!
I made it!!!
oh yeah!~~~~
How is this different from using an app like linuxinstaller? Well, apart from doing it manually and the nerdy way of course?
Is it safer? I am intrigued by the possibility of having a working ubuntu in my pocket, but am wondering if I should go this way or try the app.
great guide though... i think this is the push i needed to finally try this.
Nice job! but i got this..
Nice job!
I got this
#bl ubuntu
bl: permission denied
#
;/

[FIXED] $50 : Help me fix \efs to get my IMEI back.

Greeting,
Here's the details.
FIXED....
here's how.
as you may see in the post i stopped in the step of trying to format \efs partation.
but instead.
I went to my friend phone and make this command
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/ilostit.dd
this backup the mmcblk0p1 which is \efs to a file.
then move it to my phone \sdcard
and did this commands.
Code:
umount /efs "unmount /efs
dd if=/sdcard/ilostit.dd of=/dev/block/mmcblk0p1 "relfash mmcblk0p1 with the backup.
reboot
this reflash mmcblk0p1 block with the backup,
then copy my \efs backup to \efs.
and no more IO error..
and violaa...
my IMIE is back and the Signal is OK.
Big thank goes to KciNicK who helped me alot and earn it.
_________
The Original Problem :
Tonight I flashed a kernel to my phone, just\ lost the Singal and my phone show no sim card inserted!.
anyway, i figure it out that... the IMEI lost.
in \efs there's no nv_data.bin file!!
So i went to restore the \efs.
but something not right here!
Hope someone can help here.
i tried these commands but no chance tel now!.
here to restore nv_data.bin
Code:
su
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
[COLOR="red"]cp: can't stat '/efs/nv_data.bin': Input/output error[/COLOR]
and here to restore \efs
Code:
# busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
efs/
efs/cryptprop_rebootMode
[COLOR="Red"]tar: can't remove old file efs/cryptprop_rebootMode: Read-only file system[/COLOR]
#
Code:
su
# mount -o rw,remount /dev/block/mmcblk0p1 /efs
mount -o rw,remount /dev/block/mmcblk0p1 /efs
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
tried to flash back to many FWs but no chance,
---
time for some sleep, hope to find something later
the input output error is coz disk full, try deleting/moving some .bak files to sdcard then try the copy again
KciNicK said:
the input output error is coz disk full, try deleting/moving some .bak files to sdcard then try the copy again
Click to expand...
Click to collapse
\efs is read only!, i see members here can you root explorer to delete and move files.
If i can just copy the backup nv_data.bin to \efs that's will be good!.
but i don't know what's to do!.
Can't you use root explorer (don't forget to mount r/w), I find I can get all sorts of errors using adb+cli but root explorer will just do the job.
Another suggestion would be to flash an insecure kernel
copy paste the output of this please...
# busybox cat /proc/mounts
I got this
Code:
su
# ls
ls
acct fota.rc res
app-cache init sbin
cache init.goldfish.rc sdcard
config init.rc sys
d init.smdkc210.rc system
data init_kernel_only.rc tmp
dbdata lib ueventd.goldfish.rc
default.prop lpm.rc ueventd.rc
dev mnt ueventd.smdkc210.rc
efs proc vendor
etc recovery.rc
# cd efs
cd efs
# ls
ls
[COLOR="Red"]ls: ./nv_data.bin: I/O error
ls: ./nv.log: I/O error
ls: ./nv_data.bin.md5: I/O error
ls: ./dmp: I/O error[/COLOR]
cryptprop_applied_result cryptprop_securewipedata
cryptprop_onetimeboot edk_p
cryptprop_persist.sys.language imei
cryptprop_persist.sys.timezone redata.bin
cryptprop_rebootMode
#
Re flash the kernel
Sent from my HTC Vision using XDA App
KciNicK said:
copy paste the output of this please...
# busybox cat /proc/mounts
Click to expand...
Click to collapse
Code:
# busybox cat /proc/mounts
busybox cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,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
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/usb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /app-cache tmpfs rw,relatime,size=7168k 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p7 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered
0 0
/dev/block/mmcblk0p1 /efs ext4 ro,nosuid,nodev,noatime,barrier=1,data=ordered 0
0
nil /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/mmcblk0p10 /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,
noauto_da_alloc,discard 0 0
/dev/block/mmcblk0p4 /mnt/.lfs j4fs rw,relatime 0 0
/dev/block/vold/179:11 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,n
odiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp43
7,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,discard 0 0
#
see http://forum.xda-developers.com/showthread.php?t=1103357
ok
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
# busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
also check the free space on the efs partition:
# busybox df -h
if that fails, it seems that the FS is screwed, try this (with efs mounted as ro, or not mounted at all):
# busybox fsck.ext4 /dev/block/mmcblk0p1
Here the result.
Code:
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount: Read-only file system
# busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 416.5M 32.0K 416.5M 0% /dev
tmpfs 416.5M 0 416.5M 0% /mnt/asec
tmpfs 416.5M 0 416.5M 0% /mnt/obb
tmpfs 416.5M 0 416.5M 0% /mnt/usb
tmpfs 7.0M 0 7.0M 0% /app-cache
/dev/block/mmcblk0p9 503.9M 474.9M 29.0M 94% /system
/dev/block/mmcblk0p7 98.4M 4.1M 94.4M 4% /cache
/dev/block/mmcblk0p1 19.7M 8.2M 11.5M 42% /efs
/dev/block/mmcblk0p10
2.0G 64.8M 1.9G 3% /data
df: /mnt/.lfs: Function not implemented
/dev/block/vold/179:11
11.5G 8.9M 11.5G 0% /mnt/sdcard
# busybox fsck.ext4 /dev/block/mmcblk0p1
busybox fsck.ext4 /dev/block/mmcblk0p1
fsck.ext4: applet not found
#
n I9100XEKE1 Rom with GT-I9100_XWKE1_insecure kernel /SuperOneClickv1.9.1
Why i can't mount it as read write!!!
ps: KciNicK if you would, we can try via msn.
try mounting / as RW as well
# mount -o remount,rw rootfs /
then
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
I flashed with CF-Root v4.0 kernel
and this is my result.
Code:
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount -o remount,rw /dev/block/mmcblk0p1 /efs
# busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
busybox cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
# busybox fsck.ext4 /dev/block/mmcblk0p1
busybox fsck.ext4 /dev/block/mmcblk0p1
fsck.ext4: applet not found
# mount -o remount,rw rootfs /
mount -o remount,rw rootfs /
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
mount -o remount,rw /dev/block/mmcblk0p1 /efs
# cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/nv_data.bin
cp: can't stat '/efs/nv_data.bin': Input/output error
# rm /efs/nv_data.bin
rm /efs/nv_data.bin
rm: can't stat '/efs/nv_data.bin': I/O error
#
tried to delete /efs/nv_data.bin!..
hemmm. i think here's the problem can't stat '/efs/nv_data.bin': Input/output error
all that happened after flashing to the kernel i mention in the OP. ehh.
the ext4 fs on /efs is screwed, try umounting it then format it again, but i don't know if you have the tools to doit, reflashing the efs partition may solve it, feel free to contact me by msn, i sent my address by pm
KciNicK said:
the ext4 fs on /efs is screwed, try umounting it then format it again, but i don't know if you have the tools to doit, reflashing the efs partition may solve it, feel free to contact me by msn, i sent my address by pm
Click to expand...
Click to collapse
Yes, i think i need to reFormat it to solve this IO error but how!
I added you the same name here. "Majed.y"
Thank you
with odin and a .pit file, you can get the correct .pit from samfirmware
KciNicK said:
try mounting / as RW as well
# mount -o remount,rw rootfs /
then
# mount -o remount,rw /dev/block/mmcblk0p1 /efs
Click to expand...
Click to collapse
fsck cannot run on mounted file systems, you need to umount
godutch said:
with odin and a .pit file, you can get the correct .pit from samfirmware
Click to expand...
Click to collapse
I did it with "u1_02_20110310_emmc_EXT4.pit" and still..
godutch said:
fsck cannot run on mounted file systems, you need to umount
Click to expand...
Click to collapse
maybe i need step by step, i don't want to break my phone for good
Ok,
unmount \efs
but what's missing to format it?
here's what i got
Code:
# umount /efs
umount /efs
# busybox fsck.ext4 /dev/block/mmcblk0p1
busybox fsck.ext4 /dev/block/mmcblk0p1
[COLOR="Red"]fsck.ext4: applet not found[/COLOR]
# fsck.ext4 /dev/block/mmcblk0p1
fsck.ext4 /dev/block/mmcblk0p1
[COLOR="Red"]fsck.ext4: not found[/COLOR]
# fsck
fsck
[COLOR="Red"]fsck (busybox 1.17.2, 2010-09-05 03:37:08 CDT)
fsck: can't read '/etc/fstab': No such file or directory[/COLOR]
Problem Fixed....
Look at the OP for the solution.

[Q?] Problem with /efs partition (can't mount but IMEI OK)

Problem with /efs partition (can't mount but IMEI OK)
Hi guys,
I've been searching for two days before posting this.. I'm completely mad on how to repair this problem.
I tried to flash a custom recovery on my GT-9505 doing this in terminal (of course my phone was rooted):
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p10
The problem is that I flashed the recovery on the wrong partition, as /mmcblk0p10 is for /efs (right?)
I was on stock firmware I9505XXUDMH8.
When I reboot, phone went on factory mode and I couldn't make calls. Wifi was working right.
I flashed CM 10.1.3 last night and now I can make calls. IMEI and wifi mac are shown ok in status, but bt is not not available and I think serial number is wrong (3403a6f2??)
I suppose that if I go back to stock the problem will be the same with factory mode and no calls because flashing this won't write on /efs.
I have a backup of efs (efs_19700508_054443.img) (~13MB) done in philz touch recovery, but this was made after I corrupted the /efs.
So the problem is I can't mount /efs in recovery neither in File Manager or terminal.
Any ideas on what can I do to repair it?? Thanks in advance and sorry if I have posted in wrong place
Update:
I've made another backup but with EFS Professional: GT-I9505_20131026_190930.tar.gz -> efs.img.ext4
If it holds for something...
Edit: BT address is showing correctly when BT is ON (sorry for that mistake!)
So the only thing is showing wrong (i think) is serial number.
i still cannot mount /efs nor access it via root explorer...:crying:
If I'm on Windows 7, is there any way to mount the efs.img file to edit files into it? (I.e. Like in daemon tools)
If I can format /efs then I'll only hace to edit the files in efs.img to edit my serial number for the good one and copy these files into /efs.
Then my /efs partition won't be corrupted and I will be able to mount it
Someone can give any idea?
Up!
Up!
Uuuup..!
If I restore the .img backup that I have of /efs in recovery it doesn't change anything... Maybe cause it's corrupted?
fran41 said:
If I restore the .img backup that I have of /efs in recovery it doesn't change anything... Maybe cause it's corrupted?
Click to expand...
Click to collapse
try these commands in terminal emulator:
Code:
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
echo -n ON > /efs/FactoryApp/keystr
echo -n ON > /efs/FactoryApp/factorymode
sync
reboot
samersh72 said:
try these commands in terminal emulator:
Code:
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
echo -n ON > /efs/FactoryApp/keystr
echo -n ON > /efs/FactoryApp/factorymode
sync
reboot
Click to expand...
Click to collapse
Thanks for reply.
First line (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs) Mount: invalid argument
Something spelled wrong?
fran41 said:
Thanks for reply.
First line (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs) Mount: invalid argument
Something spelled wrong?
Click to expand...
Click to collapse
Ok, try without first command (mount....)
if not try this
Code:
mount -w -t ext4 /dev/block/mmcblk0p10
samersh72 said:
Ok, try without first command (mount....)
if not try this
Code:
mount -w -t ext4 /dev/block/mmcblk0p10
Click to expand...
Click to collapse
[email protected]:/ # echo -n ON > /efs/FactoryApp/keystr
sh: can't create /efs/FactoryApp/keystr: No such file or directory
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Should be like this??:
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount: Invalid argument
fran41 said:
[email protected]:/ # echo -n ON > /efs/FactoryApp/keystr
sh: can't create /efs/FactoryApp/keystr: No such file or directory
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Should be like this??:
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount: Invalid argument
Click to expand...
Click to collapse
it is weird! try:
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
or
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
samersh72 said:
it is weird! try:
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
or
Code:
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
Click to expand...
Click to collapse
[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
mount: Invalid argument
fran41 said:
[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|[email protected]:/ # mount -r -w -o remount,rw -t ext4 /dev/block/mmcblk0p10 /efs
ext4 /dev/block/mmcblk0p10 /efs <
mount: Invalid argument
Click to expand...
Click to collapse
this command work for me (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10)
i dont know what is the matter with your efs partition!
by the way, install busybox then do the commands
samersh72 said:
this command work for me (mount -o remount,rw -t ext4 /dev/block/mmcblk0p10)
i dont know what is the matter with your efs partition!
by the way, install busybox then do the commands
Click to expand...
Click to collapse
I have busybox installed! I'm getting mad with this Nothing seems to work...
fran41 said:
I have busybox installed! I'm getting mad with this Nothing seems to work...
Click to expand...
Click to collapse
try to re-partition the phone partitions using pit file with the firmware, it may help
samersh72 said:
try to re-partition the phone partition using pit file with the firmware, it may help
Click to expand...
Click to collapse
I did that once flashing it with stock and nothing...
fran41 said:
I did that once flashing it with stock and nothing...
Click to expand...
Click to collapse
my last commands to mount efs (make sure that busybox binaries are installed from the application)
Code:
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10 /efs
or
Code:
busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
you can try also to flash the modem twice in odin as "phone"
if not, i guess you have the service center option
samersh72 said:
my last commands to mount efs (make sure that busybox binaries are installed from the application)
Code:
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10 /efs
or
Code:
busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
you can try also to flash the modem twice in odin as "phone"
if not, i guess you have the service center option
Click to expand...
Click to collapse
This doesn't work:
[email protected]:/ # busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
busybox mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount: mounting /dev/block/mmcblk0p10 on /efs failed: Invalid argument
This works:
255|[email protected]:/ # mke2fs /dev/block/mmcblk0p10
mke2fs /dev/block/mmcblk0p10
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
3488 inodes, 13952 blocks
697 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=14417920
2 block groups
8192 blocks per group, 8192 fragments per group
1744 inodes per group
Superblock backups stored on blocks:
8193
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[email protected]:/ #
[email protected]:/ # mount -w -t ext4 /dev/block/mmcblk0p10 /efs
mount -w -t ext4 /dev/block/mmcblk0p10 /efs
[email protected]:/ #
Now I go to /efs in root explorer and there's a folder lost+found

Dangerous Performance

So I've never really been happy with the stock shield tablets performance. It's a gaming tablet, so why do I get pwned in Vainglory due to my touches not being registered or stuttering. I understand why Nvidia had to put a cap on performance and I'll tell you how to get the performance that you expected but it's on you if you do decide to utilize my advice. Number 1 is HAVE AN EXTERNAL COOLING SOURCE! A common house fan placed behind the tablet at the very minimum.
Step one, Be rooted. Step two, flash @BitOBSessiOn OC Kernel @laufersteppenwolf really put in some time in effort in making sure its awesome and that the voltages wouldn't **** your device over. I've tested it through and through and he put nvidia to shame with it.
That being said, you won't get anywhere unless your boot.img default prop looks like this.
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
security.perf_harden=0
ro.allow.mock.location=0
ro.debuggable=1
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
persist.sys.usb.config=mtp,adb
ro.adb.secure=0
#
This is important because ADB SHELL is going to be your best friend, Terminal does work equally as well but with SHELL you can copy and paste so much faster. I've enabled init.d every which way possible in the boot.img init.rc i.e
on property:sys.boot_completed=1
start sysinit
service sysinit /sbin/sysinit.sh
oneshot
class late_start
user root
group root
disabled
mount -o remount,rw -t auto /system
mount -o remount,rw -t auto /data
mount -t rootfs -o remount,rw rootfs
if [ ! -e /system/etc/init.d ]; then
mkdir /system/etc/init.d
chown -R root.root /system/etc/init.d
chmod -R 755 /system/etc/init.d
fi
for FILE in /system/etc/init.d/*; do
sh $FILE >/dev/null
done;
mount -t rootfs -o remount,ro rootfs
mount -o remount,rw -t auto /data
mount -o remount,ro -t auto /system
it works for running #!/bin/sh and #!/system/bin/sh scripts all day but to get true performance scripts wont work. The only true way to maximize is through SU adb shell.
I've probably rambled enough already and if you understand what i've been going on about, this is how to Max your shield to the upmost dangerous overclock. you've been warned.
I know I said scripts don't work but if any one does benefit benchmarking it,s disabling journaling. This is done through TWRP. This is for ext4 partitions. Unmount /system /data /cache though TWRP and then you can ADB shell or TWRP terminal and type "SH, whatever you name this following text.sh
#!/sbin/sh
sync;
/sbin/busybox umount -l /system
/sbin/busybox umount -l /cache
/sbin/busybox umount -l /data
/sbin/busybox umount -l /dev/block/mmcblk0p13
/sbin/busybox umount -l /dev/block/mmcblk0p14
/sbin/busybox umount -l /dev/block/mmcblk0p23
/sbin/tune2fs -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -m 0 /dev/block/mmcblk0p23
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -p /dev/block/mmcblk0p13
/sbin/e2fsck -p /dev/block/mmcblk0p14
/sbin/e2fsck -p /dev/block/mmcblk0p23
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p23
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p23
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -Dfy /dev/block/mmcblk0p13
/sbin/e2fsck -Dfy /dev/block/mmcblk0p14
/sbin/e2fsck -Dfy /dev/block/mmcblk0p23
sync;
This is my 50th some odd test combination that outputs the best results. remember, unmount before running.
So now down to the brass tax. This is no way good for your device, you must have cooling and it rapes the battery so plug in.
we can put the device in true performance mode, which means maxing out both gpus, putting all cores online, disabling the 5th cpu core, keeping the high power cluster always activated
ADB SHELL#
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
echo 1 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 480000000 > /sys/kernel/debug/clock/override.c2bus/rate
echo 1 > /sys/kernel/debug/clock/override.c2bus/state
echo 756000000 > /sys/kernel/debug/clock/override.c3bus/rate
echo 1 > /sys/kernel/debug/clock/override.c3bus/state
echo G > /sys/kernel/cluster/active
cat /sys/kernel/debug/clock/override.emc/max > /sys/kernel/debug/clock/override.emc/rate
echo 1 > /sys/kernel/debug/clock/override.emc/state
for i in `ls /sys/devices/system/cpu/cpu*/cpuidle/state*/disable`; do echo 1
> $i; done
cat /sys/kernel/debug/clock/gbus/max > /sys/kernel/debug/clock/override.gbus/rate
echo 1 > /sys/kernel/debug/clock/override.gbus/state
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
for file in /sys/devices/system/cpu/cpu*/online; do
if [ `cat $file` -eq 0 ]; then
echo 1 > $file
fi
done
just copy and paste all of it once you're SU in ADB SHell for maximum performance.
To get your touch screen to respond as fast as you use file explorer to navigate to /system/usr/idc
and edit touch.idc by deleting the # from infront of
touch.pressure.calibration = amplitude
touch.pressure.source = default
touch.pressure.scale = 0.01
This is how I benchmark so high everytime, but remember, with great voltage comes great heat.
Shoutout to @BitOBSessiOn for inspiring me to learn.
I've attached my edited boot.img with init.d support and bit's f2fs kernel already installed.
unzip the image and flash it with
fastboot flash boot boot.img
if you try to flash it through recovery it wont work. I've also attached the journaling script and a virtual memory tweak script that helps with performance.
m0nt3s said:
So I've never really been happy with the stock shield tablets performance. It's a gaming tablet, so why do I get pwned in Vainglory due to my touches not being registered or stuttering. I understand why Nvidia had to put a cap on performance and I'll tell you how to get the performance that you expected but it's on you if you do decide to utilize my advice. Number 1 is HAVE AN EXTERNAL COOLING SOURCE! A common house fan placed behind the tablet at the very minimum.
Step one, Be rooted. Step two, flash @BitOBSessiOn OC Kernel, he really put in some time in effort in making sure its awesome and that the voltages wouldn't **** your device over. I've tested it through and through and he put nvidia to shame with it.
That being said, you won't get anywhere unless your boot.img default prop looks like this.
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
security.perf_harden=0
ro.allow.mock.location=0
ro.debuggable=1
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
persist.sys.usb.config=mtp,adb
ro.adb.secure=0
#
This is important because ADB SHELL is going to be your best friend, Terminal does work equally as well but with SHELL you can copy and paste so much faster. I've enabled init.d every which way possible in the boot.img init.rc i.e
on property:sys.boot_completed=1
start sysinit
service sysinit /sbin/sysinit.sh
oneshot
class late_start
user root
group root
disabled
mount -o remount,rw -t auto /system
mount -o remount,rw -t auto /data
mount -t rootfs -o remount,rw rootfs
if [ ! -e /system/etc/init.d ]; then
mkdir /system/etc/init.d
chown -R root.root /system/etc/init.d
chmod -R 755 /system/etc/init.d
fi
for FILE in /system/etc/init.d/*; do
sh $FILE >/dev/null
done;
mount -t rootfs -o remount,ro rootfs
mount -o remount,rw -t auto /data
mount -o remount,ro -t auto /system
it works for running #!/bin/sh and #!/system/bin/sh scripts all day but to get true performance scripts wont work. The only true way to maximize is through SU adb shell.
I've probably rambled enough already and if you understand what i've been going on about, this is how to Max your shield to the upmost dangerous overclock. you've been warned.
I know I said scripts don't work but if any one does benefit benchmarking it,s disabling journaling. This is done through TWRP. This is for ext4 partitions. Unmount /system /data /cache though TWRP and then you can ADB shell or TWRP terminal and type "SH, whatever you name this following text.sh
#!/sbin/sh
sync;
/sbin/busybox umount -l /system
/sbin/busybox umount -l /cache
/sbin/busybox umount -l /data
/sbin/busybox umount -l /dev/block/mmcblk0p13
/sbin/busybox umount -l /dev/block/mmcblk0p14
/sbin/busybox umount -l /dev/block/mmcblk0p23
/sbin/tune2fs -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -m 0 /dev/block/mmcblk0p23
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -p /dev/block/mmcblk0p13
/sbin/e2fsck -p /dev/block/mmcblk0p14
/sbin/e2fsck -p /dev/block/mmcblk0p23
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p23
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p23
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -Dfy /dev/block/mmcblk0p13
/sbin/e2fsck -Dfy /dev/block/mmcblk0p14
/sbin/e2fsck -Dfy /dev/block/mmcblk0p23
sync;
This is my 50th some odd test combination that outputs the best results. remember, unmount before running.
So now down to the brass tax. This is no way good for your device, you must have cooling and it rapes the battery so plug in.
we can put the device in true performance mode, which means maxing out both gpus, putting all cores online, disabling the 5th cpu core, keeping the high power cluster always activated
ADB SHELL#
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
echo 1 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 480000000 > /sys/kernel/debug/clock/override.c2bus/rate
echo 1 > /sys/kernel/debug/clock/override.c2bus/state
echo 756000000 > /sys/kernel/debug/clock/override.c3bus/rate
echo 1 > /sys/kernel/debug/clock/override.c3bus/state
echo G > /sys/kernel/cluster/active
cat /sys/kernel/debug/clock/override.emc/max > /sys/kernel/debug/clock/override.emc/rate
echo 1 > /sys/kernel/debug/clock/override.emc/state
for i in `ls /sys/devices/system/cpu/cpu*/cpuidle/state*/disable`; do echo 1
> $i; done
cat /sys/kernel/debug/clock/gbus/max > /sys/kernel/debug/clock/override.gbus/rate
echo 1 > /sys/kernel/debug/clock/override.gbus/state
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
for file in /sys/devices/system/cpu/cpu*/online; do
if [ `cat $file` -eq 0 ]; then
echo 1 > $file
fi
done
I know it's alot to copy and paste but this is the truest way to get the maximum performance.
To get your touch screen to respond as fast as you set your tablet navigate to
/system/usr/idc
and edit touch.idc which is deleting the # from infront of
touch.pressure.calibration = amplitude
touch.pressure.source = default
touch.pressure.scale = 0.01
This is how I benchmark so high everytime, but remember, with great voltage comes great heat.
Shoutout to @BitOBSessiOn for inspiring me to learn.
Click to expand...
Click to collapse
The touchscreen improvement is that adb shell or what not good with scripts sorry
skooter32 said:
The touchscreen improvement is that adb shell or what not good with scripts sorry
Click to expand...
Click to collapse
Learn to quote.
edisso10018 said:
Learn to quote.
Click to expand...
Click to collapse
Eh? I ask a simple question and get stupidityin return cheers oh u do realise that this is xda ?
@skooter32 For the toucscreen I use fx file explorer, it has a built in text editor and it has easy root navigation
I attached some files to the original post, the boot img is userdebug with true SU, although I would reflash supersu-sr-1 after installing the new boot.img
m0nt3s said:
@skooter32 For the toucscreen I use fx file explorer, it has a built in text editor and it has easy root navigation
Click to expand...
Click to collapse
So am adding this to build.prop? Because a cant find it on build.prop
---------- Post added at 11:22 PM ---------- Previous post was at 11:20 PM ----------
skooter32 said:
So am adding this to build.prop? Because a cant find it on build.prop
Click to expand...
Click to collapse
Edit found it
skooter32 said:
So am adding this to build.prop? Because a cant find it on build.prop
---------- Post added at 11:22 PM ---------- Previous post was at 11:20 PM ----------
Edit found it
Click to expand...
Click to collapse
Sadly editing the build prop doesn't change touchscreen sensitivity. Install the apk I've attached, grant it root permission, then from in the apk, go to system(root) system, then usr, then idc, once your in the idc folder you'll see touch.idc which you need to open with fx text editor and delete the # infront of
touch.pressure.calibration = amplitude
touch.pressure.source = default
touch.pressure.scale = 0.01
save your changes and then back out to the same idc folder and editsensor00fn11.idc the same by deleting the the #
you only have to do this once, since I've already changed it i might be mistaken but the stock sensitivty is #0.0125, change it to 0.001 and save in both
proof of concept
@boswelja, @BitOBSessiOn, @Steel01,[/MENTION], @Bogdacutu,
So I need some help and you guys are the best of the best. The problem I'm having is that I've gutted the OTA 4.3 rom so much that when I try to build the replicate of my rom it errors out after booting with "setup wizard has failed" and just loops after booting. If I were to give you a TWRP backup of my current rom with settings do you think you could get it to work? I'm currently full f2fs, with a probably more than i should of gutted OTA 4.3. This is my lowest benchmark that I'm confident with your help we could make it universal. any input is apprciated.
m0nt3s said:
Sadly editing the build prop doesn't change touchscreen sensitivity. Install the apk I've attached, grant it root permission, then from in the apk, go to system(root) system, then usr, then idc, once your in the idc folder you'll see touch.idc which you need to open with fx text editor and delete the # infront of
touch.pressure.calibration = amplitude
touch.pressure.source = default
touch.pressure.scale = 0.01
save your changes and then back out to the same idc folder and editsensor00fn11.idc the same by deleting the the #
you only have to do this once, since I've already changed it i might be mistaken but the stock sensitivty is #0.0125, change it to 0.001 and save in both
Click to expand...
Click to collapse
Sorted????
m0nt3s said:
@boswelja, @BitOBSessiOn, @Steel01,[/MENTION], @Bogdacutu,
So I need some help and you guys are the best of the best. The problem I'm having is that I've gutted the OTA 4.3 rom so much that when I try to build the replicate of my rom it errors out after booting with "setup wizard has failed" and just loops after booting. If I were to give you a TWRP backup of my current rom with settings do you think you could get it to work? I'm currently full f2fs, with a probably more than i should of gutted OTA 4.3. This is my lowest benchmark that I'm confident with your help we could make it universal. any input is apprciated.
Click to expand...
Click to collapse
Err.. the best I could do is get a logcat and tell u what's causing the problem
m0nt3s said:
So I've never really been happy with the stock shield tablets performance. It's a gaming tablet, so why do I get pwned in Vainglory due to my touches not being registered or stuttering. I understand why Nvidia had to put a cap on performance and I'll tell you how to get the performance that you expected but it's on you if you do decide to utilize my advice. Number 1 is HAVE AN EXTERNAL COOLING SOURCE! A common house fan placed behind the tablet at the very minimum.
Step one, Be rooted. Step two, flash @BitOBSessiOn OC Kernel, he really put in some time in effort in making sure its awesome and that the voltages wouldn't **** your device over. I've tested it through and through and he put nvidia to shame with it.
That being said, you won't get anywhere unless your boot.img default prop looks like this.
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
security.perf_harden=0
ro.allow.mock.location=0
ro.debuggable=1
ro.zygote=zygote32
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
ro.dalvik.vm.native.bridge=0
debug.atrace.tags.enableflags=0
persist.sys.usb.config=mtp,adb
ro.adb.secure=0
#
This is important because ADB SHELL is going to be your best friend, Terminal does work equally as well but with SHELL you can copy and paste so much faster. I've enabled init.d every which way possible in the boot.img init.rc i.e
on property:sys.boot_completed=1
start sysinit
service sysinit /sbin/sysinit.sh
oneshot
class late_start
user root
group root
disabled
mount -o remount,rw -t auto /system
mount -o remount,rw -t auto /data
mount -t rootfs -o remount,rw rootfs
if [ ! -e /system/etc/init.d ]; then
mkdir /system/etc/init.d
chown -R root.root /system/etc/init.d
chmod -R 755 /system/etc/init.d
fi
for FILE in /system/etc/init.d/*; do
sh $FILE >/dev/null
done;
mount -t rootfs -o remount,ro rootfs
mount -o remount,rw -t auto /data
mount -o remount,ro -t auto /system
it works for running #!/bin/sh and #!/system/bin/sh scripts all day but to get true performance scripts wont work. The only true way to maximize is through SU adb shell.
I've probably rambled enough already and if you understand what i've been going on about, this is how to Max your shield to the upmost dangerous overclock. you've been warned.
I know I said scripts don't work but if any one does benefit benchmarking it,s disabling journaling. This is done through TWRP. This is for ext4 partitions. Unmount /system /data /cache though TWRP and then you can ADB shell or TWRP terminal and type "SH, whatever you name this following text.sh
#!/sbin/sh
sync;
/sbin/busybox umount -l /system
/sbin/busybox umount -l /cache
/sbin/busybox umount -l /data
/sbin/busybox umount -l /dev/block/mmcblk0p13
/sbin/busybox umount -l /dev/block/mmcblk0p14
/sbin/busybox umount -l /dev/block/mmcblk0p23
/sbin/tune2fs -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -m 0 /dev/block/mmcblk0p23
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -yf /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -p /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -p /dev/block/mmcblk0p13
/sbin/e2fsck -p /dev/block/mmcblk0p14
/sbin/e2fsck -p /dev/block/mmcblk0p23
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -o journal_data_writeback -c 1 -i 1d -m 0 /dev/block/mmcblk0p23
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p13
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p14
/sbin/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p23
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/APP
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/CAC
/sbin/e2fsck -Dfy /dev/block/platform/sdhci-tegra.3/by-name/UDA
/sbin/e2fsck -Dfy /dev/block/mmcblk0p13
/sbin/e2fsck -Dfy /dev/block/mmcblk0p14
/sbin/e2fsck -Dfy /dev/block/mmcblk0p23
sync;
This is my 50th some odd test combination that outputs the best results. remember, unmount before running.
So now down to the brass tax. This is no way good for your device, you must have cooling and it rapes the battery so plug in.
we can put the device in true performance mode, which means maxing out both gpus, putting all cores online, disabling the 5th cpu core, keeping the high power cluster always activated
ADB SHELL#
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
echo 1 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 480000000 > /sys/kernel/debug/clock/override.c2bus/rate
echo 1 > /sys/kernel/debug/clock/override.c2bus/state
echo 756000000 > /sys/kernel/debug/clock/override.c3bus/rate
echo 1 > /sys/kernel/debug/clock/override.c3bus/state
echo G > /sys/kernel/cluster/active
cat /sys/kernel/debug/clock/override.emc/max > /sys/kernel/debug/clock/override.emc/rate
echo 1 > /sys/kernel/debug/clock/override.emc/state
for i in `ls /sys/devices/system/cpu/cpu*/cpuidle/state*/disable`; do echo 1
> $i; done
cat /sys/kernel/debug/clock/gbus/max > /sys/kernel/debug/clock/override.gbus/rate
echo 1 > /sys/kernel/debug/clock/override.gbus/state
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo userspace > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
for file in /sys/devices/system/cpu/cpu*/online; do
if [ `cat $file` -eq 0 ]; then
echo 1 > $file
fi
done
just copy and paste all of it once you're SU in ADB SHell for maximum performance.
To get your touch screen to respond as fast as you use file explorer to navigate to /system/usr/idc
and edit touch.idc by deleting the # from infront of
touch.pressure.calibration = amplitude
touch.pressure.source = default
touch.pressure.scale = 0.01
This is how I benchmark so high everytime, but remember, with great voltage comes great heat.
Shoutout to @BitOBSessiOn for inspiring me to learn.
I've attached my edited boot.img with init.d support and bit's f2fs kernel already installed.
unzip the image and flash it with
fastboot flash boot boot.img
if you try to flash it through recovery it wont work. I've also attached the journaling script and a virtual memory tweak script that helps with performance.
Click to expand...
Click to collapse
Although I was working at the beginning in a OC kernel, all latest OC work must be thanked to @laufersteppenwolf . Basically I've only merged his work in latest BitO-KX series.
Correct merits should be put in OP, please.
Thx!
Touch tweaks; latency or sensitivity?
Thanks for these details. I understand the objective of these tweaks are for hardware performance, but I'd like to ask if these modifications to the touch IDC improve touch latency on the Shield? I recently purchased one when stock became available and find that it's touch response is significantly slower than my Nexus 9 (same K1, but dual core 64-bit) when not plugged into any power source (so far my power sources introduce MORE latency...). I'd like to identify any measures I can take to reduce touch latency if possible.
This is apparent in any scrolling app, using debug 'show touches', or testing apps such as Yet Another Multi Touch Tester, where any visual indication lags behind the finger significantly when dragging and swiping. It also results in diminished response in rhythm games which already have enough trouble with the state of Android audio latency.
This tweak looks like it adjusts touch sensitivity (finger distance from screen before registering a touch), which I don't have any problem with. Can anyone using these tweaks confirm or deny if they improve latency as well?
@Crayphish
Try using my modified sysctl, it sounds like you're using the stock one which limits so many different factors that I wouldn't really know where to start troubleshooting, I would start in ADB SHELL change these parameters start by replacing your sysctl,the easiest way to change all the new parameters would be with 3C toolbox .
eglSwapInterval — specifies the minimum number of video frame periods per buffer swap for the window associated with the current context.
The interval takes effect when eglSwapBuffers is first called subsequent to the eglSwapInterval call.
The interval specified by the function applies to the draw surface bound to the context that is current on the calling thread.
If interval is set to a value of 0, buffer swaps are not synchronized to a video frame, and the swap happens as soon as the render is complete. interval is silently clamped to minimum and maximum implementation dependent valuesbefore being stored; these values are defined by EGLConfig attributes EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL respectively.
fs.inotify.max_queued_events = 32768
fs.inotify.max_user_instances = 256
EGL_MIN_SWAP_INTERVAL = 0
EGL_MAX_SWAP_INTERVAL = 10
add these lines to your build prop
ENFORCE_PROCESS_LIMIT=false
MAX_SERVICE_INACTIVITY=false
MIN_HIDDEN_APPS=false
MAX_HIDDEN_APPS=false
CONTENT_APP_IDLE_OFFSET=false
EMPTY_APP_IDLE_OFFSET=false
MAX_ACTIVITIES=false
ACTIVITY_INACTIVITY_RESET_TIME=false
MAX_RECENT_TASKS=false
MIN_RECENT_TASKS=false
APP_SWITCH_DELAY_TIME=false
MAX_PROCESSES=false
PROC_START_TIMEOUT=false
CPU_MIN_CHECK_DURATION=false
GC_TIMEOUT=false
SERVICE_TIMEOUT=false
MIN_CRASH_INTERVAL=false
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
ro.zygote.disable_gl_preload=false
windowsmgr.max_events_per_sec=180
debug.sf.hw=1
debug.composition.type=gpu
persist.sys.ui.hw=1
persist.sys.composition.type=gpu
debug.performance.tuning=1
touch.pressure.scale=0.001
view.touch_slop=4
ro.min_pointer_dur=0.001
touch.size.calibration=geometric
touch.size.scale=100
touch.size.bias=70
touch.pressure.calibration=amplitude
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
ro.ril.disable.power.collapse=0
dalvik.vm.heaptargetutilization=0.75
sys.usb.config=mtp,adb
dalvik.vm.dexopt-flags=m=y,v=n
ro.debuggable=1
ro.kernel.android.checkjni=0
ro.secure=0
profiler.force_disable_ulog=1
profiler.force_disable_err_rpt=1
debug.egl.hw=1
ro.config.disable.hw_accel=false
video.accelerate.hw=1
ADB SHELL This and see is you notice a difference.
I noticed a huge difference after maxing out the emc memory and the 3d.emc
cat /sys/kernel/debug/clock/emc/possible_rates
cat /sys/kernel/debug/clock/3d.emc/possible_rates
cat /sys/kernel/debug/clock/emc/max > /sys/kernel/debug/clock/override.emc/rate
echo 1 > /sys/kernel/debug/clock/override.emc/state
echo "EMC: `cat /sys/kernel/debug/clock/emc/rate`"
cat /sys/kernel/debug/clock/3d.emc/max > /sys/kernel/debug/clock/3d.emc/rate
echo 1 > /sys/kernel/debug/clock/override.3d.emc/state
echo "3d.EMC: `cat /sys/kernel/debug/clock/3d.emc/rate`"
it's going to be a bit of a troubleshooting process but try these tweaks and let me know if anything changes for better or worse. Also I would make a Full TWRP Backup before.
@m0nt3s
Thanks for the help. I've just put TWRP on the device and setup @BitOBSessiOn 's experimental F2FS kernel with good success so far. I will try your sysctl and build.prop changes as well and see if I can get any improvements. :good:
Kernel auditor is also a very useful app that I think is a must have
Crayphish said:
@m0nt3s
Thanks for the help. I've just put TWRP on the device and setup @BitOBSessiOn 's experimental F2FS kernel with good success so far. I will try your sysctl and build.prop changes as well and see if I can get any improvements. :good:
Click to expand...
Click to collapse
Can you or anyone else point me in a direction for everything to make the sensitivity consistent?
I literally bought the Shield K1 tablet to play a rhythm game (Love Live, specifically) and whenever I'm playing a very difficult song, I easily drop my combo due to touches not being input. I'm certain there's some way of fixing this...
What rom should I use, should I change the kernel, what else should I try? I don't have any external cooling sources and I'm pretty new/bad at this stuff overall.
Not even sure what to do with a sysctl.
I've tried a bunch of things, and so far my tablet feels worse than when I started from the stock rom with just root.
@KariArisu
Go to settings, about tablet, and tap on Model number six times to open the built in touch calibrator.
The biggest performance impactor would be Google. Go to settings accounts, google, and uncheck Sync and every other google feature. if you do need to use a feature you can always do it manually or turn the feature back on when you need it, googles background sync eats %23 - %29 memory when activated. if you're not using cloudprint turn that off under settings printing, you can also go to about tablet, tap on build number 7 times, enabled developer options go down to the drawing section, change Window, Transition, and Animatorr scale to .5 or .25 if you have gravity box installed. also in about tablet uncheck help nvidia improve shield, ot's another background sync app but Nvidia is sneaky in that in the build prop they still have this enabled stock
ro.nvidia.collect_data_enabled=true, use FX editor, navigate to system(root) system, click the little lock to unlock or remount as r/w and then edit your build prop lines
ro.nvidia.collect_data_enabled=false
ro.input.noresample=0
you can also go back to settings, developer options, hardware accelerated rendering, check force use of GPU for 2d drawing, disable HW overlays, and then go maximize system memory scroll down to the bottom of developer options, apps, background process limit and change it to either 1 or none.
Did all of this now, and it's better but still not great. Whenever I have to rapidly tap for long periods of time, it will eventually cause taps to lag behind or just not happen at all. It's really weird.
KariArisu said:
Did all of this now, and it's better but still not great. Whenever I have to rapidly tap for long periods of time, it will eventually cause taps to lag behind or just not happen at all. It's really weird.
Click to expand...
Click to collapse
Sounds like it's time to flash Bit's OC kernel, after you flash go on the playstore and get Kernel Adiutor (ROOT)
https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor&hl=en
once you do, let me know and we can start tweaking some things

Categories

Resources