yashsingh1/xdaforums huggingface dataset:
[Xperia Play Q&A, Help & Troubleshooting] themike10452:
inspire yourself with this code

clear ##clear the screen

echo ""

##check for root privilege

id=`id`; id=`echo ${id#*=}`; id=`echo ${id%%\(*}`; id=`echo ${id%% *}`

if [ "$id" = "0" ] || [ "$id" = "root" ]; then

echo "Root permission: Yes"

else

echo "Root permission: No"

echo ""

echo Please run the script with SU permission

sleep 3

exit 69

fi

if [ ! "`which busybox`" ]; then ##check for busybox

echo "Busybox found: No!"

sleep 3

exit 70

else

echo "Busybox found: Yes"

fi

echo ""

busybox mount -o remount,rw /system ## mounts system as r/w

#

#

#your actions here#

#

#

line=====================

m1k3="=== Themike10452 ==="

echo $line

echo $m1k3

echo $line

echo ""

echo Done!

echo ""

echo -n "Reboot now? (Y,N)"

read input ##read user input and store it in "input" variable

case $input in

y|Y) echo "" ##if answer is "y" or "Y" then ...

echo Your phone will now reboot

sleep 2

echo ""

echo ========== POOF! =========

sleep 1

reboot ;;

*) echo "" ##any other answer then ...

echo "So reboot manually later ;)"

sleep 2

exit ;;

esac
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Omg, THANKZ alot!, ;), only problem is I'm not on PC, so I'll continue stuff latter
[Xperia Play Q&A, Help & Troubleshooting] themike10452:
alright :) hit thanks at least :p

---------- Post added at 10:37 PM ---------- Previous post was at 10:30 PM ----------

I'll try to clarify things as much as I can :p this is Unix after all ;)
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
I can't, got to 8 today, will do tmrw, and again thanks alot and I'll check out the code, I like the input part but the reboot and etc... I mostly knew about,:)

[MENTION=4609488]wedgess[/MENTION], it diddent really confuse me, :P, lol
[Xperia Play Q&A, Help & Troubleshooting] themike10452:
benefit from it as much as you can, I added some colors to make it look clearer :p
[Xperia Play Q&A, Help & Troubleshooting] wedgess:
Oh u came back and edited it :p much easier for him now ;)

Good but I would still however look up some bash so u know exactly what's going on and how to fix it if u run into problems.

Ok I looked through your script quickly there... as mike said there is still alot of work to do. this is not ment as destructive criticism but constructive, to help you make it better, which i'm sure is what you want.

It can be cleaned up quite a bit. It looks like you took alot of other peoples scripts/tweaks and put them together with a lot of sleeps, which certainly will not be good... unless u run them in the background. Because device wont boot for a long time with them all, I think there is 3/4mins where script pauses. It will be fine in boot.d as it wont affect boot time but in init.d seems like a NO NO. also thigs like

/system/xbin/echo 1 > /proc/sys/vm/oom_kill_allocating_task

can simply be

echo 1 > /proc/sys/vm/oom_kill_allocating_task

or even better, I think its a good idea to create a variable for busybox say BB. I noticed on LuPuS script at the start certain commands would not work unless I had busybox before each command. I run my kernels busybox from /sbin, So would be

BB=/sbin/busybox

-- this way

$BB echo 1 > /proc/sys/vm/oom_kill_allocating_task

As I also mentioned u should place a check so your script will make sure any scripts already in init.d will not conflict. And if they do give the user option to overwrite or keep their current script or back it up.

edit - Crap u said u wanted it to be universal. So maybe better to check for busybox.

if [ -e /sbin/busybox ]; then
BB=/sbin/busybox
elif [ -e /system/xbin/busybox ]; then
BB=/system/xbin/busybox
elif [ -e /system/bin/busybox ]; then
BB=/system/bin/busybox
else
echo "No busybox found!"
fi
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Thanks alot, for all the help guys! I'll get on working and just to clarify I took the base commands from Lenarox, Juwe11 & many others, tested them & modified alot to find the best combo and I added some of my Own Tweaks!, :)

Also with the whole sleeps thing I already know that it's not Good In init.d and so o was making it to

Just inject all commands

Also in the script their were alot of sleeps because this way it gives each tweak to settle in
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Ok I tried testing this:

(Thanks mike)

case $input in
y|Y) echo "Would You Like to Reboot Now?"
echo "Your phone will now reboot"
sleep 2
echo ""
echo "========== POOF! ========="
sleep 1
reboot ;;
*) echo "If You Dident Reboot Then..."
echo "Reboot Manually!"
sleep 2
exit ;;
esac

And it dosent work in smanager... Need some help with it,:D
[Xperia Play Q&A, Help & Troubleshooting] themike10452:
where the line that reads user input? did you add it first?

=≠=≠=≠=≠=≠=≠=≠=≠=≠=≠

Read input <<this line here

case $input in

y|Y) ....
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
oh ok, :D, Thanks!
[Xperia Play Q&A, Help & Troubleshooting] wedgess:
Had a quick look, looks ok to me,

if [ -e /sbin/busybox ]; then
BB=/sbin/busybox
elif [ -e /system/xbin/busybox ]; then
BB=/system/xbin/busybox
elif [ -e /system/bin/busybox ]; then
BB=/system/bin/busybox
else
echo "No busybox found!"
fi

I would say change that to

if [ -e /sbin/busybox ]; then
echo "Busybox found.."
elif [ -e /system/xbin/busybox ]; then
echo "Busybox found.."
elif [ -e /system/bin/busybox ]; then
echo "Busybox found.."
else
echo "No busybox found!"
fi

BB= was only setting busybox variable incase u needed to have example /sbin/busybox before certain commands. example, small bit lupus-menu...

BB=/sbin/busybox

#Relaunch with /sbin/busybox sh
if [ "$1" != "menu" ]; then $BB sh "$0" "menu"; exit 0; fi

#/sbin not in PATH workaround =)
if [[ "$PATH" != "" ]]; then
export PATH="/sbin:`$BB echo "$PATH" | $BB sed 's#^/sbin:\|:/sbin$##g' | $BB sed 's#:/sbin:#:#g'`";
else
export PATH="/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin";
fi

quick_reset()
{
$BB clear; $BB echo "";
$BB echo "[i] Enabling Key Reset allows you to reboot"
$BB echo "quickly by holding HOME + POWER buttons."
$BB echo ""
$BB echo ""
$BB echo "Do you want to enable/ disable Quick Reset?"
$BB echo ""
$BB echo " E) Enable"
$BB echo " D) Disable"
$BB echo " *) Any key to exit"
$BB echo ""
$BB echo -n " "; read answer;
$BB echo ""
case "$answer" in
E|e)
$BB clear;

$BB mount -o remount,rw /system
if [ "`$BB sed -n 's#^quick_reset=##gpI' /system/lupus.prop 2>/dev/null`" ]; then
$BB sed -i 's#^quick_reset=.*#quick_reset=enabled#gI' /system/lupus.prop
else
$BB echo "quick_reset=enabled" >> /system/lupus.prop
fi
$BB mount -o remount,ro /system

$BB echo "1" > /sys/power/keyreset/enable_reset
$BB echo ""; $BB echo "[*] Quick Key Reset set";
$BB echo " ...and will preserve after reboot"
$BB echo ""; $BB echo "[*] Quick Key Reset Complete ..."; $BB sleep 2;
;;
D|d)
$BB clear; $BB echo "0" > /sys/power/keyreset/enable_reset;
$BB mount -o remount,rw /system
if [ -f /system/lupus.prop ]; then
$BB mount -o remount,rw /system
$BB sed -i 's#^quick_reset=.*#quick_reset=disabled#gI' /system/lupus.prop
$BB mount -o remount,ro /system
fi
$BB mount -o remount,ro /system
$BB echo ""; $BB echo "[*] Quick Key Reset Disabled..."; $BB sleep 3;
;;
*)
$BB clear;
$BB echo -e "\n\n[$answer] Exiting..."; $BB sleep 2;
;;
esac

main_menu_opt;
}
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Oh ok, Thanks alot!, Thing is The Script is Messed up right now and i just realise u cant leave spaces, :D, lol
[Xperia Play Q&A, Help & Troubleshooting] themike10452:
a quick tip:

replace

echo "reboot now(y/n)?"

with

echo -n "reboot now(y/n)?"

This "-n" option will echo the message without printing a new line before getting user input. So the user input will be on the same line as the question. here's what I mean:

If the user presses "y" it will look like this:

reboot now(y/n)?:y

instead of this

reboot now(y/n)?:

y
[Xperia Play Q&A, Help & Troubleshooting] wedgess:
What are the errors u are getting?? I'm at work so can't test it out myself.
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
In SMangaer i get :

mnt/sdcard/Pizza_Engine_1.0.sh.pdf: line 18: syntax error: unexpected "elif" (expecting "then")

also

'leep: invalid number 1

;)

Hope i helped describin!
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Oh thanks alot man, ;)

I think this is also used in Adrenaline Script to make the Boostin now... appear, :D
[Xperia Play Q&A, Help & Troubleshooting] wedgess:
Had another look, your whole script breaks due to this line...

echo "temporarily(t), permanently(p), quit(q), uninstall(u)

should be

echo "temporarily(t), permanently(p), quit(q), uninstall(u)[COLOR="Red"]"[/COLOR]

You should really use a text editor with syntax highlighting.
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Lol, Such a fail, (facepalm) , I do use notepad++, Im not a that much of a newb, ;)

I will re-edit and check it out!, :D
[Xperia Play Q&A, Help & Troubleshooting] DiamondBond:
Gave up guys, came up to another error every time and etc... ill just revert to the simple installation with no choice, ;)

I might bother later to learn some more and to fix this all , :D
[Xperia Play Q&A, Help & Troubleshooting] themike10452:
yea cz a small typo error can ruin your whole day ;)

I finish my official exams on Tuesday then I'll take a deeper look for you :) good night
[AT&T, Rogers HTC One X, Telstra One XL] jacobas92:
Never mind, I got it.
[Sony Xperia P, U, Sola, Go] Sherwinnn:
hey guys, my sola had a problem.... whenever i try to call someone, then it ends by ' Network Busy '. i've tried calling everyone but still ends up with the same problem... anybody knows what happened to my Sola??? :'( and my Sola was rooted btw...
[Sony Xperia P, U, Sola, Go] Ben Ling:
Try to use others sim card on your phone.
[Sony Xperia P, U, Sola, Go] Sherwinnn:
still the same... i guess maxis is down
[Sony Xperia P, U, Sola, Go] Ben Ling:
Maxis?

Use DiGi better,or Celcom.
[Sony Xperia P, U, Sola, Go] Sherwinnn:
DiGi has no wide coverage and celcom sucks
[Galaxy S 4 Q&A, Help & Troubleshooting] hostmark:
I've tried to search on the forum several times but I couldn't find a topic for rooting S4 on Mac.

Can someone enlighten me?

ps. my Stock Rom version is i9500xxuamdk
[Galaxy S 4 Q&A, Help & Troubleshooting] HS™:
http://xdaforums.com/showthread.php?t=2192886

go thru some of first post and ask there there will be many who will help there
[Galaxy S 4 Q&A, Help & Troubleshooting] chickentuna:
I am running a MAC and went to a dead end trying to find out how to root without installing VMware or bootcamp. I was sh*t out of luck so I went thru all the time consuming and nerve wrecking installation of Windows via bootcamp.

Now I'm using Windows 7, it's been a long time since I've felt freedom. It felt like I was given another life to redeem and forgive myself for buying this overpriced piece of crap. Thank you Bill Gates for giving me another chance.
[Galaxy S 4 Q&A, Help & Troubleshooting] CountParadox:
Hey guys, well I managed to do it. Smashed my first screen. On a new phone too... I would have expected to smash it after a year or so but NOOOO I went and messed it up after a month or so...

Anyway, I want to pull a full backup off of my phone. NANDROID Backup is it ?

It still works fine, and I can see tiny tiny parts of the upper left of the screen. and connect through ADB. But none of the ADB remote controlling things I have found work with my mouse/KB.... If I could do that I would be satisfied...

And when I try and remove the pattern via ADB I get permission denied.... Ive spend the last few hours trying to figure out what to do here but im at a loss...

Anyone able to help me out ? :)

Also, Anyone able to tell me how much money im gonna loose replacing this screen ? ;___;

I can also boot into CWM, But I dont know what is what, like, I dont know whats selected because I cant make out the words... I want to do a full backup of everything to external SD card if possible.... photos of the screens of CWM would help XD

I dont remember what version I have installed sorry :c

But yes, PLEASE HELP ME!

Some day I may be able to help you in return, Until then I extend my deepest thanks to all who can help me even in the slightest...

Additional notes:

Screen is buggered, one of these things for the most of it, And the digitizer glass itself is cracked quite a bit on the upper left... :c

I seem to recall seeing CWM 6.0.3 or something along those lines...

I tried these:

http://xdaforums.com/showthread.php?t=1587717

http://xdaforums.com/showthread.php?t=1800799

http://xdaforums.com/showthread.php?t=1420351

http://xdaforums.com/showthread.php?t=1800799&page=2

And a few on non XDA sites I shan't link due to possible rule violations

-CP
[Galaxy S 4 Q&A, Help & Troubleshooting] Cooterjones:
Ever find out?

Ever figure out CWM menu?

I'm in the same boat and waiting for the OTG USB HDMI out adapter to show up, hopefully I can get the mouse and HDMI going at the same time and Titanium Backup everything.

Good Luck!
[Samsung Galaxy Mini] nightmare-fc:
Need Help :rolleyes:
[Samsung Galaxy Mini] ast00:
Info please? What you want to port? Actually 90% of framework and systemUI changes requred. Just don't create a thread without info.

I could say can anybody make me a custom rom? If I don't say anything, nobody will do it. And because xda isn't about requesting, nobody would do it even if I ask with info.
[Samsung Galaxy Mini] nightmare-fc:
i want to learn how to port systmeui and framework

cuz system ui from creed rom in theme and apps is look perfect but the rom not update so there is many bugs in that rom and cuz that i want to port that systemui to other rom

is it possible?:rolleyes:

Sorry for my bad english :eek:
[Samsung Galaxy Mini] Masrepus:
Well, try uot kitchen http://uot.dakra.lt

There u can customize really much, even more than statusbar,... if u want so ;)

U just have to upload systemui.apk, framework-res.apk and optionally a theme chooser theme.apk and u get a flashable zip to download

I really like UOT :)
[Samsung Galaxy Mini] arpitkh96:
Can uot kitchen create smali. I mean that can we add custom slider/options using uot kitchen
[Samsung Galaxy Mini] Masrepus:
Dont know, try :D
[Samsung Galaxy Mini] BohdosCZ:
Thank you

Thank you for this :)
[Samsung Galaxy Mini] Masrepus:
Cool, did it work the way u wanted? :)
[Samsung Galaxy Mini] BohdosCZ:
for me yes :D
[Samsung Galaxy Mini] Ri3v|:
Decompile systemui.apk

Change resolution

Compile back

Copy new systemui to system/app(s)

Install apk

Reboot
[Samsung Galaxy Nexus] moha_moha20106:
Hi all,

This is Samsung Galaxy Google Nexus 3 X GT-I9250 service manual

Download
[Samsung Galaxy Nexus] beekay201:
Thank you for sharing these documents.

a manta wrote this.
[Samsung Galaxy Nexus] Mach3.2:
Can someone reupload to drop box or media fire?

Can't seem to download them..

Many thanks in advance..

Beamed from my Grouper
[Samsung Galaxy Nexus] beekay201:
http://multiupload.biz/j67hiq12coxn...s_3_X_service_manual_MultiUpload.biz.rar.html

hope this works for you

edit: I actually thought right when I was getting the content that I should do everybody else a favor and reupload it to more mirrors.
[Samsung Galaxy Nexus] Mach3.2:
Couldn't thank you more for the mirror!:good:

Edit: Looked through the first few pages, definitely good stuff!

Beamed from my Maguro.
[Samsung Galaxy Nexus] moha_moha20106:
Thank you beekay
[MDA, XDA, 1010 General] Nightblue:
Thanks for your reply.

I am a little new with these issues, could you please advise me a link that i can download that rom. Also which rom number is that ?

Sorry for the lame questions

thanx
[Galaxy S II Q&A, Help & Troubleshooting] geimz:
I know that many people have issue with connecting SGS2 to PC, and i also know that there are plenty of different solutions on internet, but i wouldn't be writing here if i haven't tried literally almost every possible solution out there. I spent 2 days trying to fix this, but still no result.

PC doesn't recognize that my phone is connected, and on the rare occasions when it does - it just shows me an error with drivers - "Windows can't recognize device" or something like that. Of course i tried numerous times reinstalling drivers, Kies, i tried to connect on 3 different PCs, i bought a new cable today - still nothing (but when other phone is connected with the same cable, its recognized immediately.)

I'm running a custom ROM - XWLSW NeatROM Lite v4.8 (JB 4.1.2), but I flashed this rom several months ago and i didn't have a problem with connection until last month. I also tried several other ROMs, but nothing helped.

I tried to dial *#7284#, then change USB to Modem and then back to PDA, didn't help - the same with *#9090# and setting it to Log via Uart. And of course, USB debugging is off. I'm really desperate, the phone is working fine in any other way, but this is a huge complication for me, so any help would be greatly appreciated.

Also sorry for my english, I'm Slovak.
[Galaxy S II Q&A, Help & Troubleshooting] TheMasterOfToast:
Hmm, could be a problem with the USB port in the phone. I had the same symptoms and turns out the USB port was damaged so i got it replaced (i has warranty)

Also have you tried if ODin recognizes the phone? Go into Download mode and open Odin. If you see yellow (or blue) box with writing "com:" something than you're good. Otherwise it's the first alternative
[Galaxy S II Q&A, Help & Troubleshooting] geimz:
I tried Odin, still nothing. Well, I hope it's not a problem with phone USB port - i have a warranty, but I bought it on Cyprus.

Is there any other solution?
[Galaxy S II Q&A, Help & Troubleshooting] GamingDj:
I know this.It's a Sammy ROM bug.I had it too on stock 4.0.3.Since 4.2.2 I don't have it. :)
[Galaxy S II Q&A, Help & Troubleshooting] geimz:
Well, yesterday I tried SentinelROM v4.75-CM10.1, which has 4.2.2 FW, and still the same problem
[Sony Ericsson XPERIA X10 Mini] afi1982:
hey guys if you want I can make a xperia Z looksceen for every cm10 rom, all you need to do is provide me your android.policy.jar and I will make a cwm flash file
[Sony Ericsson XPERIA X10 Mini] isko95:
make it for minicm10, the base rom
[Sony Ericsson XPERIA X10 Mini] afi1982:
can you provide me the file?
[Sony Ericsson XPERIA X10 Mini] akrajilwar:
for Seven bean
[Sony Ericsson XPERIA X10 Mini] willxperia:
Please........for x10 mini pro ... 2.3.7
[Sony Ericsson XPERIA X10 Mini] willxperia:
waiting .......... the zip Xperia z lockscreen
[Sony Ericsson XPERIA X10 Mini] Diabblo:
can make for xperia arc, cm11 ? thanks
[Sony Ericsson XPERIA X10 Mini] willxperia:
waiting zip for CM10 naa 06 kernel
[Windows Phone 7 Q&A, Help & Troubleshooting] Stefan Caromov:
So, i want to ask any of you who has a knowledge , how and where i must to put mp3 to see all of them in settings > ringtones & sounds ?

For now i use the app Ringtone, but i have no choise . I have only one mp3.

When i download music by for example app ringtones, i see all downloaded music in settings > ringtones. I want to see same way my mp3 .

i tried to put them in my documents> my ringtones, but i dont see them at all.

May anyone explane that to me please ?

Lumia 710 full unlocked with rataplan v7.0 rom

Thanks in advanced
[Windows Phone 7 Q&A, Help & Troubleshooting] dazza9075:
Transfer it to zune on your PC, then edit it and make the genre ringtone, sync it, and your phone will have added it to your custom ringtone list
[Windows Phone 7 Q&A, Help & Troubleshooting] Stefan Caromov:
Thanks, but i didnt understood a word ::))

I found other solution , just i copied the song in windows, then i make it stream and i see it at the ringtones and i can choose it
[Java for Android App Development] nikwen:
Debugging apps

This is my multi-post guide on debugging apps.

Android provides its own ways of debugging:

Logcat

The most important aspect when we talk about debugging. Whenever your app crashes, you can find the reason for that in the logs (as long as you install it from your IDE).

However, we can also use it for other ways of debugging. It can help to understand how the app acts and why it does so.

Toasts

Toasts are these small pop-ups you can see in many apps. You can use them for debugging as well.

Debugger in Eclipse or Android Studio

Eclipse and Android Studio have their own debuggers. You can execute the source code step by step and see all variable values during that.

AVDs

If a user reports that the layout does not look great on his device, you can check it using an AVD, often refered to as an emulator. It can help to understand how the app will look on other devices.

Using Google and posting on XDA

Google can help you very much with your problem. If you still cannot figure out what the reasons for your problem are, you can profit by the XDA community power. However, we need some information in order to help you.

This was featured on the XDA portal on June 29, 2013. :D
[Java for Android App Development] nikwen:
Logcat - part II

Your own debug messages

We can also output our own debugging information that way:

Log.d("myTag", "myMessage");

or

Log.e("myTag", "myErrorMessage");

Error messages (produced with Log.e) are shown in red.

The tag can be used for filtering.

It can help us to check specific values when it does not return the right output:

Log.d("start", "hey");

String[] myStringArray = new String[] {"Hello world", "Debugging is fun (normally not ;))", "XDA is great!!!"};

String all = "Words: ";

for (String s: myStringArray) {
Log.d("String s", s);
all = all + s + ", ";
Log.d("new all", all);
}

Log.d("status", "done");

The output:

06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/start: hey
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/String s: Hello world
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/new all: Words: Hello world,
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/String s: Debugging is fun (normally not ;))
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/new all: Words: Hello world, Debugging is fun (normally not ;)),
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/String s: XDA is great!!!
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/new all: Words: Hello world, Debugging is fun (normally not ;)), XDA is great!!!,
06-15 13:15:03.014 1347-1347/de.nikwen.myapplication D/status: done

You can also use the log if one of your methods does not finish:

for (int i = 0; i < 20; i--) {
//do something

Log.d("i", String.valueOf(i));
}

Log.d("status", "1");

myButton.setText("New text");

Log.d("status", "2");

Log.d("status", "done");

You can figure out the reason for logical errors by printing the required information to the logs.

If there are Exceptions you want to handle but you still want the error standard Java error message discussed in the previous post, use the printStackTrace() method of the class Exception:

try {
Thread.sleep(5000);
} catch(Exception e) {
e.printStackTrace();

//do something here
}
[Java for Android App Development] nikwen:
Toasts

Toasts are these little windows you can see in many apps.

(Source: http://developer.android.com/images/toast.png)

You can also use them for debugging. You can output your values using Toasts instead of logcat messages.

Using Toasts for debugging is a great option, if you want to actually see the values when you test on a real device with no computer around, e.g. on the train.

It is also helpful if you want a customer to test your app. Using toasts, you can show him that something went wrong.

Do it that way:

Toast.makeText(getApplicationContext(), "My message", Toast.LENGTH_LONG).show();

(Do not forget the .show()!)

If you invoke this in an Activity, you can also do this:

Toast.makeText(this, "My message", Toast.LENGTH_LONG).show();

The disadvantage is that they are just shown for a short period of time.