Check this out guys perfect build.prop tweaks which is aligned properly and with auto permission scripts.
Build.prop is sample u can follow the same method which i currently using...
The script function say example when you copy paste or push apk files into system/app or system/framework it will auto set permission for you according like other apk perm...
The script need to be place in system/etc/init.d but for this you must give a permission to followup later just simply move your framework without give permission and restart see it will boot perfectly without any bootloop.
Give a try and please forgive if i wrote anything wrong
VillainZ said:
Check this out guys perfect build.prop tweaks which is aligned properly and with auto permission scripts.
Build.prop is sample u can follow the same method which i currently using...
The script function say example when you copy paste or push apk files into system/app or system/framework it will auto set permission for you according like other apk perm...
The script need to be place in system/etc/init.d but for this you must give a permission to followup later just simply move your framework without give permission and restart see it will boot perfectly without any bootloop.
Give a try and please forgive if i wrote anything wrong
Click to expand...
Click to collapse
Mind to share what tweeks are included in those file?
luiphilip said:
Mind to share what tweeks are included in those file?
Click to expand...
Click to collapse
In the 57zVillainz one i found these, for anyone else who's curious
logFile=/data/logs/perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
mount -o rw,remount /dev/block/stl9 /system
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo " setting permissions (644) for $file" >> $logFile
chmod 644 $file
done
echo "chmodding init.d folder"
chmod 755 /system/etc/init.d
for file in /system/etc/init.d/*; do
echo " setting permissions (755) for $file" >> $logFile
chmod 755 $file
done
echo "Permissions set" >> $logFile
RohinZaraki said:
In the 57zVillainz one i found these, for anyone else who's curious
logFile=/data/logs/perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
mount -o rw,remount /dev/block/stl9 /system
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo " setting permissions (644) for $file" >> $logFile
chmod 644 $file
done
echo "chmodding init.d folder"
chmod 755 /system/etc/init.d
for file in /system/etc/init.d/*; do
echo " setting permissions (755) for $file" >> $logFile
chmod 755 $file
done
echo "Permissions set" >> $logFile
Click to expand...
Click to collapse
So in other words it just sets permissions for certain files in /system and /data every boot?
Sent from my E15i using Tapatalk 2
SpyderX said:
So in other words it just sets permissions for certain files in /system and /data every boot?
Sent from my E15i using Tapatalk 2
Click to expand...
Click to collapse
What is the general effect/outcome if I run this script?
Sent from my WT19i using XDA
SpyderX said:
So in other words it just sets permissions for certain files in /system and /data every boot?
Sent from my E15i using Tapatalk 2
Click to expand...
Click to collapse
Looks like it
Sent from my E15i using Tapatalk
luiphilip said:
What is the general effect/outcome if I run this script?
Sent from my WT19i using XDA
Click to expand...
Click to collapse
Say if you replace certain files in/system to apply a fix or a tweak, and you forgot to change permissions, this will automatically fix it such that you will not get a boot loop.
Sent from my E15i using Tapatalk 2
SpyderX said:
Say if you replace certain files in/system to apply a fix or a tweak, and you forgot to change permissions, this will automatically fix it such that you will not get a boot loop.
Sent from my E15i using Tapatalk 2
Click to expand...
Click to collapse
Thanks for the brief explanation, im new on android and this script mods is somehow not implemented by default. Again, thanks bro.
Sent from my WT19i using XDA
Related
I have been resisting the urge to flash a custom ROM for a bit, but I really miss having init.d support. So I read a few threads for other phones and rolled my own.
Warnings
I borrowed bits and pieces from various places. If you don't know what init.d is, you probably don't want to do this. If you aren't willing to take responsibility for bricking your tablet, don't do this. Seriously, the risk of bricking is very low, but if you aren't comfortable booting into an adb shell from recovery, maybe this is not for you. Strongly suggest a nandroid backup before you get started so if you totally bork things you can just hit rewind.
Note: The latest CWM may prompt you on a reboot that the ROM may overwrite the bootloader and offer to fix it for you. Don't do that. The init.d hack takes over the bootloader install script, but does not change your bootloader! If you accidentally do let it fix things for you, just rebuild the install-bootloader.sh file. The other steps should be fine.
Prerequisites
First, you need root, busybox, and some sort of terminal (either adb, or some terminal you like using on the tablet).
I have found that I like Busybox Installer (from the market; https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer) but for some reason it doesn't create new symlinks unless you click advanced install.
Let's get to it!
In the shell (don't type # or anything after #):
Code:
su # get root
mount -o remount,rw /system # get access to /system (4.04 seems to mount ro as is usual; seems like the original mounted rw)
which run-parts # if you don't see /system/xbin/run-parts you need to install/reinstall busybox; if it is somewhere else, note it
mkdir /system/etc/init.d
Create a file called sysinit -- we are going to put it in /system/bin. You can edit it in place with vi, mount your tablet and edit it on your computer, or create it on the computer and push it via adb. Whatever.
Here's the file (you do need the # and the things after it in the file!):
Code:
#!/system/bin/sh
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d
Note that if your run-parts is not in /system/xbin (from the which command) then fix the above to reflect your reality.
In the shell, make it executable
Code:
chmod 755 /system/bin/sysinit
Now go in the init.d directory and create some things you want to run at start up. For example:
Code:
cd /system/etc/init.d
echo '#!/system/bin/sh' >99test # note: you do need the first # in this line but not the 2nd!
echo 'date >>/data/tmp/init.d-log.txt' >>99test
chmod 755 99test
Here's a more practical one (yes, you need the # signs). Name it something like 10diskperf -- don't forget to chmod it.
Code:
#!/system/bin/sh
# Set disk read aheads to 1024
chmod 777 /sys/block/mmcblk0/queue/read_ahead_kb
echo "1024" > /sys/block/mmcblk0/queue/read_ahead_kb
chmod 777 /sys/block/mmcblk1/queue/read_ahead_kb
echo "1024" > /sys/block/mmcblk1/queue/read_ahead_kb
chmod 777 /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo "1024" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Or here is one to tweak some TCP parameters (25sysctl):
Code:
#!/system/bin/sh
sysctl -w net.core.rmem_max=524288
sysctl -w net.core.wmem_max=524288
sysctl -w net.ipv4.tcp_rmem=6144 87380 524288
sysctl -w net.ipv4.tcp_wmem=6144 87380 524288
Whatever files you put in, you need to remember to make them executable (chmod 755).
Finally, you need to kick it all off at start up. The hack for that is we are going to create /system/etc/install-recovery.sh which apparently runs on each boot.
Code:
cd /system/etc
echo '#!/system/bin/sh' >install-recovery.sh
echo '/system/bin/sysinit' >>install-recovery.sh
chmod 755 install-recovery.sh
Tips and troubleshooting
If you are too lazy to cut and paste I have the files here (View attachment init.d-support.zip) that you can just move to the right places and change permission. If you are really lazy there is lightly tested install script below.
I like to try running the whole thing before a reboot to see if I get any errors:
Code:
/system/etc/install-recovery.sh
I'd suggest putting the 99test file in first. Verify that you get the expected file in /data/tmp and then reboot and check again. Then you can remove 99test.
Same goes for adding new scripts. Try running them from the shell to see if they throw errors before you reboot!
If you have trouble, see if this looks right:
Code:
ls -ld /system/etc/install-recovery.sh /system/bin/sysinit /system/etc/init.d /system/xbin/run-parts
-rwxr-xr-x root root 39 2012-07-14 10:00 install-recovery.sh
-rwxr-xr-x root root 140 2012-07-14 10:01 sysinit
drwxrwxrwx root root 2012-07-14 10:10 init.d
lrwxrwxrwx root root 2012-07-14 09:55 run-parts -> /system/xbin/busybox
For the brave
The install-init.d zip file (View attachment install-init.d.zip) contains a lightly tested script that SHOULD do the install steps for you.
Send the file to your android to someplace that can execute code (e.g., /system/xbin; I had to use adb to put it on the sdcard and then move it to /systemxbin in the shell since I don't have the adb root kernel installed).
Code:
cd /system/xbin # or wherever you have it
chmod 755 install-init.d
./install-init.d
It performs rude checks to see if init.d exists, and tries to handle moving or missing busybox. It only installs 99test as a script.
Let me know if this works or doesn't work for you.
For the extra brave: There is no reason this should only work on the Samsung. This ought to work on pretty much most stock ROMs as long as they execute install-recovery.sh on start up.
Scripts
What do you put in your init.d? If you post anything cool I'll put it up here in the op.
One that gave me some real gains in I/O performance required a new version of the tune2fs executable. By default, it is part of busybox but the busybox one only has a few simple options. I've included a stand alone version and the script 10disktune here View attachment disktune.zip. Unpack the zip and put the 10disktune in /system/etc/init.d (don't forget to chmod) and put tune2fs in /system/bin (chmod that too). Note that busybox has one in /system/xbin but the script specifically calls out the one in /system/bin.
Here's one that will zipalign your apks on each boot
Code:
#!/system/bin/sh
for apk in /data/app/*.apk ; do
zipalign -c 4 $apk
ZCHECK=$?
if [ $ZCHECK -eq 1 ]; then
zipalign -f 4 $apk /cache/$(basename $apk)
if [ -e /cache/$(basename $apk) ]; then
cp -p -f /cache/$(basename $apk) $apk
rm /cache/$(basename $apk)
fi;
fi;
done;
Fin
Corrections welcome. I considered using exec or . to load some of this into one shell but given that it runs once at startup, I figured it is fine as is.
All files for reference
View attachment init.d-support.zip
View attachment install-init.d.zip
View attachment disktune.zip
Great guide, gonna try it tonight.
Sent from a GNote, hell yeah!
SirRhor said:
Great guide, gonna try it tonight.
Sent from a GNote, hell yeah!
Click to expand...
Click to collapse
I'm curious how it went. If you ran into any issues, let me know so I can update the op. Thanks!
Hmm did anyone get this to work?
wd5gnr said:
Hmm did anyone get this to work?
Click to expand...
Click to collapse
I did it on my Galaxy Nexus.
It works great, I had a bit of problem with the sysinit file, but when I downloaded your zip file and used your sysinit, it worked, so it must be a problem from my side
Thanks for this, I can finally use "Odex Me"
aavan said:
I did it on my Galaxy Nexus.
It works great, I had a bit of problem with the sysinit file, but when I downloaded your zip file and used your sysinit, it worked, so it must be a problem from my side
Thanks for this, I can finally use "Odex Me"
Click to expand...
Click to collapse
Great, just wanted to be sure I hadn't made any typos/errors in the guide.
A lot of init.d files collected here: http://forum.xda-developers.com/showthread.php?t=1227269
Also build.prop things, etc.
Thanks, I use your guide and worksperfect for my RK3066 devices. Very simple to understand all steps and what we are doing to our system, perfect for me. Thanks again dude
Melch1zedeK said:
Thanks, I use your guide and worksperfect for my RK3066 devices. Very simple to understand all steps and what we are doing to our system, perfect for me. Thanks again dude
Click to expand...
Click to collapse
Glad to help!
What is thhe utility of this?
moliverac8 said:
What is thhe utility of this?
Click to expand...
Click to collapse
Init.d is how Linux and many Android (which is kind of Linux, after all) systems manage executing commands on boot up.
The /etc/init.d files run in numerical order as root and you can do things like change system settings, manipulate the file system, etc.
See the init.d section linked below for some ideas.
http://forum.xda-developers.com/showthread.php?t=1227269
Question? what is the difference in this method and running a script?
wd5gnr said:
Init.d is how Linux and many Android (which is kind of Linux, after all) systems manage executing commands on boot up.
The /etc/init.d files run in numerical order as root and you can do things like change system settings, manipulate the file system, etc.
See the init.d section linked below for some ideas.
http://forum.xda-developers.com/showthread.php?t=1227269
Click to expand...
Click to collapse
I use the "swap memory script" and was wondering if it would also work this way with the init.d If so would there be any benefit this way over the current way of running it one way or the other? One drawback I see running the script as is is that I have to wait once the system has fully booted until the script has run and I see the Smanager screen to let me know that my memory has been remounted.
Thanks for the info and the learning process.
Here is the script and the link.
http://forum.xda-developers.com/showthread.php?t=1961097
Code:
sleep 5
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
sleep 5
mount -o bind /data/media /mnt/extSdCard
As long as the device is ready to mount at boot time and doesn't get remounted, ought to work. Backup and try it
External memory wasn't ready
wd5gnr said:
As long as the device is ready to mount at boot time and doesn't get remounted, ought to work. Backup and try it
Click to expand...
Click to collapse
Thanks for the guide, but I think that the external memory was not ready to be mounted at that time. it didn't see the card till after boot. It was worth a shot, Reverted back to the script in /data and all worked again,
Note: I didn't find /system/xbin/run-parts however, I did find /system/bin/run-parts and changed the path to reflect that, I don't think this was an issue but I'm not 100% sure.
So now that there's 3 premium super user apps I figured I'd ask what's the proper way to uninstall and install a new one if I wanted to I also figured this would help noobs. The way I would do it is go into file explorer mount my system to R/O and delete the system in system app . then I would flash a new super user through recovery or adb. Now in not sure if anything would be lingering around that would come in conflict with a new SU so hopefully someone can help answer this. Thanks
Sent from my Nexus 4 using Tapatalk 2
Surely the new ZIP package removes/replaces the old one with the new package (assuming they are the same name, of course)?
EddyOS said:
Surely the new ZIP package removes/replaces the old one with the new package (assuming they are the same name, of course)?
Click to expand...
Click to collapse
Well I guess what I mean is going from SuperSu to clockworkmod su
Sent from my Nexus 4 using Tapatalk 2
The ZIP package remove any old versions before flashing the new one so you just flash the package in CWM/TWRP and you should be good to go...
Code:
#!/sbin/sh
# arg 1 is recovery api version, generally 3.
# arg 2 is the pipe fd, to the recovery binary.
# communicate with it using the recovery api.
# arg 3 is the zip file
echo -n -e 'ui_print Installing Superuser...\n' > /proc/self/fd/$2
echo -n -e 'ui_print\n' > /proc/self/fd/$2
cd /tmp
mkdir superuser
cd superuser
unzip -o $3
X86=$(uname -a | grep x86)
if [ ! -z "$X86" ]
then
PLATFORM=x86
else
PLATFORM=armeabi
fi
echo -n -e 'ui_print Installing '$PLATFORM' binaries...\n' > /proc/self/fd/$2
echo -n -e 'ui_print\n' > /proc/self/fd/$2
mount /system
rm -f /system/bin/su
rm -f /system/xbin/su
rm -f /system/app/Superuser.apk
cp $PLATFORM/su /system/bin/su
chown 0:0 /system/bin/su
chmod 6755 /system/bin/su
ln -sf ../bin/su /system/xbin/su
cp Superuser.apk /system/app
umount /system
hi,
By mistake I flash a i9500 recovery on a 9505 and it installed (see picture) and erased my EFS.
I flash a stock with spit, then replaced the EFS (which I had saved on the PC), but each reboot EFS disappears! and the image returns.
Each solution??? I do not know what to do
Alan-B said:
hi,
By mistake I flash a i9500 recovery on a 9505 and it installed (see picture) and erased my EFS.
I flash a stock with spit, then replaced the EFS (which I had saved on the PC), but each reboot EFS disappears! and the image returns.
Each solution??? I do not know what to do
Click to expand...
Click to collapse
you must be rooted, type the following commands in terminal emulator:
Code:
su
rm /efs/FactoryApp/keystr
rm /efs/FactoryApp/factorymode
echo -n ON >> /efs/FactoryApp/keystr
echo -n ON >> /efs/FactoryApp/factorymode
chown 1000.1000 /efs/FactoryApp/keystr
chown 1000.1000 /efs/FactoryApp/factorymode
chmod 0744 /efs/FactoryApp/keystr
chmod 0744 /efs/FactoryApp/factorymode
reboot
samersh72 said:
you must be rooted, type the following commands in terminal emulator:
Code:
su
rm /efs/FactoryApp/keystr
rm /efs/FactoryApp/factorymode
echo -n ON >> /efs/FactoryApp/keystr
echo -n ON >> /efs/FactoryApp/factorymode
chown 1000.1000 /efs/FactoryApp/keystr
chown 1000.1000 /efs/FactoryApp/factorymode
chmod 0744 /efs/FactoryApp/keystr
chmod 0744 /efs/FactoryApp/factorymode
reboot
Click to expand...
Click to collapse
Hi,
Thanks
I'll test
But t'is Flash had to add items to the root? but what to delete?
Alan-B said:
Hi,
Thanks
I'll test
But t'is Flash had to add items to the root? but what to delete?
Click to expand...
Click to collapse
rm >> will remove old "keystr" file (if existed, responsible of power menu and lockscreen) and old "factorymode" (responsible of this yellow window)
echo >> will make new two mentioned files with a "on" in it
chown >> will change file owner and group information of these two files to the right one.
chmod 744 >> will set the right permission for the two files rwxr--r--
reboot :good:
you can also use "adb shell" to execute those commands.
samersh72 said:
rm >> will remove old "keystr" file (if existed, responsible of power menu and lockscreen) and old "factorymode" (responsible of this yellow window)
echo >> will make new two mentioned files with a "on" in it
chown >> will change file owner and group information of these two files to the right one.
chmod 744 >> will set the right permission for the two files rwxr--r--
reboot :good:
you can also use "adb shell" to execute those commands.
Click to expand...
Click to collapse
Sorry but the command does not pass error file read-only '
How to use ADB Shell? never used!
NB:
I do not understand why if I replace the EFS it fades to reboot?
And delete any file to remove this yellow page (which directory and file?)
Sorry but this is not easy!
Alan-B said:
Sorry but the command does not pass error file read-only '
How to use ADB Shell? never used!
NB:
I do not understand why if I replace the EFS it fades to reboot?
And delete any file to remove this yellow page (which directory and file?)
Sorry but this is not easy!
Click to expand...
Click to collapse
be sure you have busybox installed
hmmm you need to mount efs folder as write
with root explorer (enable mount in its setting) long press on efs folder and choose permission and tell me what is the permission and if you can set it to: owner: rwx group: rwx others: r-x
samersh72 said:
be sure you have busybox installed
hmmm you need to mount efs folder as write
with root explorer (enable mount in its setting) long press on efs folder and choose permission and tell me what is the permission and if you can set it to: owner: rwx group: rwx others: r-x
Click to expand...
Click to collapse
Ok is solved...
Re Hi,
My EFS is a copy pasted on the PC, is there a solution for the flash via a zip? in a command line?
Or create a tar. To restore
please help me
please help me[/QUOTE]
i have the same , yellow screen , and NO power menu
what too do ?
su
rm /efs/FactoryApp/keystr (NOT FOUND)
rm /efs/FactoryApp/factorymode (NOT FOUND)
echo -n ON >> /efs/FactoryApp/keystr (No Such File Or Directory)
echo -n ON >> /efs/FactoryApp/factorymode (No Such File Or Directory)
chown 1000.1000 /efs/FactoryApp/keystr (NOT FOUND)
chown 1000.1000 /efs/FactoryApp/factorymode (NOT FOUND)
chmod 0744 /efs/FactoryApp/keystr (NOT FOUND)
chmod 0744 /efs/FactoryApp/factorymode (No Such File Or Directory)
reboot
Please Help me ??
-=Ghostface=- said:
please help me
i have the same , yellow screen , and NO power menu
what too do ?
su
rm /efs/FactoryApp/keystr (NOT FOUND)
rm /efs/FactoryApp/factorymode (NOT FOUND)
echo -n ON >> /efs/FactoryApp/keystr (No Such File Or Directory)
echo -n ON >> /efs/FactoryApp/factorymode (No Such File Or Directory)
chown 1000.1000 /efs/FactoryApp/keystr (NOT FOUND)
chown 1000.1000 /efs/FactoryApp/factorymode (NOT FOUND)
chmod 744 /efs/FactoryApp/keystr (NOT FOUND)
chmod 744 /efs/FactoryApp/factorymode (No Such File Or Directory)
reboot
Please Help me ??
Click to expand...
Click to collapse
if you have the I9505 variant, do this with terminal emulator:
Code:
su
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10
reboot
for I9500:
Code:
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
then do the previous posted line commands
What about s3 code?
samersh72 said:
if you have the I9505 variant, do this with terminal emulator:
Code:
su
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10
reboot
for I9500:
Code:
su
mke2fs /dev/block/mmcblk0p3
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
then do the previous posted line commands
Click to expand...
Click to collapse
same problem i am having,, what is code for s3 I9300 ?
Please help me..
m.htc said:
same problem i am having,, what is code for s3 I9300 ?
Please help me..
Click to expand...
Click to collapse
for S3 I9300 efs is in block 3 (like I9500)
Can't open error
samersh72 said:
for S3 I9300 efs is in block 3 (like I9500)
Click to expand...
Click to collapse
can't open '/dev/block/mmcb1k0p3' : no such file or directory error..
What to do ?
m.htc said:
can't open '/dev/block/mmcb1k0p3' : no such file or directory error..
What to do ?
Click to expand...
Click to collapse
It is not b1k but blk (l like lemon)
Sent from my Galaxy Nexus using xda premium
ya did same later
samersh72 said:
It is not b1k but blk (l like lemon)
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
still error,, see attached image...
m.htc said:
still error,, see attached image...
Click to expand...
Click to collapse
see here, it may help http://forum.gsmhosting.com/vbb/f777/how-fix-samsung-gt-i9300-yellow-text-overlay-factory-mode-1660813/
I'm with 9505 internation HK unlocked handset, and i mis flash recovery without making EFS folder backup. Now i'm in factory mode with yellow text and no lock screen and power menu. Try several ways from other thread, seem this following thread is quite similar problem as mine http://forum.xda-developers.com/showthread.php?t=2395210 but i cant solve my problem with the solution in the thread.
su
rm /efs/FactoryApp/keystr (no such file or directory)
rm /efs/FactoryApp/factorymode (no such file or directory)
echo -n ON >> /efs/FactoryApp/keystr (no such file or directory)
echo -n ON >> /efs/FactoryApp/factorymode (no such file or directory)
chown 1000.1000 /efs/FactoryApp/keystr (usage: chown <user>[:group] <file1> [file2] ...)
chown 1000.1000 /efs/FactoryApp/factorymode (usage: chown <user>[:group] <file1> [file2] ...)
chmod 0744 /efs/FactoryApp/keystr (usage: chmod [OPTION] <MODE> <FILE> -R, --recursive change files and directories recursively --help display this help and exit)
chmod 0744 /efs/FactoryApp/factorymode (usage: chmod [OPTION] <MODE> <FILE> -R, --recursive change files and directories recursively --help display this help and exit)
reboot
I think the way samersh72 method is come close to fix mine but i dont know what i'm wrong in this please see if can help on it
I'm on rooted Stock German firmware phone with Super Su BusyBox installed PhilZ recovery and Mounted efs folder and set persission as samersh72 mentioned
Anybody help, Samsung said i need to replace new mainboard. But i think it should have the way to solve this from you guys
already solved my problem thank you
tanipat said:
already solved my problem thank you
Click to expand...
Click to collapse
can you tell how did you solve it for others benefit
samersh72 said:
can you tell how did you solve it for others benefit
Click to expand...
Click to collapse
Surety, because actually i'm one by one benefit from few post as well (you too, Big thanks to you as well). But i'm new here and not much knowledge about these things much and nor developer, just try to make it most understandable as possible per below
As i said i cant mount EFS folder so i need to know first where is it contains, you need root, busy box and android terminal installed.
1.check folder efs by enter into recover and try mount your EFS, it should be fail. Then you check the LOG and you will see the folder that make it error note it because you need to use it
2. reboot and enter android terminal and type below (in my case i note the folder that error is "mmcblk0p10" without quote (credited to this post http://forum.xda-developers.com/showthread.php?t=2389962)
su
mke2fs /dev/block/mmcblk0p10
mount -w -t ext4 /dev/block/mmcblk0p10
reboot
Once the device reboot then
At this stage your EFS folder will not gonna be empty no more. I do copy the whole folder to the safe place (i think this is not required but i did)
3. enter in to android terminal again and type (Credited from you samersh72)
su
rm /efs/FactoryApp/keystr
rm /efs/FactoryApp/factorymode
echo -n ON >> /efs/FactoryApp/keystr
echo -n ON >> /efs/FactoryApp/factorymode
chown 1000.1000 /efs/FactoryApp/keystr
chown 1000.1000 /efs/FactoryApp/factorymode
chmod 0744 /efs/FactoryApp/keystr
chmod 0744 /efs/FactoryApp/factorymode
reboot
And then the magic done it's wok and my device reboot with no more factory mode and yellow tex, as well my power menu and lock screen comes back. Thank you all you guys and XDA that revive my device for good. I would ever never do anything rather than backup my EFS folder right after everytime. I spent 1 month on this and finally get it done. Thank you again you guys. If any help needed from anyone on this i'm glad to help as much as i can.
tanipat said:
And then the magic done it's wok and my device reboot with no more factory mode and yellow tex, as well my power menu and lock screen comes back. Thank you all you guys and XDA that revive my device for good. I would ever never do anything rather than backup my EFS folder right after everytime. I spent 1 month on this and finally get it done. Thank you again you guys. If any help needed from anyone on this i'm glad to help as much as i can.
Click to expand...
Click to collapse
glad that you fixed your issue, please add [solved] to the title of this thread :good:
samersh72 said:
glad that you fixed your issue, please add [solved] to the title of this thread :good:
Click to expand...
Click to collapse
I dont know how to add "solve":crying:
tanipat said:
I dont know how to add "solve":crying:
Click to expand...
Click to collapse
just press on edit in the first post, then add "solved" in his title where you typed : [Q] Please help misflash Recovery, in factory mode with empty EFS file and no backup
To make this work you must be on stock rooted firmware!!!
I made a quick guide how to root stock 4.3 firmware, and can be found here
I'm not responsible for any damage caused by using this on your phone!!!
Let's start:
1 - you need deodexed app and deodexed framework. download and unzip. will result 2 folders (app & framework) wich must be copied on your phone (int sdcard)
2 - download adb from attach and unzip
3 - enable USB debugging mode (go to settings > about phone > tap on Build Number 7 times, until a message appears saying 'You are now a Developer.') than go to settings > Developer Options and enable USB Debugging Mode
4 - go to adb folder and open a command window (hold shift and right click on mouse button / choose "open command window here")
5 - connect your phone to pc with usb cable
>>> ml6_deodexed_zipaligned_apps_framework
>>> na1_deodexed_zipaligned_apps_framework
Now enter folowing codes:
>>> adb shell
>>> su (if you are using adb shell in su for the first time, keep phone screen on. after entering "su" code, super user request prompt in phone. press allow!!!)
>>> stop (touchscreen will not be active until reboot, don't worry!)
>>> mount -o rw,remount /system/ /system/ (mounting system r/w)
>>> cp /sdcard/app/* /system/app/ (copy deodexed system applications) (this will take 3 - 5 min)
>>> rm /system/app/*.odex (remove odex files)
>>> chmod 0644 /system/app/*.apk (this fix permissions in system/app)
>>> cp /sdcard/framework/* /system/framework/ (copy deodexed framework)
>>> rm /system/framework/*.odex (remove odex files)
>>> mount -o ro,remount /system/ /system/ (mounting system r/o)
>>> reboot (your phone will reboot) (this will take a little)
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/app/* /system/app/
rm /system/app/*.odex
chmod 0644 /system/app/*.apk
cp /sdcard/framework/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
Now you have a deodexed stock rom!!!
do not forget to press thanks
i recommend to remove all knox files from your phone.
to do this you need an application to modify your system files ( i use root explorer )
to remove knox delete this files:
system > app > ContainerAgent.apk / ContainerEventsRelayManager.apk / KLMSAgent.apk / KNOXAgent.apk /
KnoxAttestationAgent.apk / KNOXStore.apk / KNOXStub.apk
system > containers (delete entire folder)
system > etc > secure_storage > com.sec.knox.store (delete entire folder)
reserved...
Well written buddy :good:
I would like to see a "how to zipaligned" the apks also.
robalm said:
Well written buddy :good:
I would like to see a "how to zipaligned" the apks also.
Click to expand...
Click to collapse
attached app are deodexed & zipaligned
Sent from my GT-N7100 using xda app-developers app
Good idea thanks to you
You forgot to add "how to deodex stock 4.3 ML6 firmware"
robalm said:
You forgot to add "how to deodex stock 4.3 ML6 firmware"
Click to expand...
Click to collapse
root the rom and folow instructions.
app & framework are from ML6
Sent from my GT-N7100 using xda app-developers app
cosmyndemeter said:
root the rom and folow instructions.
app & framework are from ML6
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
All worked fine, but i do not like to have old apps and framework on a newer rom version.
robalm said:
All worked fine, but i do not like to have old apps and framework on a newer rom version.
Click to expand...
Click to collapse
explain pls. what rom you have?
cosmyndemeter said:
explain pls. What rom you have?
Click to expand...
Click to collapse
n7100dduena1.
robalm said:
n7100dduena1.
Click to expand...
Click to collapse
uploading na1_deodexed_zipaligned_apps_framework.
download link on #1 post
cosmyndemeter said:
uploading na1_deodexed_zipaligned_apps_framework.
download link on #1 post
Click to expand...
Click to collapse
Thank you for this, I had wondered whether the app & framework were universal. I had not seen it was from the ML6.
Thanks for working on the NA1.
YOSEFE said:
Thank you for this, I had wondered whether the app & framework were universal. I had not seen it was from the ML6.
Click to expand...
Click to collapse
i think app are same, framework can be different
my stock rom flashed is mk9, but is use na1_deodexed_zipaligned_apps_framework without any problem
na1_deodexed_zipaligned_apps_framework uploaded
cosmyndemeter said:
na1_deodexed_zipaligned_apps_framework uploaded
Click to expand...
Click to collapse
Thank you very much.
Going there now.
OP,
can you tell me what is wrong with my phone causing the errors with this?
C:\Users\Me...\Downloads\adb\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # stop
stop
[email protected]:/ # mount -o rw,remount /system/ /system/
mount -o rw,remount /system/ /system/
[email protected]:/ # cp /sdcard/app/* /system/app/
cp /sdcard/app/* /system/app/
[email protected]:/ # rm /system/app/*.odex
rm /system/app/*.odex
rm failed for /system/app/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/app/*
chmod 0644 /system/app/*
Unable to chmod /system/app/mcRegistry: Permission denied
10|[email protected]:/ # cp /sdcard/framework/* /system/framework/
cp /sdcard/framework/* /system/framework/
[email protected]:/ # rm /system/framework/*.odex
rm /system/framework/*.odex
rm failed for /system/framework/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/framework/*
chmod 0644 /system/framework/*
[email protected]:/ # mount -o ro,remount /system/ /system/
mount -o ro,remount /system/ /system/
[email protected]:/ # reboot
reboot
Thanks.
YOSEFE said:
OP,
can you tell me what is wrong with my phone causing the errors with this?
C:\Users\Me...\Downloads\adb\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # stop
stop
[email protected]:/ # mount -o rw,remount /system/ /system/
mount -o rw,remount /system/ /system/
[email protected]:/ # cp /sdcard/app/* /system/app/
cp /sdcard/app/* /system/app/
[email protected]:/ # rm /system/app/*.odex
rm /system/app/*.odex
rm failed for /system/app/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/app/*
chmod 0644 /system/app/*
Unable to chmod /system/app/mcRegistry: Permission denied
10|[email protected]:/ # cp /sdcard/framework/* /system/framework/
cp /sdcard/framework/* /system/framework/
[email protected]:/ # rm /system/framework/*.odex
rm /system/framework/*.odex
rm failed for /system/framework/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/framework/*
chmod 0644 /system/framework/*
[email protected]:/ # mount -o ro,remount /system/ /system/
mount -o ro,remount /system/ /system/
[email protected]:/ # reboot
reboot
Thanks.
Click to expand...
Click to collapse
did you this for stock rooted odexed rom
because it seems this is not stock odexed firmware
cosmyndemeter said:
na1_deodexed_zipaligned_apps_framework uploaded
Click to expand...
Click to collapse
Thanks for this.
I have posted you a question here because of the errors I am getting.
YOSEFE said:
Thanks for this.
I have posted you a question here because of the errors I am getting.
Click to expand...
Click to collapse
and i asked if you are in stock odexed firmware with root...