[Q] PurpleDrake-Lite error message in (Arch)linux - G3 Q&A, Help & Troubleshooting

Hi,
I was about to start the PurpleDrake-Lite shell script in my distro, phone plugged in and configured thoroughly following the tutorial, but the output gave an error message right at start so I Ctrl+c'd to stop the script. Here is the issue:
In purpledrake_linux.sh, on line 17:
Code:
chmod -R 755 ./assets/linux/
of course, the error says "no such file or directory", because in the 'assets' directory there is:
Code:
$ ls -l
drwxr-xr-x linux32
drwxr-xr-x linux64
drwxr-xr-x osx
-rw-r--r-- permaroot.bin
-rwxr-xr-x purpledrake_main.sh
-rw-r--r-- start_restore
-rw-r--r-- temproot.bin
drwxr-xr-x windows
(I stripped the unnecessary bits from the output,) but no 'linux' directory.
I don't know if I should report it as a bug, and if so, where exactly?
Else, it seems even pointless to quit the process right at this stage, because the second script called, purpledrake_main.sh might well find it's way to the relevant directory? (In linux32 or in linux64, depending on the architecture of the machine, right?) and they all have the right 755 permissions anyway as it appears from the output.
What do you think?
Best regards,
Mélodie

meylodie said:
Hi,
I was about to start the PurpleDrake-Lite shell script in my distro, phone plugged in and configured thoroughly following the tutorial, but the output gave an error message right at start so I Ctrl+c'd to stop the script. Here is the issue:
In purpledrake_linux.sh, on line 17:
Code:
chmod -R 755 ./assets/linux/
of course, the error says "no such file or directory", because in the 'assets' directory there is:
Code:
$ ls -l
drwxr-xr-x linux32
drwxr-xr-x linux64
drwxr-xr-x osx
-rw-r--r-- permaroot.bin
-rwxr-xr-x purpledrake_main.sh
-rw-r--r-- start_restore
-rw-r--r-- temproot.bin
drwxr-xr-x windows
(I stripped the unnecessary bits from the output,) but no 'linux' directory.
I don't know if I should report it as a bug, and if so, where exactly?
Else, it seems even pointless to quit the process right at this stage, because the second script called, purpledrake_main.sh might well find it's way to the relevant directory? (In linux32 or in linux64, depending on the architecture of the machine, right?) and they all have the right 755 permissions anyway as it appears from the output.
What do you think?
Best regards,
Mélodie
Click to expand...
Click to collapse
Hi,
The header of the script contains this information:
# PurpleDrake root for LG G3 - Linux launcher
# - A collaboration between @autoprime , @thecubed (iomonster) , and @teamandirc (jcase)
Click to expand...
Click to collapse
Is there a specific place in this forum dedicated to bug reports? If so, where?
Now, what if I would start directly with the script which is inside the assets/ sub-directory: the file having for name "purpledrake_main.sh"? Would this have a chance to work directly? Or perhaps, should I reather use the first script, and just ignore the first error message and continue?
up! \o/

meylodie said:
Hi,
The header of the script contains this information:
Is there a specific place in this forum dedicated to bug reports? If so, where?
Now, what if I would start directly with the script which is inside the assets/ sub-directory: the file having for name "purpledrake_main.sh"? Would this have a chance to work directly? Or perhaps, should I reather use the first script, and just ignore the first error message and continue?
up! \o/
Click to expand...
Click to collapse
It looks like there is a Q&A forum for purpledrake here: http://forum.xda-developers.com/tmobile-lg-g3/help/qa-root-twrp-tmo-g3-purpled-t2926609 maybe ask the question there and you will get a faster response.

justmpm said:
It looks like there is a Q&A forum for purpledrake here: http://forum.xda-developers.com/tmobile-lg-g3/help/qa-root-twrp-tmo-g3-purpled-t2926609 maybe ask the question there and you will get a faster response.
Click to expand...
Click to collapse
Hi,
I don't think so, the topic contains "D851 only". I would risk being struck by lightning if I would not obey the rules?!

meylodie said:
Hi,
I don't think so, the topic contains "D851 only". I would risk being struck by lightning if I would not obey the rules?!
Click to expand...
Click to collapse
Hi,
Solved here:
http://forum.xda-developers.com/lg-...purpledrake-lite-t2821000/page78#post58280432
The script needs '*' at the end of the string "linux". Line 17:
Code:
chmod -R 755 ./assets/linux*/
instead of
Code:
chmod -R 755 ./assets/linux/
Thanks to tzvi.

Related

[Q] terminal

When I su in terminal it grants terminal permissions but then when i put in reboot or reboot recovery it says "not permitted"... what gives???
There is a couple of things you can try to figure out what's up:
1) After you typed in su, did your prompt change from a $ to a #?
If so, OK, and if not, su didn't root you. No need to read further without
rooting again.
2) This may only work if busybox is properly installed, but worth a shot:
Type in at #, "which reboot", to find out which possible reboot in the $PATH
order you ran, so it'll return something like /system/bin/reboot, or perhaps
/system/xbin/reboot.
3) Look at the permissions & ownership of reboot returned by which:
ls -l /system/bin/reboot (if that's the one that was executed). If it's not
something like 755 (rwxr-xr-x), then it's not clear it's set right.
Permissions are usually 3 octets like rwx rwx rwx, first owner, next group, next others. In the ls -l /system/bin/reboot in 3) you can see 'owner group' (perhaps 'root system' or something like that on yours). With that info you can figure out if permissions are right. The easiest way to make it work if you're rooted is to set permissions to 755 (anyone can execute regardless of owner) by doing this:
$ su
# chmod 755 /system/bin/reboot (or whereever your reboot is)
Good luck - Hashi
hachamacha said:
There is a couple of things you can try to figure out what's up:
1) After you typed in su, did your prompt change from a $ to a #?
If so, OK, and if not, su didn't root you. No need to read further without
rooting again.
2) This may only work if busybox is properly installed, but worth a shot:
Type in at #, "which reboot", to find out which possible reboot in the $PATH
order you ran, so it'll return something like /system/bin/reboot, or perhaps
/system/xbin/reboot.
3) Look at the permissions & ownership of reboot returned by which:
ls -l /system/bin/reboot (if that's the one that was executed). If it's not
something like 755 (rwxr-xr-x), then it's not clear it's set right.
Permissions are usually 3 octets like rwx rwx rwx, first owner, next group, next others. In the ls -l /system/bin/reboot in 3) you can see 'owner group' (perhaps 'root system' or something like that on yours). With that info you can figure out if permissions are right. The easiest way to make it work if you're rooted is to set permissions to 755 (anyone can execute regardless of owner) by doing this:
$ su
# chmod 755 /system/bin/reboot (or whereever your reboot is)
Good luck - Hashi
Click to expand...
Click to collapse
When I chmod 755, it says unable to chmod system is read only. Before the # sign there is a sh-3.2 (#) is that normal because i didnt see that on any of the videos I watched. I want to put the psfrecovery on my incredible and thats what this is all about but it wont seem to push the recovery to the phone, but it doesnt throw any errors either. ::
When I chmod 755, it says unable to chmod system is read only. Before the # sign there is a sh-3.2 (#) is that normal because i didnt see that on any of the videos I watched. I want to put the psfrecovery on my incredible and thats what this is all about but it wont seem to push the recovery to the phone, but it doesnt throw any errors either
Click to expand...
Click to collapse
Sorry: I skipped a step. You would have to remount /system as read write to do a chmod on something in /system.
The other question (sh-3.2) (#) and while I can't say it 'isn't normal' , I can tell you I've never seen it. (which doesn't mean much).
One thing I wonder about is :: "are you seeing anything or have you seen the superuser.apk app being asked to 'allow' su access the first time you use su in term?" I'm wondering if something has gone wrong with your basic superuser install.
Anyway, about as much as you can try to do with this information is to see if you can remount the /system FS read-write as follows, and then do the chmod again. Here's what I think will work on the dinc:
(from adb or term emulator):
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 755 {whatever the file was}
# ls -l {the file so you can check it's mode}
// if it's ok, then proceed, and if not, not much you can do without re-rooting
// then remount as ro so everything is flushed & flush and synced.
# mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
// then try the command again.
Click to expand...
Click to collapse
So if none of this works, or also gives permission errors, then you might , if you have Rom Manager, try a 'fix permissions'. Normally I wouldn't advise that, because I don't know who uses that or even which files it 'fixes' or if it fixes them. I just figure it's worth a shot.
Bottom line is if you don't have permissions to a lot of things and you're rooted with su and superuser.apk, then something in the install of those things has gone haywire (if you can't repair them , one way being as above).
Best of luck to you - H
hachamacha said:
Sorry: I skipped a step. You would have to remount /system as read write to do a chmod on something in /system.
The other question (sh-3.2) (#) and while I can't say it 'isn't normal' , I can tell you I've never seen it. (which doesn't mean much).
One thing I wonder about is :: "are you seeing anything or have you seen the superuser.apk app being asked to 'allow' su access the first time you use su in term?" I'm wondering if something has gone wrong with your basic superuser install.
Anyway, about as much as you can try to do with this information is to see if you can remount the /system FS read-write as follows, and then do the chmod again. Here's what I think will work on the dinc:
(from adb or term emulator):
So if none of this works, or also gives permission errors, then you might , if you have Rom Manager, try a 'fix permissions'. Normally I wouldn't advise that, because I don't know who uses that or even which files it 'fixes' or if it fixes them. I just figure it's worth a shot.
Bottom line is if you don't have permissions to a lot of things and you're rooted with su and superuser.apk, then something in the install of those things has gone haywire (if you can't repair them , one way being as above).
Best of luck to you - H
Click to expand...
Click to collapse
yeah tried it and it was a no go lol, Skyraider 3.5 is my rom so i am gonna try and switch roms thanks for trying though

[Acer _AV041_A100_1.037.00_ww_gen1] root?

[Acer _AV041_A100_1.037.00_ww_gen1]
root
Can be successfully???
alexsec said:
[Acer _AV041_A100_1.037.00_ww_gen1]
root
Can be successfully???
Click to expand...
Click to collapse
ZN's method still works just fine.
http://forum.xda-developers.com/showthread.php?t=1531646
i can't root!
i can't root!
Verify the device is showing under the device manager, usb debugging is turned on, and that it is being run as administrator.
What OS are you using?
i have the same problem. Can't root after the recent update. using W7, executing it with and without administrator rights. Executing with administrator rights it says something of ADB.
alexsec said:
i can't root!
Click to expand...
Click to collapse
Updating script. Try once again.
rooted!! thanks!!
How to Updating script. Try once again.
@ ZeroNull, can you confirm whether ICS_rooting_A10x_A5xx works for the latest build?
Build number
Acer_A100_2.001.01_COM_GEN2
I have been unsuccessful so far:
==========================================
Preparation is finished.
-
Executing of the main script.
remote object '/system/bin/su' does not exist
The file "su" isn't created!
-
Not getting root!
-
Error!
I can confirm that I successfully rooted my A100 using ZeroNull's simple method (http://forum.xda-developers.com/showthread.php?t=1531646)
Build number: Acer_AV041_A100_1.037.00_WW_GEN1
I didn't even use the new script, I'm still using the old one (ICS_rooting.zip)
Unfortunately I can also confirm problems with recent updates of the SuperUser APK (It did not assign the correct Group ID), but apparently they were fixed in the latest update (v3.1.3)
Good Luck.
---------- Post added at 10:30 AM ---------- Previous post was at 10:05 AM ----------
alexsec said:
i can't root!
Click to expand...
Click to collapse
alexsec said:
How to Updating script. Try once again.
Click to expand...
Click to collapse
Hi alexsec, did you try with the new script, it creates a different directory than the old script did, and it uses the mkdir -p option so it creates any parent directories it needs:
Code:
adb shell "mkdir -p /data/local/tmp"
adb push tools /data/local/tmp
adb shell "chmod 0755 /data/local/tmp/mempodroid"
And it does a better job by waiting longer for the tablet to reboot:
Code:
rem Wait reboot tablet
for /L %%i in (1,1,7000000) do @rem
I even modify the getroot.sh script just to change back to the old su command and modify its permissions:
Code:
cd /data/local/tmp
echo >/data/local.prop
toolbox mount -o remount, rw /system/
cat su >/system/bin/su
ln -s /system/bin/su /system/xbin/su
chmod 06755 /system/bin/su
sync ; sync ; sync
reboot
Good Luck...

Rooting the TF300T *without* downgrading (from .29)

Hello,
I managed to root my TF300 this week-end.
Since the method of downgrading to .17, getting root, then waiting for Asus to update it again OTA to .29... was not really satisfying to me, I found a simpler (and hopefully safer) way to do it.
Story short: instead of getting write access to mmcblk0p4 to write a blob (as in method #2 of http://forum.xda-developers.com/showthread.php?t=1622628), I'm getting write access to mmcblk0p1 to write a single file, with suid perms.
Here is the full guide, and the link to the binaries at the end.
Please be sure to read it until the end, and to understand every line of it. I thus encourage you to read the debugfs manpage here: http://linux.die.net/man/8/debugfs
Of course, there is no garantee for this to work or to not brick your device, especially if you don't understand what you type, so RTFM twice.
Here is now the full guide:
Rooting the Asus Transformer TF300T
===================================
: first, use known method to get write access to the /system partition
Code:
adb push debugfs /data/local/
adb push su /data/local/
adb shell
Code:
$ cd /data/local/
$ mv tmp tmp.back
FOR TRANSFORMER (TF101 TF201 TF300T TF700T) ONLY:
Code:
$ ln -s /dev/block/mmcblk0[COLOR="Red"]p1[/COLOR] tmp
$ exit
FOR PADFONE ONLY:
Code:
$ ln -s /dev/block/mmcblk0[COLOR="Red"]p21[/COLOR] tmp
$ exit
FOR SAMSUNG GALAXY SII ONLY:
Code:
$ ln -s /dev/block/mmcblk0[COLOR="Red"]p9[/COLOR] tmp
$ exit
FOR SAMSUNG GALAXY TAB 2 7" ONLY: (see http://forum.xda-developers.com/showthread.php?t=1791193 thx to Nesquick95)
Code:
$ ln -s /dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS tmp
$ exit
Code:
adb reboot
adb shell
: some cleanup first
Code:
$ cd /data/local
: and now, let's do the dirty work
Code:
$ toolbox chmod 755 /data/local/debugfs
$ /data/local/debugfs -w /data/local/tmp
debugfs: cd xbin
debugfs: rm su
[COLOR="green"]NOTE: if this is your first attempt, you should see an error message here, simply ignore it[/COLOR]
debugfs: write /data/local/su su
debugfs: set_inode_field su mode 0106755
debugfs: set_inode_field su uid 0
debugfs: set_inode_field su gid 0
debugfs: quit
$ rm /data/local/tmp
$ mv /data/local/tmp.back /data/local/tmp
$ exit
: done, let's reboot and get root !
Code:
adb reboot
adb shell
$ /system/xbin/su
# id
[COLOR="Blue"]id=0(root) gid=0(root) ....[/COLOR]
# exit
: cleanup remaining files
Code:
$ rm /data/local/su
$ rm /data/local/debugfs
$ exit
Next step is to install ASAP the superuser app from the market, since my version of su is home-made, and was not designed with security in mind.
After installation, or if you previously installed, open it and check for an update, there should be one available. This will replace the non-securised su binary with the one provided by superuser. Reboot when asked to, and you're done.
And now here is the link for the binaries:
http://db.tt/FBUNeVmo
The source code of su is given, and debugfs was compiled natively from a gentoo chroot inside my Transformer (the first version was cross-compiled but segfaulted now and then).
Please let me know how it goes for you.
Credits: wolf849 for the symlink exploit
EDIT0: sparkym3 created a tool integrating this procedure. Although it seems to work only on Windows, a "few" users could make use of it
Here is the URL:
sparkym3 said:
I have created an automated tool using this root method and am looking for confirmation that it works on a Transformer 300.
http://forum.xda-developers.com/showthread.php?t=1706588
Click to expand...
Click to collapse
EDIT1: Here are the devices successfully rooted so far:
ASUS TF300T .26 .29 .30
ASUS TF201 .21 .28
ASUS TF101 S/N B70* .24
ASUS PadFone IML74K.CHT_PadFone-9.18.8.41_CHT_9.1.15-0
ASUS TF700T
SAMSUNG Galaxy II ICS 4.0.3
SAMSUNG Galaxy Tab 2 7"
milo
miloj said:
Hello,
I managed to root my TF300 this week-end.
Since the method of downgrading to .17, getting root, then waiting for Asus to update it again OTA to .29... was not really satisfying to me, I found a simpler (and hopefully safer) way to do it.
Story short: instead of getting write access to mmcblk0p4 to write a blob (as in method #2 of http://forum.xda-developers.com/showthread.php?t=1622628), I'm getting write access to mmcblk0p1 to write a single file, with suid perms.
Here is the full guide, and the link to the binaries at the end.
Please be sure to read it until the end, and to understand every line of it. I thus encourage you to read the debugfs manpage here: http://linux.die.net/man/8/debugfs
Of course, there is no garantee for this to work or to not brick your device, especially if you don't understand what you type, so RTFM twice.
Here is now the full guide:
Rooting the Asus Transformer TF300T
===================================
: first, use known method to get write access to the /system partition
adb push debugfs /data/local/
adb push su /data/local/
adb shell
$ cd /data/local/
$ mv tmp tmp.back
$ ln -s /dev/block/mmcblk0p1 tmp
$ exit
adb reboot
adb shell
: some cleanup first
$ cd /data/local
$ rm /data/local/tmp
$ mv /data/local/tmp.back /data/local/tmp
: and now, let's do the dirty work
$ chmod 755 /data/local/debugfs
$ /data/local/debugfs -w /dev/block/mmcblk0p1
debugfs: cd xbin
debugfs: write /data/local/su su
debugfs: set_inode_field su mode 0104755
debugfs: set_inode_field su uid 0
debugfs: set_inode_field su gid 0
debugfs: quit
: done, let's reboot and get root !
adb reboot
adb shell
$ /system/xbin/su
# id
id=0(root) gid=0(root) ....
# exit
: cleanup remaining files
$ rm /data/local/su
$ rm /data/local/debugfs
Next step is to install ASAP the superuser app from the market, since my version of su is home-made, and was not designed with security in mind.
And now here is the link for the binaries:
http://db.tt/FBUNeVmo
The source code of su is given, and debugfs was compiled natively from a gentoo chroot inside my Transformer (the first version was cross-compiled but segfaulted now and then).
Please let me know how it goes for you.
Credits: wolf849 for the symlink exploit
milo
Click to expand...
Click to collapse
If this proves to be successful across multiple users, I may try this out; I'm excited to see how this information pans out.
FYI, there was one success in this thread: http://forum.xda-developers.com/showthread.php?t=1688994 where I originally posted.
milo
Yep. That was me.
In essence I had a locked (can get OTA), not rooted device with .26 WW firmware.
Now I've got a locked (can still get OTA unless Asus changes something), rooted device with .29 WW firmware.
This is the holy grail for tf300t users at the moment.
I'm so happy!
For information, I just rooted a friend's TF201 with the same method
Sent from my ASUS Transformer Pad TF300T using XDA
Confirmed
CONFIRMED!
I rooted my WW.29 this way. No need to downgrade to .17 first.
Thank you, thank you, thank you
It worked! Simpel and easy on ww29 locked!
Thanks!!!
Confirmed working on US .29!
Edit: Does trying adb remount and failing have anything to do with the root or am I not understanding the adb command?
Question: Why weren't you satisfied with downgrading method? i asked because I did the downgrade method and the tf300 has been working fine.
NJ_RAMS_FAN said:
Question: Why weren't you satisfied with downgrading method? i asked because I did the downgrade method and the tf300 has been working fine.
Click to expand...
Click to collapse
Because risk was too high in my opinion:
- risk to brick when injecting the blob into mmcblk0p4 (if the tablet reboot in the middle, I guess you get a 500€ brick)
- risk to not receiving any ASUS OTA (many users have reported this, I didn't want to test it myself)
The procedure was also a bit too complex, between US, DE, DE to WW, and WW blobs.
Also the .17 WW blob is nowhere available.
With my method, there is one risk, it is if the tablet reboot in the middle of writing into the partition. But I guess than, like any other linux (or unix for that matter), the android boot would run fsck on the partition and get it repaired.
And my method is faster !!
Sent from my ASUS Transformer Pad TF300T using XDA
Thanks man. Worked like a charm for me olso.
I am on ww.29
Thanks, works like a charm!
ww.29
Beautiful.
Got root on ww .29 here.
mcho19 said:
Confirmed working on US .29!
Edit: Does trying adb remount and failing have anything to do with the root or am I not understanding the adb command?
Click to expand...
Click to collapse
I didn't try, but if I'm allowed to guess the debugfs tool doesn't check permissions as rigorously as mount commands (ie it's working on a lower level). But that's a guess. Another guess would be that dd'ing the su binary would have worked, but then you probably wouldn't have been able to set the correct permissions on the su binary.
NJ_RAMS_FAN said:
Question: Why weren't you satisfied with downgrading method? i asked because I did the downgrade method and the tf300 has been working fine.
Click to expand...
Click to collapse
The downgrade method doesn't work with OTAs on .WW firmware. This is the only way at the moment if you're > .17 WW or on .17 DE.
It may even work on __many___ more devices (but that's another guess).
miloj any chance you could make a YT video of this? This would be great to be added into the INDEX, in a YT format.
works!
Excellendo.
Chris
A great great thanks from an almost noob... My TF201 unlocked (!) .21 is now rooted!!
Pas remarqué que tu étais français aussi!
A great thanks from me, too!
I have one question: After dooing all steps, my tablet is rooted. But the SuperUser App doesn't ask me to allow the apps. In the SU-App from the Market i don't see any App allowed, but every app which needs root, works in root mode without asking.
Did I do something wrong?
Thank's a lot,
Niggy
Niggy86 said:
A great thanks from me, too!
I have one question: After dooing all steps, my tablet is rooted. But the SuperUser App doesn't ask me to allow the apps. In the SU-App from the Market i don't see any App allowed, but every app which needs root, works in root mode without asking.
Did I do something wrong?
Thank's a lot,
Niggy
Click to expand...
Click to collapse
You need to install superuser from market and reinstall the su binary.
As soon as possible.
At the risk of getting torched ...
Is there a Windows version of debugfs? I'm assuming this is to be done under Linux.
Any Windows equivalents?
Thanks

[GUIDE] Universal rooting to any ics that you have the stock firmware.

This guide was tested on my samsung galaxy [email protected] gt-B5330 and it worked.
WARNING: this can brick your phone, used on your own risk (both eyes wide open).
The idea behing can be ported on any phone that allows you to upload custom firmware (most samsungs with odin).
The idea is that you escalate to superuser by setting suid on /system/bin/toolbox executable.
By duing that you can run most of the unix commands on android as a superuser.
I is enought for you to copy su utility somewhere where there is not a nosuid option on mountpoint. and make it a suided executable then execute su and get the #.
It's all down hill from here.
I cannot verify for every ics rom out there, but it seems that now ics uses ext4 filesystem for the system partition.
I have made a script that inspects a stock rom firmware isolate the permissions for the toolbox executable and add to them SUID,SUIG.
After that it pachs the firmware back and you can flash it to your device and have a easylly rootable device. (I will post the stept to take to get a standard rooted device).
What you need:
a linux/gnu (it will not work with cygwin because we have to mount the ext4 partition).
simg2img utility (you can get it from xda site it is in ext4_utility packet).
su, busybox and superuser.apk binaries for android (you can take them from a rooting package).
heimdal (for linux) xor odin (for windows and if you cannot flash the firmware on your phone form linux).
I've put all untilities that are not standard into the tar.
just unpack and you have the universal-patch.sh to run over an .tar.md5 firware stock rom.
And post-firmwareUpdate.sh to run after you flash in order to make the root a standard android root.
This was not tested on any other phone (was tested only on GT-B5330) and do it on your own risk.
This rooting does not exploit any weakness (or flaw) in kernel or any thing, it just modifies the stock firmware to make it more flexible so it should be forward compatible with any version of android after ics.
I assume this would exclude HTC's since you meed to be s-off to flash a firmware. I would probably verify that and edit the title if necessary. Other than that, this looks like it could be helpful.
Help to understand the procedure
Hi ETTT,
first of all thanks for your job and effort in finding a solution to this issue.. it has been driving me crazy till now.. but thanx to you i see the light :good: I see it but i cannot really understand the procedure.. Could you please write a step by step explanation of what i need to do. (I am not what we could call a genius with linux).
Thanks in advance.
The First said:
Hi ETTT,
first of all thanks for your job and effort in finding a solution to this issue.. it has been driving me crazy till now.. but thanx to you i see the light :good: I see it but i cannot really understand the procedure.. Could you please write a step by step explanation of what i need to do. (I am not what we could call a genius with linux).
Thanks in advance.
Click to expand...
Click to collapse
If you are refering to the procedure that the script is doing here is the version of step by step (with-out the script):
http://forum.xda-developers.com/showthread.php?t=1956653
If you want to know the step by step with the script, here (I will not respond to more basic than this, like how to boot ubuntu and stuff.):
mkdir -p /tmp/foo
sudo mkdir /mnt
cd /tmp/foo
tar -xzf universal-patch.tar.gz
export PATH=./:$PATH
{get the firmware here and unzip it, it should have a file with .tar.md5 suffix}
./universal-patch.sh {the name of the firmware including the .tar.md5 suffix}
wait a while. you should have by the way about 10 times the size of the zip as free space.
if all goes well you will have a myfrm.tar.md5 rady for flashing.
flash the firmware, and after boot enable usb debuging, hook the phone to pc
sudo adb devices
./post-firmwareUpdate.sh
you should have a rooted phone.
you cannot go any more basic than that.
Have fun.
Thanks for your effort, I'm already have my XWALH3 patched, btw you should to check the patch on line 19, you've misstype something there
Sent from my GT-B5330 using xda app-developers app
The file after qa
phyxar said:
Thanks for your effort, I'm already have my XWALH3 patched, btw you should to check the patch on line 19, you've misstype something there
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
Thanks for testing and input.
phyxar said:
Thanks for your effort, I'm already have my XWALH3 patched, btw you should to check the patch on line 19, you've misstype something there
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
XWALH3 i've produce from your universal-patch cannot being flashed to my phone, odin crash each time open those files
phyxar said:
XWALH3 i've produce from your universal-patch cannot being flashed to my phone, odin crash each time open those files
Click to expand...
Click to collapse
I'm puting the xdelta to the XWALH3
here are the md5s for the original and patched firmware.
cfe3ca545c4a2c8d453e02cd549655a1 B5330XWALH3_B5330OJVALH1_B5330XXLH4_HOME.tar.md5
624f63943bff54941e4042a39d7928f2 myfrm.tar.md5
Now I have some question in order to debug:
does the patching you have done yeild the same file as I have here?
have you use the same imput? (that's why I've give you the md5 of my imput).
Hey you have rooted you b5330 then do you notice any performance upgrade
Sent from my GT-B5330 using xda premium
Can I patch the firmware using windows??
Because I'm on win
I don't really understand using linux
Or can you make single click batch file that I can use it to patch my firmware???
I really appreciate it if someone provide it
Thanks
Sent from my GT-B5330 using xda app-developers app
byboyz said:
Can I patch the firmware using windows??
Because I'm on win
I don't really understand using linux
Or can you make single click batch file that I can use it to patch my firmware???
I really appreciate it if someone provide it
Thanks
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
I don't know windows that much to make a batch clone of the script. so you need linux.
But you can use a live cd (maybe from ubuntu) to run the script.
ETTT said:
I don't know windows that much to make a batch clone of the script. so you need linux.
But you can use a live cd (maybe from ubuntu) to run the script.
Click to expand...
Click to collapse
Thx for ur reply
How can I open XWALH3.patch that u give earlier??
Bcause I don't know anything about linux
Sent from my GT-B5330 using xda app-developers app
byboyz said:
Thx for ur reply
How can I open XWALH3.patch that u give earlier??
Bcause I don't know anything about linux
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
that patch is an xdelta patch.
There is an xdelta application on windows, don't know if it works, but it should work.
ETTT said:
If you are refering to the procedure that the script is doing here is the version of step by step (with-out the script):
http://forum.xda-developers.com/showthread.php?t=1956653
If you want to know the step by step with the script, here (I will not respond to more basic than this, like how to boot ubuntu and stuff.):
mkdir -p /tmp/foo
sudo mkdir /mnt
cd /tmp/foo
tar -xzf universal-patch.tar.gz
export PATH=./:$PATH
{get the firmware here and unzip it, it should have a file with .tar.md5 suffix}
./universal-patch.sh {the name of the firmware including the .tar.md5 suffix}
wait a while. you should have by the way about 10 times the size of the zip as free space.
if all goes well you will have a myfrm.tar.md5 rady for flashing.
flash the firmware, and after boot enable usb debuging, hook the phone to pc
sudo adb devices
./post-firmwareUpdate.sh
you should have a rooted phone.
you cannot go any more basic than that.
Have fun.
Click to expand...
Click to collapse
hi there, I'm stuck at last point/step: ./post-firmwareUpdate.sh
my terminal respond many error about busybox
the code like this:
2684 KB/s (91980 bytes in 0.033s)
4016 KB/s (996704 bytes in 0.242s)
4491 KB/s (1085140 bytes in 0.235s)
.//busybox: 1: .//busybox: Syntax error: word unexpected (expecting ")")
.//busybox: 1: .//busybox: Syntax error: word unexpected (expecting ")")
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nolonger with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
cd /system/xbin
for k in
nt/obb/su # copy the su binary to a place that can be sudoed <
/mnt/obb/su: cannot open for write: Permission denied
1|[email protected]:/ $ chown 0.0 /mnt/obb/su # modify the owner
Unable to chmod /mnt/obb/su: No such file or directory
10|[email protected]:/ $ chmod 6755 /mnt/obb/su # set SUID flag.
Unable to chmod /mnt/obb/su: No such file or directory
10|[email protected]:/ $ /mnt/obb/su # becomes root !!
/system/bin/sh: /mnt/obb/su: not found
# remount the system partition as readwrite. <
mount: Operation not permitted
/system/xbin/su #copy su in path <
/system/xbin/su: cannot open for write: Read-only file system
1|[email protected]:/ $ chown 0.0 /system/xbin/su
Unable to chmod /system/xbin/su: No such file or directory
10|[email protected]:/ $ chmod 6755 /system/xbin/su
Unable to chmod /system/xbin/su: No such file or directory
# close the security hole (toolbox is nolonger with SUID) <
Unable to chmod /system/bin/toolbox: Read-only file system
er.apk of=/system/app/Superuser.apk # copy the superuser application <
/system/app/Superuser.apk: cannot open for write: Read-only file system
1|[email protected]:/ $ chown 0.0 /system/app/Superuser.apk
Unable to chmod /system/app/Superuser.apk: No such file or directory
10|[email protected]:/ $ chmod 666 /system/app/Superuser.apk
Unable to chmod /system/app/Superuser.apk: No such file or directory
10|[email protected]:/ $ #now this is done for busybox
10|[email protected]:/ $ dd if=/data/local/tmp/busybox of=/system/xbin/busybox
/system/xbin/busybox: cannot open for write: Read-only file system
1|[email protected]:/ $ chown 0.0 /system/xbin/busybox
Unable to chmod /system/xbin/busybox: No such file or directory
10|[email protected]:/ $ chmod 755 /system/xbin/busybox
Unable to chmod /system/xbin/busybox: No such file or directory
10|[email protected]:/ $ cd /system/xbin
[email protected]:/system/xbin $ for k in
Click to expand...
Click to collapse
smhybrid said:
hi there, I'm stuck at last point/step: ./post-firmwareUpdate.sh
my terminal respond many error about busybox
the code like this:
Click to expand...
Click to collapse
Ok it seams busybox has a thing against ")" in comments.
Here is the script without comments, so try this.
ETTT said:
Ok it seams busybox has a thing against ")" in comments.
Here is the script without comments, so try this.
Click to expand...
Click to collapse
no good, it's still have same error...
maybe the problem is in busybox?
and i don't know why I'm unable to do chmod
smhybrid said:
no good, it's still have same error...
maybe the problem is in busybox?
and i don't know why I'm unable to do chmod
Click to expand...
Click to collapse
give this command:
adb shell ls -l /system/bin/toolbox
and let's see if the toolbox has suid.
ETTT said:
give this command:
adb shell ls -l /system/bin/toolbox
and let's see if the toolbox has suid.
Click to expand...
Click to collapse
what i get is
-rwxr-xr-x root shell 99068 2012-08-09 11:59 toolbox
how to get suid?
smhybrid said:
what i get is
-rwxr-xr-x root shell 99068 2012-08-09 11:59 toolbox
how to get suid?
Click to expand...
Click to collapse
have you flash the patched firmware?
ETTT said:
have you flash the patched firmware?
Click to expand...
Click to collapse
well, I've just do all of Your step, except this:
flash the firmware, and after boot enable usb debuging, hook the phone to pc
Click to expand...
Click to collapse
because I don't know the meaning of flash the firmware. How to do that?
So I skip that and hook the phone to pc with usb debugging enabled
i'm new at linux, but I want to try this method for my galaxy chat

[Q] Run script on FireTV boot

I have a very simple script to mount my NAS to a specific path that I want executed every time my FireTV boots.
I have read about pointing to it in the install-recovery-2.sh, however that is not available on my FireTV. I have also read about placing the script in system/etc/init.d/ however that path doesn't exist on the fireTV either.
Would prefer to do this at the system level and not rely on a manager (Tasker, Script Manager, etc).
Anyone have any experience?
Update w/ solution:
I was able to get this working by placing a script called install-recovery.sh in /system/etc/ . Make sure that permissions are set appropriately (at least 755). If creating the script on a Windows machine, make sure there aren't any hidden whitespace characters (I personally verified the script using SManager on my Fire TV).
Code:
[B]sleep 15[/B]
mkdir /mnt/obb/nas
chmod 777 /mnt/obb/nas
[B]sleep 20[/B]
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
The sleep command is necessary as the script may run before the network is initialized.
Thanks rbox and ECEXCURSION!
patrickorr said:
I have a very simple script to mount my NAS to a specific path that I want executed every time my FireTV boots.
I have read about pointing to it in the install-recovery-2.sh, however that is not available on my FireTV. I have also read about placing the script in system/etc/init.d/ however that path doesn't exist on the fireTV either.
Would prefer to do this at the system level and not rely on a manager (Tasker, Script Manager, etc).
Anyone have any experience?
Click to expand...
Click to collapse
/system/etc/install-recovery.sh
rbox said:
/system/etc/install-recovery.sh
Click to expand...
Click to collapse
That file does not exist in /system/etc/ on my FireTV
patrickorr said:
That file does not exist in /system/etc/ on my FireTV
Click to expand...
Click to collapse
Yes... you have to create it...
rbox said:
Yes... you have to create it...
Click to expand...
Click to collapse
Ahh, sorry a little dense
Will give that a shot and report back on the results
Ok, I have placed install-recovery.sh (which houses my mounting script) in /system/etc/
I reboot and it doesn't appear that the script has run. Is there anything else I would need to do in order to get it to run on boot?
If it matters here are the details on my FireTV
Custom Recovery 6.0.5.1.4a
Pre-rooted 51.1.4.1_514013920
patrickorr said:
Ok, I have placed install-recovery.sh (which houses my mounting script) in /system/etc/
I reboot and it doesn't appear that the script has run. Is there anything else I would need to do in order to get it to run on boot?
If it matters here are the details on my FireTV
Custom Recovery 6.0.5.1.4a
Pre-rooted 51.1.4.1_514013920
Click to expand...
Click to collapse
And you're sure the script works?
rbox said:
And you're sure the script works?
Click to expand...
Click to collapse
That is a very good question How can I test that my script is functioning?
From adb shell or Terminal emulator I type the following commands to mount my NAS:
Code:
su
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
To turn this into a script I just dumped it into notepad and added #!/system/bin/sh to the top and saved it as install-recovery.sh.
patrickorr said:
That is a very good question How can I test that my script is functioning?
From adb shell or Terminal emulator I type the following commands to mount my NAS:
Code:
su
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
To turn this into a script I just dumped it into notepad and added #!/system/bin/sh to the top and saved it as install-recovery.sh.
Click to expand...
Click to collapse
Run it from adb, but right off the bat, I can tell you you need to chmod 755 it atleast before that will work.
rbox said:
Run it from adb, but right off the bat, I can tell you you need to chmod 755 it atleast before that will work.
Click to expand...
Click to collapse
Ok, was able to run the script, but got the following error(s):
Code:
127|[email protected]:/system/etc # sh ./install-recovery.sh
sh ./install-recovery.sh
: not foundecovery.sh[2]:
: not foundecovery.sh[3]: su
: No such file or directoryd: /mnt/obb/
, Read-only file system
: No such file or directory
mount: No such file or directory
patrickorr said:
Ok, was able to run the script, but got the following error(s):
Code:
127|[email protected]:/system/etc # sh ./install-recovery.sh
sh ./install-recovery.sh
: not foundecovery.sh[2]:
: not foundecovery.sh[3]: su
: No such file or directoryd: /mnt/obb/
, Read-only file system
: No such file or directory
mount: No such file or directory
Click to expand...
Click to collapse
Well first of all, don't run it with sh... it needs to have #!/system/bin/sh at the top, and you need to run it directly. Second, don't put su in it because it's already running in the root context.
rbox said:
Well first of all, don't run it with sh... it needs to have #!/system/bin/sh at the top, and you need to run it directly. Second, don't put su in it because it's already running in the root context.
Click to expand...
Click to collapse
How would I run it directly?
Here is my current script (with su removed):
Code:
#!/system/bin/sh
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
patrickorr said:
How would I run it directly?
Here is my current script (with su removed):
Code:
#!/system/bin/sh
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
Click to expand...
Click to collapse
Just type:
/system/etc/install-recovery.sh
rbox said:
Just type:
/system/etc/install-recovery.sh
Click to expand...
Click to collapse
I am attempting to run that in adb shell, but am getting the following errors:
Code:
[email protected]:/ $ cd /system/etc/
cd /system/etc/
[email protected]:/system/etc $ stat -c "%a %n" install-recovery.sh
stat -c "%a %n" install-recovery.sh
777 install-recovery.sh
[email protected]:/system/etc $ /system/etc/install-recovery.sh
/system/etc/install-recovery.sh
/system/bin/sh: /system/etc/install-recovery.sh: No such file or directory
1|[email protected]:/system/etc $ ./system/etc/install-recovery.sh
./system/etc/install-recovery.sh
/system/bin/sh: ./system/etc/install-recovery.sh: not found
127|[email protected]:/system/etc $
It seems like the permissions are correct on the file, and I also tried adding ./ before the path to see if that made any differences.
I made a slight "upgrade" to my script to see if it would help (but as you can probably already see, I am not exactly sure what I am doing!):
Code:
#!/system/bin/sh
mkdir /mnt/obb/nas
chmod 777 /mnt/obb/nas
busybox mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
patrickorr said:
I am attempting to run that in adb shell, but am getting the following errors:
Code:
[email protected]:/ $ cd /system/etc/
cd /system/etc/
[email protected]:/system/etc $ stat -c "%a %n" install-recovery.sh
stat -c "%a %n" install-recovery.sh
777 install-recovery.sh
[email protected]:/system/etc $ /system/etc/install-recovery.sh
/system/etc/install-recovery.sh
/system/bin/sh: /system/etc/install-recovery.sh: No such file or directory
1|[email protected]:/system/etc $ ./system/etc/install-recovery.sh
./system/etc/install-recovery.sh
/system/bin/sh: ./system/etc/install-recovery.sh: not found
127|[email protected]:/system/etc $
It seems like the permissions are correct on the file, and I also tried adding ./ before the path to see if that made any differences.
I made a slight "upgrade" to my script to see if it would help (but as you can probably already see, I am not exactly sure what I am doing!):
Code:
#!/system/bin/sh
mkdir /mnt/obb/nas
chmod 777 /mnt/obb/nas
busybox mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
Click to expand...
Click to collapse
That sounds strange... but you'll need to run su before running it, because it needs root. It could be that its not in UNIX file format. If you edited it on Windows you need to use an advanced editor that has the ability to save as UNIX format.
rbox said:
That sounds strange... but you'll need to run su before running it, because it needs root. It could be that its not in UNIX file format. If you edited it on Windows you need to use an advanced editor that has the ability to save as UNIX format.
Click to expand...
Click to collapse
Unix file format appears to have been the issue. When I opened it with SManager I saw some nasty whitespace characters. Removed those and the script works as expected:
Code:
[email protected]:/data/media/0 # ./install-recovery.sh
./install-recovery.sh
[email protected]:/data/media/0 # cd /mnt/obb/nas
cd /mnt/obb/nas
[email protected]:/mnt/obb/nas # ls
ls
Games
Photos
Shared Music
Shared Videos
eBooks
key.txt
[email protected]:/mnt/obb/nas #
After confirming the script worked as expected, I moved it to /system/etc/ and verified permissions were acceptable (777). Upon reboot I see that the /mnt/obb/nas is created, however the NAS is not mapped.
Can you comment, when is the install-recovery.sh called in the boot up process? Is it possible that the CIFS module isn't fully loaded when this is called? Alternatively, is there a log that I could reference to see if any error occurred while running the script at startup?
patrickorr said:
Unix file format appears to have been the issue. When I opened it with SManager I saw some nasty whitespace characters. Removed those and the script works as expected:
Code:
[email protected]:/data/media/0 # ./install-recovery.sh
./install-recovery.sh
[email protected]:/data/media/0 # cd /mnt/obb/nas
cd /mnt/obb/nas
[email protected]:/mnt/obb/nas # ls
ls
Games
Photos
Shared Music
Shared Videos
eBooks
key.txt
[email protected]:/mnt/obb/nas #
After confirming the script worked as expected, I moved it to /system/etc/ and verified permissions were acceptable (777). Upon reboot I see that the /mnt/obb/nas is created, however the NAS is not mapped.
Can you comment, when is the install-recovery.sh called in the boot up process? Is it possible that the CIFS module isn't fully loaded when this is called? Alternatively, is there a log that I could reference to see if any error occurred while running the script at startup?
Click to expand...
Click to collapse
It's probably running before the network comes up. There might be maybe some kind of regular android apk that will run a script when the network comes up. There might be a way to just stick a loop in your current script waiting for something, not sure.
You could probably just add "sleep 30" to the beginning of the script.
rbox said:
It's probably running before the network comes up. There might be maybe some kind of regular android apk that will run a script when the network comes up. There might be a way to just stick a loop in your current script waiting for something, not sure.
Click to expand...
Click to collapse
ECEXCURSION said:
You could probably just add "sleep 30" to the beginning of the script.
Click to expand...
Click to collapse
Thanks, will give that a try when I get back home.
Edit: It worked! Thanks to the both you for your input.
Just wondering since I'm a newbie when it comes to this one. Does mounted folder have to be in /mnt/obb or can I choose any directory I want?

Categories

Resources