fix_permissions improvement - G1 Android Development

I've just installed the last porting of the cyanogen for my Magic 32a. I'm enjoining the idea behind the script fix_permissions. But, observing the structure of the files/folders in my /data/data/, I can see that it is not perfect.
It does chown the folders /data/data/NAME-OF-PACKAGE/ and the subfolders 'databases' and 'shared_prefs'.
Observing the typical contents of my /data/data/ I can see that some applications has further folders and some times also single files in /data/data/NAME-OF-PACKAGE/ that need a touch of chown.
For example:
/data/data/com.htc.android.mail/
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_config
drwxrwxrwx 1 10021 10021 2048 Aug 18 09:00 app_mail_eas
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_mail_temp
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_temp
-rw------- 1 10021 10021 1048576 Aug 18 09:00 bufferFileForMailAP
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 databases
drwxr-xr-x 1 1000 1000 2048 Aug 18 08:41 lib
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 shared_prefs
You can test on your system by yourself:
for APP in /data/data/* ; do echo -e "\n$APP" ; ls -l $APP ; done | more
I'm attaching an improved version that should fix the permissions on all the subfolders different than 'lib' and also on the single files.
I hope it works for you and that it can be included in the future firmwares.
UPDATE: in this thread, several users are making contributions to the original script (with a fast increasing version number ). There is also a report in the Cyanogen bug system: http://code.google.com/p/cyanogenmo...ID Type Status Priority Version Owner Summary
You should find there the last revision. Thanks to all for the contributions.

ankn said:
I've just installed the last porting of the cyanogen for my Magic 32a. I'm enjoining the idea behind the script fix_permissions. But, observing the structure of the files/folders in my /data/data/, I can see that it is not perfect.
It does chown the folders /data/data/NAME-OF-PACKAGE/ and the subfolders 'databases' and 'shared_prefs'.
Observing the typical contents of my /data/data/ I can see that some applications has further folders and some times also single files in /data/data/NAME-OF-PACKAGE/ that need a touch of chown.
For example:
/data/data/com.htc.android.mail/
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_config
drwxrwxrwx 1 10021 10021 2048 Aug 18 09:00 app_mail_eas
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_mail_temp
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 app_temp
-rw------- 1 10021 10021 1048576 Aug 18 09:00 bufferFileForMailAP
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 databases
drwxr-xr-x 1 1000 1000 2048 Aug 18 08:41 lib
drwxrwx--x 1 10021 10021 2048 Aug 18 09:00 shared_prefs
You can test on your system by yourself:
for APP in /data/data/* ; do echo -e "\n$APP" ; ls -l $APP ; done | more
I'm attaching an improved version that should fix the permissions on all the subfolders different than 'lib' and also on the single files.
I hope it works for you and that it can be included in the future firmwares.
Click to expand...
Click to collapse
Btw, I was wondering why we fix only userId and not also sharedUserId
as I'm quite sure I've seen them messed up sometimes after some of my to
ambitious experiments. Shouldn't be difficult to add support for that if there
is some evidence that it is a Good Thing(tm).

farmatito said:
Btw, I was wondering why we fix only userId and not also sharedUserId
Click to expand...
Click to collapse
I don't understand the meaning of the parameter "sharedUserId". Some packages in packages.xml use the parameter "UserId", others the "sharedUserId" one. What's the difference?

ankn said:
I don't understand the meaning of the parameter "sharedUserId". Some packages in packages.xml use the parameter "UserId", others the "sharedUserId" one. What's the difference?
Click to expand...
Click to collapse
shared user id is for the case when you have a program extended by another installable program in order to run in the same process:
http://developer.android.com/reference/android/R.attr.html#sharedUserId

Another improvement could be to fix the file modes as well. I have noticed that sometimes the user permissions on files and directories in /data/data get removed.
Then you get FCs with an sqlite error like below:
Code:
sqlite3_open_v2("/data/data/com.xta.foodmkt/databases/Hungry.db", &handle, 6, NULL) failed
The below commands fixes the access errors:
Code:
find /data/data -type d -exec busybox chmod u+rwx {} \;
find /data/data -type f -exec busybox chmod u+rw {} \;

farmatito said:
Btw, I was wondering why we fix only userId and not also sharedUserId
as I'm quite sure I've seen them messed up sometimes after some of my to
ambitious experiments. Shouldn't be difficult to add support for that if there
is some evidence that it is a Good Thing(tm).
Click to expand...
Click to collapse
I'm attaching another version with support to packages with sharedUserId; fixed the remount mechanism that doesn't work on the other firmware that I'm actually using (HoFo).

smeat said:
The below commands fixes the access errors:
Code:
find /data/data -type d -exec busybox chmod u+rwx {} \;
find /data/data -type f -exec busybox chmod u+rw {} \;
Click to expand...
Click to collapse
This code should fixes all the permission-related problems but it is too risky from the security point-of-view.

ankn said:
This code should fixes all the permission-related problems but it is too risky from the security point-of-view.
Click to expand...
Click to collapse
Why risky, if i understand it right:
directory: 700 (owner only can read, write or enter directory)
files: 600 (owner only can read or write file)
Where is the risk?
You can also use:
chmod 700 directory
chmod 600 files

farmatito said:
Why risky, if i understand it right:
directory: 700 (owner only can read, write or enter directory)
files: 600 (owner only can read or write file)
Where is the risk?
You can also use:
chmod 700 directory
chmod 600 files
Click to expand...
Click to collapse
It doesn't even go that far, it ADDS the owner to the permissions, not reset them to just the owner having permissions.

smeat said:
It doesn't even go that far, it ADDS the owner to the permissions, not reset them to just the owner having permissions.
Click to expand...
Click to collapse
This in my opinion is far more risky than doing
a chmod for the owner only at least in the case
that the permissions are messed up for whatever
reason as some insecure settings will not be corrected
that way, e.g.:
permissions are wrongly set to 666 or 777
than you do chmod +urwx file and the result
will continue to be an insecure setting 666 or
677 that doesn't enforce isolation between apps.
BTW, by looking at ls of /data/data it seems to
me that all folders have 755 permissions so
chmod 755 folder should be safe. For the deeper level:
Code:
/data/data/app 755
/data/data/app/files 700
/data/data/app/lib 755
/data/data/app/shared_prefs 771
but I have not the time right now to check all subfolders
to see if there are exceptions to this default settings.

smeat said:
It doesn't even go that far, it ADDS the owner to the permissions, not reset them to just the owner having permissions.
Click to expand...
Click to collapse
This is true. Sorry!

farmatito said:
This in my opinion is far more risky than doing
a chmod for the owner only at least in the case
that the permissions are messed up for whatever
reason as some insecure settings will not be corrected
that way, e.g.:
permissions are wrongly set to 666 or 777
than you do chmod +urwx file and the result
will continue to be an insecure setting 666 or
677 that doesn't enforce isolation between apps.
BTW, by looking at ls of /data/data it seems to
me that all folders have 755 permissions so
chmod 755 folder should be safe. For the deeper level:
Code:
/data/data/app 755
/data/data/app/files 700
/data/data/app/lib 755
/data/data/app/shared_prefs 771
but I have not the time right now to check all subfolders
to see if there are exceptions to this default settings.
Click to expand...
Click to collapse
fix_permissions is not about removing permissions and never has been from what I can tell. Currently it just goes through the /data/system/packages.xml and finds the listed owner of the /data/data files and then changes ownership of the files and directories.
I am talking about adding an additional chmod to make it so that file and directory owners are added as being able to read/write to the files they own. I have seen an issue were running something made it so that a ton of my application sqlite databases had file permissions of 060. When this happens you get the error I posted originally: sqlite3_open_v2("/data/data/com.xta.foodmkt/databases/Hungry.db", &handle, 6, NULL) failed. Even though the group write and read bit are set and the group is correct the error above happens. Adding the owner back as having read/write permissions fixes this error.
Again, adding permissions to only the user/owner of the files and directories does not open the files up to being written by other processes on the phone.

Again, adding permissions to only the user/owner of the files and directories does not open the files up to being written by other processes on the phone.
Click to expand...
Click to collapse
I know. I was trying to improve the concept of fix permission as you can not know
in advance how the permissions could have been messed up. So it would be better
to enforce some sane defaults rather than to add some hacks to fix a specific problem.
This obviously is only possible if there are some patterns in file and folder permissions of /data/data.
That is what i will try to find out.

farmatito said:
I know. I was trying to improve the concept of fix permission as you can not know
in advance how the permissions could have been messed up. So it would be better
to enforce some sane defaults rather than to add some hacks to fix a specific problem.
This obviously is only possible if there are some patterns in file and folder permissions of /data/data.
That is what i will try to find out.
Click to expand...
Click to collapse
Ahhh, sorry I misunderstood what you were getting at.
If you run:
Code:
find /data/data -type f -exec ls -l {} \;
Will tell you what all the files are currently set to.
A run of:
Code:
find /data/data -type d -exec ls -ld {} \;
Will list the current directory permissions.
What I can find is that any /sslcache directory is 700, /lib 755 and owned by 1000:1000, /database 771, /shared_prefs 771, But I have some apps with 700 directories for everything.
Here is a table for /data/data/app, format: directory/file, permissions, ownership
Directories:
/database 771 appuser:appgroup
/lib 755 1000:1000
/shared_prefs 771 appuser:appgroup
/sslcache 700 appuser:appgroup
/anythingelse 771 appuser:appgroup
Files:
/database/* 660 appuser:appgroup
/lib/* ??? ??????, never seen any files in these directories.
/sslcache/* 600 appuser:appgroup
/shared_prefs/* 660 appuser:appgroup
/anythingelse/* 660 appuser:appgroup
Does this align with what you are seeing? If so we can adjust the script to apply these permissions to the files and directories more selectively.

I was actually wondering about this very thing yesterday. Is there some reason why the initial script only changed the permissions of databases and shared_prefs?
I'm trying to think of a scenario in which you wouldn't just want a recursive chown, but especially in the case of wiping and then copying back data directories, having ALL the subdirectories owned by the app's uid seems preferable to having any of them owned by the wrong uid.

smeat said:
Ahhh, sorry I misunderstood what you were getting at.
If you run:
Code:
find /data/data -type f -exec ls -l {} \;
Will tell you what all the files are currently set to.
A run of:
Code:
find /data/data -type d -exec ls -ld {} \;
Will list the current directory permissions.
What I can find is that any /sslcache directory is 700, /lib 755 and owned by 1000:1000, /database 771, /shared_prefs 771, But I have some apps with 700 directories for everything.
Here is a table for /data/data/app, format: directory/file, permissions, ownership
Directories:
/database 771 appuser:appgroup
/lib 755 1000:1000
/shared_prefs 771 appuser:appgroup
/sslcache 770 appuser:appgroup
/anythingelse 771 appuser:appgroup
Files:
/database/* 660 appuser:appgroup
/lib/* ??? ??????, never seen any files in these directories.
/sslcache/* 600 appuser:appgroup
/shared_prefs/* 660 appuser:appgroup
/anythingelse/* 660 appuser:appgroup
Does this align with what you are seeing? If so we can adjust the script to apply these permissions to the files and directories more selectively.
Click to expand...
Click to collapse
So far this is what i've found:
Code:
/data/data/pkgdir uid/gid 755
/data/data/pkgdir/lib system/system 755
/data/data/pkgdir/databases uid/gid 771
/data/data/pkgdir/databases/*.db uid/gid 660
/data/data/pkgdir/shared_prefs uid/gid 771
/data/data/pkgdir/shared_prefs/*.xml uid/gid 660
/data/data/pkgdir/cache uid/gid 771
/data/data/pkgdir/cache/* uid/gid 771
The only differences are in the anythingelse part wher I have found
all possible combinations of permissions, but I suspect that these files
and dirs are setup by the apk at runtime as no reference could be found
for them in the apk package nor in the installd source code.
So i think it would be a big improvement to try to fix this standard dirs and their
contents with ownership and permissions as shown above.
This could save a lot of headaches to users and devs. Single apps with
exotic permissions could always be reinstalled or fixed manually.

In script 1.3 you should change:
cat /data/system/packages.xml | grep "^<package" | grep userId
to
cat /data/system/packages.xml | grep "^<package" | grep serId
as else no packages with sharedUserId will be found

farmatito said:
So far this is what i've found:
Code:
/data/data/pkgdir uid/gid 755
/data/data/pkgdir/lib system/system 755
/data/data/pkgdir/databases uid/gid 771
/data/data/pkgdir/databases/*.db uid/gid 660
/data/data/pkgdir/shared_prefs uid/gid 771
/data/data/pkgdir/shared_prefs/*.xml uid/gid 660
/data/data/pkgdir/cache uid/gid 771
/data/data/pkgdir/cache/* uid/gid 771
The only differences are in the anythingelse part wher I have found
all possible combinations of permissions, but I suspect that these files
and dirs are setup by the apk at runtime as no reference could be found
for them in the apk package nor in the installd source code.
So i think it would be a big improvement to try to fix this standard dirs and their
contents with ownership and permissions as shown above.
This could save a lot of headaches to users and devs. Single apps with
exotic permissions could always be reinstalled or fixed manually.
Click to expand...
Click to collapse
Yeah, I was assuming on the /anythingelse.
Alright here is my shot at this modification. Not much of a coder... so be gentle.

I created an issue for this on the code.google.com cyanogenmod site. thenefield posted some changes and I have integrated them into a new script.

smeat said:
I created an issue for this on the code.google.com cyanogenmod site. thenefield posted some changes and I have integrated them into a new script.
Click to expand...
Click to collapse
In your rewrite of the script, you forgot to apply the chown to the subfolders that are different than 'databases' and 'shared_prefs' as well as to the single files in the application-root. Look at my first post in this thread: these cases exist and we have to deal with them. In other words: you reverted my changes.

Related

SET_PERM

Ok so I'm trying to resolve an issue and I was wondering what would be the equivalent shell command for the SET_PERM command found in the update-script when you flash.
ex: set_perm 0 2000 0755 SYSTEM:bin/logcat
medjai said:
Ok so I'm trying to resolve an issue and I was wondering what would be the equivalent shell command for the SET_PERM command found in the update-script when you flash.
ex: set_perm 0 2000 0755 SYSTEM:bin/logcat
Click to expand...
Click to collapse
chmod 0755 /system/bin/logcat
I guess ...
And check the ownership ...
ls -la /system/bin/logcat
-rwxr-xr-x 1 0 2000 9736 Aug 1 2008 /system/bin/logcat
Chmod sets a general permission on the file itself. I want to set a specific permission on it to a certain user ( 0 ) aka root.
medjai said:
Chmod sets a general permission on the file itself. I want to set a specific permission on it to a certain user ( 0 ) aka root.
Click to expand...
Click to collapse
chown 0:2000 /system/bin/logcat
0 => user -> root
2000 => group
if i use that it'll tell me no such user 0
ups ... try ...
chown root /system/bin/logcat
do a "ls -la /system/bin/logcat" before and after that ..

Override system binaries on CM-mod

This is hack for the userinit.sh script that allows to override
system programs with different binaries or just add some new
executable programs to your rom as you can use your ext3 partition
as storage. One more advantage is that your customizations
will be persistent even after a update.
For this to work you have to add this lines to your /system/sd/userinit.sh script:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
After a reboot, you'll find a newly created bin
directory in /system/sd/ linked to /usr/bin.
/usr/bin is the first directory to be searched
in path in CM-mod ROMs so any program dropped
there will be found and executed before others with
same name in the system. So you can simply:
Code:
adb push new_program /usr/bin
adb shell
cd /usr/bin
chmod 755 new_program
chown root.shell new_program
This is experimental stuff and therefore USE IT AT YOUR OWN RISK.
Tested on CM-mod-3.6.7.2 and CM-mod-3.6.8 and works fine for me.
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
followinginsanity said:
So if I were to use this method. I could 'truely' replace the home screen with one of the 3rd party ones. ie aHome or dxTop? As it is now, I've noticed that even setting aHome as default, Home still runs in the background. Using Advanced Task Manager to confirm this btw.
If this is the case, I'll be using this shortly. As I'm tired of just running 3rd party programs in addition to the programs they are suppose to replace.
Its like using windowblinds in windows, instead of just replacing the whole shell. lol
Click to expand...
Click to collapse
This only lets your run cli programs. This is below the dalvik system so it won't help you change the launcher.apk for ahome or dxtop.
Ok I see what your saying now. Misunderstood the exact intent of the changes
Cool trick, thanks. I already had a /system/sd/bin, so I modified it a little to skip creating it and doing the chmod etc on it.
Slight mod to avoid the whole thing if /usr is already there.. .
Code:
if ! [ -d /usr ]
then
mount -o remount,rw /dev/rootfs /;
mkdir /usr;
chown root.root /usr;
chmod 755 /usr;
ln -s /system/sd/bin /usr/bin;
mount -o remount,ro /dev/rootfs /;
fi
This is useful to me as my userinit.sh is the new one from the compcache thread and can be run to get status info on compcache after boot. No need to remount the filesystem and all that when what we need is already there.
I don't think you can skip the creation of /usr as it is lost
after a reboot at least on cm-mod, you can skip the creation
of system/sd/bin if it already exists tough. OTOH running:
Code:
mkdir /usr
chown root.root /usr
chmod 755 /usr
mkdir /system/sd/bin
chown root.shell /system/sd/bin
chmod 755 /system/sd/bin
ln -s /system/sd/bin /usr/bin
will do no harm as mkdir and ln will fail if the targets already exist
and chown and chmod will just ensure that you can run your
programs.To be on the safe side i would suggest:
Code:
mount -o remount,rw /dev/rootfs /
mkdir /usr
chown root.root /usr
chmod 755 /usr
# we should check if /system/sd is mounted
if [ ! -d /system/sd/bin ] ; then
mkdir /system/sd/bin
chown root.root /system/sd/bin
chmod 755 /system/sd/bin
fi
ln -s /system/sd/bin /usr/bin
mount -o remount,ro /dev/rootfs /
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
ttabbal said:
This would be a great place to put a set of the GNU utilities like ls, ln, cp, mv, etc to go along with bash. Busybox is great and all, but there are some advanced options in the GNU versions that aren't available in Busybox. Has anyone compiled them for Android? I might try copying the Debian ones over and see if they work without the rest of the chroot. I'm thinking I'll need at least some of /lib from debian for them to work though.
Click to expand...
Click to collapse
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
farmatito said:
Have you tried a fully configured busybox with desktop options enabled?
Attached just for reference my .config.
Click to expand...
Click to collapse
Nope. Is there a binary available? I don't have a cross compiler set up right now.
Try this, You can create all the symlinks with this command:
Code:
adb push busybox /usr/bin
adb shell
cd /usr/bin
./busybox --install .
For full functionality you should also add /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow. I link them to /system/sd/etc/ to have them rw
Code:
mkdir /system/sd/etc
chmod 644 /system/sd/etc
/system/bin/chown root.root /system/sd/etc
/system/bin/chown root.root /system/sd/etc/passwd
/system/bin/chown root.root /system/sd/etc/group
/system/bin/chown root.root /system/sd/etc/shadow
/system/bin/chown root.root /system/sd/etc/gshadow
/system/bin/chown root.root /system/sd/etc/fstab
chmod 644 /system/sd/etc/passwd
chmod 644 /system/sd/etc/group
chmod 600 /system/sd/etc/shadow
chmod 600 /system/sd/etc/gshadow
ln -s /system/sd/etc/passwd /etc/passwd
ln -s /system/sd/etc/shadow /etc/shadow
ln -s /system/sd/etc/group /etc/group
ln -s /system/sd/etc/gshadow /etc/gshadow
Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Code:
rm /usr/bin/su
You should also:
Code:
passwd root
addgroup -g 65534 nogroup
You can even use ash as your default shell by doing:
Code:
if [ -e /usr/bin/busybox ] ; then
mount --bind /usr/bin/sh /system/bin/sh
fi
# Fix scripts in /system/bin
for i in am ime input monkey pm svc
do
if [ `grep -c "#!/system/bin/sh" /system/bin/$i` -eq 0 ] ; then
echo "#!/system/bin/sh" > /system/bin/$i.tmp
cat /system/bin/$i >> /system/bin/$i.tmp
mv /system/bin/$i.tmp /system/bin/$i
chown root.shell /system/bin/$i
chmod 755 /system/bin/$i
fi
done
Thanks! That worked great.
farmatito said:
Try this, You can create all the symlinks with this command:Remove the su link to busybox for now as it interferes with
the superuser app (otoh you could set a root passwd and
use busybox's su BUT ONLY FROM A SHELL)
Click to expand...
Click to collapse
Hey farmatito - just stumbled onto this thread and am going to follow this but I am unclear on how to remove the su link to busybox? Any direction would be appreciated! Thanks.
Edit: I realize you mean to just rm it from /system/sd/bin - duh. thanks for this thread! I like having the full busybox bin.
cd /usr/bin
rm su
farmatito said:
cd /usr/bin
rm su
Click to expand...
Click to collapse
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
prscott1 said:
Yeah, I figured that out - thanks. I had edited my above post saying such.
another question for you - I was going through your busybox config file - and am wondering which directory you store it in so that it is used when installing busybox?
Click to expand...
Click to collapse
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
What terminal are you using?
I use konsole on linux and everything looks fine.
Cannot say if there is a suitable terminal for windows,
maybe the one that comes with the mingw compiler.
If nothing works you can just:
Code:
cd /usr/bin
rm ls
farmatito said:
Download the source code from www.busybox.net
extract it
cd busybox
cp my_config .config
make oldconfig
make
You need a cross compiler to build it
you can download one at
http://www.codesourcery.com/sgpp/lite/arm/portal/release830
or
http://www.codesourcery.com/sgpp/lite/arm/portal/release827
Click to expand...
Click to collapse
Many thanks!
Oh, sorry, I should have specified that.
This was using adb from my Vista x64 laptop (yeah, sorry, stuck with win32 for using adb so terminal choices rather limited).
So, basically, it was just running "adb[.exe] shell" from a Windows command prompt.
Tried bash under cygwin and even though it has full ansi coloring support, it looks like adb.exe isn't very terminal friendly because extended/escaped ansi still don't translate.
No big deal; I'll remove /usr/bin/ls for now or temporarily alias 'ls' to /system/xbin/bb/ls while I'm in an adb shell.
Wondering what else I could be using via the USB connection to get a shell prompt within my G1... easiest way is to turn on the wifi and telnet/ssh in, I guess?
EDIT: Duh, just started telnetd and forwarded the port using adb and problem solved (using putty to telnet in as described here and it works very nicely).
rub1k said:
Quick stupid question please... tried searching but haven't found much.
After doing the userinit.sh mod shown here and using the new busybox (thanks for that, btw!), I noticed that a lot of the commands (including 'ls' which is now using /usr/bin/ls) show ansi colors in a terminal that supports them (i.e. 'Terminal' or 'Better Terminal' app) which is awesome but 'adb shell' looks mostly horrible with escape sequences instead of colors, like this:
Code:
# cd /system/sd
cd /system/sd
# ls -l
ls -l
drwxrwx--x 2 system system 2048 Aug 19 16:04 ←[1;34mapp←[0m
drwxrwx--x 2 system system 1024 Aug 16 02:12 ←[1;34mapp-private←[0m
drwxr-xr-x 2 root root 4096 Aug 19 20:40 ←[1;34mbin←[0m
drwxrwx--x 2 system system 7168 Aug 19 16:04 ←[1;34mdalvik-cache←[0m
drw-r--r-- 2 root root 1024 Aug 19 20:39 ←[1;34metc←[0m
drwxr-xr-x 2 root root 12288 Jul 10 02:29 ←[1;34mlost+found←[0m
drwxrwxrwx 2 root root 1024 Jul 22 18:15 ←[1;34mmedia←[0m
-rwxr-xr-x 1 root root 331 Aug 19 20:28 ←[1;32muserinit.sh←[0m
Do you guys set your $TERM variable to something that makes the adb terminal more "sane" or is not possible because adb is limited and I should just ssh or telnet in, etc.?
I've tried setting $TERM to various standard things (ansi/vt100/xterm/etc.) but the dumb adb terminal remains.. well.. dumb.
Click to expand...
Click to collapse
If you are on a windows pc, try using cygwin - works great.

[Q] rm: No such file or directory

Hi all,
First post here and of course search is off ATM, so, sorry in advance if it's already been posted.
The problem I'm currently having is via the terminal emulator, from root:
Code:
# rm -rf /datadata/com.skype.raider
rm: /datadata/com.skype.raider/files/<account>/chatsync/21/obj1286: No such file or directory
The whole problem seems related to this Skype problem:
community.skype.com/t5/Android/Please-re-install-skype-PROBLEM/td-p/71138
which has been introduced with the latest release of the app.
Trying to follow the suggestion someone gave on the thread I tried to delete the dir (after uninstalling the app) with the above result.
I've also tried to chmod and chown -R, but nothing has changed.
To me this looks like a dandling reference to the directory content from a bad coded piece of software. But that's just the idea it gave me.
If anyone has an idea on how to recover from this problem, it'll be more than wellcome.
Thanks
PS: /datadata is a yaffs2 fs.
Try /data/data instead of /datadata/ ?
/data/data is a symbolic link to /datadata
ok, quick update on the matter:
tried to touch the file, no errors whatsoever, but now:
Code:
# ls -l /datadata/com.skype.raider/files/<account>/chatsync/21/
-rw-rw-rw- 1 root root 0 Aug 27 15:51 obj1286
-rw-rw-rw- 1 root root 0 Aug 27 15:51 obj1286
#
WTH :-\

Cube U9GT2 / Easypad 970 ROMs --- Jellybean mods

RK2918: Easypix Easypad 970 / Magic Cube U9GT2 >>> ROM and More <<<
4----------------------------------------
Easypad970/CubeU9GT2 Jellybean 1.2
Download new link
new features:
-wallpaper and voice search included
-camera updated to 4.2
known issue:
- no video recording
3----------------------------------------
Easypad970/CubeU9GT2 Jellybean 1.1
new features:
-increasing userdata for app installation from 1 to 2 GB, special thanks to 900supersporter for the help
- supercharged(patched) services. jar for speed improvements
- and the scripts from zeppelinrox supercharger for an extra speed kick(only for user, who likes to play with options, details below)
Special thanks to zeppelinrox for the supercharger from xda
How to use zeppelinrox supercharger script for a extra speed kick:
1.) unpack Download ,copy zeppelinrox supercharger scripts with with the busybox directory to microSD
2.) After installation of the ROM, you can beginn any time to run the supercharger scripts either Testversion 6 or 9.
3.) with Scriptmanager app you can run as superuser(su) on of the two alternative scripts
4.) but first run with scriptmanager as superuser the busybox script busybox_v1.19.4_wraithdu_installer_v14.sh
5.) Then run supercharger script, first time you need not much to decide,
6.) Very important: When the Script is ready, you have to reboot into cwm
7.) wipe cache, dalvik and fix permissions
8.) reboot and ready, you rom will be 100% supercharged
If you run it second time or more, than you have manual to decide, what you want to do, you can try everything, but sometimes the result could be a bit unstable. Then you have to try it again.
ROM Installation:
Here comes the how to install an unpacked ROM, means 5 img files flashing with the RKtool on your tablet. (Standard stock rom is only one img flashed with the RKbatchtool)
1. unzip the 7zip file, inside you find the unpacked rom deeper in the ROM directory and the MoageRktool in \u9gt2 Jellybean ROM 1.0 directory
2. Set your tablet with pressing the volume- and the power button into flash mode
3. Connect your tablet to pc, if your battery was before under 50% better plug the power supply cable too.
4. If you have never flashed a stock rom, you need to install at first the rk29xx device driver for your windows version 32 or 64 bit. You get them here on freaktab with the finless u9gt2 roms, from your tablets homepage or from many other sites in the internet with instructions to install
5. With installed drivers start the MoageRktool, in the bottom line you read 'Found RKandroid Loader Rock Usb', if not go back to step 2.
6. Press Erease IDB, you must wait on the positive message that the job is done
7. Check all boxes except of backup: Loader, Parameter, Misc, Kernel, Boot, Recovery and System have to be checked
8. Then flash the ROM into nand with the Run button
9. Finally you got a done message, hopefully without failure and
10. The ROM starts in the CWM (clockwordmod)
11. Press only power button to reboot
12. First start of the ROM on your tablet will begin, takes about 5 minutes and not more than 10
13. Ready - make your first step into androids world of the Custom ROMs
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hopefully I forgot nothing.
JDfense
2---------------------------------
Easypad970/Cube09GT2 Jellybean 1.0
changedfeatures:
--- finally ext4 system rw possible
--- and changed some apps
special thanks to Oma's Jellybean and moage Jeallybean ROMs and for the help of 900supersport from freaktab
stevemp&JDfense
1----------------------------------------------------------------------
Moage.com had released the first Jellybean for our tablet. It is fast and stable chinese ROM.
We decide to change some things to improve that ROM.
Here comes the first Version as a result of our cooperation:
Moage-ext4-cwm Jellybean 0.9
http://www.mediafire.com/?2btmml3aacppuq2
Features:
---fast rom, better fasten your seatbelts
---ext4
---cwm5.5.04(thanks to http://www.slatedroid.com/topic/3351...or-cube-u9gt2/ )
---built.prop with some tweaks for speed and changed for western europe
---with Google Play, jetaudio basic, ebookdroid, TuneIn radio and the awesome hackers keyboard with english and german Dictionary
---took out most of the chinese apps and not useful things
recommended:
Before flashing take out external sd.
known issues:
---After the first boot you maybe have to format Nand-flash once. After that it works all fine- hopefully.
Now have fun.
stevemp & JDfense
free place
Sent from my RubiX NonSense FINAL using Tapatalk 2
I want a new tablet!
I need to find an rk2918 tablet to try it.
steemp
good luck in the new thread for the fantastic couple.
I'm really interested in contribute
Sent from Master-G M900HC mentally push.
DaremoS said:
good luck in the new thread for the fantastic couple.
I'm really interested in contribute
Sent from Master-G M900HC mentally push.
Click to expand...
Click to collapse
Check in DaremoS. It will be like old times.
First change your master rk2918 kernel into our moage rom and lets see how this jellybean works. After that we are waiting for your tweaks.:highfive:
JDfense:angel:
USB Modem Or Data Card support
I was trying with 3g usb dongle but it is crashing at 'mobile network'..
kavena78 said:
I was trying with 3g usb dongle but it is crashing at 'mobile network'..
Click to expand...
Click to collapse
Sorry, I don't know which 3g stick would work. All I know is, that you should plug it in otg-usb port.
Edit:
I forgot to mention, that I have taken out the phone.apk, because of the extra battery consumption.
Try first the original moage rom, here
http://www.ex.ua/view_storage/121970404347
If your 3g then work, we find a way to add the phone.apk.
JDfense
Could you please tell me the difference between this one and Renegade?
sw6lee said:
Could you please tell me the difference between this one and Renegade?
Click to expand...
Click to collapse
I had no look inside the renegade rom so far, but afaik it is a nice and responsive rom. You have to compare for yourself or is there a special question?
JDfense
i have trouble with youtube, it's always FC.
and some app i move to nand flash, when i reboot, it's not show in home. Can you help me, please....
Sorry my bad English
JDfense said:
I had no look inside the renegade rom so far, but afaik it is a nice and responsive rom. You have to compare for yourself or is there a special question?
JDfense
Click to expand...
Click to collapse
Nope, I was just too lazy to try, because then I have to restore everything, and takes a lot of time..haha
I'll try some time this weekend.
Thanks
ducanh2992 said:
i have trouble with youtube, it's always FC.
and some app i move to nand flash, when i reboot, it's not show in home. Can you help me, please....
Sorry my bad English
Click to expand...
Click to collapse
Sorry ducan, I have no problem with youtube. I suggest, you uninstall youtube and install again.
Pushing apps on sdcard works not with all apps. Some apps don't like it.:angel:
JDfense
JDfense said:
Sorry ducan, I have no problem with youtube. I suggest, you uninstall youtube and install again.
Pushing apps on sdcard works not with all apps. Some apps don't like it.:angel:
JDfense
Click to expand...
Click to collapse
Can you teach me to mod the rom? I want to mod the moage new rom. Thank you so much!
modding rk2918
ducanh2992 said:
Can you teach me to mod the rom? I want to mod the moage new rom. Thank you so much!
Click to expand...
Click to collapse
Ok, you have to work in Linux.
boot.img is a compressed file with a header(8 bytes) and footer(crc)
mkdir boot and copy boot.img to boot directory.
dd if=boot.img of=bootimg.gz skip=8 bs=1 count=30000000
This strips the header off.
gunzip bootimg.gz
This unpacks the bootimg.gz, make your mods now. Delete boot.img and bootimg.gz.
You need to reset dates after mods.
sudo find . -exec touch -d "1970-01-01 01:00" {} \;
Pack files back into newboot.gz.
sudo find . ! -name "."|sort|cpio -oa -H newc|gzip -n >../newboot.gz
Add crc so it will boot.
sudo ./rkcrc -k newboot.gz newboot.img
recovery.img is done the same way.
System image can be an ext3 or ext4. Mount image to modify files.
mkdir tmp and mount system.img to tmp.
sudo mount -t ext4 -o loop system.img tmp
Change to tmp directory and make your mods. Then unmount system.img
sudo umount tmp
This should get you started on modding.
stevemp
Hey guyssss I just ordered Note II !
Felt like letting you know that I bought a phone+tablet(phablet)
Can't wait to get it, sandy kinda slowed down my order... Let's see when I get it.
Very exited and broke hahah
Sent from my myTouch_4G_Slide using Tapatalk 2
ducanh2992 said:
Can you teach me to mod the rom? I want to mod the moage new rom. Thank you so much!
Click to expand...
Click to collapse
I want to add something to steves tutorial start.
If you have no experiences with linux, then you need some time to fight with the right system in linux.
On some days you would like to push your linux system out of the window.:cyclops:
That was my experience, when I try to start with modding in linux. Last time I checked, I have still trouble with working in linux, but it will be day by day more fun.
JDfense
ducanh2992 said:
Can you teach me to mod the rom? I want to mod the moage new rom. Thank you so much!
Click to expand...
Click to collapse
heart_crafter said:
Hey guyssss I just ordered Note II !
Felt like letting you know that I bought a phone+tablet(phablet)
Can't wait to get it, sandy kinda slowed down my order... Let's see when I get it.
Very exited and broke hahah
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
Our original testpilot seems to talk in riddles again. Could someone call the doctor?:angel:
JDfense
heart_crafter said:
Hey guyssss I just ordered Note II !
Felt like letting you know that I bought a phone+tablet(phablet)
Can't wait to get it, sandy kinda slowed down my order... Let's see when I get it.
Very exited and broke hahah
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
Nice, enjoy your new phablet. :highfive:
stevemp
init.rc
Explanation of init.rc in boot.img and recovery.img
Android Init Language
The Android Init Language consists of four broad classes of statements:
Actionn
Commands
Services
Options
The language syntax includes the following conventions:
All classes are line-oriented and consist of tokens separated by whitespace. c-style backslash escapes may be used to insert whitespace into a token. Double quotes may also be used to prevent whitespace from breaking text into multiple tokens. A backslash
appearing as the last character on a line is used for line-folding.
Lines that start with a # (leading whitespace allowed) are comments.
Actions and Services implicitly declare new sections. All commands or options belong to the section most recently declared. Commands or options before the first section are ignored.
Actions and Services have unique names. If a second Action or Service is declared with the same name as an existing one, it is ignored as an error.
Actions
Actions are named sequences of commands. Actions have a trigger used to determine when the action should occur. When an event occurs which matches an action's trigger, that action is added to the tail of a to-be-executed queue (unless it is already on the queue).
Each action in the queue is dequeued in sequence. Each command in an action is executed in sequence. Init handles other activities (such as, device creation/destruction, property setting, process restarting) "between" the execution of the commands in activities.
Actions take the form of:
on <trigger>
<command>
<command>
<command>
Services
Services are programs that init launches and (optionally) restarts when they exit.
Services take the form of:
service <name> <pathname> [ <argument> ]*
<option>
<option>
...
Options
Options are modifiers to services that affect how and when init runs a service. Options are described in the table below:
Option Description
disabled This service will not automatically start with its class. It must be explicitly started by name.
socket <type> <name> <perm> [ <user> [ <group> ] ] Create a unix domain socket named /dev/socket/<name> and pass its fd to the launched process. Valid <type> values include dgram and stream. user and group default to 0.
user <username> Change to username before exec'ing this service. Currently defaults to root.
group <groupname> [ <groupname> ]* Change to groupname before exec'ing this service. Additional groupnames beyond the first, which is required, are used to set additional groups of the process (with setgroups()). Currently defaults to root.
capability [ <capability> ]+ Set linux capability before exec'ing this service
oneshot Do not restart the service when it exits.
class <name> Specify a class name for the service. All services in a named class must start and stop together. A service is considered of class "default" if one is not specified via the class option.
Triggers
Triggers are strings used to match certain kinds of events that cause an action to occur.
Trigger Description
boot This is the first trigger that occurs when init starts (after /init.conf is loaded).
<name>=<value> Triggers of this form occur when the property <name> is set to the specific value <value>.
device-added-<path>
device-removed-<path> Triggers of these forms occur when a device node is added or removed.
service-exited-<name> Triggers of this form occur when the specified service exits.
Commands
Command Description
exec <path> [ <argument> ]* Fork and execute a program (<path>). This will block until the program completes execution. Try to avoid exec. Unlike the builtin commands, it runs the risk of getting init "stuck".
export <name> <value> Set the environment variable <name> equal to <value> in the global environment (which will be inherited by all processes started after this command is executed).
ifup <interface> Bring the network interface <interface> online.
import <filename> Parse an init config file, extending the current configuration.
hostname <name> Set the host name.
class_start <serviceclass> Start all services of the specified class if they are not already running.
class_stop <serviceclass> Stop all services of the specified class if they are currently running.
domainname <name> Set the domain name.
insmod <path> Install the module at <path>.
mkdir <path> Make a directory at <path>.
mount <type> <device> <dir> [ <mountoption> ]* Attempt to mount the named device at the directory <dir> <device>. This may be of the form [email protected] to specify a mtd block device by name.
setkey - currenlty undefined -
setprop <name> <value> Set system property <name> to <value>.
setrlimit <resource> <cur> <max> Set the rlimit for a resource.
start <service> Start a service running if it is not already running.
stop <service> Stop a service from running if it is currently running.
symlink <target> <path> Create a symbolic link at <path> with the value <target>.
write <path> <string> [ <string> ]* Open the file at <path> and write one or more strings to it with write(2).
Properties
Init updates some system properties to provide some insight into
what it's doing:
Property Description
init.action Equal to the name of the action currently being executed or "" if none.
init.command Equal to the command being executed or "" if none.
init.svc.<name> State of a named service ("stopped", "running", or "restarting").
---------- Post added at 12:12 PM ---------- Previous post was at 12:08 PM ----------
JDfense_Moage_ext4_CWM boot.img init.rc
Code:
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
import /init.${ro.hardware}.rc
import /init.trace.rc
on early-init
# Set init and its forked children's oom_adj.
write /proc/1/oom_adj -16
start ueventd
# create mountpoints
mkdir /mnt 0775 root system
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# create mountpoints
mkdir /mnt/sdcard 0000 system system
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /config 0500 root root
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/kernel/kptr_restrict 2
write /proc/sys/kernel/dmesg_restrict 1
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0660 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
write /dev/cpuctl/cpu.rt_runtime_us 950000
write /dev/cpuctl/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/apps
chown system system /dev/cpuctl/apps/tasks
chmod 0666 /dev/cpuctl/apps/tasks
write /dev/cpuctl/apps/cpu.shares 1024
write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
write /dev/cpuctl/apps/cpu.rt_period_us 1000000
mkdir /dev/cpuctl/apps/bg_non_interactive
chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
chmod 0666 /dev/cpuctl/apps/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
# This is needed by any process that uses socket tagging.
chmod 0644 /dev/xt_qtaguid
on fs
insmod /rk29xxnand_ko.ko
# mount mtd partitions
mount ext4 [email protected] /system ro noatime nodiratime
mount ext4 [email protected] /data noatime nodiratime nosuid nodev
mount ext4 [email protected] /cache noatime nodiratime nosuid nodev
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# We chown/chmod /cache again so because mount is run as root + defaults
chown system cache /cache
chmod 0770 /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create the lost+found directories, so as to enforce our permissions
mkdir /cache/lost+found 0770 root root
on post-fs-data
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/keychain 0771 system system
mkdir /data/misc/vpn 0770 system vpn
mkdir /data/misc/systemkeys 0700 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0751 root root
# For security reasons, /data/local/tmp should always be empty.
# Do not place files or directories in /data/local/tmp
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app-asec 0700 root root
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
mkdir /data/ssh 0750 root shell
mkdir /data/ssh/empty 0700 root root
# create dalvik-cache, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
# create resource-cache and double-check the perms
mkdir /data/resource-cache 0771 system system
chown system system /data/resource-cache
chmod 0771 /data/resource-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770 root root
# create directory for DRM plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/drm 0770 drm drm
# If there is no fs-post-data action in the init.<device>.rc file, you
# must uncomment this line, otherwise encrypted filesystems
# won't work.
# Set indication (checked by vold) that we have finished this action
#setprop vold.post_fs_data_done 1
chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file
chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file
chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
chmod 0777 /sys/module/gt801_ts/parameters/debug1
chmod 0777 /sys/module/ft5306_ts/parameters/debug1
chmod 0777 /sys/module/ct360_ts/parameters/debug1
chmod 0777 /sys/module/goodix_touch_82x/parameters/debug1
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
setprop UserVolumeLabel "U9GT2"
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
chown root system /sys/module/lowmemorykiller/parameters/adj
chmod 0664 /sys/module/lowmemorykiller/parameters/adj
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/power/state
chown system system /sys/power/wakeup_count
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
# Assume SMP uses shared cpufreq policy for all CPUs
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,262144,4096,16384,262144
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0
class_start core
class_start main
on nonencrypted
class_start late_start
on charger
class_start charger
on property:vold.decrypt=trigger_reset_main
class_reset main
on property:vold.decrypt=trigger_load_persist_props
load_persist_props
on property:vold.decrypt=trigger_post_fs_data
trigger post-fs-data
on property:vold.decrypt=trigger_restart_min_framework
class_start main
on property:vold.decrypt=trigger_restart_framework
class_start main
class_start late_start
on property:vold.decrypt=trigger_shutdown_framework
class_reset late_start
class_reset main
# Used to disable USB when switching states
on property:sys.usb.config=none
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/bDeviceClass 0
setprop sys.usb.state ${sys.usb.config}
# adb only USB configuration
# This should only be used during device bringup
# and as a fallback if the USB manager fails to set a standard configuration
on property:sys.usb.config=adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0bb4
write /sys/class/android_usb/android0/idProduct 0c01
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
# USB accessory configuration
on property:sys.usb.config=accessory
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 2d00
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# USB accessory configuration, with adb
on property:sys.usb.config=accessory,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 2d01
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
# Used to set USB configuration at boot and to switch the configuration
# when changing the default configuration
on property:persist.sys.usb.config=*
setprop sys.usb.config ${persist.sys.usb.config}
## Daemon processes to be run by init.
##
#enable init.d
service sysinit /system/bin/sysinit
class core
oneshot
service ueventd /sbin/ueventd
class core
critical
service console /system/bin/sh
class core
console
disabled
user shell
group log
on property:ro.debuggable=1
start console
# adbd is controlled via property triggers in init.<platform>.usb.rc
service adbd /sbin/adbd
class core
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
# This property trigger has added to imitiate the previous behavior of "adb root".
# The adb gadget driver used to reset the USB bus when the adbd daemon exited,
# and the host side adb relied on this behavior to force it to reconnect with the
# new adbd instance after init relaunches it. So now we force the USB bus to reset
# here when adbd sets the service.adb.root property to 1. We also restart adbd here
# rather than waiting for init to notice its death and restarting it so the timing
# of USB resetting and adb restarting more closely matches the previous behavior.
on property:service.adb.root=1
write /sys/class/android_usb/android0/enable 0
restart adbd
write /sys/class/android_usb/android0/enable 1
service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
onrestart restart zygote
onrestart restart media
onrestart restart surfaceflinger
onrestart restart drm
service vold /system/bin/vold
class core
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
class main
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
socket mdns stream 0660 root system
service debuggerd /system/bin/debuggerd
class main
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log
service surfaceflinger /system/bin/surfaceflinger
class main
user system
group graphics
onrestart restart zygote
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
class main
socket zygote stream 660 root system
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
service drm /system/bin/drmserver
class main
user drm
group drm system inet drmrpc sdcard_r
service media /system/bin/mediaserver
class main
user media
group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc
ioprio rt 4
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
class main
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
class main
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service installd /system/bin/installd
class main
socket installd stream 600 system system
service flash_recovery /system/etc/install-recovery.sh
class main
oneshot
service racoon /system/bin/racoon
class main
socket racoon stream 600 system system
# IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
class main
socket mtpd stream 600 system system
user vpn
group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
class main
user keystore
group keystore drmrpc
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
class main
socket dumpstate stream 0660 shell log
disabled
oneshot
service sshd /system/bin/start-ssh
class main
disabled
service mdnsd /system/bin/mdnsd
class main
user mdnsr
group inet net_raw
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
service whtest /system/bin/whtest.sh
disabled
oneshot
Mount system.img to modify
mkdir tmp
mount -t ext4 system.img tmp
apps are in /system/app -> add or remove apps here
boot animation is /system/media bootanimation.zip can be changed to whatever you want.
After you finish unmount system.img and flash to your tablet.
umount tmp
Any questions about modding, feel free to ask!
stevemp

Weirdest problem on my gear s2

I have model sm-732 purchased in US and i am the least bit close to a developer.
Went to sell it today because it had been sitting in a drawer and thought that somebody should have it. I only wore it a few times and then it became of no use to me after i was involved in a robbery wearing it.
It worked after that, dont get me wrong, but i decided to not wear it and but it in a drawer were it has been ever since. I did take it out once to reset it via the software which was successfull. I then placed it in the drawer again and forgot about it. Until i remembered i could sell it. Took it out and charged it up and went to sell it. Turned it on when i got to the buyer and it wouldnt work saying it had failed to start and if it persisted to take it to samsung. I am way out if warrenty to they wont do anything for me. I watched a video on bootlooping and i went to the reset screen where download mode is, and just tried to restore. It came back in russian. All russian.
So i went to the internet. People namely said flash it so i got ap, bl, and csc pack for it and flashed it wirelessly with a passing rating from odin.
I have done this twice now and it will say installing new configuration... (which was displayed in russian but now is displayed in english) after that the gear s2 logo will flash and then the samsung logo and then poof it just shuts down and goes back to russian!
Goodlord help me. I am an idiot.
Same here! If I flash Combinations-FTMA it work (but limited) , after flashing full firmware ... Failed.If the Same here! If I flash Combinations-FTMA it work (but limited) , after flashing full firmware ... Failed.If the problem persists, visit a customer service centre.
@Karmaus
Sorry. Less time...
1.
I can see Warranty Void blabla... so something with Knox happens in Photo 1...
2.
No idea what exact fail...
I can remember during my experiments 1 time I have killed BT address in CSA area...
So first boot ends with Error as no connection possible with Phone...
It was very hard for me to restore BT... but it is not impossible... :angel:
2.1
Maybe check BT AND WiFi connection in FTMA Combination Firmware...
2.2
You could also try to catch Log Files...
Code:
*#9900#
Best Regards
Edit 1.
Forgotten...
SM-R732 have 2 Regions... OXA AND OXX...
Maybe this is the reason... if CSC is not inside Firmware package...
@adfree
adfree said:
@Karmaus
Sorry. Less time...
1.
I can see Warranty Void blabla... so something with Knox happens in Photo 1...
2.
No idea what exact fail...
I can remember during my experiments 1 time I have killed BT address in CSA area...
So first boot ends with Error as no connection possible with Phone...
It was very hard for me to restore BT... but it is not impossible... :angel:
2.1
Maybe check BT AND WiFi connection in FTMA Combination Firmware...
2.2
You could also try to catch Log Files...
Code:
*#9900#
Best Regards
Edit 1.
Forgotten...
SM-R732 have 2 Regions... OXA AND OXX...
Maybe this is the reason... if CSC is not inside Firmware package...
Click to expand...
Click to collapse
1. i've try to write both ftma & full firmware , same result
2. indeed bt is killed ...
Edit1. Thanks for regions!
So can you remember how to restore bt ?
My Edit 1 : I've added my dump log ...
@Karmaus
Limited time... and long time ago...
But if I remember correct.
You can use easy Shell script *.sh inside Combination Firmware...
Write me PM... and I will try to search in my Computers... how I solved lost BT...
Best Regards
Code:
#!/bin/sh
#
# Script for setting Bluetooth Address
#
#if [ -e /opt/etc/.bd_addr ]
#then
# echo "Already .bd_addr exists"
# exit 0
#fi
/usr/bin/setbd
echo "Set BT address successes"
bt-set-addr.sh
@Karmaus
Something like this I did to restore BT...
This Shell Script is inside Combination Firmware...
All my attempts to restore my own CSA dump failed... Seems higher secured...
But with this easy Script it was easy...
Best Regards
adfree said:
Code:
#!/bin/sh
#
# Script for setting Bluetooth Address
#
#if [ -e /opt/etc/.bd_addr ]
#then
# echo "Already .bd_addr exists"
# exit 0
#fi
/usr/bin/setbd
echo "Set BT address successes"
bt-set-addr.sh
@Karmaus
Something like this I did to restore BT...
This Shell Script is inside Combination Firmware...
All my attempts to restore my own CSA dump failed... Seems higher secured...
But with this easy Script it was easy...
Best Regards
Click to expand...
Click to collapse
Thanks so much ... i Will try right now and come with a reply in few minutes!
About BT address...
Example to check if file is absent...
Code:
sh-3.2$ cd csa
sh-3.2$ ls
bluetooth csc factory lost+found prov prov_data sensor
sh-3.2$ cd bluetooth
sh-3.2$ ls
sh-3.2$ ls -a -1 -l
total 6
drwxr-xr-x 2 root root 1024 Sep 4 2015 .
drwxr-xr-x 9 root root 1024 Jan 1 2015 ..
-rw-r--r-- 1 root root 14 Sep 4 2015 .bd_addr
sh-3.2$ cat .bd_addr
0002
fc
68f142sh-3.2$
Here is all okay... BT address is not gone/erased...
BUT IMHO this requires ROOT... Combination Firmware...
Best Regards
adfree said:
About BT address...
Example to check if file is absent...
Code:
sh-3.2$ cd csa
sh-3.2$ ls
bluetooth csc factory lost+found prov prov_data sensor
sh-3.2$ cd bluetooth
sh-3.2$ ls
sh-3.2$ ls -a -1 -l
total 6
drwxr-xr-x 2 root root 1024 Sep 4 2015 .
drwxr-xr-x 9 root root 1024 Jan 1 2015 ..
-rw-r--r-- 1 root root 14 Sep 4 2015 .bd_addr
sh-3.2$ cat .bd_addr
0002
fc
68f142sh-3.2$
Here is all okay... BT address is not gone/erased...
BUT IMHO this requires ROOT... Combination Firmware...
Best Regards
Click to expand...
Click to collapse
In my similar case, I haven't seen anything
Code:
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell
sh-3.2# ls
bin csa etc initrd lost+found mnt proc run sdcard srv tmp var
boot dev home lib media opt root sbin smack sys usr
sh-3.2# cd csa
sh-3.2# ls -l
total 0
sh-3.2#
My post: https://forum.xda-developers.com/smartwatch/gear-s2/gear-s2-rm-720-loop-t3977853
Edit:
I tried to run /usr/bin/setbd but I can't.
Bluetooth Address Setting
mkdir: Read-only file system (30) File not exist
Can't open address file
Code:
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /usr/bin/
chmod: changing permissions of `/usr/bin/': Read-only file system
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb root on
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /usr/bin/
chmod: changing permissions of `/usr/bin/': Read-only file system
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb root off
Switched to 'developer' account mode
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /usr/bin/
chmod: changing permissions of `/usr/bin/': Read-only file system
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell /usr/bin/setbd
-l: /usr/bin/setbd: Permission denied
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell cp /usr/bin/setbd /opt/usr/media/
cp: cannot stat `/usr/bin/setbd': Permission denied
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb root on
Switched to 'root' account mode
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell cp /usr/bin/setbd /opt/usr/media/
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell ls -l /opt/usr/media/
total 24
drwxrwxrwx 2 app app 4096 Oct 6 2015 Downloads
drwxrwxrwx 2 app app 4096 Oct 6 2015 Images
drwxrwxrwx 2 app app 4096 Oct 6 2015 Music
drwxrwxrwx 3 app app 4096 Oct 6 2015 Sounds
-rwxr-xr-x 1 root root 6004 Jan 5 11:51 setbd
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell chmod 777 /opt/usr/media/setbd
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell ls -l /opt/usr/media/
total 24
drwxrwxrwx 2 app app 4096 Oct 6 2015 Downloads
drwxrwxrwx 2 app app 4096 Oct 6 2015 Images
drwxrwxrwx 2 app app 4096 Oct 6 2015 Music
drwxrwxrwx 3 app app 4096 Oct 6 2015 Sounds
-rwxrwxrwx 1 root root 6004 Jan 5 11:51 setbd
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>adb shell /opt/usr/media/setbd
Bluetooth Address Setting
mkdir: Read-only file system(30)File not exist
Can't open address file
C:\Users\msdda\Desktop\WiFi_Odin V1.0\GearFit2>
@danicifu01
Is sooooooooo looooooooong ago....
Code:
mount -o remount,rw /
Try this Command before in:
Code:
sdb shell
Best Regards
adfree said:
@danicifu01
Is sooooooooo looooooooong ago....
Code:
mount -o remount,rw /
Try this Command before in:
Code:
sdb shell
Best Regards
Click to expand...
Click to collapse
thanks but:
Code:
sh-3.2# ls -l
total 44
drwxr-xr-x 3 root root 4096 Oct 6 2015 abuild
drwxr-xr-x 10 app app 4096 Jan 6 09:57 app
-rwxrwxrwx 1 root root 136 Jan 10 18:14 bt.sh
drwxr-xr-x 2 developer developer 4096 Oct 6 2015 developer
drwxr-xr-x 4 root root 4096 Jan 5 13:49 root
drwxr-xr-x 5 system system 4096 Jan 5 11:10 system
sh-3.2# sh bt.sh
bt.sh: line 1: cript: command not found
Bluetooth Address Setting
mkdir: Permission denied(13)File not exist
Can't open address file
bt.sh is the script
i try run the script but the file not exit. why?

Categories

Resources